Commit Graph
2139 Commits
Author SHA1 Message Date
sjw1231 9626ccfae8 feat(sandbox): code escalation outcomes and Windows ACL preparation failures
The sandbox Service Definition adds SandboxEscalationError with
SANDBOX_ESCALATION_INVALID_ARGUMENT, _UNAVAILABLE, _REJECTED, and
_CANCELLED, thrown by validateEscalationArgs() and approveEscalation()
with their existing messages. A cancelled approval for an aborted call
rethrows the call's cancellation instead.

It also adds SandboxPreparationError. sandbox-local wraps Windows ACL
SID, grant, temp-directory, and path-resolution failures as
SANDBOX_PREPARATION_FAILED with the Win32Error or Node error (or an
AggregateError with cleanup failures) as cause, and reports a temp root
inside the workspace as SANDBOX_INVALID_TEMP_ROOT. sandbox-windows-acl
exports isTempRootInsideWorkspace() for that check.

Refs #7869
2026-11-06 16:39:36 +08:00
CreatixChu ad3ca91623 Merge pull request #6746 from deepseek-harness/feat/cua-shared-native-api
处理 Windows 实现过程中发现的 CUA 包接口变更
2026-11-06 13:14:30 +08:00
Jiawei Song 7f98d178d1 Merge pull request #7966 from deepseek-harness/refactor/tool-errors-foundation
feat(tools): structured error identity for registry-owned tool failures
2026-11-06 13:11:06 +08:00
Xu Hanxiang 3a9551d1ef Merge pull request #7899 from deepseek-harness/feat/liveshare-multi-session-share
feat(liveshare): add source Sessions to an existing share
2026-11-05 14:41:55 +00:00
creatixchu 9f31a0b5a5 Merge master with the plugin entry export policy 2026-11-05 20:40:22 +08:00
sjw1231 09604ac04d refactor(tools): tighten cancellation, approval, and job error contracts
Type the approval denial helper with a closed ApprovalErrorCode, state
that a cancellation is recognized by the signal reason or an Error named
AbortError, note that ApprovalError names a denial rather than a thrown
class, and separate JOB_CONTROLLER_UNAVAILABLE from a missing jobs
service. The jobs README describes JobError as the seam's export rather
than as current caller behavior, and the terminal test asserts one
concurrent send failure.

Refs #7869
2026-11-05 20:21:45 +08:00
sjw1231 a964c739d2 Merge remote-tracking branch 'origin/master' into refactor/tool-errors-foundation 2026-11-05 20:00:51 +08:00
creatixchu d3304de65b Align CUA guidance and migration examples with the scoped API 2026-11-05 18:08:26 +08:00
sjw1231 3f3e9caeae feat(tools): add ToolContextUnavailableError for missing call context
Tool bodies that lack a calling Agent, an injected service, or an open
turn get one shared HarnessError with the TOOL_CONTEXT_UNAVAILABLE
code, instead of each tool throwing a plain Error. The stacked
per-area refactors adopt it at their call sites.

Refs #7869
2026-11-05 17:07:42 +08:00
sjw1231 3d8d0ba95c feat(tools): let guard denials and post-execute blocks carry error info
A ToolGuard may return a ToolGuardDenial with optional ToolErrorInfo,
and a post-execute block may supply info; the registry records it on
the failed result. checkGuards now returns the normalized denial.
String guards and blocks without info keep their existing results.

Refs #7869
2026-11-05 17:07:42 +08:00
creatixchu d9d9c7348b Merge master into feat/cua-shared-native-api 2026-11-05 17:04:43 +08:00
sjw1231 7e180cfd70 feat(tools): attach ApprovalError codes to approval denials
An ask that approval does not grant now denies with ApprovalError and
APPROVAL_REJECTED, APPROVAL_CANCELLED, or APPROVAL_UNAVAILABLE, so a
user rejection is routable on tool/result like other structured
failures. Model-facing reasons are unchanged.

Refs #7869
2026-11-05 16:56:27 +08:00
Yichen Jiang 200e6a8f4a Merge remote-tracking branch 'origin/master' into worktree/archive-session-worktrees
# Conflicts:
#	snapshots/session/worktree/session.v4.jsonl
2026-11-05 16:52:49 +08:00
sjw1231 fc6afa97fe fix(tools): classify cancellation thrown by a started tool body
A started tool body that throws the signal's reason or an AbortError
without HarnessError identity now keeps its message and carries
AbortError / ABORTED, so the cancellation is routable like the
registry's own cancellation results. HarnessErrors and distinct
failures that settle during cancellation stay unchanged.

Refs #7869
2026-11-05 16:51:42 +08:00
imccyu a98f470d75 Merge pull request #7928 from deepseek-harness/feat/markdown-fence-slots
feat(ui-chat): dispatch Markdown fences by language through a keyed hoc slot
2026-11-05 16:29:15 +08:00
Yichen Jiang 2246027c59 Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-05 14:43:16 +08:00
Yichen Jiang f73ff5985f Merge remote-tracking branch 'origin/master' into worktree/archive-session-worktrees 2026-11-05 13:16:30 +08:00
imccyu a1e4f45fdb feat(ui-chat): dispatch Markdown fences by language through a keyed hoc slot
MarkdownDelegate gains renderCode for fences whose language is final; ChatView
declares conversation.chat.markdown.fence and registers math and diff/patch
layers. Hoc slots accept an optional dispatch key, render children at most
once, share compiled chains per key, and contain layer crashes to the failing
occurrence.

Refs #7926
2026-11-05 12:58:57 +08:00
Turtle beee3dbe42 Merge pull request #7035 from deepseek-harness/turtle/market-git-update
feat(plugins): update Git-installed plugins from Discover
2026-11-05 12:43:43 +08:00
Yichen Jiang 691ebd7b6c refactor(worktrees): move archive cleanup into the worktree service
The worktree service now records each checkout it creates as a
`plugin:worktree/created` record, folds them in its own `worktree`
projection with fork-aware ownership, and reclaims a clean, unreferenced
checkout when the Session that created it is archived. The Forge panel
reads the service's record and forwards its cleanup state; it no longer
writes a `created` record, owns a retention projection, or gates every
Session's directory access.

Admission registers the attempt inside the Workspace write queue and
returns; inspection runs afterwards, reading cold Sessions through the
projection cache when mounted and from their log otherwise, with subagent
children of an archived ancestor counted as archived. Only a path being
removed holds `working-directory/access`, whose request now carries the
access's `signal`, and listeners withdraw before the drain. Ignored files
no longer retain a checkout, matching Git's non-force removal; processes
and terminals are not consulted.

The Forge bundle mounts one `worktree` service: the `forge-worktree` row
and the `optional-forge-panel` group that isolated a second service are
gone, and `forge-panel` is a top-level row. `canRemove`, `remove`, the
`forgeWorktreeRetention` projection, and `ForgeWorktreeCleanup` are
removed; `WorktreeService.cleanupOf`, `WorktreeCleanup`, and the
`worktree/cleanup` Host event replace them. The upgrade guide moves to
the current version directory and covers the id removals.
2026-11-05 12:28:50 +08:00
Yichen Jiang a2d8340421 Merge origin/master into worktree/archive-session-worktrees 2026-11-05 11:45:46 +08:00
涂轶翔 ae24f608a6 Merge pull request #7415 from deepseek-harness/feat/windows-writable-directory-sets
fix(sandbox): keep Windows extra directory grants in file tools
2026-11-05 11:39:50 +08:00
turtle1999 d2bed0238e feat(plugins): update Git-installed plugins from Discover
Discover offers Update for a plugin installed from a pinned Git commit
when the plugin index lists a newer commit of the same repository
directory. The Plugins page update removes the installed copy, installs
the target with an expected-package check that undoes a wrong install
with its modules, and reinstalls the removed commit when the target
fails. A network failure reaching the target's host stops the update
before anything is removed.
2026-11-05 01:38:32 +08:00
yudshj 9d01969217 fix(office): 清理 /locate 残留文档,收窄 office 工具输出 schema
- 打包、document 分组、office-kit 子系统页与 Agent Note 改为提供方内部解析 Kit,不再引用已删除的 /locate 入口
- office_recalculate 输出 format 收窄为 xlsx/ods;office_render 图片 mediaType 去掉 GIF,存储返回 GIF 时明确报错
- 修正 office-kit 输出位置、技能数量、token 预算说明,补充 /office 直接调用的激活时机限制
- 升级指南说明继承的 DSH_PRIMARY_RUNTIME 优先于 SDK 下载缓存,刷新 office-progressive-ptc 系统提示快照
2026-11-04 18:17:59 +08:00
yudshj d7ae76a92b refactor(office): 渲染图片沿用附件实际媒体类型,收窄 office-kit 冗余接口
- office_render 返回存储规范化后的 mediaType(JPEG/WebP),复用 ImageAttachmentRef 字段并补回归测试
- 删除无生产消费者的 office-kit/locate 公开子路径与 unpackedPath 导出
- tool-office 复用 office-kit 格式与扩展名类型
- 删除新操作结果的 generation 与请求的 priority 字段
- 删除 tool-office 入口无人使用的结果类型重导出
2026-11-04 18:17:59 +08:00
yudshj edd38f1d66 refactor(office): office 工具拆成 office_render/office_convert/office_recalculate,加载 Office 技能后按需声明
- tool-office 注册三个工具,参数规则由各自 schema 表达,运行时拒绝其他工具的参数
- 三个工具共用 when:本 agent 成功加载过 activationSkills 中的技能(内存标记),或上一次请求头已声明 office_*;加载后下一步声明,之后不移除
- Office 技能改用新工具名,加入工具不可用时重新加载 office 的说明和旧格式先转换的说明
- Client 卡片按工具名分派,图片子槽改为 tool.call.office_render.images
- 删除未发布 office 工具的两份升级指南,新增 office-operation-tools 指南,只记录已发布版本的变化
- 刷新 catalog、snapshot、SDK expected 与 Agent Note
2026-11-04 18:17:59 +08:00
yudshj 611e42b9a5 fix(office): 输出清理限定在自有目录,缓存命中前确认读权限
- office-kit:启动 sweep 只处理 session-<hash>/<uuid> 格式的真实目录,不跟随 symlink;删除成功后才释放记账,失败保留并重试,dispose 等待全部删除;容量腾不出时 save 明确失败
- office-kit / web-app 测试:显式使用临时 outputDirectory,不再清理真实 $DSH_HOME
- tool-office:交给 kit 前读 1 字节并重核 version,缓存命中也受当次读权限约束
- 文档:升级指南与 README 写明 render 不再保存图片文件、原生引擎在 Host 内运行;skill-office 链接 #7677;清理 Office-to-PDF 旧描述并重新生成 catalog
- 客户端:renderImages 改用 useCallback;e2e 补 assertNever,依赖按字母序
2026-11-04 18:17:58 +08:00
yudshj 50ba635949 feat(office): Office 操作改为常驻的原生 office 工具
- 新包 @deepseek-ai/dsh-tool-office 提供常驻的 office 工具(render / convert / recalculate),由 office-kit 在 Host 中直接调用 Kit 的 JS API;标准模式与 PTC 通过同一个工具调用
- render 的页面图片直接进入工具结果(有数量、像素与字节上限);convert / recalculate 的结果写入 office-kit 按 Session 划分的私有输出目录,由模型用 shell 复制到工作区,fs 与 Host 代码不写用户工作区
- 删除为 shell 执行 Kit CLI 而存在的代码:skill-office 的 node / cli / kitRoot、resolveKitCli、DSH_BUNDLED_OFFICE_CLI / DSH_BUNDLED_OFFICE_NODE / DSH_BUNDLED_RUNTIME_ROOT 与 Electron 下的独立 Node 检查;打包 smoke 改为经 office-kit 真实渲染、转换与重算
- office 由 web-app 的 standard / ptc 预设与 sdk-app 挂载,minimal 不挂载;操作技能正文与目录描述指向 office 工具
- 新增 Agent Note,部分取代 progressive-office-skills 的 shell 执行决定;同步 README、子系统页、catalog 与升级指南(含已保存预设的迁移步骤)

本 PR 的 snapshot 统一在这个提交里重新生成,前 4 个提交中的 snapshot 不一定和那一步的代码对应。
2026-11-04 18:17:58 +08:00
yudshj a220e017b5 refactor(office): 合并为 office-kit,Kit 缺失时降级而非加载失败
- Kit CLI 由 office-kit/locate 在 Host 中定位(含 ASAR 映射与可选 root 越界检查),删除 Desktop 壳的 office-cli 与诊断文件;生产版 Desktop 由壳通过 DSH_BUNDLED_RUNTIME_ROOT 显式传入 Kit 根目录,开发版与 Web 不检查
- office-to-pdf 与 office-kit-resolver 合并为 @deepseek-ai/dsh-office-kit,由同一包定位 Kit 并提供转换服务
- Kit 缺失时 provider 照常注册,转换请求以 OfficeKitError unavailable 拒绝,之后安装 Kit 无需重载
- 类型统一使用 OfficeKit 前缀(OfficeKitRequest/Result/Priority/Key),同步消费方、文档、升级指南与 catalog
- 处理 ds-review-bot 意见,并更新 unknown 断言基线

本 PR 的 snapshot 统一在这个提交里用 keyless refresh 重新生成,前 3 个提交中的 snapshot 不一定和那一步的代码对应。
2026-11-04 18:17:57 +08:00
yudshj ee06bf3f9b fix(office): 升级 LibreOffice Kit 到 0.2.3,Kit CLI 定位失败时隔离并保留技能
- 将 Kit 引擎包解析提取为 office-engine-resolver,并与 master 的发布配置对齐
- LibreOffice Kit 升级到 0.2.3 正式版
- Desktop 的 Office CLI 改由 skill-office 解析 Kit,去掉 desktop-host 对 Kit 的依赖
- Kit 缺失时给出可操作错误;Office CLI 定位失败时隔离错误并保留 Office 技能
- 按 Kit 0.2.3 的 helper 授予 macOS JIT 权限,并按新 Host 签名转发夹具参数
2026-11-04 18:17:57 +08:00
Jiawei Song 184fcae02d Merge pull request #7875 from deepseek-harness/docs/structured-tool-errors
docs(error-handling): require structured name and code for tool failures
2026-11-04 17:45:12 +08:00
sjw1231 e4bcdfe528 docs(error-handling): describe every structured tool error source
List registry cancellation results and tools/execute wrapper results
as structured error sources, name cancellation errors AbortError with
the ABORTED code, state that approval rejections and guard denials carry
no code yet, and allow per-failure classes with their own fields.

Refs #7869
2026-11-04 17:08:05 +08:00
Yichen Jiang 1bcbda3d6d Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-04 16:51:18 +08:00
Xu Hanxiang 0b4328d514 Merge pull request #7856 from deepseek-harness/docs/liveshare-surface-accuracy
docs(liveshare): state the viewer tool surface the code enforces
2026-11-04 08:39:36 +00:00
Yichen Jiang c5ea810a06 Merge remote-tracking branch 'origin/master' into feat/agent-terminal-panel-host 2026-11-04 16:09:24 +08:00
sjw1231 7fa2613383 docs(error-handling): require structured name and code for tool failures
Coded error classes extend HarnessError, foreign failures convert at their
owner, and every expected tool failure throws a HarnessError so tool/result
keeps error.name and error.code. Document when the registry records
ToolErrorInfo and point tool authors and reviewers at the rule.

Refs #7869
2026-11-04 16:08:54 +08:00
Yixiang Tu 41a1aa8a97 fix(sandbox): limit Windows extra directory grants to file tools 2026-11-04 16:07:04 +08:00
Yixiang Tu 0120f0c01e refactor(sandbox): compose Windows write permissions per directory 2026-11-04 16:07:04 +08:00
Yixiang Tu a63ba54f30 feat(sandbox): support writable-directory sets on Windows 2026-11-04 16:07:04 +08:00
Yixiang Tu e6cd6fdc61 fix(sandbox): reject invalid writable directory grants 2026-11-04 15:11:44 +08:00
Yixiang Tu f8633966f5 fix(sandbox): skip non-directory writable roots at execution 2026-11-04 15:11:34 +08:00
Yixiang Tu e032300b4e fix(sandbox): use current grants after failed PTC startup 2026-11-04 15:11:17 +08:00
Yixiang Tu f5dea38671 feat(sandbox): add session-scoped writable directory effects 2026-11-04 15:11:17 +08:00
Yichen Jiang f1e90e5845 fix(terminal-controller): bound Agent terminals precisely and report closed screens uniformly
maxAgentTerminals now counts only running Agent-controlled terminals and
pending Agent allocations, each id once; exited terminals and failed
allocations awaiting cleanup still count toward maxTerminals. openForAgent
applies rename's 1-120 character title rule and trims the title.
readScreen reports a terminal closed while its read drains as
RemoteError terminal/unavailable, like a missing terminal.
2026-11-04 14:23:21 +08:00
Dudu-0223 bb3ac8e304 Merge master into feat/subagent-catalog-names 2026-11-04 13:51:31 +08:00
Ziya d70967e36b Merge pull request #6586 from deepseek-harness/experiment/home-code-ripple
feat(web): play a pixel and code whale on blank home clicks
2026-11-04 04:07:26 +00:00
Dudu-0223 a6f6b98053 Merge master into feat/subagent-catalog-names 2026-11-04 12:04:15 +08:00
Dudu-0223 bfc89ed4a9 fix(team): reuse compatible owner-name checkpoints 2026-11-04 11:56:50 +08:00
Yichen Jiang 9ee92455c4 Merge pull request #7788 from deepseek-harness/worktree/forge-diff-base-branch-4ffd61
feat(forge): add a base branch picker to local changes and restyle merge
2026-11-04 11:38:17 +08:00
Dudu-0223 7b2d7841dd Merge master into subagent naming fixes 2026-11-03 15:52:55 +08:00