Commit Graph
39 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 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 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 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 9b154c04a6 feat(tool-fs): register opt-in patches with canonical results 2026-10-15 02:43:05 +08:00
sjw1231 f4a7cdfef5 feat(tool-fs): use locked move baselines and cache patch roots 2026-10-14 18:29:15 +08:00
sjw1231 b96d527022 docs(fs): document patch execution and regenerate event graph 2026-10-14 17:31:58 +08:00
sjw1231 27a4010098 fix(fs): share error codes and preserve unexpected move failures 2026-10-14 17:22:11 +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 6c0bb63be7 feat(fs): add pure apply_patch parser 2026-09-30 16:39:59 +08:00
Yudong 983b89f9a5 refactor(fs): default unsupported file watching 2026-09-21 12:50:41 +08:00
imccyu 4f55590aea fix(sidebar): correct automatic refresh and watch lifecycles 2026-09-18 23:27:30 +08:00
imccyu 19d1f87492 fix(sidebar): satisfy lint and documentation checks 2026-09-18 23:27:29 +08:00
imccyu 4fef2786a9 chore: regenerate catalogs, dependency lock, and translation hashes 2026-09-07 21:29:49 +08:00
creatixchu 7f4cf99eeb 修正图片路径访问与只读存储 2026-08-24 13:11:04 +08:00
Turtle 93a1b569ac Merge remote-tracking branch 'origin/master' into codex/remove-cordis-catalog-line-numbers
# Conflicts:
#	docs/subsystems/agent-team.i18n.yaml
#	docs/subsystems/approval.i18n.yaml
#	docs/subsystems/client-modules.i18n.yaml
#	docs/subsystems/client-modules.md
#	docs/subsystems/client-modules.zh.md
#	docs/subsystems/code-runtime.i18n.yaml
#	docs/subsystems/commands.i18n.yaml
#	docs/subsystems/commands.md
#	docs/subsystems/commands.zh.md
#	docs/subsystems/compaction.i18n.yaml
#	docs/subsystems/compaction.md
#	docs/subsystems/compaction.zh.md
#	docs/subsystems/core.i18n.yaml
#	docs/subsystems/core.md
#	docs/subsystems/core.zh.md
#	docs/subsystems/credentials.i18n.yaml
#	docs/subsystems/credentials.md
#	docs/subsystems/credentials.zh.md
#	docs/subsystems/feedback.i18n.yaml
#	docs/subsystems/filesystem.i18n.yaml
#	docs/subsystems/goal.i18n.yaml
#	docs/subsystems/http-server.md
#	docs/subsystems/http-server.zh.md
#	docs/subsystems/invariants.i18n.yaml
#	docs/subsystems/invariants.md
#	docs/subsystems/invariants.zh.md
#	docs/subsystems/jobs.i18n.yaml
#	docs/subsystems/llm-streaming.i18n.yaml
#	docs/subsystems/llm-streaming.md
#	docs/subsystems/llm-streaming.zh.md
#	docs/subsystems/permission-presets.md
#	docs/subsystems/permission-presets.zh.md
#	docs/subsystems/persistence.i18n.yaml
#	docs/subsystems/persistence.md
#	docs/subsystems/persistence.zh.md
#	docs/subsystems/plan.i18n.yaml
#	docs/subsystems/plan.md
#	docs/subsystems/plan.zh.md
#	docs/subsystems/sandbox.i18n.yaml
#	docs/subsystems/sandbox.md
#	docs/subsystems/sandbox.zh.md
#	docs/subsystems/schedule.i18n.yaml
#	docs/subsystems/session-projection.i18n.yaml
#	docs/subsystems/session-projection.md
#	docs/subsystems/session-projection.zh.md
#	docs/subsystems/session-query.i18n.yaml
#	docs/subsystems/session-reference.i18n.yaml
#	docs/subsystems/session-reference.md
#	docs/subsystems/session-reference.zh.md
#	docs/subsystems/session-telemetry.md
#	docs/subsystems/session-telemetry.zh.md
#	docs/subsystems/session-title.i18n.yaml
#	docs/subsystems/session.i18n.yaml
#	docs/subsystems/session.md
#	docs/subsystems/session.zh.md
#	docs/subsystems/settings.i18n.yaml
#	docs/subsystems/settings.md
#	docs/subsystems/settings.zh.md
#	docs/subsystems/shell.i18n.yaml
#	docs/subsystems/shell.md
#	docs/subsystems/shell.zh.md
#	docs/subsystems/skills.i18n.yaml
#	docs/subsystems/skills.md
#	docs/subsystems/skills.zh.md
#	docs/subsystems/spill.i18n.yaml
#	docs/subsystems/storage.i18n.yaml
#	docs/subsystems/subagent.i18n.yaml
#	docs/subsystems/subagent.md
#	docs/subsystems/subagent.zh.md
#	docs/subsystems/subprocess.i18n.yaml
#	docs/subsystems/system-prompt.i18n.yaml
#	docs/subsystems/system-prompt.md
#	docs/subsystems/system-prompt.zh.md
#	docs/subsystems/tasks.md
#	docs/subsystems/tasks.zh.md
#	docs/subsystems/terminal.md
#	docs/subsystems/terminal.zh.md
#	docs/subsystems/token-meter.i18n.yaml
#	docs/subsystems/tools.i18n.yaml
#	docs/subsystems/tools.md
#	docs/subsystems/tools.zh.md
#	docs/subsystems/typert.i18n.yaml
#	docs/subsystems/typert.md
#	docs/subsystems/typert.zh.md
#	docs/subsystems/user-interaction.i18n.yaml
#	docs/subsystems/user-questions.i18n.yaml
#	docs/subsystems/user-questions.md
#	docs/subsystems/user-questions.zh.md
#	docs/subsystems/web.i18n.yaml
#	docs/subsystems/workflow.i18n.yaml
#	docs/subsystems/workflow.md
#	docs/subsystems/workflow.zh.md
#	docs/subsystems/workspace.i18n.yaml
#	docs/subsystems/workspace.md
#	docs/subsystems/workspace.zh.md
#	packages/typert/generator/tests/cordis-catalog.spec.ts
2026-08-20 19:48:43 +08:00
pku-xht ad6516933b fix(i18n): close automated review findings 2026-08-18 21:02:50 +08:00
Tianyi Cui a2d0f7f411 refactor: apply repository naming contract
Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
2026-08-13 00:54:38 +08:00
Turtle 0c708cb10d refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
creatixchu a3e448ee5d docs(fs): document bounded byte reads 2026-08-11 12:07:21 +08:00
creatixchu 2b90207770 Merge remote-tracking branch 'origin/master' into feat/read-image-context
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	packages/support/llm-replay/src/index.ts
#	packages/support/llm-replay/tests/llm-replay.spec.ts
2026-08-10 20:25:25 +08:00
creatixchu b07844dd4c Merge branch 'master' into feat/read-image-context
# Conflicts:
#	docs/module-graph.i18n.yaml
#	docs/module-graph.md
#	docs/module-graph.zh.md
2026-08-10 19:01:47 +08:00
ZiyaZhang c969d69f10 Merge latest master into PR branch 2026-08-10 02:10:57 -07:00
Turtle a27efdef36 docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
ZiyaZhang 191c7625a4 Merge master and repair CI for bounded diff basis 2026-08-10 01:18:38 -07:00
creatixchu 1861a3fc7c feat(fs): add a minimal read_image tool over the attachment and fs seams
The model reads a PNG/JPEG/WebP/GIF file, the bytes commit through the
durable attachment lifecycle, and the tool result carries the real
ImageBlock so the image enters context from the next request onward.
FileSystem gains a bounded readBytes primitive (local + E2B providers);
registration is conditional on the attachment store, and a strict
execution gate refuses routes that do not declare image input, so a
text route's durable history stays free of image blocks. llm-replay
models may declare inputModalities, letting keyless ACP snapshots pin
both the sha256-referenced success and the verbatim refusal.

Supersedes the withdrawn route-scoped design of PR #598; the decision
record is .agents/notes/implemented/feature/2026-08-10-minimal-read-image-tool.md.
2026-08-10 15:09:07 +08:00
Turtle f248dc3773 docs: remove line numbers from subsystem catalog links 2026-08-10 11:13:33 +08:00
Tianyi Cui ee7458b2df docs: fix review findings — residual ordinals, hypothetical IPC row, citation-rule amendments
Purge the residual task/phase ordinals review caught ((T2), (queue cut 1)
×3, T6, P-I, 'this cut' ×6 including battery-expansion finds in two
untouched notes and a workflow JSDoc); drop the 'externally logged as
Decision 21' parenthetical and rename the remaining bare decision-21
mentions; mark the gui-layering IPC bridge row as a hypothetical example;
restore the GATE_NOTICE doc-typecheck clause and the py-types 'measured'
provenance; say subprocess-backed in filesystem.md; add the picker note
path. Amend the citations note: merged-PR evidence anchors in Agent Notes
are sanctioned, and the candidate gate patterns gain the four shapes the
sweep missed. All nine touched pairs re-recorded.
2026-08-09 21:10:59 +08:00
Tianyi Cui 25dcd7293c docs: purge chain-of-thought leakage from prose
Delete design-session citations (decision/audit/plan ordinals, stack
positions), change narration, review choreography, and reviewer-addressed
justification from comments, JSDoc, docs, READMEs, Agent Notes, tests, and
generator templates; restate every affected fact as current-state contract
prose. Fix generated docs at their sources and regenerate the catalogs and
cordis-surface regions; re-paste type-equiv blocks; update every bilingual
counterpart and re-record the pairs. Record the citation rule in the
committed-artifact-citations Agent Note.
2026-08-09 21:10:59 +08:00
Tianyi Cui 39d8678a02 docs(fs): enumerate absence observation paths 2026-08-09 17:49:10 +08:00
Tianyi Cui ceba53edd7 fix(fs): observe absence before guarded recreation 2026-08-09 17:43:53 +08:00
Turtle dda02250f5 docs: reserve seam for complete capabilities 2026-08-09 17:26:57 +08:00
Turtle 27ac49e687 docs: define a seam as the (Service, Service provider, Consumer) trio 2026-08-09 17:11:16 +08:00
ZiyaZhang 1a6037c9fb Merge remote-tracking branch 'origin/master' into fs-overwrite-diff-bound-v2
# Conflicts:
#	docs/subsystems/lsp.i18n.yaml
#	packages/fs/fs-local/README.i18n.yaml
#	packages/fs/fs-local/README.md
#	packages/fs/fs-local/README.zh.md
#	packages/fs/fs-local/src/index.ts
2026-08-08 12:20:09 -07:00
Tianyi Cui aa0ca6c836 docs: anchor each subsystem page to its package group; make group READMEs thin tables
core.md read as a type grab-bag: LLM wire vocabulary up front, the agent/loop story buried, and no correspondence to packages/core. It now opens on the packages/core control spine — the package-by-package loop map with a Page column into session/system-prompt/tools/scope — and keeps only what the spine group declares plus the repo-wide patterns: the Agent handle with its delivery/cancellation/interception contracts, the SessionEvent envelope, branded ids, the …Map pattern. The conversation vocabulary (Message/ContentBlock, the model request, adapters — 17 type-equiv blocks) moves to llm-streaming.md, which now declares packages/llm end-to-end; the duplicate ContentBlockMap paste near its seam section folds into the moved section, and the manifest, LINK_MAP, README table rows, website label (Core data structures → Core), and inbound anchors follow.

Every packages/<group>/README pair is now a thin front door in one shape: a why-first intro (bash's seam-pattern-first paragraph rewritten as 'shell execution for the agent'), the package table, and a closing pointer to the owning docs/subsystems page — the bash-style table stays the load-bearing middle. Load-bearing trailing paragraphs relocate rather than vanish: the fs no-timeout rationale becomes a filesystem.md section (both languages), session's four sectioned tables merge into one 12-row table, examples' legacy-bin H2 collapses to a pointer at jsonrpc-demo's README, and design rationale that already lives in an Agent Note or subsystem page is now linked instead of restated. All 40 pair records re-recorded.
2026-08-09 01:32:39 +08:00
Tianyi Cui f7323354bb docs: generate each subsystem's cordis surface into its own page; delete the flat catalogs
Rebuild of the region machinery (PR3) on the post-#904 Typert projection:
renderPageRegion/renderInheritedPage live in dsh-typert-generator beside the
projection; scripts/gen-cordis-catalog.ts owns the curated SERVICE_PAGE /
EVENT_SCOPE_PAGE / SERVICE_WALK_EXEMPTIONS / LINK_MAP partition (fail-loud in
both directions, with the independent Context-merge scan backstopping the
projection's blind spot), spliceRegion, and the guarded pair auto-record.
docs/cordis-catalog/ is deleted: the flat events/services catalogs dissolve
into per-page regions and docs/cordis-catalog/core moves to docs/cordis-api/
with the inherited tier as its own generated page. The partition absorbs the
post-regrouping surface: ctx.typert → invariants.md, ctx.directoryPicker →
workspace.md, skills/* events → skills.md, and the four launcher-provided tui
accessor values join the named exemptions.
2026-08-09 01:31:57 +08:00
Tianyi Cui ba3125234a docs: rename core-data-structures/ to subsystems/
The folder is becoming the home of one-doc-per-subsystem pages (intro +
data structures + cordis services/events), so the name must describe the
whole contract, not just the type-vocabulary third of it. Mechanical
rename rebuilt on current master: every inbound Markdown link, generator
constant, website route, type-equiv manifest path, and spec expectation
moves together; the zh sides of the notes whose prose names the folder
are aligned (子系统) in the same change; touched bilingual pairs
re-recorded; translation-prompt snapshot re-recorded (its example embeds
development.md). Historical Agent Note slugs keep their dated
filenames.
2026-08-09 01:27:09 +08:00