@kb-labs/release-manager-cli 2.119.0-canary.e120bc0ee → 2.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/changelog.js.map +1 -1
- package/dist/cli/commands/checks.js.map +1 -1
- package/dist/cli/commands/deliver.js +2 -0
- package/dist/cli/commands/deliver.js.map +1 -1
- package/dist/cli/commands/git.js.map +1 -1
- package/dist/cli/commands/pack.js.map +1 -1
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/promote.js.map +1 -1
- package/dist/cli/commands/publish.js.map +1 -1
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/rollback.js.map +1 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/stage-plan.d.ts +19 -0
- package/dist/cli/commands/stage-plan.js +525 -0
- package/dist/cli/commands/stage-plan.js.map +1 -0
- package/dist/cli/commands/stage.js.map +1 -1
- package/dist/cli/commands/status.d.ts +11 -0
- package/dist/cli/commands/status.js +130 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/verify-clean-install.d.ts +1 -0
- package/dist/cli/commands/verify-clean-install.js +1 -1
- package/dist/cli/commands/verify-clean-install.js.map +1 -1
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/contracts/release.schema.js.map +1 -1
- package/dist/index.js +40 -2
- package/dist/index.js.map +1 -1
- package/dist/manifest.js +40 -2
- package/dist/manifest.js.map +1 -1
- package/dist/rest/handlers/build-handler.js.map +1 -1
- package/dist/rest/handlers/changelog-generate-handler.js.map +1 -1
- package/dist/rest/handlers/changelog-handler.js.map +1 -1
- package/dist/rest/handlers/changelog-save-handler.js.map +1 -1
- package/dist/rest/handlers/checklist-handler.js.map +1 -1
- package/dist/rest/handlers/generate-handler.js.map +1 -1
- package/dist/rest/handlers/get-checks-handler.js.map +1 -1
- package/dist/rest/handlers/git-timeline-handler.js.map +1 -1
- package/dist/rest/handlers/history-changelog-handler.js.map +1 -1
- package/dist/rest/handlers/history-handler.js.map +1 -1
- package/dist/rest/handlers/history-plan-handler.js.map +1 -1
- package/dist/rest/handlers/history-report-handler.js.map +1 -1
- package/dist/rest/handlers/plan-handler.js.map +1 -1
- package/dist/rest/handlers/preview-handler.js.map +1 -1
- package/dist/rest/handlers/report-handler.js.map +1 -1
- package/dist/rest/handlers/reset-handler.js.map +1 -1
- package/dist/rest/handlers/run-checks-handler.js.map +1 -1
- package/dist/rest/handlers/run-handler.js.map +1 -1
- package/dist/rest/handlers/scopes-handler.js.map +1 -1
- package/dist/rest/handlers/status-handler.js.map +1 -1
- package/dist/setup/handler.js.map +1 -1
- package/package.json +8 -8
- package/dist/manifest.json +0 -1210
- package/dist/widgets/117.js +0 -32
- package/dist/widgets/165.js +0 -1
- package/dist/widgets/326.js +0 -1
- package/dist/widgets/370.js +0 -1
- package/dist/widgets/405.js +0 -1
- package/dist/widgets/46.js +0 -445
- package/dist/widgets/50.js +0 -1
- package/dist/widgets/546.js +0 -1
- package/dist/widgets/648.js +0 -1
- package/dist/widgets/669.js +0 -1
- package/dist/widgets/707.js +0 -1
- package/dist/widgets/775.js +0 -1
- package/dist/widgets/78.js +0 -1
- package/dist/widgets/832.js +0 -96
- package/dist/widgets/875.js +0 -25
- package/dist/widgets/945.js +0 -1
- package/dist/widgets/968.js +0 -9
- package/dist/widgets/__federation_expose_ReleasePage.js +0 -1
- package/dist/widgets/mf-manifest.json +0 -229
- package/dist/widgets/mf-stats.json +0 -256
- package/dist/widgets/remoteEntry.js +0 -7
- package/dist/workflows/templates/dry-run.yaml +0 -37
- package/dist/workflows/templates/full-release.yaml +0 -58
- package/dist/workflows/templates/hotfix.yaml +0 -40
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/manifest.ts","../src/shared/resolve-scope.ts","../src/shared/utils.ts","../src/shared/res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,gBAAgB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACtE,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAGxE,mBAAmB,CAAA,EAAG,gBAAA,CAAiB,SAAS,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EAC5E,oBAAoB,CAAA,EAAG,gBAAA,CAAiB,SAAS,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAG9E,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACxE,kBAAkB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAG1E,gBAAgB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACtE,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAGxE,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACxE,kBAAkB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA;AAC5E;AAUO,IAAM,eAAA,GAAkB;AAAA,EAC7B,IAAA,EAAM,OAAA;AAAA,EACN,EAAA,EAAI;AACN","file":"index.js","sourcesContent":["/**\n * KB Labs Release Manager - Manifest V3\n *\n * Migration from V2 to V3 following best practices from V3-MIGRATION-GUIDE.md\n *\n * Key changes:\n * - Schema: kb.plugin/3\n * - Commands use handler#default suffix\n * - Commands have handlerPath field\n * - Permissions moved to manifest level\n * - All imports from @kb-labs/sdk\n */\n\nimport {\n defineCommandFlags,\n combinePermissions,\n gitWorkflowPreset,\n kbPlatformPreset,\n npmPublishPreset,\n ciEnvironmentPreset,\n} from '@kb-labs/sdk';\nimport {\n RELEASE_BASE_PATH,\n RELEASE_ROUTES,\n RELEASE_CACHE_PREFIX,\n} from '@kb-labs/release-manager-contracts';\nimport { CHECKS_CONCURRENCY } from '@kb-labs/release-manager-core';\n\n/**\n * Build permissions using presets:\n * - gitWorkflow: HOME, USER, GIT_*, SSH_* for git/changelog operations\n * - kbPlatform: KB_* env vars and .kb/ directory\n * - npmPublish: NPM_TOKEN, npm registry access for publishing\n * - ciEnvironment: CI, GITHUB_TOKEN for CI/CD integrations\n * - Custom: KB_RELEASE_*, additional fs paths\n */\nconst pluginPermissions = combinePermissions()\n .with(gitWorkflowPreset)\n .with(kbPlatformPreset)\n .with(npmPublishPreset)\n .with(ciEnvironmentPreset)\n .withEnv(['KB_RELEASE_*', 'NODE_ENV'])\n .withFs({\n mode: 'readWrite',\n allow: [\n '.kb/release/**',\n 'package.json',\n '**/package.json',\n 'pnpm-workspace.yaml',\n '**/*.yml',\n '**/*.yaml',\n 'CHANGELOG.md',\n '**/CHANGELOG.md',\n ],\n // Note: deny patterns (*.key, *.secret, node_modules) are enforced by platform\n })\n .withShell({\n allow: ['bash', 'git', 'npm', 'npx', 'pnpm'], // release gates/builds plus git, npm publishing, and configurable pnpm scripts\n // Must match CHECKS_CONCURRENCY (manager-core/src/checks.ts): the process\n // broker grants at most this many concurrent shells per plugin, so a lower\n // value here throttles perPackage check batches to 1-at-a-time and can\n // blow their timeout; a higher value defeats the plugin's own batching.\n maxConcurrent: CHECKS_CONCURRENCY,\n })\n .withPlatform({\n cache: [RELEASE_CACHE_PREFIX], // Cache namespace prefix for plan/changelog caching\n llm: true, // LLM for changelog generation\n analytics: true, // Track release events\n })\n .withQuotas({\n timeoutMs: 1800000, // 30 min for complex releases (167 packages)\n memoryMb: 4096, // full platform build:affected across 167 packages peaked at ~2.05GB on a CI runner, right at the old 2048 ceiling\n cpuMs: 300000, // 5 min CPU time\n })\n .build();\n\nexport const manifest = {\n schema: 'kb.plugin/3',\n id: '@kb-labs/release',\n version: '0.1.0',\n\n display: {\n name: 'Release Manager',\n description: 'Plan, execute, and audit releases across your workspace',\n tags: ['release', 'publish', 'versioning'],\n },\n\n // Platform requirements\n platform: {\n requires: ['storage', 'cache'], // cache required for plan/changelog caching\n optional: ['llm', 'analytics', 'logger'],\n },\n\n // Setup handler - V3 pattern\n setup: {\n handler: './setup/handler.js#default',\n describe: 'Prepare the .kb/release workspace (plans, reports, backups).',\n },\n\n // CLI commands - V3 format\n cli: {\n groupMeta: [\n { path: 'release', describe: 'Release management commands' },\n ],\n commands: [\n // release:plan - Analyze changes and prepare release plan\n {\n path: 'release plan',\n category: 'Pipeline',\n describe: 'Analyze changes and prepare release plan',\n operationType: 'analyze' as const,\n longDescription: 'Detect modified packages and compute version bumps based on changes',\n\n handler: './cli/commands/plan.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump strategy',\n },\n channel: {\n type: 'string',\n choices: ['stable', 'canary'] as const,\n default: 'stable',\n description: 'Release channel — canary previews the -canary.<shortsha> version shape',\n },\n json: { type: 'boolean', description: 'Print plan as JSON' },\n }),\n\n examples: [\n 'kb release plan',\n 'kb release plan --scope packages/*',\n 'kb release plan --bump minor',\n 'kb release plan --channel canary',\n 'kb release plan --json',\n ],\n },\n\n // release:run - Execute release process\n {\n path: 'release run',\n category: 'Pipeline',\n describe: 'Execute release process (plan, check, publish)',\n operationType: 'execute' as const,\n longDescription: 'Run full release: plan versions, run checks, publish packages',\n\n handler: './cli/commands/run.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope or glob pattern (e.g. @my-org/core, packages/*)' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump override (default: auto-detect from commits)',\n },\n strict: { type: 'boolean', description: 'Fail on any check failure' },\n channel: {\n type: 'string',\n choices: ['stable', 'canary'] as const,\n default: 'stable',\n description: 'Release channel — canary publishes straight to npm under a prerelease tag, no git commit/tag',\n },\n 'dry-run': { type: 'boolean', description: 'Simulate release without publishing or tagging' },\n 'skip-checks': { type: 'boolean', description: 'Skip pre-release checks' },\n 'skip-build': { type: 'boolean', description: 'Skip build step' },\n 'skip-verify': { type: 'boolean', description: 'Skip artifact verification (npm pack check)' },\n 'skip-publish': {\n type: 'boolean',\n description: 'Prepare-only: build, version, changelog, git commit/tag — never publish to npm. No npm credentials required. Pair with a tag-triggered CI job running `kb release promote`.',\n },\n 'no-verify': { type: 'boolean', description: 'Pass --no-verify to git push (bypasses pre-push hooks)' },\n yes: { type: 'boolean', description: 'Skip confirmation prompt — for CI/headless mode' },\n json: { type: 'boolean', description: 'Print result as JSON' },\n }),\n\n examples: [\n 'kb release run',\n 'kb release run --dry-run',\n 'kb release run --yes',\n 'kb release run --yes --no-verify',\n 'kb release run --bump minor --yes',\n 'kb release run --scope @my-org/core',\n 'kb release run --skip-checks --skip-build',\n 'kb release run --strict --json',\n 'kb release run --channel canary --yes',\n 'kb release run --flow platform --skip-publish --yes',\n ],\n },\n\n // release:publish - Publish packages to npm\n {\n path: 'release publish',\n category: 'Publish',\n describe: 'Publish packages to npm registry',\n operationType: 'execute' as const,\n longDescription: 'Smart npm publish with interactive 2FA support and better UX',\n\n handler: './cli/commands/publish.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate publish without actually publishing' },\n tag: { type: 'string', description: 'NPM dist-tag (default: latest)' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release publish',\n 'kb release publish --scope @kb-labs/core',\n 'kb release publish --otp 123456',\n 'kb release publish --dry-run',\n 'kb release publish --tag next --access public',\n ],\n },\n\n // release:stage - Pack the currently-committed versions into real tarballs, once\n {\n path: 'release stage',\n category: 'Publish',\n describe: 'Pack the currently-committed package versions for a flow into real npm tarballs, once, for `release deliver` to ship',\n operationType: 'execute' as const,\n longDescription:\n 'Produces the actual npm tarball artifacts for a flow\\'s already-committed package.json versions ' +\n '— no re-bump, no rebuild. Writes a manifest.json (name/version/tarball/sha256) alongside the tarballs. ' +\n 'Intended to run once in CI right after checking out a release tag; every `release deliver` target then ' +\n 'ships these exact bytes instead of re-packing independently. Not the same command as `release pack` ' +\n '(that one verifies proposed packages before a release is decided; this one packs an already-decided one).',\n\n handler: './cli/commands/stage.js#default',\n\n flags: defineCommandFlags({\n 'release-tag': { type: 'string', description: 'Git tag to resolve {flow, channel} from (via release.flows[*].tagPattern) — alternative to --flow' },\n flow: { type: 'string', description: 'Named flow — selects packages the same way `release run --flow` does (e.g. excludes sdk from platform)' },\n 'out-dir': { type: 'string', description: 'Output directory for tarballs + manifest.json (default: .kb/release/artifacts)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release stage --flow platform',\n 'kb release stage --release-tag platform-v2.105.0',\n 'kb release stage --flow sdk --out-dir .kb/release/artifacts',\n ],\n },\n\n // release:clean-install - Shared install-verification used by both\n // check-pack-install.sh and `release stage`\n {\n path: 'release clean install',\n category: 'Publish',\n describe: 'Install a packed tarball into a throwaway consumer and confirm it imports cleanly',\n operationType: 'execute' as const,\n longDescription:\n 'Installs --tarball into a fresh, outside-the-workspace consumer project and confirms --name can be ' +\n 'imported afterward. Shared by check-pack-install.sh (local release gate) and `release stage` (CI publish ' +\n 'path) so both use identical verification — catches an already-published PEER dependency that is itself ' +\n 'broken, which static manifest checks cannot see. Surfaces the real failure reason via @npmcli/arborist ' +\n 'directly; plain `npm install` swallows this exact failure class as an unhandled rejection with no usable error.',\n\n handler: './cli/commands/verify-clean-install.js#default',\n\n flags: defineCommandFlags({\n tarball: { type: 'string', description: 'Path to the packed tarball to install' },\n name: { type: 'string', description: 'Package name to import after install' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n additionalTarballs: {\n type: 'string',\n description:\n 'Comma-separated tarball paths for workspace siblings. Forces pnpm to install these exact local ' +\n 'artifacts via pnpm.overrides instead of resolving the same package names from the real npm registry ' +\n '— required with --package-manager pnpm to avoid silently testing an already-published, possibly ' +\n 'stale, version of an in-repo sibling.',\n },\n packageManager: {\n type: 'string',\n description: '\"pnpm\" enables the additionalTarballs override path; \"npm\" (default) keeps the plain Arborist install.',\n },\n }),\n\n examples: [\n 'kb release clean install --tarball ./kb-labs-sdk-2.115.0.tgz --name @kb-labs/sdk',\n 'kb release clean install --tarball ./a.tgz --name @kb-labs/a --package-manager pnpm --additional-tarballs ./b.tgz,./c.tgz',\n ],\n },\n\n // release:promote - Promote an already-released version to npm\n {\n path: 'release promote',\n category: 'Publish',\n describe: 'Promote already-released package versions to npm (no re-bump, no rebuild)',\n operationType: 'execute' as const,\n longDescription:\n 'Publishes the CURRENT on-disk package.json versions to npm — no version bump, no rebuild. ' +\n 'Intended to run after `release run --channel stable` (typically targeting Verdaccio via ' +\n 'config.registry): once that run is verified, `release promote` pushes the exact same, ' +\n 'already-committed versions to npm under the stable dist-tag.',\n\n handler: './cli/commands/promote.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named flow — selects packages the same way `release run --flow` does (e.g. excludes sdk from platform)' },\n tag: { type: 'string', description: 'npm dist-tag override (default: config.publish.stableTag, falls back to \"latest\")' },\n registry: { type: 'string', description: 'Registry override (default: config.publish.npmRegistry, falls back to real npm)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate promote without actually publishing' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release promote',\n 'kb release promote --flow platform',\n 'kb release promote --flow sdk',\n 'kb release promote --scope @kb-labs/core',\n 'kb release promote --dry-run',\n 'kb release promote --tag next',\n ],\n },\n\n // release:deliver - Ship a `release stage`d artifact to a target (npm)\n {\n path: 'release deliver',\n category: 'Publish',\n describe: 'Ship the tarballs `release stage` already packed to a target — no packing, no rebuild',\n operationType: 'execute' as const,\n longDescription:\n 'CI-side half of the \"plugin prepares, CI delivers\" release flow: reads manifest.json written by ' +\n '`release stage` and ships those exact tarballs to --target (only \"npm\" is implemented this pass). ' +\n 'Resolves {flow, channel} from --release-tag via release.flows[*].tagPattern so CI never needs to ' +\n 'guess the flow itself — just pass the tag. Verifies the delivery against the real registry ' +\n 'afterwards (with retry, since real npm has propagation lag); never attempts npm unpublish on a ' +\n 'verification failure — that is a human decision.',\n\n handler: './cli/commands/deliver.js#default',\n\n flags: defineCommandFlags({\n 'release-tag': { type: 'string', description: 'Git tag to resolve {flow, channel} from (via release.flows[*].tagPattern) — alternative to --flow' },\n flow: { type: 'string', description: 'Named flow — alternative to --release-tag' },\n target: { type: 'string', choices: ['npm'] as const, description: 'Delivery target (default: npm — the only target implemented this pass)' },\n 'artifacts-dir': { type: 'string', description: 'Where `release stage` wrote tarballs + manifest.json (default: .kb/release/artifacts)' },\n tag: { type: 'string', description: 'npm dist-tag override (default: config.publish.stableTag, falls back to \"latest\")' },\n registry: { type: 'string', description: 'Registry override (default: config.publish.npmRegistry, falls back to real npm)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate delivery without actually publishing' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release deliver --release-tag platform-v2.105.0 --target npm',\n 'kb release deliver --flow sdk --target npm',\n 'kb release deliver --release-tag sdk-v3.2.0 --dry-run',\n ],\n },\n\n // release:rollback - Rollback last release\n {\n path: 'release rollback',\n category: 'Utilities',\n describe: 'Rollback last release',\n operationType: 'mutate' as const,\n longDescription: 'Restore workspace state from backup snapshot',\n\n handler: './cli/commands/rollback.js#default',\n\n flags: defineCommandFlags({\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: ['kb release rollback', 'kb release rollback --json'],\n },\n\n // release:report - Show last release report\n {\n path: 'release report',\n category: 'Utilities',\n describe: 'Show last release report',\n operationType: 'read' as const,\n longDescription: 'Display the most recent release execution report',\n\n handler: './cli/commands/report.js#default',\n\n flags: defineCommandFlags({\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: ['kb release report', 'kb release report --json'],\n },\n\n // release:changelog - Generate changelog\n {\n path: 'release changelog',\n category: 'Utilities',\n describe: 'Generate changelog from conventional commits',\n operationType: 'read' as const,\n longDescription: 'Parse git history and generate changelog with conventional commits support',\n\n handler: './cli/commands/changelog.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Filter to specific package' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n from: { type: 'string', description: 'Start commit/tag' },\n to: { type: 'string', description: 'End commit/tag (default: HEAD)' },\n 'since-tag': { type: 'string', description: 'Shorthand for --from <tag>' },\n format: {\n type: 'string',\n choices: ['json', 'md', 'both'] as const,\n default: 'both',\n description: 'Output format',\n },\n level: {\n type: 'string',\n choices: ['compact', 'standard', 'detailed'] as const,\n default: 'standard',\n description: 'Detail level',\n },\n template: {\n type: 'string',\n description:\n 'Template name (builtin: corporate, corporate-ai, technical, compact) or custom path',\n },\n 'breaking-only': { type: 'boolean', description: 'Show only breaking changes' },\n include: { type: 'string', description: 'Comma-separated types to include' },\n exclude: { type: 'string', description: 'Types to exclude' },\n 'workspace-only': { type: 'boolean', description: 'Only workspace changelog' },\n 'per-package': { type: 'boolean', description: 'Only per-package changelogs' },\n force: { type: 'boolean', description: 'Skip audit gate' },\n 'allow-major': { type: 'boolean', description: 'Allow major bumps for experimental packages' },\n preid: { type: 'string', description: 'Pre-release identifier (rc, beta, alpha)' },\n }),\n\n examples: [\n 'kb release changelog',\n 'kb release changelog --from v1.0.0',\n 'kb release changelog --format md --level detailed',\n 'kb release changelog --template corporate-ai',\n 'kb release changelog --template ./my-template.ts',\n 'kb release changelog --breaking-only',\n ],\n },\n\n // release:verify - Validate release readiness\n {\n path: 'release verify',\n category: 'Validation',\n describe: 'Validate release readiness',\n operationType: 'analyze' as const,\n longDescription: 'Validate release readiness via flag gates (packages, breaking changes, commit types)',\n\n handler: './cli/commands/verify.js#default',\n\n flags: defineCommandFlags({\n 'fail-if-empty': { type: 'boolean', description: 'Fail if no version bumps needed' },\n 'fail-on-breaking': { type: 'boolean', description: 'Fail if breaking changes detected' },\n 'allow-types': {\n type: 'string',\n description: 'Comma-separated types required (e.g., feat,fix)',\n },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release verify',\n 'kb release verify --fail-if-empty',\n 'kb release verify --allow-types feat,fix',\n ],\n },\n\n // release:checks - Run pre-release checks\n {\n path: 'release checks',\n category: 'Validation',\n describe: 'Run pre-release checks from release config',\n operationType: 'analyze' as const,\n longDescription: 'Execute custom checks defined in release config (lint, test, audit, etc.)',\n\n handler: './cli/commands/checks.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release checks',\n 'kb release checks --scope @my-org/core',\n 'kb release checks --json',\n ],\n },\n\n // release:build - Build packages\n {\n path: 'release build',\n category: 'Publish',\n describe: 'Build packages from release plan',\n operationType: 'execute' as const,\n longDescription: 'Build all packages in plan into temp dir then atomically swap dist/',\n\n handler: './cli/commands/build.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release build',\n 'kb release build --scope platform',\n 'kb release build --json',\n ],\n },\n\n // release:pack - Verify npm artifacts\n {\n path: 'release pack',\n category: 'Publish',\n describe: 'Verify built package artifacts via npm pack',\n operationType: 'execute' as const,\n longDescription: 'Run npm pack checks: directory imports, test file leaks, missing exports, syntax errors',\n\n handler: './cli/commands/pack.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release pack',\n 'kb release pack --scope @my-org/core',\n 'kb release pack --json',\n ],\n },\n\n // release:version - Bump package.json versions\n {\n path: 'release version',\n category: 'Publish',\n describe: 'Bump package.json versions per release plan',\n operationType: 'mutate' as const,\n longDescription: 'Update version fields in package.json files based on computed plan',\n\n handler: './cli/commands/version.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump override',\n },\n 'dry-run': { type: 'boolean', description: 'Show what would be bumped without writing' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release version',\n 'kb release version --bump minor',\n 'kb release version --dry-run',\n 'kb release version --scope platform --json',\n ],\n },\n\n // release:git - Commit, tag, push\n {\n path: 'release git',\n category: 'Publish',\n describe: 'Commit, tag, and push release changes',\n operationType: 'mutate' as const,\n longDescription: 'Create release commit, create version tags, and push to remote',\n\n handler: './cli/commands/git.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n description: 'Version bump override (used to reload plan)',\n },\n 'dry-run': { type: 'boolean', description: 'Skip git operations' },\n 'no-verify': { type: 'boolean', description: 'Pass --no-verify to git push' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release git',\n 'kb release git --scope platform',\n 'kb release git --dry-run',\n 'kb release git --no-verify --json',\n ],\n },\n ],\n },\n\n // REST API routes - V3 format (scope-based architecture)\n rest: {\n basePath: RELEASE_BASE_PATH,\n routes: [\n // GET /scopes - List available release scopes\n {\n method: 'GET',\n path: RELEASE_ROUTES.SCOPES,\n handler: './rest/handlers/scopes-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ScopesResponseSchema',\n },\n },\n // GET /status - Get release status for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.STATUS,\n handler: './rest/handlers/status-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#StatusResponseSchema',\n },\n },\n // GET /plan - Get current release plan for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.PLAN,\n handler: './rest/handlers/plan-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#PlanInputSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#PlanResponseSchema',\n },\n },\n // POST /generate - Generate release plan (LLM)\n {\n method: 'POST',\n path: RELEASE_ROUTES.GENERATE,\n handler: './rest/handlers/generate-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#GeneratePlanRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#GeneratePlanResponseSchema',\n },\n timeoutMs: 120000, // 2 minutes for LLM analysis\n },\n // DELETE /plan - Reset release plan\n {\n method: 'DELETE',\n path: RELEASE_ROUTES.RESET,\n handler: './rest/handlers/reset-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#ResetPlanRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#ResetPlanResponseSchema',\n },\n },\n // GET /changelog - Get changelog for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHANGELOG,\n handler: './rest/handlers/changelog-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#ChangelogInputSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#ChangelogResponseSchema',\n },\n },\n // POST /changelog/generate - Generate changelog (LLM)\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHANGELOG_GENERATE,\n handler: './rest/handlers/changelog-generate-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#GenerateChangelogRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#GenerateChangelogResponseSchema',\n },\n timeoutMs: 120000, // 2 minutes for LLM generation\n },\n // POST /changelog/save - Save edited changelog\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHANGELOG_SAVE,\n handler: './rest/handlers/changelog-save-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#SaveChangelogRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#SaveChangelogResponseSchema',\n },\n },\n // POST /run - Execute release process\n {\n method: 'POST',\n path: RELEASE_ROUTES.RUN,\n handler: './rest/handlers/run-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#RunReleaseRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#RunReleaseResponseSchema',\n },\n timeoutMs: 300000, // 5 minutes for release execution\n },\n // GET /report - Get latest release report\n {\n method: 'GET',\n path: RELEASE_ROUTES.REPORT,\n handler: './rest/handlers/report-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ReportResponseSchema',\n },\n },\n // GET /history - Get release history\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY,\n handler: './rest/handlers/history-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryResponseSchema',\n },\n },\n // GET /history/:id/report - Get historical release report\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_REPORT,\n handler: './rest/handlers/history-report-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryReportResponseSchema',\n },\n },\n // GET /history/:id/plan - Get historical release plan\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_PLAN,\n handler: './rest/handlers/history-plan-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryPlanResponseSchema',\n },\n },\n // GET /history/:id/changelog - Get historical changelog\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_CHANGELOG,\n handler: './rest/handlers/history-changelog-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryChangelogResponseSchema',\n },\n },\n // GET /git-timeline - Get git commit timeline and version preview\n {\n method: 'GET',\n path: RELEASE_ROUTES.GIT_TIMELINE,\n handler: './rest/handlers/git-timeline-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#GitTimelineResponseSchema',\n },\n },\n // GET /preview - Preview package contents before publish\n {\n method: 'GET',\n path: RELEASE_ROUTES.PREVIEW,\n handler: './rest/handlers/preview-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#PreviewResponseSchema',\n },\n },\n // POST /build - Trigger package build\n {\n method: 'POST',\n path: RELEASE_ROUTES.BUILD,\n handler: './rest/handlers/build-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#BuildRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#BuildResponseSchema',\n },\n timeoutMs: 300000, // 5 minutes for build\n },\n // GET /checklist - Get unified release checklist status\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHECKLIST,\n handler: './rest/handlers/checklist-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ReleaseChecklistSchema',\n },\n },\n // GET /checks - Get list of configured checks (without running them)\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHECKS,\n handler: './rest/handlers/get-checks-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#GetChecksResponseSchema',\n },\n },\n // POST /checks/run - Run pre-release checks from kb.config.json release.checks\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHECKS_RUN,\n handler: './rest/handlers/run-checks-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#RunChecksRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#RunChecksResponseSchema',\n },\n timeoutMs: 600000, // 10 minutes - all checks combined\n },\n ],\n },\n\n // Studio V2 — Module Federation pages\n studio: {\n version: 2 as const,\n remoteName: 'releasePlugin',\n pages: [\n {\n id: 'release.overview',\n title: 'Release',\n icon: 'RocketOutlined',\n route: '/p/release',\n entry: './ReleasePage',\n order: 1,\n },\n ],\n menus: [\n {\n id: 'release',\n label: 'Release',\n icon: 'RocketOutlined',\n target: 'release.overview',\n order: 60,\n },\n ],\n },\n\n // Studio widgets (legacy - commented out, using new UI integration)\n // studio_legacy: {\n // widgets: [\n // {\n // id: 'release.plan',\n // kind: 'infopanel',\n // title: 'Latest Release Plan',\n // description: 'Shows the most recent release plan generated via `kb release plan`.',\n // data: {\n // source: {\n // type: 'rest',\n // routeId: 'plan/latest',\n // method: 'GET',\n // },\n // },\n // layoutHint: {\n // w: 4,\n // h: 5,\n // minW: 3,\n // minH: 3,\n // },\n // },\n // {\n // id: 'release.report',\n // kind: 'cardlist',\n // title: 'Release Report',\n // description: 'Status of the last release execution.',\n // data: {\n // source: {\n // type: 'rest',\n // routeId: 'report/latest',\n // method: 'GET',\n // },\n // },\n // options: {\n // layout: 'list',\n // },\n // layoutHint: {\n // w: 4,\n // h: 4,\n // minW: 3,\n // minH: 3,\n // },\n // },\n // ],\n // menus: [\n // {\n // id: 'release-menu',\n // label: 'Release',\n // icon: 'RocketOutlined',\n // target: '/plugins/release/dashboard',\n // order: 0,\n // },\n // {\n // id: 'release-dashboard',\n // label: 'Dashboard',\n // icon: 'DashboardOutlined',\n // parentId: 'release-menu',\n // target: '/plugins/release/dashboard',\n // order: 1,\n // },\n // ],\n // layouts: [\n // {\n // id: 'release.dashboard',\n // kind: 'grid',\n // title: 'Release Dashboard',\n // description: 'Overview of release planning and execution.',\n // config: {\n // cols: { sm: 2, md: 4, lg: 6 },\n // rowHeight: 5,\n // },\n // },\n // ],\n // },\n\n // Auto-detects kb.config.json section for useConfig()\n // maps to profiles[].products.release in kb.config.json\n configSection: 'release',\n\n capabilities: ['fs:read', 'fs:write'],\n\n // V3: Manifest-first permissions using composable presets\n permissions: pluginPermissions,\n\n // Workflow templates — composed from atomic release CLI commands\n // Registered in workflow engine and runnable via `kb workflow run plugin:@kb-labs/release/<id>`\n workflows: {\n handlers: [],\n templates: [\n {\n id: 'full-release',\n path: './workflows/templates/full-release.yaml',\n describe: 'Full release cycle: plan → checks → build → pack → approve → publish → git',\n tags: ['release', 'full'],\n },\n {\n id: 'hotfix',\n path: './workflows/templates/hotfix.yaml',\n describe: 'Quick hotfix: plan → approve → publish → git (patch bump, no checks)',\n tags: ['release', 'hotfix'],\n },\n {\n id: 'dry-run',\n path: './workflows/templates/dry-run.yaml',\n describe: 'Preview release: plan, checks, pack, changelog — no publish or git ops',\n tags: ['release', 'dry-run'],\n },\n ],\n },\n\n // Artifacts\n artifacts: [\n {\n id: 'release.plan.json',\n pathTemplate: '.kb/release/plan.json',\n description: 'Serialized release plan generated by `kb release plan`.',\n },\n {\n id: 'release.report.json',\n pathTemplate: '.kb/release/report.json',\n description: 'Execution report emitted by `kb release run`.',\n },\n {\n id: 'release.changelog.md',\n pathTemplate: '.kb/release/changelog.md',\n description: 'Workspace changelog output produced during release.',\n },\n ],\n};\n\nexport default manifest;\n","import { join } from 'node:path';\nimport { readFile } from 'node:fs/promises';\nimport globby from 'globby';\n\n/**\n * Resolve scope name to absolute filesystem path.\n * Scans all package.json in repoRoot to find the matching package by name.\n */\nexport async function resolveScopePath(repoRoot: string, scope: string): Promise<string> {\n if (scope === 'root') {\n return repoRoot;\n }\n\n if (scope.startsWith('@')) {\n const packageJsonPaths = await globby('**/package.json', {\n cwd: repoRoot,\n absolute: true,\n onlyFiles: true,\n ignore: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.git/**', '**/.*/**'],\n });\n\n for (const pkgJsonPath of packageJsonPaths) {\n try {\n const pkg = JSON.parse(await readFile(pkgJsonPath, 'utf-8'));\n if (pkg.name === scope) {\n return join(pkgJsonPath, '..');\n }\n } catch { /* skip */ }\n }\n }\n\n // Direct path or fallback\n return join(repoRoot, scope);\n}\n","export { findRepoRoot } from '@kb-labs/sdk';\nexport { resolveScopePath } from './resolve-scope';\n\n/**\n * Converts scope to safe directory name\n */\nexport function scopeToDir(scope: string): string {\n return scope\n .replace(/^@/, '')\n .replace(/\\//g, '-')\n .replace(/:/g, '-')\n .replace(/\\*/g, '');\n}\n\n/**\n * Converts safe directory name back to scope\n */\nexport function dirToScope(dirName: string): string {\n if (dirName === 'root') {\n return 'root';\n }\n\n const parts = dirName.split('-');\n if (parts.length >= 2) {\n return '@' + parts[0] + '-' + parts[1] + '/' + parts.slice(2).join('-');\n }\n\n return dirName;\n}\n","/**\n * Plan resolution shared by the atomic release steps that must act on the\n * SAME plan (`release:version` → `release:git`).\n *\n * Why this exists: each step used to call planRelease() independently and\n * hope the results matched. They don't have to — planning is a function of\n * disk state, and the step in between mutates exactly that state. A plan\n * re-derived after `release:version` sees the bumped versions as the new\n * baseline and bumps again, so the tag/commit message end up one version\n * ahead of the package.json files actually being committed.\n *\n * The plan written by `release:plan` is the single source of truth for a\n * pipeline run. It is only reused when it provably describes the current\n * state of the working tree, so a stale artifact (plan.json is committed to\n * the repo, so one is always present) can never be adopted silently.\n */\n\nimport { join } from 'node:path';\nimport { readFile } from 'node:fs/promises';\nimport {\n planRelease,\n type ReleasePlan,\n type ReleaseConfig,\n type VersionBump,\n type ReleaseChannel,\n} from '@kb-labs/release-manager-core';\nimport { scopeToDir } from './utils';\n\n/**\n * Which side of the version bump the caller sits on — determines which field\n * of the plan the on-disk package.json versions are expected to match.\n */\nexport type PlanStage =\n /** `release:version`: bump not applied yet, disk should still be at currentVersion. */\n | 'pre-bump'\n /** `release:git`: bump already applied, disk should be at nextVersion. */\n | 'post-bump';\n\nexport interface ResolvePlanOptions {\n repoRoot: string;\n config: ReleaseConfig;\n scope?: string;\n flow?: string;\n bumpOverride?: VersionBump;\n channel?: ReleaseChannel;\n stage: PlanStage;\n}\n\nexport interface ResolvedPlan {\n plan: ReleasePlan;\n /** 'artifact' — reused the plan from `release:plan`; 'computed' — planned fresh. */\n source: 'artifact' | 'computed';\n /** Why the artifact was rejected, when source is 'computed' and one existed. */\n reason?: string;\n}\n\nexport function releasePlanPath(repoRoot: string, scope?: string): string {\n return join(repoRoot, '.kb', 'release', 'plans', scopeToDir(scope ?? 'root'), 'current', 'plan.json');\n}\n\nasync function readDiskVersion(packagePath: string): Promise<string | undefined> {\n try {\n const raw = await readFile(join(packagePath, 'package.json'), 'utf-8');\n return (JSON.parse(raw) as { version?: string }).version;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Reject the persisted plan unless every package it covers is on disk at the\n * version this stage expects. That single check subsumes staleness, partial\n * runs, and out-of-band edits: any of them show up as a version mismatch.\n */\nasync function validateAgainstDisk(plan: ReleasePlan, stage: PlanStage): Promise<string | undefined> {\n const expectedField = stage === 'pre-bump' ? 'currentVersion' : 'nextVersion';\n\n for (const pkg of plan.packages) {\n const onDisk = await readDiskVersion(pkg.path);\n if (onDisk === undefined) {\n return `${pkg.name}: package.json not readable at ${pkg.path}`;\n }\n const expected = pkg[expectedField];\n if (onDisk !== expected) {\n return `${pkg.name}: expected ${expectedField} ${expected} on disk, found ${onDisk}`;\n }\n }\n\n return undefined;\n}\n\n/**\n * Load the plan produced by `release:plan` when it matches this run and the\n * working tree; otherwise plan fresh.\n */\nexport async function resolvePlan(options: ResolvePlanOptions): Promise<ResolvedPlan> {\n const { repoRoot, config, scope, flow, bumpOverride, channel, stage } = options;\n\n const computeFresh = async (reason?: string): Promise<ResolvedPlan> => ({\n plan: await planRelease({ cwd: repoRoot, config, scope, flow, bumpOverride, channel }),\n source: 'computed',\n ...(reason ? { reason } : {}),\n });\n\n let persisted: ReleasePlan;\n try {\n persisted = JSON.parse(await readFile(releasePlanPath(repoRoot, scope), 'utf-8')) as ReleasePlan;\n } catch {\n return computeFresh();\n }\n\n if (!Array.isArray(persisted.packages) || persisted.packages.length === 0) {\n return computeFresh('persisted plan has no packages');\n }\n\n // All flows share one scope-derived artifact path, so an unrelated flow's\n // plan can legitimately be sitting there. Never adopt it.\n if ((persisted.flow ?? undefined) !== (flow ?? undefined)) {\n return computeFresh(`persisted plan is for flow \"${persisted.flow ?? '<none>'}\", requested \"${flow ?? '<none>'}\"`);\n }\n if ((persisted.scope ?? undefined) !== (scope ?? undefined)) {\n return computeFresh(`persisted plan is for scope \"${persisted.scope ?? '<none>'}\", requested \"${scope ?? '<none>'}\"`);\n }\n if (channel !== undefined && persisted.channel !== channel) {\n return computeFresh(`persisted plan is for channel \"${persisted.channel}\", requested \"${channel}\"`);\n }\n\n const mismatch = await validateAgainstDisk(persisted, stage);\n if (mismatch) {\n return computeFresh(`persisted plan does not match working tree (${mismatch})`);\n }\n\n return { plan: persisted, source: 'artifact' };\n}\n","/**\n * Analytics event types for Release CLI\n * Centralized constants to prevent typos and enable type safety\n */\n\n/**\n * Event type prefixes by command\n */\nexport const ANALYTICS_PREFIX = {\n PLAN: 'release.plan',\n RUN: 'release.run',\n ROLLBACK: 'release.rollback',\n REPORT: 'release.report',\n CHANGELOG: 'release.changelog',\n PREVIEW: 'release.preview',\n VERIFY: 'release.verify',\n PUBLISH: 'release.publish',\n} as const;\n\n/**\n * Event lifecycle suffixes\n */\nexport const ANALYTICS_SUFFIX = {\n STARTED: 'started',\n FINISHED: 'finished',\n} as const;\n\n/**\n * Release analytics event types\n */\nexport const ANALYTICS_EVENTS = {\n // Plan events\n PLAN_STARTED: `${ANALYTICS_PREFIX.PLAN}.${ANALYTICS_SUFFIX.STARTED}`,\n PLAN_FINISHED: `${ANALYTICS_PREFIX.PLAN}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Run events\n RUN_STARTED: `${ANALYTICS_PREFIX.RUN}.${ANALYTICS_SUFFIX.STARTED}`,\n RUN_FINISHED: `${ANALYTICS_PREFIX.RUN}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Rollback events\n ROLLBACK_STARTED: `${ANALYTICS_PREFIX.ROLLBACK}.${ANALYTICS_SUFFIX.STARTED}`,\n ROLLBACK_FINISHED: `${ANALYTICS_PREFIX.ROLLBACK}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Report events\n REPORT_STARTED: `${ANALYTICS_PREFIX.REPORT}.${ANALYTICS_SUFFIX.STARTED}`,\n REPORT_FINISHED: `${ANALYTICS_PREFIX.REPORT}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Changelog events\n CHANGELOG_STARTED: `${ANALYTICS_PREFIX.CHANGELOG}.${ANALYTICS_SUFFIX.STARTED}`,\n CHANGELOG_FINISHED: `${ANALYTICS_PREFIX.CHANGELOG}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Preview events\n PREVIEW_STARTED: `${ANALYTICS_PREFIX.PREVIEW}.${ANALYTICS_SUFFIX.STARTED}`,\n PREVIEW_FINISHED: `${ANALYTICS_PREFIX.PREVIEW}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Verify events\n VERIFY_STARTED: `${ANALYTICS_PREFIX.VERIFY}.${ANALYTICS_SUFFIX.STARTED}`,\n VERIFY_FINISHED: `${ANALYTICS_PREFIX.VERIFY}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Publish events\n PUBLISH_STARTED: `${ANALYTICS_PREFIX.PUBLISH}.${ANALYTICS_SUFFIX.STARTED}`,\n PUBLISH_FINISHED: `${ANALYTICS_PREFIX.PUBLISH}.${ANALYTICS_SUFFIX.FINISHED}`,\n} as const;\n\n/**\n * Type helper for analytics event types\n */\nexport type AnalyticsEventType = typeof ANALYTICS_EVENTS[keyof typeof ANALYTICS_EVENTS];\n\n/**\n * Actor configuration for Release analytics\n */\nexport const ANALYTICS_ACTOR = {\n type: 'agent' as const,\n id: 'release-cli',\n} as const;\n\n"]}
|
|
1
|
+
{"version":3,"sources":["../../home/runner/work/kb-labs/kb-labs/plugins/release/manager-cli/src/manifest.ts","../../home/runner/work/kb-labs/kb-labs/plugins/release/manager-cli/src/shared/resolve-scope.ts","../../home/runner/work/kb-labs/kb-labs/plugins/release/manager-cli/src/shared/utils.ts","../../home/runner/work/kb-labs/kb-labs/plugins/release/manager-cli/src/shared/resolve-plan.ts","../../home/runner/work/kb-labs/kb-labs/plugins/release/manager-cli/src/infra/analytics/events.ts"],"names":["join","readFile"],"mappings":";;;;;;;;;AAoCA,IAAM,iBAAA,GAAoB,oBAAmB,CAC1C,IAAA,CAAK,iBAAiB,CAAA,CACtB,IAAA,CAAK,gBAAgB,CAAA,CACrB,IAAA,CAAK,gBAAgB,CAAA,CACrB,IAAA,CAAK,mBAAmB,CAAA,CACxB,OAAA,CAAQ,CAAC,cAAA,EAAgB,UAAU,CAAC,CAAA,CACpC,MAAA,CAAO;AAAA,EACN,IAAA,EAAM,WAAA;AAAA,EACN,KAAA,EAAO;AAAA,IACL,gBAAA;AAAA,IACA,cAAA;AAAA,IACA,iBAAA;AAAA,IACA,qBAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA;AAAA;AACF;AAEF,CAAC,EACA,SAAA,CAAU;AAAA,EACT,OAAO,CAAC,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,OAAO,MAAM,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAK3C,aAAA,EAAe;AACjB,CAAC,EACA,YAAA,CAAa;AAAA,EACZ,KAAA,EAAO,CAAC,oBAAoB,CAA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BAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAG1E,gBAAgB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACtE,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,MAAM,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA,CAAA;AAAA;AAAA,EAGxE,iBAAiB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,OAAO,CAAA,CAAA;AAAA,EACxE,kBAAkB,CAAA,EAAG,gBAAA,CAAiB,OAAO,CAAA,CAAA,EAAI,iBAAiB,QAAQ,CAAA;AAC5E;AAUO,IAAM,eAAA,GAAkB;AAAA,EAC7B,IAAA,EAAM,OAAA;AAAA,EACN,EAAA,EAAI;AACN","file":"index.js","sourcesContent":["/**\n * KB Labs Release Manager - Manifest V3\n *\n * Migration from V2 to V3 following best practices from V3-MIGRATION-GUIDE.md\n *\n * Key changes:\n * - Schema: kb.plugin/3\n * - Commands use handler#default suffix\n * - Commands have handlerPath field\n * - Permissions moved to manifest level\n * - All imports from @kb-labs/sdk\n */\n\nimport {\n defineCommandFlags,\n combinePermissions,\n gitWorkflowPreset,\n kbPlatformPreset,\n npmPublishPreset,\n ciEnvironmentPreset,\n} from '@kb-labs/sdk';\nimport {\n RELEASE_BASE_PATH,\n RELEASE_ROUTES,\n RELEASE_CACHE_PREFIX,\n} from '@kb-labs/release-manager-contracts';\nimport { CHECKS_CONCURRENCY } from '@kb-labs/release-manager-core';\n\n/**\n * Build permissions using presets:\n * - gitWorkflow: HOME, USER, GIT_*, SSH_* for git/changelog operations\n * - kbPlatform: KB_* env vars and .kb/ directory\n * - npmPublish: NPM_TOKEN, npm registry access for publishing\n * - ciEnvironment: CI, GITHUB_TOKEN for CI/CD integrations\n * - Custom: KB_RELEASE_*, additional fs paths\n */\nconst pluginPermissions = combinePermissions()\n .with(gitWorkflowPreset)\n .with(kbPlatformPreset)\n .with(npmPublishPreset)\n .with(ciEnvironmentPreset)\n .withEnv(['KB_RELEASE_*', 'NODE_ENV'])\n .withFs({\n mode: 'readWrite',\n allow: [\n '.kb/release/**',\n 'package.json',\n '**/package.json',\n 'pnpm-workspace.yaml',\n '**/*.yml',\n '**/*.yaml',\n 'CHANGELOG.md',\n '**/CHANGELOG.md',\n ],\n // Note: deny patterns (*.key, *.secret, node_modules) are enforced by platform\n })\n .withShell({\n allow: ['bash', 'git', 'npm', 'npx', 'pnpm'], // release gates/builds plus git, npm publishing, and configurable pnpm scripts\n // Must match CHECKS_CONCURRENCY (manager-core/src/checks.ts): the process\n // broker grants at most this many concurrent shells per plugin, so a lower\n // value here throttles perPackage check batches to 1-at-a-time and can\n // blow their timeout; a higher value defeats the plugin's own batching.\n maxConcurrent: CHECKS_CONCURRENCY,\n })\n .withPlatform({\n cache: [RELEASE_CACHE_PREFIX], // Cache namespace prefix for plan/changelog caching\n llm: true, // LLM for changelog generation\n analytics: true, // Track release events\n })\n .withQuotas({\n // 30 min default for complex releases (167 packages); overridable via\n // KB_RELEASE_CHECKS_TIMEOUT_MS for profiling/tuning without a rebuild.\n timeoutMs: Number(process.env.KB_RELEASE_CHECKS_TIMEOUT_MS) || 1800000,\n memoryMb: 4096, // full platform build:affected across 167 packages peaked at ~2.05GB on a CI runner, right at the old 2048 ceiling\n cpuMs: 300000, // 5 min CPU time\n })\n .build();\n\nexport const manifest = {\n schema: 'kb.plugin/3',\n id: '@kb-labs/release',\n version: '0.1.0',\n\n display: {\n name: 'Release Manager',\n description: 'Plan, execute, and audit releases across your workspace',\n tags: ['release', 'publish', 'versioning'],\n },\n\n // Platform requirements\n platform: {\n requires: ['storage', 'cache'], // cache required for plan/changelog caching\n optional: ['llm', 'analytics', 'logger'],\n },\n\n // Setup handler - V3 pattern\n setup: {\n handler: './setup/handler.js#default',\n describe: 'Prepare the .kb/release workspace (plans, reports, backups).',\n },\n\n // CLI commands - V3 format\n cli: {\n groupMeta: [\n { path: 'release', describe: 'Release management commands' },\n ],\n commands: [\n // release:plan - Analyze changes and prepare release plan\n {\n path: 'release plan',\n category: 'Pipeline',\n describe: 'Analyze changes and prepare release plan',\n operationType: 'analyze' as const,\n longDescription: 'Detect modified packages and compute version bumps based on changes',\n\n handler: './cli/commands/plan.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump strategy',\n },\n channel: {\n type: 'string',\n choices: ['stable', 'canary'] as const,\n default: 'stable',\n description: 'Release channel — canary previews the -canary.<shortsha> version shape',\n },\n json: { type: 'boolean', description: 'Print plan as JSON' },\n }),\n\n examples: [\n 'kb release plan',\n 'kb release plan --scope packages/*',\n 'kb release plan --bump minor',\n 'kb release plan --channel canary',\n 'kb release plan --json',\n ],\n },\n\n // release:run - Execute release process\n {\n path: 'release run',\n category: 'Pipeline',\n describe: 'Execute release process (plan, check, publish)',\n operationType: 'execute' as const,\n longDescription: 'Run full release: plan versions, run checks, publish packages',\n\n handler: './cli/commands/run.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope or glob pattern (e.g. @my-org/core, packages/*)' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump override (default: auto-detect from commits)',\n },\n strict: { type: 'boolean', description: 'Fail on any check failure' },\n channel: {\n type: 'string',\n choices: ['stable', 'canary'] as const,\n default: 'stable',\n description: 'Release channel — canary publishes straight to npm under a prerelease tag, no git commit/tag',\n },\n 'dry-run': { type: 'boolean', description: 'Simulate release without publishing or tagging' },\n 'skip-checks': { type: 'boolean', description: 'Skip pre-release checks' },\n 'skip-build': { type: 'boolean', description: 'Skip build step' },\n 'skip-verify': { type: 'boolean', description: 'Skip artifact verification (npm pack check)' },\n 'skip-publish': {\n type: 'boolean',\n description: 'Prepare-only: build, version, changelog, git commit/tag — never publish to npm. No npm credentials required. Pair with a tag-triggered CI job running `kb release promote`.',\n },\n 'no-verify': { type: 'boolean', description: 'Pass --no-verify to git push (bypasses pre-push hooks)' },\n yes: { type: 'boolean', description: 'Skip confirmation prompt — for CI/headless mode' },\n json: { type: 'boolean', description: 'Print result as JSON' },\n }),\n\n examples: [\n 'kb release run',\n 'kb release run --dry-run',\n 'kb release run --yes',\n 'kb release run --yes --no-verify',\n 'kb release run --bump minor --yes',\n 'kb release run --scope @my-org/core',\n 'kb release run --skip-checks --skip-build',\n 'kb release run --strict --json',\n 'kb release run --channel canary --yes',\n 'kb release run --flow platform --skip-publish --yes',\n ],\n },\n\n // release:publish - Publish packages to npm\n {\n path: 'release publish',\n category: 'Publish',\n describe: 'Publish packages to npm registry',\n operationType: 'execute' as const,\n longDescription: 'Smart npm publish with interactive 2FA support and better UX',\n\n handler: './cli/commands/publish.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate publish without actually publishing' },\n tag: { type: 'string', description: 'NPM dist-tag (default: latest)' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release publish',\n 'kb release publish --scope @kb-labs/core',\n 'kb release publish --otp 123456',\n 'kb release publish --dry-run',\n 'kb release publish --tag next --access public',\n ],\n },\n\n // release:stage - Pack the currently-committed versions into real tarballs, once\n {\n path: 'release stage',\n category: 'Publish',\n describe: 'Pack the currently-committed package versions for a flow into real npm tarballs, once, for `release deliver` to ship',\n operationType: 'execute' as const,\n longDescription:\n 'Produces the actual npm tarball artifacts for a flow\\'s already-committed package.json versions ' +\n '— no re-bump, no rebuild. Writes a manifest.json (name/version/tarball/sha256) alongside the tarballs. ' +\n 'Intended to run once in CI right after checking out a release tag; every `release deliver` target then ' +\n 'ships these exact bytes instead of re-packing independently. Not the same command as `release pack` ' +\n '(that one verifies proposed packages before a release is decided; this one packs an already-decided one).',\n\n handler: './cli/commands/stage.js#default',\n\n flags: defineCommandFlags({\n 'release-tag': { type: 'string', description: 'Git tag to resolve {flow, channel} from (via release.flows[*].tagPattern) — alternative to --flow' },\n flow: { type: 'string', description: 'Named flow — selects packages the same way `release run --flow` does (e.g. excludes sdk from platform)' },\n 'out-dir': { type: 'string', description: 'Output directory for tarballs + manifest.json (default: .kb/release/artifacts)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release stage --flow platform',\n 'kb release stage --release-tag platform-v2.105.0',\n 'kb release stage --flow sdk --out-dir .kb/release/artifacts',\n ],\n },\n\n // release:stage-plan - Publish a release plan's PLANNED versions to a\n // local staging registry, before Bump versions has run\n {\n path: 'release stage plan',\n category: 'Publish',\n describe: 'Publish a release plan\\'s planned package versions to a local staging registry (Verdaccio)',\n operationType: 'execute' as const,\n longDescription:\n 'Runs BEFORE version bump, off the in-memory plan `release plan` already computed. Publishes each plan ' +\n 'package at its PLANNED nextVersion — internal sibling dependencies rewritten to `^nextVersion` too — to ' +\n '--registry, so the `pack-install` Checks gate can verify cross-package dependencies against the version ' +\n 'this release is about to ship instead of whatever is already live on npm. Distinct from `release stage`, ' +\n 'which packs already-committed, already-bumped versions for CI delivery after approval.',\n\n handler: './cli/commands/stage-plan.js#default',\n\n flags: defineCommandFlags({\n 'plan-path': { type: 'string', description: 'Path to the plan.json written by `release plan`' },\n registry: { type: 'string', description: 'Target staging registry URL (e.g. http://localhost:4873)' },\n flow: { type: 'string', description: 'Named flow — used only to resolve config for package discovery' },\n token: { type: 'string', description: 'Auth token to send (default: \"verdaccio-local\" — a placeholder; the staging registry allows anonymous publish)' },\n tag: { type: 'string', description: 'npm dist-tag to publish under (default: \"latest\")' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release stage plan --flow platform --plan-path .kb/release/plans/root/current/plan.json --registry http://localhost:4873',\n ],\n },\n\n // release:clean-install - Shared install-verification used by both\n // check-pack-install.sh and `release stage`\n {\n path: 'release clean install',\n category: 'Publish',\n describe: 'Install a packed tarball into a throwaway consumer and confirm it imports cleanly',\n operationType: 'execute' as const,\n longDescription:\n 'Installs --tarball into a fresh, outside-the-workspace consumer project and confirms --name can be ' +\n 'imported afterward. Shared by check-pack-install.sh (local release gate) and `release stage` (CI publish ' +\n 'path) so both use identical verification — catches an already-published PEER dependency that is itself ' +\n 'broken, which static manifest checks cannot see. Surfaces the real failure reason via @npmcli/arborist ' +\n 'directly; plain `npm install` swallows this exact failure class as an unhandled rejection with no usable error.',\n\n handler: './cli/commands/verify-clean-install.js#default',\n\n flags: defineCommandFlags({\n tarball: { type: 'string', description: 'Path to the packed tarball to install' },\n name: { type: 'string', description: 'Package name to import after install' },\n registry: { type: 'string', description: 'Registry override for ALL dependency resolution (default: real npm) — e.g. a local staging Verdaccio' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n additionalTarballs: {\n type: 'string',\n description:\n 'Comma-separated tarball paths for workspace siblings. Forces pnpm to install these exact local ' +\n 'artifacts via pnpm.overrides instead of resolving the same package names from the real npm registry ' +\n '— required with --package-manager pnpm to avoid silently testing an already-published, possibly ' +\n 'stale, version of an in-repo sibling.',\n },\n packageManager: {\n type: 'string',\n description: '\"pnpm\" enables the additionalTarballs override path; \"npm\" (default) keeps the plain Arborist install.',\n },\n }),\n\n examples: [\n 'kb release clean install --tarball ./kb-labs-sdk-2.115.0.tgz --name @kb-labs/sdk',\n 'kb release clean install --tarball ./a.tgz --name @kb-labs/a --package-manager pnpm --additional-tarballs ./b.tgz,./c.tgz',\n ],\n },\n\n // release:promote - Promote an already-released version to npm\n {\n path: 'release promote',\n category: 'Publish',\n describe: 'Promote already-released package versions to npm (no re-bump, no rebuild)',\n operationType: 'execute' as const,\n longDescription:\n 'Publishes the CURRENT on-disk package.json versions to npm — no version bump, no rebuild. ' +\n 'Intended to run after `release run --channel stable` (typically targeting Verdaccio via ' +\n 'config.registry): once that run is verified, `release promote` pushes the exact same, ' +\n 'already-committed versions to npm under the stable dist-tag.',\n\n handler: './cli/commands/promote.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named flow — selects packages the same way `release run --flow` does (e.g. excludes sdk from platform)' },\n tag: { type: 'string', description: 'npm dist-tag override (default: config.publish.stableTag, falls back to \"latest\")' },\n registry: { type: 'string', description: 'Registry override (default: config.publish.npmRegistry, falls back to real npm)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate promote without actually publishing' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release promote',\n 'kb release promote --flow platform',\n 'kb release promote --flow sdk',\n 'kb release promote --scope @kb-labs/core',\n 'kb release promote --dry-run',\n 'kb release promote --tag next',\n ],\n },\n\n // release:deliver - Ship a `release stage`d artifact to a target (npm)\n {\n path: 'release deliver',\n category: 'Publish',\n describe: 'Ship the tarballs `release stage` already packed to a target — no packing, no rebuild',\n operationType: 'execute' as const,\n longDescription:\n 'CI-side half of the \"plugin prepares, CI delivers\" release flow: reads manifest.json written by ' +\n '`release stage` and ships those exact tarballs to --target (only \"npm\" is implemented this pass). ' +\n 'Resolves {flow, channel} from --release-tag via release.flows[*].tagPattern so CI never needs to ' +\n 'guess the flow itself — just pass the tag. Verifies the delivery against the real registry ' +\n 'afterwards (with retry, since real npm has propagation lag); never attempts npm unpublish on a ' +\n 'verification failure — that is a human decision.',\n\n handler: './cli/commands/deliver.js#default',\n\n flags: defineCommandFlags({\n 'release-tag': { type: 'string', description: 'Git tag to resolve {flow, channel} from (via release.flows[*].tagPattern) — alternative to --flow' },\n flow: { type: 'string', description: 'Named flow — alternative to --release-tag' },\n target: { type: 'string', choices: ['npm'] as const, description: 'Delivery target (default: npm — the only target implemented this pass)' },\n 'artifacts-dir': { type: 'string', description: 'Where `release stage` wrote tarballs + manifest.json (default: .kb/release/artifacts)' },\n tag: { type: 'string', description: 'npm dist-tag override (default: config.publish.stableTag, falls back to \"latest\")' },\n registry: { type: 'string', description: 'Registry override (default: config.publish.npmRegistry, falls back to real npm)' },\n otp: { type: 'string', description: 'One-time password (optional, will prompt if needed)' },\n 'dry-run': { type: 'boolean', description: 'Simulate delivery without actually publishing' },\n access: {\n type: 'string',\n choices: ['public', 'restricted'] as const,\n description: 'Package access level',\n },\n token: { type: 'string', description: 'NPM auth token (overrides NPM_TOKEN env)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release deliver --release-tag platform-v2.105.0 --target npm',\n 'kb release deliver --flow sdk --target npm',\n 'kb release deliver --release-tag sdk-v3.2.0 --dry-run',\n ],\n },\n\n // release:rollback - Rollback last release\n {\n path: 'release rollback',\n category: 'Utilities',\n describe: 'Rollback last release',\n operationType: 'mutate' as const,\n longDescription: 'Restore workspace state from backup snapshot',\n\n handler: './cli/commands/rollback.js#default',\n\n flags: defineCommandFlags({\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: ['kb release rollback', 'kb release rollback --json'],\n },\n\n // release:report - Show last release report\n {\n path: 'release report',\n category: 'Utilities',\n describe: 'Show last release report',\n operationType: 'read' as const,\n longDescription: 'Display the most recent release execution report',\n\n handler: './cli/commands/report.js#default',\n\n flags: defineCommandFlags({\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: ['kb release report', 'kb release report --json'],\n },\n\n // release:status - What is actually stable vs. candidate right now\n {\n path: 'release status',\n category: 'Utilities',\n describe: 'Show what is actually stable vs. candidate for a flow (git tag, npm dist-tags, recent candidate CI)',\n operationType: 'read' as const,\n longDescription: 'Cross-checks the latest stable git tag against real npm dist-tags and recent candidate CI runs, and flags drift — a tag or npm publish existing is not the same as a verified, promoted release.',\n\n handler: './cli/commands/status.js#default',\n\n flags: defineCommandFlags({\n flow: { type: 'string', description: 'Named release flow from release.flows (e.g. \"platform\", \"sdk\")', required: true },\n ci: { type: 'boolean', description: 'Include recent candidate CI run status (default: true)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: ['kb release status --flow platform', 'kb release status --flow sdk --json'],\n },\n\n // release:changelog - Generate changelog\n {\n path: 'release changelog',\n category: 'Utilities',\n describe: 'Generate changelog from conventional commits',\n operationType: 'read' as const,\n longDescription: 'Parse git history and generate changelog with conventional commits support',\n\n handler: './cli/commands/changelog.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Filter to specific package' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n from: { type: 'string', description: 'Start commit/tag' },\n to: { type: 'string', description: 'End commit/tag (default: HEAD)' },\n 'since-tag': { type: 'string', description: 'Shorthand for --from <tag>' },\n format: {\n type: 'string',\n choices: ['json', 'md', 'both'] as const,\n default: 'both',\n description: 'Output format',\n },\n level: {\n type: 'string',\n choices: ['compact', 'standard', 'detailed'] as const,\n default: 'standard',\n description: 'Detail level',\n },\n template: {\n type: 'string',\n description:\n 'Template name (builtin: corporate, corporate-ai, technical, compact) or custom path',\n },\n 'breaking-only': { type: 'boolean', description: 'Show only breaking changes' },\n include: { type: 'string', description: 'Comma-separated types to include' },\n exclude: { type: 'string', description: 'Types to exclude' },\n 'workspace-only': { type: 'boolean', description: 'Only workspace changelog' },\n 'per-package': { type: 'boolean', description: 'Only per-package changelogs' },\n force: { type: 'boolean', description: 'Skip audit gate' },\n 'allow-major': { type: 'boolean', description: 'Allow major bumps for experimental packages' },\n preid: { type: 'string', description: 'Pre-release identifier (rc, beta, alpha)' },\n }),\n\n examples: [\n 'kb release changelog',\n 'kb release changelog --from v1.0.0',\n 'kb release changelog --format md --level detailed',\n 'kb release changelog --template corporate-ai',\n 'kb release changelog --template ./my-template.ts',\n 'kb release changelog --breaking-only',\n ],\n },\n\n // release:verify - Validate release readiness\n {\n path: 'release verify',\n category: 'Validation',\n describe: 'Validate release readiness',\n operationType: 'analyze' as const,\n longDescription: 'Validate release readiness via flag gates (packages, breaking changes, commit types)',\n\n handler: './cli/commands/verify.js#default',\n\n flags: defineCommandFlags({\n 'fail-if-empty': { type: 'boolean', description: 'Fail if no version bumps needed' },\n 'fail-on-breaking': { type: 'boolean', description: 'Fail if breaking changes detected' },\n 'allow-types': {\n type: 'string',\n description: 'Comma-separated types required (e.g., feat,fix)',\n },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release verify',\n 'kb release verify --fail-if-empty',\n 'kb release verify --allow-types feat,fix',\n ],\n },\n\n // release:checks - Run pre-release checks\n {\n path: 'release checks',\n category: 'Validation',\n describe: 'Run pre-release checks from release config',\n operationType: 'analyze' as const,\n longDescription: 'Execute custom checks defined in release config (lint, test, audit, etc.)',\n\n handler: './cli/commands/checks.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release checks',\n 'kb release checks --scope @my-org/core',\n 'kb release checks --json',\n ],\n },\n\n // release:build - Build packages\n {\n path: 'release build',\n category: 'Publish',\n describe: 'Build packages from release plan',\n operationType: 'execute' as const,\n longDescription: 'Build all packages in plan into temp dir then atomically swap dist/',\n\n handler: './cli/commands/build.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release build',\n 'kb release build --scope platform',\n 'kb release build --json',\n ],\n },\n\n // release:pack - Verify npm artifacts\n {\n path: 'release pack',\n category: 'Publish',\n describe: 'Verify built package artifacts via npm pack',\n operationType: 'execute' as const,\n longDescription: 'Run npm pack checks: directory imports, test file leaks, missing exports, syntax errors',\n\n handler: './cli/commands/pack.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release pack',\n 'kb release pack --scope @my-org/core',\n 'kb release pack --json',\n ],\n },\n\n // release:version - Bump package.json versions\n {\n path: 'release version',\n category: 'Publish',\n describe: 'Bump package.json versions per release plan',\n operationType: 'mutate' as const,\n longDescription: 'Update version fields in package.json files based on computed plan',\n\n handler: './cli/commands/version.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n default: 'auto',\n description: 'Version bump override',\n },\n 'dry-run': { type: 'boolean', description: 'Show what would be bumped without writing' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release version',\n 'kb release version --bump minor',\n 'kb release version --dry-run',\n 'kb release version --scope platform --json',\n ],\n },\n\n // release:git - Commit, tag, push\n {\n path: 'release git',\n category: 'Publish',\n describe: 'Commit, tag, and push release changes',\n operationType: 'mutate' as const,\n longDescription: 'Create release commit, create version tags, and push to remote',\n\n handler: './cli/commands/git.js#default',\n\n flags: defineCommandFlags({\n scope: { type: 'string', description: 'Package scope (glob pattern)' },\n flow: { type: 'string', description: 'Named release flow from release.flows' },\n bump: {\n type: 'string',\n choices: ['patch', 'minor', 'major', 'auto'] as const,\n description: 'Version bump override (used to reload plan)',\n },\n 'dry-run': { type: 'boolean', description: 'Skip git operations' },\n 'no-verify': { type: 'boolean', description: 'Pass --no-verify to git push' },\n json: { type: 'boolean', description: 'Output in JSON format' },\n }),\n\n examples: [\n 'kb release git',\n 'kb release git --scope platform',\n 'kb release git --dry-run',\n 'kb release git --no-verify --json',\n ],\n },\n ],\n },\n\n // REST API routes - V3 format (scope-based architecture)\n rest: {\n basePath: RELEASE_BASE_PATH,\n routes: [\n // GET /scopes - List available release scopes\n {\n method: 'GET',\n path: RELEASE_ROUTES.SCOPES,\n handler: './rest/handlers/scopes-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ScopesResponseSchema',\n },\n },\n // GET /status - Get release status for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.STATUS,\n handler: './rest/handlers/status-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#StatusResponseSchema',\n },\n },\n // GET /plan - Get current release plan for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.PLAN,\n handler: './rest/handlers/plan-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#PlanInputSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#PlanResponseSchema',\n },\n },\n // POST /generate - Generate release plan (LLM)\n {\n method: 'POST',\n path: RELEASE_ROUTES.GENERATE,\n handler: './rest/handlers/generate-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#GeneratePlanRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#GeneratePlanResponseSchema',\n },\n timeoutMs: 120000, // 2 minutes for LLM analysis\n },\n // DELETE /plan - Reset release plan\n {\n method: 'DELETE',\n path: RELEASE_ROUTES.RESET,\n handler: './rest/handlers/reset-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#ResetPlanRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#ResetPlanResponseSchema',\n },\n },\n // GET /changelog - Get changelog for a scope\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHANGELOG,\n handler: './rest/handlers/changelog-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#ChangelogInputSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#ChangelogResponseSchema',\n },\n },\n // POST /changelog/generate - Generate changelog (LLM)\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHANGELOG_GENERATE,\n handler: './rest/handlers/changelog-generate-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#GenerateChangelogRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#GenerateChangelogResponseSchema',\n },\n timeoutMs: 120000, // 2 minutes for LLM generation\n },\n // POST /changelog/save - Save edited changelog\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHANGELOG_SAVE,\n handler: './rest/handlers/changelog-save-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#SaveChangelogRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#SaveChangelogResponseSchema',\n },\n },\n // POST /run - Execute release process\n {\n method: 'POST',\n path: RELEASE_ROUTES.RUN,\n handler: './rest/handlers/run-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#RunReleaseRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#RunReleaseResponseSchema',\n },\n timeoutMs: 300000, // 5 minutes for release execution\n },\n // GET /report - Get latest release report\n {\n method: 'GET',\n path: RELEASE_ROUTES.REPORT,\n handler: './rest/handlers/report-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ReportResponseSchema',\n },\n },\n // GET /history - Get release history\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY,\n handler: './rest/handlers/history-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryResponseSchema',\n },\n },\n // GET /history/:id/report - Get historical release report\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_REPORT,\n handler: './rest/handlers/history-report-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryReportResponseSchema',\n },\n },\n // GET /history/:id/plan - Get historical release plan\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_PLAN,\n handler: './rest/handlers/history-plan-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryPlanResponseSchema',\n },\n },\n // GET /history/:id/changelog - Get historical changelog\n {\n method: 'GET',\n path: RELEASE_ROUTES.HISTORY_CHANGELOG,\n handler: './rest/handlers/history-changelog-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#HistoryChangelogResponseSchema',\n },\n },\n // GET /git-timeline - Get git commit timeline and version preview\n {\n method: 'GET',\n path: RELEASE_ROUTES.GIT_TIMELINE,\n handler: './rest/handlers/git-timeline-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#GitTimelineResponseSchema',\n },\n },\n // GET /preview - Preview package contents before publish\n {\n method: 'GET',\n path: RELEASE_ROUTES.PREVIEW,\n handler: './rest/handlers/preview-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#PreviewResponseSchema',\n },\n },\n // POST /build - Trigger package build\n {\n method: 'POST',\n path: RELEASE_ROUTES.BUILD,\n handler: './rest/handlers/build-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#BuildRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#BuildResponseSchema',\n },\n timeoutMs: 300000, // 5 minutes for build\n },\n // GET /checklist - Get unified release checklist status\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHECKLIST,\n handler: './rest/handlers/checklist-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#ReleaseChecklistSchema',\n },\n },\n // GET /checks - Get list of configured checks (without running them)\n {\n method: 'GET',\n path: RELEASE_ROUTES.CHECKS,\n handler: './rest/handlers/get-checks-handler.js#default',\n output: {\n zod: '@kb-labs/release-manager-contracts#GetChecksResponseSchema',\n },\n },\n // POST /checks/run - Run pre-release checks from kb.config.json release.checks\n {\n method: 'POST',\n path: RELEASE_ROUTES.CHECKS_RUN,\n handler: './rest/handlers/run-checks-handler.js#default',\n input: {\n zod: '@kb-labs/release-manager-contracts#RunChecksRequestSchema',\n },\n output: {\n zod: '@kb-labs/release-manager-contracts#RunChecksResponseSchema',\n },\n timeoutMs: 600000, // 10 minutes - all checks combined\n },\n ],\n },\n\n // Studio V2 — Module Federation pages\n studio: {\n version: 2 as const,\n remoteName: 'releasePlugin',\n pages: [\n {\n id: 'release.overview',\n title: 'Release',\n icon: 'RocketOutlined',\n route: '/p/release',\n entry: './ReleasePage',\n order: 1,\n },\n ],\n menus: [\n {\n id: 'release',\n label: 'Release',\n icon: 'RocketOutlined',\n target: 'release.overview',\n order: 60,\n },\n ],\n },\n\n // Studio widgets (legacy - commented out, using new UI integration)\n // studio_legacy: {\n // widgets: [\n // {\n // id: 'release.plan',\n // kind: 'infopanel',\n // title: 'Latest Release Plan',\n // description: 'Shows the most recent release plan generated via `kb release plan`.',\n // data: {\n // source: {\n // type: 'rest',\n // routeId: 'plan/latest',\n // method: 'GET',\n // },\n // },\n // layoutHint: {\n // w: 4,\n // h: 5,\n // minW: 3,\n // minH: 3,\n // },\n // },\n // {\n // id: 'release.report',\n // kind: 'cardlist',\n // title: 'Release Report',\n // description: 'Status of the last release execution.',\n // data: {\n // source: {\n // type: 'rest',\n // routeId: 'report/latest',\n // method: 'GET',\n // },\n // },\n // options: {\n // layout: 'list',\n // },\n // layoutHint: {\n // w: 4,\n // h: 4,\n // minW: 3,\n // minH: 3,\n // },\n // },\n // ],\n // menus: [\n // {\n // id: 'release-menu',\n // label: 'Release',\n // icon: 'RocketOutlined',\n // target: '/plugins/release/dashboard',\n // order: 0,\n // },\n // {\n // id: 'release-dashboard',\n // label: 'Dashboard',\n // icon: 'DashboardOutlined',\n // parentId: 'release-menu',\n // target: '/plugins/release/dashboard',\n // order: 1,\n // },\n // ],\n // layouts: [\n // {\n // id: 'release.dashboard',\n // kind: 'grid',\n // title: 'Release Dashboard',\n // description: 'Overview of release planning and execution.',\n // config: {\n // cols: { sm: 2, md: 4, lg: 6 },\n // rowHeight: 5,\n // },\n // },\n // ],\n // },\n\n // Auto-detects kb.config.json section for useConfig()\n // maps to profiles[].products.release in kb.config.json\n configSection: 'release',\n\n capabilities: ['fs:read', 'fs:write'],\n\n // V3: Manifest-first permissions using composable presets\n permissions: pluginPermissions,\n\n // Workflow templates — composed from atomic release CLI commands\n // Registered in workflow engine and runnable via `kb workflow run plugin:@kb-labs/release/<id>`\n workflows: {\n handlers: [],\n templates: [\n {\n id: 'full-release',\n path: './workflows/templates/full-release.yaml',\n describe: 'Full release cycle: plan → checks → build → pack → approve → publish → git',\n tags: ['release', 'full'],\n },\n {\n id: 'hotfix',\n path: './workflows/templates/hotfix.yaml',\n describe: 'Quick hotfix: plan → approve → publish → git (patch bump, no checks)',\n tags: ['release', 'hotfix'],\n },\n {\n id: 'dry-run',\n path: './workflows/templates/dry-run.yaml',\n describe: 'Preview release: plan, checks, pack, changelog — no publish or git ops',\n tags: ['release', 'dry-run'],\n },\n ],\n },\n\n // Artifacts\n artifacts: [\n {\n id: 'release.plan.json',\n pathTemplate: '.kb/release/plan.json',\n description: 'Serialized release plan generated by `kb release plan`.',\n },\n {\n id: 'release.report.json',\n pathTemplate: '.kb/release/report.json',\n description: 'Execution report emitted by `kb release run`.',\n },\n {\n id: 'release.changelog.md',\n pathTemplate: '.kb/release/changelog.md',\n description: 'Workspace changelog output produced during release.',\n },\n ],\n};\n\nexport default manifest;\n","import { join } from 'node:path';\nimport { readFile } from 'node:fs/promises';\nimport globby from 'globby';\n\n/**\n * Resolve scope name to absolute filesystem path.\n * Scans all package.json in repoRoot to find the matching package by name.\n */\nexport async function resolveScopePath(repoRoot: string, scope: string): Promise<string> {\n if (scope === 'root') {\n return repoRoot;\n }\n\n if (scope.startsWith('@')) {\n const packageJsonPaths = await globby('**/package.json', {\n cwd: repoRoot,\n absolute: true,\n onlyFiles: true,\n ignore: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.git/**', '**/.*/**'],\n });\n\n for (const pkgJsonPath of packageJsonPaths) {\n try {\n const pkg = JSON.parse(await readFile(pkgJsonPath, 'utf-8'));\n if (pkg.name === scope) {\n return join(pkgJsonPath, '..');\n }\n } catch { /* skip */ }\n }\n }\n\n // Direct path or fallback\n return join(repoRoot, scope);\n}\n","export { findRepoRoot } from '@kb-labs/sdk';\nexport { resolveScopePath } from './resolve-scope';\n\n/**\n * Converts scope to safe directory name\n */\nexport function scopeToDir(scope: string): string {\n return scope\n .replace(/^@/, '')\n .replace(/\\//g, '-')\n .replace(/:/g, '-')\n .replace(/\\*/g, '');\n}\n\n/**\n * Converts safe directory name back to scope\n */\nexport function dirToScope(dirName: string): string {\n if (dirName === 'root') {\n return 'root';\n }\n\n const parts = dirName.split('-');\n if (parts.length >= 2) {\n return '@' + parts[0] + '-' + parts[1] + '/' + parts.slice(2).join('-');\n }\n\n return dirName;\n}\n","/**\n * Plan resolution shared by the atomic release steps that must act on the\n * SAME plan (`release:version` → `release:git`).\n *\n * Why this exists: each step used to call planRelease() independently and\n * hope the results matched. They don't have to — planning is a function of\n * disk state, and the step in between mutates exactly that state. A plan\n * re-derived after `release:version` sees the bumped versions as the new\n * baseline and bumps again, so the tag/commit message end up one version\n * ahead of the package.json files actually being committed.\n *\n * The plan written by `release:plan` is the single source of truth for a\n * pipeline run. It is only reused when it provably describes the current\n * state of the working tree, so a stale artifact (plan.json is committed to\n * the repo, so one is always present) can never be adopted silently.\n */\n\nimport { join } from 'node:path';\nimport { readFile } from 'node:fs/promises';\nimport {\n planRelease,\n type ReleasePlan,\n type ReleaseConfig,\n type VersionBump,\n type ReleaseChannel,\n} from '@kb-labs/release-manager-core';\nimport { scopeToDir } from './utils';\n\n/**\n * Which side of the version bump the caller sits on — determines which field\n * of the plan the on-disk package.json versions are expected to match.\n */\nexport type PlanStage =\n /** `release:version`: bump not applied yet, disk should still be at currentVersion. */\n | 'pre-bump'\n /** `release:git`: bump already applied, disk should be at nextVersion. */\n | 'post-bump';\n\nexport interface ResolvePlanOptions {\n repoRoot: string;\n config: ReleaseConfig;\n scope?: string;\n flow?: string;\n bumpOverride?: VersionBump;\n channel?: ReleaseChannel;\n stage: PlanStage;\n}\n\nexport interface ResolvedPlan {\n plan: ReleasePlan;\n /** 'artifact' — reused the plan from `release:plan`; 'computed' — planned fresh. */\n source: 'artifact' | 'computed';\n /** Why the artifact was rejected, when source is 'computed' and one existed. */\n reason?: string;\n}\n\nexport function releasePlanPath(repoRoot: string, scope?: string): string {\n return join(repoRoot, '.kb', 'release', 'plans', scopeToDir(scope ?? 'root'), 'current', 'plan.json');\n}\n\nasync function readDiskVersion(packagePath: string): Promise<string | undefined> {\n try {\n const raw = await readFile(join(packagePath, 'package.json'), 'utf-8');\n return (JSON.parse(raw) as { version?: string }).version;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Reject the persisted plan unless every package it covers is on disk at the\n * version this stage expects. That single check subsumes staleness, partial\n * runs, and out-of-band edits: any of them show up as a version mismatch.\n */\nasync function validateAgainstDisk(plan: ReleasePlan, stage: PlanStage): Promise<string | undefined> {\n const expectedField = stage === 'pre-bump' ? 'currentVersion' : 'nextVersion';\n\n for (const pkg of plan.packages) {\n const onDisk = await readDiskVersion(pkg.path);\n if (onDisk === undefined) {\n return `${pkg.name}: package.json not readable at ${pkg.path}`;\n }\n const expected = pkg[expectedField];\n if (onDisk !== expected) {\n return `${pkg.name}: expected ${expectedField} ${expected} on disk, found ${onDisk}`;\n }\n }\n\n return undefined;\n}\n\n/**\n * Load the plan produced by `release:plan` when it matches this run and the\n * working tree; otherwise plan fresh.\n */\nexport async function resolvePlan(options: ResolvePlanOptions): Promise<ResolvedPlan> {\n const { repoRoot, config, scope, flow, bumpOverride, channel, stage } = options;\n\n const computeFresh = async (reason?: string): Promise<ResolvedPlan> => ({\n plan: await planRelease({ cwd: repoRoot, config, scope, flow, bumpOverride, channel }),\n source: 'computed',\n ...(reason ? { reason } : {}),\n });\n\n let persisted: ReleasePlan;\n try {\n persisted = JSON.parse(await readFile(releasePlanPath(repoRoot, scope), 'utf-8')) as ReleasePlan;\n } catch {\n return computeFresh();\n }\n\n if (!Array.isArray(persisted.packages) || persisted.packages.length === 0) {\n return computeFresh('persisted plan has no packages');\n }\n\n // All flows share one scope-derived artifact path, so an unrelated flow's\n // plan can legitimately be sitting there. Never adopt it.\n if ((persisted.flow ?? undefined) !== (flow ?? undefined)) {\n return computeFresh(`persisted plan is for flow \"${persisted.flow ?? '<none>'}\", requested \"${flow ?? '<none>'}\"`);\n }\n if ((persisted.scope ?? undefined) !== (scope ?? undefined)) {\n return computeFresh(`persisted plan is for scope \"${persisted.scope ?? '<none>'}\", requested \"${scope ?? '<none>'}\"`);\n }\n if (channel !== undefined && persisted.channel !== channel) {\n return computeFresh(`persisted plan is for channel \"${persisted.channel}\", requested \"${channel}\"`);\n }\n\n const mismatch = await validateAgainstDisk(persisted, stage);\n if (mismatch) {\n return computeFresh(`persisted plan does not match working tree (${mismatch})`);\n }\n\n return { plan: persisted, source: 'artifact' };\n}\n","/**\n * Analytics event types for Release CLI\n * Centralized constants to prevent typos and enable type safety\n */\n\n/**\n * Event type prefixes by command\n */\nexport const ANALYTICS_PREFIX = {\n PLAN: 'release.plan',\n RUN: 'release.run',\n ROLLBACK: 'release.rollback',\n REPORT: 'release.report',\n CHANGELOG: 'release.changelog',\n PREVIEW: 'release.preview',\n VERIFY: 'release.verify',\n PUBLISH: 'release.publish',\n} as const;\n\n/**\n * Event lifecycle suffixes\n */\nexport const ANALYTICS_SUFFIX = {\n STARTED: 'started',\n FINISHED: 'finished',\n} as const;\n\n/**\n * Release analytics event types\n */\nexport const ANALYTICS_EVENTS = {\n // Plan events\n PLAN_STARTED: `${ANALYTICS_PREFIX.PLAN}.${ANALYTICS_SUFFIX.STARTED}`,\n PLAN_FINISHED: `${ANALYTICS_PREFIX.PLAN}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Run events\n RUN_STARTED: `${ANALYTICS_PREFIX.RUN}.${ANALYTICS_SUFFIX.STARTED}`,\n RUN_FINISHED: `${ANALYTICS_PREFIX.RUN}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Rollback events\n ROLLBACK_STARTED: `${ANALYTICS_PREFIX.ROLLBACK}.${ANALYTICS_SUFFIX.STARTED}`,\n ROLLBACK_FINISHED: `${ANALYTICS_PREFIX.ROLLBACK}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Report events\n REPORT_STARTED: `${ANALYTICS_PREFIX.REPORT}.${ANALYTICS_SUFFIX.STARTED}`,\n REPORT_FINISHED: `${ANALYTICS_PREFIX.REPORT}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Changelog events\n CHANGELOG_STARTED: `${ANALYTICS_PREFIX.CHANGELOG}.${ANALYTICS_SUFFIX.STARTED}`,\n CHANGELOG_FINISHED: `${ANALYTICS_PREFIX.CHANGELOG}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Preview events\n PREVIEW_STARTED: `${ANALYTICS_PREFIX.PREVIEW}.${ANALYTICS_SUFFIX.STARTED}`,\n PREVIEW_FINISHED: `${ANALYTICS_PREFIX.PREVIEW}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Verify events\n VERIFY_STARTED: `${ANALYTICS_PREFIX.VERIFY}.${ANALYTICS_SUFFIX.STARTED}`,\n VERIFY_FINISHED: `${ANALYTICS_PREFIX.VERIFY}.${ANALYTICS_SUFFIX.FINISHED}`,\n\n // Publish events\n PUBLISH_STARTED: `${ANALYTICS_PREFIX.PUBLISH}.${ANALYTICS_SUFFIX.STARTED}`,\n PUBLISH_FINISHED: `${ANALYTICS_PREFIX.PUBLISH}.${ANALYTICS_SUFFIX.FINISHED}`,\n} as const;\n\n/**\n * Type helper for analytics event types\n */\nexport type AnalyticsEventType = typeof ANALYTICS_EVENTS[keyof typeof ANALYTICS_EVENTS];\n\n/**\n * Actor configuration for Release analytics\n */\nexport const ANALYTICS_ACTOR = {\n type: 'agent' as const,\n id: 'release-cli',\n} as const;\n\n"]}
|
package/dist/manifest.js
CHANGED
|
@@ -32,8 +32,9 @@ var pluginPermissions = combinePermissions().with(gitWorkflowPreset).with(kbPlat
|
|
|
32
32
|
analytics: true
|
|
33
33
|
// Track release events
|
|
34
34
|
}).withQuotas({
|
|
35
|
-
|
|
36
|
-
//
|
|
35
|
+
// 30 min default for complex releases (167 packages); overridable via
|
|
36
|
+
// KB_RELEASE_CHECKS_TIMEOUT_MS for profiling/tuning without a rebuild.
|
|
37
|
+
timeoutMs: Number(process.env.KB_RELEASE_CHECKS_TIMEOUT_MS) || 18e5,
|
|
37
38
|
memoryMb: 4096,
|
|
38
39
|
// full platform build:affected across 167 packages peaked at ~2.05GB on a CI runner, right at the old 2048 ceiling
|
|
39
40
|
cpuMs: 3e5
|
|
@@ -195,6 +196,27 @@ var manifest = {
|
|
|
195
196
|
"kb release stage --flow sdk --out-dir .kb/release/artifacts"
|
|
196
197
|
]
|
|
197
198
|
},
|
|
199
|
+
// release:stage-plan - Publish a release plan's PLANNED versions to a
|
|
200
|
+
// local staging registry, before Bump versions has run
|
|
201
|
+
{
|
|
202
|
+
path: "release stage plan",
|
|
203
|
+
category: "Publish",
|
|
204
|
+
describe: "Publish a release plan's planned package versions to a local staging registry (Verdaccio)",
|
|
205
|
+
operationType: "execute",
|
|
206
|
+
longDescription: "Runs BEFORE version bump, off the in-memory plan `release plan` already computed. Publishes each plan package at its PLANNED nextVersion \u2014 internal sibling dependencies rewritten to `^nextVersion` too \u2014 to --registry, so the `pack-install` Checks gate can verify cross-package dependencies against the version this release is about to ship instead of whatever is already live on npm. Distinct from `release stage`, which packs already-committed, already-bumped versions for CI delivery after approval.",
|
|
207
|
+
handler: "./cli/commands/stage-plan.js#default",
|
|
208
|
+
flags: defineCommandFlags({
|
|
209
|
+
"plan-path": { type: "string", description: "Path to the plan.json written by `release plan`" },
|
|
210
|
+
registry: { type: "string", description: "Target staging registry URL (e.g. http://localhost:4873)" },
|
|
211
|
+
flow: { type: "string", description: "Named flow \u2014 used only to resolve config for package discovery" },
|
|
212
|
+
token: { type: "string", description: 'Auth token to send (default: "verdaccio-local" \u2014 a placeholder; the staging registry allows anonymous publish)' },
|
|
213
|
+
tag: { type: "string", description: 'npm dist-tag to publish under (default: "latest")' },
|
|
214
|
+
json: { type: "boolean", description: "Output in JSON format" }
|
|
215
|
+
}),
|
|
216
|
+
examples: [
|
|
217
|
+
"kb release stage plan --flow platform --plan-path .kb/release/plans/root/current/plan.json --registry http://localhost:4873"
|
|
218
|
+
]
|
|
219
|
+
},
|
|
198
220
|
// release:clean-install - Shared install-verification used by both
|
|
199
221
|
// check-pack-install.sh and `release stage`
|
|
200
222
|
{
|
|
@@ -207,6 +229,7 @@ var manifest = {
|
|
|
207
229
|
flags: defineCommandFlags({
|
|
208
230
|
tarball: { type: "string", description: "Path to the packed tarball to install" },
|
|
209
231
|
name: { type: "string", description: "Package name to import after install" },
|
|
232
|
+
registry: { type: "string", description: "Registry override for ALL dependency resolution (default: real npm) \u2014 e.g. a local staging Verdaccio" },
|
|
210
233
|
json: { type: "boolean", description: "Output in JSON format" },
|
|
211
234
|
additionalTarballs: {
|
|
212
235
|
type: "string",
|
|
@@ -311,6 +334,21 @@ var manifest = {
|
|
|
311
334
|
}),
|
|
312
335
|
examples: ["kb release report", "kb release report --json"]
|
|
313
336
|
},
|
|
337
|
+
// release:status - What is actually stable vs. candidate right now
|
|
338
|
+
{
|
|
339
|
+
path: "release status",
|
|
340
|
+
category: "Utilities",
|
|
341
|
+
describe: "Show what is actually stable vs. candidate for a flow (git tag, npm dist-tags, recent candidate CI)",
|
|
342
|
+
operationType: "read",
|
|
343
|
+
longDescription: "Cross-checks the latest stable git tag against real npm dist-tags and recent candidate CI runs, and flags drift \u2014 a tag or npm publish existing is not the same as a verified, promoted release.",
|
|
344
|
+
handler: "./cli/commands/status.js#default",
|
|
345
|
+
flags: defineCommandFlags({
|
|
346
|
+
flow: { type: "string", description: 'Named release flow from release.flows (e.g. "platform", "sdk")', required: true },
|
|
347
|
+
ci: { type: "boolean", description: "Include recent candidate CI run status (default: true)" },
|
|
348
|
+
json: { type: "boolean", description: "Output in JSON format" }
|
|
349
|
+
}),
|
|
350
|
+
examples: ["kb release status --flow platform", "kb release status --flow sdk --json"]
|
|
351
|
+
},
|
|
314
352
|
// release:changelog - Generate changelog
|
|
315
353
|
{
|
|
316
354
|
path: "release changelog",
|