Docs menu

Integrations

LayerFS × DSH

LayerFSandDSH

dsh-layerfs is a plugin bundle for DeepSeek Harness (dsh). Agents in a dsh session work on a LayerFS project from bash, through short Node scripts that use the JavaScript SDK: they fork Branches, test them in Sandboxes, and merge and publish. It changes no dsh code.

previewLayerFS JS SDK 0.1.7 · dsh webdesign: issue #346

A dsh session and its LayerFS tab, drawing each agent's Branches, Commits and merges.

What it adds

Bash environment

Every bash call in a session bound to a project gets the project, the SDK and a trace file per agent (DSH_LAYERFS_*).

LayerFS tab

Beside Chat and Trajectory: the project terminal, Branches and Sandboxes, History and Files, played in step with the run, subagents included.

Minimalist preset

Bash, subagents and compaction, with an SDK cheat-sheet and the working rules: one Workspace per agent, only the main agent publishes.

Mock model and demos

Scripted runs against a real LayerFS project, or the simulator, with no API key.

How it works

  1. dsh sessionagents, subagents, bash
  2. layerfs-hostbash environment, records
  3. LayerFS JS SDKshort Node scripts
  4. Store and daemonone Linux host

Each finished SDK call becomes a plugin:layerfs/call record in the calling agent's own session, and the client plugin reads those records back to draw the tab. Subagents are named by the label their parent gave them.

Demos

The dsh-layerfs-demo bundle adds a mock model, "LayerFS mock · …", that is explicitly not a language model: it replies with scripted calls to the preset's own tools, and dsh runs them for real against a LayerFS project (or the simulator, with no Docker). No API key is needed.

DemoAgentsShows
tourrootfs Commits, a Sandbox that installs, fails lint, builds and serves, a fork from a Commit, two publishes
parallelroot + 2two subagents on their own Branches; the root publishes one and asks the other to merge main in first
conflictsroota commit Conflict fixed in the Workspace, a merge Conflict fixed by making the Branches agree
mergeroota clean stale commit, a commit Conflict, merge into a new Branch, a merge Conflict, publish
sandboxrootone Sandbox with two Workspaces, a background build, and the MountsActive, Busy and Dirty refusals
agentsroot + 5five agents, 62 bash calls: stale merges, .lww, a same-line Conflict, a dev server, merge, publish and blame

Three more replay recorded application runs on Live LayerFS only: shop, depot and crew.

Install

You need Node 22.19 or newer, pnpm and Docker; a dsh checkout beside the LayerFS repository (or DSH_SOURCE set to one); and a LayerFS runtime image digest with a built Linux layerfs-daemon.

1. Install and build the bundle:

cd dsh && pnpm install && pnpm run build

2. Add it to the dsh profile's package.json ($DSH_HOME/profiles/<profile>/), then run pnpm install there:

{
  "dependencies": { "dsh-layerfs": "link:/path/to/layerfs/dsh/packages/dsh-layerfs" },
  "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-layerfs"] } }
}

3. Give the host plugin its deployment settings in the profile's cordis.patch.yml:

- id: layerfs-host
  config:
    image: sha256:…          # LayerFS runtime image digest
    daemon: /path/to/layerfs-daemon
    # docker: /var/run/docker.sock   (default)

Keep its home and traceDir in the OS temp area (the default): bash calls in Workspace Write mode may only write there.

4. Start dsh web (pnpm dsh web with DSH_HOME set), open the LayerFS panel, Init a workspace and start a "New LayerFS session".

Reference

NameWhat it holds
DSH_LAYERFS_PROJECTThe project the session is bound to, with the deployment settings.
DSH_LAYERFS_SDK, DSH_LAYERFS_OPERATORFile URLs of the SDK and its operator. The SDK reads DSH_LAYERFS_* as fallbacks for its own LAYERFS_* settings.
DSH_LAYERFS_TRACEThe agent's trace file; the bash call id is the trace step.
/layerfsThe host plugin's web route, behind dsh's own connection checks: status, projects, Init jobs, a session's or project's state and trees.

Limits

  • Only dsh web is checked. dsh desktop serves the same web client but was not tested; the headless profile has no preset registry, so the preset is not offered there.
  • A session's project is fixed at its first bash call that uses it.
  • File trees shown in the tab are bounded: 4,000 entries, 128 KB per file, 8 MB in all.
  • Everything else follows Platform and limits: Store calls need Linux and a local filesystem.