pnpmand@changesets/cliinstalled (runpnpm installin the repo)- Logged into npm with credentials that have publish rights for all packages (
pnpm npm login)
By Default Any new Project in this monorepo should be:
- Added in the workspace
- Added To ignore in changeset config (unless you know what you are doing)
- Must have private:true
The following packages are configured for publishing:
| Package | Description | Dependencies |
|---|---|---|
@codebolt/types |
Type definitions (foundational) | None |
@codebolt/codeboltjs |
Core CodeBolt JS library | types |
@codebolt/agent |
Main agent package | types, codeboltjs |
@codebolt/utils |
Utility functions | codeboltjs |
epoml |
EPOML parser | codeboltjs |
@codebolt/provider |
Provider base package | types, codeboltjs |
@codebolt/agentfs-provider |
AgentFS provider | codeboltjs, provider, types |
@codebolt/git-worktree-production |
Git worktree provider | codeboltjs, provider, types |
@codebolt/codeparser |
Code parser | None |
@codebolt/mcp |
MCP package | None |
@codebolt/litegraph |
Graph editor library | None |
@codebolt/agent-shared-nodes |
Shared node definitions | litegraph |
These packages are linked together (version bumps are synchronized):
- Core SDK:
@codebolt/codeboltjs,@codebolt/utils,@codebolt/agent,epoml - Parser/MCP:
@codebolt/codeparser,@codebolt/mcp - Litegraph:
@codebolt/litegraph,@codebolt/agent-shared-nodes - Providers:
@codebolt/provider,@codebolt/agentfs-provider,@codebolt/git-worktree-production
@codebolt/types- Used by most packages, not linked to allow independent versioning
When a package with workspace:* dependencies is published:
pnpm publishautomatically resolvesworkspace:*to actual versions- If
@codebolt/litegraphchanges,@codebolt/agent-shared-nodeswill also get a patch bump (viaupdateInternalDependencies: "patch")
-
Create a changeset
pnpm changeset add- Select the packages you changed and add a short summary.
- Dependent packages will be automatically included if their dependencies changed.
-
Version packages
pnpm changeset version- This bumps versions and updates CHANGELOG files.
- Important: This also updates any packages that depend on changed packages.
- Commit the updated package versions, changelogs, and lockfile.
-
Build and verify (recommended)
pnpm run build(builds all packages)- Or filter:
pnpm --filter @codebolt/litegraph run build - Optional:
pnpm pack --filter <package>and inspect the generatedpackage.jsonto verifyworkspace:*is resolved.
-
Dry run to preview what will be published
pnpm changeset publish --dry-run- This shows exactly which packages would be published without actually publishing
- Look for lines like:
🦋 info <package> is being published because our local version (x.x.x) has not been published on npm🦋 warn <package> is not being published because version x.x.x is already published on npm
- Important:
changeset publishpublishes ANY package where local version ≠ npm version, not just packages added viachangeset add - To prevent a package from being published, add
"private": trueto its package.json
-
Publish
- Ensure you have publish permissions for every package included in the changeset.
pnpm changeset publish- Important: Always use
pnpm changeset publish(notnpm publish) to ensureworkspace:*is resolved. - If npm reports
E403for packages outside your control, remove them from the changeset or obtain access before retrying.
-
Post-publish
git push && git push --tags- Keep npm logs (
~/.npm/_logs/*.log) for auditing any failures.
For convenience, use these scripts:
# Publish @codebolt/codeboltjs only
pnpm run publish:codeboltjs
# Publish without version bump
pnpm run publish:codeboltjs:skipWhen you want to publish only certain packages (e.g., codeboltjs and provider but NOT agent):
Why not changeset publish? - It publishes ALL packages with version mismatches, not just the ones you want.
# First, build
pnpm run build
# Dry run to verify (shows what would be published without actually publishing)
pnpm --filter @codebolt/codeboltjs publish --dry-run --access public
pnpm --filter @codebolt/provider publish --dry-run --access public
# Then publish
pnpm --filter @codebolt/codeboltjs publish --access public
pnpm --filter @codebolt/provider publish --access publicUse this method if pnpm publish --filter has issues with workspace:* conversion:
# 1. Build the packages first
pnpm run build
# 2. Navigate to the package directory and pack (converts workspace:* to real versions)
cd packages/codeboltjs
pnpm pack
# 3. Verify the tarball has correct dependencies (no workspace:*)
tar -tzf codebolt-codeboltjs-*.tgz | head -5
tar -xzf codebolt-codeboltjs-*.tgz -O package/package.json | grep -A 10 '"dependencies"'
# 4. Publish the tarball
npm publish codebolt-codeboltjs-*.tgz --access public
# 5. Clean up
rm -f codebolt-codeboltjs-*.tgz
# 6. Repeat for other packages you want to publish
cd ../provider
pnpm pack
npm publish codebolt-provider-*.tgz --access public
rm -f codebolt-provider-*.tgz# Function to selectively publish a package
publish_package() {
local pkg_path=$1
local pkg_name=$(basename $pkg_path)
echo "Publishing $pkg_name..."
cd $pkg_path
pnpm pack
npm publish *.tgz --access public
rm -f *.tgz
cd -
}
# Example: Publish only codeboltjs and provider
publish_package packages/codeboltjs
publish_package packages/providerImportant: changeset publish does NOT only publish packages that were added via changeset add. It publishes ANY package where:
- The package is NOT marked as
"private": truein package.json - The local version does NOT exist on npm
This means if you have a package with version 1.0.0 locally and npm doesn't have that version, it will try to publish it regardless of whether you ran changeset add for it.
To prevent a package from being published:
- Add
"private": trueto the package.json (recommended - this is the ONLY reliable way) - Add to ignore list in
.changeset/config.json- WARNING: This only prevents version bumping duringchangeset version, it does NOT preventchangeset publishfrom publishing the package if its version doesn't exist on npm!
- Workspace protocol resolution:
workspace:*ranges are automatically replaced with real versions when usingpnpm publishorpnpm changeset publish. - Dependency cascade: When
@codebolt/litegraphis updated,@codebolt/agent-shared-nodeswill automatically get a patch bump because it depends on litegraph. - The
pnpm packcheck ensures the tarball's manifest contains resolved semver ranges before publishing. - Private packages are excluded from publishing:
@agent-creator/frontend,@agent-creator/backend,@agent-creator/agentdockerprovideragent,remoteserverprovideragent@codebolt/git-worktree-provider@codebolt/create-team-for-swarm,@codebolt/find-next-job-for-agent- Plugin templates:
@codebolt/plugin-template,@codebolt/plugin-and-logic,@codebolt/plugin-enhanced-math,@codebolt/plugin-text-processor