This repo publishes two packages to npm in lock-step:
@sentry/dotagents— the CLI and host library (orchestratesagents.toml).@sentry/dotagents-lib— the reusable core (SKILL.md loading, source resolution, trust validation).
Both always carry the same version. @sentry/dotagents depends on ^X.Y.Z of @sentry/dotagents-lib; pnpm rewrites the workspace:^ reference to the concrete range at pack time.
Releases are driven by getsentry/craft via the release.yml workflow.
- Trigger
Releasefrom the GitHub Actions tab. Pick a version (auto,major,minor,patch, or an explicit semver). - Craft runs
node scripts/bump-version.mjs <new-version>, which updates theversionfield in all threepackage.jsonfiles (root,packages/dotagents,packages/dotagents-lib) so they stay in lock-step. - CI builds both packages, packs both tarballs into the
npm-packageartifact, and runsscripts/verify-pack.mjsto confirm:- The host's published
package.jsoncontains noworkspace:references. dependencies["@sentry/dotagents-lib"]is a concrete range matching the lib's actual version.- The unpacked CLI runs end-to-end against the unpacked lib.
- The host's published
- Craft has two
npmtargets in.craft.yml, each filtered to one tarball viaincludeNames. Targets run in declared order:@sentry/dotagents-libfirst, then@sentry/dotagents. By the time the host's publish starts, the lib is already on the registry, so an end-usernpm install @sentry/dotagentsmid-release will always resolve. - Craft tags the commit and creates the GitHub release.
A consumer running npm install @sentry/dotagents must install a published version of the lib. If the lib were unpublished or out-of-sync, the install would either fail or pull a mismatched pair. Three guardrails:
- Lock-step versions.
bump-version.mjsupdates bothpackage.jsons atomically, so versions can't drift mid-bump. - Pack-time invariants.
scripts/verify-pack.mjsfails CI if the host's tarball still hasworkspace:references or ifdependencies["@sentry/dotagents-lib"]doesn't match the lib's actual version. - Ordered publish. Two filtered
npmtargets in.craft.yml(lib first, host second) eliminate the few-second window where one is on npm without the other. Pattern modeled ongetsentry/junior.
node scripts/bump-version.mjs 1.14.0Updates all three package.jsons. Don't bump them by hand — the script is the source of truth.
If a release ever publishes the host without the lib (or vice versa), or with a stale dependencies["@sentry/dotagents-lib"] range:
- Immediately publish a patch release that fixes the metadata. Both packages go up together.
- If the bad host version is unusable for end-users, run
npm deprecate @sentry/dotagents@<bad-version> "use <new-version>"so the npm install path warns. - Investigate whether
verify-pack.mjsshould have caught it — extend the script's invariants if not.
| File | Purpose |
|---|---|
.craft.yml |
Craft config: preReleaseCommand is the bump script; npm target picks up both tarballs. |
scripts/bump-version.mjs |
Lock-step version bumper. |
scripts/verify-pack.mjs |
Invariant check between pack and publish. |
.github/workflows/ci.yml |
Builds and packs both packages; runs the verify step on every PR. |
.github/workflows/release.yml |
Drives craft. |