refactor(deliverables): share file reference guidance as a plugin
This commit is contained in:
1 parent
909ffb6941
commit
c4b3b4f82e
30 files changed
+356
-97
No files matched your search
@@ -4734,6 +4734,7 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
|
||||
| `@deepseek-ai/dsh-config-editor` | `loader` · `profileContext` | [`packages/boot/config-editor/src/index.ts`](../packages/boot/config-editor/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-cordis-client-runner` | — | [`packages/extensions/cordis-client-runner/src/index.ts`](../packages/extensions/cordis-client-runner/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-deepseek-llm-api-extensions` | — | [`packages/llm/deepseek-llm-api-extensions/src/index.ts`](../packages/llm/deepseek-llm-api-extensions/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-deliverable-file-references` | `systemPrompt` | [`packages/deliverables/deliverable-file-references/src/index.ts`](../packages/deliverables/deliverable-file-references/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-auto-review` | `approval` · `llm` · `permissionPresets` · `sessions` · `tools` · `workingDirectory` | [`packages/experimental/auto-review/src/index.ts`](../packages/experimental/auto-review/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-client-ui-agent-team` | — | [`packages/experimental/client-ui-agent-team/src/index.ts`](../packages/experimental/client-ui-agent-team/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-client-ui-claude-code-mods` | — | [`packages/experimental/client-ui-claude-code-mods/src/index.ts`](../packages/experimental/client-ui-claude-code-mods/src/index.ts) |
|
||||
|
||||
@@ -4736,6 +4736,7 @@ export interface Config {
|
||||
| `@deepseek-ai/dsh-config-editor` | `loader` · `profileContext` | [`packages/boot/config-editor/src/index.ts`](../packages/boot/config-editor/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-cordis-client-runner` | — | [`packages/extensions/cordis-client-runner/src/index.ts`](../packages/extensions/cordis-client-runner/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-deepseek-llm-api-extensions` | — | [`packages/llm/deepseek-llm-api-extensions/src/index.ts`](../packages/llm/deepseek-llm-api-extensions/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-deliverable-file-references` | `systemPrompt` | [`packages/deliverables/deliverable-file-references/src/index.ts`](../packages/deliverables/deliverable-file-references/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-auto-review` | `approval` · `llm` · `permissionPresets` · `sessions` · `tools` · `workingDirectory` | [`packages/experimental/auto-review/src/index.ts`](../packages/experimental/auto-review/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-client-ui-agent-team` | — | [`packages/experimental/client-ui-agent-team/src/index.ts`](../packages/experimental/client-ui-agent-team/src/index.ts) |
|
||||
| `@deepseek-ai/dsh-experimental-client-ui-claude-code-mods` | — | [`packages/experimental/client-ui-claude-code-mods/src/index.ts`](../packages/experimental/client-ui-claude-code-mods/src/index.ts) |
|
||||
|
||||
@@ -239,6 +239,7 @@ flowchart TD
|
||||
pkg_deepseek_account_platform["deepseek-account-platform"]
|
||||
end
|
||||
subgraph group_deliverables["packages/deliverables"]
|
||||
pkg_deliverable_file_references["deliverable-file-references"]
|
||||
pkg_tool_present["tool-present"]
|
||||
pkg_workspace_changes["workspace-changes"]
|
||||
end
|
||||
@@ -500,6 +501,7 @@ flowchart TD
|
||||
pkg_attachment_local --> pkg_home_paths
|
||||
pkg_hmr --> pkg_app_boot
|
||||
pkg_hmr --> pkg_cmdline
|
||||
pkg_deliverable_file_references --> pkg_system_prompt
|
||||
pkg_experimental_computer_use_cua_driver_mcp --> pkg_computer_use
|
||||
pkg_experimental_webworker_runtime --> pkg_client_connection
|
||||
pkg_experimental_webworker_runtime --> pkg_client_modules
|
||||
@@ -898,7 +900,6 @@ flowchart TD
|
||||
pkg_tool_present --> pkg_llm
|
||||
pkg_tool_present --> pkg_session
|
||||
pkg_tool_present --> pkg_session_projection
|
||||
pkg_tool_present --> pkg_system_prompt
|
||||
pkg_tool_present --> pkg_tools
|
||||
pkg_tool_present --> pkg_working_directory
|
||||
pkg_workspace_changes --> pkg_agent
|
||||
@@ -1607,6 +1608,7 @@ flowchart TD
|
||||
| [`api-terminal-controller`](../packages/api/terminal-controller) | `api` | [`subprocess`](../packages/subprocess/subprocess) |
|
||||
| [`attachment-local`](../packages/attachment/attachment-local) | `attachment` | [`attachment`](../packages/attachment/attachment), [`home-paths`](../packages/util/home-paths) |
|
||||
| [`hmr`](../packages/boot/hmr) | `boot` | [`app-boot`](../packages/boot/app-boot), [`cmdline`](../packages/boot/cmdline) |
|
||||
| [`deliverable-file-references`](../packages/deliverables/deliverable-file-references) | `deliverables` | [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`experimental-computer-use-cua-driver-mcp`](../packages/experimental/computer-use-cua-driver-mcp) | `experimental` | [`computer-use`](../packages/computer-use/computer-use) |
|
||||
| [`experimental-webworker-runtime`](../packages/experimental/webworker-runtime) | `experimental` | [`client-connection`](../packages/client/connection), [`client-modules`](../packages/client/modules), [`host-webserver`](../packages/host/webserver) |
|
||||
| [`skill-badge`](../packages/experimental/skill-badge) | `experimental` | [`skill`](../packages/skill/skill) |
|
||||
@@ -1706,7 +1708,7 @@ flowchart TD
|
||||
| [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | `compaction` | [`agent`](../packages/core/agent), [`compaction`](../packages/compaction/compaction), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
|
||||
| [`agent-instructions`](../packages/context/agent-instructions) | `context` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`home-paths`](../packages/util/home-paths), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`file-reference-local`](../packages/context/file-reference-local) | `context` | [`agent`](../packages/core/agent), [`file-reference`](../packages/context/file-reference), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`tool-present`](../packages/deliverables/tool-present) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`tool-present`](../packages/deliverables/tool-present) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`workspace-changes`](../packages/deliverables/workspace-changes) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`session`](../packages/core/session), [`subprocess`](../packages/subprocess/subprocess), [`tools`](../packages/core/tools) |
|
||||
| [`cua`](../packages/experimental/cua) | `experimental` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`computer-use`](../packages/computer-use/computer-use), [`llm`](../packages/llm/llm), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| [`experimental-browser-use-chrome-devtools-mcp`](../packages/experimental/browser-use-chrome-devtools-mcp) | `experimental` | [`agent`](../packages/core/agent), [`browser-use`](../packages/browser-use/browser-use), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
|
||||
@@ -241,6 +241,7 @@ flowchart TD
|
||||
pkg_deepseek_account_platform["deepseek-account-platform"]
|
||||
end
|
||||
subgraph group_deliverables["packages/deliverables"]
|
||||
pkg_deliverable_file_references["deliverable-file-references"]
|
||||
pkg_tool_present["tool-present"]
|
||||
pkg_workspace_changes["workspace-changes"]
|
||||
end
|
||||
@@ -502,6 +503,7 @@ flowchart TD
|
||||
pkg_attachment_local --> pkg_home_paths
|
||||
pkg_hmr --> pkg_app_boot
|
||||
pkg_hmr --> pkg_cmdline
|
||||
pkg_deliverable_file_references --> pkg_system_prompt
|
||||
pkg_experimental_computer_use_cua_driver_mcp --> pkg_computer_use
|
||||
pkg_experimental_webworker_runtime --> pkg_client_connection
|
||||
pkg_experimental_webworker_runtime --> pkg_client_modules
|
||||
@@ -900,7 +902,6 @@ flowchart TD
|
||||
pkg_tool_present --> pkg_llm
|
||||
pkg_tool_present --> pkg_session
|
||||
pkg_tool_present --> pkg_session_projection
|
||||
pkg_tool_present --> pkg_system_prompt
|
||||
pkg_tool_present --> pkg_tools
|
||||
pkg_tool_present --> pkg_working_directory
|
||||
pkg_workspace_changes --> pkg_agent
|
||||
@@ -1609,6 +1610,7 @@ flowchart TD
|
||||
| [`api-terminal-controller`](../packages/api/terminal-controller) | `api` | [`subprocess`](../packages/subprocess/subprocess) |
|
||||
| [`attachment-local`](../packages/attachment/attachment-local) | `attachment` | [`attachment`](../packages/attachment/attachment), [`home-paths`](../packages/util/home-paths) |
|
||||
| [`hmr`](../packages/boot/hmr) | `boot` | [`app-boot`](../packages/boot/app-boot), [`cmdline`](../packages/boot/cmdline) |
|
||||
| [`deliverable-file-references`](../packages/deliverables/deliverable-file-references) | `deliverables` | [`system-prompt`](../packages/core/system-prompt) |
|
||||
| [`experimental-computer-use-cua-driver-mcp`](../packages/experimental/computer-use-cua-driver-mcp) | `experimental` | [`computer-use`](../packages/computer-use/computer-use) |
|
||||
| [`experimental-webworker-runtime`](../packages/experimental/webworker-runtime) | `experimental` | [`client-connection`](../packages/client/connection), [`client-modules`](../packages/client/modules), [`host-webserver`](../packages/host/webserver) |
|
||||
| [`skill-badge`](../packages/experimental/skill-badge) | `experimental` | [`skill`](../packages/skill/skill) |
|
||||
@@ -1708,7 +1710,7 @@ flowchart TD
|
||||
| [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | `compaction` | [`agent`](../packages/core/agent), [`compaction`](../packages/compaction/compaction), [`llm`](../packages/llm/llm), [`session`](../packages/core/session) |
|
||||
| [`agent-instructions`](../packages/context/agent-instructions) | `context` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`home-paths`](../packages/util/home-paths), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`file-reference-local`](../packages/context/file-reference-local) | `context` | [`agent`](../packages/core/agent), [`file-reference`](../packages/context/file-reference), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`tool-present`](../packages/deliverables/tool-present) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`tool-present`](../packages/deliverables/tool-present) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`llm`](../packages/llm/llm), [`session`](../packages/core/session), [`session-projection`](../packages/session/session-projection), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
| [`workspace-changes`](../packages/deliverables/workspace-changes) | `deliverables` | [`agent`](../packages/core/agent), [`fs`](../packages/fs/fs), [`session`](../packages/core/session), [`subprocess`](../packages/subprocess/subprocess), [`tools`](../packages/core/tools) |
|
||||
| [`cua`](../packages/experimental/cua) | `experimental` | [`agent`](../packages/core/agent), [`attachment`](../packages/attachment/attachment), [`computer-use`](../packages/computer-use/computer-use), [`llm`](../packages/llm/llm), [`subprocess`](../packages/subprocess/subprocess), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`user-questions`](../packages/interaction/user-questions) |
|
||||
| [`experimental-browser-use-chrome-devtools-mcp`](../packages/experimental/browser-use-chrome-devtools-mcp) | `experimental` | [`agent`](../packages/core/agent), [`browser-use`](../packages/browser-use/browser-use), [`system-prompt`](../packages/core/system-prompt), [`tools`](../packages/core/tools), [`working-directory`](../packages/session/working-directory) |
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
name: '@deepseek-ai/dsh-file-reference-local'
|
||||
|
||||
- id: deliverable-file-references
|
||||
name: '@deepseek-ai/dsh-tool-present/prompt'
|
||||
name: '@deepseek-ai/dsh-deliverable-file-references'
|
||||
@@ -48,7 +48,8 @@
|
||||
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-ask-user": "workspace:*",
|
||||
"@deepseek-ai/dsh-tool-present": "workspace:*",
|
||||
"@deepseek-ai/dsh-file-reference-local": "workspace:*"
|
||||
"@deepseek-ai/dsh-file-reference-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-deliverable-file-references": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~"
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
name: '@deepseek-ai/dsh-client-ui-cordis'
|
||||
|
||||
- id: deliverable-file-references
|
||||
name: '@deepseek-ai/dsh-tool-present/prompt'
|
||||
name: '@deepseek-ai/dsh-deliverable-file-references'
|
||||
|
||||
# Turn tail: the changed-files card and delivery cards under each closing
|
||||
# assistant message. Remove this entry to turn the surface off; the tail
|
||||
|
||||
@@ -188,7 +188,8 @@
|
||||
"@deepseek-ai/dsh-client-product-analytics": "workspace:*",
|
||||
"@deepseek-ai/dsh-host-product-telemetry-otel": "workspace:*",
|
||||
"@deepseek-ai/dsh-client-ui-settings-session-log": "workspace:*",
|
||||
"@deepseek-ai/dsh-harness-dev-context": "workspace:*"
|
||||
"@deepseek-ai/dsh-harness-dev-context": "workspace:*",
|
||||
"@deepseek-ai/dsh-deliverable-file-references": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
en: 4a2fcdcf13276fef
|
||||
zh: 8bde03bbbf15840c
|
||||
/deepseek-ai-dsh-client-ui-deliverables/use-this-package/explicit-deliveries:
|
||||
en: 0ee4bbe45bb5e473
|
||||
zh: 9c99d829b25f59ba
|
||||
en: 6ae1652a01354a6f
|
||||
zh: baa44d415d7a9f0e
|
||||
/deepseek-ai-dsh-client-ui-deliverables/use-this-package/the-changed-files-card:
|
||||
en: 4b279e2bddddc083
|
||||
zh: a3135393299c935b
|
||||
@@ -30,8 +30,8 @@
|
||||
en: ef13aac8ac36a5c3
|
||||
zh: 1e2ae4b3eaf98818
|
||||
/deepseek-ai-dsh-client-ui-deliverables/understand-the-implementation:
|
||||
en: 13e06395a2c447bf
|
||||
zh: c2c29bbfbfabe756
|
||||
en: 7ee5ee783902662c
|
||||
zh: fdf2c244fb22b8ab
|
||||
/deepseek-ai-dsh-client-ui-deliverables/further-exploration:
|
||||
en: 476b59e8671db982
|
||||
zh: b3d0495a03e8940a
|
||||
@@ -42,8 +42,8 @@
|
||||
en: 18f9c56e10a44603
|
||||
zh: b774e6e5f2a5db6d
|
||||
/deepseek-ai-dsh-client-ui-deliverables/model-experience/desktop-file-references/what-the-model-sees:
|
||||
en: ade01222139a3102
|
||||
zh: 2c38b07226970fa9
|
||||
en: 635d8304709cfbc9
|
||||
zh: 8ee33c6046743fb7
|
||||
/deepseek-ai-dsh-client-ui-deliverables/model-experience/desktop-file-references/token-effect:
|
||||
en: 2f1bfc1df1d8d8f3
|
||||
zh: 4af1b4599f3d6a6a
|
||||
|
||||
@@ -34,7 +34,7 @@ Changed-file and delivery entry cards and hover previews follow the [R16 preview
|
||||
|
||||
The `present` tool's preparing stage is one non-expandable document-icon row. It does not show filenames, create delivery cards, or enable file actions before the recorded call supplies arguments.
|
||||
|
||||
The Web `standard`, `ptc`, and `cordis` presets expose `present` for final files accessible through the Session filesystem, including files created through Bash. Call it with `files: [{ path, description? }]` after creating the files. The [present tool](../../deliverables/tool-present/README.md) owns file-count limits and Session declarations. A single delivery fills the row; multiple deliveries form a two-column grid, collapsed after four files. Cards show the basename, description or file type, and a shared native opening control. Delivery and changed-file icon tiles use white at 50% opacity in the light theme and 5% in the dark theme. Icon tiles and single-file changed cards use the same border as delivery cards. Clicking the card previews the file in the right Sidebar. The control opens the default application and lists associated applications, with file reveal last. Matching inline-code references also open Sidebar previews. Duplicate declarations use the last description before the closing reply.
|
||||
The Web `standard`, `ptc`, and `cordis` presets expose `present` for final files accessible through the Session filesystem, including files created through Bash. Call it with `files: [{ path, description? }]` after creating the files. The [present tool](../../deliverables/deliverable-file-references/README.md) owns file-count limits and Session declarations. A single delivery fills the row; multiple deliveries form a two-column grid, collapsed after four files. Cards show the basename, description or file type, and a shared native opening control. Delivery and changed-file icon tiles use white at 50% opacity in the light theme and 5% in the dark theme. Icon tiles and single-file changed cards use the same border as delivery cards. Clicking the card previews the file in the right Sidebar. The control opens the default application and lists associated applications, with file reveal last. Matching inline-code references also open Sidebar previews. Duplicate declarations use the last description before the closing reply.
|
||||
|
||||
The `present` tool row retains its document icon and recorded result across progress, success, failure, and interruption. Native actions share pending state and publish progress or retryable errors on the card. Successful open or reveal feedback stays visible for five seconds, fades over 200ms, then restores the file description; failures remain visible until another attempt. Desktop metadata is loaded when cards mount and invalidated on connection replacement. Without a Host desktop, cards retain Sidebar preview but omit native controls; failed metadata reads offer Retry. Delivery cards and change review expose `deliverables.file.actions` and `deliverables.review.file.actions`, supplied by [ui-open-in-app](../ui-open-in-app/README.md). Association GET requests and native POST actions both validate the recorded file coordinates and Session filesystem mapping before using the Host desktop.
|
||||
|
||||
@@ -64,7 +64,7 @@ The closing prose links produced or delivered paths: an inline-code token resolv
|
||||
<details>
|
||||
<summary>Implementation internals — click to expand</summary>
|
||||
|
||||
The Node half registers the static `ui:deliverable-file-references` system-prompt section described under [Model Experience](#model-experience). Explicit Markdown links use the shared [Markdown renderer](../ui-primitives/README.md); inline-code matching remains limited to produced or delivered files. The browser half registers a wrapper around the changed-files card and explicit deliveries into the chat view's `conversation.chat.turnTail` list alongside other feature artifacts. `deliverablesDefinition` folds the sequence of each Turn's latest validated `workspace/changes` announcement into `DeliverablesTurnData.changes`, whose summary the card reads from the Host and caches until the connection is replaced, its `deliverables/presented` events into deliveries, and the successful first-party mutation calls of `write`, `edit`, and mutating `str_replace_editor` commands into recorded file targets and exact argument aliases after validating their raw arguments; the produced paths feed only the prose mention resolver. Successful absolute `meta.path` values identify those targets. Root results without that field retain the legacy argument fallback; malformed relative targets contribute no guessed path. Reads, deletes, unsupported tools, malformed calls, malformed events, and failed results contribute nothing. Each row opens `dsh-resource://changes-review/session/<sessionId>/<seq>/<turn>` through `ctx.sidebarRight.openResource` with the file's index as the `changes-review` navigation parameter; the package registers the `changes-review` tab type at the `builtin` band for that pattern and its body under the keyed `sidebar.right.pane.tab` seat with an exclusive store of per-tab choices, and the body reads the summary and the comparisons through the authenticated routes into stores cleared on connection replacement. The package also provides the `chatFileMentions` service the chat view consults per closing message; composing the plugin out removes every surface and leaves the view's empty list at zero cost.
|
||||
The Node half serves authenticated native file opens; the shared guidance comes from the separately mounted file-reference plugin described under [Model Experience](#model-experience). Explicit Markdown links use the shared [Markdown renderer](../ui-primitives/README.md); inline-code matching remains limited to produced or delivered files. The browser half registers a wrapper around the changed-files card and explicit deliveries into the chat view's `conversation.chat.turnTail` list alongside other feature artifacts. `deliverablesDefinition` folds the sequence of each Turn's latest validated `workspace/changes` announcement into `DeliverablesTurnData.changes`, whose summary the card reads from the Host and caches until the connection is replaced, its `deliverables/presented` events into deliveries, and the successful first-party mutation calls of `write`, `edit`, and mutating `str_replace_editor` commands into recorded file targets and exact argument aliases after validating their raw arguments; the produced paths feed only the prose mention resolver. Successful absolute `meta.path` values identify those targets. Root results without that field retain the legacy argument fallback; malformed relative targets contribute no guessed path. Reads, deletes, unsupported tools, malformed calls, malformed events, and failed results contribute nothing. Each row opens `dsh-resource://changes-review/session/<sessionId>/<seq>/<turn>` through `ctx.sidebarRight.openResource` with the file's index as the `changes-review` navigation parameter; the package registers the `changes-review` tab type at the `builtin` band for that pattern and its body under the keyed `sidebar.right.pane.tab` seat with an exclusive store of per-tab choices, and the body reads the summary and the comparisons through the authenticated routes into stores cleared on connection replacement. The package also provides the `chatFileMentions` service the chat view consults per closing message; composing the plugin out removes every surface and leaves the view's empty list at zero cost.
|
||||
|
||||
Native opening uses an authenticated POST addressed by the viewed Session, event sequence, and original file index; the review tab's native open of a changed file uses the same coordinates. For a declaration the Host reads the viewed Session header with the event and passes its cwd, or the deployment workspace root when absent, to `workspaceFiles.stat`; for a changed file it passes the working directory the served summary carries. This uses the same composed filesystem as Sidebar previews and does not activate an Agent, including for child Sessions. Native actions require the canonical process path to map from a Host path back to that same process path. Providers without this mapping return 422, after which the review tab hides its native open; a same-named Host file is insufficient. The same configured desktop availability governs metadata and execution. Edits affect subsequent opens; deletion returns an error. No file-content copy or attachment is created. Plugin disposal cancels and awaits pending native-open requests.
|
||||
|
||||
@@ -93,7 +93,7 @@ Read these pages when the deliverables surface is not enough. They move from the
|
||||
|
||||
#### What the model sees
|
||||
|
||||
The Web composition mounts the shared [`dsh-tool-present/prompt`](../../deliverables/tool-present/README.md#model-experience) guidance. This UI package renders the resulting file references and cards.
|
||||
The Web composition mounts the shared [`dsh-deliverable-file-references`](../../deliverables/deliverable-file-references/README.md#model-experience) guidance. This UI package renders the resulting file references and cards.
|
||||
|
||||
#### Token effect
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ kind: "package-reference"
|
||||
|
||||
`present` 工具的准备阶段是带文档图标的不可展开单行。记录的调用提供参数前,该行不显示文件名、不创建交付卡片,也不启用文件操作。
|
||||
|
||||
Web 的 `standard`、`ptc` 与 `cordis` preset 提供 `present`,用于声明会话文件系统可访问的最终文件,包括通过 Bash 创建的文件。创建后以 `files: [{ path, description? }]` 调用。[present 工具](../../deliverables/tool-present/README.zh.md)拥有文件数量限制和会话声明。单个交付占满一行,多个交付使用双列网格,超过四个时默认收起。卡片显示文件名、说明或文件类型,以及共享的原生打开控件。交付和改动文件卡片的图标底块在浅色主题下使用 50% 不透明度的白色,深色主题下为 5%。图标底块与单文件改动卡片的外框使用与交付卡片相同的描边。点击卡片会在右侧 Sidebar 预览文件。控件打开默认应用,并列出关联应用,文件定位始终放在最后。匹配的行内代码引用也打开 Sidebar 预览。重复声明使用收尾回复之前最近一次的说明。
|
||||
Web 的 `standard`、`ptc` 与 `cordis` preset 提供 `present`,用于声明会话文件系统可访问的最终文件,包括通过 Bash 创建的文件。创建后以 `files: [{ path, description? }]` 调用。[present 工具](../../deliverables/deliverable-file-references/README.zh.md)拥有文件数量限制和会话声明。单个交付占满一行,多个交付使用双列网格,超过四个时默认收起。卡片显示文件名、说明或文件类型,以及共享的原生打开控件。交付和改动文件卡片的图标底块在浅色主题下使用 50% 不透明度的白色,深色主题下为 5%。图标底块与单文件改动卡片的外框使用与交付卡片相同的描边。点击卡片会在右侧 Sidebar 预览文件。控件打开默认应用,并列出关联应用,文件定位始终放在最后。匹配的行内代码引用也打开 Sidebar 预览。重复声明使用收尾回复之前最近一次的说明。
|
||||
|
||||
`present` 工具行在执行、成功、失败和中断状态下保留文档图标及记录的结果。原生操作共享等待状态,并在卡片显示进度或可重试错误。打开或定位成功的反馈显示五秒后,在 200ms 内淡出并恢复文件说明;失败信息保留到下次尝试。卡片挂载时读取桌面信息,连接更换时清除缓存。Host 没有桌面时,卡片保留 Sidebar 预览并隐藏原生控件;元数据读取失败时提供重试。交付卡片和变更对比页通过 `deliverables.file.actions` 和 `deliverables.review.file.actions` 使用 [ui-open-in-app](../ui-open-in-app/README.zh.md) 提供的控件。关联应用 GET 查询与原生 POST 操作都会先校验记录中的文件坐标及会话文件系统映射,再调用 Host 桌面。
|
||||
|
||||
@@ -64,7 +64,7 @@ Web 的 `standard`、`ptc` 与 `cordis` preset 提供 `present`,用于声明
|
||||
<details>
|
||||
<summary>实现细节——点击展开</summary>
|
||||
|
||||
Node 半部注册[模型体验](#model-experience)所述的静态 `ui:deliverable-file-references` 系统提示词段。显式 Markdown 链接使用共享的 [Markdown 渲染器](../ui-primitives/README.zh.md);行内代码匹配仍仅限产出或交付文件。浏览器半部把组合改动文件卡片与显式交付的包装组件注册进 chat 视图的 `conversation.chat.turnTail` 列表,与其他功能产物并列。`deliverablesDefinition` 把每个轮次最新且通过校验的 `workspace/changes` 宣告的序号折叠进 `DeliverablesTurnData.changes`,卡片按它向 Host 读取摘要并缓存到连接被替换为止,把 `deliverables/presented` 事件折叠为交付,并根据 `write`、`edit` 和有修改作用的 `str_replace_editor` 命令中经过校验的原始参数与结果记录的绝对 `meta.path` 把成功的第一方修改调用折叠为产出路径及精确参数别名;产出路径只供正文提及解析器使用。不带该字段的成功根调用保留历史参数回退;格式错误的相对目标不产生猜测路径。读取、删除、不受支持的工具、格式错误的调用、格式错误的事件和失败结果不贡献任何条目。每一行通过 `ctx.sidebarRight.openResource` 打开 `dsh-resource://changes-review/session/<sessionId>/<seq>/<turn>`,并以文件下标作为 `changes-review` 的导航参数;本包在 `builtin` 档为该模式注册 `changes-review` tab 类型,把其 body 连同一个按 tab 保存选择的独占 store 注册到按键的 `sidebar.right.pane.tab` 座位下,body 通过经过认证的路由把摘要和对比读进连接更换时清空的 store。本包还提供 chat 视图按收尾消息查询的 `chatFileMentions` 服务;把插件组合出去会移除全部表面,视图的空列表以零成本留下。
|
||||
Node 半部提供经过身份验证的原生文件打开;共用指导由[模型体验](#model-experience)所述的独立文件引用插件提供。显式 Markdown 链接使用共享的 [Markdown 渲染器](../ui-primitives/README.zh.md);行内代码匹配仍仅限产出或交付文件。浏览器半部把组合改动文件卡片与显式交付的包装组件注册进 chat 视图的 `conversation.chat.turnTail` 列表,与其他功能产物并列。`deliverablesDefinition` 把每个轮次最新且通过校验的 `workspace/changes` 宣告的序号折叠进 `DeliverablesTurnData.changes`,卡片按它向 Host 读取摘要并缓存到连接被替换为止,把 `deliverables/presented` 事件折叠为交付,并根据 `write`、`edit` 和有修改作用的 `str_replace_editor` 命令中经过校验的原始参数与结果记录的绝对 `meta.path` 把成功的第一方修改调用折叠为产出路径及精确参数别名;产出路径只供正文提及解析器使用。不带该字段的成功根调用保留历史参数回退;格式错误的相对目标不产生猜测路径。读取、删除、不受支持的工具、格式错误的调用、格式错误的事件和失败结果不贡献任何条目。每一行通过 `ctx.sidebarRight.openResource` 打开 `dsh-resource://changes-review/session/<sessionId>/<seq>/<turn>`,并以文件下标作为 `changes-review` 的导航参数;本包在 `builtin` 档为该模式注册 `changes-review` tab 类型,把其 body 连同一个按 tab 保存选择的独占 store 注册到按键的 `sidebar.right.pane.tab` 座位下,body 通过经过认证的路由把摘要和对比读进连接更换时清空的 store。本包还提供 chat 视图按收尾消息查询的 `chatFileMentions` 服务;把插件组合出去会移除全部表面,视图的空列表以零成本留下。
|
||||
|
||||
原生打开使用经过认证的 POST,通过当前查看的会话、事件序号和原始文件索引定位声明;review tab 对改动文件的原生打开使用同一组坐标。对声明,Host 读取事件及当前查看的会话 header,将其中的 cwd 传给 `workspaceFiles.stat`,未记录 cwd 时使用部署的工作目录;对改动文件,传的是所提供摘要携带的工作目录。它与侧栏预览使用同一组合文件系统,无需启动 Agent,子会话也适用。原生操作要求规范化的进程路径能从 Host 路径映射回同一进程路径。提供方没有这种映射时返回 422,之后 review tab 隐藏原生打开;Host 上存在同名文件并不足够。同一份桌面可用性配置同时约束信息查询和实际执行。编辑会影响后续打开的内容;删除后返回错误。不创建文件内容副本或附件。插件释放时取消并等待进行中的原生打开请求。
|
||||
|
||||
@@ -93,7 +93,7 @@ Node 半部注册[模型体验](#model-experience)所述的静态 `ui:deliverabl
|
||||
|
||||
#### 模型看到的内容
|
||||
|
||||
Web 组合挂载共用的 [`dsh-tool-present/prompt`](../../deliverables/tool-present/README.zh.md#model-experience) 指导。本 UI 包渲染相应的文件引用和卡片。
|
||||
Web 组合挂载共用的 [`dsh-deliverable-file-references`](../../deliverables/deliverable-file-references/README.zh.md#model-experience) 指导。本 UI 包渲染相应的文件引用和卡片。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
en: 1eb35b015a6c423f
|
||||
zh: a8a3dceee2c9e943
|
||||
/packages-deliverables/packages:
|
||||
en: a421c20359e2a77b
|
||||
zh: 70286affa23c2af4
|
||||
en: a437bcc95b45e6bb
|
||||
zh: 181a543289f1386a
|
||||
/packages-deliverables/related-documentation:
|
||||
en: f640329953d0787b
|
||||
zh: 3d4065e793f426ee
|
||||
|
||||
@@ -24,6 +24,7 @@ The deliverables family records what a turn hands to the user as durable Session
|
||||
|
||||
| Package | Role | ctx key |
|
||||
|---|---|---|
|
||||
| [`deliverable-file-references`](deliverable-file-references/README.md) | Shared file-link and result-delivery guidance for Web and SDK hosts | registers on `ctx.systemPrompt` |
|
||||
| [`tool-present`](tool-present/README.md) | Declares existing files as final deliverables through the `present` tool | registers on `ctx.tools` |
|
||||
| [`workspace-changes`](workspace-changes/README.md) | Summarizes each top-level turn's changed files from git working-tree snapshots and whole-file captures, and serves their comparisons | provides `ctx.workspaceChanges`; listens to `session/event`, appends `workspace/changes` |
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ deliverables 系列把一轮交给用户的内容记录为只有客户端读取
|
||||
|
||||
| 包 | 角色 | ctx key |
|
||||
|---|---|---|
|
||||
| [`deliverable-file-references`](deliverable-file-references/README.zh.md) | Web 与 SDK 宿主共用的文件链接与结果交付指导 | 注册到 `ctx.systemPrompt` |
|
||||
| [`tool-present`](tool-present/README.zh.md) | 通过 `present` 工具把已有文件声明为最终交付物 | 注册到 `ctx.tools` |
|
||||
| [`workspace-changes`](workspace-changes/README.zh.md) | 用 git 工作树快照和整文件捕获汇总每个顶层轮次改动的文件,并提供其对比 | 提供 `ctx.workspaceChanges`;监听 `session/event`,追加 `workspace/changes` |
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/deliverables/deliverable-file-references/README.md
|
||||
/:
|
||||
en: be4edd7a1427808e
|
||||
zh: 11cd071f23d83084
|
||||
/deepseek-ai-dsh-deliverable-file-references:
|
||||
en: 86c55674ad26ea6f
|
||||
zh: 6c1e7fbd9808e727
|
||||
/deepseek-ai-dsh-deliverable-file-references/summary:
|
||||
en: c1d53b592282a502
|
||||
zh: c9fe1ed8de02ea68
|
||||
/deepseek-ai-dsh-deliverable-file-references/table-of-contents:
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-deliverable-file-references/use-this-package:
|
||||
en: 582e00c45e6b82f2
|
||||
zh: 516580c07a0d8abd
|
||||
/deepseek-ai-dsh-deliverable-file-references/understand-the-implementation:
|
||||
en: 4fe7c3a943dbfee1
|
||||
zh: c9df999dcf922e37
|
||||
/deepseek-ai-dsh-deliverable-file-references/further-exploration:
|
||||
en: 87bee2f9ae099907
|
||||
zh: c6906e52aae6e670
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience:
|
||||
en: 215e7ba838619b7b
|
||||
zh: a311da3843709f90
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience/file-reference-guidance:
|
||||
en: def6db96da0ca05a
|
||||
zh: a0956e37e0a362c9
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience/file-reference-guidance/what-the-model-sees:
|
||||
en: 1dfb9b2c748c87fe
|
||||
zh: 9b4308986ae22e3a
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience/file-reference-guidance/what-the-model-sees/shared-guidance:
|
||||
en: f6f9454c369cd5a2
|
||||
zh: 127b54d86cdf0cd5
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience/file-reference-guidance/token-effect:
|
||||
en: f3c44754e5881a8d
|
||||
zh: cf72c0d320ee4881
|
||||
/deepseek-ai-dsh-deliverable-file-references/model-experience/file-reference-guidance/kv-cache-effect:
|
||||
en: a1a94134f784ac31
|
||||
zh: d763a15160ef4043
|
||||
/deepseek-ai-dsh-deliverable-file-references/known-limitations-and-deferred-work:
|
||||
en: 8cf1186304d4f10b
|
||||
zh: b38c0eb9558b3bdc
|
||||
/deepseek-ai-dsh-deliverable-file-references/known-limitations-and-deferred-work/dev-note:
|
||||
en: e67f633dc6fe7773
|
||||
zh: e88aeb617ffb74ea
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
description: "Give Web and SDK agents shared instructions for linking files and delivering results."
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-deliverable-file-references
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
## Summary
|
||||
|
||||
Agents receive the same file-link and result-delivery instructions in Web and SDK sessions. Use this guidance when a host can expose links or delivered files. It adds one fixed system-prompt paragraph; hosts retain responsibility for file access and rendering.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Use this package](#use-this-package)
|
||||
- [Understand the implementation](#understand-the-implementation)
|
||||
- [Further Exploration](#further-exploration)
|
||||
- [Model Experience](#model-experience)
|
||||
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
||||
- [Dev Note](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
The Web and `sdk` bundles mount this plugin independently of the `present` tool. Custom compositions need only `systemPrompt`:
|
||||
|
||||
```yaml
|
||||
- id: deliverable-file-references
|
||||
name: '@deepseek-ai/dsh-deliverable-file-references'
|
||||
```
|
||||
|
||||
There are no configuration fields. Mount [`dsh-tool-present`](../tool-present/README.md) separately to execute file deliveries. Disable this row to omit its guidance.
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## Understand the implementation
|
||||
|
||||
<details>
|
||||
<summary>Implementation internals — click to expand</summary>
|
||||
|
||||
The [plugin entry](src/index.ts) registers `ui:deliverable-file-references` at the shared `DELIVERABLE_FILE_REFERENCES` order. Cordis removes the section on unload. It reads no files and starts no GUI or transport.
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## Further Exploration
|
||||
|
||||
- [System prompts](../../core/system-prompt/README.md) — section assembly and ordering.
|
||||
- [Present tool](../tool-present/README.md) — executable file-delivery declarations.
|
||||
- [Web deliverables](../../client/ui-deliverables/README.md) — file cards and file opening.
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## Model Experience
|
||||
|
||||
### File-reference guidance
|
||||
|
||||
#### What the model sees
|
||||
|
||||
Each assembly includes the same static paragraph:
|
||||
|
||||
##### Shared guidance
|
||||
|
||||
```markdown
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present to publish complete deliverables, including images, Office documents, spreadsheets, and slide decks, when separate access helps the user. Hosts that support file cards can show the presented file with preview and open actions. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
```
|
||||
|
||||
#### Token effect
|
||||
|
||||
One fixed paragraph while mounted, with no tool schema or extra model request.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
The paragraph stays at first-party order 9000 across turns. Mounting, removing, or changing it changes the assembled prompt prefix; it adds no per-turn values.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- Guidance requires a host that supports file links or deliveries; this plugin does not implement rendering, file access, or the `present` tool.
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### Dev Note
|
||||
|
||||
<details>
|
||||
<summary>Working context for maintainers — click to expand</summary>
|
||||
|
||||
None.
|
||||
|
||||
</details>
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
description: "为 Web 和 SDK agent 提供共用的文件链接与结果交付说明。"
|
||||
kind: "package-reference"
|
||||
---
|
||||
|
||||
# @deepseek-ai/dsh-deliverable-file-references
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
## 概述
|
||||
|
||||
Agent 在 Web 和 SDK 会话中接收相同的文件链接与结果交付说明。宿主能够提供链接或已交付文件时,可使用这段指导。它增加一个固定的系统提示词段落;文件访问与渲染仍由宿主负责。
|
||||
|
||||
## 目录
|
||||
|
||||
- [使用本包](#use-this-package)
|
||||
- [理解实现](#understand-the-implementation)
|
||||
- [进一步探索](#further-exploration)
|
||||
- [模型体验](#model-experience)
|
||||
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
||||
- [开发备注](#dev-note)
|
||||
|
||||
-----
|
||||
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
Web 和 `sdk` bundle 独立于 `present` 工具挂载本插件。自定义组合仅需提供 `systemPrompt`:
|
||||
|
||||
```yaml
|
||||
- id: deliverable-file-references
|
||||
name: '@deepseek-ai/dsh-deliverable-file-references'
|
||||
```
|
||||
|
||||
本包没有配置字段。执行文件交付时,需单独挂载 [`dsh-tool-present`](../tool-present/README.zh.md)。禁用本行即可省略这段指导。
|
||||
|
||||
-----
|
||||
|
||||
<a id="understand-the-implementation"></a>
|
||||
## 理解实现
|
||||
|
||||
<details>
|
||||
<summary>实现细节——点击展开</summary>
|
||||
|
||||
[插件入口](src/index.ts)按共享的 `DELIVERABLE_FILE_REFERENCES` 顺序注册 `ui:deliverable-file-references`。卸载时 Cordis 移除该段落。本插件不读取文件,也不启动 GUI 或传输服务。
|
||||
|
||||
</details>
|
||||
|
||||
-----
|
||||
|
||||
<a id="further-exploration"></a>
|
||||
## 进一步探索
|
||||
|
||||
- [系统提示词](../../core/system-prompt/README.zh.md)——段落组装与顺序。
|
||||
- [Present 工具](../tool-present/README.zh.md)——可执行的文件交付声明。
|
||||
- [Web 交付](../../client/ui-deliverables/README.zh.md)——文件卡片与文件打开。
|
||||
|
||||
<a id="model-experience"></a>
|
||||
## 模型体验
|
||||
|
||||
### 文件引用指导
|
||||
|
||||
#### 模型看到的内容
|
||||
|
||||
每次组装均包含同一个静态段落:
|
||||
|
||||
##### 共用指导
|
||||
|
||||
```markdown
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present to publish complete deliverables, including images, Office documents, spreadsheets, and slide decks, when separate access helps the user. Hosts that support file cards can show the presented file with preview and open actions. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
```
|
||||
|
||||
#### Token 影响
|
||||
|
||||
挂载期间增加一个固定段落,不增加工具 schema 或额外模型请求。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
该段落跨轮次保持 first-party 顺序 9000。挂载、移除或修改它会改变组装后的提示词前缀;它不增加逐轮变化的值。
|
||||
|
||||
## 已知限制与延期工作
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
- 指导要求宿主支持文件链接或交付;本插件不实现渲染、文件访问或 `present` 工具。
|
||||
|
||||
<a id="dev-note"></a>
|
||||
### 开发备注
|
||||
|
||||
<details>
|
||||
<summary>维护者工作上下文——点击展开</summary>
|
||||
|
||||
无。
|
||||
|
||||
</details>
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "@deepseek-ai/dsh-deliverable-file-references",
|
||||
"description": "Shared model guidance for file links and deliverables across DeepSeek Harness hosts",
|
||||
"version": "0.2.1-rc.2",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
||||
"directory": "packages/deliverables/deliverable-file-references"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/types/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./src/*": "./src/*",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/types/**/*.d.ts"
|
||||
],
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*"
|
||||
}
|
||||
}
|
||||
File renamed without changes.
+6
-1
@@ -4,7 +4,7 @@ import { readFile } from 'node:fs/promises'
|
||||
import { Context } from '@deepseek-ai/cordis'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
|
||||
import { apply, inject } from '../src/prompt.ts'
|
||||
import { apply, inject } from '../src/index.ts'
|
||||
|
||||
let ctx: Context | undefined
|
||||
|
||||
@@ -30,6 +30,11 @@ describe('desktop file-reference prompt', () => {
|
||||
expect(sidecar, scenario).toContain(section!.text)
|
||||
}
|
||||
|
||||
for (const scenario of ['desktop-context', 'desktop-ptc-context']) {
|
||||
const sidecar = await readFile(new URL(`../../../../snapshots/sdk/${scenario}/system-prompt.expected.md`, import.meta.url), 'utf8')
|
||||
expect(sidecar, scenario).toContain(section!.text)
|
||||
}
|
||||
|
||||
await mounted.dispose()
|
||||
expect((await ctx.systemPrompt.assemble()).sections
|
||||
.some(entry => entry.name === 'ui:deliverable-file-references')).toBe(false)
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "lib/types"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../vendor/cordis"
|
||||
},
|
||||
{
|
||||
"path": "../../core/system-prompt"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,8 +15,8 @@
|
||||
en: d152484eb41ac6b4
|
||||
zh: 09388d293f9be9cb
|
||||
/deepseek-ai-dsh-tool-present/use-this-package:
|
||||
en: 37ef200202b08440
|
||||
zh: 2ec14b957b690cea
|
||||
en: d1a1e22686f9041d
|
||||
zh: 8053a913199195fa
|
||||
/deepseek-ai-dsh-tool-present/understand-the-implementation:
|
||||
en: 6e73ca41dddc096e
|
||||
zh: b59fdfa3f3cc47e1
|
||||
@@ -38,21 +38,6 @@
|
||||
/deepseek-ai-dsh-tool-present/model-experience/present/kv-cache-effect:
|
||||
en: c5e95beba09dce3c
|
||||
zh: 50f71fac2592f652
|
||||
/deepseek-ai-dsh-tool-present/model-experience/clickable-file-reference-guidance:
|
||||
en: eb244aa21a4e5210
|
||||
zh: e3450addfa19cea5
|
||||
/deepseek-ai-dsh-tool-present/model-experience/clickable-file-reference-guidance/what-the-model-sees:
|
||||
en: 11fefedc31acd9b3
|
||||
zh: 164c52058c488a4e
|
||||
/deepseek-ai-dsh-tool-present/model-experience/clickable-file-reference-guidance/what-the-model-sees/shared-guidance:
|
||||
en: f6f9454c369cd5a2
|
||||
zh: 127b54d86cdf0cd5
|
||||
/deepseek-ai-dsh-tool-present/model-experience/clickable-file-reference-guidance/token-effect:
|
||||
en: e64e0d84f6f011a6
|
||||
zh: 52d77e614a04bc35
|
||||
/deepseek-ai-dsh-tool-present/model-experience/clickable-file-reference-guidance/kv-cache-effect:
|
||||
en: 7e63953a84e6ae94
|
||||
zh: 477da4c56a897c38
|
||||
/deepseek-ai-dsh-tool-present/known-limitations-and-deferred-work:
|
||||
en: 918d8b8f09063e68
|
||||
zh: 48591e5324a462c4
|
||||
|
||||
@@ -25,7 +25,7 @@ Use `present` to declare final files accessible through the Session filesystem,
|
||||
<a id="use-this-package"></a>
|
||||
## Use this package
|
||||
|
||||
The `./prompt` plugin registers the shared desktop file-reference guidance using only `systemPrompt`. The Web and `sdk` bundles mount it separately from the tool, so the same guidance is available without a Web server.
|
||||
Shared output and file-link guidance comes from [`dsh-deliverable-file-references`](../deliverable-file-references/README.md), mounted separately by Web and SDK bundles.
|
||||
|
||||
`present` validates paths against the Session's current working directory and records absolute paths, so later directory changes do not redirect delivered files.
|
||||
|
||||
@@ -85,26 +85,6 @@ One tool schema per mounted agent and one result line per delivered file. File b
|
||||
|
||||
The tool schema is static for the mount lifetime. Delivery result text extends the conversation without rewriting its prompt prefix.
|
||||
|
||||
### Clickable file-reference guidance
|
||||
|
||||
#### What the model sees
|
||||
|
||||
The separate `./prompt` entry registers this static guidance for desktop file references.
|
||||
|
||||
##### Shared guidance
|
||||
|
||||
```markdown
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present to publish complete deliverables, including images, Office documents, spreadsheets, and slide decks, when separate access helps the user. Hosts that support file cards can show the presented file with preview and open actions. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
```
|
||||
|
||||
#### Token effect
|
||||
|
||||
One fixed paragraph containing output-selection, rendering, and file-reference guidance whenever the separate `./prompt` plugin is mounted. The tool schema is independent of this prompt entry.
|
||||
|
||||
#### KV Cache effect
|
||||
|
||||
The section is static at first-party order 9000 for the lifetime of the `./prompt` mount, so it remains in the reusable prompt prefix and does not change across Turns.
|
||||
|
||||
## Known Limitations and Deferred Work
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
@@ -25,7 +25,7 @@ kind: "package-reference"
|
||||
<a id="use-this-package"></a>
|
||||
## 使用本包
|
||||
|
||||
`./prompt` 插件仅依赖 `systemPrompt`,注册共用的桌面文件引用指导。Web 和 `sdk` bundle 将其与工具分别挂载,因此不启动 Web 服务也能获得相同指导。
|
||||
共用的输出与文件链接指导由 [`dsh-deliverable-file-references`](../deliverable-file-references/README.zh.md) 提供,Web 与 SDK bundle 单独挂载该插件。
|
||||
|
||||
`present` 按 Session 的当前工作目录校验路径并记录绝对路径,因此后续目录切换不会让已交付文件指向其他位置。
|
||||
|
||||
@@ -85,26 +85,6 @@ kind: "package-reference"
|
||||
|
||||
工具 schema 在挂载期间保持静态。交付结果文本扩展对话,不重写提示词前缀。
|
||||
|
||||
### 可点击文件引用指引
|
||||
|
||||
#### 模型看到的内容
|
||||
|
||||
独立的 `./prompt` 入口注册以下桌面文件引用静态指导。
|
||||
|
||||
##### 共用指导
|
||||
|
||||
```markdown
|
||||
Prefer showing the primary results within your final response alongside a brief explanation. Use  when an image supports an explanation or comparison. Use [Description](<path/to/image.png>) when referring to an image or listing files. Enclose Markdown file destinations in angle brackets, especially paths containing spaces. Do not call present just to list edited source files, or run commands to check whether a diff view will appear. Use present to publish complete deliverables, including images, Office documents, spreadsheets, and slide decks, when separate access helps the user. Hosts that support file cards can show the presented file with preview and open actions. Avoid repeating results already shown inline unless the separate card adds useful access. Outside commands, configuration expressions, and code blocks, link every mention of an existing file, including repeats and tables, to its full path relative to the working directory or absolute; append #L24 or #L24-L30 to the target for known lines. Use the filename or a clear alias as the label, adding only enough parent directories to distinguish files; keep full paths out of labels. Default to the name alone; when precise locations matter, append :24 or :24–30, with no # or L in the line suffix.
|
||||
```
|
||||
|
||||
#### Token 影响
|
||||
|
||||
挂载独立的 `./prompt` 插件时,加入一个包含输出选择、渲染和文件引用指导的固定段落。工具 schema 与此提示入口相互独立。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
该段落在`./prompt` 插件挂载期间始终以 first-party 顺序 9000 保持静态,因此留在可复用的提示词前缀中,不会随轮次改变。
|
||||
|
||||
## 已知限制与延期工作
|
||||
|
||||
<a id="known-limitations-and-deferred-work"></a>
|
||||
|
||||
@@ -24,11 +24,7 @@
|
||||
},
|
||||
"./src/*": "./src/*",
|
||||
"./package.json": "./package.json",
|
||||
"./locale/*.json": "./locale/*.json",
|
||||
"./prompt": {
|
||||
"types": "./lib/types/prompt.d.ts",
|
||||
"default": "./lib/types/prompt.js"
|
||||
}
|
||||
"./locale/*.json": "./locale/*.json"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
@@ -48,8 +44,7 @@
|
||||
"@deepseek-ai/dsh-session": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-projection": "workspace:*",
|
||||
"@deepseek-ai/dsh-tools": "workspace:*",
|
||||
"@deepseek-ai/dsh-working-directory": "workspace:*",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*"
|
||||
"@deepseek-ai/dsh-working-directory": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@deepseek-ai/cordis": "workspace:~",
|
||||
@@ -62,7 +57,6 @@
|
||||
"@deepseek-ai/dsh-agent-loop": "workspace:*",
|
||||
"@deepseek-ai/dsh-agent-loop-testkit": "workspace:*",
|
||||
"@deepseek-ai/dsh-fs-local": "workspace:*",
|
||||
"@deepseek-ai/dsh-system-prompt": "workspace:*",
|
||||
"@deepseek-ai/dsh-scope": "workspace:*",
|
||||
"@deepseek-ai/dsh-working-directory": "workspace:*"
|
||||
}
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
},
|
||||
{
|
||||
"path": "../../session/working-directory"
|
||||
},
|
||||
{
|
||||
"path": "../../core/system-prompt"
|
||||
}
|
||||
]
|
||||
}
|
||||
+1
@@ -171,6 +171,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
|
||||
|
||||
| Package | Config | Description |
|
||||
|---|---|---|
|
||||
| `@deepseek-ai/dsh-deliverable-file-references` | no | Shared model guidance for file links and deliverables across DeepSeek Harness hosts |
|
||||
| `@deepseek-ai/dsh-tool-present` | yes | Explicit workspace file delivery declarations for the DeepSeek Harness |
|
||||
| `@deepseek-ai/dsh-workspace-changes` | yes | Per-turn workspace file changes recorded from git working-tree snapshots and whole-file captures, with per-file comparisons, for the DeepSeek Harness |
|
||||
|
||||
|
||||
Generated
+15
-3
@@ -2576,6 +2576,9 @@ importers:
|
||||
'@deepseek-ai/dsh-cmdline':
|
||||
specifier: workspace:*
|
||||
version: link:../../boot/cmdline
|
||||
'@deepseek-ai/dsh-deliverable-file-references':
|
||||
specifier: workspace:*
|
||||
version: link:../../deliverables/deliverable-file-references
|
||||
'@deepseek-ai/dsh-file-reference-local':
|
||||
specifier: workspace:*
|
||||
version: link:../../context/file-reference-local
|
||||
@@ -2974,6 +2977,9 @@ importers:
|
||||
'@deepseek-ai/dsh-cordis-host-runner':
|
||||
specifier: workspace:*
|
||||
version: link:../../extensions/cordis-host-runner
|
||||
'@deepseek-ai/dsh-deliverable-file-references':
|
||||
specifier: workspace:*
|
||||
version: link:../../deliverables/deliverable-file-references
|
||||
'@deepseek-ai/dsh-file-reference':
|
||||
specifier: workspace:*
|
||||
version: link:../../context/file-reference
|
||||
@@ -7471,6 +7477,15 @@ importers:
|
||||
specifier: workspace:*
|
||||
version: link:../../host/webserver
|
||||
|
||||
packages/deliverables/deliverable-file-references:
|
||||
devDependencies:
|
||||
'@deepseek-ai/cordis':
|
||||
specifier: workspace:~
|
||||
version: link:../../../vendor/cordis
|
||||
'@deepseek-ai/dsh-system-prompt':
|
||||
specifier: workspace:*
|
||||
version: link:../../core/system-prompt
|
||||
|
||||
packages/deliverables/tool-present:
|
||||
dependencies:
|
||||
'@deepseek-ai/schemastery':
|
||||
@@ -7507,9 +7522,6 @@ importers:
|
||||
'@deepseek-ai/dsh-session-projection':
|
||||
specifier: workspace:*
|
||||
version: link:../../session/session-projection
|
||||
'@deepseek-ai/dsh-system-prompt':
|
||||
specifier: workspace:*
|
||||
version: link:../../core/system-prompt
|
||||
'@deepseek-ai/dsh-tools':
|
||||
specifier: workspace:*
|
||||
version: link:../../core/tools
|
||||
|
||||
+1
-1
@@ -364,7 +364,6 @@
|
||||
"@deepseek-ai/dsh-compaction-image-offload/projection": ["./packages/compaction/compaction-image-offload/src/projection.ts"],
|
||||
"@deepseek-ai/dsh-session-format-catalog/message-projections": ["./packages/session/session-format-catalog/src/message-projections.ts"],
|
||||
"@deepseek-ai/dsh-native-command/types": ["./packages/util/native-command/src/types.ts"],
|
||||
"@deepseek-ai/dsh-tool-present/prompt": ["./packages/deliverables/tool-present/src/prompt.ts"],
|
||||
// BEGIN generated package aliases — pnpm run gen-tsconfig-paths
|
||||
"@deepseek-ai/dsh-acp": ["./packages/acp/acp/src"],
|
||||
"@deepseek-ai/dsh-acp-app": ["./packages/bundle/acp-app/src"],
|
||||
@@ -400,6 +399,7 @@
|
||||
"@deepseek-ai/dsh-credentials": ["./packages/credentials/credentials/src"],
|
||||
"@deepseek-ai/dsh-credentials-local": ["./packages/credentials/credentials-local/src"],
|
||||
"@deepseek-ai/dsh-deepseek-llm-api-extensions": ["./packages/llm/deepseek-llm-api-extensions/src"],
|
||||
"@deepseek-ai/dsh-deliverable-file-references": ["./packages/deliverables/deliverable-file-references/src"],
|
||||
"@deepseek-ai/dsh-deque": ["./packages/util/deque/src"],
|
||||
"@deepseek-ai/dsh-file-reference": ["./packages/context/file-reference/src"],
|
||||
"@deepseek-ai/dsh-file-reference-local": ["./packages/context/file-reference-local/src"],
|
||||
|
||||
@@ -437,6 +437,7 @@
|
||||
{ "path": "./packages/sandbox/sandbox-windows-acl" },
|
||||
{ "path": "./packages/shell/bash-sandbox" },
|
||||
{ "path": "./packages/shell/tool-bash" },
|
||||
{ "path": "./packages/deliverables/deliverable-file-references" },
|
||||
{ "path": "./packages/deliverables/tool-present" },
|
||||
{ "path": "./packages/deliverables/workspace-changes" },
|
||||
{ "path": "./packages/fs/fs" },
|
||||
|
||||
Reference in new issue
Block a user