Files
deepseek-harness/missions/tasks/20260719-2247-step-session-design
imccyu 0681ac47de chore(gui): mission work logs
chore(gui): mission work logs — cordis design finalization, tool-card wire archive, incident records

chore: missions

chore: missions

chore(gui): mission ledger — batch-2 answers, parallel dispatch state, jsdom coverage re-scope

chore(gui): ledger — night-mode standing orders (self-commit small, no push, 5-min refresh)

chore(gui): ledger — jsdom batches 2-4 landed (233 green), coverage probe next

chore(gui): ledger — web-ui coverage probe 65%, four-tier fill plan approved

chore(gui): ledger — cordis-impl B1 state after third API drop, decisions on file

chore(gui): ledger — 01:32 patrol snapshot (jsdom tier-1 landed, coverage-fixer probed)

chore(gui): ledger — 01:37 patrol (peer src trio landed, coverage-fixer still silent)

chore(gui): ledger — 01:42 patrol (jsdom tier-2 landed, peer committed x2, coverage-fixer 2nd probe)

chore(gui): ledger — coverage diagnosis complete (6-file gap list), web-ui at 91.4%

chore(gui): ledger — 01:46 patrol (B1 done, jsdom tier-3 landed, coverage fix batch running)

chore(gui): ledger — 01:51 patrol (jsdom tails x2 landed, B2 underway)

chore(gui): ledger — 01:56 patrol (gateway.ts 337 lines, checkpoint T-7min)

chore(gui): ledger — hold/pending split ruling, coverage-fixer externalize-or-restart ultimatum

chore(gui): ledger — 02:01 patrol (B2 done, jsdom final arms, coverage ultimatum pending)

chore(gui): ledger — 02:03 checkpoint executed (fixer2 respawn, four lanes released, three owners cold-started)

chore(gui): ledger — all six lanes acked, type isolation first live proof (client closure clean)

chore(gui): ledger — 02:08 patrol (all seven lanes active, wire carrier assembled)

docs(gui): respond-design task checkpoint — apiproxy wire-layer recon done

chore(gui): ledger — P0-2 contributor AGENTS.md landed (dd28a5019)

docs(gui): respond-design checkpoint 2 — host-side recon (stub respond, frame types, approval seam, ACP answerer precedent)

docs(gui): OOP debt inventory — seven territories, 2 real debts (createApiProxy, createFixtureApi), rest ruled keep-as-is

docs(gui): disambiguation note on the archived i18n design task

chore(gui): ledger — 02:12 patrol (exclude removed, mixed-knife incident under reconciliation)

chore(gui): ledger — 02:15 wave (jsdom mission closed, OOP audit done, B3 isolation proof, mixed-knife resolved)

chore(gui): ledger — 02:17 patrol (attribution reversal filed, arch-session probed)

chore(gui): ledger — 02:22 patrol (B4 done, B5+B6 merged batch, arch-session deadline set)

docs(gui): respond-design checkpoint 3 — client-side recon (pending map, PendingCard onRespond stub, AbstractApiClient.respond ready, bootHost missing approval mounts)

docs(gui): peer carrier territory review — 2 fixes (SSE cancel leak, route-reservation guard), 1 ruling ask (RPC-log visibility), compliance ledger

chore(gui): ledger — 02:27 (arch-shell respawn, territory review verdicts routed, ask-deny finding flagged)

docs(gui): P1-5 respond design page complete — pending registry, wire answerer, client state machine, first-wins arbitration

chore(gui): ledger — 02:31 patrol (respond design complete, B5 wire smoke green, shell knife 1 underway)

docs(gui): respond design — add §0 status warning (web host ask defaults to deny), mount-behavior delta, no-timeout ruling with Config discipline

chore(gui): ledger — 02:42 patrol (respond line closed pending review, B7 last piece underway)

docs(gui): respond design contract review — direction pass, 2 doc fixes (settle-order contradiction, answering-state race), A/B/C compliance ledger

docs(gui): respond design — contract review fixes (R1 verify-before-delete arbitration, R2 answering+resolved-frame transition, ask dual-source wording, rejected-is-ok-value note)

chore(gui): ledger — 02:46 patrol (respond line final, two user decisions distilled, arch-shell deadline)

docs(gui): respond review addendum — contract-gap ruling: approve plan A (ApprovalRequest.id), wire unchanged, drop plan B backscan

chore(gui): ledger — cordis B7 summit: real-browser 10/10 green, user acceptance criterion proven

docs(gui): respond design — contract gap #4 approved as plan A (ApprovalRequest.id), backscan fallback retired, blade 0 prepended

docs(gui): respond design — final polish (owner-approval vs user-go-ahead wording, implementation handoff notes)

chore(gui): ledger — 02:51 (shell-exec third respawn with operational script, respond line 4-knife final)

chore(gui): ledger — 02:53 wave (respond five-knife true final, B7 closed 12/12, client.ts green)

chore(gui): ledger — 02:56 patrol (cordis closeout bounced pending R1/R2/N1, shell-exec first sign of life)

chore(gui): ledger — 03:01 patrol (R1/R2/N1 remediation in flight across four files)

chore(gui): ledger — cordis line officially closed and archived, verified on disk (24 knives, 12/12, reviews closed)

chore(gui): ledger — 03:06 patrol (shell-exec final window, lowered first-knife bar)

chore(gui): ledger — 03:11 patrol (shell line iced-broken: three registries on disk)

chore(gui): ledger — 03:15 patrol (quiet window, both active lanes within threshold)

chore(gui): ledger — 03:20 patrol (shell five files up, api-proxy plan reported)

chore(gui): ledger — 03:25 patrol (shell migration in flight with history-preserving moves, webserver green)

chore(gui): ledger — 03:30 patrol (shell knife-1 in verification, api-proxy patching)

chore(gui): ledger — shell knife 1 accepted (694cecc53), knife 2 released

chore(gui): ledger — 03:40 patrol (knife 2 pre-move stage, cold-list spec appears)

chore(gui): ledger — 03:45 patrol (rpclog moves staged, api-proxy two specs in flight)

chore(gui): ledger — 03:54 patrol (knife-2 code done, coverage full-run final check)

docs(gui): coverage-fixer task ledger — fixer2 takeover, per-file fix log, isolated reportsDirectory pitfall

chore(gui): ledger — coverage lane closed and accepted (a19f069a5), the PR #443 CI fix knife

chore(gui): ledger — 04:04 patrol (knife-2 calibration, sole active lane)

chore(gui): ledger — shell knife 2 accepted (f8fb77b95), knife 3 released as final night task

chore(gui): ledger — 04:19 patrol (knife-3 past half: callback chain through, ToolCallDetail up)

chore(gui): ledger — night closeout summary: seven lanes closed, wake-up decision sheet

chore: missions

chore: missions

chore: missions

chore(gui): mission-local browser/probe verify scripts under missions/scripts/

The six acceptance/probe scripts move here as mission-side working
material (headers and relative imports adjusted for the new location):
carrier-errors, rpclog-panel, session, session-real,
webserver-backpressure, webserver-hardening.

chore(gui): verify-relocate mission log

chore(gui): verify-relocate mission log — R1 guard addendum

chore(gui): gates-continue mission log — CI-equivalent sequence all green

chore(gui): VS Code 扩展体系双边设计调研报告

chore(gui): 调研追加 4.5 节——git 扩展数据面与 scope 绑定

docs(gui): web plugin system RFC — walkthrough + design notes

docs(gui): RFC — restore existing SSE/POST as the v1 transport; envelope rides on it (D16)

docs(gui): RFC — envelope demoted to chan-dispatch, scope out of envelope, rpc-log cut, peer deferred, scope tree is native cordis (D17-D21)

docs(gui): RFC — hooks re-derived from component needs: useWatch/useAction only, useService removed; sessionHub cut, projections user-space, router rename, loader-only root (D22-D25)

docs(gui): RFC — drop stale fork vocabulary (vendored cordis has Fiber only; scope = mintScope pattern), hook idempotence contract (D26-D27)

docs(gui): RFC — session precision seam: plugins read scope key (host paradigm), React gets it from tree position via SlotOutlet (D28)

docs(gui): RFC — domain hooks owned by plugins over framework primitives; useConversation paradigm carried over (D29)

docs(gui): RFC — ctx services are the inter-plugin API (cordis proper); declarations are wire-only; get(id) returns scoped ctx (D30)

docs(gui): RFC — full ctx.conversation walkthrough: root-singleton scope-sensitive service, caller-ctx scope key, get(key) as scoped ctx (D31)

docs(gui): RFC — no client-side agents collection: session state machine already expresses the duality; agent resolution stays host authority (D32)

docs(gui): RFC — v1 stays session-precision, no agent-level isolation; incarnation/agent-axis designs archived in ledger (D33)

docs(gui): RFC walkthrough — full rewrite to final state (D16-D33 consolidated), end-to-end chain restored

docs(gui): RFC — apiproxy demoted to generic channel routing; domain RPCs dissolve into owner plugins (D34)

docs(gui): RFC — TS-interface-first wire contract (zod internal), conversation owns the dialogue frame with pluggable views (D35)

docs(gui): RFC — page skeleton (sidebar+conversation), projects as plugin not service, nested slots via owner registries (D36)

docs(gui): RFC — SlotMap declaration-merging slot model: single register API, inject-as-ownership, FC-typed registration, typed outlets (D37)

docs(gui): RFC — slot props whitelist: identity, display params, materialized snapshot slices, stable UI callbacks (D38)

docs(gui): RFC — end-to-end data flow: three transforms, equality protocol table, immer placement; i18n/theme kept standard (D39-D40)

docs(gui): RFC — full external-injection model: props carry values + stable injected hooks; shared/client/react example rewritten (D41-D43)

docs(gui): RFC final trio — modules.md (agent implementation spec), architecture.md (human walkthrough), plugins.md (business plugin inventory)

docs(gui): RFC — props three-source merge (scope-standard useSession auto-injected); keyed key vs list id disambiguated (D44)

docs(gui): RFC — inject comment says what it is (the React-facing props bundle); SessionHandle rename; snapshot-production story unified on buildSnapshot

docs(gui): RFC architecture — full React component tree walkthrough: props three sources, slot vs plain children, hook taxonomy per node

docs(gui): RFC — module map finalized (ui-slots/web-react/connection/runtime/ui-*/web); slots onChange replaced by cordis events; toolcall dimension; detail sidebar default-collapsed with toolName-keyed routing

docs(gui): RFC plugins — openDetail relay chain: toolcard calls chat-view injected action, chat-view relays to conversation sidebar

chore(gui): progress ledger — full archive rewrite: RFC outcome digest, open gaps, dispatch plan, cold-start entry

docs(gui): RFC grill pass 1 — SlotScope axis (root/session) on declares, Gate dependency inversion, inject handle by scope, W5 acceptance list, gantt relay chain fixed

docs(gui): figma analysis — sidebar/projects/sessions 区域交互视觉理解报告

docs(gui): figma 解析报告 — details 面板/多视图 tabs/未来功能区盘点 + slot 需求清单

docs(gui): figma 对话主区解析报告 — 消息流/tool calls 变体/审批接管输入框/Header tabs/视觉 token

docs(gui): plugins.md rewritten from figma analysis — three-column layout, full slot reservation table, selection channel, composer-takeover approvals, phased scope

docs(gui): layout dynamics ruled (drag+collapse both rails, details yields first, composer swap-panel, same-component transition); toolviews promoted to named scope-aware registry

docs(gui): P-I scope locked (details minimal, dual theme, chat-view, custom toolview sample); teammate dispatch plan — 6 owners by package, dependency-driven waves, contract arbitration

docs(gui): P-I api-contracts (full inter-package API spec) + dispatch plan (T0 skeleton knife, 7-dev roster, task briefs, milestones)

docs(gui): api-contracts v2 — scope tree in P-I, bundle loader + per-plugin CSS isolation in P-I, agent-scoped toolviews live, zustand engine, renames (SessionProvider/ObservableSnapshot/SessionBinding), router owns all shell view-state

docs(gui): services roster + progressive loading (no blocking loadAll), SlotsService as real cordis Service, renderSlot/renderSuspenseSlot duo, ui-traj teammate

docs(gui): loading-chain gaps ruled — dev=rebundle no HMR, ui-primitives package, externals on globals (no import map), host injects __DSH_BOOT__ into HTML (zero round-trip)

docs(gui): api-contracts v3 + dispatch v2 final — 12 packages, services merged in, progressive loader, global externals, __DSH_BOOT__ injection, 8-dev roster with convo split and ui-traj

docs(gui): v3 amendments — router renamed ctx.layout, ui-trajectory has no service (pure consumer sample), wait-for-settled loading (no Suspense in P-I, ledger 6b)

chore(gui): progress — pre-compact final state: v3 revision chain, 8-dev roster, T0 procedure, doc authority order

docs(gui): authority banners — modules/architecture get v3 term-mapping headers, walkthrough marked as archived process doc

docs(gui): cssdesign token set is THE theme source (--dsw-* variables, data-ds-dark-theme switch); recorded in contracts + progress

docs(gui): architecture.md full v3 rewrite — loading chain, 12-package map, service roster, slot/inject/toolviews, data flow, component tree, perf model, all current

docs(gui): contracts — UI plugins are dual-entry host plugins (node half serves client asset via ctx.webPlugins; __DSH_BOOT__ derives from it; client-closure gate back in scope)

docs(gui): contracts — closure-factory bundles with DI require (no globals), package.json dshWeb declarative discovery (no serve ritual), create-then-send empty state with project picker, ancestry() for breadcrumb, unload stubbed until HMR, props.renderSlot confirmed

docs(gui): dshClient declaration (inject/platform/immediately, exports./client), closure-DI require loading — synced across contracts/dispatch/modules/architecture/walkthrough

chore(gui): progress — record final loading-chain rulings (dshClient declaration, closure-DI require, startSession) before compact

docs(gui): architecture.md — developer-facing whole-web architecture on master baseline 6b16a67cb: what exists, what is new, no process narrative

docs(gui): architecture.md — self-contained whole-web architecture: absorbs still-valid substance from the branch RFCs (host layering, four-quadrant RPC, object layer, testing tiers) under the new plugin system as the override

chore(gui): progress — final pre-compact snapshot: contracts digest, apiproxy purity ruling, T0 procedure with first-action list

docs(gui): api-contracts v3 §3.1 — apiproxy purity principle with three-way existing-code verdicts

docs(gui): api-contracts v3 — immediately reinterpreted as static-infra group (8-package dshClient scope, boot manifest reconciliation)

docs(gui): api-contracts v3 — immediately corrected to early-load dynamic group (prod shell must not rebundle); loader shell-held; bundles register their export surface into module table

docs(gui): architecture — align with immediately=early-load dynamic group ruling; loader shell-held; module-table registration of loaded bundles

docs(gui): T0 checklist — 12-package skeleton table, 4-cut sequence, mv/attic/rewire rules (pre-drafted, awaiting go)

docs(gui): t0-checklist — pin figma-flows findings (missing font-family base vars, three alias vars behind upstream)

docs(gui): dispatch v2.1 — drop cordis-web salvage wording, two-wave staffing, loader/immediately boundary updates

docs(gui): progress + t0-checklist ledger — T0 landed, staffing status, execution accounting

docs(gui): api-contracts v3 — arbitration round 1: renderBody deps, RootBindingProvider, flush default sync, prune current, loader subpath, config-source P-I bar

docs(gui): v3 §3.2 connection 导出清单附录(rt-core 对账)+ rt-core 实现计划档案

docs(gui): progress — T1 milestone, arbitration round 1 ledger, fw-react timeout escalation

docs(gui): progress rolling update — per-line battlefield state at 00:2x, mailbox-vs-contract lesson, small-batch discipline reinforced

docs(gui): fw-react notes — v3 §2 complete, seven knives, T1/T2 follow-ups

docs(fw-slots): archive — four packages landed, open tails logged

docs(gui): progress — framework layer complete (web-react five, fw-slots four packages), T2 gated on rt-core runtime knife only

docs: api-contracts

docs: style-spec

docs

docs(gui): tsconfig convergence ruling — no host.json, root resumes host-aggregate duty, typecheck = root + client aggregates

docs(gui): missions 根三份 07-18 世代档案加「已被取代」头注——指向 web-plugin-rfc 现行权威并注明新旧对应

missions

docs(gui): progress rewritten for post-closeout state — wave ledger, architecture finale, teammate roster with handover notes, pending-user-command queue
2026-07-22 21:30:30 +08:00
..
2026-07-22 21:30:30 +08:00
2026-07-22 21:30:30 +08:00

step-session 里程碑设计(session 列表 + 对话流)

设计「session 左侧列表 + 单 session 对话流」里程碑的实现级设计文档。排在 RPC 调试面板里程碑之后实施。核心命题:Session 面向对象 + 逻辑面与 UI 展示面分离。只写文档不写代码。

进展

时间 事项
2026-07-19 22:52 归档目录建立,开始读上下文
2026-07-19 23:05 上下文读毕(契约 v2.0 + api/ 真码 + RPC 面板设计 + surface.ts + ui-product);design.md §A.0–§A.4 落盘(对象层布局/Session/SessionManager/快照类型)
2026-07-19 23:14 §A.5–§A.9 落盘(fold 适配 padding 方案/chunk 累积器/store·intents 增量/boot 装配/通知合批+帧分发表);§A 完
2026-07-19 23:20 §B 落盘(useSessionList/useConversation/useSelectedSession 实现规格 + uSES 防撕裂清单);hook 层住 web-ui/hooks/,分界即包界
2026-07-19 23:28 §C 落盘(容器/View 全 props 契约:列表+对话流+工具卡+占位卡+InputBar;滚动锚定算法;App 两列改版)
2026-07-19 23:36 §D–§G 落盘(契约消费清单/翻页数据路径/缝合规则/成本模型/两级验收/不做清单/工单切分);v1 完稿待 review
2026-07-20 00:0x review 整改 #3v1.2:§F 升级架构妥协台账——12 条妥协各带【触发条件→返工点→预埋要求】(F.1 视图态 vs 虚拟列表、F.2 tool 卡 key vs 动画、F.3 replace 降级 vs 契约补语义、F.4 PAGE_MESSAGES vs 配置化 + 8 条自查隐性妥协),纯范围排除收 F.13 一行;F.10/F.11 预埋(PendingCard.onRespond?/MessageText 单组件)同步写进 §C。单例边界澄清入 §A.7:SessionManager 单例维持,只革视图选中态。设计定稿,免二次 review,转入实现(本 teammate 任 owner
2026-07-19 23:5x review 整改(v1.1:①选中态去全局单例——selectedSessionId 移出 zustand 归 SessionsScreen 容器 useState(多视图前瞻:分屏=多实例各持选中态);drafts 同题裁定挂 Session 对象(per-session 数据跟对象走,容器局部会随 key 重挂载丢稿)——store 本里程碑零增量,useSelectedSession/selectSession/drafts intents 删除,§A.0/§A.1/§A.2/§A.4/§A.7/§B/§C 联动改写。②新增 §D.5 core 对齐对照表——方法链+数据推导逐条直核 core 源码 file:line0 红线,2 个注意点(ToolCallBlock 字段名 id/arguments 与事件 callId 命名不一致;AgentStatus 三态→running 二态投影);接缝 #4SurfaceManager 出口)顺带核实收口

| 2026-07-20 00:3x | 实现 S1+S2 落盘 tsc 绿web-runtime session/ 六文件(conversation/fold-adapter/partial/notifier/session/lineage/manager+ connection sinks + boot/intents/index 增量 + api-types 扩展(RpcRequest<帧> 窄形、SessionEvent/ContentBlock 真 core 类型)+ fixture 全重写(fx-alpha 60turn 历史脚本、prompt 打字机回放、cancel 中断、常驻 pending approval、fx-beta 子 session 谱系)。tsconfig 加 llm/session/brand referencespackage.json 加两 workspace dep |

| 2026-07-20 01:2x | W3 真契约对接 + S3 组件层 + S4 验收全绿api-types.ts 删除→api.ts 集中转口(apiproxy 新增 ./api、./client 浏览器安全出口;dsh-session 新增 ./surface 出口);rpc-log/fixture/connection/session/manager 全链改真四象限形(unary RpcRequest→RpcResponse 回显、流 RpcRequest<帧>、根 respond/RpcReceipt);hooks 2 文件 + 组件 11 文件(SessionsScreen 局部选中态/翻页锚定/工具卡双态/占位卡/InputBar);fixture host 流加 fx-gamma 5s 翻转(面板 §D-6b 素材);Manager 加审批/问答帧未实例化缓冲(pending 不落 history 的 F.7 例外面)。client.ts 修浏览器 basedsh.internal→location.originNode 注入不变)。验收:verify-session.mjs 31/31 PASSfixture 级全清单)+ verify-session-real.mjs 5/5 PASS(真 host:真列表/真历史/真模型流式回显)+ verify-rpclog-panel.mjs 10/10 PASS(面板零回归)web-runtime/web-ui/apiproxy 三包 tsc 绿 |

| 2026-07-20 02:3x | 重连风暴 bug 修复 + 注释英文化。根因=node:http 桥接层:req.on('close') 自 Node 16 起在请求体读完即触发(无体 GET 立即),两条 SSE 一开即被 client abort→循环重连(12s 132 请求);fixture 假流不走桥接故三脚本全绿掩盖。修复=改挂 res.on('close') + writableEnded 区分正常结束(落在 webserver/src/index.ts——step1-design 拆包后的新家,bin.ts 旧址改动随拆包废弃;注释写明 Node 16 语义防回归)。verify-session-real.mjs 增 E2-0a/b 连接稳定性断言(12s ≤10 请求+零 abort,防 fixture 掩盖类 bug)。同批:我 touch 过的 web-runtime/web-ui/scripts 全部代码注释翻英文(新纪律:注释英文、文档中文;fixture 数据字符串与 UI 文案保持中文——产品语言非注释)。验证:12s 请求 132→4、零 abort;三脚本 31/31+10/10+7/7 全绿;真 host 验证 E2-1 改走「+」新建(fresh host 列表空是 impl 已知 TODO 非本层 bug |

| 2026-07-20 03:2x | rpcId caller 视图(形状 a)落地createApiClient 返回新类型 CallerApiunary=payload 直传、载体内 mint+包封;泛型面从 RpcMethodMap 的 RequestPayload/ResponseValue 机械导出;流=payload+signalrespond=ClientResponse 透传不 mint)——契约 ApiProxy 签名零改动,impl 侧照旧。web-runtime 全调用点去 rpcRequest 包裹(session/manager/connection/intents 持 CallerApi);rpcRequest 降级 carrier-internal(唯一消费者=fixture 假载体,wrapApiWithFakeEnvelopes 改吐 CallerApi 与真载体同形)。验证:apiproxy/web-runtime/web-ui tsc 绿 + 三脚本 31/31+10/10+7/7 全绿。headless.tsstep1-design 属地)3 处调用点如预期破——已回执 main 转派 |

| 2026-07-20 04:5x | 泵方向反转(用户架构纠正):批量缓冲从 rpc-log 模块级 letpendingBatch/flushScheduled——多实例/测试串台隐患)收进 AbstractApiClient 实例——envelope 观测升格数据中间层正式切面:实例私有 batch+微任务 flush+subscribeEnvelopes(listener) 订阅面(listener 异常隔离,观测不得破坏载体);onEnvelope 保留为逐条虚方法(内喂缓冲,无订阅者零成本)。rpc-log 降级纯订阅者:ingestEnvelopeBatch 只做 batch→RpcLogEntry 映射+环形截断入 storenextId 留模块级——纯展示 key 非 wire 态,注明理由);tapToStore/clearPending 删除,WebApiClient/FixtureApiClient 的 tap 构造参数删除(boot 里 api.subscribeEnvelopes(ingestEnvelopeBatch) 一行接线)。三包 tsc 绿+三脚本 ALL PASS×3 | | 2026-07-20 04:3x | 收口批fetch/handler.ts(本轮 touch 文件)注释全翻英按减量口径;client.ts 文件头随改。全仓 grep 确认 ApiClientBase/CallerApi 零残留(headless.ts 已由 step1-design 并轨 InProcessApiClient)。apiproxy/dsc tsc 绿 + 三脚本 ALL PASS | | 2026-07-20 04:1x | 命名修订落地ApiClientBase→AbstractApiClient、CallerApi→IApiClient(用户拍板);三面关系一句话已写进 IApiClient JSDoc——ApiProxy=impl 实现的窄形签名契约、IApiClient=client 消费的 payload 直传视图、AbstractApiClient=两者之间的桥。9 文件机械改名,三包 tsc 绿 + 三脚本 31/31+10/10+7/7 全绿 | | 2026-07-20 03:5x | caller 视图 + 抽象基类合并落地(追加拍板)createApiClient 废弃 → ApiClientBase 抽象类(协议不变量全在基类:mint/四象限信封/zod/SSE 解析/CallerApi 域方法;切面=abstract doFetch 传输 + 可覆写 onEnvelope tap 默认 no-opcallUnary/openMux/openHost 设 protected virtual 供无 HTTP 平台覆写)。子类三个:InProcessApiClient(apiproxy 内——进程内注入是本包自有能力,-p 用)、WebApiClientweb-runtime 新文件,doFetch=globalThis.fetch+同源 base、onEnvelope=tapToStore)、FixtureApiClientfixture.ts,覆写协议层 virtuals 直连内存 impl,替代 wrapApiWithFakeEnvelopes 包装器——已删)。ApiProxy 契约不动;rpcRequest 从 api.ts 撤下(fixture 本地私有 mint)。验证:三包 tsc 绿 + 三脚本 31/31+10/10+7/7 全绿。headless.ts 届时改 new InProcessApiClient(host.handler)step1-design 排队单里带上) |

| 2026-07-20 05:2x | input-ux 批次1 契约偏差评审入档(设计 owner 评审):①PromptError{op:'send'|'stop'} 判别 union——无冲突,采纳(快照仍单错误槽、清空时机不变,op 只加判别);②sendDraft 乐观清稿+失败回填+draftInFlight 在途锁——无冲突,采纳:与「draft 挂常驻 Session 对象」恢复语义正交互补(回填依赖实例常驻,切换/切回 sent 不丢;failed 回填 sent+新输入 顺序正确);连带发现 input-ux 给 Notifier 加了 notifyNow 同步通知——评审认定合理但需边界纪律,已在 §A.9.6 补「仅用户手势直接回响可用 notifyNow,帧驱动一律合批」防误用扩散。design.md §A.2/§A.4/§A.7/§A.9/§B.2/§C.6 六处同步更新 |

| 2026-07-20 06:2x | input-ux 定格修正回刷入档(bb1a7ed5f):①§A.4 AssistantMessageNode 加 interrupted?: true(停止定格终态标记;分数 seq turn/end-0.9 保序;中断工具卡同理 -0.8+偏移/error.code='interrupted');②§A.2 内部状态表加 frozenNodes 派生态行;③§A.9 turn/end 行升级「定格清扫」语义(bb16d956b 删除式→bb1a7ed5f 冻结式:中断输出是价值非残渣,live 与 history 重放同函数收敛);④§C.3 滚动规则改两规则并存(atBottom 改 onScroll 监听维护修跟随链断裂 + 用户发送强制置底至自己消息入流)。纯回刷无代码改动 |

接缝问题(草记,随批补充)

  1. history 分页不保证 replace 闭包surfaceOp: {op:'replace', start, end} 引用的 seq 若被翻页截在窗口外,core fold throw「start seq not found」。§A.5 已设计 client 侧降级防御(foldDegraded),但契约层「页边界对齐消息边界」未提 replace 语义——将来 compact 落地后建议契约补「replace 目标所在页整体返回」或 server 侧展开。只报告不擅改。
  2. 隐式 resume 后 subscribed 帧是否补发未明确mux 流打开时只对 attached session 发 session/subscribed;冷 session 经 history() 隐式 resume 变 attached 发生在流已开之后——契约未写 host 是否为新 attach 的 session 补发 subscribedlastSeq 基线)。不补发时 client 缝检测降级为 liveBuffer seq 去重(§D.3 可运行但基线语义残缺)。请 apiproxy-design 明确并写进契约 §3.3。
  3. SessionSummary 无 title 字段ui-product §6 标题规则(首条用户消息生成+手动重命名)无契约支点;本里程碑列表用 sessionId 截断顶替(§F 明确出局),将来 additive 加 title?: string 即可,无破坏性。
  4. dsh-session 包出口是否 re-export SurfaceManager 已核实收口(review 整改 #2 顺带):包根只出口 foldSurface/守卫,SurfaceManager 走 @deepseek-ai/dsh-session/src/surface.ts 子路径(./src/* 通道在,apiproxy 先例)。已写进 §A.5。

接缝问题

(发现契约缺口记在这里,只报告不擅改)