Testing and checks¶
CI calls the organisation's reusable plugin workflow on the boxd-public runner. Its check job runs the plugin's checks, docs builds this site with mkdocs build --strict, actionlint lints every workflow and install installs the pushed commit in OpenCode. A pack job runs npm run test:pack, and the required status check, ci, needs them all.
Locally¶
npm ci --ignore-scripts
npm run check
python3 -m venv .venv
.venv/bin/pip install -r docs/requirements.txt
.venv/bin/mkdocs build --strict
npm run check runs, in order:
biome check .for lint;tsc -p tsconfig.jsonfor the type check;npm run bundle, which rebuilds the committeddist/index.js;npm test, the unit, host and fixture tests;npm run test:pack, which installs the packed tarball and starts OpenCode 2.4.1 with it;plugin-kit check, the T0, T1 and forbidden-pattern gate;plugin-kit docs --check, which fails when a generated section drifts from the manifest.
CI also runs npm run bundle && git diff --exit-code dist/ and fails when the committed bundle is stale.
The manifest first¶
Change capabilities in package.json before the code: a method, source or action, with its class, operations, accounts and cost. Then the handler in src/handlers/, the provider call in src/provider/, and the tests. The register refuses a handler the manifest does not declare, and a declared method without one.
Generated docs¶
Generated sections sit between <!-- generated:<section> --> and <!-- /generated:<section> -->. Edit the manifest, then run:
npm run check fails when a section drifts. The five files that carry generated sections are README.md, docs/capabilities.md, docs/configuration.md, docs/accounts.md and docs/automations.md.
Fixtures¶
fixtures/conformance.json is the plugin's evidence to the conformance kit. This repository's provider is synthetic, so npm run fixtures rebuilds the recording from invented people, meetings and sign-ins, and test/fixture.test.ts replays every recorded answer through the handlers so the fixture cannot drift. With real accounts, record instead:
npx plugin-kit record redacts credentials, emails, phone numbers and home directories before it writes.
More¶
CONTRIBUTING.md has the commit and pull request conventions.