This monorepo uses Changesets for version management and automated publishing.
The following packages are published to npm:
@agentgate/core- Core types and utilities@agentgate/sdk- SDK for integrating AgentGate@agentgate/cli- CLI for approval management
When you make changes that should trigger a release, add a changeset:
pnpm changesetThis will prompt you to:
- Select which packages have changed
- Choose the semver bump type (patch/minor/major)
- Write a summary of the changes
The changeset file is committed with your changes.
- patch: Bug fixes, small changes (0.0.X)
- minor: New features, non-breaking (0.X.0)
- major: Breaking changes (X.0.0)
- Create a PR with your changes + changeset files
- Merge to
main - The GitHub Action creates a "Release" PR that:
- Bumps versions based on changesets
- Updates CHANGELOGs
- Merge the Release PR to publish to npm
If you need to publish manually:
# Bump versions
pnpm changeset version
# Build all packages
pnpm build
# Publish to npm (requires NPM_TOKEN)
pnpm changeset publishAdd NPM_TOKEN to your repository secrets:
- Generate token:
npm token create --cidr-whitelist=0.0.0.0/0 - Go to GitHub → Settings → Secrets → Actions
- Add
NPM_TOKENwith the generated token
Packages are configured with "access": "public" for npm publishing under the @agentgate scope.
To test the build before publishing:
# Build all packages
pnpm build
# Check what would be published
cd packages/core && npm pack --dry-run
cd packages/sdk && npm pack --dry-run
cd packages/cli && npm pack --dry-runEnsure the package scope @agentgate is either:
- Free to use (first publish claims it)
- Or you have an npm organization configured
The prepublishOnly script runs pnpm run build automatically. Ensure TypeScript compiles successfully.