Files
deepseek-harness/docs/module-graph.md
Dudu-0223 ef37ce3b9d refactor(fs): split filesystem seam into provider ctx.fs + policy ctx.fileContext
Implements the split-the-filesystem-seam RFC. ctx.fs shrinks to a text-storage
provider seam (resolve/stat/readText/streamText/writeText/editText with branded
FsTargetKey/FsVersion and an explicit FsWriteExpectation); the new
dsh-file-context package owns the model-facing policy (read windowing,
observed-state, write/edit freshness) as the concrete ctx.fileContext service.

Authorization is now freshness-based rather than full/partial view: a windowed
read records the file version and authorizes a later edit when the file is
unchanged, removing the dead-end where reading lines 100-150 of a large file
could not edit line 120. editText stays a provider primitive so version guard +
literal match + atomic rewrite remain one critical section, and the stale check
runs before matching so a stale edit reports FS_STALE_VERSION. tool-fs injects
fileContext, never reaching around to ctx.fs (the no-bypass contract).
2026-06-26 17:23:18 +08:00

3.3 KiB

Module dependency graph

Inter-package dependencies among the @deepseek-ai/dsh-* harness packages, derived from each package's peerDependencies (the canonical runtime-dependency signal). An edge a --> b means package a depends on package b. Names have the @deepseek-ai/dsh- prefix stripped.

graph TD
  bash --> brand
  llm --> brand
  bash-local --> bash
  fs --> brand
  fs --> llm
  llm-deepseek --> llm
  llm-pi-ai --> llm
  session --> brand
  session --> llm
  system-prompt --> llm
  agent --> brand
  agent --> llm
  agent --> session
  file-context --> fs
  fs-local --> fs
  llm-replay --> llm
  llm-replay --> session
  session-persistence --> session
  invariants --> agent
  invariants --> llm
  invariants --> session
  session-persistence-jsonl --> session
  session-persistence-jsonl --> session-persistence
  session-persistence-sqlite --> session
  session-persistence-sqlite --> session-persistence
  tools --> agent
  tools --> llm
  tools --> system-prompt
  ui-stdio --> agent
  ui-stdio --> llm
  ui-stdio --> session
  acp --> agent
  acp --> llm
  acp --> session
  acp --> session-persistence
  acp --> tools
  agent-loop --> agent
  agent-loop --> llm
  agent-loop --> session
  agent-loop --> session-persistence
  agent-loop --> system-prompt
  agent-loop --> tools
  tool-bash --> agent
  tool-bash --> bash
  tool-bash --> llm
  tool-bash --> tools
  tool-fs --> file-context
  tool-fs --> fs
  tool-fs --> llm
  tool-fs --> system-prompt
  tool-fs --> tools
  agent-core --> agent
  agent-core --> agent-loop
  agent-core --> invariants
  agent-core --> llm
  agent-core --> session
  agent-core --> system-prompt
  agent-core --> tool-bash
  agent-core --> tools
  acp-agent --> acp
  acp-agent --> agent-core
  acp-agent --> session-persistence-jsonl
  stdio-agent --> agent
  stdio-agent --> agent-core
  stdio-agent --> session
  stdio-agent --> session-persistence-jsonl
  stdio-agent --> ui-stdio
Package Depends on
brand
bash brand
llm brand
bash-local bash
fs brand, llm
llm-deepseek llm
llm-pi-ai llm
session brand, llm
system-prompt llm
agent brand, llm, session
file-context fs
fs-local fs
llm-replay llm, session
session-persistence session
invariants agent, llm, session
session-persistence-jsonl session, session-persistence
session-persistence-sqlite session, session-persistence
tools agent, llm, system-prompt
ui-stdio agent, llm, session
acp agent, llm, session, session-persistence, tools
agent-loop agent, llm, session, session-persistence, system-prompt, tools
tool-bash agent, bash, llm, tools
tool-fs file-context, fs, llm, system-prompt, tools
agent-core agent, agent-loop, invariants, llm, session, system-prompt, tool-bash, tools
acp-agent acp, agent-core, session-persistence-jsonl
stdio-agent agent, agent-core, session, session-persistence-jsonl, ui-stdio