Commit Graph
26530 Commits
Author SHA1 Message Date
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
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
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
Yichen Jiang e29a8f57c5 Merge pull request #8157 from deepseek-harness/fix/app-boot-home-env-deepseek-endpoints
fix(app-boot): accept DeepSeek endpoints from the Harness-home .env
2026-11-09 14:00:02 +08:00
Jiawei Song b43fcce60e Merge pull request #8006 from deepseek-harness/refactor/tool-errors-fs
feat(fs,lsp,present): give file, search, LSP, and present tool failures error codes
2026-11-09 13:59:49 +08:00
Jiawei Song 74ae5f0da9 Merge pull request #8053 from deepseek-harness/refactor/tool-errors-shell
feat(shell,sandbox,jobs,terminal): give shell, sandbox, job, and terminal tool failures error codes
2026-11-09 13:56:40 +08:00
CreatixChu e5359d9a49 Merge pull request #8107 from deepseek-harness/feat/session-mouse-consent
feat(cua): 按会话授权 macOS 悬停移动系统鼠标
2026-11-09 13:51:42 +08:00
Yichen Jiang 544fdb0b9c Merge pull request #8126 from deepseek-harness/perf/forge-changes-view
perf(forge): keep the changes view responsive on large diffs
2026-11-09 13:34:23 +08:00
Yichen Jiang 9b6e551054 fix(app-boot): accept DeepSeek endpoints from the home .env only as spelled
The Harness-home exemption matched every name case-insensitively, so a
home `.env` line such as `deepseek_base_url=...` passed the check and
landed in `process.env` under that spelling. The launch snapshot looks
names up exactly on POSIX, so llm-deepseek, web-search-deepseek, and
web-deepseek-api never saw it: the launch succeeded with the official
endpoint, where it used to fail. Proxy names keep matching in any letter
case because proxy clients read both spellings; the two endpoint names
now match only as `DEEPSEEK_BASE_URL` and `DEEPSEEK_SEARCH_BASE_URL`, and
another spelling fails the launch with the exact name to use.

The home-layer refusal case now covers `SSL_CERT_FILE`,
`NODE_TLS_REJECT_UNAUTHORIZED`, and `DSH_HOME`. The web-deepseek-api
README states where `DEEPSEEK_BASE_URL` may come from; the
launch-environment README, the development guide, and the configuration
source Agent Note no longer overstate which file is refused, which
Vitest configurations load the root `.env`, or what a checkout may carry.

Refs #8138
2026-11-09 13:15:10 +08:00
Yichen Jiang 2284e3e714 fix(app-boot): accept DeepSeek endpoints from the Harness-home .env
`loadLayeredEnv` refused `DEEPSEEK_BASE_URL` and
`DEEPSEEK_SEARCH_BASE_URL` from every discovered `.env`, including the
user's own `$DSH_HOME/.env`, so a machine-level endpoint written there
made both the CLI and Desktop fail at startup.

The refusal exists for the invoking directory's file: it arrives with a
clone, and a repository must not choose where requests carrying the
user's DeepSeek credential go. The home file is the user's own, and the
profile patches in the same directory can already set these endpoints as
plugin `baseURL` fields, so refusing it there protected nothing.
`HOME_LAYER_PROXY_NAMES` becomes `HOME_LAYER_ROUTE_NAMES` and adds the
two endpoint names; a project `.env` that sets either still fails the
launch, and its message now names the home file as the second way out.
`DSH_HOME` stays bootstrap-only, and the CA and TLS names stay refused
everywhere.

Tests cover the project layer refusing both names, the home layer
accepting both below an exported value, and the project-layer message.
The app-boot, launch-environment, llm-deepseek, and web-search-deepseek
READMEs, the development guide, and the two Agent Notes that stated the
old rule now state this one.

Refs #8138
2026-11-09 12:33:59 +08:00
Yichen Jiang 1a6268ed52 Merge pull request #8152 from deepseek-harness/fix/worktree-archive-cleanup
fix(worktree): reclaim archived checkouts in large repositories
2026-11-09 12:31:05 +08:00
Yichen Jiang 088cd5dfba test(forge-panel): read the end position after scroll anchoring settles 2026-11-09 12:20:08 +08:00
Yichen Jiang 2d44c4ecc9 fix(forge-panel): let scroll anchoring keep a jumped-to file in place
The per-frame alignment after a jump pulled back scrolls it did not start,
such as a script or find in page setting the scroll position. Measured on
#7985, the browser's scroll anchoring already keeps an early, middle, or
late jump target at the top while the sections above it draw.
2026-11-09 12:07:17 +08:00
Yichen Jiang fcc33725d9 fix(worktree): keep an early streamed answer and document cleanup limits
- Return the early answer from scanCommand without awaiting a successful
  outcome: the SSH provider rejects done when termination cancels a
  launch it has not yet acknowledged, which turned a retained dirty
  checkout into a failed cleanup.
- Test that a never-initialized submodule is removed and that Git
  refuses a committed embedded repository, which inspection leaves to
  Git by design.
- Record the git-status-only trade-off and its sparse-checkout rationale
  in the worktree Agent Note, and align the README, upgrade guide,
  maxOutputBytes description, and comments with what is streamed.

Refs #8151
2026-11-09 12:00:23 +08:00
Yichen Jiang ce1e1f2681 Merge remote-tracking branch 'origin/master' into perf/forge-changes-view 2026-11-09 11:47:49 +08:00
Yichen Jiang cfee330356 fix(forge-panel): highlight lines in the render that draws them
Deferred idle-time highlighting drew token text, so a file whose content
changed at the same path kept showing its previous text until the next
pass, and replacing the plain text collapsed a selection made meanwhile.
Sections highlight in their drawing render again, as before.

File sections now take the tab's visibility as a prop and the reach
tracker through their handlers, so no business component reads a React
context.
2026-11-09 11:47:05 +08:00
Yichen Jiang bafc363d78 fix(worktree): reclaim archived checkouts in large repositories
Archive cleanup read whole Git listings into the 64 KiB maxOutputBytes
buffer, so every clean checkout in a repository with more than about a
thousand tracked files settled as failed.

- Drop the skip-worktree/assume-unchanged and gitlink listings; removal
  follows what `git status` reports, as peer agent products do.
- Stream `git status` and stop at its first entry, and stream the
  worktree listing, so neither is bounded by maxOutputBytes; restoring a
  worktree shares the streamed lookup.
- Retain a checkout whose administrative directory holds submodule
  repositories instead of letting Git refuse the removal.

Refs #8151
2026-11-09 10:59:09 +08:00
Chinesezjc e47ab865a4 Merge pull request #7994 from deepseek-harness/fix/master-ci-flaky
test(ci): remove two flaky-test causes in gh fixture and Web e2e
2026-11-09 02:02:29 +08:00
dsh-ci-bot 8590ed6d92 Merge remote-tracking branch 'origin/master' into fix/master-ci-flaky
# Conflicts:
#	packages/experimental/forge-github/tests/gh.spec.ts
2026-11-09 01:09:22 +08:00
Yichen Jiang 2c253a6ecf Merge pull request #8145 from deepseek-harness/fix/commit-menu-time-fixture
test(forge): pin the commit menu clock
2026-11-08 23:28:06 +08:00
liukx0205 a62156c1ed test(forge): pin the commit menu clock
The rows name each commit's age, so the fixed 2026-10-09 fixture began reading '1 mo ago' once the wall clock crossed 30 days and the ' d ago' assertion failed on every lane. Pin Date to the suite's 2026-10-09T12:00:00Z now and date the fixture two days earlier, matching the formatAgo cases.
2026-11-08 22:58:56 +08:00
Kexin Liu 6a20990684 Merge pull request #7933 from deepseek-harness/feat/session-append-events
feat(session): accept multiple events through append
2026-11-08 21:52:12 +08:00
Kexin Liu 2c37d513ed Merge pull request #8085 from deepseek-harness/agent/answer-concurrent-tools-2-fda34beac313
feat(tools): declare read-only tools concurrency-safe
2026-11-08 17:13:38 +08:00
imccyu c22c633a25 Merge pull request #8118 from deepseek-harness/fix/loading-spinner-thinking-gap
fix(web): keep the boot spinner circular and multi-thinking rows on the 4px rhythm
2026-11-07 19:15:37 +08:00
imccyu fc92cdf7ef fix(chat): keep multi-reasoning rows on the process-row rhythm
Several reasoning blocks of one Assistant message rendered 16px apart inside the response body, while process rows of different steps sit 4px apart. A signature-only reasoning block renders no row but left its empty wrapper in the flex body, adding a full block gap.

Styles only: inside a step-group reasoning part, whose body holds only reasoning rows, the block gap is 4px, and an empty reasoning wrapper cancels its gap like a hidden one. A keyless web e2e pins the rendered gaps.
2026-11-07 18:58:57 +08:00
creatixchu cbba0c66a9 test(cua): verify pointer capabilities and portable option forwarding 2026-11-07 18:20:34 +08:00
creatixchu ac53809d66 refactor(cua): own system-pointer consent in the shared host 2026-11-07 18:18:03 +08:00
Yichen Jiang c5054b5fff docs(forge): record why the changes view measures pixels and how hosts mark the navigator row 2026-11-07 18:09:09 +08:00
Yichen Jiang 1f0eb449a3 fix(forge-panel): end a jump's alignment when the tab hides
Also explains why the alignment measures every frame and why the section
handlers read values assigned during render.
2026-11-07 18:09:09 +08:00
Yichen Jiang 508b078373 fix(forge-github): keep the status when GitHub reports no full base commit
The base commit only gives the diff read a head start, so a missing or
malformed baseRefOid now leaves baseSha out instead of failing the status.
2026-11-07 18:09:08 +08:00
Yichen Jiang 040c93f9b9 fix(forge-panel): report a refused patch before a failed .gitattributes read
Both reads still run in parallel, and a failed patch read still cancels the
attributes read, but the result now waits for both: the patch's failure
passes on first, so a too-large or stale patch is never hidden by an
attributes failure that happened to end earlier.

Also documents the estimated height of undrawn files.
2026-11-07 18:09:06 +08:00