@isaacriehm/cairn 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/backprop/id.d.ts +0 -14
- package/dist/backprop/id.js +0 -40
- package/dist/backprop/id.js.map +0 -1
- package/dist/backprop/index.d.ts +0 -23
- package/dist/backprop/index.js +0 -21
- package/dist/backprop/index.js.map +0 -1
- package/dist/backprop/prompt.d.ts +0 -16
- package/dist/backprop/prompt.js +0 -101
- package/dist/backprop/prompt.js.map +0 -1
- package/dist/backprop/runner.d.ts +0 -18
- package/dist/backprop/runner.js +0 -95
- package/dist/backprop/runner.js.map +0 -1
- package/dist/backprop/schema.d.ts +0 -61
- package/dist/backprop/schema.js +0 -55
- package/dist/backprop/schema.js.map +0 -1
- package/dist/backprop/types.d.ts +0 -101
- package/dist/backprop/types.js +0 -24
- package/dist/backprop/types.js.map +0 -1
- package/dist/backprop/writer.d.ts +0 -27
- package/dist/backprop/writer.js +0 -301
- package/dist/backprop/writer.js.map +0 -1
- package/dist/claude/error.d.ts +0 -33
- package/dist/claude/error.js +0 -58
- package/dist/claude/error.js.map +0 -1
- package/dist/claude/index.d.ts +0 -3
- package/dist/claude/index.js +0 -3
- package/dist/claude/index.js.map +0 -1
- package/dist/claude/runner.d.ts +0 -11
- package/dist/claude/runner.js +0 -132
- package/dist/claude/runner.js.map +0 -1
- package/dist/claude/types.d.ts +0 -52
- package/dist/claude/types.js +0 -14
- package/dist/claude/types.js.map +0 -1
- package/dist/cli/daemon.d.ts +0 -54
- package/dist/cli/daemon.js +0 -351
- package/dist/cli/daemon.js.map +0 -1
- package/dist/cli/install.d.ts +0 -52
- package/dist/cli/install.js +0 -308
- package/dist/cli/install.js.map +0 -1
- package/dist/cli/mirror.d.ts +0 -1
- package/dist/cli/mirror.js +0 -97
- package/dist/cli/mirror.js.map +0 -1
- package/dist/cli/run.d.ts +0 -1
- package/dist/cli/run.js +0 -174
- package/dist/cli/run.js.map +0 -1
- package/dist/cli/task.d.ts +0 -18
- package/dist/cli/task.js +0 -137
- package/dist/cli/task.js.map +0 -1
- package/dist/cli/watch.d.ts +0 -1
- package/dist/cli/watch.js +0 -73
- package/dist/cli/watch.js.map +0 -1
- package/dist/decision-capture/capture.d.ts +0 -57
- package/dist/decision-capture/capture.js +0 -186
- package/dist/decision-capture/capture.js.map +0 -1
- package/dist/decision-capture/extractor.d.ts +0 -20
- package/dist/decision-capture/extractor.js +0 -103
- package/dist/decision-capture/extractor.js.map +0 -1
- package/dist/decision-capture/id.d.ts +0 -14
- package/dist/decision-capture/id.js +0 -44
- package/dist/decision-capture/id.js.map +0 -1
- package/dist/decision-capture/index.d.ts +0 -25
- package/dist/decision-capture/index.js +0 -21
- package/dist/decision-capture/index.js.map +0 -1
- package/dist/decision-capture/prompt.d.ts +0 -15
- package/dist/decision-capture/prompt.js +0 -68
- package/dist/decision-capture/prompt.js.map +0 -1
- package/dist/decision-capture/refinement-prompt.d.ts +0 -25
- package/dist/decision-capture/refinement-prompt.js +0 -146
- package/dist/decision-capture/refinement-prompt.js.map +0 -1
- package/dist/decision-capture/refinement-schema.d.ts +0 -52
- package/dist/decision-capture/refinement-schema.js +0 -61
- package/dist/decision-capture/refinement-schema.js.map +0 -1
- package/dist/decision-capture/refinement.d.ts +0 -60
- package/dist/decision-capture/refinement.js +0 -439
- package/dist/decision-capture/refinement.js.map +0 -1
- package/dist/decision-capture/schema.d.ts +0 -70
- package/dist/decision-capture/schema.js +0 -71
- package/dist/decision-capture/schema.js.map +0 -1
- package/dist/decision-capture/types.d.ts +0 -201
- package/dist/decision-capture/types.js +0 -20
- package/dist/decision-capture/types.js.map +0 -1
- package/dist/decision-capture/writer.d.ts +0 -90
- package/dist/decision-capture/writer.js +0 -267
- package/dist/decision-capture/writer.js.map +0 -1
- package/dist/frontend/discord/acl.d.ts +0 -6
- package/dist/frontend/discord/acl.js +0 -19
- package/dist/frontend/discord/acl.js.map +0 -1
- package/dist/frontend/discord/channels.d.ts +0 -29
- package/dist/frontend/discord/channels.js +0 -58
- package/dist/frontend/discord/channels.js.map +0 -1
- package/dist/frontend/discord/classifier.d.ts +0 -16
- package/dist/frontend/discord/classifier.js +0 -29
- package/dist/frontend/discord/classifier.js.map +0 -1
- package/dist/frontend/discord/index.d.ts +0 -118
- package/dist/frontend/discord/index.js +0 -1104
- package/dist/frontend/discord/index.js.map +0 -1
- package/dist/frontend/discord/slash.d.ts +0 -18
- package/dist/frontend/discord/slash.js +0 -90
- package/dist/frontend/discord/slash.js.map +0 -1
- package/dist/frontend/inbox.d.ts +0 -17
- package/dist/frontend/inbox.js +0 -30
- package/dist/frontend/inbox.js.map +0 -1
- package/dist/frontend/index.d.ts +0 -8
- package/dist/frontend/index.js +0 -6
- package/dist/frontend/index.js.map +0 -1
- package/dist/frontend/stub/index.d.ts +0 -58
- package/dist/frontend/stub/index.js +0 -144
- package/dist/frontend/stub/index.js.map +0 -1
- package/dist/frontend/types.d.ts +0 -247
- package/dist/frontend/types.js +0 -15
- package/dist/frontend/types.js.map +0 -1
- package/dist/gc/apply.d.ts +0 -26
- package/dist/gc/apply.js +0 -48
- package/dist/gc/apply.js.map +0 -1
- package/dist/gc/canary.d.ts +0 -42
- package/dist/gc/canary.js +0 -134
- package/dist/gc/canary.js.map +0 -1
- package/dist/gc/classify.d.ts +0 -25
- package/dist/gc/classify.js +0 -89
- package/dist/gc/classify.js.map +0 -1
- package/dist/gc/doc-gardening.d.ts +0 -29
- package/dist/gc/doc-gardening.js +0 -146
- package/dist/gc/doc-gardening.js.map +0 -1
- package/dist/gc/frontmatter.d.ts +0 -35
- package/dist/gc/frontmatter.js +0 -111
- package/dist/gc/frontmatter.js.map +0 -1
- package/dist/gc/generator-drift.d.ts +0 -28
- package/dist/gc/generator-drift.js +0 -53
- package/dist/gc/generator-drift.js.map +0 -1
- package/dist/gc/index.d.ts +0 -35
- package/dist/gc/index.js +0 -26
- package/dist/gc/index.js.map +0 -1
- package/dist/gc/quality-update.d.ts +0 -23
- package/dist/gc/quality-update.js +0 -69
- package/dist/gc/quality-update.js.map +0 -1
- package/dist/gc/stub-hits.d.ts +0 -31
- package/dist/gc/stub-hits.js +0 -125
- package/dist/gc/stub-hits.js.map +0 -1
- package/dist/gc/sweep.d.ts +0 -56
- package/dist/gc/sweep.js +0 -178
- package/dist/gc/sweep.js.map +0 -1
- package/dist/gc/types.d.ts +0 -129
- package/dist/gc/types.js +0 -26
- package/dist/gc/types.js.map +0 -1
- package/dist/ground/drift.d.ts +0 -8
- package/dist/ground/drift.js +0 -23
- package/dist/ground/drift.js.map +0 -1
- package/dist/ground/frontmatter.d.ts +0 -20
- package/dist/ground/frontmatter.js +0 -49
- package/dist/ground/frontmatter.js.map +0 -1
- package/dist/ground/glob.d.ts +0 -10
- package/dist/ground/glob.js +0 -46
- package/dist/ground/glob.js.map +0 -1
- package/dist/ground/index.d.ts +0 -14
- package/dist/ground/index.js +0 -10
- package/dist/ground/index.js.map +0 -1
- package/dist/ground/ledgers.d.ts +0 -18
- package/dist/ground/ledgers.js +0 -103
- package/dist/ground/ledgers.js.map +0 -1
- package/dist/ground/manifest.d.ts +0 -10
- package/dist/ground/manifest.js +0 -88
- package/dist/ground/manifest.js.map +0 -1
- package/dist/ground/paths.d.ts +0 -20
- package/dist/ground/paths.js +0 -61
- package/dist/ground/paths.js.map +0 -1
- package/dist/ground/quality-grades.d.ts +0 -11
- package/dist/ground/quality-grades.js +0 -98
- package/dist/ground/quality-grades.js.map +0 -1
- package/dist/ground/schemas.d.ts +0 -306
- package/dist/ground/schemas.js +0 -188
- package/dist/ground/schemas.js.map +0 -1
- package/dist/ground/walk.d.ts +0 -7
- package/dist/ground/walk.js +0 -53
- package/dist/ground/walk.js.map +0 -1
- package/dist/init/detect.d.ts +0 -25
- package/dist/init/detect.js +0 -336
- package/dist/init/detect.js.map +0 -1
- package/dist/init/index.d.ts +0 -14
- package/dist/init/index.js +0 -9
- package/dist/init/index.js.map +0 -1
- package/dist/init/init.d.ts +0 -68
- package/dist/init/init.js +0 -673
- package/dist/init/init.js.map +0 -1
- package/dist/init/mapper.d.ts +0 -160
- package/dist/init/mapper.js +0 -248
- package/dist/init/mapper.js.map +0 -1
- package/dist/init/prompts.d.ts +0 -70
- package/dist/init/prompts.js +0 -80
- package/dist/init/prompts.js.map +0 -1
- package/dist/init/secrets.d.ts +0 -18
- package/dist/init/secrets.js +0 -76
- package/dist/init/secrets.js.map +0 -1
- package/dist/init/seed.d.ts +0 -21
- package/dist/init/seed.js +0 -75
- package/dist/init/seed.js.map +0 -1
- package/dist/init/setup-runners.d.ts +0 -17
- package/dist/init/setup-runners.js +0 -70
- package/dist/init/setup-runners.js.map +0 -1
- package/dist/init/types.d.ts +0 -59
- package/dist/init/types.js +0 -10
- package/dist/init/types.js.map +0 -1
- package/dist/init/walker.d.ts +0 -53
- package/dist/init/walker.js +0 -460
- package/dist/init/walker.js.map +0 -1
- package/dist/init/workflow-block.d.ts +0 -34
- package/dist/init/workflow-block.js +0 -110
- package/dist/init/workflow-block.js.map +0 -1
- package/dist/logger.d.ts +0 -3
- package/dist/logger.js +0 -23
- package/dist/logger.js.map +0 -1
- package/dist/mcp/context.d.ts +0 -16
- package/dist/mcp/context.js +0 -8
- package/dist/mcp/context.js.map +0 -1
- package/dist/mcp/errors.d.ts +0 -17
- package/dist/mcp/errors.js +0 -23
- package/dist/mcp/errors.js.map +0 -1
- package/dist/mcp/index.d.ts +0 -10
- package/dist/mcp/index.js +0 -7
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/path-allowlist.d.ts +0 -25
- package/dist/mcp/path-allowlist.js +0 -66
- package/dist/mcp/path-allowlist.js.map +0 -1
- package/dist/mcp/result.d.ts +0 -8
- package/dist/mcp/result.js +0 -18
- package/dist/mcp/result.js.map +0 -1
- package/dist/mcp/schemas.d.ts +0 -153
- package/dist/mcp/schemas.js +0 -135
- package/dist/mcp/schemas.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -11
- package/dist/mcp/server.js +0 -58
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/telemetry.d.ts +0 -15
- package/dist/mcp/telemetry.js +0 -13
- package/dist/mcp/telemetry.js.map +0 -1
- package/dist/mcp/tools/append.d.ts +0 -8
- package/dist/mcp/tools/append.js +0 -33
- package/dist/mcp/tools/append.js.map +0 -1
- package/dist/mcp/tools/archive.d.ts +0 -8
- package/dist/mcp/tools/archive.js +0 -49
- package/dist/mcp/tools/archive.js.map +0 -1
- package/dist/mcp/tools/ask-operator.d.ts +0 -34
- package/dist/mcp/tools/ask-operator.js +0 -93
- package/dist/mcp/tools/ask-operator.js.map +0 -1
- package/dist/mcp/tools/canonical-for-topic.d.ts +0 -6
- package/dist/mcp/tools/canonical-for-topic.js +0 -40
- package/dist/mcp/tools/canonical-for-topic.js.map +0 -1
- package/dist/mcp/tools/decision-get.d.ts +0 -6
- package/dist/mcp/tools/decision-get.js +0 -49
- package/dist/mcp/tools/decision-get.js.map +0 -1
- package/dist/mcp/tools/decisions-for-symbol.d.ts +0 -7
- package/dist/mcp/tools/decisions-for-symbol.js +0 -42
- package/dist/mcp/tools/decisions-for-symbol.js.map +0 -1
- package/dist/mcp/tools/decisions-in-scope.d.ts +0 -7
- package/dist/mcp/tools/decisions-in-scope.js +0 -47
- package/dist/mcp/tools/decisions-in-scope.js.map +0 -1
- package/dist/mcp/tools/drop-task.d.ts +0 -12
- package/dist/mcp/tools/drop-task.js +0 -47
- package/dist/mcp/tools/drop-task.js.map +0 -1
- package/dist/mcp/tools/get-full.d.ts +0 -7
- package/dist/mcp/tools/get-full.js +0 -46
- package/dist/mcp/tools/get-full.js.map +0 -1
- package/dist/mcp/tools/ground-get.d.ts +0 -7
- package/dist/mcp/tools/ground-get.js +0 -80
- package/dist/mcp/tools/ground-get.js.map +0 -1
- package/dist/mcp/tools/index.d.ts +0 -3
- package/dist/mcp/tools/index.js +0 -44
- package/dist/mcp/tools/index.js.map +0 -1
- package/dist/mcp/tools/invariant-get.d.ts +0 -6
- package/dist/mcp/tools/invariant-get.js +0 -49
- package/dist/mcp/tools/invariant-get.js.map +0 -1
- package/dist/mcp/tools/invariants-in-scope.d.ts +0 -7
- package/dist/mcp/tools/invariants-in-scope.js +0 -65
- package/dist/mcp/tools/invariants-in-scope.js.map +0 -1
- package/dist/mcp/tools/query-history.d.ts +0 -9
- package/dist/mcp/tools/query-history.js +0 -33
- package/dist/mcp/tools/query-history.js.map +0 -1
- package/dist/mcp/tools/record-decision.d.ts +0 -14
- package/dist/mcp/tools/record-decision.js +0 -101
- package/dist/mcp/tools/record-decision.js.map +0 -1
- package/dist/mcp/tools/record-run-event.d.ts +0 -10
- package/dist/mcp/tools/record-run-event.js +0 -28
- package/dist/mcp/tools/record-run-event.js.map +0 -1
- package/dist/mcp/tools/search.d.ts +0 -9
- package/dist/mcp/tools/search.js +0 -165
- package/dist/mcp/tools/search.js.map +0 -1
- package/dist/mcp/tools/supersedes-chain.d.ts +0 -6
- package/dist/mcp/tools/supersedes-chain.js +0 -66
- package/dist/mcp/tools/supersedes-chain.js.map +0 -1
- package/dist/mcp/tools/timeline.d.ts +0 -9
- package/dist/mcp/tools/timeline.js +0 -65
- package/dist/mcp/tools/timeline.js.map +0 -1
- package/dist/mcp/tools/types.d.ts +0 -9
- package/dist/mcp/tools/types.js +0 -2
- package/dist/mcp/tools/types.js.map +0 -1
- package/dist/mirror/clone.d.ts +0 -6
- package/dist/mirror/clone.js +0 -48
- package/dist/mirror/clone.js.map +0 -1
- package/dist/mirror/dirty-overlap.d.ts +0 -13
- package/dist/mirror/dirty-overlap.js +0 -77
- package/dist/mirror/dirty-overlap.js.map +0 -1
- package/dist/mirror/index.d.ts +0 -7
- package/dist/mirror/index.js +0 -7
- package/dist/mirror/index.js.map +0 -1
- package/dist/mirror/paths.d.ts +0 -18
- package/dist/mirror/paths.js +0 -45
- package/dist/mirror/paths.js.map +0 -1
- package/dist/mirror/push.d.ts +0 -9
- package/dist/mirror/push.js +0 -27
- package/dist/mirror/push.js.map +0 -1
- package/dist/mirror/state.d.ts +0 -4
- package/dist/mirror/state.js +0 -36
- package/dist/mirror/state.js.map +0 -1
- package/dist/mirror/sync.d.ts +0 -9
- package/dist/mirror/sync.js +0 -33
- package/dist/mirror/sync.js.map +0 -1
- package/dist/mirror/types.d.ts +0 -77
- package/dist/mirror/types.js +0 -2
- package/dist/mirror/types.js.map +0 -1
- package/dist/orchestrator/activity-summarizer.d.ts +0 -33
- package/dist/orchestrator/activity-summarizer.js +0 -120
- package/dist/orchestrator/activity-summarizer.js.map +0 -1
- package/dist/orchestrator/inbox.d.ts +0 -78
- package/dist/orchestrator/inbox.js +0 -115
- package/dist/orchestrator/inbox.js.map +0 -1
- package/dist/orchestrator/index.d.ts +0 -9
- package/dist/orchestrator/index.js +0 -7
- package/dist/orchestrator/index.js.map +0 -1
- package/dist/orchestrator/orchestrator.d.ts +0 -154
- package/dist/orchestrator/orchestrator.js +0 -2437
- package/dist/orchestrator/orchestrator.js.map +0 -1
- package/dist/orchestrator/prompt.d.ts +0 -19
- package/dist/orchestrator/prompt.js +0 -50
- package/dist/orchestrator/prompt.js.map +0 -1
- package/dist/orchestrator/queue.d.ts +0 -21
- package/dist/orchestrator/queue.js +0 -80
- package/dist/orchestrator/queue.js.map +0 -1
- package/dist/orchestrator/run-log.d.ts +0 -53
- package/dist/orchestrator/run-log.js +0 -92
- package/dist/orchestrator/run-log.js.map +0 -1
- package/dist/orchestrator/runner.d.ts +0 -56
- package/dist/orchestrator/runner.js +0 -172
- package/dist/orchestrator/runner.js.map +0 -1
- package/dist/orchestrator/tool-digest.d.ts +0 -35
- package/dist/orchestrator/tool-digest.js +0 -116
- package/dist/orchestrator/tool-digest.js.map +0 -1
- package/dist/orchestrator/types.d.ts +0 -263
- package/dist/orchestrator/types.js +0 -2
- package/dist/orchestrator/types.js.map +0 -1
- package/dist/orchestrator/workspace.d.ts +0 -21
- package/dist/orchestrator/workspace.js +0 -31
- package/dist/orchestrator/workspace.js.map +0 -1
- package/dist/profiles/index.d.ts +0 -3
- package/dist/profiles/index.js +0 -3
- package/dist/profiles/index.js.map +0 -1
- package/dist/profiles/registry.d.ts +0 -5
- package/dist/profiles/registry.js +0 -31
- package/dist/profiles/registry.js.map +0 -1
- package/dist/profiles/types.d.ts +0 -48
- package/dist/profiles/types.js +0 -11
- package/dist/profiles/types.js.map +0 -1
- package/dist/profiles/unknown.d.ts +0 -9
- package/dist/profiles/unknown.js +0 -17
- package/dist/profiles/unknown.js.map +0 -1
- package/dist/reviewer/index.d.ts +0 -6
- package/dist/reviewer/index.js +0 -5
- package/dist/reviewer/index.js.map +0 -1
- package/dist/reviewer/prompt.d.ts +0 -11
- package/dist/reviewer/prompt.js +0 -132
- package/dist/reviewer/prompt.js.map +0 -1
- package/dist/reviewer/remediation.d.ts +0 -15
- package/dist/reviewer/remediation.js +0 -61
- package/dist/reviewer/remediation.js.map +0 -1
- package/dist/reviewer/reviewer.d.ts +0 -9
- package/dist/reviewer/reviewer.js +0 -89
- package/dist/reviewer/reviewer.js.map +0 -1
- package/dist/reviewer/schema.d.ts +0 -45
- package/dist/reviewer/schema.js +0 -43
- package/dist/reviewer/schema.js.map +0 -1
- package/dist/reviewer/types.d.ts +0 -74
- package/dist/reviewer/types.js +0 -14
- package/dist/reviewer/types.js.map +0 -1
- package/dist/sensors/attestation.d.ts +0 -44
- package/dist/sensors/attestation.js +0 -262
- package/dist/sensors/attestation.js.map +0 -1
- package/dist/sensors/catalog.d.ts +0 -41
- package/dist/sensors/catalog.js +0 -123
- package/dist/sensors/catalog.js.map +0 -1
- package/dist/sensors/decisions.d.ts +0 -30
- package/dist/sensors/decisions.js +0 -393
- package/dist/sensors/decisions.js.map +0 -1
- package/dist/sensors/diff.d.ts +0 -27
- package/dist/sensors/diff.js +0 -148
- package/dist/sensors/diff.js.map +0 -1
- package/dist/sensors/index.d.ts +0 -13
- package/dist/sensors/index.js +0 -9
- package/dist/sensors/index.js.map +0 -1
- package/dist/sensors/remediation.d.ts +0 -20
- package/dist/sensors/remediation.js +0 -65
- package/dist/sensors/remediation.js.map +0 -1
- package/dist/sensors/runner.d.ts +0 -44
- package/dist/sensors/runner.js +0 -95
- package/dist/sensors/runner.js.map +0 -1
- package/dist/sensors/structural.d.ts +0 -30
- package/dist/sensors/structural.js +0 -204
- package/dist/sensors/structural.js.map +0 -1
- package/dist/sensors/stub-catalog.d.ts +0 -39
- package/dist/sensors/stub-catalog.js +0 -115
- package/dist/sensors/stub-catalog.js.map +0 -1
- package/dist/sensors/types.d.ts +0 -135
- package/dist/sensors/types.js +0 -14
- package/dist/sensors/types.js.map +0 -1
- package/dist/tier0/classify.d.ts +0 -5
- package/dist/tier0/classify.js +0 -91
- package/dist/tier0/classify.js.map +0 -1
- package/dist/tier0/index.d.ts +0 -3
- package/dist/tier0/index.js +0 -3
- package/dist/tier0/index.js.map +0 -1
- package/dist/tier0/ollama.d.ts +0 -22
- package/dist/tier0/ollama.js +0 -63
- package/dist/tier0/ollama.js.map +0 -1
- package/dist/tier0/types.d.ts +0 -24
- package/dist/tier0/types.js +0 -7
- package/dist/tier0/types.js.map +0 -1
- package/dist/tightener/index.d.ts +0 -4
- package/dist/tightener/index.js +0 -4
- package/dist/tightener/index.js.map +0 -1
- package/dist/tightener/prompt.d.ts +0 -3
- package/dist/tightener/prompt.js +0 -67
- package/dist/tightener/prompt.js.map +0 -1
- package/dist/tightener/schema.d.ts +0 -68
- package/dist/tightener/schema.js +0 -44
- package/dist/tightener/schema.js.map +0 -1
- package/dist/tightener/tighten.d.ts +0 -2
- package/dist/tightener/tighten.js +0 -66
- package/dist/tightener/tighten.js.map +0 -1
- package/dist/tightener/types.d.ts +0 -74
- package/dist/tightener/types.js +0 -6
- package/dist/tightener/types.js.map +0 -1
- package/dist/uat/bundle.d.ts +0 -68
- package/dist/uat/bundle.js +0 -168
- package/dist/uat/bundle.js.map +0 -1
- package/dist/uat/index.d.ts +0 -15
- package/dist/uat/index.js +0 -10
- package/dist/uat/index.js.map +0 -1
- package/dist/uat/persistent.d.ts +0 -64
- package/dist/uat/persistent.js +0 -206
- package/dist/uat/persistent.js.map +0 -1
- package/dist/uat/probes/cli.d.ts +0 -11
- package/dist/uat/probes/cli.js +0 -107
- package/dist/uat/probes/cli.js.map +0 -1
- package/dist/uat/probes/http.d.ts +0 -12
- package/dist/uat/probes/http.js +0 -139
- package/dist/uat/probes/http.js.map +0 -1
- package/dist/uat/probes/index.d.ts +0 -21
- package/dist/uat/probes/index.js +0 -30
- package/dist/uat/probes/index.js.map +0 -1
- package/dist/uat/probes/integration.d.ts +0 -18
- package/dist/uat/probes/integration.js +0 -188
- package/dist/uat/probes/integration.js.map +0 -1
- package/dist/uat/probes/sql/config.d.ts +0 -14
- package/dist/uat/probes/sql/config.js +0 -57
- package/dist/uat/probes/sql/config.js.map +0 -1
- package/dist/uat/probes/sql/index.d.ts +0 -29
- package/dist/uat/probes/sql/index.js +0 -43
- package/dist/uat/probes/sql/index.js.map +0 -1
- package/dist/uat/probes/sql/mysql.d.ts +0 -12
- package/dist/uat/probes/sql/mysql.js +0 -96
- package/dist/uat/probes/sql/mysql.js.map +0 -1
- package/dist/uat/probes/sql/pg.d.ts +0 -20
- package/dist/uat/probes/sql/pg.js +0 -102
- package/dist/uat/probes/sql/pg.js.map +0 -1
- package/dist/uat/probes/sql/sqlite.d.ts +0 -9
- package/dist/uat/probes/sql/sqlite.js +0 -58
- package/dist/uat/probes/sql/sqlite.js.map +0 -1
- package/dist/uat/probes/sql/types.d.ts +0 -46
- package/dist/uat/probes/sql/types.js +0 -10
- package/dist/uat/probes/sql/types.js.map +0 -1
- package/dist/uat/probes/sql.d.ts +0 -9
- package/dist/uat/probes/sql.js +0 -119
- package/dist/uat/probes/sql.js.map +0 -1
- package/dist/uat/probes/ui.d.ts +0 -19
- package/dist/uat/probes/ui.js +0 -244
- package/dist/uat/probes/ui.js.map +0 -1
- package/dist/uat/prompt.d.ts +0 -10
- package/dist/uat/prompt.js +0 -85
- package/dist/uat/prompt.js.map +0 -1
- package/dist/uat/question.d.ts +0 -50
- package/dist/uat/question.js +0 -139
- package/dist/uat/question.js.map +0 -1
- package/dist/uat/rejection.d.ts +0 -58
- package/dist/uat/rejection.js +0 -163
- package/dist/uat/rejection.js.map +0 -1
- package/dist/uat/runner.d.ts +0 -6
- package/dist/uat/runner.js +0 -96
- package/dist/uat/runner.js.map +0 -1
- package/dist/uat/schema.d.ts +0 -322
- package/dist/uat/schema.js +0 -189
- package/dist/uat/schema.js.map +0 -1
- package/dist/uat/types.d.ts +0 -268
- package/dist/uat/types.js +0 -18
- package/dist/uat/types.js.map +0 -1
- package/dist/uat/uat.d.ts +0 -89
- package/dist/uat/uat.js +0 -256
- package/dist/uat/uat.js.map +0 -1
- package/dist/voice/index.d.ts +0 -4
- package/dist/voice/index.js +0 -4
- package/dist/voice/index.js.map +0 -1
- package/dist/voice/model.d.ts +0 -23
- package/dist/voice/model.js +0 -46
- package/dist/voice/model.js.map +0 -1
- package/dist/voice/pipe.d.ts +0 -9
- package/dist/voice/pipe.js +0 -47
- package/dist/voice/pipe.js.map +0 -1
- package/dist/voice/transcribe.d.ts +0 -3
- package/dist/voice/transcribe.js +0 -43
- package/dist/voice/transcribe.js.map +0 -1
- package/dist/voice/types.d.ts +0 -26
- package/dist/voice/types.js +0 -9
- package/dist/voice/types.js.map +0 -1
- package/dist/watch/daemon.d.ts +0 -21
- package/dist/watch/daemon.js +0 -143
- package/dist/watch/daemon.js.map +0 -1
- package/dist/watch/index.d.ts +0 -4
- package/dist/watch/index.js +0 -3
- package/dist/watch/index.js.map +0 -1
- package/dist/watch/regenerate.d.ts +0 -25
- package/dist/watch/regenerate.js +0 -51
- package/dist/watch/regenerate.js.map +0 -1
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { runClaude } from "../claude/index.js";
|
|
2
|
-
import { logger } from "../logger.js";
|
|
3
|
-
import { buildTightenerUserPrompt, TIGHTENER_SYSTEM_PROMPT } from "./prompt.js";
|
|
4
|
-
import { TIGHTENER_OUTPUT_SCHEMA } from "./schema.js";
|
|
5
|
-
const log = logger("tightener");
|
|
6
|
-
/** Word-count cutoff at which we auto-escalate from Haiku → Sonnet. */
|
|
7
|
-
const ESCALATE_WORDS = 500;
|
|
8
|
-
/** Default `spec_quality_floor` per templates/.harness/config/workflow.md. */
|
|
9
|
-
const DEFAULT_QUALITY_FLOOR = 7;
|
|
10
|
-
function chooseTier(input) {
|
|
11
|
-
if (input.force_tier !== undefined)
|
|
12
|
-
return input.force_tier;
|
|
13
|
-
const wordCount = `${input.title} ${input.body}`.split(/\s+/).filter(Boolean).length;
|
|
14
|
-
return wordCount > ESCALATE_WORDS ? "sonnet" : "haiku";
|
|
15
|
-
}
|
|
16
|
-
function isOutput(value) {
|
|
17
|
-
if (typeof value !== "object" || value === null)
|
|
18
|
-
return false;
|
|
19
|
-
const v = value;
|
|
20
|
-
return (Array.isArray(v["ambiguities"]) &&
|
|
21
|
-
Array.isArray(v["conflicts"]) &&
|
|
22
|
-
Array.isArray(v["missing_acceptance"]) &&
|
|
23
|
-
Array.isArray(v["scope_concerns"]) &&
|
|
24
|
-
Array.isArray(v["existing_stub_overlap"]) &&
|
|
25
|
-
typeof v["spec_quality_score"] === "number" &&
|
|
26
|
-
typeof v["ready_to_execute"] === "boolean" &&
|
|
27
|
-
typeof v["tightened_spec_proposal"] === "string");
|
|
28
|
-
}
|
|
29
|
-
export async function tightenSpec(input) {
|
|
30
|
-
const tier = chooseTier(input);
|
|
31
|
-
const userPrompt = buildTightenerUserPrompt(input);
|
|
32
|
-
log.info({ tier, body_len: input.body.length, ship_anyway: input.ship_anyway === true }, "tightener dispatch");
|
|
33
|
-
const result = await runClaude({
|
|
34
|
-
tier,
|
|
35
|
-
prompt: userPrompt,
|
|
36
|
-
system: TIGHTENER_SYSTEM_PROMPT,
|
|
37
|
-
jsonSchema: TIGHTENER_OUTPUT_SCHEMA,
|
|
38
|
-
timeoutMs: 300_000,
|
|
39
|
-
});
|
|
40
|
-
if (!isOutput(result.parsed)) {
|
|
41
|
-
throw new Error(`tightener returned malformed output (no parsed). preview: ${result.text.slice(0, 200)}`);
|
|
42
|
-
}
|
|
43
|
-
const output = result.parsed;
|
|
44
|
-
const ready = input.ship_anyway === true ||
|
|
45
|
-
(output.ready_to_execute === true && output.spec_quality_score >= DEFAULT_QUALITY_FLOOR);
|
|
46
|
-
return {
|
|
47
|
-
output,
|
|
48
|
-
tier,
|
|
49
|
-
ready,
|
|
50
|
-
quality_floor: DEFAULT_QUALITY_FLOOR,
|
|
51
|
-
duration_ms: result.durationMs,
|
|
52
|
-
...(result.usage !== undefined
|
|
53
|
-
? {
|
|
54
|
-
usage: {
|
|
55
|
-
...(result.usage.input_tokens !== undefined
|
|
56
|
-
? { input_tokens: result.usage.input_tokens }
|
|
57
|
-
: {}),
|
|
58
|
-
...(result.usage.output_tokens !== undefined
|
|
59
|
-
? { output_tokens: result.usage.output_tokens }
|
|
60
|
-
: {}),
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
: {}),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=tighten.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tighten.js","sourceRoot":"","sources":["../../src/tightener/tighten.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAEhC,uEAAuE;AACvE,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,8EAA8E;AAC9E,MAAM,qBAAqB,G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AAE,CAAC;iBACR;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Spec tightener (Layer F) per `docs/PRIMER.md` §10 + `docs/INTEGRATION_PLAN.md`
|
|
3
|
-
* §5 Phase 7. Single Tier-1 (Haiku) call before any code is written.
|
|
4
|
-
*/
|
|
5
|
-
export interface Ambiguity {
|
|
6
|
-
/** Stable id within this tightener call (e.g. "Q1"). */
|
|
7
|
-
id: string;
|
|
8
|
-
question: string;
|
|
9
|
-
/** Concrete A/B/C/D candidate resolutions; empty when caller must free-text. */
|
|
10
|
-
candidate_resolutions: string[];
|
|
11
|
-
}
|
|
12
|
-
export interface TightenerOutput {
|
|
13
|
-
ambiguities: Ambiguity[];
|
|
14
|
-
conflicts: string[];
|
|
15
|
-
missing_acceptance: string[];
|
|
16
|
-
scope_concerns: string[];
|
|
17
|
-
existing_stub_overlap: string[];
|
|
18
|
-
/** 0-10 integer; >= 7 AND ready_to_execute → safe to dispatch. */
|
|
19
|
-
spec_quality_score: number;
|
|
20
|
-
ready_to_execute: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The model's proposed tightened version of the spec body. Must always
|
|
23
|
-
* be set so callers have a fallback when ambiguities exist (the proposal
|
|
24
|
-
* uses the most defensible default per L44).
|
|
25
|
-
*/
|
|
26
|
-
tightened_spec_proposal: string;
|
|
27
|
-
}
|
|
28
|
-
export interface TightenerInput {
|
|
29
|
-
title: string;
|
|
30
|
-
body: string;
|
|
31
|
-
/** Recent decisions in scope (id + summary). Loaded from MCP by caller. */
|
|
32
|
-
decisions_in_scope?: {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
summary: string;
|
|
36
|
-
}[];
|
|
37
|
-
/** Invariants in scope (id + title). Loaded from MCP by caller. */
|
|
38
|
-
invariants_in_scope?: {
|
|
39
|
-
id: string;
|
|
40
|
-
title: string;
|
|
41
|
-
}[];
|
|
42
|
-
/** Ground extracts in scope (key + content snippet). */
|
|
43
|
-
ground_extracts?: {
|
|
44
|
-
key: string;
|
|
45
|
-
snippet: string;
|
|
46
|
-
}[];
|
|
47
|
-
/** Existing stubs/TODOs the agent may step on. */
|
|
48
|
-
existing_stubs?: string[];
|
|
49
|
-
/** Operator override per L24: ship even when score below threshold. */
|
|
50
|
-
ship_anyway?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Force a specific tier instead of the body-length heuristic. Useful for
|
|
53
|
-
* smoke tests and for operators who know they want Sonnet on a touchy
|
|
54
|
-
* spec without rewriting it to trip the auto-escalate threshold.
|
|
55
|
-
*/
|
|
56
|
-
force_tier?: "haiku" | "sonnet";
|
|
57
|
-
}
|
|
58
|
-
export interface TightenerResult {
|
|
59
|
-
/** Raw tightener output as returned by the model. */
|
|
60
|
-
output: TightenerOutput;
|
|
61
|
-
/** Tier actually used (auto-escalated if body length tripped the threshold). */
|
|
62
|
-
tier: "haiku" | "sonnet";
|
|
63
|
-
/** True when the gate passes: score >= floor AND ready_to_execute, OR ship_anyway. */
|
|
64
|
-
ready: boolean;
|
|
65
|
-
/** Quality floor used to compute `ready`. Default 7 per workflow.md `spec_quality_floor`. */
|
|
66
|
-
quality_floor: number;
|
|
67
|
-
/** Wall-clock duration of the model call. */
|
|
68
|
-
duration_ms: number;
|
|
69
|
-
/** Token usage if reported by the CLI. */
|
|
70
|
-
usage?: {
|
|
71
|
-
input_tokens?: number;
|
|
72
|
-
output_tokens?: number;
|
|
73
|
-
};
|
|
74
|
-
}
|
package/dist/tightener/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tightener/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/dist/uat/bundle.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UAT bundle + evidence-file gate.
|
|
3
|
-
*
|
|
4
|
-
* The bundle is the canonical artifact set under
|
|
5
|
-
* `.harness/runs/active/<run_id>/uat/`. The evidence file (`.uat-passed`)
|
|
6
|
-
* carries the SHA256 of every artifact + a bundle-level SHA256 over the
|
|
7
|
-
* sorted file:hash list.
|
|
8
|
-
*
|
|
9
|
-
* Pre-push gate refuses commit unless:
|
|
10
|
-
* 1. evidence file exists at the run's UAT directory
|
|
11
|
-
* 2. recompute the bundle SHA256 — must match the file's claim
|
|
12
|
-
* 3. recompute every per-file SHA256 — each must match the file's claim
|
|
13
|
-
* 4. operator_decision === "approve"
|
|
14
|
-
*
|
|
15
|
-
* Bare `touch .uat-passed` fails check 2 (missing fields). Modifying any
|
|
16
|
-
* artifact after the fact fails check 3.
|
|
17
|
-
*/
|
|
18
|
-
import type { EvidenceFile, EvidenceFileEntry, UatDecision, UatSummary } from "./types.js";
|
|
19
|
-
export declare const EVIDENCE_FILE_NAME = ".uat-passed";
|
|
20
|
-
/** Returns the absolute UAT directory for a run. */
|
|
21
|
-
export declare function uatDirFor(repoRoot: string, runId: string): string;
|
|
22
|
-
/** Compute SHA256 of a file's bytes; returns lowercase hex. */
|
|
23
|
-
export declare function fileSha256(absPath: string): string;
|
|
24
|
-
/** SHA256 of the canonical `path<tab>sha256<newline>` manifest. */
|
|
25
|
-
export declare function bundleSha256(entries: readonly EvidenceFileEntry[]): string;
|
|
26
|
-
/** Walk the UAT dir and return every artifact (excluding the evidence file itself). */
|
|
27
|
-
export declare function collectArtifactPaths(uatDir: string): string[];
|
|
28
|
-
export interface WriteSummaryArgs {
|
|
29
|
-
repoRoot: string;
|
|
30
|
-
runId: string;
|
|
31
|
-
summary: UatSummary;
|
|
32
|
-
}
|
|
33
|
-
/** Write the summary.yaml that adapters consume. */
|
|
34
|
-
export declare function writeSummary(args: WriteSummaryArgs): Promise<string>;
|
|
35
|
-
export interface WriteEvidenceFileArgs {
|
|
36
|
-
repoRoot: string;
|
|
37
|
-
runId: string;
|
|
38
|
-
/** Decision recorded with the evidence — only `approve` allows the commit gate to pass. */
|
|
39
|
-
operatorDecision: UatDecision;
|
|
40
|
-
}
|
|
41
|
-
/** Walk the UAT dir, hash each file, write the .uat-passed manifest. */
|
|
42
|
-
export declare function writeEvidenceFile(args: WriteEvidenceFileArgs): Promise<{
|
|
43
|
-
path: string;
|
|
44
|
-
bundleSha: string;
|
|
45
|
-
entries: EvidenceFileEntry[];
|
|
46
|
-
}>;
|
|
47
|
-
export interface VerifyEvidenceArgs {
|
|
48
|
-
repoRoot: string;
|
|
49
|
-
runId: string;
|
|
50
|
-
/** When set, must match the evidence's recorded operator_decision. Default: "approve". */
|
|
51
|
-
requireDecision?: UatDecision;
|
|
52
|
-
}
|
|
53
|
-
export interface VerifyEvidenceResult {
|
|
54
|
-
ok: boolean;
|
|
55
|
-
/** First failure reason; undefined on ok. */
|
|
56
|
-
reason?: string;
|
|
57
|
-
/** Parsed evidence file when present. */
|
|
58
|
-
evidence?: EvidenceFile;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Re-walk the UAT directory and recompute every per-file SHA + the bundle
|
|
62
|
-
* SHA. Compare against the file's claim. Reject when:
|
|
63
|
-
* - evidence file missing or unparseable
|
|
64
|
-
* - any artifact missing or modified after the evidence file was written
|
|
65
|
-
* - bundle hash doesn't match the recomputed hash
|
|
66
|
-
* - operator_decision != requireDecision
|
|
67
|
-
*/
|
|
68
|
-
export declare function verifyEvidenceFile(args: VerifyEvidenceArgs): VerifyEvidenceResult;
|
package/dist/uat/bundle.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UAT bundle + evidence-file gate.
|
|
3
|
-
*
|
|
4
|
-
* The bundle is the canonical artifact set under
|
|
5
|
-
* `.harness/runs/active/<run_id>/uat/`. The evidence file (`.uat-passed`)
|
|
6
|
-
* carries the SHA256 of every artifact + a bundle-level SHA256 over the
|
|
7
|
-
* sorted file:hash list.
|
|
8
|
-
*
|
|
9
|
-
* Pre-push gate refuses commit unless:
|
|
10
|
-
* 1. evidence file exists at the run's UAT directory
|
|
11
|
-
* 2. recompute the bundle SHA256 — must match the file's claim
|
|
12
|
-
* 3. recompute every per-file SHA256 — each must match the file's claim
|
|
13
|
-
* 4. operator_decision === "approve"
|
|
14
|
-
*
|
|
15
|
-
* Bare `touch .uat-passed` fails check 2 (missing fields). Modifying any
|
|
16
|
-
* artifact after the fact fails check 3.
|
|
17
|
-
*/
|
|
18
|
-
import { createHash } from "node:crypto";
|
|
19
|
-
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
20
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
21
|
-
import { dirname, join, relative } from "node:path";
|
|
22
|
-
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
23
|
-
import { logger } from "../logger.js";
|
|
24
|
-
const log = logger("uat.bundle");
|
|
25
|
-
export const EVIDENCE_FILE_NAME = ".uat-passed";
|
|
26
|
-
const SUMMARY_FILE_NAME = "summary.yaml";
|
|
27
|
-
/** Returns the absolute UAT directory for a run. */
|
|
28
|
-
export function uatDirFor(repoRoot, runId) {
|
|
29
|
-
return join(repoRoot, ".harness", "runs", "active", runId, "uat");
|
|
30
|
-
}
|
|
31
|
-
/** Compute SHA256 of a file's bytes; returns lowercase hex. */
|
|
32
|
-
export function fileSha256(absPath) {
|
|
33
|
-
const buf = readFileSync(absPath);
|
|
34
|
-
return createHash("sha256").update(buf).digest("hex");
|
|
35
|
-
}
|
|
36
|
-
/** SHA256 of the canonical `path<tab>sha256<newline>` manifest. */
|
|
37
|
-
export function bundleSha256(entries) {
|
|
38
|
-
const sorted = [...entries].sort((a, b) => a.path.localeCompare(b.path));
|
|
39
|
-
const manifest = sorted.map((e) => `${e.path}\t${e.sha256}`).join("\n");
|
|
40
|
-
return createHash("sha256").update(manifest, "utf8").digest("hex");
|
|
41
|
-
}
|
|
42
|
-
/** Walk the UAT dir and return every artifact (excluding the evidence file itself). */
|
|
43
|
-
export function collectArtifactPaths(uatDir) {
|
|
44
|
-
const out = [];
|
|
45
|
-
walk(uatDir, (abs) => {
|
|
46
|
-
const rel = relative(uatDir, abs);
|
|
47
|
-
if (rel === EVIDENCE_FILE_NAME)
|
|
48
|
-
return;
|
|
49
|
-
out.push(rel);
|
|
50
|
-
});
|
|
51
|
-
out.sort();
|
|
52
|
-
return out;
|
|
53
|
-
}
|
|
54
|
-
function walk(dir, visit) {
|
|
55
|
-
if (!existsSync(dir))
|
|
56
|
-
return;
|
|
57
|
-
for (const name of readdirSync(dir)) {
|
|
58
|
-
const abs = join(dir, name);
|
|
59
|
-
const st = statSync(abs);
|
|
60
|
-
if (st.isDirectory())
|
|
61
|
-
walk(abs, visit);
|
|
62
|
-
else if (st.isFile())
|
|
63
|
-
visit(abs);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/** Write the summary.yaml that adapters consume. */
|
|
67
|
-
export async function writeSummary(args) {
|
|
68
|
-
const path = join(uatDirFor(args.repoRoot, args.runId), SUMMARY_FILE_NAME);
|
|
69
|
-
await mkdir(dirname(path), { recursive: true });
|
|
70
|
-
await writeFile(path, stringifyYaml(args.summary), "utf8");
|
|
71
|
-
return path;
|
|
72
|
-
}
|
|
73
|
-
/** Walk the UAT dir, hash each file, write the .uat-passed manifest. */
|
|
74
|
-
export async function writeEvidenceFile(args) {
|
|
75
|
-
const uatDir = uatDirFor(args.repoRoot, args.runId);
|
|
76
|
-
const relPaths = collectArtifactPaths(uatDir);
|
|
77
|
-
const entries = relPaths.map((rel) => ({
|
|
78
|
-
path: rel,
|
|
79
|
-
sha256: fileSha256(join(uatDir, rel)),
|
|
80
|
-
}));
|
|
81
|
-
const bundleSha = bundleSha256(entries);
|
|
82
|
-
const evidence = {
|
|
83
|
-
run_id: args.runId,
|
|
84
|
-
generated_at: new Date().toISOString(),
|
|
85
|
-
bundle_sha256: bundleSha,
|
|
86
|
-
files: entries,
|
|
87
|
-
operator_decision: args.operatorDecision,
|
|
88
|
-
};
|
|
89
|
-
const path = join(uatDir, EVIDENCE_FILE_NAME);
|
|
90
|
-
await mkdir(dirname(path), { recursive: true });
|
|
91
|
-
await writeFile(path, stringifyYaml(evidence), "utf8");
|
|
92
|
-
log.info({ run_id: args.runId, file_count: entries.length, bundle_sha256: bundleSha }, "evidence file written");
|
|
93
|
-
return { path, bundleSha, entries };
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Re-walk the UAT directory and recompute every per-file SHA + the bundle
|
|
97
|
-
* SHA. Compare against the file's claim. Reject when:
|
|
98
|
-
* - evidence file missing or unparseable
|
|
99
|
-
* - any artifact missing or modified after the evidence file was written
|
|
100
|
-
* - bundle hash doesn't match the recomputed hash
|
|
101
|
-
* - operator_decision != requireDecision
|
|
102
|
-
*/
|
|
103
|
-
export function verifyEvidenceFile(args) {
|
|
104
|
-
const uatDir = uatDirFor(args.repoRoot, args.runId);
|
|
105
|
-
const evidencePath = join(uatDir, EVIDENCE_FILE_NAME);
|
|
106
|
-
if (!existsSync(evidencePath)) {
|
|
107
|
-
return { ok: false, reason: `evidence file missing: ${evidencePath}` };
|
|
108
|
-
}
|
|
109
|
-
let parsed;
|
|
110
|
-
try {
|
|
111
|
-
const raw = readFileSync(evidencePath, "utf8");
|
|
112
|
-
parsed = parseYaml(raw);
|
|
113
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
114
|
-
return { ok: false, reason: "evidence file is not an object (bare touch?)" };
|
|
115
|
-
}
|
|
116
|
-
if (typeof parsed.bundle_sha256 !== "string" || !Array.isArray(parsed.files)) {
|
|
117
|
-
return { ok: false, reason: "evidence file missing required fields (bare touch?)" };
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
catch (err) {
|
|
121
|
-
return { ok: false, reason: `evidence file unparseable: ${String(err)}` };
|
|
122
|
-
}
|
|
123
|
-
const requireDecision = args.requireDecision ?? "approve";
|
|
124
|
-
if (parsed.operator_decision !== requireDecision) {
|
|
125
|
-
return {
|
|
126
|
-
ok: false,
|
|
127
|
-
reason: `operator_decision is "${parsed.operator_decision ?? "pending"}"; needs "${requireDecision}"`,
|
|
128
|
-
evidence: parsed,
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
// Per-file hash check.
|
|
132
|
-
for (const entry of parsed.files) {
|
|
133
|
-
const abs = join(uatDir, entry.path);
|
|
134
|
-
if (!existsSync(abs)) {
|
|
135
|
-
return { ok: false, reason: `artifact missing: ${entry.path}`, evidence: parsed };
|
|
136
|
-
}
|
|
137
|
-
const recomputed = fileSha256(abs);
|
|
138
|
-
if (recomputed !== entry.sha256) {
|
|
139
|
-
return {
|
|
140
|
-
ok: false,
|
|
141
|
-
reason: `artifact modified after evidence written: ${entry.path}`,
|
|
142
|
-
evidence: parsed,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// Bundle hash check.
|
|
147
|
-
const recomputedBundle = bundleSha256(parsed.files);
|
|
148
|
-
if (recomputedBundle !== parsed.bundle_sha256) {
|
|
149
|
-
return {
|
|
150
|
-
ok: false,
|
|
151
|
-
reason: `bundle hash mismatch: claim ${parsed.bundle_sha256.slice(0, 12)}, recomputed ${recomputedBundle.slice(0, 12)}`,
|
|
152
|
-
evidence: parsed,
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
// Reject extra files not in the manifest (post-hoc additions).
|
|
156
|
-
const claimed = new Set(parsed.files.map((f) => f.path));
|
|
157
|
-
for (const rel of collectArtifactPaths(uatDir)) {
|
|
158
|
-
if (!claimed.has(rel)) {
|
|
159
|
-
return {
|
|
160
|
-
ok: false,
|
|
161
|
-
reason: `artifact added after evidence written: ${rel}`,
|
|
162
|
-
evidence: parsed,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return { ok: true, evidence: parsed };
|
|
167
|
-
}
|
|
168
|
-
//# sourceMappingURL=bundle.js.map
|
package/dist/uat/bundle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../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CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;YACvH,QAAQ,EAAE,MAAM;SACjB,CAAC;IACJ,CAAC;IAED,+DAA+D;IAC/D,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,KAAK,MAAM,GAAG,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,0CAA0C,GAAG,EAAE;gBACvD,QAAQ,EAAE,MAAM;aACjB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC"}
|
package/dist/uat/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type { CliExpectation, CliProbe, EvidenceFile, EvidenceFileEntry, HttpExpectation, HttpProbe, IntegrationProbe, ProbeKind, ProbeRunResult, SqlProbe, UatAcceptanceCheck, UatBundleArtifact, UatDecision, UatProbe, UatRejection, UatRunResult, UatRunnerInput, UatRunnerOutput, UatSummary, UiExpectation, UiProbe, UiStep, } from "./types.js";
|
|
2
|
-
export { UAT_RUNNER_OUTPUT_SCHEMA } from "./schema.js";
|
|
3
|
-
export { UAT_RUNNER_SYSTEM_PROMPT, buildUatRunnerUserPrompt } from "./prompt.js";
|
|
4
|
-
export { generateUatChecks } from "./runner.js";
|
|
5
|
-
export { executeProbe, runHttpProbe, runCliProbe, runUiProbe, runSqlProbe, runIntegrationProbe } from "./probes/index.js";
|
|
6
|
-
export { EVIDENCE_FILE_NAME, uatDirFor, fileSha256, bundleSha256, collectArtifactPaths, writeSummary, writeEvidenceFile, verifyEvidenceFile, } from "./bundle.js";
|
|
7
|
-
export type { WriteSummaryArgs, WriteEvidenceFileArgs, VerifyEvidenceArgs, VerifyEvidenceResult, } from "./bundle.js";
|
|
8
|
-
export { readUatTaskFile, upsertUatTask, } from "./persistent.js";
|
|
9
|
-
export type { UatTaskRecord, UatTaskStatus, UpsertUatTaskArgs, } from "./persistent.js";
|
|
10
|
-
export { runUat } from "./uat.js";
|
|
11
|
-
export type { ApprovalGate, ApprovalGateArgs, QuestionHandler, RunUatArgs, UatNotifier, } from "./uat.js";
|
|
12
|
-
export { QUESTION_AGENT_SYSTEM_PROMPT, runQuestionAgent, } from "./question.js";
|
|
13
|
-
export type { QuestionAgentInput, QuestionAgentOutput } from "./question.js";
|
|
14
|
-
export { captureUatRejection, extractAudioUrl, formatUatRejectionRemediation, writeRejectionYaml, } from "./rejection.js";
|
|
15
|
-
export type { CaptureUatRejectionArgs, UatRejectionRemediationArgs, WriteRejectionYamlArgs, } from "./rejection.js";
|
package/dist/uat/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { UAT_RUNNER_OUTPUT_SCHEMA } from "./schema.js";
|
|
2
|
-
export { UAT_RUNNER_SYSTEM_PROMPT, buildUatRunnerUserPrompt } from "./prompt.js";
|
|
3
|
-
export { generateUatChecks } from "./runner.js";
|
|
4
|
-
export { executeProbe, runHttpProbe, runCliProbe, runUiProbe, runSqlProbe, runIntegrationProbe } from "./probes/index.js";
|
|
5
|
-
export { EVIDENCE_FILE_NAME, uatDirFor, fileSha256, bundleSha256, collectArtifactPaths, writeSummary, writeEvidenceFile, verifyEvidenceFile, } from "./bundle.js";
|
|
6
|
-
export { readUatTaskFile, upsertUatTask, } from "./persistent.js";
|
|
7
|
-
export { runUat } from "./uat.js";
|
|
8
|
-
export { QUESTION_AGENT_SYSTEM_PROMPT, runQuestionAgent, } from "./question.js";
|
|
9
|
-
export { captureUatRejection, extractAudioUrl, formatUatRejectionRemediation, writeRejectionYaml, } from "./rejection.js";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/dist/uat/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/uat/index.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC1H,OAAO,EACL,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAOrB,OAAO,EACL,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,OAAO,EACL,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,gBAAgB,CAAC"}
|
package/dist/uat/persistent.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Persistent UAT.md per task — survives context resets.
|
|
3
|
-
*
|
|
4
|
-
* Per UAT_PIPELINE.md §8 + GSD pattern. One file per task at
|
|
5
|
-
* `.harness/tasks/<task_id>/uat.md`. Carries:
|
|
6
|
-
* - status: pending | passing | passed | failed | blocked | abandoned
|
|
7
|
-
* - acceptance criteria checklist (per AC, status icon)
|
|
8
|
-
* - cold-start smoke status
|
|
9
|
-
* - blocked_by (env issues) — NEVER folded into Gaps
|
|
10
|
-
* - Gaps from prior rejections
|
|
11
|
-
* - related run ids
|
|
12
|
-
*/
|
|
13
|
-
import type { UatSummary } from "./types.js";
|
|
14
|
-
export type UatTaskStatus = "pending" | "passing" | "passed" | "failed" | "blocked" | "abandoned";
|
|
15
|
-
export interface UatTaskRecord {
|
|
16
|
-
status: UatTaskStatus;
|
|
17
|
-
generated: string;
|
|
18
|
-
last_updated: string;
|
|
19
|
-
attempt: number;
|
|
20
|
-
related_run_ids: string[];
|
|
21
|
-
acceptance: {
|
|
22
|
-
id: string;
|
|
23
|
-
text: string;
|
|
24
|
-
status: "pass" | "fail" | "pending" | "skipped";
|
|
25
|
-
}[];
|
|
26
|
-
cold_start_smoke?: {
|
|
27
|
-
status: "pass" | "fail" | "skipped";
|
|
28
|
-
};
|
|
29
|
-
/** Environmental blockers (server down, third-party rate-limited). NEVER code bugs. */
|
|
30
|
-
blocked_by: string[];
|
|
31
|
-
/** Resolved gaps from prior rejections. */
|
|
32
|
-
gaps_resolved: {
|
|
33
|
-
run_id: string;
|
|
34
|
-
description: string;
|
|
35
|
-
}[];
|
|
36
|
-
/** Open gaps not yet resolved. */
|
|
37
|
-
gaps_open: {
|
|
38
|
-
run_id: string;
|
|
39
|
-
description: string;
|
|
40
|
-
}[];
|
|
41
|
-
notes?: string;
|
|
42
|
-
}
|
|
43
|
-
export declare function readUatTaskFile(repoRoot: string, taskId: string): UatTaskRecord | null;
|
|
44
|
-
export interface UpsertUatTaskArgs {
|
|
45
|
-
repoRoot: string;
|
|
46
|
-
taskId: string;
|
|
47
|
-
runId: string;
|
|
48
|
-
summary: UatSummary;
|
|
49
|
-
/** Final status to record on this attempt. */
|
|
50
|
-
status: UatTaskStatus;
|
|
51
|
-
/** New gap to record (from a rejection). */
|
|
52
|
-
newGap?: {
|
|
53
|
-
run_id: string;
|
|
54
|
-
description: string;
|
|
55
|
-
};
|
|
56
|
-
/** Gap descriptions to mark resolved. */
|
|
57
|
-
resolveGaps?: string[];
|
|
58
|
-
/** Optional blocked_by reason to add. */
|
|
59
|
-
blockedBy?: string;
|
|
60
|
-
/** Free-text notes appended to the body. */
|
|
61
|
-
notes?: string;
|
|
62
|
-
}
|
|
63
|
-
/** Create or update the per-task UAT.md. Idempotent. */
|
|
64
|
-
export declare function upsertUatTask(args: UpsertUatTaskArgs): Promise<string>;
|