codictator 0.0.0 → 0.1.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/LICENSE +9 -0
- package/README.md +5 -0
- package/dist/builtin-packs/core/fixtures/agent-assets-present/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/agent-assets-present/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-boundaries/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-boundaries/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-module-mapped/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-module-mapped/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-module-size/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-module-size/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-no-cycles/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-no-cycles/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-profile-declared/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-profile-declared/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-public-entry/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/arch-public-entry/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/branch-protection/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/branch-protection/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/bug-registry/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/bug-registry/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/bug-rows-immutable/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/bug-rows-immutable/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-actions-pinned/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-actions-pinned/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-present/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-present/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-required-check/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ci-required-check/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/compiler-strict/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/compiler-strict/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/complexity/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/complexity/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/context-hard-band/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/context-hard-band/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/context-soft-band/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/context-soft-band/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/conventional-commit/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/conventional-commit/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/coverage-floor/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/coverage-floor/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/custom-pack-selftest/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/custom-pack-selftest/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dangerous-shell/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dangerous-shell/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dead-code/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dead-code/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-exact-pin/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-exact-pin/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-latest-stable/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-latest-stable/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-license/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-license/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-lockfile/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-lockfile/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-new-needs-reason/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-new-needs-reason/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-no-deprecated/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-no-deprecated/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-no-vulnerable/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-no-vulnerable/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-one-per-capability/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/dep-one-per-capability/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/diagnose-before-fix/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/diagnose-before-fix/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-breadth/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-breadth/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-density/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-density/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-links-valid/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-links-valid/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-no-corpus-counts/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-no-corpus-counts/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-no-inline-changelog/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-no-inline-changelog/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-one-level/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-one-level/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-placement/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-placement/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-router-leaf/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-router-leaf/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-single-owner/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-single-owner/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-size/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/doc-size/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/duplication/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/duplication/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/engine-version-match/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/engine-version-match/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/file-naming/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/file-naming/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/file-size/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/file-size/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/function-size/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/function-size/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/graph-before-scan/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/graph-before-scan/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/guardrail-manifest/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/guardrail-manifest/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-append-only/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-append-only/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-entry/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-entry/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-entry-complete/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/history-entry-complete/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/hooks-active/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/hooks-active/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/loop-breaker/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/loop-breaker/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/max-file-bytes/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/max-file-bytes/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/mcp-declared/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/mcp-declared/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-assertion-loss/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-assertion-loss/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-baseline-raise/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-baseline-raise/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-bypass/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-bypass/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-fixture-shrink/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-fixture-shrink/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-guard-removal/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-guard-removal/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-new-suppressions/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-new-suppressions/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-secret-reads/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-secret-reads/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-secrets/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-secrets/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-skipped-tests/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-skipped-tests/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-speculative-abstraction/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-speculative-abstraction/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-threshold-lowering/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/no-threshold-lowering/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/perf-budgets/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/perf-budgets/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ratchet-touched-improves/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/ratchet-touched-improves/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/read-dedupe/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/read-dedupe/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/red-before-green/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/red-before-green/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/regression-test-for-fix/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/regression-test-for-fix/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/remediation-step-size/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/remediation-step-size/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/repo-hygiene/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/repo-hygiene/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/review-gate/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/review-gate/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/review-round-cap/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/review-round-cap/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/session-tool-call-limit/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/session-tool-call-limit/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/spec-trace/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/spec-trace/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/test-command-intact/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/test-command-intact/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/test-kinds-by-scenario/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/test-kinds-by-scenario/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/waivers-valid/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/waivers-valid/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/workflow-gates/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/workflow-gates/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/write-confinement/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/write-confinement/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/writes-within-plan/passing/basic/case.json +10 -0
- package/dist/builtin-packs/core/fixtures/writes-within-plan/violating/basic/case.json +10 -0
- package/dist/builtin-packs/core/index.ts +8 -0
- package/dist/builtin-packs/core/pack.json +2057 -0
- package/dist/builtin-packs/dotnet/index.ts +47 -0
- package/dist/builtin-packs/python/extract.ts +245 -0
- package/dist/builtin-packs/python/fixtures/lint/passing/basic/case.json +10 -0
- package/dist/builtin-packs/python/fixtures/lint/violating/basic/case.json +10 -0
- package/dist/builtin-packs/python/fixtures/no-phantom-import/passing/basic/case.json +12 -0
- package/dist/builtin-packs/python/fixtures/no-phantom-import/violating/basic/case.json +11 -0
- package/dist/builtin-packs/python/fixtures/security-patterns/passing/basic/case.json +10 -0
- package/dist/builtin-packs/python/fixtures/security-patterns/violating/basic/case.json +10 -0
- package/dist/builtin-packs/python/fixtures/typecheck/passing/basic/case.json +10 -0
- package/dist/builtin-packs/python/fixtures/typecheck/violating/basic/case.json +10 -0
- package/dist/builtin-packs/python/index.ts +57 -0
- package/dist/builtin-packs/python/pack.json +116 -0
- package/dist/builtin-packs/typescript/extract-clauses.ts +153 -0
- package/dist/builtin-packs/typescript/extract-literals.ts +111 -0
- package/dist/builtin-packs/typescript/extract-words.ts +79 -0
- package/dist/builtin-packs/typescript/extract.ts +77 -0
- package/dist/builtin-packs/typescript/fixtures/lint/passing/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/lint/passing/exported/case.json +8 -0
- package/dist/builtin-packs/typescript/fixtures/lint/violating/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/no-phantom-import/passing/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/no-phantom-import/passing/host-provided/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/no-phantom-import/violating/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/no-phantom-import/violating/host-provided/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/security-patterns/passing/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/security-patterns/violating/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/typecheck/passing/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/fixtures/typecheck/violating/basic/case.json +10 -0
- package/dist/builtin-packs/typescript/index.ts +85 -0
- package/dist/builtin-packs/typescript/lex.ts +199 -0
- package/dist/builtin-packs/typescript/measures-exports.ts +173 -0
- package/dist/builtin-packs/typescript/measures-functions.ts +138 -0
- package/dist/builtin-packs/typescript/measures.ts +10 -0
- package/dist/builtin-packs/typescript/naming.ts +47 -0
- package/dist/builtin-packs/typescript/pack.json +169 -0
- package/dist/builtin-packs/typescript/patterns.ts +93 -0
- package/dist/builtin-packs/typescript/resolve.ts +224 -0
- package/dist/builtin-packs/typescript/strict.ts +177 -0
- package/dist/builtin-packs/typescript/titles.ts +184 -0
- package/dist/cli/baseline.d.ts +3 -0
- package/dist/cli/baseline.js +67 -0
- package/dist/cli/ci-bot-change.d.ts +3 -0
- package/dist/cli/ci-bot-change.js +54 -0
- package/dist/cli/ci-range.d.ts +18 -0
- package/dist/cli/ci-range.js +228 -0
- package/dist/cli/ci-summary.d.ts +3 -0
- package/dist/cli/ci-summary.js +45 -0
- package/dist/cli/ci.d.ts +4 -0
- package/dist/cli/ci.js +195 -0
- package/dist/cli/commands.d.ts +5 -0
- package/dist/cli/commands.js +39 -0
- package/dist/cli/deps.d.ts +3 -0
- package/dist/cli/deps.js +115 -0
- package/dist/cli/drift.d.ts +11 -0
- package/dist/cli/drift.js +91 -0
- package/dist/cli/evaluate.d.ts +20 -0
- package/dist/cli/evaluate.js +213 -0
- package/dist/cli/gate-scope.d.ts +11 -0
- package/dist/cli/gate-scope.js +93 -0
- package/dist/cli/git-hook.d.ts +3 -0
- package/dist/cli/git-hook.js +184 -0
- package/dist/cli/guardrail.d.ts +5 -0
- package/dist/cli/guardrail.js +190 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.js +198 -0
- package/dist/cli/init-plan.d.ts +23 -0
- package/dist/cli/init-plan.js +135 -0
- package/dist/cli/init.d.ts +3 -0
- package/dist/cli/init.js +122 -0
- package/dist/cli/inspect-status.d.ts +8 -0
- package/dist/cli/inspect-status.js +164 -0
- package/dist/cli/inspect.d.ts +5 -0
- package/dist/cli/inspect.js +98 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +60 -0
- package/dist/cli/pack-adapters.d.ts +3 -0
- package/dist/cli/pack-adapters.js +81 -0
- package/dist/cli/packs.d.ts +6 -0
- package/dist/cli/packs.js +131 -0
- package/dist/cli/plan-launcher.d.ts +2 -0
- package/dist/cli/plan-launcher.js +272 -0
- package/dist/cli/plan.d.ts +25 -0
- package/dist/cli/plan.js +121 -0
- package/dist/cli/proofs-test.d.ts +3 -0
- package/dist/cli/proofs-test.js +77 -0
- package/dist/cli/proofs.d.ts +3 -0
- package/dist/cli/proofs.js +168 -0
- package/dist/cli/remediation.d.ts +3 -0
- package/dist/cli/remediation.js +107 -0
- package/dist/cli/report.d.ts +4 -0
- package/dist/cli/report.js +93 -0
- package/dist/cli/serve-eval.d.ts +2 -0
- package/dist/cli/serve-eval.js +165 -0
- package/dist/cli/serve-log.d.ts +2 -0
- package/dist/cli/serve-log.js +150 -0
- package/dist/cli/serve-methods.d.ts +2 -0
- package/dist/cli/serve-methods.js +181 -0
- package/dist/cli/serve-protocol.d.ts +35 -0
- package/dist/cli/serve-protocol.js +97 -0
- package/dist/cli/serve-run.d.ts +9 -0
- package/dist/cli/serve-run.js +135 -0
- package/dist/cli/serve-server.d.ts +5 -0
- package/dist/cli/serve-server.js +120 -0
- package/dist/cli/serve-shared.d.ts +34 -0
- package/dist/cli/serve-shared.js +20 -0
- package/dist/cli/serve-status.d.ts +2 -0
- package/dist/cli/serve-status.js +130 -0
- package/dist/cli/serve-transport.d.ts +2 -0
- package/dist/cli/serve-transport.js +114 -0
- package/dist/cli/shared.d.ts +35 -0
- package/dist/cli/shared.js +181 -0
- package/dist/cli/task-advance.d.ts +3 -0
- package/dist/cli/task-advance.js +144 -0
- package/dist/cli/task-phases.d.ts +3 -0
- package/dist/cli/task-phases.js +77 -0
- package/dist/cli/tasks.d.ts +12 -0
- package/dist/cli/tasks.js +176 -0
- package/dist/cli/transparency.d.ts +4 -0
- package/dist/cli/transparency.js +197 -0
- package/dist/cli/waivers.d.ts +3 -0
- package/dist/cli/waivers.js +195 -0
- package/dist/features/adapters/claude-code.d.ts +8 -0
- package/dist/features/adapters/claude-code.js +198 -0
- package/dist/features/adapters/claude-shaped.d.ts +4 -0
- package/dist/features/adapters/claude-shaped.js +174 -0
- package/dist/features/adapters/codex-cli.d.ts +8 -0
- package/dist/features/adapters/codex-cli.js +180 -0
- package/dist/features/adapters/contract.d.ts +104 -0
- package/dist/features/adapters/contract.js +17 -0
- package/dist/features/adapters/copilot-capabilities.d.ts +2 -0
- package/dist/features/adapters/copilot-capabilities.js +46 -0
- package/dist/features/adapters/copilot.d.ts +8 -0
- package/dist/features/adapters/copilot.js +200 -0
- package/dist/features/adapters/cursor.d.ts +8 -0
- package/dist/features/adapters/cursor.js +245 -0
- package/dist/features/adapters/custom-event.d.ts +3 -0
- package/dist/features/adapters/custom-event.js +180 -0
- package/dist/features/adapters/custom-load.d.ts +3 -0
- package/dist/features/adapters/custom-load.js +185 -0
- package/dist/features/adapters/custom-shape.d.ts +21 -0
- package/dist/features/adapters/custom-shape.js +87 -0
- package/dist/features/adapters/custom.d.ts +9 -0
- package/dist/features/adapters/custom.js +130 -0
- package/dist/features/adapters/effective-cache.d.ts +5 -0
- package/dist/features/adapters/effective-cache.js +45 -0
- package/dist/features/adapters/gemini-cli.d.ts +6 -0
- package/dist/features/adapters/gemini-cli.js +160 -0
- package/dist/features/adapters/gemini-tables.d.ts +7 -0
- package/dist/features/adapters/gemini-tables.js +104 -0
- package/dist/features/adapters/hook-dispatch.d.ts +7 -0
- package/dist/features/adapters/hook-dispatch.js +97 -0
- package/dist/features/adapters/hook-injection.d.ts +12 -0
- package/dist/features/adapters/hook-injection.js +75 -0
- package/dist/features/adapters/hook-load.d.ts +15 -0
- package/dist/features/adapters/hook-load.js +152 -0
- package/dist/features/adapters/hook-scope.d.ts +3 -0
- package/dist/features/adapters/hook-scope.js +54 -0
- package/dist/features/adapters/index.d.ts +22 -0
- package/dist/features/adapters/index.js +86 -0
- package/dist/features/adapters/muse-code.d.ts +8 -0
- package/dist/features/adapters/muse-code.js +223 -0
- package/dist/features/adapters/opencode-bridge.d.ts +1 -0
- package/dist/features/adapters/opencode-bridge.js +230 -0
- package/dist/features/adapters/opencode-capabilities.d.ts +2 -0
- package/dist/features/adapters/opencode-capabilities.js +47 -0
- package/dist/features/adapters/opencode-parse.d.ts +3 -0
- package/dist/features/adapters/opencode-parse.js +137 -0
- package/dist/features/adapters/opencode-tables.d.ts +5 -0
- package/dist/features/adapters/opencode-tables.js +63 -0
- package/dist/features/adapters/opencode.d.ts +10 -0
- package/dist/features/adapters/opencode.js +97 -0
- package/dist/features/adapters/runtime.d.ts +25 -0
- package/dist/features/adapters/runtime.js +148 -0
- package/dist/features/adapters/universal.d.ts +7 -0
- package/dist/features/adapters/universal.js +89 -0
- package/dist/features/arch/arch-profiles.d.ts +3 -0
- package/dist/features/arch/arch-profiles.js +5 -0
- package/dist/features/arch/checks.d.ts +25 -0
- package/dist/features/arch/checks.js +173 -0
- package/dist/features/arch/codictator-modules.d.ts +4 -0
- package/dist/features/arch/codictator-modules.js +180 -0
- package/dist/features/arch/cycle-walk.d.ts +1 -0
- package/dist/features/arch/cycle-walk.js +36 -0
- package/dist/features/arch/edge-checks.d.ts +13 -0
- package/dist/features/arch/edge-checks.js +186 -0
- package/dist/features/arch/graph.d.ts +32 -0
- package/dist/features/arch/graph.js +202 -0
- package/dist/features/arch/index.d.ts +29 -0
- package/dist/features/arch/index.js +16 -0
- package/dist/features/arch/layer-rules.d.ts +3 -0
- package/dist/features/arch/layer-rules.js +38 -0
- package/dist/features/arch/module-map-validation.d.ts +3 -0
- package/dist/features/arch/module-map-validation.js +30 -0
- package/dist/features/arch/module-mapping.d.ts +15 -0
- package/dist/features/arch/module-mapping.js +184 -0
- package/dist/features/arch/profiles.d.ts +4 -0
- package/dist/features/arch/profiles.js +8 -0
- package/dist/features/audit/append.d.ts +26 -0
- package/dist/features/audit/append.js +210 -0
- package/dist/features/audit/explain-table-tail.d.ts +2 -0
- package/dist/features/audit/explain-table-tail.js +29 -0
- package/dist/features/audit/explain-table.d.ts +8 -0
- package/dist/features/audit/explain-table.js +48 -0
- package/dist/features/audit/explain.d.ts +7 -0
- package/dist/features/audit/explain.js +87 -0
- package/dist/features/audit/index.d.ts +37 -0
- package/dist/features/audit/index.js +17 -0
- package/dist/features/audit/injection-event.d.ts +11 -0
- package/dist/features/audit/injection-event.js +17 -0
- package/dist/features/audit/read.d.ts +8 -0
- package/dist/features/audit/read.js +62 -0
- package/dist/features/audit/summarize.d.ts +1 -0
- package/dist/features/audit/summarize.js +41 -0
- package/dist/features/audit/surfaces.d.ts +47 -0
- package/dist/features/audit/surfaces.js +172 -0
- package/dist/features/audit/token-saver-evidence.d.ts +14 -0
- package/dist/features/audit/token-saver-evidence.js +85 -0
- package/dist/features/ci/changes.d.ts +28 -0
- package/dist/features/ci/changes.js +88 -0
- package/dist/features/ci/index.d.ts +22 -0
- package/dist/features/ci/index.js +75 -0
- package/dist/features/ci/protection-read.d.ts +3 -0
- package/dist/features/ci/protection-read.js +264 -0
- package/dist/features/ci/protection.d.ts +25 -0
- package/dist/features/ci/protection.js +101 -0
- package/dist/features/ci/workflow.d.ts +23 -0
- package/dist/features/ci/workflow.js +261 -0
- package/dist/features/config/human.d.ts +4 -0
- package/dist/features/config/human.js +31 -0
- package/dist/features/config/index.d.ts +37 -0
- package/dist/features/config/index.js +129 -0
- package/dist/features/config/pack-data.d.ts +18 -0
- package/dist/features/config/pack-data.js +116 -0
- package/dist/features/config/validate-sections.d.ts +6 -0
- package/dist/features/config/validate-sections.js +198 -0
- package/dist/features/config/validate-shared.d.ts +8 -0
- package/dist/features/config/validate-shared.js +69 -0
- package/dist/features/config/validate-tunables.d.ts +1 -0
- package/dist/features/config/validate-tunables.js +89 -0
- package/dist/features/config/validate.d.ts +2 -0
- package/dist/features/config/validate.js +57 -0
- package/dist/features/deps/bots.d.ts +5 -0
- package/dist/features/deps/bots.js +39 -0
- package/dist/features/deps/capabilities.d.ts +3 -0
- package/dist/features/deps/capabilities.js +91 -0
- package/dist/features/deps/check.d.ts +18 -0
- package/dist/features/deps/check.js +70 -0
- package/dist/features/deps/dependabot.d.ts +10 -0
- package/dist/features/deps/dependabot.js +154 -0
- package/dist/features/deps/eval.d.ts +41 -0
- package/dist/features/deps/eval.js +24 -0
- package/dist/features/deps/fields.d.ts +4 -0
- package/dist/features/deps/fields.js +18 -0
- package/dist/features/deps/index.d.ts +67 -0
- package/dist/features/deps/index.js +27 -0
- package/dist/features/deps/lockfile.d.ts +8 -0
- package/dist/features/deps/lockfile.js +87 -0
- package/dist/features/deps/npm.d.ts +22 -0
- package/dist/features/deps/npm.js +187 -0
- package/dist/features/deps/npmrc.d.ts +12 -0
- package/dist/features/deps/npmrc.js +50 -0
- package/dist/features/deps/nuget.d.ts +25 -0
- package/dist/features/deps/nuget.js +112 -0
- package/dist/features/deps/osv-ranges.d.ts +12 -0
- package/dist/features/deps/osv-ranges.js +83 -0
- package/dist/features/deps/osv.d.ts +16 -0
- package/dist/features/deps/osv.js +144 -0
- package/dist/features/deps/pypi-pyproject.d.ts +7 -0
- package/dist/features/deps/pypi-pyproject.js +118 -0
- package/dist/features/deps/pypi.d.ts +29 -0
- package/dist/features/deps/pypi.js +137 -0
- package/dist/features/deps/registry.d.ts +29 -0
- package/dist/features/deps/registry.js +158 -0
- package/dist/features/deps/renovate.d.ts +15 -0
- package/dist/features/deps/renovate.js +98 -0
- package/dist/features/deps/selection.d.ts +20 -0
- package/dist/features/deps/selection.js +150 -0
- package/dist/features/deps/snapshot-verdicts.d.ts +16 -0
- package/dist/features/deps/snapshot-verdicts.js +184 -0
- package/dist/features/deps/stable.d.ts +19 -0
- package/dist/features/deps/stable.js +131 -0
- package/dist/features/deps/step-size.d.ts +7 -0
- package/dist/features/deps/step-size.js +24 -0
- package/dist/features/deps/upgrade.d.ts +35 -0
- package/dist/features/deps/upgrade.js +124 -0
- package/dist/features/deps/verdicts.d.ts +21 -0
- package/dist/features/deps/verdicts.js +219 -0
- package/dist/features/engine/evaluate.d.ts +12 -0
- package/dist/features/engine/evaluate.js +170 -0
- package/dist/features/engine/index.d.ts +21 -0
- package/dist/features/engine/index.js +24 -0
- package/dist/features/engine/message.d.ts +3 -0
- package/dist/features/engine/message.js +69 -0
- package/dist/features/engine/ratchet.d.ts +1 -0
- package/dist/features/engine/ratchet.js +63 -0
- package/dist/features/engine/run-enforcer.d.ts +4 -0
- package/dist/features/engine/run-enforcer.js +82 -0
- package/dist/features/engine/waivers.d.ts +23 -0
- package/dist/features/engine/waivers.js +169 -0
- package/dist/features/generator/draft.d.ts +7 -0
- package/dist/features/generator/draft.js +148 -0
- package/dist/features/generator/index.d.ts +22 -0
- package/dist/features/generator/index.js +8 -0
- package/dist/features/generator/llm-draft.d.ts +3 -0
- package/dist/features/generator/llm-draft.js +93 -0
- package/dist/features/generator/prompt.d.ts +25 -0
- package/dist/features/generator/prompt.js +105 -0
- package/dist/features/generator/self-test.d.ts +12 -0
- package/dist/features/generator/self-test.js +65 -0
- package/dist/features/generator/templates.d.ts +26 -0
- package/dist/features/generator/templates.js +177 -0
- package/dist/features/integrity/drift.d.ts +19 -0
- package/dist/features/integrity/drift.js +168 -0
- package/dist/features/integrity/hooks.d.ts +19 -0
- package/dist/features/integrity/hooks.js +54 -0
- package/dist/features/integrity/index.d.ts +10 -0
- package/dist/features/integrity/index.js +14 -0
- package/dist/features/integrity/manifest.d.ts +15 -0
- package/dist/features/integrity/manifest.js +26 -0
- package/dist/features/integrity/self-protection.d.ts +12 -0
- package/dist/features/integrity/self-protection.js +144 -0
- package/dist/features/llm/attempt.d.ts +17 -0
- package/dist/features/llm/attempt.js +99 -0
- package/dist/features/llm/errors.d.ts +5 -0
- package/dist/features/llm/errors.js +18 -0
- package/dist/features/llm/index.d.ts +23 -0
- package/dist/features/llm/index.js +46 -0
- package/dist/features/llm/presets.d.ts +25 -0
- package/dist/features/llm/presets.js +159 -0
- package/dist/features/llm/wire.d.ts +17 -0
- package/dist/features/llm/wire.js +163 -0
- package/dist/features/packs/accept.d.ts +7 -0
- package/dist/features/packs/accept.js +73 -0
- package/dist/features/packs/enforcers/arch-guards.d.ts +12 -0
- package/dist/features/packs/enforcers/arch-guards.js +193 -0
- package/dist/features/packs/enforcers/binding.d.ts +31 -0
- package/dist/features/packs/enforcers/binding.js +157 -0
- package/dist/features/packs/enforcers/ci-guards.d.ts +10 -0
- package/dist/features/packs/enforcers/ci-guards.js +131 -0
- package/dist/features/packs/enforcers/code-health.d.ts +9 -0
- package/dist/features/packs/enforcers/code-health.js +180 -0
- package/dist/features/packs/enforcers/code.d.ts +5 -0
- package/dist/features/packs/enforcers/code.js +129 -0
- package/dist/features/packs/enforcers/command-forbid.d.ts +8 -0
- package/dist/features/packs/enforcers/command-forbid.js +61 -0
- package/dist/features/packs/enforcers/deps-guards.d.ts +15 -0
- package/dist/features/packs/enforcers/deps-guards.js +235 -0
- package/dist/features/packs/enforcers/deps-policy-guards.d.ts +9 -0
- package/dist/features/packs/enforcers/deps-policy-guards.js +135 -0
- package/dist/features/packs/enforcers/docs-guards-measures.d.ts +9 -0
- package/dist/features/packs/enforcers/docs-guards-measures.js +117 -0
- package/dist/features/packs/enforcers/docs-guards.d.ts +11 -0
- package/dist/features/packs/enforcers/docs-guards.js +180 -0
- package/dist/features/packs/enforcers/engine-version-guards.d.ts +6 -0
- package/dist/features/packs/enforcers/engine-version-guards.js +42 -0
- package/dist/features/packs/enforcers/external-attribute.d.ts +18 -0
- package/dist/features/packs/enforcers/external-attribute.js +122 -0
- package/dist/features/packs/enforcers/external-bind.d.ts +4 -0
- package/dist/features/packs/enforcers/external-bind.js +206 -0
- package/dist/features/packs/enforcers/external-check.d.ts +7 -0
- package/dist/features/packs/enforcers/external-check.js +131 -0
- package/dist/features/packs/enforcers/external-output.d.ts +30 -0
- package/dist/features/packs/enforcers/external-output.js +144 -0
- package/dist/features/packs/enforcers/external-probe.d.ts +4 -0
- package/dist/features/packs/enforcers/external-probe.js +65 -0
- package/dist/features/packs/enforcers/external-runs.d.ts +33 -0
- package/dist/features/packs/enforcers/external-runs.js +162 -0
- package/dist/features/packs/enforcers/external-sarif.d.ts +3 -0
- package/dist/features/packs/enforcers/external-sarif.js +109 -0
- package/dist/features/packs/enforcers/external.d.ts +39 -0
- package/dist/features/packs/enforcers/external.js +11 -0
- package/dist/features/packs/enforcers/gate-guards.d.ts +11 -0
- package/dist/features/packs/enforcers/gate-guards.js +117 -0
- package/dist/features/packs/enforcers/health-abstraction.d.ts +5 -0
- package/dist/features/packs/enforcers/health-abstraction.js +126 -0
- package/dist/features/packs/enforcers/health-duplication.d.ts +5 -0
- package/dist/features/packs/enforcers/health-duplication.js +197 -0
- package/dist/features/packs/enforcers/health-lex-imports.d.ts +5 -0
- package/dist/features/packs/enforcers/health-lex-imports.js +225 -0
- package/dist/features/packs/enforcers/health-lex-template.d.ts +10 -0
- package/dist/features/packs/enforcers/health-lex-template.js +67 -0
- package/dist/features/packs/enforcers/health-lex.d.ts +8 -0
- package/dist/features/packs/enforcers/health-lex.js +227 -0
- package/dist/features/packs/enforcers/health-markers.d.ts +3 -0
- package/dist/features/packs/enforcers/health-markers.js +31 -0
- package/dist/features/packs/enforcers/health-measures.d.ts +26 -0
- package/dist/features/packs/enforcers/health-measures.js +223 -0
- package/dist/features/packs/enforcers/health-refs.d.ts +5 -0
- package/dist/features/packs/enforcers/health-refs.js +76 -0
- package/dist/features/packs/enforcers/integrity-guards-repo.d.ts +6 -0
- package/dist/features/packs/enforcers/integrity-guards-repo.js +189 -0
- package/dist/features/packs/enforcers/integrity-guards.d.ts +12 -0
- package/dist/features/packs/enforcers/integrity-guards.js +202 -0
- package/dist/features/packs/enforcers/jsonkey.d.ts +13 -0
- package/dist/features/packs/enforcers/jsonkey.js +95 -0
- package/dist/features/packs/enforcers/parametric.d.ts +7 -0
- package/dist/features/packs/enforcers/parametric.js +138 -0
- package/dist/features/packs/enforcers/pattern.d.ts +11 -0
- package/dist/features/packs/enforcers/pattern.js +88 -0
- package/dist/features/packs/enforcers/placement.d.ts +10 -0
- package/dist/features/packs/enforcers/placement.js +54 -0
- package/dist/features/packs/enforcers/py-checks.d.ts +7 -0
- package/dist/features/packs/enforcers/py-checks.js +131 -0
- package/dist/features/packs/enforcers/py-lex.d.ts +10 -0
- package/dist/features/packs/enforcers/py-lex.js +271 -0
- package/dist/features/packs/enforcers/py-phantom.d.ts +6 -0
- package/dist/features/packs/enforcers/py-phantom.js +163 -0
- package/dist/features/packs/enforcers/py-pins.d.ts +16 -0
- package/dist/features/packs/enforcers/py-pins.js +184 -0
- package/dist/features/packs/enforcers/py-security-patterns.d.ts +18 -0
- package/dist/features/packs/enforcers/py-security-patterns.js +70 -0
- package/dist/features/packs/enforcers/records-guards.d.ts +12 -0
- package/dist/features/packs/enforcers/records-guards.js +178 -0
- package/dist/features/packs/enforcers/remediation-guards.d.ts +6 -0
- package/dist/features/packs/enforcers/remediation-guards.js +42 -0
- package/dist/features/packs/enforcers/required.d.ts +10 -0
- package/dist/features/packs/enforcers/required.js +65 -0
- package/dist/features/packs/enforcers/secret-scan.d.ts +6 -0
- package/dist/features/packs/enforcers/secret-scan.js +173 -0
- package/dist/features/packs/enforcers/shell-analyse.d.ts +14 -0
- package/dist/features/packs/enforcers/shell-analyse.js +105 -0
- package/dist/features/packs/enforcers/sizes.d.ts +10 -0
- package/dist/features/packs/enforcers/sizes.js +82 -0
- package/dist/features/packs/enforcers/steering-guards.d.ts +11 -0
- package/dist/features/packs/enforcers/steering-guards.js +162 -0
- package/dist/features/packs/enforcers/testing-guards.d.ts +10 -0
- package/dist/features/packs/enforcers/testing-guards.js +118 -0
- package/dist/features/packs/enforcers/ts-checks.d.ts +7 -0
- package/dist/features/packs/enforcers/ts-checks.js +147 -0
- package/dist/features/packs/enforcers/ts-phantom-host.d.ts +11 -0
- package/dist/features/packs/enforcers/ts-phantom-host.js +155 -0
- package/dist/features/packs/enforcers/ts-phantom.d.ts +6 -0
- package/dist/features/packs/enforcers/ts-phantom.js +117 -0
- package/dist/features/packs/enforcers/ts-security-patterns.d.ts +18 -0
- package/dist/features/packs/enforcers/ts-security-patterns.js +97 -0
- package/dist/features/packs/enforcers/workflow-guards.d.ts +10 -0
- package/dist/features/packs/enforcers/workflow-guards.js +117 -0
- package/dist/features/packs/enforcers/write-confine.d.ts +13 -0
- package/dist/features/packs/enforcers/write-confine.js +131 -0
- package/dist/features/packs/hashes.d.ts +6 -0
- package/dist/features/packs/hashes.js +84 -0
- package/dist/features/packs/index.d.ts +22 -0
- package/dist/features/packs/index.js +15 -0
- package/dist/features/packs/loader.d.ts +13 -0
- package/dist/features/packs/loader.js +205 -0
- package/dist/features/packs/manifest-decl.d.ts +13 -0
- package/dist/features/packs/manifest-decl.js +121 -0
- package/dist/features/packs/manifest.d.ts +7 -0
- package/dist/features/packs/manifest.js +95 -0
- package/dist/features/packs/params.d.ts +2 -0
- package/dist/features/packs/params.js +90 -0
- package/dist/features/packs/registry.d.ts +11 -0
- package/dist/features/packs/registry.js +136 -0
- package/dist/features/packs/selftest.d.ts +3 -0
- package/dist/features/packs/selftest.js +144 -0
- package/dist/features/records/bug-grammar.d.ts +17 -0
- package/dist/features/records/bug-grammar.js +128 -0
- package/dist/features/records/bug-registry.d.ts +9 -0
- package/dist/features/records/bug-registry.js +67 -0
- package/dist/features/records/bug-rows-immutable.d.ts +3 -0
- package/dist/features/records/bug-rows-immutable.js +52 -0
- package/dist/features/records/bugs.d.ts +2 -0
- package/dist/features/records/bugs.js +24 -0
- package/dist/features/records/docs-lines.d.ts +16 -0
- package/dist/features/records/docs-lines.js +36 -0
- package/dist/features/records/docs-prose.d.ts +14 -0
- package/dist/features/records/docs-prose.js +252 -0
- package/dist/features/records/docs-structure.d.ts +17 -0
- package/dist/features/records/docs-structure.js +223 -0
- package/dist/features/records/docs.d.ts +9 -0
- package/dist/features/records/docs.js +238 -0
- package/dist/features/records/history-checks.d.ts +6 -0
- package/dist/features/records/history-checks.js +94 -0
- package/dist/features/records/history-parse.d.ts +16 -0
- package/dist/features/records/history-parse.js +101 -0
- package/dist/features/records/history-scope.d.ts +5 -0
- package/dist/features/records/history-scope.js +86 -0
- package/dist/features/records/history.d.ts +3 -0
- package/dist/features/records/history.js +5 -0
- package/dist/features/records/index.d.ts +8 -0
- package/dist/features/records/index.js +11 -0
- package/dist/features/remediation/adoption.d.ts +32 -0
- package/dist/features/remediation/adoption.js +142 -0
- package/dist/features/remediation/index.d.ts +12 -0
- package/dist/features/remediation/index.js +21 -0
- package/dist/features/remediation/plan-chains.d.ts +3 -0
- package/dist/features/remediation/plan-chains.js +111 -0
- package/dist/features/remediation/plan-generate.d.ts +3 -0
- package/dist/features/remediation/plan-generate.js +129 -0
- package/dist/features/remediation/plan-kinds.d.ts +32 -0
- package/dist/features/remediation/plan-kinds.js +42 -0
- package/dist/features/remediation/plan-markers.d.ts +2 -0
- package/dist/features/remediation/plan-markers.js +155 -0
- package/dist/features/remediation/plan-merge.d.ts +6 -0
- package/dist/features/remediation/plan-merge.js +33 -0
- package/dist/features/remediation/plan.d.ts +4 -0
- package/dist/features/remediation/plan.js +7 -0
- package/dist/features/remediation/step-floor.d.ts +5 -0
- package/dist/features/remediation/step-floor.js +76 -0
- package/dist/features/remediation/step-gates.d.ts +18 -0
- package/dist/features/remediation/step-gates.js +77 -0
- package/dist/features/remediation/step-split.d.ts +12 -0
- package/dist/features/remediation/step-split.js +75 -0
- package/dist/features/remediation/steps.d.ts +3 -0
- package/dist/features/remediation/steps.js +6 -0
- package/dist/features/remediation/types.d.ts +37 -0
- package/dist/features/remediation/types.js +1 -0
- package/dist/features/security/index.d.ts +12 -0
- package/dist/features/security/index.js +142 -0
- package/dist/features/steering/agent-assets.d.ts +7 -0
- package/dist/features/steering/agent-assets.js +75 -0
- package/dist/features/steering/budgets.d.ts +20 -0
- package/dist/features/steering/budgets.js +86 -0
- package/dist/features/steering/checks.d.ts +7 -0
- package/dist/features/steering/checks.js +67 -0
- package/dist/features/steering/context-file.d.ts +11 -0
- package/dist/features/steering/context-file.js +107 -0
- package/dist/features/steering/graph-scan.d.ts +7 -0
- package/dist/features/steering/graph-scan.js +17 -0
- package/dist/features/steering/index.d.ts +30 -0
- package/dist/features/steering/index.js +45 -0
- package/dist/features/steering/injection.d.ts +23 -0
- package/dist/features/steering/injection.js +124 -0
- package/dist/features/steering/mcp.d.ts +2 -0
- package/dist/features/steering/mcp.js +18 -0
- package/dist/features/steering/precedence.d.ts +10 -0
- package/dist/features/steering/precedence.js +28 -0
- package/dist/features/steering/read-cache.d.ts +13 -0
- package/dist/features/steering/read-cache.js +51 -0
- package/dist/features/testing/base.d.ts +1 -0
- package/dist/features/testing/base.js +8 -0
- package/dist/features/testing/covers.d.ts +8 -0
- package/dist/features/testing/covers.js +50 -0
- package/dist/features/testing/evaluate.d.ts +19 -0
- package/dist/features/testing/evaluate.js +47 -0
- package/dist/features/testing/index.d.ts +10 -0
- package/dist/features/testing/index.js +13 -0
- package/dist/features/testing/integrity.d.ts +28 -0
- package/dist/features/testing/integrity.js +140 -0
- package/dist/features/testing/ledger.d.ts +11 -0
- package/dist/features/testing/ledger.js +51 -0
- package/dist/features/testing/proofs.d.ts +26 -0
- package/dist/features/testing/proofs.js +88 -0
- package/dist/features/testing/report.d.ts +6 -0
- package/dist/features/testing/report.js +16 -0
- package/dist/features/testing/scenarios.d.ts +34 -0
- package/dist/features/testing/scenarios.js +112 -0
- package/dist/features/testing/tap-parser.d.ts +9 -0
- package/dist/features/testing/tap-parser.js +96 -0
- package/dist/features/testing/trace.d.ts +23 -0
- package/dist/features/testing/trace.js +110 -0
- package/dist/features/workflow/index.d.ts +14 -0
- package/dist/features/workflow/index.js +19 -0
- package/dist/features/workflow/loop.d.ts +5 -0
- package/dist/features/workflow/loop.js +36 -0
- package/dist/features/workflow/phases.d.ts +10 -0
- package/dist/features/workflow/phases.js +184 -0
- package/dist/features/workflow/review.d.ts +25 -0
- package/dist/features/workflow/review.js +119 -0
- package/dist/features/workflow/tasks.d.ts +73 -0
- package/dist/features/workflow/tasks.js +80 -0
- package/dist/features/workflow/writes.d.ts +8 -0
- package/dist/features/workflow/writes.js +96 -0
- package/dist/kernel/clock.d.ts +4 -0
- package/dist/kernel/clock.js +5 -0
- package/dist/kernel/config-keys.d.ts +2 -0
- package/dist/kernel/config-keys.js +5 -0
- package/dist/kernel/config-toml-keys.d.ts +2 -0
- package/dist/kernel/config-toml-keys.js +237 -0
- package/dist/kernel/config-yaml-keys.d.ts +2 -0
- package/dist/kernel/config-yaml-keys.js +177 -0
- package/dist/kernel/contracts.d.ts +76 -0
- package/dist/kernel/contracts.js +9 -0
- package/dist/kernel/entry.d.ts +1 -0
- package/dist/kernel/entry.js +31 -0
- package/dist/kernel/env.d.ts +4 -0
- package/dist/kernel/env.js +5 -0
- package/dist/kernel/errors.d.ts +7 -0
- package/dist/kernel/errors.js +6 -0
- package/dist/kernel/fs-confine.d.ts +14 -0
- package/dist/kernel/fs-confine.js +129 -0
- package/dist/kernel/fs-errors.d.ts +8 -0
- package/dist/kernel/fs-errors.js +37 -0
- package/dist/kernel/fs.d.ts +28 -0
- package/dist/kernel/fs.js +245 -0
- package/dist/kernel/git.d.ts +16 -0
- package/dist/kernel/git.js +128 -0
- package/dist/kernel/glob.d.ts +1 -0
- package/dist/kernel/glob.js +178 -0
- package/dist/kernel/hash.d.ts +3 -0
- package/dist/kernel/hash.js +12 -0
- package/dist/kernel/host.d.ts +3 -0
- package/dist/kernel/host.js +48 -0
- package/dist/kernel/index.d.ts +115 -0
- package/dist/kernel/index.js +33 -0
- package/dist/kernel/json.d.ts +4 -0
- package/dist/kernel/json.js +68 -0
- package/dist/kernel/net-allow.d.ts +8 -0
- package/dist/kernel/net-allow.js +45 -0
- package/dist/kernel/net-fetch.d.ts +5 -0
- package/dist/kernel/net-fetch.js +135 -0
- package/dist/kernel/net.d.ts +10 -0
- package/dist/kernel/net.js +24 -0
- package/dist/kernel/path.d.ts +3 -0
- package/dist/kernel/path.js +40 -0
- package/dist/kernel/pattern.d.ts +2 -0
- package/dist/kernel/pattern.js +150 -0
- package/dist/kernel/proc.d.ts +6 -0
- package/dist/kernel/proc.js +207 -0
- package/dist/kernel/read-cache.d.ts +6 -0
- package/dist/kernel/read-cache.js +27 -0
- package/dist/kernel/redact.d.ts +1 -0
- package/dist/kernel/redact.js +206 -0
- package/dist/kernel/repo-root.d.ts +3 -0
- package/dist/kernel/repo-root.js +29 -0
- package/dist/kernel/result.d.ts +10 -0
- package/dist/kernel/result.js +6 -0
- package/dist/kernel/schema-helpers.d.ts +11 -0
- package/dist/kernel/schema-helpers.js +101 -0
- package/dist/kernel/schema.d.ts +2 -0
- package/dist/kernel/schema.js +203 -0
- package/dist/kernel/secret-paths.d.ts +3 -0
- package/dist/kernel/secret-paths.js +70 -0
- package/dist/kernel/shell-bypass.d.ts +4 -0
- package/dist/kernel/shell-bypass.js +151 -0
- package/dist/kernel/shell-cmd.d.ts +6 -0
- package/dist/kernel/shell-cmd.js +213 -0
- package/dist/kernel/shell-deny-cmd.d.ts +7 -0
- package/dist/kernel/shell-deny-cmd.js +35 -0
- package/dist/kernel/shell-deny-destroy.d.ts +7 -0
- package/dist/kernel/shell-deny-destroy.js +71 -0
- package/dist/kernel/shell-deny-escalate.d.ts +7 -0
- package/dist/kernel/shell-deny-escalate.js +96 -0
- package/dist/kernel/shell-deny-target.d.ts +4 -0
- package/dist/kernel/shell-deny-target.js +51 -0
- package/dist/kernel/shell-deny.d.ts +8 -0
- package/dist/kernel/shell-deny.js +171 -0
- package/dist/kernel/shell-scan.d.ts +3 -0
- package/dist/kernel/shell-scan.js +226 -0
- package/dist/kernel/shell-word.d.ts +15 -0
- package/dist/kernel/shell-word.js +216 -0
- package/dist/kernel/shell.d.ts +22 -0
- package/dist/kernel/shell.js +2 -0
- package/dist/kernel/stdin.d.ts +2 -0
- package/dist/kernel/stdin.js +59 -0
- package/dist/kernel/test-report.d.ts +7 -0
- package/dist/kernel/test-report.js +112 -0
- package/dist/kernel/version.d.ts +2 -0
- package/dist/kernel/version.js +46 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +19 -11
- package/schema/accepted.schema.json +20 -0
- package/schema/baseline.schema.json +17 -0
- package/schema/capability.schema.json +31 -0
- package/schema/cli/error.schema.json +15 -0
- package/schema/cli/explain.schema.json +19 -0
- package/schema/cli/report.schema.json +15 -0
- package/schema/cli/status.schema.json +51 -0
- package/schema/cli/verify.schema.json +15 -0
- package/schema/config.schema.json +43 -0
- package/schema/event-log.schema.json +52 -0
- package/schema/hook-decision.schema.json +13 -0
- package/schema/hook-event.schema.json +50 -0
- package/schema/manifest.schema.json +26 -0
- package/schema/pack-draft.schema.json +42 -0
- package/schema/pack.schema.json +70 -0
- package/schema/registry-snapshot.schema.json +41 -0
- package/schema/remediation-plan.schema.json +44 -0
- package/schema/review-findings.schema.json +25 -0
- package/schema/task-record.schema.json +49 -0
- package/schema/waivers.schema.json +29 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ARCH_PROFILES, isArchProfile, } from "./arch-profiles.js";
|
|
2
|
+
import { checkArch as checkArchImpl, checkArchProfile, checkModuleSize, } from "./checks.js";
|
|
3
|
+
import { CODICTATOR_MODULES, CODICTATOR_PROFILE, } from "./codictator-modules.js";
|
|
4
|
+
import { buildGraph as buildGraphImpl, EMPTY_GRAPH_CACHE, hashGraphContent, normalizeSeparators, parseGraphCache, resolveImportTarget, serializeGraphCache, updateGraphCache, } from "./graph.js";
|
|
5
|
+
import { layerMayImport, resolveLayer } from "./layer-rules.js";
|
|
6
|
+
import { validateModuleMap } from "./module-map-validation.js";
|
|
7
|
+
import { deriveModules, isPublicEntryTarget } from "./module-mapping.js";
|
|
8
|
+
export { ARCH_PROFILES, CODICTATOR_MODULES, CODICTATOR_PROFILE, checkArchProfile, checkModuleSize, deriveModules, EMPTY_GRAPH_CACHE, hashGraphContent, isArchProfile, isPublicEntryTarget, layerMayImport, normalizeSeparators, parseGraphCache, resolveImportTarget, resolveLayer, serializeGraphCache, updateGraphCache, validateModuleMap, };
|
|
9
|
+
// SPEC §4.11.3: import graph construction over the module map.
|
|
10
|
+
export function buildGraph(modules, refs) {
|
|
11
|
+
return buildGraphImpl(modules, refs);
|
|
12
|
+
}
|
|
13
|
+
// SPEC §4.11.4: boundary and layer checks for the evaluation path.
|
|
14
|
+
export function checkArch(ctx, refs, options = {}) {
|
|
15
|
+
return checkArchImpl(ctx, refs, options);
|
|
16
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ArchProfile } from "./arch-profiles.ts";
|
|
2
|
+
export declare function layerMayImport(layer: string, target: string, profile: ArchProfile): boolean;
|
|
3
|
+
export declare function resolveLayer(file: string, moduleBase: string, layerDirs: ReadonlyArray<string>): string | undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const APP_LAYER_ORDER = {
|
|
2
|
+
domain: ["domain"],
|
|
3
|
+
application: ["domain", "application"],
|
|
4
|
+
infrastructure: ["domain", "application", "infrastructure"],
|
|
5
|
+
ui: ["domain", "application", "ui"],
|
|
6
|
+
api: ["domain", "application", "api"],
|
|
7
|
+
};
|
|
8
|
+
export function layerMayImport(layer, target, profile) {
|
|
9
|
+
if (target === "kernel") {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (profile !== "app" && profile !== "service") {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
const allowed = APP_LAYER_ORDER[layer];
|
|
16
|
+
if (allowed === undefined) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return allowed.includes(target);
|
|
20
|
+
}
|
|
21
|
+
// SPEC §4.11.1: the first matching folder segment under the module dir names
|
|
22
|
+
// the layer; a file outside every configured layer dir is unlayered.
|
|
23
|
+
export function resolveLayer(file, moduleBase, layerDirs) {
|
|
24
|
+
const prefix = `${moduleBase}/`;
|
|
25
|
+
if (!file.startsWith(prefix)) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const rest = file.slice(prefix.length);
|
|
29
|
+
const slash = rest.indexOf("/");
|
|
30
|
+
if (slash < 0) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const top = rest.slice(0, slash);
|
|
34
|
+
if (!layerDirs.includes(top)) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return top;
|
|
38
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPEC §4.11.2: adding a dependsOn edge is a design change, allowed only
|
|
2
|
+
// when the graph stays acyclic. Config validation owns the same check; this
|
|
3
|
+
// pure form lets the arch guard refuse a cyclic map with CDX-E105.
|
|
4
|
+
import { err, makeError, ok, } from "../../kernel/index.js";
|
|
5
|
+
import { findModuleCycle } from "./cycle-walk.js";
|
|
6
|
+
function cycleError(trail) {
|
|
7
|
+
return makeError("CDX-E105", `architecture change closes a cycle: ${trail.join(" -> ")}`, "Remove a dependsOn edge so the module graph stays acyclic (SPEC §4.11.2).");
|
|
8
|
+
}
|
|
9
|
+
export function validateModuleMap(modules) {
|
|
10
|
+
const deps = new Map();
|
|
11
|
+
for (const mod of modules) {
|
|
12
|
+
if (deps.has(mod.name)) {
|
|
13
|
+
return err(makeError("CDX-E105", `duplicate module name "${mod.name}"`, "Give every architecture module a unique name, then retry."));
|
|
14
|
+
}
|
|
15
|
+
deps.set(mod.name, mod.dependsOn);
|
|
16
|
+
}
|
|
17
|
+
for (const mod of modules) {
|
|
18
|
+
for (const dep of mod.dependsOn) {
|
|
19
|
+
if (dep !== "*" && !deps.has(dep)) {
|
|
20
|
+
return err(makeError("CDX-E105", `module "${mod.name}" depends on unknown module "${dep}"`, "Point dependsOn at a module the architecture map declares, then retry."));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const names = modules.map((mod) => mod.name);
|
|
25
|
+
const cycle = findModuleCycle(names, deps, (dep) => dep === "*");
|
|
26
|
+
if (cycle !== undefined) {
|
|
27
|
+
return err(cycleError(cycle));
|
|
28
|
+
}
|
|
29
|
+
return ok(modules);
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Finding } from "../engine/index.ts";
|
|
2
|
+
import type { ModuleNode } from "./index.ts";
|
|
3
|
+
export interface ArchDenyRule {
|
|
4
|
+
readonly from: string;
|
|
5
|
+
readonly to: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function moduleEntry(mod: ModuleNode): string;
|
|
8
|
+
export declare function isPublicEntryTarget(mod: ModuleNode, resolved: string): boolean;
|
|
9
|
+
export declare function deriveModules(refs: ReadonlyArray<{
|
|
10
|
+
readonly from: string;
|
|
11
|
+
readonly to: string;
|
|
12
|
+
}>): Array<ModuleNode>;
|
|
13
|
+
export declare function dependsAllowed(fromMod: ModuleNode, toMod: ModuleNode, deny: ReadonlyArray<ArchDenyRule>): boolean;
|
|
14
|
+
export declare function profileAllowsEdge(profile: string, fromMod: ModuleNode, toMod: ModuleNode): boolean;
|
|
15
|
+
export declare function mappedFinding(from: string, line: number, detail: string): Finding;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { isArchProfile } from "./arch-profiles.js";
|
|
2
|
+
import { moduleBase, normalizeSeparators, resolveRelativeSpecifier, } from "./graph.js";
|
|
3
|
+
const TYPESCRIPT_EXTENSIONS = [
|
|
4
|
+
".d.ts",
|
|
5
|
+
".ts",
|
|
6
|
+
".tsx",
|
|
7
|
+
".js",
|
|
8
|
+
".jsx",
|
|
9
|
+
".mjs",
|
|
10
|
+
".cjs",
|
|
11
|
+
".mts",
|
|
12
|
+
".cts",
|
|
13
|
+
];
|
|
14
|
+
function stripExtension(path) {
|
|
15
|
+
for (const extension of TYPESCRIPT_EXTENSIONS) {
|
|
16
|
+
if (path.endsWith(extension)) {
|
|
17
|
+
return path.slice(0, -extension.length);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return path;
|
|
21
|
+
}
|
|
22
|
+
export function moduleEntry(mod) {
|
|
23
|
+
if (mod.entry !== undefined) {
|
|
24
|
+
return normalizeSeparators(mod.entry);
|
|
25
|
+
}
|
|
26
|
+
return `${moduleBase(mod)}/index.ts`;
|
|
27
|
+
}
|
|
28
|
+
// A cross-module import targets the public entry when it names the entry
|
|
29
|
+
// file, the entry without its extension, or the module dir itself.
|
|
30
|
+
export function isPublicEntryTarget(mod, resolved) {
|
|
31
|
+
const target = normalizeSeparators(resolved);
|
|
32
|
+
const entry = moduleEntry(mod);
|
|
33
|
+
const base = moduleBase(mod);
|
|
34
|
+
return (target === entry ||
|
|
35
|
+
stripExtension(target) === stripExtension(entry) ||
|
|
36
|
+
target === base ||
|
|
37
|
+
stripExtension(target) === `${base}/index`);
|
|
38
|
+
}
|
|
39
|
+
function hasGeneratedSegment(path) {
|
|
40
|
+
return normalizeSeparators(path).split("/").includes("generated");
|
|
41
|
+
}
|
|
42
|
+
function isRepoPath(value) {
|
|
43
|
+
return value.startsWith("src/");
|
|
44
|
+
}
|
|
45
|
+
function submoduleForTail(top, tail, kind) {
|
|
46
|
+
const next = tail.indexOf("/");
|
|
47
|
+
if (next < 0) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const name = tail.slice(0, next);
|
|
51
|
+
if (kind === "pack") {
|
|
52
|
+
return {
|
|
53
|
+
name: `${top}/${name}`,
|
|
54
|
+
path: `src/${top}/${name}/**`,
|
|
55
|
+
kind: "pack",
|
|
56
|
+
dependsOn: [],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
name,
|
|
61
|
+
path: `src/${top}/${name}/**`,
|
|
62
|
+
kind: "feature",
|
|
63
|
+
dependsOn: [],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function moduleForTop(top, tail) {
|
|
67
|
+
if (top === "kernel") {
|
|
68
|
+
return {
|
|
69
|
+
name: "kernel",
|
|
70
|
+
path: "src/kernel/**",
|
|
71
|
+
kind: "kernel",
|
|
72
|
+
dependsOn: [],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (top === "cli") {
|
|
76
|
+
return {
|
|
77
|
+
name: "cli",
|
|
78
|
+
path: "src/cli/**",
|
|
79
|
+
kind: "composition",
|
|
80
|
+
dependsOn: ["*"],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (top === "features") {
|
|
84
|
+
return submoduleForTail(top, tail, "feature");
|
|
85
|
+
}
|
|
86
|
+
if (top === "builtin-packs") {
|
|
87
|
+
return submoduleForTail(top, tail, "pack");
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
name: top,
|
|
91
|
+
path: `src/${top}/**`,
|
|
92
|
+
kind: "feature",
|
|
93
|
+
dependsOn: [],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function moduleForPath(path) {
|
|
97
|
+
const candidate = normalizeSeparators(path);
|
|
98
|
+
if (hasGeneratedSegment(candidate) || !isRepoPath(candidate)) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
const rest = candidate.slice("src/".length);
|
|
102
|
+
const slash = rest.indexOf("/");
|
|
103
|
+
if (slash < 0) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
return moduleForTop(rest.slice(0, slash), rest.slice(slash + 1));
|
|
107
|
+
}
|
|
108
|
+
// SPEC §4.11.3 Assign for the evaluation path: without a configured map the
|
|
109
|
+
// modules derive from the files under src/, each with no declared edges, so
|
|
110
|
+
// every cross-module edge fails closed until the config map declares it.
|
|
111
|
+
export function deriveModules(refs) {
|
|
112
|
+
const found = new Map();
|
|
113
|
+
const consider = (file) => {
|
|
114
|
+
const mod = moduleForPath(file);
|
|
115
|
+
if (mod !== undefined && !found.has(mod.name)) {
|
|
116
|
+
found.set(mod.name, mod);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
for (const ref of refs) {
|
|
120
|
+
consider(ref.from);
|
|
121
|
+
const target = normalizeSeparators(ref.to);
|
|
122
|
+
if (target.startsWith("./") || target.startsWith("../")) {
|
|
123
|
+
consider(resolveRelativeSpecifier(ref.from, target));
|
|
124
|
+
}
|
|
125
|
+
else if (isRepoPath(target)) {
|
|
126
|
+
consider(target);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return [...found.values()].sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
130
|
+
}
|
|
131
|
+
export function dependsAllowed(fromMod, toMod, deny) {
|
|
132
|
+
for (const rule of deny) {
|
|
133
|
+
const fromHit = rule.from === "*" || rule.from === fromMod.name;
|
|
134
|
+
const toHit = rule.to === "*" || rule.to === toMod.name;
|
|
135
|
+
if (fromHit && toHit) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (fromMod.kind === "composition" || fromMod.dependsOn.includes("*")) {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
if (toMod.kind === "composition") {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
145
|
+
return fromMod.dependsOn.includes(toMod.name);
|
|
146
|
+
}
|
|
147
|
+
// SPEC §4.11.1 profile overlays beyond dependsOn: the kernel and layer
|
|
148
|
+
// directions the table cannot express, and the composition root nothing may
|
|
149
|
+
// import. Unknown kinds stay neutral so unconfigured maps fail on edges only.
|
|
150
|
+
export function profileAllowsEdge(profile, fromMod, toMod) {
|
|
151
|
+
if (!isArchProfile(profile) ||
|
|
152
|
+
fromMod.kind === undefined ||
|
|
153
|
+
toMod.kind === undefined) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
if (fromMod.kind === "kernel" && toMod.name !== fromMod.name) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
if (profile === "app" || profile === "service") {
|
|
160
|
+
if (fromMod.kind === "shared" && toMod.kind === "feature") {
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (profile === "cli") {
|
|
165
|
+
if (fromMod.kind === "feature" && toMod.kind === "command") {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (profile === "service") {
|
|
170
|
+
if (fromMod.kind === "feature" && toMod.kind === "transport") {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
export function mappedFinding(from, line, detail) {
|
|
177
|
+
return {
|
|
178
|
+
ruleId: "core/arch-module-mapped",
|
|
179
|
+
path: from,
|
|
180
|
+
line,
|
|
181
|
+
message: detail,
|
|
182
|
+
remediation: "Move the file under a config.architecture modules[] path, or add its folder to the map.",
|
|
183
|
+
};
|
|
184
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ARCH_PROFILES, type ArchProfile, isArchProfile, } from "./arch-profiles.ts";
|
|
2
|
+
export { CODICTATOR_MODULES, CODICTATOR_PROFILE, } from "./codictator-modules.ts";
|
|
3
|
+
export { layerMayImport, resolveLayer } from "./layer-rules.ts";
|
|
4
|
+
export { validateModuleMap } from "./module-map-validation.ts";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// SPEC §4.11.1–§4.11.2: architecture profiles surface. Behaviour lives in
|
|
2
|
+
// arch-profiles, layer-rules, codictator-modules and module-map-validation;
|
|
3
|
+
// this file re-exports the surface so existing `./profiles.ts` imports keep
|
|
4
|
+
// working.
|
|
5
|
+
export { ARCH_PROFILES, isArchProfile, } from "./arch-profiles.js";
|
|
6
|
+
export { CODICTATOR_MODULES, CODICTATOR_PROFILE, } from "./codictator-modules.js";
|
|
7
|
+
export { layerMayImport, resolveLayer } from "./layer-rules.js";
|
|
8
|
+
export { validateModuleMap } from "./module-map-validation.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Decision, Finding, Ports, Trigger } from "../../kernel/index.ts";
|
|
2
|
+
import { type Result } from "../../kernel/index.ts";
|
|
3
|
+
import type { EventKind } from "./index.ts";
|
|
4
|
+
export declare const LOG_REL = ".codictator/state/events.jsonl";
|
|
5
|
+
export declare const MAX_LINE_BYTES: number;
|
|
6
|
+
export declare const MAX_LOG_BYTES: number;
|
|
7
|
+
export declare const KEEP_ROTATED = 5;
|
|
8
|
+
export interface NewEvent {
|
|
9
|
+
readonly kind: EventKind;
|
|
10
|
+
readonly layer: string;
|
|
11
|
+
readonly trigger: Trigger;
|
|
12
|
+
readonly harness?: string;
|
|
13
|
+
readonly sessionId?: string;
|
|
14
|
+
readonly taskId?: string;
|
|
15
|
+
readonly ruleIds: ReadonlyArray<string>;
|
|
16
|
+
readonly decision?: Decision;
|
|
17
|
+
readonly findings?: ReadonlyArray<Finding>;
|
|
18
|
+
readonly waivers?: ReadonlyArray<string>;
|
|
19
|
+
readonly clockSkew?: boolean;
|
|
20
|
+
readonly durationMs: number;
|
|
21
|
+
readonly configHash: string;
|
|
22
|
+
readonly packs: Readonly<Record<string, string>>;
|
|
23
|
+
readonly message?: string;
|
|
24
|
+
readonly ts?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function appendEvent(ports: Ports, repoRoot: string, event: NewEvent, seq?: number): Promise<Result<void>>;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// SPEC §4.18.1: event log append. One fs.append call per event, so
|
|
2
|
+
// concurrent hook processes never interleave lines; lines stay under 64 KB
|
|
3
|
+
// (the message is truncated with a marker first); past 5 MiB the log
|
|
4
|
+
// rotates to events.<n>.jsonl keeping the newest five.
|
|
5
|
+
import { err, makeError, ok, redactSecrets, sha256Text, stableLineStringify, stableStringify, } from "../../kernel/index.js";
|
|
6
|
+
export const LOG_REL = ".codictator/state/events.jsonl";
|
|
7
|
+
export const MAX_LINE_BYTES = 64 * 1024;
|
|
8
|
+
export const MAX_LOG_BYTES = 5 * 1024 * 1024;
|
|
9
|
+
export const KEEP_ROTATED = 5;
|
|
10
|
+
function byteLength(text) {
|
|
11
|
+
return new TextEncoder().encode(text).length;
|
|
12
|
+
}
|
|
13
|
+
function e801(action, detail) {
|
|
14
|
+
return makeError("CDX-E801", `event log not writable: cannot ${action}`, "Free disk space and fix permissions on .codictator/state/, then retry.", detail);
|
|
15
|
+
}
|
|
16
|
+
// SPEC §7.10: sortable id from now plus a content digest. The per-process
|
|
17
|
+
// counter arrives with the engine sequence; without it the digest keeps E1
|
|
18
|
+
// ids unique without module-level mutable state.
|
|
19
|
+
function makeEventId(now, canonical, seq) {
|
|
20
|
+
const stamp = now.replace(/[-:.]/g, "");
|
|
21
|
+
const digest = sha256Text(canonical).slice(0, 12);
|
|
22
|
+
if (seq === undefined) {
|
|
23
|
+
return `${stamp}-${digest}`;
|
|
24
|
+
}
|
|
25
|
+
return `${stamp}-${seq.toString().padStart(6, "0")}-${digest}`;
|
|
26
|
+
}
|
|
27
|
+
// SPEC §7.10: findings on the line carry rule, path, line and code only.
|
|
28
|
+
function projectFinding(finding) {
|
|
29
|
+
return {
|
|
30
|
+
ruleId: finding.ruleId,
|
|
31
|
+
...(finding.path === undefined ? {} : { path: finding.path }),
|
|
32
|
+
...(finding.line === undefined ? {} : { line: finding.line }),
|
|
33
|
+
...(finding.code === undefined ? {} : { code: finding.code }),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function truncateUtf8(text, maxBytes) {
|
|
37
|
+
const bytes = new TextEncoder().encode(text);
|
|
38
|
+
if (bytes.length <= maxBytes) {
|
|
39
|
+
return text;
|
|
40
|
+
}
|
|
41
|
+
let cut = maxBytes;
|
|
42
|
+
while (cut > 0) {
|
|
43
|
+
const byte = bytes[cut];
|
|
44
|
+
if (byte === undefined || (byte & 0xc0) !== 0x80) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
cut -= 1;
|
|
48
|
+
}
|
|
49
|
+
return new TextDecoder().decode(bytes.subarray(0, cut));
|
|
50
|
+
}
|
|
51
|
+
function withOptionals(base, event, message) {
|
|
52
|
+
return {
|
|
53
|
+
...base,
|
|
54
|
+
...(event.harness === undefined ? {} : { harness: event.harness }),
|
|
55
|
+
...(event.sessionId === undefined ? {} : { sessionId: event.sessionId }),
|
|
56
|
+
...(event.taskId === undefined ? {} : { taskId: event.taskId }),
|
|
57
|
+
...(event.decision === undefined ? {} : { decision: event.decision }),
|
|
58
|
+
...(event.waivers === undefined ? {} : { waivers: event.waivers }),
|
|
59
|
+
...(event.clockSkew === undefined ? {} : { clockSkew: event.clockSkew }),
|
|
60
|
+
...(event.findings === undefined
|
|
61
|
+
? {}
|
|
62
|
+
: { findings: event.findings.map(projectFinding) }),
|
|
63
|
+
...(message === undefined ? {} : { message }),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// SPEC §4.18.6 EC-2: the message is truncated with a marker before append.
|
|
67
|
+
function fitLine(event, now, id) {
|
|
68
|
+
const base = {
|
|
69
|
+
v: 1,
|
|
70
|
+
id,
|
|
71
|
+
ts: event.ts ?? now,
|
|
72
|
+
now,
|
|
73
|
+
kind: event.kind,
|
|
74
|
+
layer: event.layer,
|
|
75
|
+
trigger: event.trigger,
|
|
76
|
+
ruleIds: event.ruleIds,
|
|
77
|
+
durationMs: event.durationMs,
|
|
78
|
+
configHash: event.configHash,
|
|
79
|
+
packs: event.packs,
|
|
80
|
+
};
|
|
81
|
+
const message = event.message === undefined ? undefined : redactSecrets(event.message);
|
|
82
|
+
const full = stableLineStringify(withOptionals(base, event, message));
|
|
83
|
+
if (byteLength(full) <= MAX_LINE_BYTES) {
|
|
84
|
+
return ok(full);
|
|
85
|
+
}
|
|
86
|
+
if (message === undefined) {
|
|
87
|
+
return err(e801("append event", "a single event without a message exceeds 64 KB"));
|
|
88
|
+
}
|
|
89
|
+
const empty = stableLineStringify(withOptionals(base, event, ""));
|
|
90
|
+
const allowance = MAX_LINE_BYTES - byteLength(empty) - 2;
|
|
91
|
+
return truncateToFit(base, event, message, allowance);
|
|
92
|
+
}
|
|
93
|
+
// Halve the budget until the marked message fits, else fail closed.
|
|
94
|
+
function truncateToFit(base, event, message, allowance) {
|
|
95
|
+
let budget = allowance;
|
|
96
|
+
for (let round = 0; round < 32; round += 1) {
|
|
97
|
+
if (budget < 0) {
|
|
98
|
+
return err(e801("append event", "the message cannot be truncated to fit 64 KB"));
|
|
99
|
+
}
|
|
100
|
+
const kept = truncateUtf8(message, budget);
|
|
101
|
+
const omitted = byteLength(message) - byteLength(kept);
|
|
102
|
+
const candidate = stableLineStringify(withOptionals(base, event, `${kept}[truncated ${omitted} bytes]`));
|
|
103
|
+
if (byteLength(candidate) <= MAX_LINE_BYTES) {
|
|
104
|
+
return ok(candidate);
|
|
105
|
+
}
|
|
106
|
+
budget = Math.floor(budget / 2);
|
|
107
|
+
}
|
|
108
|
+
return err(e801("append event", "the message cannot be truncated to fit 64 KB"));
|
|
109
|
+
}
|
|
110
|
+
function rotatedNumber(name) {
|
|
111
|
+
const match = /^events\.(\d+)\.jsonl$/.exec(name);
|
|
112
|
+
if (match === null) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
const raw = match[1];
|
|
116
|
+
if (raw === undefined) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const parsed = Number.parseInt(raw, 10);
|
|
120
|
+
return Number.isSafeInteger(parsed) ? parsed : undefined;
|
|
121
|
+
}
|
|
122
|
+
async function rotateLog(ports, root, logRel) {
|
|
123
|
+
const stateRel = `${root}/.codictator/state`;
|
|
124
|
+
const listed = await ports.fs.list(stateRel);
|
|
125
|
+
if (!listed.ok) {
|
|
126
|
+
return e801("rotate the event log", listed.error.message);
|
|
127
|
+
}
|
|
128
|
+
let next = 1;
|
|
129
|
+
const numbered = [];
|
|
130
|
+
for (const name of listed.value) {
|
|
131
|
+
const at = rotatedNumber(name);
|
|
132
|
+
if (at !== undefined) {
|
|
133
|
+
numbered.push(at);
|
|
134
|
+
next = Math.max(next, at + 1);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const current = await ports.fs.read(logRel);
|
|
138
|
+
if (!current.ok) {
|
|
139
|
+
return e801("rotate the event log", current.error.message);
|
|
140
|
+
}
|
|
141
|
+
const written = await ports.fs.write(`${stateRel}/events.${next}.jsonl`, current.value);
|
|
142
|
+
if (!written.ok) {
|
|
143
|
+
return e801("rotate the event log", written.error.message);
|
|
144
|
+
}
|
|
145
|
+
const removed = await ports.fs.remove(logRel);
|
|
146
|
+
if (!removed.ok) {
|
|
147
|
+
return e801("rotate the event log", removed.error.message);
|
|
148
|
+
}
|
|
149
|
+
numbered.push(next);
|
|
150
|
+
numbered.sort((a, b) => a - b);
|
|
151
|
+
while (numbered.length > KEEP_ROTATED) {
|
|
152
|
+
const oldest = numbered.shift();
|
|
153
|
+
if (oldest === undefined) {
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
const deleted = await ports.fs.remove(`${stateRel}/events.${oldest}.jsonl`);
|
|
157
|
+
if (!deleted.ok) {
|
|
158
|
+
return e801("rotate the event log", deleted.error.message);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
// SPEC §4.18.1: append one line-atomic event; writes recreate the log when it
|
|
164
|
+
// was deleted mid-session; the log rotates past the size cap. The optional
|
|
165
|
+
// sequence carries the engine's per-process counter into the event id so a
|
|
166
|
+
// verdict's eventId matches its log line (SPEC §7.10).
|
|
167
|
+
export async function appendEvent(ports, repoRoot, event, seq) {
|
|
168
|
+
const stripped = repoRoot.replace(/\/+$/, "");
|
|
169
|
+
const root = stripped === "" ? "." : stripped;
|
|
170
|
+
const logRel = `${root}/${LOG_REL}`;
|
|
171
|
+
const now = ports.clock.now();
|
|
172
|
+
const canonical = stableStringify({
|
|
173
|
+
kind: event.kind,
|
|
174
|
+
layer: event.layer,
|
|
175
|
+
trigger: event.trigger,
|
|
176
|
+
ruleIds: [...event.ruleIds].sort(),
|
|
177
|
+
durationMs: event.durationMs,
|
|
178
|
+
configHash: event.configHash,
|
|
179
|
+
packs: event.packs,
|
|
180
|
+
message: event.message,
|
|
181
|
+
});
|
|
182
|
+
const fitted = fitLine(event, now, makeEventId(now, canonical, seq));
|
|
183
|
+
if (!fitted.ok) {
|
|
184
|
+
return err(fitted.error);
|
|
185
|
+
}
|
|
186
|
+
const lineBytes = new TextEncoder().encode(fitted.value);
|
|
187
|
+
// exists() is the portable absence check: stat on a missing path
|
|
188
|
+
// rejects on some ports, so it runs only when the log is there.
|
|
189
|
+
const seen = await ports.fs.exists(logRel);
|
|
190
|
+
if (!seen.ok) {
|
|
191
|
+
return err(e801("append event", seen.error.message));
|
|
192
|
+
}
|
|
193
|
+
if (seen.value) {
|
|
194
|
+
const stat = await ports.fs.stat(logRel);
|
|
195
|
+
if (!stat.ok) {
|
|
196
|
+
return err(e801("append event", stat.error.message));
|
|
197
|
+
}
|
|
198
|
+
if (stat.value.size + lineBytes.length > MAX_LOG_BYTES) {
|
|
199
|
+
const rotated = await rotateLog(ports, root, logRel);
|
|
200
|
+
if (rotated !== undefined) {
|
|
201
|
+
return err(rotated);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const appended = await ports.fs.append(logRel, lineBytes);
|
|
206
|
+
if (!appended.ok) {
|
|
207
|
+
return err(e801("append event", appended.error.message));
|
|
208
|
+
}
|
|
209
|
+
return ok(undefined);
|
|
210
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// SPEC §8.1: the error-code table, second half (CDX-E401 through CDX-E903:
|
|
2
|
+
// registry, CI, workflow, filesystem, events, LLM and runtime). Combined
|
|
3
|
+
// with explain-table.ts by explain.ts; the append-only rule lives there.
|
|
4
|
+
import { row } from "./explain-table.js";
|
|
5
|
+
// SPEC §8.1: rows CDX-E401 through CDX-E903.
|
|
6
|
+
export const ERROR_ROWS_TAIL = [
|
|
7
|
+
row("CDX-E401", 5, "Registry or advisory data unavailable and no usable snapshot", "Retry with network access, or record a usable registry snapshot first."),
|
|
8
|
+
row("CDX-E501", 1, "Managed block markers malformed or duplicated", "Restore the file with codictator regen; never hand-edit generated artifacts."),
|
|
9
|
+
row("CDX-E503", 5, "CI base commit unreachable (shallow clone)", "Fetch with fetch-depth 0 so the base is reachable, then rerun."),
|
|
10
|
+
row("CDX-E601", 1, "Red proof attempted after implementation began", "Write the failing red proof before implementing, then retry."),
|
|
11
|
+
row("CDX-E602", 1, "Declared test did not execute and fail", "Declare a test that executes and fails red, then retry."),
|
|
12
|
+
row("CDX-E604", 1, "Phase gate evidence missing", "Attach the phase gate evidence the step requires, then retry."),
|
|
13
|
+
row("CDX-E605", 1, "Reviewer session not fresh", "Have a fresh session that wrote no file of the task run the review, then retry."),
|
|
14
|
+
row("CDX-E606", 3, "More than one open task on a branch", "Close the extra open tasks so one branch holds one task, then retry."),
|
|
15
|
+
row("CDX-E607", 3, "Review findings file invalid", "Fix the review findings file to match its schema, then retry."),
|
|
16
|
+
row("CDX-E608", 1, "Remediation needs a clean work tree", "Commit or stash the work tree, then retry the remediation step."),
|
|
17
|
+
row("CDX-E609", 4, "Rollback refused outside Codictator's step branches", "Run the rollback on a Codictator step branch, with a human driving."),
|
|
18
|
+
row("CDX-E701", 1, "Write outside the repo root or temp dir", "Keep the path inside the repo root or the OS temp dir, then retry."),
|
|
19
|
+
row("CDX-E702", 5, "Network host not on the allowlist", "Use an allowlisted registry or advisory host, then retry."),
|
|
20
|
+
row("CDX-E703", 6, "git missing or not a git repository", "Run inside a git repository so paths resolve against its root."),
|
|
21
|
+
row("CDX-E801", 7, "Event log not writable (verdict blocked)", "Free disk space and fix permissions on .codictator/state/, then retry."),
|
|
22
|
+
row("CDX-E851", 3, "No LLM configured for --llm", "Configure config.llm or drop the --llm flag, then retry."),
|
|
23
|
+
row("CDX-E852", 5, "LLM key missing or rejected", "Set a valid LLM API key in the environment, then retry."),
|
|
24
|
+
row("CDX-E853", 1, "LLM draft invalid after repair", "Simplify the generation request and retry."),
|
|
25
|
+
row("CDX-E854", 5, "LLM unavailable (timeout, 429, 5xx after retries)", "Wait and retry; the provider is unreachable right now."),
|
|
26
|
+
row("CDX-E901", 7, "Enforcer or runtime threw", "Fix the throwing enforcer or runtime path; the failure stays fail-closed until then."),
|
|
27
|
+
row("CDX-E902", 1, "Budget or time limit exceeded", "Shrink the scope or raise the budget, then retry."),
|
|
28
|
+
row("CDX-E903", 5, "Required data or tool for an enforcer unavailable", "Provide the required data or tool, then retry."),
|
|
29
|
+
];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ErrorRow {
|
|
2
|
+
readonly code: string;
|
|
3
|
+
readonly exit: number;
|
|
4
|
+
readonly meaning: string;
|
|
5
|
+
readonly remediation: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function row(code: string, exit: number, meaning: string, remediation: string): ErrorRow;
|
|
8
|
+
export declare const ERROR_ROWS_HEAD: ReadonlyArray<ErrorRow>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// SPEC §8.1: the error-code table behind `codictator explain CDX-Ennn`,
|
|
2
|
+
// first half (CDX-E001 through CDX-E306: bootstrap, config, packs and
|
|
3
|
+
// adapters). ErrorRow and the row helper live here so
|
|
4
|
+
// explain-table-tail.ts reuses them; explain.ts combines both halves in
|
|
5
|
+
// SPEC §8.1 order. Codes are append-only (SPEC §1.4): a new code is added
|
|
6
|
+
// in order, never by editing an existing row.
|
|
7
|
+
export function row(code, exit, meaning, remediation) {
|
|
8
|
+
return { code, exit, meaning, remediation };
|
|
9
|
+
}
|
|
10
|
+
// SPEC §8.1: rows CDX-E001 through CDX-E306.
|
|
11
|
+
export const ERROR_ROWS_HEAD = [
|
|
12
|
+
row("CDX-E001", 6, "Node.js is not on PATH", "Install Node.js LTS and retry with node on PATH."),
|
|
13
|
+
row("CDX-E002", 6, "Node.js is older than the engine's engines.node", "Upgrade Node.js to the required version, then retry."),
|
|
14
|
+
row("CDX-E003", 6, "Engine not installed at the root or tool dir", "Run npm ci at the root or npm ci --prefix .codictator/tool, then retry."),
|
|
15
|
+
row("CDX-E010", 2, "Unknown rule, event or error id for explain", "Check the spelling; the nearest known ids are listed above."),
|
|
16
|
+
row("CDX-E011", 6, "Replay needs a pack version that is not installed", "Install the pack version the event records, then rerun codictator replay <eventId>."),
|
|
17
|
+
row("CDX-E101", 3, "Config missing, unparseable or schema-invalid", "Fix .codictator/config.json to match schema/config.schema.json, then retry."),
|
|
18
|
+
row("CDX-E102", 3, "config.codictator does not match the installed engine", "Set codictator to the installed engine version, or upgrade the engine."),
|
|
19
|
+
row("CDX-E103", 3, "Override or waiver of a floor rule", "Remove the override or waiver; floor rules cannot be loosened."),
|
|
20
|
+
row("CDX-E104", 3, "Tunable looser than its default outside a waiver", "Tighten the tunable, or move the loosening into .codictator/waivers.json."),
|
|
21
|
+
row("CDX-E105", 3, "Mandatory workflow gate removed or reordered, or an architecture change that loosens a profile rule or creates a cycle", "Restore the mandatory order and the profile rule, then retry."),
|
|
22
|
+
row("CDX-E106", 3, "Literal secret in config, or key over plaintext HTTP", "Remove the literal secret and use HTTPS, then retry."),
|
|
23
|
+
row("CDX-E107", 4, "Human-only command without a TTY or with agent markers", "Run this command yourself in an interactive terminal, not through an agent or hook."),
|
|
24
|
+
row("CDX-E108", 3, "Not a Codictator repo", "Run codictator init inside a repository, or change into a Codictator repo."),
|
|
25
|
+
row("CDX-E109", 3, "Waiver value beyond the pack bound", "Bring the waiver value inside the pack bound, then retry."),
|
|
26
|
+
row("CDX-E110", 3, "Waiver expiry beyond maxWaiverDays or renewal chain too long", "Shorten the expiry within maxWaiverDays and keep the chain short, then retry."),
|
|
27
|
+
row("CDX-E201", 7, "Schema uses an unsupported keyword", "Rewrite the schema with the supported 2020-12 subset, then retry."),
|
|
28
|
+
row("CDX-E202", 3, "Duplicate rule id", "Rename one of the rules so every rule id is unique, then retry."),
|
|
29
|
+
row("CDX-E203", 3, "Configured pack missing or failing self-test", "Install the pack at its pinned version and make codictator pack test pass, then retry."),
|
|
30
|
+
row("CDX-E204", 3, "Custom pack id or rule id collides with or impersonates a built-in", "Rename the custom pack and rules with a custom prefix, then retry."),
|
|
31
|
+
row("CDX-E205", 3, "Rule names an unknown enforcer", "Name a known enforcer for the rule's family, then retry."),
|
|
32
|
+
row("CDX-E206", 3, "Tool without an exact version pin", "Pin the tool to an exact version in config, then retry."),
|
|
33
|
+
row("CDX-E207", 1, "External tool error, unknown exit code, unparseable or oversized output, or path outside the repo", "Fix the tool invocation per the reported detail; the finding blocks until the run is clean."),
|
|
34
|
+
row("CDX-E208", 1, "External tool version does not match its pin", "Install the pinned tool version, then retry."),
|
|
35
|
+
row("CDX-E209", 1, "External tool not found", "Install the tool the pack needs, then retry."),
|
|
36
|
+
row("CDX-E210", 3, "External tool mapped to a rule outside its pack", "Map the tool to a rule inside its own pack, then retry."),
|
|
37
|
+
row("CDX-E211", 3, "Pack self-test failure (SPEC §4.4.4): rule fixtures", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
38
|
+
row("CDX-E212", 3, "Pack self-test failure (SPEC §4.4.4): enforcer binding", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
39
|
+
row("CDX-E213", 3, "Pack self-test failure (SPEC §4.4.4): parameter bounds", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
40
|
+
row("CDX-E214", 3, "Pack self-test failure (SPEC §4.4.4): default direction", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
41
|
+
row("CDX-E215", 3, "Pack self-test failure (SPEC §4.4.4): external tool declaration", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
42
|
+
row("CDX-E216", 3, "Pack self-test failure (SPEC §4.4.4): capability coverage", "Run codictator pack test <id> and fix the failing case, then retry."),
|
|
43
|
+
row("CDX-E301", 3, "Unknown or uninstalled harness id", "Use an installed adapter id, or add the custom adapter under .codictator/adapters/."),
|
|
44
|
+
row("CDX-E302", 3, "Custom adapter without passing contract tests", "Make the adapter pass its contract tests, then retry."),
|
|
45
|
+
row("CDX-E303", 1, "Hook payload unparseable or missing required fields", "Resend a well-formed hook payload; the finding blocks until it parses."),
|
|
46
|
+
row("CDX-E305", 1, "Hook payload over 8 MiB", "Write the file in smaller edits, then retry the tool call."),
|
|
47
|
+
row("CDX-E306", 1, "Shell command unparseable", "Simplify the shell command so it parses, then retry."),
|
|
48
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ErrorRow } from "./explain-table.ts";
|
|
2
|
+
export declare const ERROR_ROWS: ReadonlyArray<ErrorRow>;
|
|
3
|
+
export declare function errorRowFor(code: string): ErrorRow | undefined;
|
|
4
|
+
export declare function isKnownExplainId(id: string): boolean;
|
|
5
|
+
export declare function explainCodeText(rowValue: ErrorRow): string;
|
|
6
|
+
export declare function nearestExplainIds(id: string, limit?: number): Array<string>;
|
|
7
|
+
export declare function explainUnknownText(id: string): string;
|