@khorsheed/dsh-local-agent 0.1.0-rc.7 → 0.2.0-rc.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # 变更记录
2
2
 
3
+ ## 0.2.0-rc.1(2026-09-30)
4
+
5
+ - **家族折叠:委派工具工厂收进本包**。新增 `./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`。
6
+
7
+ ## 0.1.0-rc.8(2026-09-30)
8
+
9
+ 家族同版联动:加宽 `@deepseek-ai/dsh-*` peer 区间以覆盖宿主 0.2.0(0.2.0 的兼容闸会禁用 peer 区间不覆盖宿主版本的已装插件)。无功能变更。
10
+
3
11
  ## 0.1.0-rc.7(2026-09-27)
4
12
 
5
13
  家族同版联动:随宿主 0.1.7-rc.2 基线发布波重发,全量构建+测试在 rc.2 基线通过(rc.1→rc.2 无触及本家族的宿主变更,逐类清点见 [Agent Note](../../.agents/notes/implemented/architecture/2026-09-27-host-017-rc2-breaking-changes.md))。README 按仓标准补齐双语。无功能变更。
package/README.en.md CHANGED
@@ -6,7 +6,7 @@ Drive the coding-agent CLIs installed on this machine — Kimi Code, Codex, Clau
6
6
 
7
7
  This is the local-agent family core: each CLI registers as one harness and gets an isolated scoped home under the shared homes root (created 0700 — your native CLI installation is never touched), a `/<harness> login|sessions|status|logout` slash-command family, and an auth card in Settings; the family's delegation ability — handing session work to a local CLI and resuming it later, even across host restarts — hangs off the same registry. The harnesses themselves ship as separate packages (`@khorsheed/dsh-local-agent-kimi` and friends); this package contains none.
8
8
 
9
- <img src="https://raw.githubusercontent.com/Khorsheed/dsh-web-basic/main/docs/screenshots/08-local-agent.png" width="640" alt="the Local Agent cards under Settings → Plugins, header dots showing each provider's auth state">
9
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/08-local-agent.png" width="640" alt="the Local Agent cards under Settings → Plugins, header dots showing each provider's auth state">
10
10
 
11
11
  ## Features
12
12
 
@@ -18,7 +18,7 @@ This is the local-agent family core: each CLI registers as one harness and gets
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.
19
19
  - **Several logins per harness (named scopes)** — `/<harness> login --scope <name>` opens a second scoped home at `<homesRoot>/<harness>@<name>`: its own login, its own session records, its own `delegations.jsonl`, and nothing copied from the default one. An evaluation can therefore compare two accounts of one harness in a single run.
20
20
 
21
- <img src="https://raw.githubusercontent.com/Khorsheed/dsh-web-basic/main/docs/screenshots/local-agent-member.png" width="640" alt="a member session delegated to a local CLI: live output streaming in, with the writable member composer and its model picker at the bottom">
21
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/local-agent-member.png" width="640" alt="a member session delegated to a local CLI: live output streaming in, with the writable member composer and its model picker at the bottom">
22
22
 
23
23
  ## Install
24
24
 
@@ -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 (`@khorsheed/dsh-local-agent-tool-subagent`, mounted by each harness bundle's patch) stages exactly one intent per call before `ctx.subagents.start()`, 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.
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.start()`, 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
 
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: 94d955ef6b3eda9061ab607d31a1b5dd6342e224
6
- packages/local-agent/README.md: 5e2809e46169bbdc1bee31ec56b3199c88bdc478
5
+ packages/local-agent/README.en.md: 94e1222b1d0da755b9d1bdd1cbf3d3561dafa033
6
+ packages/local-agent/README.md: d63cf0d8cceadf5c2b6d159c3c638341358e2b3a
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  这是 local-agent 家族的核心包:每家 CLI 注册成一家 harness,得到共享 homes 根下一份 0700 的隔离作用域目录(你机器上原装的 CLI 安装绝不被动到)、一族 `/<harness> login|sessions|status|logout` 斜杠命令、设置里的一张认证卡片;家族的委派能力——把会话工作交给本机 CLI、之后跨宿主重启也能续跑——同样挂在这份注册表上。各家 harness 的实现在独立包里(`@khorsheed/dsh-local-agent-kimi` 等),本包自己一家都不含。
8
8
 
9
- <img src="https://raw.githubusercontent.com/Khorsheed/dsh-web-basic/main/docs/screenshots/08-local-agent.png" width="640" alt="设置 → 插件 → 可配置插件里的 Local Agent 卡片,卡头状态点一眼可见各 provider 授权状态">
9
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/08-local-agent.png" width="640" alt="设置 → 插件 → 可配置插件里的 Local Agent 卡片,卡头状态点一眼可见各 provider 授权状态">
10
10
 
11
11
  ## 特性
12
12
 
@@ -18,7 +18,7 @@
18
18
  - **成员会话侧栏续写(宿主 0.1.6 起)**——官方 subagent 目录每行新增「在侧边栏打开」入口:成员会话本就是 one-shot subagent,侧栏内本家族 MemberComposer 自动当选为可写 composer,本包零改动受益;0.1.5 宿主没有该入口,行为不变。
19
19
  - **一家多份登录(命名 scope)**——`/<harness> login --scope <名>` 在 `<homesRoot>/<家名>@<名>` 里另开一份作用域目录:各自登录、各自会话记录、各自 `delegations.jsonl`,凭证不复制。评测因此能在同一次 run 里比较同一家的两个账号。
20
20
 
21
- <img src="https://raw.githubusercontent.com/Khorsheed/dsh-web-basic/main/docs/screenshots/local-agent-member.png" width="640" alt="委派给本机 CLI 的成员会话:实时输出流式呈现,底部成员输入栏可继续对话并切换模型">
21
+ <img src="https://raw.githubusercontent.com/Khorsheed/dsh-basic/main/docs/screenshots/local-agent-member.png" width="640" alt="委派给本机 CLI 的成员会话:实时输出流式呈现,底部成员输入栏可继续对话并切换模型">
22
22
 
23
23
  ## 安装
24
24
 
@@ -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。家族工具(`@khorsheed/dsh-local-agent-tool-subagent`,由各 harness bundle 的 patch 挂载)在每次调用 `ctx.subagents.start()` 前恰好 stage 一个 intent,归属 provider 每次 start 恰好消费一个——因此即使并行委派,fresh 轮与 resume 轮也能正确配对。resume 轮的句柄(dsh 子会话 id)经 registry 解析,凡是未知子会话、他人 parent 的会话、或错误 provider 的句柄都会被拒绝;subagent 请求 descriptor 无法携带该目标,因此本服务就是家族内部的载体。映射按 harness 持久化在其作用域目录下的 append-only `delegations.jsonl`(同一子会话最后一行生效),resume 句柄因此能跨宿主重启存活。
114
+ registry 还持有家族的**委派 registry**:每个子会话一条记录,记下该委派用的 provider 与 CLI 会话,以及按 (parent, provider) 分组的委派 intent FIFO。家族工具(各 provider 包的 `./tool` 组合入口,实现共享自本包的 `./tool-factory` 导出——原 `@khorsheed/dsh-local-agent-tool-subagent` 已于家族折叠退役)在每次调用 `ctx.subagents.start()` 前恰好 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