@huanlin/dsh-plugin-yet-another-subagent 0.3.0 → 0.4.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.md CHANGED
@@ -18,7 +18,7 @@
18
18
  - 单一 `subagent` 工具,通过 `profile` 枚举参数选择 profile(非每 profile 一个工具)
19
19
  - 复用官方 `spawn` provider,支持前台(foreground)和后台(continuable / one-shot)两种模式
20
20
  - Profile 状态通过 settings seam 持久化到 `$DSH_HOME/settings.yaml`
21
- - RPC CRUD:`profiles.list` / `.add` / `.update` / `.remove`(专用 `/ya-subagent` 通道,不共享 `/api`)
21
+ - RPC CRUD:`ya-subagent.profiles.*` / `.tools.list` / `.sessions.repair`(`/api` 上的 exact Fetch route,经 `connection.fetch.register` 注册)
22
22
  - 两个 session projection:`subagentProfile`(父会话 childId→profileId 映射 + callId→childId)+ `yaSubagentProgress`(子会话实时 toolcall/token/活动状态);wire view 已做引用记忆化,适配 dsh 0.1.2-alpha.3 起 change feed 的 `Object.is` 下发门控(内容不变即静默)
23
23
  - **Client 半**(`src/client/index.ts`):
24
24
  - `settings.section` — Profile 编辑页
@@ -114,17 +114,27 @@ Profile 状态通过 DSH settings seam 持久化到 `$DSH_HOME/settings.yaml`
114
114
 
115
115
  ## RPC API
116
116
 
117
- Profile CRUD 走 host 的专用 `/ya-subagent` 通道(不共享 `/api`,避免与 Typert gateway 的单拦截器冲突):
117
+ Profile CRUD 走 `/api` 通道上的 exact Fetch route(`ctx.connection.fetch.register`,与官方
118
+ dsh-client-file-upload 同模式)。不占用 `/api` 的单拦截器槽(该槽归 Typert gateway 所有);
119
+ 信任栅栏与浏览器认证由 `/api` 载体统一执行。
118
120
 
119
- | endpoint | payload | result (ok) |
121
+ | endpoint(wire method) | payload | result (ok) |
120
122
  |----------|---------|-------------|
121
- | `profiles.list` | `{}` | `{ profiles: SubagentProfile[] }` |
122
- | `profiles.add` | `{ profile: SubagentProfile }` | `{ profiles: SubagentProfile[] }` |
123
- | `profiles.update` | `{ profile: SubagentProfile }` | `{ profiles: SubagentProfile[] }` |
124
- | `profiles.remove` | `{ id: string }` | `{ profiles: SubagentProfile[] }` |
125
- | `tools.list` | `{}` | `{ tools: { name, description }[] }` |
126
-
127
- URL 形如 `POST /ya-subagent/profiles.list`。业务错误返回 `{ ok: false, error: { code: 'internal', message } }`。
123
+ | `ya-subagent.profiles.list` | `{}` | `{ profiles: SubagentProfile[] }` |
124
+ | `ya-subagent.profiles.add` | `{ profile: SubagentProfile }` | `{ profiles: SubagentProfile[] }` |
125
+ | `ya-subagent.profiles.update` | `{ profile: SubagentProfile }` | `{ profiles: SubagentProfile[] }` |
126
+ | `ya-subagent.profiles.remove` | `{ id: string }` | `{ profiles: SubagentProfile[] }` |
127
+ | `ya-subagent.tools.list` | `{}` | `{ tools: { name, description }[] }` |
128
+ | `ya-subagent.sessions.repair` | `{}` | `RepairStats` |
129
+
130
+ URL 形如 `POST /api/ya-subagent.profiles.list`(Connection client-request envelope,响应为
131
+ server-response envelope)。业务错误返回 `{ ok: false, error: { code: 'internal', message } }`。
132
+
133
+ > 历史注:v0.3.x 走 `connection.rpc.handle('/ya-subagent', …)` 专用通道;dsh 0.1.5 的
134
+ > 专用通道注册在 web profile 拓扑下无法挂载(webserver 服务与 connection 是兄弟 loader
135
+ > 行,`rpc.handle` 内部的 `owner.webServer` 解析永远失败),浏览器侧表现为
136
+ > `transport failure for /ya-subagent/profiles.list: HTTP 405`。v0.4.0 起改用 exact
137
+ > Fetch route。
128
138
 
129
139
  ## 已知限制
130
140