Publishing
September 4, 2026 · View on GitHub
For maintainers. Consumers install from npm; they do not need this guide.
Publish all @socialrobot-io/agent-kit-* packages together with one shared
version. Releases run from GitHub Actions on main (manual “Run workflow”).
Auth uses npm Trusted Publishing (OIDC). There is no long-lived NPM_TOKEN.
Naming
| Layer | Name | Role |
|---|---|---|
| npm / GitHub org | socialrobot-io | Owns the scope and the repo |
| Package names | @socialrobot-io/agent-kit-* | What consumers install and import |
Example import:
import { createTenantHome } from "@socialrobot-io/agent-kit-node";
Packages
| Package | Project |
|---|---|
@socialrobot-io/agent-kit-node | node |
@socialrobot-io/agent-kit-next | next |
@socialrobot-io/agent-kit-core | core |
@socialrobot-io/agent-kit-ai | ai |
@socialrobot-io/agent-kit-sessions | sessions |
@socialrobot-io/agent-kit-sandbox | sandbox |
@socialrobot-io/agent-kit-curator | curator |
@socialrobot-io/agent-kit-cli | cli |
All eight share one version. A bump updates every package.
One-time setup
- Confirm you can publish under the
socialrobot-ioorganization on npmjs.com. - For each package above, add a Trusted Publisher:
- Organization or user:
socialrobot-io - Repository:
agent-kit - Workflow filename:
release.yml - Environment: leave empty
- Organization or user:
- You can add Trusted Publishers before the first publish when you own the scope. If npm requires an existing package, publish once with a granular token, then switch to OIDC and revoke the token.
- Create a classic or fine-grained GitHub PAT for a repo admin with
contents read/write (and permission to create releases / tags). Store it as
the repository Actions secret
RELEASE_TOKEN. The default-branch ruleset requires pull requests; org policy also blocks adding GitHub Actions as a ruleset bypass actor, so the release job needs this admin PAT to push the version commit and tag. Prefer a dedicated classic PAT over a personalghlogin token so rotation does not break releases.
npm provenance attestations need a public GitHub repository. This repo can stay private; publishes still work, but provenance is omitted until the repo is public.
Run a release
- Merge the work you want to ship into
main. - Open Actions → Release → Run workflow.
- Set inputs:
specifier:patch,minor,major, or an exact version such as0.1.0first_release:trueonly for the first publish (nov*tag yet). For the initial0.1.0publish, use specifier0.1.0andfirst_release: true.dry_run:trueto preview without commit, tag, push, or publish
- The workflow tests, builds, emits
.d.tsfiles, versions, updatesCHANGELOG.md, creates a GitHub Release, rewritesworkspace:*deps to concrete versions for the npm tarball only, then publishes each package.
Local preview (no publish):
bunx nx release patch --first-release --dry-run
Workspace deps and publish
Git keeps "workspace:*" so Bun links local packages. npm rejects that
protocol in published tarballs. The Release workflow therefore:
- Runs
nx release … --skip-publish(version + changelog + tag stay on git withworkspace:*). - Runs
bun scripts/rewrite-workspace-deps-for-publish.mjs(working tree only). - Runs
nx release publish.
Do not commit the rewritten package.json files. Do not set
release.version.preserveLocalDependencyProtocols: false in nx.json; that
would commit concrete versions and break local workspace installs.
Notes
- The workflow refuses to run on branches other than
main. RELEASE_TOKENmust stay set; without it, version/tag push fails the default-branch “require pull request” ruleset.- Do not set
NODE_AUTH_TOKENin the release job. The npm CLI uses OIDC whenid-token: writeis present and Trusted Publishing is configured. - Require npm CLI
>= 11.5.1(the workflow installs latest npm on Node 24). - Packages are public (
publishConfig.access: public). After any one-off granular token publish, revoke that token on npm.