@deftai/directive-core 0.55.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/architecture/sor-preflight.d.ts +66 -0
- package/dist/architecture/sor-preflight.js +903 -0
- package/dist/branch/evaluate.d.ts +23 -0
- package/dist/branch/evaluate.js +136 -0
- package/dist/branch/git.d.ts +15 -0
- package/dist/branch/git.js +42 -0
- package/dist/branch/index.d.ts +3 -0
- package/dist/branch/index.js +3 -0
- package/dist/cache/cli.d.ts +3 -0
- package/dist/cache/cli.js +8 -0
- package/dist/cache/constants.d.ts +12 -0
- package/dist/cache/constants.js +14 -0
- package/dist/cache/errors.d.ts +34 -0
- package/dist/cache/errors.js +52 -0
- package/dist/cache/fetch.d.ts +101 -0
- package/dist/cache/fetch.js +413 -0
- package/dist/cache/index.d.ts +14 -0
- package/dist/cache/index.js +14 -0
- package/dist/cache/io.d.ts +15 -0
- package/dist/cache/io.js +53 -0
- package/dist/cache/json.d.ts +11 -0
- package/dist/cache/json.js +32 -0
- package/dist/cache/main.d.ts +3 -0
- package/dist/cache/main.js +319 -0
- package/dist/cache/operations.d.ts +34 -0
- package/dist/cache/operations.js +348 -0
- package/dist/cache/paths.d.ts +7 -0
- package/dist/cache/paths.js +27 -0
- package/dist/cache/quota.d.ts +56 -0
- package/dist/cache/quota.js +191 -0
- package/dist/cache/scanner.d.ts +28 -0
- package/dist/cache/scanner.js +362 -0
- package/dist/cache/test-helpers.d.ts +10 -0
- package/dist/cache/test-helpers.js +17 -0
- package/dist/cache/time.d.ts +9 -0
- package/dist/cache/time.js +20 -0
- package/dist/cache/types.d.ts +50 -0
- package/dist/cache/types.js +2 -0
- package/dist/cache/validate.d.ts +3 -0
- package/dist/cache/validate.js +118 -0
- package/dist/capacity/backfill.d.ts +52 -0
- package/dist/capacity/backfill.js +429 -0
- package/dist/capacity/index.d.ts +3 -0
- package/dist/capacity/index.js +3 -0
- package/dist/capacity/show.d.ts +73 -0
- package/dist/capacity/show.js +387 -0
- package/dist/check/index.d.ts +3 -0
- package/dist/check/index.js +2 -0
- package/dist/check/orchestrator.d.ts +51 -0
- package/dist/check/orchestrator.js +71 -0
- package/dist/codebase/constants.d.ts +2 -0
- package/dist/codebase/constants.js +2 -0
- package/dist/codebase/default-extractor.d.ts +28 -0
- package/dist/codebase/default-extractor.js +713 -0
- package/dist/codebase/index.d.ts +8 -0
- package/dist/codebase/index.js +8 -0
- package/dist/codebase/json.d.ts +14 -0
- package/dist/codebase/json.js +45 -0
- package/dist/codebase/map-fresh.d.ts +11 -0
- package/dist/codebase/map-fresh.js +125 -0
- package/dist/codebase/map.d.ts +19 -0
- package/dist/codebase/map.js +345 -0
- package/dist/codebase/projection-registry.d.ts +25 -0
- package/dist/codebase/projection-registry.js +93 -0
- package/dist/codebase/provider.d.ts +30 -0
- package/dist/codebase/provider.js +696 -0
- package/dist/content-contracts/skills/greptile-detector.d.ts +56 -0
- package/dist/content-contracts/skills/greptile-detector.js +368 -0
- package/dist/content-contracts/skills/helpers.d.ts +24 -0
- package/dist/content-contracts/skills/helpers.js +73 -0
- package/dist/content-contracts/skills/skill-frontmatter.d.ts +7 -0
- package/dist/content-contracts/skills/skill-frontmatter.js +65 -0
- package/dist/content-contracts/standards/_helpers.d.ts +49 -0
- package/dist/content-contracts/standards/_helpers.js +227 -0
- package/dist/content-contracts/standards/_shapes.d.ts +12 -0
- package/dist/content-contracts/standards/_shapes.js +45 -0
- package/dist/content-contracts/standards/_taskfile-helpers.d.ts +12 -0
- package/dist/content-contracts/standards/_taskfile-helpers.js +61 -0
- package/dist/content-root.d.ts +47 -0
- package/dist/content-root.js +89 -0
- package/dist/doctor/agents-md.d.ts +14 -0
- package/dist/doctor/agents-md.js +263 -0
- package/dist/doctor/checks.d.ts +16 -0
- package/dist/doctor/checks.js +351 -0
- package/dist/doctor/cli.d.ts +2 -0
- package/dist/doctor/cli.js +7 -0
- package/dist/doctor/constants.d.ts +15 -0
- package/dist/doctor/constants.js +40 -0
- package/dist/doctor/doctor-state.d.ts +16 -0
- package/dist/doctor/doctor-state.js +117 -0
- package/dist/doctor/flags.d.ts +5 -0
- package/dist/doctor/flags.js +63 -0
- package/dist/doctor/index.d.ts +14 -0
- package/dist/doctor/index.js +14 -0
- package/dist/doctor/json.d.ts +3 -0
- package/dist/doctor/json.js +21 -0
- package/dist/doctor/main.d.ts +3 -0
- package/dist/doctor/main.js +387 -0
- package/dist/doctor/manifest.d.ts +11 -0
- package/dist/doctor/manifest.js +114 -0
- package/dist/doctor/output.d.ts +19 -0
- package/dist/doctor/output.js +49 -0
- package/dist/doctor/paths.d.ts +16 -0
- package/dist/doctor/paths.js +106 -0
- package/dist/doctor/payload-staleness.d.ts +13 -0
- package/dist/doctor/payload-staleness.js +165 -0
- package/dist/doctor/taskfile.d.ts +6 -0
- package/dist/doctor/taskfile.js +65 -0
- package/dist/doctor/types.d.ts +76 -0
- package/dist/doctor/types.js +4 -0
- package/dist/doctor/which.d.ts +3 -0
- package/dist/doctor/which.js +17 -0
- package/dist/encoding/evaluate.d.ts +19 -0
- package/dist/encoding/evaluate.js +155 -0
- package/dist/encoding/git.d.ts +11 -0
- package/dist/encoding/git.js +36 -0
- package/dist/encoding/index.d.ts +6 -0
- package/dist/encoding/index.js +6 -0
- package/dist/encoding/patterns.d.ts +29 -0
- package/dist/encoding/patterns.js +109 -0
- package/dist/encoding/scan.d.ts +24 -0
- package/dist/encoding/scan.js +182 -0
- package/dist/encoding/text.d.ts +21 -0
- package/dist/encoding/text.js +111 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +55 -0
- package/dist/intake/candidates-log.d.ts +20 -0
- package/dist/intake/candidates-log.js +224 -0
- package/dist/intake/github-auth-modes-cli.d.ts +3 -0
- package/dist/intake/github-auth-modes-cli.js +23 -0
- package/dist/intake/github-auth-modes.d.ts +54 -0
- package/dist/intake/github-auth-modes.js +275 -0
- package/dist/intake/github-body-cli.d.ts +3 -0
- package/dist/intake/github-body-cli.js +30 -0
- package/dist/intake/github-body.d.ts +48 -0
- package/dist/intake/github-body.js +151 -0
- package/dist/intake/index.d.ts +15 -0
- package/dist/intake/index.js +15 -0
- package/dist/intake/issue-emit-cli.d.ts +3 -0
- package/dist/intake/issue-emit-cli.js +34 -0
- package/dist/intake/issue-emit.d.ts +63 -0
- package/dist/intake/issue-emit.js +351 -0
- package/dist/intake/issue-ingest-cli.d.ts +3 -0
- package/dist/intake/issue-ingest-cli.js +33 -0
- package/dist/intake/issue-ingest.d.ts +53 -0
- package/dist/intake/issue-ingest.js +477 -0
- package/dist/intake/markdown-scanners.d.ts +23 -0
- package/dist/intake/markdown-scanners.js +247 -0
- package/dist/intake/parity-scenarios.d.ts +22 -0
- package/dist/intake/parity-scenarios.js +32 -0
- package/dist/intake/platform-capabilities.d.ts +11 -0
- package/dist/intake/platform-capabilities.js +34 -0
- package/dist/intake/reconcile-issues-cli.d.ts +3 -0
- package/dist/intake/reconcile-issues-cli.js +31 -0
- package/dist/intake/reconcile-issues.d.ts +60 -0
- package/dist/intake/reconcile-issues.js +756 -0
- package/dist/integration-e2e/bootstrap-cache-module.d.ts +5 -0
- package/dist/integration-e2e/bootstrap-cache-module.js +21 -0
- package/dist/integration-e2e/helpers.d.ts +28 -0
- package/dist/integration-e2e/helpers.js +157 -0
- package/dist/lifecycle/event-detect.d.ts +32 -0
- package/dist/lifecycle/event-detect.js +172 -0
- package/dist/lifecycle/events.d.ts +45 -0
- package/dist/lifecycle/events.js +340 -0
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/lifecycle-hygiene.d.ts +59 -0
- package/dist/lifecycle/lifecycle-hygiene.js +388 -0
- package/dist/orchestration/index.d.ts +7 -0
- package/dist/orchestration/index.js +7 -0
- package/dist/orchestration/judgment-policy.d.ts +23 -0
- package/dist/orchestration/judgment-policy.js +228 -0
- package/dist/orchestration/pathspec.d.ts +11 -0
- package/dist/orchestration/pathspec.js +95 -0
- package/dist/orchestration/probe-session.d.ts +74 -0
- package/dist/orchestration/probe-session.js +478 -0
- package/dist/orchestration/subagent-monitor.d.ts +64 -0
- package/dist/orchestration/subagent-monitor.js +405 -0
- package/dist/orchestration/verify-investigation.d.ts +27 -0
- package/dist/orchestration/verify-investigation.js +314 -0
- package/dist/orchestration/verify-judgment-gates.d.ts +66 -0
- package/dist/orchestration/verify-judgment-gates.js +710 -0
- package/dist/packs/index.d.ts +4 -0
- package/dist/packs/index.js +4 -0
- package/dist/packs/pack-render.d.ts +31 -0
- package/dist/packs/pack-render.js +357 -0
- package/dist/packs/packs-slice.d.ts +58 -0
- package/dist/packs/packs-slice.js +649 -0
- package/dist/packs/quarantine-ext.d.ts +7 -0
- package/dist/packs/quarantine-ext.js +164 -0
- package/dist/platform/agents-md.d.ts +31 -0
- package/dist/platform/agents-md.js +320 -0
- package/dist/platform/changelog-cli.d.ts +3 -0
- package/dist/platform/changelog-cli.js +64 -0
- package/dist/platform/constants.d.ts +20 -0
- package/dist/platform/constants.js +27 -0
- package/dist/platform/index.d.ts +9 -0
- package/dist/platform/index.js +9 -0
- package/dist/platform/ip-risk.d.ts +10 -0
- package/dist/platform/ip-risk.js +235 -0
- package/dist/platform/linear-scan.d.ts +36 -0
- package/dist/platform/linear-scan.js +174 -0
- package/dist/platform/platform-capabilities.d.ts +45 -0
- package/dist/platform/platform-capabilities.js +190 -0
- package/dist/platform/resolve-changelog-unreleased.d.ts +24 -0
- package/dist/platform/resolve-changelog-unreleased.js +364 -0
- package/dist/platform/resolve-version.d.ts +22 -0
- package/dist/platform/resolve-version.js +303 -0
- package/dist/platform/slug-normalize.d.ts +9 -0
- package/dist/platform/slug-normalize.js +110 -0
- package/dist/policy/autonomy.d.ts +43 -0
- package/dist/policy/autonomy.js +220 -0
- package/dist/policy/capacity.d.ts +45 -0
- package/dist/policy/capacity.js +251 -0
- package/dist/policy/decisions.d.ts +26 -0
- package/dist/policy/decisions.js +114 -0
- package/dist/policy/disclosure.d.ts +4 -0
- package/dist/policy/disclosure.js +19 -0
- package/dist/policy/index.d.ts +43 -0
- package/dist/policy/index.js +298 -0
- package/dist/policy/resolve.d.ts +38 -0
- package/dist/policy/resolve.js +228 -0
- package/dist/policy/wip.d.ts +15 -0
- package/dist/policy/wip.js +81 -0
- package/dist/pr-closing-keywords/constants.d.ts +6 -0
- package/dist/pr-closing-keywords/constants.js +6 -0
- package/dist/pr-closing-keywords/detect.d.ts +5 -0
- package/dist/pr-closing-keywords/detect.js +113 -0
- package/dist/pr-closing-keywords/gh.d.ts +6 -0
- package/dist/pr-closing-keywords/gh.js +129 -0
- package/dist/pr-closing-keywords/index.d.ts +7 -0
- package/dist/pr-closing-keywords/index.js +6 -0
- package/dist/pr-closing-keywords/io.d.ts +3 -0
- package/dist/pr-closing-keywords/io.js +22 -0
- package/dist/pr-closing-keywords/main.d.ts +9 -0
- package/dist/pr-closing-keywords/main.js +246 -0
- package/dist/pr-closing-keywords/types.d.ts +23 -0
- package/dist/pr-closing-keywords/types.js +2 -0
- package/dist/pr-merge-readiness/compute.d.ts +7 -0
- package/dist/pr-merge-readiness/compute.js +210 -0
- package/dist/pr-merge-readiness/constants.d.ts +20 -0
- package/dist/pr-merge-readiness/constants.js +32 -0
- package/dist/pr-merge-readiness/evaluate.d.ts +5 -0
- package/dist/pr-merge-readiness/evaluate.js +48 -0
- package/dist/pr-merge-readiness/gh.d.ts +22 -0
- package/dist/pr-merge-readiness/gh.js +281 -0
- package/dist/pr-merge-readiness/index.d.ts +9 -0
- package/dist/pr-merge-readiness/index.js +8 -0
- package/dist/pr-merge-readiness/main.d.ts +14 -0
- package/dist/pr-merge-readiness/main.js +67 -0
- package/dist/pr-merge-readiness/output.d.ts +7 -0
- package/dist/pr-merge-readiness/output.js +98 -0
- package/dist/pr-merge-readiness/parse.d.ts +6 -0
- package/dist/pr-merge-readiness/parse.js +83 -0
- package/dist/pr-merge-readiness/types.d.ts +29 -0
- package/dist/pr-merge-readiness/types.js +2 -0
- package/dist/pr-monitor/cadence.d.ts +3 -0
- package/dist/pr-monitor/cadence.js +12 -0
- package/dist/pr-monitor/constants.d.ts +8 -0
- package/dist/pr-monitor/constants.js +12 -0
- package/dist/pr-monitor/index.d.ts +7 -0
- package/dist/pr-monitor/index.js +6 -0
- package/dist/pr-monitor/main.d.ts +17 -0
- package/dist/pr-monitor/main.js +169 -0
- package/dist/pr-monitor/monitor.d.ts +9 -0
- package/dist/pr-monitor/monitor.js +106 -0
- package/dist/pr-monitor/readiness.d.ts +6 -0
- package/dist/pr-monitor/readiness.js +64 -0
- package/dist/pr-monitor/types.d.ts +30 -0
- package/dist/pr-monitor/types.js +2 -0
- package/dist/pr-protected-issues/constants.d.ts +7 -0
- package/dist/pr-protected-issues/constants.js +7 -0
- package/dist/pr-protected-issues/gh.d.ts +9 -0
- package/dist/pr-protected-issues/gh.js +96 -0
- package/dist/pr-protected-issues/index.d.ts +6 -0
- package/dist/pr-protected-issues/index.js +5 -0
- package/dist/pr-protected-issues/main.d.ts +14 -0
- package/dist/pr-protected-issues/main.js +128 -0
- package/dist/pr-protected-issues/parse.d.ts +6 -0
- package/dist/pr-protected-issues/parse.js +21 -0
- package/dist/pr-protected-issues/types.d.ts +8 -0
- package/dist/pr-protected-issues/types.js +2 -0
- package/dist/pr-wait-mergeable/cascade.d.ts +12 -0
- package/dist/pr-wait-mergeable/cascade.js +107 -0
- package/dist/pr-wait-mergeable/classify.d.ts +5 -0
- package/dist/pr-wait-mergeable/classify.js +47 -0
- package/dist/pr-wait-mergeable/constants.d.ts +5 -0
- package/dist/pr-wait-mergeable/constants.js +5 -0
- package/dist/pr-wait-mergeable/index.d.ts +8 -0
- package/dist/pr-wait-mergeable/index.js +7 -0
- package/dist/pr-wait-mergeable/main.d.ts +18 -0
- package/dist/pr-wait-mergeable/main.js +213 -0
- package/dist/pr-wait-mergeable/result.d.ts +9 -0
- package/dist/pr-wait-mergeable/result.js +38 -0
- package/dist/pr-wait-mergeable/types.d.ts +16 -0
- package/dist/pr-wait-mergeable/types.js +2 -0
- package/dist/pr-wait-mergeable/wrappers.d.ts +26 -0
- package/dist/pr-wait-mergeable/wrappers.js +103 -0
- package/dist/preflight/evaluate.d.ts +22 -0
- package/dist/preflight/evaluate.js +137 -0
- package/dist/preflight/index.d.ts +3 -0
- package/dist/preflight/index.js +2 -0
- package/dist/preflight-cache/evaluate.d.ts +40 -0
- package/dist/preflight-cache/evaluate.js +481 -0
- package/dist/preflight-cache/index.d.ts +3 -0
- package/dist/preflight-cache/index.js +2 -0
- package/dist/preflight-gh/classifier.d.ts +56 -0
- package/dist/preflight-gh/classifier.js +415 -0
- package/dist/preflight-gh/index.d.ts +3 -0
- package/dist/preflight-gh/index.js +2 -0
- package/dist/release/changelog.d.ts +9 -0
- package/dist/release/changelog.js +105 -0
- package/dist/release/cli.d.ts +2 -0
- package/dist/release/cli.js +7 -0
- package/dist/release/constants.d.ts +22 -0
- package/dist/release/constants.js +85 -0
- package/dist/release/flags.d.ts +4 -0
- package/dist/release/flags.js +131 -0
- package/dist/release/gh.d.ts +16 -0
- package/dist/release/gh.js +210 -0
- package/dist/release/git.d.ts +11 -0
- package/dist/release/git.js +84 -0
- package/dist/release/index.d.ts +14 -0
- package/dist/release/index.js +15 -0
- package/dist/release/main.d.ts +3 -0
- package/dist/release/main.js +47 -0
- package/dist/release/paths.d.ts +6 -0
- package/dist/release/paths.js +39 -0
- package/dist/release/pipeline.d.ts +6 -0
- package/dist/release/pipeline.js +314 -0
- package/dist/release/pyproject-sync.d.ts +6 -0
- package/dist/release/pyproject-sync.js +52 -0
- package/dist/release/pyproject.d.ts +3 -0
- package/dist/release/pyproject.js +33 -0
- package/dist/release/python-bridge.d.ts +7 -0
- package/dist/release/python-bridge.js +144 -0
- package/dist/release/spawn.d.ts +8 -0
- package/dist/release/spawn.js +44 -0
- package/dist/release/types.d.ts +58 -0
- package/dist/release/types.js +2 -0
- package/dist/release/version.d.ts +11 -0
- package/dist/release/version.js +74 -0
- package/dist/release-e2e/constants.d.ts +22 -0
- package/dist/release-e2e/constants.js +43 -0
- package/dist/release-e2e/entrypoint-worker-thread.d.ts +2 -0
- package/dist/release-e2e/entrypoint-worker-thread.js +22 -0
- package/dist/release-e2e/entrypoint-worker.d.ts +13 -0
- package/dist/release-e2e/entrypoint-worker.js +50 -0
- package/dist/release-e2e/entrypoint.d.ts +40 -0
- package/dist/release-e2e/entrypoint.js +257 -0
- package/dist/release-e2e/flags.d.ts +5 -0
- package/dist/release-e2e/flags.js +80 -0
- package/dist/release-e2e/gh-ops.d.ts +5 -0
- package/dist/release-e2e/gh-ops.js +72 -0
- package/dist/release-e2e/git-ops.d.ts +6 -0
- package/dist/release-e2e/git-ops.js +47 -0
- package/dist/release-e2e/index.d.ts +10 -0
- package/dist/release-e2e/index.js +10 -0
- package/dist/release-e2e/main.d.ts +4 -0
- package/dist/release-e2e/main.js +78 -0
- package/dist/release-e2e/npm-ops.d.ts +29 -0
- package/dist/release-e2e/npm-ops.js +149 -0
- package/dist/release-e2e/rehearsal.d.ts +3 -0
- package/dist/release-e2e/rehearsal.js +51 -0
- package/dist/release-e2e/rollback-bridge.d.ts +3 -0
- package/dist/release-e2e/rollback-bridge.js +20 -0
- package/dist/release-e2e/types.d.ts +40 -0
- package/dist/release-e2e/types.js +2 -0
- package/dist/release-publish/cli.d.ts +2 -0
- package/dist/release-publish/cli.js +7 -0
- package/dist/release-publish/constants.d.ts +4 -0
- package/dist/release-publish/constants.js +24 -0
- package/dist/release-publish/flags.d.ts +5 -0
- package/dist/release-publish/flags.js +67 -0
- package/dist/release-publish/gh-api.d.ts +6 -0
- package/dist/release-publish/gh-api.js +102 -0
- package/dist/release-publish/index.d.ts +7 -0
- package/dist/release-publish/index.js +8 -0
- package/dist/release-publish/main.d.ts +3 -0
- package/dist/release-publish/main.js +38 -0
- package/dist/release-publish/pipeline.d.ts +4 -0
- package/dist/release-publish/pipeline.js +46 -0
- package/dist/release-publish/types.d.ts +25 -0
- package/dist/release-publish/types.js +2 -0
- package/dist/release-rollback/constants.d.ts +18 -0
- package/dist/release-rollback/constants.js +55 -0
- package/dist/release-rollback/flags.d.ts +4 -0
- package/dist/release-rollback/flags.js +136 -0
- package/dist/release-rollback/gh.d.ts +5 -0
- package/dist/release-rollback/gh.js +71 -0
- package/dist/release-rollback/git.d.ts +9 -0
- package/dist/release-rollback/git.js +87 -0
- package/dist/release-rollback/guard.d.ts +12 -0
- package/dist/release-rollback/guard.js +97 -0
- package/dist/release-rollback/index.d.ts +9 -0
- package/dist/release-rollback/index.js +10 -0
- package/dist/release-rollback/main.d.ts +3 -0
- package/dist/release-rollback/main.js +51 -0
- package/dist/release-rollback/pipeline.d.ts +7 -0
- package/dist/release-rollback/pipeline.js +221 -0
- package/dist/release-rollback/types.d.ts +41 -0
- package/dist/release-rollback/types.js +2 -0
- package/dist/render/constants.d.ts +16 -0
- package/dist/render/constants.js +78 -0
- package/dist/render/framework-commands.d.ts +41 -0
- package/dist/render/framework-commands.js +416 -0
- package/dist/render/index.d.ts +15 -0
- package/dist/render/index.js +15 -0
- package/dist/render/prd-render.d.ts +14 -0
- package/dist/render/prd-render.js +79 -0
- package/dist/render/project-render.d.ts +20 -0
- package/dist/render/project-render.js +169 -0
- package/dist/render/roadmap-render.d.ts +8 -0
- package/dist/render/roadmap-render.js +387 -0
- package/dist/render/spec-render.d.ts +13 -0
- package/dist/render/spec-render.js +362 -0
- package/dist/render/spec-validate.d.ts +6 -0
- package/dist/render/spec-validate.js +157 -0
- package/dist/render/text-utils.d.ts +8 -0
- package/dist/render/text-utils.js +72 -0
- package/dist/scm/argv.d.ts +7 -0
- package/dist/scm/argv.js +54 -0
- package/dist/scm/binary.d.ts +11 -0
- package/dist/scm/binary.js +35 -0
- package/dist/scm/build-command.d.ts +11 -0
- package/dist/scm/build-command.js +23 -0
- package/dist/scm/call.d.ts +25 -0
- package/dist/scm/call.js +38 -0
- package/dist/scm/cli.d.ts +3 -0
- package/dist/scm/cli.js +7 -0
- package/dist/scm/constants.d.ts +11 -0
- package/dist/scm/constants.js +11 -0
- package/dist/scm/errors.d.ts +5 -0
- package/dist/scm/errors.js +8 -0
- package/dist/scm/gh-rest.d.ts +74 -0
- package/dist/scm/gh-rest.js +326 -0
- package/dist/scm/index.d.ts +11 -0
- package/dist/scm/index.js +11 -0
- package/dist/scm/main.d.ts +12 -0
- package/dist/scm/main.js +65 -0
- package/dist/scm/py-format.d.ts +9 -0
- package/dist/scm/py-format.js +31 -0
- package/dist/scm/rest-dispatch.d.ts +14 -0
- package/dist/scm/rest-dispatch.js +175 -0
- package/dist/scope/audit-log.d.ts +14 -0
- package/dist/scope/audit-log.js +186 -0
- package/dist/scope/capacity-stamp.d.ts +3 -0
- package/dist/scope/capacity-stamp.js +45 -0
- package/dist/scope/cli.d.ts +4 -0
- package/dist/scope/cli.js +11 -0
- package/dist/scope/constants.d.ts +19 -0
- package/dist/scope/constants.js +44 -0
- package/dist/scope/decompose.d.ts +42 -0
- package/dist/scope/decompose.js +1016 -0
- package/dist/scope/decomposed-refs.d.ts +6 -0
- package/dist/scope/decomposed-refs.js +173 -0
- package/dist/scope/demote.d.ts +24 -0
- package/dist/scope/demote.js +209 -0
- package/dist/scope/index.d.ts +12 -0
- package/dist/scope/index.js +12 -0
- package/dist/scope/main.d.ts +30 -0
- package/dist/scope/main.js +365 -0
- package/dist/scope/project-context.d.ts +6 -0
- package/dist/scope/project-context.js +55 -0
- package/dist/scope/project-definition-sync.d.ts +3 -0
- package/dist/scope/project-definition-sync.js +157 -0
- package/dist/scope/transition.d.ts +10 -0
- package/dist/scope/transition.js +133 -0
- package/dist/scope/undo.d.ts +25 -0
- package/dist/scope/undo.js +334 -0
- package/dist/scope/vbrief-json.d.ts +4 -0
- package/dist/scope/vbrief-json.js +8 -0
- package/dist/scope/vbrief-ref.d.ts +11 -0
- package/dist/scope/vbrief-ref.js +100 -0
- package/dist/scope/wip-cap-check.d.ts +11 -0
- package/dist/scope/wip-cap-check.js +23 -0
- package/dist/session/git.d.ts +14 -0
- package/dist/session/git.js +49 -0
- package/dist/session/index.d.ts +9 -0
- package/dist/session/index.js +9 -0
- package/dist/session/json.d.ts +7 -0
- package/dist/session/json.js +29 -0
- package/dist/session/resume-conditions.d.ts +56 -0
- package/dist/session/resume-conditions.js +486 -0
- package/dist/session/ritual-entrypoint.d.ts +20 -0
- package/dist/session/ritual-entrypoint.js +86 -0
- package/dist/session/ritual-sentinel.d.ts +58 -0
- package/dist/session/ritual-sentinel.js +338 -0
- package/dist/session/session-start-hook.d.ts +14 -0
- package/dist/session/session-start-hook.js +53 -0
- package/dist/session/session-start.d.ts +41 -0
- package/dist/session/session-start.js +290 -0
- package/dist/session/staleness.d.ts +8 -0
- package/dist/session/staleness.js +91 -0
- package/dist/session/time.d.ts +5 -0
- package/dist/session/time.js +19 -0
- package/dist/session/verify-session-ritual.d.ts +29 -0
- package/dist/session/verify-session-ritual.js +222 -0
- package/dist/slice/cli.d.ts +21 -0
- package/dist/slice/cli.js +248 -0
- package/dist/slice/constants.d.ts +18 -0
- package/dist/slice/constants.js +30 -0
- package/dist/slice/errors.d.ts +9 -0
- package/dist/slice/errors.js +15 -0
- package/dist/slice/existing.d.ts +53 -0
- package/dist/slice/existing.js +344 -0
- package/dist/slice/index.d.ts +10 -0
- package/dist/slice/index.js +10 -0
- package/dist/slice/json.d.ts +7 -0
- package/dist/slice/json.js +25 -0
- package/dist/slice/lock.d.ts +9 -0
- package/dist/slice/lock.js +59 -0
- package/dist/slice/project-context.d.ts +15 -0
- package/dist/slice/project-context.js +87 -0
- package/dist/slice/record.d.ts +50 -0
- package/dist/slice/record.js +139 -0
- package/dist/slice/validate.d.ts +3 -0
- package/dist/slice/validate.js +86 -0
- package/dist/story-ready/allocation.d.ts +14 -0
- package/dist/story-ready/allocation.js +61 -0
- package/dist/story-ready/evaluate.d.ts +23 -0
- package/dist/story-ready/evaluate.js +161 -0
- package/dist/story-ready/git.d.ts +6 -0
- package/dist/story-ready/git.js +26 -0
- package/dist/story-ready/index.d.ts +4 -0
- package/dist/story-ready/index.js +4 -0
- package/dist/subprocess/max-buffer.d.ts +18 -0
- package/dist/subprocess/max-buffer.js +18 -0
- package/dist/swarm/complete-cohort-cli.d.ts +3 -0
- package/dist/swarm/complete-cohort-cli.js +42 -0
- package/dist/swarm/complete-cohort.d.ts +34 -0
- package/dist/swarm/complete-cohort.js +407 -0
- package/dist/swarm/constants.d.ts +18 -0
- package/dist/swarm/constants.js +24 -0
- package/dist/swarm/index.d.ts +18 -0
- package/dist/swarm/index.js +18 -0
- package/dist/swarm/launch-cli.d.ts +5 -0
- package/dist/swarm/launch-cli.js +111 -0
- package/dist/swarm/launch.d.ts +78 -0
- package/dist/swarm/launch.js +587 -0
- package/dist/swarm/readiness-cli.d.ts +3 -0
- package/dist/swarm/readiness-cli.js +25 -0
- package/dist/swarm/readiness.d.ts +24 -0
- package/dist/swarm/readiness.js +606 -0
- package/dist/swarm/routing-set-cli.d.ts +3 -0
- package/dist/swarm/routing-set-cli.js +82 -0
- package/dist/swarm/routing-verify-cli.d.ts +3 -0
- package/dist/swarm/routing-verify-cli.js +51 -0
- package/dist/swarm/routing-verify.d.ts +20 -0
- package/dist/swarm/routing-verify.js +104 -0
- package/dist/swarm/routing.d.ts +57 -0
- package/dist/swarm/routing.js +173 -0
- package/dist/swarm/subagent-backend.d.ts +22 -0
- package/dist/swarm/subagent-backend.js +162 -0
- package/dist/swarm/subprocess.d.ts +10 -0
- package/dist/swarm/subprocess.js +34 -0
- package/dist/swarm/verify-review-clean-cli.d.ts +3 -0
- package/dist/swarm/verify-review-clean-cli.js +38 -0
- package/dist/swarm/verify-review-clean.d.ts +40 -0
- package/dist/swarm/verify-review-clean.js +240 -0
- package/dist/swarm/worktrees-cli.d.ts +9 -0
- package/dist/swarm/worktrees-cli.js +57 -0
- package/dist/swarm/worktrees.d.ts +39 -0
- package/dist/swarm/worktrees.js +178 -0
- package/dist/text/redos-safe.d.ts +29 -0
- package/dist/text/redos-safe.js +338 -0
- package/dist/triage/actions/candidates-log.d.ts +8 -0
- package/dist/triage/actions/candidates-log.js +195 -0
- package/dist/triage/actions/errors.d.ts +17 -0
- package/dist/triage/actions/errors.js +29 -0
- package/dist/triage/actions/index.d.ts +19 -0
- package/dist/triage/actions/index.js +305 -0
- package/dist/triage/actions/resume-on.d.ts +3 -0
- package/dist/triage/actions/resume-on.js +65 -0
- package/dist/triage/actions/types.d.ts +57 -0
- package/dist/triage/actions/types.js +2 -0
- package/dist/triage/bootstrap/gitignore.d.ts +16 -0
- package/dist/triage/bootstrap/gitignore.js +414 -0
- package/dist/triage/bootstrap/index.d.ts +44 -0
- package/dist/triage/bootstrap/index.js +572 -0
- package/dist/triage/bootstrap/types.d.ts +60 -0
- package/dist/triage/bootstrap/types.js +2 -0
- package/dist/triage/bulk/index.d.ts +99 -0
- package/dist/triage/bulk/index.js +454 -0
- package/dist/triage/classify/index.d.ts +88 -0
- package/dist/triage/classify/index.js +738 -0
- package/dist/triage/help/index.d.ts +25 -0
- package/dist/triage/help/index.js +212 -0
- package/dist/triage/help/registry-data.d.ts +555 -0
- package/dist/triage/help/registry-data.js +841 -0
- package/dist/triage/index.d.ts +23 -0
- package/dist/triage/index.js +23 -0
- package/dist/triage/queue/audit.d.ts +12 -0
- package/dist/triage/queue/audit.js +47 -0
- package/dist/triage/queue/build-queue.d.ts +9 -0
- package/dist/triage/queue/build-queue.js +133 -0
- package/dist/triage/queue/cache.d.ts +20 -0
- package/dist/triage/queue/cache.js +169 -0
- package/dist/triage/queue/constants.d.ts +22 -0
- package/dist/triage/queue/constants.js +28 -0
- package/dist/triage/queue/derive-group.d.ts +7 -0
- package/dist/triage/queue/derive-group.js +20 -0
- package/dist/triage/queue/index.d.ts +12 -0
- package/dist/triage/queue/index.js +12 -0
- package/dist/triage/queue/project.d.ts +6 -0
- package/dist/triage/queue/project.js +18 -0
- package/dist/triage/queue/ranking-labels.d.ts +10 -0
- package/dist/triage/queue/ranking-labels.js +54 -0
- package/dist/triage/queue/render.d.ts +9 -0
- package/dist/triage/queue/render.js +35 -0
- package/dist/triage/queue/repo.d.ts +5 -0
- package/dist/triage/queue/repo.js +36 -0
- package/dist/triage/queue/scope-walk.d.ts +13 -0
- package/dist/triage/queue/scope-walk.js +170 -0
- package/dist/triage/queue/selection.d.ts +28 -0
- package/dist/triage/queue/selection.js +109 -0
- package/dist/triage/queue/types.d.ts +58 -0
- package/dist/triage/queue/types.js +2 -0
- package/dist/triage/reconcile/audit.d.ts +4 -0
- package/dist/triage/reconcile/audit.js +62 -0
- package/dist/triage/reconcile/index.d.ts +5 -0
- package/dist/triage/reconcile/index.js +5 -0
- package/dist/triage/reconcile/parse-uri.d.ts +4 -0
- package/dist/triage/reconcile/parse-uri.js +43 -0
- package/dist/triage/reconcile/reconcile.d.ts +17 -0
- package/dist/triage/reconcile/reconcile.js +163 -0
- package/dist/triage/reconcile/types.d.ts +23 -0
- package/dist/triage/reconcile/types.js +70 -0
- package/dist/triage/refresh/drift.d.ts +15 -0
- package/dist/triage/refresh/drift.js +72 -0
- package/dist/triage/refresh/extract.d.ts +3 -0
- package/dist/triage/refresh/extract.js +43 -0
- package/dist/triage/refresh/index.d.ts +5 -0
- package/dist/triage/refresh/index.js +5 -0
- package/dist/triage/refresh/refresh.d.ts +16 -0
- package/dist/triage/refresh/refresh.js +95 -0
- package/dist/triage/refresh/types.d.ts +18 -0
- package/dist/triage/refresh/types.js +7 -0
- package/dist/triage/scope/cli.d.ts +23 -0
- package/dist/triage/scope/cli.js +257 -0
- package/dist/triage/scope/constants.d.ts +16 -0
- package/dist/triage/scope/constants.js +25 -0
- package/dist/triage/scope/coverage.d.ts +24 -0
- package/dist/triage/scope/coverage.js +96 -0
- package/dist/triage/scope/duration.d.ts +6 -0
- package/dist/triage/scope/duration.js +44 -0
- package/dist/triage/scope/evaluate.d.ts +18 -0
- package/dist/triage/scope/evaluate.js +161 -0
- package/dist/triage/scope/index.d.ts +14 -0
- package/dist/triage/scope/index.js +14 -0
- package/dist/triage/scope/milestone.d.ts +13 -0
- package/dist/triage/scope/milestone.js +178 -0
- package/dist/triage/scope/mutations-core.d.ts +24 -0
- package/dist/triage/scope/mutations-core.js +216 -0
- package/dist/triage/scope/mutations.d.ts +21 -0
- package/dist/triage/scope/mutations.js +203 -0
- package/dist/triage/scope/normalize.d.ts +5 -0
- package/dist/triage/scope/normalize.js +45 -0
- package/dist/triage/scope/python-repr.d.ts +7 -0
- package/dist/triage/scope/python-repr.js +25 -0
- package/dist/triage/scope/renderers.d.ts +9 -0
- package/dist/triage/scope/renderers.js +177 -0
- package/dist/triage/scope/resolve.d.ts +15 -0
- package/dist/triage/scope/resolve.js +122 -0
- package/dist/triage/scope/time.d.ts +6 -0
- package/dist/triage/scope/time.js +18 -0
- package/dist/triage/scope/validate.d.ts +11 -0
- package/dist/triage/scope/validate.js +272 -0
- package/dist/triage/scope-drift/add-ignore.d.ts +10 -0
- package/dist/triage/scope-drift/add-ignore.js +78 -0
- package/dist/triage/scope-drift/cache-walker.d.ts +8 -0
- package/dist/triage/scope-drift/cache-walker.js +103 -0
- package/dist/triage/scope-drift/compute.d.ts +9 -0
- package/dist/triage/scope-drift/compute.js +92 -0
- package/dist/triage/scope-drift/index.d.ts +6 -0
- package/dist/triage/scope-drift/index.js +6 -0
- package/dist/triage/scope-drift/render.d.ts +4 -0
- package/dist/triage/scope-drift/render.js +45 -0
- package/dist/triage/scope-drift/scope-rules.d.ts +16 -0
- package/dist/triage/scope-drift/scope-rules.js +149 -0
- package/dist/triage/scope-drift/types.d.ts +13 -0
- package/dist/triage/scope-drift/types.js +8 -0
- package/dist/triage/smoketest/index.d.ts +81 -0
- package/dist/triage/smoketest/index.js +335 -0
- package/dist/triage/subscribe/index.d.ts +38 -0
- package/dist/triage/subscribe/index.js +303 -0
- package/dist/triage/summary/index.d.ts +70 -0
- package/dist/triage/summary/index.js +431 -0
- package/dist/triage/summary/reconcilable.d.ts +12 -0
- package/dist/triage/summary/reconcilable.js +150 -0
- package/dist/triage/summary/scope-drift.d.ts +5 -0
- package/dist/triage/summary/scope-drift.js +219 -0
- package/dist/triage/welcome/constants.d.ts +24 -0
- package/dist/triage/welcome/constants.js +34 -0
- package/dist/triage/welcome/default-mode.d.ts +21 -0
- package/dist/triage/welcome/default-mode.js +48 -0
- package/dist/triage/welcome/index.d.ts +6 -0
- package/dist/triage/welcome/index.js +6 -0
- package/dist/triage/welcome/prior-state.d.ts +17 -0
- package/dist/triage/welcome/prior-state.js +170 -0
- package/dist/triage/welcome/summary.d.ts +23 -0
- package/dist/triage/welcome/summary.js +303 -0
- package/dist/triage/welcome/writers.d.ts +17 -0
- package/dist/triage/welcome/writers.js +157 -0
- package/dist/ts-check-lane/index.d.ts +3 -0
- package/dist/ts-check-lane/index.js +2 -0
- package/dist/ts-check-lane/run-lane.d.ts +53 -0
- package/dist/ts-check-lane/run-lane.js +98 -0
- package/dist/validate-content/capacity-policy.d.ts +82 -0
- package/dist/validate-content/capacity-policy.js +399 -0
- package/dist/validate-content/capacity-show.d.ts +60 -0
- package/dist/validate-content/capacity-show.js +336 -0
- package/dist/validate-content/filename.d.ts +3 -0
- package/dist/validate-content/filename.js +54 -0
- package/dist/validate-content/index.d.ts +9 -0
- package/dist/validate-content/index.js +9 -0
- package/dist/validate-content/link-parser.d.ts +5 -0
- package/dist/validate-content/link-parser.js +42 -0
- package/dist/validate-content/types.d.ts +8 -0
- package/dist/validate-content/types.js +2 -0
- package/dist/validate-content/validate-links.d.ts +17 -0
- package/dist/validate-content/validate-links.js +114 -0
- package/dist/validate-content/validate-strategy-output.d.ts +11 -0
- package/dist/validate-content/validate-strategy-output.js +120 -0
- package/dist/validate-content/verify-capacity.d.ts +14 -0
- package/dist/validate-content/verify-capacity.js +96 -0
- package/dist/vbrief-activate/activate.d.ts +13 -0
- package/dist/vbrief-activate/activate.js +184 -0
- package/dist/vbrief-activate/constants.d.ts +9 -0
- package/dist/vbrief-activate/constants.js +11 -0
- package/dist/vbrief-activate/index.d.ts +6 -0
- package/dist/vbrief-activate/index.js +4 -0
- package/dist/vbrief-activate/main.d.ts +14 -0
- package/dist/vbrief-activate/main.js +33 -0
- package/dist/vbrief-build/build.d.ts +13 -0
- package/dist/vbrief-build/build.js +123 -0
- package/dist/vbrief-build/constants.d.ts +13 -0
- package/dist/vbrief-build/constants.js +34 -0
- package/dist/vbrief-build/index.d.ts +12 -0
- package/dist/vbrief-build/index.js +11 -0
- package/dist/vbrief-build/json.d.ts +3 -0
- package/dist/vbrief-build/json.js +5 -0
- package/dist/vbrief-build/main.d.ts +5 -0
- package/dist/vbrief-build/main.js +65 -0
- package/dist/vbrief-build/parity-scenarios.d.ts +19 -0
- package/dist/vbrief-build/parity-scenarios.js +321 -0
- package/dist/vbrief-build/project-definition-io.d.ts +13 -0
- package/dist/vbrief-build/project-definition-io.js +117 -0
- package/dist/vbrief-build/routing.d.ts +13 -0
- package/dist/vbrief-build/routing.js +110 -0
- package/dist/vbrief-build/sources.d.ts +16 -0
- package/dist/vbrief-build/sources.js +294 -0
- package/dist/vbrief-build/speckit.d.ts +23 -0
- package/dist/vbrief-build/speckit.js +212 -0
- package/dist/vbrief-build/types.d.ts +18 -0
- package/dist/vbrief-build/types.js +7 -0
- package/dist/vbrief-reconcile/graph.d.ts +11 -0
- package/dist/vbrief-reconcile/graph.js +171 -0
- package/dist/vbrief-reconcile/index.d.ts +10 -0
- package/dist/vbrief-reconcile/index.js +9 -0
- package/dist/vbrief-reconcile/labels.d.ts +22 -0
- package/dist/vbrief-reconcile/labels.js +252 -0
- package/dist/vbrief-reconcile/main.d.ts +18 -0
- package/dist/vbrief-reconcile/main.js +149 -0
- package/dist/vbrief-reconcile/parity-scenarios.d.ts +16 -0
- package/dist/vbrief-reconcile/parity-scenarios.js +385 -0
- package/dist/vbrief-reconcile/py-repr.d.ts +3 -0
- package/dist/vbrief-reconcile/py-repr.js +5 -0
- package/dist/vbrief-reconcile/reconciliation.d.ts +20 -0
- package/dist/vbrief-reconcile/reconciliation.js +542 -0
- package/dist/vbrief-reconcile/swarm-deps.d.ts +8 -0
- package/dist/vbrief-reconcile/swarm-deps.js +142 -0
- package/dist/vbrief-reconcile/types.d.ts +128 -0
- package/dist/vbrief-reconcile/types.js +2 -0
- package/dist/vbrief-reconcile/umbrellas.d.ts +48 -0
- package/dist/vbrief-reconcile/umbrellas.js +462 -0
- package/dist/vbrief-validate/conformance.d.ts +26 -0
- package/dist/vbrief-validate/conformance.js +273 -0
- package/dist/vbrief-validate/constants.d.ts +13 -0
- package/dist/vbrief-validate/constants.js +36 -0
- package/dist/vbrief-validate/decomposition.d.ts +3 -0
- package/dist/vbrief-validate/decomposition.js +38 -0
- package/dist/vbrief-validate/epic-links.d.ts +4 -0
- package/dist/vbrief-validate/epic-links.js +152 -0
- package/dist/vbrief-validate/filename.d.ts +5 -0
- package/dist/vbrief-validate/filename.js +62 -0
- package/dist/vbrief-validate/folder-status.d.ts +4 -0
- package/dist/vbrief-validate/folder-status.js +30 -0
- package/dist/vbrief-validate/index.d.ts +14 -0
- package/dist/vbrief-validate/index.js +11 -0
- package/dist/vbrief-validate/main.d.ts +17 -0
- package/dist/vbrief-validate/main.js +127 -0
- package/dist/vbrief-validate/origin.d.ts +4 -0
- package/dist/vbrief-validate/origin.js +76 -0
- package/dist/vbrief-validate/paths.d.ts +11 -0
- package/dist/vbrief-validate/paths.js +83 -0
- package/dist/vbrief-validate/placeholders.d.ts +3 -0
- package/dist/vbrief-validate/placeholders.js +33 -0
- package/dist/vbrief-validate/plan-hooks.d.ts +9 -0
- package/dist/vbrief-validate/plan-hooks.js +145 -0
- package/dist/vbrief-validate/precutover.d.ts +7 -0
- package/dist/vbrief-validate/precutover.js +30 -0
- package/dist/vbrief-validate/project-definition.d.ts +4 -0
- package/dist/vbrief-validate/project-definition.js +166 -0
- package/dist/vbrief-validate/schema.d.ts +8 -0
- package/dist/vbrief-validate/schema.js +150 -0
- package/dist/vbrief-validate/staleness.d.ts +3 -0
- package/dist/vbrief-validate/staleness.js +106 -0
- package/dist/vbrief-validate/validate-all.d.ts +17 -0
- package/dist/vbrief-validate/validate-all.js +119 -0
- package/dist/vbrief-validation/fidelity.d.ts +22 -0
- package/dist/vbrief-validation/fidelity.js +508 -0
- package/dist/vbrief-validation/index.d.ts +11 -0
- package/dist/vbrief-validation/index.js +8 -0
- package/dist/vbrief-validation/legacy-sections.d.ts +13 -0
- package/dist/vbrief-validation/legacy-sections.js +124 -0
- package/dist/vbrief-validation/main.d.ts +5 -0
- package/dist/vbrief-validation/main.js +65 -0
- package/dist/vbrief-validation/normalize.d.ts +22 -0
- package/dist/vbrief-validation/normalize.js +126 -0
- package/dist/vbrief-validation/parity-scenarios.d.ts +14 -0
- package/dist/vbrief-validation/parity-scenarios.js +523 -0
- package/dist/vbrief-validation/safety.d.ts +38 -0
- package/dist/vbrief-validation/safety.js +422 -0
- package/dist/vbrief-validation/story-quality.d.ts +29 -0
- package/dist/vbrief-validation/story-quality.js +452 -0
- package/dist/vbrief-validation/types.d.ts +58 -0
- package/dist/vbrief-validation/types.js +2 -0
- package/dist/vbrief-validation/validation.d.ts +15 -0
- package/dist/vbrief-validation/validation.js +123 -0
- package/dist/verify-env/index.d.ts +6 -0
- package/dist/verify-env/index.js +6 -0
- package/dist/verify-env/node-runtime.d.ts +6 -0
- package/dist/verify-env/node-runtime.js +11 -0
- package/dist/verify-env/toolchain-check.d.ts +28 -0
- package/dist/verify-env/toolchain-check.js +68 -0
- package/dist/verify-env/verify-hooks-installed.d.ts +21 -0
- package/dist/verify-env/verify-hooks-installed.js +162 -0
- package/dist/verify-env/verify-no-task-runtime.d.ts +20 -0
- package/dist/verify-env/verify-no-task-runtime.js +383 -0
- package/dist/verify-env/verify-tools.d.ts +59 -0
- package/dist/verify-env/verify-tools.js +354 -0
- package/dist/verify-source/code-structure-validate.d.ts +48 -0
- package/dist/verify-source/code-structure-validate.js +678 -0
- package/dist/verify-source/content-manifest.d.ts +102 -0
- package/dist/verify-source/content-manifest.js +282 -0
- package/dist/verify-source/index.d.ts +7 -0
- package/dist/verify-source/index.js +7 -0
- package/dist/verify-source/python-call-scan.d.ts +14 -0
- package/dist/verify-source/python-call-scan.js +137 -0
- package/dist/verify-source/rule-ownership-lint.d.ts +33 -0
- package/dist/verify-source/rule-ownership-lint.js +179 -0
- package/dist/verify-source/scm-boundary.d.ts +26 -0
- package/dist/verify-source/scm-boundary.js +170 -0
- package/dist/verify-source/verify-stubs.d.ts +19 -0
- package/dist/verify-source/verify-stubs.js +185 -0
- package/dist/wip-cap/evaluate.d.ts +17 -0
- package/dist/wip-cap/evaluate.js +62 -0
- package/dist/wip-cap/index.d.ts +2 -0
- package/dist/wip-cap/index.js +2 -0
- package/package.json +206 -0
package/dist/scm/main.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { extractFlag } from "./argv.js";
|
|
3
|
+
import { buildCommand } from "./build-command.js";
|
|
4
|
+
import { REST_OPT_IN_VERBS } from "./constants.js";
|
|
5
|
+
import { ScmStubError } from "./errors.js";
|
|
6
|
+
import { runRestList, runRestView } from "./rest-dispatch.js";
|
|
7
|
+
/**
|
|
8
|
+
* CLI entry point. Returns the underlying binary's exit code (or 2 on arg error).
|
|
9
|
+
* Mirrors `scripts/scm.py::main`.
|
|
10
|
+
*/
|
|
11
|
+
export function main(argv, options = {}) {
|
|
12
|
+
if (argv.length < 2) {
|
|
13
|
+
process.stderr.write("usage: scm.py <namespace> <verb> [pass-through args...]\n" +
|
|
14
|
+
" (v1 stub: namespace=issue, verb=list|view|close|edit)\n" +
|
|
15
|
+
" --rest opt-in is supported on issue view/list (#976)\n");
|
|
16
|
+
return 2;
|
|
17
|
+
}
|
|
18
|
+
const namespace = argv[0] ?? "";
|
|
19
|
+
const verb = argv[1] ?? "";
|
|
20
|
+
let extra = argv.slice(2);
|
|
21
|
+
const [restMode, afterRest] = extractFlag(extra, "--rest");
|
|
22
|
+
extra = afterRest;
|
|
23
|
+
if (restMode) {
|
|
24
|
+
if (namespace !== "issue" ||
|
|
25
|
+
!REST_OPT_IN_VERBS.includes(verb)) {
|
|
26
|
+
process.stderr.write("error: --rest is only supported on 'issue {view|list}'; " +
|
|
27
|
+
`got 'scm.py ${namespace} ${verb}'. Mutations (close, edit) ` +
|
|
28
|
+
"still forward to gh in the v1 stub; #881 owns the full " +
|
|
29
|
+
"REST migration.\n");
|
|
30
|
+
return 2;
|
|
31
|
+
}
|
|
32
|
+
const seams = {
|
|
33
|
+
whichFn: options.whichFn,
|
|
34
|
+
runGhApiFn: options.runGhApiFn,
|
|
35
|
+
};
|
|
36
|
+
const result = verb === "view" ? runRestView(extra, seams) : runRestList(extra, seams);
|
|
37
|
+
if (result.stdout.length > 0) {
|
|
38
|
+
process.stdout.write(result.stdout);
|
|
39
|
+
}
|
|
40
|
+
if (result.stderr.length > 0) {
|
|
41
|
+
process.stderr.write(result.stderr);
|
|
42
|
+
}
|
|
43
|
+
return result.exitCode;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const cmd = buildCommand(namespace, verb, extra, { whichFn: options.whichFn });
|
|
47
|
+
const binary = cmd[0];
|
|
48
|
+
if (binary === undefined) {
|
|
49
|
+
throw new ScmStubError("internal error: empty command argv");
|
|
50
|
+
}
|
|
51
|
+
const proc = spawnSync(binary, cmd.slice(1), {
|
|
52
|
+
stdio: "inherit",
|
|
53
|
+
env: process.env,
|
|
54
|
+
});
|
|
55
|
+
return proc.status ?? 1;
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
if (err instanceof ScmStubError) {
|
|
59
|
+
process.stderr.write(`error: ${err.message}\n`);
|
|
60
|
+
return 2;
|
|
61
|
+
}
|
|
62
|
+
throw err;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Format values like Python `repr()` for golden parity with the oracle. */
|
|
2
|
+
export declare function pyRepr(value: unknown): string;
|
|
3
|
+
/** Format a tuple like Python `('a', 'b')` including trailing comma for length 1. */
|
|
4
|
+
export declare function pyTuple(items: readonly unknown[]): string;
|
|
5
|
+
/** JSON.dumps(..., ensure_ascii=False) default separators: ', ' and ': '.
|
|
6
|
+
* Only structural separators are expanded -- colons/commas inside string
|
|
7
|
+
* literals are preserved so values like "fix: bug" or "foo, bar" survive. */
|
|
8
|
+
export declare function pythonJsonStringify(value: unknown): string;
|
|
9
|
+
//# sourceMappingURL=py-format.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { expandPythonJsonSeparators } from "../text/redos-safe.js";
|
|
2
|
+
/** Format values like Python `repr()` for golden parity with the oracle. */
|
|
3
|
+
export function pyRepr(value) {
|
|
4
|
+
if (value === null) {
|
|
5
|
+
return "None";
|
|
6
|
+
}
|
|
7
|
+
if (typeof value === "string") {
|
|
8
|
+
return `'${value.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
9
|
+
}
|
|
10
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
11
|
+
return String(value);
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
return `[${value.map((item) => pyRepr(item)).join(", ")}]`;
|
|
15
|
+
}
|
|
16
|
+
return JSON.stringify(value);
|
|
17
|
+
}
|
|
18
|
+
/** Format a tuple like Python `('a', 'b')` including trailing comma for length 1. */
|
|
19
|
+
export function pyTuple(items) {
|
|
20
|
+
if (items.length === 1) {
|
|
21
|
+
return `(${pyRepr(items[0])},)`;
|
|
22
|
+
}
|
|
23
|
+
return `(${items.map((item) => pyRepr(item)).join(", ")})`;
|
|
24
|
+
}
|
|
25
|
+
/** JSON.dumps(..., ensure_ascii=False) default separators: ', ' and ': '.
|
|
26
|
+
* Only structural separators are expanded -- colons/commas inside string
|
|
27
|
+
* literals are preserved so values like "fix: bug" or "foo, bar" survive. */
|
|
28
|
+
export function pythonJsonStringify(value) {
|
|
29
|
+
return expandPythonJsonSeparators(JSON.stringify(value, null, 0));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=py-format.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type GhRestSeams } from "./gh-rest.js";
|
|
2
|
+
/** Dispatch `scm issue view --rest <N> --repo X [--json fields]`. */
|
|
3
|
+
export declare function runRestView(extra: readonly string[], seams?: GhRestSeams): {
|
|
4
|
+
exitCode: number;
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
};
|
|
8
|
+
/** Dispatch `scm issue list --rest --repo X [...flags]`. */
|
|
9
|
+
export declare function runRestList(extra: readonly string[], seams?: GhRestSeams): {
|
|
10
|
+
exitCode: number;
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=rest-dispatch.d.ts.map
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { extractValueFlag, filterJsonFields } from "./argv.js";
|
|
2
|
+
import { GhRestError, InvalidRepoError, restIssueList, restIssueView, } from "./gh-rest.js";
|
|
3
|
+
import { pyRepr, pythonJsonStringify } from "./py-format.js";
|
|
4
|
+
function parseJsonFields(jsonSpec) {
|
|
5
|
+
if (jsonSpec === null || jsonSpec.length === 0) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
return jsonSpec.split(",").map((f) => f.trim());
|
|
9
|
+
}
|
|
10
|
+
/** Dispatch `scm issue view --rest <N> --repo X [--json fields]`. */
|
|
11
|
+
export function runRestView(extra, seams = {}) {
|
|
12
|
+
let remainder = [...extra];
|
|
13
|
+
const [repo, afterRepo] = extractValueFlag(remainder, "--repo");
|
|
14
|
+
remainder = afterRepo;
|
|
15
|
+
const [jsonSpec, afterJson] = extractValueFlag(remainder, "--json");
|
|
16
|
+
remainder = afterJson;
|
|
17
|
+
if (repo === null || repo.length === 0) {
|
|
18
|
+
return {
|
|
19
|
+
exitCode: 2,
|
|
20
|
+
stdout: "",
|
|
21
|
+
stderr: "error: --rest issue view requires --repo OWNER/NAME\n",
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const positionals = remainder.filter((t) => !t.startsWith("-"));
|
|
25
|
+
const leftoverFlags = remainder.filter((t) => t.startsWith("-"));
|
|
26
|
+
if (leftoverFlags.length > 0) {
|
|
27
|
+
return {
|
|
28
|
+
exitCode: 2,
|
|
29
|
+
stdout: "",
|
|
30
|
+
stderr: `error: --rest issue view does not recognise these flags: ` +
|
|
31
|
+
`${pyRepr(leftoverFlags)}. Supported flags are --repo, --json. ` +
|
|
32
|
+
"Mutations / additional read filters belong on #881.\n",
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (positionals.length !== 1) {
|
|
36
|
+
return {
|
|
37
|
+
exitCode: 2,
|
|
38
|
+
stdout: "",
|
|
39
|
+
stderr: "error: --rest issue view expects exactly one positional issue " +
|
|
40
|
+
`number; got ${pyRepr(positionals)}\n`,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const issueStr = positionals[0] ?? "";
|
|
44
|
+
const issueN = Number.parseInt(issueStr, 10);
|
|
45
|
+
if (Number.isNaN(issueN) || String(issueN) !== issueStr) {
|
|
46
|
+
return {
|
|
47
|
+
exitCode: 2,
|
|
48
|
+
stdout: "",
|
|
49
|
+
stderr: `error: issue number must be an integer; got ${pyRepr(issueStr)}\n`,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const response = restIssueView(repo, issueN, seams);
|
|
54
|
+
const fields = parseJsonFields(jsonSpec);
|
|
55
|
+
const filtered = filterJsonFields(response, fields);
|
|
56
|
+
return {
|
|
57
|
+
exitCode: 0,
|
|
58
|
+
stdout: `${pythonJsonStringify(filtered)}\n`,
|
|
59
|
+
stderr: "",
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
if (err instanceof InvalidRepoError) {
|
|
64
|
+
return {
|
|
65
|
+
exitCode: 2,
|
|
66
|
+
stdout: "",
|
|
67
|
+
stderr: `error: invalid --repo value: ${err.message}\n`,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (err instanceof GhRestError) {
|
|
71
|
+
return {
|
|
72
|
+
exitCode: 1,
|
|
73
|
+
stdout: "",
|
|
74
|
+
stderr: `error: ${err.message}\n`,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** Dispatch `scm issue list --rest --repo X [...flags]`. */
|
|
81
|
+
export function runRestList(extra, seams = {}) {
|
|
82
|
+
let remainder = [...extra];
|
|
83
|
+
const [repo, afterRepo] = extractValueFlag(remainder, "--repo");
|
|
84
|
+
remainder = afterRepo;
|
|
85
|
+
const [state, afterState] = extractValueFlag(remainder, "--state", "open");
|
|
86
|
+
remainder = afterState;
|
|
87
|
+
const [jsonSpec, afterJson] = extractValueFlag(remainder, "--json");
|
|
88
|
+
remainder = afterJson;
|
|
89
|
+
const [author, afterAuthor] = extractValueFlag(remainder, "--author");
|
|
90
|
+
remainder = afterAuthor;
|
|
91
|
+
const labelValues = [];
|
|
92
|
+
while (true) {
|
|
93
|
+
const [labelPart, afterLabel] = extractValueFlag(remainder, "--label");
|
|
94
|
+
if (labelPart === null) {
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
labelValues.push(labelPart);
|
|
98
|
+
remainder = afterLabel;
|
|
99
|
+
}
|
|
100
|
+
const [limitStr, afterLimit] = extractValueFlag(remainder, "--limit", "30");
|
|
101
|
+
remainder = afterLimit;
|
|
102
|
+
const leftoverFlags = remainder.filter((t) => t.startsWith("-"));
|
|
103
|
+
if (leftoverFlags.length > 0) {
|
|
104
|
+
return {
|
|
105
|
+
exitCode: 2,
|
|
106
|
+
stdout: "",
|
|
107
|
+
stderr: `error: --rest issue list does not recognise these flags: ` +
|
|
108
|
+
`${pyRepr(leftoverFlags)}. Supported flags are --repo, --state, ` +
|
|
109
|
+
"--label, --author, --limit, --json. Additional filters " +
|
|
110
|
+
"belong on #881.\n",
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const leftoverPositionals = remainder.filter((t) => !t.startsWith("-"));
|
|
114
|
+
if (leftoverPositionals.length > 0) {
|
|
115
|
+
return {
|
|
116
|
+
exitCode: 2,
|
|
117
|
+
stdout: "",
|
|
118
|
+
stderr: `error: --rest issue list takes no positional arguments; ` +
|
|
119
|
+
`got ${pyRepr(leftoverPositionals)}. Did you mean ` +
|
|
120
|
+
`\`scm.py issue view --rest ${leftoverPositionals[0]} --repo OWNER/NAME\`?\n`,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (repo === null || repo.length === 0) {
|
|
124
|
+
return {
|
|
125
|
+
exitCode: 2,
|
|
126
|
+
stdout: "",
|
|
127
|
+
stderr: "error: --rest issue list requires --repo OWNER/NAME\n",
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
const perPage = limitStr !== null ? Number.parseInt(limitStr, 10) : 30;
|
|
131
|
+
if (Number.isNaN(perPage)) {
|
|
132
|
+
return {
|
|
133
|
+
exitCode: 2,
|
|
134
|
+
stdout: "",
|
|
135
|
+
stderr: `error: --limit must be an integer; got ${pyRepr(limitStr)}\n`,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const labels = labelValues.flatMap((value) => value
|
|
139
|
+
.split(",")
|
|
140
|
+
.map((item) => item.trim())
|
|
141
|
+
.filter((item) => item.length > 0));
|
|
142
|
+
try {
|
|
143
|
+
const response = restIssueList(repo, {
|
|
144
|
+
state: state ?? "open",
|
|
145
|
+
labels,
|
|
146
|
+
author,
|
|
147
|
+
perPage,
|
|
148
|
+
}, seams);
|
|
149
|
+
const fields = parseJsonFields(jsonSpec);
|
|
150
|
+
const filtered = filterJsonFields(response, fields);
|
|
151
|
+
return {
|
|
152
|
+
exitCode: 0,
|
|
153
|
+
stdout: `${pythonJsonStringify(filtered)}\n`,
|
|
154
|
+
stderr: "",
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
if (err instanceof InvalidRepoError) {
|
|
159
|
+
return {
|
|
160
|
+
exitCode: 2,
|
|
161
|
+
stdout: "",
|
|
162
|
+
stderr: `error: invalid --repo value: ${err.message}\n`,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (err instanceof GhRestError) {
|
|
166
|
+
return {
|
|
167
|
+
exitCode: 1,
|
|
168
|
+
stdout: "",
|
|
169
|
+
stderr: `error: ${err.message}\n`,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
throw err;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=rest-dispatch.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { utcNowIso } from "./vbrief-json.js";
|
|
2
|
+
export declare class ScopeAuditLogError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export declare function newDecisionId(): string;
|
|
6
|
+
export declare function canonicalLogPath(projectRoot: string): string;
|
|
7
|
+
/** Validate and append an audit entry; returns decision_id. */
|
|
8
|
+
export declare function append(entry: Record<string, unknown>, logPath: string): string;
|
|
9
|
+
/** Read all well-formed audit entries in insertion order. */
|
|
10
|
+
export declare function readAll(logPath: string): Record<string, unknown>[];
|
|
11
|
+
export declare function findByPath(vbriefPath: string, logPath: string): Record<string, unknown>[];
|
|
12
|
+
export declare function latestForPath(vbriefPath: string, action: string | null, logPath: string): Record<string, unknown> | null;
|
|
13
|
+
export { utcNowIso as auditUtcNowIso };
|
|
14
|
+
//# sourceMappingURL=audit-log.d.ts.map
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, unlinkSync, writeFileSync, writeSync, } from "node:fs";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { AUDIT_LOG_REL_PATH } from "./constants.js";
|
|
5
|
+
import { utcNowIso } from "./vbrief-json.js";
|
|
6
|
+
export class ScopeAuditLogError extends Error {
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "ScopeAuditLogError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const UUID_RE = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
13
|
+
const ISO8601_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
|
|
14
|
+
const REQUIRED_FIELDS = [
|
|
15
|
+
"decision_id",
|
|
16
|
+
"timestamp",
|
|
17
|
+
"action",
|
|
18
|
+
"vbrief_path",
|
|
19
|
+
"from_status",
|
|
20
|
+
"to_status",
|
|
21
|
+
"actor",
|
|
22
|
+
];
|
|
23
|
+
const DEMOTE_META_REQUIRED = [
|
|
24
|
+
"was_promoted",
|
|
25
|
+
"original_promotion_decision_id",
|
|
26
|
+
"days_in_pending",
|
|
27
|
+
"demote_reason",
|
|
28
|
+
"demoted_from",
|
|
29
|
+
];
|
|
30
|
+
let threadLock = false;
|
|
31
|
+
function replacerSortKeys(_key, value) {
|
|
32
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) {
|
|
33
|
+
const sorted = {};
|
|
34
|
+
for (const k of Object.keys(value).sort()) {
|
|
35
|
+
sorted[k] = value[k];
|
|
36
|
+
}
|
|
37
|
+
return sorted;
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
function validateDemoteMeta(meta) {
|
|
42
|
+
const missing = DEMOTE_META_REQUIRED.filter((f) => !(f in meta));
|
|
43
|
+
if (missing.length > 0) {
|
|
44
|
+
throw new ScopeAuditLogError(`demote_meta missing required field(s): ${missing}`);
|
|
45
|
+
}
|
|
46
|
+
if (typeof meta.was_promoted !== "boolean") {
|
|
47
|
+
throw new ScopeAuditLogError(`demote_meta.was_promoted must be bool, got ${JSON.stringify(meta.was_promoted)}`);
|
|
48
|
+
}
|
|
49
|
+
const opdid = meta.original_promotion_decision_id;
|
|
50
|
+
if (opdid !== null && (typeof opdid !== "string" || !UUID_RE.test(opdid))) {
|
|
51
|
+
throw new ScopeAuditLogError(`demote_meta.original_promotion_decision_id must be a UUID string or null, got ${JSON.stringify(opdid)}`);
|
|
52
|
+
}
|
|
53
|
+
const days = meta.days_in_pending;
|
|
54
|
+
if (typeof days !== "number" || !Number.isInteger(days) || days < 0) {
|
|
55
|
+
throw new ScopeAuditLogError(`demote_meta.days_in_pending must be a non-negative int, got ${JSON.stringify(days)}`);
|
|
56
|
+
}
|
|
57
|
+
if (typeof meta.demote_reason !== "string" || meta.demote_reason.length === 0) {
|
|
58
|
+
throw new ScopeAuditLogError(`demote_meta.demote_reason must be a non-empty string, got ${JSON.stringify(meta.demote_reason)}`);
|
|
59
|
+
}
|
|
60
|
+
if (typeof meta.demoted_from !== "string" || meta.demoted_from.length === 0) {
|
|
61
|
+
throw new ScopeAuditLogError(`demote_meta.demoted_from must be a non-empty string, got ${JSON.stringify(meta.demoted_from)}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function validateEntry(entry) {
|
|
65
|
+
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
|
|
66
|
+
throw new ScopeAuditLogError(`entry must be a dict, got ${entry === null ? "None" : typeof entry}`);
|
|
67
|
+
}
|
|
68
|
+
const e = entry;
|
|
69
|
+
const missing = REQUIRED_FIELDS.filter((f) => !(f in e));
|
|
70
|
+
if (missing.length > 0) {
|
|
71
|
+
throw new ScopeAuditLogError(`entry missing required field(s): ${missing}`);
|
|
72
|
+
}
|
|
73
|
+
if (typeof e.decision_id !== "string" || !UUID_RE.test(e.decision_id)) {
|
|
74
|
+
throw new ScopeAuditLogError(`decision_id must be a UUID string, got ${JSON.stringify(e.decision_id)}`);
|
|
75
|
+
}
|
|
76
|
+
if (typeof e.timestamp !== "string" || !ISO8601_RE.test(e.timestamp)) {
|
|
77
|
+
throw new ScopeAuditLogError(`timestamp must be ISO-8601 UTC with Z suffix, got ${JSON.stringify(e.timestamp)}`);
|
|
78
|
+
}
|
|
79
|
+
for (const field of ["action", "vbrief_path", "from_status", "to_status", "actor"]) {
|
|
80
|
+
const value = e[field];
|
|
81
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
82
|
+
throw new ScopeAuditLogError(`${field} must be a non-empty string, got ${JSON.stringify(value)}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (e.action === "demote") {
|
|
86
|
+
const meta = e.demote_meta;
|
|
87
|
+
if (typeof meta !== "object" || meta === null || Array.isArray(meta)) {
|
|
88
|
+
throw new ScopeAuditLogError(`action='demote' requires a 'demote_meta' object, got ${JSON.stringify(meta)}`);
|
|
89
|
+
}
|
|
90
|
+
validateDemoteMeta(meta);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export function newDecisionId() {
|
|
94
|
+
return randomUUID();
|
|
95
|
+
}
|
|
96
|
+
export function canonicalLogPath(projectRoot) {
|
|
97
|
+
return join(resolve(projectRoot), AUDIT_LOG_REL_PATH);
|
|
98
|
+
}
|
|
99
|
+
function withAppendLock(logPath, fn) {
|
|
100
|
+
const lockPath = `${logPath}.lock`;
|
|
101
|
+
mkdirSync(dirname(logPath), { recursive: true });
|
|
102
|
+
while (threadLock) {
|
|
103
|
+
/* spin-wait for in-process serialization */
|
|
104
|
+
}
|
|
105
|
+
threadLock = true;
|
|
106
|
+
let fd = null;
|
|
107
|
+
try {
|
|
108
|
+
fd = openSync(lockPath, "a+");
|
|
109
|
+
if (readFileSync(lockPath).length === 0) {
|
|
110
|
+
writeSync(fd, "\0");
|
|
111
|
+
}
|
|
112
|
+
fn();
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
threadLock = false;
|
|
116
|
+
if (fd !== null) {
|
|
117
|
+
closeSync(fd);
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
if (existsSync(lockPath)) {
|
|
121
|
+
unlinkSync(lockPath);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
/* best-effort lock cleanup */
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Validate and append an audit entry; returns decision_id. */
|
|
130
|
+
export function append(entry, logPath) {
|
|
131
|
+
if (logPath.length === 0) {
|
|
132
|
+
throw new ScopeAuditLogError("append() requires log_path; pass canonicalLogPath(projectRoot)");
|
|
133
|
+
}
|
|
134
|
+
validateEntry(entry);
|
|
135
|
+
const logFile = resolve(logPath);
|
|
136
|
+
mkdirSync(join(logFile, ".."), { recursive: true });
|
|
137
|
+
const line = JSON.stringify(entry, replacerSortKeys);
|
|
138
|
+
withAppendLock(logFile, () => {
|
|
139
|
+
writeFileSync(logFile, `${line}\n`, { encoding: "utf8", flag: "a" });
|
|
140
|
+
});
|
|
141
|
+
return String(entry.decision_id);
|
|
142
|
+
}
|
|
143
|
+
/** Read all well-formed audit entries in insertion order. */
|
|
144
|
+
export function readAll(logPath) {
|
|
145
|
+
if (logPath.length === 0) {
|
|
146
|
+
throw new ScopeAuditLogError("readAll() requires log_path; pass canonicalLogPath(projectRoot)");
|
|
147
|
+
}
|
|
148
|
+
const logFile = resolve(logPath);
|
|
149
|
+
if (!existsSync(logFile)) {
|
|
150
|
+
return [];
|
|
151
|
+
}
|
|
152
|
+
const out = [];
|
|
153
|
+
const raw = readFileSync(logFile, "utf8");
|
|
154
|
+
for (const line of raw.split("\n")) {
|
|
155
|
+
const stripped = line.trim();
|
|
156
|
+
if (stripped.length === 0) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
const obj = JSON.parse(stripped);
|
|
161
|
+
if (typeof obj === "object" && obj !== null && !Array.isArray(obj)) {
|
|
162
|
+
out.push(obj);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
/* skip malformed lines */
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
export function findByPath(vbriefPath, logPath) {
|
|
172
|
+
return readAll(logPath).filter((e) => e.vbrief_path === vbriefPath);
|
|
173
|
+
}
|
|
174
|
+
export function latestForPath(vbriefPath, action, logPath) {
|
|
175
|
+
let rows = findByPath(vbriefPath, logPath);
|
|
176
|
+
if (action !== null) {
|
|
177
|
+
rows = rows.filter((r) => r.action === action);
|
|
178
|
+
}
|
|
179
|
+
if (rows.length === 0) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
rows.sort((a, b) => String(a.timestamp ?? "").localeCompare(String(b.timestamp ?? "")));
|
|
183
|
+
return rows[rows.length - 1] ?? null;
|
|
184
|
+
}
|
|
185
|
+
export { utcNowIso as auditUtcNowIso };
|
|
186
|
+
//# sourceMappingURL=audit-log.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { PROJECT_DEFINITION_REL_PATH } from "../policy/resolve.js";
|
|
4
|
+
function resolveDefaultCapacityBucket(projectRoot) {
|
|
5
|
+
try {
|
|
6
|
+
const path = join(resolve(projectRoot), PROJECT_DEFINITION_REL_PATH);
|
|
7
|
+
const raw = readFileSync(path, "utf8");
|
|
8
|
+
const data = JSON.parse(raw);
|
|
9
|
+
const plan = data.plan;
|
|
10
|
+
if (typeof plan !== "object" || plan === null || Array.isArray(plan)) {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
const policy = plan.policy;
|
|
14
|
+
if (typeof policy !== "object" || policy === null || Array.isArray(policy)) {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
const allocation = policy.capacityAllocation;
|
|
18
|
+
if (typeof allocation !== "object" || allocation === null || Array.isArray(allocation)) {
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
const defaultBucket = allocation.defaultBucket;
|
|
22
|
+
return typeof defaultBucket === "string" ? defaultBucket : "";
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return "";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/** Stamp completedAt + capacityBucket onto a completing vBRIEF (#1419). */
|
|
29
|
+
export function stampCompletionMetadata(plan, projectRoot, timestamp) {
|
|
30
|
+
let metadata = plan.metadata;
|
|
31
|
+
if (typeof metadata !== "object" || metadata === null || Array.isArray(metadata)) {
|
|
32
|
+
metadata = {};
|
|
33
|
+
plan.metadata = metadata;
|
|
34
|
+
}
|
|
35
|
+
const meta = metadata;
|
|
36
|
+
meta.completedAt = timestamp;
|
|
37
|
+
const existing = meta.capacityBucket;
|
|
38
|
+
if (!(typeof existing === "string" && existing.trim().length > 0)) {
|
|
39
|
+
const bucket = resolveDefaultCapacityBucket(projectRoot);
|
|
40
|
+
if (bucket.length > 0) {
|
|
41
|
+
meta.capacityBucket = bucket;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=capacity-stamp.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { lifecycleMain } from "./main.js";
|
|
4
|
+
/** Direct entry for tests and `node packages/core/dist/scope/cli.js`. */
|
|
5
|
+
export function mainEntry(argv = process.argv.slice(2)) {
|
|
6
|
+
return lifecycleMain(argv);
|
|
7
|
+
}
|
|
8
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
9
|
+
process.exit(mainEntry());
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** vBRIEF lifecycle folder names. */
|
|
2
|
+
export declare const LIFECYCLE_FOLDERS: readonly ["proposed", "pending", "active", "completed", "cancelled"];
|
|
3
|
+
export type LifecycleFolder = (typeof LIFECYCLE_FOLDERS)[number];
|
|
4
|
+
export type ScopeAction = "promote" | "activate" | "complete" | "fail" | "cancel" | "restore" | "block" | "unblock";
|
|
5
|
+
export interface TransitionSpec {
|
|
6
|
+
readonly allowedSources: readonly LifecycleFolder[];
|
|
7
|
+
readonly targetFolder: LifecycleFolder | null;
|
|
8
|
+
readonly targetStatus: string;
|
|
9
|
+
}
|
|
10
|
+
/** action -> (allowed_source_folders, target_folder, target_status) */
|
|
11
|
+
export declare const TRANSITIONS: Record<ScopeAction, TransitionSpec>;
|
|
12
|
+
/** Status preconditions for in-place actions. */
|
|
13
|
+
export declare const STATUS_PRECONDITIONS: Partial<Record<ScopeAction, string>>;
|
|
14
|
+
export declare const MOVE_LABELS: Partial<Record<ScopeAction, string>>;
|
|
15
|
+
export declare const STAY_LABELS: Partial<Record<ScopeAction, string>>;
|
|
16
|
+
export declare const REVERSIBLE_ACTIONS: Set<string>;
|
|
17
|
+
export declare const TERMINAL_ACTIONS: Set<string>;
|
|
18
|
+
export declare const AUDIT_LOG_REL_PATH = "vbrief/.eval/scope-lifecycle.jsonl";
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** vBRIEF lifecycle folder names. */
|
|
2
|
+
export const LIFECYCLE_FOLDERS = [
|
|
3
|
+
"proposed",
|
|
4
|
+
"pending",
|
|
5
|
+
"active",
|
|
6
|
+
"completed",
|
|
7
|
+
"cancelled",
|
|
8
|
+
];
|
|
9
|
+
/** action -> (allowed_source_folders, target_folder, target_status) */
|
|
10
|
+
export const TRANSITIONS = {
|
|
11
|
+
promote: { allowedSources: ["proposed"], targetFolder: "pending", targetStatus: "pending" },
|
|
12
|
+
activate: { allowedSources: ["pending"], targetFolder: "active", targetStatus: "running" },
|
|
13
|
+
complete: { allowedSources: ["active"], targetFolder: "completed", targetStatus: "completed" },
|
|
14
|
+
fail: { allowedSources: ["active"], targetFolder: "completed", targetStatus: "failed" },
|
|
15
|
+
cancel: {
|
|
16
|
+
allowedSources: LIFECYCLE_FOLDERS,
|
|
17
|
+
targetFolder: "cancelled",
|
|
18
|
+
targetStatus: "cancelled",
|
|
19
|
+
},
|
|
20
|
+
restore: { allowedSources: ["cancelled"], targetFolder: "proposed", targetStatus: "proposed" },
|
|
21
|
+
block: { allowedSources: ["active"], targetFolder: null, targetStatus: "blocked" },
|
|
22
|
+
unblock: { allowedSources: ["active"], targetFolder: null, targetStatus: "running" },
|
|
23
|
+
};
|
|
24
|
+
/** Status preconditions for in-place actions. */
|
|
25
|
+
export const STATUS_PRECONDITIONS = {
|
|
26
|
+
block: "running",
|
|
27
|
+
unblock: "blocked",
|
|
28
|
+
};
|
|
29
|
+
export const MOVE_LABELS = {
|
|
30
|
+
promote: "Promoted",
|
|
31
|
+
activate: "Activated",
|
|
32
|
+
complete: "Completed",
|
|
33
|
+
fail: "Failed",
|
|
34
|
+
cancel: "Cancelled",
|
|
35
|
+
restore: "Restored",
|
|
36
|
+
};
|
|
37
|
+
export const STAY_LABELS = {
|
|
38
|
+
block: "Blocked",
|
|
39
|
+
unblock: "Unblocked",
|
|
40
|
+
};
|
|
41
|
+
export const REVERSIBLE_ACTIONS = new Set(["demote", "cancel", "restore", "undo"]);
|
|
42
|
+
export const TERMINAL_ACTIONS = new Set(["complete", "fail"]);
|
|
43
|
+
export const AUDIT_LOG_REL_PATH = "vbrief/.eval/scope-lifecycle.jsonl";
|
|
44
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scope/decompose.ts -- Apply or validate an approved epic/phase -> story decomposition draft.
|
|
3
|
+
*
|
|
4
|
+
* Faithful TypeScript port of scripts/scope_decompose.py + scripts/_vbrief_story_quality.py.
|
|
5
|
+
* The command is deterministic: it never invents stories from a parent scope.
|
|
6
|
+
* A caller supplies a draft with child story definitions; this module validates
|
|
7
|
+
* that draft, writes the child story vBRIEFs, and updates the parent scope references.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DecompositionError extends Error {
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
type JsonObj = Record<string, unknown>;
|
|
13
|
+
export declare function asStrList(value: unknown): string[];
|
|
14
|
+
export declare function acceptanceTextsFromItems(items: unknown): string[];
|
|
15
|
+
export declare function itemHasAcceptance(item: JsonObj): boolean;
|
|
16
|
+
export declare function itemsHaveAcceptance(items: unknown): boolean;
|
|
17
|
+
export declare function itemHasTraces(item: JsonObj): boolean;
|
|
18
|
+
export declare function missingRequiredSwarmFields(swarm: JsonObj): string[];
|
|
19
|
+
export declare function deprecatedSubitemsIssues(items: unknown, prefix?: string): string[];
|
|
20
|
+
export declare function storyQualityIssues(opts: {
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
implementationPlan: string;
|
|
24
|
+
userStory: string;
|
|
25
|
+
acceptanceTexts: string[];
|
|
26
|
+
acceptanceCountJustification: string;
|
|
27
|
+
swarm: JsonObj;
|
|
28
|
+
concurrentReady?: boolean;
|
|
29
|
+
}): string[];
|
|
30
|
+
export declare function validateDraft(stories: JsonObj[]): string[];
|
|
31
|
+
export interface ApplyDecompositionOptions {
|
|
32
|
+
projectRoot: string;
|
|
33
|
+
parentPath: string;
|
|
34
|
+
draftPath: string;
|
|
35
|
+
checkOnly: boolean;
|
|
36
|
+
date: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function applyDecomposition(opts: ApplyDecompositionOptions): string[];
|
|
39
|
+
/** CLI entry for scope-decompose (mirrors scope_decompose.py main()). */
|
|
40
|
+
export declare function decomposeMain(argv: string[]): number;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=decompose.d.ts.map
|