packages/<name>/
├── package.json # name = dsh-<name>, dsh.bundle, optional dsh.client
├── cordis.patch.yml # bundle patch; inserts at least the dsh-<name> row
├── lib/index.js # Host half (Cordis plugin, ESM)
├── lib/client.js # optional browser half (window.__ModuleLoader__ bundle)
├── locale/{en,zh}.json # meta.title / meta.description shown on the Plugins page
├── icon.svg
├── test/*.test.js # node:test, where a package has tests
└── README.md
Most packages are plain ES modules with no build step. Four packages build artifacts:
canvas: rebuild the sandbox runtime chunk withpnpm --filter dsh-canvas build(prepackruns it automatically).diagram-preview: rebuild lazy renderer chunks withpnpm --filter dsh-diagram-preview buildafter updating diagram dependencies.pi-tools: browser half lives atclient.js; rebuild Go runners withpnpm --filter dsh-pi-tools build:runner:allafter changingrunner/or Pi dependencies.message-actions: buildlib/client.jsfromsrc/client.jswithpnpm --filter dsh-message-actions build(prepackruns it automatically).
pnpm install
pnpm run check # oxlint + validate.mjs + node:testpnpm run lint runs Oxlint with .oxlintrc.json and scripts/oxlint-plugin.mjs (--deny-warnings):
correctnessandsuspiciousare errors.dsh/no-comments: comments are disallowed except shebangs, top-of-file license headers, single-line URLs, and single-line// external: <reason>notes for external dependency, platform, or DSH host constraints we cannot reshape.dsh/no-suppression-comments:oxlint-disable,eslint-disable,@ts-ignore,@ts-expect-error, and@ts-nocheckare disallowed.dsh/no-legacy-compat: removed pre-release compatibility tokens are disallowed.
pnpm run validate checks:
- Package name
dsh-<directory>, valid version,repository.directory,type: "module",keywordscontainingdsh-plugin,engines.dsh, existingfilesentries, and no internal design docs (DESIGN.md,ARCHITECTURE.md,PASEO-PARITY.md). dsh.bundle.patchexists and inserts a row named after the package;exportsresolve to files;./clientparity and__ModuleLoader__id matchpkg.name.locale/en.jsonandlocale/zh.jsonexist with identicalmetakeys (title,description).- Full parity across
packages/*,apps/docs/lib/plugins.ts,apps/docs/content/docs/plugins/*.mdx,apps/docs/content/docs/plugins/meta.json,README.md, andREADME.zh.md.
dsh plugin --profile web add "link:$PWD/packages/model-reference"pnpm run docs:dev
pnpm run docs:typecheck
NEXT_PUBLIC_BASE_PATH=/dsh-plugins pnpm run docs:buildWhen adding a package, register it in apps/docs/lib/plugins.ts, create apps/docs/content/docs/plugins/<name>.mdx, add it to apps/docs/content/docs/plugins/meta.json, and update README.md and README.zh.md.