Files
deepseek-harness/packages/experimental/webworker-runtime/src/storage/paths.ts
T
imccyu f47b1ecac2 feat(webworker): browser worker host runtime and the vfs image packer
Two private experimental packages run the whole harness tree inside one
dedicated Web Worker. dsh-experimental-webworker-runtime owns the in-memory
VFS (BigInt stats with per-path identity and strictly increasing mtimes),
the CommonJS wrapper loader over a lazily-evaluated builtin table whose
shims typecheck against Node's own module types, the postMessage tunnel
speaking plain HTTP, the AsyncLocalStorage runtime, and the worker
assembly. dsh-experimental-webworker-packer lowers every module body at
pack time against the shared wrapper contract, sweeps the profile closure
by static reachability, and writes a deterministically gzip-compressed tar
the worker inflates through the browser's native DecompressionStream while
it downloads.
2026-08-21 20:35:32 +08:00

24 lines
857 B
TypeScript

/**
* Virtual root of the worker host's in-memory filesystem. Kept
* in one module so the process shim, the path/os shims, and the VFS image
* collector cannot drift apart.
*/
/** Virtual filesystem root; `process.cwd()` and every absolute path start here. */
export const DSH_ROOT = '/dsh'
/** `$DSH_HOME`: durable-state directory inside the image. */
export const DSH_HOME = `${DSH_ROOT}/home`
/** Flat, symlink-free package tree resolved by the worker module loader. */
export const DSH_NODE_MODULES = `${DSH_ROOT}/node_modules`
/** Directory holding the composed cordis.yml and the agent-preset tree. */
export const DSH_CONFIG = `${DSH_ROOT}/config`
/** Default (empty) workspace directory. */
export const DSH_WORKSPACE = `${DSH_ROOT}/workspace`
/** Temporary directory reported by `os.tmpdir()`. */
export const DSH_TMP = `${DSH_ROOT}/tmp`