@khorsheed/dsh-local-agent 0.2.0-rc.1 → 0.2.0-rc.3
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/CHANGELOG.md +13 -0
- package/README.en.md +6 -6
- package/README.i18n.yaml +2 -2
- package/README.md +6 -6
- package/lib/client.js +20674 -1975
- package/lib/index.js +344 -48
- package/lib/tool-factory.js +52 -19
- package/lib/typert.host.js +1348 -353
- package/lib/typert.remote-client.d.ts +43 -3
- package/lib/typert.remote-client.js +973 -335
- package/lib/types/client/FamilyCard.d.ts +37 -0
- package/lib/types/client/FamilyCard.js +55 -0
- package/lib/types/client/ModelListSection.d.ts +49 -0
- package/lib/types/client/ModelListSection.js +132 -0
- package/lib/types/client/ProviderAuthBlock.d.ts +10 -2
- package/lib/types/client/ProviderAuthBlock.js +13 -6
- package/lib/types/client/auth-status.d.ts +6 -0
- package/lib/types/client/auth-status.js +8 -0
- package/lib/types/client/harness-cards.d.ts +72 -0
- package/lib/types/client/harness-cards.js +57 -0
- package/lib/types/client/index.d.ts +32 -7
- package/lib/types/client/index.js +50 -7
- package/lib/types/client/locales.d.ts +24 -0
- package/lib/types/client/locales.js +48 -0
- package/lib/types/gateway.d.ts +49 -1
- package/lib/types/gateway.js +89 -0
- package/lib/types/index.d.ts +73 -36
- package/lib/types/index.js +109 -44
- package/lib/types/member-controls.d.ts +8 -0
- package/lib/types/member-controls.js +15 -2
- package/lib/types/model-list.d.ts +55 -0
- package/lib/types/model-list.js +101 -0
- package/lib/types/tool-factory.d.ts +9 -3
- package/lib/types/tool-factory.js +55 -18
- package/lib/types/types.d.ts +35 -3
- package/package.json +23 -23
- package/lib/invariant.js +0 -85
- package/lib/types/invariant.d.ts +0 -16
- package/lib/types/invariant.js +0 -105
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# 变更记录
|
|
2
2
|
|
|
3
|
+
## 0.2.0-rc.3(2026-10-22)
|
|
4
|
+
|
|
5
|
+
(版本号说明:家族的 dsh-headless 包 0.2.0-rc.2 曾被发布后又撤回,npm 永久烧掉该版本号;为守住家族「同一版本线」纪律(check:release-groups),本波家族整体上移 rc.3,内容即 rc.2 计划稿。)
|
|
6
|
+
|
|
7
|
+
适配宿主 0.2.1 线:verifiedHost 前移至 0.2.1-rc.1(host-021 波全量构建+测试对 0.2.1-rc.1 树双绿,并经 3080 生产验收);`@deepseek-ai/dsh-*` peer 区间加宽覆盖宿主 0.2.1。
|
|
8
|
+
|
|
9
|
+
- **委派迁移到 0.2.1 的 subagent `startActivation` 通道**:宿主删除了 `ctx.subagents.start()`。全部委派走受管 activation(`delivery: 'caller'`——家族 Remote 仍是唯一结果通道,父模型不会收到第二份完成通知);取消改接 `activation.dispose()`;provider run id 每次执行全新铸造(与官方 dsh-sdk provider 同约定),child session 身份改走家族 intent 通道。模型面行为不变:同样的 resume 句柄、工具结果文本、Remote 推送与 stop/cancel 结果;宿主生命周期事件(`subagent/start`/`end`)改带 per-execution id,家族无消费者按它 join。
|
|
10
|
+
- **家族设置面整合为一张「本机 Agent 委派」卡**:Plugins 页只注册一个 `plugins.item` 条目(order 100),为每家 harness 渲染一个可折叠节——节头带 harness 标签、认证状态点与「未检测到 CLI」标签,节体展开才挂载(与独立卡时代的草稿语义一致)。companion 经 `localAgentUi.registerHarnessCard` 注册自己的节;注册表挂在 cordis 服务上(每个 client bundle 各自内联 core 源码,模块级共享不成立)。混合版本自动降级:旧 companion 配新 core 保留独立卡,新 companion 配旧 core 照旧注册独立卡。卡片需要宿主 0.1.7-alpha.1+(Plugins 页 `plugins.item` 席位),更旧的宿主不渲染也不报错。
|
|
11
|
+
- **修复家族卡在生产环境永不挂载**:卡片原先照搬 companion 惯例门控在 `configForms.whileServed(['local-agent'])`,而宿主 describe 只收录带 volatile 配置字段的命名空间、core 的 Config 没有 volatile 字段——门控从不触发,companion 又已放弃各自的独立卡席位,Plugins 页一张 local-agent 卡都不剩(3080 实证,2026-10-21)。改为无条件注册:client bundle 只在 core 行进入组合时加载,bundle 在场本身就是安装层门控;core 服务端缺席时卡片仍渲染,各节按家族惯例呈现降级态。
|
|
12
|
+
- **端点凭据改走两个无会话 gateway Remote**:新增 `endpointAuth`(读解析后状态,密钥以布尔返回)与 `configureEndpoint`(按字段 set/clear/不动),卡片凭据表单改写默认 scope 的 `endpoint-auth.json`(0600,文件名命中评测契约哈希的凭据拒绝名单)。原 volatile 行配置通道在生产宿主上写入被拒且客户端拿不到原因(cordis.patch.yml 的 mtime 证明没有任何一次卡片写入落盘),一旦成功还会把 key 明文写进 profile patch;设置层的端点字段随之撤回,profile 行保持部署级回落。对不带这两个 Remote 的旧 core,卡片显示不可用提示。
|
|
13
|
+
- **「可用模型」分节成为家族共享实现**:新增 `src/model-list.ts`(harness 中立的 `models.json` 读写助手,从包根导出)与 client 组件 `ModelListSection`(外壳、拖拽排序行、端点目录添加弹窗与自带状态,文案在 core 词典 `models.*`);claude-code 的精选名单交互提升为家族唯一实现,codex/kimi/claude-code 三张卡同源渲染,配套的 `modelList`/`modelDirectory` gateway 面随本波落地。各成员卡面的具体变化见各自 CHANGELOG。
|
|
14
|
+
- **打包层**:声明 `engines.dsh`(`>=0.1.5-rc.1 <0.3.0-0`——声明即独占兼容裁决,上限让未验证的宿主线在安装期 fail-closed);invariant 伴随件随官方 0.2.1 整包删除 invariants 体系而退役(boot 期 harness 契约审计是记录在案的接受损失,失败模式退回既有降级路径)。
|
|
15
|
+
|
|
3
16
|
## 0.2.0-rc.1(2026-09-30)
|
|
4
17
|
|
|
5
18
|
- **家族折叠:委派工具工厂收进本包**。新增 `./tool-factory` 导出(`mountSubagentDelegationTool` / `subagentToolConfigSchema` / `SubagentToolConfig` / `RESUME_HINT_PREFIX`)——原共享包 `@khorsheed/dsh-local-agent-tool-subagent` 的实现整体迁入,该包随之退役。各 provider 的委派工具改为各自包内的 `./tool` 组合入口(`@khorsheed/dsh-local-agent-kimi/tool` 等),由 agent 预设点名按会话授予,不再挂 profile 根;工具来源标签的 owner 由调用入口传自己包名,工厂不再硬编码。随工厂迁入新增 peer 依赖 `@deepseek-ai/dsh-tools`。
|
package/README.en.md
CHANGED
|
@@ -12,7 +12,7 @@ This is the local-agent family core: each CLI registers as one harness and gets
|
|
|
12
12
|
|
|
13
13
|
- **Scoped homes per CLI** — isolated credential/session home under a shared root, created 0700; your native CLI installation is never touched.
|
|
14
14
|
- **Slash-command families** — `/<harness> login|sessions|status|logout`, with the device-code login URL in the reply; plus the family commands `/local-agent list` (the registered-harness roster) and `/local-agent stop <childSessionId>` (cancel an in-flight delegation).
|
|
15
|
-
- **
|
|
15
|
+
- **One「Local Agent Delegation」family settings card** — on the Plugins page (a single `plugins.item` entry owned by the core, mounted with the core's client bundle — no namespace gate: the core's Config has no volatile field, so its namespace never appears in the settings describe answer and the companions' `whileServed` convention cannot apply): each provider's card body renders as one collapsible section (auth status, endpoint credential, available models, the hot-swappable resident-mode toggle), its header carrying the credential dot and a grey「CLI not detected」tag; providers register their sections through the core client's `localAgentUi.registerHarnessCard` (on an older core each provider falls back to its own `plugins.item` card). Bodies compose this package's shared `ProviderAuthBlock` and `ModelListSection` (the「Available models」section: an ordered shortlist whose first entry is the default model, edited through the gateway's `modelList`/`configureModelList` Remotes; the host-side `models.json` read/write helpers ride this package's root export, and the list's first entry outranks the `model` config key in each harness's resolution chain).
|
|
16
16
|
- **Subagent delegation with resume** — hand work to a local CLI and resume it later, even across host restarts; delegation records persist per harness in the scoped home's `delegations.jsonl`.
|
|
17
17
|
- **Member sessions stay writable** — a delegated child session is not a read-only replay: the MemberComposer keeps it open for input (sending resumes it), live output streams in, and the model and reasoning effort switch from the member composer; a selection made while busy takes effect on the next complete turn, and frozen evaluation members refuse changes.
|
|
18
18
|
- **Member sessions continue in the sidebar (host 0.1.6+)** — the official subagent directory gained an "Open in sidebar" row action: member sessions are one-shot subagents, so opened aside, this family's MemberComposer is elected as the writable composer — a zero-change benefit of this package; 0.1.5 hosts have no such entry and behave as before.
|
|
@@ -50,8 +50,8 @@ A custom composition mounts the core once:
|
|
|
50
50
|
|
|
51
51
|
## Compatibility
|
|
52
52
|
|
|
53
|
-
- npm release line (`@deepseek-ai/dsh@0.1.5-rc.1`): ✅ full — adapted to 0.1.5-rc.1 (format v2/v3; handle-based sessionPersistence), full build+test green; minHost moves up to 0.1.5-rc.1 — older hosts stay on the previous release line.
|
|
54
|
-
- source line (deepseek-harness master): ✅ (verifiedHost: 0.1.
|
|
53
|
+
- npm release line (`@deepseek-ai/dsh@0.1.5-rc.1`): ✅ full — adapted to 0.1.5-rc.1 (format v2/v3; handle-based sessionPersistence), full build+test green; minHost moves up to 0.1.5-rc.1 — older hosts stay on the previous release line. The「Local Agent Delegation」family settings card mounts with the core's client bundle onto the Plugins page's `plugins.item` seat on host 0.1.7-alpha.1+ (no `configForms.whileServed` gate — the core's Config has no volatile field, so its namespace never enters the settings describe answer); older hosts lack that seat and render no family card, and the companion cards are unaffected.
|
|
54
|
+
- source line (deepseek-harness master): ✅ (verifiedHost: 0.2.1-rc.1) — host-021 wave: full build+test green against the 0.2.1-rc.1 tree; delegation moved to `ctx.subagents.startActivation` (managed activation), and run.id is now unique per execution.
|
|
55
55
|
|
|
56
56
|
## Known Limitations
|
|
57
57
|
|
|
@@ -78,7 +78,7 @@ Each harness registers into `ctx.localAgent`: a scoped home, an optional login d
|
|
|
78
78
|
|
|
79
79
|
**The credential status says only what is known (`credentialState`).** Beside the `authenticated` boolean, `LocalAgentStatus` carries a grade: `absent` (no credential record in the scoped home), `present-unverified` (a record exists, but nothing in this host process has exercised it — an expired, unrefreshable grant looks exactly like a working one, and saying so is the whole point of this grade), `verified` (a delegation round reached the endpoint and completed since the last login/logout), and `rejected` (a round's endpoint rejected the credential and no fresh login has rewritten the credential marker since). `authenticated` is unchanged and exactly equals `verified || present-unverified`, so the settings card and every existing client keep reading the boolean they always read. The grade is per host process: after a restart a present credential reports `present-unverified`, because that is what is actually known — an eager pre-run liveness probe is not this field's job. Providers call `reportAuthSuccess` when a round settles completed, the symmetric counterpart of the existing `reportAuthFailure`.
|
|
80
80
|
|
|
81
|
-
**Browser half ships in this package.** The `./client` export mounts automatically via the `dsh.client` manifest: the member composer (delegated child sessions stay writable)
|
|
81
|
+
**Browser half ships in this package.** The `./client` export mounts automatically via the `dsh.client` manifest: the member composer (delegated child sessions stay writable), the shared settings-card building blocks (`ProviderAuthBlock`, `ModelListSection`, the auth-status bus, `AuthStatusDot`), and the「Local Agent Delegation」family card — the single Plugins-page entry rendering every provider-registered card body as a section, keeping the UI provider-neutral (it consumes only the `/<harness>` command family and the read-only gateway).
|
|
82
82
|
|
|
83
83
|
### Adding a harness
|
|
84
84
|
|
|
@@ -111,7 +111,7 @@ export function registerCodex(ctx: Context): void {
|
|
|
111
111
|
|
|
112
112
|
### Delegation registry (resume carrier)
|
|
113
113
|
|
|
114
|
-
The registry also owns the family's **delegation registry**: a per-child-session record of which provider and CLI session a delegation used, plus a per-(parent, provider) FIFO of delegation intents. The family tool (each provider package's `./tool` composition entry, sharing this package's `./tool-factory` export — the former `@khorsheed/dsh-local-agent-tool-subagent` package retired at the family fold) stages exactly one intent per call before `ctx.subagents.
|
|
114
|
+
The registry also owns the family's **delegation registry**: a per-child-session record of which provider and CLI session a delegation used, plus a per-(parent, provider) FIFO of delegation intents. The family tool (each provider package's `./tool` composition entry, sharing this package's `./tool-factory` export — the former `@khorsheed/dsh-local-agent-tool-subagent` package retired at the family fold) stages exactly one intent per call before `ctx.subagents.startActivation()`, and the owning provider consumes exactly one per start — so fresh and resume rounds stay paired even under parallel delegation. A resume handle (the dsh child session id) resolves through the registry, which rejects a handle naming an unknown child, another parent's session, or the wrong provider; the subagent request descriptor cannot carry the target, so this service is the family-internal carrier. Mappings persist per harness in an append-only `delegations.jsonl` under the harness's scoped home (last line per child session wins), so a resume handle survives a host restart.
|
|
115
115
|
|
|
116
116
|
### Delegation call options (facade)
|
|
117
117
|
|
|
@@ -170,7 +170,7 @@ The default scoped home is `<homesRoot>/<harness>` — byte for byte the directo
|
|
|
170
170
|
|
|
171
171
|
### Active-delegation registry and `/local-agent stop`
|
|
172
172
|
|
|
173
|
-
The registry also owns the **active-delegation registry**: an in-flight run table keyed by dsh child session id. Facade-started runs (`start`/`resume` — the member composer, room, and other programmatic entry points) and runs the family tool starts directly through `ctx.subagents.
|
|
173
|
+
The registry also owns the **active-delegation registry**: an in-flight run table keyed by dsh child session id. Facade-started runs (`start`/`resume` — the member composer, room, and other programmatic entry points) and runs the family tool starts directly through `ctx.subagents.startActivation()` (registered via `trackDelegationRun`) all land in the same table, and an entry clears itself when the run's result settles. `/local-agent stop <childSessionId>` cancels the in-flight delegation by this table — semantics aligned with the official `subagents.interrupt(targetSessionId)`: fire-and-return (the cancel signal goes out before the reply), and an absent target (unknown child or no in-flight run) is an explicitly-named accepted no-op, not an error. This gives surfaces like taskpilot a landing point for their stop buttons: for a one-shot subagent row with no live agent, the button dispatches `/local-agent stop <childSessionId>` instead, degrading to an explicit "cannot stop" error when the local-agent core is absent.
|
|
174
174
|
|
|
175
175
|
### Model Experience
|
|
176
176
|
|
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# last confirmed-consistent state. Both languages carry equal authority; after
|
|
3
3
|
# editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/local-agent/README.en.md
|
|
5
|
-
packages/local-agent/README.en.md:
|
|
6
|
-
packages/local-agent/README.md:
|
|
5
|
+
packages/local-agent/README.en.md: 01cbc613f5a6f87dd18682213d717d44b1dda2d7
|
|
6
|
+
packages/local-agent/README.md: 628a274e903c27eb056e7af666f47fcd6a2bcd9e
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
- **每个 CLI 一个作用域目录**——共享 homes 根下的隔离凭据/会话目录,以 0700 创建;你的本地 CLI 安装绝不被动到。
|
|
14
14
|
- **斜杠命令族**——`/<harness> login|sessions|status|logout`,device-code 登录 URL 通过命令回复呈现;另有家族命令 `/local-agent list`(已注册 harness 花名册)与 `/local-agent stop <childSessionId>`(取消在飞委派)。
|
|
15
|
-
-
|
|
15
|
+
- **一张「本机 Agent 委派」家族设置卡**——落在 Plugins 页(core 的一个 `plugins.item` 条目,随 core 的 client bundle 挂载,无命名空间门控——core 的 Config 无 volatile 字段,命名空间不出现在 settings describe 里,不能照 companion 的 `whileServed` 惯例走):每家 provider 的卡体渲染为卡内一节(认证状态、端点凭据、可用模型、常驻模式热切开关),节头带认证状态点与「未检测到 CLI」灰标签;provider 包经 core client 的 `localAgentUi.registerHarnessCard` 注册各自的节(旧版 core 上各家仍回落为自己的 `plugins.item` 卡)。卡体直接复用本包 client 面的共享 `ProviderAuthBlock` 与 `ModelListSection`(「可用模型」区:有序短名单,第一个为默认模型,经 gateway 的 `modelList`/`configureModelList` Remote 编辑;宿主侧的 `models.json` 读写助手从本包根导出,名单首项在各家解析链里排在 `model` 配置键之前)。
|
|
16
16
|
- **子 agent 委派与续跑**——把会话工作交给本机 CLI 并在之后 resume,宿主重启也能续上;委派记录按 harness 持久化在作用域目录的 `delegations.jsonl`。
|
|
17
17
|
- **成员会话保持可写**——委派的子会话不是只读回放:MemberComposer 让它继续接受输入(发送即 resume),实时输出流式呈现,模型与推理强度可在成员输入栏切换;运行中选择排到下一完整轮次生效,冻结的评测成员拒绝变更。
|
|
18
18
|
- **成员会话侧栏续写(宿主 0.1.6 起)**——官方 subagent 目录每行新增「在侧边栏打开」入口:成员会话本就是 one-shot subagent,侧栏内本家族 MemberComposer 自动当选为可写 composer,本包零改动受益;0.1.5 宿主没有该入口,行为不变。
|
|
@@ -50,8 +50,8 @@ dsh plugin --profile web remove @khorsheed/dsh-local-agent
|
|
|
50
50
|
|
|
51
51
|
## Compatibility
|
|
52
52
|
|
|
53
|
-
- npm 发布线(`@deepseek-ai/dsh@0.1.5-rc.1`):✅ 完整——适配 0.1.5-rc.1(format v2/v3;handle 制 sessionPersistence),全量构建测试通过;minHost 前移至 0.1.5-rc.1
|
|
54
|
-
- 源码线(deepseek-harness master):✅(verifiedHost: 0.1.
|
|
53
|
+
- npm 发布线(`@deepseek-ai/dsh@0.1.5-rc.1`):✅ 完整——适配 0.1.5-rc.1(format v2/v3;handle 制 sessionPersistence),全量构建测试通过;minHost 前移至 0.1.5-rc.1,旧宿主请停留在旧发布线。家族设置卡「本机 Agent 委派」随 core 的 client bundle 挂到 0.1.7-alpha.1+ 的 Plugins 页 `plugins.item` 席位(无 `configForms.whileServed` 门控——core 的 Config 无 volatile 字段,其命名空间不进 settings describe);更旧的宿主没有该席位,不呈现该卡,各 companion 卡也不受影响。
|
|
54
|
+
- 源码线(deepseek-harness master):✅(verifiedHost: 0.2.1-rc.1)——host-021 波对 0.2.1-rc.1 树全量 build+test 绿;委派迁移到 `ctx.subagents.startActivation`(受管 activation),run.id 改为每次执行唯一。
|
|
55
55
|
|
|
56
56
|
## 已知限制
|
|
57
57
|
|
|
@@ -78,7 +78,7 @@ dsh plugin --profile web remove @khorsheed/dsh-local-agent
|
|
|
78
78
|
|
|
79
79
|
**凭证只说知道的(credentialState)。** `LocalAgentStatus` 除 `authenticated` 布尔外还带一档 `credentialState`:`absent`(作用域家目录里没有凭证记录)、`present-unverified`(有记录,但本宿主进程里还没有任何一轮委派碰过它——一份过期且刷不动的凭证和一份能用的凭证形状完全一样,说不知道正是这一档的意义)、`verified`(自上次登录/登出以来有一轮委派真的打通了端点并完成)、`rejected`(某轮的端点拒了这份凭证,且此后没有新登录重写凭证标记)。`authenticated` 保持不变,恒等于 `verified || present-unverified`,所以设置卡片与既有客户端读到的还是原来那个布尔。这一档是每宿主进程的:重启后一份在场的凭证回到 `present-unverified`,因为那才是当下真正知道的;开跑前的主动活性探测不归这个字段。provider 在一轮 settle 成 completed 时调 `reportAuthSuccess`,与既有的 `reportAuthFailure` 对称。
|
|
80
80
|
|
|
81
|
-
**浏览器半身随本包提供。** `./client` 导出通过本包的 `dsh.client` manifest 自动挂载:成员 composer
|
|
81
|
+
**浏览器半身随本包提供。** `./client` 导出通过本包的 `dsh.client` manifest 自动挂载:成员 composer(委派的子会话可继续对话)、共享设置卡片构件(`ProviderAuthBlock`、`ModelListSection`、认证状态总线、`AuthStatusDot`),以及「本机 Agent 委派」家族卡——Plugins 页上的唯一条目,按节渲染各 provider 注册来的卡体,UI 保持 provider 无关(只消费 `/<harness>` 命令族和只读 gateway)。
|
|
82
82
|
|
|
83
83
|
### 新增一个 harness
|
|
84
84
|
|
|
@@ -111,7 +111,7 @@ export function registerCodex(ctx: Context): void {
|
|
|
111
111
|
|
|
112
112
|
### 委派 registry(resume 载体)
|
|
113
113
|
|
|
114
|
-
registry 还持有家族的**委派 registry**:每个子会话一条记录,记下该委派用的 provider 与 CLI 会话,以及按 (parent, provider) 分组的委派 intent FIFO。家族工具(各 provider 包的 `./tool` 组合入口,实现共享自本包的 `./tool-factory` 导出——原 `@khorsheed/dsh-local-agent-tool-subagent` 已于家族折叠退役)在每次调用 `ctx.subagents.
|
|
114
|
+
registry 还持有家族的**委派 registry**:每个子会话一条记录,记下该委派用的 provider 与 CLI 会话,以及按 (parent, provider) 分组的委派 intent FIFO。家族工具(各 provider 包的 `./tool` 组合入口,实现共享自本包的 `./tool-factory` 导出——原 `@khorsheed/dsh-local-agent-tool-subagent` 已于家族折叠退役)在每次调用 `ctx.subagents.startActivation()` 前恰好 stage 一个 intent,归属 provider 每次 start 恰好消费一个——因此即使并行委派,fresh 轮与 resume 轮也能正确配对。resume 轮的句柄(dsh 子会话 id)经 registry 解析,凡是未知子会话、他人 parent 的会话、或错误 provider 的句柄都会被拒绝;subagent 请求 descriptor 无法携带该目标,因此本服务就是家族内部的载体。映射按 harness 持久化在其作用域目录下的 append-only `delegations.jsonl`(同一子会话最后一行生效),resume 句柄因此能跨宿主重启存活。
|
|
115
115
|
|
|
116
116
|
### 委派调用选项(facade)
|
|
117
117
|
|
|
@@ -170,7 +170,7 @@ registry 还持有家族的**委派 registry**:每个子会话一条记录,
|
|
|
170
170
|
|
|
171
171
|
### 活跃委派 registry 与 `/local-agent stop`
|
|
172
172
|
|
|
173
|
-
registry 另持有**活跃委派 registry**(以 dsh 子会话 id 为键的在飞 run 表):facade 启动的 run(`start`/`resume`——成员 composer、room 等程序化入口)与家族工具直接 `ctx.subagents.
|
|
173
|
+
registry 另持有**活跃委派 registry**(以 dsh 子会话 id 为键的在飞 run 表):facade 启动的 run(`start`/`resume`——成员 composer、room 等程序化入口)与家族工具直接 `ctx.subagents.startActivation()` 启动的 run(经 `trackDelegationRun` 登记)都落在同一张表里,条目在 run 结果 settle 时自清。`/local-agent stop <childSessionId>` 命令按这张表取消在飞的委派——语义对齐官方 `subagents.interrupt(targetSessionId)`:fire-and-return(发出取消信号即回复),目标缺席(未知子会话或无在飞 run)是显式说明的 accepted no-op,而非报错。这为 taskpilot 等表面提供了停止按钮的落点:对没有 live agent 的一次性子代理行,按钮改发 `/local-agent stop <childSessionId>`,local-agent 缺席时降级为无法停止的明确报错。
|
|
174
174
|
|
|
175
175
|
### Model Experience
|
|
176
176
|
|