@cleocode/core 2026.10.27 → 2026.11.1-canary.3
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/README.md +2 -0
- package/binaries/README.md +30 -10
- package/dist/.source-stamp.json +4 -0
- package/dist/audit/reconstruct.d.ts.map +1 -1
- package/dist/audit/reconstruct.js +3 -13
- package/dist/audit/reconstruct.js.map +1 -1
- package/dist/build-provenance.json +2 -2
- package/dist/cloud/nexus-cloud.d.ts.map +1 -1
- package/dist/cloud/nexus-cloud.js +3 -3
- package/dist/cloud/nexus-cloud.js.map +1 -1
- package/dist/cloud/nexus-device.d.ts +1 -1
- package/dist/cloud/nexus-link.d.ts +18 -2
- package/dist/cloud/nexus-link.d.ts.map +1 -1
- package/dist/cloud/nexus-link.js +26 -6
- package/dist/cloud/nexus-link.js.map +1 -1
- package/dist/cloud/nexus-vault.d.ts.map +1 -1
- package/dist/cloud/nexus-vault.js +3 -9
- package/dist/cloud/nexus-vault.js.map +1 -1
- package/dist/decide/sites/registry.d.ts +40 -0
- package/dist/decide/sites/registry.d.ts.map +1 -1
- package/dist/decide/sites/registry.js +38 -0
- package/dist/decide/sites/registry.js.map +1 -1
- package/dist/docs/adr-allocator.d.ts +3 -3
- package/dist/docs/adr-allocator.d.ts.map +1 -1
- package/dist/docs/adr-allocator.js +8 -5
- package/dist/docs/adr-allocator.js.map +1 -1
- package/dist/docs/blob-consolidation.d.ts.map +1 -1
- package/dist/docs/blob-consolidation.js +3 -2
- package/dist/docs/blob-consolidation.js.map +1 -1
- package/dist/docs/derive-links.d.ts +12 -0
- package/dist/docs/derive-links.d.ts.map +1 -1
- package/dist/docs/derive-links.js +19 -0
- package/dist/docs/derive-links.js.map +1 -1
- package/dist/docs/doc-name-rule.d.ts +105 -0
- package/dist/docs/doc-name-rule.d.ts.map +1 -0
- package/dist/docs/doc-name-rule.js +212 -0
- package/dist/docs/doc-name-rule.js.map +1 -0
- package/dist/docs/docs-inconsistency-detector.d.ts.map +1 -1
- package/dist/docs/docs-inconsistency-detector.js +4 -3
- package/dist/docs/docs-inconsistency-detector.js.map +1 -1
- package/dist/docs/docs-ops.d.ts +27 -5
- package/dist/docs/docs-ops.d.ts.map +1 -1
- package/dist/docs/docs-ops.js +149 -17
- package/dist/docs/docs-ops.js.map +1 -1
- package/dist/docs/docs-read-model.d.ts +45 -15
- package/dist/docs/docs-read-model.d.ts.map +1 -1
- package/dist/docs/docs-read-model.js +22 -102
- package/dist/docs/docs-read-model.js.map +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +8 -2
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/doctor.d.ts +71 -4
- package/dist/docs/doctor.d.ts.map +1 -1
- package/dist/docs/doctor.js +324 -23
- package/dist/docs/doctor.js.map +1 -1
- package/dist/docs/duplicate-check.d.ts +138 -0
- package/dist/docs/duplicate-check.d.ts.map +1 -0
- package/dist/docs/duplicate-check.js +286 -0
- package/dist/docs/duplicate-check.js.map +1 -0
- package/dist/docs/fetch-result.d.ts.map +1 -1
- package/dist/docs/fetch-result.js +27 -0
- package/dist/docs/fetch-result.js.map +1 -1
- package/dist/docs/import/scanner.d.ts +2 -0
- package/dist/docs/import/scanner.d.ts.map +1 -1
- package/dist/docs/import/scanner.js +3 -1
- package/dist/docs/import/scanner.js.map +1 -1
- package/dist/docs/lineage.d.ts +66 -0
- package/dist/docs/lineage.d.ts.map +1 -0
- package/dist/docs/lineage.js +190 -0
- package/dist/docs/lineage.js.map +1 -0
- package/dist/docs/modernize/apply.d.ts +139 -0
- package/dist/docs/modernize/apply.d.ts.map +1 -0
- package/dist/docs/modernize/apply.js +760 -0
- package/dist/docs/modernize/apply.js.map +1 -0
- package/dist/docs/modernize/guard.d.ts +92 -0
- package/dist/docs/modernize/guard.d.ts.map +1 -0
- package/dist/docs/modernize/guard.js +214 -0
- package/dist/docs/modernize/guard.js.map +1 -0
- package/dist/docs/modernize/index.d.ts +68 -0
- package/dist/docs/modernize/index.d.ts.map +1 -0
- package/dist/docs/modernize/index.js +97 -0
- package/dist/docs/modernize/index.js.map +1 -0
- package/dist/docs/modernize/judge.d.ts +85 -0
- package/dist/docs/modernize/judge.d.ts.map +1 -0
- package/dist/docs/modernize/judge.js +186 -0
- package/dist/docs/modernize/judge.js.map +1 -0
- package/dist/docs/modernize/plan.d.ts +77 -0
- package/dist/docs/modernize/plan.d.ts.map +1 -0
- package/dist/docs/modernize/plan.js +510 -0
- package/dist/docs/modernize/plan.js.map +1 -0
- package/dist/docs/modernize/restore.d.ts +41 -0
- package/dist/docs/modernize/restore.d.ts.map +1 -0
- package/dist/docs/modernize/restore.js +103 -0
- package/dist/docs/modernize/restore.js.map +1 -0
- package/dist/docs/modernize/rules.d.ts +197 -0
- package/dist/docs/modernize/rules.d.ts.map +1 -0
- package/dist/docs/modernize/rules.js +510 -0
- package/dist/docs/modernize/rules.js.map +1 -0
- package/dist/docs/modernize/store.d.ts +64 -0
- package/dist/docs/modernize/store.d.ts.map +1 -0
- package/dist/docs/modernize/store.js +390 -0
- package/dist/docs/modernize/store.js.map +1 -0
- package/dist/docs/publications-store.d.ts +16 -2
- package/dist/docs/publications-store.d.ts.map +1 -1
- package/dist/docs/publications-store.js +23 -2
- package/dist/docs/publications-store.js.map +1 -1
- package/dist/docs/publish-pr.d.ts.map +1 -1
- package/dist/docs/publish-pr.js +12 -1
- package/dist/docs/publish-pr.js.map +1 -1
- package/dist/docs/rot.d.ts +94 -0
- package/dist/docs/rot.d.ts.map +1 -0
- package/dist/docs/rot.js +298 -0
- package/dist/docs/rot.js.map +1 -0
- package/dist/docs/similarity-check.d.ts +2 -0
- package/dist/docs/similarity-check.d.ts.map +1 -1
- package/dist/docs/similarity-check.js +6 -49
- package/dist/docs/similarity-check.js.map +1 -1
- package/dist/docs/slug-rename.d.ts +84 -0
- package/dist/docs/slug-rename.d.ts.map +1 -0
- package/dist/docs/slug-rename.js +166 -0
- package/dist/docs/slug-rename.js.map +1 -0
- package/dist/docs/slug-similarity.d.ts +24 -0
- package/dist/docs/slug-similarity.d.ts.map +1 -0
- package/dist/docs/slug-similarity.js +63 -0
- package/dist/docs/slug-similarity.js.map +1 -0
- package/dist/docs/wikilinks.d.ts +20 -4
- package/dist/docs/wikilinks.d.ts.map +1 -1
- package/dist/docs/wikilinks.js +52 -7
- package/dist/docs/wikilinks.js.map +1 -1
- package/dist/docs/writer-registry.d.ts.map +1 -1
- package/dist/docs/writer-registry.js +33 -0
- package/dist/docs/writer-registry.js.map +1 -1
- package/dist/doctor/type-matrix-repair.d.ts +194 -0
- package/dist/doctor/type-matrix-repair.d.ts.map +1 -0
- package/dist/doctor/type-matrix-repair.js +662 -0
- package/dist/doctor/type-matrix-repair.js.map +1 -0
- package/dist/gateway-client/generated/index.d.ts +2 -2
- package/dist/gateway-client/generated/index.d.ts.map +1 -1
- package/dist/gateway-client/generated/index.js +1 -1
- package/dist/gateway-client/generated/index.js.map +1 -1
- package/dist/gateway-client/generated/namespaces.gen.d.ts +5 -0
- package/dist/gateway-client/generated/namespaces.gen.d.ts.map +1 -1
- package/dist/gateway-client/generated/namespaces.gen.js +6 -1
- package/dist/gateway-client/generated/namespaces.gen.js.map +1 -1
- package/dist/gateway-client/generated/sdk.gen.d.ts +21 -1
- package/dist/gateway-client/generated/sdk.gen.d.ts.map +1 -1
- package/dist/gateway-client/generated/sdk.gen.js +55 -0
- package/dist/gateway-client/generated/sdk.gen.js.map +1 -1
- package/dist/gateway-client/generated/types.gen.d.ts +222 -0
- package/dist/gateway-client/generated/types.gen.d.ts.map +1 -1
- package/dist/gc/gc-subsystem.d.ts +4 -0
- package/dist/gc/gc-subsystem.d.ts.map +1 -1
- package/dist/gc/gc-subsystem.js +16 -0
- package/dist/gc/gc-subsystem.js.map +1 -1
- package/dist/git/work-tree.d.ts +48 -0
- package/dist/git/work-tree.d.ts.map +1 -1
- package/dist/git/work-tree.js +63 -1
- package/dist/git/work-tree.js.map +1 -1
- package/dist/hooks/handlers/session-hooks.d.ts +5 -4
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/session-hooks.js +5 -21
- package/dist/hooks/handlers/session-hooks.js.map +1 -1
- package/dist/internal.d.ts +5 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +5 -1
- package/dist/internal.js.map +1 -1
- package/dist/memory/brain-doctor.d.ts.map +1 -1
- package/dist/memory/brain-doctor.js +6 -1
- package/dist/memory/brain-doctor.js.map +1 -1
- package/dist/memory/engine-compat.d.ts.map +1 -1
- package/dist/memory/engine-compat.js +6 -0
- package/dist/memory/engine-compat.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts +24 -0
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +43 -5
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/user-profile.d.ts +2 -1
- package/dist/nexus/user-profile.d.ts.map +1 -1
- package/dist/nexus/user-profile.js +13 -5
- package/dist/nexus/user-profile.js.map +1 -1
- package/dist/orchestrate/admission.d.ts +8 -0
- package/dist/orchestrate/admission.d.ts.map +1 -1
- package/dist/orchestrate/admission.js +3 -1
- package/dist/orchestrate/admission.js.map +1 -1
- package/dist/orchestrate/query-ops.d.ts.map +1 -1
- package/dist/orchestrate/query-ops.js +15 -4
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +43 -2
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/index.d.ts +6 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +3 -1
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/paths.d.ts +43 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +51 -1
- package/dist/paths.js.map +1 -1
- package/dist/project-lifecycle.d.ts.map +1 -1
- package/dist/project-lifecycle.js +31 -0
- package/dist/project-lifecycle.js.map +1 -1
- package/dist/release/authorization.d.ts +156 -0
- package/dist/release/authorization.d.ts.map +1 -0
- package/dist/release/authorization.js +460 -0
- package/dist/release/authorization.js.map +1 -0
- package/dist/release/ci-evidence.d.ts +55 -4
- package/dist/release/ci-evidence.d.ts.map +1 -1
- package/dist/release/ci-evidence.js +251 -22
- package/dist/release/ci-evidence.js.map +1 -1
- package/dist/release/ci-run-evidence.d.ts +107 -0
- package/dist/release/ci-run-evidence.d.ts.map +1 -0
- package/dist/release/ci-run-evidence.js +234 -0
- package/dist/release/ci-run-evidence.js.map +1 -0
- package/dist/release/cut.d.ts +231 -0
- package/dist/release/cut.d.ts.map +1 -0
- package/dist/release/cut.js +775 -0
- package/dist/release/cut.js.map +1 -0
- package/dist/release/deploy-evidence.d.ts +173 -0
- package/dist/release/deploy-evidence.d.ts.map +1 -0
- package/dist/release/deploy-evidence.js +381 -0
- package/dist/release/deploy-evidence.js.map +1 -0
- package/dist/release/engine-ops.d.ts.map +1 -1
- package/dist/release/engine-ops.js +10 -4
- package/dist/release/engine-ops.js.map +1 -1
- package/dist/release/index.d.ts +3 -0
- package/dist/release/index.d.ts.map +1 -1
- package/dist/release/index.js +2 -0
- package/dist/release/index.js.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.d.ts.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.js +4 -1
- package/dist/release/invariants/archive-reason-invariant.js.map +1 -1
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +2 -6
- package/dist/release/open.js.map +1 -1
- package/dist/release/plan.d.ts +34 -2
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +30 -6
- package/dist/release/plan.js.map +1 -1
- package/dist/release/preflight-skip.d.ts +4 -19
- package/dist/release/preflight-skip.d.ts.map +1 -1
- package/dist/release/preflight-skip.js +5 -110
- package/dist/release/preflight-skip.js.map +1 -1
- package/dist/release/reconcile-latest.d.ts +29 -0
- package/dist/release/reconcile-latest.d.ts.map +1 -0
- package/dist/release/reconcile-latest.js +71 -0
- package/dist/release/reconcile-latest.js.map +1 -0
- package/dist/release/reconcile.d.ts +3 -1
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +18 -6
- package/dist/release/reconcile.js.map +1 -1
- package/dist/release/release-published.d.ts +27 -0
- package/dist/release/release-published.d.ts.map +1 -0
- package/dist/release/release-published.js +35 -0
- package/dist/release/release-published.js.map +1 -0
- package/dist/release/tty-confirm.d.ts +23 -0
- package/dist/release/tty-confirm.d.ts.map +1 -0
- package/dist/release/tty-confirm.js +50 -0
- package/dist/release/tty-confirm.js.map +1 -0
- package/dist/remote/index.js +1 -1
- package/dist/remote/index.js.map +1 -1
- package/dist/resources/admission-ledger.d.ts +103 -1
- package/dist/resources/admission-ledger.d.ts.map +1 -1
- package/dist/resources/admission-ledger.js +200 -17
- package/dist/resources/admission-ledger.js.map +1 -1
- package/dist/resources/agent-lease.d.ts +82 -0
- package/dist/resources/agent-lease.d.ts.map +1 -0
- package/dist/resources/agent-lease.js +167 -0
- package/dist/resources/agent-lease.js.map +1 -0
- package/dist/resources/governor.d.ts +27 -1
- package/dist/resources/governor.d.ts.map +1 -1
- package/dist/resources/governor.js +88 -4
- package/dist/resources/governor.js.map +1 -1
- package/dist/resources/hook-footprint.d.ts +13 -1
- package/dist/resources/hook-footprint.d.ts.map +1 -1
- package/dist/resources/hook-footprint.js +33 -7
- package/dist/resources/hook-footprint.js.map +1 -1
- package/dist/resources/run-governed.d.ts +25 -0
- package/dist/resources/run-governed.d.ts.map +1 -1
- package/dist/resources/run-governed.js +44 -3
- package/dist/resources/run-governed.js.map +1 -1
- package/dist/sagas/reconcile.d.ts.map +1 -1
- package/dist/sagas/reconcile.js +11 -0
- package/dist/sagas/reconcile.js.map +1 -1
- package/dist/scaffold/ensure-dirs.d.ts.map +1 -1
- package/dist/scaffold/ensure-dirs.js +8 -6
- package/dist/scaffold/ensure-dirs.js.map +1 -1
- package/dist/security/override-cap-setting.d.ts +132 -0
- package/dist/security/override-cap-setting.d.ts.map +1 -1
- package/dist/security/override-cap-setting.js +88 -10
- package/dist/security/override-cap-setting.js.map +1 -1
- package/dist/security/owner-override-authority.d.ts.map +1 -1
- package/dist/security/owner-override-authority.js +5 -1
- package/dist/security/owner-override-authority.js.map +1 -1
- package/dist/selfimprove/draft-pr.d.ts.map +1 -1
- package/dist/selfimprove/draft-pr.js +4 -1
- package/dist/selfimprove/draft-pr.js.map +1 -1
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +4 -16
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/sessions/briefing.d.ts +6 -0
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +34 -0
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/session-end-snapshot-entry.js +2 -2
- package/dist/sessions/session-end-snapshot-entry.js.map +1 -1
- package/dist/sessions/session-end-snapshot.js +4 -4
- package/dist/sessions/session-end-snapshot.js.map +1 -1
- package/dist/skills/injection/token.d.ts.map +1 -1
- package/dist/skills/injection/token.js +3 -6
- package/dist/skills/injection/token.js.map +1 -1
- package/dist/skills/orchestrator/spawn.d.ts.map +1 -1
- package/dist/skills/orchestrator/spawn.js +3 -4
- package/dist/skills/orchestrator/spawn.js.map +1 -1
- package/dist/skills/propose-patch.d.ts.map +1 -1
- package/dist/skills/propose-patch.js +4 -1
- package/dist/skills/propose-patch.js.map +1 -1
- package/dist/spawn/branch-integration.d.ts.map +1 -1
- package/dist/spawn/branch-integration.js +5 -2
- package/dist/spawn/branch-integration.js.map +1 -1
- package/dist/store/attachment-repair.d.ts.map +1 -1
- package/dist/store/attachment-repair.js +5 -4
- package/dist/store/attachment-repair.js.map +1 -1
- package/dist/store/attachment-store.d.ts +6 -0
- package/dist/store/attachment-store.d.ts.map +1 -1
- package/dist/store/attachment-store.js +19 -2
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/blob-ops.d.ts +1 -1
- package/dist/store/blob-ops.d.ts.map +1 -1
- package/dist/store/blob-ops.js +7 -3
- package/dist/store/blob-ops.js.map +1 -1
- package/dist/store/conduit-doc-history.d.ts +15 -1
- package/dist/store/conduit-doc-history.d.ts.map +1 -1
- package/dist/store/conduit-doc-history.js +16 -10
- package/dist/store/conduit-doc-history.js.map +1 -1
- package/dist/store/db-helpers.d.ts +29 -0
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +89 -1
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/decision-adr-links.d.ts.map +1 -1
- package/dist/store/decision-adr-links.js +5 -2
- package/dist/store/decision-adr-links.js.map +1 -1
- package/dist/store/git-checkpoint.d.ts +11 -1
- package/dist/store/git-checkpoint.d.ts.map +1 -1
- package/dist/store/git-checkpoint.js +14 -3
- package/dist/store/git-checkpoint.js.map +1 -1
- package/dist/store/llmtxt-blob-adapter.d.ts.map +1 -1
- package/dist/store/llmtxt-blob-adapter.js +4 -1
- package/dist/store/llmtxt-blob-adapter.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +7 -5
- package/dist/store/schema/attachments.d.ts.map +1 -1
- package/dist/store/schema/attachments.js +5 -2
- package/dist/store/schema/attachments.js.map +1 -1
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +6 -0
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/sqlite-backup.d.ts +6 -1
- package/dist/store/sqlite-backup.d.ts.map +1 -1
- package/dist/store/sqlite-backup.js +9 -5
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +63 -36
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/system/backup.d.ts +29 -0
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +240 -37
- package/dist/system/backup.js.map +1 -1
- package/dist/system/dependencies.d.ts +22 -0
- package/dist/system/dependencies.d.ts.map +1 -1
- package/dist/system/dependencies.js +49 -2
- package/dist/system/dependencies.js.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +23 -1
- package/dist/system/health.js.map +1 -1
- package/dist/task-work/claims.d.ts.map +1 -1
- package/dist/task-work/claims.js +14 -0
- package/dist/task-work/claims.js.map +1 -1
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +22 -0
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/ac-coverage-gate.d.ts +27 -0
- package/dist/tasks/ac-coverage-gate.d.ts.map +1 -1
- package/dist/tasks/ac-coverage-gate.js +63 -28
- package/dist/tasks/ac-coverage-gate.js.map +1 -1
- package/dist/tasks/affected-packages.d.ts +26 -30
- package/dist/tasks/affected-packages.d.ts.map +1 -1
- package/dist/tasks/affected-packages.js +27 -50
- package/dist/tasks/affected-packages.js.map +1 -1
- package/dist/tasks/affected-scope.d.ts +13 -3
- package/dist/tasks/affected-scope.d.ts.map +1 -1
- package/dist/tasks/affected-scope.js +29 -11
- package/dist/tasks/affected-scope.js.map +1 -1
- package/dist/tasks/change-set.d.ts.map +1 -1
- package/dist/tasks/change-set.js +39 -20
- package/dist/tasks/change-set.js.map +1 -1
- package/dist/tasks/command-gate-cmd.d.ts +33 -0
- package/dist/tasks/command-gate-cmd.d.ts.map +1 -0
- package/dist/tasks/command-gate-cmd.js +45 -0
- package/dist/tasks/command-gate-cmd.js.map +1 -0
- package/dist/tasks/complete-ci.d.ts +9 -0
- package/dist/tasks/complete-ci.d.ts.map +1 -1
- package/dist/tasks/complete-ci.js +21 -4
- package/dist/tasks/complete-ci.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +14 -0
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/component-pr.d.ts +37 -0
- package/dist/tasks/component-pr.d.ts.map +1 -1
- package/dist/tasks/component-pr.js +106 -14
- package/dist/tasks/component-pr.js.map +1 -1
- package/dist/tasks/done-plan.d.ts +14 -1
- package/dist/tasks/done-plan.d.ts.map +1 -1
- package/dist/tasks/done-plan.js +125 -15
- package/dist/tasks/done-plan.js.map +1 -1
- package/dist/tasks/done-record.d.ts.map +1 -1
- package/dist/tasks/done-record.js +4 -0
- package/dist/tasks/done-record.js.map +1 -1
- package/dist/tasks/engine-converters.d.ts.map +1 -1
- package/dist/tasks/engine-converters.js +2 -0
- package/dist/tasks/engine-converters.js.map +1 -1
- package/dist/tasks/evidence-tree.d.ts +28 -1
- package/dist/tasks/evidence-tree.d.ts.map +1 -1
- package/dist/tasks/evidence-tree.js +66 -2
- package/dist/tasks/evidence-tree.js.map +1 -1
- package/dist/tasks/evidence.d.ts +39 -27
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +382 -188
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/gate-notes.d.ts +17 -0
- package/dist/tasks/gate-notes.d.ts.map +1 -1
- package/dist/tasks/gate-notes.js.map +1 -1
- package/dist/tasks/gate-preview.d.ts +7 -1
- package/dist/tasks/gate-preview.d.ts.map +1 -1
- package/dist/tasks/gate-preview.js +30 -4
- package/dist/tasks/gate-preview.js.map +1 -1
- package/dist/tasks/gate-runner.d.ts +42 -0
- package/dist/tasks/gate-runner.d.ts.map +1 -1
- package/dist/tasks/gate-runner.js +234 -94
- package/dist/tasks/gate-runner.js.map +1 -1
- package/dist/tasks/manifest-scope.d.ts +115 -0
- package/dist/tasks/manifest-scope.d.ts.map +1 -0
- package/dist/tasks/manifest-scope.js +352 -0
- package/dist/tasks/manifest-scope.js.map +1 -0
- package/dist/tasks/merge-close.d.ts +376 -0
- package/dist/tasks/merge-close.d.ts.map +1 -0
- package/dist/tasks/merge-close.js +1497 -0
- package/dist/tasks/merge-close.js.map +1 -0
- package/dist/tasks/qa-run-binding.d.ts +5 -0
- package/dist/tasks/qa-run-binding.d.ts.map +1 -1
- package/dist/tasks/qa-run-binding.js +6 -1
- package/dist/tasks/qa-run-binding.js.map +1 -1
- package/dist/tasks/req.d.ts.map +1 -1
- package/dist/tasks/req.js +29 -1
- package/dist/tasks/req.js.map +1 -1
- package/dist/tasks/review-verdict.d.ts +159 -0
- package/dist/tasks/review-verdict.d.ts.map +1 -0
- package/dist/tasks/review-verdict.js +442 -0
- package/dist/tasks/review-verdict.js.map +1 -0
- package/dist/tasks/task-reparent.d.ts.map +1 -1
- package/dist/tasks/task-reparent.js +22 -3
- package/dist/tasks/task-reparent.js.map +1 -1
- package/dist/tasks/test-report-counts.d.ts +274 -0
- package/dist/tasks/test-report-counts.d.ts.map +1 -0
- package/dist/tasks/test-report-counts.js +746 -0
- package/dist/tasks/test-report-counts.js.map +1 -0
- package/dist/tasks/test-run-binding.d.ts +20 -45
- package/dist/tasks/test-run-binding.d.ts.map +1 -1
- package/dist/tasks/test-run-binding.js +34 -119
- package/dist/tasks/test-run-binding.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +42 -0
- package/dist/tasks/update.js.map +1 -1
- package/dist/tasks/verification-policy.d.ts +12 -0
- package/dist/tasks/verification-policy.d.ts.map +1 -1
- package/dist/tasks/verification-policy.js +13 -0
- package/dist/tasks/verification-policy.js.map +1 -1
- package/dist/tasks/workspace-resolution.d.ts +225 -0
- package/dist/tasks/workspace-resolution.d.ts.map +1 -0
- package/dist/tasks/workspace-resolution.js +497 -0
- package/dist/tasks/workspace-resolution.js.map +1 -0
- package/dist/validation/doctor/checks.d.ts +20 -0
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +112 -0
- package/dist/validation/doctor/checks.js.map +1 -1
- package/dist/validation/engine-ops.d.ts.map +1 -1
- package/dist/validation/engine-ops.js +37 -3
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/validation/validate-ops.d.ts +4 -0
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/dist/validation/validate-ops.js +79 -2
- package/dist/validation/validate-ops.js.map +1 -1
- package/dist/worktree/list.d.ts +4 -21
- package/dist/worktree/list.d.ts.map +1 -1
- package/dist/worktree/list.js +14 -44
- package/dist/worktree/list.js.map +1 -1
- package/dist/worktree/merged-cleanup.d.ts +63 -0
- package/dist/worktree/merged-cleanup.d.ts.map +1 -0
- package/dist/worktree/merged-cleanup.js +571 -0
- package/dist/worktree/merged-cleanup.js.map +1 -0
- package/dist/worktree/prune.d.ts +64 -2
- package/dist/worktree/prune.d.ts.map +1 -1
- package/dist/worktree/prune.js +151 -6
- package/dist/worktree/prune.js.map +1 -1
- package/dist/worktree/sentinel-index.d.ts +14 -0
- package/dist/worktree/sentinel-index.d.ts.map +1 -1
- package/dist/worktree/sentinel-index.js +17 -0
- package/dist/worktree/sentinel-index.js.map +1 -1
- package/dist/worktree/worktree-adopt.d.ts +1 -13
- package/dist/worktree/worktree-adopt.d.ts.map +1 -1
- package/dist/worktree/worktree-adopt.js +2 -17
- package/dist/worktree/worktree-adopt.js.map +1 -1
- package/package.json +12 -12
- package/schemas/project-context.schema.json +33 -0
- package/templates/CLEO-INJECTION.md +6 -16
- package/templates/CLEO-REFERENCE.md +27 -4
- package/templates/git-hooks/legacy-hashes.json +2 -1
- package/templates/git-hooks/pre-commit +43 -11
- package/templates/workflows/release-prepare.yml.tmpl +9 -88
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ci-run:<runId>` evidence (T14149): a green run of
|
|
3
|
+
* `.github/workflows/repeat-run.yml`, which runs one test file N times on the
|
|
4
|
+
* default branch. It replaces the owner AC waiver for criteria that need a
|
|
5
|
+
* heavy or repeated run the owner rule forbids locally.
|
|
6
|
+
*
|
|
7
|
+
* Validated only from GitHub, never from a file the agent supplies:
|
|
8
|
+
*
|
|
9
|
+
* - the run is this workflow, dispatched (`workflow_dispatch`) on the
|
|
10
|
+
* repository's default branch, and its latest attempt concluded `success`;
|
|
11
|
+
* - its title names the test file and run count, and the run's uploaded
|
|
12
|
+
* `repeat-report` artifact agrees: the same file, count and commit, every
|
|
13
|
+
* run green (GitHub does not return dispatch inputs on the run);
|
|
14
|
+
* - the test file is relevant: one the task changed, or one a criterion this
|
|
15
|
+
* write links names (by path or file name), so a trivial test repeated N
|
|
16
|
+
* times cannot stand for an unrelated criterion.
|
|
17
|
+
*
|
|
18
|
+
* That the run's commit contains the task's implemented work is checked with
|
|
19
|
+
* the other bound runs (`boundHeadGapReason`). `cleo complete` re-reads the
|
|
20
|
+
* run, and a newer attempt that is not green refuses it.
|
|
21
|
+
*
|
|
22
|
+
* @task T14149
|
|
23
|
+
*/
|
|
24
|
+
import { execFileSync } from 'node:child_process';
|
|
25
|
+
import { mkdtempSync, readFileSync, rmSync } from 'node:fs';
|
|
26
|
+
import { tmpdir } from 'node:os';
|
|
27
|
+
import { basename, join } from 'node:path';
|
|
28
|
+
/** The workflow whose runs `ci-run:` accepts. */
|
|
29
|
+
export const REPEAT_RUN_WORKFLOW = '.github/workflows/repeat-run.yml';
|
|
30
|
+
/** The artifact the workflow uploads. */
|
|
31
|
+
export const REPEAT_RUN_ARTIFACT = 'repeat-report';
|
|
32
|
+
/** `repeat-run <test> x<N>`, the workflow's `run-name`. */
|
|
33
|
+
const TITLE = /^repeat-run (\S+) x([0-9]+)$/;
|
|
34
|
+
/** Whether `record` is a finished, green run of the repeat-run workflow on the default branch. */
|
|
35
|
+
function runRefusal(runId, record) {
|
|
36
|
+
const refuse = (reason, codeName = 'E_EVIDENCE_INVALID') => ({
|
|
37
|
+
ok: false,
|
|
38
|
+
reason: `ci-run:${runId} ${reason}`,
|
|
39
|
+
codeName,
|
|
40
|
+
});
|
|
41
|
+
if (record.path.replace(/@.*$/, '') !== REPEAT_RUN_WORKFLOW)
|
|
42
|
+
return refuse(`is a run of ${record.path}, not ${REPEAT_RUN_WORKFLOW}`);
|
|
43
|
+
if (record.event !== 'workflow_dispatch')
|
|
44
|
+
return refuse(`was started by ${record.event}, not a workflow_dispatch`);
|
|
45
|
+
if (record.headBranch !== record.defaultBranch)
|
|
46
|
+
return refuse(`ran on ${record.headBranch}, not the default branch ${record.defaultBranch}; dispatch it on ${record.defaultBranch}`);
|
|
47
|
+
if (record.status !== 'completed')
|
|
48
|
+
return refuse(`is still ${record.status}; wait for it to finish, then verify again`);
|
|
49
|
+
if (record.conclusion !== 'success')
|
|
50
|
+
return refuse(`attempt ${record.attempt} concluded ${record.conclusion ?? 'with no conclusion'}, not success`,
|
|
51
|
+
// @sync-invariant none:input-shape a red repeat-run is refused before anything is written
|
|
52
|
+
'E_EVIDENCE_TESTS_FAILED');
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Validate a `ci-run:<runId>` atom for a task (T14149).
|
|
57
|
+
*
|
|
58
|
+
* @param runId - The GitHub Actions run id.
|
|
59
|
+
* @param roots - The evidence roots; `gh` runs in the execution root.
|
|
60
|
+
* @param options - Task context and injected fetchers.
|
|
61
|
+
* @returns The validated atom, or why it is refused.
|
|
62
|
+
* @task T14149
|
|
63
|
+
*/
|
|
64
|
+
export async function resolveCiRunEvidenceAtom(runId, roots, options) {
|
|
65
|
+
const cwd = roots.executionRoot;
|
|
66
|
+
const record = (options.fetchRun ?? defaultFetchRun)(runId, cwd);
|
|
67
|
+
if (record === null)
|
|
68
|
+
return {
|
|
69
|
+
ok: false,
|
|
70
|
+
reason: `ci-run:${runId} cannot be read from GitHub (gh api actions/runs/${runId} failed)`,
|
|
71
|
+
codeName: 'E_EVIDENCE_INVALID',
|
|
72
|
+
};
|
|
73
|
+
const refused = runRefusal(runId, record);
|
|
74
|
+
if (refused)
|
|
75
|
+
return refused;
|
|
76
|
+
const title = TITLE.exec(record.displayTitle);
|
|
77
|
+
if (!title)
|
|
78
|
+
return {
|
|
79
|
+
ok: false,
|
|
80
|
+
reason: `ci-run:${runId}'s title "${record.displayTitle}" does not name a test file and run count`,
|
|
81
|
+
codeName: 'E_EVIDENCE_INVALID',
|
|
82
|
+
};
|
|
83
|
+
const test = title[1];
|
|
84
|
+
const runs = Number(title[2]);
|
|
85
|
+
// GitHub does not return dispatch inputs on a run, so the title is
|
|
86
|
+
// cross-checked against what the job itself recorded.
|
|
87
|
+
const report = (options.fetchReport ?? defaultFetchReport)(runId, cwd);
|
|
88
|
+
if (report === null)
|
|
89
|
+
return {
|
|
90
|
+
ok: false,
|
|
91
|
+
reason: `ci-run:${runId} has no readable ${REPEAT_RUN_ARTIFACT} artifact (expired, or the job uploaded none), so its counts cannot be checked`,
|
|
92
|
+
codeName: 'E_EVIDENCE_INVALID',
|
|
93
|
+
};
|
|
94
|
+
const mismatch = report.test !== test
|
|
95
|
+
? `its report ran ${report.test}, but its title names ${test}`
|
|
96
|
+
: report.runs !== runs
|
|
97
|
+
? `its report asked for ${report.runs} runs, but its title names ${runs}`
|
|
98
|
+
: report.sha !== record.headSha
|
|
99
|
+
? `its report tested ${report.sha ?? 'an unknown commit'}, not the run's commit ${record.headSha}`
|
|
100
|
+
: report.iterations.length !== runs
|
|
101
|
+
? `its report records ${report.iterations.length} runs, not ${runs}`
|
|
102
|
+
: null;
|
|
103
|
+
if (mismatch)
|
|
104
|
+
return { ok: false, reason: `ci-run:${runId}: ${mismatch}`, codeName: 'E_EVIDENCE_INVALID' };
|
|
105
|
+
const bad = report.iterations.find((i) => i.exitCode !== 0 || i.numFailedTests > 0 || i.numPassedTests === 0);
|
|
106
|
+
if (bad)
|
|
107
|
+
return {
|
|
108
|
+
ok: false,
|
|
109
|
+
reason: `ci-run:${runId}: run ${bad.run} of ${runs} did not pass (exit ${bad.exitCode}, ${bad.numFailedTests} failed, ${bad.numPassedTests} passed)`,
|
|
110
|
+
// @sync-invariant none:input-shape a red repeat-run is refused before anything is written
|
|
111
|
+
codeName: 'E_EVIDENCE_TESTS_FAILED',
|
|
112
|
+
};
|
|
113
|
+
// Relevance: the repeated file is part of the task's change, or a linked
|
|
114
|
+
// criterion names it.
|
|
115
|
+
const changed = options.changedPaths.map((p) => p.replace(/^\.\//, ''));
|
|
116
|
+
const named = options.criteriaTexts.some((text) => text.includes(test) || text.includes(basename(test)));
|
|
117
|
+
if (!changed.includes(test) && !named)
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
reason: `ci-run:${runId} repeated ${test}, which ${options.taskId} did not change and no criterion ` +
|
|
121
|
+
`this write links (satisfies:${options.taskId}#AC<n>) names. Repeat the test that proves the ` +
|
|
122
|
+
'criterion, or name its file in the criterion.',
|
|
123
|
+
codeName: 'E_EVIDENCE_INSUFFICIENT',
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
ok: true,
|
|
127
|
+
atom: {
|
|
128
|
+
kind: 'ci-run',
|
|
129
|
+
runId,
|
|
130
|
+
headSha: record.headSha,
|
|
131
|
+
test,
|
|
132
|
+
runs,
|
|
133
|
+
attempt: record.attempt,
|
|
134
|
+
workflow: REPEAT_RUN_WORKFLOW,
|
|
135
|
+
taskId: options.taskId,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Re-check a recorded `ci-run:` atom at `cleo complete` (T14149): the run's
|
|
141
|
+
* latest attempt must still be a green run of the workflow on the default
|
|
142
|
+
* branch, at the same commit. A re-run that went red refuses.
|
|
143
|
+
*
|
|
144
|
+
* @param atom - The recorded atom.
|
|
145
|
+
* @param cwd - Repository work tree for `gh`.
|
|
146
|
+
* @param fetchRun - The run's record; defaults to the GitHub REST API.
|
|
147
|
+
* @returns Ok, or why the atom no longer stands.
|
|
148
|
+
* @task T14149
|
|
149
|
+
*/
|
|
150
|
+
export function recheckCiRunAtom(atom, cwd, fetchRun = defaultFetchRun) {
|
|
151
|
+
const record = fetchRun(atom.runId, cwd);
|
|
152
|
+
if (record === null)
|
|
153
|
+
return { ok: false, reason: `ci-run:${atom.runId} cannot be re-read from GitHub` };
|
|
154
|
+
const refused = runRefusal(atom.runId, record);
|
|
155
|
+
if (refused)
|
|
156
|
+
return { ok: false, reason: refused.reason };
|
|
157
|
+
if (record.headSha !== atom.headSha)
|
|
158
|
+
return {
|
|
159
|
+
ok: false,
|
|
160
|
+
reason: `ci-run:${atom.runId} now reports commit ${record.headSha}, not the recorded ${atom.headSha}`,
|
|
161
|
+
};
|
|
162
|
+
return { ok: true };
|
|
163
|
+
}
|
|
164
|
+
/** Run one `gh` command and parse its JSON output; null on any failure. */
|
|
165
|
+
function ghJson(args, cwd) {
|
|
166
|
+
try {
|
|
167
|
+
return JSON.parse(execFileSync('gh', args, {
|
|
168
|
+
cwd,
|
|
169
|
+
encoding: 'utf-8',
|
|
170
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
171
|
+
timeout: 30_000,
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/** Default {@link ResolveCiRunOptions.fetchRun}: `gh api repos/{owner}/{repo}/actions/runs/<id>`. */
|
|
179
|
+
function defaultFetchRun(runId, cwd) {
|
|
180
|
+
const run = ghJson(['api', `repos/{owner}/{repo}/actions/runs/${runId}`], cwd);
|
|
181
|
+
if (run === null || typeof run !== 'object')
|
|
182
|
+
return null;
|
|
183
|
+
const repository = run.repository;
|
|
184
|
+
const str = (v) => (typeof v === 'string' ? v : '');
|
|
185
|
+
return {
|
|
186
|
+
path: str(run.path),
|
|
187
|
+
event: str(run.event),
|
|
188
|
+
headBranch: str(run.head_branch),
|
|
189
|
+
headSha: str(run.head_sha),
|
|
190
|
+
status: str(run.status),
|
|
191
|
+
conclusion: typeof run.conclusion === 'string' ? run.conclusion : null,
|
|
192
|
+
attempt: typeof run.run_attempt === 'number' ? run.run_attempt : 1,
|
|
193
|
+
displayTitle: str(run.display_title),
|
|
194
|
+
defaultBranch: str(repository?.default_branch),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/** Default {@link ResolveCiRunOptions.fetchReport}: `gh run download <id> -n repeat-report`. */
|
|
198
|
+
function defaultFetchReport(runId, cwd) {
|
|
199
|
+
const dir = mkdtempSync(join(tmpdir(), 'cleo-ci-run-'));
|
|
200
|
+
try {
|
|
201
|
+
execFileSync('gh', ['run', 'download', String(runId), '-n', REPEAT_RUN_ARTIFACT, '-D', dir], {
|
|
202
|
+
cwd,
|
|
203
|
+
stdio: 'ignore',
|
|
204
|
+
timeout: 60_000,
|
|
205
|
+
});
|
|
206
|
+
const parsed = JSON.parse(readFileSync(join(dir, 'repeat-report.json'), 'utf-8'));
|
|
207
|
+
if (parsed === null || typeof parsed !== 'object')
|
|
208
|
+
return null;
|
|
209
|
+
const r = parsed;
|
|
210
|
+
if (typeof r.test !== 'string' || typeof r.runs !== 'number' || !Array.isArray(r.iterations))
|
|
211
|
+
return null;
|
|
212
|
+
return {
|
|
213
|
+
test: r.test,
|
|
214
|
+
runs: r.runs,
|
|
215
|
+
sha: typeof r.sha === 'string' ? r.sha : null,
|
|
216
|
+
iterations: r.iterations.map((raw) => {
|
|
217
|
+
const i = (raw ?? {});
|
|
218
|
+
return {
|
|
219
|
+
run: typeof i.run === 'number' ? i.run : 0,
|
|
220
|
+
exitCode: typeof i.exitCode === 'number' ? i.exitCode : null,
|
|
221
|
+
numPassedTests: typeof i.numPassedTests === 'number' ? i.numPassedTests : 0,
|
|
222
|
+
numFailedTests: typeof i.numFailedTests === 'number' ? i.numFailedTests : 0,
|
|
223
|
+
};
|
|
224
|
+
}),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
catch {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
finally {
|
|
231
|
+
rmSync(dir, { recursive: true, force: true });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=ci-run-evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-run-evidence.js","sourceRoot":"","sources":["../../src/release/ci-run-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;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,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cleo release cut <version>` — one-command release from the default branch's
|
|
3
|
+
* newest commit with green CI (T14102 · epic T14099 · owner decision D11209).
|
|
4
|
+
*
|
|
5
|
+
* Replaces plan → open → bump-PR → hand-pushed tag. The cut:
|
|
6
|
+
* 1. validates the CalVer version (strictly above every release tag and the
|
|
7
|
+
* default branch's package.json), then picks the newest first-parent
|
|
8
|
+
* commit of `origin/<default>` whose required checks
|
|
9
|
+
* (`release.prRequiredWorkflows`, app-pinned) all concluded `success` on
|
|
10
|
+
* its push run (an empty conclusion is not green), or verifies a pinned
|
|
11
|
+
* `--sha` the same way;
|
|
12
|
+
* 2. renders the notes from the changesets added since the previous release
|
|
13
|
+
* tag, refusing a changeset no merged pull request brought in;
|
|
14
|
+
* 3. reports the packages, new migrations and each named task's status
|
|
15
|
+
* (reported, never gated: green CI on the sha is the gate);
|
|
16
|
+
* 4. creates the annotated tag `v<version>` on that sha through the GitHub
|
|
17
|
+
* API. Its message carries the hand-written lead (`--lead`). The tag push
|
|
18
|
+
* starts `release.yml`, which writes the CHANGELOG section
|
|
19
|
+
* ({@link releaseChangelog}), publishes, and opens the CHANGELOG + version
|
|
20
|
+
* PR. No test suite reruns: CI already passed that tree.
|
|
21
|
+
*
|
|
22
|
+
* @task T14102
|
|
23
|
+
* @epic T14099
|
|
24
|
+
*/
|
|
25
|
+
import type { EngineResult } from '@cleocode/contracts';
|
|
26
|
+
import type { MergeSweepOptions, MergeSweepResult } from '@cleocode/contracts/merge-close.js';
|
|
27
|
+
import type { DocsRotResult } from '@cleocode/contracts/operations/docs.js';
|
|
28
|
+
import type { MergedCleanupOpts, MergedCleanupResult } from '@cleocode/contracts/operations/worktree.js';
|
|
29
|
+
/** How many first-parent commits of the default branch the cut inspects for green CI. */
|
|
30
|
+
export declare const CUT_MAX_CANDIDATES = 30;
|
|
31
|
+
/** Per-cut audit log (ADR-099 §Consequences), relative to the project root. */
|
|
32
|
+
export declare const RELEASE_CUT_AUDIT_FILE = ".cleo/audit/release-cut.jsonl";
|
|
33
|
+
/** Subprocess runners, injectable for tests. */
|
|
34
|
+
export interface ReleaseCutRunner {
|
|
35
|
+
/** Run `gh <args>` in `cwd`; returns trimmed stdout, throws on failure. */
|
|
36
|
+
runGh: (args: readonly string[], cwd: string) => string;
|
|
37
|
+
/** Run `git <args>` in `cwd`; returns stdout, throws on failure. */
|
|
38
|
+
runGit: (args: readonly string[], cwd: string) => string;
|
|
39
|
+
}
|
|
40
|
+
/** Options for {@link releaseCut}. */
|
|
41
|
+
export interface ReleaseCutOptions {
|
|
42
|
+
/** Version to release (`2026.10.28` or `v2026.10.28`). */
|
|
43
|
+
version: string;
|
|
44
|
+
/** Project whose task store, audit and grants the cut uses. */
|
|
45
|
+
projectRoot: string;
|
|
46
|
+
/**
|
|
47
|
+
* The git checkout the cut runs in (T14160): every git and gh call, the
|
|
48
|
+
* docs-rot scan and `checkoutAtMain` use it, and no other checkout is
|
|
49
|
+
* touched. Default: `projectRoot`.
|
|
50
|
+
*/
|
|
51
|
+
gitRoot?: string;
|
|
52
|
+
/** Pin the commit instead of picking the newest green one; it must itself be green. */
|
|
53
|
+
sha?: string;
|
|
54
|
+
/** Markdown file whose content leads the notes ("Update now" + Highlights). */
|
|
55
|
+
leadFile?: string;
|
|
56
|
+
/** Show the commit, notes, packages and tasks without creating the tag. */
|
|
57
|
+
dryRun?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Confirm the tag (D11212). Without it the cut only reports, with the exact
|
|
60
|
+
* confirm command. With it, a standing release authorization (T14141), the
|
|
61
|
+
* `release.agentCut` setting (D11221) or the
|
|
62
|
+
* version typed on the controlling terminal (`/dev/tty`) allows the tag.
|
|
63
|
+
*/
|
|
64
|
+
yes?: boolean;
|
|
65
|
+
/** Default branch name (default `main`). */
|
|
66
|
+
branch?: string;
|
|
67
|
+
/** Test seam for the T14142 merged-work cleanup (default {@link cleanupMergedWork}). */
|
|
68
|
+
cleanup?: (opts: MergedCleanupOpts) => Promise<MergedCleanupResult>;
|
|
69
|
+
/** Test seam for the T14101 merge sweep (default {@link sweepMergedClosures}). */
|
|
70
|
+
sweep?: (projectRoot: string, opts: MergeSweepOptions) => Promise<MergeSweepResult>;
|
|
71
|
+
/** Test seam. */
|
|
72
|
+
runner?: ReleaseCutRunner;
|
|
73
|
+
}
|
|
74
|
+
/** CI state of one candidate commit. */
|
|
75
|
+
export interface ReleaseCutCandidate {
|
|
76
|
+
/** Commit sha. */
|
|
77
|
+
sha: string;
|
|
78
|
+
/** `success`, or the first required check that is not: `<name>: <state>`. */
|
|
79
|
+
ci: string;
|
|
80
|
+
}
|
|
81
|
+
/** One task a changeset in range names, with its status at cut time. */
|
|
82
|
+
export interface ReleaseCutTask {
|
|
83
|
+
/** Task id. */
|
|
84
|
+
id: string;
|
|
85
|
+
/** Store status, or `missing` when the task is not in this store. */
|
|
86
|
+
status: string;
|
|
87
|
+
}
|
|
88
|
+
/** A published package and the version it ships at. */
|
|
89
|
+
export interface ReleaseCutPackage {
|
|
90
|
+
/** Directory under `packages/`. */
|
|
91
|
+
dir: string;
|
|
92
|
+
/** npm name. */
|
|
93
|
+
name: string;
|
|
94
|
+
/** Version it publishes at. */
|
|
95
|
+
version: string;
|
|
96
|
+
}
|
|
97
|
+
/** Result of {@link releaseCut}. */
|
|
98
|
+
export interface ReleaseCutResult {
|
|
99
|
+
/** `v`-prefixed version. */
|
|
100
|
+
version: string;
|
|
101
|
+
/** Tag name (`v<version>`). */
|
|
102
|
+
tag: string;
|
|
103
|
+
/** Commit the release is cut from. */
|
|
104
|
+
sha: string;
|
|
105
|
+
/** Previous release tag the notes are computed from, or null for a first release. */
|
|
106
|
+
previousTag: string | null;
|
|
107
|
+
/** Commits checked for green CI, newest first, up to the chosen one. */
|
|
108
|
+
candidates: ReleaseCutCandidate[];
|
|
109
|
+
/** Changeset files in range. */
|
|
110
|
+
changesets: string[];
|
|
111
|
+
/** The rendered notes (lead first, then the generated sections). */
|
|
112
|
+
notes: string;
|
|
113
|
+
/** Packages `release.yml` publishes, at this version. */
|
|
114
|
+
packages: ReleaseCutPackage[];
|
|
115
|
+
/** Migration files added since the previous tag. */
|
|
116
|
+
migrations: string[];
|
|
117
|
+
/** Tasks the changesets name, with status (reported, not gated). */
|
|
118
|
+
tasks: ReleaseCutTask[];
|
|
119
|
+
/**
|
|
120
|
+
* T14142 cleanup of the release's tasks: the plan on a report run, what was
|
|
121
|
+
* removed after a confirmed tag. Besides the tasks' worktrees and `task/*`
|
|
122
|
+
* branches it removes nested repository copies proven redundant (clean, every
|
|
123
|
+
* ref on origin), only inside the worktrees of the release's done or
|
|
124
|
+
* cancelled tasks. Null when the changesets name no task.
|
|
125
|
+
*/
|
|
126
|
+
cleanup: MergedCleanupResult | null;
|
|
127
|
+
/** The T14101 merge sweep run before the commit was picked (`swept: false` when it could not run). */
|
|
128
|
+
sweep: MergeSweepResult;
|
|
129
|
+
/** Docs rot of the project checkout (T14111); a real cut refuses when it has findings. */
|
|
130
|
+
docsRot: DocsRotResult;
|
|
131
|
+
/** Non-blocking findings, e.g. docs rot on a prerelease (it blocks only a stable cut). */
|
|
132
|
+
warnings: string[];
|
|
133
|
+
/** Whether the local checkout is at `origin/<default>` (the docs-rot scan reads it). */
|
|
134
|
+
checkoutAtMain: boolean;
|
|
135
|
+
/** The command that tags exactly this preview (pinned `--sha`), or null once tagged. */
|
|
136
|
+
confirmCommand: string | null;
|
|
137
|
+
/** True when no tag was created. */
|
|
138
|
+
dryRun: boolean;
|
|
139
|
+
/** True when this call created the tag (which starts `release.yml`). */
|
|
140
|
+
tagCreated: boolean;
|
|
141
|
+
/** What allowed the tag (`authorization:<id>`, `setting:release.agentCut=<level>@<scope>` or `tty-confirm`), or null. */
|
|
142
|
+
allowedBy: string | null;
|
|
143
|
+
}
|
|
144
|
+
/** Options for {@link releaseChangelog}. */
|
|
145
|
+
export interface ReleaseChangelogOptions {
|
|
146
|
+
/** Version whose section is written. */
|
|
147
|
+
version: string;
|
|
148
|
+
/** Git checkout whose `CHANGELOG.md` is written. */
|
|
149
|
+
projectRoot: string;
|
|
150
|
+
/** Commit the release was cut from (default: tag `v<version>` when it exists, else HEAD). */
|
|
151
|
+
ref?: string;
|
|
152
|
+
/** Test seam. */
|
|
153
|
+
runner?: ReleaseCutRunner;
|
|
154
|
+
}
|
|
155
|
+
/** Result of {@link releaseChangelog}. */
|
|
156
|
+
export interface ReleaseChangelogResult {
|
|
157
|
+
/** Path of the CHANGELOG. */
|
|
158
|
+
changelogPath: string;
|
|
159
|
+
/** False when the section already existed (a plan-PR release) or nothing changed. */
|
|
160
|
+
written: boolean;
|
|
161
|
+
/** Previous release tag the section was computed from. */
|
|
162
|
+
previousTag: string | null;
|
|
163
|
+
/** Changesets the section was built from. */
|
|
164
|
+
changesetCount: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Cut a release: tag the newest green default-branch commit and let
|
|
168
|
+
* `release.yml` publish it. `dryRun` reports without tagging.
|
|
169
|
+
*
|
|
170
|
+
* @param opts - See {@link ReleaseCutOptions}.
|
|
171
|
+
* @returns The chosen commit, notes, packages, migrations and task report.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const preview = await releaseCut({ version: '2026.10.28', projectRoot, dryRun: true });
|
|
176
|
+
* if (preview.success) console.log(preview.data.sha, preview.data.notes);
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* @task T14102
|
|
180
|
+
*/
|
|
181
|
+
export declare function releaseCut(opts: ReleaseCutOptions): Promise<EngineResult<ReleaseCutResult>>;
|
|
182
|
+
/** Result of {@link releaseVerifyTag}. */
|
|
183
|
+
export interface ReleaseVerifyTagResult {
|
|
184
|
+
/** The tag checked. */
|
|
185
|
+
tag: string;
|
|
186
|
+
/** The commit it points at. */
|
|
187
|
+
sha: string;
|
|
188
|
+
/** Required checks that were green on its push run. */
|
|
189
|
+
checks: string[];
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Refuse to publish a tag whose commit is not a first-parent commit of
|
|
193
|
+
* `origin/<default>` with every required check green on its push run. Run by
|
|
194
|
+
* `release.yml` before anything ships, so a hand-pushed tag or a dispatched
|
|
195
|
+
* run never publishes an untested tree.
|
|
196
|
+
*
|
|
197
|
+
* @param opts - Version, project root, default branch, test seam.
|
|
198
|
+
* @returns The tag, its commit and the checks found green.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```ts
|
|
202
|
+
* const ok = await releaseVerifyTag({ version: '2026.10.28', projectRoot: process.cwd() });
|
|
203
|
+
* if (!ok.success) process.exit(1);
|
|
204
|
+
* ```
|
|
205
|
+
*
|
|
206
|
+
* @task T14102
|
|
207
|
+
*/
|
|
208
|
+
export declare function releaseVerifyTag(opts: {
|
|
209
|
+
version: string;
|
|
210
|
+
projectRoot: string;
|
|
211
|
+
branch?: string;
|
|
212
|
+
runner?: ReleaseCutRunner;
|
|
213
|
+
}): Promise<EngineResult<ReleaseVerifyTagResult>>;
|
|
214
|
+
/**
|
|
215
|
+
* Write the `## [<version>]` CHANGELOG section from the changesets added since
|
|
216
|
+
* the previous release tag, led by the tag's annotation (the `--lead` the cut
|
|
217
|
+
* recorded). Runs in `release.yml` on the tagged checkout. A section that
|
|
218
|
+
* already exists (a plan-PR release) is left untouched.
|
|
219
|
+
*
|
|
220
|
+
* @param opts - See {@link ReleaseChangelogOptions}.
|
|
221
|
+
* @returns Whether the section was written, and from what range.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```ts
|
|
225
|
+
* await releaseChangelog({ version: '2026.10.28', projectRoot: process.cwd() });
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* @task T14102
|
|
229
|
+
*/
|
|
230
|
+
export declare function releaseChangelog(opts: ReleaseChangelogOptions): Promise<EngineResult<ReleaseChangelogResult>>;
|
|
231
|
+
//# sourceMappingURL=cut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cut.d.ts","sourceRoot":"","sources":["../../src/release/cut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAaH,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAaxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,4CAA4C,CAAC;AAepD,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAKtE,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,KAAK,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,oEAAoE;IACpE,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1D;AAED,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,QAAQ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