Why this matters
The add-in API documentation has an inline example, but contributors cannot download and load a checked-in working module. A small real example shortens the path from reading the API to making a first contribution.
Scope
- Add
examples/addins/height-tools.mjs.
- Make its no-argument command work on the Starter plate by resolving exactly one
height parameter and updating it through api.document.transact.
- Return a clear error if the parameter is missing or ambiguous.
- Link the example and loading instructions from the add-in documentation.
- Exercise the real example module from the existing add-in smoke instead of duplicating its implementation inside the test.
Relevant files
examples/addins/height-tools.mjs
docs/addin-api.md
scripts/studio-addin-api-smoke.ts
Acceptance evidence
- Loading registers the manifest but grants no document access before approval.
- Enabling the add-in registers one namespaced command.
- Running the command changes the Starter plate height through a typed transaction.
- The exact rebuilt bounds and volume change by the expected amount.
- Disable and unregister remove commands and listeners.
- The documentation names the trust boundary: local add-ins are trusted browser code, not a sandbox.
Test commands
npm run build
npm run smoke:addin-api
npm run ci:gate
Contribution size
S: one example module, a documentation link, and focused lifecycle assertions.
Maintainer response expectation
Comment before starting. A maintainer will confirm scope and ownership before implementation; review will focus on the listed acceptance evidence.
Why this matters
The add-in API documentation has an inline example, but contributors cannot download and load a checked-in working module. A small real example shortens the path from reading the API to making a first contribution.
Scope
examples/addins/height-tools.mjs.heightparameter and updating it throughapi.document.transact.Relevant files
examples/addins/height-tools.mjsdocs/addin-api.mdscripts/studio-addin-api-smoke.tsAcceptance evidence
Test commands
Contribution size
S: one example module, a documentation link, and focused lifecycle assertions.
Maintainer response expectation
Comment before starting. A maintainer will confirm scope and ownership before implementation; review will focus on the listed acceptance evidence.