deepseek-harness/docs
Tianyi Cui 743eb9ea09 fix(fs): resolve paths against the caller's session cwd
The ACP bridge gives each session its own workspace (SessionHeader.cwd), and
dsh-tool-bash already resolves a bash workdir against it. But ctx.fs.resolve(path)
took no caller context and dsh-fs-local resolved every relative path against a
fixed config.cwd (process.cwd() at plugin load) — so in the ACP demo `write
foo.txt` and `bash cat foo.txt` hit different directories the moment an editor
opens any project other than the server's launch dir.

Thread the session cwd into resolution, mirroring dsh-tool-bash: widen
FileSystem.resolve to resolve(path, opts?: { cwd?: string }); dsh-fs-local bases
a relative path on opts.cwd ?? config.cwd (absolute paths ignore it); the
read/write/edit tools derive it via a shared sessionCwd(exec) helper
(exec.agent?.session.header.cwd). The provider stays free of dsh-agent/dsh-session
— the tool projects exec → cwd and hands over a plain string, per the
explicit-at-seams convention. Backward compatible (the arg is optional).

Tests: fs-local resolve(path,{cwd}) bases relative on the passed cwd / ignores it
for absolute; tool integration writes/reads/edits in a session cwd != config.cwd
and verifies the file on disk (proven to fail on the pre-fix no-cwd path). Fakes
that stood in a bare {session:{}} now carry a header so sessionCwd doesn't throw.
RFC in docs/rfc/implemented/architecture/2026-07-02-fs-per-session-cwd.md.
2026-07-02 18:29:29 +08:00
..
cookbook feat(tool-todo): add the model-facing todo_write tool 2026-06-29 10:30:52 +08:00
cordis-catalog fix(fs): resolve paths against the caller's session cwd 2026-07-02 18:29:29 +08:00
core-data-structures fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00
i18n docs(i18n): address round-2 terminology review 2026-07-01 23:08:45 +08:00
postmortem Fix doc cross-links for the hierarchy; add package-path + shape gates 2026-06-20 23:12:14 +08:00
rfc fix(fs): resolve paths against the caller's session cwd 2026-07-02 18:29:29 +08:00
tool-catalog docs(tool-catalog): register dsh-tool-fs in the boot manifest 2026-07-02 09:30:04 +08:00
AGENTS.md docs(rfc): classify RFCs by kind via path-encoded subdirectories 2026-06-20 22:29:45 +08:00
architecture.md fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00
development.md docs: address review sync gaps 2026-07-01 12:56:13 +08:00
module-graph.md fix(fs): address review — rename to dsh-fs-policy, fs/*-intent events, RFC currency, ENOTDIR 2026-07-02 03:12:38 +08:00