Commit Graph
688 Commits
Author SHA1 Message Date
sjw1231 ea4837abb1 feat(fs): keep apply_patch opt-in and the observation policy mounted
This pull request lands the tool; switching the shipped defaults is a
separate pull request stacked on it. Every shipped `tool-fs` row states
`applyPatch: false`, the `fs-observation-policy` row stays mounted, the
write, edit, and apply_patch guidance names the policy, and every recorded
expectation outside the apply-patch scenarios returns to the master
baseline. The upgrade guide, the parity exception, and the optional
classification of the policy package move to the stacked change.
2026-10-29 18:36:31 +08:00
sjw1231 d8243a3f52 feat(base): enable apply_patch on the dsh-base tool-fs row
The SDK/Desktop parity check requires the `standard` tool sets to match, so
the base row enables apply_patch like the Web standard preset; the SDK PTC
overlay keeps that row while the Desktop PTC preset lists its own, which the
parity exceptions now record. fs-observation-policy, no longer mounted by
default, is classified as an optional product package.

Every headless, SDK, and ACP recording follows: sidecars and recorded headers
gain the apply_patch schema, the fixed-budget compaction scenarios pin
`applyPatch: false` so their recorded thresholds hold (model-switch-notice and
session-resume own their schema sidecars again), the parent presets that
borrow the default pin mirror the base row, and the pwsh and Python PTC pins
carry the schema and guidance.
2026-10-29 17:34:25 +08:00
sjw1231 e6f54cecbb Merge branch 'master' into feat/apply-patch
Keeps the apply_patch toolview registration with master's file-menu inject,
takes master's shortened slot JSDoc, re-adds the seven filesystem type-equiv
manifest entries, regenerates the event matrix and client catalogs, moves the
fs-observation-policy upgrade guide under v0.2.2-alpha.2 with the matching
fs-patch version, and refreshes the two SDK scenarios master added for the
write and edit guidance change.
2026-10-29 17:00:06 +08:00
sjw1231 fe5450b152 feat(fs): ship without the observation policy and enable apply_patch in the Web standard preset
Evaluation on the shipped Web composition decided the defaults: the
`fs-observation-policy` row in dsh-base ships `disabled: true`, so write,
edit, and apply_patch mutate unconditionally in every profile; the Web
`standard` preset lists apply_patch; and the tool-fs `applyPatchGuard` switch
is gone, apply_patch always consulting the fs/* intent waterfalls like the
other mutating tools.

The write and edit guidance stops citing the policy as the default, and the
apply_patch guidance asks for enough hunk context instead of a prior read.
The two recordings that capture a policy refusal (fs-policy-reject and
apply-patch-rejected) re-enable the row through a per-scenario
runtime.cordis.yml; every other sidecar follows the prompt change, and the
Web standard-preset recordings gain the apply_patch schema. An upgrade guide
records the default change.
2026-10-29 16:38:42 +08:00
sjw1231 5711d3aae7 docs(tool-fs): state apply_patch's whole-patch preflight in the model guidance
The guidance described only the commit phase ("stop at the first failure,
not rolled back"), so a model inferred that an invalid hunk would leave
earlier operations applied. The sentence now says the whole patch is checked
first and a rejected patch changes nothing before describing commit order.
2026-10-28 15:37:36 +08:00
sjw1231 1f1a9cda72 feat(tool-fs): add applyPatchGuard to run apply_patch without observation guards
`tool-fs.applyPatchGuard` selects the mutation guards of apply_patch:
`observation` consults the mounted observation policy per operation like
write and edit; `none`, the default, applies hunks unconditionally on
context match alone as the Codex tool does, keeps publishing fs/observed,
and replaces the read-first guidance with a context-matching reminder.

In 2,226 recorded DS-Bench and DeepSWE rollouts with the policy on, read-first
and stale-version refusals were 29–41% of apply_patch failures although hunk
context matching already rejects a divergent file. The recorded apply-patch
scenarios pin `observation`, under which they were captured.
2026-10-28 15:26:21 +08:00
imccyu 00d541438b release(dsh): 0.2.2-alpha.2 2026-10-28 02:03:15 +08:00
imccyu 69c389ae11 release(dsh): 0.2.2-alpha.1 2026-10-28 00:00:58 +08:00
sjw1231 64d04a4916 feat(tool-fs): name the apply_patch argument input as Codex does
Across 2,226 recorded DS-Bench and DeepSWE rollouts, 14% of apply_patch
calls arrived as {"input": ...} and were rejected for the missing `patch`
property: models trained on the Codex tool send its parameter name
unprompted. The schema now uses `input`; the executor request keeps its
internal `patch` field. Recorded apply-patch sessions, the schema sidecar,
and the catalogs follow.
2026-10-27 22:26:39 +08:00
sjw1231 e91ee0fb89 chore(release): align fs-patch with the 0.2.1-rc.4 root version 2026-10-27 15:26:32 +08:00
sjw1231 f274f1673a Merge branch 'master' into feat/apply-patch
Takes master's re-measured npm install-layout budget, which covers this
branch's graph, and regenerates the Cordis API, event matrix, client slot,
and tool catalogs on the merged tree.
2026-10-27 14:54:00 +08:00
sjw1231 cf45e35425 chore(release): align fs-patch with the root version and cover its resolution graph
The merged master raised the workspace version to 0.2.1-rc.3; the new
`@deepseek-ai/dsh-fs-patch` package follows it. The package adds one row and
its edges to the dual-release graph, so the install-layout budget records the
measured 316 package(s) x 2790 internal edge(s) = 881,640 unit(s).
2026-10-26 18:22:52 +08:00
sjw1231 d37b2ba52b Merge branch 'master' into feat/apply-patch
Resolves the headless snapshot runner (keeps both the readonly-patch-directory
and cua-script-guidance workspace setups), regenerates the client slot and tool
catalogs with their pairing record, adds the apply_patch tool title to the five
locales master introduced, and refreshes the apply-patch system-prompt pin for
master's subagent guidance change.
2026-10-26 18:01:46 +08:00
sjw1231 81b0bcf3ef feat(tool-fs): make apply_patch an opt-in switch, default off
`tool-fs.applyPatch` now defaults to false instead of deriving from
`write && edit`, so every shipped composition keeps the model request it
had before the tool existed. The `tool-fs` rows that enable `edit`
(dsh-base and the Web standard, ptc, and cordis presets) state
`applyPatch: false` explicitly; changing that one line adds the tool.

The apply-patch snapshot composition enables the switch, the tool catalog
mounts tool-fs with it on so the schema stays documented, and every other
recorded expectation returns to the master baseline.
2026-10-26 17:12:36 +08:00
imccyu 6a19d120c9 Merge master into DSH 0.2.1-rc.4 synchronization branch 2026-10-26 16:18:13 +08:00
Turtle e409f6a7f8 Merge remote-tracking branch 'origin/master' into turtle/take-over-4719-fa0c7f5f8327
# Conflicts:
#	packages/fs/tool-fs-search/tests/integration.spec.ts
2026-10-26 12:56:58 +08:00
_Kerman c51ec65921 docs(fs): clarify glob pruning safeguards and regression cases 2026-10-26 12:39:25 +08:00
_Kerman f9ef03834a fix(fs): bound glob pruning with directory-name filters 2026-10-26 12:04:34 +08:00
_Kerman b1c8c9bbbc perf(fs): prune glob traversal using ripgrep directory filters 2026-10-26 12:04:34 +08:00
_Kerman 12f63eaf89 refactor(fs): resolve search workdir before building argv 2026-10-26 12:04:34 +08:00
_Kerman dfaf756199 docs(fs): make glob benchmark commands work on clean checkouts 2026-10-26 12:04:34 +08:00
_Kerman e8bdbbe823 fix(fs): preserve glob prefix path semantics 2026-10-26 12:04:34 +08:00
_Kerman 7253e123bd test(fs): benchmark glob through Native executor 2026-10-26 12:04:34 +08:00
_Kerman ef284800b9 fix(fs): narrow glob traversal for literal directory prefixes 2026-10-26 12:04:34 +08:00
imccyu 3014b0af0f Merge master into DSH 0.2.1-rc.4 synchronization branch 2026-10-26 01:29:12 +08:00
imccyu 341beb33c0 release(dsh): 0.2.1-rc.4 2026-10-26 00:57:37 +08:00
Turtle 7c385c957c Merge remote-tracking branch 'origin/master' into turtle/take-over-4719-fa0c7f5f8327
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-19-model-facing-goal-tools.i18n.yaml
#	apps/web/tsconfig.json
#	packages/client/ui-tool/README.i18n.yaml
#	packages/client/ui-tool/README.md
#	packages/client/ui-tool/README.zh.md
#	packages/client/ui-tool/src/client/tool/models/raw-tool-call.ts
#	packages/client/ui-tool/tests/diff-card.client.spec.tsx
#	packages/client/ui-tool/tests/terminal-card.client.spec.tsx
#	packages/fs/tool-fs-search/README.i18n.yaml
#	packages/fs/tool-fs/README.i18n.yaml
#	packages/fs/tool-fs/README.md
#	packages/fs/tool-fs/README.zh.md
#	packages/fs/tool-fs/src/sandbox.ts
#	packages/goal/tool-goal/README.i18n.yaml
#	packages/goal/tool-goal/tests/tool-goal.spec.ts
#	snapshots/session/headless.snapshot.ts
#	tsconfig.host.json
2026-10-23 16:46:40 +08:00
imccyu 14f0b2aafe Merge master into DSH 0.2.1-rc.3 synchronization branch 2026-10-23 11:56:34 +08:00
imccyu d02ea370ee release(dsh): 0.2.1-rc.3 2026-10-23 01:11:35 +08:00
07akioni 84edeadc2b feat(i18n): add Spanish French German Russian and Portuguese 2026-10-22 19:53:52 +08:00
sjw1231 cdd7c76f2a Merge branch 'master' into feat/apply-patch
# Conflicts:
#	apps/cli/tests/profiles/headless/tests/expected/subagent-inheritance/parent.expected.jsonl
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/fs/tool-fs/README.i18n.yaml
#	scripts/verify-package-readme-model-experience.ts
#	snapshots/sdk/dynamic-tool-updates/notifications.expected.jsonl
#	snapshots/sdk/dynamic-tool-updates/session.v4.jsonl
#	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/dynamic-tool-prompt-updates/session.v4.jsonl
#	snapshots/session/dynamic-tool-updates/session.v4.jsonl
#	snapshots/session/pi-ai-conversation-updates/session.v4.jsonl
#	snapshots/session/plugin-manager-mcp/session.v4.jsonl
#	snapshots/web/collapse-timing/next-message.expected.md
#	snapshots/web/collapse-timing/verbose.expected.md
2026-10-22 16:23:14 +08:00
sjw1231 7fab3cf976 test: refresh module graph and Web pins for apply_patch
Regenerate docs/module-graph for the fs-patch package, add apply_patch
to the shipped Web composition tool list, and refresh the Web
tool-schema, system-prompt, and collapse-timing pins that CI compares
against the default tool set.

Cover the symbolic-link preflight refusal through a provider lstat
double and the atomic-write parent failure through a regular-file
blocker, so Windows coverage no longer depends on POSIX-only tests.
2026-10-22 15:53:02 +08:00
Yichen Jiang dd568f76de Merge remote-tracking branch 'origin/master' into worktree/composer-image-preupload
# Conflicts:
#	packages/test-support/client-runtime/README.i18n.yaml
2026-10-21 23:17:57 +08:00
sjw1231 1f14903f28 Merge branch 'master' into feat/apply-patch
# Conflicts:
#	apps/cli/tests/web-agent-presets.e2e.ts
#	docs/subsystems/system-prompt.i18n.yaml
#	docs/tool-catalog.i18n.yaml
#	packages/context/agent-instructions/tests/agent-instructions.spec.ts
2026-10-21 20:06:56 +08:00
Yichen Jiang 6dafa66dc6 docs(attachment): state the relaxed default image limits
The default per-image limit is 50 MiB and the default per-side limit is
65,535 pixels, but the admission summaries in the attachment subsystem
page and the attachment-local README still named 20 MiB and 8192 pixels.
The session-controller note on the /api/file byte limit and the tool-fs
note on read_image source caps also named the old 20 MiB maxImageBytes
default.
2026-10-21 18:02:38 +08:00
_Kerman d98025a089 Merge origin/master into xtr/tool-executor-plugins 2026-10-21 18:01:55 +08:00
sjw1231 8f798da97d fix(tool-fs): leave sandbox decisions to providers and bound patch diffs
Drop the preflight sandbox fence. It derived writable roots in the local
process, so under the SSH provider it threw on remote additionalWritableRoots
and compared remote targets against local temp roots; write and edit never
fenced in the tool layer. The provider now refuses a denied operation at
commit, and a commit whose first operation failed without any change rejects
like a preflight refusal so the sandbox escalation path keeps its error code.

Classify FS_ABORTED as unknown: a cancelled remote request rejects while the
provider may still be writing, so no stat comparison can settle it. Document
that a cancelled call receives the registry's abort result like every tool.

Store no diff for creations, matching write, and bound the move source basis
by diffBasisMaxBytes so persisted metadata never holds whole files;
FsMoveOutcome.sourceBefore becomes nullable. Omit deletions from the call
preview and from result diffs without a basis instead of rendering them as
empty creations, and count distinct files in the preview title.

Reject a NUL byte beyond the read sampling window in preflight, name targets
by display path in atomic-write diagnostics, align the apply_patch guidance
with the edit wording and mention delete and move, read the stopped flag and
applied diffs tool-agnostically in the client models, skip the permission-bit
snapshot under root, list fs/delete-intent in the tool catalog, and refresh
the fs-patch description, group README, fs-sandbox summary, and ui-tool README.
2026-10-21 17:21:01 +08:00
07akioni 11295990b5 fix(i18n): cover nested metadata and repair locale CI regressions 2026-10-21 17:00:42 +08:00
sjw1231 59ac56dfdd fix(tool-fs): derive applyPatch from write and edit
A patch creates files like write and updates them like edit, so
applyPatch now defaults to `write && edit` instead of an independent
true. Compositions that disable both text mutation tools lose
apply_patch without naming it, and a user config override of the
tool-fs row cannot bring the tool back; the sdk-minimal and Web
minimal presets drop their explicit applyPatch: false. An explicit
value still overrides the derivation.

Align the fs-patch package version with the 0.2.1-rc.2 root, and add
apply_patch to the standard preset tool list, the subagent-inheritance
expected session, and the Python SDK dynamic-tools snapshot.
2026-10-21 16:18:47 +08:00
07akioni ed783066e6 fix(i18n): complete Japanese plugin metadata and guard locale coverage 2026-10-21 16:14:12 +08:00
_Kerman a53ecb2f3a Merge origin/master into xtr/tool-executor-plugins 2026-10-21 15:56:44 +08:00
_Kerman 38b9a095f3 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/web/tool-web/tests/integration.spec.ts
#	pnpm-lock.yaml
#	scripts/check-workspace-constraints.spec.ts
#	scripts/check-workspace-constraints.ts
2026-10-21 11:22:06 +08:00
_Kerman a9c006f9c3 refactor(agent): own model selection on each agent 2026-10-20 21:09:09 +08:00
sjw1231 8834433444 Merge branch 'master' into feat/apply-patch 2026-10-20 20:25:24 +08:00
sjw1231 2bd9913e2f refactor(apply-patch): drop unrelated changes and redundant prose
Restore files outside the patch feature to their merge-base state: the
invariant-check refactors across acp, session-controller, client,
compaction, agent-loop, agent, session-title, and subprocess, the cast
baseline edit, and the rescope-vendor skip list added during the merge.

Rename tool-fs.enableApplyPatch to applyPatch, matching the read, write,
and edit switches. Remove the unused collectMutationPaths export and the
unconsumed PatchHunk.contextLineIndices field, including its SSH schema
and fixtures. Report preflight refusals and syntax failures directly
instead of padding every phase with outcome, affectedPaths, and
cancelled fields. Add apply_patch to the shipped tool catalog test.

Fold the default-activation Agent Note into the apply_patch file-editing
note and delete it. Delete the guarded-filesystem-mutations upgrade
guide: every change is additive and all FileSystem subclasses live in
this repository. Trim defensive and reviewer-addressed sentences from
the package READMEs, subsystem docs, FileSystem JSDoc, and the Agent
Note, keeping the English and Chinese pairs aligned.
2026-10-20 20:25:24 +08:00
Turtle 1f63dc104d Merge pull request #6550 from deepseek-harness/turtle/tilde-path-expand-34ced8c370ab
fix(fs-local): 展开开头的 ~ 为主目录
2026-10-20 12:38:05 +08:00
_Kerman 7d0301fe05 Merge master into scoped tool executors 2026-10-19 21:53:41 +08:00
_Kerman e9784c073b fix(tools): settle executor calls after unload and validate configuration 2026-10-19 16:32:29 +08:00
_Kerman 3b978adcec test(tools): tidy migrated fixture imports and comments 2026-10-19 16:32:04 +08:00
Turtle 32004176bf fix(fs-local): expand ~ only in requested paths
Directory entry names reach the same display-path helper, so expansion
moves to resolve and lstat. Replacing only the prefix keeps physical
parent traversal; ~\ expands only on Windows.

Refs #6548
2026-10-19 15:53:39 +08:00