@deepseek-ai/dsh-agent-tool-presentation 0.2.0-rc.2 → 0.2.1-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
@@ -9,20 +9,20 @@
9
9
  en: e3bfa19f60197528
10
10
  zh: c8e9adfb80141de2
11
11
  /deepseek-ai-dsh-agent-tool-presentation/summary:
12
- en: 00ce44dc07f9bd8e
13
- zh: 32eb2aee42a903c3
12
+ en: 9c67450fb880d639
13
+ zh: 74b88ce5e4ac1e64
14
14
  /deepseek-ai-dsh-agent-tool-presentation/table-of-contents:
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
17
17
  /deepseek-ai-dsh-agent-tool-presentation/use-this-package:
18
- en: 1ff72cb4ac9c3e7b
19
- zh: d3d3ad8a336a3bec
18
+ en: ed4e4b103ea482bf
19
+ zh: 41754979babb3649
20
20
  /deepseek-ai-dsh-agent-tool-presentation/use-this-package/add-the-row-to-a-preset:
21
- en: a7325b0939361096
22
- zh: 3476ce4ebedd1d45
21
+ en: 1550e3dcc5a3aa1e
22
+ zh: 47b2d1e0e3e3cbf2
23
23
  /deepseek-ai-dsh-agent-tool-presentation/use-this-package/what-ptc-mode-requires:
24
- en: e23deef6a3fa2584
25
- zh: ded146d3828c73cd
24
+ en: efaec011a8267e5f
25
+ zh: 32619d7e03c7c2ac
26
26
  /deepseek-ai-dsh-agent-tool-presentation/use-this-package/one-presentation-per-agent:
27
27
  en: 46bf80f051175567
28
28
  zh: 8f5e1623da5d1520
@@ -33,14 +33,14 @@
33
33
  en: 6f8bb6bd853cbc13
34
34
  zh: 422fca4b20b79fbd
35
35
  /deepseek-ai-dsh-agent-tool-presentation/understand-the-implementation/source-map:
36
- en: 506105ea2c83c4a8
37
- zh: 1a60101534b10dc4
36
+ en: 2a0a0fb2dfdfce75
37
+ zh: c425560fedcdb31a
38
38
  /deepseek-ai-dsh-agent-tool-presentation/understand-the-implementation/behavior-notes:
39
39
  en: 562acace386b25ca
40
40
  zh: 3eb362bd2730a64c
41
41
  /deepseek-ai-dsh-agent-tool-presentation/further-exploration:
42
- en: 5129e69c0419f3af
43
- zh: d88bececc300b65c
42
+ en: 0f8de64b5862b78e
43
+ zh: 4bba0c1ab780aa54
44
44
  /deepseek-ai-dsh-agent-tool-presentation/model-experience:
45
45
  en: 35621b26757d462e
46
46
  zh: a8869139783ae475
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- Use `dsh-agent-tool-presentation` in an [agent preset](../../preset/agent-preset-registry/README.md) to fix whether models see every native tool schema, only `run_code` with a generated SDK, or both forms. Each preset can choose independently, so native and PTC agents can share one process without sharing tool catalogs. Selecting `ptc` or `both` requires a compatible PTC runtime; a deployment without one rejects the preset at mount time before its first prompt. The `mode` field is required when this package is present, while omitting the package keeps the deployment default.
12
+ Use `dsh-agent-tool-presentation` in an [agent preset](../../preset/agent-preset-registry/README.md) to fix whether models see every native tool schema or only `run_code` with a generated SDK. Each preset can choose independently, so native and PTC agents can share one process without sharing tool catalogs. Selecting `ptc` requires a compatible PTC runtime; a deployment without one rejects the preset at mount time before its first prompt. The `mode` field is required when this package is present, while omitting the package keeps the deployment default.
13
13
 
14
14
  ## Table of Contents
15
15
 
@@ -25,7 +25,7 @@ Use `dsh-agent-tool-presentation` in an [agent preset](../../preset/agent-preset
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
- Add this row to an agent preset to fix how every agent joined to that preset sees its tools. `native` presents each visible tool schema as a function definition; `ptc` presents only the `run_code` transport plus a generated SDK and the rule that only `run_code` may be called directly; `both` presents both forms. Agents that declare nothing get the deployment-wide `mode` on the [`dsh-tools`](../tools/README.md) row.
28
+ Add this row to an agent preset to fix how every agent joined to that preset sees its tools. `native` presents each visible tool schema as a function definition; `ptc` presents only the `run_code` transport plus a generated SDK and the rule that only `run_code` may be called directly. Agents that declare nothing get the deployment-wide `mode` on the [`dsh-tools`](../tools/README.md) row.
29
29
 
30
30
  ### Add the row to a preset
31
31
 
@@ -37,13 +37,13 @@ Add this row to an agent preset to fix how every agent joined to that preset see
37
37
 
38
38
  | Field | Default | Meaning |
39
39
  |---|---|---|
40
- | `mode` | required | `native` — every schema; `ptc` — `run_code` plus generated SDK; `both` — both forms |
40
+ | `mode` | required | `native` — every schema; `ptc` — `run_code` plus generated SDK |
41
41
 
42
42
  The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-agent-tool-presentation) is the exhaustive source for every accepted field. `mode` is required rather than defaulted because a preset without this row inherits the deployment default.
43
43
 
44
44
  ### What PTC mode requires
45
45
 
46
- Selecting `ptc` or `both` needs a composed PTC runtime (`ctx.ptcRuntime`) whose language has a registered SDK renderer — the TypeScript runtime ships via [`dsh-ptc-runtime-node`](../../ptc-runtime/ptc-runtime-node/README.md), and both the TypeScript and Python SDK renderers are built into `dsh-tools`. A preset that selects a PTC mode against a deployment composing no such runtime refuses to mount, naming this row, so the failure lands where the operator can act instead of at the session's first request.
46
+ Selecting `ptc` needs a composed PTC runtime (`ctx.ptcRuntime`) whose language has a registered SDK renderer — the TypeScript runtime ships via [`dsh-ptc-runtime-node`](../../ptc-runtime/ptc-runtime-node/README.md), and both the TypeScript and Python SDK renderers are built into `dsh-tools`. A preset that selects a PTC mode against a deployment composing no such runtime refuses to mount, naming this row, so the failure lands where the operator can act instead of at the session's first request.
47
47
 
48
48
  ### One presentation per agent
49
49
 
@@ -68,7 +68,6 @@ The tool registry cannot move into a preset: its consumers are all host-plane
68
68
  | File | Role |
69
69
  |---|---|
70
70
  | [`src/index.ts`](src/index.ts) | Plugin entry: `mode` config, `apply` wiring `ctx.tools.presentAs` for the mounting scope |
71
- | — | No runtime invariant companion is published; this package makes exactly one scoped call into `ctx.tools` and owns no event or snapshot of its own; the relation it establishes — which presentation one agent's assembly uses — is the tool registry's to hold, and `dsh-tools` observes it there. |
72
71
 
73
72
  ### Behavior notes
74
73
 
@@ -86,7 +85,7 @@ The package-level contract is enough for most consumers; read these when you nee
86
85
  - [tools package](../tools/README.md) — the tool presentation modes and `presentAs` API.
87
86
  - [agent-presets package](../../preset/agent-preset-registry/README.md) — how presets compose agents and their standing mounts.
88
87
  - [Node ptc-runtime package](../../ptc-runtime/ptc-runtime-node/README.md) — the TypeScript runtime a PTC mode needs.
89
- - [PTC mode executor-collapse note](../../../.agents/notes/implemented/bug-fix/2026-08-07-ptc-executor-collapse.md) — why the announced and callable surfaces stay the same.
88
+ - [historical PTC mode executor-collapse note](../../../.agents/notes/archived/bug-fix/2026-08-07-ptc-executor-collapse.md) — why the announced and callable surfaces stay the same.
90
89
  - [Core group map](../README.md) — how the core packages compose.
91
90
 
92
91
  -----
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- 在 [agent preset](../../preset/agent-preset-registry/README.zh.md) 中使用 `dsh-agent-tool-presentation`,可固定模型看到全部原生工具 schema、只有带生成 SDK 的 `run_code`,还是同时看到两种形态。每个 preset 可独立选择,因此 native 与 PTC agent 可以共享同一进程,而不共享工具目录。选择 `ptc` 或 `both` 需要兼容的 PTC 运行时;没有该运行时的部署会在挂载时拒绝 preset,不会等到收到第一条提示词。使用本包时 `mode` 字段为必填;省略本包则沿用部署默认值。
12
+ 在 [agent preset](../../preset/agent-preset-registry/README.zh.md) 中使用 `dsh-agent-tool-presentation`,可固定模型看到全部原生工具 schema,还是只有带生成 SDK 的 `run_code`。每个 preset 可独立选择,因此 native 与 PTC agent 可以共享同一进程,而不共享工具目录。选择 `ptc` 需要兼容的 PTC 运行时;没有该运行时的部署会在挂载时拒绝 preset,不会等到收到第一条提示词。使用本包时 `mode` 字段为必填;省略本包则沿用部署默认值。
13
13
 
14
14
  ## 目录
15
15
 
@@ -25,7 +25,7 @@ kind: "package-reference"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
- 把这一行加入 agent preset,以固定每个加入该 preset 的 agent 看到其工具的方式。`native` 以函数定义的形式呈现每个可见工具 schema;`ptc` 只呈现 `run_code` 传输、一份生成的 SDK 以及「只有 `run_code` 可被直接调用」这条规则;`both` 同时呈现两种形态。未作声明的 agent 会拿到 [`dsh-tools`](../tools/README.zh.md) 那一行上的部署级 `mode`。
28
+ 把这一行加入 agent preset,以固定每个加入该 preset 的 agent 看到其工具的方式。`native` 以函数定义的形式呈现每个可见工具 schema;`ptc` 只呈现 `run_code` 传输、一份生成的 SDK 以及「只有 `run_code` 可被直接调用」这条规则。未作声明的 agent 会拿到 [`dsh-tools`](../tools/README.zh.md) 那一行上的部署级 `mode`。
29
29
 
30
30
  ### 把这一行加入 preset
31
31
 
@@ -37,13 +37,13 @@ kind: "package-reference"
37
37
 
38
38
  | 字段 | 默认值 | 含义 |
39
39
  |---|---|---|
40
- | `mode` | 必填 | `native`——每个 schema;`ptc`——`run_code` 加生成 SDK;`both`——两种形态 |
40
+ | `mode` | 必填 | `native`——每个 schema;`ptc`——`run_code` 加生成 SDK |
41
41
 
42
42
  生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-agent-tool-presentation)是每个受支持字段的穷尽式真源。`mode` 是必填而非有默认值,因为不带这一行的 preset 会继承部署默认值。
43
43
 
44
44
  ### PTC 模式需要什么
45
45
 
46
- 选择 `ptc` 或 `both` 需要已组合的 PTC 运行时(`ctx.ptcRuntime`),且其语言有已注册的 SDK 渲染器——TypeScript 运行时经 [`dsh-ptc-runtime-node`](../../ptc-runtime/ptc-runtime-node/README.zh.md) 交付,TypeScript 与 Python 的 SDK 渲染器都内置在 `dsh-tools` 中。针对未组装此类运行时的部署选择 PTC 模式的 preset 会拒绝挂载并点名这一行,使失败落在操作者可以行动的地方,而不是落在会话的第一次请求上。
46
+ 选择 `ptc` 需要已组合的 PTC 运行时(`ctx.ptcRuntime`),且其语言有已注册的 SDK 渲染器——TypeScript 运行时经 [`dsh-ptc-runtime-node`](../../ptc-runtime/ptc-runtime-node/README.zh.md) 交付,TypeScript 与 Python 的 SDK 渲染器都内置在 `dsh-tools` 中。针对未组装此类运行时的部署选择 PTC 模式的 preset 会拒绝挂载并点名这一行,使失败落在操作者可以行动的地方,而不是落在会话的第一次请求上。
47
47
 
48
48
  ### 每个 agent 只声明一次呈现方式
49
49
 
@@ -68,7 +68,6 @@ kind: "package-reference"
68
68
  | 文件 | 职责 |
69
69
  |---|---|
70
70
  | [`src/index.ts`](src/index.ts) | 插件入口:`mode` 配置、把 `ctx.tools.presentAs` 接到挂载作用域的 `apply` |
71
- | — | 不发布运行时不变式伴生入口;本包只对 `ctx.tools` 发起一次 scoped 调用,不持有自己的事件或快照;它建立的是「某个 agent 的组装采用哪种呈现方式」这一关系,该关系由工具注册表持有,`dsh-tools` 会在工具注册表中观察该关系。 |
72
71
 
73
72
  ### 行为说明
74
73
 
@@ -86,7 +85,7 @@ kind: "package-reference"
86
85
  - [tools 包](../tools/README.zh.md)——工具呈现模式与 `presentAs` API。
87
86
  - [agent-presets 包](../../preset/agent-preset-registry/README.zh.md)——preset 如何组合 agent 及其常驻挂载。
88
87
  - [Node ptc-runtime 包](../../ptc-runtime/ptc-runtime-node/README.zh.md)——PTC 模式所需的 TypeScript 运行时。
89
- - [PTC mode 执行器塌缩 note](../../../.agents/notes/implemented/bug-fix/2026-08-07-ptc-executor-collapse.zh.md)——通告面与可调用面为何保持一致。
88
+ - [历史PTC mode 执行器塌缩 note](../../../.agents/notes/archived/bug-fix/2026-08-07-ptc-executor-collapse.md)——通告面与可调用面为何保持一致。
90
89
  - [core 分组地图](../README.zh.md)——core 各包如何组合。
91
90
 
92
91
  -----
package/lib/index.js CHANGED
@@ -28,11 +28,7 @@ const name = "tool-presentation";
28
28
  */
29
29
  const inject = ["tools"];
30
30
  /** Runtime schema. */
31
- const Config = z.object({ mode: z.union([
32
- "native",
33
- "ptc",
34
- "both"
35
- ]).required() });
31
+ const Config = z.object({ mode: z.union(["native", "ptc"]).required() });
36
32
  /**
37
33
  * Declare the tool presentation for every agent this composition covers.
38
34
  * @param ctx - the mounting composition's scope context (a preset's standing scope).
@@ -32,7 +32,7 @@ export declare const inject: string[];
32
32
  export interface Config {
33
33
  /**
34
34
  * The form this agent's model sees. `native` sends every visible schema,
35
- * `ptc` sends only `run_code` plus a generated SDK, `both` sends both.
35
+ * `ptc` sends only `run_code` plus a generated SDK.
36
36
  * Required rather than defaulted: the deployment default is what a preset
37
37
  * without this row already gets, so an omitted value would mean the row was
38
38
  * composed for nothing.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-agent-tool-presentation",
3
- "description": "Agent-plane presentation selector: composes one agent's tools as PTC mode, native, or both",
4
- "version": "0.2.0-rc.2",
3
+ "description": "Agent-plane presentation selector: composes one agent's tools as PTC mode or native tool calls",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,19 +27,19 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@deepseek-ai/schemastery": "~3.18.4"
30
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@deepseek-ai/cordis": "~4.0.4",
34
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2"
33
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
34
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
38
- "@deepseek-ai/dsh-ptc-runtime": "0.2.0-rc.2",
39
- "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
40
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
41
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
42
- "@deepseek-ai/cordis": "~4.0.4",
43
- "@deepseek-ai/dsh-session": "0.2.0-rc.2"
37
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
38
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.2",
39
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.2",
40
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
41
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
42
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
43
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1"
44
44
  }
45
45
  }