@deepseek-ai/dsh-agent-tool-presentation 0.1.5-rc.1 → 0.1.6-alpha.1
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 +2 -2
- package/README.md +5 -5
- package/README.zh.md +7 -7
- package/lib/index.js +4 -4
- package/lib/types/index.d.ts +3 -3
- package/package.json +9 -9
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/core/agent-tool-presentation/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: c7aadfc9f409392718d7f044168c5de48dd33ee5
|
|
6
|
+
README.zh.md: 663bb011f3a6f1cc0f257bc3383f073b23dbda02
|
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-presets/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
|
|
12
|
+
Use `dsh-agent-tool-presentation` in an [agent preset](../../preset/agent-presets/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.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -43,7 +43,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
|
|
|
43
43
|
|
|
44
44
|
### What PTC mode requires
|
|
45
45
|
|
|
46
|
-
Selecting `ptc` or `both` needs a composed
|
|
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.
|
|
47
47
|
|
|
48
48
|
### One presentation per agent
|
|
49
49
|
|
|
@@ -72,7 +72,7 @@ The tool registry cannot move into a preset: its consumers are all host-plane
|
|
|
72
72
|
|
|
73
73
|
### Behavior notes
|
|
74
74
|
|
|
75
|
-
`native` applies immediately. A PTC mode instead waits for `ctx.
|
|
75
|
+
`native` applies immediately. A PTC mode instead waits for `ctx.ptcRuntime`, a host-plane service: a preset selecting PTC mode against a deployment composing no runtime holds this row pending, and `dsh-agent-presets` refuses the mount naming this id. `presentAs` is itself the effect, so the declaration unwinds with this row without a second wrapper owning it.
|
|
76
76
|
|
|
77
77
|
</details>
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@ The package-level contract is enough for most consumers; read these when you nee
|
|
|
85
85
|
|
|
86
86
|
- [tools package](../tools/README.md) — the tool presentation modes and `presentAs` API.
|
|
87
87
|
- [agent-presets package](../../preset/agent-presets/README.md) — how presets compose agents and their standing mounts.
|
|
88
|
-
- [
|
|
88
|
+
- [Node ptc-runtime package](../../ptc-runtime/ptc-runtime-node/README.md) — the TypeScript runtime a PTC mode needs.
|
|
89
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.
|
|
90
90
|
- [Core group map](../README.md) — how the core packages compose.
|
|
91
91
|
|
|
@@ -107,7 +107,7 @@ No direct invalidation; the presentation is fixed when the agent is composed, so
|
|
|
107
107
|
|
|
108
108
|
These limits define when this row needs special care. They are current package constraints, not a task backlog.
|
|
109
109
|
|
|
110
|
-
- **The runtime stays host-plane** — a preset can select PTC mode but cannot supply the TypeScript runtime it needs; a deployment that composes none can compose no
|
|
110
|
+
- **The runtime stays host-plane** — a preset can select PTC mode but cannot supply the TypeScript runtime it needs; a deployment that composes none can compose no PTC preset.
|
|
111
111
|
|
|
112
112
|
<a id="dev-note"></a>
|
|
113
113
|
### Dev Note
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "面向用户与维护者的 agent
|
|
2
|
+
description: "面向用户与维护者的 agent(智能体)平面呈现选择器说明,用于选择、配置或调试 agent preset 的模型看到其工具的哪种形态。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
在 [agent preset](../../preset/agent-presets/README.zh.md) 中使用 `dsh-agent-tool-presentation`,可固定模型看到全部原生工具 schema、只有带生成 SDK 的 `run_code`,还是同时看到两种形态。每个 preset 可独立选择,因此 native 与 PTC agent 可以共享同一进程,而不共享工具目录。选择 `ptc` 或 `both`
|
|
12
|
+
在 [agent preset](../../preset/agent-presets/README.zh.md) 中使用 `dsh-agent-tool-presentation`,可固定模型看到全部原生工具 schema、只有带生成 SDK 的 `run_code`,还是同时看到两种形态。每个 preset 可独立选择,因此 native 与 PTC agent 可以共享同一进程,而不共享工具目录。选择 `ptc` 或 `both` 需要兼容的 PTC 运行时;没有该运行时的部署会在挂载时拒绝 preset,不会等到收到第一条提示词。使用本包时 `mode` 字段为必填;省略本包则沿用部署默认值。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -43,7 +43,7 @@ kind: "package-reference"
|
|
|
43
43
|
|
|
44
44
|
### PTC 模式需要什么
|
|
45
45
|
|
|
46
|
-
选择 `ptc` 或 `both`
|
|
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 会拒绝挂载并点名这一行,使失败落在操作者可以行动的地方,而不是落在会话的第一次请求上。
|
|
47
47
|
|
|
48
48
|
### 每个 agent 只声明一次呈现方式
|
|
49
49
|
|
|
@@ -61,18 +61,18 @@ kind: "package-reference"
|
|
|
61
61
|
|
|
62
62
|
### 设计理念
|
|
63
63
|
|
|
64
|
-
工具注册表搬不进 preset
|
|
64
|
+
工具注册表搬不进 preset:它的消费方全在宿主平面——agent loop(智能体循环)读它的调度器,API proxy 读它的展示转换器,每个工具插件都往里注册——而一个服务只有在所有消费方一起下沉时才能下沉。preset 能拥有的是这份注册表的呈现方式。`ctx.tools.presentAs()` 为挂载作用域声明它,而挂载作用域就是 preset 的常驻挂载,因此该声明覆盖每个加入该 preset 的 agent,一个 PTC mode preset 可以与多个 native preset 同进程并存。每个组合一行,而不是每个会话一行。
|
|
65
65
|
|
|
66
66
|
### 源码地图
|
|
67
67
|
|
|
68
68
|
| 文件 | 职责 |
|
|
69
69
|
|---|---|
|
|
70
70
|
| [`src/index.ts`](src/index.ts) | 插件入口:`mode` 配置、把 `ctx.tools.presentAs` 接到挂载作用域的 `apply` |
|
|
71
|
-
| — | 不发布运行时不变式伴生入口;本包只对 `ctx.tools` 发起一次 scoped
|
|
71
|
+
| — | 不发布运行时不变式伴生入口;本包只对 `ctx.tools` 发起一次 scoped 调用,不持有自己的事件或快照;它建立的是「某个 agent 的组装采用哪种呈现方式」这一关系,该关系由工具注册表持有,`dsh-tools` 会在工具注册表中观察该关系。 |
|
|
72
72
|
|
|
73
73
|
### 行为说明
|
|
74
74
|
|
|
75
|
-
`native` 立即生效。PTC 模式则等待 `ctx.
|
|
75
|
+
`native` 立即生效。PTC 模式则等待 `ctx.ptcRuntime`——这是一个宿主平面服务:针对未组装运行时的部署选择 PTC mode 的 preset 会让这一行停在 pending,`dsh-agent-presets` 会指名此 id 拒绝挂载。`presentAs` 本身就是 effect,因此该声明随这一行撤销,无需第二个包装层拥有它。
|
|
76
76
|
|
|
77
77
|
</details>
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@ kind: "package-reference"
|
|
|
85
85
|
|
|
86
86
|
- [tools 包](../tools/README.zh.md)——工具呈现模式与 `presentAs` API。
|
|
87
87
|
- [agent-presets 包](../../preset/agent-presets/README.zh.md)——preset 如何组合 agent 及其常驻挂载。
|
|
88
|
-
- [
|
|
88
|
+
- [Node ptc-runtime 包](../../ptc-runtime/ptc-runtime-node/README.zh.md)——PTC 模式所需的 TypeScript 运行时。
|
|
89
89
|
- [PTC mode 执行器塌缩 note](../../../.agents/notes/implemented/bug-fix/2026-08-07-ptc-executor-collapse.zh.md)——通告面与可调用面为何保持一致。
|
|
90
90
|
- [core 分组地图](../README.zh.md)——core 各包如何组合。
|
|
91
91
|
|
package/lib/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import z from "@deepseek-ai/schemastery";
|
|
|
12
12
|
* joined to that preset and a PTC mode preset runs beside native ones in one
|
|
13
13
|
* process. One row per composition, not one per session.
|
|
14
14
|
*
|
|
15
|
-
* A PTC mode needs a TypeScript
|
|
16
|
-
* ([`dsh-
|
|
15
|
+
* A PTC mode needs a TypeScript PTC runtime, which is a host-plane service
|
|
16
|
+
* ([`dsh-ptc-runtime-node`](../../../ptc-runtime/ptc-runtime-node/README.md)).
|
|
17
17
|
* This row therefore waits for it rather than assuming it: a preset selecting
|
|
18
18
|
* PTC mode against a deployment that composes no runtime fails at mount, named
|
|
19
19
|
* in the preset's own activation audit, instead of at the first prompt.
|
|
@@ -22,7 +22,7 @@ import z from "@deepseek-ai/schemastery";
|
|
|
22
22
|
/** Cordis plugin name. */
|
|
23
23
|
const name = "tool-presentation";
|
|
24
24
|
/**
|
|
25
|
-
* Required services. `
|
|
25
|
+
* Required services. `ptcRuntime` is NOT listed: a `native` row must mount in
|
|
26
26
|
* a deployment that composes no runtime, and the mode-dependent wait is
|
|
27
27
|
* declared inside {@link apply} instead.
|
|
28
28
|
*/
|
|
@@ -43,7 +43,7 @@ function apply(ctx, config) {
|
|
|
43
43
|
ctx.tools.presentAs("native");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
ctx.inject(["
|
|
46
|
+
ctx.inject(["ptcRuntime"], (runtimeCtx) => {
|
|
47
47
|
runtimeCtx.tools.presentAs(config.mode);
|
|
48
48
|
});
|
|
49
49
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* joined to that preset and a PTC mode preset runs beside native ones in one
|
|
11
11
|
* process. One row per composition, not one per session.
|
|
12
12
|
*
|
|
13
|
-
* A PTC mode needs a TypeScript
|
|
14
|
-
* ([`dsh-
|
|
13
|
+
* A PTC mode needs a TypeScript PTC runtime, which is a host-plane service
|
|
14
|
+
* ([`dsh-ptc-runtime-node`](../../../ptc-runtime/ptc-runtime-node/README.md)).
|
|
15
15
|
* This row therefore waits for it rather than assuming it: a preset selecting
|
|
16
16
|
* PTC mode against a deployment that composes no runtime fails at mount, named
|
|
17
17
|
* in the preset's own activation audit, instead of at the first prompt.
|
|
@@ -23,7 +23,7 @@ import type { ToolPresentationMode } from '@deepseek-ai/dsh-tools';
|
|
|
23
23
|
/** Cordis plugin name. */
|
|
24
24
|
export declare const name = "tool-presentation";
|
|
25
25
|
/**
|
|
26
|
-
* Required services. `
|
|
26
|
+
* Required services. `ptcRuntime` is NOT listed: a `native` row must mount in
|
|
27
27
|
* a deployment that composes no runtime, and the mode-dependent wait is
|
|
28
28
|
* declared inside {@link apply} instead.
|
|
29
29
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-agent-tool-presentation",
|
|
3
3
|
"description": "Agent-plane presentation selector: composes one agent's tools as PTC mode, native, or both",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
33
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/
|
|
43
|
-
"@deepseek-ai/
|
|
37
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
|
|
42
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
43
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1"
|
|
44
44
|
}
|
|
45
45
|
}
|