Compare commits

..
2367 Commits
Author SHA1 Message Date
cflmy 0b47cf05fd test: skip real bootstrap when the platform is outside the release contract
ci/woodpecker/push/ci Pipeline was successful
CI bookworm reports glibc 2.36; the published CLI declares 2.39. Bootstrap\nmust refuse that platform, so the gated test skips with the real reason and\nremains covered on a supported host. Records the split in STATUS.
2026-11-28 23:55:00 +08:00
cflmy 682032c769 feat: capture CLI and routed workbench failures as diagnostics
ci/woodpecker/push/ci Pipeline failed
CLI check/execution failures from marqdo_program and unexpected Web API failures are persisted as local redacted reports, routed to the owning area (cli/knowledge/ecosystem/bootstrap/update/web). Submission remains explicit.
2026-11-28 23:41:03 +08:00
cflmy 3033d37b93 feat: add the read-only ecosystem catalog
ci/woodpecker/push/ci Pipeline was canceled
Project Runtime, Tool, Std, Ext and Knowledge in a fixed order from real\nservices. Ext exposes marqdo.yaml/marqdo.lock identity without a second parser;\nsemantic validation and trusted candidate discovery are explicit user actions.\nNo page open/filter action downloads, installs or executes.\n\nAdds /mqdh/api/ecosystem/candidates and /mqdh/api/ecosystem/project-check,\npublic std:<relative> import projection, unit tests and CAT/READER status.
2026-11-28 23:39:42 +08:00
cflmy 980e07dfae build: pin the DSH upstream identity in the package manifest
ci/woodpecker/push/ci Pipeline was canceled
The tag-only package lane cannot rely on an upstream git remote. Record the\ntested DSH baseline in packages/marqdo/harness/package.json and let the release\nmanifest/evidence fall back to it, so a clean clone still produces a complete\nmanifest. UPSTREAM.md documents the single record and update rule.
2026-11-28 23:14:48 +08:00
cflmy 475e774536 ci: scope the shared-egress gate to Node-side sources
The browser API client in src/web/assets.ts must use fetch; the gate now only rejects Node-side product sources that bypass src/network. CI passes end-to-end with real Release install and Bootstrap.
2026-11-28 23:12:51 +08:00
cflmy 307a44d6f1 docs: record egress, bootstrap, diagnostics and distribution evidence 2026-11-28 23:10:55 +08:00
cflmy 5f56c23455 feat: add unified egress, bootstrap, diagnostics and app distribution
Implements the four follow-up design issues for MQDH:\n\n- network: one policy/proxy/mirror/offline/audit client for product egress\n- bootstrap: first-run state machine, default Tools, real smoke, doctor/repair\n- diagnostics: local redacted reports and explicit Gitea issue submission\n- distribution: release manifest, user install tree, update/rollback, installer\n\nThe product CLI exposes bootstrap/doctor/repair/report/update/network and the\n/mqdh workbench renders the same services. Marqdo runtime artifacts remain\ndownloaded from trusted releases; unsupported platforms and unrun gates stay\nUNVERIFIED in docs/mqdh/STATUS.md.
2026-11-28 23:07:07 +08:00
cflmy 9b6acf0569 refactor: rename the product abbreviation to MQDH
ci/woodpecker/push/ci Pipeline was successful
Rename the downstream identity consistently: MQDH_HOME and MQDH_* env
vars, @marqdo/mqdh-harness, @marqdo/mqdh-bundle, the mqdh profile and
launcher, /mqdh routes, marqdo.mqdh.* schemas, docs/mqdh, CI variables and
all user-facing prose. Product name remains Marqdo Harness; command is
mqdh. No behavior change; 29 tests and the host typecheck pass.

Part of marqdo#25.
2026-11-28 16:34:44 +08:00
cflmy ee482a23c2 ci: skip upstream git-hook installation in submodule CI
ci/woodpecker/push/ci Pipeline was successful
The upstream install script refuses extensions.worktreeConfig when a
submodule keeps core.worktree in its common config. Its documented CI skip
path is CI=true; hooks are not needed in the pipeline. This keeps the
independent app CI and the root Node lane installable from a submodule.

Part of marqdo#25 (S09).
2026-11-28 11:03:08 +08:00
cflmy 44282ead84 docs: record the independent-clone build evidence
ci/woodpecker/manual/ci Pipeline is running
A depth-1 clone of origin/main installs the frozen lockfile and builds all
10 gates, so R04 is verified rather than inferred from the development
checkout. The parent pipeline's candidate-manifest bug is recorded as
fixed with its rerun still pending.

Part of marqdo#25.
2026-11-28 10:54:53 +08:00
cflmy 210ac86b0b feat: save a reviewed completed run as static knowledge
Add the reviewed outcome flow: a completed, fresh run can be confirmed
into a static knowledge document that records applicability, executable
asset identity, run/evidence id and boundaries. The generated document has
no @exec region and grants no execution permission; it enters the same
private knowledge index and can be searched later.

Expose it as POST /mdh/api/runs/<id>/candidate with explicit confirmation
and a workbench button, and cover the policy in tests. Record the View
result-binding gap as marqdo-view#15 instead of rendering results here.

Part of marqdo#25 (MDH-07, K07).
2026-11-28 10:52:32 +08:00
cflmy d28c5e4051 types: make the downstream package strict-clean in the host aggregate
Register the package sources in the host typecheck program and fix the
strict findings: explicit Error.name overrides, exact optional properties,
index/array narrowing and the webserver route auth field. No behavior
change; the same 28 tests pass and the host aggregate reports 0 errors.

Part of marqdo#25.
2026-11-28 10:46:25 +08:00
cflmy 25fc24eea4 feat: add Marqdo Harness product services and workbench
Implement the downstream product in `packages/marqdo`:

- `@marqdo/mdh-harness`: application home layout, atomic writes, locks,
  bounded fixed-argv processes, safe tar extraction, Observation 1 and
  ValueWire validation;
- trusted Gitea release discovery, SHA-256/platform/Bundle verification,
  transactional environment install, rollback and cleanup, CLI Tool changes;
- private knowledge collections with strict import policy, the official
  `marqdo-knowledge` compile/query adapter and a disclosed locator fallback;
- Analysis 3 parsing, approved run/call execution, evidence and staleness;
- the six model operations (find/read/check/program/ecosystem/knowledge_search);
- the `/mdh` workbench over the existing web server with a same-origin fence;
- `mdh` launcher, CI/package/upstream scripts and a Woodpecker pipeline.

Tests: 28 node:test cases (27 PASS, one network-gated install test also PASS
with MDH_TEST_INSTALL=1). Product install/workbench evidence is recorded in
docs/mdh/evidence.

Part of marqdo#25 (MDH-03..MDH-08).
2026-11-28 10:41:39 +08:00
cflmy 2d4eef4fe0 fork: establish the Marqdo Harness downstream baseline
- keep the full DSH history, MIT license and third-party notices;
- remove upstream publish/upload/desktop packaging workflows so downstream
  CI cannot trigger official credentials or channels;
- exclude the downstream `packages/marqdo/*` packages from the upstream
  bundling graph (they run as TypeScript through Node's type stripping);
- declare app-boot's production peer for the deployed launcher;
- document the product architecture, gates, upstream policy, modification
  log and the M0/M1-M6 evidence.

Upstream: deepseek-harness 4b399c39a6.
Part of marqdo#25 (MDH-00/MDH-02).
2026-11-28 10:41:04 +08:00
imccyu 4b399c39a6 Merge pull request #8961 from deepseek-harness/worktree-release-dsh-0.2.3-alpha.2
release(dsh): 0.2.3-alpha.2
2026-11-22 16:50:28 +08:00
imccyu 267805d20d release(dsh): 0.2.3-alpha.2 2026-11-22 15:27:28 +08:00
imccyu 5d8fdab85a release(vendor): cordis 4.2.0-alpha.1, cosmokit 1.10.0-alpha.1, group 1.2.0-alpha.1, hmr 1.2.0-alpha.1, include 1.2.0-alpha.1, loader 1.2.0-alpha.1, logger-console 1.2.0-alpha.1, schemastery 3.20.0-alpha.1, timer 1.3.0-alpha.1 (#8960) 2026-11-22 15:18:14 +08:00
imccyu bae489ee61 release(vendor): cordis 4.2.0-alpha.1, cosmokit 1.10.0-alpha.1, group 1.2.0-alpha.1, hmr 1.2.0-alpha.1, include 1.2.0-alpha.1, loader 1.2.0-alpha.1, logger-console 1.2.0-alpha.1, schemastery 3.20.0-alpha.1, timer 1.3.0-alpha.1 2026-11-22 15:15:43 +08:00
imccyu 09d9609a28 Merge pull request #8837 from deepseek-harness/chore/node-24-22-3-floor
chore(deps): raise the Node.js floor to 24.22.3
2026-11-22 11:23:51 +08:00
imccyu d98f5d6851 Merge pull request #8945 from deepseek-harness/worktree-release-dsh-0.2.3-alpha.1
release(dsh): 0.2.3-alpha.1
2026-11-22 00:45:52 +08:00
imccyu aae91d692e release(dsh): 0.2.3-alpha.1 2026-11-21 18:29:41 +08:00
Yudong Han 5927327ea9 Merge pull request #8061 from deepseek-harness/feat/office-single-skill
feat(office): Office 技能只保留 office,正文内联精简指导
2026-11-21 12:53:01 +08:00
yudshj 9c093c0025 test(office): PowerPoint 视觉意图用例的初始文本框改为满宽
原来的文本框偏离页面中心,「标题居中」需要同时移动文本框。office 正文
不再写这条 python-pptx 细节,用户排除渲染时模型拿不到位置反馈,用例因此
不稳定。改为满宽文本框后,用例只验证段落对齐、颜色和文本框仍然居中。
2026-11-21 00:20:19 +08:00
yudshj d417b2a430 test(snapshots): 同步 master 后重新生成单 Office 入口的目录录制
master 新增的推荐技能(official-plugins、personalized-pages)改动了同一份
技能目录。rebase 时冲突的 SDK 与单文件 exe 录制取 master 版本,再把其中
四条 Office 目录项替换为单条 office;manual-compact 记录的压缩 token 估算
随目录长度变化,用 keyless refresh 重新计算。
2026-11-20 23:50:06 +08:00
yudshj 7ad59710c3 fix(office): 按 review 意见更新旧笔记现状、清理测试并说明 promptChanges
- 2026-09-27 的 Office 笔记就地改写仍以现在时描述四技能目录、操作技能
  和共享检查器的段落,指向取代它们的后续笔记。
- progressive-loading.spec.ts 去掉读取格式文件时遗留的本地文件系统和
  文件工具挂载,setup 改为直接接收要加载的技能名。
- session-snapshot README 说明 headless 套件中非 pin 场景可以声明少于
  pin 的 header.promptChanges,只比对 pin 提示词伴随文件的前导小节。
2026-11-20 23:29:08 +08:00
yudshj 955e4cee35 docs(config): 重新生成 Office 技能配置说明的源码行号 2026-11-20 23:29:08 +08:00
yudshj b864a0b6fa refactor(office): office 技能正文内联精简指导,删除三个格式文件
格式指引以分步流程、库的选择、停止规则和示例为主,约束了模型自己的做法。
office 正文改为只写模型无法自行得知的 DSH 事实(工具下一步可用、缺失时重新
加载、内置 pypdf、旧格式先转换)和会悄悄丢数据的坑(run 格式、东亚字体、
文本框溢出、公式结果、DataFrame 覆盖工作簿),删除 docx.md、pptx.md、
xlsx.md,provider 也不再检查它们。

整份指导随 skill 结果到达,不再需要额外的 read,也不依赖会话文件系统能否
读到 Host 路径。真实模型 e2e 去掉依赖旧指引的过程断言,保留结果校验和显式
渲染意图;Office 场景删去读格式文件的步骤,office-skills-no-renderer 用真实
模型重录。README、升级指南和 Agent Note 同步更新。
2026-11-20 23:29:08 +08:00
yudshj e1e5d1df12 test(snapshots): 基于最新 master 重新生成单 Office 入口的录制
rebase 时冲突的 SDK 与 Web 录制取 master 版本,再把技能目录里的四条 Office
条目替换为单条 office;master 新增的 scoped 场景同样替换。manual-compact
记录的压缩 token 估算随目录长度变化,改用 keyless refresh 重新计算。

Office 场景保留本分支的 authored 输入,用 keyless refresh 带上 master 的
系统提示分节。office-progressive-ptc-scoped 与 office-progressive-ptc 保持
同一份录制;office-render-tools-ptc-scoped 的 authored 输入仍加载
office-xlsx,与非 scoped 场景一样声明 promptChanges: 0。
2026-11-20 23:29:08 +08:00
yudshj 455ddfd46d test(snapshots): 补齐单 Office 入口的目录录制 2026-11-20 23:29:05 +08:00
yudshj 19a6b77e51 chore(office): 同步当前升级指南和单入口录制 2026-11-20 23:29:05 +08:00
yudshj 7931286b57 fix(office): 明确使用 read 工具读取格式指引 2026-11-20 23:29:05 +08:00
yudshj 803f3456de docs(config): 重新生成 Office 技能配置说明 2026-11-20 23:29:04 +08:00
yudshj 84f448966c test(snapshots): 刷新只含 Office 技能目录变化的 SDK 与 Web 录制 2026-11-20 23:28:47 +08:00
yudshj 7f8e3720b8 feat(office): Office 技能目录只保留 office,格式指导改为按需读取的资源文件
docx、pptx、xlsx 的指导从独立技能移到 office 技能目录下的 docx.md、
pptx.md、xlsx.md,模型加载 office 后用 read 按需读取;tool-office 的
activationSkills 默认值改为 office。
2026-11-20 23:27:24 +08:00
Dudu-0223 97db571e72 Merge pull request #8647 from deepseek-harness/feat/personalized-recommendations-in-web
feat(web): 个性化推荐转为内置功能,默认开启,开关在通用设置
2026-11-20 21:47:38 +08:00
Dudu-0223 d0be6ccd9d fix(recommendations): scope Creator skills and enable the SDK catalog 2026-11-20 21:31:56 +08:00
ZiyaZhangandDudu-0223 3259436cb1 feat(web): ship personalized recommendations by default
Mount the recommendation plugins in Web and Desktop and expose their skill
switch in General settings. Record card decisions as Session events and
replay decisions from older plugin records. Use English for the two skill
catalogs and retire the optional recommendations bundle.

Co-authored-by: Dudu-0223 <fsyo0223@gmail.com>
2026-11-20 21:31:55 +08:00
CreatixChu 9c584d1e0b Merge pull request #8713 from deepseek-harness/fix/cua-turn-input-lifecycle
CUA 程序结束披露持有输入,异常和停止时释放
2026-11-20 20:45:28 +08:00
EricMoin 7b27ce4235 fix(remote-connection): restore login url for loopback (#8920)
* fix(remote-connection): show loopback login links

Keep Token links available to the signed-in owner when the Host uses a loopback address. Explain the requirements for signing in from another device.

* fix(remote-connection): hide entry on desktop
2026-11-20 11:46:13 +00:00
creatixchu e7a81f4ae4 Record held-input notices after the window activity notice format 2026-11-20 18:36:56 +08:00
creatixchu 430680a4c3 Silently finish best-effort Windows input cleanup on disconnect 2026-11-20 18:36:03 +08:00
creatixchu c9407e2be2 Limit Windows held-input checks to the affected key or button 2026-11-20 18:36:03 +08:00
creatixchu 40be0a915d Check that native mouse input rejects a caller-supplied owner 2026-11-20 18:36:03 +08:00
creatixchu b39c243f4d Scope native CUA input holds to the issuing connection 2026-11-20 18:36:03 +08:00
creatixchu ad535742cb Exercise an independent mouse release at the Windows desktop receiver 2026-11-20 18:35:29 +08:00
creatixchu cb0f0ffa9a Track only the Windows CUA helper's own input dispatches 2026-11-20 18:35:29 +08:00
creatixchu 7715be3c89 Record policy rejection before native input release confirmation 2026-11-20 18:35:29 +08:00
creatixchu 5b0b1f915d Start post-policy input release from the CUA final result observer 2026-11-20 18:35:29 +08:00
creatixchu ab4cfd8dd7 Refresh CUA replay outputs for the merged system input protocol 2026-11-20 18:35:19 +08:00
creatixchu 46ca2d0d1a Align held-input reminders with system keyboard release options 2026-11-20 18:34:58 +08:00
creatixchu 97ddb7e5be Merge master and track system keyboard holds alongside mouse input 2026-11-20 18:34:57 +08:00
CreatixChu cc8dd8ea2d Merge pull request #6423 from deepseek-harness/feat/cua-recent-activity
为 agent-agent、agent-human 的操作冲突提供一种实验性的解法
2026-11-20 18:30:43 +08:00
Turtle 34c375c78d Merge pull request #8875 from deepseek-harness/turtle/drag-session-to-rail-39796288b5d4
feat(web): open a dragged Session in the right sidebar
2026-11-20 18:22:37 +08:00
creatixchu c10a5008ff docs(cua): clarify what the macOS activity listener records 2026-11-20 18:14:18 +08:00
f6c1be6c63 fix(web): keep sidebar borders visible and quiet idle pane targets
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 17:58:28 +08:00
creatixchu 69863f91fd fix(cua): detect input during reads and avoid waiting on desktop work 2026-11-20 17:31:49 +08:00
creatixchu d571a18edc Merge remote-tracking branch 'origin/master' into feat/cua-recent-activity
# Conflicts:
#	docs/persistence-catalog.i18n.yaml
2026-11-20 17:07:03 +08:00
creatixchu b20dbfd8c3 fix(cua): include system sleep in activity age 2026-11-20 17:04:53 +08:00
creatixchu c86d8c5449 test(cua): exercise window attribution with a Quartz mouse event 2026-11-20 17:03:04 +08:00
creatixchu 102493bfcc fix(cua): check step cancellation after the helper query 2026-11-20 17:02:25 +08:00
creatixchu d4c0e28f60 fix(cua): keep window owner lookup independent of monitor state 2026-11-20 16:59:00 +08:00
creatixchu d9f2e9f2aa fix(cua): filter reminders against delivered observations 2026-11-20 16:58:12 +08:00
EricMoin 84be2036d1 Merge pull request #8904 from deepseek-harness/feat/composer-placeholder-slot
feat(ui-conversation): add an inline composer placeholder slot
2026-11-20 16:55:54 +08:00
creatixchu 6b642183c0 feat(cua): report recent window activity before the next model step 2026-11-20 16:49:44 +08:00
Jiawei Song 88078b151f Merge pull request #8832 from deepseek-harness/fix/sdk-ptc-disable-workflow
fix(ptc): 对齐 SDK 与 Desktop PTC 模式的 workflow 和插件管理工具
2026-11-20 16:49:14 +08:00
EricMoin c50abb6f2f fix(ui-conversation): preserve composer bar props for existing plugins 2026-11-20 16:41:36 +08:00
EricMoin 7cb77eade7 test(ui-conversation): cover the placeholder slot with demo bundles
Split the placeholder coverage out of fixture-input-extension: one bundle renders keycaps and a Plan outline, another matches a single configured Session.
2026-11-20 16:41:36 +08:00
EricMoin 36426e319b feat(ui-conversation): add an inline composer placeholder slot 2026-11-20 16:41:36 +08:00
Dudu-0223 03fef31062 fix(action-cards): 保留不同轮次中各自可操作的提案 (#8900)
* fix(action-cards): keep proposals available across turns

* test(action-cards): consolidate replay and lifecycle regressions

* fix(action-cards): guide revised creation plans and drop derived decision wording

A changed plan now gets a new card whose answer says the earlier card stays available until dismissed. Card body docs describe decisions as recorded only.
2026-11-20 08:38:00 +00:00
Shigma bfa074a364 Merge pull request #8866 from deepseek-harness/fix/model-menu-group-click
fix(ui): keep model menu open when pressing non-focusable content
2026-11-20 16:34:41 +08:00
sjw1231 159b3edfeb test(web): add plugin_manager to the scoped PTC round system prompt
The persistent-in-memory PTC round snapshot from master uses the Desktop
ptc preset, which now provides plugin_manager when the Host supplies an
editable profile.
2026-11-20 16:26:45 +08:00
sjw1231 7a4e99f81d Merge remote-tracking branch 'origin/master' into pr-8832-narrow 2026-11-20 16:24:05 +08:00
LegGasai 972e441cf5 Merge pull request #8827 from deepseek-harness/feat/models-catalog-reasoning-levels
feat(ui-settings-models): edit reasoning levels of catalog provider models
2026-11-20 16:21:50 +08:00
imccyu 24fbc36d6a Merge pull request #8899 from deepseek-harness/sidebar-restyle-peak
test(benchmarks): measure peak elements restyled during sidebar drag
2026-11-20 16:18:30 +08:00
LegGasai b53e7208e1 Merge pull request #8898 from deepseek-harness/fix/token-cookie-accumulation
fix(web): expire other ports' auth cookies at browser sign-in
2026-11-20 16:13:40 +08:00
LegGasai 07b713a0a5 Merge remote-tracking branch 'origin/master' into feat/models-catalog-reasoning-levels
# Conflicts:
#	packages/client/ui-settings-models/README.i18n.yaml
#	packages/client/ui-settings-models/README.md
#	packages/client/ui-settings-models/README.zh.md
2026-11-20 16:08:08 +08:00
imccyu 374237f4d0 test(benchmarks): measure peak elements restyled during sidebar drag
Report the per-pass element histogram, the broadest pass and its duration, and the longest in-gesture frame gap. Guard the fixed 720px column against a single oversized pass independently of its cumulative restyle budget. Refs #8856.
2026-11-20 16:03:57 +08:00
imccyu f64b63fd9c Merge pull request #8906 from deepseek-harness/fix/fold-blank-frame-sampling
test(web): sample fold gaps after animation frame writes
2026-11-20 16:03:43 +08:00
imccyu e74d53ccbf Merge pull request #8903 from deepseek-harness/ci/bench-two-phases
ci: run the benchmark phases in parallel on the shared build and render one report
2026-11-20 16:02:52 +08:00
LegGasai beaa489423 test(voice-input): give the manual-source readiness wait the spawn budget
"pins a manual source to one preparation" waited for `ready` with
vi.waitFor's default 1,000 ms after starting a real worker subprocess.
On a loaded coverage runner that start took longer (the file ran 28 s
against 11 s on the passing run), so the case failed twice in a row on
this branch with `expected 'loading' to be 'ready'`.

The wait now takes the 10,000 ms budget that this file's other
readiness waits after a subprocess start already use.
2026-11-20 16:02:31 +08:00
CreatixChu 139c84202d Merge pull request #8716 from deepseek-harness/fix/pi-image-input-limits
接入pi更新的图片大小上限和宽高上限
2026-11-20 16:01:19 +08:00
imccyu f5b4ef4cc9 test(web): sample fold gaps after animation frame writes
Observe the rendered root anew each frame so an earlier test callback cannot count a gap corrected later in that frame. Keep the existing size/frame limits and check consecutive equal bad frames with a deterministic Chromium control. Refs #6336.
2026-11-20 15:50:49 +08:00
creatixchu 3db0e11d0d test(cua): pin the scoped prompt with activity tracking off 2026-11-20 15:47:13 +08:00
28a4dc72a1 chore(web): regenerate the client slot catalog
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 15:47:10 +08:00
imccyu c0a05ff31e ci: rebuild the benchmark native addon when the restored one does not load
node-24-build can run on the self-hosted pool while the benchmarks stay on
hosted Linux; the phase jobs now load the restored Node-API addon and rebuild
it on their runner if it fails. The report spec cleans its directories with
onTestFinished, which also removes a clone the duplication gate reported.
2026-11-20 15:46:59 +08:00
creatixchu ba6d2bc347 feat(cua): allow disabling macOS recent activity per connection 2026-11-20 15:46:05 +08:00
Shigma 578697c045 fix(ui): keep focusable model menu options pressable 2026-11-20 15:44:16 +08:00
imccyu fd5037037a Merge pull request #8848 from deepseek-harness/feat/ptc-default-scoped-repl
feat(ptc-runtime-node): default executionMode to persistent-in-memory with the scoped REPL
2026-11-20 15:41:55 +08:00
0c574bebd9 fix(web): show one Session drop target per right sidebar pane
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 15:40:02 +08:00
LegGasai 824aefbdb6 test(web): derive the token Loader fixture ports from the listener port
The case took ports 40000 to 40016 as other authorities while its
listener used an OS-assigned port. Linux assigns from 32768 to 60999 by
default, so the listener could receive one of those ports; the matching
fixture cookie then carried the listener's own cookie name, 16 others
remained, and the sign-in expired nothing where the case expects one
expiry.

The fixture now counts 17 ports down from the listener's port, so none
of them can be the listener's own authority.
2026-11-20 15:39:46 +08:00
sjw1231 b67be0905d revert(sdk): keep the workflow tool in the PTC executor overlay
The SDK PTC overlay is not shipped with @deepseek-ai/dsh and training
flips only the executor rows, so disabling workflow there would not
align any consumer. Restore the overlay, its docs, the keyless smoke
assertions, and the workflow parity exception, and drop the upgrade
guide that described the removal.
2026-11-20 15:26:32 +08:00
imccyu 0394e32ce6 ci: run the benchmark phases in parallel on the shared build and render one report
node-24-bench becomes a two-entry matrix that restores the node-24-build
output, bundles only the benchmark workers, and runs one suite phase per idle
runner: phase first holds the corpus cases and phase last the serial files
listed in SERIAL_BENCH_FILES. Each phase uploads its results.jsonl and the
measuring environment; node-24-bench-report renders one benchmark-report on a
small runner under Node type stripping and stays out of all-checks-passed.
2026-11-20 15:23:15 +08:00
7bcd87c7c6 fix(web): limit the drop target to the right sidebar's area
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 14:56:07 +08:00
d03be2bf85 fix(web): size the drop target's highlighted card to the right sidebar
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 14:48:10 +08:00
LegGasai 50fde0cb2a fix(web): expire other ports' auth cookies at browser sign-in
Browsers send one hostname's cookies to every port, and each `dsh web`
port names its 30-day cookie after its own authority. A browser that
signed in to about 70 ports therefore sent more than Node.js's 16,384
bytes of request headers to every local Host and received HTTP 431
before any handler ran.

A successful root token exchange now also expires the other
authorities' generated-name cookies its request carries, except the 16
with the latest claimed issue time. Cookie names, format, lifetime and
the `/connect` exchange are unchanged, and a sign-in with nothing to
expire answers with the same single Set-Cookie value as before.

Measured with Chromium 149 against a real `dsh web`: a jar of 69
cookies (15,515 bytes of Cookie header) shrinks to 18 (3,887 bytes)
after one sign-in, and two Hosts on different ports stay signed in
together. A browser already over the limit still receives 431 until
its site data for that hostname is cleared.
2026-11-20 14:34:53 +08:00
c7225ab990 fix(web): cover the whole area right of the Session list with the drop target
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 14:25:43 +08:00
creatixchu 851ec95aa0 Keep the message persistence declarations at their catalog locations 2026-11-20 13:52:48 +08:00
creatixchu ace8d03ab2 Expose image preparation on the shared message entry 2026-11-20 13:50:36 +08:00
creatixchu 6cbd5b94a5 Refresh the LLM event reference after image helper extraction 2026-11-20 13:44:36 +08:00
creatixchu 32367f911e Share retained image collection and request budget checks 2026-11-20 13:42:16 +08:00
std4453 69ebdc8446 Merge pull request #8359 from deepseek-harness/feat/composer-draft-history
feat(ui-conversation): recall sent drafts with ArrowUp and ArrowDown
2026-11-20 13:38:12 +08:00
Shigma b5161a1579 fix(ui): keep model menu open when pressing non-focusable content 2026-11-20 13:10:49 +08:00
imccyu f5dc990da8 ci: split coverage across two file shards and merge on a small report job (#8868)
* ci: split coverage across two file shards and merge on a small report job

Coverage runs as a three-lane matrix: two instrumented file shards that deal
path-sorted test files in snake order (DSH_COVERAGE_SHARD) and the
uninstrumented heavy suites. Each shard uploads its blobs, file list, and
durations; node-24-coverage-report re-lists the inventory, checks the shards
partition it, merges the blobs with thresholds on a 2-vCPU runner, and alone
saves the duration history. Only the report job joins all-checks-passed.

* ci: run the coverage heavy suites on the first shard and split shards by file size

The exempt heavy suites finished in about a minute on a dedicated 16-vCPU
runner, so they join shard 1 with the coverage lane's usual worker split.
Shards now deal files largest first by byte size instead of by path order,
so the heaviest suites no longer land on one shard. The coordinator repeats
each failed partition and its Vitest FAIL lines after all partitions finish,
and run-gates.spec clears DSH_COVERAGE_SHARD inherited from the CI shard.

* ci: give the coverage merge a 4 GB heap on the small report runner

Merging both shards' blobs exhausted Node's default heap of about 2 GB on
the 2-vCPU report runner (run 44664262449).

* ci: merge coverage shards on an 8-vCPU runner

The merge took 154s on the 2-vCPU report runner against ~30s on the former
16-vCPU lane (run 44667701311).

* ci: address review on the coverage shards

- Shards record their checkout root, and the merge rewrites that prefix in
  blobs from another checkout so one source file never merges as two.
- Shard blob uploads overwrite on a re-run of the same workflow run.
- The coverage report lane joins the runner-temp and compile-cache lane
  lists in ci-workflow.spec.
- The failover runbook states the self-hosted shard and exempt workers.

* ci: address the second coverage-shard review and leftover lane cleanup

- The cross-checkout blob rewrite spec builds roots and paths with join(),
  so it holds on Windows, where the rewrite prefix ends in a backslash.
- The failover runbook names the current coverage, build, consumer, and web
  snapshot checks instead of the former single-job names.
- node-24-build and node-24-consumers drop env variables that none of their
  gates read.
2026-11-20 13:03:57 +08:00
LegGasai 6a562053a8 Merge pull request #8883 from deepseek-harness/fix/composer-typed-path-order
fix(ui-conversation): keep hand-typed path references in typed order
2026-11-20 12:36:21 +08:00
creatixchu 4e4856598f Refresh the pi image limits session against master 2026-11-20 12:35:01 +08:00
creatixchu 286f2f3a20 Keep requestImageMaxBytes as the pi profile setting 2026-11-20 12:31:53 +08:00
zhc 99f8afd16f feat(ui-conversation): recall loaded prompts with ArrowUp and ArrowDown
Web 输入框不能用方向键调出刚发过的消息,修改或重发相似请求时只能重新输入。

候选菜单未处理按键、且光标位于草稿末尾时,不带修饰键的 ArrowUp 和 ArrowDown 按由新到旧的顺序,召回已加载的 Session 历史中用户发出的消息文本(user/message,source.kind 为 user)。召回直接读 Session 事件窗口,composer 不另存历史,刷新页面或切换会话后仍能召回。

- 只有空草稿才能开始浏览;只有草稿仍是上一次显示且未修改的消息时才能继续。任何编辑(包括撤销)都会结束浏览,已输入或改过的文字不会被替换。
- 每次切换都是一次普通的、可撤销的编辑;发送后撤销栈被清空时,会补上撤销基线。
- 按纯文本召回:引用 chip 以 mention 文本出现,quote 以 Markdown 出现;没有文字的消息和连续重复的消息会被跳过;命令、附件和发送失败的提交不召回。
- IME 组字、带修饰键的按键、命令提交或裁决进行中都不触发召回。

Closes #8360
2026-11-20 12:31:18 +08:00
creatixchu 2d5b444e0e Sync master into the pi image limits branch 2026-11-20 12:30:03 +08:00
Dudu-0223 2771604182 fix(extensions): 修复子代理 Client inspect 持续超时 (#8615)
* fix(extensions): route client inspect replies by session identity

* fix(extensions): preserve inspect reply wire identity in source mode
2026-11-20 04:24:19 +00:00
imccyu 40c607086c Merge pull request #8858 from deepseek-harness/perf/conversation-width-axis-restyle
perf(ui-conversation): stop restyling the transcript on every resize frame
2026-11-20 12:21:34 +08:00
Turtle c1286be3bf Merge pull request #8818 from deepseek-harness/turtle/prefer-rebase-rerere-639b61438d11
docs(agents): prefer rebase with rerere for PR branch refreshes
2026-11-20 12:17:56 +08:00
涂轶翔 2229ef90b3 Merge pull request #8889 from deepseek-harness/turtle/global-pycache-ignore-7178ab1c09f9
chore: ignore __pycache__ in every directory
2026-11-20 12:12:38 +08:00
imccyu 081855ab12 perf(web): keep sidebar resize signals out of unrelated subtrees
Keep slide distance off settled open Sidebar content and stop the Session panel docking threshold from propagating into transcript rows. Exercise the threshold in both directions with a measured, fixed 720px message column and a real moving panel. Refs #8856.
2026-11-20 12:10:31 +08:00
imccyu 0341b3b7ac perf(web): avoid synchronous layout reads during sidebar resizing
Paint a fixed tab-title fade, refresh split capacity from actual box changes instead of width-only React commits, and consume the sizes already delivered to the conversation header and width axis. Guard script-nested layout counts in the right Sidebar drag benchmark. Refs #8856.
2026-11-20 12:10:31 +08:00
imccyu aa8c72d1d2 test(benchmarks): gate transcript restyles while the right Sidebar is dragged
Move the right Sidebar drag diagnostic into the required serial browser
benchmark inventory. It budgets the elements Chromium restyles during a
drag that leaves the content width unchanged, as a dimensionless multiple
of the page's elements, and replays recorded before/after samples as its
negative control. Also type the registered-property entries in the
end-reserve style test.

Refs #8856
2026-11-20 12:10:31 +08:00
imccyu 330a13ba82 perf(ui-conversation): stop restyling the transcript on every resize frame
Register the Conversation width axis inputs and its continuously varying
derived lengths without inheritance, publish the content width and end
inset to descendants as computed lengths, and derive the Session panel's
docking step on the body as a registered 0px/1px length. A right Sidebar
drag no longer restyles the whole transcript when the resolved width is
unchanged.

Refs #8856
2026-11-20 12:10:31 +08:00
imccyu 0ee562045e ci: build once and fan web snapshots out across weighted shards (#8861)
* ci: build once and fan web snapshots out across weighted shards

* ci: stamp restored build output with the extraction time

Build-time mtimes shifted past the clock made HMR treat freshly loaded
lib/ modules as changed and reload a plugin context while it was still
loading (plugin-manager-mcp headless snapshot).

* ci(web): run the longest web snapshot files as round-robin test slices

* ci: address review on the build-once fan-out
2026-11-20 12:09:36 +08:00
Turtleandimccyu 477e646e1c docs(agents): require unset rerere.autoUpdate and translate zh note title
Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-20 11:59:49 +08:00
Turtleandimccyu 54f44f3681 docs(agents): prefer rebase with rerere for PR branch refreshes
Refs #8817

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-20 11:59:49 +08:00
brickmaker 7598e5d640 Merge pull request #8887 from deepseek-harness/turtle/check-vitepress-temp-ignore-562122df2baf
chore(website): ignore VitePress .vitepress/.temp directory
2026-11-20 11:57:23 +08:00
TurtleandTuyixiang c7dbc538c0 chore: ignore __pycache__ in every directory
Refs #8888

Co-authored-by: Tuyixiang <34904872+Tuyixiang@users.noreply.github.com>
2026-11-20 11:38:35 +08:00
creatixchu 184cf1d0cd test(cua): sync activity recordings with master input guidance 2026-11-20 11:38:29 +08:00
creatixchu f60793657c test(cua): mount the system prompt projection dependency 2026-11-20 11:37:24 +08:00
creatixchu 206819ccbf Merge master into feat/cua-recent-activity 2026-11-20 11:36:12 +08:00
Turtleandbrickmaker 61df0dbc59 chore(website): ignore VitePress .vitepress/.temp directory
Co-authored-by: brickmaker <21122249+brickmaker@users.noreply.github.com>
2026-11-20 11:32:53 +08:00
lsdsjy 973fb08ee4 feat(desktop): add Settings to the application menu (#8663)
* feat(desktop): add Settings to the application menu

* refactor(desktop): align settings menu shortcut handling with closeBinding
2026-11-20 11:28:01 +08:00
LegGasai b7b18abef7 fix(ui-conversation): keep hand-typed path references in typed order
Typing a path one character at a time, such as @src/index.ts, produced
@src/indexs.t. The "." counts as punctuation outside the reference until
the next character arrives. The entity transform then extended the
reference over ".t" after collapsing the selection to the reference's
previous end, so later characters landed before the moved text.

A transform registered ahead of the entity transforms now makes that
extension with splitText and mergeWithSibling, which keep the selection
beside the moved characters.
2026-11-20 11:02:53 +08:00
CreatixChu 63f7d5fa30 Merge pull request #8714 from deepseek-harness/creatixchu/cua-system-input
feat(cua): unify system input and macOS keyboard modifiers
2026-11-20 11:02:09 +08:00
creatixchu 6eb6625063 Merge master and align scoped CUA replays with system input 2026-11-20 10:43:24 +08:00
creatixchu 236147cfac Rename CUA system input and locale modules 2026-11-20 10:40:48 +08:00
LegGasai 9c60743a11 Merge pull request #8843 from deepseek-harness/turtle/base-branch-search-e0f5af0f6b55
feat(forge): use the shared menu search in the base branch pickers
2026-11-20 10:32:00 +08:00
b4e81dcd05 fix(web): keep the Session drop target above the narrow-window drawer
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 06:20:27 +08:00
01aff22399 test(liveshare): allow copy-only Session row drags on viewer pages
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 05:24:14 +08:00
2f9684765f test(web): satisfy type-aware lint in drag specs
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 04:56:38 +08:00
4c3fb32ff1 test(web): keep existing unknown casts unchanged in the sidebar chat spec
Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 04:44:10 +08:00
5a7589bf89 feat(web): open a dragged Session in the right sidebar
Drag a Session row from the Session list onto the drop target at the
window's right edge to open its Conversation in the on-screen Session's
right sidebar, where it accepts follow-up prompts. The tab is saved with
that Session's browser-local sidebar layout.

Refs #8873

Co-authored-by: liukx0205 <69756503+liukx0205@users.noreply.github.com>
Co-authored-by: Yifffan <133629972+Yifffan@users.noreply.github.com>
2026-11-20 04:33:40 +08:00
imccyu 10d5578ce3 Merge pull request #8857 from deepseek-harness/ci/css-selector-gate-v2
ci(css): reject costly unkeyed CSS selectors and retire existing ones
2026-11-20 02:34:03 +08:00
imccyu 2754e9fe8c ci(css): reject costly unkeyed CSS selectors and retire existing ones
Add verify-css-selectors to the hygiene gates. It rejects a subject
compound without a class, id, attribute or type key that matches through
:not(), :empty or :has(); a universal selector that names no class, id
or attribute anywhere; and :has() outside the subject compound. Chromium
evaluates such rules on every restyled element or invalidates whole
subtrees. Class-scoped forms such as '.card *' and '.list > :first-child'
are accepted, and the listed base stylesheets are exempt from the subject
rules.

Existing occurrences are recorded in scripts/css-selectors.baseline.json;
new ones fail and retired ones must be pruned. Rewrite existing selectors
where the matched elements stay the same, and document the rule in the
Web styling reference.
2026-11-20 01:59:10 +08:00
imccyu c6b8146b51 feat(ptc-runtime-node): default executionMode to persistent-in-memory with the scoped REPL 2026-11-20 01:58:55 +08:00
imccyu 0d36b3179e Merge pull request #8854 from deepseek-harness/test/ptc-explicit-execution-mode
test(ptc): name the Node PTC execution mode in tests and add scoped REPL counterparts
2026-11-20 01:58:51 +08:00
Ruilin Geng 86295eee18 Merge pull request #8815 from deepseek-harness/feat/dingtalk-plugin
feat(dingtalk): 新增钉钉插件并支持在插件页登录钉钉账号
2026-11-20 00:57:01 +08:00
imccyu 9fae65aeea test(ptc): name the Node PTC execution mode in tests and add scoped REPL counterparts 2026-11-20 00:27:32 +08:00
imccyuandimccyu e25df02c51 refactor(session): prepare Session validation and header building for SessionData (#8676)
* refactor(session): move Session log validation into a module

Move header, seed-event envelope, and inherited-cut validation out of the
Session constructor into validation.ts without changing check order or error
text. Export needsInheritedSeedMarker for the fork marker rule the
constructor applies.

* feat(session): validate a Session log without constructing a Session

validateSessionLog composes the header, seed-event, surface, and
inherited-cut checks of Session construction in the same order. Omitting
eventState matches Session.create; an event state matches
Session.fromRestore.

* refactor: validate stored Session logs with validateSessionLog

The chat importer, session-query readSession, the format catalog, and JSONL
generation verification constructed a discarded Session only to validate a
log. They now call validateSessionLog with the same mode, inherited count,
and message interpreters.

* refactor(session): extract buildSessionHeader

Move new-Session header construction out of SessionStore.prepare into the
exported buildSessionHeader and name its input SessionHeaderMeta.
Automatic ids and duplicate checks stay in prepare.

* refactor(session): move header and fork error helpers out of the session index

Move buildSessionHeader into validation.ts and SessionForkError with
SessionForkErrorCode into fork.ts so later modules can import them without
importing index.ts. index.ts re-exports both under the same names. Complete
the JSDoc of the exported validation helpers.

* refactor(session): extract checkSessionLog from the Session constructor

Move header validation, seed acceptance with surface admission, and the inherited-cut check into checkSessionLog in validation.ts, keeping the constructor's order and errors. The Session constructor and validateSessionLog call it.

* test(session): cover Session log validation and construction helpers

Cover validateSessionLog against Session.create and Session.fromRestore in
every event state, buildSessionHeader, needsInheritedSeedMarker,
Session.readEvents range semantics, and the fork subpath export of
SessionForkError.

* docs(session): document Session log validation

Document validateSessionLog, buildSessionHeader, needsInheritedSeedMarker,
Session.readEvents, and the SessionForkError subpath export in the package
README. Align the Session and CreateSessionOptions type blocks, add
SessionHeaderMeta, regenerate the Cordis, event graph, and persistence
catalogs, and update the plugin entry, unknown-cast, and package dependency
registries.

---------

Co-authored-by: imccyu <cc.yu@deepseek.com>
2026-11-20 00:11:27 +08:00
gengruilin 0260239371 test(dingtalk): load the session projection registry in the test host
Master's #6941 makes the system prompt plugin require the session projection registry and added it to the Feishu, WeCom, Tencent Meeting and CLI account test hosts; this package exists only on this branch.
2026-11-19 23:38:23 +08:00
imccyu 7e5d8f789f ci: fetch Ubuntu archives over HTTPS and install Playwright beside the build (#8850) 2026-11-19 23:37:59 +08:00
gengruilin 9d121f8bdd test(dingtalk): refresh the dingtalk-skills fixture for the section-based system prompt
Master's #6941 records system instructions as sections and refreshed every fixture on master; this fixture exists only on this branch. Refreshed with test:snapshot:refresh.
2026-11-19 23:02:41 +08:00
gengruilin 76b3d7f931 Merge remote-tracking branch 'origin/master' into feat/dingtalk-plugin 2026-11-19 23:02:35 +08:00
imccyu b5e0f319da ci: fetch Ubuntu archives over HTTPS and install Playwright beside the build 2026-11-19 22:49:33 +08:00
EricMoin a4df6e5dbc Merge pull request #7675 from deepseek-harness/feat/request-pairing
feat(web): add pairing and approval for remote connection
2026-11-19 22:15:02 +08:00
creatixchu 25927c6fdb Publish the final outcome after post-execute policy settles 2026-11-19 21:46:15 +08:00
creatixchu 05bdc17ca4 Record real PostToolUse rejection and verify each reset failure combination 2026-11-19 21:44:05 +08:00
creatixchu 53dc377548 Keep unregistered tool results on their synchronous publication path 2026-11-19 21:42:29 +08:00
creatixchu 99ecefea62 Await call-scoped failure cleanup before publishing rejected tool results 2026-11-19 21:41:17 +08:00
creatixchu f8334a2caf Merge master and refresh the CUA persistence acknowledgements 2026-11-19 21:35:26 +08:00
EricMoin aab288650b fix(web): preserve reviewed pairing behavior after rebase 2026-11-19 21:27:14 +08:00
EricMoin f4f10e05f9 fix(web): hide stale pairing requests on failure
Keep the retry action available until a successful read supplies a current approval list. A decision that settles during a failed read cannot make cached requests visible again.
2026-11-19 21:25:59 +08:00
EricMoin dc3a25f0ef fix(web): remove the empty pairing request badge 2026-11-19 21:25:59 +08:00
EricMoin 39a9b14a47 fix(web): match pairing actions to standard small buttons 2026-11-19 21:25:59 +08:00
EricMoin 634b23ce56 test(liveshare): settle relay refusal before admitting owner turns 2026-11-19 21:25:58 +08:00
EricMoin 67baa380a6 test(web): isolate rate-limit pairing fixtures 2026-11-19 21:25:58 +08:00
EricMoin 2a799fe712 fix(web): clarify pairing recovery feedback
Keep the primary action readable while pairing is busy, and distinguish
rate limits from connection failures during recovery. After the retry
budget is exhausted, tell users to wait before requesting again.

(cherry picked from commit 3c8ef5f6cb6f9e76d0a22614c608d59107bf6bf0)
2026-11-19 21:25:58 +08:00
EricMoin b331a96b18 fix(web): align anonymous sign-in methods
Give token entry and device pairing matching headings and descriptions
so the two choices are easier to scan. Keep sign-in guidance visible
when token validation fails.
2026-11-19 21:25:58 +08:00
EricMoin 6f10f39ec3 fix(web): clarify anonymous sign-in guidance 2026-11-19 21:25:58 +08:00
EricMoin 13d2505276 test(web): wait for replacement pairing code before snapshots 2026-11-19 21:25:58 +08:00
EricMoin 5313ad4bfa feat(remote-connection): pair browsers through the shared root login page 2026-11-19 21:25:58 +08:00
EricMoin 971cda8344 fix(remote-connection): retain reviewed fixes from previous merges 2026-11-19 21:25:02 +08:00
EricMoin b5a8cb26ba test(web): wait for model settings before measuring headings 2026-11-19 21:24:43 +08:00
EricMoin 41713a0143 docs: refresh remote connection config source links 2026-11-19 21:24:42 +08:00
EricMoin aba9c78d80 fix(web): stretch copy link on narrow remote connection cards 2026-11-19 21:24:42 +08:00
EricMoin d5620f9c2e fix(web): use standard small remote connection controls 2026-11-19 21:24:42 +08:00
EricMoin 871b79ca2a test(web): order clipboard fixture after connection reset 2026-11-19 21:24:42 +08:00
EricMoin 8810f48065 test(web): preserve settings heading spacing after upstream layout changes 2026-11-19 21:24:42 +08:00
EricMoin 7eef744ed5 test(remote-connection): cover copying before deployment loads 2026-11-19 21:24:42 +08:00
EricMoin 41321f8c0d fix(web): guide Token entry with the current Host address 2026-11-19 21:24:42 +08:00
EricMoin c77a2dba2d fix(web): clear copied credential warnings when leaving settings 2026-11-19 21:24:42 +08:00
EricMoin fc1a735971 fix(web): retain the QR cancellation action 2026-11-19 21:24:42 +08:00
EricMoin 8a1dee1196 fix(web): align remote connection controls and typography 2026-11-19 21:24:42 +08:00
EricMoin d76a072cd3 fix(web): preserve address copying without credentials 2026-11-19 21:24:42 +08:00
EricMoin 6dcd480f42 fix(web): explain unavailable remote addresses 2026-11-19 21:24:42 +08:00
EricMoin f575fb30c0 fix(web): reorder remote connection panel
Help users identify the destination before choosing a sign-in method.
2026-11-19 21:24:42 +08:00
EricMoin 32f024ae7f fix(web): widen settings navigation
(cherry picked from commit f323d98ad2fbe485440dd4ffd8fddc54092baf8a)
2026-11-19 21:24:42 +08:00
EricMoin ba9a8fa333 fix(web): align agent preset headings
Use the Models heading hierarchy in Agent preset settings so shared
settings sections use consistent typography.
2026-11-19 21:24:42 +08:00
EricMoin a5024f905e fix(remote-connection): align package release version 2026-11-19 21:24:42 +08:00
EricMoin d49522e8ff chore: refresh merged client slot catalog 2026-11-19 21:24:42 +08:00
EricMoin 3308f3c81e feat(remote-connection): add settings extension slot 2026-11-19 21:24:42 +08:00
EricMoin 8007167877 fix(remote-connection): retain sign-in options after QR failures 2026-11-19 21:24:42 +08:00
EricMoin 9788c9b75d refactor(remote-connection): exchange QR credentials at the root login page 2026-11-19 21:24:42 +08:00
EricMoin 98c294a0ab fix(remote-connection): shorten QR and link action labels 2026-11-19 21:24:42 +08:00
EricMoin cd168a0c12 test(web): include Remote connection in settings snapshots 2026-11-19 21:24:42 +08:00
EricMoin c771bd736e test(remote-connection): isolate authentication web events 2026-11-19 21:24:42 +08:00
EricMoin 95dff460b0 fix(remote-connection): cover cancelled login responses and honor theme rules 2026-11-19 21:24:42 +08:00
EricMoin 1d6bec2575 fix(remote-connection): support Preview credential encoding 2026-11-19 21:24:42 +08:00
EricMoin 3059225fd9 feat(remote-connection): own browser authentication through providers 2026-11-19 21:24:42 +08:00
creatixchu c452b98242 Drop same-batch CUA reminder coalescing from this change 2026-11-19 21:20:45 +08:00
Turtle 25b3f15c9b feat(forge): use the shared menu search in the base branch pickers 2026-11-19 21:20:00 +08:00
EricMoin 608960ebfc fix(web): add install icon for PWA (#8248)
* fix(web): round PWA install icons

Closes #8247

* fix(web): harden install icon generation

Reject missing SVG definitions and bind clipping to the tile.
Cover rounded geometry and keep the existing icon notes current.
2026-11-19 21:13:37 +08:00
涂轶翔 101f26de4e fix(system-prompt): 保留 section API 的增量系统指令 (#6941)
* feat(system-prompt): admit section updates incrementally

* docs(system-prompt): accept retirement restart gap

* test(system-prompt): cover retirement and reentry before admission

* test(system-prompt): align rebase fixtures and persistence history

* fix: align section prompt consumers and CI fixtures

* test: pin credentials for section snapshot fixtures

* test: align remaining snapshots with section admission

* test: preserve section metadata in Web and PowerShell replays

* refactor(system-prompt): retire sections through Cordis cleanup

* chore: refresh section admission history after rebase

* fix(system-prompt): advance admission head after compaction

* fix(system-prompt): trim sections before admission hashing

* docs: move system upgrade guides to current version

* docs: add system message contribution cookbook

* perf(system-prompt): avoid indexing history for admission

* refactor(system-prompt): derive admission from logged sections

* test(system-prompt): update lifecycle and compaction consumers

* test(system-prompt): refresh CLI section event expectations

* test(system-prompt): refresh question composer section metadata

* feat(system-prompt): resolve same-name sections by scope

* refactor(persona): use ordinary section registrations

* refactor(system-prompt): clarify assembly and related control flow

* test(system-prompt): reconcile rebased section snapshots

* test(python): use current system text helper after rebase

* test(system-prompt): refresh CLI expected section blocks

* test(system-prompt): reconcile latest master integration

* test(agent-loop): seed tools before deferred addition assertion

* refactor(compaction): replace system heads when compacting prefixes

* refactor(system-prompt): separate source text and notice attribution

* fix(system-prompt): preserve legacy instructions in compaction snapshots

* refactor(compaction): build system snapshots while reading the summary prefix

* refactor(compaction): rebuild current system instructions

* refactor(system-prompt): defer compaction rebuild to admission

* refactor(system-prompt): remove redundant fixtures and setup

* fix(plan-mode): announce committed user transitions

* docs(system-prompt): reconcile section lifecycle and compaction design

* refactor(system-prompt): consolidate projection version increments

* fix(system-prompt): reconcile master integration and replay fixtures

* docs(system-prompt): align upgrade guide with current release

* refactor(system-prompt): make admission operations explicit

* fix(system-prompt): reconcile master API and release changes

* docs(system-prompt): regenerate catalogs after master refresh

* refactor(llm-pi-ai): delegate text rendering to pi-ai

* fix(llm-pi-ai): preserve blank lines between system text parts

* refactor(system-prompt): remove redundant retirement metadata

* refactor(system-prompt): own admission and use canonical surface targets

* refactor(system-prompt): compare captured sections at commitment

Assembly fixes section text and lifecycle; PromptAssembly.systemUpdates() compares them with the committed projection when the loop commits. This replaces SystemPrompt.admit(), needsRebuild() and isCurrent(), the SystemAdmission export, the loop's reassembly after compaction, and SessionSurface.systemHeadResetSeq. The projection records a pending rebuild as a boolean that an attributed reset clears.

After a compaction inside a step, the rebuilt head uses the sections captured for that step; later source changes arrive as ordinary updates at the next step.

* test: await the session read fixture and type a matcher for lint

* test(tool-executor-ptc): describe same-name section override on executor replacement

Duplicate section names no longer reject a scoped executor; the earlier registration is overridden and returns as an ordinary update when the executor leaves.

* docs(upgrade-guide): move system-prompt integrations to v0.2.2-rc.3

The root version on master is 0.2.2-rc.3; verify-upgrade-guides rejects a guide added under an earlier version directory.

* refactor(system-prompt): rebuild over system messages without sections

A system message without source.sections now marks rebuilding pending, like a compaction summary. The next model attempt replaces the head with current sections and clears later system messages. This removes the separate legacy flag and its appended whole-prompt replacement and notice.

Sessions written by earlier releases, migrated logs, and imported DeepSeek conversations take the same path, so the importer and its tests return to their master versions.

* test(web): refresh the imported-conversation recording and drop a stray bytecode file

The Web recording for a resumed DeepSeek import was recorded while the prompt was appended after the imported history; the head is replaced again, as on master. The .pyc under the macOS signing skill was staged by accident in an earlier merge.

* refactor(session): scan system nodes on read

surface.systemNodes is read only when a system rebuild is written. Scanning the current surface nodes on each read restores the surface fold's plan types and state to their master definitions, which no longer carry the system message.

* refactor(session): rename SystemSurfaceNode.hasContent to isEmpty

The flag reports that the logged content array has no blocks. isEmpty matches the documented "empty head" wording and covers a head that was written empty without ever being cleared.

* refactor(llm): join system text through extractTextContent

extractTextContent gains a trim option that trims each text block and omits blocks left empty. The DeepSeek serializer, the pi-ai converter, and the prompt inspector use it with a blank-line separator in place of three hand-written joins.

The pi-ai converter now trims system and developer text like the other two, so whitespace-only blocks are omitted there as well.

* test(snapshots): refresh the PowerShell and cordis-inspect recordings

The two PowerShell scenarios still held the initial system message as one unattributed block; replay now writes one block per section with its attribution. The cordis-inspect-jsdoc recording embeds the API catalog, which names SystemSurfaceNode.isEmpty since the rename.

* test(plan-mode,harness-dev-context): cover a rejected pre-step and a repeated legacy prompt

A rejected pre-step must leave a queued plan-mode switch pending and unannounced until the next accepted step. A second unattributed system message with the same legacy paragraphs must keep the admitted paragraphs.

* test(web): refresh Web recordings for section-attributed system messages

Twenty-seven Web recordings still held the initial system message as one unattributed block. Replay now writes one text block per section with its attribution; twenty-six recordings differ only in that line.

plan-review also records the plan-mode switch notice before the first prompt and appends a plan:status update on exit in place of a head replacement and a series header, so its expanded golden gains the notice row.

The Creator persona test joins the system text blocks with blank lines, as the adapters do, before matching the persona line.

* refactor(system-prompt): require the retry argument of systemUpdates

The agent loop passes it on every attempt. A custom loop that omitted it on a retry received a full comparison in place of the pending rebuild, with no diagnostic; the type now makes each caller state which attempt it is.

* docs(upgrade-guide): move the system prompt integrations guide to v0.2.2-rc.5

The root version is 0.2.2-rc.5 after the master merge, and verify-upgrade-guides rejects a guide added under an earlier version directory.

* test(web): refresh the mention path presence recording for section-attributed system messages

* test: align two specs that master left failing

The DeepSeek settings spec waited for a saved notice carrying the provider label from before the rename to DeepSeek API. The Windows packaging workflow spec seeded one of the two helpers that the Stage workflow helpers step copies.

* chore: remove a Python cache file committed by mistake
2026-11-19 21:11:38 +08:00
gengruilin 99b033e0a8 test(dingtalk): add the subagent concurrency sentence to the dingtalk-skills system prompt
Master's #8809 appends "The concurrency limit of all the subagents is 8." to the system prompt and updated every fixture on master; this fixture exists only on this branch.
2026-11-19 20:10:28 +08:00
gengruilin 2f4de9acdf Merge remote-tracking branch 'origin/master' into feat/dingtalk-plugin 2026-11-19 20:04:09 +08:00
sjw1231 cb820dd34d docs: list PTC among the modes that provide Plugin Manager 2026-11-19 19:51:32 +08:00
sjw1231 e36f37e5e4 test(sdk): drop the PTC tool parity exceptions that the aligned presets retire 2026-11-19 19:51:31 +08:00
sjw1231 3b663197a8 feat(preset): enable plugin management in the Desktop PTC preset
The Desktop ptc preset now enables plugin_manager under the same condition
as the standard preset: only when the Host provides an editable profile. PTC
sessions then manage plugins through run_code bindings, as SDK PTC sessions
already do, and the preset guide no longer says plugin management is off.
2026-11-19 18:40:12 +08:00
sjw1231 00b1ac207d fix(sdk): disable the workflow tool in the PTC executor overlay
The PTC overlay now disables the workflow-ptc engine and tool-workflow rows,
as the Desktop ptc agent preset does: run_code already orchestrates tool calls
in code, so SDK and headless PTC runs no longer list workflow, its prompt
section, or its run_code binding. Native execution keeps the workflow tool.
2026-11-19 18:39:52 +08:00
LegGasaiandimccyu 0a37a1b89a fix(web): keep conversation file references on the same file after a directory move (#8830)
* fix(workspace-path): address opened files by absolute path

`fileAddressFor` rewrote an absolute path inside the Session's directory
into a relative address. A Sidebar tab opened that way named another file,
or none, once the Session's directory moved and the page reloaded.

The address now carries the absolute path whenever one is known: an
absolute path is kept and a relative path is joined to the directory the
caller supplies. A relative path stays relative only while that directory
is unknown.

* fix(ui-chat): resolve relative images from the Session's current directory

A relative Markdown image used the Session header directory, so an image
written while the Session worked in a worktree did not load. It now uses
the directory the Session works in, the base relative file links already
use.

* fix(ui-reference): write picked and dropped files as absolute mentions

A file or folder picked from the `@` list was sent as a path relative to
the Session's directory, and a Desktop drop inside that directory was
rewritten to a relative path. After the directory moved, the sent message
named another file or none.

A settled pick now joins the listed path to the Session's current
directory, and a dropped or pasted file keeps the path the shell reports.
Drill text stays relative. Hand-typed relative mentions are unchanged.

* fix(deliverables): ask for absolute Markdown link and image targets

The file-reference guidance allowed targets relative to the working
directory. A relative target in an earlier reply named another file once
the Session's directory moved, and a model working in a worktree sometimes
wrote targets relative to the original project.

The guidance now asks for absolute targets. The expected system prompts
that assemble this section carry the new wording.

* docs(notes): record how conversation file references survive directory moves

* docs(notes): cite the earlier per-message implementation and its revert

* test(snapshots): carry the absolute-target guidance into the session-send-message prompt

* test(snapshots): add the subagent concurrency sentence to the timeline-follow-chat prompt

The scenario's expected system prompt on master predates the subagent
guidance sentence that states the shared concurrency limit, so its replay
fails on master and on every branch that merges it.

* docs(ui-conversation): remove the stale sentence on relative dropped paths

---------

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-19 18:30:41 +08:00
_Kerman cec36345f2 Merge pull request #8408 from deepseek-harness/xtr/cua-object-api-guidance
refactor(cua): remove raw protocol details from model guidance
2026-11-19 18:20:29 +08:00
creatixchu bfe2b32961 Record explicit release within a single CUA tool batch 2026-11-19 18:11:16 +08:00
creatixchu fe0f9960e8 Supersede undelivered CUA notices on every held-state query 2026-11-19 18:07:18 +08:00
winewill edf37e8445 Merge pull request #8175 from deepseek-harness/feat/windows-runner-boot
feat(desktop): 支持 Windows 标准账户登录前启动打包 runner
2026-11-19 18:06:27 +08:00
creatixchu 034143c24a Reproduce obsolete held reminders from a single tool batch 2026-11-19 18:06:02 +08:00
Magolor 1e2827d151 feat(timeline): add a Follow chat language option, a clickable progress strip, and a labeled session discussion history (#8630)
* feat(timeline): add a Follow chat language option

Follow chat sends no language rule in the planning guidance or in report
requests, so the agent chooses the language from the conversation. Text
that Timeline writes without the model keeps the app language.

* fix(timeline): keep the compact report limit when following the chat

Without a required language, a report line written mostly in Chinese or
Japanese characters uses the 160-character limit that the report rules
state. The README states that a higher report level sees only the reports
it combines. A recorded headless scenario covers the planning prompt
without a language rule.

* feat(timeline): toggle the task tree from the whole progress strip

A click anywhere on the strip above the message box opens or closes the
task tree. The toggle button stays for keyboard access and to show the
open state. Hover and press feedback covers the whole strip; the draft
removal button remains a separate action.

* fix(timeline): keep progress strip hover rules inside the hover media query

Hover selectors apply only where the primary input can hover. Press
feedback stays available on every input type.

* feat(timeline): label the session discussion history and list it newest first

The history under the Task Tree and Reports tabs covers every task tree
and report in the session. Its title now states that scope, a thicker
separator sets it apart from the content above, and its entries are
ordered by creation time, newest first.
2026-11-19 10:05:52 +00:00
Dudu-0223 bd77229a9c Merge pull request #8241 from deepseek-harness/feat/session-control-message
feat(session): 支持跨 Session 消息
2026-11-19 18:02:58 +08:00
creatixchu d700af6b52 Observe actual native disposal through its cleanup registration 2026-11-19 17:53:53 +08:00
Yudong Han 90c0f1aa4c Merge pull request #8490 from deepseek-harness/turtle/rename-deepseek-api-ca2c0fb1df3e
feat(llm): label the API-key DeepSeek provider as DeepSeek API
2026-11-19 17:53:40 +08:00
creatixchu c7d2a56ec5 Record cancellation timing and verify cleanup across turns 2026-11-19 17:51:10 +08:00
creatixchu 9f776b7e31 Let Agent idle complete independently of background CUA release 2026-11-19 17:49:05 +08:00
gengruilin 6dc8c48f5b fix(dingtalk): delete the other releases once per load
Two processes of one profile can run different versions of the plugin, one
started before a plugin update and one after it. Because the cleanup ran
after every installation, each process deleted the other's dws and skills
at every check and downloaded its own again. The cleanup now runs once, the
first time the release is in place, as the upstream-skills Service does;
the README states the remaining case under Known Limitations.

Also drop the path alias of the removed ui-dingtalk package and align zod
with the version the other packages declare, which removes the separate
zod@4.4.3 lockfile entry.
2026-11-19 17:47:33 +08:00
Dudu-0223 ff8654f24d fix(session): shorten cross-session message instructions 2026-11-19 17:41:56 +08:00
acehinnnqru ad27c9e245 feat(client): add workspace picker search (#8394)
* feat(client): add workspace picker search

* fix(client): preserve searchable menu keyboard ownership

* test(client): cover searchable menu behavior

* test(web): fix workspace picker search locator

* fix(client): restore collapsed sidebar search styles

* fix(client): simplify workspace picker search field

* fix(client): keep workspace picker search scoped to the menu

* fix(client): preserve touch focus when opening workspace picker

* test(web): stabilize workspace picker layout assertions

* test: isolate workspace picker coverage and exercise submenu navigation

* docs(client): clarify searchable menu autofocus precedence

* fix(client): match workspace picker searches by path

* fix(client): align workspace picker empty-state row height

* fix(client): refine workspace picker search and keyboard navigation

* fix(client): unify menu navigation and defer workspace search indexing

* fix(client): center menu search header vertically

* fix(client): balance workspace picker search styling
2026-11-19 17:35:28 +08:00
LegGasai 19cd62a86b feat(ui-settings-models): edit reasoning levels of catalog provider models
The Models page showed the per-model reasoning-level control only on
hand-declared pi-ai routes. The adapter resolves a model entry's
`reasoningEfforts` the same way on catalog routes, so the editor now offers
the control on every pi-ai route and checks the declarations before saving.
With the switch off the field is absent and a catalog model keeps the
installed catalog's levels.
2026-11-19 17:30:27 +08:00
LegGasai b87a481bcf Merge pull request #8323 from deepseek-harness/fix/forge-github-status-batches
fix(forge): bound status queries, share polls, and drop repeated reads
2026-11-19 17:23:51 +08:00
Dudu-0223 29a3607a78 Merge master into feat/session-control-message 2026-11-19 17:13:59 +08:00
Turtle 6e2fa257f0 Merge pull request #8820 from deepseek-harness/turtle/core-guidelines-scope/dsh-core-guidelines-83ad6c5e5a01
docs: state the status and scope of DSH Core Guidelines
2026-11-19 17:12:15 +08:00
Yudong Han f868dc2718 Merge pull request #8461 from deepseek-harness/feat/content-preview-values
feat(client): preview compaction summaries in the sidebar
2026-11-19 17:09:01 +08:00
_Kerman 62db163670 fix(cua): provide object API setup for per-call PTC 2026-11-19 17:08:58 +08:00
_Kerman f26a1bb054 fix(cua): clarify the program scope in tool instructions 2026-11-19 17:08:58 +08:00
_Kerman 4826e4fbcc test(cua-mcp): refresh program guidance expectations 2026-11-19 17:08:58 +08:00
_Kerman 4ae35808d1 refactor(cua): remove redundant raw protocol instructions 2026-11-19 17:08:58 +08:00
_Kerman d086c3ed44 refactor(cua): scope raw protocol guidance to raw callers 2026-11-19 17:08:58 +08:00
Dudu-0223 7324b27419 fix(session): clarify explicit message requests and delivery limits 2026-11-19 17:07:08 +08:00
Dudu-0223 d72d80bea7 fix(subagent): 恢复共享并发上限和容量(#8698) (#8809)
* fix(subagent): restore shared concurrency guidance from #8698

Restore the change removed when master was rolled back.

Cherry-picked from 014aa1659bcd0ba3cf5d2b4c096773f01f56ec50.

* refactor(ui-tool): clarify subagent member parsing
2026-11-19 08:58:42 +00:00
Turtle 2a807b4a3b docs: align business-domain placement and tighten scope wording 2026-11-19 16:55:26 +08:00
yudshj 6329d3ae52 Cover compaction summary content, fallback and tab title 2026-11-19 16:51:52 +08:00
creatixchu 651af2b3b5 test(cua): refresh activity notices for the ten-second default 2026-11-19 16:48:14 +08:00
yudshj 8256284aca Merge remote-tracking branch 'origin/master' into rewrite/pr8461-master
# Conflicts:
#	packages/client/ui-chat/README.i18n.yaml
2026-11-19 16:47:54 +08:00
creatixchu 30c5b14a1c feat(cua): shorten default macOS activity lookback to ten seconds 2026-11-19 16:47:38 +08:00
LegGasai a35ced7385 Merge pull request #8609 from deepseek-harness/worktree/session-panel-stay-pinned-128657
feat(session-panel): dock beside the transcript at narrower widths and reorder sections
2026-11-19 16:46:48 +08:00
Turtle 498b681a09 docs: state the status and scope of DSH Core Guidelines 2026-11-19 16:40:57 +08:00
yudshj 1a3d9387f3 Record the recovery policy for window-local sidebar tabs 2026-11-19 16:40:02 +08:00
Dudu-0223 c687affe65 chore(session-query): remove trailing blank line from observation test (#8814) 2026-11-19 08:39:12 +00:00
yudshj ce5bc3df56 Retain transient content across sessions and close its tabs on reload 2026-11-19 16:38:47 +08:00
Turtle 4d4e0b6be1 Merge pull request #8767 from deepseek-harness/turtle/dsh-core-guidelines-83ad6c5e5a01
docs: add DSH Core Guidelines
2026-11-19 16:35:34 +08:00
Dudu-0223 4ae3ccffba fix(team): 明确任务写入范围与 claim 诊断 (#8709)
* fix(team): clarify task scopes and claim diagnostics

* docs(team): shorten edit write scope guidance

* test(team): cover write scope edits through the task tool
2026-11-19 16:09:51 +08:00
creatixchu 6d652b3c77 Merge current master and refresh the CI merge baseline 2026-11-19 16:09:10 +08:00
yudshj ed08ff8364 Open typed preview content in the sidebar or a floating panel 2026-11-19 16:07:39 +08:00
LegGasai 5a3e2ccb57 Merge remote-tracking branch 'origin/master' into worktree/session-panel-stay-pinned-128657 2026-11-19 16:05:24 +08:00
LegGasai 0750436cb4 feat(sdk): report why a session agent was disposed (#8738)
* feat(sdk): report why a session agent was disposed

A request for a session whose agent left the registry now states whether the
whole runtime is shutting down, the SDK server is shutting down, or only the
agent loop was unloaded. During runtime shutdown it names the last process
event observed before teardown; for an agent-loop unload it gives the time and
the plugin whose unload began first. The liveness check reads the registry as
optional, so both stages of root disposal report the same failure.

Refs #8737

* fix(sdk): keep the runtime observation out of the plugin entry exports

The static gates reject a new read of the Cordis root context, a value export
from a function plugin entry, and new assertions to unknown. The plugin entry
now passes the server an observation built from the root fiber it already
holds, the helper lives in the internal process-events module, and the new
tests complete the handshake instead of casting the server.

Refs #8737

* fix(sdk): keep the process-event record from throwing and state the unload origin as an observation

A rejection value without a string form made the failure text throw inside a
prepended listener, which would end the dispatch before the listener that owns
the event. The text now falls back to a fixed marker. The plugin named for an
agent-loop unload is the first one unloading at that time, which overlapping
unloads can make unrelated, so the message and README say that.

Refs #8737

* feat(python-sdk): log the runtime's stderr lines as they arrive

The runtime writes its fatal report, including the stack of an unhandled
rejection that ends the process, to its own stderr. The SDK kept those lines
in memory and attached them only to initialization, timeout, and transport
failures, so a host saw none of it for an ordinary JSON-RPC error. Each line
now also goes to the Python logger deepseek_harness.runtime at INFO.

Refs #8737
2026-11-19 07:59:52 +00:00
yudshj 34897717d4 Limit sidebar preview changes to compaction summaries 2026-11-19 15:59:00 +08:00
creatixchu bfe4c4e0b8 test(cua): use the renamed system input schema in action discovery 2026-11-19 15:51:52 +08:00
creatixchu b3d5737b49 Merge master into system input support 2026-11-19 15:47:48 +08:00
creatixchu 32f6951065 Verify cleanup reporting after Windows helper lease failure 2026-11-19 15:47:11 +08:00
creatixchu 129e7f6ceb Release held input when tool middleware throws synchronously 2026-11-19 15:45:07 +08:00
creatixchu e5ee75a1eb Record capability-specific reminders and cover cleanup error combinations 2026-11-19 15:42:52 +08:00
creatixchu 34f4901dc7 Exercise CUA holds at the Windows keyboard scope 2026-11-19 15:40:35 +08:00
creatixchu 94a8070bff Merge master and verify Windows input ownership and helper teardown 2026-11-19 15:39:04 +08:00
creatixchu 06e9d9c1f5 Give each MCP maintenance fixture its own cancellation signal 2026-11-19 15:34:24 +08:00
creatixchu a09a0e9979 Track Windows CUA holds and settle cancelled responses before reset 2026-11-19 15:33:01 +08:00
winewill 6fcc447c7f Merge pull request #7970 from deepseek-harness/fix/windows-uninstall-registry
fix(desktop): clean Windows registrations and report uninstall failures
2026-11-19 15:30:11 +08:00
LegGasai 4f611e1cfa test(forge-panel): measure drag positions after the collapsed-lines strip left
The hover plus case measured where to drag in notes.txt while README.md
above it still drew the strip for the unchanged lines after its last
hunk. The strip leaves once the file's text was read for highlighting,
which moves the rows below it up by 26 pixels. When it left between the
press and the release, the drag crossed one more row and opened a
comment on L3-5 in place of L3-4. The case now waits for the strip to
leave before it measures.

The race is in the test on master too: with master's forge sources the
case failed 1 of 15 runs alone, and the strip left 60 to 357 ms before
the drag began.
2026-11-19 15:26:38 +08:00
imccyu 99e2d584e5 perf(web): avoid whole-document style recalculation in long histories (#8791)
Scope the empty reasoning-wrapper rule to a `.reasoning` class so Chromium
no longer tests a class-less `:empty:not([class])` subject against every
restyled element while streaming. Split the files navigator cover rule so
`:has()` only sets a custom property on the row, which keeps unrelated
scrolls such as the Chat turn rail from restyling the whole document.

Refs #8790
2026-11-19 15:19:36 +08:00
LegGasai 43f699290d Merge pull request #8770 from deepseek-harness/docs/pr-description-module-dependencies
docs(skills): add module responsibilities and dependencies to PR descriptions
2026-11-19 15:10:34 +08:00
imccyu 7c30b2b75e perf(web): avoid whole-document style recalculation in long histories
Scope the empty reasoning-wrapper rule to a `.reasoning` class so Chromium
no longer tests a class-less `:empty:not([class])` subject against every
restyled element while streaming. Split the files navigator cover rule so
`:has()` only sets a custom property on the row, which keeps unrelated
scrolls such as the Chat turn rail from restyling the whole document.

Refs #8790
2026-11-19 15:02:14 +08:00
gengruilin 823af7a229 chore(dingtalk): align the package version with 0.2.2-rc.5 2026-11-19 14:54:01 +08:00
gengruilin adb7c7d3f4 Merge remote-tracking branch 'origin/master' into feat/dingtalk-plugin 2026-11-19 14:53:34 +08:00
winewill 396593b9fd Revert network home expansion and retain uninstall diagnostics 2026-11-19 14:44:58 +08:00
Ruilin Geng 8659ee9956 Merge pull request #6531 from deepseek-harness/feat/tencent-meeting-plugin
feat(tencent-meeting): 新增腾讯会议插件并支持在插件页登录账号
2026-11-19 14:37:09 +08:00
winewill 25c10e7fd1 Handle network uninstall home paths and reap timed-out fixtures 2026-11-19 14:17:59 +08:00
Jiawei Song e1f2ffc469 Merge pull request #8772 from deepseek-harness/fix/sdk-dsh-doc-parity
fix(skills): 在 SDK profile 和 Desktop PTC preset 中列出 dsh-doc
2026-11-19 13:54:58 +08:00
LegGasai 9d11b1d89c Merge remote-tracking branch 'origin/master' into feat/forge-status-tiers 2026-11-19 13:54:38 +08:00
gengruilin ede4efaca6 docs(connector): drop the signed-in sentence from the Tencent Meeting and Feishu previews
The account card in the English and Chinese previews of both connectors no longer names an example user; it keeps the sentence that tells the user to ask the agent, as the previews of the other connectors do. Feishu is already on master, so its two files change here.
2026-11-19 13:54:36 +08:00
LegGasai 336a33bd58 test(forge-github): give the hanging gh query test a deadline a loaded machine meets
The test ran its queries under a 1-second deadline and required the log
line of the gh run that hangs. Beside the other specs of the four forge
packages, that run was ended before it logged its query. The deadline
is now 5 seconds, and the test requires only that the query after the
hanging one is sent once.
2026-11-19 13:54:29 +08:00
gengruilin 2187dbe3e6 chore(tencent-meeting): align the package version with 0.2.2-rc.5 2026-11-19 13:54:05 +08:00
gengruilin 52adb67290 Merge remote-tracking branch 'origin/master' into feat/tencent-meeting-plugin 2026-11-19 13:53:38 +08:00
sjw1231 5a2aec4c90 test(python-runtime): share the SEA prelude helpers for the VFS stats spec 2026-11-19 13:43:15 +08:00
yudshj 45e873da0b Keep compaction summary previews in Chat 2026-11-19 13:37:41 +08:00
sjw1231 4fbf99cc01 fix(python-runtime): serve BigInt stats from the SEA virtual filesystem
pkg's /snapshot VFS returned number-valued stats even for { bigint: true },
so dsh-fs-local and dsh-fs-sandbox failed with "Cannot mix BigInt and other
types" on every packaged path. In the Python SDK executable the read tool
could not open packaged skill files, and the dsh-doc skill root inside the
VFS left skill discovery incomplete.

The pkg patch converts VFS stats to BigIntStats fields for bigint callers in
the main and worker bootstraps.
2026-11-19 13:35:36 +08:00
LegGasai b00f5c644f docs(forge): bring the status briefs note in line with the shipped polling
The note described the two status levels and bounded queries only. It
now also records the decisions of the four commits before this one:
polls that share a fetch, the 15 and 60 second intervals, one provider
call per query, reads after the agent's commands, no reads for a hidden
page, panel state kept between followers, and viewed marks kept on the
Host, with the measurements behind them and the alternatives that lost:
a queue per host, a random offset, pausing a host, a background budget,
and a faster cadence after a push.
2026-11-19 13:33:16 +08:00
LegGasai 5b7aaab289 fix(forge): give each provider call of a status fetch its own deadline
One fetch of the registry called the provider once with every due change
request of a forge, under one fetchTimeoutMs deadline. forge-github read
that call in several queries, so a read of many pull requests could
outlive the deadline as a whole, and a query whose gh run hung ended the
read before its own timeout isolated it. Either way the results of the
queries already answered were discarded.

A provider may now name snapshotBatchSize and briefBatchSize. The
registry then calls it once per that many due change requests of a host,
one call after another, each within its own fetchTimeoutMs, and settles
the watches of a call when it returns. A call that fails or outlives its
deadline fails only its own change requests. A change request that lost
its watchers while it waited is not read, and one whose watchers changed
what its polls read is read by the fetch of that level.

forge-github names its two query sizes, so one polling call holds one
query. briefBatchSize now defaults to 25: a query of 50 took up to 6.8
seconds against GitHub's 10-second limit, and one of 25 up to 3.4.

The subsystem page and the Cordis catalog also take in the signatures
the three commits before this one added.
2026-11-19 13:27:44 +08:00
yudshj c435f12473 Open recorded summaries as content and show only available preview controls 2026-11-19 13:23:49 +08:00
gengruilin 4880614e54 docs(dingtalk): drop the signed-in sentence from the feature preview
The account card in the English and Chinese previews no longer names an
example user and organization; it keeps the sentence that tells the user
to ask the agent, as the previews of the other connectors do.
2026-11-19 13:20:03 +08:00
LegGasai d97276d876 docs(skills): take dependency edges from every workspace manifest and fix the example 2026-11-19 13:12:59 +08:00
LegGasai ac69d4b1a9 perf(forge-panel): keep viewed marks on the Host and keep threads across a saved mark
Every saved viewed mark announced a review change, which dropped the
review threads kept for the change request and made each open changes
view read all viewed marks and all threads from the code host again.

The Host now keeps the viewed marks it read for a change request by head
commit, under the bounds the kept threads have. A mark saved through
ctx.forge at that head replaces the kept state of its file, and the kept
threads stay, since a viewed mark changes no thread. The read that
follows a save is answered from memory, so a save costs the provider's
write and no further read. The reader's refresh passes fresh and reads
the code host again, as it does for threads.

ReviewCache is generic over what it keeps and gains amend() for a write
whose effect on the kept read is known.
2026-11-19 13:12:47 +08:00
Ruilin Geng 87f4bc3001 Merge pull request #6251 from deepseek-harness/feat/wecom-plugin
feat(wecom): 新增企业微信插件并支持在插件页扫码授权
2026-11-19 13:10:23 +08:00
sjw1231 c19f8fadfe Merge remote-tracking branch 'origin/master' into fix/sdk-dsh-doc-parity
# Conflicts:
#	packages/bundle/sdk-app/README.i18n.yaml
#	packages/bundle/sdk-app/README.md
#	packages/bundle/sdk-app/README.zh.md
#	scripts/snapshots/python-sdk-single-exe/authoring/model-visible.json
#	scripts/snapshots/python-sdk-single-exe/authoring/win-x64/model-visible.json
2026-11-19 13:03:11 +08:00
Chinesezjc 9643605bc5 Merge pull request #8762 from deepseek-harness/fix/ci-ec10fb1-e2e-cleared-key-scope
test(web): scope the cleared-key close check to the edited provider's card
2026-11-19 13:02:12 +08:00
LegGasai 40f74e81e6 perf(forge): poll after a push and at the end of a turn that ran a tool
A push to the head branch of a bound change request started no status
read, so its new checks showed after the next regular poll, and a
command such as `gh pr merge` likewise left the card unchanged until
then.

ctx.forge.expectChange(ref) polls a watched change request at once and
then at the active interval until a status reports running checks or a
closed or merged change request, for at most one idle interval.
forge-session calls it after each push result for the visible change
requests in the pushed repository. When a turn that had a tool result
ends, forge-session refreshes the Session's visible change requests with
the age of that result as maxAgeMs; a turn without a tool result polls
nothing.

A refresh with maxAgeMs now compares against the start of the latest
poll, in flight or settled, since a status reflects the host as of the
start of its read, and leaves a merged change request alone.
2026-11-19 12:57:12 +08:00
sjw1231 35261017d5 docs(sdk-app): note the dependency behind the dsh-doc skill directory 2026-11-19 12:55:11 +08:00
Yudong Han c68faa601f Merge pull request #8081 from deepseek-harness/feat/sdk-time-zone
feat(sdk): 普通 prompt 逐条上报用户时区,对齐 plan mode 措辞
2026-11-19 12:50:03 +08:00
LegGasai 072267c156 perf(forge): share status fetches, pause while hidden, and reopen panels from kept state
Change requests were read together only when they became due in the same
millisecond, so 14 list watches that drifted apart cost up to 415 brief
queries an hour in place of 30. A poll now also reads the change
requests past the midpoint of their wait, which brings them back into
one fetch. The default intervals become 15 seconds while checks run and
60 seconds otherwise. An unknown mergeability earns one poll at the
active interval; a change request that keeps reporting it waits the idle
interval. refresh() accepts maxAgeMs and then leaves a change request
alone whose poll is in flight or recent.

The panel, Session list, and review count streams close once the page
has been hidden for 30 seconds and reopen when it shows, so the Host
polls no code host for a page nobody sees.

A Session's panel keeps its last state, snapshots, and branch lookup
when its last follower leaves, and the next panel starts from them: it
publishes that state first and repeats neither the sign-in probe of a
ready host nor the branch lookup. Showing the panel and focusing the
window call the new revisit Remote, which reinspects the checkout and
polls only change requests whose latest poll is older than
statusMaxAgeMs; refresh stays the forced read a reader asks for. A
status read refused as unauthenticated on a host shown as ready probes
sign-in again, once per run of refusals. The changes view waits for the
first status of a panel stream before it reads a change request whose
entry shows a kept snapshot.
2026-11-19 12:47:29 +08:00
imccyu 7e5721d713 Merge pull request #8763 from deepseek-harness/worktree-archive-observe-session
refactor(session-query): remove inspectSession; worktree archive reads through observeSession
2026-11-19 12:45:31 +08:00
creatixchu 02955c55d1 Refresh CUA shared Agent dependency graph 2026-11-19 12:43:54 +08:00
yudshj 5dc1009c8d Synchronize history paging and Node cancellation tests 2026-11-19 12:43:54 +08:00
creatixchu 06ff7d3a6c Declare shared Agent dispatch and tool protocol dependencies for CUA 2026-11-19 12:38:29 +08:00
creatixchu f7b9547bb4 Refresh format facts and retain the asynchronous cancellation recheck 2026-11-19 12:30:13 +08:00
yudshj 73723b46c7 Use one document factory for file and titled content previews 2026-11-19 12:28:35 +08:00
creatixchu 2df57db6e0 Acknowledge compatible persisted CUA notice sources 2026-11-19 12:28:00 +08:00
LegGasai 347cb3c65c Merge pull request #8771 from deepseek-harness/fix/files-api-multipart-bytes
fix(llm): keep a cancelled Files upload from ending the runtime
2026-11-19 12:26:40 +08:00
creatixchu 862f20df85 Declare precise input notice sources and refresh persisted output catalogs 2026-11-19 12:24:16 +08:00
yudshj 0c5e9de2c4 fix(sdk): 固定 Python 快照时区并更新升级指南与错误说明 2026-11-19 12:22:06 +08:00
creatixchu 3f328850c1 Record unified held-input behavior and pause release notices 2026-11-19 12:19:50 +08:00
yudshj 07015a777d Share the document viewer header across plan and compaction previews 2026-11-19 12:14:36 +08:00
creatixchu 5f156cfcbd Cover queued MCP cancellation and failed input cleanup 2026-11-19 12:11:11 +08:00
yudshj 11752f26fc test(sdk): 刷新 master 上的时区回放快照 2026-11-19 12:00:49 +08:00
yudshj b7a50ae503 test(sdk): 更新 session/query 参数校验报错的期望文本
session/query 允许可选的 timeZone 后,非法字段的报错改为列出该字段。
2026-11-19 11:58:07 +08:00
yudshj 0173308347 fix(sdk): 重新生成 module graph,更新 Python 单文件 SDK 快照的时区输出
sdk-server 新增对 dsh-util-time 的依赖,module graph 需要重新生成。
Python 单文件 smoke 不传 time_zone 时记录运行时进程时区;smoke 固定 TZ=UTC,
快照中普通 prompt 的来源带 clientTimeZone: UTC,时间行报告 UTC。
2026-11-19 11:58:07 +08:00
yudshj dca075e2a2 feat(sdk): 普通 prompt 逐条上报用户时区
session/prompt 与 session/query 接受可选 timeZone,TS/Python 客户端透传;省略时逐条采样进程时区,写入 sdk-user 来源的 clientTimeZone。time-context 读取不带 rpcId 的 user 来源时区。补持久化记录、Agent Note、升级指南、README,并刷新 SDK snapshot。
2026-11-19 11:58:00 +08:00
yudshj 71ce86fae6 fix(bundle): 对齐 base 与 Web 的 plan-mode 措辞
base 的 plan-mode section 与 web-app presets 逐字一致;刷新受影响的 SDK system-prompt sidecar。
2026-11-19 11:57:11 +08:00
creatixchu 1100abfac4 Keep successful MCP input held and clean only on observed cancellation 2026-11-19 11:56:11 +08:00
sjw1231 f0fb3692d3 fix(skills): list dsh-doc in the SDK profile and the Desktop PTC preset
The SDK profile and the Desktop PTC preset now add the agent-preset skills
directory to skill-filesystem, as the Desktop standard and Creator presets do,
so the first model request of every SDK session and of Desktop standard, PTC,
and Creator sessions lists the same dsh-doc skill.

Fixes #8557
2026-11-19 11:54:56 +08:00
gengruilin 490b5879a6 chore(wecom): align the package version with 0.2.2-rc.5 2026-11-19 11:51:04 +08:00
gengruilin 5d62fbdf71 Merge remote-tracking branch 'origin/master' into feat/wecom-plugin 2026-11-19 11:50:39 +08:00
yudshj 166b2a4ece Keep content type documentation scoped in the client catalog 2026-11-19 11:40:31 +08:00
Ruilin Geng 98c79866f2 Merge pull request #5771 from deepseek-harness/feat/feishu-plugin
feat(feishu): 新增飞书插件并支持在插件页连接账号
2026-11-19 11:39:52 +08:00
LegGasai 0d3d2eabd3 Merge remote-tracking branch 'origin/master' into feat/forge-status-tiers
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-19 11:36:16 +08:00
LegGasai 9d5181ade3 test(llm-deepseek): build the parsed upload request from a Headers instance 2026-11-19 11:36:01 +08:00
yudshj ac11a30aed Unify sidebar navigation and restore compaction summaries by event address 2026-11-19 11:33:41 +08:00
LegGasai 961a8c7920 docs(skills): require module responsibilities and dependency edges in PR descriptions 2026-11-19 11:29:26 +08:00
LegGasai c64f311035 fix(llm-deepseek): upload Files API images as encoded multipart bytes
Node's fetch copies a FormData body into the request stream from a detached
task. Cancelling the request within one event-loop turn of its start failed
that task with the unhandled rejection 'Invalid state: ReadableStream is
already closed', and the launcher's fatal handler then ended the runtime
process. upload() now encodes the three multipart fields itself and sends a
Uint8Array with an explicit boundary.
2026-11-19 11:28:49 +08:00
creatixchu e9d19c9d35 Discard stale held notices through the committed inbox notification 2026-11-19 11:21:15 +08:00
creatixchu b7b5a0114e Record confirmed pause releases and discard stale held-state notices 2026-11-19 11:16:10 +08:00
Turtle 49b2403397 docs: tighten G.1 layout and G.2 event-handler exception wording 2026-11-19 11:13:16 +08:00
Turtle 1a42cb0e3f docs: split core guidelines into one file per section; merge G.2 handler exceptions 2026-11-19 11:09:04 +08:00
winewill 9220db6c97 Fix uninstall home path normalization and cleanup diagnostics 2026-11-19 11:05:32 +08:00
yudshj 743544d608 Scope checkpoint preview navigation to compaction rows 2026-11-19 11:04:05 +08:00
gengruilin 1297248b8a chore(feishu): align the package version with 0.2.2-rc.5 2026-11-19 11:03:08 +08:00
gengruilin e360b8f017 Merge remote-tracking branch 'origin/master' into feat/feishu-plugin 2026-11-19 11:02:44 +08:00
creatixchu 6a143953f0 Record held-input reminders and cover MCP release receipts through the shipped profile 2026-11-19 10:59:26 +08:00
yudshj 77f13225e4 Merge remote-tracking branch 'origin/master' into rewrite/pr8461-master 2026-11-19 10:55:34 +08:00
creatixchu 81a6eca92b Report release receipts once and keep recovery programs usable 2026-11-19 10:52:04 +08:00
creatixchu 8ada27036d fix(test): use lane budget for creation fixture installation 2026-11-19 10:48:45 +08:00
Turtle 0daee08a35 docs: state the two reasons for G.2 directly 2026-11-19 10:47:26 +08:00
creatixchu 4795e0fc20 Release MCP held input before returning and report acknowledged releases 2026-11-19 10:47:12 +08:00
Turtle 423d26abf8 docs: separate core-guidelines and defensive-patterns placement criteria 2026-11-19 10:38:10 +08:00
creatixchu 02df940e7b Merge master and preserve held-input reporting with action schemas 2026-11-19 10:38:07 +08:00
creatixchu ebdad79678 Expose reminder source types and verify received native input state 2026-11-19 10:34:32 +08:00
creatixchu 055150bf79 Exercise nested reminders through the real PTC executor 2026-11-19 10:31:35 +08:00
creatixchu 1eb127200b Use typed additional context and cover program cancellation races 2026-11-19 10:29:19 +08:00
Turtle 44165ccc3e docs: add DSH Core Guidelines with format and callback rules 2026-11-19 10:27:07 +08:00
creatixchu 68f939ae2d Report native held input after programs and release on failure or cancellation 2026-11-19 10:26:35 +08:00
creatixchu c38098f360 Merge remote-tracking branch 'origin/master' into fix/pi-image-input-limits
# Conflicts:
#	apps/web/tests/session-drag-scroll.e2e.ts
#	packages/experimental/cua/README.i18n.yaml
2026-11-19 10:22:43 +08:00
creatixchu 08b7d59ec8 明确图片目标计算函数返回的硬上限与软目标 2026-11-19 10:19:49 +08:00
dsh-ci-bot ca5eb1ce17 Merge master 92bee14e37 into fix/ci-ec10fb1-e2e-cleared-key-scope
Keep the row-scoped key locator and the saved-notice wait. The base already carries the 10 s poll timeouts on the same assertions (e21776d781), so the merged test file matches the branch's version.
2026-11-19 05:14:06 +08:00
imccyu 54062b0d8b Merge pull request #8753 from deepseek-harness/fix/forge-panel-defer-session-resume
fix(forge-panel): follow the panel after the Session opens and name cold Sessions by id
2026-11-19 04:43:33 +08:00
dsh-ci-bot 5b56e9d511 test(web): wait for the save to reload before reopening the editor
The editor closes before the save's reload lands, and an Edit press while the settings snapshot is loading is dropped. Wait for the saved notice, which that reload publishes, before asserting the row's key field is gone and reopening the card.
2026-11-19 03:32:46 +08:00
dsh-ci-bot 64f7273a46 test(web): count only the edited provider's key field after a save
The save deletes the named credential before the profile write that restores native auth. Between the two writes google's row reports no usable provider, so ModelsSection mounts the DeepSeek first-run setup card, and its key field made the dialog-wide count 2. Scope the count to the edited provider's row and give the close a realistic poll timeout.
2026-11-19 03:02:46 +08:00
imccyu fbbf1acb03 test(web): read the drop target again until the pointer rests on a Session row
The drag-scroll case read elementFromPoint once after moving to the drop point;
on a loaded runner the point can still miss a row, and the non-null assertions
then threw. Poll the target until it names a row, and give the reorder Host
round trip 10 seconds.
2026-11-19 01:54:59 +08:00
imccyu f92b5de6c7 test(web): allow the provider key save to settle before checking the editor closed
The Save in the provider editor writes settings and the credential on the Host
before the editor closes; the 1-second expect.poll default timed out on a loaded
CI runner. Wait up to 10 seconds, as other web e2e cases do for Host round trips.
2026-11-19 01:28:20 +08:00
imccyu 6544a7171e docs: regenerate event producer-consumer graph for the forge panel session/disposed listener 2026-11-19 00:08:54 +08:00
imccyu 97c0c5101e fix(forge-panel): run the first automatic refresh once the Host follows the panel
The checkout row asks for an automatic refresh on mount, which now precedes the
deferred follow, so the Host found no panel and the client throttled the next
refresh. A refresh asked for before the first panel state now waits for it.
A change request staged for a Session that leaves the store is forgotten.
2026-11-18 23:55:13 +08:00
imccyu 16072178a9 fix(forge-panel): follow the panel after the Session opens and name cold Sessions by id
The panel follow resolved its Session argument by resuming the Agent while the
main view was still opening the same Session, so the Host read the Session log
twice. The follow stream now holds a forgePanel Session reference and waits for
the Session's history to open before following. refresh, reviewStage, and
worktreeCleanup only need the identity, so they take a SessionId and no longer
resume an Agent; worktrees.cleanupOf takes the id as well.
2026-11-18 23:06:35 +08:00
Huo Yaoyuan f5e2c7db6e feat(cua): add action schema discovery (#8710)
* feat(cua): add action schema discovery

* Update guidance

* Fix prompt test

* Reduce test dependency

* Fix snapshot test
2026-11-18 20:50:54 +08:00
Ruilin Geng 51d084e0f6 Merge pull request #8727 from deepseek-harness/feat/upstream-skills-profile-cache
feat(upstream-skills): 上游技能按 profile 存放,新的固定提交替换旧的
2026-11-18 19:40:16 +08:00
Ruilin Geng cfa5da3cd4 Merge pull request #6199 from deepseek-harness/feat/tencent-docs-plugin
feat(tencent-docs): 新增腾讯文档插件并支持在插件页连接账号
2026-11-18 19:34:44 +08:00
Yudong Han 4e1db9ca15 Merge pull request #7850 from deepseek-harness/feat/office-pdf-skill
feat(office): 内置 Python 提供 pypdf 并在 Office 路由提示用法
2026-11-18 12:27:29 +01:00
yudshj d687acbe4f feat(client): preview plan and compaction content independently
Open caller-supplied content through the shared document renderer without depending on inline diagram visualization. Keep checkpoint reads tied to their optional preview-service activation and cover cancellation in both the service and the chat row.
2026-11-18 19:26:47 +08:00
creatixchu ee7813eecc 让拖拽浏览器测试等待稳定控件并命中可见行 2026-11-18 19:25:57 +08:00
gengruilin 0e2b9a84e6 chore(tencent-docs): align the package version with 0.2.2-rc.5 2026-11-18 19:15:19 +08:00
gengruilin fd7e341978 Merge remote-tracking branch 'origin/master' into feat/tencent-docs-plugin 2026-11-18 19:14:57 +08:00
LegGasai 1f9712ddf9 Merge remote-tracking branch 'origin/master' into feat/forge-status-tiers 2026-11-18 19:14:09 +08:00
LegGasai a6b1265275 Merge remote-tracking branch 'origin/fix/forge-github-status-batches' into feat/forge-status-tiers
Brings the snapshot query limit of #8323 together with the status briefs
so one pull request carries both.

The limit is named snapshotBatchSize beside briefBatchSize. A snapshot
read and a brief read now share GitHubProvider.statusQueries: each
builds every query before the first request, across hosts, sends them in
turn, and fails only the pull requests of a query whose gh run fails or
that GitHub refuses. fetchHost and fetchDocument become fetchSnapshots,
which reads one query through statusOutput.

Tests cover snapshotBatchSize 3 and 1, a reference on a later host that
cannot be inlined, and both levels through the plugin's configuration
and a gh script. The README states the deadline that a read's queries
share instead of measured numbers, which move to the Agent Note.
2026-11-18 19:13:45 +08:00
yudshj d59433ed0c docs(office): simplify format skill routing 2026-11-18 12:07:06 +01:00
yudshj 2f93052188 feat(office): keep PDF support in bundled Python and the existing route 2026-11-18 12:07:06 +01:00
yudshj 34a290150c test: stabilize CUA reset checks and refresh PDF skill catalogs 2026-11-18 12:07:06 +01:00
yudshj ef84fe8259 docs(skill-office): 按正交能力重写 office-pdf 技能
将 office-pdf 从按流程组织改为十项正交能力(内容提取、页面渲染、页面组织、
几何变换、内容叠加、批注与链接、交互表单、文档导航、内嵌附件、文档管理与
输出)加组合示例表;跨能力的加密、不可改写、新建页面、页码索引规则集中
在开头。正文预算从 1,500 提到 3,000 token。smoke.py 补充批注删除、扁平化、
XMP、附件和页码标签检查;刷新 office-pdf-progressive 快照。
2026-11-18 12:07:06 +01:00
yudshj 8701fcf231 test(snapshot): include PDF skill in Web cold-resume fixtures 2026-11-18 12:07:06 +01:00
yudshj 4578475645 feat(skill-office): 新增 office-pdf 技能并在内置 Python 加入 pypdf 2026-11-18 12:07:06 +01:00
creatixchu 01d3457742 随master版本升级迁移图片限制升级指南 2026-11-18 19:06:34 +08:00
creatixchu e7985d17cb Merge remote-tracking branch 'origin/master' into fix/pi-image-input-limits 2026-11-18 19:04:16 +08:00
imccyu 2e39e70496 Merge pull request #8736 from deepseek-harness/worktree-sync-release-dsh-0.2.2-0.2.2-rc.5-to-master
chore(release): sync release/dsh-0.2.2 0.2.2-rc.5 to master
2026-11-18 18:58:42 +08:00
LegGasai deaf693551 refactor(forge-github): group status reads by host in one method
fetchBriefs grouped pull requests by host with the same statements as
the GitLab provider's fetch, which the duplication gate rejects. fetch
and fetchBriefs now share GitHubProvider's private hostGroups.
2026-11-18 18:56:46 +08:00
gengruilin bb41d5e1e0 Merge remote-tracking branch 'origin/master' into feat/tencent-docs-plugin 2026-11-18 18:52:55 +08:00
LegGasai 55c95447b5 feat(forge): read list badges from status briefs and refresh on open
The Session list read the full snapshot of every change request a listed
Session binds: up to 100 check contexts, reviewers, review threads, and
linked issues each, all in one GraphQL document per host. GitHub ends a
request after 10 seconds of processing, so about 30 bound pull requests
made every list read fail. Opening a Session whose change request the
list already watched read nothing until the next regular poll.

The forge registry now watches a change request at two levels. A brief
holds the title, state, draft flag, mergeability, review decision, and
combined check outcome. A watched change request is polled for its
snapshot while it has a snapshot watcher and for its brief otherwise,
with one fetch in flight per forge and level. Providers read briefs
through the optional fetchBriefs; forge-github reads them from scalars
and statusCheckRollup.state, briefBatchSize (50) pull requests per
query.

The Session list watches briefs and names the state it already holds,
so a merged change request is not read again and a list that reopens in
the same process waits for the interval. The Session panel and the
review page ask for a status no older than statusMaxAgeMs (10 seconds)
when they start to show a change request.
2026-11-18 18:46:25 +08:00
creatixchu 1feef12e61 Keep CUA capability methods independent of turn state 2026-11-18 18:38:56 +08:00
creatixchu 52e966b3d8 Refresh CUA guidance references and keyless prompt snapshots 2026-11-18 18:35:10 +08:00
imccyu 964f5703d6 chore(release): align master-only packages to 0.2.2-rc.5 2026-11-18 18:34:28 +08:00
imccyu a3d319bdac chore(release): sync latest master for 0.2.2-rc.5 2026-11-18 18:33:54 +08:00
creatixchu 05fc511000 更新硬上限会话回放并修复CI断言类型 2026-11-18 18:33:27 +08:00
creatixchu 3802a94803 Define turn input scope in shared CUA guidance and document Windows support gap 2026-11-18 18:33:12 +08:00
imccyu 26ac56f780 chore(release): align master-only packages to 0.2.2-rc.5 2026-11-18 18:29:39 +08:00
Ruilin Geng 35f1614ba0 Merge pull request #5933 from deepseek-harness/feat/notion-plugin
feat(notion): 新增 Notion 插件并支持在插件页连接账号
2026-11-18 18:28:12 +08:00
imccyu 30b668495d chore(release): sync release/dsh-0.2.2 0.2.2-rc.5 to master
# Conflicts:
#	packages/client/hmr/package.json
#	packages/client/script-realm-iframe/package.json
#	packages/client/ui-jobs/package.json
#	packages/client/ui-session-panel/package.json
#	packages/experimental/action-cards/package.json
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/cua-bundle/package.json
#	packages/experimental/forge-gitlab/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
#	packages/session/tool-working-directory/package.json
#	packages/util/atomic-write/package.json
2026-11-18 18:26:56 +08:00
gengruilin 5de4257956 fix(upstream-skills): delete the other pins once per registration
Processes of one profile can run different versions of a plugin at the same time, and they share
the profile's pin directory. A registration that deleted the other pins after every download made
two such processes delete each other's pin and download their own again at every check. Each
registration now deletes the other pins once, the first time its own pin is in place; a process
whose pin another process deleted downloads it again and leaves that process's pin in place.

The README and the Agent Note no longer state that no other installation reads the directory, and
the README lists the remaining case as a known limitation.
2026-11-18 18:24:39 +08:00
creatixchu 7c98d6170f Merge remote-tracking branch 'origin/master' into fix/pi-image-input-limits 2026-11-18 18:22:46 +08:00
creatixchu c0242b0efe Restore SDK expectations and use the public inbox view in cleanup tests 2026-11-18 18:21:51 +08:00
creatixchu 7ef9ab2932 同步模型输入开关对图片软目标字段的清理 2026-11-18 18:21:46 +08:00
creatixchu 9e34a5e8e8 Cover unrelated session endings and type cleanup deregistration explicitly 2026-11-18 18:18:29 +08:00
creatixchu 26474179d2 保留请求图片已取整的比例尺寸并区分测试软硬预算 2026-11-18 18:17:29 +08:00
creatixchu 6d0411b5ec Keep turn input cleanup inside CUA after turn/end 2026-11-18 18:16:59 +08:00
creatixchu 22ff91a32b 区分图片硬上限与压缩目标并执行超限缩图 2026-11-18 18:13:21 +08:00
winewill a5d109cb0d Merge master into Windows uninstall registry fix 2026-11-18 18:13:06 +08:00
LegGasai 88ae5632ab Merge pull request #8321 from deepseek-harness/feat/forge-review-page
feat(forge): add a code review page for the signed-in user's change requests
2026-11-18 10:04:17 +00:00
creatixchu 2d7b2ec521 Merge remote-tracking branch 'origin/master' into fix/pi-image-input-limits 2026-11-18 17:46:45 +08:00
imccyu 9c2670d3bc Merge pull request #8728 from deepseek-harness/worktree-release-dsh-0.2.2-rc.5
release(dsh): 0.2.2-rc.5
2026-11-18 17:45:47 +08:00
LegGasai 3891a53527 Merge commit '6eeb115fd19' into worktree/forge-m7-review-page-ee17bf 2026-11-18 17:45:41 +08:00
imccyu 9bf478edde release(dsh): 0.2.2-rc.5 2026-11-18 17:43:56 +08:00
imccyu e252633945 Merge pull request #8726 from deepseek-harness/worktree-sync-release-dsh-0.2.2-0.2.2-rc.5-to-master
chore(release): sync release/dsh-0.2.2 0.2.2-rc.5 to master
2026-11-18 17:43:02 +08:00
gengruilin 918e5c0531 Merge remote-tracking branch 'origin/master' into feat/notion-plugin 2026-11-18 17:42:57 +08:00
creatixchu b13a25d49c Refresh retained-script guidance and keep the scoped-input decision current 2026-11-18 17:40:46 +08:00
gengruilin e2d5bdcaa6 test(dingtalk): cover deleting an earlier skill root that links to the skills still in use 2026-11-18 17:29:29 +08:00
Ruilin Geng d826f38c92 Merge pull request #7683 from deepseek-harness/feat/linear-plugin
feat(linear): 新增 Linear 插件并支持在插件页连接账号
2026-11-18 17:26:05 +08:00
gengruilin 0a1b5c5527 feat(dingtalk): keep each profile's dws release in its own cache directory and replace earlier ones
In a profile that dsh launches, dws, its skills, and the skill root go to
$DSH_HOME/cache/dingtalk/<profile>. Once a release is in place there, after an installation or
already at load, the plugin deletes the entries that release does not use, so an update that pins
another release leaves one copy and an unchanged release is not downloaded again. Without a profile
the shared directory and everything in it stay as before.

An installation that fails for another reason than a cancellation now logs a warning with its
cause, because the account operation that runs it discards what it throws. A releaseUrls prefix
that does not parse as a URL fails at load instead of ending the download at its warning line.
2026-11-18 17:18:22 +08:00
creatixchu fb64f7d0bf Refresh shipped MCP profile instructions and API reference expectations 2026-11-18 17:16:20 +08:00
gengruilin 61760a62c6 refactor(linear): rename src/copy.ts to src/locales.ts
The repository names a package's localized text module locales.ts, as dsh-mcp-account and the four CLI connector apps do. The export COPY keeps its name, which matches the registration's copy field.
2026-11-18 17:03:52 +08:00
creatixchu 5f9bbdd636 Narrow native fixture key names before tracking held input 2026-11-18 17:02:00 +08:00
gengruilin f001571e89 refactor(tencent-docs): rename src/copy.ts to src/locales.ts
The repository names a package's localized text module locales.ts, as dsh-mcp-account and the four CLI connector apps do. The export COPY keeps its name, which matches the registration's copy field.
2026-11-18 16:59:25 +08:00
gengruilin 4459751fdb refactor(notion): rename src/copy.ts to src/locales.ts
The repository names a package's localized text module locales.ts, as dsh-mcp-account and the four CLI connector apps do. The export COPY keeps its name, which matches the registration's copy field.
2026-11-18 16:54:44 +08:00
gengruilin f5c30538f8 feat(upstream-skills): keep each profile's pins in its own cache directory and replace earlier ones
In a profile that dsh launches, the Service publishes a plugin's upstream files under
$DSH_HOME/cache/<name>/<profile>. Once a pin is in place there, at load or after its download, it
deletes the other pins of that directory, so a plugin update that changes the pin leaves one copy
and an unchanged pin is not downloaded again. Without a profile the shared directory and every pin
in it stay as before, and a configured skillsDir is never deleted.
2026-11-18 16:54:06 +08:00
winewill 9f7be2ab00 Merge pull request #8056 from deepseek-harness/fix/windows-installer-drag-completion
fix(desktop): 修复安装完成时拖动导致的输入卡死及关闭按钮
2026-11-18 16:48:16 +08:00
winewill 2e69a944d9 fix(desktop): include all uncertain uninstall targets in fallback reports 2026-11-18 16:45:37 +08:00
creatixchu 72ac4b5d57 Preserve subcall settlement before connection close and record PTC held keys 2026-11-18 16:40:20 +08:00
creatixchu 3e9e861ede Await owned activity during root teardown and cover cross-program key holds 2026-11-18 16:32:41 +08:00
creatixchu 693c29bdfe Drain native input before withdrawing program runtime dependencies 2026-11-18 16:25:48 +08:00
imccyu 5d3f7b5063 chore(release): sync release/dsh-0.2.2 0.2.2-rc.5 to master
# Conflicts:
#	.agents/notes/implemented/feature/2026-10-15-deepseek-search-fetch-api.i18n.yaml
#	packages/web/tool-web/tests/integration.spec.ts
#	packages/web/tool-web/tests/tool-web.spec.ts
#	packages/web/web-deepseek-api/README.i18n.yaml
#	packages/web/web-deepseek-api/README.md
#	packages/web/web-deepseek-api/README.zh.md
#	packages/web/web-search-deepseek/README.i18n.yaml
#	packages/web/web-search-deepseek/README.md
#	packages/web/web-search-deepseek/README.zh.md
#	packages/web/web/README.i18n.yaml
2026-11-18 16:22:08 +08:00
creatixchu efa1b999a6 Verify system release independently of window delivery and refresh SDK CUA 2026-11-18 16:20:24 +08:00
winewill b2f8b99d21 fix(desktop): normalize uninstall targets and report registry read failures 2026-11-18 16:12:40 +08:00
creatixchu cddddfff82 Cover enclosing context shutdown with pending native input cleanup 2026-11-18 16:07:00 +08:00
creatixchu 53d8be7367 按模型体验字段组织图片预算说明 2026-11-18 16:06:48 +08:00
creatixchu d86cec3093 Complete lifecycle API documentation and pin native release preconditions 2026-11-18 16:05:16 +08:00
creatixchu 4c2b8fe3a3 说明单图预算与图片聚合上限的交互 2026-11-18 16:03:51 +08:00
Turtle 7ac94908a2 Merge pull request #8706 from deepseek-harness/turtle/tool-disclosure-note
docs(agent-notes): propose tool reachability and initial disclosure
2026-11-18 16:00:38 +08:00
creatixchu 85c460cd3b Refresh SDK and Web recordings and document contextual hold availability 2026-11-18 15:54:05 +08:00
creatixchu df280fc4e5 Report hold availability by execution context and cover forced disconnect 2026-11-18 15:45:21 +08:00
LegGasai f47a0a2b52 Merge pull request #8707 from deepseek-harness/feat/web-search-deepseek-model-default
feat(web): default DeepSeek model conversations to Messages search
2026-11-18 15:41:59 +08:00
creatixchu 794cd66634 Keep cleanup listeners alive through unload and honor stop during finalization 2026-11-18 15:40:37 +08:00
Kexin Liu 37a63b6dc9 Merge pull request #8612 from deepseek-harness/perf/session-sqlite-group-commit
perf(session): SQLite 并发批次合并为一组提交
2026-11-18 15:38:40 +08:00
creatixchu ffe6e45c42 记录真实图片编码尺寸的会话回放 2026-11-18 15:30:26 +08:00
creatixchu 3e9f9b308d 使用仓库支持的异步迭代收集测试响应 2026-11-18 15:29:27 +08:00
LegGasai 8b7c308c04 Merge remote-tracking branch 'origin/master' into worktree/session-panel-stay-pinned-128657
# Conflicts:
#	packages/client/ui-chat/README.i18n.yaml
#	packages/client/ui-conversation/README.i18n.yaml
2026-11-18 15:29:22 +08:00
creatixchu 5e462070ea 验证目录字节预算与请求配置快照 2026-11-18 15:28:22 +08:00
LegGasai 6368d91027 Merge pull request #8595 from deepseek-harness/worktree/release-0.2.2-liveshare-test-clock
fix(liveshare): prevent credential horizon test expiry on 0.2.2
2026-11-18 15:26:58 +08:00
creatixchu 3a04f62e4e 接入pi更新的图片大小上限和单边上线 2026-11-18 15:25:44 +08:00
gengruilin 09e6d8f982 docs(feishu): regenerate the config catalog for the plugin entry's Config line
The catalog records the line of Config in the plugin entry, which moved up two lines when the entry stopped exporting the account types.
2026-11-18 15:23:43 +08:00
creatixchu 3ea8d86455 test(cua): update program and SDK capability snapshots 2026-11-18 15:22:43 +08:00
creatixchu 15e36acd44 Record finalized SDK output without queuing another turn 2026-11-18 15:22:23 +08:00
liukx0205 6bdb072fbf test(session): cover SQLite group commits and failure isolation 2026-11-18 15:20:49 +08:00
liukx0205 9340e56c4a perf(session): commit concurrent SQLite batches as one group
Each appended batch queues for the next group commit; the yield before a
group lets batches other writers append in the same turn share one
transaction, so a checkpoint costs one commit and one fsync per group
instead of per writer, and the synchronous transaction is bounded by an
event cap. A batch failing on its own terms rolls back to its savepoint
and rejects alone; an error that ends the transaction rejects the group.
2026-11-18 15:20:49 +08:00
gengruilin a7df1f7269 docs(dingtalk): regenerate the config catalog for the plugin entry's Config line
The catalog records the line of Config in the plugin entry, which moved up two lines when the entry stopped exporting the account types.
2026-11-18 15:19:43 +08:00
winewill 2a840de9d0 fix(desktop): clean Windows entries that still target the removed installation 2026-11-18 15:16:47 +08:00
creatixchu 14baaa2902 Preserve turn failures and discover awaited finalization in generated docs 2026-11-18 15:15:40 +08:00
gengruilin 3d0f2ebd09 docs(wecom): regenerate the config catalog for the plugin entry's Config line
The catalog records the line of Config in the plugin entry, which moved up two lines when the entry stopped exporting the account types.
2026-11-18 15:15:37 +08:00
gengruilin 0d8f613dbd docs(tencent-meeting): regenerate the config catalog for the plugin entry's Config line
The catalog records the line of Config in the plugin entry, which moved up two lines when the entry stopped exporting the account types.
2026-11-18 15:11:33 +08:00
creatixchu 4aaa4f1ec1 Keep complete MCP input available while requiring turns for holds 2026-11-18 15:10:56 +08:00
creatixchu a6315d96ec test(cua): refresh successful system input references 2026-11-18 15:06:27 +08:00
creatixchu 2d63749017 Identify native test events by their source and update lifecycle reference 2026-11-18 15:05:28 +08:00
creatixchu 843e326f39 fix(cua): preserve modifier state and system approval presentation 2026-11-18 15:03:08 +08:00
gengruilin 7ae4a46077 refactor(tencent-meeting): stop exporting the account types from the plugin entry
No other package imports them. The entry exports only what the Loader reads;
the package's own modules and tests import the types from src/types.ts.
2026-11-18 15:01:05 +08:00
creatixchu e8259b96e1 Restrict persistent ownership to explicit downs and add desktop turn checks 2026-11-18 15:00:10 +08:00
gengruilin e3fc326ff4 refactor(wecom): stop exporting the account types from the plugin entry
No other package imports them. The entry exports only what the Loader reads;
the package's own modules and tests import the types from src/types.ts.
2026-11-18 15:00:02 +08:00
creatixchu 3c6375dfa7 test(cua): model directional key ownership in replay helper 2026-11-18 14:59:53 +08:00
creatixchu 36d264f0f6 fix(cua): use session event sources for system input 2026-11-18 14:58:59 +08:00
gengruilin d013aa9de4 refactor(dingtalk): stop exporting the account types from the plugin entry
No other package imports them. The entry exports only what the Loader reads;
the package's own modules and tests import the types from src/types.ts.
2026-11-18 14:58:33 +08:00
creatixchu e58dbc11fb test(cua): simplify system approval assertion 2026-11-18 14:56:16 +08:00
creatixchu 09bacaa3ef test(cua): retain successful system input snapshot paths 2026-11-18 14:55:24 +08:00
creatixchu 8d67f8732e Preserve pointer release coordinates and exercise native mixed input 2026-11-18 14:54:18 +08:00
gengruilin 3192dc5408 refactor(feishu): stop exporting the account types from the plugin entry
No package imports them since the Feishu client package was removed. The entry
exports only what the Loader reads; the package's own modules and tests import
the types from src/types.ts.
2026-11-18 14:53:53 +08:00
creatixchu 7bf6eecece test(cua): cover system input replay and native key state 2026-11-18 14:53:43 +08:00
creatixchu e7a0f330fb Align lifecycle test protocols and SDK cancellation recording 2026-11-18 14:52:40 +08:00
Chinesezjc 05500a393c Merge pull request #8694 from deepseek-harness/fix/ci-385968e-operation-history
fix(desktop): keep operation history the predecessor read would drop
2026-11-18 14:51:58 +08:00
creatixchu ddbc1809ab Cover cleanup timeout and concurrent CUA turn ownership 2026-11-18 14:50:41 +08:00
creatixchu b8fcdbb052 fix(cua): correct system input admission verification 2026-11-18 14:49:23 +08:00
creatixchu 50b18e554f Update input approval fixtures for active turn ownership 2026-11-18 14:47:44 +08:00
creatixchu bb5586ceb4 feat(cua): unify explicit system input and keyboard modifiers 2026-11-18 14:46:10 +08:00
LegGasai e2427fd922 refactor(forge): keep the code review page's client files in a folder of their own
The page's twelve files sat in the flat src/client directory beside the changes view's Review* files, which draw
review comments and are unrelated to the page. They move to src/client/review-page; only import paths change. The
README's file table gains the folder and the Host's list reader.
2026-11-18 14:43:36 +08:00
creatixchu 531004f06e Unify macOS CUA held input around turn finalization 2026-11-18 14:42:37 +08:00
Dudu-0223 da0780e81b feat(session): prefix cross-Session messages with the sender Session
A recipient reads `Session <id> sent a message: ` instead of the `Agent <name>` prefix of send_message, whose names resolve only inside one subagent tree.
2026-11-18 14:10:46 +08:00
Dudu-0223 c237b1ebcf test(session): refresh the Web tool schema snapshot after merging master 2026-11-18 14:10:46 +08:00
LegGasai d70dd1a3ce fix(ui-sidebar): rest panel trailing content at the row's end and swap it for the unpin action on hover
A panel row laid its trailing content, such as a count, before the 38px it keeps for the unpin action, so the content
sat away from the row's end with an empty gap after it. Where the pointer hovers, the unpin action shows only on hover
or keyboard focus, so the content now rests in the action's place and gives way to it, as a Session row's time gives
way to its actions. On a touch device the action always shows and the content stays before it.
2026-11-18 14:07:25 +08:00
LegGasai c7636ed14e fix(forge): keep offering every repository in the review page's repository menu
The menu listed the repositories the shown lists name. Lists read in one repository name only that one, so choosing a
repository left the menu with a single entry, and another repository took a detour through All repositories. The page
now records the repositories of the lists read in every repository and keeps offering them, with the chosen one
marked. While no such read has finished, the menu says that the lists are still read.
2026-11-18 14:07:25 +08:00
Dudu-0223 77d8f1998c Merge origin/master into feat/session-control-message 2026-11-18 14:02:25 +08:00
lsdsjy 3a205340a6 refactor(desktop): align settings menu shortcut handling with closeBinding 2026-11-18 13:49:10 +08:00
Turtle 8c51b9a02a docs(agent-notes): propose tool reachability and initial disclosure 2026-11-18 13:48:28 +08:00
LegGasai 9b69c62c90 fix(forge): point the status fold's chevron up when it folds
The fold of the review summary's checks and reviewers blocks drew the section header's chevron, right when folded and
down when listing everything, beside a label that says to fold. It now points down to list and up to fold, as the
Session panel's fold does.
2026-11-18 13:40:39 +08:00
LegGasai 338175acda Merge commit 'bd331686bc1' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-18 13:36:35 +08:00
Turtle d1e0895cb2 Merge pull request #8659 from deepseek-harness/turtle/fix-clean-wipes-sessions-01ceb27e9301
fix(desktop): keep development Harness state out of .desktop-build
2026-11-18 13:36:03 +08:00
LegGasai 0995fc768d feat(forge): show the review summary's status as blocks
The summary drew the rows of the Session panel's expanded card in one bordered box, indented for a card title that
is not there. It now shows a column of blocks: the merge state, the checks that need attention with the rerun and a
fold that lists every check by group, each reviewer with the review request, and the changed lines with the linked
issues. The blocks reuse the card's rows, check grouping, complete-checks read, and review-request menu items, which
ChangeRequestOverview and ChangeRequestCard now export.
2026-11-18 13:25:08 +08:00
LegGasai 803f1e0d90 Merge pull request #8697 from deepseek-harness/worktree/restore-agent-terminal-plugin
feat(web): restore persistent terminal plugin controls
2026-11-18 13:21:19 +08:00
Turtleandimccyu 00de4378d1 Merge branch 'master' into turtle/fix-clean-wipes-sessions-01ceb27e9301
Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-18 13:18:12 +08:00
LegGasai 5b10652f55 feat(session-panel): move the transcript with the panel and offer no drag for a lone section
A press that shows or hides the panel plays one motion: the panel slides
across its 8px edge inset and fades, and the transcript and the composer
move into or out of its room over the same 160ms and curve. A change of
room (a switch to another Session, a reload, a resized window) still shows
or hides the panel at once, and the entrance no longer replays on every
mount. The slide stays inside the scrollport, so the Conversation body
gains no sideways scroll range whose bar would lift the composer.

While only one section besides Environment shows, its title row offers no
drag: no grab cursor, no handle, and a drag that starts there is refused.

The e2e helper that shows the panel no longer counts a panel that is
playing its exit as shown.
2026-11-18 13:17:24 +08:00
LegGasai 792cc9b967 Merge pull request #7820 from deepseek-harness/feat/session-workspace-root-consumers
feat(working-directory): route sandbox, file views, and discovery through the Session workspace root
2026-11-18 05:16:34 +00:00
LegGasai ff8753fb55 test(web): register the persistent terminal snapshot 2026-11-18 13:06:53 +08:00
CreatixChu 2f7482bcf9 Merge pull request #8429 from deepseek-harness/feat/cua-macos/mouse-toggle
feat(cua-macos): support individual mouse button presses and releases
2026-11-18 13:05:21 +08:00
dsh-ci-bot dd2284ea6f revert(browser-use-runtime): drop the fixture-exit polling from this PR
The change fixes a Windows process-teardown flake in mcp.spec.ts and is
unrelated to the operation-history read this branch carries. It belongs in
its own PR with an Issue; the reverted commit stays in e0c1c6b for that.
2026-11-18 13:03:20 +08:00
dsh-ci-bot 70607a9de5 docs(desktop): state that an appended predecessor is skipped, not collected
The dedupe sentence claimed records appended before a rotation stay in
one segment, which implies they are collected. The predecessor is
skipped, so those records are not collected at all. Correct the English
and Chinese guides and the readOperationHistory contract.
2026-11-18 13:02:42 +08:00
LegGasai 116f73ae10 Merge commit 'c8e67fb10607e2d836b78cb5eb3c9bafa4225041' into feat/session-workspace-root-consumers 2026-11-18 12:57:05 +08:00
creatixchu ad62a711b6 fix(cua): wait for native cleanup before the next request 2026-11-18 12:12:00 +08:00
creatixchu a2bd085fd2 Merge remote-tracking branch 'origin/master' into feat/cua-macos/mouse-toggle 2026-11-18 12:10:53 +08:00
winewill b69a750b0f fix(desktop): show installer completion during native dragging 2026-11-18 12:10:03 +08:00
creatixchu f8bf760009 test(cua): refresh retained Script guidance after the activity update 2026-11-18 12:06:30 +08:00
winewill 50d976f626 Merge branch 'master' of https://github.com/deepseek-harness/deepseek-harness into fix/windows-installer-drag-completion
# Conflicts:
#	apps/desktop/README.i18n.yaml
2026-11-18 12:03:46 +08:00
creatixchu 82a13d8bdd docs(cua): refresh the macOS message dependency graph 2026-11-18 11:58:51 +08:00
LegGasai 0ddd7247a0 Merge commit 'c8e67fb1060' into worktree/forge-m7-review-page-ee17bf
Master added removal with undo for saved review comments. The changes view keeps both that and the review page's
quote copy, and the review page's changes face reports notices through the notice store directly, as the Session
panel's face now does.
2026-11-18 11:57:43 +08:00
creatixchu 9699e2433a test(cua): distinguish unavailable event injection from observation failures 2026-11-18 11:57:12 +08:00
creatixchu b575d64ed0 test(cua): persist fixture input receipts and refresh format references 2026-11-18 11:50:48 +08:00
LegGasai ece93f95ec feat(forge): draw the review lists as skeleton rows while they are read
The list column showed plain blocks until its first frame and one block per unread list. It now draws rows laid out
as the items of the reader's view, detailed or compact, with the fill and pulse of the changes view's reading state,
so the column keeps its geometry when the items arrive.
2026-11-18 11:50:33 +08:00
_Kerman ed203fb7dc Merge pull request #8641 from deepseek-harness/xtr/fix-ptc-repeat-tool-reminder
fix(guard): exclude PTC subcalls from repeat reminders
2026-11-18 11:48:38 +08:00
LegGasai e24af31773 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root-consumers 2026-11-18 11:46:53 +08:00
creatixchu d53f0ea6ec test(cua): keep external input independent of text composition 2026-11-18 11:44:59 +08:00
creatixchu 2082177fe1 docs(cua-windows): remove extra mouse toggle guidance 2026-11-18 11:44:00 +08:00
creatixchu f9cad5dd15 test(cua): verify deduplicated activity against real macOS input 2026-11-18 11:42:53 +08:00
dsh-ci-bot f456c7f180 test(browser-use-runtime): wait for fixture exits before asserting them
The fixture ends when its stdin closes, and Windows reports that exit
after the close returns. Asserting process.kill(pid, 0) throws ESRCH
immediately read a still-exiting process as a leak and reddened the
ci windows coverage lane intermittently. Poll up to two seconds in both
the dispose path and the cancellation paths that share the assertion.
2026-11-18 11:37:52 +08:00
creatixchu 466fde5573 docs(cua): describe updating custom macOS helpers for activity notices 2026-11-18 11:36:49 +08:00
LegGasai b7ae13428c fix(deliverables): resolve changed-file paths against the turn's directory; count sandbox grants in the forge worktree blocker
The summary route serves the directory the turn started in, and the
changed-files card and review tab resolve listed paths against it instead of
the directory the Session works in when they are read.

The forge worktree option counts the policy's additional writable roots when
it checks that the common Git directory is writable.
2026-11-18 11:28:49 +08:00
LegGasai afca6e729a fix(forge): remove saved comment cards from the changes view (#8653)
* fix(forge): remove saved comment cards from the changes view

A comment added to the main input left a card beside its code that the
reader could not remove, also after its code changed or its file left
the diff. The card's menu now offers Remove for a reference and for a
publication receipt; the notice that follows offers Undo, which puts the
card back at its place. Removing a card changes neither the main input
nor the code host.

The three browser-kept cards share the thread card's geometry and its
header menu. A browser draft's Edit and Delete move into the menu, its
deletion asks first, and its move into the pending review is named Start
review while the user has none, as the comment form names it. The card
title "Your comment" is gone: the header shows the lines and the state.

* fix(forge): keep a draft's Delete while it is edited and let the view name each notice's tone

A browser draft being edited hid its menu, so a draft whose text the
reader emptied could be neither finished nor deleted. The menu now stays
during editing and offers Delete, which asks first as before.

The changes view passed its notices to a per-mount function that chose
the tone from a list of keys and forwarded the undo action. A second
mount with its own copy of that function would show a removal as a
failure without Undo. The view now passes the tone and the undo action
with each notice, and the mount hands them to the notice store as given.
2026-11-18 03:28:36 +00:00
creatixchu 1440e334b1 test(cua): record deferred activity context and its persistence compatibility 2026-11-18 11:22:44 +08:00
winewill 60c5461ea2 fix(desktop): clean attributable registrations without install location 2026-11-18 11:16:02 +08:00
LegGasai 7c34ed36cc docs(forge): move the rate-limited failure upgrade guide to v0.2.2-rc.4
Master released 0.2.2-rc.4, so the guide for the change this pull request introduces belongs to the new version's
directory. The Agent Note links follow it.
2026-11-18 11:13:13 +08:00
creatixchu a083ba2f62 refactor(cua): keep activity guidance separate from the operation catalog 2026-11-18 11:11:40 +08:00
creatixchu a713d40502 Merge master and refactor macOS activity notices for explicit program output 2026-11-18 11:04:57 +08:00
dsh-ci-bot 4b77d9c01e fix(desktop): deduplicate history segments by exact file identity
A segment rotated after an append is still one file: comparing size and
modification time split it into two segments and collected its records
twice. Deduplicate by the bigint device and inode only, which stays exact
for a Windows 64-bit file ID, and pin that precision with a test whose
stat mock returns Number identities when called without the bigint option.
Narrow fileIdentity to BigIntStats and inline both segment names.
2026-11-18 11:04:40 +08:00
LegGasai a86c488ba1 Merge commit '65056bc614a' into worktree/forge-m7-review-page-ee17bf 2026-11-18 11:02:26 +08:00
LegGasai 8a96cba995 Merge pull request #8362 from deepseek-harness/feat/client-review-page-seams
feat(client): add panel row trailing content and owner-handled Workspace picks
2026-11-18 11:01:31 +08:00
LegGasai 3be6baf574 feat(web): restore persistent terminal plugin controls 2026-11-18 10:58:36 +08:00
winewill 776844563f fix(desktop): require explicit uninstall registry keys 2026-11-18 10:31:00 +08:00
dsh-ci-bot 3bdf5aa56c fix(desktop): report read segments and keep colliding predecessors
filesRead now counts owned segments that yielded bytes instead of
distinct identities, so two segments read under one colliding file ID
report 2. The rotation predecessor is deduplicated only when its handle
also reports the size and nanosecond modification time of the segment
already read: a reused Windows file ID cannot defeat the rotation check,
and an identity collision alone keeps the segment. The path stat that
could treat a transient failure as a rotation is removed.

Also fix the two oxlint errors in the retry loop and the cancellation
test, clear the open mock between tests so call-count assertions do not
depend on execution order, and document the bounded Windows retry and the
dedupe rule in both desktop diagnostics guides.
2026-11-18 07:40:35 +08:00
dsh-ci-bot e473fcfa82 fix(desktop): keep operation history the predecessor read would drop
readOperationHistory could silently omit the rotation predecessor:
one transient Windows sharing or permission failure on the second
segment's open was counted as unavailable, and any equal device/inode
pair dropped the segment even when the current path still named the
file already read, because the 64-bit Windows file ID is not unique.

Retry the documented Windows transient open codes on a bounded
exponential delay, and deduplicate a segment only when the current
segment path stopped naming it. Both stats now come from bigint
stats so the exact file ID is compared.

The coverage test now asserts the whole collection result, so a
missing record also reports filesRead, bytesRead and unavailableFiles.
2026-11-18 07:20:22 +08:00
Kexin Liu b8ad4dc7f5 Merge pull request #8611 from deepseek-harness/fix/session-sqlite-commit-yield
fix(session): SQLite 每次提交后让出事件循环
2026-11-18 04:42:43 +08:00
liukx0205 55e96102ec fix(session): yield the event loop after each SQLite commit
A writer that checkpoints step after step runs its whole append path on
settled promises and a synchronous transaction, so the process never
returns to the I/O phase: timers, other writers waiting on a lease, and
the UI starve until the writer stops. Yielding once per commit bounds
that stall to one commit.
2026-11-18 03:43:28 +08:00
gengruilin 7a81c1631b test(linear): refresh the linear-plugin snapshot for master's prompt and tool text 2026-11-18 02:19:21 +08:00
gengruilin dcdbfb6b93 chore(linear): align the package version with 0.2.2-rc.4 2026-11-18 02:17:51 +08:00
gengruilin 1d04f0c75d Merge remote-tracking branch 'origin/master' into feat/linear-plugin 2026-11-18 02:17:33 +08:00
gengruilin 0cf9ed792d test(tencent-docs): refresh the tencent-docs-plugin snapshot for master's prompt and tool text 2026-11-18 02:06:53 +08:00
gengruilin 56a6361936 chore(tencent-docs): align the package version with 0.2.2-rc.4 2026-11-18 02:05:59 +08:00
gengruilin 994c3dc57d Merge remote-tracking branch 'origin/master' into feat/tencent-docs-plugin 2026-11-18 02:05:41 +08:00
gengruilin 9a8443c5cf test(notion): refresh the notion-plugin snapshot for master's prompt and tool text 2026-11-18 01:59:20 +08:00
gengruilin ec7a4185df chore(notion): align the package version with 0.2.2-rc.4 2026-11-18 01:58:46 +08:00
gengruilin d28b3e4966 Merge remote-tracking branch 'origin/master' into feat/notion-plugin 2026-11-18 01:58:46 +08:00
gengruilin 9c3781c9b1 chore(dingtalk): align the package version with 0.2.2-rc.4 2026-11-18 01:36:54 +08:00
gengruilin c8d9ff8113 Merge remote-tracking branch 'origin/master' into feat/dingtalk-plugin 2026-11-18 01:36:44 +08:00
gengruilin 45061aaa72 chore(feishu): align the package version with 0.2.2-rc.4 2026-11-18 01:27:57 +08:00
gengruilin afc88f172e Merge remote-tracking branch 'origin/master' into feat/feishu-plugin 2026-11-18 01:27:46 +08:00
gengruilin bb6480a39f chore(tencent-meeting): align the package version with 0.2.2-rc.4 2026-11-18 01:13:55 +08:00
gengruilin 4d9cc0d7f3 Merge remote-tracking branch 'origin/master' into feat/tencent-meeting-plugin 2026-11-18 01:13:45 +08:00
gengruilin 960cf528ea chore(wecom): align the package version with 0.2.2-rc.4 2026-11-18 01:07:03 +08:00
gengruilin 4a61813759 Merge remote-tracking branch 'origin/master' into feat/wecom-plugin 2026-11-18 01:06:53 +08:00
Turtle e0e6b7d841 Merge remote-tracking branch 'origin/master' into turtle/rename-deepseek-api-ca2c0fb1df3e
Co-authored-by: Yudong Han <16971372+yudshj@users.noreply.github.com>

# Conflicts:
#	packages/client/ui-settings-models/README.i18n.yaml
2026-11-18 00:08:02 +08:00
imccyu 9b45d2ece6 Merge pull request #8640 from deepseek-harness/feat/client-config-migrate-globals
refactor(client): deliver page-global Host configuration through synced plugin Config
2026-11-17 23:59:02 +08:00
imccyu 15a74b03c7 test(snapshots): refresh mcp-tool-loading after the working_directory tool removal 2026-11-17 22:26:16 +08:00
imccyu 40e0850b7e fix(client-modules): publish no synced values while a pending plugin's config expression awaits an injection
The connection row's trustedHosts expression reads webStartup, which the
worker preview never provides; resolving its raw Config before activation
threw on every graph composition and logged a console error.
2026-11-17 22:20:30 +08:00
imccyu 4799c27d0b docs(client): state that live-share viewers follow plugin events with schema defaults and correct the recovery NaN rationale 2026-11-17 22:20:30 +08:00
imccyu 34481579ed fix(client): pass the connection synced Config in the built Remote chain and regenerate event graphs and the plugin package list 2026-11-17 22:20:30 +08:00
imccyu 724c2695b8 fix(client): keep the account contact form on its page global and read the stop interval at each first press 2026-11-17 22:20:29 +08:00
imccyu 3c0cef3560 refactor(client): deliver page-global Host configuration through synced plugin Config
Move shortcuts, account notifications, Models onboarding, document preview,
account contact, and connection recovery off their own webserver/index-inject
page globals onto top-level volatile Config fields that reach each browser face
as SyncedConfig. Keep cordis.yml keys and defaults, keep a typed Host config
parameter so the config catalog still lists these packages (also restoring
ui-context-menu), and regenerate catalogs.
2026-11-17 22:20:29 +08:00
imccyu ca33fd6843 Merge pull request #8667 from deepseek-harness/worktree-sync-release-dsh-0.2.2-0.2.2-rc.4-to-master
chore(release): sync release/dsh-0.2.2 0.2.2-rc.4 to master
2026-11-17 22:17:01 +08:00
imccyu 1e8b233abc chore(release): merge master into 0.2.2-rc.4 sync 2026-11-17 22:09:47 +08:00
Ruilin Geng 4426ed85bd Merge pull request #5916 from deepseek-harness/feat/mcp-tool-loading
feat(mcp): 支持按 agent 按需加载 MCP 工具
2026-11-17 13:43:32 +00:00
Ruilin Geng f12830df57 Merge pull request #7491 from deepseek-harness/feat/upstream-skills
feat(upstream-skills): 新增 CLI 应用插件共用的上游技能下载库
2026-11-17 13:40:12 +00:00
imccyu 7400626e6e chore(release): sync release/dsh-0.2.2 0.2.2-rc.4 to master
# Conflicts:
#	packages/client/hmr/package.json
#	packages/client/script-realm-iframe/package.json
#	packages/client/ui-jobs/package.json
#	packages/client/ui-session-panel/package.json
#	packages/experimental/action-cards/package.json
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/cua-bundle/package.json
#	packages/experimental/forge-gitlab/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
#	packages/session/tool-working-directory/package.json
#	packages/util/atomic-write/package.json
2026-11-17 21:37:34 +08:00
imccyu de82673099 Merge pull request #8665 from deepseek-harness/worktree-sync-release-dsh-0.2.2-0.2.2-rc.4-to-master
chore(release): sync release-dsh-0.2.2-0.2.2-rc.4 to master
2026-11-17 21:27:44 +08:00
gengruilin 0f36fece74 Merge remote-tracking branch 'origin/master' into feat/upstream-skills 2026-11-17 21:18:10 +08:00
imccyu e62d55e99e chore(release): sync release/dsh-0.2.2 0.2.2-rc.4 to master 2026-11-17 21:12:50 +08:00
LegGasai 1870f1dc5f Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-17 21:06:27 +08:00
LegGasai ed21a83989 Merge commit 'fc56027d7e7' into feat/client-review-page-seams
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-11-17 21:01:10 +08:00
LegGasai 1a4c16a9bd Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf
Brings in master and the required onWorkspaceSelected callback of conversation.content.

Adaptations:
- The review chat handles a picked Workspace itself: it connects the Workspace's blank, keeps only the latest pick of
  the conversation still shown, moves the draft while both Sessions are retained, and reports a failed connection.
- The compact list title uses the shared MarqueeText instead of the title marquee this stack carried.
- Master moved the change request cards into the Session panel: the review detail reuses the card's merge action and
  rows and draws its own ready-for-review action, and keeps its own Refresh status label.
2026-11-17 20:52:43 +08:00
imccyu 7e7b604620 feat(client): retain recent sessions and skip conversation folding while unrendered (#8502)
* feat(client): retain recent sessions and skip conversation folding while unrendered

* docs(notes): state that attention-protected recent views are unbounded

* refactor(ui-workspace): derive recent views from visit order and make the limit configurable

Recent views now hold exactly the Sessions one idempotent sync() selects from
the visit order and current snapshots, so navigation reports the shown Session
once and the main-view Session never counts. A failed Conversation resumption
leaves the binding stale so the next window change rebuilds the whole window.

* refactor(session-controller): report facet counts through retainInfo instead of SessionBinding

SessionBinding stays unchanged; SessionRetainInfo gains optional retainedFacets
counts beside retainedBy, and owners derive their facet from retainInfo and the
current binding. Adds the upgrade guide for Client plugins that render a Session
they retain, and updates two web e2e expectations: a recently viewed Session now
keeps its right Sidebar view state when the main view returns to it.

* feat(client): keep drafts with a connectionless Session hold and fold only the last page on return

Session references gain connection (true by default). When no reference keeps
it, the Session disconnects and empties its window while keeping its scope.
When the last facet is released, the Session keeps only its last Turn-aligned
page visible and its event stream buffers the older records, answering page
reads from that buffer before the Host. BoundConversation folds only while the
conversation facet is retained and drops its fold on release. The input hub
holds a Session with { source: 'draft', connection: false } while its draft has
attachments, replacing the root-level draft-attachment ownership; reload marks
remain.

* refactor(session-controller): share retain-info counting with the test fixture

* fix(client): keep gap repair, disconnect, and recent-view counting correct while Sessions are buffered

- Only page reads before the window take buffered records; a live gap repair
  reads the Host.
- A resync whose teardown a disconnect interrupted stays cold.
- A Session the main view already retains takes no recent-view slot before
  show(), so losing its unread protection during retention evicts nothing.
- Buffering marks the window partial, so the start-of-history marker survives
  after the buffer runs out.

* fix(session-controller): consume an arrived older page before buffering the window

* feat(ui-workspace): sync the recent-view limit from the Host Config

recentViewLimit becomes a volatile field of the ui-workspace Host Config
(z.natural().default(10)). The browser receives it through synced plugin
configuration, and RecentSessionViews reconciles whenever it changes, so a
cordis.yml edit takes effect without a page reload. Until a value arrives,
every counted recent view is kept.

The package gains a Host compiler face: src/types.ts holds the shared
Config type, tsconfig.host.json and tsconfig.client.json replace the single
Client config, and every reference names the face it compiles against.
2026-11-17 20:51:42 +08:00
LegGasai 76dc7d8aae refactor(ui-conversation): let each content occurrence handle a Workspace pick
The content factory took an optional onWorkspaceSession and otherwise opened the picked Workspace as the main
Session itself. Every occurrence now passes onWorkspaceSelected(workspaceId, adopt): the main shell and the subagent
Sidebar chat pass Workspace navigation's openWorkspace, so their behavior is unchanged, and an embedded owner shows
the Session itself and calls adopt to move the draft in the step that shows it. The content keeps only the draft
move; the latest-pick check and the failure notice it carried for embedded owners move to those owners.
2026-11-17 20:30:28 +08:00
LegGasai 88d7197f77 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-17 20:30:08 +08:00
LegGasai 887ec5cf4a Merge pull request #7817 from deepseek-harness/feat/session-workspace-root
feat(working-directory): add Host-moved workspace roots and remove the working_directory tool
2026-11-17 12:23:00 +00:00
LegGasai 0a2a3d5a27 Merge remote-tracking branch 'origin/master' into feat/client-review-page-seams
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-sidebar/README.i18n.yaml
#	packages/client/ui-sidebar/src/client/SidebarRoot.tsx
#	packages/client/ui-workspace/src/client/rows/Rows.tsx
#	packages/client/ui-workspace/tests/browser-styles.client.spec.ts
#	packages/client/ui-workspace/tests/rows.client.spec.tsx
2026-11-17 20:11:57 +08:00
lsdsjy d345a58ccb feat(desktop): add Settings to the application menu 2026-11-17 20:08:45 +08:00
LegGasai 6db6fb4e59 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-17 20:06:42 +08:00
imccyu 116b7d4868 feat(ui-workspace): sync the recent-view limit from the Host Config
recentViewLimit becomes a volatile field of the ui-workspace Host Config
(z.natural().default(10)). The browser receives it through synced plugin
configuration, and RecentSessionViews reconciles whenever it changes, so a
cordis.yml edit takes effect without a page reload. Until a value arrives,
every counted recent view is kept.

The package gains a Host compiler face: src/types.ts holds the shared
Config type, tsconfig.host.json and tsconfig.client.json replace the single
Client config, and every reference names the face it compiles against.
2026-11-17 20:01:33 +08:00
imccyu fff31dd57b fix(session-controller): consume an arrived older page before buffering the window 2026-11-17 20:01:33 +08:00
imccyu 24df14af28 fix(client): keep gap repair, disconnect, and recent-view counting correct while Sessions are buffered
- Only page reads before the window take buffered records; a live gap repair
  reads the Host.
- A resync whose teardown a disconnect interrupted stays cold.
- A Session the main view already retains takes no recent-view slot before
  show(), so losing its unread protection during retention evicts nothing.
- Buffering marks the window partial, so the start-of-history marker survives
  after the buffer runs out.
2026-11-17 20:01:33 +08:00
imccyu 33bf943702 refactor(session-controller): share retain-info counting with the test fixture 2026-11-17 20:01:33 +08:00
imccyu 4b01a4afda feat(client): keep drafts with a connectionless Session hold and fold only the last page on return
Session references gain connection (true by default). When no reference keeps
it, the Session disconnects and empties its window while keeping its scope.
When the last facet is released, the Session keeps only its last Turn-aligned
page visible and its event stream buffers the older records, answering page
reads from that buffer before the Host. BoundConversation folds only while the
conversation facet is retained and drops its fold on release. The input hub
holds a Session with { source: 'draft', connection: false } while its draft has
attachments, replacing the root-level draft-attachment ownership; reload marks
remain.
2026-11-17 20:01:31 +08:00
imccyu bf58ff25f4 refactor(session-controller): report facet counts through retainInfo instead of SessionBinding
SessionBinding stays unchanged; SessionRetainInfo gains optional retainedFacets
counts beside retainedBy, and owners derive their facet from retainInfo and the
current binding. Adds the upgrade guide for Client plugins that render a Session
they retain, and updates two web e2e expectations: a recently viewed Session now
keeps its right Sidebar view state when the main view returns to it.
2026-11-17 20:00:26 +08:00
imccyu bad6605c93 refactor(ui-workspace): derive recent views from visit order and make the limit configurable
Recent views now hold exactly the Sessions one idempotent sync() selects from
the visit order and current snapshots, so navigation reports the shown Session
once and the main-view Session never counts. A failed Conversation resumption
leaves the binding stale so the next window change rebuilds the whole window.
2026-11-17 20:00:26 +08:00
imccyu 0b75b3da5a docs(notes): state that attention-protected recent views are unbounded 2026-11-17 20:00:26 +08:00
imccyu 4f9ee56b8a feat(client): retain recent sessions and skip conversation folding while unrendered 2026-11-17 20:00:25 +08:00
LegGasai 1292f95a13 docs(worktree): state that a worktree's Git directory needs a sandbox grant 2026-11-17 19:51:55 +08:00
LegGasai f9eb524891 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-17 19:50:49 +08:00
Turtle 2099 b1e7c58953 Merge pull request #8643 from deepseek-harness/turtle/fix-discussion-13531-d4b7fadf9b60
fix(tool-fs): copy read and glob meta text off the input string
2026-11-17 11:40:45 +00:00
std4453 f7fb1effb8 Merge pull request #8554 from deepseek-harness/agent/add-to-chat-menu-1a865c7c2f9d
feat(web): 文件右键菜单增加添加到对话
2026-11-17 19:37:02 +08:00
LegGasai 854ebc768a Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-17 19:29:22 +08:00
Turtleandimccyu 24c729253a fix(desktop): refuse to move state that a running Harness Dev owns
Report the underlying error when creating .desktop-dev or moving a
directory fails.

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-17 19:28:31 +08:00
Turtleandimccyu c0399fb981 fix(desktop): keep development Harness state out of .desktop-build
pnpm run clean removes apps/desktop/.desktop-build, which held the
development Harness home and Electron user data, so cleaning deleted
development Sessions, settings and credentials. Store them under
apps/desktop/.desktop-dev and move existing state there on launch.

Fixes #8658

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-17 19:15:02 +08:00
zhc 25244cd5e6 Merge remote-tracking branch 'origin/master' into agent/add-to-chat-menu-1a865c7c2f9d
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-11-17 19:10:57 +08:00
imccyu c7ecf45878 ci: compute the pre-merge merge with merge-tree in a separate process (#8657)
The pre-merge step fetches blobless history, so a missing blob is fetched
from origin on demand. Within one `git merge` process, Git's cache of
loose-object directories does not see the merged blobs the merge writes;
the checkout prefetch then asks origin for those blobs, origin refuses
the whole request with "not our ref", and the step reported a clean pull
request as unmergeable. The step now computes the merged tree with
`git merge-tree --write-tree`, commits it with `git commit-tree`, and
checks it out in a separate process, and reports conflicts apart from
other merge failures.

Fixes #8655
2026-11-17 19:02:21 +08:00
zhc 4f6e5d3075 refactor(client): read reference insertion availability when the menu opens
Replace the observable SessionInput.referenceInsertionAllowed with
canInsertReferences(), a read that addReferences rechecks before editing.
The file context menu now observes only the locale; a draft that becomes
uneditable while the menu stays open reports failure on selection. The
input facade reads Session and composer-block facts through plain
functions, matching the quote-insertion dependency.
2026-11-17 18:54:57 +08:00
Turtle 56b2a9029f Merge remote-tracking branch 'origin/master' into turtle/rename-deepseek-api-ca2c0fb1df3e
Co-authored-by: Yudong Han <16971372+yudshj@users.noreply.github.com>

# Conflicts:
#	packages/client/ui-model-selection/README.i18n.yaml
#	packages/client/ui-model-selection/README.md
#	packages/client/ui-model-selection/README.zh.md
#	packages/client/ui-settings-models/README.i18n.yaml
2026-11-17 18:36:23 +08:00
ihsiang 0ed8cb910f Merge pull request #7475 from deepseek-harness/Ihsiang/ui-review-refinements
fix(client): 统一图标描边、界面对齐与间距,修复模型行间拖放
2026-11-17 10:26:47 +00:00
gengruilin ae24eed1c7 Merge remote-tracking branch 'origin/master' into feat/mcp-tool-loading 2026-11-17 18:25:19 +08:00
imccyu f0774ff2d1 ci: compute the pre-merge merge with merge-tree in a separate process
The pre-merge step fetches blobless history, so a missing blob is fetched
from origin on demand. Within one `git merge` process, Git's cache of
loose-object directories does not see the merged blobs the merge writes;
the checkout prefetch then asks origin for those blobs, origin refuses
the whole request with "not our ref", and the step reported a clean pull
request as unmergeable. The step now computes the merged tree with
`git merge-tree --write-tree`, commits it with `git commit-tree`, and
checks it out in a separate process, and reports conflicts apart from
other merge failures.

Fixes #8655
2026-11-17 18:22:54 +08:00
Turtle 243fbe264b Merge pull request #8650 from deepseek-harness/turtle/plugin-reload-docs
docs(dsh-doc): state that a changed installed plugin reloads on recomposition
2026-11-17 18:22:05 +08:00
gengruilin 810d9c789b Merge remote-tracking branch 'origin/master' into feat/upstream-skills 2026-11-17 18:18:03 +08:00
LegGasai 6c6f10e7e6 docs(upgrade-guide): a Git-directory grant does not reach Windows processes 2026-11-17 18:16:55 +08:00
Ruilin Geng f744584083 Merge pull request #5333 from deepseek-harness/feat/mcp-oauth
feat(mcp): 支持显式 OAuth 授权、后台刷新与插件页账号连接
2026-11-17 10:16:30 +00:00
Kexin Liu 61194acc66 Merge pull request #8486 from deepseek-harness/perf/session-sqlite-payload-compression
perf(session): SQLite 以压缩帧存储事件
2026-11-17 18:13:12 +08:00
gengruilin 90ecf4d2d7 Merge remote-tracking branch 'origin/master' into feat/upstream-skills 2026-11-17 18:05:44 +08:00
LegGasai 623093c712 refactor(sandbox-policy): read no Git layout; grants come from configuration and registerWritableRoot
The sandbox policy derived a linked checkout's shared Git directory from its
`.git` pointer and granted it. That put Git worktree knowledge and a
worktree-only entry (`prepare`) into a generic service. The policy now bounds
a Session by its directory and adds only configured directories and those a
Host plugin registered through `registerWritableRoot`; relative to the lower
branch its source changes in one place, the root it reads.

- `prepare`, the derivation state, its three listeners, and
  `src/linked-checkout.ts` are removed.
- The worktree service creates under the Session's policy as on the lower
  branch; removal and restoration swap the root for the source checkout. The
  forge panel's blocker reads the Session's root alone.
- A Session that works in a linked worktree cannot write the repository's Git
  directory under workspace-write without a grant. Tests pin the denial and
  that a registered grant admits creation, restoration, and a commit.

Granting the Git directory of the checkout a Session works in is left to a
separate plugin that reads the layout and registers the directory.
2026-11-17 18:04:56 +08:00
turtle1999 9b431e701e docs(dsh-doc): name the one-call set_plugin reload
setPluginEnabled recomposes the profile on every call, so a single
enabled: true on the row reloads a changed package; a disable step is
not needed. Scope the paragraph to HMR and name the Client bundle
condition as its changed client.js.
2026-11-17 18:03:36 +08:00
liukx0205 d16104bd9a test(session): cover SQLite frame storage and document its settings
Fixtures construct the store with the plugin's frame defaults and read
durable history through frames; existing tests query the frames table
and its triggers. New tests cover the frame codec, frame layout per
write and per setting, sliced reads across frame boundaries, decode
grouping, and the corruption refusals for a missing frame, a frame
shorter than its range, an unknown codec, and damaged bytes.

The SQLite README, the persistence subsystem page and the generated
configuration catalog describe `frameEvents` and the frame encoding
selected by `compression`.
2026-11-17 18:00:51 +08:00
liukx0205 64c574c0e2 feat(session): make the SQLite frame size a plugin setting
The SQLite plugin validates its own Config: the JSONL fields plus
frameEvents, the maximum events per new frame, defaulting to 64. Imported
histories reach the cap; larger frames compress a few percent better and cost
proportionally more to decode for a tail read.
2026-11-17 18:00:51 +08:00
liukx0205 cc93a902a0 perf(session): select SQLite frame compression by config and decode frames concurrently
The plugin's compression setting now also selects the physical encoding of
new frames: zstd compresses a frame when that shrinks it, none stores the
text. Stored frames decode by their own codec. A read decodes eight frames
at a time on the thread pool and yields between groups.
2026-11-17 18:00:51 +08:00
liukx0205 ac2e505c35 chore(session): keep the SQLite schema version at 1 for the unreleased store 2026-11-17 18:00:51 +08:00
liukx0205 ddd1850920 perf(session): store SQLite events as compressed frames
Each durable write stores one frame of JSON lines, Zstandard-compressed when
that is smaller than the UTF-8 text, in a rowid table keyed by Segment and
start sequence; the Segment event count is the last frame's end. Reads select
the frames overlapping the requested range and decode their slices, yielding
between frames. The schema version advances to 2; a version 1 database is
refused as before.
2026-11-17 18:00:51 +08:00
zhc 34bf4b28a3 Merge remote-tracking branch 'origin/master' into agent/add-to-chat-menu-1a865c7c2f9d
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-reference/README.i18n.yaml
#	packages/client/ui-reference/README.md
#	packages/client/ui-reference/README.zh.md
2026-11-17 17:57:41 +08:00
gengruilin ec63133d62 Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-17 17:57:23 +08:00
LegGasai ccbca7a7d2 feat(session-panel): dock by moving the transcript aside, without a pin
The panel no longer has a pin. While the docking preference is on and the
end gutter is narrower than the 348px that docks the panel, the Conversation
body moves the transcript column and the composer into the start gutter, at
their own widths, and the panel docks in the room that leaves. Where the
start gutter cannot give it, the transcript stays centered, the panel hides,
and the toggle opens it over the transcript as before. The column never
narrows for the panel.

The panel's one dock probe has room while the gutter holds the panel or the
body's largest end reserve covers it, so the plugin's state, toggle, and
overlay rules are the gutter-only panel's. The width handles follow the
moved column, and a drag beside the docked panel moves only the column's
start edge. The drag mark of a section title passes pointer events through.

The Web e2e lane's standard page starts with docking off, since the panel
now docks at its 1680px width, and the specs that read the conversation
alone hide a docked panel first.
2026-11-17 17:56:58 +08:00
turtle1999 fe6229109f docs(dsh-doc): state that a changed installed plugin reloads on recomposition
A profile recomposition replaces every installed package whose files
changed on disk, including the directory a local installation links, so
a changed Host half no longer needs a restart. The dsh-doc skill still
told the agent otherwise, and the plugin_manager already-installed next
step only named the remove-and-reinstall path.

Describe the set_plugin toggle as the way to reload a changed package in
host-plugin.md and in the already-installed next step, and refresh the
dsh-doc-load fixture that reads that reference.

Fixes #8648
2026-11-17 17:52:56 +08:00
gengruilin 0fbcdd4ddd Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-17 17:50:22 +08:00
Ruilin Geng e1c87e2d03 Merge pull request #6230 from deepseek-harness/feat/cli-account
feat(cli-account): 新增 CLI 应用插件共用的账号套件
2026-11-17 09:48:45 +00:00
Shigma 2103f61c01 Merge pull request #8633 from deepseek-harness/fix/sidebar-scrollbar-fade
fix(web): fade the sidebar scrollbar out 500ms after the pointer leaves
2026-11-17 17:44:30 +08:00
yixiangihsiang f20af2227b Merge origin/master into Ihsiang/ui-review-refinements 2026-11-17 17:33:20 +08:00
Kexin Liu e50e24de40 feat(session): 等父前缀持久化后创建共享 fork (#8392)
* test(session): cover SQLite persistence and document the provider

* test(session): align coverage with the latest SQLite implementation

* test(session): adapt storage coverage to the current SQLite backend

* feat(session)!: pass fork source through agent creation

* refactor: prepare forks privately and append child segment events

* refactor: choose fork sharing in SQLite creation transaction

* fix(session): preserve caller-prepared fork seeds

* feat(session): flush fixed fork prefix before child creation

* fix(session): persist fork sources and await parent drain

* chore: remove test and documentation changes from fork PR

* refactor(agent-loop): reuse agent fork source type

* fix(session): retain SQLite handle and JSONL errors after rebase

* perf(session): create forks from the caller's history without reloading the parent

The fork source carries the complete child history from seq 0. A live
parent's log supplies the shared prefix; a cold parent's prefix is used as
persistence returned it to the caller. The factory no longer reopens the
parent, and the JSONL backend copies the supplied history instead of
decoding the parent log again. The SQLite backend drains a live parent
writer before sharing its persisted prefix, so the factory no longer flushes
the parent or tracks owner disposal during that wait; its fork creation
serializes child events without the read-side validation and reports
publication failures through the shared wrapper.

* refactor(session-query): report the persisted prefix length on live observations

A live observation reports its event count as the persisted prefix, so the
fork command's boundary fallback only covers observations from other
producers.

* test(session): exclude the SQLite POSIX lease from Windows coverage

The SQLite copy of the session write lease executes its POSIX face only off
Windows, matching the JSONL exclusion.

* test(session): report legacy opener failures on stderr

The two-process suite asserts only the error name; the message and cause now
reach the inherited stderr so a CI failure identifies the SQLite error.

* refactor(agent): keep seed as the constructor input and narrow the fork source

CreateAgentOptions.seed stays the only constructor history; source names the
parent and cut a seeded fork shares. The factory stores the constructed log
with that source at creation, so no fork-only seed selection remains in the
loop.

* test(session): complete fork regressions and documentation

* test(session): propagate current SQLite fixtures through fork regressions

* test(session): describe fork creation from the caller's history

The fork source now carries the complete child history and the factory no
longer reopens or flushes the parent, so the fake factories, source
expectations, and cancellation cases follow that flow: a sharing backend
drains the parent writer itself, JSONL copies the supplied history, and
observations always report the persisted prefix. Documentation, the upgrade
guide, and the generated catalogs describe the same behavior.

* test(session): cover fork creation without a factory flush

The in-process fork provider's cases no longer wait for a parent flush: the
live log supplies the completed prefix and cancellation is exercised while
child storage is pending. The Remote fork command's boundary fallback is
covered by an observation that omits its persisted count.

* test(session): drop redundant observation assertions in the fork fallback case

* test(session): describe fork creation with seed beside a parent source

The agent factory keeps seed as the constructor history and source names
only the parent and cut, so the fakes, source expectations, and documentation
follow that split; the case where a live parent replaced the supplied prefix
no longer applies.

* refactor(session): name the fork parent option parentSource

`CreateAgentOptions.source` and `SessionPersistenceCreateOptions.source`
become `parentSource`: the field names the parent Session a seeded fork
shares its prefix with, and the shorter name read as a generic origin.

* refactor(session-query): report persistedEventCount on cold observations only

A live observation holds the Session's own events, none of them read-time
repairs, so its stored prefix is its whole log and the field said nothing;
only a cold read appends interrupted-turn closers in memory and needs to
tell the fork cut where the stored prefix ends.
2026-11-17 17:28:59 +08:00
zhc 91d9eb61ad refactor(client): keep draft insertion policy inside the input facade
SessionInputShell now receives the Session and composer-block sources
directly and evaluates removal, subagent mode, and blocks in one private
check shared by quote insertion and referenceInsertionAllowed. The
separate draft-editability helper is removed.
2026-11-17 17:21:20 +08:00
gengruilin 359803a47f Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-11-17 17:17:27 +08:00
LegGasai 641c669fca Merge pull request #8521 from deepseek-harness/refactor/deepseek-auth
refactor(deepseek-auth): authenticate DeepSeek consumers through ctx.deepseekAuth
2026-11-17 09:10:13 +00:00
yixiangihsiang 7ca20080d7 fix(client): align optional native-opening toolbar actions 2026-11-17 17:06:54 +08:00
Dudu-0223 355b9c9561 Merge pull request #8613 from deepseek-harness/fix/creator-dsh-doc
fix(creation): 加载现有 dsh-doc 插件开发指南
2026-11-17 17:01:22 +08:00
LegGasai f5c3f3eb90 Merge remote-tracking branch 'origin/master' into refactor/deepseek-auth
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-17 16:52:18 +08:00
gengruilin 362213e2f5 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-11-17 16:51:52 +08:00
_Kerman 2c4f548d13 fix(guard): exclude nested calls from repeat reminders 2026-11-17 16:51:02 +08:00
winewill fcb105b778 fix(desktop): remove orphan PATH after uninstall 2026-11-17 16:47:50 +08:00
gengruilin 58ee5e2217 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-11-17 16:47:03 +08:00
Dudu-0223 124772848f fix(creation): load the shipped dsh-doc development guide 2026-11-17 16:45:59 +08:00
Dudu-0223 5935214e93 Merge pull request #8531 from deepseek-harness/feat/action-cards-without-tool
feat(action-cards): offer cards from action-card blocks in answers instead of a tool
2026-11-17 16:44:19 +08:00
gengruilin 9c8248b433 chore(tencent-meeting): align the package version with 0.2.2-rc.3 2026-11-17 16:41:40 +08:00
gengruilin 351fe0414d test(tencent-meeting): refresh the skills snapshot after the master sync 2026-11-17 16:41:29 +08:00
gengruilin b1891465a1 refactor(tencent-meeting): register tmeet and its guide with ctx.cliAccounts and ctx.upstreamSkills
The plugin registers once with the CLI account Service and once with the upstream skills Service instead of building the command executor, account runtime, runtime-context entry, Plugins page registration, and guide download itself. Account operations are a perform function over the Service's control and the guide handle, and the presenter takes the Service's text writer. Config keeps binDir and skillsDir; commandTimeoutMs is the cli-account row's field, skillsUrls and skillsTimeoutMs are the upstream-skills row's.
2026-11-17 16:41:27 +08:00
gengruilin 170f4cb2cf chore(dingtalk): align the package version with 0.2.2-rc.3 2026-11-17 16:40:55 +08:00
gengruilin b66f381079 refactor(dingtalk): register dws and its account with ctx.cliAccounts
The plugin registers once with the CLI account Service instead of building the command executor, account runtime, runtime-context entry, and Plugins page registration itself. Account operations are a perform function bound to the dws installation over the Service's control, and the presenter takes the Service's text writer. Config keeps the dws and skill sources; commandTimeoutMs is the cli-account row's field.
2026-11-17 16:39:50 +08:00
std4453 5657d89fc2 Merge pull request #8623 from deepseek-harness/turtle/fix-drag-autoscroll-3933245075fa
fix(ui-sidebar): scroll the Session list while dragging near its edges
2026-11-17 16:34:40 +08:00
LegGasai 1b952aa029 Merge remote-tracking branch 'origin/master' into refactor/deepseek-auth 2026-11-17 16:31:25 +08:00
Dudu-0223 e3c89ded3b Merge latest master and regenerate event tables 2026-11-17 16:30:11 +08:00
yixiangihsiang d743753caf fix(client): unify sidebar action glyphs and fourteen-pixel gaps 2026-11-17 16:29:29 +08:00
Shigma ca4ac5aacf test(web): bound the sidebar scrollbar delay in-page and cover reduced motion 2026-11-17 16:27:36 +08:00
Dudu-0223 10a0b26af2 Merge pull request #8604 from deepseek-harness/fix/subagent-model-selection-live-setting
feat(subagent): read model-selection setting at each call
2026-11-17 16:26:53 +08:00
Dudu-0223 5e8d723c43 Merge master into feat/action-cards-without-tool 2026-11-17 16:18:44 +08:00
LegGasai 62a2f77b2b Merge remote-tracking branch 'origin/master' into refactor/deepseek-auth
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-17 16:15:48 +08:00
Dudu-0223 7b1553c31f fix(session): retry contended SQLite WAL initialization 2026-11-17 16:13:30 +08:00
gengruilin 09a6bbb53f Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-11-17 16:13:20 +08:00
gengruilin 66bfa70f09 chore(wecom): align the package version with 0.2.2-rc.3 2026-11-17 16:09:19 +08:00
gengruilin 9be48955c9 test(wecom): refresh the skills snapshot after the master sync 2026-11-17 16:09:19 +08:00
gengruilin 03627387ee refactor(wecom): register wecom-cli and its guides with ctx.cliAccounts and ctx.upstreamSkills
The plugin registers once with the CLI account Service and once with the upstream skills Service instead of building the command executor, account runtime, runtime-context entry, Plugins page registration, and guide download itself. Account operations are a perform function over the Service's control and the guides handle, and the presenter takes the Service's text writer. Config keeps binDir and skillsDir; commandTimeoutMs is the cli-account row's field, skillsUrls and skillsTimeoutMs are the upstream-skills row's.
2026-11-17 16:09:04 +08:00
LegGasai 1edd4e31d9 fix(session-panel): keep Environment first and reorder sections by drag only
The Environment section always shows first: its title row is no drag source
and has no handle, a section dropped on it lands after it, and a stored
order that names it elsewhere is ignored. The arrow keys no longer move a
section; the drag handle is a mark on the title row instead of a button, so
recorded accessibility trees no longer list one per section.
2026-11-17 16:08:20 +08:00
imccyu bd1d6dcd0c Merge pull request #8504 from deepseek-harness/feat/client-config-live-update
feat(client): sync volatile plugin config to the browser
2026-11-17 16:08:14 +08:00
creatixchu 9eb4232f63 test(cua): cover failed and revoked turn-end mouse cleanup 2026-11-17 16:05:00 +08:00
creatixchu c65abe9934 Merge master to refresh the CUA event graph 2026-11-17 16:04:03 +08:00
LegGasai 4c74abdbad Merge pull request #6372 from deepseek-harness/fix/web-unresolved-at-mention
fix(web): render @ mentions as chips only for existing paths
2026-11-17 16:02:24 +08:00
Dudu-0223 ca58ae0f27 Merge remote-tracking branch 'origin/master' into fix/subagent-model-selection-live-setting 2026-11-17 16:01:34 +08:00
Dudu-0223 714e2f2fef fix(subagent): isolate model selection setting failures 2026-11-17 15:51:10 +08:00
Shigma 1cbd1ece5f fix(web): fade the sidebar scrollbar out 500ms after the pointer leaves 2026-11-17 15:42:20 +08:00
Turtle 1b1bab842c Merge pull request #8627 from deepseek-harness/turtle/weighted-approval-bot-score-c4097d5e62f4
ci(approval): fix turtle2099 author credit at 0.2 points
2026-11-17 15:40:18 +08:00
Kexin Liu 9c8d8c3932 Merge pull request #8391 from deepseek-harness/feat/session-persistence-sqlite
feat(session): 可选启用 SQLite 并在打开时导入 JSONL
2026-11-17 07:36:29 +00:00
Chinesezjc 80edc8c529 Merge pull request #8599 from deepseek-harness/fix/ci-e7a4255-office-pdf-export-invariants
test(office): check the PDF export deliverable against the converter output
2026-11-17 15:33:02 +08:00
LegGasai 1f54d627bb Merge branch 'master' into worktree/session-panel-stay-pinned-128657 2026-11-17 15:32:42 +08:00
gengruilin f1eb45d9b1 Merge remote-tracking branch 'origin/feat/cli-account' into feat/dingtalk-plugin 2026-11-17 15:25:21 +08:00
Turtle aed2e33042 Merge pull request #8620 from deepseek-harness/turtle/plugin-skill-engines-7b40b97ec8b7
feat(tool-cordis): expose the running DSH version to plugin authors
2026-11-17 15:19:45 +08:00
LegGasai 6f0445e307 Merge pull request #8625 from deepseek-harness/worktree/session-panel-forge-cards-958b38
feat(forge): compact change request cards, and worktrees created only for the first message
2026-11-17 15:15:22 +08:00
imccyu 606ec16dc7 Merge pull request #8628 from deepseek-harness/feat/weighted-approval-add-reviewers
feat(ci): give two more reviewers the two-point approval weight
2026-11-17 15:14:37 +08:00
liukx0205 fa69e91481 Merge remote-tracking branch 'origin/master' into feat/session-persistence-sqlite 2026-11-17 15:12:22 +08:00
imccyu 7fa9a221c1 feat(ci): give two more reviewers the two-point approval weight
@LegGasai and @CreatixChu hold write or admin permission but fell back
to the one-point default, so a single approval from either of them did
not meet the two-point requirement. List both in the approval policy so
their approval satisfies the threshold directly, and update the policy
test and the reviewer roster in the README.
2026-11-17 15:10:24 +08:00
LegGasai e3cd2edebf refactor(sandbox-policy): resolve policies only for Sessions; callers build maintenance policies
Review of the consumers layer:

- `SandboxPolicyRequest.root` is removed. `resolve` answers only for a Session.
  `prepare` accepts a Session or a checkout directory and returns that
  checkout's validated Git administration directories. The worktree service
  builds the policy of removal and restoration itself: the Session's mode and
  grants, the source checkout as the root, and that checkout's derived
  directories. The forge panel swaps the root for its two reads of the source
  repository.
- The Git layout reads move to `src/linked-checkout.ts` with direct tests; the
  security rationale stays in the README, which the function comment links.
- `resolve` and the model-visible policy share one merge of configured,
  registered, and derived writable roots.
- `workspace-files` takes a live Session's root from the sandbox policy instead
  of repeating its fallback chain.
- `TurnRecorder` takes a fixed directory and an explicit `moveTo`, which the
  plugin calls on `workspace-root/change`; each turn keeps its own canonical
  paths.

A real-sandbox test restores a missing worktree of a linked source checkout in
a process that never worked in it.
2026-11-17 15:09:22 +08:00
be56084b84 docs(ui-sidebar): describe the drag listeners bindViewportRef adds
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
Co-authored-by: 07akioni <18677354+07akioni@users.noreply.github.com>
2026-11-17 15:08:20 +08:00
gengruilin 4c7c1933bd Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-11-17 15:06:35 +08:00
gengruilin b012be9525 chore(feishu): align the package version with 0.2.2-rc.3 2026-11-17 15:04:42 +08:00
gengruilin e3212fcf99 refactor(feishu): register lark-cli and its account with ctx.cliAccounts
The plugin registers once with the CLI account Service instead of building the command executor, account runtime, runtime-context entry, and Plugins page registration itself. Account operations are a perform function over the Service's control, and the presenter takes the Service's text writer. Config keeps only binDir; commandTimeoutMs is the cli-account row's field.
2026-11-17 15:04:40 +08:00
Turtle 58a51e98c1 Merge pull request #8616 from deepseek-harness/turtle/check-restart-required-58bf49938477
fix(plugin-manager): make the application result authoritative for restarts
2026-11-17 15:04:12 +08:00
Turtle 164f8b8f21 test(tool-cordis): type the app-boot manifest read 2026-11-17 15:00:25 +08:00
Turtle 3d9ac05e48 ci(approval): fix turtle2099 author credit at 0.2 points 2026-11-17 14:59:08 +08:00
creatixchu 0f538daf22 test(cua-macos): include mouse toggles in updated PTC recordings 2026-11-17 14:57:18 +08:00
LegGasai e20f9b9e1a fix(forge): create a requested worktree for the first message only
The inbox listener of the forge panel held a turn for every inserted
message. A notice queued for the next step, such as the approval policy
notice that follows a switch to or from full access, opens no turn, so
the hold only created the requested worktree before any message was
sent. The same listener started the removed-worktree check for such
notices.

Hold only for a message in the next-turn queue. A steered message that
wakes an idle Agent keeps the creation at the first step proposal.
2026-11-17 14:56:33 +08:00
gengruilin 0c42669b9c docs(upgrade-guide): upstream-skills base row in compositions without the skill row 2026-11-17 14:56:08 +08:00
gengruilin 8b251cdbea fix(upstream-skills): load node-tar at the first download
The base bundle row made the experimental Web preview's browser worker
import this package, and evaluating node-tar there fails, so the row did
not activate and preview-boot.e2e.ts reported console errors. The archive
reader now imports node-tar when a download starts.
2026-11-17 14:56:06 +08:00
creatixchu c369d85d57 Merge remote-tracking branch 'origin/master' into feat/cua-macos/mouse-toggle 2026-11-17 14:54:21 +08:00
creatixchu cca4d7c7d2 Merge master into the macOS mouse toggle branch 2026-11-17 14:54:02 +08:00
winewill d76f5cada3 Merge pull request #8548 from deepseek-harness/turtle/fix-credit-toast-position-aaf5e1935b33
fix(web): give account notifications their own sidebar row
2026-11-17 14:52:11 +08:00
LegGasai 3834d302df fix(sdk-server): remove the fallback authentication when its route fails
initialize() mounts DeepSeek request authentication before the fallback
official route in a composition that has none. When the route did not
mount, for example for a DEEPSEEK_BASE_URL that is no HTTP(S) root, the
authentication service stayed in the composition and shutdown() skipped
it, because shutdown releases both only after the route mounted. A route
whose disposal threw skipped the service the same way.

A failed route mount now removes the service that call mounted, and
shutdown releases the service whether or not the route's disposal
succeeds.
2026-11-17 14:51:36 +08:00
757590d663 fix(ui-sidebar): scroll the Session list while dragging near its edges
Refs #8619

Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
Co-authored-by: 07akioni <18677354+07akioni@users.noreply.github.com>
2026-11-17 14:51:18 +08:00
Turtle 91307e6630 feat(tool-cordis): expose the running DSH version to plugin authors
Add a Host Runtime.getVersion inspect provider and a dsh-doc reference
on reading that version and writing engines.dsh.

Refs #8618
2026-11-17 14:49:44 +08:00
LegGasai abc9575eea feat(forge): draw change requests as compact cards in the Session panel
Each change request is one 36px line on the panel's row columns in a
filled block: state glyph, title, number, and checks outcome, with the
actions menu on hover and the expansion toggle in the end column. A
press on the line opens the change request's changes in the right
sidebar; the modifier key, the middle button, and a change request no
provider serves or has read open the host's page. The hover card names
the full title, the branches, and the status in words.

The list shows three cards and then the panel's fold control. The card
fill is the platform fill, which stands apart from the panel's surface
in the dark theme, where the card fill is nearly that surface's color.
Check outcomes share one ring, so a failed check is a ringed cross.
2026-11-17 14:48:15 +08:00
gengruilin 38c2a3b0a9 Merge remote-tracking branch 'origin/feat/cli-account' into feat/feishu-plugin 2026-11-17 14:46:09 +08:00
LegGasai 125546c46b fix(session-panel): show the section drag handle in place of the trailing count
Over a hovered title row the handle lay on top of the end of the trailing
count, which faded under it. The row's end now shows one of the two: the
count at rest, and the handle in its place while the pointer is over the
title row, while the handle has keyboard focus, and during a drag. The
hidden count keeps its box, so the title does not move.
2026-11-17 14:36:12 +08:00
Turtle 54044053de fix(plugin-manager): make the change result's application status authoritative for restarts
The plugin_manager description now says that an applied change is in
effect and needs no restart, so models stop inferring restart needs
from other evidence.

Refs #8614
2026-11-17 14:32:34 +08:00
gengruilin 7b48297ea5 test(snapshots): refresh mcp-tool-loading for the current headless profile
The recorded runtime-context message, system prompt, and tool schemas follow
master's prompt wording, agent names, and the removed interrupt_agent tool.
2026-11-17 14:28:23 +08:00
zhc d22af04fbb refactor(client): expose reference insertion through SessionInput
Replace the public SessionInput.addFiles with addReferences, keeping the
attachment-carrying addFiles as a SessionInputShell method for drop and
paste. Conversation now owns the Session and composer-block editability
rule as an observable referenceInsertionAllowed, shared with quote
insertion, so the file context menu no longer duplicates it.
2026-11-17 14:25:38 +08:00
LegGasai c88d0c45a6 fix(session-panel): lay the section drag handle over the title row's end
The handle kept a 16px column in every title row, which shortened the room
for the title's trailing count whether or not the handle showed. It now
lies over the row's end, takes no room, and shows only while the pointer is
over the title row, while it has keyboard focus, and during a drag; the
trailing content stays in place and fades out under it.
2026-11-17 14:20:02 +08:00
gengruilin 1639647a51 Merge remote-tracking branch 'origin/feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-17 14:18:41 +08:00
LegGasai 6db6ff9be0 fix(ui-reference): retry a rejected mention stat and record presence trade-offs
A stat that rejects left its Session and path marked as outstanding, so the
mention stayed original text until reload. The flag now clears on rejection
and the rejection stays unhandled, so the Remote assembly fault is reported.

The README states why presence does not read the `file` resource through
`useResource`, that a symbolic link counts as present, and that a picked
candidate is confirmed only for the same Session and page load. The module
comment states that outstanding stats are unbounded. `openReference` and
`presenceFor` reuse `mentionPath` and `MentionSessionId`, and the Web scenario
drops a fixture write the scaffold already performs on refresh.
2026-11-17 14:15:01 +08:00
gengruilin b32c5e94ba test(snapshots): refresh mcp-oauth-error for classified MCP failures
The tool result carries the McpLocalError text and code unchanged since MCP
failures are classified, and the scenario's prompt and tool schemas follow
the current headless profile.
2026-11-17 14:13:42 +08:00
gengruilin 2f9b037fdd fix(mcp-client): answer the OAuth callback before route admission
Route admission requires a Peer for a route without auth, and Connection
refuses cross-site requests even for anonymous routes, so the authorization
server's redirect never reached the callback route. The callback is now a
webserver/request listener that handles only the redirect URI's own
authority and path and passes every other request on.
2026-11-17 14:13:40 +08:00
LegGasai e541ed3b5c feat(session-panel): let the reader drag sections into another order
Each section's title row is a native drag source with a grab cursor, and a
drag handle shows at its end, in the column of the rows' More buttons, while
the row is hovered or the handle has keyboard focus. Dragging a title row
dims its section and draws a line on the edge of the section under the
pointer where it would land; the arrow keys on the handle move a section
past its nearest shown neighbor and keep focus on the handle.

The order is one preference for every Session, persisted under
dsh.sessionPanel.sectionOrder as the ids of every live section. A section
registered after the reader arranged the others follows the section it
follows in the registered order.

The sections are positioned for the landing line, so the pin is positioned
above them to keep taking presses. Recorded accessibility trees gain the
handle's button in each section title row.
2026-11-17 14:12:57 +08:00
gengruilin 88e5e057f0 refactor(upstream-skills): register entry skills through the upstreamSkills Service
The package entry now default-exports the Host Service
`ctx.upstreamSkills` and exports only types. A CLI app plugin calls
`register` once with its entry skill and pinned upstream files; the
Service downloads the files, lists the entry skill through `ctx.skills`,
and withdraws both when the plugin unloads.

`skillsUrls` and `skillsTimeoutMs` are Service settings; `skillsDir`
stays a key of each plugin, passed in its registration. The base bundle
loads the Service, so the package gains locale metadata and leaves the
library and optional-package lists. Snapshot compositions that disable
the skill registry disable this row too.
2026-11-17 14:08:45 +08:00
Dudu-0223 0fdcff09b1 Merge pull request #8424 from deepseek-harness/fix/subagent-human-message
fix(subagent): 区分 agent 任务与真人消息
2026-11-17 14:06:25 +08:00
dsh-ci-bot d678678ef6 test(office): inline the conversion size check and drop the routing-text case
Review suggested keeping the byte-count comparison at the call site
instead of exporting a one-line filter with its own spec case, and
pointed out that the session snapshots already replay the routing body
so the added keyless case duplicated that guard. Both hold: inline the
comparison in the export case with the rationale in its comment, delete
deliveredConversions and its spec case, and drop the skill-office case.
2026-11-17 14:02:59 +08:00
Dudu-0223 327d5de8d6 Merge pull request #8121 from deepseek-harness/fix/cua-output-failures
fix(ptc): 输出超限后截断并继续执行
2026-11-17 13:59:03 +08:00
Dudu-0223 98dce25aad fix(ptc): guard output suppression during teardown 2026-11-17 13:46:07 +08:00
gengruilin a9c1f67a0b chore(upstream-skills): match the root version 0.2.2-rc.3 2026-11-17 13:18:17 +08:00
gengruilin 55bf412d0a Merge remote-tracking branch 'origin/feat/cli-account' into feat/upstream-skills 2026-11-17 13:17:51 +08:00
Dudu-0223 b0b5ad195f fix(subagent): restore misused-promises suppression and module graph 2026-11-17 13:07:43 +08:00
gengruilin f054f0f473 Merge remote-tracking branch 'origin/master' into feat/cli-account
Conflicts: docs/capability-seams.i18n.yaml and packages/README.i18n.yaml (pairing records, re-recorded from the merged pages).
2026-11-17 12:58:13 +08:00
LegGasai e6244c4cc9 docs(session-panel): record why a pinned panel has the transcript make room 2026-11-17 12:56:36 +08:00
LegGasai 506532c6d9 feat(session-panel): pin the panel so the transcript makes room for it
The panel gets a pin in its top end corner. While the pin and the docking
preference are on and the end gutter is narrower than the 348px that docks
the panel, the panel asks the Conversation body to keep that gutter free and
docks in it; neither Escape nor an outside press hides it. Below an 860px
Chat frame the body makes no room and the pinned panel is the overlay it was.

The plugin learns two facts from 1px probes that do not depend on the pin:
the gutter holds the panel as the transcript stands, and the transcript can
make that room. It offers the pin only where a press has an effect, and
unpinning a panel that only the pin kept beside the transcript leaves it
open as the overlay. The pin persists under dsh.sessionPanel.held; the
docking preference keeps its key and is named docks in the shared state.
2026-11-17 12:56:35 +08:00
LegGasai 7448d2180f feat(conversation): keep room free at the transcript's end on request
The Conversation body accepts an end reserve: a stylesheet sets
--dsh-chat-end-reserve on the body, and the scrollport pads its end so the
transcript column and the composer move aside until the space after the
column equals the reserve. The column keeps its width while the start gutter
lasts and narrows after that; a reserve that would leave it under 480px gets
no room, and --dsh-chat-end-reserve-max says how much the body can give.

The lengths derive from the scrollport's width, which the body now publishes
as --dsh-conversation-viewport-width, so the scrollport, the width handles,
and the Chat aside layer read the same values. The aside layer reaches back
across the inset and counts it in the end gutter it publishes. The width
handles do not show while the inset moves the column off the body's center,
and an embedded occurrence makes no room.
2026-11-17 12:56:34 +08:00
yixiangihsiang 9bbb0c3768 fix(client): tighten new-session gap to six pixels 2026-11-17 12:56:07 +08:00
Chinesezjc a7e061bbff Merge pull request #8339 from deepseek-harness/fix/ci-907c47c-fold-settle-wait
test(web): let the sampled fold transition settle before the next posture change
2026-11-17 12:51:36 +08:00
LegGasai 014d02b96c Merge remote-tracking branch 'origin/master' into fix/web-unresolved-at-mention
# Conflicts:
#	packages/client/ui-chat/tests/user-content.client.spec.tsx
#	packages/client/ui-conversation/tests/user-text-component-fixture.client.tsx
#	packages/client/ui-reference/src/client/FileReference.tsx
#	packages/client/ui-reference/src/client/index.ts
#	packages/client/ui-reference/tests/file-reference.client.spec.tsx
2026-11-17 12:50:52 +08:00
Dudu-0223 7622766814 feat(subagent): read model-selection setting at each call
Delegation and list_subagent_models read the Host subagent model-selection setting on every call instead of a per-Session policy event, so settings edits apply immediately in running, restored, and child Sessions. The released event type stays declared but is no longer written or read.
2026-11-17 12:50:15 +08:00
gengruilin d90f1b1b85 refactor(cli-account): register CLI apps through the cliAccounts Service
The package entry now default-exports the Host Service `ctx.cliAccounts`
and exports only types. A CLI app plugin calls `register` once with its
CLI, account, and Plugins page text; the Service adds the CLI path to
runtime context, runs the account operations, registers the account on
the Plugins page, and withdraws all of it when the plugin unloads.

`commandTimeoutMs` is one Service setting. The base bundle loads the
Service, so the package gains locale metadata and leaves the library
and optional-package lists.
2026-11-17 12:25:01 +08:00
dsh-ci-bot d9132ad861 test(office): judge the deliverable by the reported byte count
Review found that matching the recorded command text against the reported
temporary path only proved the command mentioned that path, while the
byte count carried the discrimination, and that a copy written with a
variable, a changed directory, or a relative name would fail the check
even though the deliverable was the same file. Match the reported size
only and keep the commands in the failure diagnostic.

Review also found that the Render-the-saved-deliverable message check
cannot fail: no repository text injects that instruction. Drop the new
message-only helper, restore the shared render-context assertion, and
leave the no-render rule to the routing guard in skill-office.spec.ts.
2026-11-17 12:24:49 +08:00
Chinesezjc 964850c001 Merge pull request #8459 from deepseek-harness/fix/ci-9ed2a7b-timeline-locale
test(timeline): pin the locale of language-dependent assertions
2026-11-17 12:17:28 +08:00
gengruilin 81b77f7675 Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-17 12:15:38 +08:00
gengruilin 0be2e7c995 chore(mcp-account): match the root version 0.2.2-rc.3 2026-11-17 12:04:28 +08:00
gengruilin dc0d1cc4d8 Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-17 12:03:44 +08:00
Huo Yaoyuan d065d01fec Windows CUA workaround for debugging VM timeouts and failures (#8464)
* Increase timeout

* Wait for another connectTimeout when idle

* Report failure to upstream

* Remove clipboard monitor

* Write exception log for cua helper failure

* Update comment and readme

* Truncate failure log

* Handle timeout

* Add coverage ignore
2026-11-17 12:02:20 +08:00
dsh-ci-bot 73040e0c53 test(office): name the reported conversion output in the spec header 2026-11-17 12:01:18 +08:00
LegGasai 0ae2613c98 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
The lower branch merged master, which added a fetch of the remote base branch
to worktree creation. On this branch a Session opened in a linked checkout can
create worktrees, and the fetch writes the Git directory that checkout shares
outside its root. The fetch now runs under the policy resolved after
`prepare`, which grants that directory, as the later writes do. A real-sandbox
test fetches from a linked checkout.
2026-11-17 12:00:08 +08:00
dsh-ci-bot f87111e279 test(office): return the recorded events as a readonly array 2026-11-17 11:47:34 +08:00
dsh-ci-bot 7a6bcf73cd test(office): assert the PDF export deliverable's conversion provenance
The export case asserted that the model loads no format skill, calls no
office_render, and runs no PDF parser command. Those assertions measure
model-selected extra steps on a sampled lane: run 44008246438 failed three
attempts on three different assertions while office_convert produced the
PDF in each one.

Judge the artifact instead: office_convert is called with format pdf, the
shell copies the temporary file the tool reported, the delivered bytes
match its reported size, the header is %PDF-, and the source is unchanged.
Extra inspection steps stay allowed.

Pin the routing rules the removed assertions proxied (operations need no
format skill; a PDF export is delivered without rendering) in a keyless
test, and cover the provenance helpers with their own negative examples.
2026-11-17 11:45:03 +08:00
yixiangihsiang a95d4ab7fe fix(client): reduce new-session bottom gap by two pixels 2026-11-17 11:42:32 +08:00
LegGasai 467afc4174 Merge remote-tracking branch 'origin/master' into refactor/deepseek-auth 2026-11-17 11:36:39 +08:00
yixiangihsiang de4801037b fix(client): normalize question card icon actions and indicators 2026-11-17 11:36:03 +08:00
LegGasai 53168773c2 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/persistence-schema.json
2026-11-17 11:35:50 +08:00
LegGasai 2decbbc718 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/subsystems/worktrees.i18n.yaml
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/src/worktree.ts
#	packages/experimental/tool-worktree/README.i18n.yaml
#	packages/experimental/tool-worktree/README.md
#	packages/experimental/tool-worktree/README.zh.md
#	packages/experimental/tool-worktree/src/index.ts
#	packages/experimental/tool-worktree/tests/loader-composition.spec.ts
#	packages/experimental/worktree/README.i18n.yaml
2026-11-17 11:25:21 +08:00
yixiangihsiang 0b95ec096b fix(client): right-align font size controls without empty column 2026-11-17 11:20:53 +08:00
Turtle 5f64a3c6d4 Merge remote-tracking branch 'origin/master' into turtle/rename-deepseek-api-ca2c0fb1df3e
Co-authored-by: Yudong Han <16971372+yudshj@users.noreply.github.com>

# Conflicts:
#	packages/llm/llm-deepseek-api-key/src/index.ts
2026-11-17 11:18:31 +08:00
yixiangihsiang 0e6c8928d8 fix(client): align file opener frame with pane glyph edge 2026-11-17 11:10:57 +08:00
LegGasai 58d8ccc11f Merge pull request #8256 from deepseek-harness/refactor/llm-route-credential
refactor(llm): publish DeepSeek route credentials through ctx.llm
2026-11-17 11:09:59 +08:00
winewill c0336fbdae fix(desktop): clean old command registration on relocation 2026-11-17 11:07:55 +08:00
yixiangihsiang 1408c8ce07 fix(client): balance sidebar navigation group whitespace 2026-11-17 10:52:15 +08:00
imccyu 20b83df745 Merge pull request #8445 from deepseek-harness/chore/cordis-loader-rc9
chore(cordis): sync loader 1.0.0-rc.9 and include 1.2.0
2026-11-17 10:51:08 +08:00
yixiangihsiang e28106978d Merge master into UI review refinements 2026-11-17 10:48:00 +08:00
Turtle 0f0cd323c4 test(liveshare): derive owner credential horizons from the real clock
The spec hardcoded a live horizon of 2026-11-14, which the host compares
with Date.now(), so it failed from that date on.

Fixes #8465

(cherry picked from commit 252959b3cd8e33c5691c85980cdc7bf305cc0a4b)
2026-11-17 10:25:16 +08:00
LegGasai c12f7ff609 test(terminal-bash): give Sessions without a header directory the sandbox root as their directory default
The sandbox policy bounds a Session by `ctx.workingDirectory.get`. Two tests
resolve the policy for a Session that records no directory and expect the
configured sandbox root, while their directory fixture defaulted to the launch
directory. The fixture now uses the same root, as a deployment that sets the
sandbox `workspaceRoot` sets the directory service's `defaultDirectory`.
2026-11-17 01:14:19 +08:00
LegGasai 0c8078e196 feat(forge): name worktree branches, start them from remote branches, and show changes being read (#8536)
* feat(forge): name worktree branches, start them from remote branches, and show changes being read

The New Session worktree option's base menu now searches local branches and
each remote's branches, pins the current branch and every remote's default
branch, and names each remote group by its repository. Its last row opens a
dialog that names the new branch, starting from `worktreePrefix` and checking
Git's branch-name rules; the Host refuses an invalid or taken name. A request
records the full ref of its base and the optional name; every attempt uses the
name.

A remote-tracking base is fetched first: the worktree service gains a
`fetch` request field and a `fetch` phase, fetching only that branch without
tags. A failed fetch leaves the message waiting with Retry, Use the last
fetched version, and Continue without a worktree; a taken name offers Rename.

While the changes view reads changes it has not shown yet, it says
"Reading changes" above file card placeholders, and the files menu names no
count.

* fix(worktree): forward only the declared create_worktree arguments

The create_worktree parameter object is open, and the tool passed it to the
worktree runtime unchanged. Now that a runtime request can ask to fetch, an
undeclared `fetch: true` from the model would have fetched, or refused a local
`from`. The tool now forwards only `name` and `from`, so it never fetches.

* docs(forge): say that only generated worktree branch names come from the Session id

* fix(forge): keep the collapsed change request status on one line

In the Session panel the collapsed card's number line kept every part at
full width inside a clipping row, so a narrow panel cut the most urgent
flag off without an ellipsis, such as "有冲突" after "3 项检查失败".

The number and status now form one MarqueeText line as wide as the row.
While the line with failed checks does not fit, they take the shorter
wording without their count; a line that still does not fit ends in an
ellipsis and crawls into view with the title while the pointer rests on
the card's head. The line measures again when its width or the fonts
change. Expanded cards keep their branch names as before.

* fix(forge): hide remote credentials and read the branch a tag shares its name with

The base menu named an unrecognized remote's group by its fetch URL as
`git remote -v` prints it, so a token in the URL, such as
`https://oauth2:glpat-...@gitlab.example/...`, reached the browser and showed
in the menu. The group now shows the URL without its user name and password.

Inspection read the checked-out branch with `symbolic-ref --short HEAD`,
which prints `heads/main` while a tag is also named `main`; the New Session
option then requested `refs/heads/heads/main` and every worktree attempt
failed. Inspection now reads the full ref and takes the name under
`refs/heads/`, so the option, the pinned current branch, and the checkout
row name `main`. HEAD that names a ref outside `refs/heads/` reads as no
branch.

* test(worktree): set up nested remotes and line endings the CI runners' Git accepts

Git 2.55 on the CI runners refuses `git remote add team` next to an
existing `team/fork` remote; the check runs only in `git remote add`, so
the longest-remote case now writes the second remote with `git config`, as
configuration written earlier or by hand holds it. The test clone also
turns off `core.autocrlf`, as `repository` does, because the Windows
runner's global setting checked the fetched file out with CRLF.
2026-11-16 16:13:00 +00:00
LegGasai efd4c8e44c Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
The lower branch now ignores stored `working-directory/change` events. On this
branch the sandbox test asserts that such an event moves neither the directory
nor the write boundary, the boundary upgrade guide says so again, and the
working-directory README drops the limitation about stored subdirectories.
2026-11-16 23:54:27 +08:00
Shigma 0fcc29cee0 fix(app-boot): apply the requested platform's path rules to include filenames 2026-11-16 23:52:08 +08:00
LegGasai ad70a73280 feat(working-directory): ignore stored working-directory/change events
Earlier releases recorded both a model's `cd` and an entered worktree as
`working-directory/change`, and a log cannot tell them apart. The fold kept
such a directory when it lay inside the Session's original project. That let a
stored `cd` into a subdirectory narrow the workspace once consumers follow the
directory, and dropped a worktree outside the directory a Session was opened in.

Readers now ignore the event: a stored Session resumes in its original project,
or in the directory of its last `workspace-root/change`, and returns to a
worktree through `enter_worktree`. The fold state is the directory alone (state
version 3), and the forge worktree fold reads only `workspace-root/change`
(state version 7). Tests and Web fixtures that simulated a Host move with the
old event record `workspace-root/change`.
2026-11-16 23:34:54 +08:00
LegGasai 7f7033b9a4 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-16 22:43:54 +08:00
LegGasai 5dfdf834d7 fix(session-controller): adopt a named Session requested through a symlinked directory
`session.create` records the canonical spelling of the project directory in the
Session header, and compared a later request's own spelling with it. A second
request for the same explicit Session id through a symlinked path, such as a
macOS temporary directory, failed with `session/conflict`.

The check now accepts the recorded spelling or one whose canonical form the
header records. The ACP image-offload expectation compares the model-visible
directory with the canonical spelling of the scenario directory.
2026-11-16 22:43:00 +08:00
LegGasai c9b9859b74 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
The lower branch removed `rootOf` and the `workspaceRoot` projection: a Session
has one directory, read through `ctx.workingDirectory.get`. This merge moves the
consumers of this branch to that read.

- sandbox-policy, workspace-files, and workspace-changes read `get`; the
  `recordedRootOf` read is removed. With the working-directory service mounted,
  a Session without a header directory is bounded by that service's default
  directory.
- The skill catalog, sidebar terminals, project instructions, `@` file
  candidates, the LSP workspace, and skill lookup return to the lower branch's
  code, which already reads the directory.
- The client helper exports `selectSessionDirectory` and `sessionDirectory`
  in place of the `{ root, cwd }` pair; `WorkspaceChangesSummary` keeps `cwd`,
  now the directory the turn started in.
- A stored `working-directory/change` inside the project moves the write
  boundary and file views with the directory; one outside returns to the project.
2026-11-16 22:33:13 +08:00
LegGasai 219f27c927 Merge branch 'refactor/llm-route-credential' into refactor/deepseek-auth
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/experimental/translator/package.json
#	packages/experimental/translator/tests/paid-fixture.ts
#	packages/llm/llm/README.i18n.yaml
#	packages/web/web-deepseek-api/src/index.ts
2026-11-16 21:47:49 +08:00
LegGasai f9513796b8 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-16 21:36:56 +08:00
LegGasai 328d6204a8 refactor(working-directory): converge on one directory read
`get(session)` is the only read of a Session's directory again. `rootOf` and
the `workspaceRoot` projection are removed: the directory relative paths
resolve from is the workspace root.

The difference the second read expressed lives in the `workingDirectory` fold.
`workspace-root/change`, the event Host moves record, sets the directory. A
stored `working-directory/change`, whose directory the model could choose, sets
it only when the directory lies inside the Session's original project; a
directory outside the project returns the Session to the project, and the next
request's context reports it. The fold state gains the original project, so
its state version is 2. The forge worktree fold reads stored changes by the
same rule.

The subagent manager resolves a child's directory as on master. The compaction
snapshot fixture records its fixed directory as a Host move.
2026-11-16 21:36:30 +08:00
Kaige-Gao def0a65688 test(web): select draft word with a native pointer gesture 2026-11-16 21:23:56 +08:00
LegGasai d36dbee3d6 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/web/web-deepseek-api/src/index.ts
2026-11-16 21:23:43 +08:00
_Kerman cd0252b813 Merge pull request #8289 from deepseek-harness/xtr/content-to-text
refactor(llm): 统一内容块文本提取
2026-11-16 20:58:31 +08:00
Kaige-Gao 4430bb0ccf fix(client): refresh file reference menus on locale changes 2026-11-16 20:55:19 +08:00
ZiyaZhang 08100ed704 fix(action-cards): read list-item fences and let unreadable cards be dismissed
The scanner now recognizes a fence that starts on a list item's marker line
and closes it by the item's content column, so its closing line no longer
opens a fence that hides a later card; card blocks in list items count.
Card bodies receive the frame's dismiss-only fallback and render it when
their schema rejects the card's details, so such cards can be dismissed.
The experimental package table no longer mentions the removed proposal tool.
2026-11-16 04:52:12 -08:00
_Kerman 9e8b32e3f1 Merge master and preserve forge command rules during text extraction 2026-11-16 20:29:36 +08:00
Ziya ffea1cb57a Merge pull request #8540 from deepseek-harness/feat/schedule-weekly-review-recommendation
feat(ui-schedule): recommend a weekly review task
2026-11-16 04:17:38 -08:00
Shigma 11f155707f chore(cordis): backport include unresolved-alias locations from upstream 2026-11-16 19:59:42 +08:00
ZiyaZhang 8cbd73efff feat(ui-schedule): scope the weekly review to the user's own work
The weekly review request now asks for what the user did in the current
workspace this week. In a code repository it looks only at the user's
commits this week and the pull requests the user opened that merged this
week or are still open, instead of every commit and pull request in the
repository. The tile description follows the same scope in all eight
languages.
2026-11-16 03:48:59 -08:00
ZiyaZhang f3ace86cd7 Merge remote-tracking branch 'upstream/master' into feat/action-cards-without-tool
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/tool-catalog.i18n.yaml
#	packages/core/tools/tests/gen-tool-catalog.spec.ts
2026-11-16 02:27:35 -08:00
yixiangihsiang ef382ce966 refactor(client): inline terminal glyph and simplify fixed spacing 2026-11-16 18:27:31 +08:00
winewill 45d6ae9ff2 fix(desktop): handle long paths during upgrade uninstall 2026-11-16 18:25:53 +08:00
ZiyaZhang 918b182115 refactor(action-cards): keep the line scanner and drop older-Session cards
- Read action-card blocks with the line scanner again: top-level fences
  only, with no Markdown parser dependencies. The browser preview's worker
  resolved the parser's DOM build and could not enable the bundle, and
  deeply nested answers overflowed the parser's stack.
- The Chat client hides every action-card block again, without a JSON
  check.
- Drop cards of propose_action calls in older Sessions, the reading of
  callId decision records, and the tool row for those calls.
- The two skills put the invitation sentence right before the block
  instead of ending the text with it.
- Document the blocks the Host and the client treat differently, update
  the upgrade guide, READMEs and generated catalogs.
2026-11-16 02:25:41 -08:00
Kaige-Gao 3749375caf test(web): await committed selection before file menu action 2026-11-16 18:21:36 +08:00
Huo Yaoyuan 077a9cde0b feat(cua): add toggleMouse with initial Windows support (#8425)
* feat(cua-windows): implement window-level mouse button toggles

* Update guidance

* Fix prompt test
2026-11-16 18:10:15 +08:00
Shigma a99b811912 Merge remote-tracking branch 'origin/master' into chore/cordis-loader-rc9
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-11-16 18:05:14 +08:00
LegGasai 23734da2b6 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
master moved the `workingDirectory` projection-key declaration to
`src/types.ts`; this branch's `workspaceRoot` key follows it there. The three
recorded scenarios master added (`session-list-tools`,
`computer-use-cua-driver-mcp-ptc`, `sdk/subagent-dsh-sdk-empty-route`) drop the
removed `working_directory` tool and the delegation `cwd` parameter from their
sidecars.
2026-11-16 17:59:21 +08:00
Shigma db36473372 fix(app-boot): resolve drive-letter include paths as Include does 2026-11-16 17:55:56 +08:00
Dudu-0223 b94bebc75d Merge pull request #8238 from deepseek-harness/feat/session-list-tools
feat(session): add read-only workspace and session list tools
2026-11-16 17:53:24 +08:00
Dudu-0223 2ae2e8b413 docs(subagent): move upgrade guide to current release 2026-11-16 17:48:47 +08:00
Dudu-0223 dacd257e77 Merge master and resolve subagent context snapshot conflicts 2026-11-16 17:42:38 +08:00
Dudu-0223 b8642db2bc Merge master and refresh tool catalog pairing record 2026-11-16 17:41:12 +08:00
Dudu-0223 f70ec1ac46 Merge pull request #8348 from deepseek-harness/feat/subagent-report-guidance
feat(subagent): tell delegated agents to report results with send_message
2026-11-16 09:35:17 +00:00
Dudu-0223 1de452556a Merge remote-tracking branch 'origin/master' into pr8424-delegation-context
# Conflicts:
#	scripts/snapshots/python-sdk-single-exe/advanced/session.1.v4.jsonl
#	scripts/snapshots/python-sdk-single-exe/advanced/session.2.v4.jsonl
2026-11-16 17:31:35 +08:00
Dudu-0223 0fb2b5c1cd docs(subagent): document parent-attributed initial tasks
Update the in-process provider READMEs and add an upgrade guide for the initial task source change.
2026-11-16 17:18:07 +08:00
Kaige-Gao 6e7755c19e Merge master into file context menu branch 2026-11-16 17:14:32 +08:00
gengruilin 98bdd99baf chore(cli-account): match the root version 0.2.2-rc.3 2026-11-16 17:14:25 +08:00
Shigma 897de8769b fix(app-boot): audit rejected entry options and isolate dump snapshots 2026-11-16 17:11:48 +08:00
gengruilin d4a64240ba Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-11-16 17:11:24 +08:00
LegGasai 074889ed60 refactor(deepseek-auth): take each model route's id from the plugin that connects it
The service held a table of the two DeepSeek route ids, which are ids of
its consumers. connect() now takes the provider route its plugin
registers, and routeKind() answers the kind connected under that id, so
the service names no route.

A conversation recorded on deepseek-account or deepseek-official whose
route plugin is not mounted is ordered as any other route: the API key,
then the account sign-in. Before, such a conversation tried only the API
key. With both route plugins mounted the order is unchanged.
2026-11-16 17:03:46 +08:00
LegGasai 13470d59f4 refactor(credentials): leave the wording of an unusable API key to its callers
dsh-credentials stores and reads credentials, and its unusableApiKeyMessage
named the Models page, a page of its consumers. The package keeps
normalizeApiKey, which answers the trimmed key or the reason a key cannot
be used, and exports no diagnostic text.

DeepSeek request authentication and llm-pi-ai each word the failure for
that reason. Both texts are unchanged, and each caller's tests assert its
text in full.
2026-11-16 17:03:45 +08:00
Turtle e9bdd54bc2 docs(web): state why notification copy is height-bounded 2026-11-16 16:57:38 +08:00
Dudu-0223 0204d50e37 fix(tool-session-list): keep list_workspace execute synchronous
An async arrow without await fails the type-aware require-await lint rule.
2026-11-16 16:57:00 +08:00
Ruilin Geng 3bb841937b Merge pull request #8080 from deepseek-harness/feat/connector-accounts
feat(connector-account): 插件页连接器账号共用的 Host 注册表与界面
2026-11-16 16:54:50 +08:00
Turtle 4002caa7ea fix(web): float account notifications over the session list
The settings.notice row takes no height and anchors its content above the
launcher row at full width, so a notification no longer shortens the
session list while status indicators still cannot narrow it.
2026-11-16 16:53:15 +08:00
Kaige-Gao 712292efa8 feat(client): add file references from context menus 2026-11-16 16:46:28 +08:00
Turtle 44c38200d8 Merge pull request #8550 from deepseek-harness/turtle/add-stale-pr-action-ca3ec638c590
feat(ci): close pull requests after 21 days without activity
2026-11-16 16:43:55 +08:00
yixiangihsiang 3eb87e5ada Merge latest composer attachment fix and isolate UI geometry documentation 2026-11-16 16:43:23 +08:00
imccyu ba7563301c Merge pull request #8450 from deepseek-harness/fix/composer-draft-attachments-switch
fix(client): keep composer draft attachments across session switches
2026-11-16 16:32:23 +08:00
yixiangihsiang e74b527c68 fix(client): match team menu chevron to its state text 2026-11-16 16:23:24 +08:00
Turtle 2703c9dcc9 fix(web): rebind notification card scrollbar colors to its elevated surface 2026-11-16 16:17:07 +08:00
Turtle e8473dbb60 fix(ci): require a closing notice and retry failed closes 2026-11-16 16:06:37 +08:00
yixiangihsiang 8cdcbd2b73 Merge master into UI refinements and preserve current component layouts 2026-11-16 16:03:12 +08:00
Turtle fe1d4c2cd7 fix(web): keep the notification slot name and bound card copy height
Keep settings.launcher.notifications so existing plugins still register
into it. Long notification copy scrolls inside the card so the account row
stays in short windows. Cover the shell's settings.notice declaration and
document it in the settings shell README.
2026-11-16 15:59:43 +08:00
Turtle 00dcb5ec10 fix(ci): close stale pull requests before commenting 2026-11-16 15:56:40 +08:00
Turtle d245f8e285 feat(ci): close pull requests after 21 days without activity
Refs #8432
2026-11-16 15:55:46 +08:00
Turtle 4ba4a5eb54 fix(web): give account notifications their own sidebar row
Status indicators beside the account launcher narrowed the notification
card because it was positioned inside the launcher. The settings shell now
renders a settings.notice row above the launcher row, and account settings
places the notification slot (renamed settings.notice.notifications) there.

Refs #8547
2026-11-16 15:49:17 +08:00
Shigma a85b27fdd4 fix(cordis): address loader rc.9 review and CI findings 2026-11-16 15:46:58 +08:00
gengruilin 1e4b19e78e chore(connector-account): match the root version 0.2.2-rc.3 2026-11-16 15:35:37 +08:00
LegGasai 07dc56a3be Merge branch 'refactor/llm-route-credential' into refactor/deepseek-auth 2026-11-16 15:34:29 +08:00
gengruilin 88c0f6710a Merge remote-tracking branch 'origin/master' into feat/connector-accounts
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/capability-seams.md
#	docs/capability-seams.zh.md
#	packages/bundle/web-app/cordis.patch.yml
#	packages/client/README.i18n.yaml
#	packages/experimental/liveshare/src/endpoint-classification.ts
2026-11-16 15:33:50 +08:00
Shigma dd892782af Merge remote-tracking branch 'origin/master' into chore/cordis-loader-rc9 2026-11-16 15:32:28 +08:00
ZiyaZhang 3e42e0f617 feat(ui-schedule): recommend a weekly review task
The empty automation page lists an eighth built-in recommendation,
Weekly review, after Daily brief. Its request asks for a Friday 16:00
task that reviews the week's changes in the current workspace, lists
unfinished work and what to do first next week, covers commits and pull
requests when the workspace is a code repository, and summarizes in the
conversation without changing workspace files. Its tile draws a
calendar with a check in the style of the other glyphs, and the copy
covers all eight UI languages.
2026-11-15 23:26:13 -08:00
gengruilin 6bb530211a refactor(connector-account): type the face from the generated Remote and return its results
`ConnectorAccountsRemote` repeated the signatures typert generates for
`ctx.remote.connectorAccounts`, and `settle` turned a failed Remote result
back into a rejection. The face now types `start` and `cancel` from
`ClientRemote['connectorAccounts']` and returns the Remote result. The
buttons read `ok` and report a failed result or a rejected call as the
failure notice, so the page behaves as before.
2026-11-16 15:26:01 +08:00
mektpoy 89ee384d4b docs(notes): cite issue #5070 as plain text in the draft attachment note 2026-11-16 15:17:55 +08:00
mektpoy 65543a5f87 fix(client): release only submitted draft attachments on composer teardown
- Host 接受消息后,附件立即退出会话归属,注册表仍保留到回显结算;
  切回不再把已发出的附件放回输入框,刷新标记也不再误报。
- 输入框退役时只在「消息或命令已经提交」时释放附件;被中止的斜杠行裁决
  不会发出消息,附件随草稿保留。
2026-11-16 15:17:55 +08:00
mektpoy df7a21330c fix(client): keep draft attachments across session switches
切到另一个会话再切回时,附件栏被清空而文字保留(#5070):会话 scope 销毁时
会释放退役输入框持有的全部附件并回收图片预览。

- ConversationController 记录每个草稿附件所属的会话;退役的输入框只在发送在途
  或会话已删除时释放附件,其余情况保留登记,下一个输入框按顺序接回。
- 切走期间上传照常进行,失败的上传切回后仍可原位重试。
- 没有挂载输入框时被删除的会话,由 hub 的会话目录监听释放其附件。
- 刷新不恢复附件:pagehide 时为仍持有附件的会话写标记,重新挂载且没有已登记附件时
  提示「部分草稿附件已失效,请重新添加」;往返缓存恢复时清除标记。
2026-11-16 15:17:55 +08:00
LegGasai a1c0299977 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential 2026-11-16 15:17:39 +08:00
winewill c3bfc6ef85 fix(desktop): simplify uninstall location confirmation 2026-11-16 15:13:50 +08:00
ZiyaZhang 052a931bb4 Merge remote-tracking branch 'upstream/master' into feat/action-cards-without-tool
# Conflicts:
#	snapshots/web/creation-recommendations/tool-schemas.expected.json
#	snapshots/web/plugin-recommendations/tool-schemas.expected.json
2026-11-15 23:02:53 -08:00
ZiyaZhang 0ee96fac04 fix(action-cards): read card blocks with the Chat client's Markdown grammar
- The Host finds action-card blocks with mdast-util-from-markdown plus the
  GFM and math extensions the Chat client uses for settled answers, so a
  block offers a card exactly when the client dispatches it to the card
  layer. Only text with an opening fence that can start the card language
  is parsed.
- The card block layer shows a settled block whose content is not JSON as
  plain code instead of hiding it.
- Sessions recorded with propose_action calls show their tool row again.
- Add the upgrade guide for the removed tool, the ignored
  queuedMessageLimit field and the callId to cardId rename.
- Update package READMEs, package descriptions and generated catalogs.
2026-11-15 23:02:13 -08:00
LegGasai 8b85f4cf65 fix(infra): mount DeepSeek authentication in the tool catalog generator
The generator mounts the DeepSeek Search and Fetch provider beside the web
tools. That provider requires ctx.deepseekAuth, so without the service it
never started. The generator mounts the service first.

The generated tool catalog is unchanged: the web tools' schemas do not
depend on which provider is registered.
2026-11-16 14:54:48 +08:00
Dudu-0223 e592b98576 Revert "fix(subagent): follow delegated task attribution in consumers"
This reverts commit 7f98d159774fc837953e424f7ab16193a08028d2.
2026-11-16 14:53:38 +08:00
LegGasai 251e3300a4 Merge pull request #7990 from deepseek-harness/feat/session-panel-sections
feat(panel): move change requests, jobs, and subagents into the Session panel
2026-11-16 14:45:47 +08:00
Dudu-0223 7b280838a1 fix(subagent): follow delegated task attribution in consumers
Recognize parent-attributed creation prompts in auto-review and document the attributed initial task in the in-process provider READMEs.
2026-11-16 14:43:49 +08:00
LegGasai a2b6b12429 Merge branch 'refactor/llm-route-credential' into refactor/deepseek-auth 2026-11-16 14:41:57 +08:00
liukx0205 2be76f92a2 test(session): report legacy opener failures on stderr
The two-process suite asserts only the error name; the message and cause now
reach the inherited stderr so a CI failure identifies the SQLite error.
2026-11-16 14:41:50 +08:00
liukx0205 50ea9a6d53 test(session): exclude the SQLite POSIX lease from Windows coverage
The SQLite copy of the session write lease executes its POSIX face only off
Windows, matching the JSONL exclusion.
2026-11-16 14:41:50 +08:00
liukx0205 107cc67d9d test(session): adapt storage coverage to the current SQLite backend 2026-11-16 14:41:50 +08:00
liukx0205 fa1fe0dc4a test(session): align coverage with the latest SQLite implementation 2026-11-16 14:41:50 +08:00
liukx0205 9e0c4674b0 test(session): cover SQLite persistence and document the provider 2026-11-16 14:41:50 +08:00
LegGasai 8eda7cfb7c Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	scripts/empty-catch.baseline.json
2026-11-16 14:36:05 +08:00
Dudu-0223 8ca5019928 fix(subagent): state human authorship in delegation context
Replace the per-message human prefix with one sentence in the child delegation context, so direct human messages keep their original content in logs, UI, titles and exports.
2026-11-16 14:28:35 +08:00
Dudu-0223 8be1b3f5b1 Merge pull request #8524 from deepseek-harness/fix/subagent-empty-route-fields
fix(subagent): accept empty route fields and clarify child model selection guidance
2026-11-16 14:22:40 +08:00
Dudu-0223 c4cc4a1594 refactor(subagent): check empty route fields with a per-field hasText predicate
Match the per-tool, per-field rule from the unambiguous tool argument
decision and record the subagent case there.

Refs #8523
2026-11-16 14:03:52 +08:00
LegGasai ada1b30e89 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings the merged `enter_worktree` tool. The decision note keeps this layer's
consequences and the parent's wording for the tool, and the boundary upgrade
guide names `enter_worktree` where it named `create_worktree`.
2026-11-16 13:43:58 +08:00
ZiyaZhang 945d00378c feat(action-cards): offer cards from action-card blocks in answers instead of a tool
The kind skills tell the model to end its answer with an `action-card`
fenced block. The card projection reads the first valid block of a turn
from the answer text and names the card by its assistant message id; it
still reads `propose_action` cards and `callId` decision records of older
Sessions. The Web plugin hides the block through the Chat Markdown fence
slot, and the card still appears below the answer.

Removes the `propose_action` tool, its skill-load tracking and the
`queuedMessageLimit` configuration, and renames card ids to `cardId`.
2026-11-15 21:42:35 -08:00
Dudu-0223 1f2bd4d33c test(subagent): record empty route fields and the discovery hint through the SDK profile
Share empty-string handling between subagent and list_subagent_models, and
simplify the reasoning_effort description.

Refs #8523
2026-11-16 13:32:41 +08:00
LegGasai 33371b069e feat(worktree)!: merge create_worktree into enter_worktree
The model has one tool for entering a worktree, as Claude Code's
EnterWorktree: `enter_worktree({ name?, from? })`. When the pool of the
checkout the Session is in holds a registered worktree of that name, the call
enters it and changes neither Git state nor files. Otherwise it creates a new
branch and checkout from `from`, HEAD by default, and enters it. `from` asks
for a new worktree, so it fails with `WORKTREE_ALREADY_EXISTS` when the name is
taken; a call without a name always creates one. The result adds `created`.

`create_worktree` is removed. `ctx.worktrees.create` and `enter` keep their
behavior: the tool calls `enter` first and `create` only on
`WORKTREE_NOT_FOUND`, so Host callers such as the forge panel still create.

The upgrade guide `create-worktree-tool-merged` covers the removed tool name.
2026-11-16 13:32:27 +08:00
Dudu-0223 01aafcb4e9 docs(session): address remaining list tool review notes
- Name the model-visible page limits once and derive the schema text from them.
- Type the intermediate Session rows and make list_workspace's execute async.
- Document that blank Sessions are listed and that unscoped listing has unit
  coverage only.
- State that the Workspace registry adds no model-visible surface of its own
  while the optional listing tools expose its metadata.
2026-11-16 13:25:42 +08:00
Dudu-0223 a65aacaa6a fix(session): follow sessionQuery's projection dependency and rc.3 version
- SessionReferenceResolver injects sessions and sessionProjections, which
  sessionQuery now requires; its absent-registry label branch is unreachable
  and is removed.
- The translator paid fixture mounts the projection registry beside its
  SQLite query service.
- dsh-tool-session-list follows the master release version 0.2.2-rc.3.
2026-11-16 13:21:21 +08:00
Dudu-0223 1851e875f4 feat(tool-session-list): show complete call arguments on tool cards
list_session showed only workspace_id and list_workspace showed no input, so
calls that differ in archived, limit, or offset rendered identical cards.
2026-11-16 13:07:46 +08:00
Dudu-0223 198efd16f6 fix(subagent): say when to set child route fields and where provider ids come from
Refs #8523
2026-11-16 13:04:48 +08:00
Dudu-0223 08e5a9b059 Merge remote-tracking branch 'origin/master' into fix/cua-output-failures
# Conflicts:
#	apps/cli/tests/profiles/cua-mcp/expected/tools.json
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/ptc-runtime/ptc-runtime-node/README.i18n.yaml
#	packages/ptc-runtime/ptc-runtime-node/README.md
#	packages/ptc-runtime/ptc-runtime-node/README.zh.md
#	packages/ptc-runtime/ptc-runtime-node/src/bootstrap.ts
#	packages/ptc-runtime/ptc-runtime-node/src/process.ts
#	packages/ptc-runtime/ptc-runtime-node/src/protocol.ts
#	packages/ptc-runtime/ptc-runtime-node/tests/bootstrap.spec.ts
#	snapshots/sdk/cua-run-code/tool-schemas.expected.json
#	snapshots/session/cua-run-code-ptc/system-prompt.expected.md
#	snapshots/session/cua-run-code-scoped/tool-schemas.expected.json
#	snapshots/session/cua-run-code/tool-schemas.expected.json
#	snapshots/session/ptc-persistent-scoped/tool-schemas.expected.json
#	snapshots/session/ptc-persistent/tool-schemas.expected.json
#	snapshots/session/ptc-reset/tool-schemas.expected.json
#	snapshots/session/ptc-scoped-repl/tool-schemas.expected.json
#	snapshots/session/ptc-timeout-fallback/tool-schemas.expected.json
2026-11-16 12:43:20 +08:00
Turtle f08cd7c4b1 Merge pull request #8529 from deepseek-harness/turtle/shrink-delete-task-dialog-d75d0c08f86f
fix(ui-schedule): clamp the task instruction in the delete confirmation
2026-11-16 12:40:25 +08:00
Dudu-0223 a977522f4e Merge remote-tracking branch 'origin/master' into pr8238-review
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	docs/tool-catalog.i18n.yaml
#	packages/api/session-controller/tests/listeners.host.spec.ts
#	packages/api/session-controller/tests/state-controller.host.spec.ts
#	packages/api/session-controller/tests/transport.host.spec.ts
#	scripts/product-package-policy.ts
2026-11-16 12:34:08 +08:00
gengruilin 1073c11754 fix(cli-account): contain what an account observer throws
`CliAccountRuntime` called its observers without catching what they
throw. A throwing observer kept the later observers from being called,
and its exception reached the code that had changed the view: `start`
threw although the operation had begun, and an operation failed when its
`publish` or `stage` call notified that observer. When the throw came
from the notification that settles an operation, the operation's promise
rejected with nothing awaiting it, and the Host exits on an unhandled
rejection.

The runtime now logs what an observer throws and continues, so the other
observers are still called and the operation or call that changed the
view is unaffected.
2026-11-16 12:26:52 +08:00
Turtle 843fc0fa24 Merge pull request #8428 from deepseek-harness/turtle/clean-empty-catch-69cac4a2ccee
fix: retire the legacy empty-catch baseline
2026-11-16 12:16:11 +08:00
Turtle 56bcba2574 test(ui-schedule): assert every declaration the prompt clamp needs 2026-11-16 12:09:13 +08:00
Turtle e65560503a Merge pull request #8518 from deepseek-harness/turtle/fix-sidebar-scroll-c22e7e84e865
fix(sidebar-right): scroll the Start guide in a short pane
2026-11-16 12:05:47 +08:00
Turtle 909e6533f8 fix(ui-schedule): clamp the task instruction in the delete confirmation
A long instruction stretched the delete confirmation to nearly the full
viewport. Show it as a three-line secondary excerpt instead.

Refs #8453
2026-11-16 12:03:25 +08:00
Turtle cb92e8d6cf Merge remote-tracking branch 'origin/master' into turtle/clean-empty-catch-69cac4a2ccee 2026-11-16 12:01:22 +08:00
Dudu-0223 79015b174c refactor(session): move list metadata to sessionQuery and query Workspace headers
Address review on #8238:

- Replace the Workspace.sessionHeaders property with getSessionHeaders(). The
  public contract states only membership and order; the in-memory header index
  is documented on the implementation.
- SessionQueryEngine now injects sessionProjections, registers the
  sessionListMetadata projection in Service.init, and exposes
  getListMetadata(session). Disposing the service releases the registration.
  The Session API and list_session read metadata through ctx.sessionQuery;
  registerSessionListMetadata and the passed reader closure are removed.
- SqliteSessionQueryEngine injects sessionProjections and chains Service.init.
- Tests: a newly attached Session appears in a later getSessionHeaders()
  result; query-service disposal removes the projection; test query services
  run Service.init; projection-order expectations follow the new registration
  order.
2026-11-16 11:59:34 +08:00
Dudu-0223 42849bcf42 test(subagent): expect the list_subagent_models hint in SDK effort-only rejection 2026-11-16 11:32:27 +08:00
Dudu-0223 7c2ca7cb6e fix(subagent): treat empty route fields as omitted and point rejections to list_subagent_models
Fixes #8523
2026-11-16 11:19:25 +08:00
Turtle b35eaa2f64 Merge pull request #8484 from deepseek-harness/turtle/fix-huge-markdown-freeze-ab12e311d02d
fix(deps): upgrade Markdown parsers to remove quadratic table and list parsing
2026-11-16 11:14:06 +08:00
Turtleandoraluben 79487993e7 docs(sidebar-right): describe the scrolling Start guide; restore the e2e viewport in finally
Co-authored-by: oraluben <5031346+oraluben@users.noreply.github.com>
2026-11-16 10:51:22 +08:00
Turtleandoraluben 00b9fef246 fix(sidebar-right): pad the scrolling Start guide and cover it in e2e
Co-authored-by: oraluben <5031346+oraluben@users.noreply.github.com>
2026-11-16 10:40:18 +08:00
Turtleandoraluben d17304556b fix(sidebar-right): scroll the Start guide when it outgrows a short pane
Co-authored-by: oraluben <5031346+oraluben@users.noreply.github.com>
2026-11-16 10:32:02 +08:00
Chinesezjc 6cdae4cf2a Merge pull request #8500 from deepseek-harness/fix/ci-db3969f-native-watch
test(workspace-files): arm the native watch before real-watcher mutations
2026-11-16 02:26:13 +08:00
dsh-ci-bot 7f4642a797 test(workspace-files): arm the native watch before real-watcher mutations 2026-11-16 02:12:34 +08:00
gengruilin c83b076936 chore(feishu): pair the install-script exemption with the pinned CLI version
The `@larksuite/cli@1.0.97` key in `pnpm-workspace.yaml` has to follow the version `packages/connector/feishu/package.json` pins, or a bump re-triggers the pending install script in repository installs; the comment now says so.
2026-11-16 01:15:15 +08:00
gengruilin c3e322e3b0 docs(tencent-docs): attribute systemPrompt to the base bundle and count the guidance sentences
The README said `dsh-web-app` provides both `mcpManager` and `systemPrompt`; the base bundle mounts `system-prompt`, and `dsh-web-app` only adds the MCP manager. The Model Experience section called the three-sentence guidance two sentences and then one sentence. The jscpd marker names its twins, `dsh-notion` and `dsh-linear`.
2026-11-16 01:15:14 +08:00
gengruilin 9b9be2a540 test(linear): answer only issued tokens in the OAuth fixture and cover the credential-key conflict
The Web e2e fixture answered `/mcp` to any `Authorization` header while its header comment promised the issued token, and it folded handler errors into bare 500 responses. It now accepts only tokens it issued, records handler failures for the scenario to assert, and states why its MCP answers are hand-written: `apps/web` carries no MCP SDK dependency. `plugin.spec.ts` covers a configured server that already owns `mcp-client/linear`, the second load-time conflict the README and JSDoc name.

The README attributes `systemPrompt` to the base bundle instead of `dsh-web-app`, counts the guidance as three sentences, and cites Linear's documentation for the paid-workspace approval limitation. The jscpd marker names its twins, and the headless snapshot comment states that an empty authorization list means the fixture received no request.
2026-11-16 01:15:12 +08:00
imccyu 1b7674107a Merge pull request #8498 from deepseek-harness/fix/undeclared-hoisted-deps
fix(build): resolve undeclared hoisted dependencies from declaring packages
2026-11-16 01:02:47 +08:00
imccyu 3b55cf3525 fix(build): resolve undeclared hoisted dependencies from declaring packages
Resolve the bundled buffer import in webworker-runtime and the Mermaid
component plus vue in the website from their declared dependencies, so
builds no longer rely on pnpm hoisting undeclared dependencies.

Fixes #8497
2026-11-16 00:50:38 +08:00
TurtleandYudong Han e8c52c0a57 test(web): refresh onboarding-native golden for DeepSeek API label
Co-authored-by: Yudong Han <16971372+yudshj@users.noreply.github.com>
2026-11-15 20:56:13 +08:00
TurtleandYudong Han 3463991902 feat(llm): label the API-key DeepSeek provider as DeepSeek API
Refs #8489

Co-authored-by: Yudong Han <16971372+yudshj@users.noreply.github.com>
2026-11-15 20:47:15 +08:00
LegGasai 194acf0d82 docs(deepseek-auth): show the service in composition examples and correct two records
The minimal compositions in the dsh-llm, dsh-web, and dsh-tool-web READMEs
mount a DeepSeek route or the DeepSeek web backend, which start only beside
the authentication service. Each example gains its row and one sentence
that says why.

The decision record said both web providers report a route whose settings
do not resolve as WEB_PROVIDER_MISCONFIGURED. Messages search reports
WEB_PROVIDER_ERROR, and only the Search and Fetch APIs word their failures
from the candidates.

The upgrade guide again states that the account route plugin owns the
sign-out cancellation and that the account package drops its dsh-agent and
dsh-llm peer dependencies.
2026-11-15 19:55:04 +08:00
LegGasai 33f96825e4 test(sdk-server): cover the fallback route beside authentication the composition mounts
The SDK server mounts the DeepSeek authentication service with its fallback
official route only when the composition has none. No test reached the
other branch, a composition that mounts the service without the route, so
the per-file coverage gate reported it. The test also states what the
server removes at shutdown: the route always, the service only when the
server mounted it.
2026-11-15 19:37:02 +08:00
LegGasai 0c4a626ebf test: mount the DeepSeek authentication service in the web tool test and pin its sdk-minimal row
The web tool integration test mounts the Search API provider by hand. The
provider requires ctx.deepseekAuth, so without the service it never
registered and web_search failed. The test mounts the service first.

The built dsh smoke test pins the exact rows of the sdk-minimal profile; it
gains the deepseek-auth row the bundle carries.
2026-11-15 19:28:16 +08:00
LegGasai 9b82fbb1c0 docs: regenerate the module graph for the DeepSeek web providers
The graph still drew the web providers' edges to dsh-llm, the account
service, and the launch environment, which they dropped when they began to
ask ctx.deepseekAuth.
2026-11-15 19:10:54 +08:00
LegGasai d5c9f8555f feat(deepseek-auth): ship display metadata and join the Python runtime closure
The base bundle mounts the authentication service, so the Plugins page
lists it and verify-locale-metadata requires its title and description in
every shipped language. The package exports and publishes locale/*.json as
its sibling plugin packages do.

The Python SDK runtime deploys an explicit dependency closure. The DeepSeek
routes, the web providers, and the SDK server it ships require the service,
so the closure names it; verify-runtime-closure rejected the manifest
without it.
2026-11-15 19:10:53 +08:00
LegGasai f87ac77a60 fix(deepseek-auth): look up a route's billing kind by its own entries
routeKind() indexed an object literal with the route id, so an id equal to
a name every object inherits, such as "constructor", answered that
inherited member instead of undefined. A provider id is user configuration
and reaches this lookup from Session logs. The table is a Map, which holds
only its own entries.

DeploymentError is declared before the service that throws it.
2026-11-15 19:10:52 +08:00
LegGasai e6814204fd docs: regenerate catalogs and graphs for the DeepSeek authentication consumers
The config catalog listed the two DeepSeek web providers without their
deepseekAuth injection, and the persistence catalog and the event table
pointed at line numbers of dsh-llm sources from before the credential
types left them. The capability seam table listed the web providers as
consumers of ctx.llm, ctx.credentials, and ctx.deepseekAccount; with
ctx.deepseekAuth between them, the consumers of those three services are
the loop and compaction, the authentication service and pi-ai, and the
authentication service and the account route.

Persisted type digests are unchanged: the persistence catalog diff is
source line numbers only.
2026-11-15 19:02:10 +08:00
LegGasai e49b6e0b3d test(web-deepseek-api): name route fixture fields by what they connect
The route fixture connects deployments to ctx.deepseekAuth, and two of its
fields kept names from the credential publication it replaced:
withoutCredential and publishedBaseURL. They are withoutConnection and
connectedBaseURL.
2026-11-15 19:02:09 +08:00
LegGasai 6193a0d4f8 docs(deepseek-auth): record the request authentication decision and its upgrade steps
The decision record and the upgrade guide described credentials that each
DeepSeek model route published through ctx.llm.providerCredential(). The
routes, the Search and Fetch APIs, and Messages search ask ctx.deepseekAuth
instead, so both documents describe that service: who orders the two
credential kinds, where each kind's deployment comes from, what a consumer
declares, and which alternatives lost. Both take the name of the subject
they cover.

The upgrade guide adds the steps this change asks of a composition: mount
@deepseek-ai/dsh-deepseek-auth beside any DeepSeek route or web provider,
and take the key check from @deepseek-ai/dsh-credentials.

Five older decision records and nine package READMEs still said that routes
publish credentials, that consumers read keys themselves, or that a request
credential carries a bare value. They state the current mechanism, and the
model service README drops the source-map row of the key check that moved
to dsh-credentials.
2026-11-15 19:01:56 +08:00
LegGasai 1d200479dc refactor(primitives): place compact hover cards by CSS anchor positioning
The compact card's side and bottom hold were computed in script from the
window size and the anchor's rect, measured again after the card mounted, and
kept current by scroll and resize listeners. The stylesheet now anchors the
card to its wrapper: beside the end edge, else the start edge, each also with
the card's bottom held at the viewport's margin.

A card that fits on neither side used to sit over its anchor, which left the
row under it unclickable. It now opens below the anchor from the anchor's
start edge, or above it; a card too tall for either stays in the viewport's
bottom end corner.
2026-11-15 18:34:14 +08:00
LegGasai 26a0c6ae02 test(web): count the marquee's frame callbacks without an unknown cast
The sidebar marquee test kept its frame counter on window through an
assertion to unknown, which the no-unknown-casts gate rejects.
2026-11-15 18:07:36 +08:00
LegGasai f37c2b9ad7 refactor(deepseek-account): drop the unread bare token from the request credential
AccountRequestCredential carried the bare token beside the request headers for
the route credential grant that ctx.deepseekAuth replaced. Its only caller,
ctx.deepseekAuth, forwards the headers, the sign-out signal, and reject(), so
the field has no reader left. Test stand-ins and the billing snapshot fixture
stop supplying it.

Issue: #8255
2026-11-15 17:31:01 +08:00
LegGasai 09f49dbb39 refactor(primitives): return the hover marquee's row handlers by their event names
useHoverMarquee returned enter(event?) and leave(), and the sidebar row also
called enter() without an event from an effect to keep its title marqueed
while the row's menu is open. The hook now returns onPointerEnter and
onPointerLeave, which a row spreads onto its element, and takes a hold option
for the open-menu case, so no caller drives the marquee imperatively.
2026-11-15 17:28:33 +08:00
LegGasai bc75e0ed84 perf(primitives): carry the hover marquee by a CSS animation instead of a frame script
The marquee moved its text by setting the scroll position in a
requestAnimationFrame callback on every frame of the travel. The text now
sits in an inner span that a keyframe animation translates: the handler
measures the overflow once on entry and gives the stylesheet the distance and
the time it takes at 30px/s. A delayed zero-length animation lifts the end
fade at the far edge, and reduced motion is a media query. Speed, the far-edge
hold, the one-step return, the 8px threshold, and the touch exclusion stay.
2026-11-15 17:26:29 +08:00
LegGasai 0277971e87 refactor(session-panel): offer row hover details as a panel Factory with data props
The details a panel row shows in its hover card took React nodes for the
title, lines, and measure icons and lived in ui-primitives. The three lists
pass strings for the first two and one of two icons, so the component moves
to ui-session-panel as the conversation.session.panel.details Component
Factory: props are data, and a measure names its kind, which selects the icon.
2026-11-15 17:04:30 +08:00
LegGasai 0ab4c8305c refactor(llm): take the API key check from dsh-credentials
`dsh-llm` exported `normalizeApiKey` and `assertUsableApiKey` for the adapters that read a key through a credential reference. The DeepSeek routes now get their key from `ctx.deepseekAuth`, which checks it with the definition `dsh-credentials` owns, so `llm-pi-ai` was the only caller left. It now uses `normalizeApiKey` and `unusableApiKeyMessage` from `dsh-credentials` and raises the same `INVALID_CREDENTIAL` failure with the same text.

`normalizeApiKey` and `assertUsableApiKey` are removed from `dsh-llm`, so the check has one Host definition. `dsh-llm` does not import it from `dsh-credentials` instead, because the dependency gate accepts that runtime import only with a reviewed policy exception.
2026-11-15 17:02:44 +08:00
LegGasai 6eb3805bf3 refactor(llm): take the DeepSeek routes' credentials from ctx.deepseekAuth
The two DeepSeek route plugins read their own credential and published it through `ctx.llm.providerCredential()` for the web providers. Those providers now ask `ctx.deepseekAuth`, so nothing reads the publication. Each route asks the same service for the credential of its own requests: the API-key route for its key in `x-api-key`, the account route for the account sign-in, both for destinations under the origin of the route's base URL.

`LlmAdapter.providerCredential()`, `LlmRuntime.providerCredential()`, `ProviderCredential`, `ProviderCredentialGrant`, and `LlmCredentialKind` are removed from `dsh-llm`, and the `credential` option and `DeepSeekProviderCredentialOptions` from the DeepSeek transport. `DeepSeekRequestAuth` keeps the headers, the withdrawal signal, and the failure callback; its bare `value` and `reject` served only the publication.

The API-key route reports an unusable key as `INVALID_CREDENTIAL` with the text it had. Tests of the publication are replaced by tests of the deployment each route connects.
2026-11-15 16:53:29 +08:00
LegGasai 0afb961659 fix(web-deepseek-api): observe a credential read that fails after cancelling its caller
The transport's cancellation helper returned at once when the caller's signal was already aborted, without observing the credential read it had been handed. A read that cancels its caller and then rejects left that rejection unhandled. The helper now observes the read, as the same helper of the Messages search provider does.
2026-11-15 16:42:12 +08:00
LegGasai a1d290d87b refactor(web-search-deepseek): take the search credential from ctx.deepseekAuth
Messages search asked `ctx.llm.providerCredential()` whether the conversation's route published an account credential, compared origins itself, and read and checked `DEEPSEEK_API_KEY` itself. It now asks `ctx.deepseekAuth` for the credential of the search endpoint: the account sign-in in a conversation on the account route, otherwise its referenced key, which stays its own and goes to the search endpoint. The provider's two credential options become one `authorize` option; the literal `apiKey` is unchanged.

Behavior is unchanged except in two places. A key that is blank or cannot travel in an HTTP header is reported with the error name `DeepSeekAuthError` where it named `LlmError`. A base URL that embeds credentials makes the provider unavailable, as one that does not parse already did; `fetch` refused such a URL before.

The provider's cancellation helper now observes a credential read that began before its caller's cancellation was noticed. Such a read can reject after the cancellation it caused, and that rejection was unhandled.

The package no longer depends on `dsh-llm`.
2026-11-15 16:41:24 +08:00
LegGasai e66b080437 feat(jobs): fold each job group past five rows, newest live jobs first
The Background jobs section showed every live job and, once nothing ran,
every settled one, which filled the panel. Each of its two groups now
shows five rows followed by the panel's fold control, "Show N more
running" or "Show N more finished", once that holds back two rows or
more. Each fold is kept per Session, across hiding the panel, and Clear
folds the settled group to five rows again.

Live rows now list the most recently started job first instead of the
earliest, so the rows a group holds back are the ones that have run
longest, not the ones that just started.

An expanded row observes its output only while its row shows: folding it
out of the list, or closing the settled group over it, stops the stream,
and showing the row again reopens it.
2026-11-15 16:22:36 +08:00
LegGasai 66bf0a7178 feat(agent-team): order shared tasks by state and fold the list past five
The Shared tasks section listed every task in source order, so completed
tasks often came first and a long plan filled the panel. It now lists the
tasks in progress, then the pending ones, each in source order, then the
completed ones with the latest in source order first, and shows five
tasks followed by the panel's fold control once that holds back two tasks
or more. The fold is kept per Session, across hiding the panel.

A task carries no completion time, so source order stands in for it
among the completed tasks. The recorded task list moves the completed
task after the pending ones.
2026-11-15 16:22:35 +08:00
LegGasai d4519bb470 feat(subagent): list running subagents first and fold the list past five rows
The Subagents section listed every direct subagent in creation order, so
a Session with many of them filled the panel and put the newest at the
bottom. It now lists running subagents first, the most recently started
first, then the others by their Session's last update, and shows five
rows followed by the panel's fold control once that holds back two rows
or more. The fold is kept per Session, across hiding the panel; an
expanded branch's own rows all show.

A subagent sorts by when its parent created it while the Client holds no
turn timing for it, or only the stand-in row of a Session outside the
Host list, whose update time is 0. The e2e found that case: catalog-only
members all tied at 0 and kept creation order.
2026-11-15 16:22:34 +08:00
LegGasai 6df95fd991 feat(session-panel): offer a fold control for long panel lists
A section's list could grow without bound and push the later sections
out of the panel's height. The panel now offers the control such lists
end with as the `conversation.session.panel.fold` Component Factory: one
more row of the list that shows the rows held back or folds them again.

The control takes data and a callback only: whether the list shows every
row, the visible text and accessible name for that state, and the toggle.
It renders a row on the panel's row marks, `data-session-panel-row="fold"`,
in the 12px tertiary type of the section counts with a 14px chevron in
the icon column. Each section keeps its fold state and decides which rows
show.

A Factory fits here although rows are contributor markup: the control is
the same in every section, and three copies of it would be clones.
2026-11-15 16:22:11 +08:00
LegGasai 46cf27ce35 fix(session-panel): keep a row highlighted only for its own open menu
A panel row stayed highlighted while anything inside it carried
aria-expanded="true". The rule means a row's open menu, so it now names
the menu part: a body button that discloses something else highlights its
row on hover alone.

The layout e2e opens the working folder row's menu in the real app and
checks that the row keeps its highlight and its More button after the
pointer leaves for the menu.
2026-11-15 16:21:55 +08:00
Turtleandstd-microblock 1f8c6f8e3f chore(deps): align the root mdast-util-from-markdown range
Co-authored-by: std-microblock <66859419+std-microblock@users.noreply.github.com>
2026-11-15 16:21:08 +08:00
LegGasai 651a6ccdf0 refactor(web-deepseek-api): take Search and Fetch credentials from ctx.deepseekAuth
The plugin asked `ctx.llm.providerCredential()` for each route's credential, read `DEEPSEEK_API_KEY` and the account service itself when a route was not mounted, ordered those sources by billing, and rendered the request headers in its transport. It now names the kinds the two APIs accept and the capability's billing, and `ctx.deepseekAuth` returns the ordered credentials, each bound to its endpoint. The plugin keeps the wording of its failures; the transport sends the headers it is given.

Behavior is unchanged except in two places. A key that is blank or cannot travel in an HTTP header is reported with the error name `DeepSeekAuthError` where it named `LlmError`. A capability's own base URL that embeds credentials now leaves the provider unavailable, as one that does not parse already did; `fetch` refused such a URL before.

The package no longer depends on `dsh-llm`, `dsh-launch-environment`, or the account service. The transport's `apiKeyHeaders` request option, which only tests set, is gone, and the tests of adapters that publish the other credential kind under a DeepSeek route id went with that publication.
2026-11-15 16:21:01 +08:00
Turtleandstd-microblock eafa4302a5 fix(deps): upgrade Markdown parsers to remove quadratic table and list parsing
Refs #8483

Co-authored-by: std-microblock <66859419+std-microblock@users.noreply.github.com>
2026-11-15 16:18:09 +08:00
LegGasai 2846506983 refactor(llm): connect the DeepSeek model routes to ctx.deepseekAuth
Both route plugins now require the DeepSeek authentication service and connect the deployment their settings name: the API-key route its base URL and key reference, the account route its base URL. Other DeepSeek consumers will bind each credential kind to that deployment through the service.

The `base` and `sdk-minimal` bundles mount the service, and the SDK server mounts it with its fallback route when the composition has none. Tests that mount a route plugin by hand mount the service first; the pinned row list of the `sdk-minimal` bundle gains the `deepseek-auth` row.
2026-11-15 16:03:18 +08:00
LegGasai b9a6163266 feat(deepseek-auth): add DeepSeek request authentication
DeepSeek APIs accept the API key, the account sign-in, or both, and gain account authentication one API at a time. `ctx.deepseekAuth` gives every consumer one operation: the consumer names the kinds its API accepts and the billing its settings choose, and the service orders the kinds, binds each to the deployment its credential belongs to, and releases the request headers of the first kind that has a credential.

Model route plugins connect the deployment their settings name. Without a connection the API key is `DEEPSEEK_API_KEY` at the official API and the account sign-in goes to the deployment `DEEPSEEK_BASE_URL` names. The service depends on the credential store and, optionally, the account service, and on no consumer. Nothing consumes it yet.
2026-11-15 15:34:26 +08:00
LegGasai 99e03fb7b2 Merge remote-tracking branch 'origin/master' into feat/session-panel-sections
The base branch (#7965) is merged, so this branch now targets master.
Conflicts came from #8452 in the forge changes view:

- ChangedFiles.tsx: this branch's Row component (hover marquee, rename
  tooltip) takes master's viewed state: the subdued class, its
  description for assistive technology, and `done` down the tree.
- ReviewControls.tsx: master keeps every segment's Tooltip mounted; this
  branch's 500ms hover delay stays on it.
- ChangesTab.module.css: master's gap-step rules stay; the local changes
  card's rules stay removed, as the card moved into the Session panel.
- The forge README is merged sentence by sentence and its pairing
  record re-recorded.
2026-11-15 15:26:50 +08:00
LegGasai eaf815665a Merge pull request #7965 from deepseek-harness/feat/session-panel
feat(panel): add the floating Session panel
2026-11-15 15:20:08 +08:00
LegGasai e4b60a2637 feat(credentials): own the API key well-formedness check
Consumers that read a key through a credential reference must make sure it can travel in an HTTP header and tell the user which reference to fix. The check and the diagnostic text now live beside the reference helpers, so a consumer that does not depend on the model service can use them and wrap the text in its own error type.
2026-11-15 14:27:34 +08:00
LegGasai 824dc61c20 Merge pull request #8452 from deepseek-harness/fix/forge-changes-view-feedback
fix(forge): step unchanged lines, fit the lens, fix gap highlighting, and dim viewed files
2026-11-15 13:53:02 +08:00
LegGasai d4d9756917 Merge branch 'master' into fix/forge-changes-view-feedback 2026-11-15 13:25:51 +08:00
LegGasai 2b6d6de9d1 fix(forge): key corrected highlighting by the file's change
Corrected tokens were kept under a run's side and line numbers only and
survived a new comparison of the same file. Tokens carry their lines'
text, so a refresh that kept the line numbers but changed the content
drew the last change's text, and a change request's file kept it until
a gap was expanded again. Every key now names the file's change digest,
so another change finds none of the old tokens from the render that
names it.
2026-11-15 13:21:47 +08:00
LegGasai bd99b1e062 Merge branch 'feat/session-panel' into feat/session-panel-sections
Brings master (through feat/session-panel) into this branch. Master changed
controls this branch had moved into the Session panel, so its changes are
carried over to their new homes:

- Jobs: master hides the stop control without `job/kill` access in the
  header list this branch removed; the panel's Background jobs section now
  reads `useAccess('job/kill')` the same way.
- Forge: master takes the sign-in command from the provider
  (`readiness.signIn`) in the sidebar tab this branch removed; the panel's
  sign-in row now does, for any code host, instead of building a GitHub
  command itself.
- Agent team: the team settings pane and its copy from master, with this
  branch's Shared tasks section registration.
- Tests: master's helpers for the team settings pane and its numbered
  reference helper are combined with this branch's panel steps; the
  status fixture gains master's `completionFailed`.
- READMEs of ui-agent-team and client-ui-forge are merged sentence by
  sentence; generated catalogs, the persistence schema, and pairing
  records are regenerated.

The upgrade guide moves to docs/upgrade-guide/v0.2.2-rc.3, the root
version after master's release.
2026-11-15 13:00:24 +08:00
LegGasai ae7adb5d47 Merge remote-tracking branch 'origin/master' into feat/session-panel
Conflicts were all in generated files and pairing records: the config
catalog, the dsh-doc package list, and the README records of
packages/client and ui-conversation. Each takes master's side and is then
regenerated, so it differs from master only by this branch's entries.

Also in this merge:
- ui-session-panel follows master's release to 0.2.2-rc.3, and the
  lockfile is master's plus this package.
- The web-fetch-failure-row header capture, added on master, gains the
  Session panel toggle.
2026-11-15 12:27:49 +08:00
LegGasai 08b9e73017 fix(forge): rebuild long old sides without argument spread and keep lens focus
Rebuilding the old side spread each run of unchanged lines into push,
which throws a RangeError once a file has around 200,000 unchanged
lines, so such a file failed to draw as soon as it was read ahead. Lines
are now appended one at a time.

A lens segment gained or lost its Tooltip wrapper when its count showed
or hid, which remounted the focused button and dropped the focus. Every
segment now keeps a Tooltip that is disabled without hover text.

gapOf has no caller since gaps answer which lines they still hide, so it
and its test are removed.
2026-11-15 12:24:48 +08:00
liukx0205 968b78e6f7 fix(session): list SQLite plugin locale files in the required order 2026-11-15 03:14:30 +08:00
liukx0205 4df3740c2f fix(session): publish SQLite plugin locale metadata 2026-11-15 01:47:29 +08:00
liukx0205 2839c3532c refactor(session): name SQLite persistence classes after their roles
SqliteSessionPersistence, SqliteStore, and SqliteSessionHandle mirror the
JSONL backend's class names; Trace and Segment stay storage-internal terms.
2026-11-15 01:42:35 +08:00
liukx0205 ed2b030a84 refactor(session): share SQLite routing checks and record validation
One ENOENT helper, one routing-database check owned by the store, one
routing-record reader that validates identity, and one publication failure
wrapper replace the copies spread across the store and the service.
2026-11-15 01:42:35 +08:00
liukx0205 92d1100c24 refactor(session): keep SQLite Segment storage without pending-fork wiring
Fork creation lands with its own creation flow; the pending-create fork
record, handle cut offsets, and seed marker checks that flow would replace
are removed. The Segment schema stays, and cut() locates a fork attachment
through the segment_ancestors index instead of walking the parent chain.
The new schema starts at version 1, and the busy timeout and live batching
limits are named constants.
2026-11-15 01:42:35 +08:00
liukx0205 16180383ca perf(session): trim SQLite write validation, listing reads, and open prechecks
Write paths serialize already-typed in-process events without re-running the
read-side envelope validation. Listing checks routing records by their hashed
file names instead of reading each one and scans SQLite concurrently with the
JSONL listing. Reads decode long histories in yielding chunks. Create checks
only the retained JSONL identity before SQLite's own existence check, and a
queued legacy open no longer repeats the routing check its caller just made.
2026-11-15 01:42:34 +08:00
liukx0205 0d13ccf03b perf(session): reduce SQLite persistence overhead 2026-11-15 01:42:34 +08:00
liukx0205 0ecc55d7f3 chore(session): remove redundant koffi bundle exclusion 2026-11-15 01:42:34 +08:00
liukx0205 296887cf3c refactor(session): remove redundant JSONL resource plugin 2026-11-15 01:42:34 +08:00
liukx0205 4bd6b6882e refactor(session): trim persistence internals 2026-11-15 01:42:34 +08:00
liukx0205 69cec93294 chore(session): exclude documentation from storage PR 2026-11-15 01:42:34 +08:00
liukx0205 669c1ceaab refactor(session): separate persistence plugin entrypoints 2026-11-15 01:42:34 +08:00
liukx0205 0d8fbdd956 chore(session): narrow storage PR to implementation 2026-11-15 01:42:34 +08:00
liukx0205 86ecc66742 fix(session): enable WAL before publishing SQLite schema 2026-11-15 01:42:16 +08:00
liukx0205 e0b6d65726 fix(tests): preserve snapshot config and drain pending reads 2026-11-15 01:42:16 +08:00
liukx0205 7beee7daf4 test(session): rely on the default JSONL backend 2026-11-15 01:42:16 +08:00
liukx0205 73b971fa16 test(session): run persistence consumers against both backends 2026-11-15 01:42:16 +08:00
liukx0205 b467fa6ee5 fix(session): keep SQLite storage opt-in 2026-11-15 01:41:54 +08:00
liukx0205 1347262dcb fix(session): register persistence synchronously before database initialization 2026-11-15 01:41:29 +08:00
liukx0205 ebf98e1f2a docs: update SQLite upgrade guide links 2026-11-15 01:41:29 +08:00
liukx0205 a63b638bb6 docs: move SQLite upgrade guide to the current release 2026-11-15 01:41:29 +08:00
liukx0205 76ca40e741 fix(test): close reopened persistence before removing its root 2026-11-15 01:41:29 +08:00
liukx0205 0317e25314 fix(e2e): select JSONL storage for raw session fixtures 2026-11-15 01:41:29 +08:00
liukx0205 680ff5cda2 fix(snapshot): align imported event serialization order 2026-11-15 01:41:29 +08:00
liukx0205 a1823eff02 fix(web): verify SQLite histories in browser fixtures 2026-11-15 01:41:29 +08:00
liukx0205 34db539551 fix(python): retain minimal session directory and encoding 2026-11-15 01:41:28 +08:00
liukx0205 a0368cbc13 fix(python): address minimal profile persistence entry 2026-11-15 01:41:28 +08:00
liukx0205 c4cefe0bae fix(python): select JSONL for minimal profile snapshots 2026-11-15 01:41:28 +08:00
liukx0205 d4756db300 fix(test): seed JSONL histories for headless expected output 2026-11-15 01:41:28 +08:00
liukx0205 3dcf8e9f38 fix(python): retain JSONL for recorded runtime snapshots 2026-11-15 01:41:28 +08:00
liukx0205 f841445222 fix(python): pin raw session fixtures to JSONL storage 2026-11-15 01:41:28 +08:00
liukx0205 60177171c7 fix(ci): align release version and session smoke fixtures 2026-11-15 01:41:28 +08:00
liukx0205 7ecfef7473 fix(session): repair SQLite CI fixtures and failure coverage 2026-11-15 01:41:28 +08:00
liukx0205 2f6def1164 fix(session): retain JSONL migration and update profile acceptance tests 2026-11-15 01:41:28 +08:00
liukx0205 e9ff4c7091 docs(session): document SQLite storage and refresh catalogs 2026-11-15 01:41:28 +08:00
liukx0205 f798414231 fix(session): coordinate legacy reads and retain closing live events 2026-11-15 01:38:51 +08:00
liukx0205 1e98a536c9 test(session): collect migrated histories through persistence 2026-11-15 01:38:51 +08:00
liukx0205 1dd3ed37d1 refactor(session): move persistence coordination into SQLite package 2026-11-15 01:38:51 +08:00
liukx0205 75b3dbc9d8 fix(session): retain JSONL internals and remove SQLite plugin settings 2026-11-15 01:38:51 +08:00
liukx0205 1409dde45a chore(session): remove duplicate brand project reference 2026-11-15 01:38:51 +08:00
liukx0205 d67adbfac7 refactor(session): keep SQLite private and simplify initialization 2026-11-15 01:38:51 +08:00
liukx0205 a3c870e3e4 feat(session)!: use SQLite and import legacy JSONL on open 2026-11-15 01:38:51 +08:00
Xu HanxiangandDeepSeek Harness da7f9b4c5a feat(liveshare): open the viewer capabilities a share can serve (#8304)
* feat(liveshare): open reader capabilities the share can serve

(cherry picked from commit 3c893b488900fff776a21eebee4eb2d95b878764)

* feat(liveshare): let a reader run the session's slash commands

(cherry picked from commit ae02bcc0f819e55ebf066de7581d4d89994930a4)

* fix(liveshare): allow a reader to list the workspace file references

(cherry picked from commit fffaa864b9d790a0aab30da639d5ef50ff8f303c)

* fix(liveshare): bind the job endpoints to their session resource

(cherry picked from commit 357d1f6efe5b161a4ce1b616e66599c4e75a6ab1)

* chore: refresh the Cordis surface catalog

(cherry picked from commit 88f88b225f0fcff0a5a88f09b0f555749dd62756)

* test(job-controller): read the Session resources the Remote methods declare

The job roster, the follow stream, and a kill each declare the request's
Session as the resource they touch, and an unowned job's follow names none.
Read those declarations off the mounted Controller and pin what they answer.

(cherry picked from commit fa3f92427a6bd56ad2a949dc74315505cb75533b)

* feat(liveshare): offer a shareable core component to viewers

The terminal controller reaches the catalog from a core profile bundle, which
the catalog excludes so no application plumbing is offered. Mark such a
component shareable: PluginMetadata gains the mark, and the host names the
packages that carry it, so a marked core component enters the catalog and
every other core component stays out.

The terminal namespace leaves the exclusion list for the same reason, and
the marked component carries the title its dialog row shows.

(cherry picked from commit b0e9e390719aab519fd82cf39c85c60e4f77b588)

* fix(liveshare): classify the terminal methods as owner-selected

The nine terminal methods leave owner-only for plugin-offered: the owner picks
them in the share dialog, no reader role grants one, and a share that names
none still refuses every terminal call.

(cherry picked from commit 718c1b45a1b01320cbe9be46ece9deca37225fe2)

* docs(liveshare): state that terminals open per method

Terminals are no longer unconditionally owner-only: the share dialog offers
the terminal controller's methods and opens none until the owner picks them.

(cherry picked from commit 505c1193571b16431731f69bd5ca1b59a1059a13)

* test(liveshare): cover a viewer reaching the Session's terminals

The end-to-end case mounts a real terminal controller beside the share host:
the catalog offers it as a shareable core component, a share that selects
nothing refuses every terminal call, and a selected terminal/create through
the reader's own Peer binds the shell to the Session its agentId names.

(cherry picked from commit 25955a936dc5b58ebfd8e1d24f495d62d59f7b70)

* fix(workspace-files): confine non-owner reads to the session workspace

A non-owner Peer now reads and watches files only inside the connected Session workspace. stat, read, readBytes (including baseFile) and changes resolve the target canonically and refuse an outside one with workspace-file/outside-workspace before reporting its kind. Owner and trusted in-process callers keep the filesystem read authority.

(cherry picked from commit 7ae855e12ba6c5bc99c7ae75d65d984661f3bbb5)

* refactor(workspace-files): name the file access confinement

Replace the contain boolean with a named FileConfinement carried by the service, and move the outside-workspace refusal into one helper shared by file reads and watches. No Remote interface or behavior changes.

(cherry picked from commit 1c4dbd68220df7c559f84cf2782f9626c5b2ef4b)

* refactor(workspace-files): name the path mode PathScope

Replace the FileConfinement/confinement vocabulary with PathScope, and rename its module and test. The values and behavior are unchanged.

# Conflicts:
#	packages/api/workspace-files/src/index.ts
#	packages/api/workspace-files/tsconfig.host.json

(cherry picked from commit 5d3f7b31dc6a1dbcf44c5fdd59295402bf40cf76)

* refactor(workspace-files): accept several workspace roots in the path check

The confinement helper and change feed now take several resolved roots; the current scope still supplies one. WorkspaceFileScope.workspaceRoot remains the primary root, so a future multi-workspace Session can add optional roots without changing endpoint signatures, path arguments, or the client address.

(cherry picked from commit 73fd59be92c421c378b7fe5606d8d7c5806b13cb)

* fix(workspace-files): keep the multi-root watch check covered

Pass the primary watch root separately and iterate the roots list, so the feed keeps full coverage for the multi-root preparation. Add braces to the multi-root test arrow for the lint rule.

(cherry picked from commit 1286aac6a6d93e693dbb33f2feaa71e6252424e0)

* test(workspace-files): assert a refusal never reports the target kind

The outside-workspace failure carries only the path, so a share reader learns
nothing about what it was refused. stat, read, readBytes, list, and a relative
escape are each asserted not to carry a kind.

(cherry picked from commit a9495de0ff63a1aac325d1cb62b8111c188ae8a5)

* test(workspace-files): keep the search caps in the shared harness config

Rebasing over the search endpoint left configOf() without the search limits
the master harness passed inline, so every search call reached the subprocess
provider with an undefined graceMs. configOf and peer() now take Caps and
supply the suite defaults.

(cherry picked from commit 70cecb9b352ce5c1e17482429b1539483e101d60)

* docs(workspace-files): describe the read confinement against the search-era structure

The master README added the search section and rewrote the file-read checks
without a workspace-containment check. Those paragraphs now state which
caller the check applies to, the change feed mentions the non-owner watch,
and the source map lists path-scope.ts. Bilingual hashes re-recorded with
verify-translation-pairing --write.

(cherry picked from commit e61fdabaf2fb9b0c0bc507ef5ceea0f213f70683)

* fix(liveshare): keep workspaceFiles/search in the reader session-read role

The classification table is the single source for POLICY_DECIDED_ACTIONS, so
the new search endpoint must also appear in the read role's actions.

(cherry picked from commit 665093b07cfee87be105fdc71a7d58fe25974788)

* docs(catalog): regenerate the client and config catalogs

Removing the viewer share-path tab drops its client slot entry, and the workspace file import shifts the Config source line.

(cherry picked from commit 7bb9295a18b011971b4338171a60d16ff82eebd1)

* docs(catalog): regenerate the config catalog source line

(cherry picked from commit 2d98a59afc8aa6e2a9ac268d4446bcd8cd5eeb26)

* fix(liveshare): let share readers preview workspace files

The served page keeps the shipped Sidebar and now reads the shared Session
workspace through workspaceFiles: stat, read, readBytes, list and changes join
the Session read role, while the file service confines every non-owner read to
that workspace root. The viewer tab type that answered each file address with
"a share hands over paths, not contents" is removed, so the shipped document
preview opens the file.

Refs #7901

(cherry picked from 5e0ceac3faa)(partial: liveshare files only)

* fix(ui-jobs): offer the stop control only with job/kill access

(cherry picked from commit 804956ece9c09b2fac6180cd78da7aa7393ae0de)

* fix(ui-chat): attribute a reader's steering row while it is pending

Chat declared the message-source seat on the user node registration, so an
admitted steering row rendered the shared bubble without asking for it and
a Host-pending steering occurrence carried no source to ask with. Move the
seat to the flow: it renders user rows, admitted steering rows, and pending
steering occurrences, and hands the same renderer to each.

Liveshare's selector now elects a share-viewer source of either kind, so a
reader's interjection states its author from the moment it is sent.

(cherry picked from c802aef8392)(partial: liveshare client files only)

* docs(liveshare): state when a reader's interjection shows its author

A local submission echo carries no source, so the author line appears once the
Host records the input in the Inbox, not when the reader sends it.

(cherry picked from 42001b1294d)(partial: liveshare client files only)

* docs(liveshare): describe the seat source arriving as row props

(cherry picked from commit 466e25328c5c42c792bfb30bba05ff790259bf99)

* fix(liveshare): refuse /permission to share readers

The commands executor runs a command handler inside the owner Host with no
reader-specific narrowing, so a reader line such as
`/permission danger-full-access` left the shared Session unconfined with no
approval. The read role's condition now parses the `commands/execute` line
and refuses the owner-only command names, starting with `/permission`, with
the new `command-owner-only` reason the viewer page classifies. Every other
command keeps following visibility.

* feat(permission-presets): add the permissionPresets/set Remote

The `/permission` command switches a Session's sandbox mode and approval
policy inside the owner Host's own handler, which gives a share reader that
reaches `commands/execute` no endpoint decision to meet. The switch now has
a Remote face: `permissionPresets/set` names the Session it writes as its
`session` resource, so the Gateway decides who may call it before any preset
is resolved or any knob changes.

The request carries the Session id and the preset name only. An unknown
preset and a Session this process does not hold live both refuse with
`gateway/bad-request` before writing. The call reports the selection the
Session reads back after the switch.

The command reaches the same switch, keeping its ordering and its `success`
and `error` text. Because a Remote parameter cannot carry an Agent, the
command supplies the approval write itself so its model-visible policy
notice still follows the switch.

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>

* fix(liveshare): classify permissionPresets/set owner-only

The new preset endpoint writes the source Session's sandbox mode and approval
policy, so no share reader role may reach it at any tier. The viewer endpoint
classification records it as owner-only, and the viewer access policy spec
proves a reader is refused on the shared Session, on its own forks, and on a
Session outside the share, and that no reader grant carries the action.

The owner-only command whitelist stays as the second defense: the commands
handler runs inside the owner Host, so a reader line must not depend on that
handler continuing to route through the endpoint.

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>

* test(liveshare): keep every permission preset endpoint owner-only

The classification table's completeness gate proves a new generated endpoint
has a row, but not that the row keeps a reader out. This case reads the table
and fails when any `permissionPresets/*` endpoint is classified as anything
other than owner-only, so an endpoint added there without its class checked
turns the suite red instead of widening a reader's reach.

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>

* docs(catalog): regenerate for the preset set Remote

The new `permissionPresets/set` Remote adds its signature and its request type
to the generated service and type catalogs, maps the request type to the
permission presets subsystem page, and shifts the permission preset config
source line. The permission presets subsystem pages describe the write path
and its Remote face on both sides.

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>

* test: construct SessionId values and keep the approval notice lock

The rebased specs called SessionId as a value while importing it as a
type, so every case threw ReferenceError. Construct the ids the way the
packages already do, and keep the /permission case that locks the single
model-visible approval notice.

* test(liveshare): load the terminal controller without a built artifact

The spec resolved a generated typert artifact at module load, so a clean
checkout failed before any case ran.

* docs(liveshare): state the reader limits the review asked about

Marks the answer path's dependence on timed asks, records that @ mentions
list every host session, and explains which commands stay owner-only.

* feat(liveshare): let a viewer manage the goal of a visible Session

The goal is Session data, not the workspace sandbox, so the same visibility
rule that already covers goals/get and goals/edit applies to create, pause,
resume, complete and clear. The /goal command reaches the same service, so
the endpoint and the command now agree.

# Conflicts:
#	packages/experimental/liveshare/README.i18n.yaml

* fix(liveshare): keep the terminal component titles

The shareable mark's localized titles were spread onto the metadata record, which
put `en` and `zh` at the top level instead of in the `titles` field the catalog
reads. A core bundle without display metadata therefore offered the terminal
with no product name at all.

* fix(workspace-files): decide the path scope before stat

A non-owner read probed the path with `lstat` before it checked containment, so
reading an absent path outside the workspace answered `not-found` while an
existing one answered `outside-workspace`. That let a share reader probe whether
any path on the owner's machine exists.

Every confined read now resolves and confines its target first: `read`, `stat`,
`readBytes` (including a path relative to a base file) and `list`. The final
`lstat` still reports the component's own kind, and the owner keeps the
filesystem's authority, including its previous answer for an absent path.

* docs(liveshare): drop the queue-verb mention

`session/updateQueue` is not in the viewer Session read role, and viewer queue
management is not part of this change. The role's rationale now names the
reach it actually carries, and the workspace file actions no longer leak
whether a path outside the workspace exists.

* test(liveshare): describe the terminal suite's actual coverage

* chore: regenerate the catalogs the viewer capability change moves

session-reference, user-questions and the permission presets all feed the
Cordis, persistence and doc-graph generators, so their artifacts were stale.

* fix(liveshare): keep the command refusal copy paired and cover the file paths

The English notice read "/permission on", which the locale gate tokenised
together while the translations kept the command alone. The workspace-file
and preset paths the coverage lane flagged now have cases of their own.

* test(workspace-files): accept either refusal code for a UNC base

Windows resolves an unreachable UNC host through the local backend's ancestor
walk, which reports an IO failure instead of the not-found POSIX reads. Both
refuse the read; the code belongs to that backend, not to the path-scope
decision this case covers.

* refactor(liveshare): leave the command surface to its own change

Running a slash command is a separate decision from what a reader may read:
the executor wraps several capabilities in one opaque call, so the endpoint
that admits it is not the place to decide them. This change keeps the reader
capabilities and the preset endpoint, and returns the command wiring when the
command surface itself is reshaped.

* refactor(liveshare): leave the workspace file preview and terminal grant out

Reading a Session's data and reaching into the owner's workspace or shell are
different promises: the first follows visibility, the second changes what the
owner's machine does. This change keeps the reader capabilities that describe
Session data and returns the other two for their own discussion.

* refactor(jobs): let the session resolver name the job endpoints' Session

The session resource resolver already reads a top-level sessionId, so the
explicit readers restated what it derives. Removing them keeps one rule for
how a Session resource is named.

* test(liveshare): drop the workspace preview stubs the strip left behind

The viewer shell no longer opens workspace files, so the fixture route and
the assertion about it no longer describe anything.

* fix(jobs): bind the job endpoints to the Session they name

The session resolver reads a top-level sessionId, but these methods take a
request object and no lookup parameter, so the request fell through to the
global resource and a reader was refused. The explicit readers state the
Session the Gateway must authorise.

* refactor(jobs): let the session resolver name the job endpoints' Session

The session controller's resolver already reads the sessionId of the first
object argument, so an explicit reader on these methods restated a rule the
Gateway already applies. The tests now install the session controller and
assert the resource the production composition produces.

* refactor(session-controller): take the resolve input as one argument

An exported function cannot destructure its parameters, because the JSDoc
gate names them one by one.

* docs(liveshare): describe the capabilities this change actually opens

The workspace file preview, the terminal grant and the command surface
moved out of this change, so the package reference and the PR description
now state what remains.

* docs(persistence): refresh the catalog after the preset JSDoc edit

The permission-presets module doc grew a line, so the recorded source
line for its persisted event moved from 60 to 61.

---------

Co-authored-by: DeepSeek Harness <noreply@deepseek.com>
2026-11-14 15:41:52 +00:00
audit 7629f4e40d fix(wecom): rerun a sandboxed 853004 instead of asking for a new authorization
Once the saved token expires, wecom-cli refreshes it but cannot save the new
token in its configuration directory outside the workspace, so it returns the
original errcode 853004 with the server's upgrade advice. The agent then asked
the user to authorize again or to upgrade the CLI although the plugin page
showed the authorization as valid.

The entry skill now tells the agent to rerun such a command with
sandbox_permissions and to ask for a new authorization only when the rerun
returns 853004 again. Its sandbox rules name sandbox_permissions like the
other connector skills. The READMEs describe the behaviour and its limit.
2026-11-14 21:09:25 +08:00
audit 97ad6199b7 fix(dingtalk): stop the file sandbox from reading as a signed-out account
In the file sandbox dws cannot open the lock file under ~/.dws. `dws auth
status` then exits 0 and reports a signed-in account as signed out, so the
agent asked the user to connect although the plugin page showed the account
as connected.

The entry skill now checks the sign-in only with `dws auth status --readonly
--format json`, treats a denied write under ~/.dws as a sandbox denial and
not a sign-out, and reruns that command with sandbox_permissions. The READMEs
describe the behaviour and its limits, and the dingtalk-skills snapshot uses
the read-only check.
2026-11-14 21:09:13 +08:00
Tianyi Cui d699668c2d Merge pull request #8469 from deepseek-harness/turtle/align-cua-screenshots-13708a2a118d
fix(ptc): return MCP screenshots to programs as Image values
2026-11-14 18:17:38 +08:00
Turtle 3e3aa697ca fix(ptc): fall back safely when program image substitution fails
Contain any substitution failure, including deep values, in the ordered
commit lane, state the all-or-nothing contract and text delivery in the
docs, and describe the raw-block fallback in the MCP declaration.

Refs #8468
2026-11-14 17:14:41 +08:00
Turtle d74405a2c8 fix(ptc): return MCP screenshots to programs as Image values
Admitted MCP image blocks now carry their attachment reference. PTC
turns value entries that reference finalized result images into
program Images, as native CUA screenshots are, so inspect shows the
picture instead of base64 and the picture is not attached twice.

Refs #8468
2026-11-14 16:57:28 +08:00
Tianyi Cui 237df33679 Merge pull request #8466 from deepseek-harness/turtle/fix-date-bomb-test-519b65db7555
test(liveshare): derive owner credential horizons from the real clock
2026-11-14 15:21:20 +08:00
Turtle c97b55f9fd test(liveshare): derive owner credential horizons from the real clock
The spec hardcoded a live horizon of 2026-11-14, which the host compares
with Date.now(), so it failed from that date on.

Fixes #8465
2026-11-14 15:07:26 +08:00
dsh-ci-bot 1791494137 test(timeline): pin the settings counter expectation to the fixture locale 2026-11-13 22:23:14 +08:00
dsh-ci-bot 9ab02fb88a test(timeline): pin the locale of language-dependent assertions 2026-11-13 22:12:21 +08:00
LegGasai da656af683 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-13 20:55:46 +08:00
LegGasai 40e107f3cb Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
master replaced `cordis_inspect_list` and `cordis_inspect_query` with
`cordis_inspect`, which changed the same tool lists this branch edits. The
conflicted recordings take master's side and drop `working_directory` again:
`advanced-toolchain` and the two Web recommendation scenarios by refresh, the
six Python single-file runtime logs by removing the one list entry. The Web
collapse-timing count is 33.
2026-11-13 20:55:02 +08:00
dsh-ci-bot 6d32d62334 Merge master 9ed2a7b0c9 into fix/ci-907c47c-fold-settle-wait 2026-11-13 20:32:27 +08:00
LegGasai bc8544140a Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings `enter_worktree`. This layer adds a real-sandbox test: entering an
existing worktree under read-only policy runs only confined read commands and
moves the write boundary to the worktree, and leaving moves it back. The
boundary upgrade guide names the new tool.
2026-11-13 20:30:20 +08:00
LegGasai c64862545f Merge branch 'feat/session-panel' into feat/session-panel-sections
The panel's row Factory is gone on the base branch: rows share their look
through `data-session-panel-row` and `data-row-part` marks that the
panel's stylesheet lays out. This merge carries the rows of this branch
over to it:

- The two-line row moves from PanelRow's stylesheet into the panel's row
  rules as the `lines` and `detail` parts.
- The forge checkout, connection, local changes, and sign-in rows write
  their own marked markup instead of calling the Factory; the connection
  row, the local changes row, and the change requests section no longer
  take `renderFactorySlot`.
- The forge e2e measures the local changes and checkout rows in the real
  panel.
2026-11-13 20:22:32 +08:00
LegGasai a850cda7fd feat(worktree): add enter_worktree for existing worktrees of the pool
`ctx.worktrees.enter(agent, { name })` and the model tool `enter_worktree`
move a Session into an existing worktree in the pool of the checkout it works
in. The directory must resolve inside that pool and be a registered worktree
of the repository; otherwise the call fails with the new code
`WORKTREE_NOT_FOUND` and the Session stays where it is. Entry changes neither
Git state nor files.

Each entry appends a `plugin:worktree/entered` record. `exit` reads it to
return the Session to the checkout it entered from, so `exit_worktree` now
also leaves entered worktrees. Archive reclamation still removes only
checkouts a Session created. The `worktree` projection keeps one entry per
entered directory; its state version is 2.

The recorded worktree scenario enters the first worktree again, reads the
file it wrote there, and leaves.
2026-11-13 20:18:56 +08:00
LegGasai 0f421817af test(web): measure the toolbar cell around the fitted review lens
The lens radio group now sits in the element that measures its forms,
so the geometry check reads the toolbar cell two levels up.
2026-11-13 20:06:28 +08:00
LegGasai 760787baed feat(forge): draw viewed files subdued in the changes file tree
The file tree now shows which files are left to review: a file marked
viewed at its current change, and a directory whose every file is
viewed, draw subdued, and assistive technology reads the state as the
row's description. A file changed since it was viewed draws as
unviewed.
2026-11-13 19:52:13 +08:00
LegGasai eba69b9fd6 refactor(session-panel): share the row look through CSS marks instead of a row Factory
A row Factory took each contributor's icon, text, trailing control, and
menu as React nodes in props, which the client rules forbid. Each
contributor now writes its own row markup and marks the parts with
`data-session-panel-row` and `data-row-part`; the panel's stylesheet lays
them out, so rows from every package keep one geometry and a contributor
can restyle a part with its own class.

A menu part that renders nothing, such as the shared menu button while its
target has no menu entries, takes no room and no longer makes the row
highlight.
2026-11-13 19:51:46 +08:00
LegGasai fc0abf3f37 refactor(llm): rename routeCredential to providerCredential
Reviewers found `routeCredential` unclear. The method takes a provider route id, as `providerInfo()` and `providerRetryPolicy()` on the same adapter do, so the method and its types now carry that prefix: `LlmAdapter.providerCredential()`, `LlmRuntime.providerCredential()`, `ProviderCredential`, `ProviderCredentialGrant`, and `DeepSeekProviderCredentialOptions`.

Behavior is unchanged. master never had the old names, so no released surface is renamed; the upgrade guide for this change names the new ones.
2026-11-13 19:51:35 +08:00
Turtle 616f4d0a5d Merge pull request #8447 from deepseek-harness/feat/ptc-inspect-tool-render
feat(ptc): inspect tool results with their rendered text
2026-11-13 19:30:18 +08:00
Shigma ed4f31876c Merge pull request #8136 from deepseek-harness/feat/hmr-watch-patch-overlays
feat(hmr): reload --patch overlay files with the profile
2026-11-13 19:13:45 +08:00
Magolor ae4b016740 fix(ui-schedule): show clocks on delivery sessions (#8055) 2026-11-13 11:03:43 +00:00
turtle1999 18f492edbc chore: merge master into ptc inspection branch 2026-11-13 18:58:46 +08:00
imccyu 5584bb0301 Merge pull request #8426 from deepseek-harness/feat/ptc-string-literal-guidance
feat(ptc): 收窄 String.raw,文件内容改用逐行引号字符串数组
2026-11-13 18:49:22 +08:00
turtle1999 f3ed11c1a3 fix(ptc): preserve inspection across array changes and images 2026-11-13 18:41:03 +08:00
winewill 99278a0768 test(desktop): wait for saved reports and verify takeover data 2026-11-13 18:30:56 +08:00
winewill 99d881cd16 Merge master into fix/windows-uninstall-registry 2026-11-13 18:26:51 +08:00
winewill d54a04e902 fix(desktop): report uninstall residue and allow scoped cleanup 2026-11-13 18:21:16 +08:00
LegGasai 9ce0c815b5 refactor(deepseek-account): declare the account token header before its first use
platformHeaders() reads ACCOUNT_TOKEN_HEADER about a hundred lines above the constant's declaration. The call only runs after the module has loaded, so behavior is unchanged; the declaration now sits with the module's imports.
2026-11-13 18:08:28 +08:00
Turtle 18178318e9 Merge pull request #8038 from deepseek-harness/feat/standard-cordis-context
feat(preset): 合并 Cordis 检查工具并在标准模式启用
2026-11-13 17:54:46 +08:00
LegGasai 16c7499d51 fix(forge): fit the review layer lens to the file tree width
The lens above the file tree sizes each segment to its label and drops
the counts into each segment's hover text when they do not fit, so no
layer name is cut short. The tree keeps the width the lens needs for
the names alone as its least width, measured in the current language.
2026-11-13 17:50:58 +08:00
LegGasai de594f702d fix(forge): highlight rows after collapsed lines with the lines before them
Rows drawn after collapsed unchanged lines were highlighted as if the
file started there, so a code block, comment, or string that opened in
the collapsed lines colored them wrongly. Once a file's whole new side
is known, each run of rows is now highlighted again in idle time after
up to 120 lines of the file before it, the old side rebuilt from the
new side and the hunks. The first draw still highlights in the same
render, and the new colors wait while the reader selects text in the
file. Local files are read for this once per comparison when they
draw; change request files only once an expansion has read them.
2026-11-13 17:50:18 +08:00
LegGasai 7ef8bed5f5 fix(forge): expand long unchanged-line gaps 20 lines at a time
A gap over 20 lines now offers a step down from the hunk above it and a
step up from the hunk below it, as GitHub's diff does, instead of drawing
every hidden line on one click. Gaps of at most 20 lines still expand at
once, and the first click on the unknown lines after the last hunk reads
the file and shows their first 20.
2026-11-13 17:50:18 +08:00
Ziya f465541b32 Merge pull request #8381 from deepseek-harness/feat/schedule-empty-recommendations
feat(ui-schedule): recommend tasks under the empty automation page
2026-11-13 01:47:50 -08:00
Shigma 396b93e765 test(web): serialize scaffold overlay with stringifyEntryYaml 2026-11-13 17:46:56 +08:00
LegGasai edfc04e049 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential 2026-11-13 17:46:32 +08:00
Shigma ce7bc84b10 Merge pull request #8436 from deepseek-harness/chore/cordis-root-gate
feat(infra): reject new Cordis root reads
2026-11-13 17:44:59 +08:00
turtle1999 28f1580e64 test(ptc): assert formatted read in outer run_code results 2026-11-13 17:41:28 +08:00
Shigma 05f0ec5ef3 docs(upgrade-guide): move profile-context-overlay-paths guide to v0.2.2-rc.3 2026-11-13 17:41:15 +08:00
Shigma 245f37b9ef Merge remote-tracking branch 'origin/master' into feat/hmr-watch-patch-overlays 2026-11-13 17:39:47 +08:00
LegGasai 9e396d9c3d Merge branch 'feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	.agents/notes/implemented/feature/2026-11-05-session-panel.i18n.yaml
2026-11-13 17:38:20 +08:00
LegGasai c8663435dc refactor(session-panel): decide docking in CSS and observe only a dock probe
The Chat aside layer observed the frame and the transcript column, so its
observer called back on every frame of a streamed reply, and the panel wired
useSyncExternalStore to an observable passed through owner props. The layer
now publishes the end gutter as --dsh-chat-aside-gutter and observes nothing.
The panel's stylesheet derives the docked width and a 1px dock probe from one
set of metrics, and the plugin observes only that probe through an injected
ref, so it hears the docking decision flip and nothing else.
2026-11-13 17:36:26 +08:00
turtle1999 3cbe639f33 test(ptc): align existing snapshots with rendered inspection 2026-11-13 17:31:59 +08:00
LegGasai cb0ebcc032 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings master (23c1d884226) through the parent branch. The SDK client README
keeps master's resume-permission paragraph and this branch's statement that
`setWorkingDirectory` moves the `workspace-write` boundary.
2026-11-13 17:23:38 +08:00
turtle1999 500dcf94be feat(ptc): inspect tool results with their rendered text 2026-11-13 17:21:11 +08:00
Shigma c9c0ad58cc docs(defensive-patterns): state the Cordis root context rule 2026-11-13 17:14:36 +08:00
ZiyaZhang f941f1d1ea fix(ui-schedule): thin recommendation glyphs and show full text
The recommendation glyphs draw 1.25px strokes, the shared icons' Regular
weight at 20px, and the hover plus uses the Regular weight as well.
Titles and descriptions wrap in full instead of clipping: descriptions
lost text at two lines in most languages at phone and two-column widths,
and longer titles lost their ends just above the 600px column breakpoint.

The run-time test matches times on digit boundaries, and an end-to-end
case checks English and German titles and descriptions at 390px, 680px,
and 1440px.
2026-11-13 01:10:52 -08:00
LegGasai 19f1314433 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-13 17:05:44 +08:00
LegGasai 8e6fc70ea7 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings master (fe45cf60271) through the parent branch. The client inline-safe
list keeps master's `plugin-market-index/source` and this branch's
`api-session-controller/client/directories`.
2026-11-13 17:05:16 +08:00
creatixchu ce9c7f09bb test(cua): await the pending mouse approval 2026-11-13 17:04:55 +08:00
creatixchu 6fb2fed45a test(cua-macos): verify outside release across focus changes 2026-11-13 17:01:47 +08:00
creatixchu 6294bb0a62 test(cua): verify platform-specific system button admission 2026-11-13 16:59:59 +08:00
creatixchu 15a3fdc5b5 feat(cua-macos): support approved system mouse button holds 2026-11-13 16:57:55 +08:00
LegGasai 51fc5804ab Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	packages/llm/llm-deepseek/src/adapter.ts
2026-11-13 16:56:23 +08:00
LegGasai 3b329ecda5 Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf 2026-11-13 16:49:44 +08:00
CreatixChu d5974a9eda Merge pull request #8296 from deepseek-harness/feat/files-upload-retries
DeepSeek 图片上传支持 3 并发和 429 重试
2026-11-13 16:49:40 +08:00
Dudu-0223 765d0de6fa fix(subagent): label direct human messages explicitly 2026-11-13 16:46:37 +08:00
Shigma 1ae70efcde chore(cordis): sync loader 1.0.0-rc.9 and include 1.2.0 2026-11-13 16:45:54 +08:00
LegGasai e82924c646 Merge remote-tracking branch 'origin/master' into feat/client-review-page-seams
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-11-13 16:44:20 +08:00
LegGasai d707b9209d feat(forge): search the review lists under the client search rule
The lists matched the title, number, repository, and author by lowercase substring. They now build one
TextSearchIndex per section, so a query also matches a word-start fuzzy subsequence, as every other client list does.
2026-11-13 16:42:20 +08:00
LegGasai f9a492fb0d test(forge): give the review page host fixture its review events 2026-11-13 16:42:18 +08:00
fz e198ef07b3 Merge pull request #8400 from deepseek-harness/feat/sdk-resume-permissions
feat(sdk): allow permission overrides when resuming sessions
2026-11-13 16:40:12 +08:00
Turtle 62332f963a Merge pull request #8435 from deepseek-harness/turtle/add-stale-pr-action-ca3ec638c590
feat(ci): remind authors of stale pull requests
2026-11-13 16:35:49 +08:00
LegGasai 1142963202 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-13 16:33:33 +08:00
LegGasai a23f4cb0d1 docs: name workspace-root/change where notes and the forge README describe directory changes
The directory service records `workspace-root/change`, the forge panel
re-inspects after it, and the forge worktree projection folds it beside stored
`working-directory/change` events.
2026-11-13 16:29:44 +08:00
LegGasai 6584464158 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-13 16:29:31 +08:00
LegGasai d7841ef3fc Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/subsystems/forge.md
#	docs/subsystems/forge.zh.md
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/src/client/ChangesTab.tsx
#	packages/experimental/client-ui-forge/src/types.ts
#	packages/experimental/forge-github/README.i18n.yaml
#	packages/experimental/forge-github/src/provider.ts
#	packages/experimental/forge-github/tests/plugin.spec.ts
#	packages/experimental/forge/README.i18n.yaml
#	packages/experimental/forge/src/index.ts
#	packages/experimental/forge/src/types.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
2026-11-13 16:28:28 +08:00
Turtle 5637684234 Merge pull request #7821 from deepseek-harness/turtle/settings-plugin-entry-250a00ad5c10
feat(client): show plugin settings on the Plugins page
2026-11-13 16:26:48 +08:00
CreatixChu 836c207b69 Merge pull request #8314 from deepseek-harness/feat/cua-platform-page
feat(cua): 在启用后的设置面板显示使用建议
2026-11-13 16:26:18 +08:00
Turtle a13fd52072 Merge remote-tracking branch 'origin/master' into turtle/clean-empty-catch-69cac4a2ccee
# Conflicts:
#	packages/boot/plugin-market/src/repository-cache.ts
2026-11-13 16:23:40 +08:00
Shigma 531d65f938 fix(infra): resolve Cordis root bindings through scopes and symbols 2026-11-13 16:23:25 +08:00
Turtle d42a1c9deb refactor: read open-in-app payload and runner error delivery through helpers 2026-11-13 16:21:52 +08:00
Dudu-0223 945fd1dcd3 test(subagent): refresh legacy multi-child writer expectations 2026-11-13 16:16:31 +08:00
creatixchu fe6e77bfe9 Merge remote-tracking branch 'origin/master' into feat/cua-platform-page
# Conflicts:
#	snapshots/web/creation-recommendations/session.v4.jsonl
2026-11-13 16:14:34 +08:00
creatixchu a6fad15e88 Merge commit 'f18332dace6' into feat/files-upload-retries 2026-11-13 16:13:41 +08:00
acehinnnqru 2405642774 Merge pull request #8159 from deepseek-harness/feat/git-plugin-index-sources
feat(plugin-market): support Git index sources
2026-11-13 16:13:03 +08:00
creatixchu ffbb70c23f Merge remote-tracking branch 'origin/master' into feat/files-upload-retries 2026-11-13 16:12:54 +08:00
LegGasai e3c01b3147 chore(client): regenerate the slot catalog after merging master
Refs #8312
2026-11-13 16:12:39 +08:00
imccyu 1e062c2660 Merge pull request #8438 from deepseek-harness/revert-8268-fix/chat-image-current-working-directory
Revert "fix(ui-chat): resolve relative Markdown images and links from…
2026-11-13 16:12:30 +08:00
creatixchu 9d33fae5d4 Merge commit 'c9cd70aba9c' into feat/files-upload-retries 2026-11-13 16:12:17 +08:00
imccyu f14fb7c76f test(ptc): sync run_code string guidance in tests, snapshots, and docs
Update the full-text instruction assertions, the run_code tool-schema and system-prompt sidecars of the session, SDK, and Web snapshots, the cua-mcp expected tools, the generated tool catalog with its Chinese pair, and the ptc-runtime-node README pair.
2026-11-13 16:12:16 +08:00
LegGasai 6595f8beb4 docs(upgrade-guide): move the workspace-write boundary guide to v0.2.2-rc.3
master released 0.2.2-rc.3, so the guide this branch adds belongs in the
current version's directory.
2026-11-13 16:11:18 +08:00
imccyu 179849fb99 Revert "fix(ui-chat): resolve relative Markdown images and links from the directory current when each message was written" 2026-11-13 16:10:41 +08:00
Dudu-0223 9a93dd6f21 test(subagent): update CLI and SDK delegated task fixtures 2026-11-13 16:07:13 +08:00
LegGasai b1182e12ba Merge commit 'c9cd70aba9c' into feat/client-review-page-seams 2026-11-13 16:06:53 +08:00
TurtleandLegGasai 81aef2ec2d feat(client): show plugin settings on the Plugins page
Plugin settings pages registered through `settings.section` stay in the
Settings dialog. The Plugins page also shows such a page on the bundle row,
or bundle, whose package registered it when that row or bundle has no
configuration of its own. Both surfaces render the page through the new
`settings.section.view` Factory, which declares `settings.section`; the slot
runtime records the registering package on each entry.

Settings replaces the Built-in plugins section with a Plugins entry that
opens the Plugins page. The two packages behind that section are removed,
and the page-local client sync notice moves to the Plugins page.

Co-authored-by: LegGasai <75920107+LegGasai@users.noreply.github.com>
2026-11-13 16:06:36 +08:00
std4453 3f664a5b5e Merge pull request #8268 from deepseek-harness/fix/chat-image-current-working-directory
fix(ui-chat): resolve relative Markdown images and links from the directory current when each message was written
2026-11-13 16:04:10 +08:00
Turtle a257729b52 fix(ci): read every pull request timeline for stale reminders 2026-11-13 16:03:58 +08:00
LegGasai 639c558fd3 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-13 16:02:53 +08:00
Dudu-0223 a1b71351f2 refactor(ptc): share output truncation paths 2026-11-13 15:59:25 +08:00
Shigma a29dafde97 feat(infra): reject new Cordis root reads 2026-11-13 15:57:55 +08:00
LegGasai cb44a3c2ee feat(forge): read, review, and bind GitLab merge requests (#8317)
* feat(forge): let providers declare their hosts, names, sign-in, and review decisions

Prepare the forge contract for a second provider:

- ForgeProvider lists the hosts it serves and names itself (label,
  changeRequestNoun); registering a provider that lists a host another
  registered provider lists throws, so each URL has at most one provider.
  ctx.forge.describe(forge) returns the family's ForgeDescription.
- ForgeReadiness carries the sign-in command, which the panel's sign-in
  banner shows instead of building `gh auth login` for the github family.
- ForgeReviewData lists the review decisions the host lets the reader
  record; the review dialog offers only those instead of hardcoding the
  GitHub rule that a pull request's author may only comment.
- ForgeReviewThread.original may name a later commit the host carried the
  thread to while its lines stayed unchanged.
- The changes view names the code host and its word for a change request
  from the entry's ForgeDescription instead of hardcoding GitHub and PR.

The GitHub provider declares its configured hosts, GitHub, pull requests,
`gh auth login --hostname <host>`, and reads viewerDidAuthor for the
review decisions. Upgrade guide: forge-provider-hosts.

* feat(forge-gitlab): read GitLab merge requests through the GitLab CLI

Add the experimental forge-gitlab provider. It serves the configured
GitLab hosts through glab: status batches over GraphQL, head-pinned
patches from merge request diff versions, commit listings, merge bases,
pipeline jobs, closing issues, and review threads mapped from REST
discussions, including outdated threads' hunks.

The forge bundle composes the provider, disabled by default.

* feat(forge-gitlab): write GitLab reviews, retry pipelines, request reviews, and rebase

The GitLab provider now writes through glab as well as reading:
comments start discussions at positions derived from the head's diff
version, pending replies and comments are draft notes that a review
publishes with its summary and review state, and approving checks the
head through GitLab's sha parameter. Review reads carry the signed-in
user's rights from GraphQL, their draft notes as the pending review,
and the decisions GitLab lets them record.

Snapshots name the head pipeline as every job's rerun, offer rebase as
the branch update, and follow GitLab's permissions for reruns and
review requests. updateBranch's contract now states how a provider
whose host takes no expected head checks it.

* feat(forge): let forge providers register the commands that bind change requests

forge-session no longer recognizes gh commands by itself. A provider now
registers a declarative ForgeCommandRule through
ctx.forgeSession.registerCommands: its executable, creation and reference
subcommands, change request page path, JSON URL members, declared
options, and a pure select that maps one parsed reference command to a
URL or a read-only lookup. forge-github registers gh and forge-gitlab
registers glab, which adds glab mr create, view, update, and checkout,
including numbers with -R: a full project URL binds directly, and other
repository forms resolve through glab mr view in the call's shell.

forge-session keeps the shared parts: the literal shell tokenizer,
option parsing, output reading, lookups, and the projection. The
forgeChangeRequests state version derives from the recognized rules, so
a changed rule set refolds every Session, including commands that ran
before the provider loaded. Ending a registration keeps its rule
recognized until restart, so unloading providers at shutdown does not
rewrite every checkpoint.

* refactor(forge-gitlab): publish the GitLab provider as @deepseek-ai/dsh-forge-gitlab

New experimental packages omit the experimental prefix so that promotion
keeps their npm name. Register the directory in
EXPERIMENTAL_PACKAGE_NAME_EXCEPTIONS instead of growing the legacy
prefixed list, and rename every dependency, configuration row, path
mapping, and document that names the package.

* fix(forge-gitlab): keep review writes, comment positions, and reads within GitLab's facts and the limits

- After GitLab refuses a publication, read the drafts again: delete
  them only when all remain, since GitLab can publish them before it
  refuses the summary, and report the outcome as unknown otherwise.
  A rollback that leaves drafts reports how many may remain.
- Place comments on files GitLab collapsed through the diff compared
  from their texts, and let a file's new path name it over another
  file's old path after chained renames.
- Keep the final newline of raw file reads.
- Apply maxOutputBytes to the complete review result, and report a
  read whose rights stop early or skip a discussion's later notes as
  truncated.
- Serve a version over maxCachedVersionBytes without keeping it.
- Resolve uploaded avatars GitLab names by their path on the host.
- Schedule bounded reads through p-limit.

* fix(forge-session): run lookups only for live command rules and keep the projection registered

- Reference lookups use the rules of live registrations, so a disposed
  provider's rule still folds but starts no gh or glab process.
- A failed re-registration registers the projection again with the
  earlier rules, so clients keep its view; an error is logged only when
  that fails too.
- Document the startup re-registration, test that the checkpointed
  state version survives a real Loader start, shutdown, and restart,
  and record that starting without a provider removes the bindings only
  its commands made.
- Describe the changes view's pending review and single comment
  without naming GitHub, which keeps its own rule in forge-github, and
  render registerCommands as code in the generated service reference.

* fix(forge-bundle): name GitLab merge requests in the bundle description

The bundle now follows GitLab merge requests as well as GitHub pull
requests, so the description's first sentence in every locale names
both kinds of change request.

* feat(forge): bind the change requests that gh api and glab api requests name

Models often read a merge request through `glab api` or a pull request
through `gh api` instead of `glab mr view` or `gh pr view`, which left
the change request unbound. A command rule now declares raw API request
subcommands beside its reference subcommands, each group with its own
options, since `-f` is a value of `gh api` and a flag of
`gh pr checkout`.

An API request binds, as referenced, only the change request its REST
path names, such as `projects/group%2Fapp/merge_requests/7/changes` or
`repos/octo/demo/pulls/7/files`; its output is not read, since one
request can list many change requests. A path whose host the command
names binds directly, and one without a host, or with the current
repository's placeholders, resolves through the CLI's view command in
the call's shell. The gh and glab rules move to version 2.

* docs(forge): add forge-gitlab and the forge-session peers to the module graph

Regenerate docs/module-graph for the renamed GitLab provider and the
optional forge-session peer of both providers.

* test(web): refresh the forge bundle description in the recommended plugin catalog

The creation recommendation recording carries every recommended
plugin's description; refresh it for the forge bundle description that
now names GitLab merge requests and the glab sign-in.

* chore(forge-gitlab): carry the 0.2.2-rc.3 release version and move upgrade guides to v0.2.2-rc.3
2026-11-13 07:56:57 +00:00
LegGasai 86c3127ecf Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-13 15:55:47 +08:00
LegGasai e92c4eea4b Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
master released 0.2.2-rc.3: the removed `tool-working-directory` package stays
deleted (master only bumped its version), and the upgrade guide moves to
`docs/upgrade-guide/v0.2.2-rc.3/`.
2026-11-13 15:54:46 +08:00
creatixchu 17280dfe22 Sync master and move the Files upload upgrade guide to v0.2.2-rc.3 2026-11-13 15:54:14 +08:00
Turtle 94f22e7cde feat(ci): remind authors of stale pull requests
Refs #8432
2026-11-13 15:53:54 +08:00
Dudu-0223 05972d213d test(subagent): assert task guidance without unsafe matchers 2026-11-13 15:52:35 +08:00
LegGasai 76d7a49e9f docs(upgrade-guide): move the route credential guide to v0.2.2-rc.3
master released 0.2.2-rc.3, which freezes docs/upgrade-guide/v0.2.2-rc.2.
The guide of this unmerged change moves to the directory of the current
root version, and the route credential Agent Note links to its new path.
The guide text is unchanged.
2026-11-13 15:52:07 +08:00
Turtle 8abc7016f1 refactor(scripts): share the /proc stat scan in run-gates 2026-11-13 15:49:51 +08:00
Dudu-0223 2e6c0e0fce docs(subagent): sync initial task attribution contract 2026-11-13 15:48:53 +08:00
Dudu-0223 f8401a14c1 test(cua-mcp): align retained output guidance 2026-11-13 15:47:21 +08:00
Turtle 62d9bdc2f3 test(cordis): address the merged inspection tool in the host error-code case 2026-11-13 15:45:04 +08:00
turtle1999 2f79c7386f docs(preset): describe shared runtime inspection in both modes 2026-11-13 15:45:04 +08:00
turtle1999 34d7444270 test(cordis): align standard inspection expectations 2026-11-13 15:45:04 +08:00
turtle1999 5dfda6a5f3 refactor(cordis): unify runtime inspection tool 2026-11-13 15:45:04 +08:00
Dudu-0223 b48cfeedd9 fix(subagent): attribute initial delegated tasks to their sender 2026-11-13 15:44:12 +08:00
LegGasai 1c82040188 fix(jobs): keep the job row at 28px while the stop control is armed
The armed Confirm stop pill dropped the idle button's negative margin and
kept its 24px height, so arming grew the row to 32px. The pill is now the
20px the row's padding leaves, with 6px side padding.
2026-11-13 15:44:11 +08:00
LegGasai a526f9c73c Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings master (baaafb30c33) and the parent's Windows separator fix. The
module graph and the capability-seams pairing record are regenerated for the
combined tree.
2026-11-13 15:42:55 +08:00
LegGasai 17da980349 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential 2026-11-13 15:42:52 +08:00
fz 68805d989f fix(sdk): reject unknown session resume options 2026-11-13 15:41:57 +08:00
turtle1999 3682913394 feat(preset): expose Cordis inspection in standard mode 2026-11-13 15:41:32 +08:00
creatixchu 6e7aa535f9 fix(cua-macos): sample the cursor after validating window geometry 2026-11-13 15:40:30 +08:00
zhc d2b8edfa8e Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory 2026-11-13 15:39:57 +08:00
Dudu-0223 dfc7dbf648 fix(ptc): truncate output without interrupting execution 2026-11-13 15:39:03 +08:00
creatixchu 65d54e5abc fix(cua-macos): check the press recipient before reading AX geometry 2026-11-13 15:38:39 +08:00
imccyu 39163dd30f Merge pull request #8422 from deepseek-harness/worktree-sync-release-dsh-0.2.2-rc.3-to-master
release(dsh): sync 0.2.2-rc.3 back to master
2026-11-13 15:37:50 +08:00
creatixchu 62d53b6938 feat(cua-macos): send individual mouse button events to a window 2026-11-13 15:34:27 +08:00
LegGasai 1baaf819d7 docs(llm-route-credential): use the established Chinese term for a withdrawn credential
The Chinese pages of the route credential change rendered "withdraw" as
收回. The bilingual pages on master render it as 撤回 in most places, so
the seven pages this branch edited now use that term. The English pages
are unchanged; only the Chinese hashes of the pairing records move.
2026-11-13 15:30:20 +08:00
Turtle 3b0e25bc4b Merge pull request #8337 from deepseek-harness/turtle/add-fork-divider-icon-00480ee14df2
feat(web): lead the inherited-history divider with a fork icon
2026-11-13 15:30:15 +08:00
Turtle 35cc5d7759 Merge origin/master
# Conflicts:
#	packages/client/ui-primitives/src/clipboard.ts
2026-11-13 15:28:44 +08:00
Turtle f184f77006 fix: retire legacy empty-catch baseline entries
Name every empty catch binding, state why each discarded failure is safe,
and narrow each wide try to the single statement whose failure is tolerated.
The empty-catch baseline is now empty.
2026-11-13 15:28:28 +08:00
LegGasai 6d7c04f66a fix(worktree): match worktree subdirectories with the platform separator
`within` prefixed the root with `/`, so on Windows a directory below a
recorded worktree was not inside it: `exit_worktree` failed with
`WORKTREE_NOT_ENTERED` from a worktree subdirectory, and reclamation did not
see a Session working there. It now prefixes with the platform separator.

The Web collapse-timing expected output counts the tools a turn adds; it
drops by one with the removed `working_directory` tool.
2026-11-13 15:28:12 +08:00
imccyu 2a1c123912 Merge branch 'master' into worktree-sync-release-dsh-0.2.2-rc.3-to-master 2026-11-13 15:26:46 +08:00
Shigma 94d9995755 Merge pull request #7940 from deepseek-harness/refactor/cordis-include-yaml
refactor(cordis): route Include-dialect YAML through Include exports
2026-11-13 15:26:20 +08:00
imccyu c9cfbcfa10 feat(ptc): limit String.raw and write file contents as quoted line arrays
Add two sentences to the Node run_code output instructions shared by every execution mode: use the raw form of a template literal only for short text whose backslashes must stay as written, write other text as ordinary strings, and write file contents as an array of quoted line strings joined with newlines.
2026-11-13 15:24:41 +08:00
imccyu a7beca9f00 Merge branch 'master' into worktree-sync-release-dsh-0.2.2-rc.3-to-master 2026-11-13 15:23:05 +08:00
LegGasai 18928a9014 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
master's new `web/deepseek-chat-import` scenario listed the removed
`working_directory` tool and the delegation tools' `cwd` parameter; its
tool-schema sidecar is refreshed.
2026-11-13 15:22:56 +08:00
Shigma 05326a723f Merge pull request #7917 from deepseek-harness/chore/cordis-core-rc12
chore(cordis): upgrade core to 4.0.0-rc.12
2026-11-13 15:21:55 +08:00
LegGasai b203bc06d0 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-13 15:18:12 +08:00
imccyu ff6db9df9f Merge branch 'release/dsh-0.2.2' into master 2026-11-13 15:12:47 +08:00
Dudu-0223 10c8cf7bdf fix(subagent): identify direct human messages in child context 2026-11-13 15:12:39 +08:00
LegGasai b1e9c1f984 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Brings master (e4c4fd4114c) through the parent branch. The client inline-safe
list keeps master's `util-text-search` and this branch's
`api-session-controller/client/directories`.
2026-11-13 15:12:26 +08:00
creatixchu acb80b2f4d Merge remote-tracking branch 'origin/master' into feat/cua-platform-page
# Conflicts:
#	snapshots/web/creation-recommendations/session.v4.jsonl
2026-11-13 15:11:24 +08:00
creatixchu ce3e0299a0 Merge commit 'baaafb30c33' into feat/files-upload-retries 2026-11-13 15:11:16 +08:00
creatixchu b416ccffa3 Verify a throttled image stops retrying when its next upload times out 2026-11-13 15:09:16 +08:00
imccyu f3ac7b9078 Merge pull request #8401 from deepseek-harness/worktree-sync-release-dsh-0.2.2-to-master-1113
release(dsh): sync release/dsh-0.2.2 back to master
2026-11-13 15:08:58 +08:00
creatixchu 2a60df0944 Merge master and apply upload timeout backoff once per model request 2026-11-13 15:07:21 +08:00
_Kerman 19c736df25 Merge latest master into the output projection stack base 2026-11-13 15:06:52 +08:00
Huo Yaoyuan 0da6ad9656 feat(cua-windows): implement window-level mouse button toggles 2026-11-13 15:06:25 +08:00
Turtleandimccyu 3528d66356 docs(web): state the divider glyph contract without rationale prose
Trim the divider caption comment, test comment, and README sentence to
current behavior, record the new glyph rule copy in the bash-sample
inventory, and pin the glyph's font-delta edge in the font-axis spec.

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-13 15:06:16 +08:00
Turtleandimccyu ff9b864641 feat(web): mark the inherited-history divider with the fork glyph
The divider that separates a forked Session's inherited history from its own
messages was a bare hairline and caption, so it read as an unlabelled rule
rather than a boundary with a meaning.

Lead the caption with the shared fork glyph, the same artwork the branch
action uses, and keep both inside one caption group so they share the
tertiary ink. The glyph takes the 14px flow-row edge and follows the
content font delta like the other chat row leading icons.

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-13 15:06:15 +08:00
LegGasai dfc556f197 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-13 15:03:42 +08:00
creatixchu 43bea0aad3 fix(cua): clear pending provider lookup when a refresh is superseded 2026-11-13 15:03:32 +08:00
winewill 2596312946 Merge pull request #8377 from deepseek-harness/fix/rollout-website-approval
fix(desktop): 官网上传审批后自动刷新缓存
2026-11-13 15:01:46 +08:00
imccyu 42091205a5 docs(module-graph): regenerate after the chat import brand change 2026-11-13 14:59:32 +08:00
creatixchu 35db77508c test(cua): exercise the real inventory service on macOS 2026-11-13 14:58:57 +08:00
Shigma f7d278a96a Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml 2026-11-13 14:58:15 +08:00
Shigma b005363d62 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12 2026-11-13 14:58:13 +08:00
fz 78e5ecce15 refactor(python-sdk): accept options when resuming sessions 2026-11-13 14:58:12 +08:00
LegGasai 87a08ec4b8 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential 2026-11-13 14:57:24 +08:00
creatixchu 0e26f822f3 fix(cua): resolve Windows setup through the injected inventory 2026-11-13 14:57:15 +08:00
LegGasai 5d12271bad Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-13 14:56:49 +08:00
zhc 023a89ca18 Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory 2026-11-13 14:55:28 +08:00
Dudu-0223 30dfcb7fae refactor(ptc): handle output overflow at the failure site 2026-11-13 14:54:53 +08:00
fz 145d2d8a49 docs(sdk): sync module graphs with the resume permission dependency 2026-11-13 14:52:22 +08:00
creatixchu 7cb273053e Merge remote-tracking branch 'origin/master' into feat/cua-platform-page 2026-11-13 14:52:16 +08:00
fz 9cd8d21e43 Merge remote-tracking branch 'origin/master' into feat/sdk-resume-permissions 2026-11-13 14:51:36 +08:00
winewill c61a9b8a4f Merge remote-tracking branch 'origin/master' into fix/rollout-website-approval
# Conflicts:
#	packages/client/ui-primitives/src/clipboard.ts
2026-11-13 14:50:54 +08:00
imccyu d8fa4d96e8 Merge branch 'master' into sync branch 2026-11-13 14:50:29 +08:00
imccyu f6f800c8b9 Merge pull request #8415 from deepseek-harness/fix-empty-catch-clipboard-try
fix(ui-primitives): keep the clipboard try to one statement
2026-11-13 14:48:36 +08:00
imccyu 93025543d7 Merge pull request #8416 from deepseek-harness/ci/pre-merge-depth-fetch
ci: fetch the pre-merge history by depth instead of by date
2026-11-13 14:48:18 +08:00
winewill 061f6b8f33 Merge remote-tracking branch 'origin/master' into fix/rollout-website-approval 2026-11-13 14:43:36 +08:00
winewill bedc2e499a fix(ci): stabilize browser interactions and narrow clipboard try 2026-11-13 14:42:03 +08:00
imccyu 54330f75e4 fix(ui-primitives): keep the clipboard try to one statement 2026-11-13 14:40:21 +08:00
LegGasai 564dfa8623 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	apps/desktop/README.i18n.yaml
#	docs/AGENTS.md
#	docs/capability-seams.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-schema.json
#	packages/account/deepseek-account/README.i18n.yaml
#	pnpm-lock.yaml
#	scripts/doc-budgets.manifest.json
2026-11-13 14:40:18 +08:00
imccyu 25e7fe12af ci: fetch the pre-merge history by depth instead of by date
The pre-merge step fetched the history since the master diff check's window start. A
date window marks a master merge commit shallow when its pull-request parent predates the
window, which drops its master parent too, so the merge base settled on an older commit
and the merge reported conflicts GitHub did not see (#8095, #8268). The step now fetches
150 commits of both sides without blobs, enough for the base-branch commits a 72-hour-old
base can be behind, and reports a missing common commit instead of a conflict.
2026-11-13 14:37:45 +08:00
Dudu-0223 00fdf3aeae fix(ptc): narrow output failure recovery to overflow 2026-11-13 14:36:18 +08:00
creatixchu 8403a1f6f4 test(cua): record guidance before the permission controls 2026-11-13 14:35:24 +08:00
creatixchu 3be5437760 feat(cua): show setup guidance above the enabled controls 2026-11-13 14:35:24 +08:00
LegGasai 547dcea7a9 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
The sandbox policy listens for `workspace-root/change` instead of testing the
`workspace` marker, and this branch's notes, upgrade guide, and test comments
name `working-directory/change` where they described a change without the
marker.
2026-11-13 14:22:27 +08:00
imccyu eba84b96cf Merge branch 'master' into sync branch 2026-11-13 14:18:42 +08:00
LegGasai a0cda70705 refactor(working-directory): record workspace moves as workspace-root/change
Replace the optional `workspace` marker on `working-directory/change` with a
separate `workspace-root/change` event. The directory service records the new
event for every change. `working-directory/change` keeps master's payload, is
tagged @deprecated, and has no writer.

The current-directory projection folds both events and the workspace-root
projection folds only the new one, so a stored Session keeps its original
project as its root. The Session format version is unchanged and no migration
runs; the persistence record for the marker is replaced by one for the new
event.
2026-11-13 14:13:45 +08:00
LegGasai 1966a5e2bb fix(llm-deepseek-account): end requests whose account credential is signed out
Unloading the account route removed its sign-out listener and running-task
report while a model request it had dispatched kept streaming, so a later
sign-out neither closed that request nor cancelled its turn.

A route credential grant now carries an optional `revoked` signal. The
account service aborts it at each sign-out, after the
deepseek-account/signed-out listeners return, and the shared transport
runs the model request and its file operations under it. The route plugin
names that end ACCOUNT_SIGN_IN_REQUIRED and cancels the route's running
Agents from the request's own failure callback, so a turn whose route was
disabled mid-turn still ends with the signed-out cause, and disabling the
route never waits for a turn.

The Search and Fetch API providers and Messages search run their request
under the same signal and report WEB_PROVIDER_ERROR with sign-in guidance,
keeping WEB_ABORTED for caller cancellation. Account model requests
outside an Agent turn and account-billed web requests therefore end at
sign-out as well. The web-search-account-signout recorded scenario pins
the failure the model sees.

While the route is disabled, a task it started that is executing a tool
is not reported to the sign-out confirmation and ends at its next model
request, which fails because the route is no longer registered.

The API-key route README Summary exceeded its 100-word limit; the origin
detail moves to the usage section.
2026-11-13 14:13:41 +08:00
Dudu-0223 49c4b6766f refactor(session): remove unrelated lifecycle and vendor changes 2026-11-13 14:13:24 +08:00
Shigma e7a31d7517 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	packages/bundle/web-app/src/index.ts
#	packages/client/connection/src/index.ts
2026-11-13 14:08:25 +08:00
imccyu 22d9418435 chore(client): regenerate the cordis client slot catalog 2026-11-13 14:07:19 +08:00
imccyu a6a0327e0b fix(experimental): mint imported chat ids with brandString
The import package called the retained SessionId, SessionSeq, SessionLogOffset,
MessageId, and ToolCallId constructors directly. Master routes business code
through brandString/brandNumber from dsh-brand, so the retained constructors
stay confined to compatibility tests, and type-only imports keep the packages
out of the runtime peer policy.
2026-11-13 14:07:18 +08:00
Shigma 37735a8013 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-11-13 14:03:58 +08:00
zhc d967ca54a5 Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory 2026-11-13 14:02:42 +08:00
Turtle 8c328900d1 Merge pull request #6705 from deepseek-harness/search-fuzzy-converge
refactor(client): converge search lists on shared multilingual fuzzy filter
2026-11-13 05:56:41 +00:00
winewill f0e0e232b2 Merge remote-tracking branch 'origin/master' into fix/rollout-website-approval 2026-11-13 13:53:51 +08:00
zhc 47e6c030b2 Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory 2026-11-13 13:50:28 +08:00
imccyu f51b6bd331 Merge branch 'master' into sync branch 2026-11-13 13:44:32 +08:00
LegGasai 91f3f69995 Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-13 13:43:48 +08:00
LegGasai f9495ca61b fix(session-panel): join the toggle's name with aria-labelledby instead of a space
The toggle's accessible name joined the panel name and the indicators' text
through a whitespace text node. It now references both with aria-labelledby,
which separates them by definition; the indicators sit in a display: contents
wrapper, so their layout is unchanged.
2026-11-13 13:43:47 +08:00
Turtle 7c133687d4 Merge pull request #7915 from deepseek-harness/turtle/xdg-dsh-home-paths-b5c874c2815a
feat(home-paths): add dshPath category helper and home path proposal
2026-11-13 13:40:09 +08:00
Turtle fce3880969 Merge pull request #8125 from deepseek-harness/turtle/fix-copy-failure-3ccb99f806dd
fix(web): fall back to execCommand when the clipboard write is refused
2026-11-13 13:32:37 +08:00
LegGasai f0bc702c5a Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	apps/desktop-host/tests/file-drag.spec.ts
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	docs/subsystems/worktrees.i18n.yaml
#	packages/api/session-controller/tests/session-skills.host.spec.ts
#	packages/api/workspace-files/tests/scope.spec.ts
#	packages/client/tsdown.client.ts
#	packages/deliverables/workspace-changes/tests/git.spec.ts
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/src/index.ts
#	packages/sandbox/sandbox-policy/package.json
#	packages/session/working-directory/package.json
#	packages/test-support/agent-loop-testkit/tests/agent-loop-testkit.spec.ts
#	pnpm-lock.yaml
2026-11-13 13:30:22 +08:00
Turtle 1c94f3ad57 feat(home-paths): add dshPath category helper and home path proposal
Add dshPath(category, ...segments) for config, data, state, cache, and
backup directories under DSH_HOME, expose it to Loader expressions, and
record the classification of every existing path as a proposal. No
existing storage path moves.

Refs #7914
2026-11-13 13:27:33 +08:00
imccyu cd5a4950c3 Merge branch 'release/dsh-0.2.2' into master 2026-11-13 13:26:31 +08:00
fz f44702cb40 feat(sdk): allow permission overrides when resuming sessions 2026-11-13 13:23:09 +08:00
Dudu-0223 fb37aa9c32 Merge master into session control message 2026-11-13 13:11:39 +08:00
Dudu-0223 ffbdd6a670 fix(session): retain standard tool cancellation semantics 2026-11-13 13:08:27 +08:00
turtle1999 a5bdc28238 refactor(client): converge search lists on shared multilingual fuzzy filter
Fixes #6681
2026-11-13 13:05:16 +08:00
_Kerman 7dc0680570 fix: keep text extraction imports unique after master merge 2026-11-13 13:03:46 +08:00
dsh-ci-bot 767c5f953c Merge master 6ce7674295 into fix/ci-907c47c-fold-settle-wait 2026-11-13 13:02:25 +08:00
_Kerman 10aed76233 docs: refresh generated dependency graphs after master merge 2026-11-13 12:58:10 +08:00
_Kerman e0f180caa5 Merge latest master into xtr/content-to-text 2026-11-13 12:57:35 +08:00
_Kerman e538a71b24 Merge remote-tracking branch origin/xtr/content-to-text 2026-11-13 12:53:39 +08:00
Turtle 7846322978 Merge pull request #8245 from deepseek-harness/turtle/fix-cmdw-after-usage-ead3844dbbbc
fix(desktop): close the window with Cmd+W from the Platform page
2026-11-13 12:47:31 +08:00
LegGasai b5c6513105 Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-13 12:46:06 +08:00
LegGasai 12927fa16e fix(conversation): cap the default transcript width at 880px
The default transcript was wider than in comparable agent products; it now
stops at 880px, with the embedded transcript and its composer card capped to
match, which also leaves the Session panel room to dock in more windows.
2026-11-13 12:45:57 +08:00
LegGasai 17fca0af2e fix(session-panel): dock wider and float narrower, closer to the edge
The docked panel is now 300-360px wide, 40px clear of the transcript and
8px from the end edge, so it docks from a 348px gutter; the overlay is
280px wide, so it covers less of the transcript than the docked panel takes
beside it.
2026-11-13 12:45:55 +08:00
LegGasai 0d0188c282 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-13 12:45:45 +08:00
LegGasai c5ae0bb344 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-schema.json
2026-11-13 12:44:39 +08:00
Turtle 2ec306eacb Merge pull request #8073 from deepseek-harness/turtle/fix-web-fetch-error-58da60e9770f
feat(web-fetch-http): classify transport failures and show readable causes
2026-11-13 12:39:48 +08:00
turtle1999 505b2bc0e6 docs(client): require multilingual fuzzy matching in user-facing search
Refs #6681
2026-11-13 12:39:20 +08:00
LegGasai d1d553049c Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	docs/subsystems/worktrees.i18n.yaml
#	docs/subsystems/worktrees.md
#	docs/subsystems/worktrees.zh.md
#	docs/tool-catalog.i18n.yaml
#	packages/acp/acp/tests/bridge.spec.ts
#	packages/acp/acp/tsconfig.json
#	packages/experimental/tool-worktree/tests/loader-composition.spec.ts
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/src/index.ts
#	packages/sdk/server/tests/server.spec.ts
#	packages/session/tool-working-directory/package.json
#	packages/session/working-directory/tests/working-directory.spec.ts
#	snapshots/sdk/tool-error-details/notifications.expected.jsonl
#	snapshots/sdk/tool-error-details/session.v4.jsonl
#	snapshots/session/advanced-toolchain/session.v4.jsonl
#	snapshots/session/ptc-python-turn/system-prompt.expected.md
2026-11-13 12:25:55 +08:00
Chinesezjc 230c7b4288 Merge pull request #8396 from deepseek-harness/fix/ci-eeaeb73-stylesheet-realpath
fix(client): key stylesheets by the real package path
2026-11-13 12:14:13 +08:00
dsh-ci-bot 1732b2685b fix(client): judge stylesheet containment with pathBelow
relative() returns an absolute path when a Windows package and its stylesheet sit on different drives, and startsWith('../') read that as inside the package. Reuse the file's pathBelow() so the '..' prefix, an absolute result, and the package root all take the dependency branch, matching resource(). The new symbolic-link case also follows the repository's junction convention on Windows and asserts the compiled text still resolves.
2026-11-13 12:02:19 +08:00
MagolorandZiyaZhang d997173e45 feat(timeline): integrate Timeline as an experimental plugin (#7973)
* Add Timeline as an experimental Harness plugin

* fix(timeline): align prompt counters and release inactive views

* fix(timeline): refine frontend motion and document features

* test(timeline): refresh recorded context after upstream update

* fix(timeline): satisfy UI locale and module graph checks

* test(timeline): align integration checks with CI test lanes

* docs(timeline): document exported locale dictionaries

* fix(timeline): use session records and native client interfaces

* fix(timeline): mount edit RPC and align integration checks

* fix(timeline): follow Harness theme rules

* test(timeline): cover session recovery and client interactions

* fix(timeline): address integration review findings

* fix(timeline): isolate forked plan continuation

* docs(timeline): record the 0.4.0 integration changes

* docs(timeline): clarify the plugin description

* test(timeline): cover integration behavior and recovery edges

* fix(timeline): align dependency metadata and test lint

* fix(timeline): isolate scoped work and harden replay

* docs(timeline): refresh persistence catalog source links

* docs(timeline): document planning ownership predicate

* test(timeline): refresh the recommendation description snapshot

* build(timeline): classify Host dependency exports

* test(web): pace the Goal queue snapshot replay

* feat(timeline): make sidebar auto-open configurable

* docs(timeline): clarify sibling task weights

* fix(timeline): harden report updates and checkpoint recovery

* refactor(timeline): share detail view props

* fix(timeline): clarify progress, reports, and sidebar settings (#8347)

* fix(timeline): align the integration with current Harness contracts

* fix(timeline): preserve navigation when removing a task tree

* Reduce Timeline report replay allocations

Reuse the discussion list when report retention leaves its targets intact.
Clarify that the integrated package follows the Harness release version.

Node 24.21.0 on macOS arm64, median of three measured replays after warmup.
With 17,640 reports, replay took 5650 ms before and 804 ms after.
Peak RSS fell from 343 MiB to 288 MiB. Retained heap stayed near 33 MiB.
The serialized view stayed at 5,297,849 bytes.

---------

Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com>
2026-11-13 11:54:22 +08:00
zhc d6e46e267d Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-11-13 11:51:19 +08:00
LegGasai 6a82fdba51 fix(web-deepseek-api): accept only a route's own credential kind
Search and Fetch picked a route credential by route id without comparing
its kind, so an adapter registered as deepseek-official that publishes an
account credential had that credential sent under API-key billing, and
the reverse held for deepseek-account. A credential whose kind differs
from the route's counts as no route, as an adapter publishing no
credential already does: API-key billing falls back to DEEPSEEK_API_KEY
at the official base, and account billing asks the account service.
Readiness and dispatch share the source, so both follow the same rule.
2026-11-13 11:47:46 +08:00
CreatixChu 7d690b9689 Merge pull request #8327 from deepseek-harness/fix/files-api-timeout-backoff
缩短 Files API 上传超时并按模型请求次数退避
2026-11-13 11:41:56 +08:00
dsh-ci-bot 16cc3b594e fix(client): key stylesheets by the real package path
Rolldown canonicalizes module ids through symbolic links, while the package directory arrives as the caller wrote it. On macOS, whose temporary directory sits below the /var -> /private/var link, relative(packageDir, fileId) no longer starts inside the package, so the package's own stylesheets were named node_modules/<own package>/... Compares both paths after resolving links, as the asset paths in the same config already do.
2026-11-13 11:40:46 +08:00
LegGasai bca49d2ee0 fix(llm-deepseek-api-key): release the route key only for the route's origin
The credential published through ctx.llm.routeCredential() ignored the
destination: resolve() and configured() answered for any URL, unlike the
account route, whose owner checks the destination. Both now answer only
for destinations under the origin of the route's base URL without
embedded credentials, and read the credential store for no other
destination. Messages, Files, and listing requests derive their URLs
from that base URL and are unchanged.
2026-11-13 11:36:30 +08:00
LegGasai 7872a980fb Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-13 11:35:46 +08:00
LegGasai 3e29cace36 test(session-panel): type the panel spec's gutter tracking stub as the prop
build:check rejected a recording stub whose parameters the default stub's
inferred type did not declare.
2026-11-13 11:35:46 +08:00
LegGasai e7dfa74ac0 Merge branch 'feat/session-panel' into feat/session-panel-sections
PanelRow moved from ui-primitives into ui-session-panel as the
conversation.session.panel.row Factory, so the detail line and actionLabel
this branch added move with it, and the forge checkout, connection, local
changes, and sign-in rows render through renderFactorySlot with their row
attributes in the attributes prop.
2026-11-13 11:33:37 +08:00
LegGasai 4186e5dd31 refactor(session-panel): offer the panel row as a Component Factory instead of a primitive
PanelRow only lays out the content its contributors pass, so it belongs to
the Session panel rather than ui-primitives. ui-session-panel registers it as
the conversation.session.panel.row Factory; contributors render their rows
through renderFactorySlot, and row attributes travel in an explicit
attributes prop so the props a Factory occurrence adds never reach the DOM.
2026-11-13 11:24:47 +08:00
creatixchu 6c034edcea Hold cancelled transport open across the next lookup in the recovery test 2026-11-13 11:24:03 +08:00
creatixchu 5f5665cead Preserve normalized upload-index failures on cache reads 2026-11-13 11:23:09 +08:00
creatixchu bbd971ba80 Reset Files backoff in completion order and count the first uncached image 2026-11-13 11:22:24 +08:00
ZiyaZhang e18d329388 feat(ui-schedule): recommend tasks under the empty automation page
The empty Enabled and All views of the automation task page list seven
built-in recommended tasks below the unchanged empty state, in two
columns, or one column below 600px of content width: a glyph tile,
title, description of up to two lines, and default run time. Choosing
one calls the same new-conversation action as Create in a session, with
that task's localized request prefilled and unsent; an existing draft
keeps its text and the request follows it. The list stays complete
while paused or ended tasks exist, whatever their titles.

The tile glyphs are drawn in this package on a 20px grid. Each tile
takes the theme illustration background, and its glyph draws in the
blue accent with a 16% tint of that blue on the main shape. Hovering or
focusing a tile shows the shared plus icon in place of its glyph.
Titles, descriptions, run times, and requests cover all eight UI
languages.
2026-11-12 19:19:16 -08:00
creatixchu 2fcc872259 Merge remote-tracking branch 'origin/master' into fix/files-api-timeout-backoff 2026-11-13 11:17:55 +08:00
LegGasai 6af99291a8 refactor(session-panel): size the panel in CSS and render only when the dock decision changes
The aside layer now publishes its end gutter through an observable source
instead of React state, so neither resizes nor transcript updates re-render
it. The panel's docked width comes from --dsh-chat-content-width in CSS, and
the panel and its toggle subscribe only to whether the gutter holds the
docked panel; a mounted panel registers its source with the shared state
instead of pushing measured gutters from an effect.
2026-11-13 11:17:14 +08:00
imccyu 695f640063 Merge pull request #8133 from deepseek-harness/discuss-client-iframe
refactor(client): add client module js realm (with module manifest and style operation)
2026-11-13 10:11:54 +08:00
imccyu 71753fdf91 refactor(connection): add connection auth provider for remote connection (#8266)
* refactor(connection): extract peer authentication providers

* test(connection): cover provider lifecycle and satisfy package gates

* fix(packaging): publish authentication provider locale resources

* test(auth): use runtime login output and cover gateway admission

* fix(auth): preserve Worker requests and migrate Desktop fixtures

* refactor(auth): centralize route admission with required policy

* fix(release): align authentication providers with rc.2

* refactor(connection): keep peer lookup and source policy private

* test(gateway): cover centralized upgrade rejections

* fix(ci): authenticate homepage compression probe

* refactor(auth): let Token own API socket lifecycle

* fix(auth): prevent caching admission refusals and clarify ownership

* refactor(web): collect provider entry URLs after readiness

* refactor(webserver): name the shared entry URL event

* refactor(connection): provide authentication as a nested service

* fix(web-app): restore startup publication defaults

* fix(auth): scope web events and preserve callback flows

* docs(auth): record the implemented provider architecture

* fix(auth): require owner access for administrative routes
2026-11-12 23:14:32 +08:00
LegGasai 6dfc5b0609 Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-12 20:39:53 +08:00
LegGasai 7b7711f31d Merge commit '1f21b8048bd' into feat/client-review-page-seams 2026-11-12 20:35:30 +08:00
Ruilin Geng 98606fa09b Merge pull request #8261 from deepseek-harness/fix/markdown-cjk-strong-open
fix(ui-primitives): open CJK strong emphasis before punctuation
2026-11-12 20:32:25 +08:00
Jiawei Song fb9c0237a0 Merge pull request #8367 from deepseek-harness/docs/feedback-exported-logs
docs(feedback): describe reading feedback from exported session logs
2026-11-12 20:24:10 +08:00
LegGasai 35a0ccdeb3 fix(forge): release the review conversation when the page stops showing it
Release the retained Session's reference when the chat switches to another
conversation or the page leaves the change request; the retain signal only
cancelled waiting for the Session to open, so every conversation the page had
shown stayed retained.

Refs #8312
2026-11-12 20:23:59 +08:00
LegGasai b7275187dc Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf 2026-11-12 20:20:12 +08:00
LegGasai 746b4bf16f fix(conversation): hand an embedded Workspace pick over in one checked step
Offer the connected blank to an embedding owner only for the latest pick of a
mounted occurrence, keep the Session the draft leaves retained while the owner
switches Sessions, and move the draft only for an accepted pick. Show a
transient notice when an embedded pick's Workspace cannot connect.

Refs #8312
2026-11-12 20:20:10 +08:00
Magolor bebb3fb7d3 fix(session): load the migration worker in single-file runtimes (#8376)
* fix(session): load the migration worker in single-file runtimes

* test(session): verify migrated history survives packaged restart
2026-11-12 12:15:18 +00:00
Yichen Jiang 8da86aafcf Merge pull request #8369 from deepseek-harness/worktree/sdk-cua-program-tool-600e33
feat(cua): give Agents without a preset the cua_run_code tool
2026-11-12 20:08:07 +08:00
sjw1231 52e3256e78 Merge remote-tracking branch 'origin/master' into docs/feedback-exported-logs 2026-11-12 19:57:29 +08:00
Yichen Jiang d50e1b03f1 Merge remote-tracking branch 'origin/master' into worktree/sdk-cua-program-tool-600e33
Both sides changed the macOS README, so its pairing record is recorded
again from the merged text.

# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
2026-11-12 19:55:41 +08:00
Yichen Jiang d9b1b1e2c4 Merge remote-tracking branch 'origin/master' into worktree/sdk-cua-program-tool-600e33
Both sides changed the macOS README, so its pairing record is recorded
again from the merged text.

# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
2026-11-12 19:52:06 +08:00
CreatixChu 253ccb650e Merge pull request #8378 from deepseek-harness/fix/macos-ax-execution-recovery
fix(cua-macos): 执行操作时也能找到读树已识别的目标
2026-11-12 19:51:46 +08:00
Dudu-0223 ed3b88d211 Merge pull request #8356 from deepseek-harness/fix/cua-partial-ax
fix(cua): isolate invalid AX branches during observation
2026-11-12 19:47:05 +08:00
Yichen Jiang f53238b554 Merge remote-tracking branch 'origin/master' into worktree/sdk-cua-program-tool-600e33
Both sides changed the CUA and macOS READMEs, so their pairing records are
recorded again from the merged text.

Master added a CUA guidance line and changed the cua_run_code description.
The prompt and schema sidecars of the SDK cua-run-code scenario and the
prompt sidecar of the headless cua-run-code-ptc scenario are refreshed to
match.

# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
2026-11-12 18:39:16 +08:00
audit f87f43b466 feat(wecom): offer changing the bound bot and show its id
wecom-cli binds one bot and has no command that removes or switches it; running `auth init` again replaces the saved bot once the new one verifies. The authorized section only showed the state, so replacing the bot meant going to the terminal. It now offers changing the bot through the existing `connect` operation after a confirmation, because the new binding also replaces the one the terminal uses. The check reads `auth show` instead of `auth show --status` and shows the bound bot's id when the CLI prints one. The Web E2E's stand-in wecom-cli reports the next bot after a second binding, and the READMEs describe the button, the check, and that the page can only replace the bound bot.
2026-11-12 18:37:36 +08:00
Yichen Jiang 3bb3712bba docs(cua): relate creation failures to the host-plane note
The host-plane note stated that an Agent joining no preset receives no
tools and reports no error. The CUA provider now registers cua_run_code for
such an Agent and rejects its creation while the program services are
unavailable, so that consequence is corrected in place and the two notes
link to each other.

The program-tool note records why the provider rejects creation instead of
registering no tool and logging a warning, and why this differs from the
check the host-plane note rejected. The agentPreset JSDoc and the macOS
README row state that cua_run_code depends on its program services.
2026-11-12 18:34:43 +08:00
Yichen Jiang b93f93e701 test(cua): record cua_run_code under the PTC executor without presets
A headless Session on the ptc composition mounts Computer Use with the
provider's default preset selection. The recorded system prompt declares
cua_run_code among the program's tools, two run_code programs call
tools.cua_run_code, and the nested programs retain their application and
window objects across the calls.
2026-11-12 18:34:43 +08:00
Yichen Jiang c0eac04d6d fix(cua): read the optional preset registry from the service store
The provider kept the registry service it received from its optional
injection and cleared the copy in a disposer. Between the registry leaving
the service store and that disposer, the provider still classified Agents
with the retired instance.

The provider now asks the service store each time it selects a tool form.
A preset selection or a registry change updates each Agent separately: a
failed registration is logged as a warning and no longer stops the updates
of the remaining Agents or ends the registry subscription. The registry
test now mounts the registry again after unloading it.
2026-11-12 18:34:25 +08:00
_Kerman 1848364e29 Merge pull request #8380 from deepseek-harness/xtr/remove-python-ptc
refactor(ptc)!: remove all Python PTC support
2026-11-12 18:26:48 +08:00
CreatixChu b6e2913211 Merge pull request #8355 from deepseek-harness/feat/macos-system-pointer-drag
feat(cua): 支持经授权使用 macOS 系统鼠标拖拽
2026-11-12 10:19:59 +00:00
Yichen Jiang ff825c2c7b Merge pull request #8373 from deepseek-harness/worktree/model-switch-compact-overflow-dc62bb
fix(compaction): summarize on the model that last answered
2026-11-12 18:07:39 +08:00
creatixchu 226cb346d5 Sync AX execution recovery with its stack base 2026-11-12 18:06:56 +08:00
creatixchu bdefcfb66d Sync partial AX observation recovery with its stack base 2026-11-12 18:06:44 +08:00
creatixchu 0c728d9341 Merge master into macOS system-pointer drag 2026-11-12 18:06:32 +08:00
creatixchu dd7445d98e Merge partial AX observation recovery into AX execution recovery 2026-11-12 18:03:41 +08:00
imccyu 3e1e50f774 feat(ptc): define scoped REPL top-level scopes and import base in guidance (#8275)
* feat(ptc): define scoped REPL top-level scopes and import base in guidance

The scoped REPL guidance now states the rules a program follows instead of
listing edge cases: each run_code call runs one program in its own top-level
scope, whose top-level declarations and received names are copied, not
referenced, into later programs; a program either uses a copied name or
declares it again; block-level var is discouraged because it changes which
value later programs copy; a failed program keeps earlier values. It names
the missing require and module and separates the import base, fixed at the
environment's first program, from process.cwd(), which follows each program.
Formats without top-level return say to await work before the program ends.

* test(ptc): pin the scoped REPL scope and import guidance

Update the verbatim scoped REPL guidance assertion and refresh, without a key,
the recorded run_code descriptions of the PTC and CUA scenarios whose guidance
changed: the scoped REPL rules and the "before the program ends" wording
shared by retained formats.

* test(cua-mcp): refresh the cua_run_code description for the scoped REPL guidance

The cua-mcp profile expectation landed on master after this branch's base; it lists cua_run_code with the scoped REPL execution instructions.

* fix(ptc): keep the shared scoped guidance free of a consumer tool name

The runtime execution instructions are shared by run_code and cua_run_code, so
the new sentence no longer names run_code. The Agent Note also gives the
missing top-level return as the reason for the retained-state wording, which
covers the persistent script format as well as the REPLs.

* test(ptc): pin the unchanged scoped guidance across consumers

The verbatim assertion, the three scoped tool schemas, and the cua-mcp profile
fixture follow the shared sentence, which no longer names run_code.
2026-11-12 10:02:49 +00:00
creatixchu 669b998fd0 Merge macOS system-pointer drag into AX observation recovery 2026-11-12 18:01:07 +08:00
creatixchu dff6af15f4 Merge master into feat/macos-system-pointer-drag 2026-11-12 17:56:56 +08:00
winewill c228441d4e docs(desktop): clarify cache recovery requirements 2026-11-12 17:54:34 +08:00
Yichen Jiang 0789f36a26 docs(compaction): address review comments on summary-route wording and the snapshot fixture
State the fallback order consistently, qualify it for sessions without an assistant message, document the unavailable-answering-model limit and the tool-declaration source, share the system prompt sidecar, and align the recorded task with the scenario.
2026-11-12 17:54:23 +08:00
Huo Yaoyuan deb030335d Merge pull request #8351 from deepseek-harness/feat/cua-windows/input-complete
feat(cua-windows): support single-key events and held-input mouse movement
2026-11-12 17:54:21 +08:00
_Kerman 70be41c8ad refactor(ptc): reuse the existing scoped REPL prefix export 2026-11-12 17:52:48 +08:00
winewill 4def2f0590 Merge branch 'master' of github.com:deepseek-harness/deepseek-harness into fix/rollout-website-approval
# Conflicts:
#	apps/desktop/publishing/ci/README.i18n.yaml
#	apps/desktop/publishing/ci/README.md
#	apps/desktop/publishing/ci/README.zh.md
#	apps/desktop/tests/desktop-rollout.spec.ts
2026-11-12 17:52:29 +08:00
_Kerman 968ea6ebc0 fix(ptc): reject reserved scoped REPL binding names 2026-11-12 17:48:59 +08:00
Yichen Jiang f40e969164 docs: regenerate the module graph for the compaction-basic projection dependency 2026-11-12 17:48:34 +08:00
winewill 05b12e4aff fix(desktop): align rollout approval with parsed percentage 2026-11-12 17:48:18 +08:00
_Kerman c1e490b7b5 fix(ptc): reject unsupported providers without native fallback 2026-11-12 17:46:53 +08:00
CreatixChu 3f537aeecd Merge branch 'master' into feat/macos-system-pointer-drag 2026-11-12 17:45:54 +08:00
audit f7defe4f45 feat(dingtalk): offer signing in to another organization while connected
dws keeps one account per organization and user and signs in to another one with the same `auth login`, but the connected section only offered sign-out. It now also offers signing in to another organization through the existing `sign-in` operation; the check that follows shows the account dws reports as current. The Web E2E's stand-in dws makes a second organization's account current after its second sign-in, and the READMEs say that choosing among saved accounts stays with `dws profile switch` in the terminal.
2026-11-12 17:42:51 +08:00
Yichen Jiang 77e491f9b0 refactor(compaction): record the answered route in a private projection
Review feedback: the summary route and its restorable state belong to compaction-basic. A host-only projection now records the provider/model of each assistant message source, replacing the tokenMeter.answeredRoute() service method, which had one caller.
2026-11-12 17:41:17 +08:00
Dudu-0223 ad2eb08841 refactor(cua): keep AX root recovery local to observation 2026-11-12 17:24:56 +08:00
Jiawei Song 91d416d45c Merge pull request #8177 from deepseek-harness/refactor/tool-errors-document
refactor(office): record structured error name and code for Office tool failures
2026-11-12 17:20:55 +08:00
creatixchu d365af8b6c test(cua-macos): dispatch the unique command recovered from AppKit menu ranges 2026-11-12 17:17:51 +08:00
creatixchu 413c5363dc test(cua-macos): exercise unreadable menus through the owning AppKit process 2026-11-12 17:16:33 +08:00
creatixchu 06ae2c32fc test(cua-macos): verify Paste dispatch against partial AppKit menus 2026-11-12 17:14:42 +08:00
creatixchu 032c4eac89 fix(cua-macos): keep the geometry lookup in synchronous AX access 2026-11-12 17:12:09 +08:00
creatixchu 5bb6ae789c fix(cua-macos): preserve optional geometry and reuse the selected click window 2026-11-12 17:11:10 +08:00
Dudu-0223 ad6b8956c6 fix(cua): isolate invalid AX roots during scope discovery 2026-11-12 17:11:03 +08:00
_Kerman 656533bde1 refactor(ptc)!: remove all Python PTC support 2026-11-12 17:09:15 +08:00
creatixchu bfef6e3942 test(cua-macos): exercise recovered input targets and undispatched failures 2026-11-12 17:06:35 +08:00
sjw1231 08129603b0 Merge remote-tracking branch 'origin/master' into refactor/tool-errors-document
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/document/tool-office/tests/tool-office.spec.ts
2026-11-12 17:04:10 +08:00
LegGasai c1e0fd37b7 fix(jobs): leave the command out of the row hover card and close it over the stop control
A command can run to many lines, so the hover card grew as tall as the
script; it now shows the kind, state, and duration, and the expanded output
panel keeps the full command with Copy. The card also stays closed while the
pointer rests on the stop control, whose tooltip names the action.
HoverDetails takes an optional title for rows whose name can run long.
2026-11-12 17:03:29 +08:00
winewill 54dbf9be31 Merge pull request #8016 from deepseek-harness/feat/macos-split-artifacts
feat(desktop): 拆分 macOS artifacts 并迁移 EdgeOne 发布配置
2026-11-12 17:00:47 +08:00
creatixchu f4fe0d82d2 fix(cua-macos): use AX child recovery when resolving input targets 2026-11-12 16:58:19 +08:00
winewill d6649ac75b fix(desktop): approve website upload and refresh together 2026-11-12 16:54:15 +08:00
Yichen Jiang 7f5ce3184e fix(cua): read the preset registry when the provider starts
The subscription to the optional preset registry first runs one microtask
after the provider registers its agent/created listener. During that
microtask no Agent counted as being on the configured preset, so an Agent
on that preset whose creation was announced then waited for the program
runtime, and the creation failed when that runtime could not start.

The provider now reads the registry from the service store when it starts,
and the subscription keeps the value current. A regression case announces
an Agent on the configured preset in every microtask of a provider start
whose program runtime fails.
2026-11-12 16:53:41 +08:00
LegGasai 26b3949e10 fix(jobs): name only the stop action in the stop control's tooltip
The tooltip repeated the whole command, which can run to many lines, beside
the row's hover card that already shows it; it now reads Stop task, and the
accessible name keeps the command to tell the rows' buttons apart.
2026-11-12 16:49:35 +08:00
winewill bdb1acbf02 test(desktop): parse publication settings through config reader 2026-11-12 16:43:02 +08:00
winewill e71f25fc4b fix(desktop): isolate split artifact uploads and address review 2026-11-12 16:43:02 +08:00
winewill d612d51b5a feat(desktop): split macOS installer artifacts for independent downloads 2026-11-12 16:42:47 +08:00
winewill 9812fa5854 fix(desktop): read Actions EdgeOne zone from publisher config 2026-11-12 16:42:20 +08:00
Yichen Jiang 65b3c2f6e0 Merge remote-tracking branch 'origin/master' into worktree/model-switch-compact-overflow-dc62bb 2026-11-12 16:36:23 +08:00
Yichen Jiang 9ebb02afb7 fix(compaction): summarize on the model that last answered
A request that overflows still commits its request header, so overflow recovery, /compact, and the next model-switch check sent the summary to the model that had just rejected the history. Summaries without a configured target now use the route of the latest assistant message, read from the token meter's existing measurement anchor.
2026-11-12 16:35:51 +08:00
audit c011c9fe00 feat(mcp-account): offer authorizing again while a server is connected
A connected connector only offered sign-out, so changing the account or workspace meant deleting the saved grant first and losing it when the new authorization was abandoned. The connected section now also offers Authorize again, which starts the existing `connect` operation; the manager keeps the saved grant until the new one is saved, as it already did for an explicit re-authorization.
2026-11-12 16:34:59 +08:00
winewill adbd69f13f Merge pull request #8364 from deepseek-harness/fix/desktop-error-peer
fix(desktop): 补齐 Electron 错误基类依赖与独立 worker 内联
2026-11-12 16:32:06 +08:00
creatixchu 896fc63c54 test(forge): resolve the deferred file read in the revision cases 2026-11-12 16:31:19 +08:00
creatixchu 0942b6cd47 test(forge): discard pending context for changed PR revisions 2026-11-12 16:29:23 +08:00
creatixchu 83193f591b fix(forge): retain expanded diff lines across review metadata refreshes 2026-11-12 16:23:34 +08:00
Xu Hanxiang 99208d19d9 Merge pull request #8303 from deepseek-harness/feat/liveshare-owner-state-claim
fix(liveshare): claim the owner state per running host
2026-11-12 08:21:25 +00:00
LegGasai 2e932b6dc8 Merge branch 'feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf 2026-11-12 16:18:42 +08:00
LegGasai 8031f950dd fix(sidebar): lay panel trailing content out after the title like a Session row
Declare the trailing list inline and render it inside the row button after
the title, in the row's flow, so a row without content keeps its full title
width on every device and the slot wrappers nest validly; the collapsed rail
keeps the corner badge. Assert the layout rules in the sidebar style spec.

Refs #8312
2026-11-12 16:18:22 +08:00
sjw1231 d670015cd6 docs(feedback): keep only feedback-specific rules for exported logs
Link the OTel backend and session-telemetry pages for record fields,
deduplication, and redaction instead of restating them. Limit the
inherited-event exclusion to feedback counting so a seeded Session's
rated reply stays locatable, name the messageId paths, and drop the
format-based plugin heuristics in favor of the no-actor fact.

Refs #8366
2026-11-12 16:14:25 +08:00
Huo Yaoyuan f21a3d1700 Fix system prompt test 2026-11-12 16:12:50 +08:00
winewill d4d4468247 test(desktop): reuse runtime closure validation for packaged peers 2026-11-12 16:11:08 +08:00
Dudu-0223 e44a05465d fix(cua): unify AX observation failure codes 2026-11-12 16:07:22 +08:00
LegGasai 45f010c2b1 docs(client): split the embedded hero sentence and state the marquee class fallback
Refs #8312
2026-11-12 16:05:16 +08:00
sjw1231 f07ccacb9a docs(feedback): describe reading feedback from exported session logs
Document the OTel session-log record fields, the three feedback events,
deduplication, fork-inherited events, current-value reduction, locating
the rated reply, and recognizing plugin-written feedback fields.

Refs #8366
2026-11-12 16:00:36 +08:00
Yichen Jiang 0248933aea Merge remote-tracking branch 'origin/master' into worktree/sdk-cua-program-tool-600e33
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
2026-11-12 15:54:45 +08:00
Huo Yaoyuan 4b704a477d fix(cua-windows): allow input with held modifiers 2026-11-12 15:52:45 +08:00
Jiawei Song fbcc66220c Merge pull request #8361 from deepseek-harness/refactor/tool-errors-consolidation
refactor(shell,fs,jobs): consolidate unadvertised-argument and image-input error codes
2026-11-12 15:50:34 +08:00
Huo Yaoyuan e6888bed35 Reject modifier key in sendKeyEvent 2026-11-12 15:38:46 +08:00
Dudu-0223 77bee18b9d fix(cua): align unreadable node markers with child gaps 2026-11-12 15:37:40 +08:00
creatixchu 297a7da065 fix(cua-macos): keep native drag events on their owning actor 2026-11-12 15:32:53 +08:00
winewill 7f252472b4 fix(desktop): supply error peer and inline it in command worker 2026-11-12 15:31:21 +08:00
creatixchu ea9e78dc83 fix(cua): preserve drag release settling and verify pointer state and deltas 2026-11-12 15:31:16 +08:00
Yichen Jiang 8ab885c9ab feat(cua)!: give Agents without a preset the cua_run_code tool
A native CUA provider configured with a preset id (the default `ptc`)
registered no tool for an Agent that joined no Agent preset, and nothing
at all in a composition without the preset registry. The SDK, headless,
and ACP applications create such Agents, so the provider's default
configuration and the Computer Use bundle had no effect there, and no
configuration supplied `cua_run_code` to a Host whose model calls
ordinary tools directly.

The preset registry becomes an optional dependency of the provider. Only
Agents on the configured preset receive raw `cua`; every other Agent
receives `cua_run_code`, and the provider recomputes each live Agent's
tool form when the registry loads or unloads. `agentPreset: false` still
registers raw `cua` globally and creates no program runtime.

The assertion that an Agent without a preset has neither tool changes
with the behavior. New unit cases cover a composition without the
registry, the registry loading and unloading, and a preset-free Loader
composition that runs programs; a recorded SDK Session covers the
assembled request and program execution on `dsh --profile sdk`.

The upgrade guide lists the migration for compositions without presets:
`agentPreset: false` keeps raw `cua`, including `tools.cua` under the PTC
tool executor.
2026-11-12 15:30:38 +08:00
sjw1231 efc62d7b06 fix(bash,pwsh,fs,ptc): reject unadvertised arguments before pairing and approval
Without a sandboxing backend, a lone sandbox_permissions or justification
failed the pairing check and asked the model to add the other field, and
bash/pwsh checked a disabled run_in_background only after an escalation
approval. Reject unadvertised escalation fields and a disabled background
request during argument validation in bash, pwsh, write/edit/apply_patch,
and run_code, and name both escalation fields in the message. Update the
upgrade guide to identify rc.2 shell records by message.

Refs #7869
2026-11-12 15:29:38 +08:00
Dudu-0223 8a627550f3 Merge master into fix/cua-partial-ax 2026-11-12 15:26:59 +08:00
LegGasai 111579b601 Merge remote-tracking branch 'origin/feat/client-review-page-seams' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
2026-11-12 15:15:12 +08:00
creatixchu 195c6fca26 fix(cua): keep Windows drag validation on the portable interface 2026-11-12 15:13:03 +08:00
LegGasai 48c65b3867 feat(client): add panel row trailing content, embedded hero options, and a shared title marquee
Let a navigation row show trailing content such as a count, let an embedded
conversation keep the blank Session of a Workspace its hero picks and name
its own headline, and move the Session row title marquee into ui-primitives
so other lists can use it.

Refs #8312
2026-11-12 15:12:15 +08:00
creatixchu 6dfc15f333 test(cua): declare macOS pointer support in the retained script prompt fixture 2026-11-12 15:09:10 +08:00
creatixchu 1e0a303a31 fix(cua-macos): keep drag guidance in the macOS provider and preserve hover safeguards 2026-11-12 15:06:17 +08:00
creatixchu 703dd1b126 Merge remote-tracking branch 'origin/master' into feat/macos-system-pointer-drag
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua-macos/native/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
2026-11-12 15:03:10 +08:00
sjw1231 0fe47c32ba docs(upgrade-guide): record consolidated shell and read_image error codes
dsh-v0.2.2-rc.2 shipped JOB_BACKGROUND_DISABLED, IMAGE_UNSUPPORTED_MODEL,
and SANDBOX_ESCALATION_UNAVAILABLE for unadvertised bash/pwsh
sandbox_permissions, so their replacement is a released break.

Refs #7869
2026-11-12 14:59:04 +08:00
Huo Yaoyuan 71e1fd60b5 Merge remote-tracking branch 'origin/master' into feat/cua-windows/input-complete 2026-11-12 14:56:34 +08:00
LegGasai 12cf2d14a9 Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-12 14:56:03 +08:00
LegGasai 94a2639e05 refactor(chat): pass renderSlot to the aside layer instead of a wrapper callback
renderSlot is stable per registration, so the memoized aside layer still
re-renders only when the gutter changes.
2026-11-12 14:55:11 +08:00
CreatixChu 95d7dcc349 Merge pull request #8350 from deepseek-harness/fix/macos-ax-children-recovery
fix(cua-macos): recover readable siblings after AXChildren failures
2026-11-12 14:53:46 +08:00
sjw1231 c7d8f522fd Merge remote-tracking branch 'origin/master' into claude/tool-errors-consolidation-5e8dbe 2026-11-12 14:53:14 +08:00
Ruilin Geng 5402a0c46a Merge pull request #8344 from deepseek-harness/docs/packages-readme-budget
docs: raise the packages/README.md word ceiling to 1,100
2026-11-12 14:50:46 +08:00
Dudu-0223 79112d796d fix(cua): preserve failed AX scope discovery 2026-11-12 14:45:07 +08:00
Dudu-0223 5eb55495d2 Merge origin/master into feat/session-control-message 2026-11-12 14:43:27 +08:00
creatixchu da1c1c10c9 ci: remove the dedicated macOS CUA native test workflow 2026-11-12 14:38:23 +08:00
creatixchu 03dc9be58c Merge master into fix/macos-ax-children-recovery
# Conflicts:
#	packages/experimental/cua/README.i18n.yaml
2026-11-12 14:38:18 +08:00
Dudu-0223 7c09e17b1c test(session): cover Web Session messages and refresh docs
Add a Web snapshot that restores a cold ordinary Session in another
directory through the Session controller, keeps the second delivery live,
and rejects an archived target. Keep subagent exports unchanged by building
the agent-message attribution in the tool. Rewrite the tool, user, and group
documentation for the Web-only row, move the disposed-input upgrade guide to
v0.2.2-rc.2, drop the removed service pages and guide, and regenerate the
catalogs.
2026-11-12 14:37:45 +08:00
Jiawei Song e45ad7ec52 Merge pull request #8174 from deepseek-harness/refactor/tool-errors-experimental
feat(experimental,hooks): give experimental and policy plugin tool failures error codes
2026-11-12 14:20:49 +08:00
creatixchu 6153a38b0f docs(cua): separate mouse permission and targeting paragraphs 2026-11-12 14:20:00 +08:00
creatixchu 69875aff67 docs(cua): put pointer-free actions first in the mouse instructions 2026-11-12 14:18:23 +08:00
LegGasai 98003bd816 test(headless): expect the keyless mount's namespace in key diagnostics
The invalid-credential scenario mounts the API-key route as entry
`llm-deepseek-keyless`. Since fb007f605d4 the INVALID_CREDENTIAL
diagnostic of an unusable key names the settings namespace of the mount
instead of the fixed `llm-deepseek`, so the expected stream names
`llm-deepseek-keyless` in its two failure records. The file is refreshed
through the test's own DSH_SNAPSHOT=refresh mode; nothing else in it
changes.
2026-11-12 14:18:17 +08:00
creatixchu b05241df48 refactor(cua): name the shared tree flag hasUnreadableElements 2026-11-12 14:11:31 +08:00
Dudu-0223 6024ad514d refactor(session): message Web Sessions through the Session controller
Remove the shared session-control service and its local provider. The
session_send_message tool now runs only in the Web composition, activates
its target through SessionController.resolveAgent, and attributes the real
sender with the existing agent-message source. Subagent messaging, the API
Session controller, and SDK/team/benchmark fixtures return to the master
implementation.
2026-11-12 14:11:21 +08:00
creatixchu 31b316fbfa ci(cua-macos): run AX recovery regressions and the AppKit fixture on pull requests 2026-11-12 14:03:31 +08:00
LegGasai a25c389f07 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
master gained the Session reading status service (#6858) and the model
picker controls (#8067) while the previous merge was being verified.

Conflicts:
- docs/capability-seams.i18n.yaml: both sides recorded the pairing of the
  seam table again. The documents merged without conflict: master's
  ctx.sessionStatus rows and edges and this branch's deepseekAccount and
  llm consumer edges coexist in both languages, and the record is recorded
  again from the merged pair.
2026-11-12 14:00:50 +08:00
Dudu-0223 54f7af09ff fix(cua): isolate invalid AX branches during observation 2026-11-12 13:58:36 +08:00
sjw1231 c3953b65d7 Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
#	packages/experimental/cua/src/index.ts
2026-11-12 13:58:19 +08:00
creatixchu 2501ec39f1 test(cua): replay explicit system drags and check foreground admission 2026-11-12 13:55:23 +08:00
LegGasai f4ac78bb34 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
master moved internal identity construction to brandString (#8214) and
added the empty-catch gate with its recorded baseline (#4862); both touch
files this branch changes or moves.

Conflicts:
- packages/llm/llm-deepseek/tests/adapter.spec.ts,
  packages/llm/llm-deepseek-account/tests/provider.spec.ts,
  packages/experimental/translator/tests/paid-fixture.ts, and
  packages/web/web-search-deepseek/tests/deepseek.spec.ts: master rewrote
  the id constructor calls to brandString<T>() with type-only imports,
  while this branch replaced the hand-built account stand-ins with
  accountStub. The result keeps master's id construction and imports and
  this branch's stand-ins; the one Session this branch's own search test
  creates follows master's construction.
- packages/web/web-deepseek-api/package.json and
  packages/web/web-search-deepseek/package.json: this branch's sorted
  devDependencies plus master's dsh-brand entry.
- docs/capability-seams.md and docs/capability-seams.zh.md: master's
  cuaPrograms consumer edge and this branch's deepseekAccount consumer
  edges coexist; the pairing record is recorded again from the merged
  pair.
- docs/module-graph.md, docs/module-graph.zh.md,
  docs/persistence-schema.json, and pnpm-lock.yaml: regenerated from the
  merged sources.

Beyond the conflicts:
- scripts/empty-catch.baseline.json: master recorded two clauses under
  packages/credentials/deepseek-account, which this branch moves to
  packages/account/deepseek-account. The two keys are renamed with the
  files, as the gate requires for a moved file.
- AGENTS.md: master's checker link and this branch's account/ layout row
  together exceeded the frozen 2,080-word ceiling by one word, so the row
  reads "account/ DeepSeek".
2026-11-12 13:53:45 +08:00
LegGasai c62fc92c40 Merge remote-tracking branch 'origin/master' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-11-12 13:52:10 +08:00
creatixchu 5ae6eeb102 test(cua-macos): distinguish failed child counts from verified empty lists 2026-11-12 13:52:00 +08:00
LegGasai 5d5cfe19c2 fix(forge): meet the theme style gates and share duplicated review code
Use hairline borders, round corner shapes, and hover-capable media queries in
the review page styles, and share the action notices, reviewer requests,
list item meta line, and closing issue schema that the review page
duplicated.

Refs #8312
2026-11-12 13:51:08 +08:00
creatixchu ceb6c70774 test(cua-macos): verify positions across native button wrappers and AX-less windows 2026-11-12 13:50:42 +08:00
creatixchu 71cf14878d feat(cua): allow session-approved system-pointer drags on macOS 2026-11-12 13:50:00 +08:00
creatixchu 3d506a588e test(cua-macos): isolate AppKit projection from the Swift test runner 2026-11-12 13:48:25 +08:00
creatixchu ae3203a8ab test(cua-macos): initialize AppKit before reading fixture windows 2026-11-12 13:46:27 +08:00
creatixchu 7a588f6fb5 fix(cua-macos): distinguish unreadable children from traversal limits 2026-11-12 13:44:10 +08:00
Dudu-0223 90d8b5ad22 Merge origin/master into feat/session-control-message
Generated documentation conflicts keep the master version; the following
commit regenerates them for the final composition.
2026-11-12 13:43:18 +08:00
std4453 dbb22de84e Merge pull request #8067 from deepseek-harness/design/model-picker-quick-controls
feat(ui): 弱化智能体团队开关入口
2026-11-12 13:41:19 +08:00
a39d44b5dc feat(session): add host reading status to SessionStatus (#6858)
* ✨ feat(session): persist and synchronize read state

* 🌐 fix(client): complete Japanese labels after base update

* 📝 docs: refresh session read-state dependency graph

* 🧪 test(web): align session menu and read-state snapshots

* 🌐 fix(session): complete Japanese plugin metadata

* 🧪 test(web): distinguish unread from pending user input

* 🐛 修复会话阅读状态的故障隔离与生命周期

* 🐛 修复阅读状态依赖检查并补齐自动已读覆盖

* 🐛 恢复会话绿点并移除未读标题加粗

* ♻️ Keep shared session reading state in Host memory

* 🌐 Complete reading-state metadata for supported locales

* 📝 Refresh module graph after removing storage dependency

* 🧹 Move storage dependency policy out of memory-only reading

* 🐛 Wait for sidebar catalog before replay navigation

* 🔧 Give Host TypeScript checks 8 GiB of heap

* ✅ Align Host heap checks and Windows diagnostics

* ♻️ Keep CI repairs outside the session reading PR

* 🐛 Show failed unread turns with an error indicator

* 🔧 Adjust npm layout budget for the reading package

* 🧪 Scope projection stream assertions to observed units

* 🧪 Scope permission and title assertions to their projections

* ♻️ Simplify session reading updates to explicit positions

* 🐛 Align session reading package with release version

* 🧪 Load reading state in LiveShare viewer fixtures

* 🧹 Remove persistence-only type link from memory PR

* 🧪 Align context menu expectations with reading actions

* 🐛 Sync reading package with the release version

* 🧪 Include turn boundaries in session summary expectations

* ♻️ Derive reading failure facts from Host events instead of a projection

The reading service took each completion from the Agent turn-boundary
projection, which forced a stateVersion bump and put that projection's whole
internal state on the wire for every Session list row. The service now records
`turn/end` itself, so `core/agent` and the persisted projection schema are
untouched.

History that ended before the service started raises no reminder, which keeps
"existing history reads as read" without a startup scan. The failure flag
therefore describes only turns this Host observed: marking a Session whose last
turn failed before a restart shows the ordinary unread reminder.

* 🐛 Preserve manual unread until explicit Session interaction

* 🧪 Align cold Session reading snapshot with unloaded title

* 🔖 chore(session): align session-read-state with 0.2.2-rc.2

Master moved the root and every released manifest to 0.2.2-rc.2, but the
new dsh-session-read-state package still declared 0.2.2-rc.1, failing
constraints, verify-version-sync, verify-npm-install-layout, and
release:verify after the master merge.

* ♻️ refactor(gateway): recognize Remote stream carrier loss by error code

RemoteStream now decides whether a generation end or failure is a
retryable carrier loss by the stable code 'gateway/carrier-lost' instead
of `instanceof RemoteStreamCarrierError`. RemoteStreamCarrierError keeps
working and carries that code, so existing callers are unchanged, while a
Client feature package can return a coded Error from `ended` without
importing the class. The new RemoteStreamCarrierFailure type describes
such errors; terminal-controller classifies disconnects the same way.

* ♻️ refactor(session): move Session reading into ui-session-status

Fold the reading feature into the single package
packages/client/ui-session-status and delete session-read-state.

- Host face: SessionStatusService keeps in-memory reading records and
  serves the sessionStatus Remote namespace (mark, follow) with
  session-status/* error codes; its service key is registered only for
  Gateway discovery and is not declared on Context.
- Client face: a package-internal reading model follows the Host stream
  through RemoteSnapshotStream; ctx.uiSession.sessionStatus folds the
  records into completionUnread and completionFailed and exposes mark and
  readingReady; main-view acknowledgement and the
  session-status/read-intent event live here. No reading service or type
  is exported.
- verify-client-packages lets a packages/client feature package request
  packages/api rows through dsh.client.external; feature-to-feature
  requests stay rejected.
- ui-workspace, ui-conversation, bundles, remotes, LiveShare, the client
  test runtime, docs, Agent Notes, and the upgrade guide follow.

* ♻️ refactor(session): clear manual unread only when the main view switches to the Session

Remove the session-status/read-intent event. ui-session-status now clears an
existing manual unread mark when the main view switches to a different
Session, including the first selection after a page load, once the reading
baseline is ready and the body arrives. Window focus, visibility changes,
a replaced binding for the same Session, and activity in the open Session
preserve manual unread.

ui-conversation returns to master (only the ui-session-status client
tsconfig reference remains), and ui-workspace navigation no longer emits
the event. Tests, the session-reading Web e2e case, READMEs, and the
reading Agent Note follow the new rule.

* 🐛 fix(session): address the Session status review findings

- Open the reading stream only while ctx.remoteAccess allows
  sessionStatus/follow, so a LiveShare viewer opens no owner-only stream,
  keeps readingReady false, and logs no synchronization failure; access
  changes start or stop the stream.
- Hide the unacknowledged completion of the Session the visible, focused
  main view retains; manual marks stay visible, completionFailed follows
  completionUnread, and the reminder returns on blur, hiding, or a switch.
- Declare ctx.sessionStatus on Context and restore its SERVICE_PAGE and
  SERVICE_ROLES entries; the service and SessionRead* types document on
  docs/subsystems/web-client.md, which now owns the reading section with
  the failed field.
- Document that a Host plugin reload can leave the Client with a terminal
  error until a page reload; drop the redundant types import and the
  unused publish() result.
- Archived Sessions read as read and offer no reading mark in the row
  menu or the toggle-read shortcut.
- session.toggleRead names the open dialog, open panel, or archived
  Session that blocks it instead of asking to select a Session.
- isRemoteStreamCarrierFailure rejects a RemoteError from the Host even
  when it carries gateway/carrier-lost; the code is Client-local.
- ./types is types-only like ui-trajectory, and files no longer ship
  lib/types JavaScript.

* 🐛 fix(session): close the remaining Session status review gaps

- The Gateway Client exports isRemoteStreamCarrierFailure, and the
  terminal view uses it, so a Host RemoteError carrying the carrier code
  shows as failed rather than disconnected.
- Each access grant's reading stream carries a token: frames a revoked
  or superseded stream still delivers are discarded, and cleanup waits
  for disposal before leaving reading unavailable unless a newer grant
  is active.
- The status table hides the viewed Session's natural reminder only
  while that Session is open; the panel case is a documented limitation.
- The README limitation and the upgrade guide state that only the
  main-view switch rule, including a reload restore, clears manual
  unread automatically.
- Add the missing blank line before the next heading in the web-client
  reading section.

* ♻️ refactor(session): install reading under the Session status table

- apply returns to master's form plus one line: UiSessionStatus is the
  root, published as the useSessionStatus source, and installReading()
  from the new src/client/read.ts follows Host reading records into it.
  UiSessionStatus takes master's three constructor parameters and
  creates its own SessionReadModel as the package-internal `reading`
  member; installSessionStatus is removed and acknowledge.ts stays a
  separate file.
- The viewed Session's snapshot subscription republishes the table only
  when its openState changes, so streamed events do not rebuild it.
- Remove the obsolete Dev Note sentence about failure outcomes.
- session.toggleRead passes when the Peer may not mark reading, matching
  the row menu, and reports readingUnavailable only while unsynchronized.

---------

Co-authored-by: imccyu <cc.yu@deepseek.com>
Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-12 05:35:57 +00:00
LegGasai c5fc3c14dd test(forge): cover the compact review list and chat quotes
Cover the view menu, the compact view and its hover card, the chat tab's quote
count, and quotes from the changes tab into the conversation, including a
conversation that connects after the page stopped showing it; tick the chosen
repository in its submenu; share one connection among quotes that start a
conversation together; and document the view and quotes.

Refs #8312
2026-11-12 13:33:46 +08:00
creatixchu 394476afec fix(cua-macos): read failed ranges of up to five children by index 2026-11-12 13:25:25 +08:00
creatixchu 7863218fcd fix(cua-macos): apply traversal limits to unreadable entries 2026-11-12 13:24:35 +08:00
LegGasai eb30025883 docs(web-search-deepseek): keep the module comment at its line count
The config catalog records the source line of the plugin's Config. The
previous commit grew the module comment by one line, which moved that
line and left the generated catalog stale; reflowing the comment keeps
the catalog as committed.
2026-11-12 13:24:25 +08:00
creatixchu 3fdea06f54 fix(cua-macos): keep unreadable children in sibling order 2026-11-12 13:21:20 +08:00
LegGasai 8607cf5b0e fix(web): bind route account credentials to their origin and contain failed rejection
- web-search-deepseek: the initiating route's account credential is used
  only when the search endpoint has the origin of that route's base URL.
  For another origin the provider does not ask the route and sends the
  API key, and readiness answers the same way. A route publishing an
  unparsable base URL is treated like settings that do not resolve.
- web-deepseek-api, web-search-deepseek: after HTTP 401 a failure of the
  grant's reject() is contained, so the reported error stays the HTTP
  rejection whichever owner published the credential.
2026-11-12 13:20:13 +08:00
creatixchu 037410b5d7 fix(cua-macos): recover readable AX children by range 2026-11-12 13:16:51 +08:00
Huo Yaoyuan cfa618cfa5 docs(cua): update simulated input guidance 2026-11-12 13:10:36 +08:00
Huo Yaoyuan e53644ee5c Remove keyboard limit from MouseMove 2026-11-12 13:08:55 +08:00
Huo Yaoyuan a6c7de0065 feat(cua-windows): implement stateless single-key events 2026-11-12 13:08:55 +08:00
CreatixChu 8d9c78459c Merge pull request #8343 from deepseek-harness/feat/cua-windows/key-mod
fix(cua-windows): align modifier names and support the Win key
2026-11-12 13:03:38 +08:00
LegGasai 2ef4c00dd1 feat(forge): add a compact review list view and quote review comments into the chat
Lay the review page's view menu out like the Session list's, show each list
item's hint on its meta line, add a compact one-line view whose titles
marquee on hover with a hover card of the details, drop Ask Agent, and quote
comments and threads from the changes tab into the change request's
conversation. The Session row title marquee moves to ui-primitives so both
lists share it.

Refs #8312
2026-11-12 12:58:02 +08:00
LegGasai a6672fb5c3 fix(llm-deepseek-api-key): prefix key diagnostics with the settings namespace
An unusable API key's INVALID_CREDENTIAL diagnostic was prefixed with the
literal `llm-deepseek`, left from when the lookup lived in the transport
package. It now names the mount's settings namespace, the same value the
provider directory lists: the Loader entry id, or the plugin name without
an entry. Product profiles mount the route as `llm-deepseek`, so their
diagnostic text is unchanged.
2026-11-12 12:55:16 +08:00
creatixchu 8b0966c5e9 Merge master and update the MCP modifier reference 2026-11-12 12:44:57 +08:00
winewill fd5e0ced20 Merge pull request #7964 from deepseek-harness/feat/desktop-publisher-workspace
refactor(desktop): isolate publisher workspace for lightweight rollout
2026-11-12 04:44:31 +00:00
creatixchu 5bd4d6e6ff fix(cua): restrict Win shortcuts and document per-operation modifiers 2026-11-12 12:41:50 +08:00
zhc 4e44fea3ce Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory 2026-11-12 12:21:25 +08:00
zhc 9d4283f18f Merge remote-tracking branch 'origin/master' into design/model-picker-quick-controls
# Conflicts:
#	packages/client/ui-agent-team/tests/browser-plugin.client.spec.ts
2026-11-12 12:20:14 +08:00
winewill 3fd0c6683d fix(desktop): narrow publisher metadata parse recovery 2026-11-12 12:15:13 +08:00
LegGasai 658f714e0c Merge remote-tracking branch 'origin/master' into fix/forge-github-status-batches 2026-11-12 12:01:04 +08:00
winewill 046df1b122 Merge master into desktop publisher and synchronize workspace version 2026-11-12 11:52:56 +08:00
audit 49d112aa67 docs: raise the packages/README.md word ceiling to 1,100
The package group table holds 49 rows and has grown to 992 of its 994 words since the 2026-08-25 rebuild, so the next group row cannot fit; the connector group (`packages/connector/`) needs 11 words. The ceiling and the target in docs/AGENTS.md move together to 1,100, which leaves room for several group rows at the current row length.
2026-11-12 11:51:12 +08:00
Chinesezjc 63837bc684 Merge pull request #8335 from deepseek-harness/fix/ci-f2a8592-inspector-client-deadline
test(inspector): budget the Client Runtime deadline for a real round trip
2026-11-12 09:30:20 +08:00
dsh-ci-bot 0f8d6ab12b test(web): cancel the sampled fold transitions before the next posture change
finish() only moves a transition to its end state; the matching
transitionend is dispatched in a later rendering update. That end event
arrived after the caller armed the next fold window, so AppFrame settled
the new window, dropped data-animating and cancelled the transition the
next assertFoldResize waits for. Awaiting two animation frames narrowed
that window without closing it: AppFrame's own 600 ms fallback can settle
and cancel the transition before the end event is dispatched, so the end
event can still be pending when the helper returns.

Cancel the sampled transitions instead. A cancelled transition dispatches
transitioncancel, which AppFrame does not observe, so the helper leaves no
end event pending. The frame then settles through AppFrame's 600 ms
fallback, and the helper waits for data-animating to clear before it
returns. The sampled start/middle/end values and the final grid are
unchanged: cancelling drops the transition effect and the computed grid
lands on the same target.
2026-11-12 06:15:51 +08:00
dsh-ci-bot ed6721f6dc test(web): let the sampled fold transition settle before the next posture change
assertFoldResize finishes the sampled grid-template-columns transition from the
page side; CSS delivers the matching transitionend in a later rendering update.
The sidebar-drawer e2e then changes the posture again. When that end event
arrives after the new window is armed, AppFrame's settle handler drops
data-animating and cancels the new transition, so the next assertFoldResize poll
never sees a running transition (master CI runs 43002182954 and 43076752328
failed at apps/web/tests/sidebar-drawer.e2e.ts:500).

Give the frame a rendering update and wait for data-animating to clear at the
end of the helper, so the next step starts from a settled frame.
2026-11-12 05:44:38 +08:00
Chinesezjc adf06d4804 Merge pull request #8325 from deepseek-harness/fix/ci-bubblewrap-cache
fix(ci): cache the verified bubblewrap archive and bound its download
2026-11-12 02:19:56 +08:00
dsh-ci-bot dd2fc67baf test(inspector): state the deadline bounds in the timeout case comment
The darwin parity lane runs `vitest run` without coverage instrumentation,
so concurrent suite load, not instrumentation, is what pushed a Client
Runtime round trip past the old 20 ms deadline. Name that load, keep the
case-specific reason for the headroom, and record the two bounds the value
must respect: CDP_CALL_TIMEOUT_MS and the default 5 s test budget. Drop the
sentence that restated the file-header lane rule.
2026-11-12 01:41:37 +08:00
dsh-ci-bot 0fd248d065 fix(ci): keep the verified-download spec within the line budget
The acquire helper's inline return type grew past the 140-column lint
limit when the env parameter was added; name the result type instead.
2026-11-12 00:56:28 +08:00
dsh-ci-bot cec43a7001 test(inspector): budget the Client Runtime deadline for a real round trip
The case proves that a fired Worker deadline leaves the Client Runtime
session usable, but it also gave the follow-up evaluation the same 20 ms
budget as the deadline. A Client Runtime round trip crosses the Worker
thread and a WebSocket to the Client fixture, so under the darwin lane's
concurrent suite it can exceed 20 ms and the follow-up is rejected with
the deadline error instead of returning 42.

Raise the deadline to 1000 ms. The never-settling promise still makes the
deadline fire, the follow-up keeps 50 times the failing observation's
budget, and the lane's 90 s fixture wait stays far above the deadline.
2026-11-12 00:50:05 +08:00
dsh-ci-bot 5f2ff8790a fix(ci): scope the verified archive cache to ephemeral runners
The archive cache was wired into lanes that can select the persistent
self-hosted pool, which keeps ~/.cache on its own layout and never needs
the remote cache, and the consolidated benchmark's Windows rows restored
and saved a directory they never create.

Guard the cache steps with the same self-hosted exclusion as the pnpm
store cache, drop them from the self-hosted standby and the manual
benchmark matrix, and assert the guards in the workflow specs. Probe for
sha256sum or shasum -a 256 so a host without either fails loudly instead
of reporting a digest mismatch, clean partial downloads when a job is
cancelled, keep the retry window plus its last attempt within five
minutes, pin that contract in the test, and report cache-directory
failures with the download URL.
2026-11-12 00:42:37 +08:00
audit e2c2a5a5f7 Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-11 23:29:32 +08:00
audit 0dc3d96302 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-11 23:24:11 +08:00
audit 89738f2579 Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-11 23:19:01 +08:00
audit 0ee0d7006b Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-11-11 23:12:22 +08:00
audit 700c91d954 Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-11-11 23:06:33 +08:00
audit a5f952f19b Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-11-11 23:00:39 +08:00
audit 22a4652d2d Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-11-11 22:48:30 +08:00
Shigma 72f9a8df11 docs(upgrade-guide): move cordis rc.12 guide to v0.2.2-rc.2 2026-11-11 22:48:06 +08:00
audit 4230f65768 Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-11 22:42:24 +08:00
audit 4db8ce73cf Merge branch 'm1108/cli-account' into m1108/upstream-skills 2026-11-11 22:33:49 +08:00
Shigma af95179457 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml
# Conflicts:
#	apps/web/tests/client-ui-stats-panel.e2e.ts
#	packages/experimental/cua-bundle/tests/platform.spec.ts
2026-11-11 22:31:47 +08:00
Shigma 6a0782b597 Merge remote-tracking branch 'origin/master' into feat/hmr-watch-patch-overlays
# Conflicts:
#	packages/boot/app-boot/README.i18n.yaml
2026-11-11 22:31:18 +08:00
audit 45d064a198 Merge branch 'feat/connector-accounts' into feat/mcp-oauth 2026-11-11 22:12:50 +08:00
audit 71d2d980af Merge branch 'feat/connector-accounts' into feat/mcp-oauth 2026-11-11 22:11:16 +08:00
Shigma fc1710a167 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12 2026-11-11 22:09:14 +08:00
LegGasai 434ef15931 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
Adapt the consumers to the Host-only workspace model of the base branch:

- sandbox-policy: a marked working-directory change, not an anchor, is the
  point that reads the entered root's Git layout again.
- working-directory: keep recordedRootOf on the reworked service and its
  test doubles.
- Tests that entered a checkout through relocate use set; tests that relied
  on a directory change inside the root append a change without the marker.
- SDK documents and the upgrade guide state that the workspace-write boundary
  follows setWorkingDirectory and a Host-chosen child start directory, and
  that exit_worktree leaves a worktree.
2026-11-11 22:08:19 +08:00
audit 9105204b48 Merge branch 'feat/connector-accounts' into m1108/cli-account 2026-11-11 21:25:45 +08:00
audit a9ab49403e Merge remote-tracking branch 'origin/master' into feat/connector-accounts 2026-11-11 21:21:25 +08:00
creatixchu 9fd05ac4f4 Count a timed-out upload waiter while shared transport continues 2026-11-11 21:17:45 +08:00
creatixchu 92994f4d32 Wait for both late upload responses in the backoff regression 2026-11-11 21:16:06 +08:00
creatixchu 3e4b55cc25 Back off timed-out Files uploads across image requests 2026-11-11 21:14:11 +08:00
Yichen Jiang 300f3f3498 Merge pull request #8200 from deepseek-harness/feat/cua-mcp
feat(cua): serve Computer Use to MCP clients from the cua-mcp profile
2026-11-11 20:58:41 +08:00
audit 7bf2c98359 Merge branch 'feat/connector-accounts' into m1108/cli-account 2026-11-11 20:57:29 +08:00
audit d37a011f01 Merge remote-tracking branch 'origin/master' into feat/connector-accounts 2026-11-11 20:56:47 +08:00
zhc 5a187bbb7f refactor(ui-primitives): 以 MarkdownText 的 resolvePath prop 替代 MarkdownPathScope
本地目标映射改为与 fileMentions、pathImages 相同的传递方式:作为 MarkdownText
的 prop 进入 MarkdownRenderContext,只在文件链接与图片组件中使用。AssistantNodeView
不再包一层 provider,而是把 resolvePath 作为普通 prop 交给 AssistantMarkdown,
仅作用于正文文本块。

Refs #8267
2026-11-11 20:33:45 +08:00
Yichen Jiang 3842f2b222 fix(ci): cache the verified bubblewrap archive and bound its download
Launchpad outages failed every Linux CI and E2E job in the bubblewrap
preparation step before any test ran, and a stalled connection held the
step for minutes because curl had no timeouts.

Restore and save the SHA-256-verified archive with actions/cache around
each preparation step so a warm cache needs no Launchpad request, verify
cached and downloaded files against the pinned digest before use, and
bound each curl attempt and the retry window. The download URL stays
pinned to the recorded Launchpad build.
2026-11-11 20:32:47 +08:00
LegGasai 133ac80468 test(forge): assert batched snapshots without returning an untyped matcher 2026-11-11 20:30:59 +08:00
LegGasai 3ca18d169f fix(account): invalidate a rejected token on the account service mounted at rejection
- deepseek-account: the request credential's reject() re-resolves the
  account service through the resolving context, so a reload between a
  request and the destination's HTTP 401 still removes the stored grant;
  without a mounted service the grant stays for the next one to reject.
  resolveToken and rejectToken become private; the e2e sign-in stand-in
  and the generated API catalog follow.
- llm-deepseek: routeCredential().resolve() publishes the grant's headers,
  value, and rejection only, keeping the adapter's onRequestError behind
  the seam.
- web-deepseek-api: a route publishing an unparsable base URL becomes a
  misconfigured source instead of throwing from readiness or dispatch.
2026-11-11 20:29:37 +08:00
LegGasai e051549e31 fix(forge): name the review tab order outside the copy rule and refresh event graphs
Refs #8312
2026-11-11 20:27:19 +08:00
audit b4bcab0139 fix(feishu): list the entry skill through a static provider with an opaque resource base
Mounting `skills/` through the skill filesystem provider put the package's absolute directory into the skill result as its base directory, so the refreshed `feishu-skills` fixture replayed only on the recording machine, and the rendered guidance to resolve relative paths against that directory contradicted the entry, which opens guides through lark-cli. `FeishuSkillProvider` now reads the packaged entry once at load, validates its frontmatter, and lists it with the opaque resource description the dynamic provider used; the fixture is refreshed without a machine path, and the package depends on `yaml` instead of `@deepseek-ai/dsh-skill-filesystem`.
2026-11-11 20:22:56 +08:00
LegGasai 81a2bfa67c fix(forge): read pull request status in documents of at most maxBatchSize
forge-github put every due pull request of a host into one GraphQL
document. GitHub answers a document of 30 pull requests with HTTP 504,
so the Session list's status hub, which makes every bound pull request
due at startup, failed and backed off the whole batch together.

A status read now builds one document per maxBatchSize pull requests
(default 8) before the first request and reads them one after another.
A document whose gh run fails, times out, or prints over its limit fails
only its own pull requests, and a cancelled read requests no further
document. The whole read still runs within the forge registry's
fetchTimeoutMs.

Resolves #8322
2026-11-11 20:21:16 +08:00
LegGasai ed30d274f1 refactor(working-directory): move the workspace only through Host operations
Remove the model-facing working_directory tool and the cwd parameter of the
subagent tools, so only Host operations move a Session's directory. Every
change the service records carries `workspace: true`, and the workspace root
is the directory of the last marked change, or the original project. The
anchor field, the anchor list, relocate, inherit, and anchorsOf are gone;
get, ensure, set, and rootOf remain.

A change without the marker, recorded while the model could move the
directory, moves only the current directory, so stored Sessions keep the
root they had.

- worktree: create enters the checkout through set; exit returns the Session
  to the source checkout of the recorded worktree that contains its directory,
  and exit_worktree exposes it to the model.
- subagent: a child starts in the parent's workspace root or a Host-chosen
  directory through set.
- SDK: the working-directory methods return { cwd } again and
  getWorkspaceRoot / get_workspace_root are removed.
- Recorded sessions: the worktree scenario leaves through exit_worktree and
  covers recovery from a removed worktree; the two scenarios that only drove
  the removed tool are deleted; three compaction scenarios lower their tuned
  context window by the removed tool-schema tokens.
2026-11-11 20:10:17 +08:00
zhc 5321813d4f Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
2026-11-11 20:04:09 +08:00
LegGasai 22b3a4622e fix(forge): document the list reader and size the merged thread spec
Refs #8312
2026-11-11 20:00:30 +08:00
sjw1231 cf92ab9aac Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252 2026-11-11 19:57:11 +08:00
LegGasai 0a81f5bbea Merge remote-tracking branch 'origin/master' into worktree/forge-m7-review-page-ee17bf
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-11-11 19:53:43 +08:00
LegGasai ac6ff274f7 test(forge): cover the code review page
Cover the review page's list hub and Remote methods on the Host, and its
list, detail, changes, chat, navigation count, and registrations in the
browser, including withdrawal on unload.

Refs #8312
2026-11-11 19:51:46 +08:00
zhc d7ecf4b9ea fix(ui-chat): 按消息当时的工作目录解析相对图片与链接
working-directory 新增 workingDirectoryHistory 投影:header 目录(seq 0)与每次
working-directory/change 的 seq 和目录,不进会话摘要。ui-primitives 新增
MarkdownPathScope,在本地目标交给委托前先解析;助手节点按自身 anchorSeq
取当时目录,cd 前后的消息各自解析到正确文件,重开会话后依旧成立。

Refs #8267
2026-11-11 19:41:16 +08:00
LegGasai 7d83af645c docs(llm): fix route credential contracts and the package index budget
- RouteCredential.configured: the owner may read its store to answer; the
  contract no longer claims "without reading the credential's value". Same
  text in the source JSDoc, both llm-streaming type-equiv blocks, and the
  seam Agent Note.
- llm-deepseek README: replace the stale resolveAuth(connection) summary
  with the resolveAuth(connection, endpoint) contract.
- llm-deepseek-account README: the listing cache is keyed by a SHA-256 of
  the credential headers, not of the token.
- web-deepseek-api tests/routes.ts: note that composition.spec.ts covers the
  real route plugins.
- packages/README: restore the document/, credentials/, and util/ rows and
  raise the verify-doc-budgets ceiling to 1,060 for the account/ row.
2026-11-11 19:33:52 +08:00
Yichen Jiang 393b0f71f5 test(cua-mcp): release held promises at teardown in the reset unit tests
A reset unit test that fails before it resolves the promise it holds left the server's disposer waiting until the hook timeout. Each test now resolves its promise at teardown, so a failing run ends at once.
2026-11-11 19:22:23 +08:00
LegGasai 86b7aef42c docs(forge): document the code review page
Describe the page in the panel and conversation READMEs and the forge
subsystem page, record the decision in an Agent Note, and regenerate the
configuration, Cordis, and slot catalogs.

Refs #8312
2026-11-11 19:13:03 +08:00
LegGasai d0395da28a feat(forge): add the code review page
List the signed-in user's open change requests in a left-navigation page with
a review-request count, and show one in full: its description, labels, and
card rows, the changes view, and a review conversation that starts in a blank
Session of the matching Workspace and binds the change request at its first
message.

Refs #8312
2026-11-11 19:02:12 +08:00
Yichen Jiang c2fa483000 test(cua-mcp): stop the looping program of the reset test when the reset does not
The test that resets during a program that cannot be interrupted gives the runtime a ten-minute stop grace, so a reset that no longer releases the environment fails the test by its timeout on every lane. The test records the program process and kills it at teardown, so such a failing run does not leave a process spinning.
2026-11-11 18:55:05 +08:00
Yichen Jiang c4dd37eb53 Merge remote-tracking branch 'origin/master' into feat/cua-mcp 2026-11-11 18:26:53 +08:00
Yichen Jiang d5e02356ea refactor(cua-mcp): reset by releasing the program environment through the runtime's owner release
cua_reset keeps its effect: only the program process is replaced, while the connection's Agent, its native connection, and its consent decisions stay. The PTC program-tool factory no longer carries a reset operation, so packages/core/tool-executor-ptc is unchanged against master. ctx.cuaPrograms exposes release(agent), the owner release of the provider's program runtime, and the MCP frontend orders its own calls around it: it cancels the running program, releases the environment, answers after the cancelled program has settled, and holds back programs that arrive during a reset. A failed release answers with an error that asks for another cua_reset; the runtime rejects programs until a release succeeds. The reset result names cua.getApp for selecting applications again.
2026-11-11 18:19:43 +08:00
Yichen Jiang 11fe934953 docs(cua-mcp): document the Codex entry as exercised, with required startup and unattended approval
The Codex entry gains required = true: without it Codex waits one second for the server, and the first model request can go out without the three tools. codex exec refuses cua_run_code under the approval policy never, so an unattended run sets approval_mode = "approve" on that tool. The entry was exercised through codex exec on codex-cli 0.153.2 and 0.166.0-alpha.5.1 against a macOS desktop.
2026-11-11 18:19:29 +08:00
Jiawei Song 0b8ee3b709 Merge pull request #8168 from deepseek-harness/refactor/tool-errors-mcp
feat(mcp,web,skill,cordis,plugin,ptc): give MCP, web, skill, inspect, plugin, and run_code tool failures error codes
2026-11-11 18:16:03 +08:00
LegGasai cb222b0b7c fix(forge): show the change request title on one line and crawl it on hover
The card title wrapped to two lines while expanded; it now stays on one line
in both states and crawls into view while the pointer rests on the card head,
as the other clipped panel rows do. The number line below it is unchanged.
2026-11-11 18:00:28 +08:00
Yichen Jiang b67e2ef48a Merge pull request #8297 from deepseek-harness/fix/forge-ptc-binding
fix(forge): bind pull requests that gh commands touch inside PTC programs
2026-11-11 17:53:24 +08:00
Yichen Jiang b2a46d2e96 Merge remote-tracking branch 'origin/master' into feat/cua-mcp 2026-11-11 17:51:30 +08:00
sjw1231 a8c3829a7f Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887 2026-11-11 17:44:05 +08:00
Yichen Jiang 72c2a4cb01 Merge branch 'master' into fix/forge-ptc-binding 2026-11-11 17:41:54 +08:00
LegGasai b75713f72f test(web): normalize the home-relative workspace row in panel captures
The Environment section's working directory row abbreviates the home
directory, and CI keeps the scratch workspace under it, so the panel
captures map the abbreviated workspace path to {{cwd}} as the reference
composer capture does.
2026-11-11 17:38:38 +08:00
LegGasai 7dd8d1059f feat(sidebar): show trailing content on panel rows
Plugins register non-interactive content for a panel in the root-scoped
sidebar.panellist.trailing list with the panel's id, such as a count.
The expanded row shows it at its trailing edge and yields to the unpin
action; the collapsed rail shows it over the icon's corner. Its text
describes the row button for assistive technology.

Refs #8312
2026-11-11 17:34:48 +08:00
LegGasai 4b5b0b716c Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-11 17:32:52 +08:00
Yichen Jiang 75f9f6ef98 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
master removed the Python PTC runtime (#8307) and rewrote three bilingual
documents this branch also edits.

Conflicts:
- docs/capability-seams.i18n.yaml, packages/core/tool-executor-ptc/README.i18n.yaml,
  and packages/experimental/README.i18n.yaml: both sides re-recorded the
  translation pairing records. The merged documents were reviewed in both
  languages and the three records recorded again from them.
2026-11-11 17:32:17 +08:00
Ziya d04a0488a3 Merge pull request #8293 from deepseek-harness/fix/composer-home-end
fix(ui-conversation): move to the line boundary on Home and End on macOS
2026-11-11 01:30:35 -08:00
Yichen Jiang 6234871e8d docs(forge-session): 更新模块图中的 dsh-llm 依赖
评审修复为 forge-session 新增了 @deepseek-ai/dsh-llm peer 依赖,
重新生成 docs/module-graph.md 与中文版。
2026-11-11 17:29:21 +08:00
LegGasai e5248d841e test(web): expect the Session panel toggle in the CUA program banner
The CUA program scenario from master captures the Session header, which now
holds the Session panel toggle.
2026-11-11 17:28:28 +08:00
LegGasai f71ee7cb2e feat(forge): list the signed-in user's change requests and read descriptions
ForgeProvider gains an optional viewer capability with listForViewer and
countForViewer, which read the review-requested, authored, and involved
lists of open change requests on a host, and readDescription, which reads
a change request's Markdown description, labels, and image addresses a
browser can load without a host session. ForgeFailure.code gains
rate-limited.

forge-github reads each list through one GraphQL search (one document
that searches several lists draws a gateway error), counts all lists in
one request, pairs uploaded images with the signed addresses of the
rendered description, and reports GitHub rate limits as rate-limited.

Refs #8312
2026-11-11 17:22:08 +08:00
LegGasai f201124f2b docs(upgrade-guide): move the Session panel entries guide to v0.2.2-rc.2
The root version is now 0.2.2-rc.2, so the guide moves to that version's
directory; it also records that ctx.forgeChanges.kinds drops panel and that
forge.change-request.card.actions renders on the Session panel's cards.
2026-11-11 17:11:38 +08:00
sjw1231 75f5b13132 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887
# Conflicts:
#	docs/persistence-schema.json
2026-11-11 17:06:13 +08:00
LegGasai 51e98a7f0e test(subagent): open the forked child from the Session panel
The subagent list moved from the Session header switcher to the Session
panel, so the fork divider scenario opens the child from the panel's tree.
2026-11-11 17:03:40 +08:00
LegGasai 9adf460c1f test(forge): open the Session panel in the extension scenario
The change requests list moved from the forge tab to the Session panel, so
the scenario shows the panel before pressing the plugin's card button.
2026-11-11 16:56:47 +08:00
audit 4f4e124836 refactor(feishu): ship a static entry skill and report failures by exit code
The `feishu` skill is now `skills/feishu/SKILL.md`, mounted through the skill filesystem provider as the package's bundled root: the catalog lists it and a load returns the file without running lark-cli, and DSH owns the entry's length, which stays below the tool-result pruning threshold for the 28 guides that lark-cli 1.0.97 embeds. The `lark-cli skills list --json` read, its JSON command helper, the recorded catalog fixture, and the catalog failure cases go away.

A failed account command reports its command and exit code through the kit's `exitFailure`. The stderr envelope classification and its `type` and `subtype` fields go away: they only appended two untranslated words to the failure line, while the recovery text is chosen by the operation kind.

The `feishu-skills` snapshot is refreshed for the new skill body; the refresh also takes master's current runtime-context wording.
2026-11-11 16:55:10 +08:00
Yichen Jiang 74c20de23f Merge remote-tracking branch 'origin/master' into fix/forge-ptc-binding
# Conflicts:
#	packages/experimental/forge-session/tests/loader-composition.spec.ts
2026-11-11 16:54:24 +08:00
LegGasai 4f8c9e6380 Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-11 16:45:37 +08:00
LegGasai 95a1c6eaac Merge remote-tracking branch 'origin/master' into feat/session-panel-sections
# Conflicts:
#	docs/persistence-schema.json
#	packages/client/ui-jobs/src/client/index.ts
2026-11-11 16:45:28 +08:00
LegGasai e293f0b404 Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-11 16:43:17 +08:00
_Kerman 3268ba0ccd refactor(llm): share extractTextContent across text consumers 2026-11-11 16:43:06 +08:00
LegGasai 36767bd27b fix(forge): narrow changes tab navigation params on the fields read
Depending on the Session panel brings the file and Browser params types into
the forge program, so reading lens and path off the params union no longer
type-checks; narrow with in checks as the file preview body does.
2026-11-11 16:40:53 +08:00
imccyu 5e7206f6c6 refactor(exports): retire obsolete subpaths with compatible brand APIs (#8215)
* refactor(exports): consolidate type entries and remove obsolete subpaths

* fix(exports): preserve constructors while retiring brand subpaths

* fix(exports): retain guide relocation after parent squash
2026-11-11 08:39:14 +00:00
LegGasai 66c558f5cb Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-11 16:35:23 +08:00
LegGasai 7bd01e1e29 Merge remote-tracking branch 'origin/master' into feat/session-panel-sections
# Conflicts:
#	apps/web/tests/jobs-panel-layering.e2e.ts
#	apps/web/tests/sidebar-subagent-activity.e2e.ts
#	apps/web/tests/subagent-conversation.e2e.ts
#	apps/web/tests/support.ts
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/subsystems/forge.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/client/ui-jobs/package.json
#	packages/client/ui-subagent/package.json
#	packages/client/ui-subagent/src/client/index.ts
#	packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx
#	packages/client/ui-subagent/tsconfig.json
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/client-ui-forge/src/client/ChangeRequestCard.tsx
#	packages/experimental/client-ui-forge/src/client/ChangesTab.tsx
#	packages/experimental/client-ui-forge/src/client/ForgeTab.tsx
#	packages/experimental/client-ui-forge/src/client/mount.ts
#	packages/experimental/client-ui-forge/tests/forge-tab.client.spec.tsx
#	packages/experimental/client-ui-forge/tests/mount.client.spec.ts
#	packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
#	packages/preset/agent-preset/skills/dsh-doc/references/packages.md
#	pnpm-lock.yaml
2026-11-11 16:34:53 +08:00
Yichen Jiang 94d7eb2045 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
master renamed the macOS Computer Use provider to @deepseek-ai/dsh-cua-macos
(#8284) and moved identity construction to brandString (#8214).

Adapted to master:
- The cua-mcp profile mounts @deepseek-ai/dsh-cua-macos and declares it as the
  optional dependency; the bundle test follows the new name.
- The MCP adapter builds its Session and tool-call ids with brandString, so
  @deepseek-ai/dsh-brand becomes a runtime dependency of the package.

Conflicts:
- scripts/experimental-package-policy.ts and scripts/release/families.spec.ts:
  both sides added a row; the cua-macos, cua-mcp, and cua-windows rows coexist.
- scripts/package-dependency-policy.ts: took master's removal of the SessionId
  safe entry. longEdgeDimensions no longer sits in the safe-export list; it
  joins the existing peer-required @deepseek-ai/dsh-attachment entry, so this
  branch adds no safe-export exception.
- Generated catalogs, module graphs, and the dsh-doc package reference: took
  master and regenerated.
- Four translation pairing records: took master and re-recorded after
  reviewing both language diffs.
2026-11-11 16:31:58 +08:00
sjw1231 c28409ba22 fix(plugin-market): convert market Remote failures before HarnessError passthrough
RemoteError now extends HarnessError, so the early passthrough returned
plugin-market/* Remote failures unconverted. Map the four Remote codes the
tool's market reads reject with first; other HarnessErrors keep their
identity.
2026-11-11 16:29:35 +08:00
sjw1231 c670457442 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887 2026-11-11 16:25:44 +08:00
ZiyaZhang 9f62f9966c fix(ui-conversation): move to the line boundary on Home and End on macOS
Apple key bindings map Home and End to scrolling the document, and the
composer sits inside the conversation scroller, so the keys scrolled the
conversation instead of moving the caret. On Apple platforms the composer
keymap now moves the caret to the start or end of the visual line, with
Shift extending the selection, and End right before a quote moves to the
end of its line as Cmd+Right does. Other platforms already move to the
line boundary.

Fixes #8291
2026-11-11 00:19:21 -08:00
LegGasai 3c5d888751 Merge remote-tracking branch 'origin/master' into feat/session-panel
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/client/README.i18n.yaml
#	packages/preset/agent-preset/skills/dsh-doc/references/packages.md
#	pnpm-lock.yaml
2026-11-11 16:16:28 +08:00
Turtle 085e749cf0 Merge pull request #8095 from deepseek-harness/turtle/fix-vscode-launch-env-ab3748b25da7
fix(open-in-app): drop inherited ELECTRON_RUN_AS_NODE when launching apps
2026-11-11 16:15:28 +08:00
Turtle c7b2c5e3e5 Merge pull request #7936 from deepseek-harness/turtle/fix-sidebar-fullscreen-line-a73e32287f80
fix(sidebar-right): clip the fullscreen left divider past the window edge
2026-11-11 16:13:54 +08:00
sjw1231 b86821fc59 fix(extensions): name the discarded error in the plugin tool code read
The verify-empty-catch gate added on master requires an empty catch to
name the failure it discards; the trapped code read now binds
_codeReadTrapped.

Refs #7869
2026-11-11 16:12:28 +08:00
Turtle 2ee432f559 Merge pull request #8173 from deepseek-harness/turtle/fix-mention-latency-5c3691371b70
perf(session-persistence-jsonl): reuse unchanged headers across listings
2026-11-11 16:11:38 +08:00
sjw1231 843d17d9d9 Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	packages/experimental/ptc-runtime-python/README.i18n.yaml
#	packages/experimental/ptc-runtime-python/README.md
#	packages/experimental/ptc-runtime-python/README.zh.md
#	packages/experimental/ptc-runtime-python/src/index.ts
#	packages/experimental/ptc-runtime-python/tests/runtime.spec.ts
2026-11-11 16:11:34 +08:00
_Kerman 92fca8b2b3 Merge origin/master into xtr/content-to-text 2026-11-11 16:05:11 +08:00
LegGasai 2c38990cee fix(panel): list subagents, shared tasks, and jobs on one line with hover details
Each Session panel row now holds one 28px line: the status, the title or
command, the duration, and the row's control. Resting the pointer on a row for
500ms opens a hover card beside the panel with what the second line used to
show and more: a subagent's owner, activity, mode, tokens, and exact duration;
a task's owner, description, and status; a job's kind, status, and duration.
The switcher menu keeps its two-line rows.
2026-11-11 16:03:50 +08:00
_Kerman f34250ca9b Merge pull request #8307 from deepseek-harness/xtr/remove-python-ptc-runner
refactor(ptc): remove the experimental Python runtime
2026-11-11 16:03:49 +08:00
LegGasai 27e532ed7e feat(primitives): open compact hover cards where they fit, and add HoverDetails
A compact HoverCard always opened beside the anchor's end edge, off screen for
rows of a panel at the window's end. It now opens beside the start edge when
only that side fits, and keeps to the viewport's end margin when neither does.
HoverDetails gives summary-panel rows one card body: the title, secondary
lines, the state after its dot, and measures after their icons.
2026-11-11 16:03:48 +08:00
Huo Yaoyuan 04b5a91a86 docs(cua): describe supported modifiers in platform guidance 2026-11-11 15:57:41 +08:00
Yichen Jiang c5261dbe32 refactor(forge-session): 处理 #8297 评审意见
- reference-lookup:prepare() 为每个 gh 引用各返回一项查询,不再只取
  第一项;补 JSDoc,并注明排队查询依赖工具管线对每个执行都发布
  tools/result、作用域销毁时一并释放。
- projection:textOf 参数改为 readonly ContentBlock[],新增
  @deepseek-ai/dsh-llm peer 依赖与 tsconfig 引用。
- index:重排 ForgeSessionService JSDoc 段落。
2026-11-11 15:57:01 +08:00
Jiawei Song bc45c6c17c Merge pull request #8057 from deepseek-harness/refactor/tool-errors-agent
feat(subagent,workflow,plan): give delegation, workflow, plan, and interaction tool failures error codes
2026-11-11 15:53:22 +08:00
sjw1231 e5611f8281 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/boot/plugin-market/tests/tools.spec.ts
#	packages/mcp/mcp-client/tests/mcp-client.spec.ts
#	pnpm-lock.yaml
2026-11-11 15:51:19 +08:00
sjw1231 aa6f6c1a30 test: brand ToolCallId with brandString after merging master
master replaced the branded-id constructors with brandString; the
wrapper-cancellation and cua-driver cancellation tests this branch adds
now use it too.

Refs #7869
2026-11-11 15:50:28 +08:00
Turtle b3e8a77bdf Merge pull request #8051 from deepseek-harness/turtle/snapshot-diff-viewer-127358e84afe
ci(preview): publish a snapshot diff page with each PR preview
2026-11-11 15:49:48 +08:00
CreatixChu 9e6fd09813 Merge pull request #8285 from deepseek-harness/cleanup/platform-package-names
按平台区分 CUA helper 的 Actions 工作流和产物
2026-11-11 07:48:52 +00:00
Turtle cd25788e5c Merge pull request #8222 from deepseek-harness/turtle/update-notes-43ec0dc7e41b
docs(automation): deliver every event candidate as a normal turn
2026-11-11 15:48:33 +08:00
creatixchu 8bc1790096 Verify Messages uses file IDs after simultaneous quota recovery 2026-11-11 15:42:55 +08:00
sjw1231 3524a7a3e5 Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent
Resolves import conflicts with the brand-export split (#8214): value
brand factories are now brandString<T>() calls, and dsh-workflow's
WorkflowRunId is imported from its types entry. Generated persistence
and config catalogs are regenerated.
2026-11-11 15:40:30 +08:00
sjw1231 53f68a03ca Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/experimental/browser-use-runtime/tests/mcp.spec.ts
#	packages/experimental/browser-use-runtime/tests/resources.spec.ts
#	packages/experimental/browser-use-stagehand-native/tests/provider.spec.ts
#	packages/experimental/claude-code-mods/src/host-ops.ts
#	packages/experimental/cua-macos/tests/provider-lifecycle.spec.ts
#	packages/experimental/cua/README.i18n.yaml
#	pnpm-lock.yaml
2026-11-11 15:40:25 +08:00
_Kerman f141464b59 docs(ptc): clarify remaining extension support and migration 2026-11-11 15:37:46 +08:00
creatixchu 27bbae4a59 Sync master into the CUA helper packaging workflows 2026-11-11 15:37:16 +08:00
creatixchu 1cd79de4e8 Explain missing macOS helper jobs and verify artifact name selection 2026-11-11 15:35:08 +08:00
Turtle 2099 ca7e7f4018 Merge pull request #8010 from deepseek-harness/turtle/subagent-fork-divider-20436572857c
feat(web): divide a forked session's inherited history from its own messages
2026-11-11 15:32:21 +08:00
_Kerman 5ea79d1fe7 fix(ci): prune retired Python PTC catch entries 2026-11-11 15:29:39 +08:00
_Kerman da91532aaa merge: sync master into Python PTC removal 2026-11-11 15:27:25 +08:00
creatixchu 1af635a8a0 Distinguish reserved quota slots from a new cleanup 2026-11-11 15:26:59 +08:00
creatixchu 08a606ccb8 Coordinate quota recovery and bound file retries by their deadline 2026-11-11 15:24:50 +08:00
creatixchu ba223d7325 Merge remote-tracking branch 'origin/master' into feat/files-upload-retries
# Conflicts:
#	packages/llm/llm-deepseek/src/files-api.ts
#	packages/llm/llm-deepseek/src/transport.ts
2026-11-11 15:19:17 +08:00
imccyu 455f7a38a6 Merge pull request #8214 from deepseek-harness/split-exports-brand-strings
refactor(brand): migrate internal identity construction
2026-11-11 15:15:26 +08:00
creatixchu 29de5f9e04 Keep the existing Desktop packaging workflow names 2026-11-11 15:14:28 +08:00
creatixchu 1d5e1d7757 Name helper artifacts and packaging workflows by platform 2026-11-11 15:12:02 +08:00
CreatixChu a660c1c048 Merge pull request #8284 from deepseek-harness/cleanup/cua-macos-naming
统一 macOS Computer Use 后端的包名和配置行 ID
2026-11-11 15:11:59 +08:00
sjw1231 9557a247a8 fix(tool-schedule): keep the reason for an invalid delegation depth
Moving the delegation-depth read inside the operation's catch turned an
invalid runtime subagentDepth into a reasonless internal_error, so the
tool result lost the message that master still reported. The read is
back before the catch; delegationDepthOf now throws SubagentError
INVALID_DEPTH, so the tool result keeps the message and records that
name and code.

Refs #7869
2026-11-11 15:09:27 +08:00
_Kerman d1cf1dede1 refactor(ptc): remove the experimental Python runtime 2026-11-11 15:07:01 +08:00
Turtle 303bcb4137 Merge pull request #4862 from deepseek-harness/turtle/catch-disposition
feat(infra): reject silent empty catch clauses
2026-11-11 15:06:58 +08:00
sjw1231 0e06389fbe fix(stagehand): read non-object arguments as the MCP bridge does
Host-side validation now reads a non-object argument value as {}, the
value the MCP bridge passes to the call, so stagehand_screenshot(null)
takes a screenshot as before instead of failing as invalid arguments.

Refs #7869
2026-11-11 14:55:24 +08:00
creatixchu fd00ac248a Sync master after the API policy notes merged 2026-11-11 14:51:36 +08:00
Turtle 312cbc0308 Merge pull request #8075 from deepseek-harness/agent/stable-api-policy-research-a98aa8f04ee6
docs(notes): propose stable API policy
2026-11-11 14:48:31 +08:00
creatixchu 3f4704cb6d Merge master into the macOS CUA naming change 2026-11-11 14:47:24 +08:00
sjw1231 e93e8e266a test(workflow-ptc): use the output field in the fatal-code fixture
Master renamed PtcRunResult.logs to output, so the fatal-code run-result
fixture no longer type-checked after merging it.

Refs #7869
2026-11-11 14:46:41 +08:00
Huo Yaoyuan 80e675fb75 fix(cua-windows): align modifier names and support Win key 2026-11-11 14:45:26 +08:00
creatixchu a7df022dae Quote the entry ID as printed by the CLI 2026-11-11 14:44:19 +08:00
creatixchu ce1b5182bc Clarify macOS CUA migration and provider diagnostics 2026-11-11 14:43:07 +08:00
Yichen Jiang 30e56b50bb Merge remote-tracking branch 'origin/master' into fix/forge-ptc-binding
# Conflicts:
#	apps/web/tests/forge-panel.e2e.ts
2026-11-11 14:41:33 +08:00
sjw1231 4ffad712fc Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent 2026-11-11 14:39:22 +08:00
_Kerman bb383263d8 refactor(llm): share extractTextContent across text consumers 2026-11-11 14:33:07 +08:00
Dudu-0223 cd329ad22a fix(session): align list tool release version and rescope skip
Match the new package to the merged 0.2.2-rc.2 release version, and add the
cua agent-scopes test to the exact-path rescope exceptions for its cordis
preset id.
2026-11-11 14:31:42 +08:00
sjw1231 cfa565e1bb fix(cua): label a top-level request issue as arguments
A key outside method and params reported an empty field name; it now
reads arguments: Unrecognized key, matching how other issues name their
field.

Refs #7869
2026-11-11 14:23:30 +08:00
imccyu 7b5dd54e94 Merge pull request #8130 from deepseek-harness/worktree-sesion-status-readstate
refactor(session): move session status into ui-session-status
2026-11-11 14:19:10 +08:00
sjw1231 4ad94b0445 fix(cua): name the failing field when no request form matches
An argument union that no form matches now lists each form's own issues
with their full paths, so a click missing y reports
params.y: expected number, received undefined instead of only
params: Invalid input.

Refs #7869
2026-11-11 14:17:46 +08:00
Turtle 2548bca817 Merge remote-tracking branch 'origin/master' into turtle/stable-api-policy-research-a98aa8f04ee6 2026-11-11 14:08:55 +08:00
creatixchu 4983604d15 Synchronize late upload completion with batch cancellation 2026-11-11 14:05:10 +08:00
sjw1231 d7603e425a test(ptc-runtime): cover PtcRuntimeError where the Python runtime is skipped
On Windows the Python runtime tests that construct PtcRuntimeError are
skipped, so the class needs its own test in its package to meet the
per-file coverage gate. package.json and tsconfig.json again match
deepseek-harness#8168 after its merge with master.

Refs #7869
2026-11-11 14:04:31 +08:00
creatixchu 1c594a6dec Exercise sibling completion and cancellation during Retry-After 2026-11-11 14:04:09 +08:00
creatixchu a02f380f1b Check both concurrent file resolutions on inline fallback 2026-11-11 14:02:29 +08:00
Yichen Jiang 0c3c508ea8 feat(cua-mcp): mount the Windows provider on native Windows
The profile mounted only the macOS provider, so a Windows Host listed no cua_run_code. Add a second
provider row for @deepseek-ai/dsh-cua-windows, enabled on native Windows only, with the same fixed
screenshot target and PTC preset as the macOS row, and declare the package as an optional dependency
beside the macOS provider. The profile e2e fixture switches both native rows off. The no-provider
message names both platforms and points at the launcher's stderr.

README: Windows helper setup through the row's helperPath, with the fields a config override must
restate, and the Windows provider's limits that apply through MCP.

Not exercised on a Windows desktop. On macOS the row was forced on through a profile patch: the
Loader resolved the package, accepted the documented config, rejected an invalid one, and reached
the provider's own host check.
2026-11-11 14:02:22 +08:00
creatixchu 6ae2e2556c Bound parallel DeepSeek image uploads and retry throttled files 2026-11-11 14:00:43 +08:00
Turtle 1b7b0d8cb4 docs(notes): keep manifestVersion unchanged for seam API members
Refs #8074
2026-11-11 13:58:29 +08:00
Dudu-0223 d138bfef13 Merge remote-tracking branch 'origin/master' into review/session-list-tools 2026-11-11 13:52:17 +08:00
Dudu-0223 3895609baa refactor(session): list Workspace sessions from member headers
Drop contain_subagent from list_session: discovering subagents of a Workspace
needs either a corpus scan or the parent subagent catalog, so this version
lists only non-subagent sessions.

A workspace_id call now reads its members' headers from the Workspace
registry index through the new Workspace.sessionHeaders, so its work grows
with the member count instead of enumerating every stored Session. Unscoped
calls still enumerate the corpus headers.
2026-11-11 13:38:59 +08:00
Yichen Jiang 69f53d442b test(cua-mcp): compare resolved working directories
The Windows coverage job failed on the new working-directory assertion: realpath expands the
runner's 8.3 short temporary path (RUNNER~1) while the program's process.cwd() keeps the spelling
it was started with. Both sides are now resolved before comparison in the composition test and in
the profile end-to-end test; macOS still needs the resolution because its temporary directory is a
symlink. The parsed window id is annotated as the string it has been since window ids became strings.
2026-11-11 13:37:36 +08:00
Yichen Jiang b2e064fecb Merge remote-tracking branch 'origin/master' into feat/cua-mcp
Conflicts: both sides added one adjacent entry (cua-mcp here, cua-windows on master) to
scripts/experimental-package-policy.ts, scripts/release/families.spec.ts, and tsconfig.host.json;
both entries are kept. Generated and recorded files take master's side and are regenerated: the
config catalog, the module graph, the package list, two pairing records, pnpm-lock.yaml, and the
creation-recommendations fixture.

Adaptations to master:
- @deepseek-ai/dsh-cua-mcp follows its release family to 0.2.2-rc.2.
- Window ids are strings: this branch's fixture programs and assertions pass "7".
- The retained program environment is a scoped REPL, in which a later call may declare an earlier
  name again: cua_reset no longer names declaration conflicts as its use, and the cua-mcp README
  and Agent Note state the registration's current description length.
- The cua-mcp README names the Windows provider, which this profile does not mount.
- The profile's expected reference and tool list are re-recorded.
2026-11-11 13:13:22 +08:00
sjw1231 1784d23da9 fix(workflow): keep the fatal code that ended a failed run
A fatal WorkflowError such as AGENT_CAP or ITEM_CAP was rendered to text
inside the PTC guest, so the workflow tool could only report RUN_FAILED.
WorkflowResult and the workflow/end payload now carry errorCode, the
code of the fatal error that ended an error run; the host validates it
at the process boundary and the tool fails with that code. RUN_FAILED
remains only for an error run without one: the script's own exception or
an engine runtime failure. WorkflowError narrows code to
WorkflowErrorCode.

Refs #7869
2026-11-11 13:10:55 +08:00
Yichen Jiang d429d1b00d fix(forge-session): 关联 PTC 程序内 shell 调用操作的 PR
PTC 程序内的工具调用只写 tool/ptc-dispatch-start / tool/ptc-dispatch
事件,不写 tool/call / tool/result,因此 forgeChangeRequests 投影看不到
程序内的 gh pr create/view/edit/checkout 与 git push;reference-lookup
又跳过带 parent 的嵌套调用。

- 投影折叠 bash / pwsh 的 tool/ptc-dispatch 事件,复用直接调用的绑定
  与推送规则;stateVersion 3 -> 4,旧检查点重新折叠。
- 服务对 tool/ptc-dispatch 事件触发推送发现并刷新监听方。
- 嵌套调用的不带主机数字引用排队到外层根调用结算后查询,
  使用原调用的 shell 执行环境,随根调用取消。
- 单测、Loader 真实 PTC 组合测试与 Web e2e 覆盖 PTC 路径。

Fixes #8290
2026-11-11 13:05:51 +08:00
LegGasai 48a20b9d03 docs(upgrade-guide): move the route credential guide to v0.2.2-rc.2 2026-11-11 12:54:18 +08:00
Yichen Jiang 3a0779f905 feat(cua-mcp): serve the API reference through cua_get_api_reference and give programs a workspace
- Add the read-only cua_get_api_reference tool. It returns the provider's cua guidance for the
  connection's Agent and keeps no state. The reference no longer rides on the first program result
  of each environment: the server cannot observe a new conversation on a held connection, a
  cancelled or failed first call, or a compacted context, and the delivery flag had two writers
  without a common ordering point.
- Create the connection's Agent in a dedicated workspace: DSH_CUA_WORKSPACE, or cua-mcp/workspace
  under the Harness home. An Agent's working directory is the workspace-write root of its programs,
  so the directory a client launched the server from, which can be /, is no longer writable.
- Report startup failures on stderr and exit with code 1, including a relative workspace path and a
  workspace directory that cannot be created. The profile mounts no log sink.
- Run each program call as the Agent's maintenance activity, so Agent disposal cancels an in-flight
  call and waits for it and its nested calls to settle before the Session closes.
- Return a failed call's message without DSH's "Error: " prefix; isError already marks it.
2026-11-11 12:52:59 +08:00
Yichen Jiang 12451af32e refactor(cua): keep the screenshot-target projection off the config entry
fixedScreenshotTarget was exported from @deepseek-ai/dsh-cua/config, but every caller is inside this
package: platform providers receive the projection through installCua. Move it next to the
ctx.cuaPrograms registration so the config entry exports only the schema, types, and fields that
providers consume.
2026-11-11 12:52:57 +08:00
LegGasai 1685f46873 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
# Conflicts:
#	packages/web/web/package.json
#	scripts/plugin-entry-existing-exports.ts
2026-11-11 12:52:40 +08:00
sjw1231 688caffc8c docs(upgrade-guide): move experimental tool error codes guide to v0.2.2-rc.2
The root version is now 0.2.2-rc.2, so the guide belongs in that
release directory.

Refs #7869
2026-11-11 12:47:42 +08:00
Turtle 603ed7e7d0 docs(error-handling): explain empty catch rules with examples 2026-11-11 12:47:01 +08:00
Turtle 33e2285547 docs(infra): record the empty catch gate decision 2026-11-11 12:47:01 +08:00
Turtle 62cce39c06 fix(infra): drop --record and treat a new defect on a recorded empty catch as new 2026-11-11 12:47:01 +08:00
turtle1999 9dc86febb6 feat(infra): point empty catch rejections at the error-handling guidance 2026-11-11 12:47:01 +08:00
turtle1999 4cfd7e0257 fix(infra): read the empty catch rule the way its authors write it
Review of the gate found the reason-comment span too narrow: a comment on the
line above `catch`, or trailing the closing brace, was rejected, so the natural
place to explain a clause did not count. The span now starts at the preceding
token and ends with the line closing the clause.

A binding pattern that names nothing (`catch ({})`, `catch ([])`,
`catch ({ _ })`) counted as naming the error. The gate now requires one bound
name other than `_`.

`--record REF` writes the inventory for a merged tree and refuses any clause the
named revision does not already carry, so no command allows a clause this branch
introduced; a merge that lands recorded clauses is the only case that adds
entries. The no-op body boundary (`catch { "use strict" }`) and the tolerance
for a file the parser cannot read past are stated in the module docblock and
pinned by specification rows.
2026-11-11 12:47:01 +08:00
turtle1999 6572c8a63b chore(infra): record the clauses master added before this gate
The merge brings apps/desktop/src/client/WelcomePage.tsx:132,
apps/desktop/src/preload-platform-account.ts:26,
packages/credentials/deepseek-account-platform/src/index.ts:432, and
packages/credentials/deepseek-account-platform/src/logout.ts:33 into the
recorded inventory, so the gate passes on the merged tree. The two wide `try`
clauses need their owners' judgement: narrowing one changes which failures its
clause discards.
2026-11-11 12:47:01 +08:00
turtle1999 a51a1fc79c fix(infra): read a body of empty statements as an empty catch
`catch { ; }` counted as a handled clause because the block held one
statement. A block whose statements are all bare `;` handles nothing, so both
the clause body and its `try` now count only statements that do something.
2026-11-11 12:47:00 +08:00
turtle1999 05883ff6b5 feat(infra): reject silent empty catch clauses
AGENTS.md requires an empty `catch` to name the discarded error, state why it
needs no handling, and keep its `try` to one statement, but nothing enforced
it: 119 clauses break a condition today.

The new `verify-empty-catch` gate scans tracked and non-ignored untracked
first-party source with the TypeScript syntax tree. It records those 119 legacy
clauses by path, syntax fingerprint, and count in
`scripts/empty-catch.baseline.json`, so enforcement starts without a
repository-wide edit. A new or changed clause fails the gate, and fixing a
recorded clause requires `--prune` to retire its allowance; no command adds
one.

The recorded-inventory bookkeeping shared with `verify-no-unknown-casts` moves
to `scripts/baseline-inventory.ts`, which keeps one copy of baseline
validation, counting, pruning, and the command itself.
2026-11-11 12:47:00 +08:00
sjw1231 d2d79aae65 fix(subagent): give SubagentError a closed code union and stop reusing codes
Route refusals from the Session model-selection policy reused
UNAUTHORIZED, which existing consumers such as tool-office, team, and the
SDK server read as a failed caller-identity check, and an unregistered
LLM provider reused NO_PROVIDER, which means no subagent provider. They
now use MODEL_ROUTE_NOT_ALLOWED and LLM_PROVIDER_NOT_FOUND.

SubagentError's code is typed by the closed SubagentErrorCode union,
each member documented with its condition, so a new failure cannot
silently reuse an existing code.

Refs #7869
2026-11-11 12:46:48 +08:00
zhc 4b83f1b262 Merge remote-tracking branch 'origin/master' into design/model-picker-quick-controls 2026-11-11 12:32:57 +08:00
sjw1231 fa96728ee0 Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/experimental/cua-macos/tests/provider-lifecycle.spec.ts
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
#	packages/experimental/cua/package.json
#	packages/experimental/cua/src/index.ts
#	packages/experimental/cua/src/native-client.ts
#	packages/experimental/ptc-runtime-python/README.i18n.yaml
#	packages/experimental/ptc-runtime-python/src/index.ts
#	packages/experimental/ptc-runtime-python/tests/runtime.spec.ts
#	packages/ptc-runtime/ptc-runtime/package.json
#	packages/ptc-runtime/ptc-runtime/tsconfig.json
#	pnpm-lock.yaml
#	snapshots/session/cua-native/session.v4.jsonl
#	snapshots/session/cua-ptc/session.v4.jsonl
2026-11-11 12:24:26 +08:00
imccyu c20bbda218 📝 chore(client): regenerate the slot catalog after rebasing 2026-11-11 12:21:38 +08:00
imccyu 13fd88d429 🔖 chore(session): align ui-session-status with 0.2.2-rc.2
Match the new package version to the root release version and move its
upgrade guide into the v0.2.2-rc.2 directory.
2026-11-11 12:16:40 +08:00
imccyu aad0cc94e5 🐛 fix(session): reload useSessionStatus consumers with the status table
Add 'uiSession.sessionStatus' to the Cordis inject of ui-conversation,
ui-workspace, ui-subagent, and ui-workflow-run, whose components call
useSessionStatus. Unloading or reloading ui-session-status now stops these
plugins and starts them again instead of leaving their components calling
a missing hook. A whole-client test disables and re-enables the status
entry and checks that the Workspace browser and Conversation shell leave
and render again without errors.

Address the documentation, comment, and test review points: the status
class JSDoc states only its contract and links the README, the ctx.slots
type merge moves to the module that reads ctx.slots, the upgrade guide
separates type-only dependencies from hook consumers, and the
stop-shortcut test name states the invariant it guards.

Refs #4076
2026-11-11 12:16:40 +08:00
imccyu eab6beacb9 🚚 refactor(session): move Session status into client/ui-session-status
Move packages/api/session-status (@deepseek-ai/dsh-api-session-status) to
packages/client/ui-session-status (@deepseek-ai/dsh-client-ui-session-status):
the package has no Remote or Host behavior and depends on ui-session, so it
belongs to the Client group. The uiSession.sessionStatus service,
ctx.uiSession.sessionStatus, useSessionStatus, and UiSessionService keep
their names.

Add the package to the Web client's required boot entries, so startup is
rejected when the status table cannot be imported or fails to apply, as it
was when the table lived in the required ui-session entry.

Refs #4076
2026-11-11 12:16:39 +08:00
imccyu cb2910ef09 ♻️ refactor(session): move Session status into api-session-status
Move the Client Session status table (running state, the effective
pending interaction, and completion reminders) and the useSessionStatus
root hook out of ui-session into the new @deepseek-ai/dsh-api-session-status
package. The UiSessionStatus service is provided as uiSession.sessionStatus
and read as ctx.uiSession.sessionStatus through the mergeable
UiSessionService type of ctx.uiSession.

Pending-interaction registration, precedence, withdrawal, and teardown
delegation stay in ui-session unchanged; ui-session now exposes the
effective requests read-only as ctx.uiSession.pendingInteractions, which
the status table and the Conversation stop shortcut consume. ui-session no
longer depends on api-remotes.

Refs #4076
2026-11-11 12:16:37 +08:00
Yichen Jiang 8c192ad810 Merge pull request #8228 from deepseek-harness/feat/forge-extension-api
feat(forge): open change request review to plugins with lenses, line annotations, and slots
2026-11-11 12:07:19 +08:00
audit 3b21313e8e fix(dingtalk): bound each release download source and let the page cancel a download
A source that has not delivered an asset within the new `releaseTimeoutMs` (default 300000) is skipped for the next one, so a stalled GitHub connection reaches the Gitee mirror; before, only Node's own fetch timeouts ended it, and the whole asset could trickle in for longer. The check's `downloading` phase is cancellable like a sign-in's authorization: the page shows Cancel while it downloads, and a cancelled download leaves the account `not-installed` with a cancelled result.
2026-11-11 12:04:48 +08:00
sjw1231 32bbcb9997 Merge remote-tracking branch 'origin/master' into claude/tool-errors-mcp-f5e887
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/core/tool-executor-ptc/src/errors.ts
#	packages/core/tool-executor-ptc/src/ptc.ts
#	packages/ptc-runtime/ptc-runtime-node/src/bindings.ts
#	packages/ptc-runtime/ptc-runtime-node/src/execution.ts
#	packages/ptc-runtime/ptc-runtime-node/src/index.ts
#	packages/ptc-runtime/ptc-runtime/package.json
#	packages/ptc-runtime/ptc-runtime/tsconfig.json
#	packages/util/atomic-write/package.json
#	pnpm-lock.yaml
2026-11-11 11:48:52 +08:00
creatixchu 3d862135b7 Refresh provider references in the generated event index 2026-11-11 11:46:52 +08:00
creatixchu e7950b0ca8 Align the macOS Computer Use provider package and entry names 2026-11-11 11:43:44 +08:00
Yichen Jiang f1f987c4c2 docs(forge): name what review changes reread, when annotations draw, and brand lens ids 2026-11-11 11:34:04 +08:00
Yichen Jiang 8c8122ffb0 fix(forge-panel): settle lens runs with their plugins and keep review state through lenses
A lens registration's disposer now waits for the classification itself,
and a run whose registration ended or whose caller left before it started
never reaches the lens; changesLens refuses a lens withdrawn while the
files were read and a local result whose files changed during the run.
The extension state names each lens's version, so the view keys results
by source, files, lens, and version. Hunks holding an open comment form
or a saved browser comment stay unfolded, the view reads threads and
viewed marks again on reviewRevision, a thread jump clears a lens that
hides its file, and the Client entry re-exports the lens types.
2026-11-11 11:34:03 +08:00
agicy 1e5a6c2133 Merge pull request #8280 from deepseek-harness/luanlai/fix-windows-cua-helper-test
fix(cua-windows): 对齐 Windows 遍历上限与共享配置
2026-11-11 11:15:03 +08:00
Anlai Lu a91716b7ce fix(cua-windows): 修正 Windows 辅助功能遍历上限提示 2026-11-11 10:53:00 +08:00
Anlai Lu f4bb505210 test(cua-windows): 对齐 native traversal 上限边界断言 2026-11-11 10:53:00 +08:00
imccyu e8f7b93a34 Merge pull request #8278 from deepseek-harness/worktree-sync-release-dsh-0.2.2-rc.2-to-master
release(dsh): sync 0.2.2-rc.2 back to master
2026-11-11 10:49:46 +08:00
imccyu 4e205cd66d Merge release/dsh-0.2.2 (0.2.2-rc.2) into master
# Conflicts:
#	packages/experimental/cua-bundle/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
2026-11-11 10:34:31 +08:00
imccyu 4861a5022a Merge pull request #8213 from deepseek-harness/split-exports-test-fixtures
refactor(exports): internalize test helpers and type fixtures
2026-11-11 10:13:15 +08:00
Turtle ce6ab42635 Merge pull request #8225 from deepseek-harness/turtle/add-desktop-ua-suffix-e911e659413d
feat(llm): report the booted profile in the provider User-Agent
2026-11-11 09:28:02 +08:00
imccyu 17d96e0f6d refactor(exports): internalize test helpers and type fixtures 2026-11-11 07:32:55 +08:00
Huo Yaoyuan b8aed3002d Merge pull request #8260 from deepseek-harness/feat/cua-windows-align
feat(cua-windows): 对齐 Windows CUA 的 accessibility 相关实现
2026-11-11 00:29:18 +08:00
Huo Yaoyuan 176d69bd21 Revert maxDepth/maxElements changes and tests 2026-11-10 23:41:25 +08:00
Huo Yaoyuan a18dbe9138 Remove launchWaitMs config 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 01d868ad1e Reword guidance 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 61576d77c6 Sync maxElement config and add guidance 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 7e3161e461 fix(cua): honor per-read traversal limits on Windows 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 62894e715d feat(cua-windows): expose element metadata and defer disabled-state rejection 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 36496e1495 feat(cua-windows): use UIA RuntimeIds as element identifiers 2026-11-10 23:13:40 +08:00
Huo Yaoyuan f5ceca4b1d feat(cua-windows): allow selecting unlisted executables by path 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 1374429891 feat(cua-windows): launch AUMIDs through Explorer with bounded observation 2026-11-10 23:13:40 +08:00
Huo Yaoyuan d0d24d7779 fix(cua-windows): separate default invocation from simulated clicks 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 80510f7543 feat(cua-windows): show patterns instead of actions in accessibility state 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 91f70db6a6 feat(cua-windows): expose native pattern actions 2026-11-10 23:13:40 +08:00
Huo Yaoyuan abb3c004d5 fix(cua-windows): use native control type names 2026-11-10 23:13:40 +08:00
Huo Yaoyuan 79d1dd8915 Merge pull request #8161 from deepseek-harness/feat/cua-windows-2
feat(cua-windows): 移植 Windows CUA provider 并接入 helper 打包
2026-11-10 23:13:34 +08:00
creatixchu 73303a3a01 test(web): prevent automatic paging before the turn navigation jump 2026-11-10 22:39:43 +08:00
creatixchu 2deb3189c6 Merge master and adapt scoped CUA replay to string window IDs 2026-11-10 22:38:49 +08:00
imccyu 37e0924f68 Merge pull request #8257 from deepseek-harness/ptc-scoped-repl-switch
feat(ptc): run the scoped REPL by default for persistent-in-memory execution
2026-11-10 22:34:59 +08:00
creatixchu 0874eb2217 fix(cua): retain macOS permission diagnostic process IDs 2026-11-10 22:22:09 +08:00
creatixchu f9fdb61ca9 fix(cua-macos): restore strict ready frame validation 2026-11-10 22:18:41 +08:00
zhc 5d42b877c1 refactor(ui-chat): 通过 useProjection 读取 workingDirectory
为 dsh-working-directory 增加仅含类型的 ./types 与 ./client 导出,
客户端可直接用 useProjection('workingDirectory')。撤回 ChatViewInjected.hooks.workingDirectory,
不再新增 ui-chat 公开接口,也无需升级指南。同步重新生成受行号影响的目录文档。

Refs #8267
2026-11-10 22:12:09 +08:00
creatixchu 5ce7c5b1f3 Revert Windows CUA checks in the PR workflow 2026-11-10 22:11:57 +08:00
zhc ac61f1175e Merge remote-tracking branch 'origin/master' into fix/chat-image-current-working-directory
# Conflicts:
#	packages/client/ui-chat/README.i18n.yaml
#	packages/client/ui-chat/src/client/chat/ChatView.tsx
#	packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
2026-11-10 21:56:12 +08:00
creatixchu dd23e7ae91 test(web): refresh CUA descriptions in the recommended plugin catalog 2026-11-10 21:54:51 +08:00
zhc 1fc30098af fix(ui-chat): 相对图片路径按 Session 当前工作目录解析
ChatView 的 fileImages 只用会话列表行的 cwd(创建时的工作区根目录),
cd 之后相对路径的 Markdown 图片解析到错误位置并 404。改为与文件链接一致:
通过 inject hooks 订阅 workingDirectory projection,未记录时回落到工作区根目录;
传给工具卡片的路径摘要 cwd 仍为工作区根目录。

Fixes #8267
Refs #6576
2026-11-10 21:51:22 +08:00
creatixchu c30a94a0c4 fix(cua): declare PID selectors, document Windows limits and check native PR builds 2026-11-10 21:41:16 +08:00
creatixchu 616dbd03bd fix(cua): preserve macOS process IDs in application discovery 2026-11-10 20:57:30 +08:00
gengruilin f96500740f fix(ui-primitives): open CJK strong emphasis before punctuation
The asterisk attention tokenizer only relaxed the closing side, so a
span such as `汉字**“…”**` kept its markers literal and its closer paired
with the next opener in the paragraph. Add the symmetric cjkStrongOpen
branch, cover both reported paragraphs in the markdown spec, add the
markdown-cjk-strong-open Web snapshot scenario, and document the rule
in the ui-primitives README.

Fixes #8259
2026-11-10 20:52:33 +08:00
creatixchu 3b8c672e6f test(web): keep image history paging independent of pointer scrolling 2026-11-10 20:35:19 +08:00
creatixchu 1a62850eec Merge master into Windows CUA branch 2026-11-10 20:21:17 +08:00
imccyu 58fa5606b7 Merge pull request #8202 from deepseek-harness/ptc-binding-copy
feat(ptc): Node PTC scoped REPL:跨调用按值拷贝顶层绑定,允许任意关键字再次声明
2026-11-10 20:11:45 +08:00
LegGasai 2ba494e533 refactor(llm): drop stale credential references from the llm-deepseek project 2026-11-10 20:08:25 +08:00
LegGasai 7b03477365 Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential 2026-11-10 20:00:23 +08:00
LegGasai d42563e4ba refactor(llm): publish DeepSeek route credentials through ctx.llm
`LlmAdapter.routeCredential(provider)` publishes the credential a route
currently sends: kind, resolved base URL, optional reference, a value-free
presence check, and per-endpoint grants carrying protocol headers, the bare
value, and an optional 401 invalidation. `LlmRuntime.routeCredential()`
forwards to the owning adapter.

`dsh-llm-deepseek` reads no credential: `resolveAuth(connection, endpoint)`
returns a grant or `undefined`, `missingCredential` names the failure, and
`credential` declares the publication. The route plugins own their
credentials through the new `dsh-credentials` reference helpers and the
account service's `resolveRequestCredential()`; the account route also owns
sign-out cancellation and registers a running-task report. The account
service inspects no Agents, drops its `dsh-agent` and `dsh-llm` peers, and
moves to `packages/account/`. The web providers consume route publications
and drop their dependencies on `dsh-llm-deepseek`, the route plugins, and the
Loader.

Documented in the Agent Note and the `llm-route-credential` upgrade guide.
2026-11-10 19:59:14 +08:00
Yichen Jiang c52a9b3b79 Merge remote-tracking branch 'origin/master' into feat/cua-mcp
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
2026-11-10 19:08:03 +08:00
imccyu c6ef2d17da fix(ptc): keep the runtime's own experimental warnings out of program output
The child filters Node's ExperimentalWarning for vm.USE_MAIN_CONTEXT_DEFAULT_LOADER
and stripTypeScriptTypes, which the runtime itself triggers; an environment
initializer that imports a module under the scoped REPL otherwise prints it into
the first call's output. Warnings that programs emit still print. The host strips
types without printing the stripTypeScriptTypes warning.
2026-11-10 18:52:20 +08:00
imccyu 561f7f1538 test(ptc): match scoped REPL filenames with platform paths
Scoped REPL programs are named resolve(<creation cwd>, '.ptc-repl-<n>.js'), so on Windows their stacks show backslash paths. Compare locations against the resolved filename instead of a hardcoded '/' separator, keeping the submission ordinal, line, and column checks.
2026-11-10 18:52:20 +08:00
imccyu 85120aaf4a docs(ptc): correct the vm-modules flag claim in the scoped REPL note
Both child launches pass --experimental-vm-modules, so a callback-based import could show only the short filename; the default path does not use one yet.
2026-11-10 18:52:19 +08:00
imccyu 1cf3217403 fix(ptc): align scoped REPL guidance and tests with inspect output
run_code now discards completion values for TypeScript runtimes, so the
scoped REPL guidance shares the inspect output sentence with the other
modes. Tests read the output field, cover environment initialization with
copied bindings, and the ptc-scoped-repl snapshot is re-recorded with
inspect output.
2026-11-10 18:52:19 +08:00
imccyu 26cd436b86 docs(ptc): fold the scoped-repl format into the protocol 3 upgrade guide
Master's unreleased ptc-bootstrap-protocol guide already covers protocol
version 3, so the scoped-repl format, the PtcProgramFormat member and the
dsh-ssh bootstrapHash step join it instead of a second guide. Re-record the
README, Note and guide translation pairs after the rebase.
2026-11-10 18:52:19 +08:00
imccyu 5a398a9990 feat(ptc): name scoped REPL programs as hidden files in the first directory
Each call's Script filename becomes <first working directory>/.ptc-repl-<n>.js.
No file exists at that path; the directory stays because Node's default loader
resolves relative import() specifiers from the filename.
2026-11-10 18:52:19 +08:00
imccyu ba4d01126c feat(ptc): start scoped REPL var redeclarations from the earlier value
A call that declares an earlier name again only with var now gets a var
copy of the earlier value, so a var declaration that does not run, after
a throw or in an untaken branch, keeps that value as a global var does in
Node's REPL. var count = count + 1 consequently adds to the earlier value.
A function of the same name in one call takes precedence over the var.
Update the model guidance, Agent Note, READMEs, and the ptc-scoped-repl
snapshot schema.
2026-11-10 18:52:19 +08:00
imccyu 793ce790a6 feat(ptc): add scoped REPL execution with copied top-level bindings
With replScoped: true, persistent-in-memory runs each call as a separate
VM Script in one retained context. Each call starts with copies of the
top-level bindings left by earlier calls, so a later call may declare any
earlier name again with any keyword while earlier functions and
still-running code keep their values. Results, top-level await, errors
and asynchronous failures follow the existing REPL evaluator; modules
load only through dynamic import(), resolved from the environment's first
working directory.

The control protocol moves to version 3; the upgrade guide covers
preinstalled bootstraps and the new PtcProgramFormat member. The Agent
Note records the decision and its comparison with node:repl and
vm-script, and the ptc-scoped-repl snapshot pins the model guidance.
2026-11-10 18:52:19 +08:00
CreatixChu b89adf637d Merge pull request #8251 from deepseek-harness/fix/cua-ax-zoom-result
fix(cua-macos): 复查窗口尺寸,避免 AXZoomWindow 已生效时误报失败
2026-11-10 18:33:30 +08:00
creatixchu 1aefd4de11 Merge master and migrate Windows CUA callers to explicit inspection 2026-11-10 18:24:02 +08:00
Yichen Jiang 2085a236cc fix(cua-mcp): refuse unlisted tools before the executor and release the Agent after a failed close
A `tools/call` that names anything but the listed `cua_run_code` registration or
`cua_reset` now fails as an unknown tool before it reaches the tool executor, so a
tool another row registers for the connection's Agent cannot be called without
being listed, and the sandbox-escalation refusal applies to every program call.
`dispose()` releases the connection's Agent even when closing the protocol server
rejects. The `cua_reset` description states that a running program is cancelled,
and an `isEscalationField` guard replaces the two type assertions.

Documentation follows the code: the README states that a Host without a provider
lists only `cua_reset`, that the Web plugin page hides the bundle while the Host
inventory still reports it, that the documented Codex configuration carries the
output budget, which client entries were exercised, that the sandbox root is the
client's launch directory, and that the registration's escalation guidance has no
effect in this profile. The unused `zod` dependency is removed.
2026-11-10 18:12:20 +08:00
creatixchu 1991fa2b22 fix(cua): address shared API, packaging and migration review 2026-11-10 18:10:43 +08:00
creatixchu fa7fb44c9a Merge remote-tracking branch 'origin/master' into fix/cua-ax-zoom-result
# Conflicts:
#	packages/experimental/cua-macos/native/README.i18n.yaml
2026-11-10 18:05:38 +08:00
CreatixChu badd971c14 Merge pull request #8236 from deepseek-harness/fix/cua-localized-app
fix(cua): 按安装路径复用本地化应用的运行进程
2026-11-10 18:01:40 +08:00
creatixchu 53c51d8590 fix(cua-macos): resolve the zoom window when its control role is unavailable 2026-11-10 18:01:14 +08:00
CreatixChu ffab25266c Merge pull request #8209 from deepseek-harness/feat/cua-explicit-inspect
feat(cua): 移除观察结果的自动输出,改用 inspect 显式展示
2026-11-10 09:53:58 +00:00
creatixchu 82c5faca9a test(cua-macos): exercise zoom and restore on an AppKit window 2026-11-10 17:49:17 +08:00
creatixchu ac84370afc fix(cua-macos): verify window resize after AXZoomWindow errors 2026-11-10 17:46:00 +08:00
creatixchu d5ebaae1b9 Merge remote-tracking branch 'origin/feat/cua-explicit-inspect' into fix/cua-localized-app 2026-11-10 17:39:34 +08:00
creatixchu 77c722d9e3 Wait for the sidebar tab to settle before measuring the reorder target 2026-11-10 17:37:55 +08:00
creatixchu 6e68211a28 Merge remote-tracking branch 'origin/feat/cua-explicit-inspect' into fix/cua-localized-app
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
2026-11-10 17:34:27 +08:00
Turtle 68c2cf069d fix(desktop): route Platform-page close through the page close path
Refs #8244
2026-11-10 17:32:32 +08:00
creatixchu 864cc97c99 Sync master after PTC inspect landed 2026-11-10 17:32:30 +08:00
_Kerman 9b0db4b152 Merge pull request #8154 from deepseek-harness/xtr/ptc-inspect-output
feat(ptc): 用 inspect 统一展示文本与图片
2026-11-10 09:30:01 +00:00
Yichen Jiang 50cf66138a test(scripts): pin timeoutOf in the reviewed dsh-timeout peer-required roster 2026-11-10 17:22:05 +08:00
creatixchu 9b28e62be3 Sync upstream Web replay fixes into CUA output cleanup 2026-11-10 17:20:02 +08:00
_Kerman a4e6f7ceea test(web): sync remaining PTC newline expectations 2026-11-10 17:18:59 +08:00
Turtle 3d445a7ce6 fix(desktop): close the window with Cmd+W from the Platform page
Refs #8244
2026-11-10 17:13:14 +08:00
Dudu-0223 c0037256e0 refactor(session): remove list tool work slicing 2026-11-10 17:09:37 +08:00
creatixchu 09559c405f fix(cua): recheck process ambiguity after application consent 2026-11-10 17:07:13 +08:00
creatixchu a5d0863db3 Merge remote-tracking branch 'origin/master' into fix/cua-localized-app
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
2026-11-10 17:03:25 +08:00
_Kerman f775b74795 fix(ptc): preserve line breaks before sandbox diagnostics 2026-11-10 17:02:36 +08:00
_Kerman 5de18e6090 fix(ui-tool): localize and validate compact image output 2026-11-10 17:02:36 +08:00
Dudu-0223 a1c3ddf821 test(session): complete shared-control CI fixtures 2026-11-10 16:52:41 +08:00
creatixchu 35fd76078f Sync upstream spill and snapshot expectations for inspect output 2026-11-10 16:52:21 +08:00
audit 7e49426ac1 refactor(tencent-meeting): fold the Tencent Meeting bundle into its plugin package
The bundle package inserted one row once #8080 composed the connector account surfaces in the Web app, so `@deepseek-ai/dsh-tencent-meeting-cli` becomes `@deepseek-ai/dsh-tencent-meeting` and inserts itself through its own `cordis.patch.yml`, as the MCP connectors and the self-inserting bundles on master do. The merged README, the connector group row, the package policies, the `skills` files exception, the Host solution, the generated catalogs, and the `tencent-meeting-skills` snapshot composition name the one package; the Web E2E installs the same directory.
2026-11-10 16:51:24 +08:00
audit ca8dbe2074 refactor(wecom): fold the WeCom bundle into its plugin package
The bundle package inserted one row once #8080 composed the connector account surfaces in the Web app, so `@deepseek-ai/dsh-wecom-cli` becomes `@deepseek-ai/dsh-wecom` and inserts itself through its own `cordis.patch.yml`, as the MCP connectors and the self-inserting bundles on master do. The merged README, the connector group row, the package policies, the `skills` files exception, the Host solution, the generated catalogs, and the `wecom-skills` snapshot composition name the one package; the Web E2E installs the same directory.
2026-11-10 16:51:07 +08:00
_Kerman 43dea0aa7a test(ptc): sync spill and mixed-mode newline expectations 2026-11-10 16:51:05 +08:00
creatixchu 55ad0f220b Include inspect newline expectations in CUA CI 2026-11-10 16:50:31 +08:00
creatixchu 947503cb2c Align spill and session expectations with inspect line endings 2026-11-10 16:50:05 +08:00
audit 540693c78f refactor(dingtalk): fold the DingTalk bundle into its plugin package
The bundle package inserted one row once #8080 composed the connector account surfaces in the Web app, so `@deepseek-ai/dsh-dingtalk-cli` becomes `@deepseek-ai/dsh-dingtalk` and inserts itself through its own `cordis.patch.yml`, as the MCP connectors and the self-inserting bundles on master do. The merged README, the connector group row, the package policies, the `skills` files exception, the Host solution, the generated catalogs, and the `dingtalk-skills` snapshot composition name the one package; the Web E2E installs the same directory.
2026-11-10 16:49:38 +08:00
creatixchu 5ee1c02eb8 fix(cua-windows): align provider, platform checks and replay with master 2026-11-10 16:47:17 +08:00
creatixchu 418f2ec405 Merge latest PTC inspect changes and align standalone CUA output 2026-11-10 16:40:06 +08:00
Dudu-0223 0013eaf0a3 fix(checks): preserve preset IDs in scope fixtures 2026-11-10 16:36:00 +08:00
_Kerman 7526051e60 test(ptc): sync artifact expectations with emitted newlines 2026-11-10 16:31:41 +08:00
Yichen Jiang 1adc552f86 refactor(cua-mcp): select the profile through a plain manifest
The launcher, the plugin manager, the CLI plugin command, and the bundle
manifest type return to master: `dsh.bundle.profile`, `shippedProfileTemplate`,
and `bundleProfileName` are withdrawn, and `cua-mcp` is no longer a required
startup entry. A profile manifest that lists `@deepseek-ai/dsh-cua-mcp` as its
only bundle is the whole setup; `loadProfile` already loads an existing
manifest without a template, and the installation ships the bundle, so no pnpm
or registry access is involved. The README documents that manifest for
installed users and for the Python runtime wheel, and states that layering the
bundle over `dsh-base` is unsupported because both compositions declare the
same row ids.

The optional-bundles spec and the Web preview-boot e2e name the standalone
bundle through a `STANDALONE_PROFILE_BUNDLES` constant instead of reading a
manifest field; the cua-mcp expected-output e2e writes the documented manifest
before starting the server. The Agent Note records the bundle-declared profile
as a considered alternative, deferred until CUA leaves experimental and a
`PROFILE_TEMPLATES` entry can provide the zero-step start.
2026-11-10 16:31:20 +08:00
Dudu-0223 cde825ee5e Merge remote-tracking branch 'origin/master' into codex/session-control-message 2026-11-10 16:30:26 +08:00
Dudu-0223 7804232a9c feat(session): add shared cross-session message control 2026-11-10 16:29:54 +08:00
Dudu-0223 e8273f6466 test(tools): include session list tools in catalog roster 2026-11-10 16:24:56 +08:00
Turtleandsjw1231 51951b1593 feat(llm): report the booted profile in the provider User-Agent
Co-authored-by: sjw1231 <77195784+sjw1231@users.noreply.github.com>
2026-11-10 16:19:32 +08:00
_Kerman 4e9adccec7 Merge branch 'master' into xtr/ptc-inspect-output 2026-11-10 16:18:34 +08:00
Dudu-0223 140547ca1f docs: regenerate module graph for session list tools 2026-11-10 16:15:56 +08:00
audit 44e1378407 refactor(feishu): fold the Feishu bundle into its plugin package
The bundle package inserted one row once #8080 composed the connector account surfaces in the Web app, so `@deepseek-ai/dsh-feishu-cli` becomes `@deepseek-ai/dsh-feishu` and inserts itself through its own `cordis.patch.yml`, as the MCP connectors and the self-inserting bundles on master do. The merged README, the connector group row, the package policies, the Host solution, the generated catalogs, and the `feishu-skills` snapshot composition name the one package; the Web E2E installs the same directory.
2026-11-10 16:11:01 +08:00
_Kerman c7f1da5531 docs(ptc): complete protocol 3 migration details 2026-11-10 16:07:14 +08:00
_Kerman 47fafbbfcb fix(ui-tool): show compact image references in code output 2026-11-10 16:07:14 +08:00
_Kerman 5fd443618f fix(ptc): preserve raw text and cross-realm image inspection 2026-11-10 16:07:14 +08:00
Dudu-0223 c41f0d1d10 feat(session): add read-only workspace and session list tools 2026-11-10 16:03:51 +08:00
Yichen Jiang 69ba85d878 Merge remote-tracking branch 'origin/master' into feat/cua-mcp 2026-11-10 16:03:41 +08:00
Dudu-0223 27a32189d3 fix(checks): preserve cordis preset identifiers 2026-11-10 16:02:57 +08:00
Turtle d79851e05d Merge pull request #8180 from deepseek-harness/feat/cua-run-code-standard
feat(cua): 为标准模式提供持久 cua_run_code 工具
2026-11-10 07:59:40 +00:00
creatixchu 12cec9d6cf fix(cua): 按安装路径复用本地化应用的运行进程 2026-11-10 15:48:42 +08:00
Yichen Jiang 9c1309c607 test(cua-mcp): keep the standalone bundle out of the Web preview toggles
The packed Web preview enables and disables every optional bundle to prove
each layer applies over the Web profile. @deepseek-ai/dsh-cua-mcp declares
`dsh.bundle.profile`, so it composes its own profile and never layers over the
Web profile: enabling it there duplicates its agent-preset registry row. The
preview-boot e2e now reads which optional bundles declare a profile from the
workspace manifests, keeps them out of the toggle list, and asserts that no
toggle targets them while the listing still carries their metadata.

The creation-recommendations Web fixture carries the new bundle's plugin
catalog entry, and THIRD_PARTY_NOTICES.md is regenerated for the dependency
list of the cua-mcp package.
2026-11-10 15:37:26 +08:00
turtle1999 a3316f7cc0 fix(cua): restore persistent PTC initialization guidance 2026-11-10 15:33:56 +08:00
winewill 8074bda9f4 feat(desktop): summarize Windows packaging parameters 2026-11-10 15:09:08 +08:00
Yichen Jiang 3d7923e3b1 build(forge-panel): declare the lens brand types as a dev dependency and timeoutOf as peer-required 2026-11-10 15:06:23 +08:00
Yichen Jiang aae5b719a9 docs(forge): document the extension API and replay a fixture extension
Add the forge subsystem's extension API section, README and cookbook
coverage, the generated Cordis, config, slot, and event catalogs, and a
recorded forge-panel e2e case that loads a fixture plugin registering a
lens, annotations, and every new slot.
2026-11-10 14:53:09 +08:00
winewill d28a0ed804 fix(desktop): verify long Windows paths with PowerShell 7 2026-11-10 14:43:34 +08:00
_Kerman b4e3e18867 docs(ptc): link the shared bootstrap upgrade guide 2026-11-10 14:40:43 +08:00
_Kerman 9eabcd03f9 test(ptc): trim redundant replay fixture changes 2026-11-10 14:40:38 +08:00
_Kerman 0a398c2968 refactor(ptc): require image dependencies for inspect 2026-11-10 14:40:31 +08:00
Yichen Jiang b60e5985ab feat(forge-panel): open the changes view to Client plugins with lenses, annotations, and slots
Provide ctx.forgeChanges, which mints and reads changes addresses, opens a
view in the shown Session, takes the titles of Host lenses, and registers
line annotation sources. The changes toolbar gains a lens menu that keeps
the files a chosen Host lens keeps, folds the hunks it is not about, and
folds into the More menu at level 2 while no lens is chosen; failed,
refused, and interrupted runs show a notice with a retry and a clear.

Five slots open the view to plugins: forge.changes.toolbar,
forge.changes.file.menu, forge.diff.line.annotation (keyed by source),
forge.diff.comment.actions, and forge.change-request.card.actions.
Annotations stack after the comment form, the browser drafts, and the host
threads of their last line, in the column of their side; none draw before
a section comes within reach, and maxAnnotationsPerFile bounds a file.
2026-11-10 14:33:33 +08:00
LegGasai f3b41679cd fix(forge): show a lost stream and sign-in as status rows where they apply
A lost panel stream and the sign-in banner showed only inside the change
requests section, which is absent while the Session binds no change request,
so most Sessions saw neither. A connection row now ends the Environment
section whenever the stream has ended, with Retry, since every forge row is
then out of date; the sign-in and failed-check rows head the change requests
section, which shows for them alone. A host's reason, and the checkout row's
Git failure, sit behind an info button that opens after 500ms of hover, on
keyboard focus, or on a press.
2026-11-10 14:30:31 +08:00
TurtleandZiyaZhang 4c453293c2 docs(automation): deliver every event candidate as a normal turn
Drop the read-only judging turn, the automation_notify tool, and the
card acceptance step, and send candidates from every source down one
delivery path.

Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com>
2026-11-10 14:27:30 +08:00
Huo Yaoyuan 01da025060 Simple readme and guidance 2026-11-10 14:24:55 +08:00
_Kerman 86984d8358 Merge branch 'feat/cua-run-code-standard' into xtr/ptc-inspect-output 2026-11-10 14:24:26 +08:00
LegGasai 85ebb18da5 feat(primitives): give PanelRow an optional detail line
A status row needs a second line under its title, such as what a failure
means or the command to run. The row grows to two lines with its icon level
with the first, and the trailing area and menu center on the row.
2026-11-10 14:24:03 +08:00
Huo Yaoyuan c6116ecdb4 Merge remote-tracking branch 'origin/master' into feat/cua-windows-2 2026-11-10 13:53:36 +08:00
_Kerman 0191dbb0cf refactor(ptc): collect nested images through custom inspection 2026-11-10 13:38:43 +08:00
LegGasai 91e3d3a6c6 refactor(panel): tie each card menu item to its action and drop leftovers
The change request card menu ran Ready for review for any id it did not name,
so a new item could reach it by mistake; each item now carries its own action.
The panel source's module comment no longer names the removed tab visibility
store, and the jobs tests lose the no-op openList left from the popover.
2026-11-10 13:38:04 +08:00
LegGasai 47f70995f7 fix(subagent): let ArrowDown reach an open switcher menu's rows
A switcher opened by keyboard before its catalog loaded kept focus on the
button, and a second ArrowDown changed nothing until the menu was closed and
reopened; on an open menu the key now moves focus into it.
2026-11-10 13:35:24 +08:00
Yichen Jiang 985471bdcf fix(cua-mcp): document client entries instead of generating them
`--print-client-config codex|claude-code|json` is withdrawn together with the
client-config module and the static `node:sea` import that told a single-file
executable from a script launch. The browser worker image packs every optional
bundle and registers no `node:sea`, so the Cloudflare preview packer failed to
load the bundle; the README now documents the Codex `config.toml` fragment, the
`claude mcp add-json dsh_cua` command, and the generic `mcpServers` entry with
the same timeouts, tool exposure, and output budget. The frontend accepts only
`--help` besides the profile selection, and the server owns its `dsh_cua` name.

The README names the macOS helper's prepared build directory relative to the
provider package instead of as a repository path, because the gitignored
`.build` directory does not exist on a clean tree and `verify-package-paths`
rejects the reference. The expected-output e2e asserts the profile manifest
after `initialize` instead of after a configuration print.
2026-11-10 13:32:36 +08:00
LegGasai 53221ac087 fix(panel): keep card expansion and the settled fold per Session
Hiding the panel unmounts its sections, so the change request cards and the
background jobs fold forgot what the user chose. Both choices now live in the
Session's section store, beside the jobs the user cleared; a card the user
never toggled still follows the default.
2026-11-10 13:31:42 +08:00
LegGasai 9acb1bc2dd fix(jobs): stop naming the job list after its section
The section's heading already names the region, so assistive technology read
"Background jobs" three times in a row.
2026-11-10 13:25:19 +08:00
LegGasai 81feedf2d7 fix(forge): start the local changes row's name with its visible text
Speech input names what a row shows; the button's name now begins with the
row's summary in every locale, followed by the line counts.
2026-11-10 13:23:34 +08:00
Yichen Jiang 0692b893ea feat(forge-panel): let plugins register filter lenses on the panel host
ForgePanelController.registerLens registers a lens as an effect of the
calling fiber. The extensions stream lists the registered lenses and the
annotation limit; changesLens classifies the files a changes view shows
with one lens, with progress frames, a deadline, a read budget, a result
bound, and kept results. Old sides read at the fork point, HEAD, the index,
the first chosen commit's parent, or the pull request's merge base.

Each panel entry reports a reviewRevision that grows with every
forge/review-changed, which also drops the kept threads, so writes by other
plugins show without a refresh.
2026-11-10 13:12:22 +08:00
Yichen Jiang 1c21aa20ea feat(forge): announce accepted review changes and name merge bases
Add the parallel forge/review-changed event, emitted after a review write,
a review submission, or a viewed mark the host accepted, so plugins and the
panel see changes made by any plugin. Add the optional ForgeProvider.mergeBase
and ForgeService.mergeBase, which a lens uses to read the old side of a
pull request's files; forge-github reads it from the second page of the
compare API, which lists no files.
2026-11-10 13:11:06 +08:00
Yichen Jiang 14b826f062 feat(cua-mcp): serve the cua_run_code registration through low-level handlers
The MCP server no longer carries its own cua_run_code schema and description.
Each tools/list reads the connection Agent's registration from the tool
registry and projects it onto the MCP tool, checked against the protocol's
tool type, so the provider's definition is the only source and `description`
is required as it declares. The projection omits the sandbox-escalation
fields `sandbox_permissions` and `justification`, and a call naming them is
refused before execution; every other argument reaches ctx.tools.execute
unchanged inside ctx.agents.withInitiator, so DSH validates arguments and
answers unknown names. The SDK's McpServer owns tools/list and tools/call
once a tool is registered on it, so both tools use the low-level Server
handlers; cua_reset keeps its hand-written definition.

The connection's Agent is created before the stdio transport opens, so the
first listing already carries its registration, and a creation failure exits
the process instead of retrying per call. The first result of an environment
now prefaces only the cua API reference; the execution rules travel in the
tool description. A Host without a provider lists only cua_reset.

The README and Agent Note record the measured client description budgets:
Claude Code 2.1.309 forwards the first 4,096 characters of an MCP tool
description, dsh-mcp-client forwards 20,000 intact, so the API reference
stays in the first result.
2026-11-10 13:00:41 +08:00
Huo Yaoyuan d4785e69c0 feat(cua-windows): select applications by AUMID 2026-11-10 12:55:39 +08:00
creatixchu c2aa91c1ab Merge updated PTC inspect implementation into CUA output cleanup 2026-11-10 12:35:50 +08:00
creatixchu 1ac170db78 Align CUA decision records with explicit observation output 2026-11-10 12:34:19 +08:00
creatixchu 5440d154f8 Document native and PTC output for CUA observations 2026-11-10 12:29:58 +08:00
LegGasai 39202d8b09 test(forge): open the overview scenario from the Session panel
The scenario master added opened the retired header button; the card now
lives in the Session panel.
2026-11-10 12:19:24 +08:00
_Kerman dad69a4636 docs(ptc): mark tool-specific output type adaptation 2026-11-10 12:17:50 +08:00
LegGasai 512b6f9c09 fix(forge): show the card's thread count and issue tooltips after 500ms
The overview rows the card gained on master sit in the Session panel, so their
informational tooltips follow the panel's 500ms hover delay.
2026-11-10 12:17:10 +08:00
LegGasai cc552c19de Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-10 12:15:01 +08:00
LegGasai beba76079e Merge remote-tracking branch 'origin/master' into feat/session-panel-sections
# Conflicts:
#	apps/web/tests/expected/forge-panel/local-and-pr.expected.md
#	apps/web/tests/expected/forge-panel/panel.expected.md
#	apps/web/tests/forge-panel.e2e.ts
#	docs/subsystems/forge.i18n.yaml
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/src/client/ChangeRequestCard.tsx
#	packages/experimental/client-ui-forge/src/client/DiffFile.tsx
#	packages/experimental/client-ui-forge/src/client/Forge.module.css
#	packages/experimental/client-ui-forge/src/client/ForgeTab.tsx
#	packages/experimental/client-ui-forge/src/client/mount.ts
#	packages/experimental/client-ui-forge/tests/change-request-card.client.spec.tsx
#	packages/experimental/client-ui-forge/tests/forge-tab.client.spec.tsx
2026-11-10 12:14:35 +08:00
_Kerman e335c7c8cf test(web): update PTC object output snapshots 2026-11-10 12:10:56 +08:00
Yichen Jiang 6c1f2b2ab6 Merge remote-tracking branch 'origin/feat/cua-run-code-standard' into feat/cua-mcp
# Conflicts:
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/src/tool-registration.ts
2026-11-10 12:10:14 +08:00
_Kerman 93ecacdb42 refactor(ptc): simplify inspect output instructions 2026-11-10 12:07:25 +08:00
_Kerman c205404fbb test(ptc): align fixtures with Node object formatting 2026-11-10 12:06:31 +08:00
LegGasai 4f797aaf28 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-10 12:00:45 +08:00
Yichen Jiang 3147ec1596 feat(cua-mcp): compose the profile standalone and initialize it from the bundle declaration
The cua-mcp bundle composes its profile from one insert over the empty root
instead of layering on dsh-base, so no model adapter, prompt-side tool,
telemetry, or session-management row loads; every row is a bundle dependency.
The bundle declares the profile through dsh.bundle.profile, and app-boot's
shippedProfileTemplate initializes a missing profile from that single shipped
bundle for `dsh --profile`, the CLI `dsh plugin` command, and the plugin
manager's pnpm path. The `dsh plugin enable|disable` subcommand is withdrawn.
2026-11-10 12:00:17 +08:00
_Kerman 5d0106771e fix(ptc): render inspected values with Node object formatting 2026-11-10 11:58:10 +08:00
creatixchu 5dbbf3a8cd Refresh CUA session replays for explicit inspection 2026-11-10 11:57:58 +08:00
creatixchu 7bba8aa868 Remove implicit observation output from the CUA object API 2026-11-10 11:57:34 +08:00
LegGasai 5db7347a83 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-10 11:57:20 +08:00
LegGasai 4884003c4e Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-10 11:50:13 +08:00
_Kerman cfc366a869 docs(ptc): keep known limitations in a compact list 2026-11-10 11:43:33 +08:00
_Kerman 7d57aa02c9 fix(cua): describe observation emission across execution modes 2026-11-10 11:43:29 +08:00
_Kerman 9e61299fdb fix(ptc): isolate image property descriptors from prototypes 2026-11-10 11:42:07 +08:00
LegGasai c53a83b281 test(forge): read the tree's thread count from its tooltip
The count moved from a native title to the shared tooltip, so the scenario
hovers it and waits for the tooltip.
2026-11-10 11:41:51 +08:00
LegGasai 84df5c452f refactor(jobs): name the stop control without an unreachable fallback
The stop tooltip renders only beside a running row's kill state, so its label
is always one of the three kill strings.
2026-11-10 11:36:44 +08:00
LegGasai 87ff49346d docs(forge): call the attention dot yellow where it was still red
The toggle's attention dot uses the warning color, but the change request
card description and the indicator's JSDoc still named it red.
2026-11-10 11:13:24 +08:00
LegGasai 8e86a8c85c fix(forge): show changes view tooltips after 500ms and crawl clipped tree names
Icon and info tooltips in the changes view wait 500ms of hover and still show
at once on keyboard focus. The file tree names only a renamed file's paths,
since the tree already shows each directory, and a clipped name crawls into
view on hover. The thread count, review time, and viewed shortcut hint move
from native titles to the shared tooltip.
2026-11-10 11:12:39 +08:00
turtle1999 d602624eb3 refactor(cua): isolate raw registration and simplify initialization 2026-11-10 11:11:58 +08:00
Yichen Jiang 6ebf030579 test(cua-mcp): read the accessibility tree before element clicks 2026-11-10 11:04:03 +08:00
LegGasai 4db43a3c2e fix(panel): show row tooltips after 500ms and crawl clipped names on hover
The checkout row's tooltips wait 500ms, a clipped branch name or job command
crawls into view like a session title, the job stop control gets the shared
tooltip, and the native titles that repeated row text are gone.
2026-11-10 11:03:08 +08:00
Yichen Jiang c86ba6a719 Merge remote-tracking branch 'origin/feat/cua-run-code-standard' into feat/cua-mcp
# Conflicts:
#	packages/core/tool-executor-ptc/README.i18n.yaml
#	packages/core/tool-executor-ptc/src/run-code.ts
#	packages/core/tool-executor-ptc/tests/run-code.spec.ts
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/README.md
#	packages/experimental/cua/README.zh.md
#	packages/experimental/cua/tests/run-code-composition.spec.ts
2026-11-10 11:01:38 +08:00
LegGasai d5dc50a75e fix(subagent): give the switcher menu's sidebar arrow the panel's treatment
The arrow in the breadcrumb switcher drops its hover fill and takes the
panel's 24px target with a glyph that darkens, keeping the menu's columns.
2026-11-10 10:59:40 +08:00
LegGasai 17bafd561e fix(jobs): let a press on the open chevron collapse its row
The open chevron's rotation painted it above the row button's overlay, so a
press on the chevron itself landed on a span and did nothing.
2026-11-10 10:58:54 +08:00
LegGasai 85416f643a fix(primitives): close a menu when another popup trigger opens
The shared context-menu button stops its pointer presses, so an open local
menu never saw them and stayed open beside the shared one; the activating
click now closes it in the capture phase.
2026-11-10 10:51:14 +08:00
_Kerman 4c55f03a57 refactor(ptc): share output entry byte accounting 2026-11-10 10:47:03 +08:00
_Kerman 2bedbf2f2b fix(ptc): align JSON inspection tests and failure handling 2026-11-10 10:45:41 +08:00
LegGasai de87d0b856 refactor(primitives): share the session title's hover marquee
The session row's crawl moves to ui-primitives as useHoverMarquee and
MarqueeText, so other rows whose single line clips can reveal it the same way.
2026-11-10 10:45:12 +08:00
Yichen Jiang 7d1d9c85c5 docs(cua-mcp): name the clients whose unattended runs need the allow consent mode 2026-11-10 10:40:10 +08:00
LegGasai 05ed06ebeb Merge commit 'e4ca2cd0e16' into feat/session-panel-sections
# Conflicts:
#	packages/client/ui-session-panel/README.i18n.yaml
#	packages/client/ui-session-panel/README.md
#	packages/client/ui-session-panel/README.zh.md
2026-11-10 10:36:02 +08:00
LegGasai f544556e0e fix(panel): show the toggle and working folder tooltips after 500ms of hover
Sweeping the pointer across the header or the Environment rows no longer
flashes tooltips; keyboard focus still shows them at once.
2026-11-10 10:33:54 +08:00
LegGasai 94afa1e029 fix(panel): hold the scrollbar 2px from the panel's end edge
A transparent end border over the panel's background keeps the bar off the
edge, as the sidebar does; the content keeps its width and 8px end inset.
2026-11-10 10:33:52 +08:00
turtle1999 6729530215 chore(cua): merge current application selection semantics 2026-11-10 00:01:53 +08:00
_Kerman b877eb6118 fix(ptc): render inspected values as lossless JSON 2026-11-09 23:45:27 +08:00
Yichen Jiang 2924feb621 docs(cua-mcp): state the measured first-result size and the manual permission grant 2026-11-09 23:45:07 +08:00
turtle1999 8a898cac60 refactor(cua): make native connections own input cleanup 2026-11-09 23:13:36 +08:00
Yichen Jiang 9b53900b1a test(cua-mcp): refresh the first-result reference for the AX read defaults 2026-11-09 23:10:08 +08:00
Yichen Jiang 8baf2dda45 Merge remote-tracking branch 'origin/feat/cua-run-code-standard' into feat/cua-mcp
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua-macos/README.md
#	packages/experimental/cua-macos/README.zh.md
#	packages/experimental/cua/README.i18n.yaml
#	packages/experimental/cua/src/config.ts
#	packages/experimental/cua/src/index.ts
#	packages/experimental/cua/src/tool-registration.ts
#	packages/experimental/cua/tests/run-code-composition.spec.ts
2026-11-09 23:06:51 +08:00
Yichen Jiang 7ed4b56940 feat(cua): serve Computer Use to MCP clients from the cua-mcp profile
Add @deepseek-ai/dsh-cua-mcp, an experimental optional bundle whose
profile frontend serves cua_run_code and cua_reset over MCP stdio to
Codex, Claude Code, and other harnesses. One connection owns one Agent;
programs run through ctx.tools.execute without a model step, the first
result carries the cua API reference, and screenshots are delivered as
the request version the program observed. DSH_CUA_CONSENT selects
unattended approval or client elicitation; --print-client-config renders
the client entry for the exact installation.

Supporting changes: dsh-cua gains a configured screenshotTarget and the
ctx.cuaPrograms reset/screenshot-target service, the PTC program-tool
factory exposes createRunCodeToolHandle with reset control, and dsh
plugin gains manifest-only enable/disable verbs for installed bundles.
2026-11-09 22:52:07 +08:00
turtle1999 26427a26e1 refactor(ptc): initialize each environment through a registered hook 2026-11-09 22:19:35 +08:00
_Kerman 9b3119f1f9 test(office): include PTC context images in visual checks 2026-11-09 22:06:24 +08:00
_Kerman 5bcee95efe fix(ptc): preserve automatic images for unadapted tools 2026-11-09 21:46:06 +08:00
_Kerman 8566fdb439 docs(ptc): complete runtime migration guidance 2026-11-09 21:42:31 +08:00
_Kerman fc251c7b4a fix(ptc): explain image omissions and align program guidance 2026-11-09 21:42:30 +08:00
_Kerman 4e976ee9a9 fix(ptc-runtime): retain inspected output across proxy and limit cases 2026-11-09 21:42:29 +08:00
LegGasai 2ce65c759f Merge commit '796d33c30ca' into feat/session-panel-sections
# Conflicts:
#	.agents/notes/implemented/feature/2026-10-09-forge-panel.i18n.yaml
#	docs/subsystems/forge.i18n.yaml
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/src/client/mount.ts
2026-11-09 21:18:17 +08:00
sjw1231 d0f26fd4fd test(snapshots): record NativeError identity on cua-ptc dispatch results
Refs #7869
2026-11-09 20:48:31 +08:00
sjw1231 fa82fe81b7 test(snapshots): refresh cua-native error identities after merging master
Refs #7869
2026-11-09 20:40:29 +08:00
sjw1231 bd27d339fb Merge remote-tracking branch 'origin/master' into claude/tool-errors-experimental-c89252
# Conflicts:
#	packages/experimental/cua/README.i18n.yaml
#	snapshots/session/cua-native/session.v4.jsonl
2026-11-09 20:38:55 +08:00
_Kerman dc240209e3 Merge origin/master into xtr/ptc-inspect-output 2026-11-09 20:27:19 +08:00
sjw1231 9f49397016 fix(plugin-market): declare only the codes plugin_market produces
plugin_market reads the market only through search and entry, which can
reject with unknown-index, invalid-index-url, fetch-failed, or
invalid-index; invalid-query cannot occur because the tool checks the
same page bounds first. PluginMarketError drops the mapped codes no tool
path produces (INVALID_QUERY, SETTINGS_UNAVAILABLE, DETAIL_UNAVAILABLE)
and maps only those four Remote codes; PLUGIN_MARKET_PLUGIN_NOT_FOUND
stays for the tool's own unlisted-bundle check. A tool-level test
covers a configured index URL with credentials.

Refs #7869
2026-11-09 20:26:44 +08:00
LegGasai de0e059367 Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-09 20:26:27 +08:00
_Kerman 69528e4e88 fix(ptc): preserve outer failure replacements when projecting images 2026-11-09 20:04:17 +08:00
_Kerman 069ba921dc docs(ptc): mark tool-owned image adaptation follow-up 2026-11-09 20:03:58 +08:00
turtle1999 f51d105817 refactor(cua): name standalone program configuration explicitly 2026-11-09 19:30:11 +08:00
turtle1999 5f7b65d2a6 test(cua): refresh plugin catalog text in creation replay 2026-11-09 19:22:24 +08:00
_Kerman 52f610de0f docs: refresh PTC runtime attachment dependencies 2026-11-09 19:17:09 +08:00
_Kerman 9f8fd9d800 test(ptc): cover image output policies and explicit recovery 2026-11-09 19:17:05 +08:00
_Kerman ac568aa2d2 fix(ptc): capture the native console without a module import 2026-11-09 19:16:59 +08:00
turtle1999 5dbc29e64e fix(cua): preserve the installed PTC bridge initialization path 2026-11-09 19:03:14 +08:00
_Kerman 20fbd860f8 fix(ptc): keep ordinary snapshots live-recordable 2026-11-09 18:53:04 +08:00
_Kerman 63705dd46c Merge origin/master into xtr/ptc-inspect-output 2026-11-09 18:42:00 +08:00
turtle1999 e4a2972627 chore(cua): merge current native window observations 2026-11-09 18:35:17 +08:00
turtle1999 f0e9dc1c92 fix(cua): support clean source runs and preserve per-mode guidance 2026-11-09 18:17:56 +08:00
_Kerman e1f0a36193 fix(ptc): preserve native console methods 2026-11-09 18:17:19 +08:00
_Kerman a03cf79fc7 Merge origin/master into xtr/ptc-inspect-output 2026-11-09 18:03:41 +08:00
winewill 0116485ca3 docs(desktop): clarify pre-login network deployment and acceptance 2026-11-09 18:02:01 +08:00
sjw1231 d2973c0581 fix(mcp): report structured output that violates the output schema as MCP_INVALID_RESULT
The SDK checks structuredContent against a tool's outputSchema after the
response arrives and reports a mismatch, a missing structuredContent,
or an uncompilable schema as a ProtocolError with the same JSON-RPC
codes a server would send, so the bridge classified them as
MCP_REQUEST_FAILED. The bridge now passes callTool a definition without
outputSchema and runs the same check itself with the SDK's Node Ajv
validator, reporting each case as McpToolError MCP_INVALID_RESULT; a
real-SDK protocol test covers a raw server that returns nonconforming
structured content.

Refs #7869
2026-11-09 17:58:53 +08:00
_Kerman 4510e1dc57 refactor(ptc): unify wire token parsing 2026-11-09 17:56:52 +08:00
sjw1231 95b08637ad fix(tool-terminal): reject a disabled background send as ToolArgsError
When enableRunInBackground is false the schema does not offer
run_in_background, so a model that passes it fails with ToolArgsError
INVALID_ARGS naming the configuration, like bash and pwsh, instead of
JobError JOB_BACKGROUND_DISABLED.

Refs #7869
2026-11-09 17:51:07 +08:00
zhc 891adb1c57 refactor(ui): rename model menu detail slot from page to pane
模型菜单二级位置在组件内部一直称为 pane,对外 API 统一改用同一术语:
- slot `conversation.input.model.page` → `conversation.input.model.pane`
- `openPage` → `openPane`,`ModelMenuPageRef` → `ModelMenuPaneRef`,`data-model-menu-page` → `data-model-menu-pane`
- `Pane` 中插件面板分支改为 `{ kind: 'detail'; pane }`
- Team 贡献组件 `TeamModePage*` → `TeamModePane*`,样式类 `.page` → `.pane`
- 同步 JSDoc、README(中英)、测试标题与文件名,重新生成 slot catalog
2026-11-09 17:50:38 +08:00
sjw1231 a10f0eb7a0 refactor(bash,pwsh): report a forced run_in_background as ToolArgsError
With enableRunInBackground: false the schema omits run_in_background, so a
forced value is an argument the model must drop. Report it as
ToolArgsError / INVALID_ARGS and keep the configuration name in the message.

Refs #7869
2026-11-09 17:44:51 +08:00
sjw1231 abbb742d19 refactor(tool-fs): use MODEL_DOES_NOT_SUPPORT_IMAGES for read_image model refusals
The subagent attachment path, session-controller, and client labels already
name this failure MODEL_DOES_NOT_SUPPORT_IMAGES. Rename the unreleased
ImageInputError code IMAGE_UNSUPPORTED_MODEL so one fact has one code.

Refs #7869
2026-11-09 17:44:48 +08:00
sjw1231 bb1c5afcb0 refactor(bash,pwsh): report unadvertised sandbox_permissions as ToolArgsError
Without a sandboxing executor the schema omits sandbox_permissions, so a
forced value is an argument the model must drop rather than an approval
that cannot be routed. Report it as ToolArgsError / INVALID_ARGS, matching
tool-fs, and keep SANDBOX_ESCALATION_UNAVAILABLE for compositions that lack
an approval service, calling Agent, or approval channel.

Refs #7869
2026-11-09 17:44:45 +08:00
_Kerman a2ea3970fd refactor(ptc): return ordered text and image output 2026-11-09 17:44:12 +08:00
winewill 0fa66b81f2 fix(desktop): let Windows network probes exit naturally 2026-11-09 17:42:36 +08:00
sjw1231 6d33e6e9d1 docs: regenerate Cordis catalog for PtcRuntimeError
Refs #7869
2026-11-09 17:42:09 +08:00
sjw1231 91a9ca82e5 feat(ptc-runtime-python): reject caller misuse with PtcRuntimeError
A call after disposal now rejects with PTC_RUNTIME_UNAVAILABLE, and an
unsupported timeout, a relative cwd, a missing sandbox policy, and an
invalid binding or error class reject with PTC_RUNTIME_INVALID_ARGUMENT,
matching the Node provider. Messages are unchanged; load-time
configuration errors and the fd-3 invariant stay plain errors.

Refs #7869
2026-11-09 17:42:08 +08:00
sjw1231 4dc50c135d chore(ptc-runtime): carry PtcRuntimeError from #8168
These six files match deepseek-harness#8168 at c9aa6745371 byte for
byte, so ptc-runtime-python can classify its runtime failures before
that pull request lands; whichever lands first makes this part of the
other a no-op.

Refs #7869
2026-11-09 17:28:04 +08:00
sjw1231 1f4642535d Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-11-09 17:24:34 +08:00
_Kerman 4f6ccd772d docs(ptc): shorten explicit output guidance 2026-11-09 17:19:55 +08:00
_Kerman 1fed265b3b fix(ptc): bound binary inspection and preserve failure output 2026-11-09 17:19:48 +08:00
sjw1231 25d43d319a test: record error identity in expected output and session snapshots
The dsh-badge expected test pins a skill tool failure, and the
cordis-inspect-liveness, cordis-inspect-timeout, and
workspace-dependencies recordings replay inspect and workspace
dependency failures. Their tool/result events now carry the
SkillError, InspectError, and WorkspaceDependencyError identity; the
model-visible text is unchanged.

Refs #7869
2026-11-09 17:06:19 +08:00
winewill 10ae2b3911 fix(desktop): address Windows boot runner review findings 2026-11-09 16:51:15 +08:00
sjw1231 f86265f1ca refactor(cua): use MODEL_DOES_NOT_SUPPORT_IMAGES for models without image input
The repository already names this condition MODEL_DOES_NOT_SUPPORT_IMAGES
in attachment rejections, client labels, and office tools, so the cua
screenshot refusal reuses it instead of a second code.

Refs #7869
2026-11-09 16:49:31 +08:00
sjw1231 aeee705349 docs: regenerate catalogs for review fixes
Refs #7869
2026-11-09 16:30:38 +08:00
sjw1231 f407fbd66c docs(plugin-manager): scope PluginManagerError to in-process callers
listPlugins and listBundles are Remote methods; the Gateway reports a
non-Remote failure as gateway/internal, so their @throws names the code
for in-process callers only. plugin_manager tool tests now assert the
profile read, lock timeout, and disposal codes through the registry, and
the atomic-write README no longer calls its family zero-dependency.

Refs #7869
2026-11-09 16:30:38 +08:00
sjw1231 688e7243e2 fix(ptc,extensions): keep distinct failures that settle after cancellation
run_code and host inspect queries no longer replace a runtime or
provider rejection with the cancellation reason: the cancellation itself
passes through for the registry to classify as ABORTED, a HarnessError
keeps its code, and any other rejection is still wrapped. Dynamic plugin
tools apply the same rule, survive Proxy values whose traps throw, and
read clone failure messages with toolErrorMessage. tool-executor-ptc
exports CodeRunErrorCode.

Refs #7869
2026-11-09 16:30:37 +08:00
sjw1231 514ceb0438 fix(plugin-market,skill): classify market and payload failures by their cause
pluginMarketToolError recognizes the market service's in-process
RemoteError by its declared plugin-market/* code instead of the
mechanism-internal remoteErrorOf. readPrimaryRuntime reports only a
missing runtime.json or invalid JSON as INVALID_PAYLOAD; other read
failures propagate and become PREPARATION_FAILED.

Refs #7869
2026-11-09 16:30:36 +08:00
sjw1231 4f62401683 fix(web,skill): report blank URLs and malformed skill names as INVALID_ARGS
Both are hand-checked argument constraints, like the blank web_search
query, so they throw ToolArgsError and gain the invalid arguments:
prefix. SkillError no longer declares SKILL_INVALID_NAME.

Refs #7869
2026-11-09 16:30:35 +08:00
sjw1231 a2a30e85a2 fix(mcp): report calls to a closed generation as MCP_SERVER_UNAVAILABLE
A tool of a closed connection generation stays registered until the next
re-sync, and the SDK refuses its new calls unsent; they now fail as
McpToolError MCP_SERVER_UNAVAILABLE instead of MCP_CONNECTION_CLOSED,
matching resource requests. A redacted request failure attaches no
cause, so unredacted upstream text does not survive in the cause chain.
The client entry exports McpToolError, McpLocalError, and their code
types.

Refs #7869
2026-11-09 16:30:34 +08:00
sjw1231 4eda73d1e2 docs: regenerate config catalog and module graph
Refs #7869
2026-11-09 16:29:02 +08:00
sjw1231 c9e8e267fe docs(upgrade-guide): record experimental tool error identity changes
Refs #7869
2026-11-09 16:29:01 +08:00
sjw1231 bbc0ab3049 docs(worktree): narrow WORKTREE_INVALID_ARGUMENT and note rebuilt subclasses
Refs #7869
2026-11-09 16:29:00 +08:00
sjw1231 dbe423e1ee feat(claude-code-mods): export ModUnansweredError
Refs #7869
2026-11-09 16:29:00 +08:00
sjw1231 65945ec65d fix(stagehand): validate arguments before acquiring a browser
Refs #7869
2026-11-09 16:28:59 +08:00
sjw1231 9a37ccab16 docs(cua): explain IMAGE_MODEL_UNSUPPORTED on NativeError
Refs #7869
2026-11-09 16:28:58 +08:00
sjw1231 5e5ef5091f refactor(experimental): let the registry classify caller cancellation
Cancellation thrown after the caller cancels is now a plain error named
AbortError, which the tool registry records as ABORTED, instead of a
HarnessError built with the registry's code. subagent-oar no longer
depends on dsh-tools, TOOL_ABORTED leaves the dependency policy, and
cua argument failures list one violation per issue again.

Refs #7869
2026-11-09 16:28:57 +08:00
sjw1231 996ed36e07 fix(liveshare): give each refusal one identity across guard and tools
A path outside the granted workspace is FsError FS_SANDBOX_DENIED
whether the guard or a confined tool refuses it, and a share that no
longer allows writing is LiveshareForkDeniedError
FORK_TOOL_NOT_PERMITTED like a lapsed fork permission. The module
contract now describes the structured denial, and the refusal table
follows the imports.

Refs #7869
2026-11-09 16:28:55 +08:00
_Kerman 1df83be8f6 docs(ptc): record explicit output and image ownership decisions 2026-11-09 16:20:40 +08:00
_Kerman 83e3d0ebc0 Merge remote-tracking branch 'origin/master' into xtr/ptc-inspect-output
# Conflicts:
#	packages/experimental/cua-macos/README.i18n.yaml
#	packages/experimental/cua-macos/README.md
#	packages/experimental/cua-macos/README.zh.md
#	packages/experimental/cua/src/api.ts
#	packages/experimental/cua/src/guidance.ts
#	packages/experimental/cua/src/types.ts
#	packages/experimental/cua/tests/api.spec.ts
#	snapshots/session/cua-native/system-prompt.expected.md
#	snapshots/session/cua-ptc/system-prompt.expected.md
#	snapshots/session/ptc-script-retained/system-prompt.expected.md
2026-11-09 16:17:18 +08:00
sjw1231 8b0d709104 refactor(office): address review on Office tool error classification
- Document the argument and filesystem failure text in the Model Experience
  section of the tool-office README.
- Pin the invalid arguments prefix with full-text assertions.
- Assert the OfficeKitError cause for an absent Office service, and check the
  agentless refusal in one execution.
- Keep OfficeToolError internal; the entry exports only its code type.
- Limit the OfficeKitError JSDoc to the wire and localization role of its code.

Refs #7869
2026-11-09 16:08:19 +08:00
gengruilin 45e1a25a09 Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-09 16:00:14 +08:00
gengruilin cff059e7ee Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-09 16:00:13 +08:00
gengruilin 37a0630893 Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-09 16:00:11 +08:00
gengruilin cba7b64a1b Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-09 16:00:10 +08:00
gengruilin 88fa0ec912 Merge branch 'feat/connector-accounts' into feat/mcp-oauth 2026-11-09 16:00:09 +08:00
gengruilin 9e56197ff1 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-11-09 16:00:08 +08:00
gengruilin 22718ecc58 Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-11-09 16:00:07 +08:00
gengruilin 37ba7132da Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-11-09 16:00:06 +08:00
gengruilin 6286ff831d Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-11-09 16:00:05 +08:00
gengruilin 3001b7e03b Merge branch 'feat/cli-account' into feat/upstream-skills 2026-11-09 16:00:04 +08:00
gengruilin 815cd2c841 Merge branch 'feat/connector-accounts' into feat/cli-account 2026-11-09 16:00:03 +08:00
_Kerman b98e3d070b feat(ptc): expose attachment IDs on program images 2026-11-09 15:58:33 +08:00
_Kerman 3dbe1c126f refactor(ptc): simplify image references and CUA bridge 2026-11-09 15:57:42 +08:00
turtle1999 b9966a12a6 feat(cua): expose persistent code tool outside PTC mode 2026-11-09 15:53:22 +08:00
_Kerman 4e72e43037 chore(ptc): align fixtures and docs with simplified image handling 2026-11-09 15:42:49 +08:00
LegGasai cfce16f1bf Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/subsystems/sandbox.md
#	docs/subsystems/sandbox.zh.md
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/README.md
#	packages/experimental/worktree/README.zh.md
#	packages/experimental/worktree/src/index.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/sandbox/sandbox-policy/README.i18n.yaml
#	packages/sandbox/sandbox-policy/README.md
#	packages/sandbox/sandbox-policy/README.zh.md
#	packages/sandbox/sandbox-policy/src/index.ts
2026-11-09 15:37:18 +08:00
sjw1231 08c155e145 refactor(office): record structured error name and code for Office tool failures
Office tool failures now throw HarnessError subclasses so tool/result keeps
error.name and error.code:

- OfficeKitError failures map to OfficeToolError OFFICE_* codes at the tool
  boundary, keeping the OfficeKitError as cause.
- A model route without image input is OfficeToolError
  MODEL_DOES_NOT_SUPPORT_IMAGES; oversized images are OFFICE_OUTPUT_TOO_LARGE;
  a remote workspace is OFFICE_UNSUPPORTED_REMOTE_WORKSPACE.
- Missing Agent, attachment store, or model route is ToolContextUnavailableError.
- Missing or non-regular inputs are FsError FS_NOT_FOUND / FS_NOT_REGULAR_FILE.
- Hand-checked argument rules are ToolArgsError INVALID_ARGS.
- Attachment store refusals keep their AttachmentError code.

Refs #7869
2026-11-09 15:27:37 +08:00
LegGasai b5c048eea8 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/experimental/worktree/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/session/working-directory/README.i18n.yaml
#	packages/session/working-directory/README.md
#	packages/session/working-directory/README.zh.md
#	packages/session/working-directory/src/index.ts
2026-11-09 15:20:13 +08:00
sjw1231 90e5e5eae9 docs(module-graph): record new dsh-error dependencies
McpLocalError, McpToolError, SkillError, WorkspaceDependencyError,
InspectError, PluginToolError, PluginManagerError, PluginMarketError,
PtcRuntimeError, and the atomic-write FileLockError extend HarnessError
from dsh-error, so their owning packages now depend on it.

Refs #7869
2026-11-09 15:14:32 +08:00
sjw1231 94f81843e5 docs: refresh generated catalogs for shifted source lines
Regenerated config, event producer and consumer, and persistence
catalogs; only source line references moved.

Refs #7869
2026-11-09 15:14:32 +08:00
sjw1231 6b3023d888 feat(ptc): give run_code and PTC runtime failures error codes
run_code argument checks now throw ToolArgsError (INVALID_ARGS),
including timeoutMs or sandbox_permissions passed to a runtime whose
schema does not expose them; a missing runtime, workingDirectory, or
sandboxPolicy throws ToolContextUnavailableError. CodeRunFailedError
gains CODE_RUN_UNAVAILABLE after executor disposal, keeping
CODE_RUN_FAILED as the default. A runtime
rejection without its own code becomes CODE_RUN_FAILED with the
rejection as cause; caller cancellation keeps the signal's reason.

The PTC runtime Service Definition adds PtcRuntimeError for contract
misuse: PTC_RUNTIME_INVALID_ARGUMENT, PTC_RUNTIME_UNAVAILABLE, and
PTC_RUNTIME_CONFLICT. The Node runtime throws it for invalid specs and
bindings, use after disposal, incomplete retained cleanup, concurrent
runs for one owner, and a retained environment under another sandbox
policy. dsh-ptc-runtime now declares @deepseek-ai/dsh-error.

Refs #7869
2026-11-09 15:14:31 +08:00
sjw1231 09bb00b640 feat(plugin-market): add PluginMarketError for plugin_market failures
Missing arguments and out-of-range pages now throw ToolArgsError
(INVALID_ARGS). RemoteError stays a plain Error, so the tool converts
every market service failure at its boundary into PluginMarketError:
each plugin-market RemoteError code maps to a PLUGIN_MARKET_* code with
the service message kept and the RemoteError as cause, an unlisted
bundle is PLUGIN_MARKET_PLUGIN_NOT_FOUND, other failures are
PLUGIN_MARKET_FAILED, HarnessErrors keep their identity, and
cancellation rethrows the signal's reason. The package declares
@deepseek-ai/dsh-error for HarnessError.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 255c58d8b0 feat(plugin-manager): add PluginManagerError and a coded lock timeout
plugin_manager argument checks now throw ToolArgsError (INVALID_ARGS).
Failures thrown outside a change result carry PluginManagerError:
PLUGIN_MANAGER_PROFILE_READ_FAILED when listPlugins or listBundles
cannot read the profile manifest, patches, version exemptions, or
installation manifest, and PLUGIN_MANAGER_UNAVAILABLE after disposal.

atomic-write now throws FileLockError (FILE_LOCK_TIMEOUT, naming
lockPath) when another writer holds the lock past the deadline, so
every withFileLock caller, including plugin_manager, reports a
structured lock timeout. Both packages depend on @deepseek-ai/dsh-error
for HarnessError.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 d015886ce6 feat(extensions): add InspectError and PluginToolError
cordis_inspect_query failures now carry InspectError codes for unknown
providers and methods, invalid input or output, a missing Client page or
registry disposal, the Client deadline, and Host provider failures
without their own HarnessError (INSPECT_FAILED, original error as
cause). Cancellation rethrows the signal's reason instead of a plain
cancellation message. tool-cordis reports a missing Agent or Loader as
ToolContextUnavailableError, malformed Config paging as ToolArgsError,
and an unknown entry id as INSPECT_TARGET_NOT_FOUND.

Tools a dynamic plugin defines through harness.defineTool now fail with
PluginToolError: PLUGIN_TOOL_FAILED for a thrown value, keeping its
message and any string code in the message, and
PLUGIN_TOOL_INVALID_RESULT for a non-JSON result. HarnessErrors and
failures after cancellation keep their identity.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 8ba7b65db3 feat(skill): add WorkspaceDependencyError for payload preparation
load_workspace_dependencies failures now carry WorkspaceDependencyError:
WORKSPACE_DEPENDENCY_INVALID_PAYLOAD for a missing, unreadable,
malformed, or inconsistent runtime.json and for missing or wrong-kind
payload entries and interpreter aliases; WORKSPACE_DEPENDENCY_UNSUPPORTED_PLATFORM
for another target; and WORKSPACE_DEPENDENCY_PREPARATION_FAILED for any
other filesystem failure, keeping the original error as cause. The
package now declares @deepseek-ai/dsh-error as a peer for HarnessError.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 5393d6d05b feat(skill): add SkillError for skill tool and provider failures
The skill tool now reports invalid names, unknown skills, and skills
excluded from model invocation as SkillError with SKILL_INVALID_NAME,
SKILL_NOT_FOUND, and SKILL_NOT_MODEL_INVOCABLE. Registry validation of
provider catalogs, candidates, loaded definitions, and runtime
registrations throws SKILL_INVALID_DEFINITION, and a host-filesystem
SKILL.md read that fails for a reason other than absence throws
SKILL_READ_FAILED with the system error as cause. Messages are unchanged.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 6b87d9ce22 feat(web): give web_search and web_fetch argument failures error codes
web_search query count and blank-query checks now throw ToolArgsError
(INVALID_ARGS), so their text gains the shared "invalid arguments:"
prefix. A blank web_fetch URL throws WebError with the existing
WEB_INVALID_URL code and keeps its message.

Refs #7869
2026-11-09 15:13:52 +08:00
sjw1231 274ca9ccb2 feat(mcp): classify MCP tool and resource failures
MCP tool and resource calls now fail with structured identity instead of
plain Error text. An upstream isError result throws McpToolError with
MCP_TOOL_ERROR; task-required tools and invalid results use
MCP_UNSUPPORTED_TASK_EXECUTION and MCP_INVALID_RESULT. SDK and JSON-RPC
request failures map to MCP_CONNECTION_CLOSED, MCP_TIMEOUT,
MCP_SERVER_UNAVAILABLE, MCP_INVALID_RESULT, or MCP_REQUEST_FAILED, with
the JSON-RPC or SDK code in the message. Redaction replaces only the
message and keeps name and code.

The SDK reports an aborted request as REQUEST_TIMEOUT, so the bridge
rethrows caller cancellation and connection-generation closure as their
own reasons before classifying. McpLocalError now extends HarnessError
with closed codes for closure, deadlines, credentials, instruction size,
and registration conflicts. An out-of-scope resource server fails as
ToolArgsError because mcp-resources cannot depend on mcp-client.

Refs #7869
2026-11-09 15:13:52 +08:00
Turtle 53472a92c2 fix(session-persistence-jsonl): detach listed headers from the listing cache
Document why revision-guarded header reuse is safe, return a copy of each
cached header, and cover cached unreadable logs and exact re-read counts.

Refs #8166
2026-11-09 15:11:11 +08:00
winewill 6f6c8f1400 feat(desktop): support Windows pre-login packaging runners 2026-11-09 15:10:31 +08:00
_Kerman 724e56b286 feat(ptc): unify explicit text and image inspection 2026-11-09 15:06:09 +08:00
sjw1231 9b4b278b3e fix(tools): classify cancellation thrown by a tools/execute wrapper
After caller cancellation, a tools/execute wrapper that throws the
caller signal's reason or an AbortError without HarnessError identity
now keeps its message and carries AbortError with ABORTED, or
ABORTED_BEFORE_DISPATCH when the body never started, matching a tool
body that throws the same value. A wrapper's HarnessError and other
failures stay unchanged. Browser tools that run behind such a wrapper
now report caller cancellation as ABORTED.

Refs #7869
2026-11-09 15:04:53 +08:00
sjw1231 d93a16ac33 refactor(experimental): import HarnessError from dsh-error
Every HarnessError import this branch adds now comes from the
dependency-free @deepseek-ai/dsh-error package, declared as a peer and
dev dependency with its tsconfig reference; dsh-llm peers added only for
the base class are dropped, and the dependency policy classifies the
dsh-error export once.

Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 de3370cfc8 refactor(experimental): keep error code lists off plugin entries
verify-plugin-entry-exports rejects new value exports from a plugin
entry, so the stagehand, cua-driver, subagent-oar, ralph, and worktree
entries export only their error classes and code types; the closed code
lists stay in internal modules and READMEs name the codes directly.
RalphError moves to its own module.

Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 da34438d1a docs: regenerate config and Cordis catalogs
Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 fa02022df3 chore(deps): classify HarnessError and tool error exports as peer-required
CUA and Liveshare now import HarnessError and the tool registry's error
classes at runtime; tool failures keep their identity only when these
resolve to the registry's own peer instance.

Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 da75bed05f test(worktree): cover classified and cancelled retained-artifact failures
Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 44b38cf775 refactor(cua): report request refinement failures with prettified issues
Refs #7869
2026-11-09 15:03:41 +08:00
sjw1231 686547b41f test(snapshots): record hook and cua error identities
Hook denials and blocks now persist HookError HOOK_DENIED / HOOK_BLOCKED
and cua refusals persist NativeError with their native codes on
tool/result; model-visible content is unchanged.

Refs #7869
2026-11-09 15:03:40 +08:00
Huo Yaoyuan a0f326da1d Fix lint of test 2026-11-09 15:03:15 +08:00
Turtle 4fb2e4d4fd perf(session-persistence-jsonl): reuse unchanged headers across listings
list() re-read and decompressed every Session's header frame, stat'ed each
file twice, and listed the corpus again for the historical fingerprint on
every call. The Web @ reference menu calls it per query, so a root with
about 4,000 Sessions waited about 450 ms each time.

Stat each generation once, reuse the header from the previous complete
listing while the file revision is unchanged, and compute the corpus
fingerprint from the same stat results.

Refs #8166
2026-11-09 14:52:05 +08:00
sjw1231 4f9699b726 test(liveshare): type asymmetric message matchers
Refs #7869
2026-11-09 14:52:04 +08:00
sjw1231 e1d409f7b2 docs(subsystems): note worktree and liveshare failure identities
Refs #7869
2026-11-09 14:52:04 +08:00
sjw1231 e327098b9e feat(cua-driver-native): add CuaDriverError for driver call failures
A failed native callTool now throws CuaDriverError CUA_DRIVER_FAILED
with the SDK error as cause, unless the call was cancelled, and a
result that is not JSON throws CUA_DRIVER_INVALID_RESULT.

Refs #7869
2026-11-09 14:51:46 +08:00
sjw1231 3e7c9118b1 feat(stagehand): add StagehandError and carry codes across the worker
Act failures, missing tabs, unclassified SDK failures, worker failures,
and drain failures now throw StagehandError with a closed STAGEHAND_*
code; StagehandDrainError becomes its subclass. Worker replies carry
name and code and the host rebuilds the same class. Arguments are
checked before dispatch and fail as ToolArgsError; a call without a live
Agent throws ToolContextUnavailableError.

Refs #7869
2026-11-09 14:51:46 +08:00
sjw1231 546237ff56 feat(browser-use-runtime): add BrowserSessionError for browser ownership failures
Foreign-Session tools, a reserved attached browser, a non-live owner, a
closing Session browser, and failed cleanup now throw
BrowserSessionError with a closed BROWSER_* code. A browser MCP call
without an Agent throws ToolContextUnavailableError, and a non-Error
abort reason becomes AbortError / ABORTED.

Refs #7869
2026-11-09 14:51:45 +08:00
sjw1231 f0e23def79 feat(tool-terminal): classify terminal tool failures
A missing agent or jobs service throws ToolContextUnavailableError,
empty type or sessionId throws ToolArgsError, disabled background sends
throw JobError JOB_BACKGROUND_DISABLED, and a cancelled foreground send
throws AbortError / ABORTED.

Refs #7869
2026-11-09 14:51:45 +08:00
sjw1231 067d7964e6 feat(tool-ralph): add RalphError and classify ralph failures
Provider, workflow, result, and round failures now throw RalphError
with a closed RALPH_* code; invalid objective and maxRounds throw
ToolArgsError; a missing agent throws ToolContextUnavailableError; a
workflow cancelled by the caller throws AbortError / ABORTED.

Refs #7869
2026-11-09 14:51:45 +08:00
sjw1231 2c45f0d705 feat(worktree): add WorktreeError for create_worktree failures
Invalid names and requests, existing branches or paths, locked
registrations, failed, oversized, or timed-out commands, and a disposed
service now throw WorktreeError with a closed WORKTREE_* code. The
retained-artifact wrapper keeps the name and code of a HarnessError it
wraps and keeps caller cancellation an AbortError. create_worktree
throws ToolContextUnavailableError without a calling agent.

Refs #7869
2026-11-09 14:51:45 +08:00
sjw1231 81d15eaa35 refactor(subagent-oar): make OarFailure a HarnessError with stage codes
OarFailure now extends HarnessError and maps each failure stage to a
closed code: OAR_RUNTIME_UNAVAILABLE, OAR_START_FAILED, OAR_TURN_FAILED,
OAR_ABORT_FAILED, OAR_DISPOSE_FAILED, plus OAR_INVALID_TASK for an empty
or non-text task. Startup cancelled by the caller throws AbortError /
ABORTED. subagent_oar throws ToolContextUnavailableError without a
calling agent and SubagentError UNSUPPORTED_CAPABILITY for a provider
that is not one-shot.

Refs #7869
2026-11-09 14:50:04 +08:00
sjw1231 e5e44f473e feat(liveshare): record structured identity on fork refusals
Fork and shared-session guards now return a denial with
LiveshareForkDeniedError and a FORK_* code instead of a bare string.
Inside the confined replacements, a target outside the grant or a share
that no longer allows writing throws FsError FS_SANDBOX_DENIED,
unconfinable arguments throw ToolArgsError, and a lapsed tool
permission throws LiveshareForkDeniedError FORK_TOOL_NOT_PERMITTED.

Refs #7869
2026-11-09 14:50:04 +08:00
sjw1231 4929e5fe64 feat(claude-code-mods): fail unanswered mod tools with ModUnansweredError
A call to a mod-registered tool that no tool.call hook answers now
throws ModUnansweredError / MOD_UNANSWERED instead of a plain Error, so
the failure is routable on tool/result. The message is unchanged.

Refs #7869
2026-11-09 14:50:04 +08:00
sjw1231 98e08f2fa2 feat(hooks): record HookError codes on hook denials and blocks
A PreToolUse deny now records HookError / HOOK_DENIED and a PostToolUse
block records HookError / HOOK_BLOCKED through the guard and
post-execute info contract. Model-facing reasons are unchanged.

Refs #7869
2026-11-09 14:50:04 +08:00
sjw1231 8421590853 refactor(cua): make NativeError a HarnessError and classify cua tool failures
NativeError now extends HarnessError and keeps its name and every native
and host code, so cua refusals reach tool/result as structured identity.
A missing Agent, attachment store, or model route throws
ToolContextUnavailableError; a model without image input fails with
NativeError IMAGE_MODEL_UNSUPPORTED; request refinements fail as
ToolArgsError; native cancellation after caller cancellation records
AbortError / ABORTED.

Refs #7869
2026-11-09 14:50:04 +08:00
Huo Yaoyuan a7ca24f16e Fix test failure after merge 2026-11-09 14:43:03 +08:00
Huo Yaoyuan 571e0e9f48 Merge origin/master into feat/cua-windows-2 2026-11-09 14:32:14 +08:00
gengruilin a5859c3fc4 fix(connector-account): inject Host callbacks, gate dialogs on the stream, and wrap narrow rows
The surfaces receive `start` and `cancel` callbacks that unwrap the Remote result in the apply closure instead of the Remote itself, as the client inject rule requires. An open confirmation disables its button under the same conditions as the section's buttons, and the activation prompt's Connect is disabled while the Host stream is down. The status row and its buttons wrap, so a long status or long button labels stay inside a narrow panel.
2026-11-09 14:21:58 +08:00
LegGasai 65f2344993 Merge commit '3778faaa5f2' into feat/session-panel-sections
# Conflicts:
#	apps/web/tests/subagent-conversation.e2e.ts
#	docs/subsystems/forge.i18n.yaml
#	docs/subsystems/forge.md
#	docs/subsystems/forge.zh.md
#	packages/client/ui-subagent/README.i18n.yaml
#	packages/client/ui-subagent/README.md
#	packages/client/ui-subagent/README.zh.md
#	packages/client/ui-subagent/src/client/SubagentHeaderLineage.tsx
#	packages/client/ui-subagent/tests/conversation-ui.client.spec.tsx
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/client-ui-forge/package.json
#	packages/experimental/client-ui-forge/src/client/mount.ts
2026-11-09 14:13:43 +08:00
Huo Yaoyuan 20a51d8806 Fix locale metadata 2026-11-09 13:54:01 +08:00
Huo Yaoyuan 0c2d8cb5b0 Merge origin/master into feat/cua-windows-2 2026-11-09 13:45:09 +08:00
sjw1231 c901372393 Merge remote-tracking branch 'origin/master' into refactor/tool-errors-agent
# Conflicts:
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-11-09 13:26:05 +08:00
sjw1231 87668346e1 test(remote-mock): resolve dsh-error from source in the proxy type check
RemoteError now imports dsh-error, and the virtual compile mapped only
the protocol's other dependencies to source, so it failed wherever
dsh-error had no built declarations.

Refs #7869
2026-11-09 13:25:31 +08:00
sjw1231 d5a2bd2b8b fix(command-goal): report corrupt goal state from /goal
The command mapped every GoalError to the generic invalid-command text,
so GOAL_STATE_CORRUPT lost its replay diagnostic. It now rethrows that
code so the command runtime reports the cause.

Refs #7869
2026-11-09 13:25:30 +08:00
sjw1231 5a8dc54372 fix(tool-ask-user,tool-workflow): classify argument and context failures uniformly
A timed ask_user_question timeout outside the range or a repeated
question id is a ToolArgsError, matching the schema's own rejection of a
fractional timeout, and a missing caller is a ToolContextUnavailableError.
A disabled run_in_background, which the schema omits, is a ToolArgsError
instead of reusing UNSUPPORTED_OPTION, whose meaning is an unsupported
agent() option.

Refs #7869
2026-11-09 13:25:29 +08:00
sjw1231 82c195c0f4 fix(plan-mode): report an unready plan reader as PlanModeError
planState() serves the /plan command, prompt assembly, the tool
admission predicate, and the service methods, so its readiness failure
is PlanModeError PLAN_STATE_UNAVAILABLE instead of the tool-only
ToolContextUnavailableError. The code set is a literal union documented
in place rather than a link to a module-local array.

Refs #7869
2026-11-09 13:25:28 +08:00
sjw1231 632f5b5b48 fix(subagent): stop reclassifying preset join failures
The registry's composeFrom failures are composition invariants, such as
a child joining twice, not an unavailable preset; wrapping them as
PRESET_UNAVAILABLE invited retries of a program error and hid the
original message. They now propagate unchanged. A child depth beyond the
safe-integer range is INVALID_DEPTH, so DEPTH_EXCEEDED keeps one name,
SubagentDepthError.

Refs #7869
2026-11-09 13:25:27 +08:00
_Kerman 78b7b27089 test(web): pace present replay for recorded throughput 2026-11-09 13:13:17 +08:00
Huo Yaoyuan 2a19020b37 Update helper matadata implementation 2026-11-09 13:00:57 +08:00
zhc 0c673d916f fix(ui): let model menu detail pages own focus and group semantics
- Pane 改为带 kind 标签的可辨识联合,ModelMenuPage 更名为 ModelMenuPageRef
- 二级页由页面自行设置初始焦点:Switch 新增 autoFocus/describedBy,Team 开关进页即聚焦并关联说明文字;owner 不再查找 [role="switch"]
- 二级页容器改用 role="group",菜单 surface 增加 data-model-menu 供测试定位
- 外部按下同时监听 pointerdown,覆盖 WebKit 触摸点击空白区域不派发 mousedown 的情况
- 删除 .page 中多余的 gap: 0
2026-11-09 12:57:10 +08:00
_Kerman b7a3fba945 test(ptc): derive migrated replay scripts from sessions 2026-11-09 12:56:55 +08:00
_Kerman 790991a6c0 docs(ptc): align inspection guidance and references 2026-11-09 12:56:55 +08:00
_Kerman 4f478969f5 fix(ptc-python): reject unsupported completion discard 2026-11-09 12:48:09 +08:00
_Kerman a2c69f36f7 fix(ptc): bump bootstrap output protocol revision 2026-11-09 12:48:09 +08:00
_Kerman e688c61aab fix(ptc): target program realms for console globals 2026-11-09 12:48:09 +08:00
_Kerman 71b5e93457 test(ptc): migrate remaining inspection consumers 2026-11-09 12:48:09 +08:00
zhc 2bab176b90 Merge remote-tracking branch 'origin/master' into design/model-picker-quick-controls 2026-11-09 12:46:52 +08:00
LegGasai 71b7f09cf0 Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-09 12:38:23 +08:00
_Kerman 0e12a87b02 test(ptc): update Python SDK inspection snapshot 2026-11-09 12:04:10 +08:00
_Kerman c1783e9dff feat(ptc): select program output with Harness.inspect 2026-11-09 12:00:07 +08:00
gengruilin c98d655006 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-11-09 11:53:49 +08:00
gengruilin ceb093e58e Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-11-09 11:53:48 +08:00
gengruilin 48bfe92295 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-11-09 11:53:33 +08:00
gengruilin 7fc950295c Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-11-09 11:53:32 +08:00
gengruilin b24b00f8e2 Merge branch 'feat/cli-account' into feat/upstream-skills 2026-11-09 11:53:30 +08:00
gengruilin 2dd3f8e783 docs(linear): leave the packages README word ceiling at 994
This takes back the ceiling raise from ddf6ed6a19a, so the shared `scripts/doc-budgets.manifest.json` matches master. The `connector/` row keeps `packages/README.md` at 1003 words, and `verify-doc-budgets` reports it over the ceiling.
2026-11-09 11:53:13 +08:00
gengruilin 7134083826 docs(tencent-docs): leave the packages README word ceiling at 994
This takes back the ceiling raise from af87e2d8f06, so the shared `scripts/doc-budgets.manifest.json` matches master. The `connector/` row keeps `packages/README.md` at 1003 words, and `verify-doc-budgets` reports it over the ceiling.
2026-11-09 11:53:12 +08:00
gengruilin e883ddd044 docs(notion): leave the packages README word ceiling at 994
This takes back the ceiling raise from e35c773aaa6, so the shared `scripts/doc-budgets.manifest.json` matches master. The `connector/` row keeps `packages/README.md` at 1003 words, and `verify-doc-budgets` reports it over the ceiling.
2026-11-09 11:53:11 +08:00
gengruilin 1a433d7fbe docs(packages): word the connector group row as the MCP connectors do
The `connector/` row in the package group table now reads the same in the CLI and MCP connector stacks, and the `packages/README.md` word ceiling stays at master's 994. With the row the file has 1003 words, so `verify-doc-budgets` reports it over the ceiling.
2026-11-09 11:52:56 +08:00
Huo Yaoyuan bf5406f53b Remove bad test 2026-11-09 11:32:50 +08:00
Huo Yaoyuan c47a667a9c Remove validation step 2026-11-09 11:31:46 +08:00
Anlai Lu 4eb64b67b1 fix(cua-windows): bind and verify helper packaging metadata 2026-11-09 10:47:31 +08:00
Anlai Lu 3d80f2774d feat(cua-windows): add helper packaging metadata 2026-11-09 10:32:42 +08:00
Huo Yaoyuan 3d5794a545 Add pipeline for CUA packaging 2026-11-09 01:28:33 +08:00
Huo Yaoyuan e9f96c2aa8 feat(cua-windows): implement WGC window screenshots 2026-11-09 01:12:37 +08:00
Huo Yaoyuan 05f557bbf6 Use string for window id 2026-11-09 00:41:55 +08:00
gengruilin 45a31a4973 refactor(linear): show the account through the connector account registry
The plugin registers its server account with `dsh-mcp-account`, which shows it through `ctx.connectorAccounts`; the account spec follows the registry's stream, and the Web connection test reads the shared section's `data-connector-account` attribute. The snapshot profile drops its `mcp-client-host` row because the manager creates its own client host. The package group table gains room for the `connector/` row.
2026-11-08 22:37:02 +08:00
gengruilin d68f01940f Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-08 22:36:56 +08:00
gengruilin 0f8930e341 refactor(tencent-docs): show the account through the connector account registry
The plugin registers its server account with `dsh-mcp-account`, which shows it through `ctx.connectorAccounts`; the account spec follows the registry's stream, and the Web connection test reads the shared section's `data-connector-account` attribute. The snapshot profile drops its `mcp-client-host` row because the manager creates its own client host. The package group table gains room for the `connector/` row.
2026-11-08 22:36:54 +08:00
gengruilin 9192879b81 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-08 22:36:47 +08:00
gengruilin 6ab1a67c72 refactor(notion): show the account through the connector account registry
The plugin registers its server account with `dsh-mcp-account`, which shows it through `ctx.connectorAccounts`; the account spec follows the registry's stream, and the Web connection test reads the shared section's `data-connector-account` attribute. The snapshot profile drops its `mcp-client-host` row because the manager creates its own client host. The package group table gains room for the `connector/` row.
2026-11-08 22:28:34 +08:00
gengruilin 0f78f1304a Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-08 22:28:13 +08:00
gengruilin 1dbb64d456 Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-08 22:05:57 +08:00
gengruilin 1a6660bc7e refactor(tencent-meeting): show the account through the connector account registry
The Host row registers its account runtime with `ctx.connectorAccounts`, keyed by the bundle package, and the presenter and tests use the connector account types; the Web connection test reads the shared section's `data-connector-account` attributes. The package manifests follow the root's version and published files.
2026-11-08 21:57:14 +08:00
gengruilin 9ca280a9e6 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-11-08 21:56:57 +08:00
gengruilin e7b915d8ae refactor(wecom): show the account through the connector account registry
The Host row registers its account runtime with `ctx.connectorAccounts`, keyed by the bundle package, and the presenter and tests use the connector account types; the Web connection test reads the shared section's `data-connector-account` attributes. The package manifests follow the root's version and published files.
2026-11-08 21:56:32 +08:00
gengruilin 79aa3e336a Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-11-08 21:56:15 +08:00
gengruilin ae1c86f2e0 refactor(dingtalk): show the account through the connector account registry
The Host row registers its account runtime with `ctx.connectorAccounts`, keyed by the bundle package, and the presenter and tests use the connector account types; the Web connection test reads the shared section's `data-connector-account` attributes. The package manifests follow the root's version and published files.
2026-11-08 21:39:38 +08:00
gengruilin b2078db4e0 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-11-08 21:39:22 +08:00
gengruilin e5f2f6c191 refactor(feishu): show the account through the connector account registry
The Host row registers its account runtime with `ctx.connectorAccounts`, keyed by the bundle package, and the presenter and tests use the connector account types; the Web connection test reads the shared section's `data-connector-account` attributes. The package manifests follow the root's version and published files.
2026-11-08 21:29:18 +08:00
gengruilin 854607d34a Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-11-08 21:28:50 +08:00
gengruilin c7ecd2452e Merge branch 'feat/cli-account' into feat/upstream-skills
The package's version and published files follow the root's current rules.
2026-11-08 21:09:56 +08:00
gengruilin 84a575cbe8 Merge branch 'feat/connector-accounts' into feat/mcp-oauth 2026-11-08 20:10:39 +08:00
gengruilin c86bf3bb9e Merge branch 'feat/connector-accounts' into feat/cli-account 2026-11-08 20:10:33 +08:00
gengruilin 3f718d826c refactor(connector-account): reconnect through the Remote stream and render each surface from its slot entry
The browser half no longer reopens a failed stream itself: `$stream` reconnects after a lost connection, and a stream that fails for good keeps the last accounts with their buttons disabled and logs a warning, as other client streams do. The not-running status, tag, detail, and Retry button, with their four shared strings, are removed.

Each surface is now one slot entry that reads the browser state and calls the Remote; the separate presentational components and their props types are removed.
2026-11-08 20:09:29 +08:00
Shigma 42f4c6c297 docs(app-boot): note config edits apply current overlays without HMR 2026-11-08 16:44:25 +08:00
Shigma 1a814aaab6 fix(hmr): dedupe overlay watches by real path and document overlay rereads 2026-11-08 15:42:54 +08:00
Shigma b40641aa5a feat(hmr): reload --patch overlay files with the profile 2026-11-08 15:04:12 +08:00
gengruilin e9897a830d refactor(mcp): show MCP accounts through the connector account registry and let the manager create its host
`ui-mcp-account` and its browser half are removed. The Host plugin `@deepseek-ai/dsh-mcp-account` keeps `ctx.mcpAccounts.register({ server, packageName, copy })` and registers each server's account with `ctx.connectorAccounts` under `mcp:<server>`: the manager's status and authorization decide the section, and connecting, cancelling, signing out, and retrying run through the manager on the Host, so `startAuthorization`, `cancelAuthorization`, and `signOut` no longer have a Remote.

The manager creates its `McpClientHost` at construction, so compositions load no `host: true` mcp-client row and the client's `Config` is the server configuration again.
2026-11-08 05:14:04 +08:00
gengruilin 3d9109ebc2 Merge branch 'feat/connector-accounts' into feat/mcp-oauth 2026-11-08 04:39:01 +08:00
gengruilin fcf5908ff7 fix(connector-account): keep the activation prompt while the account is connecting
An MCP server switched on connects before it reports that it needs authorization, so the prompt now waits while the account is checking or connecting and dismisses itself only once the account is connected, unavailable, or not running.
2026-11-08 04:36:33 +08:00
gengruilin 3f477d71f9 refactor(cli-account): show CLI accounts through the connector account registry
The connector account registry now holds every Plugins page account, so `ui-cli-account`, its `ctx.cliAccounts` registry, `cliAccounts` Remote, and browser half are removed. `CliAccountRuntime` implements `ConnectorAccountSource`, and the kit keeps only the CLI-specific types: `CliCommandFailure`, `CliAccountView` with the runtime's own phases, and `CliAccountDictionaries`. App plugins register their runtime with `ctx.connectorAccounts`.

The package map's word ceiling rises from 994 to 1004 for the `connector/` group row.
2026-11-08 04:31:51 +08:00
gengruilin f845f980d5 Merge branch 'feat/connector-accounts' into feat/cli-account
Files that list the CLI account package take the connector account side; the next commit removes the package.
2026-11-08 04:30:58 +08:00
gengruilin fadd1c2858 feat(connector-account): let an account source start its operation asynchronously
An MCP server's authorization starts only after the previous attempt's cleanup settles, so its source learns the operation identity after an await. `ConnectorAccountSource.start` may now return a Promise, and the registry's `start` answers once the source has the identity.
2026-11-08 04:15:16 +08:00
TurtleandElevator14B 3363375626 test(web): type-check the web_fetch failure row spec in the host program
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-07 23:25:25 +08:00
Turtle 1a59fee340 Merge remote-tracking branch 'origin/master' into turtle/fix-web-fetch-error-58da60e9770f
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>

# Conflicts:
#	packages/client/ui-tool/README.i18n.yaml
#	packages/client/ui-tool/README.md
#	packages/client/ui-tool/README.zh.md
2026-11-07 23:22:35 +08:00
TurtleandElevator14B c20a2bee3a feat(web-fetch-http): classify transport failures and show localized causes in the web_fetch row
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-07 23:12:28 +08:00
Huo Yaoyuan f8f57aa8e0 Fix OS check 2026-11-07 22:46:06 +08:00
Huo Yaoyuan f50feeef9f Align Windows local build 2026-11-07 22:23:13 +08:00
Huo Yaoyuan 5e75c3009f Switch back to .NET 10 2026-11-07 18:11:26 +08:00
Turtle 81ee68dfba fix(web): keep the clipboard fallback total and document its limits 2026-11-07 17:21:21 +08:00
Dudu-0223 df031369f0 refactor(ptc): classify run failures at the throw site
Move the runtime-kind to error-code mapping and recovery guidance out of
the CodeRunFailedError constructor into an exhaustive classifyRunFailure
switch in ptc.ts. The constructor now takes a CodeRunFailureCode.
2026-11-07 16:56:42 +08:00
Turtle adc9d1bf64 fix(web): fall back to execCommand when the clipboard write is refused
A refused navigator.clipboard.writeText (blocked permission, embedding
policy) returned false without trying the execCommand fallback, so copy
buttons did nothing. Fall through to the fallback and return focus to the
control afterwards.

Fixes #8123
2026-11-07 16:45:28 +08:00
Huo Yaoyuan e5ba59e751 Use System.CommandLine for entry point parsing 2026-11-07 16:43:27 +08:00
Dudu-0223 d1ac1fe119 fix(ptc): distinguish output failures from execution failures 2026-11-07 16:29:01 +08:00
Turtleandyudshj c2651ad028 feat(preview): show snapshot changes side by side with readable JSONL records
Co-authored-by: yudshj <16971372+yudshj@users.noreply.github.com>
2026-11-07 16:08:00 +08:00
Huo Yaoyuan 32209999ca Fix project structure 2026-11-07 15:37:44 +08:00
Huo Yaoyuan 662fb47ff2 Convert native helper to .NET Framework 2026-11-07 15:29:08 +08:00
LegGasai 6e638d05c8 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	.agents/notes/implemented/architecture/2026-11-03-session-workspace-root.i18n.yaml
2026-11-07 14:47:10 +08:00
LegGasai 7fce6bfcf2 fix(forge): mark change requests that need attention with a yellow dot
The toggle's mark asks for attention rather than reporting an error, so it
takes the warning color.
2026-11-07 14:46:36 +08:00
LegGasai 1e546c04a4 fix(forge): expand a change request card only when it is the Session's only one
With several bound change requests every card starts collapsed, even when just
one of them is open.
2026-11-07 14:46:34 +08:00
LegGasai 57a4261a58 feat(forge): mark changes with a stacked-files glyph
The local changes row, the change request's changes row and menu item, and
the changes view now share a new files-diff glyph: two stacked pages, the front
one marked with a plus over a minus.
2026-11-07 14:46:32 +08:00
LegGasai a44727c4e8 feat(working-directory): own the child directory decision in inherit
The subagent manager decided whether a child registers the checkout its
parent works in, reading the parent's anchors, containment, and header
from outside the directory service. inherit(agent, source, { cwd }) moves
that decision into the service: a source working in a registered checkout
other than the starting Session's original project passes it on through
relocate when the canonical cwd lies inside it; otherwise only the
directory is set. The manager resolves the directory before the provider
prepares, as before, and hands the same value to inherit afterwards.
2026-11-07 14:45:12 +08:00
Shigma 862e699e27 Merge remote-tracking branch 'origin/master' into chore/cordis-core-rc12
# Conflicts:
#	vendor/README.md
2026-11-07 14:18:03 +08:00
Shigma 5063a24531 Merge remote-tracking branch 'origin/master' into refactor/cordis-include-yaml 2026-11-07 14:16:23 +08:00
LegGasai 618d36e0bc Merge commit '75a2b9dc5c2' into feat/session-panel-sections 2026-11-07 14:04:44 +08:00
LegGasai 90b6be7a71 docs(panel): regenerate the slot catalog for the indicator owner props 2026-11-07 14:02:38 +08:00
LegGasai 137e7f2c34 test(panel): build the progress and running-dot fixtures from typed picks
Both fixtures asserted section props through unknown; each now picks the
fields its component reads.
2026-11-07 13:54:32 +08:00
LegGasai 70991aaf71 test(forge): record the plugin description that names the Session panel 2026-11-07 13:30:37 +08:00
LegGasai ca4ea95bd2 Merge commit 'c53823710c8' into feat/session-panel-sections 2026-11-07 13:29:24 +08:00
LegGasai 41a2af24e4 test(panel): open subagents from the Session panel in the remaining browser tests
The header's subagent count is gone, so these scenarios reach the catalog
through the panel section.
2026-11-07 13:18:17 +08:00
Huo Yaoyuan 6229d26d77 Commit missed pnpm lock 2026-11-07 13:17:06 +08:00
LegGasai 326f06159b test(panel): record the unavailable toggle in the Trajectory goldens
The Trajectory View has no Chat View beside it, so the toggle reports itself
unavailable there.
2026-11-07 12:49:23 +08:00
LegGasai 5175c04dda docs(jobs): record the job exit code in the subsystem page and catalogs 2026-11-07 12:36:56 +08:00
LegGasai 64b1c11c06 test(subagent): drop the removed footer props from the catalog fixture 2026-11-07 12:36:55 +08:00
LegGasai 2bedd73723 fix(forge): narrow a changes tab's navigation parameters
Depending on the Session panel brings other tabs' parameters into the union, so
the changes tab narrows it the way the other tab bodies do.
2026-11-07 12:36:54 +08:00
LegGasai 368f18624a fix(ui-sidebar-files): search the checkout a held query's pane moves to
master's workspace search keyed its running search and preferences by the
Session header directory, which never changes. The tree root now follows the
Session into another checkout, so a pane holding search text searches that
checkout with its own preferences when its tree restarts there, instead of
keeping results rooted at the previous checkout.
2026-11-07 12:32:40 +08:00
LegGasai fd305cb903 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/api/workspace-files/README.i18n.yaml
#	packages/api/workspace-files/README.md
#	packages/api/workspace-files/README.zh.md
#	packages/api/workspace-files/package.json
#	packages/api/workspace-files/src/index.ts
#	packages/api/workspace-files/tsconfig.host.json
#	packages/client/ui-open-in-app/src/client/context-menus.tsx
#	packages/client/ui-sidebar-files/README.i18n.yaml
#	packages/client/ui-sidebar-files/README.md
#	packages/client/ui-sidebar-files/README.zh.md
#	packages/client/ui-sidebar-files/src/client/FileNavigator.tsx
#	packages/client/ui-sidebar-files/src/client/FilesBody.tsx
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	pnpm-lock.yaml
2026-11-07 12:31:27 +08:00
LegGasai 283822be79 fix(panel): stop the docked panel above the composer stack
The composer seat fades and takes presses across the body's full width, so a
tall docked panel faded out at its end and its last rows could not be pressed.
2026-11-07 12:26:29 +08:00
LegGasai bee43f5c7e Merge commit '173499005d84c3b66639ff7e7303518aacf39c0e' into feat/session-panel-sections 2026-11-07 12:26:29 +08:00
LegGasai 2d237d0271 test(panel): cover shared tasks as a section, running dots, and nonzero exits in the browser
Recorded goldens change only for the new section, the toggle's running names,
and the job row's text order.
2026-11-07 12:26:23 +08:00
LegGasai d5cdd8598f fix(subagent): keep the tree's connectors on the panel's columns
The panel's rows moved their status glyph to the 14px column, so nested rows'
spine and branch lines follow it there.
2026-11-07 12:26:22 +08:00
LegGasai b0b991e968 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root 2026-11-07 12:04:38 +08:00
LegGasai 85006a2b10 fix(forge): let row and card More buttons follow the panel's row actions
The checkout and local changes rows render plain buttons in PanelRow's menu
column, and the change request card's More loses its tooltip and hover fill.
2026-11-07 12:02:35 +08:00
Huo Yaoyuan b42e744c3c refactor(cua): ignore native PID metadata in TypeScript
Remove PID fields and dependencies from TypeScript discovery, permission metadata and helper handshakes while preserving native implementations and responses. Accept unused response fields, select applications by provider ID, bundle ID or name, and update consumers, guidance and fixtures.
2026-11-07 12:02:29 +08:00
LegGasai 04015821e3 fix(jobs): give job rows the panel's columns and mark nonzero exits
Job rows take the two-line structure of subagent rows, with plain chevrons and
stop glyphs in the same trailing column, the same type sizes, and a working
hover fill. The fold chevron follows the settled count. The output panel takes
the density of a tool call's terminal card. A job that finished with a nonzero
exit code shows the warning dot.
2026-11-07 12:00:02 +08:00
LegGasai 235be2dd8e feat(jobs): report a process job's exit code on its view
A nonzero exit settles a process job as completed, and the code appeared only
in the free-text detail. JobOutcome and JobView now carry it as exitCode, which
the bash and PowerShell background producers fill in, so a reader can tell a
reported failure apart without parsing that text. Model-visible output is
unchanged.
2026-11-07 12:00:00 +08:00
LegGasai 655db2cf38 feat(panel): show a running dot on the panel toggle while the panel is hidden
Subagents and background jobs each register an indicator that shows a blue dot
with their running count for assistive technology while work runs and the panel
does not show it. The jobs indicator keeps the roster stream open while the
toggle is mounted. The forge attention mark takes the toggle's 6px dot, up from
a 3.6px core, and paints above the running dots.
2026-11-07 11:55:54 +08:00
LegGasai 75a89ddf6a feat(panel): show shared tasks as their own Session panel section
The shared task board leaves the Subagents section's footer for a section of
its own at order 250, with the panel's title and its progress in the title
control. Task rows and subagent rows now share the panel's columns, and the
Subagents section no longer reads Team facts, so the footer slot is removed.
2026-11-07 11:52:56 +08:00
LegGasai 1eb24252ad Merge the feat/session-panel head into feat/session-panel-sections 2026-11-07 11:41:36 +08:00
LegGasai 46aec91960 feat(panel): size toggle indicators to one dot and tell them whether the panel shows 2026-11-07 11:38:47 +08:00
LegGasai 18e532e37f fix(panel): let long section progress clip before the section title 2026-11-07 11:38:46 +08:00
LegGasai 97fef62e2f fix(panel): reserve the scrollbar column so the panel content keeps its width 2026-11-07 11:38:46 +08:00
LegGasai a5914fe929 fix(panel): align row actions on the trailing column without a tooltip 2026-11-07 11:38:45 +08:00
LegGasai 353184d6a6 Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-07 11:35:52 +08:00
Turtleandhuoyaoyuan 374ab6172a test(open-in-app): cover case-insensitive ELECTRON_RUN_AS_NODE removal
Co-authored-by: huoyaoyuan <5644458+huoyaoyuan@users.noreply.github.com>
2026-11-07 11:20:08 +08:00
Turtleandhuoyaoyuan a8ea5fcf81 fix(open-in-app): drop inherited ELECTRON_RUN_AS_NODE when launching apps
Desktop runs the Host with ELECTRON_RUN_AS_NODE=1. Launching VS Code or
another Electron editor inherited it, so the editor started in Node mode,
exited 1 and the open route returned 502.

Fixes #5686

Co-authored-by: huoyaoyuan <5644458+huoyaoyuan@users.noreply.github.com>
2026-11-07 11:09:43 +08:00
Yif d997111795 test(ui): preserve fixed team root width in label resize coverage 2026-11-06 23:20:48 +08:00
Yif de91b109bb refactor(ui): trim team menu guards and align row styling 2026-11-06 22:27:32 +08:00
Yif 38870162a1 fix(ui): align team settings width and Chinese switch copy 2026-11-06 21:28:14 +08:00
Yif 7e5f45c415 refactor(ui): narrow model menu changes to team settings 2026-11-06 20:33:45 +08:00
TurtleandElevator14B bf483abd12 test(snapshots): replay a web_fetch transport failure
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-06 19:34:48 +08:00
TurtleandElevator14B 2e65fefdd9 test(web-fetch-http): pin proxy failure text and document reason bounds
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-06 19:24:00 +08:00
gengruilin a8f3badfee feat(connector-account): add one Host registry and Plugins page surfaces for connector accounts
`@deepseek-ai/dsh-client-ui-connector-account` provides `ctx.connectorAccounts`, where CLI app plugins and MCP connectors register an account with its source, page operations, copy, and Host-side presentation, and the `connectorAccounts` Remote (`watch`, `start`, `cancel`). The browser half follows every account through one stream and renders each bundle's section, title tag, activation prompt, confirmation, and notice from the Host display; it opens authorization pages and reports notices only for the operations this browser started.

`dsh-api-remotes` mounts the generated Remote, `dsh-web-app` loads the package, LiveShare classifies the three endpoints as owner-only, and the client test runtime answers `connectorAccounts/watch` with no accounts.
2026-11-06 19:21:03 +08:00
Turtle d4066efe5e docs(notes): clarify stable API markers, checks, and pilot scope
Refs #8074
2026-11-06 19:13:07 +08:00
TurtleandElevator14B 38921fcac5 fix(web-fetch-http): bound the transport failure reason and own the test listener
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-06 19:04:52 +08:00
LegGasai 000f8fe736 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	.agents/notes/implemented/feature/2026-11-05-session-panel.i18n.yaml
#	docs/subsystems/slots.md
#	docs/subsystems/slots.zh.md
#	packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
2026-11-06 18:58:50 +08:00
LegGasai f28bb787a5 test(chat): type the catch-all renderSlot overrides that skip the aside 2026-11-06 18:57:14 +08:00
LegGasai 3500261d0d refactor(panel): mount the Session panel in the Chat aside
The panel now occupies `conversation.chat.aside` instead of a seat in the
Conversation shell, and `ui-conversation` returns to its master state: no
`conversation.session.panel` seat, no `layouts` source, no end-gutter
reports from the width controls, and the composer and viewport height
variables back on the scrollport.

Each mounted panel reports its Chat View's end gutter into the plugin's
state; the toggle reads the widest gutter of its Session and is unavailable
while no Chat View shows it. The overlay still closes once the gutter can dock
the panel or no Chat View shows the Session, and keeps the composition and
focus-return behavior.
2026-11-06 18:53:14 +08:00
LegGasai 6501670efc feat(chat): add the conversation.chat.aside slot with the end gutter
The Chat View renders one Session-level occupant in a zero-height layer at
the top of its frame, sticky inside the shared scrollport like the turn rail,
so the occupant stays in place while the transcript scrolls and inherits the
scrollport's composer and viewport heights. The `endGutter` owner prop is
half the width the frame leaves around the transcript column, computed from
the widths a ResizeObserver reports for the layer and the column, without
reading element geometry.
2026-11-06 18:46:53 +08:00
Turtle 0001e23ec9 docs(notes): propose stable API policy
Refs #8074
2026-11-06 18:45:43 +08:00
TurtleandElevator14B 02e5c89fdd fix(web-fetch-http): name the underlying cause of transport failures
Co-authored-by: Elevator14B <219823454+Elevator14B@users.noreply.github.com>
2026-11-06 18:29:53 +08:00
Yif 7cc5ed7ad5 test(ui): align recorded image previews with localized effort labels 2026-11-06 18:24:51 +08:00
LegGasai 3046be1b84 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 18:17:26 +08:00
LegGasai b57563d24e fix(panel): guard the row action hover override behind hover-capable input 2026-11-06 18:16:25 +08:00
Turtleandyudshj 3aee25862d ci(preview): link the snapshot diff page from the source chooser and harden it
Co-authored-by: yudshj <16971372+yudshj@users.noreply.github.com>
2026-11-06 18:15:52 +08:00
LegGasai c82739590a test(forge): expect the working folder row in the Session panel goldens 2026-11-06 18:12:04 +08:00
Huo Yaoyuan 8a5ebd2351 refactor(cua): derive NativeError from HarnessError
Use the shared coded-error base while preserving the NativeError constructor, name, code, message and cause. Add the error dependency, compiler reference and error-type assertions.
2026-11-06 18:07:56 +08:00
LegGasai d79991fdd0 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 18:04:24 +08:00
LegGasai ba1a12b72e fix(panel): keep the working folder separator out of the accessible text 2026-11-06 18:02:48 +08:00
sjw1231 de273ffe2d feat(typert): make RemoteError a HarnessError
RemoteError extended plain Error because dsh-llm, which owned
HarnessError, depends on dsh-typert-protocol. With HarnessError in the
dependency-free dsh-error package, RemoteError now extends it and keeps
its name, Remote code, details, and constructor, so a tool body that
throws one records name RemoteError and its code on tool/result.

An unknown or unloadable delegation preset therefore keeps the
registry's agent-preset/not-found or agent-preset/invalid identity, and
the subagent runtime no longer rewraps it as PRESET_UNAVAILABLE. Client
bundles inline dsh-error with the protocol layer; no client code
depends on HarnessError identity.

Refs #7869
2026-11-06 18:02:11 +08:00
sjw1231 1440cf2fb9 test(subagent-dsh-sdk): expect ToolArgsError for effort-only delegation
An effort-only route request now fails as ToolArgsError, whose message
carries the "invalid arguments:" prefix; the production-profile e2e
asserts that text and the recorded INVALID_ARGS identity.

Refs #7869
2026-11-06 18:02:10 +08:00
sjw1231 fda29f726d fix(user-questions): keep the answerer's message in PROVIDER_ERROR
Wrapping a non-HarnessError answerer failure replaced its message with a
generic sentence, so callers and the model lost the concrete reason,
such as a closed connection. The PROVIDER_ERROR wrapper now keeps the
original message and falls back to the generic sentence only for a
value that is not an Error.

Refs #7869
2026-11-06 18:02:08 +08:00
Yif 7e14cfcd6a test(ui): wait for resized effort controls to become hittable 2026-11-06 17:59:22 +08:00
LegGasai 139b7167b8 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
2026-11-06 17:57:10 +08:00
LegGasai dd6bf86410 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-11-06 17:57:04 +08:00
LegGasai a4dff7b27b Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-06 17:53:32 +08:00
Yif 53183d374c fix(ui): keep effort tag edge clicks out of the slider 2026-11-06 17:53:01 +08:00
LegGasai 775a411052 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/capability-seams.i18n.yaml
2026-11-06 17:52:22 +08:00
winewill 900a3d598b fix(desktop): defer installer completion through system menus 2026-11-06 17:47:04 +08:00
LegGasai b0700355a1 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 17:46:42 +08:00
LegGasai 3b68abbcd4 docs(panel): regenerate catalogs for the moved working directory declarations 2026-11-06 17:43:23 +08:00
LegGasai a3bf9a3dc1 docs: regenerate the module graph for the sandbox-policy and workspace-changes edges 2026-11-06 17:42:32 +08:00
LegGasai 90ed785683 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-06 17:42:29 +08:00
Huo Yaoyuan 50577597e9 feat(cua-windows): port Windows provider from old branch
Port the existing Windows CUA implementation from feat/cua-windows in deepseek-harness2 to the current branch, with adapters for the current app/window interfaces and Windows-only bundle activation. Retain the native Shell/UWP implementation for later interface work.
2026-11-06 17:40:53 +08:00
LegGasai 2c694cdf99 docs: regenerate the persistence catalog after the within move 2026-11-06 17:39:50 +08:00
LegGasai a18d40412a Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 17:36:54 +08:00
LegGasai eaae69bcad fix(panel): hide the working folder's parent when too little of it fits 2026-11-06 17:32:03 +08:00
LegGasai 1f33d5c722 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-06 17:27:40 +08:00
LegGasai d4eb3b049f Merge commit '7002b48547284397051f41a0f6a7801876b93288' into feat/session-panel-sections
# Conflicts:
#	packages/client/ui-session-panel/README.i18n.yaml
#	packages/client/ui-session-panel/README.md
#	packages/client/ui-session-panel/README.zh.md
2026-11-06 17:26:11 +08:00
LegGasai 50f161008d docs: regenerate the config catalog and event graphs after the within move 2026-11-06 17:25:17 +08:00
LegGasai ae0062cf14 feat(panel): show the working folder as name and parent, with flat row actions
The project row now shows the Session's current working directory from the
`workingDirectory` projection, falling back to the creation directory and then
the listing Workspace. It renders the folder name, then the parent folder in
tertiary ink with an ellipsis, and a tooltip naming the working folder with
its full path. `@deepseek-ai/dsh-working-directory/types` carries the
projection's type declaration for Client programs.

Row action buttons no longer draw their own hover or active fill on top of
the row highlight.
2026-11-06 17:25:06 +08:00
LegGasai a23f582932 fix(sandbox-policy): bound worktree maintenance by the source checkout
Removing a worktree on archive, restoring a removed one, and probing its
branch run Git in the recorded source repository, which contains the worktree
directory. With the workspace root following the Session into its worktree,
those commands were confined to the worktree itself: a process sandbox cannot
unmount the directory it binds, and cannot bind a directory that is gone, so
archive cleanup retained the checkout and the removed-worktree card never
appeared on Linux.

SandboxPolicyRequest gains a Host-only root override, honored by resolve and
prepare with the Session's mode and grants; the worktree service and the
forge panel request the source checkout for those operations.
2026-11-06 17:24:07 +08:00
LegGasai d6775c2d87 fix(workspace-root): validate the LSP root, drop the unread original directory, and repair CI inputs
Code Entropy review: SessionDirectories.original had no reader, and tool-lsp
read rootOf without the ensure validation its sibling consumers keep.

CI: the upgrade guide moves to the current v0.2.2-rc.1 directory; the
sandbox-policy test supplies a Git identity through the environment, since
its disabled global configuration left the CI runner none to infer; the
testkit directory fixture is exercised by its own spec; the sidebar-terminal
e2e expects new user terminals to start in the workspace root and to follow
a relocation, which is the behavior this stack ships.
2026-11-06 17:20:14 +08:00
Yif d1cfada9eb Merge master into design/model-picker-quick-controls 2026-11-06 17:19:55 +08:00
Yif 5c224fff4c feat(ui): make effort tags draggable with lightweight snapping
Keep model selection centered above the controls, preserve later navigation, release cancelled gestures, and cover raw effort submissions and pending-state stability.
2026-11-06 17:12:27 +08:00
LegGasai 173b629bdf Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 16:54:35 +08:00
LegGasai dbd69abfa1 fix(panel): measure adopted Sessions and keep the panel overlay transient
- The main width controls restart their measurement when the body adopts
  its first Session, so a Session opened from the blank home reports its
  gutter without waiting for a resize.
- ConversationLayout gains `shown`: the width controls report null when
  the body stops showing a Session, and a released Session publishes it
  as not shown before its layout is dropped. Layouts no longer outlive
  their Session's binding scope.
- The overlay follows its Session's layout and closes once the gutter can
  dock the panel or the body shows another Session, so it never reopens
  on its own.
- Escape is left to an input method composing text, and focus moves to
  the toggle when the panel hides while it holds focus.
- The client inject list names the context menu, Remote, and connection
  packages the panel reads, the README states Escape priority and the
  Chat-only gutter, and the Agent Note describes the turn rail as it is.
2026-11-06 16:52:50 +08:00
sjw1231 d212c0629a refactor(plan-mode,user-questions): import HarnessError from dsh-error
PlanModeError is the only base-class use this stack adds to plan-mode,
so the package depends on the dependency-free dsh-error instead of
reaching the base through dsh-llm; the user-questions test that builds
a foreign HarnessError imports it from dsh-error as a dev dependency.

Refs #7869
2026-11-06 16:46:33 +08:00
sjw1231 80c3a3fe09 refactor(plan-mode): keep the code list off the plugin entry
The plugin entry exports only the PlanModeError class and its code type;
the code list stays module-local in src/error.ts, so the entry adds no
value export that verify-plugin-entry-exports would reject.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 a528a6d33c feat(subagent): classify unavailable delegation presets
A fresh delegation whose selected preset is unknown or cannot load
received the registry's RemoteError, which is not a HarnessError, so
the tool result had no error.code. applyChildComposition now converts
that RemoteError into SubagentError PRESET_UNAVAILABLE, keeping its
message and the original as cause. Restoration still propagates it so
the manager reports NOT_RESUMABLE, and other mount failures are
unchanged.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 a2e31ad6f9 docs: regenerate catalogs for shifted source lines
The config, persistence, and event producer-consumer catalogs record
source line numbers that moved in the preceding error-code changes; no
persisted type digest changed.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 5157e3205a feat(user-questions): classify answerer failures and timed ask checks
An answerer failure that is not a HarnessError now rejects with
UserQuestionError PROVIDER_ERROR and keeps the original as cause, while
a coded HarnessError keeps its name and code. The timed
ask_user_question tool reports an invalid timeout as BAD_TIMEOUT, a
repeated question id as the new DUPLICATE_QUESTION_ID, and a missing
caller as CALLER_NOT_LIVE.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 5fe691f6e5 feat(team,goal,todo): code projection and argument failures
A failed Team or goal projection now rejects with TeamError
TEAM_STATE_CORRUPT or GoalError GOAL_STATE_CORRUPT, and GoalError
assigns its name literally. team_task_list cursor, limit, and filter
violations and todo_write content checks throw ToolArgsError; missing
callers throw ToolContextUnavailableError. todo_write violation
messages now name the offending item path.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 551e5ce51a feat(workflow): code workflow runs that end cancelled or failed
The workflow tool threw a plain Error when a foreground run settled as
cancelled or error, the most frequent uncoded workflow failure. It now
throws WorkflowError CANCELLED or the new RUN_FAILED code, and rethrows
the caller's abort reason when the calling step was aborted so the
registry records AbortError ABORTED. A disabled run_in_background is
UNSUPPORTED_OPTION, and a missing caller or jobs service is a
ToolContextUnavailableError.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 fdd2dcc7e8 feat(plan-mode): add PlanModeError for exit_plan_mode failures
exit_plan_mode threw plain Errors, so its most common failure, the user
choosing to keep planning, reached tool/result without an error.code.
PlanModeError carries PLAN_NOT_ACTIVE, PLAN_REVIEW_INTERRUPTED, and
PLAN_REVISION_REQUESTED. A plan without a leading heading is a
ToolArgsError, and a missing caller, user-questions channel, or
projection reader is a ToolContextUnavailableError.

Refs #7869
2026-11-06 16:46:32 +08:00
sjw1231 aa90f0be56 feat(subagent): attach SubagentError codes to delegation tool failures
Delegation, discovery, and control tools threw plain Errors for missing
caller context, invalid selections, depth limits, and corrupt or
unavailable child state, so tool/result records carried no error.code.
SubagentDepthError now extends SubagentError with DEPTH_EXCEEDED; new
SubagentError codes cover disabled or disallowed preset and model
selection, invalid depth and cwd, a missing working-directory service,
a failed join of the parent preset revision, and structured output
submitted with pending input. Missing callers and services use
ToolContextUnavailableError, and hand-checked route fields use
ToolArgsError. A corrupt cold-restore descriptor becomes NOT_RESUMABLE,
and the schedule tools read the delegation depth inside their error
mapping.

Refs #7869
2026-11-06 16:46:32 +08:00
winewill 57579a17ed fix(desktop): defer installer completion until native move returns 2026-11-06 16:43:58 +08:00
Turtleandyudshj ac96c518fb ci(preview): publish a snapshot diff page with each PR preview
Co-authored-by: yudshj <16971372+yudshj@users.noreply.github.com>
2026-11-06 16:31:24 +08:00
LegGasai 136087e1a5 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-06 16:29:03 +08:00
LegGasai 7b3efee4c2 refactor(working-directory): keep within out of the plugin entry
The plugin-entry-exports gate on master allows a function plugin entry to
export only what the Loader loads. within moves to an internal module the
service and its tests import; the subagent manager and its test fixture keep
a local lexical containment helper instead of a cross-package value import.
2026-11-06 16:28:16 +08:00
LegGasai 902c657a45 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	packages/experimental/worktree/README.i18n.yaml
2026-11-06 16:21:43 +08:00
gengruilin 699e26d27a Revert "test(linear): take the OAuth world and manager profile from dsh-mcp-testkit"
This reverts commit 31e186ba927. #5333 removed dsh-mcp-testkit and keeps
the OAuth world and the manager profile in the mcp-client and
mcp-manager tests directories, so the plugin spec imports them from
there again.
2026-11-06 13:02:20 +08:00
gengruilin 1c14a27cd1 Revert "test(tencent-docs): take the OAuth world and manager profile from dsh-mcp-testkit"
This reverts commit 5d35ff498e5. #5333 removed dsh-mcp-testkit and keeps
the OAuth world and the manager profile in the mcp-client and
mcp-manager tests directories, so the plugin spec imports them from
there again.
2026-11-06 13:02:06 +08:00
gengruilin 1814b85c2d Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-06 13:01:38 +08:00
gengruilin b83a0094c5 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-06 13:01:37 +08:00
gengruilin 068fd93959 Revert "test(notion): take the OAuth world and manager profile from dsh-mcp-testkit"
This reverts commit b7fbe69fd6a. #5333 removed dsh-mcp-testkit and keeps
the OAuth world and the manager profile in the mcp-client and
mcp-manager tests directories, so the plugin spec imports them from
there again.
2026-11-06 13:01:22 +08:00
gengruilin f77526508b Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-06 13:00:29 +08:00
LegGasai 8d602350d6 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 12:59:18 +08:00
gengruilin 2480c3d97f Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading
# Conflicts:
#	packages/mcp/mcp-client/package.json
#	pnpm-lock.yaml
2026-11-06 12:57:18 +08:00
LegGasai 5286026ec5 fix(panel): draw section titles in secondary ink at medium weight
Primary-ink titles read as one more row of content. Secondary ink at
medium weight sets them apart from the primary rows below and from the
tertiary counts and progress beside them.
2026-11-06 12:56:56 +08:00
gengruilin 14719bb5bf test(mcp): keep the OAuth world and manager profile in the MCP packages' tests
Remove the dsh-mcp-testkit package. The OAuth world returns to
mcp-client's tests and the manager profile to mcp-manager's tests, where
mcp-manager's OAuth spec imports the OAuth world by relative path as it
did before. The manager profile now also composes the `host: true`
mcp-client entry the manager injects. The package's registrations,
paths, and catalog rows go with it.
2026-11-06 12:53:03 +08:00
LegGasai 12088e7e04 test(web): open the hover-plus review scenario through the Session panel 2026-11-06 12:46:16 +08:00
LegGasai f646ed70e3 Merge branch 'feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
2026-11-06 12:37:53 +08:00
LegGasai 7eda9201fe Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-06 12:31:33 +08:00
LegGasai 3e36751821 feat(panel): put the forge row menus in the PanelRow menu slot
The checkout and local changes rows pass their More buttons to PanelRow's
menu slot, so they highlight as whole rows and reveal the button the same
way as the project row; the forge-specific reveal styles go away.
2026-11-06 12:19:34 +08:00
LegGasai 0976f07079 Merge branch 'feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
#	packages/client/ui-primitives/README.md
#	packages/client/ui-primitives/README.zh.md
#	packages/client/ui-primitives/src/PanelRow.tsx
#	packages/client/ui-primitives/tests/panel-row.client.spec.tsx
#	packages/client/ui-session-panel/README.i18n.yaml
2026-11-06 12:19:34 +08:00
LegGasai 7da5278653 feat(panel): highlight Session panel rows as a whole and reveal row menus
PanelRow gains a menu slot for row actions such as a More button, shown
on row hover, on focus inside the row, and while its menu is open, and
always without hover. A row with an action covers its whole width with
the action's button, and any row with an action or row actions fills as
a whole on hover and while one of its menus stays open, instead of
filling only the icon and text. The project row moves its More button
into the menu slot.
2026-11-06 12:10:29 +08:00
LegGasai b9677b53da test(web): drop the panel refresh buttons from the forge goldens 2026-11-06 12:00:06 +08:00
LegGasai d13649cca8 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections 2026-11-06 11:54:20 +08:00
LegGasai f7f1c538a4 feat(panel): refresh forge state automatically instead of on a button
The Environment and Change requests sections lose their refresh buttons.
The checkout row, mounted whenever the Session panel shows, refreshes the
Session's forge state when the panel opens and when the window regains
focus or becomes visible, at most once every 10 seconds per Session, so
changes made outside the Session appear on return. The change requests
title keeps its count, and the plugin's Plugins page description names
the Session panel instead of the retired sidebar tab.
2026-11-06 11:53:53 +08:00
LegGasai 0cf9619162 fix(panel): draw Session panel section titles in the primary text color
Section titles now read as headings in the primary text color, apart from
the secondary values and counts beside and below them.
2026-11-06 11:48:35 +08:00
LegGasai 08529b599c Merge branch 'feat/session-panel' into feat/session-panel-sections 2026-11-06 11:06:18 +08:00
LegGasai cc28ae1504 Merge remote-tracking branch 'origin/master' into feat/session-panel 2026-11-06 10:53:13 +08:00
gengruilin 75e8030b9c chore(tencent-docs): follow master's release version and payload files
Master moved the root version to 0.2.2-rc.1 and made packages publish
their source and declaration maps. The package now matches both.
2026-11-06 04:15:40 +08:00
gengruilin 58330bf9b9 chore(notion): follow master's release version and payload files
Master moved the root version to 0.2.2-rc.1 and made packages publish
their source and declaration maps. The package now matches both.
2026-11-06 04:15:40 +08:00
gengruilin 2f8623ec1b test(tencent-docs): load the MCP client host in the snapshot composition
The MCP manager now injects `mcpClientHost`, which an mcp-client entry
loaded with `host: true` provides. The snapshot composition inserts the
manager by itself, so it also inserts that entry; without it the manager
and this plugin stay pending.
2026-11-06 04:15:40 +08:00
gengruilin c89a3ae5bf test(notion): load the MCP client host in the snapshot composition
The MCP manager now injects `mcpClientHost`, which an mcp-client entry
loaded with `host: true` provides. The snapshot composition inserts the
manager by itself, so it also inserts that entry; without it the manager
and this plugin stay pending.
2026-11-06 04:15:39 +08:00
gengruilin 3e31b63081 chore(linear): follow master's release version and payload files
Master moved the root version to 0.2.2-rc.1 and made packages publish
their source and declaration maps. The package now matches both.
2026-11-06 04:15:26 +08:00
gengruilin ee72a0b61a test(linear): load the MCP client host in the snapshot composition
The MCP manager now injects `mcpClientHost`, which an mcp-client entry
loaded with `host: true` provides. The snapshot composition inserts the
manager by itself, so it also inserts that entry; without it the manager
and this plugin stay pending.
2026-11-06 04:15:25 +08:00
gengruilin 6b6280c2f1 test(linear): take the OAuth world and manager profile from dsh-mcp-testkit
The OAuth world and the manager profile moved from the mcp-client and
mcp-manager tests directories into dsh-mcp-testkit, whose manager
profile also mounts the MCP client host the manager now injects. The
plugin spec imports them from there instead of another package's tests
directory.
2026-11-06 04:01:20 +08:00
gengruilin 3aa66f4898 Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin
# Conflicts:
#	packages/README.i18n.yaml
2026-11-06 04:00:40 +08:00
gengruilin 4d1de40c97 test(tencent-docs): take the OAuth world and manager profile from dsh-mcp-testkit
The OAuth world and the manager profile moved from the mcp-client and
mcp-manager tests directories into dsh-mcp-testkit, whose manager
profile also mounts the MCP client host the manager now injects. The
plugin spec imports them from there instead of another package's tests
directory.
2026-11-06 03:58:55 +08:00
gengruilin 32e04d8ad8 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin
# Conflicts:
#	packages/README.i18n.yaml
#	pnpm-lock.yaml
2026-11-06 03:58:06 +08:00
gengruilin 3aad81b1f3 test(notion): take the OAuth world and manager profile from dsh-mcp-testkit
The OAuth world and the manager profile moved from the mcp-client and
mcp-manager tests directories into dsh-mcp-testkit, whose manager
profile also mounts the MCP client host the manager now injects. The
plugin spec imports them from there instead of another package's tests
directory.
2026-11-06 03:56:57 +08:00
gengruilin 09bc896a01 Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/README.i18n.yaml
#	tsconfig.base.json
2026-11-06 03:55:54 +08:00
gengruilin 29669c4d07 refactor(mcp-client): resolve on-demand tool loading through the host schemas
The server schemas moved to config.ts, where the MCP client host and the
entry share them, so `toolLoading` and `catalogDescriptionMaxLength`
join the stdio and Streamable HTTP schemas and input types there; the
merge already passes the manager entry's `toolLoading` to the host with
the other client fields. The tool-loading spec reads instance status
from the status module, as the entry no longer exports it, and the API
catalog records the two fields.
2026-11-06 03:52:38 +08:00
gengruilin 93e00db6eb Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-06 03:47:50 +08:00
gengruilin 1ae3e12fd9 fix(mcp-manager): validate client fields before reading the OAuth key
Entry validation reads `oauth.credentialKey` only after the MCP client
host has validated the entry's client configuration, and refuses OAuth
on stdio before parsing the key. A settings write whose `oauth` is not
an OAuth configuration is again refused by the schema naming
`servers.<name>.oauth`, instead of a TypeError from reading its key.
2026-11-06 03:35:14 +08:00
gengruilin 8d19b4c841 test(mcp): share the OAuth world and manager profile through dsh-mcp-testkit
The manager's OAuth tests imported mcp-client's OAuth world through a
relative path into another package, which the package surface rules forbid
for fixtures. The OAuth world and the manager profile fixture move into the
new test-support library @deepseek-ai/dsh-mcp-testkit. The MCP client and
manager tests import it by name, and both packages drop the development
dependencies that only the moved fixtures needed.
2026-11-06 03:19:21 +08:00
gengruilin 30086a0c0a refactor(mcp): reach mcp-client only through the MCP client host
The MCP manager imported validation, probe, status, and authorization values
from the mcp-client plugin entry and mounted its servers through a static
import of that entry. Plugin entries may export only what the Loader loads,
and the static references break source reloads: when mcp-client also has its
own Loader entry, a reload replaces only mcp-client, and HMR replaces the
instances the manager mounted without the manager knowing, so it keeps the
old code, reports stale status, and cannot stop the replacement instance.

An mcp-client entry loaded with `host: true` now provides
`ctx.mcpClientHost`. The host validates a server configuration through its
transport's own schema, so refusals still name the field; mounts instances
below its own Fiber; probes; and creates OAuth authorization owners from its
own context. The manager injects the host, imports only mcp-client types, and
passes `reconnect` and `oauth` to the host unresolved. Replacing the host
disposes its instances and restarts the manager against the replacement.

The Web composition mounts the host row before the manager. The entry stops
exporting probeServer, connectionStatusOf, assertTemplateSyntax,
resolveReconnectPolicy, ReconnectSchema, SERVER_NAME_PATTERN,
McpOAuthAuthorization, and OAuthSchema, and the plugin entry export list keeps
only createMcpToolDefinition for it.
2026-11-06 03:18:23 +08:00
gengruilin 67b937c7a7 chore(ui-mcp-account): follow master's release version, payload files, and zod
Master moved the root version to 0.2.2-rc.1, made Typert Remote packages
publish their source and declaration maps, and pinned zod to 4.6.6 across
the workspace. The package now matches all three.
2026-11-06 01:49:26 +08:00
gengruilin b0940dc2a1 Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-06 01:44:36 +08:00
LegGasai a2ff0fa3ed fix(web): keep change request flags whole in the Session panel
In the narrower Session panel the number line of a change request card
shrank its draft and status flags until CJK text broke between
characters; only the branch names now shorten. Ready for review gains an
icon so the card menu items share one text column.
2026-11-05 22:09:45 +08:00
LegGasai 483a2f497f test(web): open the Session panel reliably after a resize
showSessionPanel presses the toggle again until the panel stays visible,
since the gutter can read wide enough to dock while the layout settles
after a resize, and waits for the entrance animation before geometry
reads. dismissSessionPanel moves to the shared support module, and the
agent preset header test follows the toggle instead of the removed
subagent count.
2026-11-05 21:52:16 +08:00
LegGasai 60a88772d0 Merge remote-tracking branch 'origin/feat/session-panel' into feat/session-panel-sections
# Conflicts:
#	apps/web/tests/expected/sidebar-subagent-activity/compact-running.expected.md
2026-11-05 21:33:54 +08:00
LegGasai cae407c381 test(web): drive browser e2e through the Session panel
Forge, background-job, subagent, and shared-task scenarios open the
Session panel instead of the retired header controls and sidebar tab,
through shared showSessionPanel and dismissSessionPanel helpers. The jobs
popover layering scenario becomes a Session panel layering scenario, the
start-page review entry scenario is removed with its entry, and the
captured goldens follow the panel's sections.
2026-11-05 21:32:31 +08:00
LegGasai bbb44b9e36 fix(web): keep jobs and subagent behavior inside the Session panel
Cleared background-job rows live in a per-Session slot store, so they
stay hidden after the panel is hidden and shown again. A pinned subagent
switcher menu moves focus into its tree with the arrow, Home, and End
keys again.

Documents the jobs, subagents, and shared-task sections, the renamed
conversation.session.panel.subagents.footer slot, and the upgrade from
the header entries.
2026-11-05 21:32:19 +08:00
LegGasai 4f3b71a4e9 feat(web): move change requests into the Session panel
The forge panel's right-sidebar tab, its header button, and its start-page
entry are replaced by Session panel entries: a Change requests section
with its count and refresh, checkout and local changes rows plus a refresh
in the Environment section, and an attention mark on the panel toggle.
Change request cards keep their expandable rows and move their actions
into a More menu; Merge stays below the rows.

Environment rows receive the section owner values so a row that opens the
sidebar can close the overlay, and PanelRow gains an action label for its
button.
2026-11-05 21:32:00 +08:00
LegGasai e0ad8405df test(web): refresh goldens for the Session panel toggle
The Session panel toggle is the first Session header utility, so every
Session header ARIA golden gains its button ("Session panel", or the
localized name in the Chinese and Japanese cases) before "More actions".
2026-11-05 21:12:53 +08:00
LegGasai d9421f3e03 test(web): expect the turn rail at the scrollport start edge
The Session panel moves the turn rail from the end edge of the Conversation
scrollport to its start edge, leaving the end gutter to the panel. The
floating-controls geometry check now measures the rail's 12px inset from the
scrollport's start edge instead of its end edge.
2026-11-05 21:12:27 +08:00
Shigma 1b45ca1a9e docs(cordis): document isolate fallback and root symbol access 2026-11-05 20:34:44 +08:00
Shigma 798d3586bb test(cordis): cover rc.12 validation paths and fix serialized root access 2026-11-05 20:34:44 +08:00
Shigma 1511a6ed44 chore(cordis): upgrade core to 4.0.0-rc.12 2026-11-05 20:34:44 +08:00
LegGasai e7a1c26e04 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	apps/desktop-host/package.json
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/subsystems/sandbox.md
#	docs/subsystems/sandbox.zh.md
#	packages/api/terminal-controller/README.i18n.yaml
#	packages/api/terminal-controller/README.md
#	packages/api/terminal-controller/README.zh.md
#	packages/api/terminal-controller/src/index.ts
#	packages/client/tsdown.client.ts
#	packages/client/ui-open-in-app/src/client/index.ts
#	packages/client/ui-open-in-app/src/client/session-reveal.tsx
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/worktree/src/index.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/sandbox/sandbox-local/README.i18n.yaml
#	packages/sandbox/sandbox-local/README.md
#	packages/sandbox/sandbox-local/README.zh.md
#	packages/sandbox/sandbox-local/src/index.ts
#	packages/sandbox/sandbox-local/tests/local.spec.ts
#	packages/sandbox/sandbox-policy/README.i18n.yaml
#	packages/sandbox/sandbox-policy/README.md
#	packages/sandbox/sandbox-policy/README.zh.md
#	packages/sandbox/sandbox-policy/src/index.ts
#	packages/sandbox/sandbox/README.i18n.yaml
#	packages/sandbox/sandbox/README.md
#	packages/sandbox/sandbox/README.zh.md
#	packages/sandbox/sandbox/tests/roots.spec.ts
#	pnpm-lock.yaml
2026-11-05 20:34:00 +08:00
LegGasai 848f44ed06 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/src/index.ts
#	packages/experimental/worktree/tests/worktree.spec.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	snapshots/session/compaction-output-reserve/session.v4.jsonl
#	snapshots/session/compaction-summary-headroom/session.v4.jsonl
#	snapshots/session/model-switch-compaction/session.v4.jsonl
#	snapshots/session/working-directory-admission/session.v4.jsonl
#	snapshots/session/working-directory-consumers/session.v4.jsonl
#	snapshots/session/working-directory/session.v4.jsonl
#	snapshots/session/worktree/session.v4.jsonl
2026-11-05 20:10:37 +08:00
Shigma 967c74fda6 Merge remote-tracking branch 'origin/chore/cordis-rc12' into refactor/cordis-include-yaml
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/preset/agent-preset-registry/package.json
2026-11-05 19:43:19 +08:00
Shigma 1db003d8c0 Merge remote-tracking branch 'origin/master' into chore/cordis-rc12 2026-11-05 19:35:35 +08:00
Shigma 6d44ea055b refactor(cordis): migrate remaining Include-dialect YAML call sites 2026-11-05 19:29:17 +08:00
LegGasai 261f470411 feat(web): move background jobs and subagents into the Session panel 2026-11-05 19:25:15 +08:00
Turtleandstd4453 fa0b1522cb test(web): expect the fullscreen sidebar 1px past the left edge
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 18:41:39 +08:00
Turtleandstd4453 48f553578e Merge remote-tracking branch 'origin/master' into turtle/fix-sidebar-fullscreen-line-a73e32287f80
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 18:00:45 +08:00
Turtleandstd4453 e9591154b4 fix(sidebar-right): clip the fullscreen divider past the window edge
Make the fullscreen panel 1px wider than the viewport instead of hiding the
first column's divider with state-dependent rules. At rest the divider sits
past the left edge, where the frame clips it, and the pane's content box
matches the viewport; during the open and close slides the divider moves
with the panel and stays visible.

Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 17:57:11 +08:00
winewill eea6dfef87 test(snapshots): refresh terminal runtime context reminder 2026-11-05 17:55:24 +08:00
winewill fe91df778b test(ci): preserve worker limits with required publisher smoke 2026-11-05 17:49:30 +08:00
winewill 939d83ab9c fix(desktop): validate isolated publisher entrypoints and checkout boundaries 2026-11-05 17:45:31 +08:00
winewill af15cdf6c2 fix(desktop): clean owned Windows registrations on manual uninstall 2026-11-05 17:37:40 +08:00
LegGasai d9a0dbe996 Merge remote-tracking branch 'origin/master' into feat/session-panel
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-11-05 17:35:23 +08:00
LegGasai 96ce46c3d1 fix(web): use the menu corner radius for the Session panel 2026-11-05 17:27:28 +08:00
winewill 3e6916a2d3 refactor(desktop): isolate publisher workspace for lightweight rollout 2026-11-05 17:24:15 +08:00
LegGasai 968223aaa2 feat(web): add the floating Session panel
Add dsh-client-ui-session-panel: a Session header toggle and a floating
panel seated in the main Conversation body. Plugins register sections
(id, order, label) and title controls; the built-in Environment section
shows the project directory and accepts rows from other plugins.

The panel docks only while the transcript's end gutter can hold it; the
Conversation width controls report that gutter through
ctx.uiConversation.layouts. A narrower gutter hides it, and the toggle
then opens a transient overlay. The turn rail moves to the start edge.
2026-11-05 17:15:29 +08:00
Turtleandstd4453 4c3c789118 Merge remote-tracking branch 'origin/master' into turtle/fix-sidebar-fullscreen-line-a73e32287f80
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 16:48:49 +08:00
Shigma 0dd0bd18cd refactor(cordis): route Include-dialect YAML through Include exports 2026-11-05 16:26:40 +08:00
Turtleandstd4453 261a86a108 fix(sidebar-right): end the opening only with a docked item's slide
A short transition inside the panel ended the opening early, which cancelled
the delayed divider change mid-slide. A pane mounted by the opening also
starts with the divider now.

Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 16:17:02 +08:00
gengruilin 381e22c21c fix(linear): write the English bundle title in sentence case
The English title is now "Linear plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:54:33 +08:00
gengruilin d01692933e fix(tencent-docs): write the English bundle title in sentence case
The English title is now "Tencent Docs plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:53:45 +08:00
gengruilin 711ecfbd10 fix(notion): write the English bundle title in sentence case
The English title is now "Notion plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:52:18 +08:00
gengruilin f10a70f684 fix(tencent-meeting): write the English bundle title in sentence case
The English title is now "Tencent Meeting plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:51:30 +08:00
gengruilin 297fd5be61 fix(dingtalk): write the English bundle title in sentence case
The English title is now "DingTalk plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:50:42 +08:00
Turtleandstd4453 d1da247213 fix(sidebar-right): keep the fullscreen divider during the slide
The open and close slides move the fullscreen panel across the conversation,
so the first column keeps its divider until an opening slide ends and as
soon as a closing slide starts. Only the border color changes, so the pane
keeps its width.

Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 15:50:37 +08:00
gengruilin 6b8ec8952d fix(wecom): write the English bundle title in sentence case
The English title is now "WeCom plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:49:17 +08:00
gengruilin 3c78622b44 fix(feishu): write the English bundle title in sentence case
The English title is now "Feishu plugin": English copy, including plugin
titles, uses sentence case.
2026-11-05 15:47:49 +08:00
Yif 603c26a9d7 feat(ui): refine model picker motion and localized effort controls
Add localized effort labels and default explanations, animate the blue thumb center, and preserve focus and opacity while selections save.
2026-11-05 15:47:19 +08:00
Turtleandstd4453 8f00cc7f67 docs(sidebar-right): note why the fullscreen divider selector is longer
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 15:25:15 +08:00
Turtleandstd4453 e5e7944ff3 docs(sidebar-right): state the fullscreen divider reason for every platform
Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 14:49:20 +08:00
gengruilin 2dfddeaaca feat(linear): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected Linear account and a conversation that lists
Linear issues; the other six locales use the English document.
2026-11-05 14:45:04 +08:00
gengruilin 51e3d621e4 feat(tencent-docs): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected Tencent Docs account and a conversation that
creates a doc in Tencent Docs; the other six locales use the English document.
2026-11-05 14:42:26 +08:00
Turtleandstd4453 2718245916 fix(sidebar-right): drop the left divider in fullscreen
The first dock column draws a left border that separates the sidebar from
the conversation. Fullscreen has no conversation beside it, so the border
showed as a stray line at the window's left edge.

Fixes #7927

Co-authored-by: std4453 <13191718+std4453@users.noreply.github.com>
2026-11-05 14:42:06 +08:00
gengruilin 373cbe9773 feat(notion): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected Notion account and a conversation that searches
Notion pages; the other six locales use the English document.
2026-11-05 14:37:50 +08:00
gengruilin bfb72e157e feat(tencent-meeting): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected Tencent Meeting account and a conversation that
schedules a meeting; the other six locales use the English document.
2026-11-05 14:33:03 +08:00
gengruilin 579cf2c6b2 feat(dingtalk): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected DingTalk account and a conversation that lists
tomorrow's DingTalk events; the other six locales use the English document.
2026-11-05 14:29:38 +08:00
gengruilin 95336713d5 feat(wecom): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the authorized WeCom section and a conversation that adds a
WeCom to-do; the other six locales use the English document.
2026-11-05 14:26:22 +08:00
gengruilin 35e2afdfcf feat(feishu): show a feature preview on the bundle's Plugins page
The bundle's detail document is now a one-line feature preview, a
640x300 image in English and Chinese, instead of the developer README.
It shows the connected Feishu account and a conversation that creates
and shares a Feishu doc; the other six locales use the English document.
2026-11-05 14:19:02 +08:00
LegGasai e448da7597 fix(sandbox-policy): accept only Git's worktree layout when deriving writable Git directories
A checkout is writable under workspace-write, so its .git pointer is
untrusted on its own: a model could point it at the filesystem root and the
next derivation would grant it. The derivation now accepts only the layout
Git writes for a linked worktree: the pointer names <common>/worktrees/<name>,
whose commondir resolves to <common> and whose gitdir names the checkout's
.git again, with the common directory never containing the root. A root's
result settles once its layout was read, so a pointer written later changes
nothing until the Session enters a registered checkout; a derived directory
that disappears or cannot be inspected invalidates the result, and a failed
read is logged once per root. The policy text the model sees lists only
configured extra directories. Windows extra-root ACEs are revocable and
cleared with the other grants.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796703
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796714
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796766
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796722
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796732
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796802
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796813
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796833
2026-11-05 11:40:55 +08:00
gengruilin 771e00d29b feat(linear): show Linear's app icon on the Plugins page
The bundle card, its page, and its component row show Linear's official
app icon from its brand assets, scaled to the icon size and otherwise
unchanged. Linear's standalone mark is dark and disappears on the dark
theme.
2026-11-04 22:33:51 +08:00
gengruilin 28891ba7c2 feat(tencent-docs): show Tencent Docs' brand icon on the Plugins page
The bundle card, its page, and its component row show Tencent Docs' mark
from its official site instead of the default artwork.
2026-11-04 22:33:11 +08:00
gengruilin a87b6c366a feat(notion): show Notion's brand icon on the Plugins page
The bundle card, its page, and its component row show Notion's mark
from its official site instead of the default artwork.
2026-11-04 22:31:54 +08:00
gengruilin 82a19ead60 feat(tencent-meeting): show Tencent Meeting's brand icon on the Plugins page
The bundle card, its page, and its component row show Tencent Meeting's mark
from its official site instead of the default artwork.
2026-11-04 22:29:57 +08:00
gengruilin 2ca8d2c849 feat(dingtalk): show DingTalk's brand icon on the Plugins page
The bundle card, its page, and its component row show DingTalk's mark
from its official site instead of the default artwork.
2026-11-04 22:29:19 +08:00
gengruilin df9bf8b2ab feat(wecom): show WeCom's brand icon on the Plugins page
The bundle card, its page, and its component row show WeCom's mark
from its official site instead of the default artwork.
2026-11-04 22:28:38 +08:00
gengruilin 2f979a1c86 feat(feishu): show Feishu's brand icon on the Plugins page
The bundle card, its page, and the feishu component row show Feishu's
mark from its official site instead of the default artwork.
2026-11-04 22:19:35 +08:00
Yif 94829d14f3 feat(ui): add inline reasoning controls to model picker
Keep model and effort selection in the first-level menu, move Team settings into a detail page, and preserve keyboard focus during selection and pending saves.

Add localized effort tooltips, theme-stable slider thumbs, and focused keyboard and browser regression coverage.
2026-11-04 19:17:37 +08:00
LegGasai dac3cfc231 refactor(working-directory): single root accessor, extras helper, and review follow-ups
workingDirectory.recordedRootOf returns the recorded root without the
deployment fallback, so sandbox-policy and workspace-files share one
"root, else header, else own fallback" rule instead of comparing anchor
counts. dsh-sandbox exports additionalWritableRoots, the canonical extra
roots beside the workspace, which sandbox-local uses for ACEs and runner
arguments instead of slicing workspaceWritableRoots. sandbox-policy keeps
a local within and reads working-directory as a type-only dependency; its
derivation filter dedupes before dropping nested candidates. tool-skill
validates the directory before reading the root, as the other root
consumers do. The capability graph names api-workspace-files and
api-terminal-controller so their nodes link, the workspace-changes README
states the per-turn repository and root, the workspace-files solution
tsconfig keeps only its face references, and the terminal spawn comment
states that the root is read after validation.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796752
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796760
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796781
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796818
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796826
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796841
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796849
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796855
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796861
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7820#discussion_r4463796879
2026-11-04 18:09:50 +08:00
gengruilin d62fbf93b8 test(tencent-meeting): drop unused harness helpers
The harness loses byArguments, holdExit, and release, which no Tencent
Meeting test uses.
2026-11-04 17:38:59 +08:00
gengruilin 810fc1bf30 test(wecom): prove stderr links are never offered, and drop unused harness helpers
The stderr line now carries a different trusted link, and the test records
every offered link, so accepting stderr output fails it. The harness loses
byArguments, holdExit, and release, which no WeCom test uses.
2026-11-04 17:38:59 +08:00
gengruilin c3d5b51743 fix(upstream-skills): validate prefixes at load and refresh skills another process published
A skillsUrls value that does not parse as a URL now fails the configuration
instead of aborting the download loop, skillsTimeoutMs must be whole
milliseconds, and each failed prefix is logged in full so prefixes on one
host stay distinguishable. A download that fails after another process
published the directory invalidates the skill list, so the entry is listed.
The timeout test gives the mirror three seconds.
2026-11-04 17:38:58 +08:00
gengruilin 5c08b138f2 docs(tencent-meeting): name the CLI path runtime context in the bundle README
The bundle README's Model Experience now lists the tencent-meeting row's CLI path
runtime-context entry beside its skill catalog entry and loaded skill body.
The workspace-constraints comment says the package ships only the entry
skill, because the Tencent Meeting guides it indexes are downloaded at load.
2026-11-04 16:30:52 +08:00
gengruilin 46f655614d docs(wecom): name the CLI path runtime context in the bundle README
The bundle README's Model Experience now lists the wecom row's CLI path
runtime-context entry beside its skill catalog entry and loaded skill body.
The workspace-constraints comment says the package ships only the entry
skill, because the WeCom guides it indexes are downloaded at load.
2026-11-04 16:30:50 +08:00
gengruilin 15622f9515 docs(upstream-skills): document staging leftovers, unchecked published files, and --url
The Known Limitations now state that a process exiting mid-write leaves its
staging directory, and that only the published directory's existence is
checked. The digest script's usage line and the README name --url and its
default. The unsafe-path test title states what it asserts.
2026-11-04 16:30:30 +08:00
LegGasai bb078f4e2b fix(workspace-files): expose the Session scope as a service method and repair the consumer gates
ui-deliverables and the desktop host resolve a Session's workspace file
scope through workspaceFiles.scopeOf instead of a cross-package value
import, which the dependency policy refuses for a client-host package; the
two type-only peers of workspace-files become devDependencies. The
sidebar-files fixture builds a complete SessionListState instead of an
unknown assertion, and the testkit directory fixture reports no anchor for
a Session without a recorded directory, so the sandbox policy falls back to
its configured root as the real service does.
2026-11-04 15:59:59 +08:00
LegGasai c65519b92a Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-04 15:49:56 +08:00
LegGasai 3d3f1bd170 test(snapshots): price a fixed-length root in every compaction scenario
The three compaction scenarios that cd outside the root now print a
Workspace root line, so their shadowed token count followed the length of
the platform's temporary directory. They share the fixed-length temporary
root compaction-recovery already used; their fixtures are refreshed to the
platform-independent count. The Web controller's canonical-header test
compares with the native realpath the filesystem service produces.
2026-11-04 15:47:50 +08:00
LegGasai dfff0da675 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	.agents/notes/implemented/architecture/2026-11-03-session-workspace-root.i18n.yaml
#	.agents/notes/implemented/architecture/2026-11-03-session-workspace-root.md
#	.agents/notes/implemented/architecture/2026-11-03-session-workspace-root.zh.md
#	docs/subsystems/working-directory.i18n.yaml
#	packages/session/working-directory/README.i18n.yaml
#	packages/session/working-directory/README.md
#	packages/session/working-directory/README.zh.md
2026-11-04 13:56:03 +08:00
LegGasai 215ed13d0b fix(working-directory): record canonical project directories and anchor the recovery destination
Producers record the Session header directory by its canonical spelling:
ACP session/new, the SDK server, and the Web controller resolve the
requested directory through the execution-world filesystem before
creating the Session, so the canonical paths later directory changes
record compare with the header lexically. The directory service registers
the deployment fallback as the first anchor of a Session without a
recorded project, on its first validation or before its first relocation,
and registers a recovery destination that no anchor contains. A root
therefore no longer stays on a checkout that disappeared, and a header
spelled through a symlink recovers onto the canonical project.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836433
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836528
2026-11-04 13:54:03 +08:00
LegGasai 3f199a1a1b Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-04 11:56:46 +08:00
LegGasai 1f12cbc99b Revert "fix(sandbox-policy): import within from dsh-util-workspace-path"
This reverts commit 99fe2c9fc12ea6c9c76113d3778e6b6b1727a35f.
2026-11-04 11:56:46 +08:00
LegGasai 84c40e3747 fix(forge): keep a local within for the Host face
client-ui-forge is a client-host package, so the dependency policy
refuses an unclassified runtime value import of within from
dsh-working-directory. The three-line lexical containment test returns
to worktree.ts; index.ts and panel.ts import it from there and keep the
type-only import of the directory service. dsh-working-directory still
exports within for pure Host consumers such as the subagent manager.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836492
2026-11-04 11:54:59 +08:00
LegGasai b898ff01a8 Revert "fix(working-directory): move within into dsh-util-workspace-path"
This reverts commit 8b4e2d8deb1612100eb8b49a1d78d6ab1ff85973.
2026-11-04 11:51:51 +08:00
yixiangihsiang bf8306cc9b fix(client): align split control radii and refresh merged UI contracts 2026-11-04 11:37:56 +08:00
LegGasai 2e21412a93 fix(sandbox-policy): import within from dsh-util-workspace-path
The parent branch moved the lexical containment helper out of
dsh-working-directory; the sandbox policy follows it and keeps only the
type augmentation import of the directory service.
2026-11-04 11:36:51 +08:00
LegGasai e2792a01a6 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers 2026-11-04 11:34:30 +08:00
LegGasai 58ee5a6edf fix(working-directory): move within into dsh-util-workspace-path
forge's Host code imported within from dsh-working-directory, a runtime
value edge the dependency policy refuses for a client-host package. The
helper is a stateless lexical containment test, so it now lives in the
browser-safe workspace-path utility, which joins duplicateSafePackages;
the directory service, the subagent manager, and forge import it from
there and carry the utility as an ordinary dependency.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836492
2026-11-04 11:33:17 +08:00
yixiangihsiang c1502e5bc6 Merge latest master package policy updates before final UI evidence 2026-11-04 11:24:02 +08:00
yixiangihsiang 83742e9c5c Merge master after PR 7474 and adapt UI refinements to current components 2026-11-04 11:20:53 +08:00
LegGasai 954d0c5f31 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	.agents/notes/implemented/architecture/2026-11-03-session-workspace-root.i18n.yaml
2026-11-04 11:05:44 +08:00
LegGasai 20383ff779 docs(worktree): state the longest-anchor rule and the missing-consumers limitation
The worktree module comment, README, and subsystem page describe creation as a
relocation that registers the checkout as an anchor, which the longest-anchor
rule then selects as the root. The working-directory README records that
workspaceRoot has no consumer yet.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836541
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836557
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836518
2026-11-04 11:02:48 +08:00
LegGasai 0289252c8a fix(subagent): relocate a child only into a registered parent anchor
A parent without a recorded project reports the deployment fallback as its
root; the child relocated into it and registered a directory that is no
checkout. Require the parent's root to be one of its anchors. The captured
child directory now carries the canonical spelling the directory service
records, so a symlinked explicit cwd inside the parent's checkout still
relocates. The subagent README and the workspace-root note state the
longest-anchor rule and that a child registers only the parent's current root.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836468
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836458
Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836518
2026-11-04 11:02:46 +08:00
LegGasai 2c25ae6b23 fix(working-directory): return the committed workspace root from relocate
relocate reported the requested anchor as the root, while the projection
selects the longest registered anchor containing the current directory.
The two differ when an original project inside the registered root already
contains the directory. Return rootOf() after the commit and document the
rule on RelocatedDirectories and the method.

Review: https://github.com/deepseek-harness/deepseek-harness/pull/7817#discussion_r4454836504
2026-11-04 11:02:45 +08:00
LegGasai b6aa7b437c feat(working-directory): route sandbox, file views, and discovery through the Session workspace root
Every consumer that describes the project to the user or draws the write
boundary reads rootOf(session) instead of the header directory: the sandbox
workspace-write policy, the workspace file service and desktop file drag, the
change recorder, the client Files tree, deliverables, open-in-app actions and
Session rows, new sidebar terminals, @ file candidates, the skill catalog,
project-instruction discovery, and the LSP workspace. The model's relative
paths keep resolving from the current directory.

The sandbox policy derives a linked checkout's Git administration directory
and common directory from its .git pointer and grants them as extra writable
roots; tool executions wait for that derivation through prepare(), and
Session creation and directory changes start it early. Windows ACL
confinement grants each extra root a standing ACE through a repeatable
--writable runner argument instead of refusing the policy.

Refs #2658
2026-11-03 18:49:34 +08:00
LegGasai a657b6b187 Merge remote-tracking branch 'origin/master' into feat/session-workspace-root
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/subsystems/worktrees.i18n.yaml
#	docs/subsystems/worktrees.md
#	docs/subsystems/worktrees.zh.md
2026-11-03 17:35:24 +08:00
LegGasai a71975faf6 feat(working-directory): add Session workspace roots with anchored relocation
Each Session now has three directories: the immutable original project in
the header, the workspace root, and the current directory. `relocate`
registers an entered checkout as an anchor through the optional `anchor`
of one working-directory/change event, and the new workspaceRoot
projection selects the longest anchor containing the current directory,
so an ordinary cd inside a checkout moves only the cursor while entering
another checkout moves the root with it. A log without anchors keeps the
original project as its only anchor.

Worktree creation relocates instead of setting the directory; a subagent
that starts inside its parent's relocated root inherits that root; the
SDK working-directory methods return the root beside cwd; the user
context names the root while it differs from the current directory, and
a notice that selects another root ends with it. Consumers keep reading
the header or the current directory until a later change moves them.

Refs #2658
2026-11-03 17:24:29 +08:00
gengruilin 4fba84c508 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-03 15:40:20 +08:00
gengruilin b7f4510b8a Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-03 15:34:32 +08:00
gengruilin 8e615b0789 Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-03 15:29:16 +08:00
gengruilin 5987377d3a Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-03 15:23:03 +08:00
gengruilin 6285c0dff3 Merge remote-tracking branch 'origin/master' into feat/mcp-oauth 2026-11-03 15:13:44 +08:00
Shigma 55e356d60f docs(vendor): drop the rc.11 plan and correct upstream pins 2026-11-03 14:25:05 +08:00
gengruilin ed376baef2 refactor(tencent-docs): follow the ctx.mcpManager rename
The base publishes the MCP manager as `ctx.mcpManager`. Inject and
register through that key, and update the tests, the package and group
READMEs, and the generated configuration catalog.
2026-11-03 13:35:16 +08:00
gengruilin 97fd94fd00 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-03 13:34:31 +08:00
gengruilin 12044c37c9 refactor(notion): follow the ctx.mcpManager rename
The base publishes the MCP manager as `ctx.mcpManager`. Inject and
register through that key, and update the tests, the package and group
READMEs, and the generated configuration catalog.
2026-11-03 13:29:28 +08:00
gengruilin d9d219edfc Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-03 13:28:46 +08:00
gengruilin 3f7c57514a refactor(linear): follow the ctx.mcpManager rename
The base publishes the MCP manager as `ctx.mcpManager`. Inject and
register through that key, and update the tests, the package and group
READMEs, and the generated configuration catalog.
2026-11-03 13:22:34 +08:00
gengruilin 6daa068f01 Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-03 13:21:34 +08:00
gengruilin 0e856b5ebd Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-03 13:15:58 +08:00
gengruilin 07ef37ba82 refactor(mcp): follow the ctx.mcpManager rename
The base publishes the MCP manager as `ctx.mcpManager`. Inject and call
it under that key in the account UI, list its authorization endpoints
as `mcpManager/*` in the LiveShare viewer table, and update the OAuth
and composition tests and the generated configuration catalog.
2026-11-03 13:07:09 +08:00
gengruilin ef059a2e3a Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-11-03 13:03:13 +08:00
gengruilin 619923dc30 chore(feishu): mark the declarations sibling CLI app plugins share for jscpd 2026-11-02 16:47:23 +08:00
gengruilin c17344713f chore(dingtalk): mark the declarations sibling CLI app plugins share for jscpd 2026-11-02 16:47:16 +08:00
gengruilin d4b500d4c6 chore(tencent-meeting): mark the declarations sibling CLI app plugins share for jscpd 2026-11-02 16:47:09 +08:00
gengruilin 74199f55f9 chore(wecom): mark the declarations sibling CLI app plugins share for jscpd 2026-11-02 16:47:03 +08:00
gengruilin e776e58b02 test(feishu): refresh the skills snapshot after the master sync 2026-11-02 16:46:34 +08:00
gengruilin 3904eba909 test(dingtalk): refresh the skills snapshot after the master sync 2026-11-02 16:44:19 +08:00
gengruilin a04be268cb test(tencent-meeting): refresh the skills snapshot after the master sync 2026-11-02 16:43:35 +08:00
gengruilin 8dbc0eef1d test(wecom): refresh the skills snapshot after the master sync 2026-11-02 16:43:28 +08:00
gengruilin 2ba2f85de8 refactor(tencent-docs): register the account on the Host
The Tencent Docs row registers its Plugins page account with
ctx.mcpAccounts while the account registry runs, with the text that
names Tencent Docs in every shipped language in src/copy.ts. The
browser half, its 41-key dictionary, and its client build are removed;
the section, tag, activation guidance, and notices now come from the
shared account surfaces, and headless profiles load the row without the
account.
2026-11-02 15:21:44 +08:00
gengruilin c6f8c0011d docs(packages): keep the package map within its word budget after the stack sync 2026-11-02 15:21:43 +08:00
gengruilin 4c962da49d test(tencent-docs): refresh the plugin snapshot after the stack sync 2026-11-02 15:21:43 +08:00
gengruilin ae25acbc18 Merge branch 'feat/mcp-tool-loading' into feat/tencent-docs-plugin 2026-11-02 15:18:09 +08:00
gengruilin fcbe0615b5 refactor(notion): register the account on the Host
The Notion row registers its Plugins page account with ctx.mcpAccounts
while the account registry runs, with the text that names Notion in
every shipped language in src/copy.ts. The browser half, its 41-key
dictionary, and its client build are removed; the section, tag,
activation guidance, and notices now come from the shared account
surfaces, and headless profiles load the row without the account.
2026-11-02 15:12:56 +08:00
gengruilin 3175a93cb3 docs(packages): keep the package map within its word budget after the stack sync 2026-11-02 15:12:56 +08:00
gengruilin a22ce2d336 test(notion): refresh the plugin snapshot after the stack sync 2026-11-02 15:12:55 +08:00
gengruilin 8abcff102c Merge branch 'feat/mcp-tool-loading' into feat/notion-plugin 2026-11-02 15:08:43 +08:00
gengruilin bc6824ccf5 refactor(linear): register the account on the Host
The Linear row registers its Plugins page account with ctx.mcpAccounts
while the account registry runs, with the text that names Linear in
every shipped language in src/copy.ts. The browser half, its 41-key
dictionary, and its client build are removed; the section, tag,
activation guidance, and notices now come from the shared account
surfaces, and headless profiles load the row without the account.
2026-11-02 15:06:05 +08:00
gengruilin 489602cc30 docs(packages): keep the package map within its word budget after the stack sync 2026-11-02 15:05:52 +08:00
gengruilin fc9274919e test(linear): refresh the plugin snapshot after the stack sync 2026-11-02 15:05:52 +08:00
gengruilin 7f6d8c633c Merge branch 'feat/mcp-tool-loading' into feat/linear-plugin 2026-11-02 14:57:42 +08:00
gengruilin 1d681739d4 test(mcp): refresh the tool-loading snapshot after the stack sync 2026-11-02 14:56:57 +08:00
gengruilin 4df2443158 Merge branch 'feat/mcp-oauth' into feat/mcp-tool-loading 2026-11-02 14:56:22 +08:00
gengruilin 180b3e6029 refactor(ui-mcp-account): register connector accounts on the Host
Connector plugins register their OAuth server's account with the Host
service ctx.mcpAccounts instead of a browser registry: the server name,
the bundle package, and the text that names the service as
LocalizedText. The registry serves every account with the MCP manager's
view of its server through one mcpAccounts Remote; authorization,
cancellation, sign-out, and restart stay on the manager's Remote.

One browser half follows that stream, renders each account's section,
tag, activation guidance, and notices with the connector's text and the
26 strings every connector shares, and keeps authorization page opening,
notices, and the pending-action guard per browser. Connectors no longer
need a browser half or their own dictionary for the account.
2026-11-02 14:55:26 +08:00
gengruilin f0cd6d0fe2 test(mcp): refresh the OAuth error snapshot after the manager-core sync 2026-11-02 14:48:51 +08:00
gengruilin 00ed20c130 Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth
# Conflicts:
#	packages/client/README.i18n.yaml
#	snapshots/session/headless.snapshot.ts
2026-11-02 14:11:56 +08:00
gengruilin 4f1a8b5097 feat(linear): add the Linear plugin over the shared MCP manager
Register Linear's hosted MCP server (https://mcp.linear.app/mcp) with the
shared MCP manager under the server name `linear` and the OAuth credential
key `mcp-client/linear`, add the Linear plugin naming guidance, and show the
Linear account on its Plugins page through ui-mcp-account. Tools load on
demand by default.
2026-11-01 18:55:22 +08:00
gengruilin 614e17020f refactor(feishu): show the account through the Host account registry
The feishu row registers its account with ctx.cliAccounts instead of
serving its own Remote to a browser package:

- src/presentation.ts maps each account view to the section, tag,
  buttons, sign-out and app-replacement confirmations, linked-app row,
  and failure with the CLI's classified error, in the text of
  src/locales.ts in every shipped language; the activation prompt
  links an app or signs in through display.connect.
- The row becomes a function plugin and registers only while the
  registry runs, so headless profiles load it without the page. The
  account's private status recorder is renamed so it no longer shadows
  the runtime's observe().
- The ui-feishu browser package, the feishu Remote, and its generated
  artifacts are removed.
2026-11-01 02:20:37 +08:00
gengruilin b6fc8a773e Merge branch 'feat/cli-account' into feat/feishu-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	scripts/gen-cordis-catalog.ts
#	scripts/product-package-policy.ts
#	tsconfig.client.json
2026-11-01 02:09:29 +08:00
gengruilin 19b9af78b1 refactor(dingtalk): show the account through the Host account registry
The dingtalk row registers its account with ctx.cliAccounts instead of
serving its own Remote to a browser package:

- src/presentation.ts maps each account view to the section, tag,
  buttons, sign-out confirmation, and failure, with the text of
  src/locales.ts in every shipped language, the dws download step,
  and the signed-in user and organization filled in; the activation
  prompt signs in through display.connect.
- The row becomes a function plugin and registers only while the
  registry runs; the load-time check still prepares dws and its
  skills for sessions without a browser.
- The ui-dingtalk browser package, the dingtalk Remote, and its
  generated artifacts are removed; the Web E2E reads the untranslated
  exit code.
2026-11-01 02:05:24 +08:00
gengruilin 1d1986d52d Merge branch 'feat/cli-account' into feat/dingtalk-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/capability-seams.md
#	docs/capability-seams.zh.md
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/client/README.i18n.yaml
#	packages/client/README.md
#	packages/client/README.zh.md
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	tsconfig.client.json
2026-11-01 01:52:29 +08:00
gengruilin a20e5849e8 refactor(tencent-meeting): show the account through the Host account registry
The tencent-meeting row registers its account with ctx.cliAccounts
instead of serving its own Remote to a browser package:

- src/presentation.ts maps each account view to the section, tag,
  buttons, sign-out confirmation, guide row, and failure, with the
  text of src/locales.ts in every shipped language and the signed-in
  user's name filled in; the activation prompt signs in through
  display.connect.
- The row becomes a function plugin and registers only while the
  registry runs, so headless profiles load it without the page.
- The ui-tencent-meeting browser package, the tencentMeeting Remote,
  and its generated artifacts are removed; the Web E2E reads the
  untranslated exit code.
2026-11-01 01:50:19 +08:00
gengruilin 0fed8aae96 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	scripts/product-package-policy.ts
2026-11-01 01:37:22 +08:00
gengruilin 31bc3febc2 refactor(wecom): show the authorization through the Host account registry
The wecom row registers its account with ctx.cliAccounts instead of
serving its own Remote to a browser package:

- src/presentation.ts maps each authorization view to the section,
  tag, buttons, guide row, and failure, with the text of
  src/locales.ts in every shipped language; the activation prompt
  connects through display.connect.
- The row becomes a function plugin and registers only while the
  registry runs, so headless profiles load it without the page.
- The ui-wecom browser package, the wecom Remote, and its generated
  artifacts are removed; the Web E2E reads the untranslated exit code.
2026-11-01 01:35:40 +08:00
gengruilin 85d6d600bf Merge branch 'feat/upstream-skills' into feat/wecom-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
2026-11-01 01:20:47 +08:00
gengruilin caadd0c0f5 Merge branch 'feat/cli-account' into feat/upstream-skills 2026-11-01 01:19:23 +08:00
gengruilin 1a83868225 feat(cli-account): build a presenter's LocalizedText from its dictionaries
accountText(dictionaries) renders one key in every language a plugin's
dictionaries hold and fills its {name} placeholders, so CLI app plugins
write their Plugins page text on the Host without a browser t().
2026-11-01 01:19:11 +08:00
gengruilin 68181059f8 Merge branch 'feat/cli-account' into feat/upstream-skills 2026-11-01 01:09:37 +08:00
gengruilin 30b0440efa Merge remote-tracking branch 'origin/master' into feat/cli-account
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/README.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/core/system-prompt/tests/system-prompt.spec.ts
2026-11-01 01:01:28 +08:00
gengruilin d34d9e78d5 Merge the Windows CLI path context into the registry cleanup
# Conflicts:
#	packages/connector/cli-account/src/index.ts
2026-10-31 22:36:08 +08:00
gengruilin f7895910e7 refactor(cli-account): let the Host name diagnostics and the connect operation
The browser no longer decides what belongs to the plugin:

- A failure carries untranslated diagnostic items the section joins
  after the plugin's text; failureDetails() lists a classified
  command and its exit code, so the kit dictionary drops its exit
  code template.
- The display names the operation Connect starts in the activation
  prompt instead of the browser picking the first primary button.
- The browser sends cancel for the operation in progress and shows a
  result's notice as the Host sends it, without repeating the Host's
  cancellable and success checks; the entry drops the cancellable
  and outcome fields that only those checks read.
2026-10-31 22:12:11 +08:00
gengruilin d67686f5e3 Merge the Windows CLI path context into feat/cli-account 2026-10-31 14:04:40 +08:00
gengruilin 0995564d4b refactor(cli-account): register CLI app accounts on the Host
CLI app plugins register their account runtime with the Host service
ctx.cliAccounts instead of a browser registry. The registry serves
every account through one cliAccounts Remote and starts or cancels
only the operations each account lists. One browser half renders each
account's section, tag, activation prompt, confirmations, and notices
from the plugin's LocalizedText and the kit's shared dictionary, and
keeps link opening, notices, and the pending-action guard per browser.

The account runtime replaces its follow stream with observe(), which
the registry uses.
2026-10-30 18:56:49 +08:00
gengruilin 8d245cf056 feat(tencent-meeting): run tmeet-Windows-x86_64.exe on Windows x64 2026-10-30 18:36:58 +08:00
gengruilin 2f6382f56c feat(dingtalk): download and run dws.exe on Windows x64 2026-10-30 18:36:50 +08:00
gengruilin 17f5efb76b feat(wecom): run wecom-cli.exe on Windows x64 2026-10-30 18:36:43 +08:00
gengruilin 317716ab27 feat(feishu): run lark-cli.exe on Windows x64 2026-10-30 18:36:36 +08:00
gengruilin 8aeb552503 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-10-30 17:41:56 +08:00
gengruilin b233f0a1c2 Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-10-30 17:41:55 +08:00
gengruilin 6457071316 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-10-30 17:41:53 +08:00
gengruilin 51d0c7a660 Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-10-30 17:41:52 +08:00
gengruilin a2f6c4aefc Merge branch 'feat/cli-account' into feat/upstream-skills 2026-10-30 17:41:51 +08:00
gengruilin e966425fc6 feat(cli-account): write the CLI path context in PowerShell syntax on Windows 2026-10-30 17:39:44 +08:00
gengruilin 7a781932df Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-10-30 16:57:05 +08:00
gengruilin 7e10357889 feat(mcp): load on-demand MCP tools per agent through a per-server loader
An mcp-client entry with toolLoading: on-demand keeps the server's tools
out of the tool registry. The server registers mcp__<server>__load_tools,
lists its tools in a system prompt section, and registers the tools an
agent loads in that agent's own scope. Each published generation carries
loaded tools forward. mcp-manager entries pass toolLoading through.
2026-10-30 15:36:58 +08:00
yixiangihsiang 84ffcb7410 fix(client): address UI review feedback and restore layout checks 2026-10-29 20:03:09 +08:00
yixiangihsiang 6eabeab885 Merge latest PR 7474 UI interaction guidance 2026-10-29 20:03:09 +08:00
gengruilin 8a4d73d1d8 refactor(tencent-meeting): register the account with ctx.cliAccounts
The CLI account surfaces are now a client plugin, so the Tencent
Meeting page no longer renders the shared components or registers its
own slot entries. Its browser half registers the account with
`ctx.cliAccounts`: the Tencent Meeting Remote operations, the
translated success notices, and a presenter that maps the page snapshot
to the section's buttons, signed-in user, sign-out confirmation, guide
download row, and failure guidance.

The presenter tests cover what each state offers, and the mount test
covers the registration's Remote wiring and teardown; the rendering of
that display is the shared surfaces' behavior.
2026-10-29 19:49:03 +08:00
gengruilin 772fdcf282 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-10-29 19:48:42 +08:00
gengruilin 8b2670c659 refactor(wecom): register the WeCom authorization with ctx.cliAccounts
The CLI account surfaces are now a client plugin, so the WeCom page no
longer renders the shared components or registers its own slot entries.
Its browser half registers the authorization with `ctx.cliAccounts`:
the WeCom Remote operations, the translated success notice, and a
presenter that maps the page snapshot to the section's buttons, guide
download row, and failure guidance.

The presenter tests cover what each state offers, and the mount test
covers the registration's Remote wiring and teardown; the rendering of
that display is the shared surfaces' behavior.
2026-10-29 19:36:53 +08:00
gengruilin d8fad26422 Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-10-29 19:36:18 +08:00
gengruilin 53f64db7a8 Merge branch 'feat/cli-account' into feat/upstream-skills 2026-10-29 19:23:14 +08:00
gengruilin 67c563e7a7 refactor(dingtalk): register the DingTalk account with ctx.cliAccounts
The CLI account surfaces are now a client plugin, so the DingTalk page
no longer renders the shared components or registers its own slot
entries. Its browser half registers the account with `ctx.cliAccounts`:
the DingTalk Remote operations, the translated success notices, and a
presenter that maps the page snapshot to the section's buttons,
signed-in user, sign-out confirmation, and failure guidance.

The presenter tests cover what each state offers, and the mount test
covers the registration's Remote wiring and teardown; the rendering of
that display is the shared surfaces' behavior.
2026-10-29 19:22:54 +08:00
gengruilin 1211121610 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-10-29 19:22:17 +08:00
gengruilin aed4dbb750 refactor(feishu): register the Feishu account with ctx.cliAccounts
The CLI account surfaces are now a client plugin, so the Feishu page no
longer renders the shared components or registers its own slot entries.
Its browser half registers the account with `ctx.cliAccounts`: the
Feishu Remote operations, the translated success notices, and a
presenter that maps the page snapshot to the section's buttons, linked
app, confirmations, and failure guidance.

The presenter tests cover what each state offers, and the mount test
covers the registration's Remote wiring and teardown; the rendering of
that display is the shared surfaces' behavior.
2026-10-29 19:10:37 +08:00
gengruilin e722f2909c Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-10-29 19:10:23 +08:00
gengruilin 565f68846c refactor(cli-account): register CLI accounts through a client plugin
The Web shell's PLATFORM_MODULES list is closed to new packages, and a
feature plugin cannot runtime-import another plugin's values. Turn
ui-cli-account from a statically linked library into a dynamic client
plugin that dsh-web-app mounts.

`ctx.cliAccounts.register()` follows the plugin's account stream and
contributes the bundle section, title tag, activation prompt, and
notice. The surfaces read the shared copy from the plugin's namespace
through the locale seat; the plugin supplies its Remote operations, its
success notices, and a presenter that maps the page snapshot to the
section's translated display. Confirmations become action data the
section asks before running, and the activation prompt connects through
the section's first primary action that asks no confirmation.

Drop the shell seeding, the apps/web dependency, and the CSS
publication exception the static form needed.
2026-10-29 18:41:47 +08:00
gengruilin b8ae9fa6b1 chore(tencent-docs): match the root version 0.2.2-alpha.2 2026-10-29 18:00:17 +08:00
gengruilin 2153d0e50d chore(notion): match the root version 0.2.2-alpha.2 2026-10-29 17:58:17 +08:00
gengruilin b3bc15f104 chore(ui-mcp-account): match the root version 0.2.2-alpha.2 2026-10-29 17:53:36 +08:00
gengruilin abe73ad4ba Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-10-29 17:53:21 +08:00
gengruilin c9142e0a18 chore(dingtalk): match the root version 0.2.2-alpha.2 2026-10-29 17:51:44 +08:00
gengruilin bd9e4fa32c chore(feishu): match the root version 0.2.2-alpha.2 2026-10-29 17:50:13 +08:00
gengruilin af12a3f895 Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-10-29 17:23:13 +08:00
gengruilin 48d7f1cd07 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-10-29 17:19:45 +08:00
gengruilin 0400321fa8 Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-10-29 17:16:26 +08:00
gengruilin 6438b11a40 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-10-29 17:07:45 +08:00
gengruilin 0b02217827 feat(tencent-docs): translate the Plugins page and plugin metadata into every shipped language 2026-10-29 17:04:04 +08:00
gengruilin 640240307d fix(tencent-docs): follow master's tool fixture and prompt changes 2026-10-29 17:04:03 +08:00
gengruilin 0bffe322f3 feat(notion): translate the Plugins page and plugin metadata into every shipped language 2026-10-29 16:59:36 +08:00
gengruilin d23fd2bacc fix(notion): follow master's tool fixture and prompt changes 2026-10-29 16:59:34 +08:00
gengruilin 9ca0def667 chore(ui-mcp-account): add plugin metadata in every shipped language 2026-10-29 16:34:25 +08:00
gengruilin ccb8d9035d fix(mcp): follow master's tool fixture, LiveShare endpoint table, and prompt changes 2026-10-29 16:34:23 +08:00
gengruilin e43a85615d Merge branch 'feat/mcp-manager-core' into feat/mcp-oauth 2026-10-29 16:26:36 +08:00
gengruilin 460cd1639a feat(dingtalk): translate the Plugins page into every shipped language 2026-10-29 16:03:08 +08:00
gengruilin ad4d3040b2 Merge branch 'feat/cli-account' into feat/dingtalk-plugin 2026-10-29 16:01:16 +08:00
gengruilin 22e9ba1ca6 feat(feishu): translate the Plugins page into every shipped language 2026-10-29 15:59:23 +08:00
gengruilin e19b5b3930 Merge branch 'feat/cli-account' into feat/feishu-plugin 2026-10-29 15:57:42 +08:00
gengruilin 993f58fbed feat(tencent-meeting): translate the Plugins page into every shipped language 2026-10-29 15:52:42 +08:00
gengruilin 416d0ae4c2 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin 2026-10-29 15:50:53 +08:00
gengruilin e096d03571 feat(wecom): translate the Plugins page into every shipped language 2026-10-29 15:49:13 +08:00
gengruilin f96a68b1aa Merge branch 'feat/upstream-skills' into feat/wecom-plugin 2026-10-29 15:42:32 +08:00
gengruilin 5612e4e38f Merge branch 'feat/cli-account' into feat/upstream-skills 2026-10-29 15:27:49 +08:00
gengruilin 053131f278 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-10-29 15:22:16 +08:00
yixiangihsiang 661616bf0a docs: route icon interactions through UI design entry 2026-10-29 13:52:25 +08:00
yixiangihsiang 6d049ede4a docs: clarify responsive UI skill routing 2026-10-29 13:17:53 +08:00
yixiangihsiang 625a07f4e2 test(web): register model drag regression in host typecheck 2026-10-28 21:07:38 +08:00
yixiangihsiang 1f4249a0df Merge PR 7474 UI design references into UI refinements 2026-10-28 21:05:01 +08:00
yixiangihsiang 2c040ad920 fix(client): refine UI alignment, spacing and model drag targets 2026-10-28 21:03:19 +08:00
yixiangihsiang 9190d106d6 docs: expose UI design references through one skill 2026-10-28 20:56:42 +08:00
yixiangihsiang 31919ec662 docs: integrate UI review cases and address review feedback 2026-10-28 20:42:46 +08:00
yixiangihsiang 5af59749b4 docs: clarify minimum UI inspection requirements 2026-10-28 20:28:37 +08:00
yixiangihsiang fb70c9e197 docs: scale UI review effort to change impact 2026-10-28 20:10:08 +08:00
yixiangihsiang c86c755909 docs: preserve actionable UI conditions and examples 2026-10-28 19:38:09 +08:00
yixiangihsiang 7c986dc806 docs: retain practical alignment and spacing examples 2026-10-28 19:28:18 +08:00
yixiangihsiang f1e21d8f20 docs: condense UI skills while preserving design rules 2026-10-28 19:08:18 +08:00
gengruilin 80c523dfdf Merge branch 'feat/upstream-skills' into feat/wecom-plugin
Resolve the module graph conflict by regenerating it.
2026-10-28 18:32:04 +08:00
gengruilin 542df13374 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin
Resolve the module graph conflict by regenerating it.
2026-10-28 18:31:30 +08:00
gengruilin 429eb5844b docs(upstream-skills): add the package to the module graph 2026-10-28 18:30:47 +08:00
gengruilin 81057d987d docs(upstream-skills): state that node-tar reads backslashes as slashes on Windows 2026-10-28 18:30:46 +08:00
gengruilin 9058679655 test(upstream-skills): keep the time-limit and publish tests independent of timing and directory order 2026-10-28 18:30:45 +08:00
gengruilin 2db5e28ee5 chore(wecom): match the root version 0.2.2-alpha.2 2026-10-28 17:46:57 +08:00
gengruilin df14d45ee1 Merge branch 'feat/upstream-skills' into feat/wecom-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
2026-10-28 17:46:38 +08:00
gengruilin 0d14c21cb6 chore(tencent-meeting): match the root version 0.2.2-alpha.2 2026-10-28 17:43:44 +08:00
gengruilin 9f283b2037 Merge branch 'feat/upstream-skills' into feat/tencent-meeting-plugin
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	packages/client/README.i18n.yaml
#	packages/extensions/tool-cordis/src/api-catalog.ts
2026-10-28 17:43:24 +08:00
gengruilin 487cdb0a9a chore(upstream-skills): match the root version 0.2.2-alpha.2 2026-10-28 17:38:59 +08:00
gengruilin 2311193235 Merge remote-tracking branch 'origin/feat/cli-account' into feat/upstream-skills 2026-10-28 17:38:29 +08:00
yixiangihsiang f960f0d9ce Merge remote-tracking branch 'origin/Ihsiang/ui-design-standards' into Ihsiang/ui-review-refinements 2026-10-28 17:31:52 +08:00
yixiangihsiang 78bc51f2d1 docs: consolidate UI skill rules and geometry guidance 2026-10-28 17:26:48 +08:00
yixiangihsiang 8bd45a6687 fix(client): keep logout artwork within account UI 2026-10-28 16:04:58 +08:00
yixiangihsiang 5e0084202c test(client): refresh merged autolink stroke expectations 2026-10-28 15:48:50 +08:00
yixiangihsiang b0fd38e30b fix(client): refine UI geometry and icon consistency 2026-10-28 15:36:12 +08:00
yixiangihsiang f16350fc96 docs: define UI design decisions and review workflow 2026-10-28 15:34:45 +08:00
gengruilin 0dc9913aff feat(wecom): download the official guides at run time instead of bundling a copy
The wecom skill's guides are the skills/ directory of WecomTeam/wecom-cli at
4c74ff2. Instead of carrying that copy, the plugin pins the commit with the
size and digest of those files and registers its entry skill through
@deepseek-ai/dsh-upstream-skills, which downloads, verifies, and caches them
when the plugin loads and lists the skill once they are in place.

The account view carries the download state, and the plugin page shows a
downloading or failed note beside the authorization; each check restarts a
failed download without waiting for it, so connecting never waits for
GitHub. skillsDir points the tests, the recorded session, and the Web e2e at
local directories, so none of them downloads anything.
2026-10-28 15:29:15 +08:00
gengruilin aea7f82dee feat(tencent-meeting): download the official guide at run time instead of bundling a copy
The tencent-meeting skill's guide is skills/tmeet-skill/ of
TencentCloud/tencentmeeting-cli at v1.0.18 (e631b35), without
scripts/agent_init.py. Instead of carrying that copy, the plugin pins the
commit with the size and digest of those files and registers its entry skill
through @deepseek-ai/dsh-upstream-skills, which downloads, verifies, and
caches them when the plugin loads and lists the skill once they are in place.

The account view carries the download state, and the plugin page shows a
downloading or failed note beside the account; each check restarts a failed
download without waiting for it, so signing in never waits for GitHub.
skillsDir points the tests, the recorded session, and the Web e2e at local
directories, so none of them downloads anything.
2026-10-28 15:28:58 +08:00
gengruilin d25a48ac3c feat(upstream-skills): download CLI app plugins' upstream skills from a pinned GitHub commit
WeCom and Tencent Meeting index guides that their vendors publish only in
their GitHub repositories. Instead of carrying a copy, a plugin pins one
directory of the repository by commit, total size, and a digest of the kept
files, and registerUpstreamSkills downloads the commit archive when the plugin
loads, verifies it, publishes it in the DSH cache, and lists the plugin's entry
skill with the published directory as its base directory.

The handle reports installed, downloading, or failed, notifies listeners, and
retries without waiting, so a plugin's account check never waits for GitHub.
Each archive source has skillsTimeoutMs; skillsDir points at prepared files
for tests and offline installations. scripts/upstream-skills-digest.ts prints
the pin for a commit.
2026-10-28 15:00:11 +08:00
gengruilin 40141bb0ec chore(cli-account): match the root version 0.2.2-alpha.2 2026-10-28 14:23:57 +08:00
gengruilin d75d18c373 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-10-28 14:23:57 +08:00
gengruilin ea28b3ab35 Merge remote-tracking branch 'origin/master' into feat/cli-account 2026-10-27 19:43:29 +08:00
gengruilin a14c0b6c8f chore(dingtalk): add plugin metadata in every shipped language 2026-10-27 14:21:53 +08:00
gengruilin a0c841ff93 chore(wecom): add plugin metadata in every shipped language 2026-10-27 14:21:48 +08:00
gengruilin 5397ba0096 chore(feishu): add plugin metadata in every shipped language 2026-10-27 14:21:43 +08:00
gengruilin bd5a80b9f4 chore(tencent-meeting): add plugin metadata in every shipped language 2026-10-27 14:21:36 +08:00
gengruilin 60bcf40a08 chore(tencent-meeting): match the root version 0.2.1-rc.4 2026-10-27 14:15:37 +08:00
gengruilin 731615a181 chore(dingtalk): match the root version 0.2.1-rc.4 2026-10-27 14:15:36 +08:00
gengruilin 106fa95394 chore(wecom): match the root version 0.2.1-rc.4 2026-10-27 14:15:36 +08:00
gengruilin ecd317f8b8 chore(feishu): match the root version 0.2.1-rc.4 2026-10-27 14:11:30 +08:00
gengruilin ebf0ea51ab chore(cli-account): match the root version 0.2.1-rc.4 2026-10-27 14:08:11 +08:00
gengruilin 498188adf8 feat(tencent-meeting): run tmeet by the absolute path named in runtime context
The plugin registers the absolute path of the platform executable that
@tencentcloud/tmeet ships, through registerCliPathContext, and runs its
own commands by the same path. The tmeet symlink in the Harness cache,
the Host-runtime check, the private PATH registration, and the
shell-env and home-paths dependencies are removed. The skill guidance,
READMEs, tests, and the tencent-meeting-skills snapshot follow the
runtime-context path.
2026-10-27 14:04:56 +08:00
gengruilin 0890e9f1a9 feat(dingtalk): run dws by the absolute path named in runtime context
The plugin registers dws's absolute path through registerCliPathContext,
with the PATH prefix for the guide scripts that call it by name, and the
context stays empty until dws and its skills are installed. The plugin's
own commands run by the same path. The Host-runtime check, the private
PATH registration, and the shell-env dependency are removed. The skill
guidance, READMEs, tests, and the dingtalk-skills snapshot follow the
runtime-context path.
2026-10-27 14:04:54 +08:00
gengruilin 45fc779a11 feat(wecom): run wecom-cli by the absolute path named in runtime context
The plugin registers wecom-cli's absolute path through
registerCliPathContext, with the PATH prefix for the guide scripts that
call it by name, and runs its own commands by the same path. The
Host-runtime check, the private PATH registration, and the shell-env
dependency are removed. The skill guidance, READMEs, tests, and the
wecom-skills snapshot follow the runtime-context path.
2026-10-27 14:04:52 +08:00
gengruilin d4a2b27da0 feat(feishu): run lark-cli by the absolute path named in runtime context
The plugin registers lark-cli's absolute path through
registerCliPathContext and runs its own commands by the same path. The
Host-runtime check, the private PATH registration, and the shell-env
dependency are removed. The skill guidance, READMEs, tests, and the
feishu-skills snapshot follow the runtime-context path.
2026-10-27 14:04:50 +08:00
gengruilin 6935d47056 feat(cli-account): run plugin CLIs by absolute paths named in runtime context
CLI app plugins now give the model each CLI's absolute path in required
runtime context instead of putting the CLI on a private Shell PATH.

- registerCliPathContext registers the path at the new PLUGIN_CLIS
  context order without interpolation. With `scripts`, it also tells
  the model to prefix only the commands that run the skill's scripts
  with PATH="<dir>:$PATH"; with `ready`, it contributes nothing until
  the CLI is installed.
- CliCommandExecutor takes the absolute `executable`, verifies it
  through the subprocess runtime, and spawns it without preparing an
  environment, so the kit no longer depends on shell-env.
- An Agent Note records the decision and the rejected private PATH,
  paths in skill text, shared registry, and Host check.
2026-10-27 14:04:35 +08:00
gengruilin 64c716da9d fix(cli-account): stop waiting for pipes a descendant keeps open
A descendant that inherits the CLI's stdout or stderr keeps the pipes
open after the CLI exits. The executor waited for both pipes to end, so
such a command hung until its deadline and reported a timeout, or hung
indefinitely, even through cancellation and disposal, when the
descendant had left the managed process range. A reader failure, such as
an `onLine` throw, left the other reader running, so `onLine` could be
called after `run` rejected.

The executor now waits for the exit and reads the pipes for at most 2
seconds after the subprocess runtime reports it, keeping the output read
before the cut. On every path it terminates the command and stops both
readers before it settles, so every `onLine` call precedes the result.
2026-10-27 11:16:56 +08:00
gengruilin 3b6f6a536b docs(tencent-meeting): document the row's Plugin CLIs entry 2026-10-22 11:31:24 +08:00
gengruilin 4d2418a9fd refactor(mcp): import the OAuth modules statically
The dynamic imports deferred little. dsh-credentials is already a required
peer because oauth-credentials.ts imports its values statically, and the
MCP client SDK loads @modelcontextprotocol/core at runtime anyway. Import
McpOAuthCredentials statically, export McpOAuthAuthorization from the
package entry, and drop the ./oauth subpath with its tsdown entry, chunk
file patterns, and tsconfig path.

The manager now creates the authorization owner synchronously, so the
retirement check that covered the import's await, and the test of that
window, are removed.
2026-10-21 23:16:42 +08:00
gengruilin 1b66ec65f7 fix(mcp): send the OAuth callback to the web server's own origin
The redirect URI was always http://127.0.0.1:<port>, but the Host web
server listens only on its configured address. A server bound to ::1 or
another interface, or serving TLS, never received the callback, and the
attempt waited for its authorization timeout. Build the redirect URI from
WebServer.getOrigin().
2026-10-21 23:16:42 +08:00
gengruilin 621c8a8240 refactor(mcp): drop OAuth header checks that only the manager reaches
`McpOAuthAuthorization` and `probeServer` have no caller other than the MCP
manager, which already rejects an entry that combines OAuth with an
Authorization header when it is loaded, written, or registered. The
mcp-client load check stays for standalone rows.
2026-10-21 23:16:42 +08:00
gengruilin 157986efc8 fix(mcp): send the advertised OAuth resource verbatim
The SDK authorization request carries the protected-resource metadata's
resource string verbatim. The code exchange and refresh wrapped it in
`new URL()`, whose `href` adds a trailing slash to a resource without a
path, so a server that compares the resource exactly rejected the token
request. Both now pass the stored string.
2026-10-21 23:16:42 +08:00
gengruilin 06a72d264c docs(mcp): document MCP OAuth authorization
The MCP subsystem guide and the MCP manager decision record cover OAuth authorization; the generated catalogs and module graph list the OAuth surfaces and the account UI.
2026-10-21 23:16:30 +08:00
gengruilin 7234ba1bac feat(ui-mcp-account): show connector MCP accounts on the Plugins page
Connector plugins register a managed OAuth server with ctx.mcpAccounts to get its account section, title tag, activation guidance, and notices on their bundle page; authorization, status, and sign-out go through the MCP manager Remote.
2026-10-21 23:16:30 +08:00
gengruilin b8d8b3b06c feat(mcp-manager): start, cancel, and sign out of OAuth authorization
The manager Remote adds `startAuthorization`, `cancelAuthorization`, and `signOut`, reports attempt progress in `list()` and `mcp-manager/status`, and rejects an `oauth.credentialKey` that another entry owns.
2026-10-21 23:16:30 +08:00
gengruilin 7d35674c6c feat(mcp-client): add OAuth grants, passive refresh, and explicit authorization
A Streamable HTTP entry with `oauth.credentialKey` connects with the grant saved in the credentials provider, refreshes an expired access token, and enters `waiting-authorization` with a `missing`, `expired`, `binding`, `rejected`, or `scope` reason when the grant cannot be used. `McpOAuthAuthorization` runs explicit browser authorization through the Host web server callback. The mcp-oauth-error snapshot records the tool failure the model sees.
2026-10-21 23:16:29 +08:00
gengruilin 679497f14d test(cli-account): declare the fixture program on the private PATH 2026-10-19 21:17:01 +08:00
LegGasai f63289b3b9 Merge remote-tracking branch 'origin/master' into fix/web-unresolved-at-mention 2026-10-19 17:32:17 +08:00
LegGasai 9374e40dd0 Merge remote-tracking branch 'origin/master' into fix/web-unresolved-at-mention 2026-10-19 17:29:35 +08:00
gengruilin 3a6b0a837e docs(tencent-meeting): document the Tencent Meeting plugin and register it with the doc gates
Add bilingual READMEs for the three packages and their group tables, register the tencentMeeting Remote's service role and catalog page, and regenerate the catalogs, graphs, and composition reference.
2026-10-19 12:04:32 +08:00
gengruilin de82f1ea97 test(tencent-meeting): cover the account, the Plugins page, and the skills session
Specs drive a scripted tmeet through each auth status text, a sign-in with trusted and untrusted links, cancellation, and sign-out, and check the cache link and the one-entry skill. The Web E2E runs a stand-in tmeet through a failed and a successful sign-in and a confirmed sign-out; it needs the scaffold to resolve every selected bundle's dependencies, as the other CLI app plugins' do. The tencent-meeting-skills snapshot pins the skill catalog and a tmeet call on the private PATH.
2026-10-19 12:04:19 +08:00
gengruilin e6f2f2cfd1 feat(tencent-meeting): add the Tencent Meeting plugin on the CLI account kit
The bundle inserts the tencent-meeting Host row and the ui-tencent-meeting page row; all three packages are optional in the product package policy. The Host row pins @tencentcloud/tmeet 1.0.18, whose bin is a Node launcher over executables named per platform, and links this platform's executable as tmeet in a DSH cache directory on the private Shell PATH; binDir replaces the link. Repository installs deny the package's install script, which runs tmeet auth logout. One tencent-meeting skill indexes the guide and tells the agent to use the plugin's tmeet, skip the guide's installation check and agent_init.py, and send sign-in to the plugin page. The tencentMeeting Remote checks the account by reading the plain-text auth status, signs in through the browser authorization page and confirms that the server accepts the sign-in, and signs out. The page shows the sign-in steps, the signed-in user, and a sign-out confirmation. Three jscpd:ignore blocks cover the imports, Remote methods, and page actions that the CLI app plugins share by design.
2026-10-19 12:04:06 +08:00
gengruilin 26f4abb49d docs(dingtalk): document the DingTalk plugin and register it with the doc gates
Add bilingual READMEs for the three packages and their group tables, register the dingtalk Remote's service role and catalog page, and regenerate the catalogs, graphs, and composition reference.
2026-10-18 19:49:19 +08:00
gengruilin 36377f459f test(dingtalk): cover the downloads, the account, the Plugins page, and the skills session
Specs serve fixture archives from a local HTTP server to cover source fallback, refused lengths and digests, unsafe skills-archive paths, aborts, and concurrent publishes; check that a skill root published after the first catalog joins it; and drive a scripted dws through checks, sign-in, and sign-out. The skills spec pins the release's 16 upstream skill names against the entry's index. The Web E2E runs a stand-in dws with stand-in skills through a failed and a successful sign-in and a confirmed sign-out. The dingtalk-skills snapshot owns its system prompt, which lists dws under Plugin CLIs, and pins the one-entry skill catalog and a dws call on the private PATH.
2026-10-18 19:48:43 +08:00
gengruilin 0732a9b26f feat(dingtalk): add the DingTalk plugin on the CLI account kit
The bundle inserts the dingtalk Host row and the ui-dingtalk page row; all three packages are optional in the product package policy. The Host row downloads two assets of the pinned dws 1.0.64 release from GitHub Releases, or the official Gitee mirror: the archive for this platform and dws-skills.zip. It refuses a response whose Content-Length or SHA-256 differs, publishes each asset into the DSH cache by rename, and publishes a skill root that pairs the packaged dingtalk entry with the downloaded guides; binDir and skillsDir skip the downloads. It does not depend on the dingtalk-workspace-cli npm package, whose install script copies the official skills into ~/.agents/skills and other agents' skill directories. dws joins the private Shell PATH as the row's declared program, which the system prompt's Plugin CLIs section lists; one dingtalk skill indexes the guides; and the dingtalk Remote checks, signs in through the browser authorization page, and signs out only the current account. The page shows the download, the sign-in steps, the signed-in user and organization, and a sign-out confirmation.
2026-10-18 19:48:25 +08:00
gengruilin bdcb4464d1 test(web): resolve every selected bundle's dependencies in the e2e scaffold
Like the launcher, the scaffold now resolves the dependencies of each bundle the profile selects, not only the extra install anchors, so a plugin bundle's row packages load in Web E2E. Feishu (#5771) and WeCom (#6251) carry the same change.
2026-10-18 19:46:05 +08:00
gengruilin e7671cd09f docs(cli-account): state the Host runtime precondition and complete failure contracts
The executor's module and class comments and the README now state that
its subprocess runtime must run on the Host, and `run` lists executable
lookup, spawn, and `onLine` failures among its rejections. The README and
`authorizationHosts` state that hosts are lowercase ASCII with punycode
IDNs. `CliCommandFailure.exitCode` lists every failure that leaves it
null, and `CliAccountBadge` names the bundle and row pages it renders on.
2026-10-17 19:14:25 +08:00
gengruilin 971943346a fix(cli-account): bound the line buffer and cut the stderr tail by UTF-8 bytes
The line buffer grew without limit and filled even without an `onLine`
observer, so a CLI writing output without a newline during the 10-minute
authorization wait bypassed the 1 MiB and 4 KiB output limits. A line the
CLI ended with a lone `\r`, as a link followed by a redrawn spinner,
reached the observer only at exit. The stderr tail was cut in UTF-16 code
units, so multibyte output kept up to three times 4 KiB and could split a
surrogate pair.

Lines are now split only for an observer, end at `\n`, `\r\n`, or a lone
`\r` as in Node's `readline`, and a line longer than its stream's limit
is skipped whole. The stderr tail keeps the last 4 KiB of UTF-8 bytes from
a character boundary.
2026-10-17 19:12:59 +08:00
gengruilin 3430ac112a fix(ui-cli-account): open each operation's links and report its notice from its own start
The set of auto-opened links lived as long as the connection, so a later
operation offering the same device page never opened it. A rejected start
kept following the operation of an earlier start, which went on opening
its links and reporting its success after the page's latest action failed.

The followed operation now carries its own opened links. Each start
attempt drops the operation followed before, an accepted start follows
the returned one, and the stream's result for it ends the following.
2026-10-17 19:10:18 +08:00
gengruilin 15aa84f28c fix(ui-cli-account): stop retries and start answers from acting after disposal
`retry()` claimed the reopen only after awaiting the stopped stream, so a
second retry or a disposal in that window still subscribed a stream that
nothing released. A start that answered after disposal, or a view the
stream yielded just before it, still opened the operation's link.

`retry()` now clears `stopped` before the reopen awaits, and the reopen
subscribes only while the page is live. A start answer and a stream item
that arrive after disposal are dropped.
2026-10-17 19:08:58 +08:00
creatixchu dfcd6e6eb0 test(cua): record object API activity advisories 2026-10-17 16:46:15 +08:00
creatixchu 3b08cb5ad7 test(cua): verify object advisories and input receipt independently 2026-10-17 16:44:31 +08:00
creatixchu 9fb1259a08 fix(cua): query explicit WindowServer IDs for input attribution 2026-10-17 16:41:25 +08:00
creatixchu 031f3631ae perf(cua): query only the input event target window 2026-10-17 16:39:40 +08:00
creatixchu f87670c263 fix(cua): address activity attribution and review feedback 2026-10-17 16:38:01 +08:00
creatixchu 5d982dc614 test(cua): refresh focused targets before external input 2026-10-17 16:02:16 +08:00
creatixchu 9bdaf820e2 fix(cua): preserve configured activity milliseconds in replies 2026-10-17 16:01:30 +08:00
creatixchu ce94979eae test(cua): await external input delivery and scope replay activity 2026-10-17 16:00:51 +08:00
creatixchu 509643b374 test(cua): verify external pointer window attribution 2026-10-17 15:59:37 +08:00
creatixchu 8ced2f3756 test(cua): target foreground fixture for external keyboard input 2026-10-17 15:58:19 +08:00
creatixchu 9ec2324ddb test(cua): verify external input and built activity advisories 2026-10-17 15:57:13 +08:00
creatixchu b7b9687428 test(cua): record recent activity in native session replay 2026-10-17 15:56:09 +08:00
creatixchu 9fa26f1d0b test(cua): cover advisory output and cross-agent activity 2026-10-17 15:55:25 +08:00
creatixchu 4c5dec86e4 feat(cua): report recent macOS application activity 2026-10-17 15:53:03 +08:00
LegGasai f7b4dbd752 fix(web): render @ mentions as chips only for existing paths
Sent file and folder mentions now render as reference chips only after the
Session's filesystem confirms the path through the existing
workspaceFiles.stat Remote; a missing path such as a hand-typed @ceshi stays
original text. ui-reference owns a per-plugin presence cache keyed by Session
and path, exposes it to the chips through a keyed hook, treats a settled pick
as confirmed, and aborts outstanding stats on disposal.
2026-10-16 16:00:02 +08:00
gengruilin 30514fa7e0 fix(ui-cli-account): keep generated Remote modules out of the Host build
The Web shell links ui-cli-account statically, and webworker-runtime
reaches the Web shell from the Host aggregate. ui-cli-account referenced
the api-remotes Client project, so the Host compiler compiled Client code
that imports generated /remote modules before the Typert step had written
them, and the build failed. ui-cli-account needs only the Gateway's
`ctx.remote` declaration, so it drops the api-remotes import, project
reference, and development dependency. The event matrix no longer counts
terminal-controller, whose Client listener the Host program reached only
through that path.
2026-10-16 10:42:23 +08:00
gengruilin a67c07532d feat(feishu): expose the lark-cli guides through one feishu skill
The skill catalog lists a single `feishu` entry instead of every skill
that lark-cli embeds. Loading it reads `lark-cli skills list --json` and
returns the DSH guidance, an index of each guide's name and description,
and how to open a guide and the files it references with
`lark-cli skills read`. A failed catalog read fails only that load.

The lark-cli 1.0.97 catalog is kept as a test fixture so the loaded body
stays below the tool-result pruning threshold.
2026-10-15 20:21:48 +08:00
gengruilin e5ae03cae7 chore(wecom): leave the root .gitattributes unchanged
The upstream guides keep their whitespace without a repository-wide exemption; only a commit that adds such lines meets the pre-commit whitespace check.
2026-10-15 17:25:11 +08:00
gengruilin 02e4bf79fd feat(wecom): publish one wecom skill with the upstream skills as its guides
The skill catalog lists only wecom. Its entry carries the DSH guidance, a one-sentence index of the 15 upstream skills that keeps their routing rules, and how to open a guide with the file tools. The upstream copy moves unchanged to skills/wecom/guides, including wecomcli-shared, whose DSH changes move to the entry, which takes precedence where they disagree. Only the guides stay vendored.
2026-10-15 16:44:48 +08:00
gengruilin ee7334f16b fix(feishu): import the CLI account pieces from the Web shell and align package versions
Drop the dsh.client.external request that verify-client-packages rejects for client feature packages, take the root React types, and match the root version 0.2.1-alpha.2.
2026-10-14 23:56:02 +08:00
gengruilin 187603cca0 fix(ui-cli-account): show the tag on the bundle's row pages again
The structural badge subject dropped the Plugins page's row subject, which the badge showed the tag for before.
2026-10-14 23:12:24 +08:00
gengruilin 3c879ea10e refactor(wecom): import the CLI account pieces from the Web shell's platform module 2026-10-14 23:11:35 +08:00
gengruilin b25f3de03c refactor(ui-cli-account): ship the page pieces as a Web shell platform module
Client feature packages may not request another row's runtime values through dsh.client.external, so the shared pieces become a static library the shell seeds into its module table, like ui-dockkit. Plugins import the package root, the web-app row is gone, and the badge takes a structural subject instead of importing the Plugins page types.
2026-10-14 23:08:46 +08:00
gengruilin 056bb5a4af docs(wecom): document the WeCom plugin and register it with the doc gates
Exclude the vendored skills from bilingual pairing and regenerate the catalogs, graphs, and composition reference.
2026-10-14 21:17:13 +08:00
gengruilin eee1573c7a test(wecom): cover authorization, the Plugins page, and the skills session
The Web E2E drives a stand-in wecom-cli through a failed and a successful QR-code authorization; it needs the scaffold to resolve every selected bundle's dependencies, as Feishu's does. The wecom-skills snapshot pins the skill catalog and a wecom-cli call on the private PATH.
2026-10-14 21:17:12 +08:00
gengruilin 448212f8d2 build(wecom): package the WeCom plugin on the CLI account kit
Pin @wecom/cli 1.3.4, publish the bundled skills, register the three packages, and keep the account rules in WecomAccount like Feishu.
2026-10-14 21:17:10 +08:00
gengruilin a70c4d5d0b chore(cli-account): record the kit as the owner of CliOperationId
CLI app plugins return CliOperationId from their Remote methods; one exemption here keeps each plugin from adding its own copy.
2026-10-14 20:51:00 +08:00
gengruilin 3e89d14b6a test(ui-cli-account): satisfy the type-aware lint rules 2026-10-14 19:22:49 +08:00
gengruilin 7dca4e581f docs(feishu): document the plugin on the CLI account kit
Drop the config fields the kit fixes, describe the shared runtime and page pieces, and regenerate the config and Cordis catalogs.
2026-10-14 19:14:35 +08:00
gengruilin 185ca1eca7 test(ui-feishu): cover the Plugins page on the shared CLI account connection
Keep the Feishu presentation, Remote wiring, and notice mapping; the generic mirror cases live with ui-cli-account. The Web e2e reads the shared section's data attributes.
2026-10-14 19:14:34 +08:00
gengruilin 7ec0de79d6 fix(feishu): offer the first trusted setup link and keep the account rules in FeishuAccount
An untrusted HTTPS line printed before the setup link no longer uses up the single offer. FeishuAccount now owns its cancellable phases, trusted hosts, and failure classifier, so the specs exercise the shipped rules; generic runner and runtime cases moved to the CLI account kit.
2026-10-14 19:14:33 +08:00
gengruilin d88e49b4a7 feat(cli-account): report whether an offered link reached the page
A plugin that offers only its first link can then skip untrusted lines and keep waiting for a trusted one.
2026-10-14 18:44:25 +08:00
gengruilin 75d96450b0 refactor(cli-account): declare the shared config schema in the entry module
The config catalog reads a plugin's imported schema only from the entry file it resolves to, so CLI app plugins can now use CliAccountConfig as their Config.
2026-10-14 18:29:14 +08:00
gengruilin 1e40d38359 build(ui-cli-account): use the root React types 2026-10-14 18:12:23 +08:00
gengruilin a7c5ff2477 fix(cli-account): let callers omit defaulted config fields 2026-10-14 18:12:21 +08:00
gengruilin 666604a025 docs(cli-account): add the kit and connector group READMEs
Register both packages with the README, Model Experience, and product-package gates, and regenerate the config catalog, module graph, and composition reference.
2026-10-14 17:51:10 +08:00
gengruilin 57c8447e98 docs(cli-account): document the kit's contracts
Document the executor's deadlines and output limits, the runtime's
one-operation, phase-gated cancellation, trusted-link, and classified-failure
contracts, the shared config fields, and the client mirror and components.
2026-10-14 17:41:20 +08:00
gengruilin 64d8d52106 test(ui-cli-account): cover the connection mirror and Plugins page components
Port the Feishu page connection specs to the kit's connection mirror and
cover the section, tag, activation prompt, confirmation, and notice against
the shared dictionary keys.
2026-10-14 17:37:38 +08:00
gengruilin 55d2cb31fd test(cli-account): cover the CLI runner, account runtime, and config
Port the Feishu CLI runner specs to the kit executor and cover the account
runtime through a scripted fixture account: one operation at a time,
phase-gated cancellation, trusted links, classified failures that never log
exception text, the follow stream, and disposal.
2026-10-14 17:37:16 +08:00
gengruilin 2a01e4f5c9 refactor(feishu): build the Feishu plugin on the shared CLI account kit
Run lark-cli through CliCommandExecutor and the account operations through
CliAccountRuntime, keeping the four operations' commands, parsing, exit-code
3 acceptance, openId check, and failure classification in the plugin. The
plugin page requests the kit's client module, mirrors the account with
CliAccountConnection, and renders the kit's components with the shared
dictionary keys. Only app setup and sign-in waits can be cancelled; the
checks after them cannot. The authorization wait and output limits become
the kit's fixed limits instead of Config fields.
2026-10-14 17:21:53 +08:00
gengruilin b1cc919a51 chore(feishu): pass the package directory to the client bundle preset
The client bundle preset now reads the manifest from the package directory
instead of resolving the package name.
2026-10-14 17:21:52 +08:00
gengruilin d930c4daf4 refactor(wecom): carry the failed result in the page presentation
The presentation keeps the failed operation result itself instead of a
flag, and the section labels non-step phases from the shared `status.*`
copy.
2026-10-14 17:04:03 +08:00
gengruilin 363ca76ac1 feat(ui-cli-account): label the section's phase from the shared dictionary
The section labels its status from the plugin's `status.*` keys unless the
plugin passes a step label for an operation in progress. The notice
translator no longer narrows the toast's notice type.
2026-10-14 17:03:32 +08:00
gengruilin 1c869dabef refactor(wecom): pass buttons and shared copy to the kit section
The section takes the WeCom buttons and failure as data and reads the
shared title, hint, tags, activation, and diagnostic copy through the
plugin's translator.
2026-10-14 16:59:11 +08:00
gengruilin 7a2156aacb feat(ui-cli-account): render shared copy from the plugin's dictionary
CLI plugins translate one shared key set, CliAccountKey, for the section
title, hint, tags, activation prompt, confirmation buttons, and failure
diagnostics; the components read those keys through the plugin's
translator, so the plugin passes only its own text. The section takes its
buttons and extra rows as data and disables them while an action is pending
or the Host stream is down.
2026-10-14 16:58:21 +08:00
gengruilin 32086b1458 refactor(wecom): report classified failures through the kit
Run `auth init` and `auth show --status` through the kit's command control
so a failed operation reports which command failed and its exit code, and
show that diagnostic beside the failure on the plugin page.
2026-10-14 16:54:59 +08:00
gengruilin bcce689968 chore(cli-account): package the kit and load its client half as a shared module
Client plugin bundles may not inline another plugin's values, so the client
kit becomes a client row that CLI plugins request through
dsh.client.external. The web app mounts the row once, as it does for other
shared Plugins page surfaces, and the plugins import its components and
connection mirror from the module table. Add the package manifests,
TypeScript projects, and path mappings for both kit packages.
2026-10-14 16:50:39 +08:00
gengruilin 99e93d27d0 feat(ui-cli-account): show failure diagnostics in the account section
describeFailure joins a failed command's identity, exit code, and the
plugin's allowlisted details for the section's diagnostic line.
2026-10-14 16:34:39 +08:00
gengruilin c6e1467e05 feat(cli-account): report classified command failures
Run account commands through CliOperationControl.run so the runtime records
the plugin's classification of each command result. A failed operation logs
only that classification at error level and returns it in the result;
exception messages and native output, which may contain credentials, are
neither logged nor returned. exitFailure classifies by exit code alone.
2026-10-14 16:34:38 +08:00
gengruilin 605324112a fix(feishu): keep recovery guidance actionable 2026-10-14 16:07:42 +08:00
gengruilin 57f2fa8733 fix(feishu): retain diagnostics in the default Host log 2026-10-14 15:56:05 +08:00
gengruilin 4ba3da89fb fix(feishu): retain safe account failure diagnostics 2026-10-14 15:49:36 +08:00
gengruilin 3081bf7519 docs(tencent-docs): record the measured tool catalog and dotted tool names
A connected Tencent Docs account listed 225 tools in an on-demand catalog of about 37,900 characters, with about 3,000 characters of server instructions; dotted raw names load under hashed function names.
2026-10-14 15:47:05 +08:00
gengruilin 0b2268840d refactor(wecom): build the WeCom plugin on the shared CLI account kit
Run wecom-cli through CliCommandExecutor and the account operations through
CliAccountRuntime, leaving only the platform binary lookup, the
`auth show --status` and `auth init` commands, and their parsing in the
plugin. The plugin page mirrors the account with CliAccountConnection and
renders the kit's section, tag, activation, and notice components. Only the
QR-code wait can be cancelled; the recheck after a scan cannot.
2026-10-14 15:43:50 +08:00
gengruilin e21c18c693 feat(ui-cli-account): share the Plugins page connection pieces of CLI plugins
CliAccountConnection mirrors a plugin's account view, opens the
authorization link once in the browser that started the operation, and
reports outcomes; the section, tag, activation prompt, confirmation, and
notice components render a plugin's six display phases with the copy the
plugin translates. Each plugin keeps its own presentation and dictionary.
2026-10-14 15:24:53 +08:00
gengruilin 1135aa9bf7 feat(cli-account): share the CLI runner and account operations of CLI plugins
CLI app plugins run a third-party CLI that owns the user's account and let
the Plugins page check, connect, and cancel through a Remote. Extract the
mechanism the Feishu plugin introduced: CliCommandExecutor runs one command
on the private Shell PATH with a deadline, an output limit, and line
callbacks; CliAccountRuntime runs one account operation at a time, offers
authorization links on the plugin's trusted hosts, cancels only in the
phases the plugin declares, logs failures, and streams the account view.
Each plugin keeps its own commands, parsing, and states.
2026-10-14 15:24:51 +08:00
gengruilin 4ed6963832 docs(tencent-docs): document the Tencent Docs plugin and the connector group 2026-10-14 14:43:04 +08:00
gengruilin d0ea4fd1a6 chore(tencent-docs): declare the Tencent Docs plugin as an optional product package 2026-10-14 14:43:04 +08:00
gengruilin 16ce10c20a test(tencent-docs): connect and sign out from the plugin page in the Web e2e 2026-10-14 14:43:03 +08:00
gengruilin d7e1a19488 test(tencent-docs): replay the Tencent Docs plugin row in a session snapshot 2026-10-14 14:43:02 +08:00
gengruilin 55070e3e1f test(tencent-docs): cover the plugin over the MCP manager and its account registration 2026-10-30 16:49:30 +08:00
gengruilin 723c703d10 docs(notion): describe the browser half over the shared account surfaces 2026-10-14 14:28:38 +08:00
gengruilin 5f7804a18e test(notion): check the account registration and select the shared section in the Web e2e
The connection and component specs moved to ui-mcp-account; the Notion client spec now checks the dictionary and account registration, and the Web e2e reads the shared data-mcp-account attribute.
2026-10-14 14:28:36 +08:00
gengruilin a8e2e63594 feat(tencent-docs): add the Tencent Docs plugin over the shared MCP manager
The plugin registers Tencent Docs' hosted MCP server with OAuth and on-demand tool loading, adds the Tencent Docs plugin naming guidance, and shows the account on its plugin page through ctx.mcpAccounts.
2026-10-14 14:02:49 +08:00
gengruilin 96381fc888 refactor(notion): show the Notion account through the shared MCP account surfaces
The Notion page registers its server, bundle package, and dictionary with ctx.mcpAccounts instead of carrying its own connection mirror and components.
2026-10-14 13:39:41 +08:00
gengruilin 002c10f71f feat(wecom): connect WeCom from its plugin page
Add the WeCom plugin bundle and its Plugins page row: the authorization
section, the title tag, guidance after the bundle is switched on, and
connection notices, following the Feishu plugin page. An initial check that
fails offers a retry instead of an endless check.
2026-10-14 13:33:50 +08:00
gengruilin 1f149bcc79 feat(wecom): run wecom-cli and its skills on the Host
Register the @wecom/cli platform binary directory on the private Shell PATH,
mount skill-filesystem over the bundled skills, and serve the account check
and QR-code connection over the `wecom` Remote. Connection runs
`auth init --noninteractive --no-browser`, offers its work.weixin.qq.com page
to the browser, and requires `auth show --status` to report authorized.
wecom-cli 1.3.4 has no logout, so the Remote offers none.
2026-10-14 13:33:49 +08:00
gengruilin 0cbde3a20a chore(notion): follow the release version and root React types
The master sync moved every release member to 0.2.1-alpha.2 and made the
root package provide @types/react; the Notion plugin, added in this
branch, kept the previous version and its own React types entry.
2026-10-13 18:15:56 +08:00
gengruilin 4cd1289ddb test(notion): restore the credential store for the plugin snapshot
The headless profile now disables the managed credential store, which
left the MCP manager and the Notion plugin pending. The scenario
re-enables the credentials row, and its system prompt picks up the
current master text.
2026-10-13 17:51:49 +08:00
gengruilin 5e77b20cfd build(notion): pass the package directory to the client bundle helper
The shared client tsdown helper now reads each package's own manifest
from the directory its config passes.
2026-10-13 17:51:49 +08:00
gengruilin f6a8199a84 docs(notion): document the patch row, grant binding, and resource-server listing
The README now explains the bundle's single patch row, that on-demand
loading also needs the mcpResources service, that changing url requires
connecting again, and that the resource prompt names notion before the
account is connected. Local comments state why the guidance section
sorts after the MCP sections, that the test literal pins the guidance
verbatim, and that the tool-schemas sidecar pins the absent tools.
2026-10-13 15:58:36 +08:00
gengruilin 805a3a70cc revert(feishu): drop the ungranted-permission state from the plugin page
The CLI's missing permissions include ones the app has not enabled, such
as vc:meeting.realtime:read, which no sign-in can grant, so the section
kept a warning and a Grant more action that could never clear it. The
connected account is again connected or not; a sign-in that leaves
permissions ungranted still succeeds, and a command that needs a
missing permission reports it when it runs.
2026-10-13 14:07:27 +08:00
gengruilin 5ac009977d feat(feishu): show the linked app and change it after confirmation
The plugin page never showed which Feishu app the CLI uses, and once an
app existed the app step never appeared again. The Host now reports the
configured app id on every account state that has one, and linkApp
replaces the configuration with the app the user creates or chooses on
the Feishu page. The section shows the app id and offers Change app,
which explains that the terminal's lark-cli changes too and that the
user signs in again, then links an app after confirmation.
2026-10-13 11:23:15 +08:00
gengruilin a5ee99d463 feat(feishu): report sign-ins that leave permissions ungranted
A sign-in that the CLI completes with missing permissions, for example
ones that wait for an administrator's approval, was reported as a plain
success. The Host now remembers how many requested permissions the last
sign-in left ungranted for that user and reports them on the connected
account until a full sign-in, another user, or a sign-out. The plugin
page says how many are not in effect yet, shows a warning toast instead
of a success one, and offers Grant more, which signs in again.
2026-10-13 11:14:16 +08:00
gengruilin ff22999254 feat(feishu): link the app and sign in as separate clicks
The plugin page chained app setup and sign-in behind one click, so the
authorization page opened long after that click and real browsers
blocked it while the section said it was open. The feishu Remote now
exposes check, linkApp, and signIn instead of connect: linking an app
stops once the CLI has one, and each step opens its Feishu page from
its own click. The section offers Link Feishu app or Sign in to Feishu
for the account it shows, reports a linked app, and words each step's
page as one to open rather than one already open.
2026-10-13 11:08:36 +08:00
gengruilin a74cf0316e fix(feishu): show a stopped Feishu component instead of an endless check
When the Host's feishu row fails to load, the follow stream ends with a
terminal Remote error and the section kept showing "Checking
connection" without any action. The page now reports that the Feishu
component is not running, points to the component list for the reason,
and offers Retry, which subscribes to the Host again.
2026-10-13 10:57:19 +08:00
gengruilin 50ecabf6a1 test(scripts): expect client CSS declarations from connector packages
Connector packages such as the Notion plugin carry a browser half with
CSS modules, and the client aggregate loads their declarations; the
regression now lists the connector group beside client and extensions.
2026-10-12 16:45:41 +08:00
gengruilin 1a4a7f20b4 docs(notion): regenerate the module graph after the dependency move
The Notion plugin now lists the MCP manager and system prompt as
development dependencies, so the module graph no longer draws runtime
edges to them.
2026-10-12 16:45:40 +08:00
gengruilin c973b66264 test(feishu): connect and sign out from the plugin page in the Web e2e
A stand-in lark-cli plays app setup and device sign-in; each Feishu page the
Host offers opens in the browser, the stand-in finishes once its page is
visited, the section reaches connected, and sign-out returns it to
disconnected.
2026-10-12 14:44:00 +08:00
gengruilin 0a94051ca4 feat(feishu): connect the Feishu account from its plugin page
Split the Feishu plugin into three packages. The @deepseek-ai/dsh-feishu
bundle keeps the install name and inserts two rows: the Host row
@deepseek-ai/dsh-feishu-cli and the Plugins page row
@deepseek-ai/dsh-client-ui-feishu.

The Host row is now a Remote service. It checks the lark-cli default account
for each new follower, links an app with config init and signs in with auth
login, signs out, and cancels, one Host-owned operation at a time. Setup and
sign-in links reach the page only as HTTPS addresses on feishu.cn or
larksuite.com.

The page row shows the Feishu account section, a connection tag, guidance
after the plugin is switched on, and connection notices. It mounts the
feishu Remote itself and opens each link once, only for the operation this
browser started.

The skill guidance now asks the user to connect Feishu on the plugin page and
runs the CLI's own setup only when the user asks to finish it in the
conversation.
2026-10-12 14:43:43 +08:00
gengruilin 7d201fc408 test(web): resolve every selected bundle's dependencies in the e2e scaffold
The scaffold computed its runtime resolution from the extra install anchors
alone, so a profile bundle whose rows are separate packages could not import
them unless the CLI installation also carried the bundle. Resolve from the
loaded profile's layers as well, as the launcher does.
2026-10-12 14:42:31 +08:00
gengruilin b5a8e34f08 chore(notion): keep the MCP manager and system prompt as development dependencies
The Notion plugin imports both services' types only, and the Web and
Desktop compositions provide the services. Declaring them as peers made
the Client/Host dependency policy need a per-plugin exception; as
development dependencies the plugin matches the policy unchanged.
2026-10-12 13:50:47 +08:00
gengruilin b3e71c8869 test(notion): connect and sign out from the plugin page in the Web e2e 2026-10-11 02:50:38 +08:00
gengruilin 7901c7d56b test(notion): replay the connection guidance in the plugin snapshot 2026-10-11 02:45:08 +08:00
gengruilin 4b0ee4c1c9 feat(notion): connect the Notion account from its plugin page
The Notion plugin registered its server but left authorization to a
Remote client that did not exist, so a product user could not connect
an account. Its browser half now shows a Notion account section on the
plugin's page, a connection tag beside the title, guidance after the
plugin is switched on, and toasts for connection outcomes. The page
mirrors the MCP manager's entry and drives authorization, cancellation,
sign-out, and retry through the manager's Remote; it keeps no connection
state of its own and opens an authorization URL only for the attempt it
started.

The model guidance adds one fixed sentence telling the model to send the
user to the plugin page when no Notion tool is available.
2026-10-11 02:44:49 +08:00
gengruilin c710a65ece test(notion): expect the OAuth completion page from the callback 2026-10-11 02:17:38 +08:00
gengruilin 949d065faa chore(feishu): declare the Feishu plugin as an optional product package 2026-10-09 16:55:28 +08:00
gengruilin 1c3f2e4278 chore(notion): declare the Notion plugin as an optional product package 2026-10-09 16:41:55 +08:00
gengruilin 9aedad49de test(notion): replay the Notion plugin row in a session snapshot
Mount the MCP manager and the Notion row in the headless snapshot
composition without a saved grant. The scenario pins the naming
guidance in the system prompt and asserts that no request reaches the
server before authorization.
2026-10-08 16:23:39 +08:00
gengruilin 230c5f7b0e feat(notion): add the Notion plugin over the shared MCP manager
Register Notion's hosted MCP server with OAuth through
ctx.mcpServers.register() for the plugin's lifetime, and add a fixed
system-prompt sentence that names the integration the Notion plugin.
Its tools load on demand by default: each agent sees an index of them
and loads the ones it needs with load_mcp_tools. Authorization, grant
storage, and sign-out stay with the manager's Remote operations;
turning the plugin off keeps the saved grant.
2026-10-08 16:22:49 +08:00
gengruilin 8d3377c226 test(feishu): replay embedded lark-cli skills in a session snapshot
Load lark-doc and read one embedded reference through a stand-in
lark-cli on the private Shell PATH, pinning the prepended DSH guidance
in the recorded skill result.
2026-10-06 00:30:24 +08:00
gengruilin 4ffef092ca feat(feishu): add the Feishu plugin over the official lark-cli
Install a pinned @larksuite/cli with the plugin, register its bin
directory as a private Shell PATH contribution, and publish the CLI's
embedded skills with DSH guidance for setup and sign-in in the
conversation through the shared default CLI account. Repository
installs deny the CLI's binary download; profiles that install the
plugin approve it through Plugin Manager.
2026-10-06 00:30:04 +08:00
7410 changed files with 318124 additions and 86824 deletions

No files matched your search

@@ -0,0 +1,6 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write .agents/notes/archived/architecture/2026-07-31-ptc-runtime-python-fd3-protocol.md
2026-07-31-ptc-runtime-python-fd3-protocol.md: 514f4dd7c7b214e95474e9f5d9c7ba6af4bfeb8b
2026-07-31-ptc-runtime-python-fd3-protocol.zh.md: e959dd75491ed1dd1e66f9ca4de856712054e31c
@@ -1,6 +1,7 @@
# Agent Note: the ptc-runtime-python fd-3 frame protocol
Status: implemented
Archived: 2026-11-11
The CPython PTC runtime lives at `packages/experimental/ptc-runtime-python` and publishes as `@deepseek-ai/dsh-experimental-ptc-runtime-python`; the [publication policy](../../../../packages/experimental/README.md) preserves its experimental status.
@@ -1,6 +1,7 @@
# Agent Note: the ptc-runtime-python fd-3 frame protocol
Status: implemented
Archived: 2026-11-11
CPython PTC 运行时位于 `packages/experimental/ptc-runtime-python`,以 `@deepseek-ai/dsh-experimental-ptc-runtime-python` 名称发布;[发布策略](../../../../packages/experimental/README.zh.md)保留其实验性状态。
+3
View File
@@ -220,6 +220,9 @@
"architecture/2026-07-31-code-runtime-portable-identifier-seam.i18n.yaml": "sha256:e243a62d3b468b6a65c80b284fe934fad09099a42d33c1dca47f435427a851b7",
"architecture/2026-07-31-code-runtime-portable-identifier-seam.md": "sha256:d7a050d3a654b7b0445b8dbe6e87331bbd91ce0bf6ad23c6d83ee32ada85fc2f",
"architecture/2026-07-31-code-runtime-portable-identifier-seam.zh.md": "sha256:286c53e0000bd0a109b67bf3ce5f190197fa674f103075461168768d78ea6770",
"architecture/2026-07-31-ptc-runtime-python-fd3-protocol.i18n.yaml": "sha256:dc4a9f7f26a6cc8d27499f6bc4da505a5be72c5c1d2ded93adcbbbfe818860d7",
"architecture/2026-07-31-ptc-runtime-python-fd3-protocol.md": "sha256:a6525121a528190309ad1da498f919676355d7bbff90875800c6f33c31ff93fa",
"architecture/2026-07-31-ptc-runtime-python-fd3-protocol.zh.md": "sha256:fa381eb718c9c4c78e40be9b1930a9b0b6571bf0be446bcc4f784228c0ef32b8",
"architecture/2026-08-01-packaged-ripgrep-search.i18n.yaml": "sha256:43c9128079955e974fe1da3ce1a10779b4f5a25ac3629f92e3b1de847ad45050",
"architecture/2026-08-01-packaged-ripgrep-search.md": "sha256:36cf2d6daa654abced690965338aec4628069dc77be3a1da6368a9b097a59ff4",
"architecture/2026-08-01-packaged-ripgrep-search.zh.md": "sha256:45b2fe8e0d492eeff313d2ef3c98fd69761b3257eee3476b8bf53312e8b6095f",
@@ -36,5 +36,5 @@
en: 31ba63101fca5790
zh: af4ceefab2033142
/agent-note-prompt-variables-and-tool-guidance-ownership/consequences:
en: 94c38eb61a2dcd4a
zh: 8a047857b6d3a4a3
en: c8df49ae0580af19
zh: 0ecd9a95c44fa7cb
@@ -68,4 +68,4 @@ Per-tool semantics and selection guidance live in tool descriptions. Prompt sect
- `{{model}}` reflects `AgentOptions.model` at assembly time. A plugin that switches models in the `agent/request` waterfall makes the prompt's claim stale for that step, and one that SUPPLIES the model there (options.model unset — the loop's documented fallback) leaves the variable valueless at render, failing a `{{model}}` persona before the waterfall runs. Both have the same remedy, and it is the ownership rule itself: the plugin that owns the late-bound model fact states it early on the `system-prompt/assemble` waterfall (`assembly.variables['model'] = …`) — one owner, both statements; a loop test pins the supply path end-to-end. Accepted.
- While a bound provider is absent (not yet activated, unloaded, mid-HMR-reload), the subagent tool does not exist and a model request in that window simply lacks it. That is the honest state — the alternative was a registered tool whose description or execution could not be trusted.
- Strict interpolation rejects missing or valueless variables before a model request. The turn ends with `error` while the loop remains available for later turns; a persona referencing `{{model}}` requires its composing runtime to supply that value.
- Inline escapes remain unsupported in interpolated text; literal sections need no escaping. PTC unit tests cover both modes and runtime languages, and the recorded `ptc-turn` scenario preserves tool-template examples in the model-visible prompt.
- Inline escapes remain unsupported in interpolated text; literal sections need no escaping. Unit tests cover native presentation and literal TypeScript SDK sections, and the recorded `ptc-turn` scenario preserves tool-template examples in the model-visible prompt.
@@ -68,4 +68,4 @@ Status: implemented
- `{{model}}` 在组装时反映 `AgentOptions.model`。如果一个插件在 `agent/request` waterfall 中切换模型,提示词对该步骤的声明就会过时;如果一个插件在那里提供模型(options.model 未设置——循环文档中记载的回退路径),变量在渲染时无值,包含 `{{model}}` 的 persona 会在 waterfall 运行前失败。两者的补救方式相同,就是归属规则本身:拥有延迟绑定模型事实的插件在 `system-prompt/assemble` waterfall 上提前声明它(`assembly.variables['model'] = …`)——一个归属方,两处声明;一个循环测试端到端固定了 supply 路径。已接受。
- 当一个已绑定的提供方不存在时(尚未激活、已卸载、HMR(热模块替换)重载中),subagent 工具不存在,该窗口内的模型请求中不会包含它。这是诚实的状态——替代方案是注册一个 description 或执行都不可信的工具。
- 严格插值在模型请求之前拒绝缺失或无值的变量。该轮次以 `error` 结束,循环仍可服务后续轮次;引用 `{{model}}` 的 persona 要求组合它的运行时提供该值。
- 插值文本仍不支持行内转义;字面文本段无需转义。PTC 单元测试覆盖两种模式和运行时语言,录制的 `ptc-turn` 场景在模型可见的提示词中保留工具模板示例。
- 插值文本仍不支持行内转义;字面文本段无需转义。单元测试覆盖 native 呈现与字面 TypeScript SDK 段,录制的 `ptc-turn` 场景在模型可见的提示词中保留工具模板示例。
@@ -12,8 +12,8 @@
en: a15c7c13f167e5ac
zh: 63bcc2ef60c2f344
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/packaging-route-yao-pkg-pkg-s-sea-mode:
en: f1c2b60e9474111d
zh: 5de398b5e8554429
en: da2d0e038a0cab9d
zh: 495c770640264c1d
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/the-serving-interface-is-a-plugin-inside-the-dsh-application:
en: 5fdde26e9e8c6108
zh: 629559d733c1f0c5
@@ -24,8 +24,8 @@
en: 4a55602284b462e8
zh: 762c4f8b719f179c
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/python-sdk-distribution-two-carriers-exe-for-production-node-for-development:
en: b2a740a1ab7a5002
zh: a48be6ca6fc65912
en: ea49431552a3f35d
zh: 355a26743e2e9a2d
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/naming-lineage:
en: 31a5aecb8bf828bb
zh: 2dffb6fd2e0f8194
@@ -25,6 +25,8 @@ The exe is packaged with the **`--sea` (enhanced SEA) mode** of [@yao-pkg/pkg](h
The same patch makes the SEA bootstrap's native-addon extraction atomic. On the first `dlopen` of an addon inside the VFS, pkg's `patchDlopen` copies the addon's package tree to `$PKG_NATIVE_CACHE_PATH/pkg/<sha256 of the .node file>/` (default `~/.cache/pkg/...`), a per-user directory that every concurrent process of the same executable shares; upstream writes each file straight to its final path with `writeFileSync`, which truncates a file another process may already have mapped and lets that process's `existsSync`/hash check read a half-written file. Concurrent first starts therefore die with SIGBUS on Linux or fail with `ERR_DLOPEN_FAILED: Library not loaded` on sharp's libvips on macOS (#4664). The patch routes the three write sites through a same-directory temporary file and `renameSync`, so a cache path is either absent or complete, every process finishes its own copy pass before it loads, and concurrent renames of identical content need no lock. The cache location, hash keying, and per-file comparison are unchanged, so a consumer that isolates the cache per instance through `PKG_NATIVE_CACHE_PATH` keeps working; worker threads only define the hook and never install it. Measured (linux-x64, node24 target, pkg 6.21.0, a probe that loads sharp with its 18 MB libvips library, 16 concurrent first starts against one empty cache, five rounds): 39 of 80 processes died with SIGBUS before the change and 0 of 80 after it, with no temporary files left behind.
The same patch makes the VFS honor `{ bigint: true }` in `stat`, `lstat`, their synchronous forms, and `fs.promises`. Upstream returns the same number-valued stats whatever the options, while `dsh-fs-local` and `dsh-fs-sandbox` read VFS paths through BigInt stats, so every `ctx.fs` access to a packaged file failed with `Cannot mix BigInt and other types`: the `read` tool could not open a packaged skill file, and a `skill-filesystem` root inside the VFS made skill discovery incomplete. The patch converts a VFS entry's numbers to the `BigIntStats` fields, including nanosecond times derived from the millisecond values; paths outside the VFS keep Node's own results.
Terminology reminder: pkg's `/snapshot` VFS has nothing to do with this repo's testing-system "snapshot" (ACP replay expected outputs, `$DSH_SNAPSHOT`); this document says "VFS" for the former.
### The serving interface is a plugin inside the dsh application
@@ -54,7 +56,7 @@ CI: [`.github/workflows/build-exe-for-python-sdk.yml`](../../../../.github/workf
### Python SDK distribution: two carriers, exe for production, node for development
The Python SDK lives at [`python/`](../../../../python/README.md): `python/sdk` is the client and `python/sdk-runtime` is the runtime carrier package. The runtime package's data directory holds the build-injected platform executable with its required `-rg` sidecar, lightweight download metadata and Office skills, and optional macOS helper, plus the build-injected `runtime/node/` closure tree for repository development. `resolve_bundled_launch_args()` selects the executable by default; explicit `DSH_RUNTIME_MODE=node` runs `runtime/node/runtime-bootstrap.mjs` on system Node 24.9 or newer. The node carrier never enters wheel distributions, and neither carrier uses a checked-in complete `cordis.yml`.
The Python SDK lives at [`python/`](../../../../python/README.md): `python/sdk` is the client and `python/sdk-runtime` is the runtime carrier package. The runtime package's data directory holds the build-injected platform executable with its required `-rg` sidecar, lightweight download metadata and Office skills, and optional macOS helper, plus the build-injected `runtime/node/` closure tree for repository development. `resolve_bundled_launch_args()` selects the executable by default; explicit `DSH_RUNTIME_MODE=node` runs `runtime/node/runtime-bootstrap.mjs` on system Node `^24.22.3 || >=26.13.1`. The node carrier never enters wheel distributions, and neither carrier uses a checked-in complete `cordis.yml`.
[`scripts/build-python-release.py`](../../../../scripts/build-python-release.py) reads the authoritative `X.Y.Z` or prerelease version from the repository root `package.json`, converts prereleases to their PEP 440 spelling, and stages both packages at that wheel version, with `deepseek-harness-sdk` depending exactly on the matching `deepseek-harness-runtime-bin`. An optional `python-v<repository-version>` release tag is a consistency assertion and is rejected when it differs from the repository version; the source `pyproject.toml` development sentinel never determines a release version. Staging also carries the repository license into both wheels and the third-party notices into the bundled runtime wheel. The SDK is a `py3-none-any` wheel; each wheel-only runtime package contains one exe, lightweight resource metadata and skills, and its architecture-matched ripgrep sidecar, and the macOS wheel also contains its architecture-matched spawn helper. Runtime wheels use `py3-none-manylinux_2_28_x86_64`, `py3-none-manylinux_2_28_aarch64`, `py3-none-macosx_14_0_arm64`, `py3-none-macosx_14_0_x86_64`, or `py3-none-win_amd64`; the Hatch hook rejects sdists, universal tags, mixed-platform payloads, missing or extra sidecars, and unsupported platforms. Both macOS tags deliberately declare a conservative 14.0 installation floor: the packaged Node 24 executables declare macOS 13.5, and the x64 PTY helper declares 10.7, but release validation proves the complete payload only against the 14.0 wheel claim rather than promising each observed component minimum as a supported host. The two macOS wheels remain architecture-specific; no universal2 wheel is published.
@@ -25,6 +25,8 @@ exe 使用 [@yao-pkg/pkg](https://github.com/yao-pkg/pkg)(vercel/pkg 归档后
同一补丁还把 SEA bootstrap 的原生插件解包改成原子写入。VFS 内的插件首次 `dlopen` 时,pkg 的 `patchDlopen` 会把该插件所在的包目录整棵拷到 `$PKG_NATIVE_CACHE_PATH/pkg/<.node 文件的 sha256>/`(默认 `~/.cache/pkg/...`),这是同一个 exe 的所有并发进程共用的按用户目录;上游用 `writeFileSync` 直接写目标路径,会把另一个进程可能已经映射的文件截断,并让该进程的 `existsSync`/哈希比对读到写了一半的文件。因此并发首次启动在 Linux 上以 SIGBUS 崩溃,在 macOS 上对 sharp 的 libvips 报 `ERR_DLOPEN_FAILED: Library not loaded`(#4664)。补丁让三处写入都经过同目录临时文件加 `renameSync`,于是缓存路径要么不存在、要么完整,每个进程都在加载前走完自己的拷贝,相同内容的并发 rename 不需要锁。缓存位置、哈希键与逐文件比对均未改变,通过 `PKG_NATIVE_CACHE_PATH` 按实例隔离缓存的消费方照常工作;worker 线程只定义该钩子而从不安装。 实测(linux-x64、node24 构建目标、pkg 6.21.0,一个加载 sharp 及其 18 MB libvips 库的探针,16 个进程对同一个空缓存并发首次启动,跑五轮):改动前 80 个进程中 39 个以 SIGBUS 崩溃,改动后 80 个全部正常,且无残留临时文件。
同一补丁还让 VFS 的 `stat`、`lstat`、它们的同步形式以及 `fs.promises` 遵守 `{ bigint: true }`。上游无论选项如何都返回同一份数值型 stats,而 `dsh-fs-local` 与 `dsh-fs-sandbox` 通过 BigInt stats 读取 VFS 路径,因此经 `ctx.fs` 访问打包文件时都会以 `Cannot mix BigInt and other types` 失败:`read` 工具打不开打包的 skill 文件,位于 VFS 内的 `skill-filesystem` 根使 skill 发现不完整。补丁把 VFS 条目的数值转换为 `BigIntStats` 字段,其中纳秒时间由毫秒值换算;VFS 之外的路径仍使用 Node 自身的结果。
术语提醒:pkg 的 `/snapshot` VFS 与本仓库测试体系的「快照」(ACP(Agent Client Protocol)回放预期输出、`$DSH_SNAPSHOT`)无关,本文用「VFS」指前者。
### 对外服务接口是 dsh 应用中的插件
@@ -54,7 +56,7 @@ CI 使用 [`.github/workflows/build-exe-for-python-sdk.yml`](../../../../.github
### Python SDK 分发:双载体,exe 用于生产,`node` 用于开发
Python SDK 位于 [`python/`](../../../../python/README.zh.md):`python/sdk` 是客户端,`python/sdk-runtime` 是运行时载体包。运行时包的数据目录包含构建注入的平台可执行文件及其必需的 `-rg` 伴随文件、轻量下载元数据与 Office skills 和可选的 macOS helper,以及供仓库开发使用的构建注入 `runtime/node/` 闭包树。`resolve_bundled_launch_args()` 默认选择可执行文件;显式设置 `DSH_RUNTIME_MODE=node` 会在系统 Node 24.9 或更高版本上运行 `runtime/node/runtime-bootstrap.mjs`。node 载体从不进入 wheel 分发,两种载体都不使用检入的完整 `cordis.yml`。
Python SDK 位于 [`python/`](../../../../python/README.zh.md):`python/sdk` 是客户端,`python/sdk-runtime` 是运行时载体包。运行时包的数据目录包含构建注入的平台可执行文件及其必需的 `-rg` 伴随文件、轻量下载元数据与 Office skills 和可选的 macOS helper,以及供仓库开发使用的构建注入 `runtime/node/` 闭包树。`resolve_bundled_launch_args()` 默认选择可执行文件;显式设置 `DSH_RUNTIME_MODE=node` 会在系统 Node `^24.22.3 || >=26.13.1` 上运行 `runtime/node/runtime-bootstrap.mjs`。node 载体从不进入 wheel 分发,两种载体都不使用检入的完整 `cordis.yml`。
[`scripts/build-python-release.py`](../../../../scripts/build-python-release.py) 从仓库根目录的 `package.json` 读取权威的 `X.Y.Z` 或预发布版本,把预发布版本转换为 PEP 440 写法,并以该 wheel 包版本暂存两个包,让 `deepseek-harness-sdk` 精确依赖匹配版本的 `deepseek-harness-runtime-bin`。可选的 `python-v<repository-version>` 发布标签只是一项一致性断言,与仓库版本不同时会被拒绝;源码 `pyproject.toml` 中的开发占位版本从不决定发布版本。暂存过程还会把仓库许可证放入两个 wheel 包,并把第三方声明放入内置运行时 wheel 包。SDK 是 `py3-none-any` wheel 包;每个只提供 wheel 包的运行时包都包含一个 exe、轻量资源元数据与 skills 及架构匹配的 ripgrep 伴随文件,macOS wheel 包还包含与其架构匹配的 spawn helper。运行时 wheel 包使用 `py3-none-manylinux_2_28_x86_64`、`py3-none-manylinux_2_28_aarch64`、`py3-none-macosx_14_0_arm64`、`py3-none-macosx_14_0_x86_64` 或 `py3-none-win_amd64`;Hatch 钩子拒绝 sdist、通用标签、混合平台载荷、伴随文件缺失或多余,以及不支持的平台。两个 macOS 标签都会特意声明保守的 14.0 安装下限:打包后的 Node 24 可执行文件声明 macOS 13.5,x64 PTY helper 声明 10.7,但发布验证只按照 14.0 wheel 声明证明完整载荷,不会把各组件实测的最低版本承诺为受支持宿主。两个 macOS wheel 包仍按架构分别发布,不发布 universal2 wheel 包。
@@ -15,8 +15,8 @@
en: 0e1399cad4151f87
zh: 960fa0ccbe0f8fea
/agent-note-cooperative-tool-cancellation-at-the-registry-boundary/decision/cancellation-codes-record-whether-dispatch-occurred:
en: 86c5566581c1d3d6
zh: 3cb71fbb97bdb291
en: 4d8436958c27f98e
zh: cd4ed8238428a2c4
/agent-note-cooperative-tool-cancellation-at-the-registry-boundary/decision/pre-aborted-entry-short-circuits-after-materialization:
en: 53362db6a0c71698
zh: 311de45ca26d3fdc
@@ -32,7 +32,7 @@ An around-dispatch wrapper may replace `exec.signal` for its delegated lifetime
`ABORTED_BEFORE_DISPATCH` carries `{ name: 'AbortError' }` and model text `Error: tool call aborted before dispatch`. It applies whenever cancellation prevents body invocation, including pre-aborted entry, cancellation during pre-policy or approval, an aborted wrapper signal, a wrapper success overtaken by caller cancellation before delegation, and agent-loop siblings skipped after turn cancellation.
`ABORTED` carries model text `Error: tool call aborted` and applies only after the body was invoked, including cancellation while an around wrapper or post-policy listener waits after body completion. A started body that throws the signal's reason or an `Error` named `AbortError` without `HarnessError` identity keeps that message and carries `{ name: 'AbortError', code: 'ABORTED' }`. A denial, wrapper failure, other tool failure, or post-policy failure remains more specific than generic cancellation. A timeout owned by timeout-policy remains `TOOL_TIMEOUT`, and contexts deferred before a successful outcome is replaced remain attached.
`ABORTED` carries model text `Error: tool call aborted` and applies only after the body was invoked, including cancellation while an around wrapper or post-policy listener waits after body completion. A started body that throws the signal's reason or an `Error` named `AbortError` without `HarnessError` identity keeps that message and carries `{ name: 'AbortError', code: 'ABORTED' }`. A `tools/execute` wrapper that throws such a value after caller cancellation is classified the same way, with `ABORTED_BEFORE_DISPATCH` when the body never started. A denial, other wrapper failure, other tool failure, or post-policy failure remains more specific than generic cancellation. A timeout owned by timeout-policy remains `TOOL_TIMEOUT`, and contexts deferred before a successful outcome is replaced remain attached.
### Pre-aborted entry short-circuits after materialization
@@ -32,7 +32,7 @@ Status: implemented
`ABORTED_BEFORE_DISPATCH` 携带 `{ name: 'AbortError' }` 和模型可见文本 `Error: tool call aborted before dispatch`。凡取消阻止工具主体调用时都使用该结果,包括进入时已中止、前置策略或审批期间取消、包装层信号已中止、包装层在委托前返回的成功结果被调用方取消抢先,以及轮次取消后 agent loop(智能体循环)跳过的同批调用。
`ABORTED` 携带模型可见文本 `Error: tool call aborted`,并且只在工具主体已经调用后使用,包括工具主体完成后环绕包装层或后置策略监听器等待期间发生的取消。已开始的工具主体抛出 signal 的 reason,或不具备 `HarnessError` 身份、name 为 `AbortError` 的 `Error` 时,结果保留该 message,并携带 `{ name: 'AbortError', code: 'ABORTED' }`。拒绝、包装层失败、其他工具失败或后置策略失败比通用取消更具体。timeout-policy 自身拥有的超时仍为 `TOOL_TIMEOUT`,成功结果被取消替换前延后附加的上下文仍会保留。
`ABORTED` 携带模型可见文本 `Error: tool call aborted`,并且只在工具主体已经调用后使用,包括工具主体完成后环绕包装层或后置策略监听器等待期间发生的取消。已开始的工具主体抛出 signal 的 reason,或不具备 `HarnessError` 身份、name 为 `AbortError` 的 `Error` 时,结果保留该 message,并携带 `{ name: 'AbortError', code: 'ABORTED' }`。`tools/execute` 包装层在调用方取消后抛出这类值时按同样方式归类,工具主体尚未开始时为 `ABORTED_BEFORE_DISPATCH`。拒绝、其他包装层失败、其他工具失败或后置策略失败比通用取消更具体。timeout-policy 自身拥有的超时仍为 `TOOL_TIMEOUT`,成功结果被取消替换前延后附加的上下文仍会保留。
### 进入时已中止会在物化后短路
@@ -15,26 +15,26 @@
en: 6af228b03e5e533f
zh: 276a522af6be5d7a
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/decision/one-module-system-one-plugin-governor:
en: 575aad62490f32e9
zh: a6c18eb63965fc1e
en: 5f5daec51b20db77
zh: e4d6f78fc1b4b835
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/decision/combo-external-script-arrival-and-source-maps:
en: 0a4240d88cca240a
zh: 8f5f1527caf571cd
en: 04b9f0138b5d2288
zh: 2a749db57f6e7a10
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/decision/the-loading-flow-end-to-end:
en: dd05aa1ee608c414
zh: 2863ced0086e3122
en: 1f7db6ecfc0b0831
zh: f6bf37dc921a7d40
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/decision/live-graph-reconciliation:
en: 37e2fa1fe5cb2b95
zh: 80e513db87709cb4
en: d7777566a2594654
zh: 509cad4a363184ae
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/decision/hot-reload-one-driver-plugin-self-watched-bundles:
en: c1fdcb3e6f074a7a
zh: b08c7b1ff25acb09
en: d31506b6ccca554e
zh: 91f4eb62927ebabe
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/package-ownership:
en: 94ca0d09e6fd1e3a
zh: d5949a2bdec795ba
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/consequences:
en: 624efdd136029771
zh: 7d60207147e631fe
en: cfeb5dc97753e46f
zh: 92da07a598f7cfb0
/agent-note-client-plugin-loading-lazy-factories-cordis-lifecycle-and-hot-reload/alternatives-considered:
en: b8f036f50cff7cd8
zh: 6d623c4a1f4314b1
@@ -34,7 +34,7 @@ The web kernel remains framework-free and imports no dynamic package value. Modu
The browser mirrors the host's division of labor. `dsh-client-modules` (`ClientModuleSystem`) takes the module-system seat that Node's internal ESM loader holds host-side; the same vendored `@cordisjs/plugin-loader` keeps the governance seat on both sides. The line between them in one sentence: **the module system owns module identity and bytes — how code arrives, registers, and becomes an exports; the Loader owns plugin lifecycle — when a plugin mounts, what it waits for, and how it is torn down.**
`ClientModuleSystem` is a lazy CJS table. Executing a bundle only **registers** its factory — an entry calls `window.__ModuleLoader__.load({ id, factory })`, while a chunk also supplies its generated filename — and nothing else happens. Every module body side effect, CSS injection included, lives inside the factory closure and runs at materialization: the first `require`/import of that id, memoized after that. Import and prefetch recursively register declared dynamic requests before their consumer; a factory then materializes any registered-but-unmaterialized request synchronously. The callable `require` resolves synchronous module-table requests; its `require.async` operation returns a Promise that loads, registers, and materializes one package-local chunk. The shared tsdown preset compiles source `import()` expressions for package-local chunks to that distinct operation. The supported output is self-contained: an entry or chunk cannot synchronously require another relative `client*.js` output. The table resolves through a fixed branch order: seed word → memoized record → graph-row classic-script registration → registered-factory materialization → loud throw. The modules factory is the bootstrap exception: the HTML facade materializes it first, and construction places those same exports directly in the memoized table. That final throw is the runtime mirror of the build-time purity gate. The system also keeps per-module bookkeeping — owned `<style data-plugin>` tag ids, observed require edges — and exposes the two verbs HMR needs: `prefetch(id)` (register the requested dynamic factories and the row's own factory; concurrent arrivals share one task) and `invalidate(id)` (advance the owner generation and drop a non-bootstrap package's entry and chunk factories and records so the next arrival reloads them). A chunk request captured under an older generation cannot populate the new generation.
`ClientModuleSystem` is a lazy CJS table. Executing a bundle only **registers** its factory — an entry calls `window.__ModuleLoader__.load({ id, factory })`, while a chunk also supplies its generated filename — and nothing else happens. JavaScript module body side effects live inside the factory closure and run at materialization: the first `require`/import of that id, memoized after that. Import and prefetch recursively register declared dynamic requests before their consumer; a factory then materializes any registered-but-unmaterialized request synchronously. The callable `require` resolves synchronous module-table requests; its `require.async` operation returns a Promise that loads, registers, and materializes one package-local chunk. The shared tsdown preset compiles source `import()` expressions for package-local chunks to that distinct operation. The supported output is self-contained: an entry or chunk cannot synchronously require another relative `client*.js` output. The table resolves through a fixed branch order: seed word → memoized record → graph-row classic-script registration → registered-factory materialization → loud throw. The modules factory is the bootstrap exception: the HTML facade materializes it first, and construction places those same exports directly in the memoized table. That final throw is the runtime mirror of the build-time purity gate. The system also keeps per-module bookkeeping — owner identity, optional opaque metadata producers, and observed require edges — and exposes the two verbs HMR needs: `prefetch(id)` (register the requested dynamic factories and the row's own factory; concurrent arrivals share one task) and `invalidate(id)` (advance the owner generation and drop a non-bootstrap package's entry and chunk factories and records so the next arrival reloads them). A chunk request captured under an older generation cannot populate the new generation.
The vendored Loader consumes the module system through its `internal` contract — the only call site is `tree.import` — and owns everything entry-shaped: entry creation, fiber activation through cordis service waiting (PENDING until injected services exist, cascading when a service is provided), update/refresh, teardown. The governance code is byte-identical to the host side, per vendor policy. Browserization is compile-time mapping in the shell's vite config: a `node:module` stub alias plus `process.*` defines make `ModuleLoader.fromInternal()` return undefined — exactly the empty slot the shell fills. The module system mounts as `ctx.modules`.
@@ -46,7 +46,7 @@ A `require.async("./client.<name>.js")` call requests the exact revisioned `/plu
The shared tsdown preset emits a map for every plugin entry and chunk and rewrites first-party source paths into the browser-resolvable repository form `/packages/<group>/<package>/src/...`. The production Client pass consumes `lib/types`; the preset supplies each tsc map to Rolldown and fills `sourcesContent` from the original files, so the final map reaches TypeScript/TSX instead of stopping at emitted JavaScript. Other workspace sources inlined into a bundle likewise resolve to their `packages/` owner, while dependency paths remain unchanged. Combo generation strips each local debug directive, records its generated-line offset, resolves every authored source against the original per-plugin map URL, and emits an Indexed Source Map v3. An authored map supplies its section; otherwise an identity section embeds the generated bundle and uses the packer's `sourceURL` as its source name when present. The absolute combo map URL mirrors the script resource list by changing every `client.js` suffix to `client.js.map`, so `/plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` points to `/plugins/??<package-a>/client.js.map,<package-b>/client.js.map&rev=<rev>`. A chunk script likewise points to its own map URL. Source-map files are read and combined only when those map URLs receive `GET`; `HEAD` materializes neither script nor map bodies. The Vite shell also emits source maps, letting shell code and externally loaded plugins map stacks and performance profiles back to TypeScript/TSX.
The graph retains each row's revisioned one-resource combo URL for HMR and adds a revisioned descriptor for every startup combo request; several descriptors may carry the same scheduling phase. Initial publication and `rebuilt(id)` use the same hash of entry mtime, ctime, and size; artifact contents never enter the hash. Ctime distinguishes rewrites that preserve mtime and size. A Host restart over unchanged artifacts therefore retains every row revision, so the reconnecting SSE snapshot does not trigger browser plugin replacement. The shared preset stamps the entry after every package output is written; a chunk-only build therefore advances the owner revision without a Host-side sibling scan. Startup combo revisions derive from the ordered row revisions. Script bodies are assembled on their first `GET`; source-map files are read and combined separately on their first map `GET`. `HEAD` materializes neither body. Versioned scripts and maps use immutable caching, and unrelated graph recomposition retains already-materialized chunk responses at the same revision. The Host serves only exact generated URLs; stale revisions and unadvertised resource lists return 404 instead of aliasing different bytes. An external script's `error` event exposes neither response status nor body, so failure diagnostics name only the URL; the same-origin Host and build-stamped registration id form the identity boundary, while the post-`load` factory-presence check rejects an artifact that did not register the expected id.
The graph retains each row's revisioned one-resource combo URL for HMR and adds a revisioned descriptor for every startup combo request; several descriptors may carry the same scheduling phase. Initial publication and `rebuilt(id)` use the same hash of entry mtime, ctime, and size; artifact contents never enter the hash. Ctime distinguishes rewrites that preserve mtime and size. A Host restart over unchanged artifacts therefore retains every row revision, so the reconnecting stream baseline does not trigger browser plugin replacement. The shared preset stamps the entry after every package output is written; a chunk-only build therefore advances the owner revision without a Host-side sibling scan. Startup combo revisions derive from the ordered row revisions. Script bodies are assembled on their first `GET`; source-map files are read and combined separately on their first map `GET`. `HEAD` materializes neither body. Versioned scripts and maps use immutable caching, and unrelated graph recomposition retains already-materialized chunk responses at the same revision. The Host serves only exact generated URLs; stale revisions and unadvertised resource lists return 404 instead of aliasing different bytes. An external script's `error` event exposes neither response status nor body, so failure diagnostics name only the URL; the same-origin Host and build-stamped registration id form the identity boundary, while the post-`load` factory-presence check rejects an artifact that did not register the expected id.
### The loading flow, end to end
@@ -70,17 +70,19 @@ Why is the roster yml rows and not a scan? Because which plugins compose into a
4. `settled` = every entry created + `loader.await()` quiescent + the boot audit. The audit lists each import-failed, FAILED, or PENDING fiber with its activation error or missing services. It exists because cordis inject waits have no timeout. An inactive entry on the browser required list rejects startup; other inactive entries produce one console warning ([startup policy](2026-09-09-consumer-owned-startup-strictness.md)).
5. The framework-free loading page projects real fiber states via `internal/status`. After the audit accepts the tree, the kernel calls `ctx.uiRenderer.mount(container)` and replaces the page with the real UI in one pass.
Stylesheet metadata and renderer ownership follow the [module metadata decision](2026-11-05-client-module-metadata.md); module loading retains the producer without evaluating it.
### Live graph reconciliation
The modules controller owns exactly the Loader entries created from the boot manifest. Full Host snapshots update its module descriptors and reconcile those entries; other Loader contributors retain ownership. New modules arrive through single-resource URLs because replaying a startup batch could register an existing factory twice. Removal uses Loader deletion, then drains the captured fiber before removing unused modules and styles. Declared and observed transitive requests keep shared modules alive. Factory revision tracking is independent of entry activation because a download or materialization can finish without creating an entry. Graph updates invalidate stale factories and failed arrival targets without managed entries, clearing their styles before any consumer imports its dependencies; rebuilt frames also reconcile entries missing after import failures.
The modules controller owns exactly the Loader entries created from the boot manifest. Full Host snapshots update its module descriptors and reconcile those entries; other Loader contributors retain ownership. New modules arrive through single-resource URLs because replaying a startup batch could register an existing factory twice. Removal uses Loader deletion, then drains the captured fiber before removing unused module records. Declared and observed transitive requests keep shared modules alive. Factory revision tracking is independent of entry activation because a download or materialization can finish without creating an entry. Graph updates invalidate stale factories and failed arrival targets without managed entries, notifying resource consumers before any consumer imports its dependencies; rebuilt frames also reconcile entries missing after import failures.
The Host SSE adapter forwards existing graph-change notifications and sends the current full graph on connection. The graph describes desired browser entries, not Host cleanup completion: Host lifecycle ordering belongs to its Loader, while each browser waits for its own removed fibers. Graph reconciliation and rebuilt code share one page-owned queue. Local generations prevent stale downloads from mounting; opaque revisions are compared only for equality. The settings inventory reports page-local errors and can retry the same graph without changing Host enablement. This preserves unrelated page state and avoids both an application restart and a second plugin executor. Electron's independent installation flow remains outside this mechanism.
The Host `pluginEvents/follow` Remote stream forwards existing graph-change notifications and opens every generation with the current full graph; graph rows also carry each plugin's synced configuration ([browser plugin configuration sync](2026-11-15-client-config-sync.md)). The graph describes desired browser entries, not Host cleanup completion: Host lifecycle ordering belongs to its Loader, while each browser waits for its own removed fibers. Graph reconciliation and rebuilt code share one page-owned queue. Local generations prevent stale downloads from mounting; opaque revisions are compared only for equality. The settings inventory reports page-local errors and can retry the same graph without changing Host enablement. This preserves unrelated page state and avoids both an application restart and a second plugin executor. Electron's independent installation flow remains outside this mechanism.
### Hot reload: one driver plugin, self-watched bundles
Hot reload is a composition decision: the web bundle mounts the `client-hmr` row (a normal plugin package) unconditionally; its node half brings the bundle watch and the SSE channel, and the chain stays idle until a rebuild watcher rewrites client bundles. A composition that must not expose it disables the row.
Hot reload is a composition decision: the web bundle mounts the `client-hmr` row (a normal plugin package) unconditionally; its node half brings the bundle watch and the authenticated plugin-events Remote stream, and the chain stays idle until a rebuild watcher rewrites client bundles. A composition that must not expose it disables the row.
How does a rebuilt bundle become a reload signal? The hmr node half observes it itself — no builder tells it. Before reading each startup snapshot, the module host captures the entry stat baseline and exposes it through `ctx.clientModules.artifactBaseline(id)`. One HMR-owned interval compares every current graph row with that baseline. An unchanged row starts watching without a content read or hash; a write after baseline capture is already a stat delta and only that row enters `rebuilt(id)`. This avoids redundant reads when installing the watcher and avoids `fs.watchFile`, whose asynchronous first baseline can silently absorb a construction-time rebuild. Watch membership follows `onGraphChanged`; vanished rows drop out, and an entry missing at poll time keeps its row dirty so reappearance retries publication even when mtime and size match the baseline. The shared tsdown preset stamps `client.js` after every sibling output has been written; on an entry mtime, ctime, or size delta, or a dirty row, `rebuilt(id)` derives the revision from those three metadata values. It reads the new bundle snapshot only if the revision changes. A chunk-only edit therefore changes the revision, and a partial write followed by the completion stamp supplies a later stat change that self-heals. When the `rev` changes, the node half broadcasts a `rebuilt` frame on `GET /plugins/events` — a system SSE channel that sends the full graph on connect and `rebuilt` frames on change, presentation-only wire that never enters the session log. Polling is deliberate because inotify does not fire on the weka network mount, the same reason the build-side watcher needs `--poll`; one entry stat per row and interval is sufficient, the interval is a validated config field (default 500ms), and disposal clears the one timer. Rebuilding artifacts is any process using the shared Client tsdown preset — `scripts/dev-web.ts` remains the watch-build entry point, discovering its package list through `dsh.client` while scanning `packages/*/*/package.json` at startup — and builder and host share no notification protocol.
How does a rebuilt bundle become a reload signal? The hmr node half observes it itself — no builder tells it. Before reading each startup snapshot, the module host captures the entry stat baseline and exposes it through `ctx.clientModules.artifactBaseline(id)`. One HMR-owned interval compares every current graph row with that baseline. An unchanged row starts watching without a content read or hash; a write after baseline capture is already a stat delta and only that row enters `rebuilt(id)`. This avoids redundant reads when installing the watcher and avoids `fs.watchFile`, whose asynchronous first baseline can silently absorb a construction-time rebuild. Watch membership follows `onGraphChanged`; vanished rows drop out, and an entry missing at poll time keeps its row dirty so reappearance retries publication even when mtime and size match the baseline. The shared tsdown preset stamps `client.js` after every sibling output has been written; on an entry mtime, ctime, or size delta, or a dirty row, `rebuilt(id)` derives the revision from those three metadata values. It reads the new bundle snapshot only if the revision changes. A chunk-only edit therefore changes the revision, and a partial write followed by the completion stamp supplies a later stat change that self-heals. When the `rev` changes, the node half publishes a `rebuilt` frame on the authenticated `pluginEvents/follow` Remote stream, which opens every generation with the full graph and then sends `graph` and `rebuilt` increments; it is presentation-only wire that never enters the session log. Polling is deliberate because inotify does not fire on the weka network mount, the same reason the build-side watcher needs `--poll`; one entry stat per row and interval is sufficient, the interval is a validated config field (default 500ms), and disposal clears the one timer. Rebuilding artifacts is any process using the shared Client tsdown preset — `scripts/dev-web.ts` remains the watch-build entry point, discovering its package list through `dsh.client` while scanning `packages/*/*/package.json` at startup — and builder and host share no notification protocol.
On the browser side, the transport delegates code replacement to the same modules controller that owns graph reconciliation:
@@ -88,13 +90,13 @@ On the browser side, the transport delegates code replacement to the same module
2. `prefetch` — load that one-resource external script and register the fresh factory while the old fiber still serves. The initial multi-resource script never executes again.
3. `registry.delete` — before touching the fiber. A bare fiber dispose trips the vendored Loader's self-dispose branch, which would disable the entry permanently.
4. Drain the old fiber's disposers.
5. Remove owned `<style data-plugin>` tags.
6. Materialize the new exports through the module system, then call `entry.refresh()` to mount them through Loader. CSS re-injects after the old disposers drain; explicit materialization exposes the import error before Loader can reduce it to a console log.
5. Renderer observes module invalidation and removes obsolete stylesheet resources.
6. Materialize the new exports through the module system, then call `entry.refresh()` to mount them through Loader. Renderer installs metadata-provided styles after successful materialization; explicit materialization exposes the import error before Loader can reduce it to a console log.
7. `fiber.await()` — rethrows loud.
Bootstrap replacement is rejected before invalidation or teardown: the module system retains its initial exports, so remounting its old code would reset consumers without applying the requested revision. The page reports the required reload and preserves the bootstrap fiber. Every non-bootstrap plugin shares the replacement semantics; an `immediately` row reloads exactly like a lazy one. Dependency cascade costs zero client code: a fiber's activation epoch strings its service providers' uids, so replacing a foundational provider such as connection re-loads every dependent through cordis itself — correct, if heavy.
Reload creates a fresh fiber and component state; it does not preserve React state inside the replaced plugin. Static assembly libraries and the shell require a rebuilt page; when the Host itself serves another release, the page holds plugin replacement and asks whether to reload ([Host release change prompt](../feature/2026-10-14-host-release-change-refresh-prompt.md)). Failed imports or activation remain diagnosable and retryable without rolling back unrelated plugins. Self-reload closes the old SSE channel and opens a new one; its full snapshot repairs missed graph changes. Boot, graph updates and rebuilt frames share the same queue, so a code replacement cannot overlap initial module arrival.
Reload creates a fresh fiber and component state; it does not preserve React state inside the replaced plugin. Static assembly libraries and the shell require a rebuilt page; when the Host itself serves another release, the page holds plugin replacement and asks whether to reload ([Host release change prompt](../feature/2026-10-14-host-release-change-refresh-prompt.md)). Failed imports or activation remain diagnosable and retryable without rolling back unrelated plugins. Self-reload closes the old stream and opens a new one; its full snapshot repairs missed graph changes. Boot, graph updates and rebuilt frames share the same queue, so a code replacement cannot overlap initial module arrival.
## Package ownership
@@ -106,7 +108,7 @@ One governance implementation runs on both sides of the wire; the browser-specif
Costs accepted: the vendored Loader carries idle machinery in the browser (EntryTree persistence is a no-op, groups/isolation unused); every plugin edit in dev pays a bundle rebuild plus fiber remount; graph `inject` rows guide factory arrival but service availability remains the activation authority, so a mismatch appears at the boot audit; the static UI libraries keep direct value exports; every bundle gains a source-map artifact; and external-script failures provide only coarse URL diagnostics instead of the HTTP status available to an explicit fetch. The Host retains bundle snapshots and lazy response plans for the current graph and one prior startup generation. Script and map bodies are cached after their first `GET`, so memory grows with bundle snapshots and requested response bodies. Each materialized response stays fixed at its URL; a prior-generation map first requested after a rebuild reads the current map file.
Roster: it lives in the web bundle's config tree (`packages/bundle/web-app/cordis.patch.yml`); `mountWebPlugins` and the `CLIENT_PACKAGES` constant are gone, and recomposing a deployment means swapping the yml/overlay. The graph composer lives in the `dsh-client-modules` node half, while the parser-preloaded client face bootstraps the browser module table. The webserver remains a plain route-registration plugin; `/api/*` binding, browser authentication, RPC envelopes, and exact Fetch routes belong to the Connection node half, while Remote dispatch belongs to API Gateway and the dev bundle watch plus SSE channel belongs to the hmr node half.
Roster: it lives in the web bundle's config tree (`packages/bundle/web-app/cordis.patch.yml`); `mountWebPlugins` and the `CLIENT_PACKAGES` constant are gone, and recomposing a deployment means swapping the yml/overlay. The graph composer lives in the `dsh-client-modules` node half, while the parser-preloaded client face bootstraps the browser module table. The webserver remains a plain route-registration plugin; `/api/*` binding, browser authentication, RPC envelopes, and exact Fetch routes belong to the Connection node half, while Remote dispatch belongs to API Gateway and the dev bundle watch plus the plugin-events Remote stream belongs to the hmr node half.
## Alternatives considered
@@ -34,7 +34,7 @@ Web 内核保持不依赖框架,也不 import 任何动态包实体。Modules
浏览器复刻 host 侧的分工。`dsh-client-modules`(`ClientModuleSystem`)坐上 host 侧由 Node 内部 ESM loader 占据的模块系统席位;同一份 vendored `@cordisjs/plugin-loader` 在两侧都坐治理席。二者的分界线一句话说尽:**模块系统拥有模块身份与字节——代码怎么到达、怎么登记、怎么变成导出内容;Loader 拥有插件生命周期——插件何时挂载、等待什么、如何拆除。**
`ClientModuleSystem` 是一张 lazy CJS 表。执行 bundle 只**登记**其 factory——入口调用 `window.__ModuleLoader__.load({ id, factory })`,chunk 还会提供其生成文件名——此外什么都不发生。模块体的一切副作用(包括 CSS 注入)都住在 factory 闭包里,在物化时运行:物化即该 id 的首次 `require`/import,此后记忆化。Import 和 prefetch 会先递归登记已声明的动态请求,再登记消费者;随后 factory 会同步物化任何已登记但尚未物化的请求。可调用的 `require` 解析同步模块表请求;其 `require.async` 操作返回 Promise,负责加载、登记并物化一个包内 chunk。共享 tsdown 预设把源码中针对包内 chunk 的 `import()` 表达式编译到这个独立操作。受支持的产物必须自包含:入口或 chunk 不能同步 require 另一个相对 `client*.js` 产物。模块表按固定分支顺序解析:seed word → 记忆化记录 → graph row classic-script 登记 → 已登记 factory 物化 → 大声抛错。Modules factory 是自举例外:HTML facade 先物化它,构造过程再把同一 exports 直接写入记忆化表。最后这一抛是构建期纯度门禁在运行时的镜像。系统还保管逐模块簿记——名下 `<style data-plugin>` 标签 id、观测到的 require 边——并暴露 HMR(热模块替换)需要的两个动词:`prefetch(id)`(登记所请求的动态 factory 和本 row 自身的 factory;并发到达共享一个任务)与 `invalidate(id)`(推进 owner 代次并丢弃非 bootstrap 包的入口和 chunk factory 及记录,让下次到达重新加载它们)。在旧代次捕获的 chunk 请求不能填充新代次。
`ClientModuleSystem` 是一张 lazy CJS 表。执行 bundle 只**登记**其 factory——入口调用 `window.__ModuleLoader__.load({ id, factory })`,chunk 还会提供其生成文件名——此外什么都不发生。JavaScript 模块体副作用位于 factory 闭包里,在物化时运行:物化即该 id 的首次 `require`/import,此后记忆化。Import 和 prefetch 会先递归登记已声明的动态请求,再登记消费者;随后 factory 会同步物化任何已登记但尚未物化的请求。可调用的 `require` 解析同步模块表请求;其 `require.async` 操作返回 Promise,负责加载、登记并物化一个包内 chunk。共享 tsdown 预设把源码中针对包内 chunk 的 `import()` 表达式编译到这个独立操作。受支持的产物必须自包含:入口或 chunk 不能同步 require 另一个相对 `client*.js` 产物。模块表按固定分支顺序解析:seed word → 记忆化记录 → graph row classic-script 登记 → 已登记 factory 物化 → 大声抛错。Modules factory 是自举例外:HTML facade 先物化它,构造过程再把同一 exports 直接写入记忆化表。最后这一抛是构建期纯度门禁在运行时的镜像。系统还保管逐模块簿记——owner 身份、可选且不求值的元信息函数、观测到的 require 边——并暴露 HMR(热模块替换)需要的两个动词:`prefetch(id)`(登记所请求的动态 factory 和本 row 自身的 factory;并发到达共享一个任务)与 `invalidate(id)`(推进 owner 代次并丢弃非 bootstrap 包的入口和 chunk factory 及记录,让下次到达重新加载它们)。在旧代次捕获的 chunk 请求不能填充新代次。
vendored Loader 经其 `internal` 约定消费模块系统——唯一调用点是 `tree.import`——并拥有一切 entry 形状的事务:entry 创建、fiber 经 cordis 服务等待的激活(注入的服务未就位即保持 PENDING,服务 provide 时级联激活)、update/refresh、拆除。治理代码按 vendor 政策与 host 侧逐字节相同。浏览器化是壳 vite 配置里的编译期映射:一个 `node:module` stub 别名加若干 `process.*` define,使 `ModuleLoader.fromInternal()` 返回 undefined——这正是留给壳来填的空槽。模块系统挂载为 `ctx.modules`。
@@ -46,7 +46,7 @@ Host 会快照每个已构建插件入口 bundle,并把每个调度阶段的
共享 tsdown 预设为每个插件入口与 chunk 产出 map,并把第一方源码路径重写成浏览器可识别的仓库形式 `/packages/<group>/<package>/src/...`。生产 Client 构建会消费 `lib/types`;预设把每份 tsc map 交给 Rolldown,并从原文件补齐 `sourcesContent`,使最终 map 回到 TypeScript/TSX,而不是停在编译后的 JavaScript。内联进 bundle 的其他 workspace 源码同样回到其 `packages/` 归属,依赖包路径保持原样。Combo 生成会移除每个局部调试指令、记录其生成行偏移、以原插件 map URL 解析每个自带 source,再产出 Indexed Source Map v3。插件有自带 map 时直接用于对应 section;没有时则生成 identity section,内嵌构建后 bundle,并在存在时把 packer 写入的 `sourceURL` 用作 source 名。绝对 combo map URL 会平行改写脚本资源列表中的每个 `client.js` 后缀,因此 `/plugins/??<package-a>/client.js,<package-b>/client.js&rev=<rev>` 指向 `/plugins/??<package-a>/client.js.map,<package-b>/client.js.map&rev=<rev>`。chunk 脚本同样指向自己的 map URL。只有在这些 map URL 收到 `GET` 后,source map 文件才会被读取和组合;`HEAD` 不会物化脚本或 map body。Vite 壳同样产出 sourcemap,使壳代码与经外部加载的插件都能从 stack 和性能 profile 回到 TypeScript/TSX。
图为 HMR 保留每个 row 带 revision 的单资源 combo URL,并为每个启动 combo 请求增加带 revision 的描述;多条描述可以使用同一调度阶段。首次发布与 `rebuilt(id)` 使用相同的入口 mtime、ctime 和大小哈希;产物内容不参与求哈希。ctime 用于区分保留 mtime 和大小的重写。Host 重启时若产物未变,每个 row 的 revision 都保持不变,因此重连后的 SSE 快照不会触发浏览器插件替换。共享预设会在每个包输出写完后标记入口;因此只重建 chunk 也会推进 owner revision,无需 Host 扫描 sibling。启动 combo revision 从有序 row revision 派生。脚本 body 在首次 `GET` 时组合;source map 文件在首次 map `GET` 时单独读取并组合。`HEAD` 不会物化任一 body。版本化脚本与 map 使用 immutable 缓存,无关图重组会保留相同 revision 下已经物化的 chunk 响应。Host 只提供精确生成的 URL;陈旧 revision 与未发布资源列表返回 404,不会别名到其他字节。外部脚本的 `error` 事件不给响应状态与正文,因此失败诊断只报告 URL;同源 Host 与构建期写入的 registration id 是身份边界,`load` 后的 factory 存在性检查负责拒绝未登记预期 id 的产物。
图为 HMR 保留每个 row 带 revision 的单资源 combo URL,并为每个启动 combo 请求增加带 revision 的描述;多条描述可以使用同一调度阶段。首次发布与 `rebuilt(id)` 使用相同的入口 mtime、ctime 和大小哈希;产物内容不参与求哈希。ctime 用于区分保留 mtime 和大小的重写。Host 重启时若产物未变,每个 row 的 revision 都保持不变,因此重连后的流 baseline不会触发浏览器插件替换。共享预设会在每个包输出写完后标记入口;因此只重建 chunk 也会推进 owner revision,无需 Host 扫描 sibling。启动 combo revision 从有序 row revision 派生。脚本 body 在首次 `GET` 时组合;source map 文件在首次 map `GET` 时单独读取并组合。`HEAD` 不会物化任一 body。版本化脚本与 map 使用 immutable 缓存,无关图重组会保留相同 revision 下已经物化的 chunk 响应。Host 只提供精确生成的 URL;陈旧 revision 与未发布资源列表返回 404,不会别名到其他字节。外部脚本的 `error` 事件不给响应状态与正文,因此失败诊断只报告 URL;同源 Host 与构建期写入的 registration id 是身份边界,`load` 后的 factory 存在性检查负责拒绝未登记预期 id 的产物。
### 装载流程,端到端
@@ -70,17 +70,19 @@ Host 会快照每个已构建插件入口 bundle,并把每个调度阶段的
4. `settled` = 每个 entry 已创建 + `loader.await()` 完全停稳 + 启动审计。审计列出每个 import 失败、FAILED 或 PENDING 的 fiber 及其激活错误或缺失的服务。它存在的理由:cordis 的 inject 等待没有超时。浏览器必需名单中的 entry 未激活会拒绝启动;其他未激活 entry 输出一条控制台警告([启动策略](2026-09-09-consumer-owned-startup-strictness.zh.md))。
5. 不依赖框架的 loading 页经 `internal/status` 投影真实 fiber 状态。审计接受插件树后,内核调用 `ctx.uiRenderer.mount(container)`,一次切换到真实 UI。
样式元信息及 renderer 所有权遵循[模块元信息决定](2026-11-05-client-module-metadata.zh.md);模块加载保存生产函数而不求值。
### 动态图对账
modules 控制器只持有从启动清单创建的 Loader 条目。Host 的完整快照更新模块描述并对账这些条目;其他 Loader 贡献方保留自身所有权。新增模块通过单资源 URL 到达,因为重放启动 batch 可能重复注册现有 factory。移除使用 Loader 删除语义,随后等待已捕获 fiber 清理完毕,再移除未使用的模块与样式。已声明及已观察到的传递依赖使共享模块保持存活。Factory revision 的跟踪独立于条目激活,因为下载或物化完成后仍可能没有创建条目。图更新会在任何消费者导入依赖前,使未归属受管条目的陈旧 factory 和失败的到达目标失效,并清除其样式;重建帧也会对账因导入失败而缺失的条目。
modules 控制器只持有从启动清单创建的 Loader 条目。Host 的完整快照更新模块描述并对账这些条目;其他 Loader 贡献方保留自身所有权。新增模块通过单资源 URL 到达,因为重放启动 batch 可能重复注册现有 factory。移除使用 Loader 删除语义,随后等待已捕获 fiber 清理完毕,再移除未使用的模块记录。已声明及已观察到的传递依赖使共享模块保持存活。Factory revision 的跟踪独立于条目激活,因为下载或物化完成后仍可能没有创建条目。图更新会在任何消费者导入依赖前,使未归属受管条目的陈旧 factory 和失败的到达目标失效,并通知资源消费者;重建帧也会对账因导入失败而缺失的条目。
Host SSE 适配器转发现有图变化通知,并在连接时发送当前完整图。图描述浏览器的目标条目,不代表 Host 清理完成:Host 生命周期顺序属于其 Loader,每个浏览器则等待自身被移除 fiber 的清理。图对账与代码重建共用一个页面队列。本地代际阻止过期下载挂载;不透明 revision 只比较相等。失败页面报告本地错误,并可重试同一张图而不改变 Host 启用状态。这保留了无关页面状态,也无需重启应用或引入第二套插件执行器。Electron 的独立安装流程不属于此机制。
Host 的 `pluginEvents/follow` Remote 流转发现有图变化通知,每一代流先发送当前完整图;图行还携带各插件的同步配置([前端插件配置同步](2026-11-15-client-config-sync.zh.md))。图描述浏览器的目标条目,不代表 Host 清理完成:Host 生命周期顺序属于其 Loader,每个浏览器则等待自身被移除 fiber 的清理。图对账与代码重建共用一个页面队列。本地代际阻止过期下载挂载;不透明 revision 只比较相等。失败页面报告本地错误,并可重试同一张图而不改变 Host 启用状态。这保留了无关页面状态,也无需重启应用或引入第二套插件执行器。Electron 的独立安装流程不属于此机制。
### 热重载:一个驱动插件,自行监视的 bundle
热重载是一项组合决策:web 组合包无条件挂载 `client-hmr` 行(一个常规的插件包),其 node 半带来 bundle 监视与 SSE(Server-Sent Events)通道;没有重建 watcher 改写客户端 bundle 时链路保持空闲。不应暴露它的组合可以禁用该行。
热重载是一项组合决策:web 组合包无条件挂载 `client-hmr` 行(一个常规的插件包),其 node 半带来 bundle 监视与经过鉴权的插件事件 Remote 流;没有重建 watcher 改写客户端 bundle 时链路保持空闲。不应暴露它的组合可以禁用该行。
重建好的 bundle 怎么变成重载信号?hmr 的 node 半自己观察——没有构建器来通知它。模块 host 在读取每份启动快照前捕获入口 stat 基线,并通过 `ctx.clientModules.artifactBaseline(id)` 暴露它。HMR 自持的单个定时器把当前图的每个 row 与这份基线比较:未变化的 row 直接开始监视,不读取内容也不求哈希;基线捕获后的写入已经形成 stat 差异,只有该 row 会进入 `rebuilt(id)`。这既避免安装 watcher 时重复读取,也避开 `fs.watchFile` 以异步首次 stat 建立基线、可能静默吸收构造期重建的问题。监视集合的成员随 `onGraphChanged` 更新;消失的 row 撤下监视,轮询时缺失的入口则让对应 row 保持标脏状态,文件重现时即使 mtime 和大小与基线相同也重试发布。共享 tsdown 预设会在每个 sibling 输出写完后标记 `client.js`;入口 mtime、ctime 或大小变化、或 row 处于标脏状态时,`rebuilt(id)` 从这三个元数据值派生 revision。只有 revision 变化时,它才读取新的 bundle 快照。只修改 chunk 因此也会更换 revision;部分写入之后的完成标记还会提供一次更晚的 stat 变化以完成自愈。`rev` 变化时,node 半在 `GET /plugins/events` 上广播 `rebuilt` 帧——这是一条系统级 SSE 通道,连接即发全量图,变更时发 `rebuilt` 帧,仅供呈现的 wire,永不进会话日志。轮询是刻意选择:inotify 在 weka 网络挂载上不触发,构建侧监视器需要 `--poll` 也是同一原因;每个 row 每个间隔只需一次入口 stat,轮询间隔是一个经校验的配置字段(默认 500ms),dispose(资源释放)会清掉那一个定时器。重建产物的进程必须使用共享 Client tsdown 预设;`scripts/dev-web.ts` 仍作为 watch 构建入口保留,其包清单在启动时扫描 `packages/*/*/package.json` 按 dsh.client 发现,构建器与 host 之间没有通知协议。
重建好的 bundle 怎么变成重载信号?hmr 的 node 半自己观察——没有构建器来通知它。模块 host 在读取每份启动快照前捕获入口 stat 基线,并通过 `ctx.clientModules.artifactBaseline(id)` 暴露它。HMR 自持的单个定时器把当前图的每个 row 与这份基线比较:未变化的 row 直接开始监视,不读取内容也不求哈希;基线捕获后的写入已经形成 stat 差异,只有该 row 会进入 `rebuilt(id)`。这既避免安装 watcher 时重复读取,也避开 `fs.watchFile` 以异步首次 stat 建立基线、可能静默吸收构造期重建的问题。监视集合的成员随 `onGraphChanged` 更新;消失的 row 撤下监视,轮询时缺失的入口则让对应 row 保持标脏状态,文件重现时即使 mtime 和大小与基线相同也重试发布。共享 tsdown 预设会在每个 sibling 输出写完后标记 `client.js`;入口 mtime、ctime 或大小变化、或 row 处于标脏状态时,`rebuilt(id)` 从这三个元数据值派生 revision。只有 revision 变化时,它才读取新的 bundle 快照。只修改 chunk 因此也会更换 revision;部分写入之后的完成标记还会提供一次更晚的 stat 变化以完成自愈。`rev` 变化时,node 半在经过鉴权的 `pluginEvents/follow` Remote 流上发布 `rebuilt` 帧;该流每一代先发全量图,之后发送 `graph` 与 `rebuilt` 增量,是仅供呈现的 wire,永不进会话日志。轮询是刻意选择:inotify 在 weka 网络挂载上不触发,构建侧监视器需要 `--poll` 也是同一原因;每个 row 每个间隔只需一次入口 stat,轮询间隔是一个经校验的配置字段(默认 500ms),dispose(资源释放)会清掉那一个定时器。重建产物的进程必须使用共享 Client tsdown 预设;`scripts/dev-web.ts` 仍作为 watch 构建入口保留,其包清单在启动时扫描 `packages/*/*/package.json` 按 dsh.client 发现,构建器与 host 之间没有通知协议。
浏览器侧的传输把代码替换交给负责图对账的同一个 modules 控制器:
@@ -88,13 +90,13 @@ Host SSE 适配器转发现有图变化通知,并在连接时发送当前完
2. `prefetch`——加载该单资源外部脚本并登记新 factory,旧 fiber 此刻仍在服役。初始多资源脚本不会再次执行。
3. `registry.delete`——先于任何 fiber 操作。裸做 fiber dispose 会触发 vendored Loader 的自 dispose 分支,把 entry 永久停用。
4. 排空旧 fiber 的各 disposer。
5. 移除名下的 `<style data-plugin>` 标签。
6. 通过模块系统物化新导出,再调用 `entry.refresh()` 由 Loader 挂载。CSS 在旧 disposer 清理完成后重新注入;显式物化使导入错误能够被捕获,而不只留下 Loader 的控制台日志。
5. Renderer 观察模块失效并移除过期样式资源。
6. 通过模块系统物化新导出,再调用 `entry.refresh()` 由 Loader 挂载。成功物化后 Renderer 安装元信息提供的样式;显式物化使导入错误能够被捕获,而不只留下 Loader 的控制台日志。
7. `fiber.await()`——让失败大声重抛。
Bootstrap 替换会在失效或卸载前被拒绝:模块系统保留其初始导出,重新挂载旧代码会重置消费者,却无法应用请求的 revision。页面会报告需要刷新,并保留 bootstrap fiber。所有非 bootstrap 插件都共享同一套替换语义;`immediately` 行的重载与 lazy 行分毫不差。依赖级联不花一行 client 代码:fiber 的激活纪元串接着它各服务提供方的 uid,因此替换 connection 等基础 provider 的 fiber 时,每个依赖方都会经 cordis 本身重新装载——行为正确,但代价较高。
重载会创建新的 fiber 和组件状态,不保留被替换插件内部的 React 状态。静态组装库与应用壳需要重建后的页面;Host 本身换成另一个 release 时,页面会暂停插件替换并询问是否刷新([Host release 变化提示](../feature/2026-10-14-host-release-change-refresh-prompt.zh.md))。导入或激活失败仍可诊断和重试,不会回滚无关插件。自重载关闭旧 SSE 通道并打开新通道;其完整快照补齐遗漏的图变更。启动、图更新和重建帧共用同一队列,因此代码替换不会与初始模块到达重叠。
重载会创建新的 fiber 和组件状态,不保留被替换插件内部的 React 状态。静态组装库与应用壳需要重建后的页面;Host 本身换成另一个 release 时,页面会暂停插件替换并询问是否刷新([Host release 变化提示](../feature/2026-10-14-host-release-change-refresh-prompt.zh.md))。导入或激活失败仍可诊断和重试,不会回滚无关插件。自重载关闭旧流并打开新流;其完整快照补齐遗漏的图变更。启动、图更新和重建帧共用同一队列,因此代码替换不会与初始模块到达重叠。
## 包归属
@@ -106,7 +108,7 @@ Wire 两侧运行同一份治理实现;浏览器特有层只包含一套模块
接受的代价:vendored Loader 在浏览器里背着闲置机件(EntryTree 持久化是 no-op,分组/隔离未用);开发期每次修改插件都要付一次 bundle 重建加 fiber 重挂;graph `inject` row 指导 factory 到达,但服务可用性仍是激活权威,因此不匹配会在启动审计时浮出;静态 UI 库保留直接实体导出;每个 bundle 多出一份 sourcemap 产物,外部 script 失败也只能给出粗粒度 URL 诊断,不能像显式 fetch 那样报告 HTTP 状态。Host 为当前图及上一代启动图保留 bundle 快照与惰性响应计划。脚本和 map body 在首次 `GET` 后缓存,因此内存随 bundle 快照和已请求的响应 body 增长。每份已物化响应在其 URL 下保持固定;若上一代 map 在重建后才首次被请求,则会读取当前 map 文件。
名册位于 web 组合包的配置树(`packages/bundle/web-app/cordis.patch.yml`);`mountWebPlugins` 与 `CLIENT_PACKAGES` 常量已消失,重组一次部署等于替换 yml/overlay。Graph 组合器位于 `dsh-client-modules` node 半,由 parser 预载的 Client face 则自举浏览器模块表。Webserver 继续作为朴素路由注册插件;`/api/*` 绑定、浏览器认证、RPC envelope 与精确 Fetch 路由属于 Connection node 半,Remote 分发属于 API Gateway,开发期 bundle 监视与 SSE 通道属于 HMR node 半。
名册位于 web 组合包的配置树(`packages/bundle/web-app/cordis.patch.yml`);`mountWebPlugins` 与 `CLIENT_PACKAGES` 常量已消失,重组一次部署等于替换 yml/overlay。Graph 组合器位于 `dsh-client-modules` node 半,由 parser 预载的 Client face 则自举浏览器模块表。Webserver 继续作为朴素路由注册插件;`/api/*` 绑定、浏览器认证、RPC envelope 与精确 Fetch 路由属于 Connection node 半,Remote 分发属于 API Gateway,开发期 bundle 监视与插件事件 Remote 流属于 HMR node 半。
## Alternatives considered
@@ -9,8 +9,8 @@
en: fa4d3622fb18dd58
zh: 2b98640594c8344b
/agent-note-one-harness-home-resolver/decision:
en: 816e5109718bc4ae
zh: af3f08f07c3cb761
en: a9d9f7bf051341e9
zh: cc1fed8d2b606276
/agent-note-one-harness-home-resolver/alternatives-considered:
en: b1c9535540171d47
zh: 7df816d42945db94
@@ -21,9 +21,9 @@ One resolver owns the harness home, in `@deepseek-ai/dsh-home-paths`, single-roo
explicit configured path > $DSH_HOME > ~/.dsh
```
An empty or whitespace-only `$DSH_HOME` is treated as unset; otherwise `resolve('')` would silently place the home at the current working directory. The harness keeps all user data under one root; there is no XDG config/data/cache split. `dshHomePath(...segments)` joins deployment-owned children onto that root, and `dsh-app-boot` exposes it to Loader `!!js` config expressions before mounting entries, so shipped compositions derive `sessions` and `storages` without copying the resolver. `dshHomeDisplay()` names a resolved root symbolically for user-facing paths — `~/.dsh` for the default home, `$DSH_HOME` for any configured home — so the user-global `AGENTS.md` label never leaks an absolute machine path. It replaces agent-instructions's bespoke default-vs-`$DSH_HOME` check. Home is process policy rather than row configuration: `dsh-agent-instructions` accepts no home override, so a composition cannot point instruction loading at a root that sessions, skills, and storage would not read. `resolveAgentsHome()` and `agentsHomeDisplay()` apply the same precedence, tilde expansion, and symbolic labelling to the shared agent configuration root (`$DSH_AGENTS_HOME` or `~/.agents`), which stays outside the harness home because other agent tools share it ([shared agents root](2026-10-05-shared-agents-root-instructions.md)); `dsh-skill-filesystem` still accepts its own `dshHome` and `agentsHome` fields, which select its own skill roots and resolve through the shared resolver in the instruction-loading change.
An empty or whitespace-only `$DSH_HOME` is treated as unset; otherwise `resolve('')` would silently place the home at the current working directory. The harness keeps all user data under one root; there is no split into separate XDG roots. `dshHomePath(...segments)` joins deployment-owned children onto that root, and `dsh-app-boot` exposes it to Loader `!!js` config expressions before mounting entries, so shipped compositions derive `sessions` and `storages` without copying the resolver. `dshHomeDisplay()` names a resolved root symbolically for user-facing paths — `~/.dsh` for the default home, `$DSH_HOME` for any configured home — so the user-global `AGENTS.md` label never leaks an absolute machine path. It replaces agent-instructions's bespoke default-vs-`$DSH_HOME` check. Home is process policy rather than row configuration: `dsh-agent-instructions` accepts no home override, so a composition cannot point instruction loading at a root that sessions, skills, and storage would not read. `resolveAgentsHome()` and `agentsHomeDisplay()` apply the same precedence, tilde expansion, and symbolic labelling to the shared agent configuration root (`$DSH_AGENTS_HOME` or `~/.agents`), which stays outside the harness home because other agent tools share it ([shared agents root](2026-10-05-shared-agents-root-instructions.md)); `dsh-skill-filesystem` still accepts its own `dshHome` and `agentsHome` fields, which select its own skill roots and resolve through the shared resolver in the instruction-loading change.
`dshCachePath(...segments)` derives paths below the resolved home's `cache` directory. An initial `{ dshHome }` option preserves a provider's explicit home override. It resolves paths without creating directories; callers own directory creation. `attachment-local` uses this helper for regenerable request-image variants while retaining durable attachment objects in their versioned storage tree, so clearing the cache cannot remove Session attachments. Existing request-image cache entries are left in place and are not read or copied; a cache miss regenerates the variant from its durable attachment.
`dshPath(category, ...segments)` derives paths below a `config`, `data`, `state`, `cache`, or `backup` directory of that one root, and app-boot exposes it to Loader `!!js` expressions beside `dshHomePath`; the [home path categories proposal](../../proposed/architecture/2026-11-04-dsh-home-path-categories.md) owns the categories and which existing entries keep their top-level locations. `dshCachePath(...segments)` is `dshPath('cache', ...segments)`. An initial `{ dshHome }` option preserves a provider's explicit home override. It resolves paths without creating directories; callers own directory creation. `attachment-local` uses this helper for regenerable request-image variants while retaining durable attachment objects in their versioned storage tree, so clearing the cache cannot remove Session attachments. Existing request-image cache entries are left in place and are not read or copied; a cache miss regenerates the variant from its durable attachment.
`@deepseek-ai/dsh-home` is deleted. Home-owning providers and boot packages import `resolveDshHome` from `dsh-home-paths`; composition bundles contain only the resolved configuration rows.
@@ -21,9 +21,9 @@ Status: implemented
explicit configured path > $DSH_HOME > ~/.dsh
```
空或仅含空白的 `$DSH_HOME` 被当作未设置处理;否则,`resolve('')` 会悄悄把 home 落在当前工作目录。harness 把所有用户数据都放在同一个根目录下;不存在 XDG 的 config/data/cache 拆分。`dshHomePath(...segments)` 将部署负责的子路径拼接到该根目录下,`dsh-app-boot` 在挂载条目前向 Loader `!!js` 配置表达式暴露它,因此出厂组合无需复制解析器即可派生 `sessions` 和 `storages`。`dshHomeDisplay()` 为面向用户的路径以符号形式命名已解析的根目录——默认 home 显示为 `~/.dsh`,任何已配置的 home 显示为 `$DSH_HOME`——这样用户全局的 `AGENTS.md` 标签就绝不会泄露机器上的绝对路径。它取代了 agent-instructions 中自定义的「默认值 vs `$DSH_HOME`」判断。home 属于进程策略而非配置行:`dsh-agent-instructions` 不接受 home 覆盖,因此组合无法把指令加载指向会话、skill 与存储不会读取的根目录。`resolveAgentsHome()` 与 `agentsHomeDisplay()` 对共享 agent 配置根目录(`$DSH_AGENTS_HOME` 或 `~/.agents`)采用相同的优先级、波浪号展开与符号化标签;该根目录位于 harness home 之外,因为其他 agent 工具会共享它([共享 agents 根目录](2026-10-05-shared-agents-root-instructions.zh.md));`dsh-skill-filesystem` 仍接受自己的 `dshHome` 与 `agentsHome` 字段,用于选择它自己的 skill 根目录,并在指令加载改动中改用共享解析器。
空或仅含空白的 `$DSH_HOME` 被当作未设置处理;否则,`resolve('')` 会悄悄把 home 落在当前工作目录。harness 把所有用户数据都放在同一个根目录下;不拆分到各自独立的 XDG 根目录。`dshHomePath(...segments)` 将部署负责的子路径拼接到该根目录下,`dsh-app-boot` 在挂载条目前向 Loader `!!js` 配置表达式暴露它,因此出厂组合无需复制解析器即可派生 `sessions` 和 `storages`。`dshHomeDisplay()` 为面向用户的路径以符号形式命名已解析的根目录——默认 home 显示为 `~/.dsh`,任何已配置的 home 显示为 `$DSH_HOME`——这样用户全局的 `AGENTS.md` 标签就绝不会泄露机器上的绝对路径。它取代了 agent-instructions 中自定义的「默认值 vs `$DSH_HOME`」判断。home 属于进程策略而非配置行:`dsh-agent-instructions` 不接受 home 覆盖,因此组合无法把指令加载指向会话、skill 与存储不会读取的根目录。`resolveAgentsHome()` 与 `agentsHomeDisplay()` 对共享 agent 配置根目录(`$DSH_AGENTS_HOME` 或 `~/.agents`)采用相同的优先级、波浪号展开与符号化标签;该根目录位于 harness home 之外,因为其他 agent 工具会共享它([共享 agents 根目录](2026-10-05-shared-agents-root-instructions.zh.md));`dsh-skill-filesystem` 仍接受自己的 `dshHome` 与 `agentsHome` 字段,用于选择它自己的 skill 根目录,并在指令加载改动中改用共享解析器。
`dshCachePath(...segments)` 在解析出的主目录下的 `cache` 目录中派生路径。首个 `{ dshHome }` 选项保留提供方显式配置的主目录覆盖值。它只解析路径,不创建目录;目录创建由调用方负责。`attachment-local` 将此函数用于可重新生成的请求图片版本,持久附件对象仍保留在其带版本的存储树中,因此清空缓存不会删除 Session 附件。已有请求图片缓存条目保留在原处,不再读取或复制;缓存未命中时从持久附件重新生成请求版本。
`dshPath(category, ...segments)` 在该根目录下的 `config`、`data`、`state`、`cache` 或 `backup` 目录中派生路径,app-boot 将它与 `dshHomePath` 一并暴露给 Loader `!!js` 表达式;类别定义以及哪些现有条目保留顶层位置由 [home 路径类别提案](../../proposed/architecture/2026-11-04-dsh-home-path-categories.zh.md)负责。`dshCachePath(...segments)` 等同于 `dshPath('cache', ...segments)`。首个 `{ dshHome }` 选项保留提供方显式配置的主目录覆盖值。它只解析路径,不创建目录;目录创建由调用方负责。`attachment-local` 将此函数用于可重新生成的请求图片版本,持久附件对象仍保留在其带版本的存储树中,因此清空缓存不会删除 Session 附件。已有请求图片缓存条目保留在原处,不再读取或复制;缓存未命中时从持久附件重新生成请求版本。
`@deepseek-ai/dsh-home` 被删除。拥有 home 配置的提供方与 boot 包从 `dsh-home-paths` 导入 `resolveDshHome`;组合包只包含解析后的配置行。
@@ -9,8 +9,8 @@
en: 6228c81e4965b688
zh: 04b702be0cfbf195
/agent-note-credential-boundaries-whole-snapshot-requests-and-atomic-route-registration/decision:
en: 052787311a4e6edc
zh: 963eed632ea198de
en: 3ecf963f99b8e9ae
zh: 84fa0bed2316ce94
/agent-note-credential-boundaries-whole-snapshot-requests-and-atomic-route-registration/alternatives-considered:
en: 90c5883b247f7301
zh: 6d2a660d8653f805
@@ -18,7 +18,7 @@ Two request-path defects sat beside them. DeepSeek resolved connection and crede
**The stored credential has no boundary against the model, and the READMEs say so.** `0600` under a `0700` directory stops other OS users; the model's bash and filesystem tools run as that same user, and the shipped default confines nothing. What the harness does hold to is narrower and stated as exactly that: no surface hoists the document into `process.env`, and the model is never handed a resolved path to it, so reaching the value takes a deliberate read of a path it was not given. An OS-keychain provider — a store the model's processes cannot read at all — is recorded as the real answer rather than implied by a partial one.
**One request, one generation.** DeepSeek's resolved snapshot carries the credential reference beside the endpoint, and `resolveApiKey` receives that snapshot instead of re-reading configuration. A rejected generation now contributes nothing at all. pi-ai defers to provider-native discovery only for a profile naming no credential; a configured reference that misses fails with `MISSING_CREDENTIAL` naming the route and the reference. The boot-time credential probe is deleted: it could run before the credentials service mounted and reported every failure as a missing key, while the first request already gives the accurate error.
**One request, one generation.** DeepSeek's resolved snapshot carries the credential reference beside the endpoint, and the API-key route's `resolveAuth` hands that snapshot's endpoint and reference to `ctx.deepseekAuth` instead of re-reading configuration. A rejected generation now contributes nothing at all. pi-ai defers to provider-native discovery only for a profile naming no credential; a configured reference that misses fails with `MISSING_CREDENTIAL` naming the route and the reference. The boot-time credential probe is deleted: it could run before the credentials service mounted and reported every failure as a missing key, while the first request already gives the accurate error.
**Route replacement is a registry operation, not a caller sequence.** `registerAdapter` returns a handle carrying `replace(providers)`: the candidate set is validated in full first (conflicts, names, provider metadata), then swapped in one synchronous section. A refused replacement leaves the previous routes registered and serving, and the caller's facts cache only advances after the registry actually holds the new set, so reverting to a working configuration re-applies. pi-ai's registration facts are sorted by provider, so a settings document that merely reorders its keys is no longer a route change.
@@ -22,7 +22,7 @@ Status: implemented
**存下的凭据对模型没有边界,而 README 就是这么写的。**`0700` 目录下的 `0600` 挡得住其他 OS 用户;模型的 bash 与文件系统工具正是以同一用户身份运行,而已交付的默认配置不提供任何约束。harness 真正守住的边界更窄,文档也严格按这一范围表述:没有任何一个面会把该文档提升进 `process.env`,模型也从不会拿到它的解析后路径,因此要拿到这个值,需要刻意去读一条并未交给它的路径。OS 钥匙串(keychain)提供方——一个模型的进程根本读不到的存储——被记录为真正的答案,而不是靠一个残缺的方案去暗示它。
**一次请求,一代设置。**DeepSeek 解析出的快照在端点旁一并携带凭据引用,`resolveApiKey` 接收这份快照,而不再重新读取配置。被拒绝的那一代如今完全不再贡献任何东西。只有当一个 profile 完全没有点名凭据时,pi-ai 才交给提供方原生的发现流程;配置了引用却解析不到,就以 `MISSING_CREDENTIAL` 失败,并点名该路由与该引用。启动时的凭据探测被删除:它可能在凭据服务挂载之前就运行,并把每一种失败都报成密钥缺失,而第一次请求本就会给出准确的错误。
**一次请求,一代设置。**DeepSeek 解析出的快照在端点旁一并携带凭据引用,API 密钥路由的 `resolveAuth` 把这份快照的端点和引用交给 `ctx.deepseekAuth`,而不再重新读取配置。被拒绝的那一代如今完全不再贡献任何东西。只有当一个 profile 完全没有点名凭据时,pi-ai 才交给提供方原生的发现流程;配置了引用却解析不到,就以 `MISSING_CREDENTIAL` 失败,并点名该路由与该引用。启动时的凭据探测被删除:它可能在凭据服务挂载之前就运行,并把每一种失败都报成密钥缺失,而第一次请求本就会给出准确的错误。
**路由替换是注册表的操作,不是调用方的一串步骤。**`registerAdapter` 返回一个携带 `replace(providers)` 的句柄:候选集合先被完整校验(冲突、名称、提供方元数据),再在一个同步区段内完成替换。被拒绝的替换会让先前的路由保持注册并继续服务,而调用方的事实缓存只有在注册表确实持有新集合之后才会推进,因此改回可用配置时会重新生效。pi-ai 的注册事实按提供方排序,因此仅仅调换键顺序的设置文档不再算作路由变更。
@@ -1,25 +0,0 @@
# Bilingual-pair consistency record for 2026-07-31-ptc-runtime-python-fd3-protocol.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-07-31-ptc-runtime-python-fd3-protocol.md
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol:
en: 0130850e16ce6f60
zh: 7b70b03b5019277f
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/problem:
en: 2c36946bbff637b7
zh: f290de0866ba7caa
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/decision:
en: f0d0d5ba5a9066ad
zh: fbdab3731c33eb26
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/wire-contract:
en: 1225a32af91fcf84
zh: 1dab4ecbd9ff7e34
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/mirror-alignment:
en: 26128b65f2763920
zh: df24359faebcbfed
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/alternatives-considered:
en: 2f52b91980d013ed
zh: 12dc9a24c03c3c68
/agent-note-the-ptc-runtime-python-fd-3-frame-protocol/consequences:
en: 16df6efd46d71e85
zh: 4062475bec04ab5f
@@ -18,5 +18,5 @@
en: ca7c9088d0793e1e
zh: ea648bac9e726c64
/agent-note-what-stays-host-plane-once-presets-own-the-agent-plane/consequences:
en: 0a426923c2a1f774
zh: 29626804b99b35ff
en: 23642f4d7c998de6
zh: f968db2047e0f4ac
@@ -40,4 +40,4 @@ Projection key presence is not a per-session capability signal ([session project
The context meter is a per-session fact independent of mount history. Presets resolve the host meter for token accounting while selecting their own compaction backend; `minimal` supports both automatic compaction and the human `/compact` command.
Production entry points must compose Agents explicitly; installing the registry alone does not bind them. An unjoined Agent receives no tools, prompt sections, or skills and reports no error.
Production entry points must compose Agents explicitly; installing the registry alone does not bind them. An unjoined Agent receives none of the tools, prompt sections, or skills that presets own, and the missing join reports no error. The CUA provider registers outside the presets: it gives an unjoined Agent `cua_run_code` with its guidance and rejects that Agent's creation while the tool's program services are unavailable ([CUA program tool for Agents without a preset](2026-11-12-cua-program-tool-without-presets.md)).
@@ -40,4 +40,4 @@ Status: implemented
context meter 是独立于挂载历史的逐会话事实。Preset 使用宿主 meter 进行 token 记账,并选择自己的压缩后端;`minimal` 同时支持自动压缩和用户 `/compact` 命令。
生产入口必须显式组装 Agent;仅安装注册表不会自动绑定。未加入的 Agent 不会获得工具、提示词段落或 skill,也不会报告错误。
生产入口必须显式组装 Agent;仅安装注册表不会自动绑定。未加入的 Agent 不会获得 preset 所拥有的工具、提示词段落或 skill,未加入这一点也不会报告错误。CUA 提供方在 preset 之外注册:它为未加入的 Agent 提供 `cua_run_code` 及其指引,并在该工具的程序服务不可用时拒绝创建这个 Agent([未组合 preset 的 Agent 使用 CUA 程序工具](2026-11-12-cua-program-tool-without-presets.zh.md))。
@@ -12,8 +12,8 @@
en: a15c7c13f167e5ac
zh: a15c7c13f167e5ac
/agent-note-client-shell-layering-and-dynamic-package-boundaries/decision/layers-and-build-forms:
en: a1750de2d48551af
zh: ffea0b75c292f186
en: e0d6260cc782acb9
zh: 2ca2418d2b97bc03
/agent-note-client-shell-layering-and-dynamic-package-boundaries/decision/shared-module-requests:
en: 96661da17622132a
zh: dab3424093130c2f
@@ -21,14 +21,14 @@ Shared UI libraries still expose synchronous TypeScript and React values to many
| Layer | Members | Responsibility | Build and load form |
| --- | --- | --- | --- |
| Web compilation shell | `apps/web` | Owns `index.html`, Vite configuration, dist chunks, and static assets | Assembles final browser output from built package exports |
| Startup kernel | `packages/client/web` | Owns the plain-DOM boot page, module-system wiring, Cordis settlement, and renderer handoff | `staticLinked` `lib/index.js`; no `dsh.client` row |
| Static assembly libraries | Cordis, `ui-primitives`, `ui-slots` | Supply shared module identities and direct value APIs | ESM `lib/index.js`, merged and chunked by Vite; not Loader entries |
| Startup kernel | `packages/client/web` | Owns the plain-DOM boot page, module-system wiring, Cordis settlement, and renderer handoff | `clientShell` ESM entries; no `dsh.client` row |
| Static assembly libraries | Cordis, `ui-primitives`, `ui-slots` | Supply shared module identities and direct value APIs | Manifest `lib/index.js`, shared imports assembled by Vite; not Loader entries |
| Module bootstrap | `packages/client/modules` | Supplies the client module table and its Cordis wrapper | Dynamic package with one ordinary `lib/client.js`; the host delivers its factory early |
| Dynamic client packages | connection, `ui-renderer`, theme, and feature plugins | Participate through Cordis services, slots, and effects | Declare `dsh.client`, emit self-registering `lib/client.js`, and remain host-graph entries |
`packages/client/web` keeps Cordis as matching peer and development dependencies and uses modules and static UI packages as development compilation inputs. `apps/web` consumes built package exports rather than aliases into workspace source.
The `staticLinked` preset leaves every bare specifier as an external import in `lib/index.js` and emits relative CSS assets beside it. The Vite host resolves and deduplicates those imports and decides final chunk boundaries. A static library therefore does not copy the host's bundling policy into its own artifact.
The `staticLinked` preset emits `lib/index.js` as ordinary ESM that keeps every bare import and dynamic import for Vite to resolve, deduplicate, and split, and adds one export, `__$dsh_client_module_manifest`, whose factory returns the library's own exports. A factory that runs the library body later would defer nothing useful: the third-party imports already evaluate when the module loads, and the shell registers these libraries at startup. CSS imports become deferred metadata resources. The [module metadata decision](2026-11-05-client-module-metadata.md) defines resource ownership; static libraries do not adopt dynamic plugins' private-dependency bundling policy.
### Shared module requests
@@ -21,14 +21,14 @@ Client npm 依赖区段描述安装和开发关系,但不能可靠描述 bundl
| 层 | 成员 | 职责 | 构建与加载形态 |
| --- | --- | --- | --- |
| Web 编译壳 | `apps/web` | 拥有 `index.html`、Vite 配置、dist chunk 和静态资源 | 从已构建 package export 组装最终浏览器产物 |
| 启动内核 | `packages/client/web` | 拥有纯 DOM 启动页、模块系统接线、Cordis settle 和 renderer handoff | `staticLinked` `lib/index.js`;无 `dsh.client` row |
| 静态装配库 | Cordis、`ui-primitives`、`ui-slots` | 提供共享模块身份和直接实体 API | ESM `lib/index.js`,由 Vite 合并拆分;不是 Loader entry |
| 启动内核 | `packages/client/web` | 拥有纯 DOM 启动页、模块系统接线、Cordis settle 和 renderer handoff | `clientShell` ESM 入口;无 `dsh.client` row |
| 静态装配库 | Cordis、`ui-primitives`、`ui-slots` | 提供共享模块身份和直接实体 API | Manifest `lib/index.js`,共享 import 由 Vite 组装;不是 Loader entry |
| 模块自举包 | `packages/client/modules` | 提供 client 模块表及其 Cordis wrapper | 带一个普通 `lib/client.js` 的动态包;host 提前送达其 factory |
| 动态 client 包 | connection、`ui-renderer`、主题和功能插件 | 通过 Cordis service、slot 和 effect 参与应用 | 声明 `dsh.client`,产出自注册 `lib/client.js`,并保留 host graph entry |
`packages/client/web` 把 Cordis 保持为 matching peer 与开发依赖,并把 modules 和静态 UI 包作为开发期编译输入。`apps/web` 消费已构建 package export,不通过 alias 读取 workspace 源码。
`staticLinked` 预设让 `lib/index.js` 中每个 bare specifier 保持 external import,并在旁边输出相对 CSS 资产。Vite 宿主负责解析和去重这些 import,并决定最终 chunk 边界。静态库不会把宿主打包策略复制进自身产物。
`staticLinked` 预设把 `lib/index.js` 输出为普通 ESM,保留所有裸 import 与动态 import 交给 Vite 解析、去重和拆分,并增加一个导出 `__$dsh_client_module_manifest`,其 factory 返回库自身的导出。让 factory 推迟执行库本体并没有实际收益:第三方 import 在模块加载时已经求值,外壳也在启动时登记这些库。CSS import 成为延迟求值的元信息资源。[模块元信息决定](2026-11-05-client-module-metadata.zh.md)定义资源所有权;静态库不采用动态插件的私有依赖打包策略。
### 共享模块请求
@@ -18,8 +18,8 @@
en: fb2c7bcde3b1672a
zh: a05bd30be07e5413
/agent-note-session-history-control-state-and-remote-event-transport/decision/general-remote-stream-model/remotestream:
en: d55c2ce88400e448
zh: 344d510ab946bb9f
en: 867f3ac763f81d8d
zh: a936269f2fc40f8d
/agent-note-session-history-control-state-and-remote-event-transport/decision/general-remote-stream-model/remotesnapshotstream:
en: f2c1d2b00d9554fd
zh: c3e85cf344f7ef24
@@ -101,7 +101,7 @@ Domain Controllers use them through composition or thin adapters; Session and Wo
Each item carries a monotonic generation, that generation's `AbortSignal`, and `accept()`. A domain consumer calls `accept()` only after validating the opening cursor or baseline.
Only `RemoteStreamCarrierError` permits retry. When the Host remains available, one independent reopen is allowed; otherwise the stream waits for a new Connection generation. Business errors, protocol errors, and opening failures terminate immediately.
Only a failure whose `code` is `gateway/carrier-lost` permits retry; `RemoteStreamCarrierError` carries that code, and a domain `ended` callback may return a plain `Error` with it. When the Host remains available, one independent reopen is allowed; otherwise the stream waits for a new Connection generation. Business errors, protocol errors, and opening failures terminate immediately.
`restart()` replaces only the current physical generation and preserves the logical stream. `dispose()` permanently ends the logical stream, pending retry, and iterator, then waits for quiescence.
@@ -101,7 +101,7 @@ RemoteStream<Item>
每个 item 携带单调 generation、该 generation 的 `AbortSignal` 与 `accept()`。领域 consumer 只有在验证 opening cursor 或 baseline 后才调用 `accept()`。
只有 `RemoteStreamCarrierError` 可触发重试。Host 仍可用时允许一次独立重开;否则等待新的 Connection generation。业务错误、协议错误和 opening 失败直接终止。
只有 `code` 为 `gateway/carrier-lost` 的失败可触发重试;`RemoteStreamCarrierError` 带有该 code,领域的 `ended` 回调也可以返回带该 code 的普通 `Error`。Host 仍可用时允许一次独立重开;否则等待新的 Connection generation。业务错误、协议错误和 opening 失败直接终止。
`restart()` 只淘汰当前物理 generation,保留 logical stream;`dispose()` 永久结束 logical stream、pending retry 与 iterator,并等待 quiescence。
@@ -18,17 +18,17 @@
en: 821989170ad76994
zh: 0ed142bea166fc3a
/agent-note-client-session-conversation-and-ui-ownership-layers/layering-principles/ui-adapters-own-react-integration:
en: 4d032e048364fb97
zh: 82a435531efdaa78
en: 4caab5487c8545f8
zh: 77fa93f76b6fb65f
/agent-note-client-session-conversation-and-ui-ownership-layers/layering-principles/slot-scopes-and-standard-props-are-separate:
en: b6f585ca87e1fc6f
zh: 53fd58c3e93cf17c
/agent-note-client-session-conversation-and-ui-ownership-layers/package-ownership:
en: 2fc4b50a651b1847
zh: 7dceeecb9c58e838
en: f3f1e545f7b15d9a
zh: 80927e6b4e8ed5bc
/agent-note-client-session-conversation-and-ui-ownership-layers/overall-data-flow:
en: e7c11e82db080dd4
zh: 5a8a501a128366d6
en: 002d9f406580684b
zh: a86742c6c943ac85
/agent-note-client-session-conversation-and-ui-ownership-layers/session-controller-client:
en: b88f651b1bfb8b5e
zh: b88f651b1bfb8b5e
@@ -48,8 +48,8 @@
en: 860315b96703371d
zh: 860315b96703371d
/agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/service-responsibilities:
en: d075ba28fd37bff2
zh: e2d430d1f3e89b15
en: 40e598676f2d7f46
zh: acc8e028978a5419
/agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/standard-source-registration:
en: e4be6d4b1d79b342
zh: 7cb0e8c0f6358b50
@@ -60,8 +60,8 @@
en: 5d9bdb1f784f97f2
zh: a4b3de7a21b84fce
/agent-note-client-session-conversation-and-ui-ownership-layers/ui-session/pending-interactions:
en: 85e358a03ffac4ba
zh: 54b1d5ed6197f2c2
en: 54b65fef1667278f
zh: cf46a8ad738a0a55
/agent-note-client-session-conversation-and-ui-ownership-layers/workspace-controller-and-ui-workspace:
en: 45e5f41550e62a3d
zh: d4e6d8f5b397bb51
@@ -57,7 +57,7 @@ Each standard hook belongs to the `ui-*` package closest to its data semantics.
| `useSessions` | `client/ui-session` | Session Controller global list |
| `useSession` | `client/ui-session` | Bound Session snapshot |
| `useProjection` | `client/ui-session` | Bound Session keyed projection |
| `useSessionStatus` | `client/ui-session` | Running, effective pending request, and unread completion |
| `useSessionStatus` | `client/ui-session-status` | Running, effective pending request, and unread completion |
| `useSessionRetainInfo` | `client/ui-session` | Read-only Controller reference-source counts |
| `useWorkspaces` | `client/ui-workspace` | Workspace Controller list |
| `useConversation` | `client/ui-conversation` | Conversation binding snapshot |
@@ -80,7 +80,8 @@ Adding a target does not add a branch to the renderer or Session Controller. The
| --- | --- | --- |
| `api/session-controller/client` | Session objects, catalog, references, source counts, commands, projections, event windows, and Agent Contexts | Navigation, completion reminders, Conversation targets, React, Slots, Workspace |
| `api/workspace-controller/client` | Workspace objects, ordering, archive state, commands, and snapshots | React, Session navigation policy, directory UI |
| `client/ui-session` | Explicit Session scope, standard sources, `SessionProvider`, and unified UI status | Session transport, reference ownership, Conversation assembly, Approval/Question results |
| `client/ui-session` | Explicit Session scope, standard sources, `SessionProvider`, and effective pending interactions | Session transport, reference ownership, Conversation assembly, Approval/Question results, unified UI status |
| `client/ui-session-status` | Unified UI status: running state, effective pending request, and completion reminders; Host reading records and their Client copy; main-view reading acknowledgement | Pending-interaction registration, Session transport, React |
| `client/ui-workspace` | Workspace hook, browser UI, main-area reference, and cross-Controller navigation policy | Workspace transport, copies of Session data |
| `client/ui-conversation` | Conversation core, registries, bindings, shell, input, composer, queue, and View navigation | Session transport, Chat/Trajectory snapshots |
| `client/ui-chat` | Chat target, Node definitions, renderers, selection, details, and locale | Session lifecycle, generic View navigation, Trajectory, historical-image cache |
@@ -120,7 +121,7 @@ Session data reaches the UI through this path:
Workspace data enters the Workspace Controller from `ctx.remote.workspace`, then `ui-workspace` exposes it as `useWorkspaces`. `ui-workspace` reads explicit targets for cross-domain navigation and owns the main-area reference without making it a default business Context.
Approval and Question arrive from the Host waterfall through `ctx.remote.$on` at their respective UI owners. Each owner publishes a Pending object; `ui-session.sessionStatus` supplies the same effective object to Workspace indicators and Conversation composer selection.
Approval and Question arrive from the Host waterfall through `ctx.remote.$on` at their respective UI owners. Each owner publishes a Pending object through `ui-session`; `ctx.uiSession.sessionStatus` from `ui-session-status` supplies the same effective object to Workspace indicators and Conversation composer selection.
## Session Controller Client
@@ -178,9 +179,9 @@ This cleanup does not require the Session Controller to know the roster of upper
- supplies `SessionProvider` rendering semantics;
- supplies built-in Session snapshot, projection, and sessionId sources;
- accepts Session-scoped source contributions from other domain packages;
- aggregates domain-owned pending interactions with running and completion-reminder facts in `sessionStatus`.
- selects each Session's effective domain-owned pending interaction and publishes it read-only as `pendingInteractions`.
It does not own Session transport, event folding, Conversation targets, or concrete business results.
It does not own Session transport, event folding, Conversation targets, or concrete business results. `client/ui-session-status` combines the effective pending interactions with running and completion-reminder facts in the `uiSession.sessionStatus` service, read as `ctx.uiSession.sessionStatus`.
### Standard source registration
@@ -221,7 +222,7 @@ Concurrent objects with the same key are rejected; replacement requests use a ne
`ui-session` selects each Session's effective object using domain precedence. Higher precedence wins; at equal precedence, the later valid object in traversal order wins.
The pending aggregate is private to `ui-session`; its effective request appears unchanged as `sessionStatus.getSnapshot().get(id)?.pendingInteraction`. `useSessionStatus` is the public UI read face.
The pending aggregate is private to `ui-session`; `pendingInteractions` exposes each Session's effective request read-only, and the same object appears as `ctx.uiSession.sessionStatus.getSnapshot().get(id)?.pendingInteraction`. `useSessionStatus` is the public UI read face.
Session navigation state and composer takeover read the same effective object. They do not maintain separate status maps or takeover rosters.
@@ -57,7 +57,7 @@ UI 层可以同时读取多个 Controller 做一次导航决定,但不得把
| `useSessions` | `client/ui-session` | Session Controller 全局列表 |
| `useSession` | `client/ui-session` | 已绑定会话快照 |
| `useProjection` | `client/ui-session` | 已绑定会话的键控投影 |
| `useSessionStatus` | `client/ui-session` | 运行状态、有效待处理请求和未读完成提醒 |
| `useSessionStatus` | `client/ui-session-status` | 运行状态、有效待处理请求和未读完成提醒 |
| `useSessionRetainInfo` | `client/ui-session` | 控制器的只读引用来源计数 |
| `useWorkspaces` | `client/ui-workspace` | Workspace Controller 列表 |
| `useConversation` | `client/ui-conversation` | Conversation binding snapshot |
@@ -80,7 +80,8 @@ UI 层可以同时读取多个 Controller 做一次导航决定,但不得把
| --- | --- | --- |
| `api/session-controller/client` | 会话对象、目录、引用、来源计数、命令、投影、事件窗口与 Agent Context | 导航、完成提醒、Conversation target、React、Slot、Workspace |
| `api/workspace-controller/client` | Workspace 对象、顺序、归档、命令和 snapshot | React、Session 导航策略、目录 UI |
| `client/ui-session` | 显式会话作用域、标准数据源、`SessionProvider` 与统一 UI 状态 | 会话传输、引用所有权、Conversation 组装、Approval/Question 结果 |
| `client/ui-session` | 显式会话作用域、标准数据源、`SessionProvider` 与有效待处理交互 | 会话传输、引用所有权、Conversation 组装、Approval/Question 结果、统一 UI 状态 |
| `client/ui-session-status` | 统一 UI 状态:运行状态、有效待处理请求与完成提醒;宿主阅读记录及其前端副本;主视图阅读确认 | 待处理交互登记、会话传输、React |
| `client/ui-workspace` | Workspace 钩子、浏览器 UI、主区域引用与跨控制器导航策略 | Workspace 传输、会话数据副本 |
| `client/ui-conversation` | Conversation core、registry、binding、shell、input、composer、queue 和 View 导航 | Session transport、Chat/Trajectory snapshot |
| `client/ui-chat` | Chat target、Node definitions、renderer、selection、details 和 locale | Session 生命周期、通用 View 导航、Trajectory、历史图片 cache |
@@ -120,7 +121,7 @@ Session 数据按以下路径进入 UI:
Workspace 数据由 `ctx.remote.workspace` 进入 Workspace 控制器,再由 `ui-workspace` 通过 `useWorkspaces` 提供。`ui-workspace` 为跨领域导航读取显式目标并持有主区域引用,不把它变为默认业务 Context。
Approval 与 Question 通过 `ctx.remote.$on` 从 Host waterfall 到达各自的 UI owner。各 owner 发布 Pending 对象;`ui-session.sessionStatus` 向 Workspace 标识和 Conversation composer 选择提供同一个有效对象。
Approval 与 Question 通过 `ctx.remote.$on` 从 Host waterfall 到达各自的 UI owner。各 owner 通过 `ui-session` 发布 Pending 对象;`ui-session-status` 提供的 `ctx.uiSession.sessionStatus` 向 Workspace 标识和 Conversation composer 选择提供同一个有效对象。
## Session Controller Client
@@ -178,9 +179,9 @@ Session Controller 对外提供三个互不替代的读取面:
- 提供 `SessionProvider` 的呈现语义;
- 内建 session snapshot、projection 和 sessionId source;
- 接收其他领域 package 的 Session-scoped source contribution;
- 在 `sessionStatus` 中组合领域持有的待处理交互、运行事实和完成提醒。
- 为每个会话选出领域持有的有效待处理交互,并以只读的 `pendingInteractions` 发布。
它不拥有 Session transport、event folding、Conversation target 或具体业务结果。
它不拥有 Session transport、event folding、Conversation target 或具体业务结果。`client/ui-session-status` 在 `uiSession.sessionStatus` 服务中把有效待处理交互与运行事实、完成提醒组合起来,以 `ctx.uiSession.sessionStatus` 读取。
### 标准 source 注册
@@ -221,7 +222,7 @@ Contribution roster 变化会重建已 materialize 的 binding 并发布新的 s
`ui-session` 使用各 domain 的 precedence 选出每个 Session 当前生效的对象。较高 precedence 胜出,相同 precedence 下后遍历到的有效对象胜出。
待处理聚合是 `ui-session` 的私有实现;其有效请求原样出现在 `sessionStatus.getSnapshot().get(id)?.pendingInteraction` 中。`useSessionStatus` 是公开 UI 读取接口。
待处理聚合是 `ui-session` 的私有实现;`pendingInteractions` 以只读方式提供每个会话的有效请求,同一个对象原样出现在 `ctx.uiSession.sessionStatus.getSnapshot().get(id)?.pendingInteraction` 中。`useSessionStatus` 是公开 UI 读取接口。
Session 导航状态和 composer takeover 必须读取同一个 effective object,不得分别维护 status map 或 takeover roster。
@@ -9,14 +9,14 @@
en: 01293500639c9d79
zh: 6d19e4843955c811
/agent-note-browser-launch-token-authentication/decision:
en: 51885594bdeb6f0c
zh: 9c2e41ad79ccdd08
en: 42fd63aa09083a10
zh: f2536e571c5fe4e2
/agent-note-browser-launch-token-authentication/verification:
en: 189b36d0fc5f3a17
zh: 08993cb585204fc0
en: 99022b3decf8b596
zh: 8ff360a934ccfe5c
/agent-note-browser-launch-token-authentication/alternatives-considered:
en: 5275c87f19fe6eee
zh: ccb922367c4bb3e2
en: 226046f2546fceb7
zh: 2c03d95e2c16c2f5
/agent-note-browser-launch-token-authentication/consequences:
en: af55274a2f345cdd
zh: 4d1810141ef03bae
en: 530a40576d8b3f9f
zh: 59f2dd4809ccbe37
@@ -10,15 +10,17 @@ The Web Host runs tool-capable Sessions with the current operating-system user's
## Decision
Browser callers follow this decision; independent CLI/MCP admission is owned by the [API connect decision](2026-10-09-operator-scoped-connect-handshake.md).
The default browser Token implementation follows this decision and is provided by [`dsh-host-authentication-token`](../../../../packages/host/authentication-token/README.md); independent CLI/MCP admission is owned by the [API connect decision](2026-10-09-operator-scoped-connect-handshake.md). The [Provider decision](2026-11-07-browser-authentication-providers.md) defines independent authentication ownership and equal Token, Desktop, and Remote extension points while retaining this credential protocol; the Remote product itself is not implemented.
`dsh-client-connection` authenticates the complete Host API before dispatch. Every API Proxy method, Remote unary call, generic Connection channel, and Remote WebSocket stream requires the same browser session; endpoint ownership and method names do not alter authority. The existing Host/Origin checks run first and retain their DNS-rebinding and cross-site-request role, returning 403 when they fail. A trusted Host without a valid browser session receives 401. The browser-trust rules remain owned by the [carrier-level browser trust decision](2026-07-28-api-browser-trust-boundary.md).
`dsh-client-connection` authenticates the complete Host API before dispatch. Every API Proxy method, Remote unary call, generic Connection channel, and Remote WebSocket stream requires an authenticated Peer; endpoint ownership and method names do not alter authority. The existing Host/Origin checks run first and retain their DNS-rebinding and cross-site-request role, returning 403 when they fail. A trusted Host without valid credentials receives 401. The browser-trust rules remain owned by the [carrier-level browser trust decision](2026-07-28-api-browser-trust-boundary.md).
Each Host process generates a random launch token, retained by the root application context across Connection hot reloads. `dsh-web-app` prints and opens the normal root URL with that token in the query once per process. `frontend-static` asks Connection to authorize index responses: only `GET /?token=...` exchanges the process token for a cookie, then redirects to clean `./`; the token is not accepted on API paths or in an Authorization header. An obsolete token paired with a valid cookie redirects to clean `./`. Missing and invalid credentials receive one minimal 401 response. Static non-index assets remain public.
The Token plugin generates one random launch token per Host root and retains it across plugin reloads. It contributes a signed entry URL through `webserver/entry-url`; WebApp supplies the ordinary base address and owns printing and opening entries once per root application according to its startup configuration. The plugin handles the root exchange through `webserver/request`: `GET /?token=...` exchanges the process token for a cookie and redirects to clean `./`. An obsolete token paired with a valid default cookie also redirects to clean `./`. The plugin registers its Cookie verifier with `connection.authentication`, and `frontend-static` uses the admitted Peer to render the index. Default-token requests with missing or invalid credentials receive the minimal 401 response; static non-index assets remain public. API token handling remains with the independent `/connect` handshake.
The cookie is a signed, authority-bound bearer. Its deterministic name and signed payload both include the normalized hostname plus port, so one Harness home can run independent Web ports without cookie collisions. The payload carries safe-integer issue and expiry times under an absolute lifetime; `cookieMaxAgeDays` defaults to 30. The cookie is host-only, `Path=/`, `HttpOnly`, and `SameSite=Strict`. The HTTP listener omits `Secure`. There is no logout operation.
The HMAC secret is a versioned `grant` record at `client-connection/browser-session` in `ctx.credentials`; the local provider stores it in `$DSH_HOME/.credentials.yaml`. Connection loads or creates the record during activation and retains the secret for synchronous request verification. An active Connection continues using its loaded secret if the durable record changes; the next activation loads the replacement or creates a missing record, so deleting the record and restarting the process revokes every existing cookie. Invalid owner payloads fail loud instead of being replaced. The launch token itself is never persisted and changes on every process start, while an unexpired cookie remains valid across restarts on the same authority.
Browsers scope cookies by hostname and not by port, so each signed-in port adds its cookie to every request for that hostname, and Node.js answers 431 before any handler runs once request headers pass 16,384 bytes. A successful root exchange therefore expires the other authorities' generated-name cookies its request carries, except the 16 with the latest claimed issue time. The issue time is read without signature verification because another Harness home signs with a different secret; the claim only orders cookies for expiry and never authenticates. `/connect` exchanges expire nothing.
The HMAC secret is a versioned `grant` record at `client-connection/browser-session` in `ctx.credentials`; the local provider stores it in `$DSH_HOME/.credentials.yaml`. The Token plugin loads or creates the record during activation and retains the secret for synchronous request verification. An active Token plugin continues using its loaded secret if the durable record changes; the next activation loads the replacement or creates a missing record, so deleting the record and restarting the process revokes every existing cookie. Invalid owner payloads fail loud instead of being replaced. The launch token itself is never persisted and changes on every process start, while an unexpired cookie remains valid across restarts on the same authority.
The in-page Web Worker preview exposes no network socket. Its page-owned `postMessage` tunnel enters the real route first, then retries a 401 or 403 through the worker-local fetch handler. This keeps Connection interceptors while limiting the authentication bypass to the page that created the Host worker.
@@ -26,7 +28,7 @@ The shipped CLI accepts concrete local bind addresses but rejects wildcard addre
## Verification
Unit coverage pins process-token retention across Connection reloads, one secret load per activation, synchronous verification without credential-provider reads, cookie attributes, HMAC and payload validation, authority and lifetime checks, record deletion taking effect on the next activation, invalid durable records, and cleanup of obsolete token URLs backed by valid cookies. Host transport suites pin uniform 401/403 behavior for generic RPC, Typert Remote HTTP, exact Fetch routes, and WebSocket upgrade paths. The frontend real-composition test boots credentials, Connection, webserver, and static serving through Loader and proves token exchange before index reads while static assets remain public. Packed-worker tests prove portable cookie encoding and worker-local retry for both authentication and trust rejection. A real-CLI test starts `dsh web` twice on one port with a temporary `DSH_HOME`, proves that forged `Host: localhost` is unauthenticated, calls `settings/describe` with the exchanged cookie, observes a new process token, and reuses the old cookie after restart.
Unit coverage pins process-token retention across Token plugin reloads, one secret load per activation, synchronous verification without credential-provider reads, cookie attributes, HMAC and payload validation, authority and lifetime checks, record deletion taking effect on the next activation, invalid durable records, cleanup of obsolete token URLs backed by valid cookies, and expiry of other authorities' cookies beyond the 16 most recently issued. The Token Loader test sends a sign-in carrying 17 other ports' cookies to a real listener and receives one expiry. Host transport suites pin uniform 401/403 behavior for generic RPC, Typert Remote HTTP, exact Fetch routes, and WebSocket upgrade paths. The frontend real-composition test boots credentials, Connection, the Token plugin, webserver, and static serving through Loader and proves token exchange before index reads while static assets remain public. Packed-worker tests prove portable cookie encoding and worker-local retry for both authentication and trust rejection. A real-CLI test starts `dsh web` twice on one port with a temporary `DSH_HOME`, proves that forged `Host: localhost` is unauthenticated, calls `settings/describe` with the exchanged cookie, observes a new process token, and reuses the old cookie after restart.
## Alternatives considered
@@ -40,11 +42,15 @@ Unit coverage pins process-token retention across Connection reloads, one secret
**Add logout, TLS-proxy, and forwarding-header configuration.** None is required by the loopback Web application or the reported authentication gap. Adding them would define deployment contracts without current consumers. Browser site-data controls revoke one browser session; deleting the credential record and restarting the process revokes all sessions.
**Bound cookie growth with one shared cookie name, a shorter lifetime, or a larger header limit.** One name lets a sign-in on one port replace another port's cookie, so two ports cannot stay signed in together. A shorter lifetime does not bound how many ports one day adds. A larger limit on this listener leaves the cookies in place for every other server on that hostname and for browsers that keep an unbounded number per host. Expiring the earliest other cookies at sign-in keeps names, lifetime, and concurrently signed-in ports.
## Consequences
Possession of the browser cookie authorizes the complete tool-capable Host API, matching the authority the Web application exposes after Session creation. `Host` does not grant a higher method tier, and a method migration between API Proxy and Typert Remote cannot change its caller set.
The persistent secret makes cookies survive restarts but gives a stolen cookie up to the configured absolute lifetime. Deleting the record and restarting the process is the global revocation mechanism; the active Connection intentionally avoids credential-provider work on each request. An HTTP listener permits plaintext cookie transmission if its authority is reachable over an unencrypted network. The startup URL contains a process credential and must be treated as sensitive output; runtime diagnostics do not repeat it.
The persistent secret makes cookies survive restarts but gives a stolen cookie up to the configured absolute lifetime. Deleting the record and restarting the process is the global revocation mechanism; the active Token verifier uses its loaded secret for each request. An HTTP listener permits plaintext cookie transmission if its authority is reachable over an unencrypted network. The startup URL contains a process credential and must be treated as sensitive output; runtime diagnostics do not repeat it.
One browser stays signed in to at most 17 authorities of one hostname: the latest sign-in and the 16 most recently issued others. A sign-in ranks the others by issue time, not by last use, so an authority in daily use loses its cookie once 17 other authorities have signed in after it, and needs its launch URL again.
The decision partially supersedes the authentication deferral and unauthenticated non-loopback consequences in the [browser trust note](2026-07-28-api-browser-trust-boundary.md). That note remains active authority for media-type, Host, Origin, Fetch-Metadata, and configured-authority validation. No active Agent Note is archived: the overlap is partial and both security rules retain future decision value.
@@ -10,15 +10,17 @@ Web Host 以当前操作系统用户的权限运行具有工具能力的 Session
## 决策
浏览器调用方遵循本决策;独立 CLI/MCP 接纳由 [API connect 决策](2026-10-09-operator-scoped-connect-handshake.zh.md)定义。
默认浏览器 Token 实现遵循本决策,由 [`dsh-host-authentication-token`](../../../../packages/host/authentication-token/README.zh.md) 提供;独立 CLI/MCP 接纳由 [API connect 决策](2026-10-09-operator-scoped-connect-handshake.zh.md)定义。[Provider 决策](2026-11-07-browser-authentication-providers.zh.md)定义独立认证归属和平级 Token、Desktop、Remote 扩展接入,同时保留本凭据协议;Remote 产品本身尚未实现。
`dsh-client-connection` 在分发前认证完整 Host API。每个 API Proxy 方法、Remote 一元调用、通用 Connection channel 和 Remote WebSocket stream 都要求同一个浏览器会话;endpoint 所有权与方法名称不改变 authority。既有 Host/Origin 校验先执行,继续负责 DNS rebinding 和跨站请求防御,失败时返回 403。Host 可信但没有有效浏览器会话时返回 401。浏览器信任规则仍由[载体级浏览器信任决策](2026-07-28-api-browser-trust-boundary.zh.md)持有。
`dsh-client-connection` 在分发前认证完整 Host API。每个 API Proxy 方法、Remote 一元调用、通用 Connection channel 和 Remote WebSocket stream 都要求已认证 Peer;endpoint 所有权与方法名称不改变 authority。既有 Host/Origin 校验先执行,继续负责 DNS rebinding 和跨站请求防御,失败时返回 403。Host 可信但没有有效凭据时返回 401。浏览器信任规则仍由[载体级浏览器信任决策](2026-07-28-api-browser-trust-boundary.zh.md)持有。
每个 Host 进程生成随机启动令牌,并由应用根 context 跨 Connection 热重载保留。`dsh-web-app` 每个进程只打印并打开一次 query 中带该令牌的普通根 URL。`frontend-static` 请求 Connection 授权 index 响应:只有 `GET /?token=...` 会把进程令牌交换为 cookie,再重定向到干净的 `./`;API 路径和 Authorization header 都不接受该令牌。过时令牌如果同时带有有效 cookie,会重定向到干净的 `./`。缺失与无效凭据得到同一份最小 401 响应。非 index 静态资产保持公开。
Token 插件为每个 Host 根生成一个随机启动令牌,并跨插件重载保留。它通过 `webserver/entry-url` 贡献带签名的入口 URL;WebApp 提供普通基地址,并按自身启动配置负责在每个根应用中打印和打开入口一次。插件通过 `webserver/request` 处理根路径交换:`GET /?token=...` 把进程令牌交换为 cookie,再重定向到干净的 `./`。过时令牌同时带有有效默认 cookie 时,也重定向到干净的 `./`。插件向 `connection.authentication` 注册 Cookie 验证器,`frontend-static` 使用准入 Peer 渲染 index。默认 Token 请求缺失或携带无效凭据时得到最小 401 响应;非 index 静态资产保持公开。API Token 处理仍归独立的 `/connect` 握手。
cookie 是签名且绑定 authority 的 bearer。确定性名称与签名 payload 都包含规范化 hostname 和 port,因此同一 Harness home 可以在不同 Web port 运行而不发生 cookie 冲突。payload 在绝对有效期内携带安全整数形式的签发与过期时间;`cookieMaxAgeDays` 默认为 30。cookie 是 host-only、`Path=/`、`HttpOnly`、`SameSite=Strict`。HTTP 监听器不设置 `Secure`。这里没有 logout 操作。
HMAC 密钥是 `ctx.credentials` 中位于 `client-connection/browser-session` 的版本化 `grant` 记录;本地提供方将其存入 `$DSH_HOME/.credentials.yaml`。Connection 在激活期间加载或创建该记录,并保留密钥以同步校验请求。持久记录发生变化后,当前 Connection 继续使用已加载的密钥;下一次激活会加载替换记录或创建缺失记录,因此删除记录并重启进程会撤销全部既有 cookie。无效 owner payload 会明确失败,而不是被覆盖。启动令牌本身绝不持久化并在每次进程启动时变化;未过期 cookie 则能在相同 authority 上跨重启继续有效。
浏览器按 hostname 而非 port 划分 cookie,因此每个已登录 port 都会把自己的 cookie 加到发往该 hostname 的每个请求中;请求头超过 16,384 字节后,Node.js 会在任何 handler 运行前返回 431。成功的根路径交换因此让请求携带的其他 authority 的生成格式 cookie 过期,只保留声明的签发时间最新的 16 个。签发时间在不验证签名的情况下读取,因为其他 Harness home 使用不同的密钥签名;该声明只用于排列过期顺序,绝不用于认证。`/connect` 交换不让任何 cookie 过期。
HMAC 密钥是 `ctx.credentials` 中位于 `client-connection/browser-session` 的版本化 `grant` 记录;本地提供方将其存入 `$DSH_HOME/.credentials.yaml`。Token 插件在激活期间加载或创建该记录,并保留密钥以同步校验请求。持久记录发生变化后,当前 Token 插件继续使用已加载的密钥;下一次激活会加载替换记录或创建缺失记录,因此删除记录并重启进程会撤销全部既有 cookie。无效 owner payload 会明确失败,而不是被覆盖。启动令牌本身绝不持久化并在每次进程启动时变化;未过期 cookie 则能在相同 authority 上跨重启继续有效。
页内 Web Worker preview 不暴露网络 socket。其由页面持有的 `postMessage` tunnel 先进入真实 route,收到 401 或 403 后再经 worker 本地 fetch handler 重试。这样既保留 Connection interceptor,又把认证绕过限制在创建 Host worker 的页面内。
@@ -26,7 +28,7 @@ HMAC 密钥是 `ctx.credentials` 中位于 `client-connection/browser-session`
## 验证
单元覆盖 Connection 重载时保留进程令牌、每次激活只加载一次密钥、无需读取凭据提供方的同步校验、cookie 属性、HMAC 与 payload 校验、authority 与有效期校验、记录删除在下一次激活时生效、无效持久记录,以及用有效 cookie 清理过时令牌 URL。Host 传输套件固定通用 RPC、Typert Remote HTTP、精确 Fetch 路由和 WebSocket upgrade 路径上一致的 401/403 行为。frontend 真实组合测试经 Loader 启动 credentials、Connection、webserver 与静态服务,证明读取 index 前完成令牌交换,同时静态资产仍公开。打包 worker 测试证明 cookie 编码可移植,并覆盖认证与信任拒绝后的 worker 本地重试。真实 CLI 测试在临时 `DSH_HOME` 上用同一端口两次启动 `dsh web`,证明伪造 `Host: localhost` 仍未认证,以交换所得 cookie 调用 `settings/describe`,观测新的进程令牌,并在重启后复用旧 cookie。
单元覆盖 Token 插件重载时保留进程令牌、每次激活只加载一次密钥、无需读取凭据提供方的同步校验、cookie 属性、HMAC 与 payload 校验、authority 与有效期校验、记录删除在下一次激活时生效、无效持久记录、用有效 cookie 清理过时令牌 URL,以及让签发时间最新的 16 个之外的其他 authority cookie 过期。Token Loader 测试向真实 listener 发送携带 17 个其他 port cookie 的登录请求,并收到一条过期指令。Host 传输套件固定通用 RPC、Typert Remote HTTP、精确 Fetch 路由和 WebSocket upgrade 路径上一致的 401/403 行为。frontend 真实组合测试经 Loader 启动 credentials、Connection、Token 插件、webserver 与静态服务,证明读取 index 前完成令牌交换,同时静态资产仍公开。打包 worker 测试证明 cookie 编码可移植,并覆盖认证与信任拒绝后的 worker 本地重试。真实 CLI 测试在临时 `DSH_HOME` 上用同一端口两次启动 `dsh web`,证明伪造 `Host: localhost` 仍未认证,以交换所得 cookie 调用 `settings/describe`,观测新的进程令牌,并在重启后复用旧 cookie。
## 曾考虑的替代方案
@@ -40,11 +42,15 @@ HMAC 密钥是 `ctx.credentials` 中位于 `client-connection/browser-session`
**增加 logout、TLS 代理和转发 header 配置。** loopback Web 应用与已报告认证缺口都不需要这些能力;加入它们会在没有当前 consumer 时定义部署约定。浏览器站点数据控制会撤销单个浏览器会话;删除凭据记录并重启进程会撤销全部会话。
**用单一共享 cookie 名称、更短的有效期或更大的请求头上限来限制 cookie 增长。** 单一名称会让某个 port 的登录替换另一个 port 的 cookie,两个 port 无法同时保持登录。更短的有效期无法限制一天内新增的 port 数量。提高本 listener 的上限后,这些 cookie 仍会发给该 hostname 上的其他服务,在不限制每个 host cookie 数量的浏览器中也会继续增长。在登录时让最早的其他 cookie 过期,可以保留名称、有效期和同时登录的 port。
## 后果
持有浏览器 cookie 就能调用完整的工具型 Host API,这与 Web 应用在创建 Session 后暴露的 authority 一致。`Host` 不授予更高的方法层级,方法在 API Proxy 与 Typert Remote 之间迁移也不会改变调用者集合。
持久密钥使 cookie 跨重启生效,也让被盗 cookie 最多保有配置的绝对有效期。删除记录并重启进程是全局撤销机制;当前 Connection 刻意避免在每个请求上访问凭据提供方。如果 HTTP listener 的 authority 经未加密网络可达,cookie 就可能以明文传输。启动 URL 含进程凭据,必须视为敏感输出;运行时诊断不会重复它。
持久密钥使 cookie 跨重启生效,也让被盗 cookie 最多保有配置的绝对有效期。删除记录并重启进程是全局撤销机制;当前 Token 验证器在每个请求上使用已加载的密钥。如果 HTTP listener 的 authority 经未加密网络可达,cookie 就可能以明文传输。启动 URL 含进程凭据,必须视为敏感输出;运行时诊断不会重复它。
同一浏览器在同一 hostname 下最多保持 17 个 authority 的登录:最近一次登录的 authority,以及签发时间最新的另外 16 个。登录时按签发时间而非最近使用排列其他 authority,因此每天都在使用的 authority,在另外 17 个 authority 于其后登录时会失去 cookie,需要重新打开其启动 URL。
本决策部分取代[浏览器信任说明](2026-07-28-api-browser-trust-boundary.zh.md)中的认证延期与未认证非 loopback 后果。该说明仍是媒体类型、Host、Origin、Fetch-Metadata 和配置 authority 校验的有效权威。没有 active Agent Note 被归档:重叠只发生在局部,两条安全规则都保有未来决策价值。
@@ -9,8 +9,8 @@
en: 6379f0a2522f4c46
zh: c45ffeb5089be274
/agent-note-one-outbound-proxy-policy-installed-before-anything-can-request/decision:
en: 5168301af05473ed
zh: 30b840cb41998bee
en: ab8483f25f1a8561
zh: ef0934416e44d2af
/agent-note-one-outbound-proxy-policy-installed-before-anything-can-request/alternatives-considered:
en: df6c078f239a11f5
zh: 914da26836aa373b
@@ -48,7 +48,7 @@ This accepts a documented seam. Such a context matches bypass entries by Node's
**SDK transports need independent verification.** The OTLP exporter selects `http-exporter-transport` on Node, which posts through `node:http` and bypasses the global fetch dispatcher; a `globalThis.fetch` reference in its browser implementation does not prove Node routing. The [E2B removal](../simplification/2026-09-11-remove-e2b-providers.md) retires a second SDK transport integration without changing this requirement.
**Telemetry stays direct on purpose.** Routing it needs one of two things, and both cost more than the channel is worth. An `http.Agent` reads the environment through `proxyEnv`, which arrived in Node 22.21 and 24.5 — above the runtime floor at adoption, so Node 22.19, 22.20, and 24.0–24.4 stayed direct regardless, and the proxy package would have to keep a `createNodeHttpAgent` export for a path that worked on some runtimes. The Node 24.9 floor removes this API gap; routing still needs independent transport integration and must preserve compression. Replacing the transport with the SDK's `fetch` delegate covers every runtime, but that delegate has no compression, and the shipped `base` bundle enables gzip: a realistic OTLP batch measures 6.4x smaller with it. An attempt that refused `exporter.compression` instead broke every test that boots the shipped bundle, and one that gzipped at the serializer worked but put transport code in a telemetry plugin to keep it working.
**Telemetry stays direct on purpose.** Routing it needs one of two things, and both cost more than the channel is worth. An `http.Agent` reads the environment through `proxyEnv`, which arrived in Node 22.21 and 24.5 — above the runtime floor at adoption, so Node 22.19, 22.20, and 24.0–24.4 stayed direct regardless, and the proxy package would have to keep a `createNodeHttpAgent` export for a path that worked on some runtimes. The supported Node 24.22.3 floor removes this API gap; routing still needs independent transport integration and must preserve compression. Replacing the transport with the SDK's `fetch` delegate covers every runtime, but that delegate has no compression, and the shipped `base` bundle enables gzip: a realistic OTLP batch measures 6.4x smaller with it. An attempt that refused `exporter.compression` instead broke every test that boots the shipped bundle, and one that gzipped at the serializer worked but put transport code in a telemetry plugin to keep it working.
Weighed against that, telemetry is the one outbound channel whose loss costs the user nothing: no tool, no model request, and no session depends on it, and an export that cannot connect is already dropped silently. A user behind a mandatory proxy is left exactly where they were before this change rather than regressed. `egress.spec.ts` now asserts the exclusion — an SDK upgrade that moved the exporter onto `fetch` would start routing telemetry through a proxy silently, and that case is what makes it visible.
@@ -48,7 +48,7 @@ URL 层策略未受影响:仅 `http(s)`、禁止内嵌凭据、长度上限与
**SDK 传输需要独立验证。** OTLP 导出器在 Node 上选择 `http-exporter-transport`,通过 `node:http` 投递并绕过全局 fetch dispatcher;其浏览器实现中的 `globalThis.fetch` 引用不能证明 Node 路由。[E2B 移除决策](../simplification/2026-09-11-remove-e2b-providers.zh.md)撤下另一项 SDK 传输集成,但不改变这一要求。
**遥测的直连是有意为之。** 要让它走代理只有两条路,代价都超过这条通道本身的价值。`http.Agent` 通过 `proxyEnv` 读取环境,而该选项自 Node 22.21 与 24.5 才有——高于采用此决策时的运行时下限,因此 Node 22.19、22.20 与 24.0–24.4 无论如何仍是直连,而代理包还得为一条只在当时部分运行时生效的路径保留 `createNodeHttpAgent` 导出。Node 24.9 下限消除了这一 API 缺口;代理路由仍需要独立集成传输,并保留压缩。改用 SDK 的 `fetch` delegate 替换传输可以覆盖所有运行时,但该 delegate 没有压缩能力,而随附的 `base` bundle 启用了 gzip:实测一批真实规模的 OTLP 数据启用后体积只有 1/6.4。曾有一版转而在加载期拒绝 `exporter.compression`,结果凡是启动随附 bundle 的测试全部失败;另一版在 serializer 处 gzip 确实能跑通,但代价是把传输层代码塞进了遥测插件。
**遥测的直连是有意为之。** 要让它走代理只有两条路,代价都超过这条通道本身的价值。`http.Agent` 通过 `proxyEnv` 读取环境,而该选项自 Node 22.21 与 24.5 才有——高于采用此决策时的运行时下限,因此 Node 22.19、22.20 与 24.0–24.4 无论如何仍是直连,而代理包还得为一条只在当时部分运行时生效的路径保留 `createNodeHttpAgent` 导出。受支持的 Node 24.22.3 下限消除了这一 API 缺口;代理路由仍需要独立集成传输,并保留压缩。改用 SDK 的 `fetch` delegate 替换传输可以覆盖所有运行时,但该 delegate 没有压缩能力,而随附的 `base` bundle 启用了 gzip:实测一批真实规模的 OTLP 数据启用后体积只有 1/6.4。曾有一版转而在加载期拒绝 `exporter.compression`,结果凡是启动随附 bundle 的测试全部失败;另一版在 serializer 处 gzip 确实能跑通,但代价是把传输层代码塞进了遥测插件。
与之相比,遥测是唯一一条丢失了对用户毫无代价的出网通道:没有任何工具、模型请求或会话依赖它,而连不上的导出本就被静默丢弃。处在强制代理后的用户,只是停留在本次改动之前的状态,而不是被弄坏。`egress.spec.ts` 现在断言这一排除——若某次 SDK 升级把导出器挪到 `fetch` 上,遥测就会开始静默走代理,而该用例正是让这件事暴露出来的东西。
@@ -9,8 +9,8 @@
en: 990d46f713fb6303
zh: 592cd6128a9640b1
/agent-note-one-remote-failure-vocabulary-for-ctx-remote/decision:
en: 120e2fb97ac765d8
zh: 5d5f110db4a9b717
en: b54b9d98a34eeaa1
zh: ac8e3d493b554c2d
/agent-note-one-remote-failure-vocabulary-for-ctx-remote/code-ownership:
en: cc1d8b88f7349b77
zh: 70f010e3310e2667
@@ -16,12 +16,12 @@ Fixed Host facts bypassed `ctx.remote` too: the Host home came from `(ctx.get('c
## Decision
`@deepseek-ai/dsh-typert-protocol` exports one failure class, `RemoteError<Code>`: a real `Error` carrying readonly `code` and `details`, the structural marker `isDSHRemoteError`, and standard `ErrorOptions` (`cause` holds in-process only). The correspondence between codes and details lives in one merge-extensible `RemoteErrorDetailsMap`; `RemoteFailure` is the code-distributed union of instances, and `RemoteResult<T>` keeps its shape.
`@deepseek-ai/dsh-typert-protocol` exports one failure class, `RemoteError<Code>`: a `HarnessError` from the dependency-free `@deepseek-ai/dsh-error` carrying readonly `code` and `details`, the structural marker `isDSHRemoteError`, and standard `ErrorOptions` (`cause` holds in-process only). The correspondence between codes and details lives in one merge-extensible `RemoteErrorDetailsMap`; `RemoteFailure` is the code-distributed union of instances, and `RemoteResult<T>` keeps its shape.
```text
export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends Error {
export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends HarnessError {
readonly isDSHRemoteError: true = true
constructor(readonly code: Code, message: string,
constructor(override readonly code: Code, message: string,
readonly details: RemoteErrorDetailsMap[Code], options?: ErrorOptions)
}
export type RemoteFailure = { [C in RemoteErrorCode]: RemoteError<C> }[RemoteErrorCode]
@@ -16,12 +16,12 @@ Host 固定事实同样绕过了 `ctx.remote`:Host home 取自 `(ctx.get('conn
## Decision
`@deepseek-ai/dsh-typert-protocol` 导出唯一的失败类 `RemoteError<Code>`:一个真 `Error`,带只读 `code` 与 `details`、结构标记 `isDSHRemoteError`,以及标准 `ErrorOptions`(`cause` 只在进程内有效)。码与 details 的对应关系收进一张 merge-extensible 的 `RemoteErrorDetailsMap`;`RemoteFailure` 是按码分布的实例 union,`RemoteResult<T>` 形状不变。
`@deepseek-ai/dsh-typert-protocol` 导出唯一的失败类 `RemoteError<Code>`:一个继承无依赖包 `@deepseek-ai/dsh-error` 中 `HarnessError` 的错误,带只读 `code` 与 `details`、结构标记 `isDSHRemoteError`,以及标准 `ErrorOptions`(`cause` 只在进程内有效)。码与 details 的对应关系收进一张 merge-extensible 的 `RemoteErrorDetailsMap`;`RemoteFailure` 是按码分布的实例 union,`RemoteResult<T>` 形状不变。
```text
export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends Error {
export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends HarnessError {
readonly isDSHRemoteError: true = true
constructor(readonly code: Code, message: string,
constructor(override readonly code: Code, message: string,
readonly details: RemoteErrorDetailsMap[Code], options?: ErrorOptions)
}
export type RemoteFailure = { [C in RemoteErrorCode]: RemoteError<C> }[RemoteErrorCode]
@@ -4,34 +4,22 @@
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-02-system-prompt-as-surface-node.md
/agent-note-the-system-prompt-is-surface-node-0:
en: 449b745953058cff
zh: 4db99c7d1f06e6b9
zh: f2ae7c4c4920cfdd
/agent-note-the-system-prompt-is-surface-node-0/problem:
en: 9ff2541082426e31
zh: d8f0ca49d3548f9b
en: 99c28399e0d722dd
zh: df17045e6b8c5346
/agent-note-the-system-prompt-is-surface-node-0/decision:
en: 3911ea80c5466d5e
zh: a0d6844e6f8af462
/agent-note-the-system-prompt-is-surface-node-0/decision/the-event:
en: 35302b956efc4999
zh: e45ee0d001b63269
/agent-note-the-system-prompt-is-surface-node-0/decision/the-operations:
en: a217a08932938062
zh: 4924d99d55d9c973
/agent-note-the-system-prompt-is-surface-node-0/decision/ownership-in-the-loop:
en: a7d0d3a61d2fef04
zh: 29a3d5dbed2f987a
/agent-note-the-system-prompt-is-surface-node-0/decision/consumers:
en: 39f9f4acffcccdc6
zh: 36b23a57e7d28950
/agent-note-the-system-prompt-is-surface-node-0/decision/v2-to-v3-structural-conversion:
en: 131ae882d0a28735
zh: ea4bc81f0ba5ddec
en: 3d3e8cfd46453ff7
zh: e95f6aefc8bf45c7
/agent-note-the-system-prompt-is-surface-node-0/decision/released-conversion:
en: 1cab1035e35837e5
zh: b9aec3cf8f1c92ae
/agent-note-the-system-prompt-is-surface-node-0/alternatives-considered:
en: 067e96734ebbce89
zh: 9f79bc0f4942675d
en: 376b3546528fd792
zh: f0af870e99b65a86
/agent-note-the-system-prompt-is-surface-node-0/consequences:
en: bccea8236b4c32b3
zh: a1150784718a6639
/agent-note-the-system-prompt-is-surface-node-0/testing:
en: 9a5a241ae3d0c676
zh: 8f3e83cc54604bcc
en: 78cc06bfa9e2f842
zh: a2a865b9954f5854
/agent-note-the-system-prompt-is-surface-node-0/verification:
en: 66c74f395cf84b51
zh: ec4ff0b9b35e27ed
@@ -6,89 +6,40 @@ English | [中文](2026-09-02-system-prompt-as-surface-node.zh.md)
## Problem
A system prompt held outside the surface has a different durable representation from every other message the model reads. Conversation messages are surface events (`user/message`, `assistant/message`, `tool/result`) folded in seq order by `Session.deriveMessages()`; a prompt stored as a `system` field of the log-only `request/header` snapshot has to be prepended by each serializer as wire message 0. The [reconstructable-requests Agent Note](2026-07-05-reconstructable-requests.md) made both halves durable, but that layout leaves one model-visible fact with two homes: the surface owns the messages, the header owns the message in front of them.
That split forces every reader of "what did the model see" to join two sources: the compaction summarizer copies the header prompt in front of the region's derived messages, `dsh-token-meter` estimates the system prompt from the header while pricing every other message from the surface, and the Web request-prompt card, the trajectory view, and the snapshot normalizer's `{{system}}` placeholder each read the header on their own. Change detection is split the same way: a `headerEquals` that compares `system` byte-for-byte beside `config` and `tools` makes a prompt change and a tool change indistinguishable in the log (`request/header` reason `change`) even though they are different operations on the conversation.
The split also blocks the next step. A model that accepts a mid-conversation `system` message as a prompt replacement needs the harness to append a system-role message to history; with the prompt living in the header there is no surface representation to append, and the header would have to be frozen by special case. The [in-history replacement decision](../feature/2026-09-02-in-history-system-prompt-replacement.md) depends on this note.
Keeping the system prompt in a log-only request header gives model-visible messages two durable homes. Serializers, compaction, token accounting and request inspection must prepend header text to conversation history independently. Comparing that text alongside configuration and tools also makes instruction changes indistinguishable from request-setting changes. A header cannot represent instructions introduced later in the conversation.
## Decision
The system prompt lives on the surface. It is an ordinary surface event, `system/message`, and every prompt lifecycle operation is one of the two existing `SurfaceOp` variants applied to that event type. The wire request is unchanged: the surface fold yields the message list the serializers send, with the system message first.
System instructions are ordinary `system/message` surface events. The first accepted request reserves a protected system head, including when its content is empty. Empty system content remains addressable in the log and surface but projects to no model message. Later updates can occupy their own conversation positions. [Section admission](2026-10-21-section-based-system-updates.md) owns current attribution and incremental updates; [deferred compaction rebuilding](2026-11-09-deferred-system-compaction.md) owns consolidation. The earlier whole-prompt replacement rule is superseded, while this single durable representation remains.
### The event
The surface fold supplies logged system messages to adapters alongside the rest of the conversation. Adapters choose native messages or their protocol representation without changing durable roles. `EpochHeader` holds configuration, adapter defaults and tools, not system text; prompt changes therefore have their own event identity rather than a header `change` reason. Header reasons still describe initial, resumed, changed or new-series requests.
`system/message` is a member of `SurfaceEventType` beside `user/message`, `assistant/message`, and `tool/result` (`packages/core/session/src/types.ts`). Its payload mirrors `tool/result`: `{ turn, step, message }`, where `message` is a `SystemMessage` with `role: 'system'`, one text block holding the rendered prompt, and source `{ kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }`. Empty `content` records "no system prompt": the node keeps its surface position and `deriveEventMessage` projects it to `null`, so it contributes no wire message. A non-empty node projects verbatim, so `deriveMessages()` returns the system message at its surface position and the DeepSeek serializers, which pass a `role: 'system'` history message through unchanged, emit it as wire message 0. `EpochHeader` is `{ config, adapterDefaults?, tools? }`; `canonicalHeader` and `headerEquals` in `packages/core/session/src/request-header.ts` compare config, adapter defaults, and tools only.
`assertSystemHeadRewrite` rejects a replacement covering node 0 when it is a system message unless another system message replaces exactly that node. Later system nodes remain replaceable by compaction. Protecting even an empty head gives rebuilding a stable target without inserting a node ahead of existing history. Per-node replacements preserve intervening conversation and use the existing replacement-generation accounting.
### The operations
The loop commits prepared instructions inside an open step, after request middleware and route preparation, before new user input and the model call. Rejection or cancellation before commitment admits neither instructions nor users. System-prompt assembly prepares candidates; the loop owns their durable append or replacement. Runtime context remains an independent user-role contribution. Both become model-visible through logged messages rather than adapter-local state.
| Situation | Surface operation |
|---|---|
| No `system/message` survives on the surface (including an empty rendered prompt) | append `system/message`; on the session's first step it is surface node 0, before the first `user/message` of the step |
| A `system/message` survives and the rendered prompt differs from its text (including a prompt that becomes empty) | replace exactly that node: `surfaceOp: { op: 'replace', startSeq: <seq of the node>, endSeq: <same> }`, `sourceEventSeqs: [<seq of the node>]`; an empty prompt produces an empty-content node that projects to no message |
| The rendered prompt equals the surviving node's text | no operation |
Token usage anchors to the priced surface immediately before the successful assistant event. Step start is too early: system and user admission, or retry recovery, can still change the request afterward. Embedded provider output is priced separately so assistant rewrites retain their signed delta; the open step retains lifecycle coordinates rather than another node snapshot.
When the initial rendered prompt is empty, the loop reserves an empty system head before the initial admitted user messages so a prompt that first becomes non-empty later still replaces node 0. Omitting that empty node would append the later prompt behind user history, where pi-ai converts it to a user message rather than its `systemPrompt`. Replacing node 0 is a head rewrite expressed on the surface: the provider prefix changes from the first token, the log records the shadowed node through `sourceEventSeqs`, and `replaceGeneration` advances as it does for a compaction replacement. The loop's `startsSeries` detection (`requestSurfaceGeneration !== surfaceGeneration`) therefore covers the prompt change without a `system` comparison in `headerEquals`. `request/header` keeps reasons `initial`, `resume`, `change`, and `series`; `change` means config or tools changed, and the unchanged header that follows a prompt replacement logs as `series`.
### Released conversion
`packages/core/session/src/surface.ts` enforces the head invariant in `assertSystemHeadRewrite`: a replacement whose range covers surface node 0 while node 0 is a `system/message` is rejected unless the replacing event is itself a `system/message` covering exactly that node. System nodes at later positions carry no such protection; a compaction range may shadow them.
### Ownership in the loop
`dsh-agent-loop` owns `SystemPromptProjection` beside `RuntimeContextProjection` in `packages/core/agent-loop/src/runtime-context.ts`. It reads the surviving `system/message` nodes from the current surface on every projection, so a compaction or replacement that ran earlier in the same step is already reflected. `project(rendered, { inHistory, startsSeries })` returns `{ message, intent }` — `intent` is `{ surfaceOp: 'append' }` when no system node survives or when the [in-history rule](../feature/2026-09-02-in-history-system-prompt-replacement.md) applies, otherwise a replacement of exactly the latest surviving system node — or `undefined` when the latest node already holds the rendered text.
In `packages/core/agent-loop/src/agent.ts`, `preStep` renders the prompt with `renderPrompt(assembly)` and projects it after the `agent/pre-step` waterfall, so a compaction provider's replacement inside that waterfall is visible to the decision; `turn()` commits the `system/message` immediately after `step/start` and before the step's `user/message` events, so log order is wire order. `buildRequest` sets no `system` on the request: the request is `header.config`, `session.deriveMessages()` (system message first), and `header.tools`. The loop step order is: claim inbox → `systemPrompt.assemble()` → project runtime context → `agent/pre-step` waterfall → project system prompt → `step/start` → commit `system/message` (when changed) → commit `user/message`s → `agent/request` waterfall → `request/header` → `request/context` → stream.
`dsh-token-meter` anchors usage to the priced surface immediately before the successful `assistant/message`, not to `step/start`. The loop admits the system prompt and user messages after step start, and retry recovery can replace nodes before rebuilding the request. Capturing that current surface includes every admitted input once; the embedded provider output remains separately priced so durable assistant rewrites retain their signed delta. The open step stores only turn and step for lifecycle validation, not a second node snapshot.
### Consumers
| Consumer | Reads |
|---|---|
| DeepSeek serializers (`serializeRequest`, `serializeRequestWithImages`) | `options.messages`, passing the `role: 'system'` history message through as wire message 0; `GenerateOptions.system` remains for direct one-shot callers such as title providers |
| `dsh-llm-pi-ai` | a leading system history message maps to pi-ai's `systemPrompt` |
| `compaction-basic` `buildSummarizationInput` | node 0's derived message prepended to the region in `SummarizationInput.messages`, with no separate `system` field; an empty-content head projects to no message while staying protected from compaction |
| `compaction-basic` `selectCompactableRange` | anchors at the first non-system node; node 0 is never inside a compaction range |
| `dsh-token-meter` | the system node is priced as a surface node under the `systemTokens` breakdown |
| Web request-prompt card, trajectory request node, request inspection | the `system/message` node; a replaced node 0 is shown as a prompt change and an appended in-history node as a prompt update, each in a collapsed inspectable card, never a chat bubble |
| Snapshot normalizer `{{system}}` placeholder, plan-mode tests | the system node's text |
| TypeScript and Python SDK expected outputs | include the `system/message` event |
| Human transcript projections | skip `system/message`; it is model history, not conversation |
`RuntimeContextProjection` and `SystemPromptProjection` both hand the loop an uncommitted message that `turn()` commits. They differ in how they observe the surface and in their operation set: runtime context follows `session/event` for its owned user-role snapshots and appends only, while the system prompt scans the current surface for system nodes on each projection because its decision depends on how many survive, and it appends or replaces per the route.
### V2-to-V3 structural conversion
The [V2-to-V3 specification](../../../../packages/session/session-format-v2-to-v3/README.md#system-head) owns system-head conversion and message identities; its [reference rules](../../../../packages/session/session-format-v2-to-v3/README.md#sequence-references) and [source refusal](../../../../packages/session/session-format-v2-to-v3/README.md#source-audit) define preservation and unsupported inputs. The migrated layout is semantically equivalent to native requests, not byte-identical to a native recording. A valid V2 source can lack an order-preserving conversion under the current step invariant; refusing it is preferable to moving history or relaxing ownership. Historical acceptance coordinates must not become acknowledgements of the transformed log.
The [released-format policy](2026-08-31-released-session-format-migrations.md) preserves each released conversion’s semantics; an existing target-format generation does not rerun its incoming edge. Projection-cache versions are independent of Session format versions.
The [canonical-envelope specification](../../../../packages/session/session-format-v2-to-v3/README.md#canonical-envelopes) defines composition with the structural conversion; the [canonical-envelope decision](2026-09-06-v3-canonical-session-envelopes.md) owns the strict-acceptance rationale.
The [V2-to-V3 specification](../../../../packages/session/session-format-v2-to-v3/README.md#system-head) owns structural conversion, message identities, reference preservation and refusal of unsupported sources. Migrated requests are semantically equivalent, not byte-identical to native recordings. When conversion cannot preserve historical order under the step invariant, refusal is preferable to moving messages or relaxing ownership. Historical acceptance coordinates do not acknowledge transformed logs. [Released-format rules](2026-08-31-released-session-format-migrations.md) preserve each conversion's semantics; an existing target generation does not rerun its incoming edge, and projection-cache versions are independent. [Canonical envelopes](2026-09-06-v3-canonical-session-envelopes.md) retain their separate strict-acceptance rationale.
## Alternatives considered
**Keep `header.system` and add `system/message` only for updates.** Two homes for one fact: every consumer above would read the header for message 0 and the surface for later messages, and the loop would need a special case that ignores `system` in `headerEquals` while a surface system node exists. Rejected because the point of the change is one representation.
**Keep `header.system` for the initial prompt and use events only for updates.** Every consumer would still need two sources, and header comparison would need a special exception while a system node exists.
**A dedicated log-only `system-prompt/change` event that rewrites the header.** Preserves the header as the home of the prompt and records changes as their own event kind, but still cannot express a system message inside history, so the in-history proposal would need a second mechanism anyway. Rejected.
**A log-only change event that rewrites the header.** This distinguishes changes but still cannot place a system message inside history; later updates would need another mechanism.
**Synthesize the system message inside the adapter from consecutive headers.** The adapter is stateless per request and never sees the log; a wire history that depends on adapter state is not reconstructable from the surface fold. Rejected.
**Synthesize instructions from consecutive headers in an adapter.** Adapters are stateless per request and do not see the log. Adapter-local reconstruction cannot make the durable message fold authoritative.
**Express the prompt as a `user/message` snapshot like runtime context.** Reuses an existing event type but sends the wrong role, so a model that treats a system message as authoritative would not. Rejected.
**Use a user-role snapshot like runtime context.** This sends a different role and loses native system authority on models that support it.
## Consequences
- One representation: every reader of "what did the model see" folds the surface; no consumer joins the header to the message list. `EpochHeader` has no `system` field, so a reader that expects one fails at compile time.
- A prompt change and a tool or config change are distinguishable in the log: the former is a `system/message` replacement of node 0 followed by a `series` header, the latter a `request/header` with reason `change`.
- Compaction carries an invariant: node 0 is never compacted. The `dsh-session` surface manager enforces it in the replace operation itself, so a compaction provider other than `compaction-basic` cannot shadow the prompt by anchoring at `surfaceNodes[0]`. Later system nodes are unprotected by design.
- `replaceGeneration` advances for a prompt replacement as well as for compaction; a reader that needs to distinguish them inspects the replacement event's type.
- A mid-history system node has a surface representation, which is what the [in-history replacement decision](../feature/2026-09-02-in-history-system-prompt-replacement.md) builds on.
- An initially empty prompt occupies the protected head without contributing a wire message; in replacement mode, a later non-empty prompt replaces it and remains the leading system message.
- Recorded snapshot fixtures carry the `system/message` event instead of a header `system` field. The snapshot normalizer tokenizes that event's text to `{{system}}`, the prompt sidecar is harvested from the `system/message` sequence (one section per prompt version, declared as `header.promptChanges`), and `request/header` pins compare config and tools only.
Request inspection, compaction, accounting, SDK events and recorded-session prompt sidecars read the same logged system messages. Human transcript projections omit them because they are model instructions rather than conversational speech. Replacing a system node changes the request prefix and replacement generation; appending a section can preserve its preceding prefix. No header-to-message join is required.
## Testing
The initial head cannot be compacted by any provider, even when empty; later system additions can be removed. Initial emptiness does not require later instructions to move to the head during ordinary admission. Current section and compaction decisions determine their placement.
- `packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts` pins zero post-call surface delta with provider usage through initial, growing, shrinking, and empty prompts, same-step retry replacement, request middleware, and fresh replay.
- `packages/core/session/tests/surface.spec.ts` (`system/message surface node` block) pins the leading system-role projection, the empty-content `null` projection, `assertSystemHeadRewrite`'s acceptance and rejection paths, the unprotected later system nodes, and the rejection of a seeded `system/message` with a non-system role or non-plugin source.
- `packages/core/agent-loop/tests/system-prompt-projection.spec.ts` pins the append on first render (including empty), the later non-empty prompt at the derived head in replacement mode, the no-op on an unchanged prompt, the replacement of the latest surviving node on change, the tail append after a replacement shadowed a non-head system node, and the in-history append and re-baseline rules.
- `packages/core/agent-loop/tests/request-reconstruction.spec.ts` (`a system-prompt change replaces surface node 0 and starts a new series under the same header`) pins the `series` header that follows a prompt replacement.
- `packages/llm/llm-deepseek/tests/serialize.spec.ts` (`serializes a leading system message byte-for-byte like the same prompt passed as options.system`) pins wire identity. `packages/llm/llm-pi-ai/tests/context.spec.ts` compares both system sources on text and image paths. `packages/compaction/compaction-basic/tests/compaction-basic.spec.ts` pins the derived prefix, routed tools, absent separate `system` option, and protected non-empty or empty head through the region transaction and default summarizer.
- The recorded snapshots under `snapshots/` pin the model-visible wire request of every shipped profile; a recorded session that renders a prompt carries the `system/message` event at surface node 0 in its `session.jsonl`, and a session with a mid-session prompt change carries the replacement of node 0 or, on an in-history route, the appended node.
## Verification
Session surface tests cover protected-head rewrites, empty projection, ordinary later-node replacement and persisted system-message validation. Adapter tests cover system-block rendering on text and image paths. Compaction tests retain the leading derived prompt and reject ranges covering the protected head. Request reconstruction and both SDK expected outputs verify that model-visible instructions are logged. Token-meter tests cover admission and retry changes before usage anchoring; recorded-session snapshots cover shipped profile requests and prompt sidecars.
@@ -1,94 +1,45 @@
# Agent Note: 系统提示词是 surface 的第 0 号节点
# Agent Note: 系统提示词是表面节点 0
Status: implemented
[English](2026-09-02-system-prompt-as-surface-node.md) | 中文
## Problem
## 问题
放在 surface 之外的系统提示词,其持久化表示与模型读到的其他所有消息都不同。对话消息是 surface 事件(`user/message`、`assistant/message`、`tool/result`),由 `Session.deriveMessages()` 按 seq 顺序折叠;而存放在仅记日志的 `request/header` 快照 `system` 字段中的提示词,必须由每个序列化器前置为协议消息 0。[可重建请求 Agent Note](2026-07-05-reconstructable-requests.zh.md) 让两半都成为持久数据,但这种布局让一个模型可见的事实拥有两个归属:surface 拥有消息,header 拥有排在这些消息之前的那条消息。
将系统提示词放在仅日志可见的请求头中,会为模型可见消息建立两个持久来源。序列化、压缩、token 计量和请求检查都必须独立地把请求头文本加到对话历史之前。将该文本与配置和工具一起比较,还会让指令变化与请求设置变化无法区分。请求头不能表示在对话后续才引入的指令。
这种拆分迫使每个想知道「模型看到了什么」的读取方都要合并两个来源:压缩(compaction)摘要器把 header 中的提示词复制到区域派生消息之前,`dsh-token-meter` 从 header 估算系统提示词却从 surface 为其他每条消息计价,Web 请求提示词卡片、轨迹视图和快照归一化器的 `{{system}}` 占位符各自单独读取 header。变更检测同样被拆开:在 `config` 和 `tools` 旁边逐字节比较 `system` 的 `headerEquals`,让提示词变更与工具变更在日志中无法区分(`request/header` 的 reason 都是 `change`),尽管它们是对对话的两种不同操作。
## 决策
这种拆分还阻塞了下一步。一个把对话中途的 `system` 消息当作提示词替换来接受的模型,需要 harness 向历史追加一条 system 角色消息;当提示词住在 header 里时,没有可追加的 surface 表示,header 也只能靠特例被冻结。[历史内替换决定](../feature/2026-09-02-in-history-system-prompt-replacement.zh.md) 依赖本 Agent Note。
系统指令是普通的 `system/message` 表面事件。首次接受的请求保留一个受保护的系统头节点,包括内容为空的情况。空系统内容在日志和表面中保持可寻址,但不投影为模型消息。后续更新可占据自己的对话位置。[分段准入](2026-10-21-section-based-system-updates.zh.md)负责当前归属和增量更新;[压缩后的延迟重建](2026-11-09-deferred-system-compaction.zh.md)负责合并。此前的整份提示词替换规则已被取代,但这份统一的持久表示保持不变。
## Decision
表面折叠将日志中的系统消息与其余对话一起提供给适配器。适配器选择原生消息或对应协议表示,不改变持久角色。`EpochHeader` 保存配置、适配器默认值和工具,不保存系统文本;因此提示词变化具有独立的事件标识,而非请求头的 `change` 原因。请求头原因仍描述初始、恢复、变化或新序列请求。
系统提示词住在 surface 上。它是一个普通的 surface 事件 `system/message`,提示词生命周期中的每个操作都是对该事件类型施加现有两种 `SurfaceOp` 变体之一。协议请求不变:surface 折叠产出的就是序列化器发送的消息列表,系统消息在最前面。
当节点 0 是系统消息时,`assertSystemHeadRewrite` 拒绝覆盖它的替换,除非另一条系统消息恰好替换该节点。后续系统节点仍可由压缩替换。连空头节点也受保护,为重建提供了稳定目标,无需在既有历史前插入节点。逐节点替换保留中间对话,并沿用现有替换代次计量。
### 事件
循环在开放步骤内提交准备好的指令,时机在请求中间件和路由准备之后、新用户输入和模型调用之前。提交前的拒绝或取消不会准入指令或用户消息。系统提示词组装准备候选;循环负责其持久追加或替换。运行时上下文仍是独立的用户角色贡献。两者都通过日志消息对模型可见,而非适配器本地状态。
`system/message` 是 `SurfaceEventType` 的成员,与 `user/message`、`assistant/message`、`tool/result` 并列(`packages/core/session/src/types.ts`)。它的载荷与 `tool/result` 对称:`{ turn, step, message }`,其中 `message` 是 `role: 'system'` 的 `SystemMessage`,一个文本块承载渲染后的提示词,source 为 `{ kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }`。空的 `content` 记录「没有系统提示词」:该节点保持其 surface 位置,`deriveEventMessage` 把它投影为 `null`,因此不贡献任何协议消息。非空节点逐字投影,因此 `deriveMessages()` 在其 surface 位置返回系统消息,而原样透传 `role: 'system'` 历史消息的 DeepSeek 序列化器把它作为协议消息 0 发出。`EpochHeader` 是 `{ config, adapterDefaults?, tools? }`;`packages/core/session/src/request-header.ts` 中的 `canonicalHeader` 与 `headerEquals` 只比较 config、适配器默认值和工具。
Token 用量锚定成功 assistant 事件前的已计价表面。步骤开始过早:系统与用户准入或重试恢复随后仍可改变请求。内嵌的提供方输出单独计价,因此 assistant 重写保留带符号增量;开放步骤只保留生命周期坐标,不再保存另一份节点快照。
### 操作
### 已发布转换
| 情形 | surface 操作 |
|---|---|
| surface 上没有存活的 `system/message`(包括渲染后的提示词为空时) | 追加 `system/message`;在会话的首个步骤中它是 surface 第 0 号节点,位于该步骤首条 `user/message` 之前 |
| 有存活的 `system/message` 且渲染后的提示词与其文本不同(包括提示词变为空) | 恰好替换该节点:`surfaceOp: { op: 'replace', startSeq: <该节点的 seq>, endSeq: <同一值> }`,`sourceEventSeqs: [<该节点的 seq>]`;空提示词产生一个投影为无消息的空内容节点 |
| 渲染后的提示词与存活节点的文本相同 | 无操作 |
[V2 到 V3 规范](../../../../packages/session/session-format-v2-to-v3/README.zh.md#system-head)负责结构转换、消息标识、引用保留及不支持来源的拒绝。迁移请求与原生记录语义等价,但并非字节相同。转换若无法在步骤约束下保留历史顺序,拒绝优于移动消息或放宽所有权。历史接受坐标不构成对转换后日志的确认。[已发布格式规则](2026-08-31-released-session-format-migrations.zh.md)保留每次转换的语义;已有目标代次不会重跑其传入转换边,投影缓存版本也独立于格式版本。[规范信封](2026-09-06-v3-canonical-session-envelopes.zh.md)保留其独立的严格接受依据。
当初始渲染的提示词为空时,循环在初始接纳的用户消息之前预留空系统头部,使稍后首次变为非空的提示词仍替换第 0 号节点。省略该空节点会让后来的提示词追加在用户历史之后,pi-ai 会将其转换为用户消息,而不是 `systemPrompt`。替换第 0 号节点是头部重写在 surface 上的表达:提供方前缀从第一个 token 起改变,日志通过 `sourceEventSeqs` 记录被遮蔽的节点,`replaceGeneration` 与压缩替换时一样推进。因此循环的 `startsSeries` 检测(`requestSurfaceGeneration !== surfaceGeneration`)无需在 `headerEquals` 中比较 `system` 即可覆盖提示词变更。`request/header` 保留 `initial`、`resume`、`change`、`series` 四种 reason;`change` 表示 config 或 tools 变更,提示词替换之后跟随的未变 header 记为 `series`。
## 考虑过的替代方案
`packages/core/session/src/surface.ts` 在 `assertSystemHeadRewrite` 中强制头部不变量:当第 0 号节点是 `system/message` 时,范围覆盖第 0 号节点的替换会被拒绝,除非替换事件本身是恰好覆盖该节点的 `system/message`。位于更后位置的系统节点没有此类保护;压缩范围可以遮蔽它们。
**保留 `header.system` 表示初始提示词,仅用事件表示更新。** 每个消费者仍需读取两个来源,而系统节点存在时,请求头比较需要特殊例外。
### 循环中的归属
**仅日志可见的变化事件重写请求头。** 这能区分变化,却仍不能将系统消息置于历史中;后续更新还需要另一套机制。
`dsh-agent-loop` 在 `packages/core/agent-loop/src/runtime-context.ts` 中与 `RuntimeContextProjection` 并列拥有 `SystemPromptProjection`。它在每次投影时从当前 surface 读取存活的 `system/message` 节点,因此同一步骤中更早运行的压缩或替换已经反映在内。`project(rendered, { inHistory, startsSeries })` 返回 `{ message, intent }`——没有系统节点存活或[历史内规则](../feature/2026-09-02-in-history-system-prompt-replacement.zh.md)适用时 `intent` 为 `{ surfaceOp: 'append' }`,否则是对最新存活系统节点的精确替换——最新节点已持有渲染文本时返回 `undefined`。
**在适配器中从连续请求头合成指令。** 适配器对每次请求无状态,也不读取日志。适配器本地重建无法让持久消息折叠成为权威来源。
在 `packages/core/agent-loop/src/agent.ts` 中,`preStep` 用 `renderPrompt(assembly)` 渲染提示词,并在 `agent/pre-step` waterfall 之后投影它,因此压缩提供者在该 waterfall 内做出的替换对决定可见;`turn()` 紧接在 `step/start` 之后、该步骤的 `user/message` 事件之前提交 `system/message`,因此日志顺序即协议顺序。`buildRequest` 不在请求上设置 `system`:请求由 `header.config`、`session.deriveMessages()`(系统消息在先)和 `header.tools` 构成。循环步骤顺序为:领取收件箱 → `systemPrompt.assemble()` → 投影运行时上下文 → `agent/pre-step` waterfall → 投影系统提示词 → `step/start` → 提交 `system/message`(有变化时) → 提交各条 `user/message` → `agent/request` waterfall → `request/header` → `request/context` → 流式请求。
**像运行时上下文一样使用用户角色快照。** 这发送了不同角色,并在支持系统角色的模型上丢失原生系统权限。
`dsh-token-meter` 把用量锚定到成功的 `assistant/message` 之前的已计价 surface,而不是 `step/start`。循环在步骤开始之后接纳系统提示词与用户消息,重试恢复还可能在重建请求之前替换节点。捕获当前 surface 会让每个已接纳输入恰好计入一次;内嵌的提供方输出仍单独计价,因此持久 assistant 改写保留其带符号增量。开放步骤只保存 turn 与 step 以验证生命周期,不保存第二份节点快照。
## 影响
### 消费方
请求检查、压缩、计量、SDK 事件和已记录 Session 的提示词侧文件读取同一批日志系统消息。面向人的 transcript(文本记录)投影省略它们,因为它们是模型指令而非对话发言。替换系统节点改变请求前缀和替换代次;追加段则可能保留此前前缀。无需将请求头与消息列表合并。
| 消费方 | 读取内容 |
|---|---|
| DeepSeek 序列化器(`serializeRequest`、`serializeRequestWithImages`) | `options.messages`,把 `role: 'system'` 的历史消息作为协议消息 0 透传;`GenerateOptions.system` 为标题提供方等直接单次调用方保留 |
| `dsh-llm-pi-ai` | 开头的 system 历史消息映射为 pi-ai 的 `systemPrompt` |
| `compaction-basic` 的 `buildSummarizationInput` | 第 0 号节点的派生消息前置于 `SummarizationInput.messages` 中的区域消息,无单独的 `system` 字段;空内容头节点不投影为消息,但仍受保护而不能被压缩 |
| `compaction-basic` 的 `selectCompactableRange` | 锚定在首个非系统节点;第 0 号节点永不落入压缩范围 |
| `dsh-token-meter` | 系统节点作为 surface 节点计价,归入 `systemTokens` 明细 |
| Web 请求提示词卡片、轨迹请求节点、请求检视 | `system/message` 节点;被替换的第 0 号节点显示为提示词变更,追加的历史内节点显示为提示词更新,各自以折叠可检视的卡片呈现,永不作为聊天气泡 |
| 快照归一化器的 `{{system}}` 占位符、plan-mode 测试 | 系统节点的文本 |
| TypeScript 与 Python SDK 预期输出 | 包含 `system/message` 事件 |
| 人类 transcript(文本记录)投影 | 跳过 `system/message`;它是模型历史,不是对话 |
任何提供方都不能压缩初始头节点,即使它为空;后续系统新增内容可以移除。初始为空并不要求普通准入将后来的指令移至头部。当前分段与压缩决策负责确定其位置。
`RuntimeContextProjection` 与 `SystemPromptProjection` 都把一条未提交的消息交给循环由 `turn()` 提交。两者在观察 surface 的方式与操作集上不同:运行时上下文跟随 `session/event` 观察自己拥有的 user 角色快照且只做追加,而系统提示词在每次投影时扫描当前 surface 上的系统节点,因为它的决定取决于有多少节点存活,并按路由追加或替换。
## 验证
### V2-to-V3 结构转换
[V2 到 V3 规范](../../../../packages/session/session-format-v2-to-v3/README.zh.md#system-head)负责系统头节点转换与消息身份;其[引用规则](../../../../packages/session/session-format-v2-to-v3/README.zh.md#sequence-references)和[源拒绝](../../../../packages/session/session-format-v2-to-v3/README.zh.md#source-audit)定义保留内容与不支持的输入。迁移布局与原生请求语义等价,而非与原生录制逐字节相同。有效 V2 源在当前步骤不变量下可能没有保持顺序的转换方式;拒绝它优于移动历史或放宽归属。历史接收坐标不得变为对转换后日志的确认。
[已发布格式策略](2026-08-31-released-session-format-migrations.zh.md)保留每条已发布转换的语义;已有目标格式代际不会重跑其入边。投影缓存版本独立于 Session 格式版本。
[规范信封规范](../../../../packages/session/session-format-v2-to-v3/README.zh.md#canonical-envelopes)定义与结构转换的组合;[规范信封决策](2026-09-06-v3-canonical-session-envelopes.zh.md)负责严格准入的依据。
## Alternatives considered
**保留 `header.system`,只为更新添加 `system/message`。** 一个事实两个归属:上述每个消费方都要从 header 读消息 0、从 surface 读后续消息,循环还需要一个在 surface 存在系统节点时让 `headerEquals` 忽略 `system` 的特例。被否决,因为本次变更的目的就是单一表示。
**用专门的仅记日志事件 `system-prompt/change` 重写 header。** 保留 header 作为提示词归属,并把变更记录为独立事件种类,但仍无法表达历史内部的系统消息,历史内替换提案还是需要第二套机制。被否决。
**在适配器内根据相邻 header 合成系统消息。** 适配器逐请求无状态且从不接触日志;依赖适配器状态的协议历史无法从 surface 折叠重建。被否决。
**像运行时上下文那样用 `user/message` 快照表达提示词。** 复用了现有事件类型,却发送了错误的角色,因此把系统消息视为权威的模型不会这样对待它。被否决。
## Consequences
- 单一表示:每个想知道「模型看到了什么」的读取方都折叠 surface;没有消费方需要把 header 与消息列表合并。`EpochHeader` 没有 `system` 字段,因此期望该字段的读取方在编译期失败。
- 提示词变更与工具或 config 变更在日志中可以区分:前者是对第 0 号节点的 `system/message` 替换加随后的 `series` header,后者是 reason 为 `change` 的 `request/header`。
- 压缩带有一条不变量:第 0 号节点永不被压缩。`dsh-session` 的 surface 管理器在替换操作本身中强制它,因此除 `compaction-basic` 以外的压缩提供方无法通过锚定在 `surfaceNodes[0]` 来遮蔽提示词。更后位置的系统节点按设计不受保护。
- `replaceGeneration` 在提示词替换时和压缩时一样推进;需要区分两者的读取方检查替换事件的类型。
- 历史中途的系统节点拥有 surface 表示,这正是[历史内替换决定](../feature/2026-09-02-in-history-system-prompt-replacement.zh.md)所依赖的基础。
- 初始空提示词占据受保护的头部,但不贡献协议消息;在替换模式下,后来的非空提示词替换它,并保持为开头的系统消息。
- 录制的快照 fixture 携带 `system/message` 事件而非 header 的 `system` 字段。快照归一化器把该事件的文本标记化为 `{{system}}`,提示词伴随文件从 `system/message` 序列采集(每个提示词版本一节,以 `header.promptChanges` 声明),`request/header` 的 pin 只比较 config 与 tools。
## Testing
- `packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts` 钉住提供方用量下调用后的表面增量为零,覆盖初始、增长、缩短与空提示词、同一步骤中的重试替换、请求中间件和全新回放。
- `packages/core/session/tests/surface.spec.ts`(`system/message surface node` 块)钉住开头 system 角色的投影、空内容的 `null` 投影、`assertSystemHeadRewrite` 的接受与拒绝路径、更后位置系统节点不受保护,以及对 seed 中非 system 角色或非插件 source 的 `system/message` 的拒绝。
- `packages/core/agent-loop/tests/system-prompt-projection.spec.ts` 钉住首次渲染时的追加(包括空提示词)、替换模式下后来非空提示词位于派生历史头部、提示词未变时的无操作、变更时对最新存活节点的替换、替换遮蔽了非头部系统节点之后的尾部追加,以及历史内追加与重新基线规则。
- `packages/core/agent-loop/tests/request-reconstruction.spec.ts`(`a system-prompt change replaces surface node 0 and starts a new series under the same header`)钉住提示词替换之后跟随的 `series` header。
- `packages/llm/llm-deepseek/tests/serialize.spec.ts`(`serializes a leading system message byte-for-byte like the same prompt passed as options.system`)钉住协议一致性。 `packages/llm/llm-pi-ai/tests/context.spec.ts` 在文本与图片路径上比较两种系统提示词来源。`packages/compaction/compaction-basic/tests/compaction-basic.spec.ts` 通过区域事务与默认摘要器钉住派生前缀、已路由工具、不携带单独 `system` 选项,以及非空或空头节点的保护。
- `snapshots/` 下的录制快照钉住每个随发 profile 的模型可见协议请求;渲染了提示词的录制会话在其 `session.jsonl` 中于 surface 第 0 号节点携带 `system/message` 事件,会话中途发生提示词变更的会话则携带对第 0 号节点的替换,或在历史内路由上携带追加的节点。
Session 表面测试覆盖受保护头节点重写、空投影、普通后续节点替换及持久化系统消息校验。适配器测试覆盖文本和图像路径的系统块渲染。压缩测试保留开头的派生提示词,并拒绝覆盖受保护头节点的范围。请求重建和两种 SDK 的预期输出验证模型可见指令写入日志。Token 计量测试覆盖用量锚定前的准入及重试变化;已记录 Session 快照覆盖发行配置的请求和提示词侧文件。
@@ -9,8 +9,8 @@
en: 8578b584bda3abdc
zh: 85dcf44aab2cfd51
/agent-note-desktop-welcome-window-material/decision:
en: 1affa7f1fccc945f
zh: e5aea959e7886a59
en: 307d17b576022b26
zh: 2992ab7d8abde284
/agent-note-desktop-welcome-window-material/alternatives-considered:
en: cf42e200b1d0f00a
zh: de96b5647f5ffb23
@@ -12,7 +12,7 @@ The desktop welcome design blurs the desktop behind its entire window. Chromium
The [Electron welcome window](../../../../apps/desktop/src/welcome-window.ts) owns native material and window controls. Its independently bundled React renderer supplies the entry, account sign-in states and API-key form. It shares the `StateDot` loading component with the Web UI without booting the Web plugin graph. The Desktop build emits local JavaScript and CSS under `lib/welcome`, included in packaged applications; the document keeps its network-denying content security policy. A narrow preload supplies typed shell copy, a write-only key operation, and a skip operation; IPC rejects other windows and subframes. Each sandboxed preload is bundled independently because Electron’s restricted require cannot load sibling chunks. The Electron main process authenticates through the shared Web launch URL and resolves the official provider's reference through the existing settings and credential RPC methods. The [thin Web wrapper](2026-09-10-desktop-web-wrapper.md) owns the HTTP server; onboarding adds no Host endpoint or child IPC operation. Responses contain metadata or a safe outcome, never a key or private provider diagnostics.
Cold startup opens the entry when neither an account credential nor a model API key is configured. Saving enters the workspace after persistence succeeds; skipping enters without saving a draft or a credential-entry completion flag. The next process launch checks credentials again. The Desktop preload marker suppresses the automatic Web credential step and welcome notice; settings and explicit API-key editing remain available. The [Desktop onboarding reference](../../../../packages/client/ui-settings-account/README.md) owns the separate device-local introduction after account login. Other native shells can disable only the credential step through the Models Host plugin's `credentialOnboarding` page-injection value. The module graph carries package identities rather than arbitrary Host config, so a Host row alone does not configure its Client half. The [account provider](2026-09-14-deepseek-account-login.md) supplies login and sign-out state while preserving independently stored API keys.
Cold startup opens the entry when neither an account credential nor a model API key is configured. Saving enters the workspace after persistence succeeds; skipping enters without saving a draft or a credential-entry completion flag. The next process launch checks credentials again. The Desktop preload marker suppresses the automatic Web credential step and welcome notice; settings and explicit API-key editing remain available. The [Desktop onboarding reference](../../../../packages/client/ui-settings-account/README.md) owns the separate device-local introduction after account login. Other native shells can disable only the credential step through the Models plugin's synced `credentialOnboarding` Config field. The module graph carries package identities rather than arbitrary Host config, so a Host row alone does not configure its Client half. The [account provider](2026-09-14-deepseek-account-login.md) supplies login and sign-out state while preserving independently stored API keys.
The generated project follows declared workspace dependencies because pnpm’s hoist index alone can omit configured plugins.
@@ -12,7 +12,7 @@ Status: implemented
[Electron 欢迎窗口](../../../../apps/desktop/src/welcome-window.ts)负责原生材质和窗口控件。独立打包的 React 渲染器提供入口、账号登录状态和 API Key 表单。它与 Web UI 共用 `StateDot` 加载组件,不启动 Web 插件图。Desktop 构建将本地 JavaScript 和 CSS 输出到 `lib/welcome`,并纳入应用安装包;文档继续使用禁止网络访问的内容安全策略。窄接口 preload 提供强类型桌面文案、仅写密钥操作和跳过操作;IPC 拒绝其他窗口和子 frame。每个沙箱 preload 都独立打包,因为 Electron 受限的 require 无法加载同目录中的拆分模块。Electron 主进程通过共享 Web 启动 URL 认证,并通过现有设置和凭证 RPC 方法解析官方提供方的引用。[Web 薄壳](2026-09-10-desktop-web-wrapper.zh.md)负责 HTTP 服务;引导不增加 Host 端点或子进程 IPC 操作。响应只包含元数据或安全结果,不包含密钥或提供方的私有诊断。
冷启动在账号凭证与模型 API Key 均未配置时打开入口。保存会在持久化成功后进入工作区;跳过会直接进入,不保存草稿或凭证入口完成标记。下次进程启动时会重新检查凭证。Desktop preload 标记抑制自动 Web 凭证步骤和欢迎须知;设置与显式 API Key 编辑仍然可用。[Desktop 引导参考](../../../../packages/client/ui-settings-account/README.zh.md)负责账号登录后独立的设备本地介绍流程。其他原生壳可以通过 Models Host 插件注入页面的 `credentialOnboarding` 值仅禁用凭证步骤。模块图传递的是包标识,而不是任意 Host 配置,因此单独配置 Host 行不会配置其 Client 半部。[账号提供方](2026-09-14-deepseek-account-login.zh.md)提供登录与退出登录状态,同时保留独立存储的 API Key。
冷启动在账号凭证与模型 API Key 均未配置时打开入口。保存会在持久化成功后进入工作区;跳过会直接进入,不保存草稿或凭证入口完成标记。下次进程启动时会重新检查凭证。Desktop preload 标记抑制自动 Web 凭证步骤和欢迎须知;设置与显式 API Key 编辑仍然可用。[Desktop 引导参考](../../../../packages/client/ui-settings-account/README.zh.md)负责账号登录后独立的设备本地介绍流程。其他原生壳可以通过 Models 插件同步到浏览器的 `credentialOnboarding` Config 字段仅禁用凭证步骤。模块图传递的是包标识,而不是任意 Host 配置,因此单独配置 Host 行不会配置其 Client 半部。[账号提供方](2026-09-14-deepseek-account-login.zh.md)提供登录与退出登录状态,同时保留独立存储的 API Key。
生成的开发项目沿已声明的 workspace 依赖建立链接,因为单独依赖 pnpm 的提升索引会漏掉配置插件。
@@ -9,17 +9,17 @@
en: 66ac3d7ce7eb8e15
zh: abb9d41b71900bbf
/agent-note-sandboxed-node-execution-for-ptc/decision:
en: d6b9c22603a4f933
zh: f324b91830078d9a
en: 3dac0013b3577b16
zh: 066e9b55fc3f457e
/agent-note-sandboxed-node-execution-for-ptc/decision/resolved-inputs-and-policy:
en: 3aef37bb4f8a8e53
zh: a7b477324d486ab3
en: e544f1a5b7f5b0ec
zh: 3195e0008313a5c6
/agent-note-sandboxed-node-execution-for-ptc/decision/control-and-lifetime:
en: a8897bae00f5f674
zh: 2c959353c5a885a4
/agent-note-sandboxed-node-execution-for-ptc/decision/resource-limits:
en: 3f1d8a30f6d48243
zh: faa7c01d7c959893
en: 9fc1a3c6e06ab156
zh: 7fcf818c3411eff4
/agent-note-sandboxed-node-execution-for-ptc/alternatives-considered:
en: 8ffcc2b32a2243d7
zh: 81d48d38947abc76
@@ -12,7 +12,7 @@ The [PTC foundation](../feature/2026-06-15-ptc.md) remains responsible for regis
## Decision
`dsh-ptc-runtime-node` in its default `per-call` mode runs each program in one fresh Node process. The host resolves execution choices, confines the launch through the same `ctx.sandbox` provider as Bash, and gives process lifetime to `ctx.subprocess`. The child evaluates erasable TypeScript with direct Node APIs, an empty model environment and host-provided asynchronous bindings. No worker or persistent kernel remains after a per-call execution.
`dsh-ptc-runtime-node` in its `per-call` mode runs each program in one fresh Node process. The host resolves execution choices, confines the launch through the same `ctx.sandbox` provider as Bash, and gives process lifetime to `ctx.subprocess`. The child evaluates erasable TypeScript with direct Node APIs, an empty model environment and host-provided asynchronous bindings. No worker or persistent kernel remains after a per-call execution.
The host preserves `ELECTRON_RUN_AS_NODE` for child startup; the bootstrap removes it from the native environment before evaluation, and model-visible `process.env` stays empty. Nested Electron launches require their own explicit Node-mode selection. Desktop uses Electron as its Node executable; removing this selector launches Electron's application path instead of the PTC bootstrap. Sandbox permission changes cannot repair that launch mismatch. The macOS Desktop regression uses real Electron to verify binding writes, direct workspace writes, and rejection of writes outside the workspace under restricted policy. It requires an installed Electron binary; ordinary runtime tests cover environment filtering without that dependency.
@@ -22,8 +22,6 @@ The host preserves `ELECTRON_RUN_AS_NODE` for child startup; the bootstrap remov
File mode, observed denial and enforcement completeness travel in `PtcRunResult.sandbox` separately from the program outcome. Restricted execution fails if the required sandbox backend cannot launch. Full access is an explicit policy mode. Program success does not prove full enforcement, and neither the `process` descriptor nor the extra control pipe claims multi-tenant isolation.
The [experimental Python provider](../../../../packages/experimental/ptc-runtime-python/README.md) shares the resolved file policy and sandbox diagnostics while retaining its local Unix execution and configured wall deadline. Per-call timeout overrides remain unsupported.
### Control and lifetime
The subprocess owner supplies a dedicated inherited binary control channel, separate from program stdout/stderr and launcher lifecycle IPC. The host bounds frames, queued writes, pending calls and outstanding argument bytes, then validates call identity and the binding allowlist before dispatch. Model code can write to that channel, so its bytes remain untrusted.
@@ -34,7 +32,7 @@ For temporary executions, program completion, timeout, cancellation and protocol
The default elapsed deadline is 120 seconds, capped at 600 seconds by default. Trusted service consumers may request `timeoutMs: null` to disable this timer; [workflow sandbox reuse](2026-09-13-workflow-ptc-sandbox-reuse.md) owns that caller-controlled lifetime. Omitted and numeric requests, including model-facing `run_code`, retain the numeric defaults and caps. An enabled deadline includes runtime setup and nested tool or approval waits. V8 old-generation memory, serialized outer output and control traffic have separate configured bounds. The heap limit excludes native allocations and descendant memory, and elapsed time is not a process-tree CPU budget.
The opt-in [in-memory execution mode](2026-09-23-best-effort-persistent-ptc.md) retains disposable memory under the same file policy; [retained-process permissions](2026-10-08-persistent-ptc-sandbox.md) govern policy changes and temporary escalation.
The default [in-memory execution mode](2026-09-23-best-effort-persistent-ptc.md) retains disposable memory under the same file policy; [retained-process permissions](2026-10-08-persistent-ptc-sandbox.md) govern policy changes and temporary escalation.
## Alternatives considered
@@ -12,7 +12,7 @@ Node worker 隔离 JavaScript 状态,但不应用调用 Session 的 OS 沙箱
## 决策
`dsh-ptc-runtime-node` 的默认 `per-call` 模式在一个全新 Node 进程中运行每个程序。Host 解析执行选择,通过与 Bash 相同的 `ctx.sandbox` 提供方约束启动,并将进程生命周期交给 `ctx.subprocess`。子进程以直接 Node API、空模型环境和 Host 提供的异步绑定求值可擦除 TypeScript。逐次执行结束后不保留 worker 或持久内核。
`dsh-ptc-runtime-node` 的 `per-call` 模式在一个全新 Node 进程中运行每个程序。Host 解析执行选择,通过与 Bash 相同的 `ctx.sandbox` 提供方约束启动,并将进程生命周期交给 `ctx.subprocess`。子进程以直接 Node API、空模型环境和 Host 提供的异步绑定求值可擦除 TypeScript。逐次执行结束后不保留 worker 或持久内核。
Host 在子进程启动时保留 `ELECTRON_RUN_AS_NODE`;bootstrap 在求值前将其从原生环境中删除,模型可见的 `process.env` 仍为空。嵌套启动 Electron 需要自行显式选择 Node 模式。桌面端使用 Electron 作为 Node 可执行文件;删除此选择变量会启动 Electron 应用路径,而不是 PTC bootstrap。更改沙箱权限无法修复这一启动模式不匹配。macOS 桌面端回归测试使用真实 Electron 验证绑定写入、直接工作区写入以及受限策略对工作区外写入的拒绝。该测试需要已安装的 Electron 二进制文件;普通运行时测试无需此依赖即可覆盖环境过滤。
@@ -22,8 +22,6 @@ Host 在子进程启动时保留 `ELECTRON_RUN_AS_NODE`;bootstrap 在求值前
文件模式、观察到的拒绝与强制完整性通过 `PtcRunResult.sandbox` 独立于程序结果传递。所需沙箱后端无法启动时,受限执行失败。完整访问是显式策略模式。程序成功不证明完整强制能力,`process` 描述符与额外控制管道也不声明多租户隔离。
[实验性 Python 提供方](../../../../packages/experimental/ptc-runtime-python/README.zh.md)共享已解析文件策略与沙箱诊断,同时保留本地 Unix 执行和配置的经过时间截止。仍不支持单次 timeout 覆盖。
### 控制与生命周期
子进程所有者提供专用的继承式二进制控制通道,与程序 stdout/stderr 及 launcher 生命周期 IPC 分开。Host 限制帧、排队写入、待处理调用和未完成参数字节,然后在分派前验证调用身份与绑定允许列表。模型代码可以写入该通道,因此其中字节仍不可信。
@@ -34,7 +32,7 @@ Host 在子进程启动时保留 `ELECTRON_RUN_AS_NODE`;bootstrap 在求值前
默认经过时间截止为 120 秒,默认上限为 600 秒。可信服务消费方可以请求 `timeoutMs: null` 来禁用该定时器;[工作流沙箱复用](2026-09-13-workflow-ptc-sandbox-reuse.zh.md)负责这种由调用方控制的生命周期。省略 timeout 或使用数值的请求(包括面向模型的 `run_code`)保留数值默认值与上限。启用的截止包括运行时准备以及嵌套工具或审批等待。V8 老生代内存、序列化外层输出与控制通信具有独立配置的上限。堆限制不包含原生分配和后代内存,经过时间也不是进程树 CPU 预算。
显式启用的[内存保留执行模式](2026-09-23-best-effort-persistent-ptc.zh.md)在相同文件策略下保留可丢弃内存;[常驻进程权限](2026-10-08-persistent-ptc-sandbox.zh.md)负责策略切换和临时提权。
默认的[内存保留执行模式](2026-09-23-best-effort-persistent-ptc.zh.md)在相同文件策略下保留可丢弃内存;[常驻进程权限](2026-10-08-persistent-ptc-sandbox.zh.md)负责策略切换和临时提权。
## 考虑过的替代方案
@@ -9,11 +9,11 @@
en: 31fba384d90ce7d2
zh: f8b814868f3280c3
/agent-note-session-working-directory/decision:
en: 9ccde1c5e635b9c0
zh: 4dc76229703d3ef7
en: 7f8ceafccd5951ec
zh: 758ff83ae3fa868a
/agent-note-session-working-directory/alternatives-considered:
en: f0995feb9b6bcce8
zh: 97417085fd17f70f
/agent-note-session-working-directory/consequences:
en: 2dd3a4de72ee6d74
zh: be5d8a80c8eaac6e
en: da8ef050c25c7a7b
zh: 8c9c1ca7467f986e
@@ -10,21 +10,21 @@ A fixed Session creation directory cannot represent a task that changes checkout
## Decision
`dsh-working-directory` owns one logged effective directory per Session. Its projection initializes from the immutable original project and folds `working-directory/change`; consumers read that owner instead of deriving execution paths from the header or sandbox root. Directory changes validate through the filesystem provider, serialize within the Session, and publish only after the new directory is available.
`dsh-working-directory` owns one logged effective directory per Session. Its projection initializes from the immutable original project and folds `workspace-root/change` events; consumers read that owner instead of deriving execution paths from the header or sandbox root. Directory changes validate through the filesystem provider, serialize within the Session, and publish only after the new directory is available.
The `dsh-base` composition mounts `working_directory({ cd? })` globally. The tool reads or changes the Session directory, so every Agent preset can select or recover it, including presets without file-editing tools. The Web composition keeps action tools in preset scopes.
Only Host operations change the directory: worktree creation and exit, the forge panel, SDK requests, and child startup call the service. The [workspace-root note](2026-11-03-session-workspace-root.md) removed the model-facing `working_directory` tool, records each change as `workspace-root/change`, and ignores stored `working-directory/change` events.
Required user-context snapshots carry the current value; each committed change attempts to queue a notice through the ordinary Agent inbox. Cancellation or disposal may discard unadmitted notices while the directory event survives for subsequent requests. The original project is the recovery destination when the selected directory disappears. Missing recovery destinations produce an error. Write permissions remain independent.
Subagents capture the parent's current directory or an explicit override and commit their selected directory after inherited history. Existing processes, terminals, and persistent shells keep their process-local directory. Project instructions, skills, and completion follow the effective directory without changing Session identity, grouping, or runtime composition.
Subagents start in the parent's current directory or a Host-chosen directory and commit that directory after inherited history. Existing processes, terminals, and persistent shells keep their process-local directory. The model's file and process tools, project instructions, skills, completion, and the sandbox boundary follow the effective directory, which is the [workspace root](2026-11-03-session-workspace-root.md), without changing Session identity, grouping, or runtime composition.
Live Session skill catalogs and file completion validate through the same directory owner. These reads can commit recovery and queue its notice before discovery, keeping discovered files and subsequent operations tied to the committed Session directory. Cold skill catalogs read the recorded projection without activating an Agent.
Live Session skill catalogs and file completion validate through the same directory owner, then read the workspace root. These reads can commit recovery and queue its notice before discovery, keeping discovered files and subsequent operations tied to the committed Session directories. Cold skill catalogs read the recorded root projection without activating an Agent.
Web sidebar terminal environment lookup reads the effective directory without filesystem validation or recovery, so a missing directory does not prevent reconnecting to a retained terminal. New terminal creation validates and recovers through the directory owner before spawning; the process keeps that directory independently of later Session changes.
Web sidebar terminal environment lookup reads the workspace root without filesystem validation or recovery, so a missing directory does not prevent reconnecting to a retained terminal. New terminal creation validates and recovers through the directory owner before spawning in the workspace root; the process keeps that directory independently of later Session changes.
Playwright MCP and Chrome DevTools MCP validate the effective directory when acquiring a Session's MCP connection and use it to launch the server. Later directory changes do not restart the retained server or change its process directory.
File links and command directory labels use result metadata captured when each operation runs, so historical rows remain correct after later directory changes.
File links and command directory labels use result metadata captured when each operation runs, so historical rows remain correct after later directory changes. References in prose, user mentions, and opened Sidebar tabs follow [conversation file references after directory moves](../bug-fix/2026-11-19-conversation-file-references-after-directory-moves.md).
The [prompt-variables note](2026-07-05-prompt-variables-and-tool-guidance-ownership.md) retains strict interpolation, route-variable ownership, and tool-guidance ownership. The [environment-suffix note](../../archived/bug-fix/2026-09-06-environment-prompt-suffix.md) retains ordered prefix/suffix placement for deployment, Harness source, and Web guidance. This decision owns directory state and placement in user context.
@@ -44,4 +44,4 @@ The runtime exposes one directory owner and preserves the original project. Cons
`{{cwd}}` has no loop-provided value; custom personas that depend on that built-in fail strict interpolation. Deployments remove those references using the [system-prompt migration guidance](../../../../packages/core/system-prompt/README.md). When both the current directory and its recovery destination are unavailable, prompt assembly rejects model turns; the [directory service recovery guidance](../../../../packages/session/working-directory/README.md#known-limitations-and-deferred-work) requires restoring the directory or selecting an existing absolute directory through the SDK or host service.
Verification covers independent Sessions, relative changes, replay, cancellation, recovery, tool disposal, user-context rendering, provider inheritance, and real directory-based operations.
Verification covers independent Sessions, relative changes, replay, cancellation, recovery, user-context rendering, provider inheritance, and real directory-based operations.
@@ -10,21 +10,21 @@ Status: implemented
## Decision
`dsh-working-directory` 拥有每个 Session 的一个日志化有效目录。投影从不可变的原始项目初始化,并折叠 `working-directory/change`;消费者读取该服务,而不是从 header 或沙箱根目录派生执行路径。目录变更通过文件系统 provider 验证,在 Session 内串行执行,并只在新目录可用后发布。
`dsh-working-directory` 拥有每个 Session 的一个日志化有效目录。投影从不可变的原始项目初始化,并折叠 `workspace-root/change` 事件;消费者读取该服务,而不是从 header 或沙箱根目录派生执行路径。目录变更通过文件系统 provider 验证,在 Session 内串行执行,并只在新目录可用后发布。
`dsh-base` 组合在全局挂载 `working_directory({ cd? })`。该工具读取或改变 Session 目录,使每个 Agent preset 都能选择或恢复它,包括没有文件编辑工具的 preset。Web 组合把操作工具放在 preset 作用域中。
只有 Host 操作改变目录:工作树的创建与退出、forge 面板、SDK 请求和子代理启动调用该服务。[工作区根记录](2026-11-03-session-workspace-root.zh.md)移除了面向模型的 `working_directory` 工具,把每次变更记录为 `workspace-root/change`,并忽略已存储的 `working-directory/change` 事件。
必需的用户上下文快照携带当前值;每次已提交变更都会尝试通过普通 Agent 收件箱排入通知。取消或销毁可能丢弃尚未进入请求的通知,但目录事件仍然保留,供后续请求使用。所选目录消失时恢复到原始项目。恢复目录也消失时返回错误。写权限保持独立。
子代理捕获父代理当前目录或显式覆盖值,并在继承历史之后提交选定目录。已有进程、终端和持久 shell 保留进程局部目录。项目指令、技能和补全跟随有效目录,不改变 Session 身份、归属或运行时组合。
子代理从父代理的当前目录或 Host 选定的目录启动,并在继承历史之后提交该目录。已有进程、终端和持久 shell 保留进程局部目录。模型的文件与进程工具、项目指令、技能、补全和沙箱边界都跟随有效目录,即[工作区根](2026-11-03-session-workspace-root.zh.md),不改变 Session 身份、归属或运行时组合。
活跃 Session 的技能目录与文件补全通过同一个目录 owner 验证目录。这些读取可在发现操作之前提交恢复并排入通知,使发现的文件与后续操作关联到已提交的 Session 目录。冷态技能目录读取已记录的投影,不激活 Agent。
活跃 Session 的技能目录与文件补全通过同一个目录 owner 验证目录,再读取工作区根。这些读取可在发现操作之前提交恢复并排入通知,使发现的文件与后续操作关联到已提交的 Session 目录。冷态技能目录读取已记录的根投影,不激活 Agent。
Web 侧栏终端的环境查询读取有效目录,不验证文件系统或执行恢复,因此目录缺失不会阻止重新连接保留的终端。新终端在创建进程前通过目录 owner 验证和恢复目录;后续 Session 目录变更不会改变该进程的目录。
Web 侧栏终端的环境查询读取工作区根,不验证文件系统或执行恢复,因此目录缺失不会阻止重新连接保留的终端。新终端在创建进程前通过目录 owner 验证和恢复目录,并在工作区根中启动;后续 Session 目录变更不会改变该进程的目录。
Playwright MCP 和 Chrome DevTools MCP 在获取 Session 的 MCP 连接时验证有效目录,并在该目录启动服务器。后续目录变更不会重启保留的服务器,也不会改变其进程目录。
文件链接与命令目录标签使用各次操作执行时记录的结果元数据,因此后续目录变更不会使历史记录指向错误的位置。
文件链接与命令目录标签使用各次操作执行时记录的结果元数据,因此后续目录变更不会使历史记录指向错误的位置。正文里的引用、用户 mention 与已打开的侧边栏 tab 遵循[目录移动后的对话文件引用](../bug-fix/2026-11-19-conversation-file-references-after-directory-moves.zh.md)。
[提示词变量记录](2026-07-05-prompt-variables-and-tool-guidance-ownership.zh.md)保留严格插值、路由变量归属与工具指导归属。[环境后缀记录](../../archived/bug-fix/2026-09-06-environment-prompt-suffix.md)保留部署、Harness 源码与 Web 指导的有序前缀/后缀位置。本决策拥有目录状态及其用户上下文位置。
@@ -44,4 +44,4 @@ Playwright MCP 和 Chrome DevTools MCP 在获取 Session 的 MCP 连接时验证
`{{cwd}}` 没有循环提供的值;依赖该内置变量的自定义 persona 会触发严格插值错误。部署方按照[系统提示词迁移说明](../../../../packages/core/system-prompt/README.zh.md)移除这些引用。当前目录与恢复目标均不可用时,提示词组装会拒绝模型轮次;[目录服务恢复说明](../../../../packages/session/working-directory/README.zh.md#known-limitations-and-deferred-work)要求恢复目录,或通过 SDK 或 Host 服务选择现有的绝对目录。
验证覆盖 Session 相互独立、相对路径变更、回放、取消、恢复、工具卸载、用户上下文渲染、provider 继承和真实目录操作。
验证覆盖 Session 相互独立、相对路径变更、回放、取消、恢复、用户上下文渲染、provider 继承和真实目录操作。
@@ -12,11 +12,11 @@
en: a15c7c13f167e5ac
zh: 63bcc2ef60c2f344
/agent-note-client-session-references-reference-sources-and-ui-status/decision/scope-and-ownership:
en: 3f04f9c2b7b0fc2b
zh: ebfcbac3de8463a3
en: 9ff7f15985d06986
zh: fe27ef687594c124
/agent-note-client-session-references-reference-sources-and-ui-status/decision/addresses-bindings-and-references:
en: 3743abc8bca00348
zh: d79e6a9311f0a2fe
en: 21659869e0d90071
zh: 6a011076cf6676ca
/agent-note-client-session-references-reference-sources-and-ui-status/decision/acquisition-failure-and-release:
en: 84e9528d4f995460
zh: f79f197d3dfbe8e9
@@ -24,8 +24,8 @@
en: e2de83d10542f93b
zh: 3855b38fc8c48ea3
/agent-note-client-session-references-reference-sources-and-ui-status/decision/unified-ui-session-status:
en: 2d75aef5cf5f1fc8
zh: 87a7051f24f9871a
en: 45038468e95179f9
zh: ac8f2f098f5b2427
/agent-note-client-session-references-reference-sources-and-ui-status/decision/explicit-providers-and-consumer-lifetimes:
en: 04802baa0147fec1
zh: b86037bf2e4bc936
@@ -21,7 +21,8 @@ Client Session objects, Agent-scoped Client Contexts, references, consumer-sourc
| Owner | Responsibility |
| --- | --- |
| Client Session Controller | Catalog, live generations, references, source counts, bindings, history windows, and existing Session control state |
| `ui-session` | Explicit Session Provider integration and the unified UI status source |
| `ui-session` | Explicit Session Provider integration and the effective pending-interaction source |
| `ui-session-status` | The unified UI status source |
| View or operation | Its own reference, target, source identifier, and release point |
| Workspace UI | Main-area target and reference, navigation, persisted target, and creation flow |
| UI composition boundary | Supplies an owner-provided reference to one explicit `SessionProvider` |
@@ -51,7 +52,9 @@ The [blank Session decision](2026-09-17-process-local-blank-sessions.md) owns cr
| `sessions.sessionOf(ctx)` | Returns the matching live Session face or `undefined`; an ended Context cannot resolve to a same-id replacement |
| `sessions.create(...)` / `sessions.fork(...)` | Existing Host operations returning a Session identity; retaining and displaying it remain explicit |
`SessionRetainOptions` contains required `source: SessionReferenceSource` and optional `signal: AbortSignal`. Both acquisition methods accept `target: SessionTarget` and these options. Source keys are consumer-defined and declaration-merge extensible; there is no runtime source-registration protocol or default main-view source. A source is a usage label, not another Session address or a permission to act on it.
`SessionRetainOptions` contains required `source: SessionReferenceSource`, optional `facets`, and optional `signal: AbortSignal`. Both acquisition methods accept `target: SessionTarget` and these options. Source keys are consumer-defined and declaration-merge extensible; there is no runtime source-registration protocol or default main-view source. A source is a usage label, not another Session address or a permission to act on it.
[Session retain facets and recent views](2026-11-15-session-retain-facets-and-recent-views.md) owns `facets`, the independently counted parts a reference keeps beyond its history stream, and the `recentViews` source.
### Acquisition, failure, and release
@@ -89,28 +92,22 @@ Window-level consumers may inspect source markers. Session business operations s
### Unified UI Session status
`ui-session` owns a React-free `sessionStatus` source and exposes it through the standard `useSessionStatus` hook. The snapshot is indexed by Session identity and supplies one UI status record per known Session. It combines these independent facts rather than reducing them to one mutually exclusive phase:
`ui-session-status` owns the React-free `uiSession.sessionStatus` service, read as `ctx.uiSession.sessionStatus`, and exposes it through the standard `useSessionStatus` hook. The snapshot is indexed by Session identity and supplies one UI status record per known Session. It combines these independent facts rather than reducing them to one mutually exclusive phase:
| Field | Value | Meaning and owner |
| --- | --- | --- |
| `running` | `boolean` or `undefined` | Latest known Session running fact; absence of a baseline is not confirmed idle |
| `pendingInteraction` | `SessionPendingInteraction` or `undefined` | Effective domain-owned request, or absence when no request is pending |
| `completionUnread` | `boolean` | UI reminder for an observed stop that has not been acknowledged |
| `completionUnread` | `boolean` | Host reading record carries a manual unread mark or an unacknowledged completed turn |
| `completionFailed` | `boolean` | The Session is unread and its latest completed turn ended with an execution error |
Source counts remain authoritative in `SessionListState.byId[id].retainedBy`; UI status reads them for acknowledgement policy without owning another reference registry. Titles, Workspace associations, history, queues, and projection data remain with their existing owners.
Pending domains retain `SessionPendingInteractionMap`, request identities, precedence, publication disposers, and teardown delegation. The unified status includes the same effective request object; it does not copy requests or create a second pending registry. Workspace status indicators and Conversation composer selection read `useSessionStatus` instead of separate `useSessionPendingInteraction` and `useCompletedSessionIds` hooks.
Pending domains retain `SessionPendingInteractionMap`, request identities, precedence, publication disposers, and teardown delegation in `ui-session`, which publishes each Session's effective request read-only as `ctx.uiSession.pendingInteractions`. The unified status includes the same effective request object; it does not copy requests or create a second pending registry. Workspace status indicators and Conversation composer selection read `useSessionStatus` instead of separate `useSessionPendingInteraction` and `useCompletedSessionIds` hooks.
Completion tracking subscribes to the existing `api-session/status` events so a running-to-idle transition is not lost in batched catalog snapshots. Host-list rows (`ids`) establish initial and reconnect running baselines; synthetic catalog and retained rows preserve independently observed status. A pending empty catalog is not evidence that Sessions disappeared. The update rules are:
Running tracking subscribes to the existing `api-session/status` events so a running-to-idle transition is not lost in batched catalog snapshots. Host-list rows (`ids`) establish initial and reconnect running baselines; synthetic catalog and retained rows preserve independently observed status. A pending empty catalog is not evidence that Sessions disappeared, and removing a Session clears its running baseline; pending-request teardown stays with the request's domain.
- An initial idle baseline does not create a completion reminder.
- Observing running clears an earlier reminder and records the running baseline.
- A known running-to-idle transition sets `completionUnread` only when the Session lacks main-view ownership.
- Acquiring main-view ownership clears the reminder; retaining from an unrelated source does not.
- Releasing main-view ownership does not manufacture a reminder for an earlier stop.
- Removing a Session clears its completion reminder and running baseline; pending-request teardown stays with the request's domain.
The reminder denotes an observed stop, not successful task completion or completion of a particular queued message. Main-view ownership preserves selection-based acknowledgement even while a global panel temporarily hides the Conversation. The design has no `ui-session/view-presence` event, mounted-Provider index, or implicit acknowledgement from Provider mount.
Completion reminders follow the Host reading records described in [Host-memory Session reading state](../feature/2026-10-23-session-reading-memory.md), which supersedes this note's earlier Client-local reminder rules: running changes and main-view ownership neither set nor clear a reminder, and the visible main view acknowledges a completed turn only after its body arrives. The reminder denotes a completed turn, not successful task completion or completion of a particular queued message. Main-view ownership preserves selection-based acknowledgement even while a global panel temporarily hides the Conversation. The design has no `ui-session/view-presence` event, mounted-Provider index, or implicit acknowledgement from Provider mount.
The Session Controller publishes running and reference-source facts but owns no completion-reminder set, `consumeCompletion` method, or pending-interaction presentation. Reference acquisition does not execute completion-reminder business logic.
@@ -21,7 +21,8 @@ Client Session 对象、Agent 作用域的 Client Context、引用、使用方
| 所有者 | 职责 |
| --- | --- |
| Client Session Controller | 目录、活跃代、引用、来源计数、binding、历史窗口与既有 Session 控制状态 |
| `ui-session` | 显式 Session Provider 集成与统一 UI 状态来源 |
| `ui-session` | 显式 Session Provider 集成与有效待处理交互来源 |
| `ui-session-status` | 统一 UI 状态来源 |
| 视图或操作 | 自己的引用、目标、来源标识与释放时机 |
| Workspace UI | 主区域目标与引用、导航、持久目标及创建流程 |
| UI 组合边界 | 将所有者提供的引用交给一个明确的 `SessionProvider` |
@@ -51,7 +52,9 @@ Client Session 对象、Agent 作用域的 Client Context、引用、使用方
| `sessions.sessionOf(ctx)` | 返回匹配的活跃 Session 接口或 `undefined`;已结束的 Context 不能解析为同 ID 替代代 |
| `sessions.create(...)` / `sessions.fork(...)` | 既有 Host 操作,返回 Session 身份;持有与展示仍需显式执行 |
`SessionRetainOptions` 包含必填 `source: SessionReferenceSource` 与可选 `signal: AbortSignal`。两个获取方法均接受 `target: SessionTarget` 和这些 options。来源键由使用方定义,通过声明合并扩展;不提供运行时来源注册协议,也不默认使用主视图来源。来源是使用标签,不是另一种 Session 地址,也不授予操作权限。
`SessionRetainOptions` 包含必填 `source: SessionReferenceSource`、可选 `facets` 与可选 `signal: AbortSignal`。两个获取方法均接受 `target: SessionTarget` 和这些 options。来源键由使用方定义,通过声明合并扩展;不提供运行时来源注册协议,也不默认使用主视图来源。来源是使用标签,不是另一种 Session 地址,也不授予操作权限。
[Session retain 子要素与最近访问会话](2026-11-15-session-retain-facets-and-recent-views.zh.md) 负责 `facets`,即引用在历史流之外独立计数保活的部分,以及 `recentViews` 来源。
### 获取、失败与释放
@@ -89,28 +92,22 @@ Controller 将来源计数与每个活跃代的引用共同管理。每个来源
### 统一的 UI Session 状态
`ui-session` 拥有不依赖 React 的 `sessionStatus` 来源,通过标准 `useSessionStatus` 钩子公开。快照按 Session 身份索引,为每个已知 Session 提供一条 UI 状态记录。它组合下列独立事实,不将它们压缩成互斥的单一阶段:
`ui-session-status` 拥有不依赖 React 的 `uiSession.sessionStatus` 服务,以 `ctx.uiSession.sessionStatus` 读取,并通过标准 `useSessionStatus` 钩子公开。快照按 Session 身份索引,为每个已知 Session 提供一条 UI 状态记录。它组合下列独立事实,不将它们压缩成互斥的单一阶段:
| 字段 | 取值 | 含义与所有者 |
| --- | --- | --- |
| `running` | `boolean` 或 `undefined` | 最新已知的 Session 运行事实;缺少基线不表示已确认 idle |
| `pendingInteraction` | `SessionPendingInteraction` 或 `undefined` | 领域拥有的有效请求;没有待处理请求时缺失 |
| `completionUnread` | `boolean` | 已观察到停止、但尚未确认的 UI 提醒 |
| `completionUnread` | `boolean` | 宿主阅读记录带有手动未读标记或尚未确认的完成轮次 |
| `completionFailed` | `boolean` | Session 未读,且最近完成的轮次以执行错误结束 |
来源计数以 `SessionListState.byId[id].retainedBy` 为准;UI 状态读取它以执行确认策略,不维护另一套引用注册表。标题、Workspace 关联、历史、队列和投影数据保留在各自的既有所有者中。
待处理领域保留 `SessionPendingInteractionMap`、请求身份、优先级、发布清理函数与卸载委托。统一状态包含同一个有效请求对象,不复制请求,也不创建第二套待处理注册表。Workspace 状态指示器与 Conversation composer 选择读取 `useSessionStatus`,不再分别读取 `useSessionPendingInteraction` 和 `useCompletedSessionIds` 钩子。
待处理领域在 `ui-session` 中保留 `SessionPendingInteractionMap`、请求身份、优先级、发布清理函数与卸载委托,`ui-session` 以只读的 `ctx.uiSession.pendingInteractions` 发布每个 Session 的有效请求。统一状态包含同一个有效请求对象,不复制请求,也不创建第二套待处理注册表。Workspace 状态指示器与 Conversation composer 选择读取 `useSessionStatus`,不再分别读取 `useSessionPendingInteraction` 和 `useCompletedSessionIds` 钩子。
完成跟踪订阅已有 `api-session/status` 事件,避免 running 到 idle 的变化在合批目录快照中丢失。Host 列表行(`ids`)建立初始与重连的 running 基线;目录合成行与 retained 行保留独立观察到的状态。pending 状态下的空目录不能证明 Session 已消失。更新规则如下:
运行跟踪订阅已有 `api-session/status` 事件,避免 running 到 idle 的变化在合批目录快照中丢失。Host 列表行(`ids`)建立初始与重连的 running 基线;目录合成行与 retained 行保留独立观察到的状态。pending 状态下的空目录不能证明 Session 已消失;移除 Session 时清除其运行基线,待处理请求的清理仍属于请求领域。
- 初始 idle 基线不产生完成提醒。
- 观察到 running 时清除旧提醒,并记录运行基线。
- 从已知 running 变为 idle 时,仅在 Session 没有主视图持有的情况下设置 `completionUnread`。
- 获得主视图持有时清除提醒;无关来源的 retain 不清除提醒。
- 释放主视图持有不会为更早的一次停止补造提醒。
- 移除 Session 时清除其完成提醒与运行基线;待处理请求的清理仍属于请求领域。
提醒表示观察到的一次停止,不代表任务成功,也不代表某条排队消息完成。即使全局面板暂时隐藏 Conversation,主视图所有权仍保持基于选择的确认语义。本设计不提供 `ui-session/view-presence` 事件、已挂载 Provider 索引或 Provider 挂载时的隐式确认。
完成提醒跟随[宿主内存中的会话阅读状态](../feature/2026-10-23-session-reading-memory.zh.md)所述的宿主阅读记录,该记录取代本记录早先的前端本地提醒规则:运行变化和主视图持有都不会设置或清除提醒,可见的主视图只在正文到达后确认完成的轮次。提醒表示完成的一个轮次,不代表任务成功,也不代表某条排队消息完成。即使全局面板暂时隐藏 Conversation,主视图所有权仍保持基于选择的确认语义。本设计不提供 `ui-session/view-presence` 事件、已挂载 Provider 索引或 Provider 挂载时的隐式确认。
Session Controller 发布运行与引用来源事实,但不拥有完成提醒集合、`consumeCompletion` 方法或待处理交互展示。引用获取不执行完成提醒业务逻辑。
@@ -9,8 +9,8 @@
en: 44615a7a0939054e
zh: b8efa721321ba0d7
/agent-note-creator-mode-installs-persistent-plugin-bundles/decision:
en: 38ecabc170c418c7
zh: d380f53fa508328e
en: bc4c98ac82cae462
zh: 17a1588f93b056a7
/agent-note-creator-mode-installs-persistent-plugin-bundles/alternatives-considered:
en: af527d8aabdfd59c
zh: 34388da992d2ab56
@@ -12,9 +12,9 @@ Agents need to install capabilities and use them during the same conversation. G
Creator mode enables the existing `plugin_manager` tool. Agents author packages and Loader YAML patches as workspace files, then install them through `install_bundle`. An MCP connection is a configuration-only bundle inserting the installed `dsh-mcp-client`; a UI bundle includes a Host entry and a Client artifact. Profile locking, package installation, enablement and HMR remain owned by the existing manager. The entire management tool requires `danger-full-access` or approval for one call: profile changes can load code with host permissions and affect other sessions. Each execution, including inventory reads, uses the shared sandbox escalation helper and approval service before accessing the manager. Under lower sandbox modes, `ask` requests approval and `never` denies; a full-access session needs no additional approval. A grant does not change session permissions, but its profile changes persist. This keeps shell-equivalent Host access explicit without requiring a permanent session-wide elevation. Human-operated Web and CLI controls retain their existing behavior.
The default Standard mode enables the same tool under the same profile condition and approval gate. Without it, Standard sessions did not install plugins directly and spent extra turns and tokens working around the missing tool; the change also moves Standard and Creator toward one capability set. A full-access Standard session can therefore install Host code without a separate prompt, as its shell already can. PTC and Minimal keep the tool disabled.
The default Standard mode enables the same tool under the same profile condition and approval gate. Without it, Standard sessions did not install plugins directly and spent extra turns and tokens working around the missing tool; the change also moves Standard and Creator toward one capability set. A full-access Standard session can therefore install Host code without a separate prompt, as its shell already can. PTC enables it under the same condition, and Minimal keeps the tool disabled.
The model sees two read-only Cordis inspection tools. Generated-code define/run/stop/undefine and dynamic self-inspection tool APIs are absent. Existing runtime and Client consumers retain their services; historical session cards remain readable. This supersedes only the model-facing mutation workflow in the [self-referential toolset reference](../../../../packages/extensions/cordis-host-runner/README.md); its runtime ownership and sandbox rationale remain independently relevant. The [profile transaction decision](2026-09-14-current-profile-plugin-management.md) continues to govern locking, package installation, and partial failures.
Standard and Creator expose one read-only Cordis inspection tool, `cordis_inspect`. Omitting `query` discovers providers; supplying `query` reads one declared method. The shared entry keeps runtime discovery available in the default mode without duplicating tool descriptions. Generated-code define/run/stop/undefine and dynamic self-inspection tool APIs are absent. Existing runtime and Client consumers retain their services; historical session cards remain readable. This supersedes only the model-facing mutation workflow in the [self-referential toolset reference](../../../../packages/extensions/cordis-host-runner/README.md); its runtime ownership and sandbox rationale remain independently relevant. The [profile transaction decision](2026-09-14-current-profile-plugin-management.md) continues to govern locking, package installation, and partial failures.
Visual creation requests default to an installed Client plugin rendered in the current Web page unless the user names another destination. The development skill supplies a minimal package and effect-owned Client registration. Discovery ends when the required APIs are known; a working first version is installed before optional visual refinement. Verification uses the connected page where available. Browser authentication or operating-system setup is not a prerequisite for plugin installation, and a mock preview cannot establish an in-app result.
@@ -12,9 +12,9 @@ agent 需要安装能力并在同一段对话中使用。生成代码工具在
创造模式启用现有的 `plugin_manager` 工具。agent 将包和 Loader YAML patch 写入工作区文件,再通过 `install_bundle` 安装。MCP 连接是插入已安装 `dsh-mcp-client` 的纯配置组合包;UI 组合包包含 Host 入口和 Client 产物。profile 锁、包安装、启停和 HMR 继续由现有管理器负责。 整个管理工具要求 `danger-full-access` 或单次调用的批准:profile 变更能以宿主权限加载代码,并影响其他会话。每次执行(包括查询列表)都会先使用共享沙箱提权函数和审批服务,再访问管理器。在较低沙箱模式下,`ask` 请求审批,`never` 拒绝;完整权限会话无需额外审批。批准不改变会话权限,但本次操作的 profile 变更会持久化。这让与 shell 等价的宿主访问需要明确授权,同时不必永久提升整个会话的权限。由用户直接操作的 Web 和 CLI 控件保持原有行为。
默认的标准模式以相同的 profile 条件和审批门槛启用同一工具。缺少该工具时,标准模式会话不会直接安装插件,而要额外花费轮次和 token 绕过;此改动也让标准模式和创造模式朝同一能力集收敛。因此,完整权限的标准模式会话无需单独审批即可安装 Host 代码,与其 shell 已有的能力一致。PTC 和 Minimal 仍禁用该工具。
默认的标准模式以相同的 profile 条件和审批门槛启用同一工具。缺少该工具时,标准模式会话不会直接安装插件,而要额外花费轮次和 token 绕过;此改动也让标准模式和创造模式朝同一能力集收敛。因此,完整权限的标准模式会话无需单独审批即可安装 Host 代码,与其 shell 已有的能力一致。PTC 以相同条件启用该工具,Minimal 仍禁用。
模型可见两个只读 Cordis 检查工具,不再提供生成代码的 define/run/stop/undefine 和动态自省工具 API。现有运行时和 Client 消费者保留其服务;历史会话卡片仍然可读。这仅取代[自引用工具集参考](../../../../packages/extensions/cordis-host-runner/README.zh.md)中的模型侧变更流程;其运行时所有权和沙箱依据仍有独立价值。[profile 事务决策](2026-09-14-current-profile-plugin-management.zh.md)继续规定锁、包安装和部分失败行为。
标准模式和创造模式提供一个只读 Cordis 检查工具 `cordis_inspect`。省略 `query` 以发现 provider;提供 `query` 以读取一个已声明的方法。共用此入口使默认模式能够进行运行时发现,同时避免重复的工具描述。不再提供生成代码的 define/run/stop/undefine 和动态自省工具 API。现有运行时和 Client 消费者保留其服务;历史会话卡片仍然可读。这仅取代[自引用工具集参考](../../../../packages/extensions/cordis-host-runner/README.zh.md)中的模型侧变更流程;其运行时所有权和沙箱依据仍有独立价值。[profile 事务决策](2026-09-14-current-profile-plugin-management.zh.md)继续规定锁、包安装和部分失败行为。
除非用户指定其他目标,视觉创建请求默认通过已安装的 Client 插件显示在当前 Web 页面。开发 skill 提供最小包和由 effect 管理的 Client 注册示例。已知所需 API 后结束探查,在可选视觉优化之前先安装能工作的初版。有条件时使用已连接页面验证。浏览器认证或操作系统设置不是安装插件的前提,mock 预览不能证明应用内结果。
@@ -9,11 +9,11 @@
en: 8d4d00e33af763b2
zh: 61977c82d66ae9bf
/agent-note-account-provider-and-active-request-cancellation/decision:
en: d5eb12a1644c6226
zh: 513d4f22ab74e039
en: 383ef40d2ec7b6f1
zh: 2e9482475015b1ff
/agent-note-account-provider-and-active-request-cancellation/alternatives-considered:
en: a072026c1495a1ca
zh: bf053cc04fb33914
en: 7ed93136cf11074a
zh: 1ee997e271e919ad
/agent-note-account-provider-and-active-request-cancellation/consequences:
en: 8fd00b6d69b380c0
zh: 3830dc3a93d5de3c
@@ -14,11 +14,11 @@ Selecting credentials from login state changes the billing identity of an existi
Account cancellation reads each running Agent’s latest `Session.requestContext()` instead of maintaining another provider field. This logged value remains through tools and retries and follows the next bound request. Idle Agents are excluded. During a new turn’s first preparation it can still name the previous turn’s account route, so sign-out can also interrupt an API-key turn that has not bound its new request yet. A missing account credential rejects a first request without a previous context before transport.
Successful local sign-out publishes an account event. The platform account provider installs the account module’s listener, which enumerates the Agent registry and cancels matching account routes through `Agent.cancel`, preserving inboxes. The account controller shares its predicate for sign-out confirmation. Each registered child is classified independently; existing parent-owned cancellation still applies to children whose lifetime is attached to a cancelled parent. The existing HTTP signal carries cancellation to transport.
Successful local sign-out publishes an account event. The account route plugin installs a listener, which enumerates the Agent registry and cancels matching account routes through `Agent.cancel`, preserving inboxes. It registers the same predicate with the account service as the running-task report behind sign-out confirmation. Each registered child is classified independently; existing parent-owned cancellation still applies to children whose lifetime is attached to a cancelled parent. The existing HTTP signal carries cancellation to transport. Requests this listener cannot reach end through the withdrawal signal of their credential, which the [DeepSeek request authentication decision](2026-11-10-deepseek-request-authentication.md) owns.
## Alternatives considered
A historical set of providers wrongly cancels a turn after it switches to an API-key route. Current settings misclassify an older in-flight request. A second provider field or module-global map duplicates information already recorded in request context. A login-level cancellation signal duplicates the existing Agent and HTTP cancellation chain.
A historical set of providers wrongly cancels a turn after it switches to an API-key route. Current settings misclassify an older in-flight request. A second provider field or module-global map duplicates information already recorded in request context. A login-level cancellation signal in place of this chain duplicates the existing Agent and HTTP cancellation; the credential's withdrawal signal only supplements it.
## Consequences
@@ -14,11 +14,11 @@ Status: implemented
账号取消读取运行中 Agent 最近的 `Session.requestContext()`,不维护额外提供方字段。该已记录值在工具和重试阶段保留,随下一次绑定请求更新;空闲 Agent 不计入。新轮次首次准备期间,它仍可能指向上一轮的账号路由,因此退登也可能打断尚未绑定新请求的 API key 轮次。没有历史上下文的首请求若缺少账号凭据,会在传输前失败。
本地退登成功后发布账号事件。Platform 账号提供方安装账号模块的监听器,遍历 Agent 注册表,通过 `Agent.cancel` 取消匹配的账号路由并保留收件箱。账号控制器的退登确认复用同一判断函数。每个已注册子代理独立分类;生命周期绑定到已取消父代理的子代理仍受现有父级取消规则约束。现有 HTTP 信号将取消传递到传输层。
本地退登成功后发布账号事件。账号路由插件安装监听器,遍历 Agent 注册表,通过 `Agent.cancel` 取消匹配的账号路由并保留收件箱。它把同一判断函数注册到账号服务,作为退登确认所依据的运行中任务报告。每个已注册子代理独立分类;生命周期绑定到已取消父代理的子代理仍受现有父级取消规则约束。现有 HTTP 信号将取消传递到传输层。该监听器到达不了的请求通过其凭据的撤回信号结束,这一信号由 [DeepSeek 请求鉴权决策](2026-11-10-deepseek-request-authentication.zh.md)负责。
## Alternatives considered
历史提供方集合会在轮次切换到 API Key 路由后仍错误取消它。当前设置会误判更早的在途请求。额外的提供方字段或模块级全局映射重复保存请求上下文中已有的信息。登录级取消信号重复现有 Agent 与 HTTP 取消链路。
历史提供方集合会在轮次切换到 API Key 路由后仍错误取消它。当前设置会误判更早的在途请求。额外的提供方字段或模块级全局映射重复保存请求上下文中已有的信息。用登录级取消信号取代这条链路,会重复现有的 Agent 与 HTTP 取消;凭据的撤回信号只是对它的补充。
## Consequences
@@ -9,11 +9,11 @@
en: a22ddcfb339e503d
zh: a1f4fadb46fce1e7
/agent-note-native-cua-objects-independent-of-evaluator-ownership/decision:
en: 176a9c2f6040f2a1
zh: 2617ec13d25de998
en: d08345b0b22b0884
zh: 18a843df211bcabc
/agent-note-native-cua-objects-independent-of-evaluator-ownership/alternatives-considered:
en: 3d0bc77e3c432cb9
zh: 50a20eda1811f16c
en: f2bb7165b7c168a0
zh: e6234e3464d971ee
/agent-note-native-cua-objects-independent-of-evaluator-ownership/consequences:
en: 528c644d5810e60b
zh: 9649dfc3b1172a6d
@@ -14,7 +14,7 @@ The shared `cua` library owns application/window objects, consent, and logged di
The experimental CUA package owns a native-app subset of the Codex-style object interface and selected MIT-licensed macOS behavior adapted from Cua Driver in a Swift helper. A source manifest records the adapted upstream files and local implementation. The helper is locally compiled; the package has no external Cua Driver runtime dependency. The existing [provider registration](2026-09-12-computer-use-provider-registration.md) prevents competing computer-use providers within one composition.
The facade accepts an operation dispatcher. Its tool adapter resolves the current tool binding for each operation, preserving normal authorization, logging and image admission. The execution host owns variable persistence and completion serialization. CUA defines no persistence directive, worker or run_code replacement.
The facade accepts an operation dispatcher. Its tool adapter resolves the current tool binding for each operation, preserving normal authorization, logging and image admission. The execution host owns variable persistence and completion serialization. The object API defines no persistence directive or evaluator; [CUA programs outside PTC](2026-11-09-cua-program-tool.md) supersedes the original exclusion of a dedicated program entry by composing the shared PTC factory and Node runtime.
Native process ownership follows the [shared helper decision](2026-10-09-cua-shared-native-helper.md), with isolated Agent connections. App handles bind process identity and kernel start time; replacing the process or helper never revives old handles. The native helper retains per-app and per-window snapshots. The [object API](2026-11-05-cua-scoped-surfaces-and-input.md) keeps the latest successful observation per application handle. Coordinate actions select an owned window; the Host maps [screenshot coordinates](2026-10-13-cua-hover-routes-and-coordinates.md) to native window-local points. Providers declare keyboard scopes in `keyboard`. macOS supports keyboard input at the application's current focus.
@@ -22,7 +22,7 @@ The operation schema owns shared data declarations. Host-only limits and launch
Clipboard paste is distinct from Unicode key input: Return and Tab key events can trigger actions instead of inserting clipboard content. Pasteboard access runs on the AppKit main actor and retains promised data until a reader requests it. AX command completion alone does not establish that the application has fetched the data. Restoration checks ownership before replacing contents; the caller still verifies the application result. After successful command dispatch, `pasteReadTimeoutMs` bounds waiting for a data request, with a default of 1000 ms. Expiry returns `PASTE_NOT_CONSUMED`, closes the data provider against late delivery, and restores the clipboard only while still owned. The failure reports no read within that interval; it does not prove the application will never process its queued Paste command. A delayed command may read restored clipboard contents, so callers inspect the target and never retry automatically. Foreground-dependent consumption was observed in the installed ChatGPT/Codex application (`com.openai.codex`); other applications need their own validation. Guidance presents this as an example and applies recovery instructions to any `PASTE_NOT_CONSUMED` result.
CUA registers its own Harness tool and returns operation values directly. Screenshot capture requires a resolved image-capable model and the shared attachment service. The tool admits each screenshot once and renders its durable image reference; the window object and image sink retain the same `CuaScreenshot` containing encoded `bytes`, `mimeType`, `pixelWidth`, `pixelHeight` and `windowId` from the validated screenshot result. The bridge preserves this metadata without another upload or image emission. Callers use the reported format and dimensions when saving or declaring images.
CUA registers its own Harness tool and returns operation values directly. Screenshot capture requires a resolved image-capable model and the shared attachment service. The attachment pipeline stores the screenshot at the dimensions used for coordinate mapping; the native tool result describes its encoded format and pixels. The program facade returns observation results, including the stored Image for a screenshot. The [explicit PTC output decision](2026-11-09-explicit-ptc-output.md) owns image identity and caller-selected display.
## Alternatives considered
@@ -32,7 +32,7 @@ A CUA-specific persistent evaluator duplicates execution lifecycle policy and pr
Reusing the MCP result adapter would impose MCP envelopes and wire validation on native CUA operations. Direct Harness tool output and shared attachment admission provide the needed logging and images without a second protocol.
**Fixing the screenshot format** would require otherwise unnecessary re-encoding and discard the attachment pipeline’s pass-through optimization. A format convention alone still forces callers to guess, and cannot tell them when encoding policy changes. Returning the already computed format and dimensions preserves pass-through and makes each result describe its actual bytes.
**Fixing the screenshot format** would require otherwise unnecessary re-encoding and discard the attachment pipeline’s pass-through optimization. The native result describes its encoding; program Images expose the stored file and its pixel dimensions, so callers can use the file without a facade-specific byte representation.
**Waiting until the full native-operation timeout** hides successful command dispatch behind a generic timeout. A separate configurable read budget reports the missing acknowledgement without treating slow applications as unsupported. Requiring every application to be foreground would claim a prerequisite that the available observations do not establish.
@@ -14,7 +14,7 @@ Computer-use 程序需要一致的应用和窗口操作。将这些操作与 CUA
实验 CUA 包提供 Codex 风格的原生应用对象接口,并在 Swift 辅助进程中改写 Cua Driver 中选取的 MIT 许可 macOS 行为。源码清单记录改写的上游文件和本地实现。辅助进程在本地编译,本包不依赖外部 Cua Driver 运行时。已有的 [provider 注册机制](2026-09-12-computer-use-provider-registration.zh.md)防止同一组合中出现竞争 provider。
对象接口接收操作分派器。工具适配模块每次操作都获取当前工具绑定,保留标准授权、日志和图片接入。执行宿主负责变量持久化和最终表达式值的序列化。CUA 不定义持久化指令、执行 worker 或 run_code 替代实现。
对象接口接收操作分派器。工具适配模块每次操作都获取当前工具绑定,保留标准授权、日志和图片接入。执行宿主负责变量持久化和最终表达式值的序列化。对象 API 不定义持久化指令或求值器;[PTC 之外的 CUA 程序](2026-11-09-cua-program-tool.zh.md)通过组合共享 PTC 工厂和 Node 运行时,取代原先不提供专用程序入口的决定。
原生进程归属遵循[共享 helper 决策](2026-10-09-cua-shared-native-helper.zh.md),Agent 连接保持隔离。应用句柄绑定进程身份及内核启动时间,替换进程或辅助进程不会使旧句柄重新有效。原生 helper 按应用和可选窗口保存快照。[对象 API](2026-11-05-cua-scoped-surfaces-and-input.zh.md) 为每个应用句柄保留最近一次成功读取的快照。坐标操作选择属于该应用的窗口;Host 按[截图坐标规则](2026-10-13-cua-hover-routes-and-coordinates.zh.md)换算为原生窗口内 point。提供方通过 `keyboard` 声明可用范围。macOS 仅支持向应用当前焦点发送键盘输入。
@@ -22,7 +22,7 @@ Computer-use 程序需要一致的应用和窗口操作。将这些操作与 CUA
剪贴板粘贴与 Unicode 按键输入分别实现,因为 Return 和 Tab 按键可能触发动作,而不是插入剪贴板内容。剪贴板访问使用 AppKit 主线程,保留延迟提供的数据直到读取方请求。AX 命令完成本身不能证明应用已取得数据。恢复前检查剪贴板归属;调用方仍需验证应用中的结果。 命令成功分派后,`pasteReadTimeoutMs` 限制等待数据请求的时间,默认 1000 毫秒。到期返回 `PASTE_NOT_CONSUMED`,关闭数据提供方以阻止迟到的数据交付,并仅在仍持有剪贴板时恢复原内容。该失败只说明这段时间内没有读取,不证明应用以后不会处理已排队的 Paste 命令。迟到的命令可能读取恢复后的剪贴板内容,因此调用方必须检查目标,不能自动重试。已安装的 ChatGPT/Codex 应用(`com.openai.codex`)已观察到依赖前台才能读取的行为,其他应用需要分别验证。指引将其写为例子,并对任何 `PASTE_NOT_CONSUMED` 结果提供恢复步骤。
CUA 注册自己的 Harness 工具,直接返回操作结果。截图要求解析到支持图片输入的模型,并提供共享附件服务。工具只接入一次截图,再渲染持久图片引用;窗口对象和图片输出回调保留同一个 `CuaScreenshot`,其中的编码 `bytes`、`mimeType`、`pixelWidth`、`pixelHeight` 和 `windowId` 来自已校验的截图结果。桥接保留这些元数据,不再次上传或输出图片。调用方落盘或声明图片时使用返回的格式和尺寸。
CUA 注册自己的 Harness 工具,直接返回操作结果。截图要求解析到支持图片输入的模型,并提供共享附件服务。附件流水线按坐标换算使用的尺寸保存截图,原生工具结果描述编码格式和像素。程序对象接口返回观察结果,截图操作返回已存储的 `Image`。[PTC 显式输出决策](2026-11-09-explicit-ptc-output.zh.md)负责图片身份及调用方选择展示的规则。
## 考虑过的替代方案
@@ -32,7 +32,7 @@ CUA 专用持久执行器会重复实现执行生命周期规则,使 PTC 无
复用 MCP 结果适配器会给原生 CUA 操作引入 MCP 信封和协议校验。直接使用 Harness 工具输出与共享附件接入,即可取得所需的日志和图片能力,无需再经过一种协议。
**固定截图格式**会要求原本不需要的重新编码,并失去附件处理的原样直通优化。仅约定格式仍要求调用方猜测,也无法告知编码策略的变化。返回已经算出的格式和尺寸,既保留直通优化,也让每个结果说明其实际字节。
**固定截图格式**会要求原本不需要的重新编码,并失去附件处理的原样直通优化。原生结果描述编码格式;程序 Image 提供已存储文件及其像素尺寸,使调用方直接使用文件,无需对象接口专属的字节表示。
**等到原生操作的总超时**会用一条通用超时掩盖命令已经成功分派的事实。独立、可配置的读取等待上限能报告缺失的读取确认,而不将响应慢的应用认定为不支持粘贴。要求所有应用都必须位于前台,则超出了现有观察能支持的结论。
@@ -72,8 +72,8 @@
en: 607a1afd89892d15
zh: a0aa85124340458c
/agent-note-remote-duplex-stream-one-kind-of-stream-an-uplink-channel-and-an-invocation-context/decision/security-and-validation:
en: 2426665452a6a37b
zh: 282572d66e17a237
en: 0683589c4c144620
zh: 29c23acf6d6fef51
/agent-note-remote-duplex-stream-one-kind-of-stream-an-uplink-channel-and-an-invocation-context/decision/in-process-and-worker-carriers:
en: df4ae60d8403cdbb
zh: 70c6024a2a9a1e84
@@ -305,7 +305,7 @@ Credit frames wait until a consumer that needs sustained high-volume uplink appe
| Item | Rule |
| --- | --- |
| Authentication | Same as today: `connection.requestRejection(req)` at upgrade; descriptor and lookup-parameter validation at open. Uplink items belong to an already authenticated stream and are not authenticated again |
| Authentication | WebServer admission supplies the Peer at upgrade; descriptor and lookup-parameter validation runs at open. Uplink items belong to an already authenticated stream and are not authenticated again |
| Peer | Admitted at upgrade as one `PeerScope`; `invocation.peer` of every stream on that socket is that Peer |
| Item validation | With an uplink codec, every item is decoded strictly, and a failure fails the whole stream with the existing `gateway/input-invalid` (details `{ endpoint, field: 'uplink' }`); without a codec, only JSON-safety validation applies |
| Frame size | A single frame keeps the `maxPayload` of `ws`; the inbox limit bounds the accumulated total |
@@ -305,7 +305,7 @@ credit 帧留待需要持续大流量上行的消费者出现时再加;inbox
| 项 | 规则 |
| --- | --- |
| 鉴权 | 与今天相同:升级时 `connection.requestRejection(req)`;打开时描述符与查找参数校验。上行项属于一条已鉴权的流,不重复鉴权 |
| 鉴权 | 升级时由 WebServer 准入提供 Peer;打开时校验描述符与查找参数。上行项属于一条已鉴权的流,不重复鉴权 |
| Peer | 升级时接纳为一个 `PeerScope`,该 socket 上所有流的 `invocation.peer` 都是它 |
| 项校验 | 有 uplink codec 时逐项严格解码,失败即整条流以既有的 `gateway/input-invalid` 失败(details `{ endpoint, field: 'uplink' }`);无 codec 时只做 JSON 安全校验 |
| 帧大小 | 单帧沿用 `ws` 的 `maxPayload`;inbox 上限限制累计量 |
@@ -15,14 +15,14 @@
en: 7095df7c949b8e3c
zh: e7410e44eaa97797
/agent-note-stable-sidebar-tab-mounting-and-session-retention/decision/session-and-tab-lifetime:
en: 60a4450a1a4f398c
zh: cc0054505b973c91
en: 14dfb86c9f786a44
zh: 268bd8bbfdb2a968
/agent-note-stable-sidebar-tab-mounting-and-session-retention/decision/provider-responsibilities:
en: a34c228751a1a329
zh: 8e8b962b55e7c68e
/agent-note-stable-sidebar-tab-mounting-and-session-retention/decision/retention-versus-recovery:
en: 61e4a975fea17a9a
zh: 911f4d1caab1efd0
en: 010e66146bcb9f6c
zh: b2714d75ceebbd71
/agent-note-stable-sidebar-tab-mounting-and-session-retention/alternatives-considered:
en: 84cfe7613657bfdb
zh: 4a0a499eb5d36d22
@@ -22,7 +22,7 @@ Sidebar owns live-body retention, independently of Browser navigation and Worksp
### Session and tab lifetime
`SidebarRightTabDefinition.keepMounted` enables lazy retention for a type. Desktop Browser enables it; other types keep visibility-based body mounting. A retained body is first created on display, then survives hiding until its occurrence or provider lifetime ends. The policy is not persisted and does not select a storage partition.
`SidebarRightTabDefinition.keepMounted` enables lazy retention for a type. Desktop Browser enables it. Each tab opened through `openContent` also retains its visited body for the lifetime of the current window. A retained body is first created on display, then survives hiding until its occurrence or provider lifetime ends. The policy is not persisted and does not select a storage partition.
`SidebarSessionView` acquires and releases one `SessionReference` using the independent `sidebarView` source, and owns its committed-mount count and retained-Body holds. `SidebarSessionViews` manages selection, retention policy and view indexes; it delegates lifetime operations to the view rather than mutating its counts or releasing its reference. `RightbarRoot` receives `SidebarSessionViewSnapshot` values and the existing injected callbacks, not resource-owner objects. It renders each through its own explicit `SessionProvider`, with a stable Session key; the renderer's general Session-remount semantics remain unchanged.
@@ -48,11 +48,13 @@ The [Desktop Browser decision](../feature/2026-09-20-desktop-browser-webview.md)
| Collapse Sidebar | Hide docked cells; foreground floats remain visible. |
| Session A → B → A | Hide and reshow A's original tree instead of loading its saved URL. |
| Close, provider unload or actual generation termination | Release the body and guest; undo creates a new occurrence. |
| Application restart or window reload | Show the saved title and URL; load only after an explicit restore or address submission. |
| Application restart or window reload | Restore tabs whose content can be reconstructed. Browser shows its saved URL for explicit recovery. Close transient content tabs and their floats before presenting the layout. |
| Guest crash | Retry through the provider; page memory and native history are not durable. |
[Layout and provider recovery](../../../../packages/client/ui-sidebar-right/README.md) remains independent: persisted tab identity, placement and address support cold starts, not DOM serialization. A hidden page may continue scripts, media and networking.
A tab opened through `openContent` receives its body in window-local navigation parameters. Its reuse key identifies an occurrence within a Session, but cannot recover the body. Restoring that tab would leave an empty viewer and could displace a file or other recoverable tab. Users can reopen the content from its source after reload.
## Alternatives considered
**Hide panes only.** Collapse works, but moving between panes or into another floating portal still changes content ancestors.
@@ -22,7 +22,7 @@ Sidebar 负责活 Body 的保留,不依赖 Browser 导航和 Workspace 存储
### 会话与 Tab 生命周期
`SidebarRightTabDefinition.keepMounted` 为类型启用懒保活。Desktop Browser 启用它,其他类型继续按可见性挂载 Body。保活 Body 在首次显示时创建,随后隐藏不卸载,直到 occurrence 或提供方生命周期结束。该策略不持久化,也不选择存储分区。
`SidebarRightTabDefinition.keepMounted` 为类型启用懒保活。Desktop Browser 启用它。通过 `openContent` 打开的标签也会在当前窗口的生命周期内保留已查看的正文。保活 Body 在首次显示时创建,随后隐藏不卸载,直到 occurrence 或提供方生命周期结束。该策略不持久化,也不选择存储分区。
`SidebarSessionView` 使用独立的 `sidebarView` 来源申请、释放一个 `SessionReference`,并管理自己的已提交挂载计数和 Body 保活持有。`SidebarSessionViews` 管理选中、保留策略和视图索引,将生命周期操作委托给视图,而不修改其计数或释放其引用。`RightbarRoot` 接收 `SidebarSessionViewSnapshot` 和已有注入回调,不接收资源所有者对象;它为各视图分别渲染显式 `SessionProvider`,保持会话 key 稳定,渲染器通用的会话重挂载语义不变。
@@ -48,11 +48,13 @@ Tab 提供 Body 保活持有,而不独立申请会话引用。View 的稳定 `
| 收起 Sidebar | 隐藏停靠 cell,前台浮窗保持可见。 |
| 会话 A → B → A | 隐藏并重新显示 A 的原内容树,而非加载已保存 URL。 |
| 关闭、提供方卸载或真实 generation 结束 | 释放 Body 和 guest;撤销关闭创建新 occurrence。 |
| 应用重启或窗口刷新 | 展示保存的标题和 URL,显式恢复或提交地址后才加载。 |
| 应用重启或窗口刷新 | 恢复能够重建正文的标签。Browser 显示已保存的 URL 供用户显式恢复。呈现布局前关闭临时正文标签及其浮窗。 |
| guest 崩溃 | 通过提供方重试;页面内存和原生 history 不持久化。 |
[布局与提供方恢复](../../../../packages/client/ui-sidebar-right/README.zh.md)仍然独立:持久化的 Tab 身份、位置和地址支持冷启动,而不是序列化 DOM。隐藏页面可能继续执行脚本、播放媒体或联网。
通过 `openContent` 打开的标签从当前窗口的导航参数取得正文。复用 key 能在会话内定位标签,却无法据此恢复正文。恢复这样的标签会留下空预览,还可能占据文件等可恢复标签的位置。刷新后,用户可从内容来源重新打开。
## Alternatives considered
**只隐藏 Pane。** 可以覆盖收起,但跨 Pane 移动或进入独立浮动 Portal 仍会改变内容祖先。
@@ -9,11 +9,11 @@
en: 2ba6c43b20a3d347
zh: 5647179ddaa38ad9
/agent-note-ship-experimental-capabilities-as-optional-bundles/decision:
en: 191ca8bffb101db2
zh: 1365bef5cd830a5c
en: b11a4c9cb060d4bb
zh: a5250cfaba937e71
/agent-note-ship-experimental-capabilities-as-optional-bundles/alternatives-considered:
en: d6f40bf02df37ab7
zh: e5b85ce9d41e8754
/agent-note-ship-experimental-capabilities-as-optional-bundles/consequences:
en: 3064da835e892958
zh: bfcf967b6acc6f85
en: 1fb52c4b3af8d88b
zh: 6ec20abd592b2e08
@@ -12,7 +12,7 @@ The Web plugin page offered two optional bundles, Agent Teams and voice input. A
`OPTIONAL_BUNDLES` owns the installation's default-off selections, including maintained optional capabilities and experimental capabilities. Every bundle declares `icon` and exports `./locale/*.json` with `meta.title` and `meta.description`; the [plugin manager page](../../../../packages/client/ui-plugin-manager/README.md#use-this-package) displays that metadata for eligible bundles and retains explicit activation for default-hidden ones. A bundle's presentation does not determine its [experimental status](../../../../packages/experimental/README.md#status). The isolation check validates admission and still rejects experimental dependencies of nonexperimental bundles.
An optional bundle's dependencies are downloaded with every `dsh` installation. [Reasoning translation](2026-10-05-anonymous-reasoning-translation.md) uses three experimental packages without adding third-party runtime dependencies. Admission therefore considers installation cost and whether a switch supplies a usable composition without an additional configuration form. External browser and Cua Driver providers remain explicit compositions because they add substantial runtimes or require an external executable. Stagehand requires model credentials; Python PTC replaces a core provider and conflicts with TypeScript workflow consumers. Demonstrative hooks, webhooks, and mods stay outside the list. [Session Inspector](../feature/2026-09-24-session-inspector.md) owns the Inspector's distinct activation behavior.
An optional bundle's dependencies are downloaded with every `dsh` installation. [Reasoning translation](2026-10-05-anonymous-reasoning-translation.md) uses three experimental packages without adding third-party runtime dependencies. Admission therefore considers installation cost and whether a switch supplies a usable composition without an additional configuration form. External browser and Cua Driver providers remain explicit compositions because they add substantial runtimes or require an external executable. Stagehand requires model credentials. Demonstrative hooks, webhooks, and mods stay outside the list. [Session Inspector](../feature/2026-09-24-session-inspector.md) owns the Inspector's distinct activation behavior.
Bundles insert ordinary Host rows; optional model tools register in the global tool layer, so every preset, including minimal, receives them. Plugin management, profile composition, and reload need no bundle-specific behavior. Search, Ralph, and terminals supply their own isolated services in a Host group. Search opens one in-memory index on demand; the Host search policy stays unchanged. Badge skills and title providers act on the Host. Switching a bundle registers or removes its tools for live Agents, and later user patch layers retain precedence. A replacement title provider may register once the previous provider's disposal starts; the previous provider's late results never commit.
@@ -34,4 +34,4 @@ Computer Use is a shipped optional bundle in the experimental group. Its bundle
Official discovery does not imply experimental status or a different plugin lifecycle. Switching a bundle off keeps its installed files; failed activation retains the existing saved-selection behavior. Bundle rows are ordinary Host rows with their usual switches. Individual and combined composition tests cover the Host rows and every preset's tool catalog; live switching and recorded Sessions cover activation and model-visible behavior.
Computer Use keeps its permission service and native provider on the Host and registers tools in Agent scopes whose bound preset is `ptc`. Existing Agent events and `createScope()` maintain current, new and resumed Agents. Preset declarations remain unchanged. Only the explicit detail-page action changes the new-session default through the existing settings form; the activation switch does not configure PTC execution.
Computer Use keeps its permission service and native provider on the Host and registers tools in Agent scopes. The preset named by `agentPreset` receives raw `cua`; other Agents receive the [CUA program tool](2026-11-09-cua-program-tool.md). Existing Agent events and `createScope()` maintain current, new and resumed Agents. Preset declarations remain unchanged. Only the explicit detail-page action changes the new-session default through the existing settings form; the activation switch does not configure PTC execution.
@@ -12,7 +12,7 @@ Web 插件页只提供两个可选 bundle:Agent Teams 与语音输入。Auto r
`OPTIONAL_BUNDLES` 管理安装随附且默认关闭的选项,包括维护中的可选能力与实验性能力。每个 bundle 声明 `icon`,并导出带 `meta.title` 与 `meta.description` 的 `./locale/*.json`;[插件管理页](../../../../packages/client/ui-plugin-manager/README.zh.md#use-this-package)为符合展示条件的组合包显示这些元数据,并保留默认隐藏项的显式启用入口。Bundle 的展示方式不决定其[实验性状态](../../../../packages/experimental/README.zh.md#status)。隔离检查校验准入,并继续拒绝非实验 bundle 的实验性依赖。
可选 bundle 的依赖随每次 `dsh` 安装下载。[思考过程翻译](2026-10-05-anonymous-reasoning-translation.zh.md)使用三个实验包,不增加第三方运行时依赖。因此准入需要考虑安装成本,以及开关能否在不增加配置表单的情况下提供可用组合。外部浏览器与 Cua Driver 提供方仍使用显式组合,因为它们会增加较大的运行时或要求外部可执行文件。Stagehand 需要模型凭据;Python PTC 替换核心提供方,并与 TypeScript workflow 消费方冲突。演示性钩子、webhook 与模组不进入名单。[Session Inspector](../feature/2026-09-24-session-inspector.zh.md) 管理 Inspector 特有的激活行为。
可选 bundle 的依赖随每次 `dsh` 安装下载。[思考过程翻译](2026-10-05-anonymous-reasoning-translation.zh.md)使用三个实验包,不增加第三方运行时依赖。因此准入需要考虑安装成本,以及开关能否在不增加配置表单的情况下提供可用组合。外部浏览器与 Cua Driver 提供方仍使用显式组合,因为它们会增加较大的运行时或要求外部可执行文件。Stagehand 需要模型凭据。演示性钩子、webhook 与模组不进入名单。[Session Inspector](../feature/2026-09-24-session-inspector.zh.md) 管理 Inspector 特有的激活行为。
Bundle 插入普通 Host 行;可选模型工具注册到全局工具层,因此包括 minimal 在内的所有预设都会获得它们。插件管理、profile 组合与重载无需针对 bundle 的特殊行为。搜索、Ralph 与终端在 Host 组内提供自己的隔离服务。搜索按需打开一个内存索引;Host 搜索策略保持不变。徽章技能与标题提供方作用于 Host。切换 bundle 会为运行中的 Agent 注册或移除其工具,后续用户 patch 层继续优先。前一个标题提供方开始清理后,替代提供方即可注册;前一个提供方的迟到结果不会提交。
@@ -34,4 +34,4 @@ Computer Use 是 experimental 包组内随安装提供的可选组合包。组
官方发现不表示实验性状态,也不引入不同的插件生命周期。关闭 bundle 保留已安装文件;激活失败保留现有的已保存选择行为。Bundle 行是普通 Host 行,使用常规开关。独立与组合测试覆盖 Host 行及每个预设的工具目录;实时切换与已记录 Session 覆盖激活和模型可见行为。
Computer Use 将权限服务和原生提供方保留在 Host,在已绑定 `ptc` preset 的 Agent 作用域中注册工具。现有 Agent 事件和 `createScope()` 维护当前、新建和恢复的 Agent,preset 声明保持不变。只有详情页的显式操作通过现有设置表单修改新会话默认模式,启用开关不配置 PTC 执行方式。
Computer Use 将权限服务和原生提供方保留在 Host,并在 Agent 作用域中注册工具。`agentPreset` 指定的 preset 获得原始 `cua`;其他 Agent 获得 [CUA 程序工具](2026-11-09-cua-program-tool.zh.md)。现有 Agent 事件和 `createScope()` 维护当前、新建和恢复的 Agent,preset 声明保持不变。只有详情页的显式操作通过现有设置表单修改新会话默认模式,启用开关不配置 PTC 执行方式。
@@ -9,8 +9,8 @@
en: e42db40b879fdbf4
zh: 6017da9c4da17835
/agent-note-node-ptc-execution-modes-and-in-memory-state/decision:
en: 411054071757d5fe
zh: e683ef7d80f33fc6
en: 2d5306e76dc8170a
zh: eab993b4d2f3acf0
/agent-note-node-ptc-execution-modes-and-in-memory-state/alternatives-considered:
en: 396157a9fc293198
zh: a061f05b4423e26f
@@ -10,7 +10,7 @@ Interactive automation retains application objects, imported modules and helper
## Decision
The existing `@deepseek-ai/dsh-ptc-runtime-node` plugin selects its execution mode through `executionMode`. The default `per-call` mode starts a fresh process under the configured file policy. Opt-in `persistent-in-memory` mode keeps a Node REPL process per explicit, object-identity state owner. Both modes provide the same `ctx.ptcRuntime` service. PTC uses the live Agent as owner and awaits release during its context disposal. Changing the configuration reloads the provider and releases its processes. The [sandboxed Node decision](2026-09-11-sandboxed-node-ptc-runtime.md) owns per-call confinement; the [PTC foundation](../feature/2026-06-15-ptc.md) owns tool dispatch and logged model requests.
The existing `@deepseek-ai/dsh-ptc-runtime-node` plugin selects its execution mode through `executionMode`. The `per-call` mode starts a fresh process under the configured file policy. The default `persistent-in-memory` mode keeps a Node REPL process per explicit, object-identity state owner. Both modes provide the same `ctx.ptcRuntime` service. PTC uses the live Agent as owner and awaits release during its context disposal. Changing the configuration reloads the provider and releases its processes. The [sandboxed Node decision](2026-09-11-sandboxed-node-ptc-runtime.md) owns per-call confinement; the [PTC foundation](../feature/2026-06-15-ptc.md) owns tool dispatch and logged model requests.
The `per-call` and `persistent-in-memory` names describe their fixed state-retention policies: one invocation or across invocations until the process or owner ends. The [Script evaluation decision](2026-10-20-ptc-script-evaluation-and-retention.md) extends these modes with independently configured syntax and retention. `durable` names the deferred ability to save and restore execution state across restarts. It is not an accepted configuration value: a future implementation must define its recovery point, recoverable values and external-resource handling before exposing that mode. The [retained-process permission decision](2026-10-08-persistent-ptc-sandbox.md) owns confinement, policy changes and temporary escalation.
@@ -18,7 +18,7 @@ One npm package and one plugin entry keep existing installation and loading path
The Session records submitted programs, nested tool calls and returned output. It does not serialize the REPL heap or rerun earlier programs after restart, resume or fork: replaying automation could repeat external side effects. A missing variable is a normal program error, and the model-visible instructions require recreating variables and reacquiring resources. No environment identifier or new durable Session event is required because the provider exposes no unlogged model input.
Protocol or output-limit failure, owner disposal and process exit discard the environment. The [interruption decision](2026-10-29-retained-ptc-interruption.md) owns timeout and cancellation recovery with retained state. Ordinary exceptions retain earlier mutations. A retained function uses the active evaluation's host bindings; asynchronous work from an earlier evaluation cannot acquire a later evaluation's tool authority or output sink.
Protocol failure, owner disposal and process exit discard the environment. [Output truncation](2026-11-13-ptc-output-truncation.md) owns bounded output without state disposal. The [interruption decision](2026-10-29-retained-ptc-interruption.md) owns timeout and cancellation recovery with retained state. Ordinary exceptions retain earlier mutations. A retained function uses the active evaluation's host bindings; asynchronous work from an earlier evaluation cannot acquire a later evaluation's tool authority or output sink.
## Alternatives considered
@@ -10,7 +10,7 @@ Status: implemented
## 决策
现有 `@deepseek-ai/dsh-ptc-runtime-node` 插件通过 `executionMode` 选择执行模式。默认的 `per-call` 模式按配置的文件策略启动新进程。显式启用的 `persistent-in-memory` 模式为每个以对象身份标识的状态所有者保留一个 Node REPL 进程。两种模式都提供同一个 `ctx.ptcRuntime` 服务。PTC 使用存活的 Agent 作为所有者,在其上下文销毁时等待释放。修改配置会重载提供方并释放其进程。[Node 沙箱决策](2026-09-11-sandboxed-node-ptc-runtime.zh.md)负责逐次执行的文件约束,[PTC 基础决策](../feature/2026-06-15-ptc.zh.md)负责工具分派与模型请求日志。
现有 `@deepseek-ai/dsh-ptc-runtime-node` 插件通过 `executionMode` 选择执行模式。`per-call` 模式按配置的文件策略启动新进程。默认的 `persistent-in-memory` 模式为每个以对象身份标识的状态所有者保留一个 Node REPL 进程。两种模式都提供同一个 `ctx.ptcRuntime` 服务。PTC 使用存活的 Agent 作为所有者,在其上下文销毁时等待释放。修改配置会重载提供方并释放其进程。[Node 沙箱决策](2026-09-11-sandboxed-node-ptc-runtime.zh.md)负责逐次执行的文件约束,[PTC 基础决策](../feature/2026-06-15-ptc.zh.md)负责工具分派与模型请求日志。
`per-call` 和 `persistent-in-memory` 名称描述各自固定的状态保留策略:只保留一次调用,或跨调用保留至进程或所有者结束。[Script 求值决策](2026-10-20-ptc-script-evaluation-and-retention.zh.md)在这两种模式之外增加独立配置的语法与保留方式。`durable` 用于命名未来跨重启保存与恢复执行状态的能力。它不是可接受的配置值:实现必须先明确恢复点、可恢复的值以及外部资源的处理方式,才能公开这个模式。[常驻进程权限决策](2026-10-08-persistent-ptc-sandbox.zh.md)负责文件约束、权限切换与临时提权。
@@ -18,7 +18,7 @@ Status: implemented
Session 记录提交的程序、嵌套工具调用和返回输出。它不序列化 REPL 堆,也不在重启、恢复或派生后重新执行旧程序,因为重放自动化可能重复外部操作。缺失变量产生普通程序错误,模型指引要求重新创建变量并获取资源。提供方没有引入日志之外的模型输入,因此不需要环境标识或新的持久 Session 事件。
协议失败、输出超限、所有者销毁和进程退出都会丢弃环境。[中断决策](2026-10-29-retained-ptc-interruption.zh.md)负责保留状态的超时和取消恢复。普通异常保留此前发生的修改。保留的函数使用当前执行的宿主绑定;较早执行中的异步任务不能获取后续执行的工具权限或向其输出。
协议失败、所有者销毁和进程退出都会丢弃环境。[输出截断](2026-11-13-ptc-output-truncation.zh.md)负责限制输出而不丢弃状态。[中断决策](2026-10-29-retained-ptc-interruption.zh.md)负责保留状态的超时和取消恢复。普通异常保留此前发生的修改。保留的函数使用当前执行的宿主绑定;较早执行中的异步任务不能获取后续执行的工具权限或向其输出。
## 考虑过的替代方案
@@ -18,8 +18,8 @@
en: 518206f94d82993d
zh: c6cab3b2f71dd18b
/agent-note-incremental-tool-argument-scanning-and-argument-order-during-preparation/decision/argument-declaration-order:
en: 0fd7c9f0b8cf6a28
zh: 7d410403283b9996
en: caae19337804cef4
zh: 887186eeb8bd36f8
/agent-note-incremental-tool-argument-scanning-and-argument-order-during-preparation/alternatives-considered:
en: 7a033f81c557c58f
zh: 2ec66b0db6cf5d9e
@@ -49,7 +49,7 @@ Third-party tools receive the same view without registration or a separate subsc
### Argument declaration order
`tool-bash` and `tool-pwsh` declare `description` before `command` and include the ordering instruction. Both `parameters` declarations of `run_code` put `description` before `code` and share a parameter description requesting that generation order for TypeScript and Python. Write/edit declare `file_path` first and ask for it before `content` or `old_string`/`new_string` in the path parameter description. Read retains its leading `file_path`; other tools retain their argument order.
`tool-bash` and `tool-pwsh` declare `description` before `command` and include the ordering instruction. `run_code` puts `code` before `description` in both its static parameters and program-format-aware schema; it does not require a JSON member order. Write/edit declare `file_path` first and ask for it before `content` or `old_string`/`new_string` in the path parameter description. Read retains its leading `file_path`; other tools retain their argument order.
## Alternatives considered
@@ -49,7 +49,7 @@ Assembler 为同一输入和生命周期角色共享一个不可变 Match 及其
### 参数声明顺序
`tool-bash`、`tool-pwsh` 在 `command` 前声明 `description`,并包含顺序指令。`run_code` 两处 `parameters` 将 `description` 放在 `code` 前,共用的参数描述要求 TypeScript 和 Python 都按此顺序生成。write/edit 首先声明 `file_path`,并在路径参数描述中要求先生成它,再生成 `content` 或 `old_string`/`new_string`。read 保留首位的 `file_path`;其他工具保留原有参数顺序。
`tool-bash`、`tool-pwsh` 在 `command` 前声明 `description`,并包含顺序指令。`run_code` 的静态参数与按程序格式投影的 schema 都将 `code` 放在 `description` 前,不要求 JSON 成员顺序。write/edit 首先声明 `file_path`,并在路径参数描述中要求先生成它,再生成 `content` 或 `old_string`/`new_string`。read 保留首位的 `file_path`;其他工具保留原有参数顺序。
## 考虑过的替代方案
@@ -9,8 +9,8 @@
en: abd0263d14861926
zh: e1736cd08e87f795
/agent-note-shared-time-vocabulary-for-wall-clock-selectors/decision:
en: f1c2b98bf56cdba3
zh: 7e9444f8e73a4834
en: cf4dc376cbdb0e90
zh: 6aea79fb9dfe419d
/agent-note-shared-time-vocabulary-for-wall-clock-selectors/alternatives-considered:
en: 3964f7d653747b55
zh: b50636faea4917ef
@@ -16,7 +16,7 @@ The library answers discriminated results and carries no failure vocabulary. `pa
Schedule consumes it and keeps every domain decision. `canonicalizeTimeZone`, `decodeInstant`, `parseAtInput`, and `futureInstant` remain Schedule entry points with their existing codes and diagnostics; they call the shared parser and map its reason. Pure Cron/RRULE parsing and bounded occurrence searches belong to the library, take explicit reference times, and validate committed targets with `fourDigitYearEpoch`. Schedule owns durable records, the fold and transition authority, injection-resistant framing, daily and weekly date walks, delivery limits, and domain errors. The shared values own no task state, wall clock, or timers.
`dsh-time-context` consumes it too and keeps its stricter policy. `deriveBrowserTimeZoneContext` reads each user-rpc zone through `canonicalizeTimeZone` and refuses an alias whose canonical answer differs from the reported value, so the request boundary still requires an identity another process resolves back to the same name. Time-context owns its three refusals and their messages; the shared entry only answers the canonical name or a reason, and its `unsupported` rejection carries the platform error the library caught, so that refusal keeps its `cause` in both consumers.
`dsh-time-context` consumes it too and keeps its stricter policy. `deriveBrowserTimeZoneContext` reads each reported user-message zone through `canonicalizeTimeZone` and refuses an alias whose canonical answer differs from the reported value, so the request boundary still requires an identity another process resolves back to the same name. Time-context owns its three refusals and their messages; the shared entry only answers the canonical name or a reason, and its `unsupported` rejection carries the platform error the library caught, so that refusal keeps its `cause` in both consumers.
`Duration` holds one span as a single millisecond count, and it is a class rather than a branded number because TypeScript's arithmetic erases a brand: adding two differently branded numbers answers an unbranded `number`, so a brand cannot stop seconds and milliseconds from being mixed, while an instance can. The unit is milliseconds because every producer and consumer in this repository already uses it (`Date.now()`, `SessionEvent.time`, the session log, the client), and because a double holds every millisecond of the whole `Date` range exactly, so no precision is spent on the unit. Instances are frozen, no coercion hook is overridden, and a span is bounded by the exactly representable millisecond range, which is what makes the split exact. The published surface is `fromMilliseconds` and a whole-part `decompose()`, the two entries the migrated consumer calls.
@@ -16,7 +16,7 @@ Status: implemented
Schedule 消费它,并保留全部域内决策。`canonicalizeTimeZone`、`decodeInstant`、`parseAtInput` 与 `futureInstant` 仍是 Schedule 的入口,保留既有错误码与诊断文案;它们调用共享解析器并映射其原因。纯 Cron/RRULE 解析与有界发生时点搜索归本库所有,接收显式参考时间,并通过 `fourDigitYearEpoch` 校验已提交时点。Schedule 拥有持久记录、折叠与状态转移权威、抗注入的框架文本、每日与每周日期遍历、投递限制及领域错误。共享值不拥有任务状态、墙钟或定时器。
`dsh-time-context` 同样消费它,并保留自己更严格的策略。`deriveBrowserTimeZoneContext` 通过 `canonicalizeTimeZone` 读取每条 user-rpc 时区,并拒绝规范答案与所报值不同的别名,因此请求边界仍然要求另一个进程能解析回同一名称。三条拒绝与它们的文案归 time-context 所有;共享入口只回答规范名称或一个原因;被拒绝的结果中只有 `unsupported` 会携带本库捕获到的平台错误,使该拒绝在两个消费方都保留其 `cause`。
`dsh-time-context` 同样消费它,并保留自己更严格的策略。`deriveBrowserTimeZoneContext` 通过 `canonicalizeTimeZone` 读取每条用户消息上报的时区,并拒绝规范答案与所报值不同的别名,因此请求边界仍然要求另一个进程能解析回同一名称。三条拒绝与它们的文案归 time-context 所有;共享入口只回答规范名称或一个原因;被拒绝的结果中只有 `unsupported` 会携带本库捕获到的平台错误,使该拒绝在两个消费方都保留其 `cause`。
`Duration` 以单一毫秒计数保存一段时间;它做成类而不是 branded number,是因为 TypeScript 的算术会抹掉 brand:两个不同品牌的数字相加得到的是无品牌的 `number`,所以 brand 挡不住秒与毫秒的混用,而实例可以。单位选毫秒,是因为本仓库的每个生产者与消费者本来就用它(`Date.now()`、`SessionEvent.time`、Session 日志、客户端),也因为 double 能精确表示 `Date` 全范围内的每一个毫秒,这个单位不消耗任何精度。实例被冻结,不覆盖任何强制转换钩子,且时间段受可精确表示的毫秒范围约束——这正是拆分精确的前提。公开面就是 `fromMilliseconds` 与整数量拆解 `decompose()`,即已迁移消费方所调用的两个入口。
@@ -9,11 +9,11 @@
en: a9984a594cdac98d
zh: 38768e7699bc8d39
/agent-note-progressive-office-skills-with-ordinary-shell-execution/decision:
en: 391c5d75994ab7e7
zh: f820f407eb2d8769
en: 621c2a5d11fdc00f
zh: 1c1aad447d235261
/agent-note-progressive-office-skills-with-ordinary-shell-execution/alternatives-considered:
en: 0689e709dc1ff48d
zh: 5d2108ccdd13f093
en: a706c300a7bf2c45
zh: 6c8bbbc67282d642
/agent-note-progressive-office-skills-with-ordinary-shell-execution/consequences:
en: cd4ff2423b2f5f9e
zh: 63135aeae9c46415
en: d310fce6180a5837
zh: dbbc45a131231973
@@ -11,9 +11,9 @@ Combined authoring and rendering instructions spend context on operations unrela
## Decision
The [Office provider](../../../../packages/skill/skill-office/README.md) lists a compact router and three format-specific authoring skills; the operation skills this decision introduced are replaced by the [on-demand Office tools](2026-10-31-native-office-tool.md). The model loads full instructions by name and selects rendering for appearance-focused changes unless the user explicitly skips it. Rendering uses a private, randomly named temporary directory inside the task workspace and removes it after inspection. Skills invoke the shared Python checker and configured LibreOffice Kit CLI through ordinary Bash or PowerShell. SDK and Desktop own their Office composition separately; ordinary Web and the shared base do not mount these plugins. [Office skills in every deployment](2026-10-26-cross-deployment-office-kit.md) supersedes this mounting decision, and the [on-demand Office tools](2026-10-31-native-office-tool.md) supersede the shell execution and renderer-tool rejection.
The [Office provider](../../../../packages/skill/skill-office/README.md) exposes Office guidance as skills that the model loads by name; the host injects no instructions for file extensions. This decision introduced a router, three format-specific authoring skills, and operation skills that ran the shared Python checker and the configured LibreOffice Kit CLI through ordinary Bash or PowerShell, mounted only by SDK and Desktop. [Office skills in every deployment](2026-10-26-cross-deployment-office-kit.md) supersedes the mounting decision; the [on-demand Office tools](2026-10-31-native-office-tool.md) supersede the operation skills, their shell execution, and the renderer-tool rejection; and the [single Office skill](2026-11-06-single-office-skill.md) replaces the router and authoring skills with one `office` skill that carries concise inline guidance.
Carriers own interpreter and resource locations. Operation skills append the configured Node and CLI paths only when their bodies are loaded; authoring skills use the selected Python and shared checker resource. Loading instructions does not prepare engines or authoring payloads. Ordinary shell execution retains its existing permissions and process management.
Carriers own interpreter and resource locations: the composition selects the Python environment named in the `office` body and the asset root that holds the skill. Loading instructions does not prepare engines or authoring payloads. Scripts that the model writes run through the ordinary shell tools, which keep their existing permissions and process management.
LibreOffice Kit dependencies declare one exact version in every manifest; the root lock records the resolved adapter and engine versions.
@@ -21,12 +21,12 @@ LibreOffice Kit dependencies declare one exact version in every manifest; the ro
**Keep a dedicated renderer tool.** A small typed schema constrains rendering arguments, but requires its own execution configuration, scoped registration, projection, and activation lifecycle. The CLI operation skills accept shell quoting and model-selected arguments in exchange for reusing the existing approval, sandbox, cancellation, and output mechanisms.
**Hide subskills from the catalog.** This requires a generic visibility policy independent of invocation permission. Listing four short summaries preserves the existing skill API while full instruction bodies remain demand-loaded.
**Hide subskills from the catalog.** This requires a generic visibility policy independent of invocation permission. The [single Office skill](2026-11-06-single-office-skill.md) removes the subskills instead of hiding them.
**Automatically inject guides for file extensions.** Extensions do not distinguish text edits, recalculation, conversion, and requested visual checks. Model-selected routing keeps unrelated operations out of context and permits explicit direct invocation.
## Consequences
Instruction loading appends ordinary logged skill results; completion does not erase them. Historical tool records remain readable and existing declaration reconciliation handles resumed sessions without a Session format change or agent-loop modification. A dedicated renderer would need a new independently justified user or security requirement before reintroduction.
Instruction loading appends ordinary logged skill results; completion does not erase them. Historical tool records remain readable and existing declaration reconciliation handles resumed sessions without a Session format change or agent-loop modification. The [on-demand Office tools](2026-10-31-native-office-tool.md) record the reasons for a dedicated renderer.
Verification covers catalog entries, denied and explicit invocation, authoring without executable paths, native/PTC requests, resume and fork, ordinary and minimal profile composition, resource packaging, context budgets, and real-model operation selection. Rendering failures preserve usable sources and stop visual checks; successful commands alone cannot establish usable images.
Verification covers catalog entries, denied and explicit invocation, authoring without executable paths, native/PTC requests, resume and fork, ordinary and minimal profile composition, resource packaging, context budgets, and real-model operation selection.
@@ -11,9 +11,9 @@ Status: implemented
## 决策
[Office 提供者](../../../../packages/skill/skill-office/README.zh.md) 列出精简路由和三个各格式创作技能;本决策引入的操作技能已由[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代。模型按名称加载完整说明;以外观为目标的修改会选择渲染,除非用户明确要求跳过。渲染使用任务工作区内随机命名的私有临时目录,并在检查后删除。技能通过普通 Bash 或 PowerShell 调用共享 Python 检查器和配置的 LibreOffice Kit CLI。SDK 和 Desktop 分别拥有 Office 组合;普通 Web 和共享 base 不挂载这些插件。[Office 技能在所有部署中可用](2026-10-26-cross-deployment-office-kit.zh.md)取代此挂载决策,[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代其 shell 执行方式和对渲染工具的否决。
[Office 提供者](../../../../packages/skill/skill-office/README.zh.md)以技能形式提供 Office 指导,由模型按名称加载;宿主不会按文件扩展名注入说明。本决策引入了一个路由技能、三个各格式创作技能,以及通过普通 Bash 或 PowerShell 调用共享 Python 检查器和配置的 LibreOffice Kit CLI 的操作技能,并且只由 SDK 和 Desktop 挂载。[Office 技能在所有部署中可用](2026-10-26-cross-deployment-office-kit.zh.md)取代其挂载决策;[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)取代操作技能、其 shell 执行方式和对渲染工具的否决;[单个 Office 技能](2026-11-06-single-office-skill.zh.md)以携带精简内联指导的单一 `office` 技能取代路由技能和创作技能。
载体负责解释器和资源位置。操作技能仅在加载正文时附加配置的 Node 与 CLI 路径;创作技能使用选定的 Python 和共享检查器资源。加载说明不准备引擎或创作 payload。普通 shell 执行保留现有权限和进程管理。
载体负责解释器和资源位置:由组合选择 `office` 正文中注明的 Python 环境,以及存放该技能的资源根目录。加载说明不准备引擎或创作 payload。模型编写的脚本通过普通 shell 工具运行,保留现有权限和进程管理。
LibreOffice Kit 依赖在每个清单中声明同一个精确版本;根锁文件记录实际解析的适配器与引擎版本。
@@ -21,12 +21,12 @@ LibreOffice Kit 依赖在每个清单中声明同一个精确版本;根锁文
**保留专属渲染工具。** 小型类型化 schema 能约束渲染参数,但需要专属执行配置、作用域注册、投影和激活生命周期。CLI 操作技能接受 shell 引用和模型选择参数的成本,以复用现有审批、沙箱、取消及输出机制。
**从目录隐藏子技能。** 这需要独立于调用权限的通用可见性策略。列出四条简短摘要可保留现有技能 API,完整说明仍按需加载。
**从目录隐藏子技能。** 这需要独立于调用权限的通用可见性策略。[单个 Office 技能](2026-11-06-single-office-skill.zh.md)直接移除子技能,而不是隐藏它们。
**按文件扩展名自动注入指南。** 扩展名无法区分文本编辑、重计算、转换和用户要求的视觉检查。模型选路使无关操作不进入上下文,并允许显式直接调用。
## 影响
说明加载追加普通的已记录技能结果;操作完成不会擦除这些结果。历史工具记录仍可读取,恢复会话使用现有声明更新机制,无需修改 Session 格式或 agent loop。重新引入专属渲染器需要新的、独立成立的用户或安全要求。
说明加载追加普通的已记录技能结果;操作完成不会擦除这些结果。历史工具记录仍可读取,恢复会话使用现有声明更新机制,无需修改 Session 格式或 agent loop。[按需激活的 Office 工具](2026-10-31-native-office-tool.zh.md)记录了采用专属渲染器的理由。
验证覆盖目录条目、拒绝及显式调用、无可执行文件路径时的创作、native/PTC 请求、恢复和 fork、常规及 minimal 组合、资源打包、上下文预算和真实模型操作选择。渲染失败时保留可用源文件并停止视觉检查;命令成功本身不能证明图片可用。
验证覆盖目录条目、拒绝及显式调用、无可执行文件路径时的创作、native/PTC 请求、恢复和 fork、常规及 minimal 组合、资源打包、上下文预算和真实模型操作选择。
@@ -9,8 +9,8 @@
en: 32ba2b2b42e8deb5
zh: 6a6532561f81b8e2
/agent-note-offer-web-search-and-web-fetch-only-while-the-selected-provider-is-ready/decision:
en: 08a54b37e157da29
zh: 65f633055d9df242
en: 9bf594047ad5c864
zh: 366263d56f8a4fbf
/agent-note-offer-web-search-and-web-fetch-only-while-the-selected-provider-is-ready/alternatives-considered:
en: 6da221f6b821ea44
zh: b15774011abed7ed
@@ -13,7 +13,7 @@ English | [中文](2026-09-27-web-search-offered-by-provider-readiness.zh.md)
Each role of the web capability seam owns one part of a per-step check:
- **Service Definition.** `WebSearchProvider` and `WebFetchProvider` have an optional `ready(llmProvider)` that answers whether an operation made for a model request on that chat route has a credential to send. It checks configuration only and makes no network calls. `ctx.web.searchReady(llmProvider?)` and `ctx.web.fetchReady(llmProvider?)` resolve the provider with the same rules as `search()` and `fetch()` and return its answer. A provider without `ready()` counts as ready, and a selection failure answers true because the operation reports that failure as a structured `WebError`.
- **Service Provider.** Each DeepSeek provider checks its credentials in the order its operation resolves them. `dsh-web-search-deepseek` checks, on the `deepseek-account` route, whether `ctx.deepseekAccount.resolveToken()` returns a token for its Messages endpoint, and then its literal `apiKey` or its `apiKeyEnv` reference. The Search and Fetch API providers of `dsh-web-deepseek-api` resolve the same plan as the operation ([credential resolution](2026-10-29-web-provider-selection.md)): a capability with its own YAML fields checks only the key under its `*ApiKeyEnv`; otherwise, on the account route with the account model route mounted, a token for that route's `/v1/tools` base counts, and then the key of the `deepseek-official` route, or `DEEPSEEK_API_KEY` without that route. A key counts when `ctx.credentials.describe()` reports its reference configured (without that service, when the launching environment carries it); the [shared credential helpers](../../../../packages/llm/llm-deepseek/src/credential.ts) perform these presence checks. A failed account-token or credential-store read answers false, because the operation fails on that read instead of trying the next credential. The providers name no tool or prompt section.
- **Service Provider.** Each DeepSeek provider checks its credentials in the order its operation resolves them. `dsh-web-search-deepseek` checks, in a conversation on the account route, whether `ctx.deepseekAuth` has the account sign-in configured for its Messages endpoint, and then its literal `apiKey` or its `apiKeyEnv` reference. The Search and Fetch API providers of `dsh-web-deepseek-api` resolve the same plan as the operation ([credential resolution](2026-10-29-web-provider-selection.md)): a capability with its own YAML fields checks only the key under its `*ApiKeyEnv`; otherwise, on the account route with the account model route mounted, the account sign-in configured for the endpoint under that route's origin counts, and then the key of the `deepseek-official` route, or `DEEPSEEK_API_KEY` without that route. A key counts when `ctx.credentials.describe()` reports its reference configured (without that service, when the launching environment carries it); `ctx.deepseekAuth` performs these checks, a key's through the reference helpers of `dsh-credentials`. A failed account-token or credential-store read answers false, because the operation fails on that read instead of trying the next credential. The providers name no tool or prompt section.
- **Consumer.** `dsh-tool-web` registers `web_search` and `web_fetch` with [step activation conditions](../../../../packages/core/tools/README.md#conditional-tools) that ask `ctx.web.searchReady()` and `ctx.web.fetchReady()` about the route of the step's model selection. The agent loop resolves conditions before it assembles the step, so the declared tools, the `tool:web_search` and `tool:web_fetch` prompt sections, PTC program bindings, and dispatch all read the same admitted set.
The route decides only whether the account token is checked before the API key, which happens on the `deepseek-account` route; an API key counts on every route, so a conversation on another provider's model is offered the DeepSeek web tools whenever a DeepSeek key is configured. A Search or Fetch API capability with its own YAML fields ignores the route and is ready exactly when its own key is configured.
@@ -13,7 +13,7 @@ Status: implemented
web 能力 seam 的每个角色各负责逐步骤检查的一部分:
- **Service Definition。** `WebSearchProvider` 与 `WebFetchProvider` 有一个可选的 `ready(llmProvider)`,回答为该对话路由上的模型请求发起的操作是否有可发送的凭据。它只检查配置,不发起网络调用。`ctx.web.searchReady(llmProvider?)` 与 `ctx.web.fetchReady(llmProvider?)` 按与 `search()`、`fetch()` 相同的规则解析提供方并返回其回答。没有 `ready()` 的提供方视为就绪;选择失败时回答 true,因为对应操作会把该失败报告为结构化 `WebError`。
- **Service Provider。** 每个 DeepSeek 提供方都按其操作解析凭据的顺序检查凭据。`dsh-web-search-deepseek` 在 `deepseek-account` 路由上检查 `ctx.deepseekAccount.resolveToken()` 是否为其 Messages 端点返回 token,然后检查其字面 `apiKey` 或 `apiKeyEnv` 引用。`dsh-web-deepseek-api` 的 Search 与 Fetch API 提供方解析与操作相同的方案([凭据解析](2026-10-29-web-provider-selection.zh.md)):在 YAML 中设置了单独字段的能力只检查其 `*ApiKeyEnv` 下的密钥;否则,在账号路由上且账号模型路由已挂载时,该路由 `/v1/tools` 基础地址的 token 算数,然后是 `deepseek-official` 路由的密钥,没有该路由时为 `DEEPSEEK_API_KEY`。`ctx.credentials.describe()` 报告其引用已配置时(没有该服务时,启动环境中存在该变量),密钥即算存在;这些存在性检查由[共享凭据函数](../../../../packages/llm/llm-deepseek/src/credential.ts)执行。读取账号 token 或凭据存储失败时回答 false,因为操作会在该次读取上失败,而不会尝试下一种凭据。提供方不点名任何工具或提示词段落。
- **Service Provider。** 每个 DeepSeek 提供方都按其操作解析凭据的顺序检查凭据。`dsh-web-search-deepseek` 在账号路由上的会话里检查 `ctx.deepseekAuth` 是否已为其 Messages 端点配置账号登录凭据,然后检查其字面 `apiKey` 或 `apiKeyEnv` 引用。`dsh-web-deepseek-api` 的 Search 与 Fetch API 提供方解析与操作相同的方案([凭据解析](2026-10-29-web-provider-selection.zh.md)):在 YAML 中设置了单独字段的能力只检查其 `*ApiKeyEnv` 下的密钥;否则,在账号路由上且账号模型路由已挂载时,为该路由 origin 之下的端点配置的账号登录凭据算数,然后是 `deepseek-official` 路由的密钥,没有该路由时为 `DEEPSEEK_API_KEY`。`ctx.credentials.describe()` 报告其引用已配置时(没有该服务时,启动环境中存在该变量),密钥即算存在;这些存在性检查由 `ctx.deepseekAuth` 执行,其中密钥的检查经由 `dsh-credentials` 的引用函数。读取账号 token 或凭据存储失败时回答 false,因为操作会在该次读取上失败,而不会尝试下一种凭据。提供方不点名任何工具或提示词段落。
- **Consumer。** `dsh-tool-web` 注册 `web_search` 与 `web_fetch` 时各带一个[步骤激活条件](../../../../packages/core/tools/README.zh.md#conditional-tools),以该步骤模型选择的路由询问 `ctx.web.searchReady()` 与 `ctx.web.fetchReady()`。agent loop 在组装该步骤之前解析各条件,因此声明的工具、`tool:web_search` 与 `tool:web_fetch` 提示词段落、PTC 程序绑定与派发都读取同一个准入集合。
路由只决定是否先检查账号 token 再检查 API 密钥,这发生在 `deepseek-account` 路由上;API 密钥在每条路由上都算数,因此只要配置了 DeepSeek 密钥,使用其他提供方模型的对话也会获得 DeepSeek Web 工具。在 YAML 中设置了单独字段的 Search 或 Fetch API 能力不看路由,恰在其自身密钥已配置时就绪。
@@ -15,8 +15,8 @@
en: 7f33895364a9f5cc
zh: f1c79ea15f5c151e
/agent-note-initial-draft-content-and-structured-reference-restoration/decision/classes-and-methods:
en: e57394545d9d93ff
zh: 5ab142e661750b82
en: 9039c6bf700da3cf
zh: 2808757aed8615b3
/agent-note-initial-draft-content-and-structured-reference-restoration/decision/data-flow:
en: dd57e639e9328f1d
zh: 5e16cb2e3a73597c
@@ -37,7 +37,7 @@ The existing `dsh.conversation.<sessionId>` key remains. Readers accept both leg
| `SessionInputShell.refreshLexiconSubscription()` / `DraftEditorRuntime.refreshLexiconSubscription()` | `InputHub` owns the Session-scope `inject` callback that connects the lexicon after caching the shell, reconnects when the service arrives or is replaced, and unsubscribes on disposal. Both connection and catalog updates rescan the current editor without writing old text back; `setDraft` does not establish the subscription |
| `ConversationStoreState` / `createConversationStore` | Support structured input and legacy strings in draft storage, keeping View state and the original key |
| `DefaultConversationViews` | Remove restoration and prefill effects, retaining persistence binding and unbinding. Initial saving reads the owner's current snapshot, never text captured during render |
| The existing `selectWorkspace` callback in `apply.ts` | Keep the existing cross-Workspace draft-transfer rules, passing `draftSnapshot` instead of plain text so transfer retains references |
| The cross-Workspace draft move (`moveDraft` in `apply.ts`) | Keep the existing cross-Workspace draft-transfer rules, passing `draftSnapshot` instead of plain text so transfer retains references |
There is no new draft service, storage key, general task framework, or Session creation entry point. SlotRenderer, Host Session logs, command execution, and file-discovery RPCs are unchanged. `InputActions` remains the shared input-action entry; components receive no separate content-initialization callback.
@@ -37,7 +37,7 @@ Status: implemented
| `SessionInputShell.refreshLexiconSubscription()`/`DraftEditorRuntime.refreshLexiconSubscription()` | `InputHub` 拥有 Session scope 的 `inject` 回调,在缓存输入对象后连接词典,服务到达或替换时重接,销毁时退订。连接和词典更新都会重扫当前 editor,不覆盖旧文本;`setDraft` 不负责建立订阅 |
| `ConversationStoreState`/`createConversationStore` | draft 支持兼容旧字符串的结构化输入,View 状态及原 key 保持 |
| `DefaultConversationViews` | 删除恢复/预填 effect;保留持久化回调的绑定和解绑。初始保存只能读取 owner 的当前快照,不能把 render 时的旧文字写回 |
| `apply.ts` 中现有 `selectWorkspace` 回调 | 沿用原有跨工作区携带规则,但传递 `draftSnapshot` 而不是纯文本,防止携带时再次丢失引用 |
| 跨工作区的草稿移动(`apply.ts` 中的 `moveDraft`) | 沿用原有跨工作区携带规则,但传递 `draftSnapshot` 而不是纯文本,防止携带时再次丢失引用 |
不新增草稿服务、存储 key、通用任务框架或另一套 Session 创建入口;不改 SlotRenderer、Host Session 日志、命令执行和文件发现 RPC。`InputActions` 保留统一输入操作入口,组件不单独注入另一条内容初始化回调。
@@ -9,8 +9,8 @@
en: 3658160e034e0e58
zh: 980d922aded8713b
/agent-note-peer-scoped-connect-handshake/decision:
en: 414dfe949a53c4d9
zh: 7e6efdd57f2eb240
en: 6d84e6633c7f2aa8
zh: 11d09a4efb5cf570
/agent-note-peer-scoped-connect-handshake/decision/admission-and-ownership:
en: 95ad4c8c433fdc9b
zh: 379ccd5e077d7dee
@@ -27,5 +27,5 @@
en: 81ce03ab4e1fd0d4
zh: c2729e7e2db56f67
/agent-note-peer-scoped-connect-handshake/consequences:
en: 91f5f80f733c174c
zh: 76cbb31b0d2e8764
en: 52b687e9b5906c59
zh: 9eb9c740e2873f70
@@ -10,7 +10,7 @@ Automatically subscribing automation clients to forwarded events lets method-onl
## Decision
Browsers retain their existing signed Cookie, root launch-token exchange, shared `connection.browserPeer` with owner principal and `interactions: 'answer'`, and recovery behavior. Only API callers create independent Peers through `GET /connect?token=<launch-token>&interactions=answer|none`. The endpoint is API-only, defaults to `none`, rejects invalid or repeated declarations with 400, and retains Host/Origin checks and token authentication. It returns 302 with the Remote Mux destination and an API Cookie.
Browsers retain their existing signed Cookie, root launch-token exchange, the Token Provider's shared Peer with owner principal and `interactions: 'answer'`, and recovery behavior. Only API callers create independent Peers through `GET /connect?token=<launch-token>&interactions=answer|none`. The endpoint is API-only, defaults to `none`, rejects invalid or repeated declarations with 400, and retains Host/Origin checks and token authentication. It returns 302 with the Remote Mux destination and an API Cookie.
### Admission and ownership
@@ -52,4 +52,4 @@ The [recorded approval scenario](../../../../apps/web/tests/approval-composer.e2
Unconnected API records need not be promptly reclaimed; resource-heavy additions to idle Peers require revisiting that choice. API Cookies cannot restore a Peer after its socket closes or the Host restarts. Browser Cookie format and authentication behavior remain unchanged, with no reauthentication migration. API and browser Cookies use the same authority-specific name, so API callers keep their own Cookie storage rather than exchanging credentials in a shared browser jar. Any launch-token holder may request `answer`; this is interaction participation, not user isolation.
The [duplex-stream decision](2026-09-19-remote-duplex-stream.md) retains Peer scopes and stream framing. The [browser authentication decision](2026-08-24-browser-token-authentication.md) retains browser token, signature, authority, and lifetime semantics; only independent API admission is added here. Both records remain active.
The [duplex-stream decision](2026-09-19-remote-duplex-stream.md) retains Peer scopes and stream framing. The [browser authentication decision](2026-08-24-browser-token-authentication.md) retains browser token, signature, authority, and lifetime semantics; only independent API admission is added here. Both records remain active. The [Provider integration](2026-11-07-browser-authentication-development.md) owns the current registration and Socket-middleware placement without replacing this protocol and lifetime decision.
@@ -10,7 +10,7 @@ Status: implemented
## 决策
浏览器保留现有签名 Cookie、根路径 launch token 交换、共享 `connection.browserPeer` 和恢复行为。只有 API 调用方通过 `GET /connect?token=<launch-token>&interactions=answer|none` 创建独立 Peer。该端点仅供 API 使用,默认 `none`,非法或重复声明返回 400,并保留 Host/Origin 检查和 token 认证。它返回 302、Remote Mux 目标地址和 API Cookie。
浏览器保留现有签名 Cookie、根路径 launch token 交换、Token Provider 持有的共享 owner Peer(`interactions: 'answer'`)和恢复行为。只有 API 调用方通过 `GET /connect?token=<launch-token>&interactions=answer|none` 创建独立 Peer。该端点仅供 API 使用,默认 `none`,非法或重复声明返回 400,并保留 Host/Origin 检查和 token 认证。它返回 302、Remote Mux 目标地址和 API Cookie。
### 接纳与所有权
@@ -52,4 +52,4 @@ Connection 测试覆盖 API 发布、Cookie 校验、闲置保留、连接所有
未建联的 API 记录不要求及时回收;若为空闲 Peer 增加重资源,必须重新评估这一取舍。连接关闭或 Host 重启后,API Cookie 不能恢复 Peer。浏览器 Cookie 格式与认证行为保持不变,无需重新认证迁移。API 与浏览器 Cookie 使用同一 authority 专属名称,因此 API 调用方维护自己的 Cookie 存储,不在共享浏览器 Cookie jar 中交换凭证。任何 launch token 持有者都可以请求 `answer`;这是交互参与,不是用户隔离。
[双工流决策](2026-09-19-remote-duplex-stream.zh.md)继续定义 Peer 作用域和流帧格式。[浏览器认证决策](2026-08-24-browser-token-authentication.zh.md)保留浏览器 token、签名、authority 与有效期语义;本记录只增加独立 API 接纳。两份既有记录继续保留。
[双工流决策](2026-09-19-remote-duplex-stream.zh.md)继续定义 Peer 作用域和流帧格式。[浏览器认证决策](2026-08-24-browser-token-authentication.zh.md)保留浏览器 token、签名、authority 与有效期语义;本记录只增加独立 API 接纳。两份既有记录继续保留。[Provider 接入说明](2026-11-07-browser-authentication-development.zh.md)拥有当前注册与 Socket 中间件的实现位置,不取代本协议与生命周期决策。
@@ -21,8 +21,8 @@
en: ca6a5c372bb3cad1
zh: 1cd5028269b58c65
/agent-note-one-fold-motion-for-collapsing-on-the-next-message/testing:
en: 0423a607ee0589b5
zh: 61df892a01c5aa43
en: 6928ea8cc28112e5
zh: e9d69605558ea102
/agent-note-one-fold-motion-for-collapsing-on-the-next-message/alternatives-considered:
en: d8e1ea66e293cd93
zh: 0aaa9e693f441673
@@ -73,7 +73,7 @@ Let `start` be the scrollTop when the batch begins, `above` the height of closin
## Testing
[fold-blank-matrix.e2e.ts](../../../../apps/web/tests/fold-blank-matrix.e2e.ts) covers 19 main-Session cases and 8 right-Sidebar child cases across reader position (bottom, middle of the body, top of the body, inside the steps, previous Turn), input source (composer, Turn failing before its message is recorded, another tab, queued delivery, steer, parent message, several Turns folding at once), body length, and Standard and "On completion" controls. The layout gap is the tallest band between the scrollport top and the composer that no visible row's box covers: at most 120 px once settled, and over that for at most one animation frame. It counts boxes, so a closing row that has faded but not finished shrinking still covers its space. Tail cases assert the floor landing; reader-content-still cases assert that the reader's anchor row moves at most 2 px on screen. Short-body cases assert only that no room remains after the reply arrives.
[fold-blank-matrix.e2e.ts](../../../../apps/web/tests/fold-blank-matrix.e2e.ts) covers 19 main-Session cases and 8 right-Sidebar child cases across reader position (bottom, middle of the body, top of the body, inside the steps, previous Turn), input source (composer, Turn failing before its message is recorded, another tab, queued delivery, steer, parent message, several Turns folding at once), body length, and Standard and "On completion" controls. The layout gap is the tallest band between the scrollport top and the composer that no visible row's box covers: at most 120 px once settled, and over that for at most one animation frame. The probe reads the layout after the animation callbacks for each rendering opportunity, before paint. Identical gaps on consecutive frames count separately. It counts boxes, so a closing row that has faded but not finished shrinking still covers its space. Tail cases assert the floor landing; reader-content-still cases assert that the reader's anchor row moves at most 2 px on screen. Short-body cases assert only that no room remains after the reply arrives.
## Alternatives considered
Loaded 100 of 7410 files, more files were not shown because too many files have changed in this diff. Show more