Development

August 29, 2026 ยท View on GitHub

Repository setup

Use a supported Node.js version and the pinned pnpm release:

pnpm install --frozen-lockfile
pnpm typecheck
pnpm test
pnpm build

Useful commands:

CommandResult
pnpm devStarts the standalone Vite client for UI development
pnpm typecheckChecks Host and browser TypeScript projects
pnpm testRuns the Vitest suite once
pnpm test:watchRuns Vitest in watch mode
pnpm buildRebuilds Host, standalone client, and Harness client injection
pnpm build && pnpm packRebuilds all package outputs, then creates the installable .tgz; pnpm pack alone does not build

The standalone Vite page does not invent Host capabilities. File, search, mutation, and terminal operations require the plugin to be loaded by Harness.

Source layout

src/
|-- harness-client/  # conversation.view contribution, composer, theme and locale bridge
|-- host/            # Cordis providers, routes, filesystem, search, terminal, mutation backend
|-- client/          # React/CodeMirror/xterm workbench
`-- shared/          # versioned JSON-safe Host/browser contracts
tests/
|-- host/
`-- client/
examples/           # reference bundle patch; installation applies the real patch automatically

pnpm build produces three relevant output surfaces:

  • dist/host/ - the Cordis Host plugin;
  • dist/client/ - the standalone/embedded workbench assets;
  • dist/harness-client/ - the native Harness view contribution.

The committed dist/ tree is the Git-install surface. After changing source code, run pnpm build and include the refreshed output in the same change. CI rebuilds these targets and verifies that committed dist/ is synchronized before accepting the change.

Test against the Harness baselines

Start with the current target: DeepSeek Harness dsh-v0.1.2-alpha.1, source commit cd5ef8148158c3a752a658978873241fdf8e2bbc:

git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
git checkout dsh-v0.1.2-alpha.1 # cd5ef8148158c3a752a658978873241fdf8e2bbc
pnpm install --frozen-lockfile
pnpm build

The plugin also keeps a legacy connection-authorisation fallback for dsh-v0.1.1-rc.2 (b150a551b8d465e31e418e1b2eaf5e79bbb7d28e). It has passed the same isolated real-Harness install and web smoke; repeat that sequence whenever changing the gateway or Host lifecycle:

git checkout dsh-v0.1.1-rc.2 # b150a551b8d465e31e418e1b2eaf5e79bbb7d28e
pnpm install --frozen-lockfile
pnpm build

Build and pack this repository:

pnpm install --frozen-lockfile
pnpm build
pnpm pack

Then, from the Harness checkout, install the generated archive with an absolute path:

pnpm dsh plugin --profile web add "/absolute/path/dsh-code-ide-*.tgz"
pnpm dsh plugin --profile web list --depth 0
pnpm dsh --profile web --dump-config
pnpm dsh web

Use the same DSH_HOME for installation, inspection, and startup. Installation applies the package's dsh.bundle.patch automatically; do not also copy the example patch into a user patch.

For a faster local loop, build this repository and install its absolute directory instead of an archive:

pnpm dsh plugin --profile web add "/absolute/path/dsh-code-ide"

Rebuild the plugin, re-add the same source, and restart Harness after changing Host or injected-client code. The alpha path calls the newer rejection contract when it is available; the rc2 path must continue to fall back to its legacy local-request trust check. Keep both paths covered by focused tests and a real Harness smoke before making compatibility claims.

Change discipline

  • Keep the default Harness chat path untouched; IDE behavior belongs behind the optional view.
  • Keep shared wire contracts versioned and JSON-safe.
  • Treat the browser as untrusted. Path, workspace, version, and size checks must remain on the Host.
  • Do not advertise a structural operation unless a complete containment backend proves it.
  • Add focused regression tests for lifecycle, conflict, cancellation, drag/drop, persistence, or security-boundary changes.
  • Prefer lazy language chunks and bounded background work to keep the plugin lightweight.

CI repeats install, typecheck, test, build, and pack on Windows and Ubuntu, verifies the committed dist/ against a clean build, and uploads the generated package as a workflow artifact.