@deepseek-ai/dsh-tool-present 0.2.1-rc.4 → 0.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -15,8 +15,8 @@
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
17
17
  /deepseek-ai-dsh-tool-present/use-this-package:
18
- en: 3bb0413b8aa3bd10
19
- zh: ab753bb651a62209
18
+ en: d1a1e22686f9041d
19
+ zh: 8053a913199195fa
20
20
  /deepseek-ai-dsh-tool-present/understand-the-implementation:
21
21
  en: 6e73ca41dddc096e
22
22
  zh: b59fdfa3f3cc47e1
@@ -30,8 +30,8 @@
30
30
  en: 695c689adf61838a
31
31
  zh: 695c689adf61838a
32
32
  /deepseek-ai-dsh-tool-present/model-experience/present/what-the-model-sees:
33
- en: 3dcc5c0e182a3032
34
- zh: 646f27cd4038017e
33
+ en: 6b990684a76ab97a
34
+ zh: 0d6b0b5784f827ad
35
35
  /deepseek-ai-dsh-tool-present/model-experience/present/token-effect:
36
36
  en: fbe1ca0b530500a0
37
37
  zh: e198e106b85714b6
package/README.md CHANGED
@@ -25,6 +25,8 @@ Use `present` to declare final files accessible through the Session filesystem,
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
+ Shared output and file-link guidance comes from [`dsh-deliverable-file-references`](../deliverable-file-references/README.md), mounted separately by Web and SDK bundles.
29
+
28
30
  `present` validates paths against the Session's current working directory and records absolute paths, so later directory changes do not redirect delivered files.
29
31
 
30
32
  The `standard`, `ptc`, and `cordis` agent presets mount this plugin. Call `present` with `files: [{ path, description? }]` after creating the files. Files must be regular files accessible through the Session filesystem. Relative paths resolve against the Session working directory; absolute paths may name files outside it, including `/tmp` or Downloads. Missing files, directories, final symbolic links, and provider-denied paths fail the call. Files in a shell sandbox’s private `/tmp` must first be written somewhere the Session filesystem can access.
@@ -73,7 +75,7 @@ The pure `./types` entry declares `PresentedFile` and the Session event without
73
75
 
74
76
  #### What the model sees
75
77
 
76
- The [present schema](../../../docs/tool-catalog.md#present) asks for existing accessible files: “Declare existing files as final deliverables for the user. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.” The `files` parameter asks for the 1-2 most important deliverables and at most 4 per call. Results report `Presented <path>` for each file; the program result and durable event contain paths and optional descriptions.
78
+ The [present schema](../../../docs/tool-catalog.md#present) asks for existing accessible files: “Declare existing files as final deliverables for the user. Hosts may show presented files only after your turn ends, so call it once the files are final. If the user needs to review files earlier, such as before a tool call that waits for their answer, link them in your message instead. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.” The `files` parameter asks for the 1-2 most important deliverables and at most 4 per call. Results report `Presented <path>` for each file; the program result and durable event contain paths and optional descriptions.
77
79
 
78
80
  #### Token effect
79
81
 
package/README.zh.md CHANGED
@@ -25,6 +25,8 @@ kind: "package-reference"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
+ 共用的输出与文件链接指导由 [`dsh-deliverable-file-references`](../deliverable-file-references/README.zh.md) 提供,Web 与 SDK bundle 单独挂载该插件。
29
+
28
30
  `present` 按 Session 的当前工作目录校验路径并记录绝对路径,因此后续目录切换不会让已交付文件指向其他位置。
29
31
 
30
32
  `standard`、`ptc` 与 `cordis` Agent preset 挂载本插件。创建文件后,以 `files: [{ path, description? }]` 调用 `present`。文件必须是 Session 文件系统可访问的普通文件。相对路径按 Session 工作目录解析;绝对路径可以指向工作区外的文件,包括 `/tmp` 或 Downloads。文件缺失、为目录、最终路径为符号链接或提供方拒绝访问时,调用失败。Shell 沙箱私有 `/tmp` 中的文件需要先写入 Session 文件系统可访问的位置。
@@ -73,7 +75,7 @@ kind: "package-reference"
73
75
 
74
76
  #### 模型看到的内容
75
77
 
76
- [present schema](../../../docs/tool-catalog.zh.md#present)要求已有且可访问的文件:“Declare existing files as final deliverables for the user. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.” `files` 参数要求选择 1-2 个最重要的交付物,每次调用最多 4 个。每个文件的结果为 `Presented <path>`;程序结果和持久事件包含路径及可选说明。
78
+ [present schema](../../../docs/tool-catalog.zh.md#present)要求已有且可访问的文件:“Declare existing files as final deliverables for the user. Hosts may show presented files only after your turn ends, so call it once the files are final. If the user needs to review files earlier, such as before a tool call that waits for their answer, link them in your message instead. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.” `files` 参数要求选择 1-2 个最重要的交付物,每次调用最多 4 个。每个文件的结果为 `Presented <path>`;程序结果和持久事件包含路径及可选说明。
77
79
 
78
80
  #### Token 影响
79
81
 
package/lib/index.js CHANGED
@@ -10,7 +10,7 @@ const Config = z.object({ maxFiles: z.number().default(8) });
10
10
  const inject = [
11
11
  "tools",
12
12
  "fs",
13
- "sessionProjections",
13
+ "agents",
14
14
  "workingDirectory"
15
15
  ];
16
16
  /**
@@ -23,7 +23,7 @@ function apply(ctx, config) {
23
23
  const pending = /* @__PURE__ */ new WeakMap();
24
24
  ctx.tools.register(defineTool({
25
25
  name: "present",
26
- description: "Declare existing files as final deliverables for the user. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.",
26
+ description: "Declare existing files as final deliverables for the user. Hosts may show presented files only after your turn ends, so call it once the files are final. If the user needs to review files earlier, such as before a tool call that waits for their answer, link them in your message instead. Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; prefer your final response when that suffices. The user opens the current files; their contents are not copied.",
27
27
  parameters: { files: {
28
28
  type: "array",
29
29
  required: true,
@@ -77,8 +77,8 @@ function apply(ctx, config) {
77
77
  },
78
78
  async execute(args, exec) {
79
79
  if (exec.agent === void 0) throw new Error("present requires an agent Session");
80
- const boundary = ctx.sessionProjections.stateOf(exec.agent.session, "turnBoundary");
81
- if (boundary === void 0 || boundary.openTurnStartSeq === null) throw new Error("present requires an open turn");
80
+ const boundary = ctx.agents.turnBoundaryOf(exec.agent.session);
81
+ if (boundary.openTurnStartSeq === null) throw new Error("present requires an open turn");
82
82
  if (args.files.length === 0 || args.files.length > config.maxFiles) throw new Error(`present accepts 1 to ${config.maxFiles} files`);
83
83
  const cwd = await ctx.workingDirectory.ensure(exec.agent, exec.signal);
84
84
  const options = {
@@ -8,7 +8,7 @@ export const Config = z.object({
8
8
  maxFiles: z.number().default(8),
9
9
  });
10
10
  /** Services used by the scoped delivery tool. */
11
- export const inject = ['tools', 'fs', 'sessionProjections', 'workingDirectory'];
11
+ export const inject = ['tools', 'fs', 'agents', 'workingDirectory'];
12
12
  /**
13
13
  * Register present with durable file references in its tool result.
14
14
  * @param ctx - agent-scoped services.
@@ -22,6 +22,8 @@ export function apply(ctx, config) {
22
22
  ctx.tools.register(defineTool({
23
23
  name: 'present',
24
24
  description: 'Declare existing files as final deliverables for the user. '
25
+ + 'Hosts may show presented files only after your turn ends, so call it once the files are final. '
26
+ + 'If the user needs to review files earlier, such as before a tool call that waits for their answer, link them in your message instead. '
25
27
  + 'Use it when the user needs a separate file, especially Office documents, spreadsheets, and slide decks; '
26
28
  + 'prefer your final response when that suffices. The user opens the current files; their contents are not copied.',
27
29
  parameters: {
@@ -60,8 +62,8 @@ export function apply(ctx, config) {
60
62
  async execute(args, exec) {
61
63
  if (exec.agent === undefined)
62
64
  throw new Error('present requires an agent Session');
63
- const boundary = ctx.sessionProjections.stateOf(exec.agent.session, 'turnBoundary');
64
- if (boundary === undefined || boundary.openTurnStartSeq === null)
65
+ const boundary = ctx.agents.turnBoundaryOf(exec.agent.session);
66
+ if (boundary.openTurnStartSeq === null)
65
67
  throw new Error('present requires an open turn');
66
68
  if (args.files.length === 0 || args.files.length > config.maxFiles)
67
69
  throw new Error(`present accepts 1 to ${config.maxFiles} files`);
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Tool zur Dateiübermittlung",
4
+ "description": "Lassen Sie die KI in dieser Runde Arbeitsbereichsdateien deutlich als zu erbringende Leistungen kennzeichnen."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "herramienta de entrega de archivos",
4
+ "description": "Dejemos que la IA marque claramente los archivos del espacio de trabajo como entregables en esta ronda."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Outil de livraison de fichiers",
4
+ "description": "Laissez l’IA marquer clairement les fichiers de l’espace de travail comme livrables ce cycle-ci."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "成果物提示ツール",
4
+ "description": "AI がワークスペース内のファイルを今回のターンの成果物として明示できます。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Ferramenta de entrega de arquivos",
4
+ "description": "Deixe a IA marcar claramente os arquivos do espaço de trabalho como resultados nesta rodada."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Инструмент доставки файлов",
4
+ "description": "Пусть в этом раунде ИИ четко отметит файлы рабочей области как результаты."
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-present",
3
3
  "description": "Explicit workspace file delivery declarations for the DeepSeek Harness",
4
- "version": "0.2.1-rc.4",
4
+ "version": "0.2.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,31 +34,31 @@
34
34
  "lib/types/**/*.d.ts"
35
35
  ],
36
36
  "dependencies": {
37
- "@deepseek-ai/schemastery": "~3.18.5"
37
+ "@deepseek-ai/schemastery": "~3.18.6-alpha.1"
38
38
  },
39
39
  "peerDependencies": {
40
- "@deepseek-ai/cordis": "~4.0.5",
41
- "@deepseek-ai/dsh-agent": "0.2.1-rc.4",
42
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
43
- "@deepseek-ai/dsh-llm": "0.2.1-rc.4",
44
- "@deepseek-ai/dsh-session": "0.2.1-rc.4",
45
- "@deepseek-ai/dsh-session-projection": "0.2.1-rc.4",
46
- "@deepseek-ai/dsh-tools": "0.2.1-rc.4",
47
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.4"
40
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
41
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
42
+ "@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
43
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
44
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
45
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
46
+ "@deepseek-ai/dsh-working-directory": "0.2.2-alpha.2"
48
47
  },
49
48
  "devDependencies": {
50
- "@deepseek-ai/cordis": "~4.0.5",
51
- "@deepseek-ai/dsh-agent": "0.2.1-rc.4",
52
- "@deepseek-ai/dsh-fs": "0.2.1-rc.4",
53
- "@deepseek-ai/dsh-llm": "0.2.1-rc.4",
54
- "@deepseek-ai/dsh-session": "0.2.1-rc.4",
55
- "@deepseek-ai/dsh-session-projection": "0.2.1-rc.4",
56
- "@deepseek-ai/dsh-tools": "0.2.1-rc.4",
57
- "@deepseek-ai/dsh-agent-loop": "0.2.1-rc.4",
58
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-rc.4",
59
- "@deepseek-ai/dsh-fs-local": "0.2.1-rc.4",
60
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.4",
61
- "@deepseek-ai/dsh-scope": "0.2.1-rc.4",
62
- "@deepseek-ai/dsh-working-directory": "0.2.1-rc.4"
49
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
50
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
51
+ "@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
52
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
53
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
54
+ "@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
55
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.2",
56
+ "@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.2",
57
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
58
+ "@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.2",
59
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.2",
60
+ "@deepseek-ai/dsh-fs-local": "0.2.2-alpha.2",
61
+ "@deepseek-ai/dsh-scope": "0.2.2-alpha.2",
62
+ "@deepseek-ai/dsh-working-directory": "0.2.2-alpha.2"
63
63
  }
64
64
  }