better-dsh 0.2.2-a → 0.2.2-c
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/docs/50_test-reports/2026-09-06-write/345/267/245/345/205/267sandbox/345/215/207/347/272/247/351/200/217/344/274/240bug/345/244/215/345/217/221/345/217/212/346/214/202/350/265/267-/344/272/213/344/273/266/346/212/245/345/221/212.md +43 -0
- package/docs/50_test-reports/v0.2.4-ios-focus-zoom-suppression/345/256/236/346/265/213/346/212/245/345/221/212.md +158 -0
- package/docs/60_exploration-and-research/01-cordis-runtime/bun-compile-cordis-runtime-bootstrap-research.md +536 -0
- package/docs/60_exploration-and-research/01-cordis-runtime/cordis-customization-and-override-mechanics.md +418 -0
- package/docs/60_exploration-and-research/01-cordis-runtime/cordis-research.md +350 -0
- package/docs/60_exploration-and-research/01-cordis-runtime/dsh-cordis-hotplug-mcp-patch-research.md +265 -0
- package/docs/60_exploration-and-research/02-dsh-webui/dsh-web-profile-package-map.md +186 -0
- package/docs/60_exploration-and-research/02-dsh-webui/dsh-web-ui-slot-system-research.md +310 -0
- package/docs/60_exploration-and-research/02-dsh-webui/dsh-webui-backend-data-inventory.md +633 -0
- package/docs/60_exploration-and-research/02-dsh-webui/dsh-webui-strip-boundary-research.md +300 -0
- package/docs/60_exploration-and-research/02-dsh-webui/dsh-webui-wire-appendix.md +3729 -0
- package/docs/60_exploration-and-research/02-dsh-webui/web-frontend-composability-research.md +191 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/capture-live-turn.json +1 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/observed-endpoints.json +224 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/remote-inventory.json +110954 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/served-index-sample.html +47 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/session-events.json +9411 -0
- package/docs/60_exploration-and-research/02-dsh-webui/webui-wire-data/ws-frame-examples.json +20 -0
- package/docs/60_exploration-and-research/03-mobile-ios/dsh-mobile-spa-ios-input-experience-research.md +160 -0
- package/docs/60_exploration-and-research/03-mobile-ios/ios-chat-app-bridge-research.md +324 -0
- package/docs/60_exploration-and-research/04-session-storage/alpha5-compaction-jsonl-mapping.md +1532 -0
- package/docs/60_exploration-and-research/04-session-storage/alpha5-compaction-sample/episode-failed.json +46 -0
- package/docs/60_exploration-and-research/04-session-storage/alpha5-compaction-sample/episode1.json +1124 -0
- package/docs/60_exploration-and-research/04-session-storage/alpha5-compaction-sample/episode2.json +1240 -0
- package/docs/60_exploration-and-research/05-dashr-dev/plugin-development.md +148 -0
- package/docs/60_exploration-and-research/05-dashr-dev/upstream-alignment.md +102 -0
- package/docs/60_exploration-and-research/README.md +87 -0
- package/docs/60_exploration-and-research/bun-compile-cordis-runtime-bootstrap-research.md +348 -0
- package/docs/60_exploration-and-research/dsh-mobile-spa-ios-input-experience-research.md +160 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.js +258 -6
- package/package.json +1 -1
- package/docs/REPL-/345/267/245/345/205/267/350/260/203/347/224/250-/346/210/252/346/226/255/350/257/212/346/226/255.md +0 -110
- package/docs/adr/0001-bridge-tool-layer-not-service-layer.md +0 -14
- package/docs/adr/0002-masking-is-presentation-only.md +0 -15
- package/docs/plans/A2A-messaging-channel-test-archive.md +0 -256
- package/docs/plans/code-mode-vs-rlm-ipython-comparison.md +0 -137
- package/docs/plans/dashr-blueprint-review.md +0 -201
- package/docs/plans/dashr-blueprint.md +0 -561
- package/docs/plans/dashr-compaction-window-and-archive.md +0 -307
- package/docs/plans/dashr-profile-layer-feasibility.md +0 -367
- package/docs/plans/dashr-sandbox-escalation-semantics-gap.md +0 -171
- package/docs/plans/dashr-security-sandbox-analysis.md +0 -187
- package/docs/plans/dashr-surface-invariant-and-omp-imports.md +0 -97
- package/docs/plans/ipython-kernel-interactive-interface-test-report.md +0 -152
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft.md +0 -146
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v3.md +0 -50
- package/docs/plans/kernel-refactoring/Dash-IPython-Control-Prompt-draft_v4.md +0 -79
- package/docs/plans/kernel-refactoring/Dash-vs-PrimeAgent-systemprompt-toolcatalog-comparison.md +0 -138
- package/docs/plans/kernel-refactoring/RLM-system-prompt-injection-gap-report.md +0 -161
- package/docs/plans/kernel-refactoring/V0.1.5-development-plan.md +0 -109
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_dsh.md +0 -50
- package/docs/plans/kernel-refactoring/actinoable-surface-to-llm-in-agent-runtime_prime.md +0 -113
- package/docs/plans/recallable-compaction.md +0 -147
- package/docs/plans/spike-tag-repro.mjs +0 -102
- package/docs/plans/upstream-analysis.md +0 -128
- package/docs/v0.1.8-improved-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -142
- package/docs/v0.1.8-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -193
- package/docs/v0.1.8b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -96
- package/docs/v0.1.8c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -127
- package/docs/v0.1.8d-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -150
- package/docs/v0.1.8d_artifacts/README.md +0 -138
- package/docs/v0.1.8d_artifacts/code-mode-repl-only.observation.md +0 -74
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.jsonl +0 -3890
- package/docs/v0.1.8d_artifacts/dsh-session-session-4a293388-9ae1-474b-87a0-9e17bb556d94.w-sample-0435.jsonl +0 -544
- package/docs/v0.1.8d_artifacts/functions.json +0 -592
- package/docs/v0.1.8d_artifacts/skills-catalog.snapshot.md +0 -30
- package/docs/v0.1.8d_artifacts/tools-sdk.output-schemas.json +0 -1236
- package/docs/v0.1.8d_artifacts/tools-sdk.python.txt +0 -592
- package/docs/v0.1.8d_artifacts/tools-sdk.typescript.txt +0 -516
- package/docs/v0.1.8d_artifacts/wire-vs-transcription.diff.md +0 -54
- package/docs/v0.1.8e-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -224
- package/docs/v0.1.9a-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -168
- package/docs/v0.2.0b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -123
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/f2probe/Cargo.toml +0 -6
- package/docs/v0.2.0b_artifacts/f2probe/src/bin/messy.rs +0 -8
- package/docs/v0.2.0b_artifacts/f2probe/src/main.rs +0 -4
- package/docs/v0.2.0b_artifacts/hashline-probe.md +0 -5
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.lock +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/Cargo.toml +0 -7
- package/docs/v0.2.0b_artifacts/slowprobe/build.rs +0 -4
- package/docs/v0.2.0b_artifacts/slowprobe/src/main.rs +0 -13
- package/docs/v0.2.1-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -110
- package/docs/v0.2.1b-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -86
- package/docs/v0.2.1c-/345/256/236/346/265/213/346/212/245/345/221/212.md +0 -66
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
# DSH Web UI ↔ 后端数据段全量清单(wire 层)
|
|
2
|
+
|
|
3
|
+
> 记录:2026-09-03 · 采集对象:4999 测试实例(upstream tag `dsh-v0.1.2-alpha.5`,真实 DEEPSEEK key,真实浏览器)
|
|
4
|
+
> **采集方法(双源交叉,非纯手读代码)**:
|
|
5
|
+
> ① **静态全量**:tsc 类型检查器脚本(`.scratch/extract-remotes.mjs`)递归展开全部 17 个 RPC 命名空间 × 77 个方法、
|
|
6
|
+
> 51 种会话事件的请求/响应**类型树**(含运行时抓不到的可选字段,JSDoc 随行);
|
|
7
|
+
> ② **运行时实抓**:playwright 驱动真实 Chromium(`.scratch/capture-webui.mjs`),5 个阶段把 UI 从 boot 到
|
|
8
|
+
> 发消息/开 trajectory/搜索/feedback/fork/export 全部走一遍,录下**每一笔 HTTP 请求响应体 + 每一帧 WebSocket**
|
|
9
|
+
> (28 个端点 live 实测、WS mux 全帧型)。
|
|
10
|
+
> 机器可读工件:`webui-wire-data/`(remote-inventory.json / session-events.json / observed-endpoints.json /
|
|
11
|
+
> ws-frame-examples.json / capture-live-turn.json / served-index-sample.html)。
|
|
12
|
+
> 附录:`dsh-webui-wire-appendix.md`(其余 16 命名空间全字段树 + 51 事件全字段树)。
|
|
13
|
+
|
|
14
|
+
本文回答一个问题:**浏览器里的 Web UI 到底从后端读什么、往回写什么——每个字段是什么。**
|
|
15
|
+
(不谈代码组织;全部以 wire 上实际传输的 segment 为准。)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 0. 总览:6 条数据通道
|
|
20
|
+
|
|
21
|
+
| # | 通道 | 协议 | 谁产生 | UI 消费点 |
|
|
22
|
+
|---|---|---|---|---|
|
|
23
|
+
| ① | 静态资产 | GET `/assets/*`(shell: index+vendor JS/CSS、shiki 语言包)、GET `/plugins/??<id1>/client.js,<id2>/client.js&rev=<hash>`(51 个插件 bundle 合并拉取) | 后端文件服务 | 页面引导,一次性 |
|
|
24
|
+
| ② | index 注入 | HTML 内联:`<base>`、queue script(`window.__ModuleLoader__` 门面)、combo preload、**boot graph** `globalThis.__DSH_BOOT__`、主题脚本、`__DSH_BOOT_READY__` resolver | 后端渲染 index 时注入 | 引导:告诉浏览器装哪些插件、从哪拉、依赖什么服务 |
|
|
25
|
+
| ③ | unary RPC | POST `/api/<endpoint>`(endpoint = `<namespace>/<method>` 或点号形式如 `session.export`),JSON envelope,见 §2 | typert gateway 分发到各服务 | **UI 的几乎全部数据读取与动作提交** |
|
|
26
|
+
| ④ | 裸 fetch 路由 | `/api/` 前缀下的普通 HTTP 路由(插件可注册;实测:`GET /api/session.export` 流式 zip) | Connection fetch 载体 | 会话日志导出下载 |
|
|
27
|
+
| ⑤ | 流复用 | WS `/api/remote.mux`,帧见 §3(session/follow、session/control、workspace/follow、`$events` 转发事件) | gateway WS mux | 活跃回合实时流、推送事件、投影 |
|
|
28
|
+
| ⑥ | 附属通道 | `/plugins/events`(HMR,dev-only)、**插件自有 HTTP/WS 面**(实测:`/sidebar/api/*`、`/sidebar/ws/agent-terminals` 等) | 插件直接注册 | 开发热更;插件自有面板 |
|
|
29
|
+
|
|
30
|
+
**认证**:`?token=<一次性>` → 303 → HMAC 签名 cookie `dsh-auth-<authority>`(按访问域签发,24h);此后所有 ③④⑤ 带 cookie。
|
|
31
|
+
(对对接方的意义:会话级令牌换 cookie,或换成你自己的鉴权——UI 侧只要求"请求被放行"。)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 1. boot graph 数据段(通道②)
|
|
36
|
+
|
|
37
|
+
`__DSH_BOOT__` = `{"rev":"<内容hash>","entries":[…51 行…]}`,每行字段:
|
|
38
|
+
|
|
39
|
+
| 字段 | 类型 | 含义 |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `id` | string | 浏览器模块 id = npm 包名(如 `@deepseek-ai/dsh-client-ui-trajectory`) |
|
|
42
|
+
| `url` | string | bundle 拉取地址 `/plugins/??<pkg>/client.js&rev=<row-specific rev>` |
|
|
43
|
+
| `rev` | string | 内容 hash(immutable cache 键) |
|
|
44
|
+
| `inject` | string[] | 该插件等待的**浏览器侧 cordis 服务名**(依赖边;缺失则插件 pending) |
|
|
45
|
+
| `immediately` | boolean? | 引导阶段预取标记 |
|
|
46
|
+
|
|
47
|
+
实样见 `webui-wire-data/served-index-sample.html`(4999 实抓,24,954 bytes)。
|
|
48
|
+
|
|
49
|
+
## 2. unary RPC envelope(通道③)
|
|
50
|
+
|
|
51
|
+
```jsonc
|
|
52
|
+
// 请求体(POST /api/session/list)
|
|
53
|
+
{"type":"client-request","rpcId":"<uuid>","method":"session/list","payload":{"args":[{/* 请求对象 */}]}}
|
|
54
|
+
// 响应体
|
|
55
|
+
{"type":"server-response","rpcId":"<同上>","result":
|
|
56
|
+
{"ok":true,"value":{/* 业务值 */}} // 成功
|
|
57
|
+
// 或 {"ok":false,"error":{"code":"session/not-found","message":"…","details":{…}}} // 失败
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- envelope 自描述、与传输解耦;错误码全表见附录各命名空间(每域 `RemoteErrorDetailsMap` 合并声明)。
|
|
62
|
+
- 实测幂等调用(GET 语义)与写调用(prompt/put/fork/rename)走同 envelope。
|
|
63
|
+
|
|
64
|
+
## 3. WS 流帧格式(通道⑤ `/api/remote.mux`)
|
|
65
|
+
|
|
66
|
+
```jsonc
|
|
67
|
+
// 客户端 → 服务端:开流
|
|
68
|
+
{"type":"open","streamId":"<uuid>","endpoint":"session/follow","payload":{"args":{"request":{…}}}}
|
|
69
|
+
// 服务端 → 客户端:逐值推送(同一 socket 多路复用,按 streamId 关联)
|
|
70
|
+
{"type":"item","streamId":"<同上>","value":{"type":"snapshot"|"event"|"projection"|"queue"|"baseline"|"ready"|"emit", …}}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
实测四条流与帧型:
|
|
74
|
+
|
|
75
|
+
| 流(endpoint) | 帧型 `value.type` | 载荷 |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `session/follow` | `snapshot` | `header`(见 §4)+`cursor`+`records[]`(事件/chunk run)+`hasMore`+`projections`(投影基线) |
|
|
78
|
+
| | `event` | 单个会话事件(§附录事件全表;实抓 12 种:`turn/start→end`、`step/start→end`、`user/message`、`assistant/chunk`、`assistant/message`、`request/header`、`request/context`、`session/title`、`session/title-llm-request`、`agent/inbox/spliced`、`permission/preset`) |
|
|
79
|
+
| | `projection` | `{sessionId,key,value,seq}` — 投影推送;实测 key:`turnOutline`/`sessionStats`/`contextPressure`/`contextBreakdown`/`tokenUsage`/`title`/`modelSelection`/`plan`/`subagentTiming`/`sessionListMetadata` |
|
|
80
|
+
| | `queue` | 排队消息镜像 `{sessionId,items[]{id,placement,rpcId,message}}` |
|
|
81
|
+
| `session/control` | `baseline` | 活跃控制基线:queues(每会话排队)/jobs(后台作业)/subagents 等 |
|
|
82
|
+
| `workspace/follow` | `baseline`(+变化) | 工作区树:items[]{workspaceId,path,title,sessionIds[]} |
|
|
83
|
+
| `$events` | `ready` | `{clientId,host:{home}}` |
|
|
84
|
+
| | `emit` | 转发宿主事件 `{event,args[]}`;实测:`api-session/status`、`api-session/activity`;静态 allowlist 18 项(附录) |
|
|
85
|
+
|
|
86
|
+
## 4. 会话 header(每个会话的元数据段,snapshot 第一字段)
|
|
87
|
+
|
|
88
|
+
实抓:{"version":0,"id":"session-…","createdAt":<epoch ms>,"cwd":"…","delegationDepth":0,"agentPreset":"standard"}
|
|
89
|
+
静态全字段:`version`、`id`、`createdAt`、`cwd?`、`parentSessionId?`(fork 血统)、`isSeeded`、`origin?`(subagent)、`delegationDepth`、`agentPreset?` 等——完整树见附录 session/follow。
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 5. UI 表面 → 数据段消费矩阵(live 实测)
|
|
94
|
+
|
|
95
|
+
| UI 操作/表面 | 触发的数据段 |
|
|
96
|
+
|---|---|
|
|
97
|
+
| 打开页面(boot) | ①② + `settings/describe`、`credentials/describe`、`dynamicCordisRunner/inventory`+`syncInspectManifest`、`agentPresets/list`、`session/modelCatalog`、`session/list`、`commands/list`、`skills/list`、`subagents/list`、`llm/listProviders`+`listConfigurableProviders` + ⑤ 三流(control/workspace/$events) |
|
|
98
|
+
| 侧栏点开会话 | `session/follow` 流(snapshot 全量事件 + projections 基线) |
|
|
99
|
+
| 发一条消息 | `session/prompt` → 实时 `agent/inbox/spliced`、queue、turn/step、user/message、request/header、assistant/chunk(打字机)、assistant/message(含 usage)、session/title、projection×N |
|
|
100
|
+
| Trajectory 标签页 | (零新 RPC)消费同一 follow 流里的 `request/header.system/tools/config`、`request/context`、每 turn/step 结构 |
|
|
101
|
+
| 搜索会话 | `session/search`(snippet 上限 240 码点,结果上限 20) |
|
|
102
|
+
| 👍/👎 | `messageFeedback/list` + `messageFeedback/put` |
|
|
103
|
+
| Branch 新分支 | `session/fork` + `session/create` + `session/rename`(自动命名) |
|
|
104
|
+
| Session log 导出 | 裸路由 `GET /api/session.export`(zip 流) |
|
|
105
|
+
| Settings 页 | `settings/describe`(读写经 settings/get/set,本轮未触发写) |
|
|
106
|
+
| 模型选择器 | `llm/listProviders`、`session/modelCatalog` |
|
|
107
|
+
| (better-sidebar 插件面板) | 插件自有面 `/sidebar/api/shell.get`、`fs.tree`、`settings.get` + `/sidebar/ws/agent-terminals` |
|
|
108
|
+
|
|
109
|
+
**未触发但静态可用**(对接时按需):`session/page` 冷分页(follow 已覆盖同数据)、`session/cancel`、`session/updateQueue`(排队编辑/移除/steer)、`session/attachment`、`session/selectModel`、`session/openWorkspacePath`、`session/attachment`、`workspace/*` 写方法、`settings/get|set`、`credentials/*`、`goals/*`、`subagents/follow`、`fileReferences/*`、`dynamicCordisRunner/*` 其余 10 方法、`sessionReferenceResolver/candidates`。
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 6. `session/*` 命名空间全字段(核心,16 方法,类型树全展开)
|
|
114
|
+
|
|
115
|
+
### `session/*` — 会话核心(16 方法)
|
|
116
|
+
|
|
117
|
+
#### `session/list` · unary · ◉ **live 实测**
|
|
118
|
+
|
|
119
|
+
Read all visible Session rows without resuming an Agent.
|
|
120
|
+
|
|
121
|
+
**Request 字段:**
|
|
122
|
+
- **SessionListRequest**
|
|
123
|
+
- `cursor?`: string
|
|
124
|
+
|
|
125
|
+
**Response 字段:**
|
|
126
|
+
- **SessionListValue**
|
|
127
|
+
- `items`: object[]
|
|
128
|
+
- *(元素)*:
|
|
129
|
+
- `sessionId`: string ⌾SessionId
|
|
130
|
+
- `updatedAt`: number
|
|
131
|
+
- `running`: boolean
|
|
132
|
+
- `blank`: boolean
|
|
133
|
+
- `parentSessionId?`: string ⌾SessionId
|
|
134
|
+
- `origin?`: string
|
|
135
|
+
- `cwd?`: string
|
|
136
|
+
- `projections?`: object
|
|
137
|
+
- `asOfSeq`: number
|
|
138
|
+
- `values`: object — Provider-validated values present in the cache; omitted keys remain unknown.
|
|
139
|
+
- `title?`: string — The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape…
|
|
140
|
+
- `agentPreset?`: string — Preset the Session runs, or null when the deployment composes none.
|
|
141
|
+
- `sessionListMetadata?`: object — Persisted facts used to summarize a Session without activating it.
|
|
142
|
+
- `blank`: boolean — Whether the folded prefix contains no turn.
|
|
143
|
+
- `lastPromptAt`: number — Latest human-authored prompt time in the folded prefix.
|
|
144
|
+
- `imageLimits?`: object — Image-intake limits enforced by the Session prompt endpoint.
|
|
145
|
+
- `maxImageBytes`: number
|
|
146
|
+
- `maxImagesPerMessage`: number
|
|
147
|
+
- `maxMessageImageBytes`: number
|
|
148
|
+
- `maxImagePixels`: number
|
|
149
|
+
- `maxImageDimension`: number — Maximum intrinsic width and maximum intrinsic height in pixels for one image.
|
|
150
|
+
- `mediaTypes`: string|string|string|string[]
|
|
151
|
+
- `modelSelection?`: object — Durable model selection already used and selected for the next request.
|
|
152
|
+
- `lastUsed`: object — Selection consumed by the latest recorded model request.
|
|
153
|
+
- `provider`: string
|
|
154
|
+
- `model`: string
|
|
155
|
+
- `reasoningEffort?`: string
|
|
156
|
+
- `next`: object — Selection the next request should use, falling back to {@link lastUsed}.
|
|
157
|
+
- `provider`: string
|
|
158
|
+
- `model`: string
|
|
159
|
+
- `reasoningEffort?`: string
|
|
160
|
+
- `subagentTiming?`: object — Active-turn duration for a descriptor-backed subagent session.
|
|
161
|
+
- `settledMs`: number — Milliseconds accumulated across completed turns after the child's own descriptor.
|
|
162
|
+
- `active?`: object — Same-cut bounds of the currently open turn, when one has not reached `turn/end`.
|
|
163
|
+
- `since`: number — Start of the open turn.
|
|
164
|
+
- `through`: number — Latest event time folded into this projection cut.
|
|
165
|
+
- `subagent?`: object|object — Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). Th…
|
|
166
|
+
- 变体 `{ mode: "one-shot"; label?: string; seq: SessionSeq; }`:
|
|
167
|
+
- `mode`: string — A terminal one-shot child.
|
|
168
|
+
- `label?`: string — Optional durable creation label from the child's descriptor.
|
|
169
|
+
- `seq`: number — Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where…
|
|
170
|
+
- 变体 `{ mode: "continuable"; label: string; seq: SessionSeq; }`:
|
|
171
|
+
- `mode`: string — A resumable conversation.
|
|
172
|
+
- `label`: string — Durable creation label from the child's descriptor.
|
|
173
|
+
- `seq`: number — Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.
|
|
174
|
+
|
|
175
|
+
#### `session/search` · unary · ◉ **live 实测**
|
|
176
|
+
|
|
177
|
+
Search visible Session content without resuming an Agent.
|
|
178
|
+
|
|
179
|
+
**Request 字段:**
|
|
180
|
+
- **SessionSearchRequest**
|
|
181
|
+
- `query`: string
|
|
182
|
+
|
|
183
|
+
**Response 字段:**
|
|
184
|
+
- **SessionSearchValue**
|
|
185
|
+
- `items`: object[]
|
|
186
|
+
- *(元素)*:
|
|
187
|
+
- `sessionId`: string ⌾SessionId
|
|
188
|
+
- `snippet`: string
|
|
189
|
+
- `hasMore`: boolean
|
|
190
|
+
|
|
191
|
+
#### `session/create` · unary · ◉ **live 实测**
|
|
192
|
+
|
|
193
|
+
Create or idempotently adopt one ordinary Session.
|
|
194
|
+
|
|
195
|
+
**Request 字段:**
|
|
196
|
+
- **SessionCreateRequest**
|
|
197
|
+
- `workspaceId?`: string
|
|
198
|
+
- `cwd?`: string
|
|
199
|
+
- `sessionId?`: string ⌾SessionId
|
|
200
|
+
- `agentPreset?`: string
|
|
201
|
+
|
|
202
|
+
**Response 字段:**
|
|
203
|
+
- **SessionCreateValue**
|
|
204
|
+
- `sessionId`: string ⌾SessionId
|
|
205
|
+
- `agentPreset?`: string
|
|
206
|
+
|
|
207
|
+
#### `session/selectModel` · unary · ○ 静态可用(本轮未触发)
|
|
208
|
+
|
|
209
|
+
Select one Session-local model after explicitly resuming the Session.
|
|
210
|
+
|
|
211
|
+
**Request 字段:**
|
|
212
|
+
- **SessionSelectModelRequest**
|
|
213
|
+
- `sessionId`: string ⌾SessionId
|
|
214
|
+
- `provider`: string
|
|
215
|
+
- `model`: string
|
|
216
|
+
- `reasoningEffort?`: string
|
|
217
|
+
|
|
218
|
+
**Response 字段:**
|
|
219
|
+
- **SessionSelectModelValue**
|
|
220
|
+
- `selected`: object
|
|
221
|
+
- `provider`: string
|
|
222
|
+
- `model`: string
|
|
223
|
+
- `reasoningEffort?`: string
|
|
224
|
+
|
|
225
|
+
#### `session/modelCatalog` · unary · ◉ **live 实测**
|
|
226
|
+
|
|
227
|
+
Describe every currently routable model for Host-generation selectors.
|
|
228
|
+
|
|
229
|
+
**Request 字段:**
|
|
230
|
+
- *(无参数)*
|
|
231
|
+
|
|
232
|
+
**Response 字段:**
|
|
233
|
+
- **ModelCatalog**
|
|
234
|
+
- `default`: object
|
|
235
|
+
- `provider`: string
|
|
236
|
+
- `model`: string
|
|
237
|
+
- `reasoningEffort?`: string
|
|
238
|
+
- `routableProviders`: string[] — Provider routes currently able to serve a request, including empty catalogs.
|
|
239
|
+
- `groups`: object[]
|
|
240
|
+
- *(元素)*:
|
|
241
|
+
- `id`: string
|
|
242
|
+
- `name`: string
|
|
243
|
+
- `models`: object[]
|
|
244
|
+
- *(元素)*:
|
|
245
|
+
- `id`: string
|
|
246
|
+
- `name`: string
|
|
247
|
+
- `description?`: string
|
|
248
|
+
- `reasoning?`: object
|
|
249
|
+
- `efforts`: object[]
|
|
250
|
+
- *(元素)*:
|
|
251
|
+
- `id`: string
|
|
252
|
+
- `name`: string
|
|
253
|
+
- `description?`: string
|
|
254
|
+
- `defaultEffort?`: string
|
|
255
|
+
- `failures`: object[]
|
|
256
|
+
- *(元素)*:
|
|
257
|
+
- `id`: string
|
|
258
|
+
- `name`: string
|
|
259
|
+
- `message`: string
|
|
260
|
+
|
|
261
|
+
#### `session/canOpenWorkspacePath` · unary · ○ 静态可用(本轮未触发)
|
|
262
|
+
|
|
263
|
+
Report whether this deployment can hand a Session workspace path to a native desktop.
|
|
264
|
+
|
|
265
|
+
**Request 字段:**
|
|
266
|
+
- *(无参数)*
|
|
267
|
+
|
|
268
|
+
**Response 字段:**
|
|
269
|
+
- boolean
|
|
270
|
+
|
|
271
|
+
#### `session/openWorkspacePath` · unary · ○ 静态可用(本轮未触发)
|
|
272
|
+
|
|
273
|
+
Open one path prepared by a Session-aware caller on the Host desktop.
|
|
274
|
+
|
|
275
|
+
**Request 字段:**
|
|
276
|
+
- **SessionOpenWorkspacePathRequest**
|
|
277
|
+
- `path`: string — Path after best-effort Session workspace resolution, in Host filesystem syntax.
|
|
278
|
+
|
|
279
|
+
**Response 字段:**
|
|
280
|
+
- **SessionOpenWorkspacePathValue**
|
|
281
|
+
- `opened`: boolean
|
|
282
|
+
|
|
283
|
+
#### `session/rename` · unary · ◉ **live 实测**
|
|
284
|
+
|
|
285
|
+
Rename one Session after explicitly resuming it.
|
|
286
|
+
|
|
287
|
+
**Request 字段:**
|
|
288
|
+
- **SessionRenameRequest**
|
|
289
|
+
- `sessionId`: string ⌾SessionId
|
|
290
|
+
- `title`: string
|
|
291
|
+
|
|
292
|
+
**Response 字段:**
|
|
293
|
+
- **SessionRenameValue**
|
|
294
|
+
- `title`: string
|
|
295
|
+
- `seq`: number
|
|
296
|
+
|
|
297
|
+
#### `session/fork` · unary · ◉ **live 实测**
|
|
298
|
+
|
|
299
|
+
Fork one cold-readable completed-turn prefix into a new Session.
|
|
300
|
+
|
|
301
|
+
**Request 字段:**
|
|
302
|
+
- **SessionForkRequest**
|
|
303
|
+
- `sessionId`: string ⌾SessionId
|
|
304
|
+
- `atSeq?`: number
|
|
305
|
+
|
|
306
|
+
**Response 字段:**
|
|
307
|
+
- **SessionForkValue**
|
|
308
|
+
- `sessionId`: string ⌾SessionId
|
|
309
|
+
|
|
310
|
+
#### `session/prompt` · unary · ◉ **live 实测**
|
|
311
|
+
|
|
312
|
+
Admit one prompt after explicitly resuming its Session.
|
|
313
|
+
|
|
314
|
+
**Request 字段:**
|
|
315
|
+
- **SessionPromptRequest**
|
|
316
|
+
- `requestId`: string — Client-minted identity persisted on the exact accepted user message.
|
|
317
|
+
- `sessionId`: string ⌾SessionId
|
|
318
|
+
- `mode`: string|string
|
|
319
|
+
- `content`: object|object[]
|
|
320
|
+
- `clientTimeZone?`: string
|
|
321
|
+
|
|
322
|
+
**Response 字段:**
|
|
323
|
+
- **SessionPromptValue**
|
|
324
|
+
- `accepted`: boolean
|
|
325
|
+
|
|
326
|
+
#### `session/attachment` · unary · ○ 静态可用(本轮未触发)
|
|
327
|
+
|
|
328
|
+
Read one image proven reachable from the addressed Session log.
|
|
329
|
+
|
|
330
|
+
**Request 字段:**
|
|
331
|
+
- **SessionAttachmentRequest**
|
|
332
|
+
- `sessionId`: string ⌾SessionId
|
|
333
|
+
- `attachmentId`: string
|
|
334
|
+
|
|
335
|
+
**Response 字段:**
|
|
336
|
+
- **SessionAttachmentValue**
|
|
337
|
+
- `attachment`: object
|
|
338
|
+
- `attachmentId`: string — Opaque storage identifier; never a filesystem path or bearer URL.
|
|
339
|
+
- `mediaType`: string|string|string|string — Media type verified from the stored bytes.
|
|
340
|
+
- `bytes`: number — Exact encoded byte length.
|
|
341
|
+
- `width`: number — Intrinsic encoded width in pixels.
|
|
342
|
+
- `height`: number — Intrinsic encoded height in pixels.
|
|
343
|
+
- `name?`: string — Optional display name stripped of local path information.
|
|
344
|
+
- `originalDimensions?`: object — Input dimensions after applying EXIF orientation and before normalization scaling. Present only when normalization reduced the image.
|
|
345
|
+
- `width`: number
|
|
346
|
+
- `height`: number
|
|
347
|
+
- `data`: string
|
|
348
|
+
|
|
349
|
+
#### `session/updateQueue` · unary · ○ 静态可用(本轮未触发)
|
|
350
|
+
|
|
351
|
+
Mutate one still-pending queue occurrence on a live Agent.
|
|
352
|
+
|
|
353
|
+
**Request 字段:**
|
|
354
|
+
- **SessionUpdateQueueRequest**
|
|
355
|
+
- `sessionId`: string ⌾SessionId
|
|
356
|
+
- `itemId`: string ⌾MessageId
|
|
357
|
+
- `action`: object|object|object
|
|
358
|
+
- 变体 `{ readonly kind: "edit"; readonly content: readonly ContentBlock[]; }`:
|
|
359
|
+
- `kind`: string
|
|
360
|
+
- `content`: object|object|object|object|object[]
|
|
361
|
+
- 变体 `{ readonly kind: "remove"; }`:
|
|
362
|
+
- `kind`: string
|
|
363
|
+
- 变体 `{ readonly kind: "steer"; }`:
|
|
364
|
+
- `kind`: string
|
|
365
|
+
|
|
366
|
+
**Response 字段:**
|
|
367
|
+
- **SessionUpdateQueueValue**
|
|
368
|
+
- `accepted`: boolean
|
|
369
|
+
|
|
370
|
+
#### `session/cancel` · unary · ○ 静态可用(本轮未触发)
|
|
371
|
+
|
|
372
|
+
Cancel one active Agent turn without dropping its pending inbox.
|
|
373
|
+
|
|
374
|
+
**Request 字段:**
|
|
375
|
+
- **SessionCancelRequest**
|
|
376
|
+
- `sessionId`: string ⌾SessionId
|
|
377
|
+
|
|
378
|
+
**Response 字段:**
|
|
379
|
+
- **SessionCancelValue**
|
|
380
|
+
- `accepted`: boolean
|
|
381
|
+
|
|
382
|
+
#### `session/page` · unary · ○ 静态可用(本轮未触发)
|
|
383
|
+
|
|
384
|
+
Read one cold-safe, message-aligned Session history page.
|
|
385
|
+
|
|
386
|
+
**Request 字段:**
|
|
387
|
+
- **SessionPageRequest**
|
|
388
|
+
- `address`: object|object
|
|
389
|
+
- 变体 `{ readonly kind: "session"; readonly sessionId: SessionId; }`:
|
|
390
|
+
- `kind`: string
|
|
391
|
+
- `sessionId`: string ⌾SessionId
|
|
392
|
+
- 变体 `{ readonly kind: "subagent"; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: "one-shot" | "continuable"; }`:
|
|
393
|
+
- `kind`: string
|
|
394
|
+
- `parentSessionId`: string ⌾SessionId
|
|
395
|
+
- `childSessionId`: string ⌾SessionId
|
|
396
|
+
- `mode`: string|string
|
|
397
|
+
- `throughSeq`: number — Inclusive log cut obtained from the corresponding follow opening frame.
|
|
398
|
+
- `beforeSeq?`: number
|
|
399
|
+
- `maxMessages?`: number
|
|
400
|
+
|
|
401
|
+
**Response 字段:**
|
|
402
|
+
- **SessionPage**
|
|
403
|
+
- `records`: object|object[]
|
|
404
|
+
- `hasMore`: boolean
|
|
405
|
+
|
|
406
|
+
#### `session/follow` · stream · ◉ **live 实测**
|
|
407
|
+
|
|
408
|
+
Follow one Session log from its opening or resume cursor.
|
|
409
|
+
|
|
410
|
+
**Request 字段:**
|
|
411
|
+
- **SessionFollowRequest**
|
|
412
|
+
- `address`: object|object
|
|
413
|
+
- 变体 `{ readonly kind: "session"; readonly sessionId: SessionId; }`:
|
|
414
|
+
- `kind`: string
|
|
415
|
+
- `sessionId`: string ⌾SessionId
|
|
416
|
+
- 变体 `{ readonly kind: "subagent"; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: "one-shot" | "continuable"; }`:
|
|
417
|
+
- `kind`: string
|
|
418
|
+
- `parentSessionId`: string ⌾SessionId
|
|
419
|
+
- `childSessionId`: string ⌾SessionId
|
|
420
|
+
- `mode`: string|string
|
|
421
|
+
- `maxMessages?`: number
|
|
422
|
+
|
|
423
|
+
**Response 字段:**
|
|
424
|
+
- object|object
|
|
425
|
+
- 变体 `SessionEventEntry`:
|
|
426
|
+
- `type`: string
|
|
427
|
+
- `event`: object
|
|
428
|
+
- `type`: string
|
|
429
|
+
- `seq`: number
|
|
430
|
+
- `time`: number
|
|
431
|
+
- `data`: json (any JSON value)
|
|
432
|
+
- `ignorable?`: boolean
|
|
433
|
+
- `sourceEventSeqs?`: number[]
|
|
434
|
+
- `surfaceOp?`: string|object
|
|
435
|
+
- 变体 `{ readonly op: "replace"; readonly start: number; readonly end: number; }`:
|
|
436
|
+
- `op`: string
|
|
437
|
+
- `start`: number
|
|
438
|
+
- `end`: number
|
|
439
|
+
- 变体 `{ readonly type: "snapshot"; readonly header: SessionWireHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; }`:
|
|
440
|
+
- `type`: string
|
|
441
|
+
- `header`: object
|
|
442
|
+
- `version`: number
|
|
443
|
+
- `id`: string ⌾SessionId
|
|
444
|
+
- `createdAt`: number
|
|
445
|
+
- `cwd?`: string
|
|
446
|
+
- `parentSession?`: string ⌾SessionId
|
|
447
|
+
- `seedLength?`: number — Exact inherited prefix length; absent for an unseeded Session.
|
|
448
|
+
- `origin?`: string
|
|
449
|
+
- `delegationDepth?`: number
|
|
450
|
+
- `agentPreset?`: string
|
|
451
|
+
- `cursor`: number
|
|
452
|
+
- `records`: object|object[]
|
|
453
|
+
- `hasMore`: boolean
|
|
454
|
+
- `projections`: object
|
|
455
|
+
- `asOfSeq`: number
|
|
456
|
+
- `values`: object — Provider-validated values; omitted keys are absent capabilities at this cut.
|
|
457
|
+
- `title?`: string — The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape…
|
|
458
|
+
- `agentPreset?`: string — Preset the Session runs, or null when the deployment composes none.
|
|
459
|
+
- `sessionListMetadata?`: object — Persisted facts used to summarize a Session without activating it.
|
|
460
|
+
- `blank`: boolean — Whether the folded prefix contains no turn.
|
|
461
|
+
- `lastPromptAt`: number — Latest human-authored prompt time in the folded prefix.
|
|
462
|
+
- `imageLimits?`: object — Image-intake limits enforced by the Session prompt endpoint.
|
|
463
|
+
- `maxImageBytes`: number
|
|
464
|
+
- `maxImagesPerMessage`: number
|
|
465
|
+
- `maxMessageImageBytes`: number
|
|
466
|
+
- `maxImagePixels`: number
|
|
467
|
+
- `maxImageDimension`: number — Maximum intrinsic width and maximum intrinsic height in pixels for one image.
|
|
468
|
+
- `mediaTypes`: string|string|string|string[]
|
|
469
|
+
- `modelSelection?`: object — Durable model selection already used and selected for the next request.
|
|
470
|
+
- `lastUsed`: object — Selection consumed by the latest recorded model request.
|
|
471
|
+
- `provider`: string
|
|
472
|
+
- `model`: string
|
|
473
|
+
- `reasoningEffort?`: string
|
|
474
|
+
- `next`: object — Selection the next request should use, falling back to {@link lastUsed}.
|
|
475
|
+
- `provider`: string
|
|
476
|
+
- `model`: string
|
|
477
|
+
- `reasoningEffort?`: string
|
|
478
|
+
- `subagentTiming?`: object — Active-turn duration for a descriptor-backed subagent session.
|
|
479
|
+
- `settledMs`: number — Milliseconds accumulated across completed turns after the child's own descriptor.
|
|
480
|
+
- `active?`: object — Same-cut bounds of the currently open turn, when one has not reached `turn/end`.
|
|
481
|
+
- `since`: number — Start of the open turn.
|
|
482
|
+
- `through`: number — Latest event time folded into this projection cut.
|
|
483
|
+
- `subagent?`: object|object — Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). Th…
|
|
484
|
+
- 变体 `{ mode: "one-shot"; label?: string; seq: SessionSeq; }`:
|
|
485
|
+
- `mode`: string — A terminal one-shot child.
|
|
486
|
+
- `label?`: string — Optional durable creation label from the child's descriptor.
|
|
487
|
+
- `seq`: number — Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where…
|
|
488
|
+
- 变体 `{ mode: "continuable"; label: string; seq: SessionSeq; }`:
|
|
489
|
+
- `mode`: string — A resumable conversation.
|
|
490
|
+
- `label`: string — Durable creation label from the child's descriptor.
|
|
491
|
+
- `seq`: number — Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.
|
|
492
|
+
|
|
493
|
+
#### `session/control` · stream · ◉ **live 实测**
|
|
494
|
+
|
|
495
|
+
Stream a complete live-control baseline followed by replacement frames.
|
|
496
|
+
|
|
497
|
+
**Request 字段:**
|
|
498
|
+
- **AbortSignal**
|
|
499
|
+
- `aborted`: boolean — The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or …
|
|
500
|
+
- `onabort`: function — [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event)
|
|
501
|
+
- `reason`: any — The **`reason`** read-only property returns a JavaScript value that indicates the abort reason. [MDN Reference](https://developer.mozilla.org/docs/Web/API/Abor…
|
|
502
|
+
- `throwIfAborted`: function — The **`throwIfAborted()`** method throws the signal's abort reason if the signal has been aborted; otherwise it does nothing. [MDN Reference](https://developer…
|
|
503
|
+
- `addEventListener`: function — The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target…
|
|
504
|
+
- `removeEventListener`: function — The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from th…
|
|
505
|
+
- `dispatchEvent`: function — The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate orde…
|
|
506
|
+
|
|
507
|
+
**Response 字段:**
|
|
508
|
+
- object|object|object|object
|
|
509
|
+
- 变体 `{ readonly type: "baseline"; readonly value: SessionControlBaseline; }`:
|
|
510
|
+
- `type`: string
|
|
511
|
+
- `value`: object
|
|
512
|
+
- `queues`: record<SessionId, …>
|
|
513
|
+
- `jobs`: record<SessionId, …>
|
|
514
|
+
- `projections`: record<SessionId, …>
|
|
515
|
+
- *(值)*:
|
|
516
|
+
- `asOfSeq`: number
|
|
517
|
+
- `values`: object — Provider-validated values; omitted keys are absent capabilities at this cut.
|
|
518
|
+
- `title?`: string — The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape…
|
|
519
|
+
- `agentPreset?`: string — Preset the Session runs, or null when the deployment composes none.
|
|
520
|
+
- `sessionListMetadata?`: object — Persisted facts used to summarize a Session without activating it.
|
|
521
|
+
- `blank`: boolean — Whether the folded prefix contains no turn.
|
|
522
|
+
- `lastPromptAt`: number — Latest human-authored prompt time in the folded prefix.
|
|
523
|
+
- `imageLimits?`: object — Image-intake limits enforced by the Session prompt endpoint.
|
|
524
|
+
- `maxImageBytes`: number
|
|
525
|
+
- `maxImagesPerMessage`: number
|
|
526
|
+
- `maxMessageImageBytes`: number
|
|
527
|
+
- `maxImagePixels`: number
|
|
528
|
+
- `maxImageDimension`: number — Maximum intrinsic width and maximum intrinsic height in pixels for one image.
|
|
529
|
+
- `mediaTypes`: string|string|string|string[]
|
|
530
|
+
- `modelSelection?`: object — Durable model selection already used and selected for the next request.
|
|
531
|
+
- `lastUsed`: object — Selection consumed by the latest recorded model request.
|
|
532
|
+
- `provider`: string
|
|
533
|
+
- `model`: string
|
|
534
|
+
- `reasoningEffort?`: string
|
|
535
|
+
- `next`: object — Selection the next request should use, falling back to {@link lastUsed}.
|
|
536
|
+
- `provider`: string
|
|
537
|
+
- `model`: string
|
|
538
|
+
- `reasoningEffort?`: string
|
|
539
|
+
- `subagentTiming?`: object — Active-turn duration for a descriptor-backed subagent session.
|
|
540
|
+
- `settledMs`: number — Milliseconds accumulated across completed turns after the child's own descriptor.
|
|
541
|
+
- `active?`: object — Same-cut bounds of the currently open turn, when one has not reached `turn/end`.
|
|
542
|
+
- `since`: number — Start of the open turn.
|
|
543
|
+
- `through`: number — Latest event time folded into this projection cut.
|
|
544
|
+
- `subagent?`: object|object — Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). Th…
|
|
545
|
+
- 变体 `{ mode: "one-shot"; label?: string; seq: SessionSeq; }`:
|
|
546
|
+
- `mode`: string — A terminal one-shot child.
|
|
547
|
+
- `label?`: string — Optional durable creation label from the child's descriptor.
|
|
548
|
+
- `seq`: number — Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where…
|
|
549
|
+
- 变体 `{ mode: "continuable"; label: string; seq: SessionSeq; }`:
|
|
550
|
+
- `mode`: string — A resumable conversation.
|
|
551
|
+
- `label`: string — Durable creation label from the child's descriptor.
|
|
552
|
+
- `seq`: number — Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.
|
|
553
|
+
- 变体 `{ readonly type: "queue"; readonly sessionId: SessionId; readonly items: readonly SessionQueuedItem[]; }`:
|
|
554
|
+
- `type`: string
|
|
555
|
+
- `sessionId`: string ⌾SessionId
|
|
556
|
+
- `items`: object[]
|
|
557
|
+
- *(元素)*:
|
|
558
|
+
- `id`: string ⌾MessageId
|
|
559
|
+
- `placement`: string|string|string
|
|
560
|
+
- `rpcId?`: string — Prompt-RPC identity from the queued message's user source; clients retire the matching local submission echo on it.
|
|
561
|
+
- `message`: object — JSON-safe message fields consumed by pending-queue presentation.
|
|
562
|
+
- `id`: string ⌾MessageId
|
|
563
|
+
- `content`: json (any JSON value)[]
|
|
564
|
+
- 变体 `{ readonly type: "jobs"; readonly sessionId: SessionId; readonly jobs: readonly SessionJob[]; }`:
|
|
565
|
+
- `type`: string
|
|
566
|
+
- `sessionId`: string ⌾SessionId
|
|
567
|
+
- `jobs`: object[]
|
|
568
|
+
- *(元素)*:
|
|
569
|
+
- `id`: string
|
|
570
|
+
- `kind`: string
|
|
571
|
+
- `label`: string
|
|
572
|
+
- `status`: string|string|string|string|string
|
|
573
|
+
- `detail?`: string
|
|
574
|
+
- `startedAt`: number
|
|
575
|
+
- `finishedAt?`: number
|
|
576
|
+
- 变体 `{ readonly type: "projection"; } & SessionProjectionUpdate`:
|
|
577
|
+
- `type`: string
|
|
578
|
+
- `sessionId`: string ⌾SessionId
|
|
579
|
+
- `key`: string
|
|
580
|
+
- `value`: json (any JSON value)
|
|
581
|
+
- `seq`: number
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
## 7. 对接其他 Agent Runtime 的字段映射清单
|
|
586
|
+
|
|
587
|
+
按"UI 要什么 → 其他 runtime 对应/缺失后果"排;缺失后果均经源码/实测证实为**静默降级**:
|
|
588
|
+
|
|
589
|
+
| 数据段 | 必需性 | 其他 runtime 来源建议 | 缺失后果(实测/源码证实) |
|
|
590
|
+
|---|---|---|---|
|
|
591
|
+
| `session/list` items(含 projections.title) | 高 | 会话存储列表 | 无侧栏列表 |
|
|
592
|
+
| `session/follow` snapshot.records(事件日志) | 高 | 会话转录转换(→ §附录事件表) | 无聊天渲染 |
|
|
593
|
+
| `user/message` / `assistant/message` | 高(最小可用核) | 用户消息/助手回复 | 无对话 |
|
|
594
|
+
| `turn/start|end`、`step/start|end` | 中 | 回合边界(可合成) | Trajectory 无 turn 结构、无"Jump to turn"、无失败标记 |
|
|
595
|
+
| `request/header.system` | 可选 | **很多闭源 runtime 不给**(Claude Code/Antigravity 类) | Trajectory 无 System Prompt 标签(有显式占位文案);聊天不受影响 |
|
|
596
|
+
| `request/header.tools` | 可选 | 工具清单 | 无工具 schema 展示 |
|
|
597
|
+
| `request/header.config` + `request/context` | 可选 | 模型/参数/上下文窗 | 无路由元数据;`modelSelection` 投影退化 |
|
|
598
|
+
| `assistant/chunk` | 可选(流式增强) | token 流 | 无打字机效果,消息整段出现 |
|
|
599
|
+
| `tool/call`+`tool/result`(arguments 原文、meta) | 中 | 工具调用转录 | 无工具卡 |
|
|
600
|
+
| `assistant/message.usage` | 可选 | token 计量 | 无用量条("Usage … to …"/"1% of context") |
|
|
601
|
+
| `session/title` 事件 / projections.title | 中 | 标题生成或截首句 | 列表无标题(fallback 首条消息) |
|
|
602
|
+
| projections(`sessionStats`/`contextPressure`/`tokenUsage`/`turnOutline`/…) | 可选 | 从日志统计合成或干脆不发 | 统计条/上下文压力表不显示 |
|
|
603
|
+
| `session/control` baseline(queues/jobs) | 可选 | 任务队列镜像 | 无排队 UI、无后台作业头 |
|
|
604
|
+
| `session/prompt`/`cancel`/`updateQueue` | 高(prompt)/可选 | 接 runtime 输入 API | 不能发消息/不能取消 |
|
|
605
|
+
| `session/create`/`fork`/`rename` | 中 | 会话管理 | 无新建/分支/改名 |
|
|
606
|
+
| `llm/*`+`session/modelCatalog` | 中 | 静态单模型目录即可 | 模型选择器空 |
|
|
607
|
+
| `workspace/follow` | 低 | 固定单工作区 | 侧栏无分组(会话平铺) |
|
|
608
|
+
| `settings/*` | 低 | memory-stub 或裁掉 roster | 设置页退化/移除 |
|
|
609
|
+
| `agentPresets/list` | 低 | 单 preset 或不发 | composer 模式选择器空(patch 注释:"Absent a roster it renders nothing") |
|
|
610
|
+
| `commands/list`、`skills/list` | 低 | 斜杠命令/技能目录 | `/`、`@` 触发器空 |
|
|
611
|
+
| `messageFeedback/*` | 低 | 不实现 | 无 👍/👎 |
|
|
612
|
+
| `goals/*` | 低 | 不实现 | 无 GoalBar |
|
|
613
|
+
| `dynamicCordisRunner/*`、`pluginInventory` | 低 | 不实现 | 无插件页/运行卡片 |
|
|
614
|
+
| `session.export` 裸路由 | 低 | 不实现 | 无下载 |
|
|
615
|
+
| `$events` emit 转发 | 低 | 不实现 | 状态徽章不实时(轮询兜底不在 UI,部分区域静止) |
|
|
616
|
+
|
|
617
|
+
**最小可用集**(PoC 建议):`session/list` + `session/follow`(snapshot,只需 user/message+assistant/message 两事件)+ `session/prompt` + `session/modelCatalog`(静态)+ `llm/listProviders`(静态)→ 即得完整聊天 UI;其余全部静默缺失。
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## 8. 复现
|
|
622
|
+
|
|
623
|
+
```bash
|
|
624
|
+
# 静态提取(类型树)
|
|
625
|
+
cd ~/workspaces/dashr/upstream/deepseek-harness
|
|
626
|
+
node ~/workspaces/dashr/.scratch/extract-remotes.mjs # → remote-inventory.json
|
|
627
|
+
node ~/workspaces/dashr/.scratch/extract-remotes.mjs x x events # → session-events.json
|
|
628
|
+
# 运行时抓取(token 从 .scratch/dsh-4999.log 取)
|
|
629
|
+
node ~/workspaces/dashr/.scratch/capture-webui.mjs '<token-url>' out.json 8000
|
|
630
|
+
CAP_ACTIONS="$(cat act.txt)" node …capture-webui.mjs … # 交互阶段
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
*生成脚本的一次性产物;升级 alpha 版本后重跑即可刷新清单。*
|