Skip to content

release: single source of truth for version + CI release pipeline#89

Merged
fujibee merged 2 commits into
mainfrom
feat/version-sot
Jun 8, 2026
Merged

release: single source of truth for version + CI release pipeline#89
fujibee merged 2 commits into
mainfrom
feat/version-sot

Conversation

@fujibee

@fujibee fujibee commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Closes #84.

Summary

  • Add VERSION at repo root as the canonical release version.
  • package.json (npm) and .claude-plugin/plugin.json (Claude Code plugin marketplace) are derived via scripts/release/sync-version.sh.
  • verify-versions.yml runs sync-version.sh --check on every push/PR — silent drift fails CI before merge.
  • release.yml triggers on v*.*.* tags: validates tag/VERSION match → waits for production environment approval → npm publish --access public --provenance via Trusted Publisher OIDC → cuts GitHub Release.
  • The npm bootstrapper (formerly its own fujibee/agmsg-npm repo) is folded into this repo at bin/agmsg.js. The files whitelist in package.json keeps the tarball at ~8 kB (bin/, README.md, LICENSE only — no scripts/, no db/, no team data).

Supply-chain guards

  • npm Trusted Publisher (OIDC). No NPM_TOKEN secret exists. npmjs.com only accepts a publish that proves via OIDC it came from fujibee/agmsg / release.yml / production environment. Package settings on npmjs.com also require 2FA and disallow tokens.
  • environment: production gates the publish step behind a required reviewer — a compromised tag-push alone cannot ship to npm.
  • npm publish --provenance — GitHub-signed attestation; any tarball lacking provenance is distinguishable on npmjs.com.
  • verify-versions catches hand-edits to package.json / plugin.json that bypass VERSION.

Setup required before first release (one-time)

These cannot be done from a PR — they need repo settings access:

  • npm Trusted Publisher configured on npmjs.com (binding: fujibee/agmsg / release.yml / production, publishing access set to require 2FA and disallow tokens).
  • Create production environment under Settings → Environments and add yourself as required reviewer.
  • Archive fujibee/agmsg-npm repo (point its README here first).

Local flow after this merges

echo 1.0.1 > VERSION
./scripts/release/sync-version.sh
git commit -am "release: 1.0.1"
git tag v1.0.1
git push --follow-tags

Test plan

  • sync-version.sh --check clean against current 1.0.0 (idempotent).
  • sync-version.sh rejects non-semver (v1.0.0, trailing newlines, etc).
  • npm pack --dry-run shows the 4-file tarball: LICENSE, README.md, bin/agmsg.js, package.json.
  • node bin/agmsg.js --version prints agmsg bootstrapper 1.0.0.
  • After merge + environment setup: bump to 1.0.1 in a test push, observe full release flow end-to-end.

fujibee added 2 commits June 8, 2026 09:31
Closes #84. Adds `VERSION` at the repo root as the canonical release
version, with `package.json` and `.claude-plugin/plugin.json` derived from
it via `scripts/release/sync-version.sh`. A `verify-versions` workflow
runs `sync-version.sh --check` on every push to catch silent drift.

The `release` workflow triggers on `v*.*.*` tags. It validates the tag
matches `VERSION`, runs `npm publish --provenance`, and creates a GitHub
Release. It runs in the `production` environment so a required reviewer
can gate publishes.

The npm bootstrapper (formerly in `fujibee/agmsg-npm`) is folded into
this repo at `bin/agmsg.js`. The package.json `files` whitelist keeps
the npm tarball small (bin/, README.md, LICENSE — 8.2kB).
npmjs.com Trusted Publisher binding is set up against this repo /
release.yml / production environment, so the workflow no longer needs
a long-lived NPM_TOKEN secret. The publish step uses npm CLI 11.5+'s
automatic OIDC exchange.

RELEASING.md updated: no required secrets, supply-chain guards now
list Trusted Publisher as the primary auth layer.
@fujibee fujibee merged commit 129b837 into main Jun 8, 2026
1 check passed
@fujibee fujibee deleted the feat/version-sot branch June 8, 2026 01:37
fujibee added a commit that referenced this pull request Jun 10, 2026
Adds two install paths the README didn't cover after the PH-launch
rework:

- **npm / npx** — published since #89 via npm Trusted Publisher (OIDC)
  with SLSA provenance. `npx agmsg` is the lowest-friction path for
  Node-having users.
- **Claude Code plugin marketplace** — `/plugin marketplace add fujibee/agmsg`
  + `/plugin install agmsg@fujibee-agmsg` + `/reload-plugins` + `/agmsg`.
  Verified end-to-end against a fresh Debian-based Claude Code container
  today: the in-CC slash command flow runs the SKILL.md Step 0 bootstrap
  (added in #85) and lands on the same `~/.agents/skills/agmsg/`
  runtime as the direct-script install.

Also surfaces the `bash + sqlite3` prerequisite at the top of Quick Start.
The dogfood revealed that minimal Linux images (Debian slim, etc.) don't
include sqlite3 by default; the bootstrap installer surfaces a clear
error, but it's worth flagging up front. macOS users are unaffected.

The Install section is restructured into subsections (npm, plugin
marketplace, direct script) so each path stands on its own. A note in
the direct-script subsection clarifies that `--cmd` / `--agent-type`
flags are direct-script only — the other paths always install as `agmsg`
with auto-detected agent type.
fujibee added a commit that referenced this pull request Jun 15, 2026
Adds two install paths the README didn't cover after the PH-launch
rework:

- **npm / npx** — published since #89 via npm Trusted Publisher (OIDC)
  with SLSA provenance. `npx agmsg` is the lowest-friction path for
  Node-having users.
- **Claude Code plugin marketplace** — `/plugin marketplace add fujibee/agmsg`
  + `/plugin install agmsg@fujibee-agmsg` + `/reload-plugins` + `/agmsg`.
  Verified end-to-end against a fresh Debian-based Claude Code container
  today: the in-CC slash command flow runs the SKILL.md Step 0 bootstrap
  (added in #85) and lands on the same `~/.agents/skills/agmsg/`
  runtime as the direct-script install.

Also surfaces the `bash + sqlite3` prerequisite at the top of Quick Start.
The dogfood revealed that minimal Linux images (Debian slim, etc.) don't
include sqlite3 by default; the bootstrap installer surfaces a clear
error, but it's worth flagging up front. macOS users are unaffected.

The Install section is restructured into subsections (npm, plugin
marketplace, direct script) so each path stands on its own. A note in
the direct-script subsection clarifies that `--cmd` / `--agent-type`
flags are direct-script only — the other paths always install as `agmsg`
with auto-detected agent type.
fujibee added a commit that referenced this pull request Jun 15, 2026
* docs(readme): document npm and Claude Code plugin install paths

Adds two install paths the README didn't cover after the PH-launch
rework:

- **npm / npx** — published since #89 via npm Trusted Publisher (OIDC)
  with SLSA provenance. `npx agmsg` is the lowest-friction path for
  Node-having users.
- **Claude Code plugin marketplace** — `/plugin marketplace add fujibee/agmsg`
  + `/plugin install agmsg@fujibee-agmsg` + `/reload-plugins` + `/agmsg`.
  Verified end-to-end against a fresh Debian-based Claude Code container
  today: the in-CC slash command flow runs the SKILL.md Step 0 bootstrap
  (added in #85) and lands on the same `~/.agents/skills/agmsg/`
  runtime as the direct-script install.

Also surfaces the `bash + sqlite3` prerequisite at the top of Quick Start.
The dogfood revealed that minimal Linux images (Debian slim, etc.) don't
include sqlite3 by default; the bootstrap installer surfaces a clear
error, but it's worth flagging up front. macOS users are unaffected.

The Install section is restructured into subsections (npm, plugin
marketplace, direct script) so each path stands on its own. A note in
the direct-script subsection clarifies that `--cmd` / `--agent-type`
flags are direct-script only — the other paths always install as `agmsg`
with auto-detected agent type.

* docs(readme): note which install path tracks main vs tagged releases

git clone / setup.sh install from main (always current); the npm package and
Claude Code plugin are cut from tagged releases and can lag. Point readers at
`/agmsg version` to see exactly what they're running (#117 provenance).

* docs(readme): add clone step to Direct script; credit new contributors

- Direct script section now shows the `git clone` + `cd` it assumed, and notes
  it's the path that tracks latest main.
- Community: credit @lucianlamp (native Windows PowerShell helpers, #103) and
  @tatsuya6502 (sandboxed Bash tool support, #106) — merged but uncredited.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single source of truth for plugin / npm version (drift between plugin.json 1.0.0 and npm 0.0.1)

1 participant