Scaffold the plugin package so DSH loads it #1
Labels
No labels
NaNs
area/audio
area/build
area/docs
area/dsh
area/engine
area/security
area/ui
needs-operator
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-whale-noises#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Create the smallest installable DSH plugin shell: a Host half that does nothing (zero inference), a browser bundle that registers and exports
apply, and the tooling to install and check it.Scope
package.json— namedsh-whale-noises, version0.0.0,type: module,main: lib/index.js(must resolve),exportsfor.,./client(required fordsh.client),./cordis.patch.yml;files; keywords;dsh.bundle.patch: ./cordis.patch.yml;dsh.client: { platform: 'web', inject: [...] };engines: { node: '>=22.6', dsh: '>=0.2.1-rc.2 <0.3.0-0' }; peerDependencies on the DSH packages actually imported.cordis.patch.yml—insertthedsh-whale-noisesLoader row with empty config.lib/index.js— Host half exportingapply() {}only. No services, no routes, no model bytes.lib/client.js—window.__ModuleLoader__.load({ id: 'dsh-whale-noises', factory: (require) => { ... module.exports = { apply, inject: ['slots', 'locale', 'sessions'] } } }). Hand-written, no bundler (decision D2).require('react')only, from the baseline module table.scripts/dev-link-dsh.mjs— symlink the running DSH peers intonode_modulesforlink:installs (pattern from dsh-resend-mcp / dsh-gitea).npm run check—node --checkon both lib files +node --test test/*.test.mjs+npm pack --dry-run.test/manifest.test.mjs— assert name/patch/client/engines declarations and that the client bundle registers under the right id (loader stub)..gitignore—node_modules/,*.tgz, local logs.Acceptance
dsh plugin --profile web add /home/dsh/Projects/dsh-whale-noisessucceeds; the plugin appears in Settings → Plugins and can be enabled.npm run checkgreen;npm pack --dry-runcontains only intended files.Notes
dsh-gitea/lib/client.js:1; required fields verified indocs/research/dsh-plugin-api.md§1.dsh.compatibility.dshis documentation only —engines.dshis the enforced gate.Scaffold landed in
5c92e7f.package.jsonwithdsh.bundle.patch,dsh.client.platform: web,exports[./client],engines.dsh >=0.2.1-rc.2 <0.3.0-0;cordis.patch.ymlinserts the row.lib/index.js:apply() {}only — zero inference.src/ESM →scripts/build-client.mjs(esbuild) → loader-wrappedlib/client.js, generated (D2 amended: esbuild is now the sanctioned build).scripts/dev-link-dsh.mjs,.gitignore,icon.svg,locale/en.json.npm run checkgreen: 11 tests (manifest, loader stub executes the real bundle, bundle safety, apply registration, settings render) +npm pack --dry-run(8 files, nosrc/, no tests).Pending verification (operator): the sandbox cannot write
~/.dsh, so the profile install failed withEACCESonprofiles/web/package.json.lock. To finish the acceptance:then reload the page / toggle the plugin in Settings → Plugins. Expected: Whale Noises entry appears; no console errors. Leaving this open until that is confirmed.
Delivered: plugin package loads in the web profile, client bundle is built,
npm run checkgreen.