@isaacriehm/cairn-core 0.7.0 → 0.7.1
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/align-undo/undo.js +2 -2
- package/dist/align-undo/undo.js.map +1 -1
- package/dist/attention/bulk-accept.js +48 -40
- package/dist/attention/bulk-accept.js.map +1 -1
- package/dist/attention/dedup.js +23 -10
- package/dist/attention/dedup.js.map +1 -1
- package/dist/attention/restore.js +2 -2
- package/dist/attention/restore.js.map +1 -1
- package/dist/attention/scoring.js +1 -1
- package/dist/attention/scoring.js.map +1 -1
- package/dist/attention/serve/api.d.ts +1 -0
- package/dist/attention/serve/api.js +127 -80
- package/dist/attention/serve/api.js.map +1 -1
- package/dist/attention/serve/index.d.ts +1 -0
- package/dist/attention/serve/index.js +21 -7
- package/dist/attention/serve/index.js.map +1 -1
- package/dist/attention/source-strip.js +41 -46
- package/dist/attention/source-strip.js.map +1 -1
- package/dist/claude/cache.d.ts +10 -19
- package/dist/claude/cache.js +0 -0
- package/dist/claude/cache.js.map +1 -1
- package/dist/claude/runner.d.ts +4 -6
- package/dist/claude/runner.js +242 -203
- package/dist/claude/runner.js.map +1 -1
- package/dist/claude/types.d.ts +5 -5
- package/dist/context/handoff-builder.d.ts +28 -4
- package/dist/context/handoff-builder.js +75 -157
- package/dist/context/handoff-builder.js.map +1 -1
- package/dist/context/spec-delta.js +61 -9
- package/dist/context/spec-delta.js.map +1 -1
- package/dist/context/task-summary.js +5 -1
- package/dist/context/task-summary.js.map +1 -1
- package/dist/decision-capture/id.js +1 -1
- package/dist/decision-capture/id.js.map +1 -1
- package/dist/doctor/index.d.ts +9 -11
- package/dist/doctor/index.js +118 -175
- package/dist/doctor/index.js.map +1 -1
- package/dist/drain/drain.d.ts +1 -1
- package/dist/drain/drain.js +16 -16
- package/dist/drain/drain.js.map +1 -1
- package/dist/drain/index.d.ts +1 -1
- package/dist/drain/index.js +1 -1
- package/dist/events/reader.d.ts +9 -10
- package/dist/events/reader.js +46 -57
- package/dist/events/reader.js.map +1 -1
- package/dist/events/writer.js +1 -1
- package/dist/events/writer.js.map +1 -1
- package/dist/fix-align/index.d.ts +1 -1
- package/dist/fix-align/index.js +1 -1
- package/dist/fix-align/run.d.ts +1 -1
- package/dist/fix-align/run.js +4 -3
- package/dist/fix-align/run.js.map +1 -1
- package/dist/fix-align/sentinel.d.ts +1 -2
- package/dist/fix-align/sentinel.js +3 -4
- package/dist/fix-align/sentinel.js.map +1 -1
- package/dist/gc/apply.js +1 -1
- package/dist/gc/apply.js.map +1 -1
- package/dist/gc/attested-commits.d.ts +19 -0
- package/dist/gc/attested-commits.js +48 -0
- package/dist/gc/attested-commits.js.map +1 -0
- package/dist/gc/canary.d.ts +11 -21
- package/dist/gc/canary.js +18 -24
- package/dist/gc/canary.js.map +1 -1
- package/dist/gc/citation-integrity.d.ts +11 -14
- package/dist/gc/citation-integrity.js +124 -125
- package/dist/gc/citation-integrity.js.map +1 -1
- package/dist/gc/classify.d.ts +1 -1
- package/dist/gc/classify.js +2 -2
- package/dist/gc/classify.js.map +1 -1
- package/dist/gc/completion-integrity.d.ts +6 -7
- package/dist/gc/completion-integrity.js +45 -53
- package/dist/gc/completion-integrity.js.map +1 -1
- package/dist/gc/doc-gardening.js +1 -9
- package/dist/gc/doc-gardening.js.map +1 -1
- package/dist/gc/frontmatter.js +2 -2
- package/dist/gc/frontmatter.js.map +1 -1
- package/dist/gc/index.d.ts +7 -6
- package/dist/gc/index.js +3 -2
- package/dist/gc/index.js.map +1 -1
- package/dist/gc/quality-update.d.ts +6 -10
- package/dist/gc/quality-update.js +12 -15
- package/dist/gc/quality-update.js.map +1 -1
- package/dist/gc/scope-coverage.js +1 -1
- package/dist/gc/scope-coverage.js.map +1 -1
- package/dist/gc/stub-hits.d.ts +7 -25
- package/dist/gc/stub-hits.js +14 -40
- package/dist/gc/stub-hits.js.map +1 -1
- package/dist/gc/sweep.js +15 -6
- package/dist/gc/sweep.js.map +1 -1
- package/dist/gc/types.d.ts +5 -5
- package/dist/gc/types.js +2 -2
- package/dist/gc/walk-source.js +8 -28
- package/dist/gc/walk-source.js.map +1 -1
- package/dist/hooks/defer.d.ts +9 -20
- package/dist/hooks/defer.js +10 -27
- package/dist/hooks/defer.js.map +1 -1
- package/dist/hooks/post-tool-use/allowlist-reader.d.ts +2 -1
- package/dist/hooks/post-tool-use/allowlist-reader.js +49 -34
- package/dist/hooks/post-tool-use/allowlist-reader.js.map +1 -1
- package/dist/hooks/post-tool-use/index.d.ts +3 -4
- package/dist/hooks/post-tool-use/index.js +3 -3
- package/dist/hooks/post-tool-use/index.js.map +1 -1
- package/dist/hooks/post-tool-use/legend-builder.d.ts +2 -2
- package/dist/hooks/post-tool-use/legend-builder.js +2 -2
- package/dist/hooks/post-tool-use/legend-builder.js.map +1 -1
- package/dist/hooks/post-tool-use/post-write.d.ts +8 -0
- package/dist/hooks/post-tool-use/post-write.js +112 -0
- package/dist/hooks/post-tool-use/post-write.js.map +1 -0
- package/dist/hooks/post-tool-use/read-enricher.d.ts +10 -5
- package/dist/hooks/post-tool-use/read-enricher.js +114 -155
- package/dist/hooks/post-tool-use/read-enricher.js.map +1 -1
- package/dist/hooks/post-tool-use/sot-align.d.ts +12 -0
- package/dist/hooks/post-tool-use/sot-align.js +73 -49
- package/dist/hooks/post-tool-use/sot-align.js.map +1 -1
- package/dist/hooks/post-tool-use/write-guardian.d.ts +40 -8
- package/dist/hooks/post-tool-use/write-guardian.js +202 -254
- package/dist/hooks/post-tool-use/write-guardian.js.map +1 -1
- package/dist/hooks/pre-commit/sot-align-precommit.js +2 -2
- package/dist/hooks/pre-commit/sot-align-precommit.js.map +1 -1
- package/dist/hooks/runners/index.d.ts +2 -2
- package/dist/hooks/runners/index.js +1 -1
- package/dist/hooks/runners/index.js.map +1 -1
- package/dist/hooks/runners/payload.d.ts +34 -19
- package/dist/hooks/runners/payload.js +47 -44
- package/dist/hooks/runners/payload.js.map +1 -1
- package/dist/hooks/runners/session-end.js +12 -11
- package/dist/hooks/runners/session-end.js.map +1 -1
- package/dist/hooks/runners/session-start.d.ts +4 -2
- package/dist/hooks/runners/session-start.js +88 -261
- package/dist/hooks/runners/session-start.js.map +1 -1
- package/dist/hooks/runners/stop.js +27 -8
- package/dist/hooks/runners/stop.js.map +1 -1
- package/dist/hooks/runners/user-prompt-submit.js +7 -1
- package/dist/hooks/runners/user-prompt-submit.js.map +1 -1
- package/dist/hooks/sot-align-common.d.ts +1 -2
- package/dist/hooks/sot-align-common.js +2 -2
- package/dist/hooks/sot-align-common.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/init/baseline-audit.d.ts +14 -58
- package/dist/init/baseline-audit.js +92 -320
- package/dist/init/baseline-audit.js.map +1 -1
- package/dist/init/brand-derive.d.ts +11 -15
- package/dist/init/brand-derive.js +21 -46
- package/dist/init/brand-derive.js.map +1 -1
- package/dist/init/brand-setup.d.ts +1 -1
- package/dist/init/brand-setup.js +1 -1
- package/dist/init/detect.d.ts +25 -6
- package/dist/init/detect.js +107 -136
- package/dist/init/detect.js.map +1 -1
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +1 -1
- package/dist/init/index.js.map +1 -1
- package/dist/init/ingest-docs.d.ts +2 -2
- package/dist/init/ingest-docs.js +31 -43
- package/dist/init/ingest-docs.js.map +1 -1
- package/dist/init/init.d.ts +21 -21
- package/dist/init/init.js +41 -61
- package/dist/init/init.js.map +1 -1
- package/dist/init/mapper-merge.js +1 -1
- package/dist/init/mapper-merge.js.map +1 -1
- package/dist/init/mapper-parallel.d.ts +1 -1
- package/dist/init/mapper-parallel.js +2 -1
- package/dist/init/mapper-parallel.js.map +1 -1
- package/dist/init/mapper.js +1 -1
- package/dist/init/mapper.js.map +1 -1
- package/dist/init/multi-dev/install.d.ts +5 -5
- package/dist/init/multi-dev/install.js +4 -4
- package/dist/init/overlay.js +1 -0
- package/dist/init/overlay.js.map +1 -1
- package/dist/init/phases/1-detect.js +1 -1
- package/dist/init/phases/1-detect.js.map +1 -1
- package/dist/init/phases/{7c-rules-merge.d.ts → 10-rules-merge.d.ts} +2 -2
- package/dist/init/phases/{7c-rules-merge.js → 10-rules-merge.js} +6 -12
- package/dist/init/phases/10-rules-merge.js.map +1 -0
- package/dist/init/phases/11-baseline.d.ts +7 -0
- package/dist/init/phases/{8-baseline.js → 11-baseline.js} +5 -9
- package/dist/init/phases/11-baseline.js.map +1 -0
- package/dist/init/phases/12-strip.d.ts +10 -0
- package/dist/init/phases/{10-strip.js → 12-strip.js} +10 -14
- package/dist/init/phases/12-strip.js.map +1 -0
- package/dist/init/phases/{12-multidev.d.ts → 13-multidev.d.ts} +2 -2
- package/dist/init/phases/{12-multidev.js → 13-multidev.js} +4 -4
- package/dist/init/phases/{12-multidev.js.map → 13-multidev.js.map} +1 -1
- package/dist/init/phases/3-mapper.d.ts +1 -1
- package/dist/init/phases/3-mapper.js +2 -2
- package/dist/init/phases/3-mapper.js.map +1 -1
- package/dist/init/phases/{3b-seed.d.ts → 4-seed.d.ts} +2 -2
- package/dist/init/phases/{3b-seed.js → 4-seed.js} +7 -7
- package/dist/init/phases/4-seed.js.map +1 -0
- package/dist/init/phases/{4-pilot.d.ts → 5-pilot.d.ts} +2 -2
- package/dist/init/phases/{4-pilot.js → 5-pilot.js} +9 -9
- package/dist/init/phases/{4-pilot.js.map → 5-pilot.js.map} +1 -1
- package/dist/init/phases/{5-brand.d.ts → 6-brand.d.ts} +2 -7
- package/dist/init/phases/{5-brand.js → 6-brand.js} +6 -14
- package/dist/init/phases/6-brand.js.map +1 -0
- package/dist/init/phases/{5b-topic-index.d.ts → 7-topic-index.d.ts} +2 -11
- package/dist/init/phases/{5b-topic-index.js → 7-topic-index.js} +9 -18
- package/dist/init/phases/7-topic-index.js.map +1 -0
- package/dist/init/phases/8-docs-ingest.d.ts +10 -0
- package/dist/init/phases/{6-docs-ingest.js → 8-docs-ingest.js} +6 -11
- package/dist/init/phases/8-docs-ingest.js.map +1 -0
- package/dist/init/phases/9-source-comments.d.ts +6 -0
- package/dist/init/phases/{7b-source-comments.js → 9-source-comments.js} +7 -26
- package/dist/init/phases/9-source-comments.js.map +1 -0
- package/dist/init/phases/index.d.ts +12 -12
- package/dist/init/phases/index.js +11 -11
- package/dist/init/phases/index.js.map +1 -1
- package/dist/init/phases/{parallel-678.d.ts → parallel-8910.d.ts} +7 -8
- package/dist/init/phases/{parallel-678.js → parallel-8910.js} +26 -44
- package/dist/init/phases/parallel-8910.js.map +1 -0
- package/dist/init/phases/source-comments-output-io.d.ts +3 -3
- package/dist/init/phases/source-comments-output-io.js +3 -3
- package/dist/init/phases/types.d.ts +1 -1
- package/dist/init/phases/types.js +10 -10
- package/dist/init/phases/types.js.map +1 -1
- package/dist/init/rules-merge/discover.d.ts +2 -2
- package/dist/init/rules-merge/discover.js +28 -43
- package/dist/init/rules-merge/discover.js.map +1 -1
- package/dist/init/rules-merge/ingest.d.ts +6 -6
- package/dist/init/rules-merge/ingest.js +9 -10
- package/dist/init/rules-merge/ingest.js.map +1 -1
- package/dist/init/rules-merge/keep-markers.d.ts +1 -1
- package/dist/init/rules-merge/keep-markers.js +1 -1
- package/dist/init/rules-merge/regenerate.d.ts +3 -3
- package/dist/init/rules-merge/regenerate.js +3 -3
- package/dist/init/seed.js +17 -24
- package/dist/init/seed.js.map +1 -1
- package/dist/init/sot-emit.d.ts +27 -9
- package/dist/init/sot-emit.js +39 -7
- package/dist/init/sot-emit.js.map +1 -1
- package/dist/init/source-comments/classify.d.ts +2 -2
- package/dist/init/source-comments/classify.js +9 -1
- package/dist/init/source-comments/classify.js.map +1 -1
- package/dist/init/source-comments/index.d.ts +1 -1
- package/dist/init/source-comments/index.js.map +1 -1
- package/dist/init/source-comments/ingest.d.ts +2 -2
- package/dist/init/source-comments/ingest.js +6 -8
- package/dist/init/source-comments/ingest.js.map +1 -1
- package/dist/init/source-comments/strip-replace.js +3 -2
- package/dist/init/source-comments/strip-replace.js.map +1 -1
- package/dist/init/source-comments/walker.d.ts +3 -26
- package/dist/init/source-comments/walker.js +18 -30
- package/dist/init/source-comments/walker.js.map +1 -1
- package/dist/init/topic-index/index.d.ts +1 -1
- package/dist/init/topic-index/index.js +3 -3
- package/dist/init/topic-index/index.js.map +1 -1
- package/dist/init/topic-index/judge.d.ts +5 -9
- package/dist/init/topic-index/judge.js +17 -22
- package/dist/init/topic-index/judge.js.map +1 -1
- package/dist/init/topic-index/resolve.d.ts +5 -4
- package/dist/init/topic-index/resolve.js +6 -6
- package/dist/init/topic-index/resolve.js.map +1 -1
- package/dist/init/topic-index/walk.d.ts +6 -6
- package/dist/init/topic-index/walk.js +9 -9
- package/dist/init/topic-index/walk.js.map +1 -1
- package/dist/lock.js +4 -1
- package/dist/lock.js.map +1 -1
- package/dist/logger.js +3 -0
- package/dist/logger.js.map +1 -1
- package/dist/mcp/history/summarizer.js +1 -1
- package/dist/mcp/history/summarizer.js.map +1 -1
- package/dist/mcp/history/walker.js +1 -1
- package/dist/mcp/history/walker.js.map +1 -1
- package/dist/mcp/path-allowlist.js +1 -1
- package/dist/mcp/path-allowlist.js.map +1 -1
- package/dist/mcp/schemas.d.ts +16 -38
- package/dist/mcp/schemas.js +8 -22
- package/dist/mcp/schemas.js.map +1 -1
- package/dist/mcp/server.js +10 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/archive.js +1 -1
- package/dist/mcp/tools/archive.js.map +1 -1
- package/dist/mcp/tools/attention-wait.js +12 -2
- package/dist/mcp/tools/attention-wait.js.map +1 -1
- package/dist/mcp/tools/bulk-accept-attention.js +29 -30
- package/dist/mcp/tools/bulk-accept-attention.js.map +1 -1
- package/dist/mcp/tools/canonical-for-topic.js +37 -15
- package/dist/mcp/tools/canonical-for-topic.js.map +1 -1
- package/dist/mcp/tools/decision-get.js +2 -2
- package/dist/mcp/tools/decision-get.js.map +1 -1
- package/dist/mcp/tools/decisions-for-symbol.js +2 -2
- package/dist/mcp/tools/decisions-for-symbol.js.map +1 -1
- package/dist/mcp/tools/get-full.js +1 -1
- package/dist/mcp/tools/get-full.js.map +1 -1
- package/dist/mcp/tools/ground-get.js +1 -1
- package/dist/mcp/tools/ground-get.js.map +1 -1
- package/dist/mcp/tools/in-scope.d.ts +8 -0
- package/dist/mcp/tools/in-scope.js +125 -0
- package/dist/mcp/tools/in-scope.js.map +1 -0
- package/dist/mcp/tools/index.js +7 -10
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/init-phases.d.ts +3 -2
- package/dist/mcp/tools/init-phases.js +125 -124
- package/dist/mcp/tools/init-phases.js.map +1 -1
- package/dist/mcp/tools/invariant-get.js +2 -2
- package/dist/mcp/tools/invariant-get.js.map +1 -1
- package/dist/mcp/tools/record-decision.d.ts +4 -3
- package/dist/mcp/tools/record-decision.js +111 -36
- package/dist/mcp/tools/record-decision.js.map +1 -1
- package/dist/mcp/tools/reject-candidate.d.ts +1 -1
- package/dist/mcp/tools/reject-candidate.js +3 -3
- package/dist/mcp/tools/reject-candidate.js.map +1 -1
- package/dist/mcp/tools/resolve-attention.d.ts +5 -18
- package/dist/mcp/tools/resolve-attention.js +58 -158
- package/dist/mcp/tools/resolve-attention.js.map +1 -1
- package/dist/mcp/tools/search-candidates.d.ts +1 -1
- package/dist/mcp/tools/search-candidates.js +4 -4
- package/dist/mcp/tools/search-candidates.js.map +1 -1
- package/dist/mcp/tools/search.js +5 -4
- package/dist/mcp/tools/search.js.map +1 -1
- package/dist/mcp/tools/supersedes-chain.js +2 -2
- package/dist/mcp/tools/supersedes-chain.js.map +1 -1
- package/dist/mcp/tools/task-create.d.ts +1 -0
- package/dist/mcp/tools/task-create.js +2 -0
- package/dist/mcp/tools/task-create.js.map +1 -1
- package/dist/mcp/tools/timeline.js +1 -1
- package/dist/mcp/tools/timeline.js.map +1 -1
- package/dist/mcp/tools/types.d.ts +1 -0
- package/dist/mcp/tools/types.js +9 -1
- package/dist/mcp/tools/types.js.map +1 -1
- package/dist/sensors/attestation.d.ts +1 -1
- package/dist/sensors/attestation.js +2 -2
- package/dist/sensors/attestation.js.map +1 -1
- package/dist/sensors/catalog.d.ts +26 -28
- package/dist/sensors/catalog.js +79 -81
- package/dist/sensors/catalog.js.map +1 -1
- package/dist/sensors/decisions.d.ts +1 -1
- package/dist/sensors/decisions.js +15 -14
- package/dist/sensors/decisions.js.map +1 -1
- package/dist/sensors/diff.js +46 -22
- package/dist/sensors/diff.js.map +1 -1
- package/dist/sensors/runner.d.ts +2 -2
- package/dist/sensors/runner.js +3 -3
- package/dist/sensors/shell.d.ts +4 -0
- package/dist/sensors/shell.js +16 -0
- package/dist/sensors/shell.js.map +1 -0
- package/dist/sensors/structural.d.ts +3 -2
- package/dist/sensors/structural.js +3 -11
- package/dist/sensors/structural.js.map +1 -1
- package/dist/sensors/stub-catalog.d.ts +2 -1
- package/dist/sensors/stub-catalog.js +2 -9
- package/dist/sensors/stub-catalog.js.map +1 -1
- package/dist/sensors/types.d.ts +3 -4
- package/dist/sensors/types.js +1 -2
- package/dist/sensors/types.js.map +1 -1
- package/dist/session-start/build.js +1 -1
- package/dist/session-start/build.js.map +1 -1
- package/dist/status-line/event-queue.js +1 -1
- package/dist/status-line/index.d.ts +1 -1
- package/package.json +3 -2
- package/templates/.cairn/config/sensors.yaml +8 -8
- package/templates/attention-ui/app.js +61 -36
- package/dist/fs.d.ts +0 -5
- package/dist/fs.js +0 -11
- package/dist/fs.js.map +0 -1
- package/dist/ground/alignment-pending.d.ts +0 -28
- package/dist/ground/alignment-pending.js +0 -83
- package/dist/ground/alignment-pending.js.map +0 -1
- package/dist/ground/anchor-map.d.ts +0 -14
- package/dist/ground/anchor-map.js +0 -56
- package/dist/ground/anchor-map.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/file-candidates-map.d.ts +0 -23
- package/dist/ground/file-candidates-map.js +0 -76
- package/dist/ground/file-candidates-map.js.map +0 -1
- package/dist/ground/frontmatter.d.ts +0 -32
- package/dist/ground/frontmatter.js +0 -77
- 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 -25
- package/dist/ground/index.js +0 -19
- package/dist/ground/index.js.map +0 -1
- package/dist/ground/ledgers.d.ts +0 -14
- package/dist/ground/ledgers.js +0 -105
- package/dist/ground/ledgers.js.map +0 -1
- package/dist/ground/manifest.d.ts +0 -10
- package/dist/ground/manifest.js +0 -84
- package/dist/ground/manifest.js.map +0 -1
- package/dist/ground/paths.d.ts +0 -43
- package/dist/ground/paths.js +0 -109
- package/dist/ground/paths.js.map +0 -1
- package/dist/ground/quality-grades.d.ts +0 -11
- package/dist/ground/quality-grades.js +0 -100
- package/dist/ground/quality-grades.js.map +0 -1
- package/dist/ground/rejected.d.ts +0 -42
- package/dist/ground/rejected.js +0 -100
- package/dist/ground/rejected.js.map +0 -1
- package/dist/ground/schemas.d.ts +0 -582
- package/dist/ground/schemas.js +0 -372
- package/dist/ground/schemas.js.map +0 -1
- package/dist/ground/scope-index.d.ts +0 -96
- package/dist/ground/scope-index.js +0 -290
- package/dist/ground/scope-index.js.map +0 -1
- package/dist/ground/slug.d.ts +0 -60
- package/dist/ground/slug.js +0 -103
- package/dist/ground/slug.js.map +0 -1
- package/dist/ground/sot-bindings.d.ts +0 -14
- package/dist/ground/sot-bindings.js +0 -79
- package/dist/ground/sot-bindings.js.map +0 -1
- package/dist/ground/sot-cache.d.ts +0 -18
- package/dist/ground/sot-cache.js +0 -62
- package/dist/ground/sot-cache.js.map +0 -1
- package/dist/ground/topic-index.d.ts +0 -27
- package/dist/ground/topic-index.js +0 -82
- package/dist/ground/topic-index.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/hooks/post-tool-use/ledger-cache.d.ts +0 -53
- package/dist/hooks/post-tool-use/ledger-cache.js +0 -338
- package/dist/hooks/post-tool-use/ledger-cache.js.map +0 -1
- package/dist/init/phases/10-strip.d.ts +0 -11
- package/dist/init/phases/10-strip.js.map +0 -1
- package/dist/init/phases/3b-seed.js.map +0 -1
- package/dist/init/phases/5-brand.js.map +0 -1
- package/dist/init/phases/5b-topic-index.js.map +0 -1
- package/dist/init/phases/6-docs-ingest.d.ts +0 -15
- package/dist/init/phases/6-docs-ingest.js.map +0 -1
- package/dist/init/phases/7b-source-comments.d.ts +0 -15
- package/dist/init/phases/7b-source-comments.js.map +0 -1
- package/dist/init/phases/7c-rules-merge.js.map +0 -1
- package/dist/init/phases/8-baseline.d.ts +0 -10
- package/dist/init/phases/8-baseline.js.map +0 -1
- package/dist/init/phases/parallel-678.js.map +0 -1
- package/dist/mcp/tools/decisions-in-scope.d.ts +0 -7
- package/dist/mcp/tools/decisions-in-scope.js +0 -66
- package/dist/mcp/tools/decisions-in-scope.js.map +0 -1
- package/dist/mcp/tools/invariants-in-scope.d.ts +0 -7
- package/dist/mcp/tools/invariants-in-scope.js +0 -81
- package/dist/mcp/tools/invariants-in-scope.js.map +0 -1
- package/dist/mcp/tools/propose-decision.d.ts +0 -34
- package/dist/mcp/tools/propose-decision.js +0 -200
- package/dist/mcp/tools/propose-decision.js.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combined PostToolUse hook for Write/Edit tools.
|
|
3
|
+
*
|
|
4
|
+
* Merges the Write Guardian (safety/scope hints) and Layer A alignment
|
|
5
|
+
* into a single runner. This saves ~300ms of Node/CLI boot overhead
|
|
6
|
+
* by running both logically sequential tasks in a single process.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { resolveRepoRoot } from "../../session-start/index.js";
|
|
10
|
+
import { readHookStdin } from "../runners/payload.js";
|
|
11
|
+
import { executeSotAlign } from "./sot-align.js";
|
|
12
|
+
import { executeWriteGuardian } from "./write-guardian.js";
|
|
13
|
+
import { logger } from "../../logger.js";
|
|
14
|
+
const log = logger("hooks.post-tool-use.post-write");
|
|
15
|
+
const ClaudePostToolUsePayloadSchema = z.object({
|
|
16
|
+
session_id: z.string().optional(),
|
|
17
|
+
transcript_path: z.string().optional(),
|
|
18
|
+
cwd: z.string().optional(),
|
|
19
|
+
hook_event_name: z.string().optional(),
|
|
20
|
+
tool_name: z.string().optional(),
|
|
21
|
+
tool_input: z.object({
|
|
22
|
+
file_path: z.string().optional(),
|
|
23
|
+
new_string: z.string().optional(),
|
|
24
|
+
}).passthrough().optional(),
|
|
25
|
+
tool_response: z.object({
|
|
26
|
+
content: z.string().optional(),
|
|
27
|
+
text: z.string().optional(),
|
|
28
|
+
output: z.string().optional(),
|
|
29
|
+
}).passthrough().optional(),
|
|
30
|
+
}).passthrough();
|
|
31
|
+
function parsePayload(text) {
|
|
32
|
+
if (text.trim().length === 0)
|
|
33
|
+
return {};
|
|
34
|
+
try {
|
|
35
|
+
const raw = JSON.parse(text);
|
|
36
|
+
const result = ClaudePostToolUsePayloadSchema.safeParse(raw);
|
|
37
|
+
return result.success ? result.data : {};
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function emitShapeB(additionalContext) {
|
|
44
|
+
const out = {
|
|
45
|
+
continue: true,
|
|
46
|
+
hookSpecificOutput: {
|
|
47
|
+
hookEventName: "PostToolUse",
|
|
48
|
+
additionalContext,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
process.stdout.write(JSON.stringify(out));
|
|
52
|
+
process.stdout.write("\n");
|
|
53
|
+
}
|
|
54
|
+
function emitBlock(reason) {
|
|
55
|
+
const out = {
|
|
56
|
+
continue: false,
|
|
57
|
+
decision: "block",
|
|
58
|
+
reason,
|
|
59
|
+
};
|
|
60
|
+
process.stdout.write(JSON.stringify(out));
|
|
61
|
+
process.stdout.write("\n");
|
|
62
|
+
}
|
|
63
|
+
export async function runPostWriteHook() {
|
|
64
|
+
try {
|
|
65
|
+
const raw = await readHookStdin();
|
|
66
|
+
const payload = parsePayload(raw);
|
|
67
|
+
const tool = payload.tool_name;
|
|
68
|
+
if (tool !== "Write" && tool !== "Edit") {
|
|
69
|
+
emitShapeB("");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const filePath = payload.tool_input?.file_path;
|
|
73
|
+
if (filePath === undefined || filePath.length === 0) {
|
|
74
|
+
emitShapeB("");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const cwd = payload.cwd ?? process.cwd();
|
|
78
|
+
const repoRoot = resolveRepoRoot(cwd);
|
|
79
|
+
if (repoRoot === null) {
|
|
80
|
+
emitShapeB("");
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// 1. Run Guardian (can block)
|
|
84
|
+
// Needs content — extract from tool_response
|
|
85
|
+
const content = payload.tool_response?.content ?? payload.tool_response?.text ?? payload.tool_response?.output ?? "";
|
|
86
|
+
const guard = executeWriteGuardian({
|
|
87
|
+
repoRoot,
|
|
88
|
+
relPath: filePath,
|
|
89
|
+
content,
|
|
90
|
+
payload,
|
|
91
|
+
});
|
|
92
|
+
if (guard.kind === "block") {
|
|
93
|
+
emitBlock(guard.message ?? "blocked");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// 2. Run SoT Align (hint only)
|
|
97
|
+
const alignSummary = await executeSotAlign(payload, repoRoot);
|
|
98
|
+
// 3. Merge and Emit
|
|
99
|
+
const sections = [];
|
|
100
|
+
if (guard.message)
|
|
101
|
+
sections.push(guard.message);
|
|
102
|
+
if (alignSummary.length > 0)
|
|
103
|
+
sections.push(alignSummary);
|
|
104
|
+
emitShapeB(sections.join("\n\n"));
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
108
|
+
log.warn({ err: message }, "Post-write hook failed; degrading to no-op");
|
|
109
|
+
emitShapeB("");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=post-write.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-write.js","sourceRoot":"","sources":["../../../src/hooks/post-tool-use/post-write.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,GAAG,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAErD,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;QACtB,OAAO,EAAE,CAA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CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,+BAA+B;QAC/B,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAE9D,oBAAoB;QACpB,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,KAAK,CAAC,OAAO;YAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAEzD,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,GAAG,CAAC,IAAI,CACN,EAAE,GAAG,EAAE,OAAO,EAAE,EAChB,4CAA4C,CAC7C,CAAC;QACF,UAAU,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Scans the file content the agent just read for cairn citation
|
|
5
5
|
* patterns (`§INV-NNNN`, `TODO(TSK-<id>)`, banned `DEC-<N>`) and prepends a
|
|
6
|
-
* legend block
|
|
7
|
-
* field so the agent sees authoritative resolutions inline with the
|
|
8
|
-
* file content. No MCP round-trip; all sources read directly from
|
|
9
|
-
* `.cairn/` on disk.
|
|
6
|
+
* legend block to Shape-B `additionalContext`.
|
|
10
7
|
*
|
|
11
|
-
*
|
|
8
|
+
* This hook is critical for "Honest Agent" context continuity — it
|
|
9
|
+
* ensures that if an agent reads a file carrying a bare cite, it
|
|
10
|
+
* immediately sees the definition and rationale for that cite without
|
|
11
|
+
* having to manually fetch the DEC/INV artifact.
|
|
12
|
+
*
|
|
13
|
+
* Spec: docs/READ_ENRICHER_SPEC.md.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Hook entry point.
|
|
12
17
|
*/
|
|
13
18
|
export declare function runReadEnricher(): Promise<void>;
|
|
@@ -3,93 +3,49 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Scans the file content the agent just read for cairn citation
|
|
5
5
|
* patterns (`§INV-NNNN`, `TODO(TSK-<id>)`, banned `DEC-<N>`) and prepends a
|
|
6
|
-
* legend block
|
|
7
|
-
* field so the agent sees authoritative resolutions inline with the
|
|
8
|
-
* file content. No MCP round-trip; all sources read directly from
|
|
9
|
-
* `.cairn/` on disk.
|
|
6
|
+
* legend block to Shape-B `additionalContext`.
|
|
10
7
|
*
|
|
11
|
-
*
|
|
8
|
+
* This hook is critical for "Honest Agent" context continuity — it
|
|
9
|
+
* ensures that if an agent reads a file carrying a bare cite, it
|
|
10
|
+
* immediately sees the definition and rationale for that cite without
|
|
11
|
+
* having to manually fetch the DEC/INV artifact.
|
|
12
|
+
*
|
|
13
|
+
* Spec: docs/READ_ENRICHER_SPEC.md.
|
|
12
14
|
*/
|
|
13
|
-
import { relative } from "node:path";
|
|
14
|
-
import {
|
|
15
|
+
import { resolve, relative } from "node:path";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { getDecisionsLedger, getInvariantsLedger, getScopeIndexEntry, lookupTask, } from "@isaacriehm/cairn-state";
|
|
18
|
+
import { readHookStdin, emitShapeB, appendTelemetry, } from "../runners/payload.js";
|
|
15
19
|
import { resolveRepoRoot } from "../../session-start/index.js";
|
|
16
|
-
import { appendTrace } from "../../trace/index.js";
|
|
17
20
|
import { scanCitations } from "./citation-scanner.js";
|
|
18
|
-
import { getDecisionsLedger, getFileCandidateCount, getInvariantsLedger, getScopeIndexEntry, lookupTask, } from "./ledger-cache.js";
|
|
19
21
|
import { buildLegend } from "./legend-builder.js";
|
|
22
|
+
import { logger } from "../../logger.js";
|
|
20
23
|
const MAX_CONTENT_BYTES = 512_000;
|
|
21
24
|
const BINARY_SAMPLE_BYTES = 1024;
|
|
22
25
|
const BINARY_THRESHOLD = 0.05;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
const candidates = ["content", "text", "output"];
|
|
48
|
-
for (const k of candidates) {
|
|
49
|
-
const v = resp[k];
|
|
50
|
-
if (typeof v === "string" && v.length > 0)
|
|
51
|
-
return v;
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|
|
55
|
-
function isBinary(content) {
|
|
56
|
-
const sampleLen = Math.min(content.length, BINARY_SAMPLE_BYTES);
|
|
57
|
-
if (sampleLen === 0)
|
|
58
|
-
return false;
|
|
59
|
-
let suspicious = 0;
|
|
60
|
-
for (let i = 0; i < sampleLen; i++) {
|
|
61
|
-
const code = content.charCodeAt(i);
|
|
62
|
-
if (code < 0x09 || (code >= 0x0e && code <= 0x1f))
|
|
63
|
-
suspicious++;
|
|
64
|
-
}
|
|
65
|
-
return suspicious / sampleLen > BINARY_THRESHOLD;
|
|
66
|
-
}
|
|
67
|
-
function isExcludedPath(relPath) {
|
|
68
|
-
if (relPath.startsWith(".archive/") || relPath === ".archive")
|
|
69
|
-
return true;
|
|
70
|
-
if (relPath.startsWith(".cairn/ground/") ||
|
|
71
|
-
relPath === ".cairn/ground") {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
function computeRelPath(repoRoot, filePath) {
|
|
77
|
-
const rel = relative(repoRoot, filePath);
|
|
78
|
-
if (rel.startsWith("..") || rel.length === 0)
|
|
79
|
-
return filePath;
|
|
80
|
-
return rel.replace(/\\/g, "/");
|
|
81
|
-
}
|
|
82
|
-
function emitShapeB(additionalContext) {
|
|
83
|
-
const out = {
|
|
84
|
-
continue: true,
|
|
85
|
-
hookSpecificOutput: {
|
|
86
|
-
hookEventName: "PostToolUse",
|
|
87
|
-
additionalContext,
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
process.stdout.write(JSON.stringify(out));
|
|
91
|
-
process.stdout.write("\n");
|
|
92
|
-
}
|
|
26
|
+
const ClaudePostToolUsePayloadSchema = z.object({
|
|
27
|
+
session_id: z.string().optional(),
|
|
28
|
+
transcript_path: z.string().optional(),
|
|
29
|
+
cwd: z.string().optional(),
|
|
30
|
+
hook_event_name: z.string().optional(),
|
|
31
|
+
tool_name: z.string().optional(),
|
|
32
|
+
tool_input: z.object({
|
|
33
|
+
file_path: z.string().optional(),
|
|
34
|
+
}).optional(),
|
|
35
|
+
tool_response: z.object({
|
|
36
|
+
content: z.string().optional(),
|
|
37
|
+
text: z.string().optional(),
|
|
38
|
+
output: z.string().optional(),
|
|
39
|
+
file: z.object({
|
|
40
|
+
content: z.string().optional(),
|
|
41
|
+
text: z.string().optional(),
|
|
42
|
+
}).passthrough().optional(),
|
|
43
|
+
}).passthrough().optional(),
|
|
44
|
+
}).passthrough();
|
|
45
|
+
const log = logger("hooks.post-tool-use.read-enricher");
|
|
46
|
+
/**
|
|
47
|
+
* Hook entry point.
|
|
48
|
+
*/
|
|
93
49
|
export async function runReadEnricher() {
|
|
94
50
|
const ts = new Date().toISOString();
|
|
95
51
|
let outcome = { skip: "unknown" };
|
|
@@ -98,15 +54,13 @@ export async function runReadEnricher() {
|
|
|
98
54
|
try {
|
|
99
55
|
const raw = await readHookStdin();
|
|
100
56
|
const payload = parsePayload(raw);
|
|
101
|
-
sessionForTrace =
|
|
57
|
+
sessionForTrace = payload.session_id ?? null;
|
|
102
58
|
if (payload.tool_name !== "Read") {
|
|
103
59
|
outcome = { skip: "non-read-tool", tool_name: payload.tool_name };
|
|
104
|
-
emitShapeB("");
|
|
60
|
+
emitShapeB("", "PostToolUse");
|
|
105
61
|
return;
|
|
106
62
|
}
|
|
107
|
-
const filePath =
|
|
108
|
-
? payload.tool_input.file_path
|
|
109
|
-
: undefined;
|
|
63
|
+
const filePath = payload.tool_input?.file_path;
|
|
110
64
|
const content = pickContent(payload.tool_response);
|
|
111
65
|
if (filePath === undefined || content === undefined || content.length === 0) {
|
|
112
66
|
outcome = {
|
|
@@ -115,96 +69,101 @@ export async function runReadEnricher() {
|
|
|
115
69
|
content_present: content !== undefined,
|
|
116
70
|
content_chars: content?.length ?? 0,
|
|
117
71
|
};
|
|
118
|
-
emitShapeB("");
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (content.length > MAX_CONTENT_BYTES) {
|
|
122
|
-
outcome = { skip: "content-too-large", content_chars: content.length };
|
|
123
|
-
emitShapeB("");
|
|
72
|
+
emitShapeB("", "PostToolUse");
|
|
124
73
|
return;
|
|
125
74
|
}
|
|
126
|
-
const
|
|
75
|
+
const cwd = payload.cwd ?? process.cwd();
|
|
76
|
+
const repoRoot = resolveRepoRoot(cwd);
|
|
127
77
|
repoRootForTrace = repoRoot;
|
|
128
78
|
if (repoRoot === null) {
|
|
129
|
-
outcome = { skip: "
|
|
130
|
-
emitShapeB("");
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const relPath = computeRelPath(repoRoot, filePath);
|
|
134
|
-
if (isExcludedPath(relPath)) {
|
|
135
|
-
outcome = { skip: "excluded-path", rel_path: relPath };
|
|
136
|
-
emitShapeB("");
|
|
79
|
+
outcome = { skip: "not-adopted", cwd };
|
|
80
|
+
emitShapeB("", "PostToolUse");
|
|
137
81
|
return;
|
|
138
82
|
}
|
|
83
|
+
const relPath = relative(repoRoot, resolve(cwd, filePath));
|
|
139
84
|
if (isBinary(content)) {
|
|
140
|
-
outcome = { skip: "binary
|
|
141
|
-
emitShapeB("");
|
|
85
|
+
outcome = { skip: "binary", path: relPath };
|
|
86
|
+
emitShapeB("", "PostToolUse");
|
|
142
87
|
return;
|
|
143
88
|
}
|
|
144
|
-
const
|
|
145
|
-
const
|
|
89
|
+
const citations = scanCitations(content);
|
|
90
|
+
const scopeEntry = getScopeIndexEntry(repoRoot, relPath);
|
|
146
91
|
const decisionsLedger = getDecisionsLedger(repoRoot);
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
decisions: cachedEntry.decisions,
|
|
151
|
-
invariants: cachedEntry.invariants,
|
|
152
|
-
}
|
|
153
|
-
: null;
|
|
154
|
-
const resolveTaskFn = (taskId) => lookupTask(repoRoot, taskId);
|
|
155
|
-
// PR 2 / PHASE_6_REDESIGN §4.7 — O(1) lookup against the
|
|
156
|
-
// file-candidates-map. Stays at 0 (silent) on un-adopted projects
|
|
157
|
-
// and on files that aren't the SoT for any unpromoted candidate.
|
|
158
|
-
const unpromotedCandidates = getFileCandidateCount(repoRoot, relPath);
|
|
159
|
-
const legend = buildLegend(matches, invariantsLedger, decisionsLedger, scopeHint, resolveTaskFn, unpromotedCandidates);
|
|
160
|
-
if (legend === null) {
|
|
161
|
-
outcome = {
|
|
162
|
-
skip: "no-citations-no-scope",
|
|
163
|
-
rel_path: relPath,
|
|
164
|
-
decisions_matched: matches.decisions.length,
|
|
165
|
-
invariants_matched: matches.invariants.length,
|
|
166
|
-
todos_matched: matches.todos.length,
|
|
167
|
-
unpromoted_candidates: unpromotedCandidates,
|
|
168
|
-
};
|
|
169
|
-
emitShapeB("");
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
92
|
+
const invariantsLedger = getInvariantsLedger(repoRoot);
|
|
93
|
+
const resolveTaskFn = (id) => lookupTask(repoRoot, id);
|
|
94
|
+
const legend = buildLegend(citations, invariantsLedger, decisionsLedger, scopeEntry, resolveTaskFn);
|
|
172
95
|
outcome = {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
96
|
+
ok: true,
|
|
97
|
+
path: relPath,
|
|
98
|
+
citations: {
|
|
99
|
+
invariants: citations.invariants.length,
|
|
100
|
+
decisions: citations.decisions.length,
|
|
101
|
+
todos: citations.todos.length,
|
|
102
|
+
},
|
|
103
|
+
legend_chars: legend?.length ?? 0,
|
|
180
104
|
};
|
|
181
|
-
emitShapeB(legend);
|
|
105
|
+
emitShapeB(legend ?? "", "PostToolUse");
|
|
182
106
|
}
|
|
183
107
|
catch (err) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
catch {
|
|
190
|
-
// Last-resort: nothing we can do.
|
|
191
|
-
}
|
|
108
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
109
|
+
outcome = { error: message };
|
|
110
|
+
log.error({ err: message }, "read-enricher hook failed");
|
|
111
|
+
emitShapeB("", "PostToolUse");
|
|
192
112
|
}
|
|
193
113
|
finally {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
appendTrace({
|
|
199
|
-
ts,
|
|
200
|
-
source: "hook",
|
|
114
|
+
if (repoRootForTrace !== null) {
|
|
115
|
+
appendTelemetry({
|
|
116
|
+
repoRoot: repoRootForTrace,
|
|
117
|
+
sessionId: sessionForTrace,
|
|
201
118
|
kind: "read-enrich",
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
119
|
+
durationMs: Date.now() - Date.parse(ts),
|
|
120
|
+
source: "hook",
|
|
121
|
+
warnings: [],
|
|
122
|
+
extra: outcome,
|
|
206
123
|
});
|
|
207
124
|
}
|
|
208
125
|
}
|
|
209
126
|
}
|
|
127
|
+
function parsePayload(text) {
|
|
128
|
+
if (text.trim().length === 0)
|
|
129
|
+
return {};
|
|
130
|
+
try {
|
|
131
|
+
const raw = JSON.parse(text);
|
|
132
|
+
const result = ClaudePostToolUsePayloadSchema.safeParse(raw);
|
|
133
|
+
return result.success ? result.data : {};
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return {};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function pickContent(resp) {
|
|
140
|
+
if (resp === undefined)
|
|
141
|
+
return undefined;
|
|
142
|
+
// Claude Code's Read tool wraps the body as `tool_response.file.content`.
|
|
143
|
+
// Check the nested file shape FIRST so it wins over any same-named key
|
|
144
|
+
// at the top level.
|
|
145
|
+
if (resp.file !== undefined) {
|
|
146
|
+
const f = resp.file;
|
|
147
|
+
if (typeof f.content === "string" && f.content.length > 0)
|
|
148
|
+
return f.content;
|
|
149
|
+
if (typeof f.text === "string" && f.text.length > 0)
|
|
150
|
+
return f.text;
|
|
151
|
+
}
|
|
152
|
+
if (typeof resp.content === "string" && resp.content.length > 0)
|
|
153
|
+
return resp.content;
|
|
154
|
+
if (typeof resp.text === "string" && resp.text.length > 0)
|
|
155
|
+
return resp.text;
|
|
156
|
+
if (typeof resp.output === "string" && resp.output.length > 0)
|
|
157
|
+
return resp.output;
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
function isBinary(content) {
|
|
161
|
+
const sampleLen = Math.min(content.length, BINARY_SAMPLE_BYTES);
|
|
162
|
+
let nullCount = 0;
|
|
163
|
+
for (let i = 0; i < sampleLen; i++) {
|
|
164
|
+
if (content.charCodeAt(i) === 0)
|
|
165
|
+
nullCount++;
|
|
166
|
+
}
|
|
167
|
+
return nullCount / sampleLen > BINARY_THRESHOLD;
|
|
168
|
+
}
|
|
210
169
|
//# sourceMappingURL=read-enricher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-enricher.js","sourceRoot":"","sources":["../../../src/hooks/post-tool-use/read-enricher.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"read-enricher.js","sourceRoot":"","sources":["../../../src/hooks/post-tool-use/read-enricher.ts"],"names":[],"mappings":"AAAA;;;;;;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C,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IAC5E,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,MAAM,CAAC;IAElF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,OAAe;IAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAChE,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;YAAE,SAAS,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAClD,CAAC"}
|
|
@@ -46,6 +46,17 @@
|
|
|
46
46
|
* (`.md`/`.mdx`) skipped entirely — operator-curated narrative is
|
|
47
47
|
* handled by phase 5b's topic-index + the doc-drift sensor.
|
|
48
48
|
*/
|
|
49
|
+
import { z } from "zod";
|
|
50
|
+
declare const ClaudePostToolUsePayloadSchema: z.ZodObject<{
|
|
51
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
52
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
53
|
+
hook_event_name: z.ZodOptional<z.ZodString>;
|
|
54
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
tool_input: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
file_path: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
}, z.core.$loose>;
|
|
59
|
+
type ClaudePostToolUsePayload = z.infer<typeof ClaudePostToolUsePayloadSchema>;
|
|
49
60
|
export interface AlignFileArgs {
|
|
50
61
|
repoRoot: string;
|
|
51
62
|
/** Repo-relative POSIX path written by Claude Code. */
|
|
@@ -163,4 +174,5 @@ export interface AlignFileResult {
|
|
|
163
174
|
*/
|
|
164
175
|
export declare function alignFile(args: AlignFileArgs): Promise<AlignFileResult>;
|
|
165
176
|
export declare function runSotAlign(): Promise<void>;
|
|
177
|
+
export declare function executeSotAlign(payload: ClaudePostToolUsePayload, repoRoot: string): Promise<string>;
|
|
166
178
|
export {};
|