Commit Graph
13 Commits
Author SHA1 Message Date
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 e91ee0fb89 chore(release): align fs-patch with the 0.2.1-rc.4 root version 2026-10-27 15:26:32 +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 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
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
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
sjw1231 e85ef216bc docs: record implemented apply_patch decisions and deferred evaluation 2026-10-16 12:04:27 +08:00
sjw1231 e2f1208bcf Merge origin/master into feat/apply-patch
Regenerate config/tool/module/event catalogs, Cordis API and client slot catalogs; re-record reviewed bilingual hashes instead of merging generated bytes.

Accept deleted filesystem invariant companions. Master has no replacement event-invariant registration; keep delete-intent in typed events, policy guards, and behavior tests.

Adopt master workspace-changes intent waterfalls and tool-execution recorder association, add a prepended delete-intent listener that delegates before capture, remove argument parsing and the fs-patch dependency, and retain the real-tool Review matrix.

Keep master filesystem mutation-result metadata and tool switches alongside opt-in apply_patch. Await current-directory resolution in plan and no-follow preflight; store patch diffs as processPath. Adapt native/PTC fixtures to the supported modes.

Preserve client patch diffs and stopped states with master partial arguments and absolute navigation. Use master's rewritten ProviderEditor, including its remaining repeated model validation.

Regenerate the lockfile with pnpm install and align the new fs-patch package version. Clean retired package build outputs. Update exact rescope exceptions for verified preset and event identifiers from master; old package names remain rejected.
2026-10-16 11:51:43 +08:00
sjw1231 ab54c18dd2 feat(fs): add guarded patch delete and move operations 2026-10-14 16:22:22 +08:00
sjw1231 6368b5a564 feat(fs): apply patch hunks to LF-normalized text 2026-10-14 15:21:27 +08:00
sjw1231 e5d0af6bce fix(fs): align patch header diagnostics and filesystem reference 2026-10-14 15:09:30 +08:00
sjw1231 88f5aa1d43 fix(fs): avoid quadratic whitespace trimming in patch parser 2026-10-08 14:33:25 +08:00
sjw1231 6c0bb63be7 feat(fs): add pure apply_patch parser 2026-09-30 16:39:59 +08:00