Grilling: packaging and distribution #6

Closed
opened 2026-10-03 13:44:14 +00:00 by haylan · 1 comment
Owner

Map: #1

Question

Given the verified plugin loading mechanism: how is the plugin packaged and installed (local path under ~/.config/opencode/plugins vs published npm package vs Gitea package registry), build output (ESM/CJS, types), package name, plugin id, and TypeScript/tsconfig/Prettier baseline for the repo?

Map: #1 ## Question Given the verified plugin loading mechanism: how is the plugin packaged and installed (local path under ~/.config/opencode/plugins vs published npm package vs Gitea package registry), build output (ESM/CJS, types), package name, plugin id, and TypeScript/tsconfig/Prettier baseline for the repo?
haylan added the wayfinder:grilling label 2026-10-03 13:44:14 +00:00
haylan added a new dependency 2026-10-03 13:44:43 +00:00
haylan added a new dependency 2026-10-03 13:44:43 +00:00
haylan self-assigned this 2026-10-03 14:47:43 +00:00
Author
Owner

Resolved with the user. Glossary in CONTEXT.md (added: Release).

  • Channel: Gitea npm registry https://git.arthurerlich.de/api/packages/haylan/npm/; consumers map @haylan:registry=... in .npmrc.
  • Names: package @haylan/opencode-fastcrw, plugin id fastcrw.websearch, provider id fastcrw.
  • Build: TypeScript compiled with plain tsc to dist/ (ESM + .d.ts), "type":"module", exports["."] -> dist/index.js. No bundler.
  • Dependency: @opencode/plugin in dependencies (per docs). Build-time check of what npm install pulls in (peers: solid-js, @opentui/*); if heavy, move to peer + dev.
  • Toolchain: strict TS, ES2022, NodeNext, engines.node >=20; Prettier semi:false, printWidth:100; scripts build, format, check.
  • Versioning: CHANGELOG.md per Keep a Changelog 1.1.0. package.json carries a dev version (0.0.0-dev); the release pipeline rewrites it in the CI workspace to the latest changelog heading (ignoring [Unreleased]), never committed back.
  • Release workflow: Gitea Action, workflow_dispatch only, on main. npm ci + npm run build, then a dependency-free Node script in scripts/ builds the tarball, GETs to check the version, skips with success if it exists, else PUTs to the registry API. No npm publish. Auth via Actions secret; runtime check that the job token has package-write, else a write:package secret. A runner exists. The workflow YAMLs and script are build steps for the spec.
  • Risk to verify: opencode's installer may not honour .npmrc scope mapping when installing by name; fallback is tarball or local path.
  • Repo: main protected (done: initial commit pushed, direct push blocked, 0 approvals, no force-push); changes via PR; Conventional Commits.
Resolved with the user. Glossary in CONTEXT.md (added: Release). - **Channel:** Gitea npm registry `https://git.arthurerlich.de/api/packages/haylan/npm/`; consumers map `@haylan:registry=...` in `.npmrc`. - **Names:** package `@haylan/opencode-fastcrw`, plugin id `fastcrw.websearch`, provider id `fastcrw`. - **Build:** TypeScript compiled with plain `tsc` to `dist/` (ESM + `.d.ts`), `"type":"module"`, `exports["."]` -> `dist/index.js`. No bundler. - **Dependency:** `@opencode/plugin` in `dependencies` (per docs). Build-time check of what `npm install` pulls in (peers: solid-js, @opentui/*); if heavy, move to peer + dev. - **Toolchain:** strict TS, ES2022, NodeNext, engines.node >=20; Prettier `semi:false`, `printWidth:100`; scripts `build`, `format`, `check`. - **Versioning:** `CHANGELOG.md` per Keep a Changelog 1.1.0. `package.json` carries a dev version (`0.0.0-dev`); the release pipeline rewrites it in the CI workspace to the latest changelog heading (ignoring `[Unreleased]`), never committed back. - **Release workflow:** Gitea Action, `workflow_dispatch` only, on `main`. `npm ci` + `npm run build`, then a dependency-free Node script in `scripts/` builds the tarball, `GET`s to check the version, skips with success if it exists, else `PUT`s to the registry API. No `npm publish`. Auth via Actions secret; runtime check that the job token has package-write, else a `write:package` secret. A runner exists. The workflow YAMLs and script are build steps for the spec. - **Risk to verify:** opencode's installer may not honour `.npmrc` scope mapping when installing by name; fallback is tarball or local path. - **Repo:** `main` protected (done: initial commit pushed, direct push blocked, 0 approvals, no force-push); changes via PR; Conventional Commits.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Depends on
#2 Research: verified opencode v2 plugin API
haylan/fastcrw-opencode-websearch
Reference: haylan/fastcrw-opencode-websearch#6