@codeledger/cli 0.10.5 → 0.10.7
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 +61 -0
- package/README.md +108 -0
- package/bin/codeledger.js +66 -0
- package/package.json +35 -48
- package/scripts/postinstall.js +285 -0
- package/bin/codeledger-open.cjs +0 -89
- package/bin/codeledger-standalone.cjs +0 -3964
- package/dist/ambient-activation.d.ts +0 -30
- package/dist/ambient-activation.d.ts.map +0 -1
- package/dist/ambient-activation.js +0 -449
- package/dist/ambient-activation.js.map +0 -1
- package/dist/arch-policy/resolve.d.ts +0 -11
- package/dist/arch-policy/resolve.d.ts.map +0 -1
- package/dist/arch-policy/resolve.js +0 -195
- package/dist/arch-policy/resolve.js.map +0 -1
- package/dist/arch-policy/simulate.d.ts +0 -9
- package/dist/arch-policy/simulate.d.ts.map +0 -1
- package/dist/arch-policy/simulate.js +0 -175
- package/dist/arch-policy/simulate.js.map +0 -1
- package/dist/architecture-graph/dependency-scanner.d.ts +0 -16
- package/dist/architecture-graph/dependency-scanner.d.ts.map +0 -1
- package/dist/architecture-graph/dependency-scanner.js +0 -96
- package/dist/architecture-graph/dependency-scanner.js.map +0 -1
- package/dist/architecture-graph/graph-builder.d.ts +0 -70
- package/dist/architecture-graph/graph-builder.d.ts.map +0 -1
- package/dist/architecture-graph/graph-builder.js +0 -231
- package/dist/architecture-graph/graph-builder.js.map +0 -1
- package/dist/architecture-graph/index.d.ts +0 -4
- package/dist/architecture-graph/index.d.ts.map +0 -1
- package/dist/architecture-graph/index.js +0 -7
- package/dist/architecture-graph/index.js.map +0 -1
- package/dist/architecture-graph/service-scanner.d.ts +0 -22
- package/dist/architecture-graph/service-scanner.d.ts.map +0 -1
- package/dist/architecture-graph/service-scanner.js +0 -181
- package/dist/architecture-graph/service-scanner.js.map +0 -1
- package/dist/artifacts/summary.d.ts +0 -6
- package/dist/artifacts/summary.d.ts.map +0 -1
- package/dist/artifacts/summary.js +0 -49
- package/dist/artifacts/summary.js.map +0 -1
- package/dist/command-activation.d.ts +0 -3
- package/dist/command-activation.d.ts.map +0 -1
- package/dist/command-activation.js +0 -2
- package/dist/command-activation.js.map +0 -1
- package/dist/commands/about.d.ts +0 -2
- package/dist/commands/about.d.ts.map +0 -1
- package/dist/commands/about.js +0 -18
- package/dist/commands/about.js.map +0 -1
- package/dist/commands/activate.d.ts +0 -18
- package/dist/commands/activate.d.ts.map +0 -1
- package/dist/commands/activate.js +0 -1110
- package/dist/commands/activate.js.map +0 -1
- package/dist/commands/apply-policy.d.ts +0 -7
- package/dist/commands/apply-policy.d.ts.map +0 -1
- package/dist/commands/apply-policy.js +0 -62
- package/dist/commands/apply-policy.js.map +0 -1
- package/dist/commands/arch-policy.d.ts +0 -8
- package/dist/commands/arch-policy.d.ts.map +0 -1
- package/dist/commands/arch-policy.js +0 -349
- package/dist/commands/arch-policy.js.map +0 -1
- package/dist/commands/audit-export.d.ts +0 -8
- package/dist/commands/audit-export.d.ts.map +0 -1
- package/dist/commands/audit-export.js +0 -192
- package/dist/commands/audit-export.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -24
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -1138
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/auto-refresh.d.ts +0 -17
- package/dist/commands/auto-refresh.d.ts.map +0 -1
- package/dist/commands/auto-refresh.js +0 -152
- package/dist/commands/auto-refresh.js.map +0 -1
- package/dist/commands/broker.d.ts +0 -22
- package/dist/commands/broker.d.ts.map +0 -1
- package/dist/commands/broker.js +0 -487
- package/dist/commands/broker.js.map +0 -1
- package/dist/commands/bundle.d.ts +0 -2
- package/dist/commands/bundle.d.ts.map +0 -1
- package/dist/commands/bundle.js +0 -230
- package/dist/commands/bundle.js.map +0 -1
- package/dist/commands/capsule-change.d.ts +0 -7
- package/dist/commands/capsule-change.d.ts.map +0 -1
- package/dist/commands/capsule-change.js +0 -177
- package/dist/commands/capsule-change.js.map +0 -1
- package/dist/commands/checkpoint.d.ts +0 -26
- package/dist/commands/checkpoint.d.ts.map +0 -1
- package/dist/commands/checkpoint.js +0 -382
- package/dist/commands/checkpoint.js.map +0 -1
- package/dist/commands/ci.d.ts +0 -16
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js +0 -287
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/claims.d.ts +0 -14
- package/dist/commands/claims.d.ts.map +0 -1
- package/dist/commands/claims.js +0 -93
- package/dist/commands/claims.js.map +0 -1
- package/dist/commands/claude.d.ts +0 -2
- package/dist/commands/claude.d.ts.map +0 -1
- package/dist/commands/claude.js +0 -5
- package/dist/commands/claude.js.map +0 -1
- package/dist/commands/clean.d.ts +0 -2
- package/dist/commands/clean.d.ts.map +0 -1
- package/dist/commands/clean.js +0 -28
- package/dist/commands/clean.js.map +0 -1
- package/dist/commands/coach.d.ts +0 -11
- package/dist/commands/coach.d.ts.map +0 -1
- package/dist/commands/coach.js +0 -169
- package/dist/commands/coach.js.map +0 -1
- package/dist/commands/codex.d.ts +0 -2
- package/dist/commands/codex.d.ts.map +0 -1
- package/dist/commands/codex.js +0 -5
- package/dist/commands/codex.js.map +0 -1
- package/dist/commands/commit-msg.d.ts +0 -58
- package/dist/commands/commit-msg.d.ts.map +0 -1
- package/dist/commands/commit-msg.js +0 -461
- package/dist/commands/commit-msg.js.map +0 -1
- package/dist/commands/compare-current.d.ts +0 -2
- package/dist/commands/compare-current.d.ts.map +0 -1
- package/dist/commands/compare-current.js +0 -186
- package/dist/commands/compare-current.js.map +0 -1
- package/dist/commands/compare.d.ts +0 -2
- package/dist/commands/compare.d.ts.map +0 -1
- package/dist/commands/compare.js +0 -253
- package/dist/commands/compare.js.map +0 -1
- package/dist/commands/complete-check.d.ts +0 -24
- package/dist/commands/complete-check.d.ts.map +0 -1
- package/dist/commands/complete-check.js +0 -287
- package/dist/commands/complete-check.js.map +0 -1
- package/dist/commands/conflicts.d.ts +0 -12
- package/dist/commands/conflicts.d.ts.map +0 -1
- package/dist/commands/conflicts.js +0 -55
- package/dist/commands/conflicts.js.map +0 -1
- package/dist/commands/context-handoff.d.ts +0 -2
- package/dist/commands/context-handoff.d.ts.map +0 -1
- package/dist/commands/context-handoff.js +0 -58
- package/dist/commands/context-handoff.js.map +0 -1
- package/dist/commands/context.d.ts +0 -22
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js +0 -836
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/coordination.d.ts +0 -6
- package/dist/commands/coordination.d.ts.map +0 -1
- package/dist/commands/coordination.js +0 -177
- package/dist/commands/coordination.js.map +0 -1
- package/dist/commands/cowork-refresh.d.ts +0 -8
- package/dist/commands/cowork-refresh.d.ts.map +0 -1
- package/dist/commands/cowork-refresh.js +0 -50
- package/dist/commands/cowork-refresh.js.map +0 -1
- package/dist/commands/cowork-snapshot.d.ts +0 -8
- package/dist/commands/cowork-snapshot.d.ts.map +0 -1
- package/dist/commands/cowork-snapshot.js +0 -34
- package/dist/commands/cowork-snapshot.js.map +0 -1
- package/dist/commands/cowork-start.d.ts +0 -8
- package/dist/commands/cowork-start.d.ts.map +0 -1
- package/dist/commands/cowork-start.js +0 -71
- package/dist/commands/cowork-start.js.map +0 -1
- package/dist/commands/cowork-stop.d.ts +0 -7
- package/dist/commands/cowork-stop.d.ts.map +0 -1
- package/dist/commands/cowork-stop.js +0 -43
- package/dist/commands/cowork-stop.js.map +0 -1
- package/dist/commands/daemon.d.ts +0 -2
- package/dist/commands/daemon.d.ts.map +0 -1
- package/dist/commands/daemon.js +0 -5
- package/dist/commands/daemon.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -18
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -481
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/detect-secrets.d.ts +0 -19
- package/dist/commands/detect-secrets.d.ts.map +0 -1
- package/dist/commands/detect-secrets.js +0 -210
- package/dist/commands/detect-secrets.js.map +0 -1
- package/dist/commands/discover-check.d.ts +0 -19
- package/dist/commands/discover-check.d.ts.map +0 -1
- package/dist/commands/discover-check.js +0 -256
- package/dist/commands/discover-check.js.map +0 -1
- package/dist/commands/discover-gate.d.ts +0 -20
- package/dist/commands/discover-gate.d.ts.map +0 -1
- package/dist/commands/discover-gate.js +0 -131
- package/dist/commands/discover-gate.js.map +0 -1
- package/dist/commands/discover.d.ts +0 -14
- package/dist/commands/discover.d.ts.map +0 -1
- package/dist/commands/discover.js +0 -132
- package/dist/commands/discover.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -9
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -277
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drift.d.ts +0 -2
- package/dist/commands/drift.d.ts.map +0 -1
- package/dist/commands/drift.js +0 -171
- package/dist/commands/drift.js.map +0 -1
- package/dist/commands/ecl.d.ts +0 -11
- package/dist/commands/ecl.d.ts.map +0 -1
- package/dist/commands/ecl.js +0 -109
- package/dist/commands/ecl.js.map +0 -1
- package/dist/commands/enable.d.ts +0 -7
- package/dist/commands/enable.d.ts.map +0 -1
- package/dist/commands/enable.js +0 -75
- package/dist/commands/enable.js.map +0 -1
- package/dist/commands/evidence.d.ts +0 -2
- package/dist/commands/evidence.d.ts.map +0 -1
- package/dist/commands/evidence.js +0 -53
- package/dist/commands/evidence.js.map +0 -1
- package/dist/commands/features.d.ts +0 -2
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -185
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/fix.d.ts +0 -7
- package/dist/commands/fix.d.ts.map +0 -1
- package/dist/commands/fix.js +0 -107
- package/dist/commands/fix.js.map +0 -1
- package/dist/commands/fleet.d.ts +0 -17
- package/dist/commands/fleet.d.ts.map +0 -1
- package/dist/commands/fleet.js +0 -682
- package/dist/commands/fleet.js.map +0 -1
- package/dist/commands/graph.d.ts +0 -18
- package/dist/commands/graph.d.ts.map +0 -1
- package/dist/commands/graph.js +0 -370
- package/dist/commands/graph.js.map +0 -1
- package/dist/commands/guardrails.d.ts +0 -11
- package/dist/commands/guardrails.d.ts.map +0 -1
- package/dist/commands/guardrails.js +0 -112
- package/dist/commands/guardrails.js.map +0 -1
- package/dist/commands/harvest.d.ts +0 -2
- package/dist/commands/harvest.d.ts.map +0 -1
- package/dist/commands/harvest.js +0 -136
- package/dist/commands/harvest.js.map +0 -1
- package/dist/commands/health.d.ts +0 -8
- package/dist/commands/health.d.ts.map +0 -1
- package/dist/commands/health.js +0 -101
- package/dist/commands/health.js.map +0 -1
- package/dist/commands/hotspots.d.ts +0 -2
- package/dist/commands/hotspots.d.ts.map +0 -1
- package/dist/commands/hotspots.js +0 -20
- package/dist/commands/hotspots.js.map +0 -1
- package/dist/commands/init.d.ts +0 -12
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -423
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/insight-seed.d.ts +0 -2
- package/dist/commands/insight-seed.d.ts.map +0 -1
- package/dist/commands/insight-seed.js +0 -59
- package/dist/commands/insight-seed.js.map +0 -1
- package/dist/commands/insight-smoke-test.d.ts +0 -2
- package/dist/commands/insight-smoke-test.d.ts.map +0 -1
- package/dist/commands/insight-smoke-test.js +0 -44
- package/dist/commands/insight-smoke-test.js.map +0 -1
- package/dist/commands/insight.d.ts +0 -2
- package/dist/commands/insight.d.ts.map +0 -1
- package/dist/commands/insight.js +0 -183
- package/dist/commands/insight.js.map +0 -1
- package/dist/commands/intent.d.ts +0 -39
- package/dist/commands/intent.d.ts.map +0 -1
- package/dist/commands/intent.js +0 -539
- package/dist/commands/intent.js.map +0 -1
- package/dist/commands/intervene.d.ts +0 -11
- package/dist/commands/intervene.d.ts.map +0 -1
- package/dist/commands/intervene.js +0 -94
- package/dist/commands/intervene.js.map +0 -1
- package/dist/commands/interventions.d.ts +0 -8
- package/dist/commands/interventions.d.ts.map +0 -1
- package/dist/commands/interventions.js +0 -69
- package/dist/commands/interventions.js.map +0 -1
- package/dist/commands/learn.d.ts +0 -8
- package/dist/commands/learn.d.ts.map +0 -1
- package/dist/commands/learn.js +0 -33
- package/dist/commands/learn.js.map +0 -1
- package/dist/commands/ledger.d.ts +0 -15
- package/dist/commands/ledger.d.ts.map +0 -1
- package/dist/commands/ledger.js +0 -137
- package/dist/commands/ledger.js.map +0 -1
- package/dist/commands/lessons.d.ts +0 -14
- package/dist/commands/lessons.d.ts.map +0 -1
- package/dist/commands/lessons.js +0 -196
- package/dist/commands/lessons.js.map +0 -1
- package/dist/commands/license-utils.d.ts +0 -36
- package/dist/commands/license-utils.d.ts.map +0 -1
- package/dist/commands/license-utils.js +0 -74
- package/dist/commands/license-utils.js.map +0 -1
- package/dist/commands/license.d.ts +0 -50
- package/dist/commands/license.d.ts.map +0 -1
- package/dist/commands/license.js +0 -281
- package/dist/commands/license.js.map +0 -1
- package/dist/commands/manifest.d.ts +0 -8
- package/dist/commands/manifest.d.ts.map +0 -1
- package/dist/commands/manifest.js +0 -144
- package/dist/commands/manifest.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -14
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -70
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -16
- package/dist/commands/memory.d.ts.map +0 -1
- package/dist/commands/memory.js +0 -621
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/merge-check.d.ts +0 -15
- package/dist/commands/merge-check.d.ts.map +0 -1
- package/dist/commands/merge-check.js +0 -164
- package/dist/commands/merge-check.js.map +0 -1
- package/dist/commands/open-init.d.ts +0 -13
- package/dist/commands/open-init.d.ts.map +0 -1
- package/dist/commands/open-init.js +0 -115
- package/dist/commands/open-init.js.map +0 -1
- package/dist/commands/open-license.d.ts +0 -11
- package/dist/commands/open-license.d.ts.map +0 -1
- package/dist/commands/open-license.js +0 -98
- package/dist/commands/open-license.js.map +0 -1
- package/dist/commands/orchestrate.d.ts +0 -12
- package/dist/commands/orchestrate.d.ts.map +0 -1
- package/dist/commands/orchestrate.js +0 -119
- package/dist/commands/orchestrate.js.map +0 -1
- package/dist/commands/outcome.d.ts +0 -2
- package/dist/commands/outcome.d.ts.map +0 -1
- package/dist/commands/outcome.js +0 -121
- package/dist/commands/outcome.js.map +0 -1
- package/dist/commands/pack.d.ts +0 -12
- package/dist/commands/pack.d.ts.map +0 -1
- package/dist/commands/pack.js +0 -75
- package/dist/commands/pack.js.map +0 -1
- package/dist/commands/policy-author.d.ts +0 -48
- package/dist/commands/policy-author.d.ts.map +0 -1
- package/dist/commands/policy-author.js +0 -396
- package/dist/commands/policy-author.js.map +0 -1
- package/dist/commands/policy-simulate.d.ts +0 -9
- package/dist/commands/policy-simulate.d.ts.map +0 -1
- package/dist/commands/policy-simulate.js +0 -46
- package/dist/commands/policy-simulate.js.map +0 -1
- package/dist/commands/policy.d.ts +0 -9
- package/dist/commands/policy.d.ts.map +0 -1
- package/dist/commands/policy.js +0 -121
- package/dist/commands/policy.js.map +0 -1
- package/dist/commands/post-merge-outcome.d.ts +0 -2
- package/dist/commands/post-merge-outcome.d.ts.map +0 -1
- package/dist/commands/post-merge-outcome.js +0 -32
- package/dist/commands/post-merge-outcome.js.map +0 -1
- package/dist/commands/pr-check.d.ts +0 -18
- package/dist/commands/pr-check.d.ts.map +0 -1
- package/dist/commands/pr-check.js +0 -299
- package/dist/commands/pr-check.js.map +0 -1
- package/dist/commands/pr-comment.d.ts +0 -2
- package/dist/commands/pr-comment.d.ts.map +0 -1
- package/dist/commands/pr-comment.js +0 -96
- package/dist/commands/pr-comment.js.map +0 -1
- package/dist/commands/pr-summary.d.ts +0 -59
- package/dist/commands/pr-summary.d.ts.map +0 -1
- package/dist/commands/pr-summary.js +0 -524
- package/dist/commands/pr-summary.js.map +0 -1
- package/dist/commands/pre-pr.d.ts +0 -14
- package/dist/commands/pre-pr.d.ts.map +0 -1
- package/dist/commands/pre-pr.js +0 -57
- package/dist/commands/pre-pr.js.map +0 -1
- package/dist/commands/preflight.d.ts +0 -2
- package/dist/commands/preflight.d.ts.map +0 -1
- package/dist/commands/preflight.js +0 -48
- package/dist/commands/preflight.js.map +0 -1
- package/dist/commands/progress-check.d.ts +0 -14
- package/dist/commands/progress-check.d.ts.map +0 -1
- package/dist/commands/progress-check.js +0 -153
- package/dist/commands/progress-check.js.map +0 -1
- package/dist/commands/provenance.d.ts +0 -10
- package/dist/commands/provenance.d.ts.map +0 -1
- package/dist/commands/provenance.js +0 -103
- package/dist/commands/provenance.js.map +0 -1
- package/dist/commands/pulse.d.ts +0 -12
- package/dist/commands/pulse.d.ts.map +0 -1
- package/dist/commands/pulse.js +0 -61
- package/dist/commands/pulse.js.map +0 -1
- package/dist/commands/reality-check.d.ts +0 -4
- package/dist/commands/reality-check.d.ts.map +0 -1
- package/dist/commands/reality-check.js +0 -133
- package/dist/commands/reality-check.js.map +0 -1
- package/dist/commands/refine.d.ts +0 -17
- package/dist/commands/refine.d.ts.map +0 -1
- package/dist/commands/refine.js +0 -250
- package/dist/commands/refine.js.map +0 -1
- package/dist/commands/release-check.d.ts +0 -14
- package/dist/commands/release-check.d.ts.map +0 -1
- package/dist/commands/release-check.js +0 -44
- package/dist/commands/release-check.js.map +0 -1
- package/dist/commands/release-decision.d.ts +0 -2
- package/dist/commands/release-decision.d.ts.map +0 -1
- package/dist/commands/release-decision.js +0 -26
- package/dist/commands/release-decision.js.map +0 -1
- package/dist/commands/release-history.d.ts +0 -2
- package/dist/commands/release-history.d.ts.map +0 -1
- package/dist/commands/release-history.js +0 -34
- package/dist/commands/release-history.js.map +0 -1
- package/dist/commands/release-insights.d.ts +0 -2
- package/dist/commands/release-insights.d.ts.map +0 -1
- package/dist/commands/release-insights.js +0 -34
- package/dist/commands/release-insights.js.map +0 -1
- package/dist/commands/release-truth.d.ts +0 -2
- package/dist/commands/release-truth.d.ts.map +0 -1
- package/dist/commands/release-truth.js +0 -15
- package/dist/commands/release-truth.js.map +0 -1
- package/dist/commands/replay.d.ts +0 -2
- package/dist/commands/replay.d.ts.map +0 -1
- package/dist/commands/replay.js +0 -181
- package/dist/commands/replay.js.map +0 -1
- package/dist/commands/review-coverage.d.ts +0 -12
- package/dist/commands/review-coverage.d.ts.map +0 -1
- package/dist/commands/review-coverage.js +0 -142
- package/dist/commands/review-coverage.js.map +0 -1
- package/dist/commands/review-gate.d.ts +0 -12
- package/dist/commands/review-gate.d.ts.map +0 -1
- package/dist/commands/review-gate.js +0 -130
- package/dist/commands/review-gate.js.map +0 -1
- package/dist/commands/run.d.ts +0 -2
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -84
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/runs.d.ts +0 -2
- package/dist/commands/runs.d.ts.map +0 -1
- package/dist/commands/runs.js +0 -61
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -2
- package/dist/commands/scan.d.ts.map +0 -1
- package/dist/commands/scan.js +0 -349
- package/dist/commands/scan.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -32
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -904
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/session-cleanup.d.ts +0 -11
- package/dist/commands/session-cleanup.d.ts.map +0 -1
- package/dist/commands/session-cleanup.js +0 -85
- package/dist/commands/session-cleanup.js.map +0 -1
- package/dist/commands/session-init.d.ts +0 -10
- package/dist/commands/session-init.d.ts.map +0 -1
- package/dist/commands/session-init.js +0 -46
- package/dist/commands/session-init.js.map +0 -1
- package/dist/commands/session-progress.d.ts +0 -12
- package/dist/commands/session-progress.d.ts.map +0 -1
- package/dist/commands/session-progress.js +0 -287
- package/dist/commands/session-progress.js.map +0 -1
- package/dist/commands/session-summary.d.ts +0 -14
- package/dist/commands/session-summary.d.ts.map +0 -1
- package/dist/commands/session-summary.js +0 -1413
- package/dist/commands/session-summary.js.map +0 -1
- package/dist/commands/sessions.d.ts +0 -9
- package/dist/commands/sessions.d.ts.map +0 -1
- package/dist/commands/sessions.js +0 -60
- package/dist/commands/sessions.js.map +0 -1
- package/dist/commands/setup-ci.d.ts +0 -27
- package/dist/commands/setup-ci.d.ts.map +0 -1
- package/dist/commands/setup-ci.js +0 -487
- package/dist/commands/setup-ci.js.map +0 -1
- package/dist/commands/share.d.ts +0 -9
- package/dist/commands/share.d.ts.map +0 -1
- package/dist/commands/share.js +0 -275
- package/dist/commands/share.js.map +0 -1
- package/dist/commands/shared-summary.d.ts +0 -15
- package/dist/commands/shared-summary.d.ts.map +0 -1
- package/dist/commands/shared-summary.js +0 -194
- package/dist/commands/shared-summary.js.map +0 -1
- package/dist/commands/sign-manifest.d.ts +0 -8
- package/dist/commands/sign-manifest.d.ts.map +0 -1
- package/dist/commands/sign-manifest.js +0 -58
- package/dist/commands/sign-manifest.js.map +0 -1
- package/dist/commands/snapshot.d.ts +0 -4
- package/dist/commands/snapshot.d.ts.map +0 -1
- package/dist/commands/snapshot.js +0 -79
- package/dist/commands/snapshot.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -8
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -164
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -9
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -157
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/task.d.ts +0 -2
- package/dist/commands/task.d.ts.map +0 -1
- package/dist/commands/task.js +0 -315
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/team-ledger.d.ts +0 -11
- package/dist/commands/team-ledger.d.ts.map +0 -1
- package/dist/commands/team-ledger.js +0 -77
- package/dist/commands/team-ledger.js.map +0 -1
- package/dist/commands/team-metrics.d.ts +0 -8
- package/dist/commands/team-metrics.d.ts.map +0 -1
- package/dist/commands/team-metrics.js +0 -57
- package/dist/commands/team-metrics.js.map +0 -1
- package/dist/commands/test-summary.d.ts +0 -2
- package/dist/commands/test-summary.d.ts.map +0 -1
- package/dist/commands/test-summary.js +0 -53
- package/dist/commands/test-summary.js.map +0 -1
- package/dist/commands/time-travel.d.ts +0 -2
- package/dist/commands/time-travel.d.ts.map +0 -1
- package/dist/commands/time-travel.js +0 -89
- package/dist/commands/time-travel.js.map +0 -1
- package/dist/commands/truth-utils.d.ts +0 -14
- package/dist/commands/truth-utils.d.ts.map +0 -1
- package/dist/commands/truth-utils.js +0 -70
- package/dist/commands/truth-utils.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -2
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -17
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/vendor.d.ts +0 -20
- package/dist/commands/vendor.d.ts.map +0 -1
- package/dist/commands/vendor.js +0 -205
- package/dist/commands/vendor.js.map +0 -1
- package/dist/commands/verify.d.ts +0 -36
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js +0 -761
- package/dist/commands/verify.js.map +0 -1
- package/dist/completion-integrity/claims.d.ts +0 -21
- package/dist/completion-integrity/claims.d.ts.map +0 -1
- package/dist/completion-integrity/claims.js +0 -99
- package/dist/completion-integrity/claims.js.map +0 -1
- package/dist/completion-integrity/confidence.d.ts +0 -30
- package/dist/completion-integrity/confidence.d.ts.map +0 -1
- package/dist/completion-integrity/confidence.js +0 -86
- package/dist/completion-integrity/confidence.js.map +0 -1
- package/dist/completion-integrity/ghost-detector.d.ts +0 -37
- package/dist/completion-integrity/ghost-detector.d.ts.map +0 -1
- package/dist/completion-integrity/ghost-detector.js +0 -93
- package/dist/completion-integrity/ghost-detector.js.map +0 -1
- package/dist/completion-integrity/history.d.ts +0 -19
- package/dist/completion-integrity/history.d.ts.map +0 -1
- package/dist/completion-integrity/history.js +0 -44
- package/dist/completion-integrity/history.js.map +0 -1
- package/dist/completion-integrity/index.d.ts +0 -25
- package/dist/completion-integrity/index.d.ts.map +0 -1
- package/dist/completion-integrity/index.js +0 -251
- package/dist/completion-integrity/index.js.map +0 -1
- package/dist/completion-integrity/neighborhood.d.ts +0 -21
- package/dist/completion-integrity/neighborhood.d.ts.map +0 -1
- package/dist/completion-integrity/neighborhood.js +0 -274
- package/dist/completion-integrity/neighborhood.js.map +0 -1
- package/dist/completion-integrity/notary.d.ts +0 -3
- package/dist/completion-integrity/notary.d.ts.map +0 -1
- package/dist/completion-integrity/notary.js +0 -124
- package/dist/completion-integrity/notary.js.map +0 -1
- package/dist/completion-integrity/output.d.ts +0 -11
- package/dist/completion-integrity/output.d.ts.map +0 -1
- package/dist/completion-integrity/output.js +0 -228
- package/dist/completion-integrity/output.js.map +0 -1
- package/dist/completion-integrity/self-audit.d.ts +0 -28
- package/dist/completion-integrity/self-audit.d.ts.map +0 -1
- package/dist/completion-integrity/self-audit.js +0 -194
- package/dist/completion-integrity/self-audit.js.map +0 -1
- package/dist/completion-integrity/semantic-drift.d.ts +0 -22
- package/dist/completion-integrity/semantic-drift.d.ts.map +0 -1
- package/dist/completion-integrity/semantic-drift.js +0 -138
- package/dist/completion-integrity/semantic-drift.js.map +0 -1
- package/dist/completion-integrity/state-machine.d.ts +0 -36
- package/dist/completion-integrity/state-machine.d.ts.map +0 -1
- package/dist/completion-integrity/state-machine.js +0 -138
- package/dist/completion-integrity/state-machine.js.map +0 -1
- package/dist/completion-integrity/types.d.ts +0 -69
- package/dist/completion-integrity/types.d.ts.map +0 -1
- package/dist/completion-integrity/types.js +0 -4
- package/dist/completion-integrity/types.js.map +0 -1
- package/dist/context-engine/contract.d.ts +0 -12
- package/dist/context-engine/contract.d.ts.map +0 -1
- package/dist/context-engine/contract.js +0 -227
- package/dist/context-engine/contract.js.map +0 -1
- package/dist/context-engine/delta.d.ts +0 -10
- package/dist/context-engine/delta.d.ts.map +0 -1
- package/dist/context-engine/delta.js +0 -78
- package/dist/context-engine/delta.js.map +0 -1
- package/dist/context-engine/index.d.ts +0 -6
- package/dist/context-engine/index.d.ts.map +0 -1
- package/dist/context-engine/index.js +0 -5
- package/dist/context-engine/index.js.map +0 -1
- package/dist/context-engine/policy-evaluator.d.ts +0 -32
- package/dist/context-engine/policy-evaluator.d.ts.map +0 -1
- package/dist/context-engine/policy-evaluator.js +0 -69
- package/dist/context-engine/policy-evaluator.js.map +0 -1
- package/dist/context-engine/renderer.d.ts +0 -9
- package/dist/context-engine/renderer.d.ts.map +0 -1
- package/dist/context-engine/renderer.js +0 -28
- package/dist/context-engine/renderer.js.map +0 -1
- package/dist/context-engine/renderers/claude.d.ts +0 -3
- package/dist/context-engine/renderers/claude.d.ts.map +0 -1
- package/dist/context-engine/renderers/claude.js +0 -223
- package/dist/context-engine/renderers/claude.js.map +0 -1
- package/dist/context-engine/renderers/cursor.d.ts +0 -3
- package/dist/context-engine/renderers/cursor.d.ts.map +0 -1
- package/dist/context-engine/renderers/cursor.js +0 -158
- package/dist/context-engine/renderers/cursor.js.map +0 -1
- package/dist/context-engine/renderers/generic.d.ts +0 -3
- package/dist/context-engine/renderers/generic.d.ts.map +0 -1
- package/dist/context-engine/renderers/generic.js +0 -180
- package/dist/context-engine/renderers/generic.js.map +0 -1
- package/dist/coordination/index.d.ts +0 -69
- package/dist/coordination/index.d.ts.map +0 -1
- package/dist/coordination/index.js +0 -1110
- package/dist/coordination/index.js.map +0 -1
- package/dist/discovery/blast-radius.d.ts +0 -15
- package/dist/discovery/blast-radius.d.ts.map +0 -1
- package/dist/discovery/blast-radius.js +0 -160
- package/dist/discovery/blast-radius.js.map +0 -1
- package/dist/discovery/cache.d.ts +0 -38
- package/dist/discovery/cache.d.ts.map +0 -1
- package/dist/discovery/cache.js +0 -87
- package/dist/discovery/cache.js.map +0 -1
- package/dist/discovery/diff-compliance.d.ts +0 -19
- package/dist/discovery/diff-compliance.d.ts.map +0 -1
- package/dist/discovery/diff-compliance.js +0 -96
- package/dist/discovery/diff-compliance.js.map +0 -1
- package/dist/discovery/duplicate-detection.d.ts +0 -29
- package/dist/discovery/duplicate-detection.d.ts.map +0 -1
- package/dist/discovery/duplicate-detection.js +0 -133
- package/dist/discovery/duplicate-detection.js.map +0 -1
- package/dist/discovery/gap-analysis.d.ts +0 -16
- package/dist/discovery/gap-analysis.d.ts.map +0 -1
- package/dist/discovery/gap-analysis.js +0 -199
- package/dist/discovery/gap-analysis.js.map +0 -1
- package/dist/discovery/index.d.ts +0 -18
- package/dist/discovery/index.d.ts.map +0 -1
- package/dist/discovery/index.js +0 -565
- package/dist/discovery/index.js.map +0 -1
- package/dist/discovery/override.d.ts +0 -19
- package/dist/discovery/override.d.ts.map +0 -1
- package/dist/discovery/override.js +0 -113
- package/dist/discovery/override.js.map +0 -1
- package/dist/discovery/scoring.d.ts +0 -35
- package/dist/discovery/scoring.d.ts.map +0 -1
- package/dist/discovery/scoring.js +0 -194
- package/dist/discovery/scoring.js.map +0 -1
- package/dist/discovery/source-of-truth.d.ts +0 -17
- package/dist/discovery/source-of-truth.d.ts.map +0 -1
- package/dist/discovery/source-of-truth.js +0 -182
- package/dist/discovery/source-of-truth.js.map +0 -1
- package/dist/discovery/symbol-growth.d.ts +0 -20
- package/dist/discovery/symbol-growth.d.ts.map +0 -1
- package/dist/discovery/symbol-growth.js +0 -111
- package/dist/discovery/symbol-growth.js.map +0 -1
- package/dist/ecl/git-sync.d.ts +0 -53
- package/dist/ecl/git-sync.d.ts.map +0 -1
- package/dist/ecl/git-sync.js +0 -182
- package/dist/ecl/git-sync.js.map +0 -1
- package/dist/ecl/lifecycle.d.ts +0 -107
- package/dist/ecl/lifecycle.d.ts.map +0 -1
- package/dist/ecl/lifecycle.js +0 -264
- package/dist/ecl/lifecycle.js.map +0 -1
- package/dist/ecl/persistence.d.ts +0 -108
- package/dist/ecl/persistence.d.ts.map +0 -1
- package/dist/ecl/persistence.js +0 -362
- package/dist/ecl/persistence.js.map +0 -1
- package/dist/ecl/sync.d.ts +0 -43
- package/dist/ecl/sync.d.ts.map +0 -1
- package/dist/ecl/sync.js +0 -155
- package/dist/ecl/sync.js.map +0 -1
- package/dist/feedback/index.d.ts +0 -35
- package/dist/feedback/index.d.ts.map +0 -1
- package/dist/feedback/index.js +0 -81
- package/dist/feedback/index.js.map +0 -1
- package/dist/guardrails/adversarial-trigger.d.ts +0 -15
- package/dist/guardrails/adversarial-trigger.d.ts.map +0 -1
- package/dist/guardrails/adversarial-trigger.js +0 -86
- package/dist/guardrails/adversarial-trigger.js.map +0 -1
- package/dist/guardrails/export-collision.d.ts +0 -11
- package/dist/guardrails/export-collision.d.ts.map +0 -1
- package/dist/guardrails/export-collision.js +0 -141
- package/dist/guardrails/export-collision.js.map +0 -1
- package/dist/guardrails/index.d.ts +0 -24
- package/dist/guardrails/index.d.ts.map +0 -1
- package/dist/guardrails/index.js +0 -24
- package/dist/guardrails/index.js.map +0 -1
- package/dist/guardrails/release-tag.d.ts +0 -10
- package/dist/guardrails/release-tag.d.ts.map +0 -1
- package/dist/guardrails/release-tag.js +0 -99
- package/dist/guardrails/release-tag.js.map +0 -1
- package/dist/guardrails/rename-integrity.d.ts +0 -13
- package/dist/guardrails/rename-integrity.d.ts.map +0 -1
- package/dist/guardrails/rename-integrity.js +0 -111
- package/dist/guardrails/rename-integrity.js.map +0 -1
- package/dist/guardrails/runner.d.ts +0 -10
- package/dist/guardrails/runner.d.ts.map +0 -1
- package/dist/guardrails/runner.js +0 -36
- package/dist/guardrails/runner.js.map +0 -1
- package/dist/guardrails/stale-artifact.d.ts +0 -11
- package/dist/guardrails/stale-artifact.d.ts.map +0 -1
- package/dist/guardrails/stale-artifact.js +0 -69
- package/dist/guardrails/stale-artifact.js.map +0 -1
- package/dist/guardrails/unused-parameter.d.ts +0 -11
- package/dist/guardrails/unused-parameter.d.ts.map +0 -1
- package/dist/guardrails/unused-parameter.js +0 -105
- package/dist/guardrails/unused-parameter.js.map +0 -1
- package/dist/guardrails/workspace-validation.d.ts +0 -12
- package/dist/guardrails/workspace-validation.d.ts.map +0 -1
- package/dist/guardrails/workspace-validation.js +0 -92
- package/dist/guardrails/workspace-validation.js.map +0 -1
- package/dist/health/advisor.d.ts +0 -18
- package/dist/health/advisor.d.ts.map +0 -1
- package/dist/health/advisor.js +0 -174
- package/dist/health/advisor.js.map +0 -1
- package/dist/health/dashboard.d.ts +0 -96
- package/dist/health/dashboard.d.ts.map +0 -1
- package/dist/health/dashboard.js +0 -470
- package/dist/health/dashboard.js.map +0 -1
- package/dist/hooks/discovery-enforcement.d.ts +0 -9
- package/dist/hooks/discovery-enforcement.d.ts.map +0 -1
- package/dist/hooks/discovery-enforcement.js +0 -137
- package/dist/hooks/discovery-enforcement.js.map +0 -1
- package/dist/hooks/discovery-hook.d.ts +0 -22
- package/dist/hooks/discovery-hook.d.ts.map +0 -1
- package/dist/hooks/discovery-hook.js +0 -199
- package/dist/hooks/discovery-hook.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1499
- package/dist/index.js.map +0 -1
- package/dist/insight/emit.d.ts +0 -19
- package/dist/insight/emit.d.ts.map +0 -1
- package/dist/insight/emit.js +0 -107
- package/dist/insight/emit.js.map +0 -1
- package/dist/insight/engine-bridge.d.ts +0 -7
- package/dist/insight/engine-bridge.d.ts.map +0 -1
- package/dist/insight/engine-bridge.js +0 -6
- package/dist/insight/engine-bridge.js.map +0 -1
- package/dist/insight/index.d.ts +0 -3
- package/dist/insight/index.d.ts.map +0 -1
- package/dist/insight/index.js +0 -2
- package/dist/insight/index.js.map +0 -1
- package/dist/insight/telemetry.d.ts +0 -14
- package/dist/insight/telemetry.d.ts.map +0 -1
- package/dist/insight/telemetry.js +0 -87
- package/dist/insight/telemetry.js.map +0 -1
- package/dist/intake/candidate-paths/CandidatePathDetector.d.ts +0 -5
- package/dist/intake/candidate-paths/CandidatePathDetector.d.ts.map +0 -1
- package/dist/intake/candidate-paths/CandidatePathDetector.js +0 -173
- package/dist/intake/candidate-paths/CandidatePathDetector.js.map +0 -1
- package/dist/intake/candidate-paths/anchorRadiusExpansion.d.ts +0 -4
- package/dist/intake/candidate-paths/anchorRadiusExpansion.d.ts.map +0 -1
- package/dist/intake/candidate-paths/anchorRadiusExpansion.js +0 -66
- package/dist/intake/candidate-paths/anchorRadiusExpansion.js.map +0 -1
- package/dist/intake/candidate-paths/applyNegativeFiltering.d.ts +0 -4
- package/dist/intake/candidate-paths/applyNegativeFiltering.d.ts.map +0 -1
- package/dist/intake/candidate-paths/applyNegativeFiltering.js +0 -24
- package/dist/intake/candidate-paths/applyNegativeFiltering.js.map +0 -1
- package/dist/intake/candidate-paths/coCommitAnalyzer.d.ts +0 -3
- package/dist/intake/candidate-paths/coCommitAnalyzer.d.ts.map +0 -1
- package/dist/intake/candidate-paths/coCommitAnalyzer.js +0 -27
- package/dist/intake/candidate-paths/coCommitAnalyzer.js.map +0 -1
- package/dist/intake/candidate-paths/computeConfidence.d.ts +0 -3
- package/dist/intake/candidate-paths/computeConfidence.d.ts.map +0 -1
- package/dist/intake/candidate-paths/computeConfidence.js +0 -14
- package/dist/intake/candidate-paths/computeConfidence.js.map +0 -1
- package/dist/intake/candidate-paths/consolidateCandidates.d.ts +0 -5
- package/dist/intake/candidate-paths/consolidateCandidates.d.ts.map +0 -1
- package/dist/intake/candidate-paths/consolidateCandidates.js +0 -61
- package/dist/intake/candidate-paths/consolidateCandidates.js.map +0 -1
- package/dist/intake/candidate-paths/hierarchicalMatching.d.ts +0 -7
- package/dist/intake/candidate-paths/hierarchicalMatching.d.ts.map +0 -1
- package/dist/intake/candidate-paths/hierarchicalMatching.js +0 -46
- package/dist/intake/candidate-paths/hierarchicalMatching.js.map +0 -1
- package/dist/intake/candidate-paths/integration.d.ts +0 -7
- package/dist/intake/candidate-paths/integration.d.ts.map +0 -1
- package/dist/intake/candidate-paths/integration.js +0 -63
- package/dist/intake/candidate-paths/integration.js.map +0 -1
- package/dist/intake/candidate-paths/pathDetectionOverrides.d.ts +0 -3
- package/dist/intake/candidate-paths/pathDetectionOverrides.d.ts.map +0 -1
- package/dist/intake/candidate-paths/pathDetectionOverrides.js +0 -134
- package/dist/intake/candidate-paths/pathDetectionOverrides.js.map +0 -1
- package/dist/intake/candidate-paths/repoIndexAdapter.d.ts +0 -4
- package/dist/intake/candidate-paths/repoIndexAdapter.d.ts.map +0 -1
- package/dist/intake/candidate-paths/repoIndexAdapter.js +0 -99
- package/dist/intake/candidate-paths/repoIndexAdapter.js.map +0 -1
- package/dist/intake/candidate-paths/resolveExplicitTargets.d.ts +0 -8
- package/dist/intake/candidate-paths/resolveExplicitTargets.d.ts.map +0 -1
- package/dist/intake/candidate-paths/resolveExplicitTargets.js +0 -65
- package/dist/intake/candidate-paths/resolveExplicitTargets.js.map +0 -1
- package/dist/intake/candidate-paths/rules.d.ts +0 -13
- package/dist/intake/candidate-paths/rules.d.ts.map +0 -1
- package/dist/intake/candidate-paths/rules.js +0 -64
- package/dist/intake/candidate-paths/rules.js.map +0 -1
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.d.ts +0 -10
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.d.ts.map +0 -1
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.js +0 -73
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.js.map +0 -1
- package/dist/intake/candidate-paths/shapeEstimator.d.ts +0 -3
- package/dist/intake/candidate-paths/shapeEstimator.d.ts.map +0 -1
- package/dist/intake/candidate-paths/shapeEstimator.js +0 -17
- package/dist/intake/candidate-paths/shapeEstimator.js.map +0 -1
- package/dist/intake/candidate-paths/types.d.ts +0 -148
- package/dist/intake/candidate-paths/types.d.ts.map +0 -1
- package/dist/intake/candidate-paths/types.js +0 -2
- package/dist/intake/candidate-paths/types.js.map +0 -1
- package/dist/intake/task-classifier/TaskClassifier.d.ts +0 -5
- package/dist/intake/task-classifier/TaskClassifier.d.ts.map +0 -1
- package/dist/intake/task-classifier/TaskClassifier.js +0 -96
- package/dist/intake/task-classifier/TaskClassifier.js.map +0 -1
- package/dist/intake/task-classifier/applyOverrides.d.ts +0 -3
- package/dist/intake/task-classifier/applyOverrides.d.ts.map +0 -1
- package/dist/intake/task-classifier/applyOverrides.js +0 -55
- package/dist/intake/task-classifier/applyOverrides.js.map +0 -1
- package/dist/intake/task-classifier/computeConfidence.d.ts +0 -3
- package/dist/intake/task-classifier/computeConfidence.d.ts.map +0 -1
- package/dist/intake/task-classifier/computeConfidence.js +0 -13
- package/dist/intake/task-classifier/computeConfidence.js.map +0 -1
- package/dist/intake/task-classifier/deriveRiskAndComplexity.d.ts +0 -4
- package/dist/intake/task-classifier/deriveRiskAndComplexity.d.ts.map +0 -1
- package/dist/intake/task-classifier/deriveRiskAndComplexity.js +0 -24
- package/dist/intake/task-classifier/deriveRiskAndComplexity.js.map +0 -1
- package/dist/intake/task-classifier/deriveTags.d.ts +0 -3
- package/dist/intake/task-classifier/deriveTags.d.ts.map +0 -1
- package/dist/intake/task-classifier/deriveTags.js +0 -43
- package/dist/intake/task-classifier/deriveTags.js.map +0 -1
- package/dist/intake/task-classifier/index.d.ts +0 -6
- package/dist/intake/task-classifier/index.d.ts.map +0 -1
- package/dist/intake/task-classifier/index.js +0 -6
- package/dist/intake/task-classifier/index.js.map +0 -1
- package/dist/intake/task-classifier/mergeScores.d.ts +0 -4
- package/dist/intake/task-classifier/mergeScores.d.ts.map +0 -1
- package/dist/intake/task-classifier/mergeScores.js +0 -68
- package/dist/intake/task-classifier/mergeScores.js.map +0 -1
- package/dist/intake/task-classifier/pathMatching.d.ts +0 -3
- package/dist/intake/task-classifier/pathMatching.d.ts.map +0 -1
- package/dist/intake/task-classifier/pathMatching.js +0 -33
- package/dist/intake/task-classifier/pathMatching.js.map +0 -1
- package/dist/intake/task-classifier/rules.d.ts +0 -28
- package/dist/intake/task-classifier/rules.d.ts.map +0 -1
- package/dist/intake/task-classifier/rules.js +0 -138
- package/dist/intake/task-classifier/rules.js.map +0 -1
- package/dist/intake/task-classifier/scoreKeywords.d.ts +0 -5
- package/dist/intake/task-classifier/scoreKeywords.d.ts.map +0 -1
- package/dist/intake/task-classifier/scoreKeywords.js +0 -41
- package/dist/intake/task-classifier/scoreKeywords.js.map +0 -1
- package/dist/intake/task-classifier/scoreMetadata.d.ts +0 -3
- package/dist/intake/task-classifier/scoreMetadata.d.ts.map +0 -1
- package/dist/intake/task-classifier/scoreMetadata.js +0 -29
- package/dist/intake/task-classifier/scoreMetadata.js.map +0 -1
- package/dist/intake/task-classifier/scorePaths.d.ts +0 -3
- package/dist/intake/task-classifier/scorePaths.d.ts.map +0 -1
- package/dist/intake/task-classifier/scorePaths.js +0 -38
- package/dist/intake/task-classifier/scorePaths.js.map +0 -1
- package/dist/intake/task-classifier/types.d.ts +0 -51
- package/dist/intake/task-classifier/types.d.ts.map +0 -1
- package/dist/intake/task-classifier/types.js +0 -2
- package/dist/intake/task-classifier/types.js.map +0 -1
- package/dist/integrations/github-actions.d.ts +0 -17
- package/dist/integrations/github-actions.d.ts.map +0 -1
- package/dist/integrations/github-actions.js +0 -77
- package/dist/integrations/github-actions.js.map +0 -1
- package/dist/intent/extractor.d.ts +0 -15
- package/dist/intent/extractor.d.ts.map +0 -1
- package/dist/intent/extractor.js +0 -149
- package/dist/intent/extractor.js.map +0 -1
- package/dist/intent/fetcher.d.ts +0 -33
- package/dist/intent/fetcher.d.ts.map +0 -1
- package/dist/intent/fetcher.js +0 -364
- package/dist/intent/fetcher.js.map +0 -1
- package/dist/intent/loader.d.ts +0 -26
- package/dist/intent/loader.d.ts.map +0 -1
- package/dist/intent/loader.js +0 -80
- package/dist/intent/loader.js.map +0 -1
- package/dist/intent/types.d.ts +0 -33
- package/dist/intent/types.d.ts.map +0 -1
- package/dist/intent/types.js +0 -9
- package/dist/intent/types.js.map +0 -1
- package/dist/intervention/drift-velocity.d.ts +0 -19
- package/dist/intervention/drift-velocity.d.ts.map +0 -1
- package/dist/intervention/drift-velocity.js +0 -107
- package/dist/intervention/drift-velocity.js.map +0 -1
- package/dist/intervention/engine.d.ts +0 -43
- package/dist/intervention/engine.d.ts.map +0 -1
- package/dist/intervention/engine.js +0 -356
- package/dist/intervention/engine.js.map +0 -1
- package/dist/intervention/templates.d.ts +0 -23
- package/dist/intervention/templates.d.ts.map +0 -1
- package/dist/intervention/templates.js +0 -167
- package/dist/intervention/templates.js.map +0 -1
- package/dist/manifest/build.d.ts +0 -19
- package/dist/manifest/build.d.ts.map +0 -1
- package/dist/manifest/build.js +0 -82
- package/dist/manifest/build.js.map +0 -1
- package/dist/manifest/schema.d.ts +0 -2
- package/dist/manifest/schema.d.ts.map +0 -1
- package/dist/manifest/schema.js +0 -2
- package/dist/manifest/schema.js.map +0 -1
- package/dist/manifest/write.d.ts +0 -13
- package/dist/manifest/write.d.ts.map +0 -1
- package/dist/manifest/write.js +0 -69
- package/dist/manifest/write.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -20
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -271
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/skill-template.d.ts +0 -10
- package/dist/mcp/skill-template.d.ts.map +0 -1
- package/dist/mcp/skill-template.js +0 -75
- package/dist/mcp/skill-template.js.map +0 -1
- package/dist/memory/TaskClassifier.d.ts +0 -6
- package/dist/memory/TaskClassifier.d.ts.map +0 -1
- package/dist/memory/TaskClassifier.js +0 -344
- package/dist/memory/TaskClassifier.js.map +0 -1
- package/dist/memory/context-injection.d.ts +0 -12
- package/dist/memory/context-injection.d.ts.map +0 -1
- package/dist/memory/context-injection.js +0 -550
- package/dist/memory/context-injection.js.map +0 -1
- package/dist/memory/evidence-gates.d.ts +0 -32
- package/dist/memory/evidence-gates.d.ts.map +0 -1
- package/dist/memory/evidence-gates.js +0 -168
- package/dist/memory/evidence-gates.js.map +0 -1
- package/dist/memory/golden-patterns.d.ts +0 -68
- package/dist/memory/golden-patterns.d.ts.map +0 -1
- package/dist/memory/golden-patterns.js +0 -260
- package/dist/memory/golden-patterns.js.map +0 -1
- package/dist/memory/index.d.ts +0 -11
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js +0 -11
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/lessons.d.ts +0 -88
- package/dist/memory/lessons.d.ts.map +0 -1
- package/dist/memory/lessons.js +0 -370
- package/dist/memory/lessons.js.map +0 -1
- package/dist/memory/ontology.d.ts +0 -34
- package/dist/memory/ontology.d.ts.map +0 -1
- package/dist/memory/ontology.js +0 -125
- package/dist/memory/ontology.js.map +0 -1
- package/dist/memory/policy-artifacts.d.ts +0 -31
- package/dist/memory/policy-artifacts.d.ts.map +0 -1
- package/dist/memory/policy-artifacts.js +0 -618
- package/dist/memory/policy-artifacts.js.map +0 -1
- package/dist/memory/preamble.d.ts +0 -35
- package/dist/memory/preamble.d.ts.map +0 -1
- package/dist/memory/preamble.js +0 -114
- package/dist/memory/preamble.js.map +0 -1
- package/dist/memory/recent-truth.d.ts +0 -21
- package/dist/memory/recent-truth.d.ts.map +0 -1
- package/dist/memory/recent-truth.js +0 -78
- package/dist/memory/recent-truth.js.map +0 -1
- package/dist/memory/storage.d.ts +0 -28
- package/dist/memory/storage.d.ts.map +0 -1
- package/dist/memory/storage.js +0 -204
- package/dist/memory/storage.js.map +0 -1
- package/dist/memory/structural-trust.d.ts +0 -36
- package/dist/memory/structural-trust.d.ts.map +0 -1
- package/dist/memory/structural-trust.js +0 -77
- package/dist/memory/structural-trust.js.map +0 -1
- package/dist/memory/taskClassifierOverrides.d.ts +0 -3
- package/dist/memory/taskClassifierOverrides.d.ts.map +0 -1
- package/dist/memory/taskClassifierOverrides.js +0 -153
- package/dist/memory/taskClassifierOverrides.js.map +0 -1
- package/dist/memory/taskClassifierRules.d.ts +0 -15
- package/dist/memory/taskClassifierRules.d.ts.map +0 -1
- package/dist/memory/taskClassifierRules.js +0 -277
- package/dist/memory/taskClassifierRules.js.map +0 -1
- package/dist/memory/taskClassifierTypes.d.ts +0 -40
- package/dist/memory/taskClassifierTypes.d.ts.map +0 -1
- package/dist/memory/taskClassifierTypes.js +0 -2
- package/dist/memory/taskClassifierTypes.js.map +0 -1
- package/dist/memory/validation-ledger.d.ts +0 -28
- package/dist/memory/validation-ledger.d.ts.map +0 -1
- package/dist/memory/validation-ledger.js +0 -90
- package/dist/memory/validation-ledger.js.map +0 -1
- package/dist/merge-check/hallucination-guard.d.ts +0 -49
- package/dist/merge-check/hallucination-guard.d.ts.map +0 -1
- package/dist/merge-check/hallucination-guard.js +0 -228
- package/dist/merge-check/hallucination-guard.js.map +0 -1
- package/dist/merge-check/intent-registry.d.ts +0 -42
- package/dist/merge-check/intent-registry.d.ts.map +0 -1
- package/dist/merge-check/intent-registry.js +0 -154
- package/dist/merge-check/intent-registry.js.map +0 -1
- package/dist/merge-check/sentinel.d.ts +0 -60
- package/dist/merge-check/sentinel.d.ts.map +0 -1
- package/dist/merge-check/sentinel.js +0 -399
- package/dist/merge-check/sentinel.js.map +0 -1
- package/dist/narrative/contextNarrative.d.ts +0 -22
- package/dist/narrative/contextNarrative.d.ts.map +0 -1
- package/dist/narrative/contextNarrative.js +0 -259
- package/dist/narrative/contextNarrative.js.map +0 -1
- package/dist/onboarding.d.ts +0 -37
- package/dist/onboarding.d.ts.map +0 -1
- package/dist/onboarding.js +0 -112
- package/dist/onboarding.js.map +0 -1
- package/dist/open-shell.d.ts +0 -14
- package/dist/open-shell.d.ts.map +0 -1
- package/dist/open-shell.js +0 -191
- package/dist/open-shell.js.map +0 -1
- package/dist/policy/load.d.ts +0 -21
- package/dist/policy/load.d.ts.map +0 -1
- package/dist/policy/load.js +0 -63
- package/dist/policy/load.js.map +0 -1
- package/dist/policy/realtime.d.ts +0 -17
- package/dist/policy/realtime.d.ts.map +0 -1
- package/dist/policy/realtime.js +0 -108
- package/dist/policy/realtime.js.map +0 -1
- package/dist/policy/resolve.d.ts +0 -18
- package/dist/policy/resolve.d.ts.map +0 -1
- package/dist/policy/resolve.js +0 -86
- package/dist/policy/resolve.js.map +0 -1
- package/dist/policy/schema.d.ts +0 -22
- package/dist/policy/schema.d.ts.map +0 -1
- package/dist/policy/schema.js +0 -220
- package/dist/policy/schema.js.map +0 -1
- package/dist/pr-comment/renderer.d.ts +0 -3
- package/dist/pr-comment/renderer.d.ts.map +0 -1
- package/dist/pr-comment/renderer.js +0 -32
- package/dist/pr-comment/renderer.js.map +0 -1
- package/dist/pr-comment/templates.d.ts +0 -4
- package/dist/pr-comment/templates.d.ts.map +0 -1
- package/dist/pr-comment/templates.js +0 -9
- package/dist/pr-comment/templates.js.map +0 -1
- package/dist/pr-comment/types.d.ts +0 -13
- package/dist/pr-comment/types.d.ts.map +0 -1
- package/dist/pr-comment/types.js +0 -2
- package/dist/pr-comment/types.js.map +0 -1
- package/dist/pre-pr/checks.d.ts +0 -18
- package/dist/pre-pr/checks.d.ts.map +0 -1
- package/dist/pre-pr/checks.js +0 -440
- package/dist/pre-pr/checks.js.map +0 -1
- package/dist/pre-pr/orchestrator.d.ts +0 -30
- package/dist/pre-pr/orchestrator.d.ts.map +0 -1
- package/dist/pre-pr/orchestrator.js +0 -104
- package/dist/pre-pr/orchestrator.js.map +0 -1
- package/dist/project-config.d.ts +0 -38
- package/dist/project-config.d.ts.map +0 -1
- package/dist/project-config.js +0 -206
- package/dist/project-config.js.map +0 -1
- package/dist/prompt-coach/admission.d.ts +0 -31
- package/dist/prompt-coach/admission.d.ts.map +0 -1
- package/dist/prompt-coach/admission.js +0 -105
- package/dist/prompt-coach/admission.js.map +0 -1
- package/dist/prompt-coach/feedback.d.ts +0 -49
- package/dist/prompt-coach/feedback.d.ts.map +0 -1
- package/dist/prompt-coach/feedback.js +0 -177
- package/dist/prompt-coach/feedback.js.map +0 -1
- package/dist/prompt-coach/format.d.ts +0 -56
- package/dist/prompt-coach/format.d.ts.map +0 -1
- package/dist/prompt-coach/format.js +0 -190
- package/dist/prompt-coach/format.js.map +0 -1
- package/dist/prompt-coach/index.d.ts +0 -13
- package/dist/prompt-coach/index.d.ts.map +0 -1
- package/dist/prompt-coach/index.js +0 -13
- package/dist/prompt-coach/index.js.map +0 -1
- package/dist/prompt-coach/interactive.d.ts +0 -28
- package/dist/prompt-coach/interactive.d.ts.map +0 -1
- package/dist/prompt-coach/interactive.js +0 -118
- package/dist/prompt-coach/interactive.js.map +0 -1
- package/dist/prompt-coach/policy.d.ts +0 -67
- package/dist/prompt-coach/policy.d.ts.map +0 -1
- package/dist/prompt-coach/policy.js +0 -502
- package/dist/prompt-coach/policy.js.map +0 -1
- package/dist/prompt-coach/summary.d.ts +0 -56
- package/dist/prompt-coach/summary.d.ts.map +0 -1
- package/dist/prompt-coach/summary.js +0 -304
- package/dist/prompt-coach/summary.js.map +0 -1
- package/dist/protected-runtime/core.d.ts +0 -7
- package/dist/protected-runtime/core.d.ts.map +0 -1
- package/dist/protected-runtime/core.js +0 -24
- package/dist/protected-runtime/core.js.map +0 -1
- package/dist/protected-runtime/module-loader.d.ts +0 -9
- package/dist/protected-runtime/module-loader.d.ts.map +0 -1
- package/dist/protected-runtime/module-loader.js +0 -54
- package/dist/protected-runtime/module-loader.js.map +0 -1
- package/dist/protected-shell.d.ts +0 -2
- package/dist/protected-shell.d.ts.map +0 -1
- package/dist/protected-shell.js +0 -41
- package/dist/protected-shell.js.map +0 -1
- package/dist/release-check/engine.d.ts +0 -30
- package/dist/release-check/engine.d.ts.map +0 -1
- package/dist/release-check/engine.js +0 -726
- package/dist/release-check/engine.js.map +0 -1
- package/dist/release-check/index.d.ts +0 -16
- package/dist/release-check/index.d.ts.map +0 -1
- package/dist/release-check/index.js +0 -16
- package/dist/release-check/index.js.map +0 -1
- package/dist/release-check/output.d.ts +0 -7
- package/dist/release-check/output.d.ts.map +0 -1
- package/dist/release-check/output.js +0 -123
- package/dist/release-check/output.js.map +0 -1
- package/dist/release-truth.d.ts +0 -20
- package/dist/release-truth.d.ts.map +0 -1
- package/dist/release-truth.js +0 -114
- package/dist/release-truth.js.map +0 -1
- package/dist/review-intelligence/baseline.d.ts +0 -58
- package/dist/review-intelligence/baseline.d.ts.map +0 -1
- package/dist/review-intelligence/baseline.js +0 -99
- package/dist/review-intelligence/baseline.js.map +0 -1
- package/dist/review-intelligence/companion-check.d.ts +0 -28
- package/dist/review-intelligence/companion-check.d.ts.map +0 -1
- package/dist/review-intelligence/companion-check.js +0 -71
- package/dist/review-intelligence/companion-check.js.map +0 -1
- package/dist/review-intelligence/detectors/architecture-graph.d.ts +0 -18
- package/dist/review-intelligence/detectors/architecture-graph.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/architecture-graph.js +0 -73
- package/dist/review-intelligence/detectors/architecture-graph.js.map +0 -1
- package/dist/review-intelligence/detectors/cjs-named-import.d.ts +0 -13
- package/dist/review-intelligence/detectors/cjs-named-import.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/cjs-named-import.js +0 -134
- package/dist/review-intelligence/detectors/cjs-named-import.js.map +0 -1
- package/dist/review-intelligence/detectors/exact-count-assertion.d.ts +0 -17
- package/dist/review-intelligence/detectors/exact-count-assertion.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/exact-count-assertion.js +0 -93
- package/dist/review-intelligence/detectors/exact-count-assertion.js.map +0 -1
- package/dist/review-intelligence/detectors/exports-map-missing.d.ts +0 -14
- package/dist/review-intelligence/detectors/exports-map-missing.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/exports-map-missing.js +0 -131
- package/dist/review-intelligence/detectors/exports-map-missing.js.map +0 -1
- package/dist/review-intelligence/detectors/fixture-keyword-drift.d.ts +0 -12
- package/dist/review-intelligence/detectors/fixture-keyword-drift.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/fixture-keyword-drift.js +0 -82
- package/dist/review-intelligence/detectors/fixture-keyword-drift.js.map +0 -1
- package/dist/review-intelligence/detectors/optional-infra-crash.d.ts +0 -12
- package/dist/review-intelligence/detectors/optional-infra-crash.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/optional-infra-crash.js +0 -97
- package/dist/review-intelligence/detectors/optional-infra-crash.js.map +0 -1
- package/dist/review-intelligence/detectors/outbound-io.d.ts +0 -14
- package/dist/review-intelligence/detectors/outbound-io.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/outbound-io.js +0 -122
- package/dist/review-intelligence/detectors/outbound-io.js.map +0 -1
- package/dist/review-intelligence/detectors/pack-rules.d.ts +0 -16
- package/dist/review-intelligence/detectors/pack-rules.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/pack-rules.js +0 -107
- package/dist/review-intelligence/detectors/pack-rules.js.map +0 -1
- package/dist/review-intelligence/detectors/platform-helpers.d.ts +0 -15
- package/dist/review-intelligence/detectors/platform-helpers.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/platform-helpers.js +0 -171
- package/dist/review-intelligence/detectors/platform-helpers.js.map +0 -1
- package/dist/review-intelligence/detectors/runtime-validation.d.ts +0 -10
- package/dist/review-intelligence/detectors/runtime-validation.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/runtime-validation.js +0 -109
- package/dist/review-intelligence/detectors/runtime-validation.js.map +0 -1
- package/dist/review-intelligence/detectors/undeclared-dependency.d.ts +0 -11
- package/dist/review-intelligence/detectors/undeclared-dependency.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/undeclared-dependency.js +0 -100
- package/dist/review-intelligence/detectors/undeclared-dependency.js.map +0 -1
- package/dist/review-intelligence/engine/ast-parser.d.ts +0 -90
- package/dist/review-intelligence/engine/ast-parser.d.ts.map +0 -1
- package/dist/review-intelligence/engine/ast-parser.js +0 -266
- package/dist/review-intelligence/engine/ast-parser.js.map +0 -1
- package/dist/review-intelligence/engine/dataflow.d.ts +0 -34
- package/dist/review-intelligence/engine/dataflow.d.ts.map +0 -1
- package/dist/review-intelligence/engine/dataflow.js +0 -115
- package/dist/review-intelligence/engine/dataflow.js.map +0 -1
- package/dist/review-intelligence/engine/index.d.ts +0 -7
- package/dist/review-intelligence/engine/index.d.ts.map +0 -1
- package/dist/review-intelligence/engine/index.js +0 -7
- package/dist/review-intelligence/engine/index.js.map +0 -1
- package/dist/review-intelligence/engine/symbol-resolver.d.ts +0 -34
- package/dist/review-intelligence/engine/symbol-resolver.d.ts.map +0 -1
- package/dist/review-intelligence/engine/symbol-resolver.js +0 -106
- package/dist/review-intelligence/engine/symbol-resolver.js.map +0 -1
- package/dist/review-intelligence/fingerprint.d.ts +0 -15
- package/dist/review-intelligence/fingerprint.d.ts.map +0 -1
- package/dist/review-intelligence/fingerprint.js +0 -29
- package/dist/review-intelligence/fingerprint.js.map +0 -1
- package/dist/review-intelligence/fixes/index.d.ts +0 -54
- package/dist/review-intelligence/fixes/index.d.ts.map +0 -1
- package/dist/review-intelligence/fixes/index.js +0 -346
- package/dist/review-intelligence/fixes/index.js.map +0 -1
- package/dist/review-intelligence/index.d.ts +0 -24
- package/dist/review-intelligence/index.d.ts.map +0 -1
- package/dist/review-intelligence/index.js +0 -155
- package/dist/review-intelligence/index.js.map +0 -1
- package/dist/review-intelligence/invariants.d.ts +0 -25
- package/dist/review-intelligence/invariants.d.ts.map +0 -1
- package/dist/review-intelligence/invariants.js +0 -73
- package/dist/review-intelligence/invariants.js.map +0 -1
- package/dist/review-intelligence/learning/index.d.ts +0 -39
- package/dist/review-intelligence/learning/index.d.ts.map +0 -1
- package/dist/review-intelligence/learning/index.js +0 -265
- package/dist/review-intelligence/learning/index.js.map +0 -1
- package/dist/review-intelligence/output.d.ts +0 -31
- package/dist/review-intelligence/output.d.ts.map +0 -1
- package/dist/review-intelligence/output.js +0 -224
- package/dist/review-intelligence/output.js.map +0 -1
- package/dist/review-intelligence/packs/index.d.ts +0 -69
- package/dist/review-intelligence/packs/index.d.ts.map +0 -1
- package/dist/review-intelligence/packs/index.js +0 -168
- package/dist/review-intelligence/packs/index.js.map +0 -1
- package/dist/review-intelligence/repair-guidance.d.ts +0 -11
- package/dist/review-intelligence/repair-guidance.d.ts.map +0 -1
- package/dist/review-intelligence/repair-guidance.js +0 -137
- package/dist/review-intelligence/repair-guidance.js.map +0 -1
- package/dist/review-intelligence/severity.d.ts +0 -10
- package/dist/review-intelligence/severity.d.ts.map +0 -1
- package/dist/review-intelligence/severity.js +0 -36
- package/dist/review-intelligence/severity.js.map +0 -1
- package/dist/review-intelligence/standards-discovery.d.ts +0 -12
- package/dist/review-intelligence/standards-discovery.d.ts.map +0 -1
- package/dist/review-intelligence/standards-discovery.js +0 -221
- package/dist/review-intelligence/standards-discovery.js.map +0 -1
- package/dist/review-intelligence/suppressions.d.ts +0 -53
- package/dist/review-intelligence/suppressions.d.ts.map +0 -1
- package/dist/review-intelligence/suppressions.js +0 -86
- package/dist/review-intelligence/suppressions.js.map +0 -1
- package/dist/review-intelligence/triggers.d.ts +0 -15
- package/dist/review-intelligence/triggers.d.ts.map +0 -1
- package/dist/review-intelligence/triggers.js +0 -104
- package/dist/review-intelligence/triggers.js.map +0 -1
- package/dist/review-intelligence/types.d.ts +0 -186
- package/dist/review-intelligence/types.d.ts.map +0 -1
- package/dist/review-intelligence/types.js +0 -11
- package/dist/review-intelligence/types.js.map +0 -1
- package/dist/risk-detection/heuristics.d.ts +0 -13
- package/dist/risk-detection/heuristics.d.ts.map +0 -1
- package/dist/risk-detection/heuristics.js +0 -348
- package/dist/risk-detection/heuristics.js.map +0 -1
- package/dist/risk-detection/index.d.ts +0 -20
- package/dist/risk-detection/index.d.ts.map +0 -1
- package/dist/risk-detection/index.js +0 -128
- package/dist/risk-detection/index.js.map +0 -1
- package/dist/security/export-sanitizer.d.ts +0 -76
- package/dist/security/export-sanitizer.d.ts.map +0 -1
- package/dist/security/export-sanitizer.js +0 -176
- package/dist/security/export-sanitizer.js.map +0 -1
- package/dist/security/path-summary.d.ts +0 -4
- package/dist/security/path-summary.d.ts.map +0 -1
- package/dist/security/path-summary.js +0 -94
- package/dist/security/path-summary.js.map +0 -1
- package/dist/session-id.d.ts +0 -22
- package/dist/session-id.d.ts.map +0 -1
- package/dist/session-id.js +0 -49
- package/dist/session-id.js.map +0 -1
- package/dist/session-paths.d.ts +0 -35
- package/dist/session-paths.d.ts.map +0 -1
- package/dist/session-paths.js +0 -68
- package/dist/session-paths.js.map +0 -1
- package/dist/session-registry.d.ts +0 -19
- package/dist/session-registry.d.ts.map +0 -1
- package/dist/session-registry.js +0 -182
- package/dist/session-registry.js.map +0 -1
- package/dist/session-timeline.d.ts +0 -13
- package/dist/session-timeline.d.ts.map +0 -1
- package/dist/session-timeline.js +0 -134
- package/dist/session-timeline.js.map +0 -1
- package/dist/signing/canonicalize.d.ts +0 -17
- package/dist/signing/canonicalize.d.ts.map +0 -1
- package/dist/signing/canonicalize.js +0 -50
- package/dist/signing/canonicalize.js.map +0 -1
- package/dist/signing/hmac.d.ts +0 -8
- package/dist/signing/hmac.d.ts.map +0 -1
- package/dist/signing/hmac.js +0 -16
- package/dist/signing/hmac.js.map +0 -1
- package/dist/signing/signer.d.ts +0 -16
- package/dist/signing/signer.d.ts.map +0 -1
- package/dist/signing/signer.js +0 -2
- package/dist/signing/signer.js.map +0 -1
- package/dist/templates/claude-md.d.ts +0 -12
- package/dist/templates/claude-md.d.ts.map +0 -1
- package/dist/templates/claude-md.js +0 -113
- package/dist/templates/claude-md.js.map +0 -1
- package/dist/templates/config.d.ts +0 -3
- package/dist/templates/config.d.ts.map +0 -1
- package/dist/templates/config.js +0 -154
- package/dist/templates/config.js.map +0 -1
- package/dist/templates/harness-pack.d.ts +0 -3
- package/dist/templates/harness-pack.d.ts.map +0 -1
- package/dist/templates/harness-pack.js +0 -26
- package/dist/templates/harness-pack.js.map +0 -1
- package/dist/templates/hooks.d.ts +0 -36
- package/dist/templates/hooks.d.ts.map +0 -1
- package/dist/templates/hooks.js +0 -278
- package/dist/templates/hooks.js.map +0 -1
- package/dist/templates/runtime-resolution.d.ts +0 -4
- package/dist/templates/runtime-resolution.d.ts.map +0 -1
- package/dist/templates/runtime-resolution.js +0 -76
- package/dist/templates/runtime-resolution.js.map +0 -1
- package/dist/templates/scenarios.d.ts +0 -3
- package/dist/templates/scenarios.d.ts.map +0 -1
- package/dist/templates/scenarios.js +0 -335
- package/dist/templates/scenarios.js.map +0 -1
- package/dist/utils/two-loop.d.ts +0 -36
- package/dist/utils/two-loop.d.ts.map +0 -1
- package/dist/utils/two-loop.js +0 -75
- package/dist/utils/two-loop.js.map +0 -1
- package/dist/utils/upgrade-nudge.d.ts +0 -18
- package/dist/utils/upgrade-nudge.d.ts.map +0 -1
- package/dist/utils/upgrade-nudge.js +0 -57
- package/dist/utils/upgrade-nudge.js.map +0 -1
- package/dist/verify/evaluate.d.ts +0 -10
- package/dist/verify/evaluate.d.ts.map +0 -1
- package/dist/verify/evaluate.js +0 -117
- package/dist/verify/evaluate.js.map +0 -1
- package/dist/verify/insertion-point-lock.d.ts +0 -12
- package/dist/verify/insertion-point-lock.d.ts.map +0 -1
- package/dist/verify/insertion-point-lock.js +0 -208
- package/dist/verify/insertion-point-lock.js.map +0 -1
- package/dist/verify/policy-snapshot.d.ts +0 -7
- package/dist/verify/policy-snapshot.d.ts.map +0 -1
- package/dist/verify/policy-snapshot.js +0 -36
- package/dist/verify/policy-snapshot.js.map +0 -1
- package/dist/verify/report.d.ts +0 -11
- package/dist/verify/report.d.ts.map +0 -1
- package/dist/verify/report.js +0 -64
- package/dist/verify/report.js.map +0 -1
- package/dist/verify/symbol-growth.d.ts +0 -13
- package/dist/verify/symbol-growth.d.ts.map +0 -1
- package/dist/verify/symbol-growth.js +0 -143
- package/dist/verify/symbol-growth.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -11
- package/dist/version.js.map +0 -1
package/dist/commands/serve.js
DELETED
|
@@ -1,904 +0,0 @@
|
|
|
1
|
-
import { createServer } from 'node:http';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { runBundle } from './bundle.js';
|
|
5
|
-
import { runVerify } from './verify.js';
|
|
6
|
-
import { runDrift } from './drift.js';
|
|
7
|
-
import { runHarvest } from './harvest.js';
|
|
8
|
-
import { runOutcome } from './outcome.js';
|
|
9
|
-
import { runRealityCheck } from './reality-check.js';
|
|
10
|
-
import { runSnapshot } from './snapshot.js';
|
|
11
|
-
import { runTimeTravel } from './time-travel.js';
|
|
12
|
-
import { runContextHandoff } from './context-handoff.js';
|
|
13
|
-
import { resolveBrokerCurrent, resolveBrokerRefresh, resolveBrokerTimeline } from './broker.js';
|
|
14
|
-
import { buildDashboard } from '../health/dashboard.js';
|
|
15
|
-
import { runInterventionEngine } from '../intervention/engine.js';
|
|
16
|
-
import { loadMemory, memoryExists } from '../memory/storage.js';
|
|
17
|
-
import { abstractPathSummary, summarizePath } from '../security/path-summary.js';
|
|
18
|
-
/**
|
|
19
|
-
* `codeledger serve [--port 7400]`
|
|
20
|
-
*
|
|
21
|
-
* Lightweight HTTP server for programmatic access to CodeLedger.
|
|
22
|
-
* Uses node:http — zero external dependencies.
|
|
23
|
-
*
|
|
24
|
-
* Endpoints:
|
|
25
|
-
* GET /health → { status: "ok", version: "..." }
|
|
26
|
-
* POST /verify → JSON verify result (body: { task, flags? })
|
|
27
|
-
* POST /bundle → JSON bundle result (body: { task, flags? })
|
|
28
|
-
* GET /drift → JSON drift projection
|
|
29
|
-
* GET /outcome → JSON outcome memory
|
|
30
|
-
* POST /harvest → JSON context assetization
|
|
31
|
-
* POST /context-handoff → JSON agent handoff
|
|
32
|
-
* POST /snapshot → JSON daemon snapshot descriptor
|
|
33
|
-
* POST /time-travel → JSON replay state
|
|
34
|
-
* GET /reality-check → JSON reconciled truth state
|
|
35
|
-
* GET /metrics → team-metrics JSON (if team-ledger exists)
|
|
36
|
-
* GET /provenance → provenance graph JSON
|
|
37
|
-
* GET /policy → policy evaluation results
|
|
38
|
-
* GET /architecture-health/overview → AHS + all top-level metrics + trends + grade
|
|
39
|
-
* GET /architecture-health/hotspots → ranked zones/systems by severity
|
|
40
|
-
* GET /architecture-health/source-of-truth → per-system SoT stability
|
|
41
|
-
* GET /architecture-health/overrides → override audit list
|
|
42
|
-
* GET /architecture-health/drift → time-series of discovery classifications
|
|
43
|
-
* GET /architecture-health/recommendations → intervention engine output
|
|
44
|
-
* GET /architecture-health/zone/:id → drill-down per zone/system
|
|
45
|
-
*/
|
|
46
|
-
export async function runServe(cwd, flags) {
|
|
47
|
-
if (flags['help'] === 'true') {
|
|
48
|
-
printServeHelp();
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const port = parseInt(flags['port'] ?? '7400', 10);
|
|
52
|
-
const host = flags['host'] ?? '127.0.0.1';
|
|
53
|
-
if (isNaN(port) || port < 1 || port > 65535) {
|
|
54
|
-
console.error(`Invalid --port "${flags['port']}". Must be a number between 1 and 65535.`);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
|
-
const handler = createServeHandler(cwd);
|
|
58
|
-
const maxRetries = 4;
|
|
59
|
-
function tryListen(attempt, tryPort) {
|
|
60
|
-
const server = createServer(handler);
|
|
61
|
-
server.on('error', (err) => {
|
|
62
|
-
if (err.code === 'EADDRINUSE' && attempt < maxRetries) {
|
|
63
|
-
const nextPort = tryPort + 1;
|
|
64
|
-
console.warn(`Port ${tryPort} is in use, trying ${nextPort}...`);
|
|
65
|
-
server.close();
|
|
66
|
-
tryListen(attempt + 1, nextPort);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
console.error(`Failed to start server: ${err.message}`);
|
|
70
|
-
process.exit(1);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
server.listen({ port: tryPort, host }, () => {
|
|
74
|
-
if (tryPort !== port) {
|
|
75
|
-
console.log(`(Requested port ${port} was in use)`);
|
|
76
|
-
}
|
|
77
|
-
printListening(tryPort);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
tryListen(0, port);
|
|
81
|
-
}
|
|
82
|
-
function printListening(port) {
|
|
83
|
-
console.log(`CodeLedger API server listening on port ${port}`);
|
|
84
|
-
console.log('');
|
|
85
|
-
console.log('Endpoints:');
|
|
86
|
-
console.log(` GET http://localhost:${port}/health`);
|
|
87
|
-
console.log(` POST http://localhost:${port}/verify { "task": "..." }`);
|
|
88
|
-
console.log(` POST http://localhost:${port}/bundle { "task": "..." }`);
|
|
89
|
-
console.log(` GET http://localhost:${port}/drift`);
|
|
90
|
-
console.log(` GET http://localhost:${port}/outcome`);
|
|
91
|
-
console.log(` POST http://localhost:${port}/harvest { "apply?": true }`);
|
|
92
|
-
console.log(` POST http://localhost:${port}/context-handoff { "target": "codex" }`);
|
|
93
|
-
console.log(` POST http://localhost:${port}/snapshot`);
|
|
94
|
-
console.log(` POST http://localhost:${port}/time-travel { "to?": "snapshot-id" }`);
|
|
95
|
-
console.log(` GET http://localhost:${port}/reality-check`);
|
|
96
|
-
console.log(` GET http://localhost:${port}/metrics`);
|
|
97
|
-
console.log(` GET http://localhost:${port}/provenance`);
|
|
98
|
-
console.log(` GET http://localhost:${port}/policy`);
|
|
99
|
-
console.log(` GET http://localhost:${port}/architecture-health/overview`);
|
|
100
|
-
console.log(` GET http://localhost:${port}/architecture-health/hotspots`);
|
|
101
|
-
console.log(` GET http://localhost:${port}/architecture-health/source-of-truth`);
|
|
102
|
-
console.log(` GET http://localhost:${port}/architecture-health/overrides`);
|
|
103
|
-
console.log(` GET http://localhost:${port}/architecture-health/drift`);
|
|
104
|
-
console.log(` GET http://localhost:${port}/architecture-health/recommendations`);
|
|
105
|
-
console.log(` GET http://localhost:${port}/architecture-health/zone/:id`);
|
|
106
|
-
console.log(` POST http://localhost:${port}/broker/resolve { "task": "..." }`);
|
|
107
|
-
console.log(` POST http://localhost:${port}/broker/validation { "target": "..." }`);
|
|
108
|
-
console.log(` POST http://localhost:${port}/broker/neighborhood { "target": "..." }`);
|
|
109
|
-
console.log(` POST http://localhost:${port}/broker/evidence { "findingType": "...", "target?": "..." }`);
|
|
110
|
-
console.log(` POST http://localhost:${port}/broker/completion { "taskId?": "..." }`);
|
|
111
|
-
console.log(` POST http://localhost:${port}/broker/preamble { "task": "..." }`);
|
|
112
|
-
console.log(` POST http://localhost:${port}/broker/refresh { "task": "...", "session?": "..." }`);
|
|
113
|
-
console.log(` GET http://localhost:${port}/broker/timeline?limit=10`);
|
|
114
|
-
console.log(` GET http://localhost:${port}/broker/current?limit=10`);
|
|
115
|
-
console.log('');
|
|
116
|
-
console.log('Press Ctrl+C to stop.');
|
|
117
|
-
}
|
|
118
|
-
function printServeHelp() {
|
|
119
|
-
console.log('Usage:');
|
|
120
|
-
console.log(' codeledger serve [--port 7400] [--host 127.0.0.1]');
|
|
121
|
-
console.log('');
|
|
122
|
-
console.log('Endpoints:');
|
|
123
|
-
console.log(' GET /health');
|
|
124
|
-
console.log(' POST /verify');
|
|
125
|
-
console.log(' POST /bundle');
|
|
126
|
-
console.log(' GET /drift');
|
|
127
|
-
console.log(' GET /outcome');
|
|
128
|
-
console.log(' POST /harvest');
|
|
129
|
-
console.log(' POST /context-handoff');
|
|
130
|
-
console.log(' POST /snapshot');
|
|
131
|
-
console.log(' POST /time-travel');
|
|
132
|
-
console.log(' GET /reality-check');
|
|
133
|
-
console.log(' GET /metrics');
|
|
134
|
-
console.log(' GET /provenance');
|
|
135
|
-
console.log(' GET /policy');
|
|
136
|
-
console.log(' GET /architecture-health/*');
|
|
137
|
-
console.log(' POST /broker/resolve | /broker/validation | /broker/neighborhood');
|
|
138
|
-
console.log(' POST /broker/evidence | /broker/completion | /broker/preamble | /broker/refresh');
|
|
139
|
-
console.log(' GET /broker/timeline | /broker/current');
|
|
140
|
-
}
|
|
141
|
-
export function createServeHandler(cwd) {
|
|
142
|
-
return async (req, res) => {
|
|
143
|
-
// CORS headers for cross-origin access
|
|
144
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
145
|
-
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
|
146
|
-
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
147
|
-
if (req.method === 'OPTIONS') {
|
|
148
|
-
res.writeHead(204);
|
|
149
|
-
res.end();
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
const parsedUrl = new URL(req.url ?? '/', 'http://localhost');
|
|
153
|
-
const url = parsedUrl.pathname;
|
|
154
|
-
const responseContext = resolveResponseContext(parsedUrl.searchParams);
|
|
155
|
-
try {
|
|
156
|
-
if (url === '/health' && req.method === 'GET') {
|
|
157
|
-
await handleHealth(res);
|
|
158
|
-
}
|
|
159
|
-
else if (url === '/verify' && req.method === 'POST') {
|
|
160
|
-
await handleVerify(req, res, cwd);
|
|
161
|
-
}
|
|
162
|
-
else if (url === '/bundle' && req.method === 'POST') {
|
|
163
|
-
await handleBundle(req, res, cwd);
|
|
164
|
-
}
|
|
165
|
-
else if (url === '/drift' && req.method === 'GET') {
|
|
166
|
-
await handleDrift(res, cwd);
|
|
167
|
-
}
|
|
168
|
-
else if (url === '/outcome' && req.method === 'GET') {
|
|
169
|
-
await handleOutcome(req, res, cwd);
|
|
170
|
-
}
|
|
171
|
-
else if (url === '/harvest' && req.method === 'POST') {
|
|
172
|
-
await handleHarvest(req, res, cwd);
|
|
173
|
-
}
|
|
174
|
-
else if (url === '/context-handoff' && req.method === 'POST') {
|
|
175
|
-
await handleContextHandoff(req, res, cwd);
|
|
176
|
-
}
|
|
177
|
-
else if (url === '/snapshot' && req.method === 'POST') {
|
|
178
|
-
await handleSnapshot(res, cwd);
|
|
179
|
-
}
|
|
180
|
-
else if (url === '/time-travel' && req.method === 'POST') {
|
|
181
|
-
await handleTimeTravel(req, res, cwd);
|
|
182
|
-
}
|
|
183
|
-
else if (url === '/reality-check' && req.method === 'GET') {
|
|
184
|
-
await handleRealityCheck(res, cwd);
|
|
185
|
-
}
|
|
186
|
-
else if (url === '/metrics' && req.method === 'GET') {
|
|
187
|
-
await handleMetrics(res, cwd);
|
|
188
|
-
}
|
|
189
|
-
else if (url === '/provenance' && req.method === 'GET') {
|
|
190
|
-
await handleProvenance(res, cwd, responseContext);
|
|
191
|
-
}
|
|
192
|
-
else if (url === '/policy' && req.method === 'GET') {
|
|
193
|
-
await handlePolicy(res, cwd, responseContext);
|
|
194
|
-
}
|
|
195
|
-
else if (url === '/architecture-health/overview' && req.method === 'GET') {
|
|
196
|
-
await handleArchHealthOverview(res, cwd);
|
|
197
|
-
}
|
|
198
|
-
else if (url === '/architecture-health/hotspots' && req.method === 'GET') {
|
|
199
|
-
await handleArchHealthHotspots(res, cwd, responseContext);
|
|
200
|
-
}
|
|
201
|
-
else if (url === '/architecture-health/source-of-truth' && req.method === 'GET') {
|
|
202
|
-
await handleArchHealthSourceOfTruth(res, cwd, responseContext);
|
|
203
|
-
}
|
|
204
|
-
else if (url === '/architecture-health/overrides' && req.method === 'GET') {
|
|
205
|
-
await handleArchHealthOverrides(res, cwd, responseContext);
|
|
206
|
-
}
|
|
207
|
-
else if (url === '/architecture-health/drift' && req.method === 'GET') {
|
|
208
|
-
await handleArchHealthDrift(res, cwd);
|
|
209
|
-
}
|
|
210
|
-
else if (url === '/architecture-health/recommendations' && req.method === 'GET') {
|
|
211
|
-
await handleArchHealthRecommendations(res, cwd);
|
|
212
|
-
}
|
|
213
|
-
else if (url.startsWith('/architecture-health/zone/') && req.method === 'GET') {
|
|
214
|
-
const zoneId = decodeURIComponent(url.slice('/architecture-health/zone/'.length));
|
|
215
|
-
await handleArchHealthZone(res, cwd, zoneId, responseContext);
|
|
216
|
-
}
|
|
217
|
-
else if (url === '/broker/resolve' && req.method === 'POST') {
|
|
218
|
-
await handleBrokerResolve(req, res, cwd);
|
|
219
|
-
}
|
|
220
|
-
else if (url === '/broker/validation' && req.method === 'POST') {
|
|
221
|
-
await handleBrokerValidation(req, res, cwd);
|
|
222
|
-
}
|
|
223
|
-
else if (url === '/broker/neighborhood' && req.method === 'POST') {
|
|
224
|
-
await handleBrokerNeighborhood(req, res, cwd);
|
|
225
|
-
}
|
|
226
|
-
else if (url === '/broker/evidence' && req.method === 'POST') {
|
|
227
|
-
await handleBrokerEvidence(req, res, cwd);
|
|
228
|
-
}
|
|
229
|
-
else if (url === '/broker/completion' && req.method === 'POST') {
|
|
230
|
-
await handleBrokerCompletion(req, res, cwd);
|
|
231
|
-
}
|
|
232
|
-
else if (url === '/broker/preamble' && req.method === 'POST') {
|
|
233
|
-
await handleBrokerPreamble(req, res, cwd);
|
|
234
|
-
}
|
|
235
|
-
else if (url === '/broker/refresh' && req.method === 'POST') {
|
|
236
|
-
await handleBrokerRefresh(req, res, cwd);
|
|
237
|
-
}
|
|
238
|
-
else if (url === '/broker/timeline' && req.method === 'GET') {
|
|
239
|
-
await handleBrokerTimeline(req, res, cwd);
|
|
240
|
-
}
|
|
241
|
-
else if (url === '/broker/current' && req.method === 'GET') {
|
|
242
|
-
await handleBrokerCurrent(req, res, cwd);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
sendJson(res, 404, {
|
|
246
|
-
error: 'Not found',
|
|
247
|
-
endpoints: [
|
|
248
|
-
'/health', '/verify', '/bundle', '/metrics', '/provenance', '/policy',
|
|
249
|
-
'/drift', '/outcome', '/harvest', '/context-handoff', '/snapshot', '/time-travel', '/reality-check',
|
|
250
|
-
'/architecture-health/overview', '/architecture-health/hotspots',
|
|
251
|
-
'/architecture-health/source-of-truth', '/architecture-health/overrides',
|
|
252
|
-
'/architecture-health/drift', '/architecture-health/recommendations',
|
|
253
|
-
'/architecture-health/zone/:id',
|
|
254
|
-
'/broker/resolve', '/broker/validation', '/broker/neighborhood',
|
|
255
|
-
'/broker/evidence', '/broker/completion', '/broker/preamble', '/broker/refresh', '/broker/timeline', '/broker/current',
|
|
256
|
-
],
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
catch (err) {
|
|
261
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
262
|
-
sendJson(res, 500, { error: 'Internal server error', message });
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
// ─── Handlers ─────────────────────────────────────────────────────────────────
|
|
267
|
-
async function handleHealth(res) {
|
|
268
|
-
let version = 'unknown';
|
|
269
|
-
try {
|
|
270
|
-
const { CLI_VERSION } = await import('../version.js');
|
|
271
|
-
version = CLI_VERSION;
|
|
272
|
-
}
|
|
273
|
-
catch {
|
|
274
|
-
// version file may not exist in all environments
|
|
275
|
-
}
|
|
276
|
-
sendJson(res, 200, {
|
|
277
|
-
status: 'ok',
|
|
278
|
-
version,
|
|
279
|
-
timestamp: new Date().toISOString(),
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
async function handleVerify(req, res, cwd) {
|
|
283
|
-
const body = await readBody(req);
|
|
284
|
-
if (!body.task) {
|
|
285
|
-
sendJson(res, 400, { error: 'Missing required field: task' });
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
const verifyFlags = {
|
|
289
|
-
task: String(body.task),
|
|
290
|
-
json: 'true',
|
|
291
|
-
...(body.flags ?? {}),
|
|
292
|
-
};
|
|
293
|
-
// Capture stdout to return as JSON
|
|
294
|
-
const result = await captureOutput(() => runVerify(cwd, verifyFlags));
|
|
295
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
296
|
-
}
|
|
297
|
-
async function handleBundle(req, res, cwd) {
|
|
298
|
-
const body = await readBody(req);
|
|
299
|
-
if (!body.task) {
|
|
300
|
-
sendJson(res, 400, { error: 'Missing required field: task' });
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const bundleFlags = {
|
|
304
|
-
task: String(body.task),
|
|
305
|
-
json: 'true',
|
|
306
|
-
...(body.flags ?? {}),
|
|
307
|
-
};
|
|
308
|
-
const result = await captureOutput(() => runBundle(cwd, bundleFlags));
|
|
309
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
310
|
-
}
|
|
311
|
-
async function handleDrift(res, cwd) {
|
|
312
|
-
const result = await captureOutput(() => runDrift(cwd, { json: 'true' }));
|
|
313
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
314
|
-
}
|
|
315
|
-
async function handleOutcome(req, res, cwd) {
|
|
316
|
-
const body = await readBody(req);
|
|
317
|
-
const result = await captureOutput(() => runOutcome(cwd, {
|
|
318
|
-
json: 'true',
|
|
319
|
-
...(body.pattern ? { pattern: String(body.pattern) } : {}),
|
|
320
|
-
}));
|
|
321
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
322
|
-
}
|
|
323
|
-
async function handleHarvest(req, res, cwd) {
|
|
324
|
-
const body = await readBody(req);
|
|
325
|
-
const result = await captureOutput(() => runHarvest(cwd, {
|
|
326
|
-
json: 'true',
|
|
327
|
-
...(body.apply ? { apply: 'true' } : {}),
|
|
328
|
-
...(body.preview !== false ? { preview: 'true' } : {}),
|
|
329
|
-
}));
|
|
330
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
331
|
-
}
|
|
332
|
-
async function handleContextHandoff(req, res, cwd) {
|
|
333
|
-
const body = await readBody(req);
|
|
334
|
-
if (!body.target) {
|
|
335
|
-
sendJson(res, 400, { error: 'Missing required field: target' });
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const result = await captureOutput(() => runContextHandoff(cwd, {
|
|
339
|
-
json: 'true',
|
|
340
|
-
target: String(body.target),
|
|
341
|
-
...(body.verifyIntegrity ? { 'verify-integrity': 'true' } : {}),
|
|
342
|
-
}));
|
|
343
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
344
|
-
}
|
|
345
|
-
async function handleSnapshot(res, cwd) {
|
|
346
|
-
const result = await captureOutput(() => runSnapshot(cwd, { json: 'true' }));
|
|
347
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
348
|
-
}
|
|
349
|
-
async function handleTimeTravel(req, res, cwd) {
|
|
350
|
-
const body = await readBody(req);
|
|
351
|
-
const result = await captureOutput(() => runTimeTravel(cwd, {
|
|
352
|
-
json: 'true',
|
|
353
|
-
...(body.to ? { to: String(body.to) } : {}),
|
|
354
|
-
...(body.verifyIntegrity ? { 'verify-integrity': 'true' } : {}),
|
|
355
|
-
}));
|
|
356
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
357
|
-
}
|
|
358
|
-
async function handleRealityCheck(res, cwd) {
|
|
359
|
-
const result = await captureOutput(() => runRealityCheck(cwd, { json: 'true' }));
|
|
360
|
-
sendJsonRaw(res, 200, result.stdout);
|
|
361
|
-
}
|
|
362
|
-
async function handleMetrics(res, cwd) {
|
|
363
|
-
try {
|
|
364
|
-
const { computeTeamMetrics } = await import('@codeledger/engine');
|
|
365
|
-
// computeTeamMetrics requires (repoRoot, snapshots[]) — pass empty for API summary
|
|
366
|
-
const metrics = computeTeamMetrics(cwd, []);
|
|
367
|
-
sendJson(res, 200, metrics);
|
|
368
|
-
}
|
|
369
|
-
catch (err) {
|
|
370
|
-
const metricsPath = join(cwd, '.codeledger', 'team-ledger', 'entries.jsonl');
|
|
371
|
-
if (!existsSync(metricsPath)) {
|
|
372
|
-
sendJson(res, 200, { score: 0, sessionCount: 0, message: 'No team-ledger data yet. Run: codeledger team-ledger sync' });
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
376
|
-
sendJson(res, 500, { error: 'Failed to compute metrics', message });
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
async function handleProvenance(res, cwd, context) {
|
|
381
|
-
try {
|
|
382
|
-
const { loadGraph } = await import('@codeledger/engine');
|
|
383
|
-
const graph = loadGraph(cwd);
|
|
384
|
-
if (context.viewMode === 'raw' && context.accessLevel === 'local') {
|
|
385
|
-
sendJson(res, 200, graph);
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
const nodeKindCounts = graph.nodes.reduce((acc, node) => {
|
|
389
|
-
acc[node.kind] = (acc[node.kind] ?? 0) + 1;
|
|
390
|
-
return acc;
|
|
391
|
-
}, {});
|
|
392
|
-
const edgeKindCounts = graph.edges.reduce((acc, edge) => {
|
|
393
|
-
acc[edge.kind] = (acc[edge.kind] ?? 0) + 1;
|
|
394
|
-
return acc;
|
|
395
|
-
}, {});
|
|
396
|
-
sendJson(res, 200, {
|
|
397
|
-
summary: {
|
|
398
|
-
node_count: graph.nodes.length,
|
|
399
|
-
edge_count: graph.edges.length,
|
|
400
|
-
node_kind_counts: nodeKindCounts,
|
|
401
|
-
edge_kind_counts: edgeKindCounts,
|
|
402
|
-
},
|
|
403
|
-
detail_tier: 'aggregated',
|
|
404
|
-
raw_access: false,
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
catch (err) {
|
|
408
|
-
const provPath = join(cwd, '.codeledger', 'provenance');
|
|
409
|
-
if (!existsSync(provPath)) {
|
|
410
|
-
sendJson(res, 200, { nodes: [], edges: [], message: 'No provenance data yet.' });
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
414
|
-
sendJson(res, 500, { error: 'Failed to load provenance graph', message });
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
async function handlePolicy(res, cwd, context) {
|
|
419
|
-
try {
|
|
420
|
-
const { loadTeamPolicy } = await import('@codeledger/engine');
|
|
421
|
-
const policy = loadTeamPolicy(cwd);
|
|
422
|
-
if (context.viewMode === 'raw' && context.accessLevel === 'local') {
|
|
423
|
-
sendJson(res, 200, { policy, rules: policy.rules.length });
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
const enforcementCounts = policy.rules.reduce((acc, rule) => {
|
|
427
|
-
acc[rule.enforcement] = (acc[rule.enforcement] ?? 0) + 1;
|
|
428
|
-
return acc;
|
|
429
|
-
}, {});
|
|
430
|
-
sendJson(res, 200, {
|
|
431
|
-
policy: {
|
|
432
|
-
version: policy.version,
|
|
433
|
-
enabled: policy.enabled,
|
|
434
|
-
rule_count: policy.rules.length,
|
|
435
|
-
enforcement_counts: enforcementCounts,
|
|
436
|
-
explanation_level: 'bounded_summary',
|
|
437
|
-
},
|
|
438
|
-
raw_access: false,
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
catch (err) {
|
|
442
|
-
const policyPath = join(cwd, '.codeledger', 'team-policy.json');
|
|
443
|
-
if (!existsSync(policyPath)) {
|
|
444
|
-
sendJson(res, 200, { policy: null, message: 'No team policy configured. Run: codeledger policy' });
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
448
|
-
sendJson(res, 500, { error: 'Failed to load policy', message });
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
// ─── Architecture Health Handlers ─────────────────────────────────────────────
|
|
453
|
-
async function handleArchHealthOverview(res, cwd) {
|
|
454
|
-
try {
|
|
455
|
-
const dashboard = buildDashboard(cwd);
|
|
456
|
-
const { score, timestamp, commit_sha } = dashboard.current;
|
|
457
|
-
sendJson(res, 200, {
|
|
458
|
-
status: 'ok',
|
|
459
|
-
data: {
|
|
460
|
-
score,
|
|
461
|
-
timestamp,
|
|
462
|
-
commit_sha,
|
|
463
|
-
alerts: dashboard.alerts,
|
|
464
|
-
snapshot_count: dashboard.history.length,
|
|
465
|
-
},
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
catch (err) {
|
|
469
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
470
|
-
sendJson(res, 500, { status: 'error', message });
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
async function handleArchHealthHotspots(res, cwd, context) {
|
|
474
|
-
try {
|
|
475
|
-
const dashboard = buildDashboard(cwd);
|
|
476
|
-
const hotspots = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
477
|
-
? dashboard.current.hotspots
|
|
478
|
-
: dashboard.current.hotspots.map((hotspot) => ({
|
|
479
|
-
system_hash: hashLabel(hotspot.system),
|
|
480
|
-
path: summarizePath(hotspot.path),
|
|
481
|
-
duplication_pressure: hotspot.duplication_pressure,
|
|
482
|
-
recent_violations: hotspot.recent_violations,
|
|
483
|
-
risk: hotspot.risk,
|
|
484
|
-
}));
|
|
485
|
-
sendJson(res, 200, {
|
|
486
|
-
status: 'ok',
|
|
487
|
-
data: {
|
|
488
|
-
hotspots,
|
|
489
|
-
total: hotspots.length,
|
|
490
|
-
},
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
catch (err) {
|
|
494
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
495
|
-
sendJson(res, 500, { status: 'error', message });
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
async function handleArchHealthSourceOfTruth(res, cwd, context) {
|
|
499
|
-
try {
|
|
500
|
-
const dashboard = buildDashboard(cwd);
|
|
501
|
-
const sotChanges = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
502
|
-
? dashboard.current.sot_changes
|
|
503
|
-
: dashboard.current.sot_changes.map((change) => ({
|
|
504
|
-
system_hash: hashLabel(change.system),
|
|
505
|
-
previous_path: summarizePath(change.previous_path),
|
|
506
|
-
current_path: summarizePath(change.current_path),
|
|
507
|
-
confidence_delta: change.confidence_delta,
|
|
508
|
-
timestamp: change.timestamp,
|
|
509
|
-
}));
|
|
510
|
-
sendJson(res, 200, {
|
|
511
|
-
status: 'ok',
|
|
512
|
-
data: {
|
|
513
|
-
sot_changes: sotChanges,
|
|
514
|
-
stability_score: dashboard.current.score.components.sts,
|
|
515
|
-
},
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
catch (err) {
|
|
519
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
520
|
-
sendJson(res, 500, { status: 'error', message });
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
async function handleArchHealthOverrides(res, cwd, context) {
|
|
524
|
-
try {
|
|
525
|
-
const dashboard = buildDashboard(cwd);
|
|
526
|
-
const overrides = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
527
|
-
? dashboard.current.override_log
|
|
528
|
-
: dashboard.current.override_log.map((entry) => ({
|
|
529
|
-
task_class: classifyTask(entry.task),
|
|
530
|
-
approved_by: hashLabel(entry.approved_by),
|
|
531
|
-
verdict_overridden: entry.verdict_overridden,
|
|
532
|
-
timestamp: entry.timestamp,
|
|
533
|
-
reason_class: classifyReason(entry.reason),
|
|
534
|
-
}));
|
|
535
|
-
sendJson(res, 200, {
|
|
536
|
-
status: 'ok',
|
|
537
|
-
data: {
|
|
538
|
-
overrides,
|
|
539
|
-
total: overrides.length,
|
|
540
|
-
override_frequency_score: dashboard.current.score.components.ofs,
|
|
541
|
-
},
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
catch (err) {
|
|
545
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
546
|
-
sendJson(res, 500, { status: 'error', message });
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
async function handleArchHealthDrift(res, cwd) {
|
|
550
|
-
try {
|
|
551
|
-
const dashboard = buildDashboard(cwd);
|
|
552
|
-
const driftSeries = dashboard.history.map((snapshot) => ({
|
|
553
|
-
timestamp: snapshot.timestamp,
|
|
554
|
-
commit_sha: snapshot.commit_sha,
|
|
555
|
-
overall: snapshot.score.overall,
|
|
556
|
-
grade: snapshot.score.grade,
|
|
557
|
-
trend: snapshot.score.trend,
|
|
558
|
-
components: snapshot.score.components,
|
|
559
|
-
}));
|
|
560
|
-
sendJson(res, 200, {
|
|
561
|
-
status: 'ok',
|
|
562
|
-
data: {
|
|
563
|
-
series: driftSeries,
|
|
564
|
-
current_trend: dashboard.current.score.trend,
|
|
565
|
-
total_snapshots: driftSeries.length,
|
|
566
|
-
},
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
catch (err) {
|
|
570
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
571
|
-
sendJson(res, 500, { status: 'error', message });
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
async function handleArchHealthRecommendations(res, cwd) {
|
|
575
|
-
try {
|
|
576
|
-
const result = runInterventionEngine(cwd);
|
|
577
|
-
sendJson(res, 200, {
|
|
578
|
-
status: 'ok',
|
|
579
|
-
data: result,
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
catch (err) {
|
|
583
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
584
|
-
sendJson(res, 500, { status: 'error', message });
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
async function handleArchHealthZone(res, cwd, zoneId, context) {
|
|
588
|
-
if (!zoneId) {
|
|
589
|
-
sendJson(res, 400, { status: 'error', message: 'Missing zone ID in URL path' });
|
|
590
|
-
return;
|
|
591
|
-
}
|
|
592
|
-
try {
|
|
593
|
-
const dashboard = buildDashboard(cwd);
|
|
594
|
-
const interventionResult = runInterventionEngine(cwd);
|
|
595
|
-
// Filter hotspots for this zone/system
|
|
596
|
-
const zoneHotspots = dashboard.current.hotspots.filter((h) => h.system === zoneId);
|
|
597
|
-
// Filter SoT changes for this zone/system
|
|
598
|
-
const zoneSotChanges = dashboard.current.sot_changes.filter((s) => s.system === zoneId);
|
|
599
|
-
// Filter overrides related to this zone
|
|
600
|
-
const zoneOverrides = dashboard.current.override_log.filter((o) => o.task.toLowerCase().includes(zoneId.toLowerCase()));
|
|
601
|
-
// Filter interventions affecting this zone/system
|
|
602
|
-
const zoneInterventions = interventionResult.interventions.filter((i) => i.affected_systems.includes(zoneId));
|
|
603
|
-
// Filter alerts mentioning this zone
|
|
604
|
-
const zoneAlerts = dashboard.alerts.filter((a) => a.system === zoneId);
|
|
605
|
-
const safeZoneId = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
606
|
-
? zoneId
|
|
607
|
-
: hashLabel(zoneId);
|
|
608
|
-
const safeHotspots = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
609
|
-
? zoneHotspots
|
|
610
|
-
: zoneHotspots.map((hotspot) => ({
|
|
611
|
-
system_hash: hashLabel(hotspot.system),
|
|
612
|
-
path: summarizePath(hotspot.path),
|
|
613
|
-
duplication_pressure: hotspot.duplication_pressure,
|
|
614
|
-
recent_violations: hotspot.recent_violations,
|
|
615
|
-
risk: hotspot.risk,
|
|
616
|
-
}));
|
|
617
|
-
const safeSotChanges = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
618
|
-
? zoneSotChanges
|
|
619
|
-
: zoneSotChanges.map((change) => ({
|
|
620
|
-
system_hash: hashLabel(change.system),
|
|
621
|
-
previous_path: summarizePath(change.previous_path),
|
|
622
|
-
current_path: summarizePath(change.current_path),
|
|
623
|
-
confidence_delta: change.confidence_delta,
|
|
624
|
-
timestamp: change.timestamp,
|
|
625
|
-
}));
|
|
626
|
-
const safeOverrides = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
627
|
-
? zoneOverrides
|
|
628
|
-
: zoneOverrides.map((entry) => ({
|
|
629
|
-
task_class: classifyTask(entry.task),
|
|
630
|
-
approved_by: hashLabel(entry.approved_by),
|
|
631
|
-
verdict_overridden: entry.verdict_overridden,
|
|
632
|
-
timestamp: entry.timestamp,
|
|
633
|
-
reason_class: classifyReason(entry.reason),
|
|
634
|
-
}));
|
|
635
|
-
const safeAlerts = context.viewMode === 'raw' && context.accessLevel === 'local'
|
|
636
|
-
? zoneAlerts
|
|
637
|
-
: zoneAlerts.map((alert) => ({
|
|
638
|
-
severity: alert.severity,
|
|
639
|
-
metric: alert.metric,
|
|
640
|
-
value: alert.value,
|
|
641
|
-
threshold: alert.threshold,
|
|
642
|
-
system_hash: alert.system ? hashLabel(alert.system) : null,
|
|
643
|
-
}));
|
|
644
|
-
sendJson(res, 200, {
|
|
645
|
-
status: 'ok',
|
|
646
|
-
data: {
|
|
647
|
-
zone: safeZoneId,
|
|
648
|
-
hotspots: safeHotspots,
|
|
649
|
-
sot_changes: safeSotChanges,
|
|
650
|
-
overrides: safeOverrides,
|
|
651
|
-
interventions: zoneInterventions,
|
|
652
|
-
alerts: safeAlerts,
|
|
653
|
-
},
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
catch (err) {
|
|
657
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
658
|
-
sendJson(res, 500, { status: 'error', message });
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
// ─── Context Broker Handlers ──────────────────────────────────────────────────
|
|
662
|
-
async function handleBrokerResolve(req, res, cwd) {
|
|
663
|
-
if (!memoryExists(cwd)) {
|
|
664
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
665
|
-
return;
|
|
666
|
-
}
|
|
667
|
-
const body = await readBody(req);
|
|
668
|
-
if (!body.task) {
|
|
669
|
-
sendJson(res, 400, { error: 'Missing required field: task' });
|
|
670
|
-
return;
|
|
671
|
-
}
|
|
672
|
-
const { resolveTaskContext } = await import('@codeledger/engine');
|
|
673
|
-
const memory = loadMemory(cwd);
|
|
674
|
-
const result = resolveTaskContext(memory, String(body.task));
|
|
675
|
-
sendJson(res, 200, result);
|
|
676
|
-
}
|
|
677
|
-
async function handleBrokerValidation(req, res, cwd) {
|
|
678
|
-
if (!memoryExists(cwd)) {
|
|
679
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
const body = await readBody(req);
|
|
683
|
-
if (!body.target) {
|
|
684
|
-
sendJson(res, 400, { error: 'Missing required field: target' });
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
const { getValidationStatus } = await import('@codeledger/engine');
|
|
688
|
-
const memory = loadMemory(cwd);
|
|
689
|
-
const result = getValidationStatus(memory, String(body.target));
|
|
690
|
-
sendJson(res, 200, result);
|
|
691
|
-
}
|
|
692
|
-
async function handleBrokerNeighborhood(req, res, cwd) {
|
|
693
|
-
if (!memoryExists(cwd)) {
|
|
694
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
695
|
-
return;
|
|
696
|
-
}
|
|
697
|
-
const body = await readBody(req);
|
|
698
|
-
if (!body.target) {
|
|
699
|
-
sendJson(res, 400, { error: 'Missing required field: target' });
|
|
700
|
-
return;
|
|
701
|
-
}
|
|
702
|
-
const { getNeighborhood } = await import('@codeledger/engine');
|
|
703
|
-
const memory = loadMemory(cwd);
|
|
704
|
-
const result = getNeighborhood(memory, String(body.target));
|
|
705
|
-
sendJson(res, 200, result);
|
|
706
|
-
}
|
|
707
|
-
async function handleBrokerEvidence(req, res, cwd) {
|
|
708
|
-
if (!memoryExists(cwd)) {
|
|
709
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
710
|
-
return;
|
|
711
|
-
}
|
|
712
|
-
const body = await readBody(req);
|
|
713
|
-
if (!body.findingType) {
|
|
714
|
-
sendJson(res, 400, { error: 'Missing required field: findingType' });
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
const { getEvidenceRequirements } = await import('@codeledger/engine');
|
|
718
|
-
const memory = loadMemory(cwd);
|
|
719
|
-
const target = body.target ? String(body.target) : undefined;
|
|
720
|
-
const result = getEvidenceRequirements(memory, String(body.findingType), target);
|
|
721
|
-
sendJson(res, 200, result);
|
|
722
|
-
}
|
|
723
|
-
async function handleBrokerCompletion(req, res, cwd) {
|
|
724
|
-
if (!memoryExists(cwd)) {
|
|
725
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
const body = await readBody(req);
|
|
729
|
-
const taskId = body.taskId ? String(body.taskId) : undefined;
|
|
730
|
-
const { getCompletionState } = await import('@codeledger/engine');
|
|
731
|
-
const memory = loadMemory(cwd);
|
|
732
|
-
const result = getCompletionState(memory, cwd, taskId);
|
|
733
|
-
sendJson(res, 200, result);
|
|
734
|
-
}
|
|
735
|
-
async function handleBrokerPreamble(req, res, cwd) {
|
|
736
|
-
if (!memoryExists(cwd)) {
|
|
737
|
-
sendJson(res, 400, { error: 'CodeLedger memory not initialized. Run: codeledger memory init' });
|
|
738
|
-
return;
|
|
739
|
-
}
|
|
740
|
-
const body = await readBody(req);
|
|
741
|
-
if (!body.task) {
|
|
742
|
-
sendJson(res, 400, { error: 'Missing required field: task' });
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
const { generateContextPreamble } = await import('../memory/preamble.js');
|
|
746
|
-
const memory = loadMemory(cwd);
|
|
747
|
-
const preamble = generateContextPreamble(memory, { task: String(body.task) });
|
|
748
|
-
sendJson(res, 200, { preamble });
|
|
749
|
-
}
|
|
750
|
-
async function handleBrokerRefresh(req, res, cwd) {
|
|
751
|
-
const body = await readBody(req);
|
|
752
|
-
if (!body.task) {
|
|
753
|
-
sendJson(res, 400, { error: 'Missing required field: task' });
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
const result = await resolveBrokerRefresh(cwd, {
|
|
757
|
-
task: String(body.task),
|
|
758
|
-
...(body.session ? { session: String(body.session) } : {}),
|
|
759
|
-
});
|
|
760
|
-
sendJson(res, 200, result);
|
|
761
|
-
}
|
|
762
|
-
async function handleBrokerTimeline(req, res, cwd) {
|
|
763
|
-
const parsed = new URL(req.url ?? '/broker/timeline', 'http://localhost');
|
|
764
|
-
const limit = parsed.searchParams.get('limit') ?? undefined;
|
|
765
|
-
sendJson(res, 200, resolveBrokerTimeline(cwd, limit ? { limit } : {}));
|
|
766
|
-
}
|
|
767
|
-
async function handleBrokerCurrent(req, res, cwd) {
|
|
768
|
-
const parsed = new URL(req.url ?? '/broker/current', 'http://localhost');
|
|
769
|
-
const limit = parsed.searchParams.get('limit') ?? undefined;
|
|
770
|
-
sendJson(res, 200, resolveBrokerCurrent(cwd, limit ? { limit } : {}));
|
|
771
|
-
}
|
|
772
|
-
function resolveResponseContext(params) {
|
|
773
|
-
const access = params.get('access');
|
|
774
|
-
const view = params.get('view');
|
|
775
|
-
const accessLevel = access === 'local' || access === 'team' || access === 'enterprise' || access === 'external_api'
|
|
776
|
-
? access
|
|
777
|
-
: 'external_api';
|
|
778
|
-
const requestedView = view === 'raw' || view === 'redacted' || view === 'aggregated'
|
|
779
|
-
? view
|
|
780
|
-
: 'aggregated';
|
|
781
|
-
if (requestedView === 'raw' && accessLevel === 'local') {
|
|
782
|
-
return { accessLevel, viewMode: 'raw' };
|
|
783
|
-
}
|
|
784
|
-
if (accessLevel === 'team' && requestedView !== 'aggregated') {
|
|
785
|
-
return { accessLevel, viewMode: 'redacted' };
|
|
786
|
-
}
|
|
787
|
-
return { accessLevel, viewMode: 'aggregated' };
|
|
788
|
-
}
|
|
789
|
-
function hashLabel(value) {
|
|
790
|
-
return abstractPathSummary(`virtual/${value}.txt`).pathHash;
|
|
791
|
-
}
|
|
792
|
-
function classifyTask(task) {
|
|
793
|
-
const normalized = task.toLowerCase();
|
|
794
|
-
if (normalized.includes('auth'))
|
|
795
|
-
return 'auth_task';
|
|
796
|
-
if (normalized.includes('policy'))
|
|
797
|
-
return 'policy_task';
|
|
798
|
-
if (normalized.includes('migration'))
|
|
799
|
-
return 'data_change_task';
|
|
800
|
-
if (normalized.includes('test'))
|
|
801
|
-
return 'test_task';
|
|
802
|
-
return 'general_task';
|
|
803
|
-
}
|
|
804
|
-
function classifyReason(reason) {
|
|
805
|
-
const normalized = reason.toLowerCase();
|
|
806
|
-
if (normalized.includes('dup'))
|
|
807
|
-
return 'duplication_override';
|
|
808
|
-
if (normalized.includes('deadline'))
|
|
809
|
-
return 'delivery_pressure';
|
|
810
|
-
if (normalized.includes('incident'))
|
|
811
|
-
return 'incident_response';
|
|
812
|
-
return 'bounded_override_reason';
|
|
813
|
-
}
|
|
814
|
-
function sendJson(res, status, data) {
|
|
815
|
-
res.writeHead(status, { 'Content-Type': 'application/json' });
|
|
816
|
-
res.end(JSON.stringify(data));
|
|
817
|
-
}
|
|
818
|
-
function sendJsonRaw(res, status, raw) {
|
|
819
|
-
res.writeHead(status, { 'Content-Type': 'application/json' });
|
|
820
|
-
// If raw is valid JSON, send it directly; otherwise wrap it
|
|
821
|
-
try {
|
|
822
|
-
JSON.parse(raw);
|
|
823
|
-
res.end(raw);
|
|
824
|
-
}
|
|
825
|
-
catch {
|
|
826
|
-
res.end(JSON.stringify({ output: raw }));
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
const MAX_BODY_SIZE = 1_000_000; // 1 MB
|
|
830
|
-
async function readBody(req) {
|
|
831
|
-
return new Promise((resolve, reject) => {
|
|
832
|
-
const chunks = [];
|
|
833
|
-
let totalSize = 0;
|
|
834
|
-
req.on('data', (chunk) => {
|
|
835
|
-
totalSize += chunk.length;
|
|
836
|
-
if (totalSize > MAX_BODY_SIZE) {
|
|
837
|
-
req.destroy();
|
|
838
|
-
reject(new Error('Request body too large (max 1 MB)'));
|
|
839
|
-
return;
|
|
840
|
-
}
|
|
841
|
-
chunks.push(chunk);
|
|
842
|
-
});
|
|
843
|
-
req.on('end', () => {
|
|
844
|
-
const raw = Buffer.concat(chunks).toString('utf-8');
|
|
845
|
-
if (!raw) {
|
|
846
|
-
resolve({});
|
|
847
|
-
return;
|
|
848
|
-
}
|
|
849
|
-
try {
|
|
850
|
-
const parsed = JSON.parse(raw);
|
|
851
|
-
if (typeof parsed === 'object' && parsed !== null) {
|
|
852
|
-
resolve(parsed);
|
|
853
|
-
}
|
|
854
|
-
else {
|
|
855
|
-
reject(new Error('Request body must be a JSON object'));
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
catch {
|
|
859
|
-
reject(new Error('Invalid JSON in request body'));
|
|
860
|
-
}
|
|
861
|
-
});
|
|
862
|
-
req.on('error', reject);
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
async function captureOutput(fn) {
|
|
866
|
-
const originalLog = console.log;
|
|
867
|
-
const originalError = console.error;
|
|
868
|
-
const originalExit = process.exit.bind(process);
|
|
869
|
-
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
870
|
-
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
871
|
-
let stdout = '';
|
|
872
|
-
let stderr = '';
|
|
873
|
-
console.log = (...args) => {
|
|
874
|
-
stdout += args.map(String).join(' ') + '\n';
|
|
875
|
-
};
|
|
876
|
-
console.error = (...args) => {
|
|
877
|
-
stderr += args.map(String).join(' ') + '\n';
|
|
878
|
-
};
|
|
879
|
-
process.stdout.write = ((chunk) => {
|
|
880
|
-
stdout += typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8');
|
|
881
|
-
return true;
|
|
882
|
-
});
|
|
883
|
-
process.stderr.write = ((chunk) => {
|
|
884
|
-
stderr += typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8');
|
|
885
|
-
return true;
|
|
886
|
-
});
|
|
887
|
-
process.exit = ((code) => {
|
|
888
|
-
const err = new Error(`Command exited with code ${code ?? 0}`);
|
|
889
|
-
err.exitCode = code ?? 0;
|
|
890
|
-
throw err;
|
|
891
|
-
});
|
|
892
|
-
try {
|
|
893
|
-
await fn();
|
|
894
|
-
}
|
|
895
|
-
finally {
|
|
896
|
-
console.log = originalLog;
|
|
897
|
-
console.error = originalError;
|
|
898
|
-
process.exit = originalExit;
|
|
899
|
-
process.stdout.write = originalStdoutWrite;
|
|
900
|
-
process.stderr.write = originalStderrWrite;
|
|
901
|
-
}
|
|
902
|
-
return { stdout: stdout.trim(), stderr: stderr.trim() };
|
|
903
|
-
}
|
|
904
|
-
//# sourceMappingURL=serve.js.map
|