@isaacriehm/cairn-core 0.19.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/align-undo/log.js +3 -2
- package/dist/align-undo/log.js.map +1 -1
- package/dist/attention/index.d.ts +0 -2
- package/dist/attention/index.js +0 -2
- package/dist/attention/index.js.map +1 -1
- package/dist/attention/restore.d.ts +1 -1
- package/dist/attention/restore.js +1 -1
- package/dist/attention/source-strip.d.ts +2 -2
- package/dist/attention/source-strip.js +4 -3
- package/dist/attention/source-strip.js.map +1 -1
- package/dist/components/audit.d.ts +7 -1
- package/dist/components/audit.js +144 -72
- package/dist/components/audit.js.map +1 -1
- package/dist/components/emit.js +33 -6
- package/dist/components/emit.js.map +1 -1
- package/dist/components/freshness.d.ts +51 -0
- package/dist/components/freshness.js +121 -0
- package/dist/components/freshness.js.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/reconfirm.d.ts +64 -0
- package/dist/components/reconfirm.js +204 -0
- package/dist/components/reconfirm.js.map +1 -0
- package/dist/context/handoff-builder.js +3 -3
- package/dist/context/handoff-builder.js.map +1 -1
- package/dist/context/task-summary.js +2 -2
- package/dist/context/task-summary.js.map +1 -1
- package/dist/doctor/index.js +102 -9
- package/dist/doctor/index.js.map +1 -1
- package/dist/events/paths.js +2 -2
- package/dist/events/paths.js.map +1 -1
- package/dist/fix-align/sentinel.js +2 -3
- package/dist/fix-align/sentinel.js.map +1 -1
- package/dist/gc/attested-commits.js +2 -2
- package/dist/gc/attested-commits.js.map +1 -1
- package/dist/gc/canary.js +2 -3
- package/dist/gc/canary.js.map +1 -1
- package/dist/gc/citation-integrity.d.ts +4 -5
- package/dist/gc/citation-integrity.js +11 -33
- package/dist/gc/citation-integrity.js.map +1 -1
- package/dist/gc/classify.js +3 -16
- package/dist/gc/classify.js.map +1 -1
- package/dist/gc/completion-integrity.js +4 -3
- package/dist/gc/completion-integrity.js.map +1 -1
- package/dist/gc/entity-orphan.js +66 -12
- package/dist/gc/entity-orphan.js.map +1 -1
- package/dist/gc/ghost-anchor.d.ts +57 -0
- package/dist/gc/ghost-anchor.js +171 -0
- package/dist/gc/ghost-anchor.js.map +1 -0
- package/dist/gc/index.d.ts +2 -0
- package/dist/gc/index.js +1 -0
- package/dist/gc/index.js.map +1 -1
- package/dist/gc/sweep.d.ts +1 -1
- package/dist/gc/sweep.js +13 -1
- package/dist/gc/sweep.js.map +1 -1
- package/dist/gc/types.d.ts +1 -1
- package/dist/hooks/bypass-detection.js +3 -2
- package/dist/hooks/bypass-detection.js.map +1 -1
- package/dist/hooks/defer.js +3 -2
- package/dist/hooks/defer.js.map +1 -1
- package/dist/hooks/ghost-backup.d.ts +37 -0
- package/dist/hooks/ghost-backup.js +82 -0
- package/dist/hooks/ghost-backup.js.map +1 -0
- package/dist/hooks/post-tool-use/allowlist-reader.js +2 -2
- package/dist/hooks/post-tool-use/allowlist-reader.js.map +1 -1
- package/dist/hooks/post-tool-use/ask-user-blocked.d.ts +1 -2
- package/dist/hooks/post-tool-use/ask-user-blocked.js +3 -4
- package/dist/hooks/post-tool-use/ask-user-blocked.js.map +1 -1
- package/dist/hooks/post-tool-use/citation-scanner.d.ts +9 -7
- package/dist/hooks/post-tool-use/citation-scanner.js +9 -14
- package/dist/hooks/post-tool-use/citation-scanner.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 +1 -19
- package/dist/hooks/post-tool-use/legend-builder.js.map +1 -1
- package/dist/hooks/post-tool-use/post-write.js +18 -1
- package/dist/hooks/post-tool-use/post-write.js.map +1 -1
- package/dist/hooks/post-tool-use/read-enricher.d.ts +2 -2
- package/dist/hooks/post-tool-use/read-enricher.js +4 -6
- package/dist/hooks/post-tool-use/read-enricher.js.map +1 -1
- package/dist/hooks/post-tool-use/sot-align.js +29 -3
- package/dist/hooks/post-tool-use/sot-align.js.map +1 -1
- package/dist/hooks/post-tool-use/write-guardian.d.ts +1 -5
- package/dist/hooks/post-tool-use/write-guardian.js +25 -18
- package/dist/hooks/post-tool-use/write-guardian.js.map +1 -1
- package/dist/hooks/runners/context-threshold.js +3 -3
- package/dist/hooks/runners/context-threshold.js.map +1 -1
- package/dist/hooks/runners/payload.js +2 -1
- package/dist/hooks/runners/payload.js.map +1 -1
- package/dist/hooks/runners/phase-ready-surface.js +3 -2
- package/dist/hooks/runners/phase-ready-surface.js.map +1 -1
- package/dist/hooks/runners/session-start.js +103 -4
- package/dist/hooks/runners/session-start.js.map +1 -1
- package/dist/hooks/runners/stop.js +46 -42
- package/dist/hooks/runners/stop.js.map +1 -1
- package/dist/hooks/runners/user-prompt-submit.d.ts +2 -2
- package/dist/hooks/runners/user-prompt-submit.js +4 -9
- package/dist/hooks/runners/user-prompt-submit.js.map +1 -1
- package/dist/hooks/seed-attested.js +3 -2
- package/dist/hooks/seed-attested.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/init/baseline-audit.js +3 -3
- package/dist/init/baseline-audit.js.map +1 -1
- package/dist/init/claude-rule.js +13 -1
- package/dist/init/claude-rule.js.map +1 -1
- package/dist/init/curator/corpus.d.ts +1 -0
- package/dist/init/curator/corpus.js +6 -2
- package/dist/init/curator/corpus.js.map +1 -1
- package/dist/init/curator/emit.js +2 -3
- package/dist/init/curator/emit.js.map +1 -1
- package/dist/init/detect-components.d.ts +3 -2
- package/dist/init/detect-components.js +33 -15
- package/dist/init/detect-components.js.map +1 -1
- package/dist/init/detect.d.ts +1 -5
- package/dist/init/detect.js +157 -143
- package/dist/init/detect.js.map +1 -1
- package/dist/init/eta-calibration.js +2 -2
- package/dist/init/eta-calibration.js.map +1 -1
- package/dist/init/glob-inference.js +24 -0
- package/dist/init/glob-inference.js.map +1 -1
- package/dist/init/index.d.ts +4 -4
- package/dist/init/index.js +2 -2
- package/dist/init/index.js.map +1 -1
- package/dist/init/init.d.ts +8 -0
- package/dist/init/init.js +16 -20
- package/dist/init/init.js.map +1 -1
- package/dist/init/mapper-merge.d.ts +1 -4
- package/dist/init/mapper-merge.js +4 -17
- package/dist/init/mapper-merge.js.map +1 -1
- package/dist/init/mapper-parallel.js +1 -1
- package/dist/init/mapper-parallel.js.map +1 -1
- package/dist/init/mapper-prompts.d.ts +1 -23
- package/dist/init/mapper-prompts.js +1 -25
- package/dist/init/mapper-prompts.js.map +1 -1
- package/dist/init/mapper.d.ts +0 -6
- package/dist/init/mapper.js +2 -5
- package/dist/init/mapper.js.map +1 -1
- package/dist/init/module-slicer.js +3 -24
- package/dist/init/module-slicer.js.map +1 -1
- package/dist/init/multi-dev/install.js +24 -0
- package/dist/init/multi-dev/install.js.map +1 -1
- package/dist/init/overlay.js +5 -16
- package/dist/init/overlay.js.map +1 -1
- package/dist/init/phases/11-baseline.js +1 -1
- package/dist/init/phases/11-baseline.js.map +1 -1
- package/dist/init/phases/4-seed.js +7 -5
- package/dist/init/phases/4-seed.js.map +1 -1
- package/dist/init/phases/9a-walker.js +4 -0
- package/dist/init/phases/9a-walker.js.map +1 -1
- package/dist/init/phases/9b-curate.d.ts +1 -0
- package/dist/init/phases/9b-curate.js +6 -2
- package/dist/init/phases/9b-curate.js.map +1 -1
- package/dist/init/phases/9d-comp-walk.js +3 -3
- package/dist/init/phases/9d-comp-walk.js.map +1 -1
- package/dist/init/phases/9e-comp-annotate.js +63 -3
- package/dist/init/phases/9e-comp-annotate.js.map +1 -1
- package/dist/init/phases/index.d.ts +0 -1
- package/dist/init/phases/index.js +0 -1
- package/dist/init/phases/index.js.map +1 -1
- package/dist/init/phases/mapper-output-io.d.ts +1 -1
- package/dist/init/phases/mapper-output-io.js +3 -2
- package/dist/init/phases/mapper-output-io.js.map +1 -1
- package/dist/init/phases/state-io.d.ts +1 -1
- package/dist/init/phases/state-io.js +3 -2
- package/dist/init/phases/state-io.js.map +1 -1
- package/dist/init/phases/types.d.ts +20 -8
- package/dist/init/phases/types.js +0 -1
- package/dist/init/phases/types.js.map +1 -1
- package/dist/init/progress.d.ts +1 -0
- package/dist/init/progress.js +3 -1
- package/dist/init/progress.js.map +1 -1
- package/dist/init/rules-merge/ingest.js +3 -3
- package/dist/init/rules-merge/ingest.js.map +1 -1
- package/dist/init/seed.js +54 -5
- package/dist/init/seed.js.map +1 -1
- package/dist/init/source-comments/strip-replace.d.ts +1 -2
- package/dist/init/source-comments/strip-replace.js +19 -3
- package/dist/init/source-comments/strip-replace.js.map +1 -1
- package/dist/init/source-comments/walker.js +8 -79
- package/dist/init/source-comments/walker.js.map +1 -1
- package/dist/init/types.d.ts +8 -16
- package/dist/init/walker.d.ts +1 -1
- package/dist/init/walker.js +1 -1
- package/dist/join/index.d.ts +9 -0
- package/dist/join/index.js +82 -25
- package/dist/join/index.js.map +1 -1
- package/dist/lock.js +4 -3
- package/dist/lock.js.map +1 -1
- package/dist/mcp/bootstrap-guard.js +10 -1
- package/dist/mcp/bootstrap-guard.js.map +1 -1
- package/dist/mcp/schemas.d.ts +26 -4
- package/dist/mcp/schemas.js +23 -1
- package/dist/mcp/schemas.js.map +1 -1
- package/dist/mcp/serve.js +9 -0
- package/dist/mcp/serve.js.map +1 -1
- package/dist/mcp/server.js +3 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/telemetry.js +4 -3
- package/dist/mcp/telemetry.js.map +1 -1
- package/dist/mcp/tools/component-reconfirm.d.ts +7 -0
- package/dist/mcp/tools/component-reconfirm.js +39 -0
- package/dist/mcp/tools/component-reconfirm.js.map +1 -0
- package/dist/mcp/tools/component-register.d.ts +15 -0
- package/dist/mcp/tools/component-register.js +65 -0
- package/dist/mcp/tools/component-register.js.map +1 -0
- package/dist/mcp/tools/decision-get.js +2 -2
- package/dist/mcp/tools/decision-get.js.map +1 -1
- package/dist/mcp/tools/index.js +5 -6
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/init-phases.d.ts +2 -0
- package/dist/mcp/tools/init-phases.js +21 -5
- package/dist/mcp/tools/init-phases.js.map +1 -1
- package/dist/mcp/tools/mission-advance.d.ts +3 -4
- package/dist/mcp/tools/mission-advance.js +15 -19
- package/dist/mcp/tools/mission-advance.js.map +1 -1
- package/dist/mcp/tools/mission-resume.js +3 -3
- package/dist/mcp/tools/mission-resume.js.map +1 -1
- package/dist/mcp/tools/record-decision.js +17 -9
- package/dist/mcp/tools/record-decision.js.map +1 -1
- package/dist/mcp/tools/resolve-attention.js +70 -34
- package/dist/mcp/tools/resolve-attention.js.map +1 -1
- package/dist/mcp/tools/resume.js +3 -2
- package/dist/mcp/tools/resume.js.map +1 -1
- package/dist/mcp/tools/search.js +2 -2
- package/dist/mcp/tools/search.js.map +1 -1
- package/dist/mcp/tools/task-complete.js +2 -3
- package/dist/mcp/tools/task-complete.js.map +1 -1
- package/dist/mcp/tools/task-create.js +2 -2
- package/dist/mcp/tools/task-create.js.map +1 -1
- package/dist/migrate/config-io.d.ts +24 -0
- package/dist/migrate/config-io.js +73 -0
- package/dist/migrate/config-io.js.map +1 -0
- package/dist/migrate/gitignore.d.ts +28 -0
- package/dist/migrate/gitignore.js +82 -0
- package/dist/migrate/gitignore.js.map +1 -0
- package/dist/migrate/index.d.ts +6 -0
- package/dist/migrate/index.js +6 -0
- package/dist/migrate/index.js.map +1 -0
- package/dist/migrate/migrations/0001-drop-dead-config-fields.d.ts +12 -0
- package/dist/migrate/migrations/0001-drop-dead-config-fields.js +39 -0
- package/dist/migrate/migrations/0001-drop-dead-config-fields.js.map +1 -0
- package/dist/migrate/migrations/0002-backfill-gitignore.d.ts +14 -0
- package/dist/migrate/migrations/0002-backfill-gitignore.js +40 -0
- package/dist/migrate/migrations/0002-backfill-gitignore.js.map +1 -0
- package/dist/migrate/registry.d.ts +9 -0
- package/dist/migrate/registry.js +11 -0
- package/dist/migrate/registry.js.map +1 -0
- package/dist/migrate/runner.d.ts +45 -0
- package/dist/migrate/runner.js +177 -0
- package/dist/migrate/runner.js.map +1 -0
- package/dist/migrate/semver.d.ts +11 -0
- package/dist/migrate/semver.js +35 -0
- package/dist/migrate/semver.js.map +1 -0
- package/dist/migrate/types.d.ts +47 -0
- package/dist/migrate/types.js +13 -0
- package/dist/migrate/types.js.map +1 -0
- package/dist/missions/task-link.js +7 -8
- package/dist/missions/task-link.js.map +1 -1
- package/dist/paths/index.d.ts +12 -1
- package/dist/paths/index.js +17 -3
- package/dist/paths/index.js.map +1 -1
- package/dist/sensors/catalog.js +6 -11
- package/dist/sensors/catalog.js.map +1 -1
- package/dist/sensors/decisions.js +55 -19
- package/dist/sensors/decisions.js.map +1 -1
- package/dist/sensors/diff.d.ts +12 -0
- package/dist/sensors/diff.js +103 -0
- package/dist/sensors/diff.js.map +1 -1
- package/dist/sensors/index.d.ts +4 -5
- package/dist/sensors/index.js +2 -3
- package/dist/sensors/index.js.map +1 -1
- package/dist/sensors/runner.d.ts +34 -37
- package/dist/sensors/runner.js +63 -53
- package/dist/sensors/runner.js.map +1 -1
- package/dist/sensors/stub-catalog.d.ts +6 -3
- package/dist/sensors/stub-catalog.js +7 -19
- package/dist/sensors/stub-catalog.js.map +1 -1
- package/dist/sensors/types.d.ts +11 -55
- package/dist/sensors/types.js +4 -8
- package/dist/sensors/types.js.map +1 -1
- package/dist/session-start/build.js +36 -21
- package/dist/session-start/build.js.map +1 -1
- package/dist/session-start/templates.d.ts +1 -1
- package/dist/session-start/templates.js +1 -1
- package/dist/status-line/event-queue.js +2 -1
- package/dist/status-line/event-queue.js.map +1 -1
- package/dist/status-line/reader.js +5 -5
- package/dist/status-line/reader.js.map +1 -1
- package/dist/status-line/writer.js +2 -1
- package/dist/status-line/writer.js.map +1 -1
- package/dist/tasks/lifecycle.d.ts +3 -4
- package/dist/tasks/lifecycle.js +19 -21
- package/dist/tasks/lifecycle.js.map +1 -1
- package/dist/trace/index.js +2 -2
- package/dist/trace/index.js.map +1 -1
- package/dist/update-check.d.ts +28 -0
- package/dist/update-check.js +137 -0
- package/dist/update-check.js.map +1 -0
- package/package.json +2 -2
- package/templates/.cairn/git-hooks/commit-msg +33 -5
- package/templates/.cairn/git-hooks/post-commit +13 -3
- package/templates/.cairn/git-hooks/pre-commit +48 -22
- package/templates/.github/workflows/cairn-check.yml +8 -0
- package/dist/attention/bulk-accept.d.ts +0 -78
- package/dist/attention/bulk-accept.js +0 -348
- package/dist/attention/bulk-accept.js.map +0 -1
- package/dist/attention/serve/api.d.ts +0 -24
- package/dist/attention/serve/api.js +0 -383
- package/dist/attention/serve/api.js.map +0 -1
- package/dist/attention/serve/index.d.ts +0 -63
- package/dist/attention/serve/index.js +0 -219
- package/dist/attention/serve/index.js.map +0 -1
- package/dist/hooks/read-enrich.d.ts +0 -6
- package/dist/hooks/read-enrich.js +0 -11
- package/dist/hooks/read-enrich.js.map +0 -1
- package/dist/hooks/write-guard.d.ts +0 -6
- package/dist/hooks/write-guard.js +0 -11
- package/dist/hooks/write-guard.js.map +0 -1
- package/dist/init/phases/12-strip.d.ts +0 -10
- package/dist/init/phases/12-strip.js +0 -88
- package/dist/init/phases/12-strip.js.map +0 -1
- package/dist/mcp/tools/attention-serve.d.ts +0 -23
- package/dist/mcp/tools/attention-serve.js +0 -84
- package/dist/mcp/tools/attention-serve.js.map +0 -1
- package/dist/mcp/tools/attention-wait.d.ts +0 -18
- package/dist/mcp/tools/attention-wait.js +0 -84
- package/dist/mcp/tools/attention-wait.js.map +0 -1
- package/dist/mcp/tools/bulk-accept-attention.d.ts +0 -22
- package/dist/mcp/tools/bulk-accept-attention.js +0 -84
- package/dist/mcp/tools/bulk-accept-attention.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
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `cairn_bulk_accept_attention` MCP tool.
|
|
3
|
-
*
|
|
4
|
-
* Wraps `bulkAcceptObvious` so the cairn-attention skill can drain
|
|
5
|
-
* obvious DEC drafts in one tool call instead of N rounds of
|
|
6
|
-
* `cairn_resolve_attention(choice="a")` per draft. Loads the project
|
|
7
|
-
* globs from `.cairn/config.yaml` so the scoring
|
|
8
|
-
* heuristic has the same context the cli subcommand does.
|
|
9
|
-
*
|
|
10
|
-
* Returns a slim count-distribution shape — no draft bodies, no file
|
|
11
|
-
* paths beyond the accepted ID list. Skill renders the summary inline,
|
|
12
|
-
* then proceeds to interactive triage of the remaining (medium + low)
|
|
13
|
-
* drafts via the existing per-item flow.
|
|
14
|
-
*/
|
|
15
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
16
|
-
import { join } from "node:path";
|
|
17
|
-
import { parse as parseYaml } from "yaml";
|
|
18
|
-
import { z } from "zod";
|
|
19
|
-
import { bulkAcceptObvious, } from "../../attention/index.js";
|
|
20
|
-
const confidenceSchema = z.enum(["high", "medium", "low"]);
|
|
21
|
-
const inputShape = {
|
|
22
|
-
threshold: confidenceSchema.optional(),
|
|
23
|
-
dryRun: z.boolean().optional(),
|
|
24
|
-
};
|
|
25
|
-
const ConfigSchema = z.object({
|
|
26
|
-
project_globs: z.object({
|
|
27
|
-
route_handler_globs: z.array(z.string()).optional(),
|
|
28
|
-
dto_globs: z.array(z.string()).optional(),
|
|
29
|
-
generator_source_globs: z.array(z.string()).optional(),
|
|
30
|
-
high_stakes_globs: z.array(z.string()).optional(),
|
|
31
|
-
}).optional(),
|
|
32
|
-
high_stakes_globs: z.array(z.string()).optional(),
|
|
33
|
-
off_limits: z.array(z.string()).optional(),
|
|
34
|
-
}).passthrough();
|
|
35
|
-
function loadProjectGlobs(repoRoot) {
|
|
36
|
-
const configPath = join(repoRoot, ".cairn", "config.yaml");
|
|
37
|
-
if (!existsSync(configPath)) {
|
|
38
|
-
return { globs: {} };
|
|
39
|
-
}
|
|
40
|
-
let parsed;
|
|
41
|
-
try {
|
|
42
|
-
parsed = parseYaml(readFileSync(configPath, "utf8"));
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return { globs: {} };
|
|
46
|
-
}
|
|
47
|
-
const result = ConfigSchema.safeParse(parsed);
|
|
48
|
-
if (!result.success)
|
|
49
|
-
return { globs: {} };
|
|
50
|
-
const cfg = result.data;
|
|
51
|
-
const globs = {};
|
|
52
|
-
if (cfg.high_stakes_globs)
|
|
53
|
-
globs.high_stakes_globs = cfg.high_stakes_globs;
|
|
54
|
-
if (cfg.off_limits)
|
|
55
|
-
globs.off_limits = cfg.off_limits;
|
|
56
|
-
const pg = cfg.project_globs;
|
|
57
|
-
if (pg !== undefined) {
|
|
58
|
-
if (pg.route_handler_globs)
|
|
59
|
-
globs.route_handler_globs = pg.route_handler_globs;
|
|
60
|
-
if (pg.dto_globs)
|
|
61
|
-
globs.dto_globs = pg.dto_globs;
|
|
62
|
-
if (pg.generator_source_globs)
|
|
63
|
-
globs.generator_source_globs = pg.generator_source_globs;
|
|
64
|
-
if (pg.high_stakes_globs && globs.high_stakes_globs === undefined) {
|
|
65
|
-
globs.high_stakes_globs = pg.high_stakes_globs;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return { globs };
|
|
69
|
-
}
|
|
70
|
-
export const bulkAcceptAttentionTool = {
|
|
71
|
-
name: "cairn_bulk_accept_attention",
|
|
72
|
-
description: "Score every DEC draft + invariant in `.cairn/ground/decisions/_inbox/` and `.cairn/ground/invariants/` against a confidence heuristic (file in high_stakes_globs / route or dto globs, prose substantiveness, decision verbs, JSDoc tags). Auto-promote DEC drafts at or above `threshold` (default 'high') out of the inbox to accepted state and rebuild the decisions ledger. Stamp `capture_confidence` on every draft + invariant so subsequent attention surfaces can sort. Use this once per adoption to drain the obvious classifications before per-item triage. Returns count distributions and the accepted ID list. `dryRun: true` reports the same distribution without writing.",
|
|
73
|
-
inputSchema: inputShape,
|
|
74
|
-
handler: async (ctx, input) => {
|
|
75
|
-
const { globs } = loadProjectGlobs(ctx.repoRoot);
|
|
76
|
-
return bulkAcceptObvious({
|
|
77
|
-
repoRoot: ctx.repoRoot,
|
|
78
|
-
globs,
|
|
79
|
-
threshold: input.threshold ?? "high",
|
|
80
|
-
...(input.dryRun !== undefined ? { dryRun: input.dryRun } : {}),
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=bulk-accept-attention.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-accept-attention.js","sourceRoot":"","sources":["../../../src/mcp/tools/bulk-accept-attention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,GAGlB,MAAM,0BAA0B,CAAC;AAKlC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAE3D,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACtC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;AAOF,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;QACtB,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACnD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QACzC,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAA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4
|
-
* The agent emits a fenced YAML block at the end of its final response.
|
|
5
|
-
* This module:
|
|
6
|
-
* 1. Extracts the YAML block from the agent's final text.
|
|
7
|
-
* 2. Parses it into a structured `Attestation`.
|
|
8
|
-
* 3. Cross-checks every claim against the actual diff. Mismatch = lie.
|
|
9
|
-
*
|
|
10
|
-
* Layer B attestation cross-check. Lying must be harder than telling truth.
|
|
11
|
-
*/
|
|
12
|
-
import type { Attestation, DiffEntry, SensorResult, StubCatalog } from "./types.js";
|
|
13
|
-
/**
|
|
14
|
-
* Extract the YAML block from a final assistant message. The template
|
|
15
|
-
* instructs the agent to emit a fenced block whose first line is the literal
|
|
16
|
-
* key `attestation:`. We accept either:
|
|
17
|
-
*
|
|
18
|
-
* ```yaml
|
|
19
|
-
* attestation:
|
|
20
|
-
* ...
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* or a bare top-level YAML doc starting with `attestation:`.
|
|
24
|
-
*/
|
|
25
|
-
export declare function extractAttestation(text: string): Attestation | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Cross-check the attestation against the diff. Returns the sensor result.
|
|
28
|
-
*
|
|
29
|
-
* Hard fails:
|
|
30
|
-
* - attestation absent or unparseable
|
|
31
|
-
* - files_touched mismatches actual changed paths (set-equality)
|
|
32
|
-
* - todos_introduced != count of TODO/FIXME/XXX/HACK markers added
|
|
33
|
-
* - stubs_introduced != count of hard-severity stub-pattern hits
|
|
34
|
-
* - any delivered item declared `behavior: full` whose path/text contains
|
|
35
|
-
* a stub-pattern hit (lying about completeness)
|
|
36
|
-
*/
|
|
37
|
-
export declare function runAttestationCrossCheck(args: {
|
|
38
|
-
attestation: Attestation | undefined;
|
|
39
|
-
diff: DiffEntry[];
|
|
40
|
-
stubCatalog: StubCatalog;
|
|
41
|
-
/** Globs of files always allowed in diff but not required to be in
|
|
42
|
-
* files_touched (e.g. `.cairn/runs/active/**`). */
|
|
43
|
-
ignoreGlobs?: string[];
|
|
44
|
-
}): SensorResult;
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layer B — attestation cross-check.
|
|
3
|
-
*
|
|
4
|
-
* The agent emits a fenced YAML block at the end of its final response.
|
|
5
|
-
* This module:
|
|
6
|
-
* 1. Extracts the YAML block from the agent's final text.
|
|
7
|
-
* 2. Parses it into a structured `Attestation`.
|
|
8
|
-
* 3. Cross-checks every claim against the actual diff. Mismatch = lie.
|
|
9
|
-
*
|
|
10
|
-
* Layer B attestation cross-check. Lying must be harder than telling truth.
|
|
11
|
-
*/
|
|
12
|
-
import { parse as parseYaml } from "yaml";
|
|
13
|
-
import { matchAnyGlob } from "@isaacriehm/cairn-state";
|
|
14
|
-
import { detectStubMatches } from "./stub-catalog.js";
|
|
15
|
-
const SENSOR_ID = "attestation-cross-check";
|
|
16
|
-
/**
|
|
17
|
-
* Extract the YAML block from a final assistant message. The template
|
|
18
|
-
* instructs the agent to emit a fenced block whose first line is the literal
|
|
19
|
-
* key `attestation:`. We accept either:
|
|
20
|
-
*
|
|
21
|
-
* ```yaml
|
|
22
|
-
* attestation:
|
|
23
|
-
* ...
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* or a bare top-level YAML doc starting with `attestation:`.
|
|
27
|
-
*/
|
|
28
|
-
export function extractAttestation(text) {
|
|
29
|
-
if (typeof text !== "string" || text.length === 0)
|
|
30
|
-
return undefined;
|
|
31
|
-
// Prefer fenced ```yaml ... ``` block whose body starts with `attestation:`.
|
|
32
|
-
const fenced = /```(?:yaml|yml)?\s*\n([\s\S]*?)\n```/g;
|
|
33
|
-
let match;
|
|
34
|
-
while ((match = fenced.exec(text)) !== null) {
|
|
35
|
-
const body = match[1] ?? "";
|
|
36
|
-
if (/^\s*attestation\s*:/m.test(body)) {
|
|
37
|
-
const parsed = parseAttestationBody(body);
|
|
38
|
-
if (parsed)
|
|
39
|
-
return parsed;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
// Fallback: bare YAML in text starting with `attestation:`.
|
|
43
|
-
const bareIdx = text.search(/^\s*attestation\s*:/m);
|
|
44
|
-
if (bareIdx !== -1) {
|
|
45
|
-
const slice = text.slice(bareIdx);
|
|
46
|
-
return parseAttestationBody(slice);
|
|
47
|
-
}
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
/** Try parsing a YAML body that contains an `attestation:` key. */
|
|
51
|
-
function parseAttestationBody(body) {
|
|
52
|
-
let doc;
|
|
53
|
-
try {
|
|
54
|
-
doc = parseYaml(body);
|
|
55
|
-
}
|
|
56
|
-
catch {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
if (typeof doc !== "object" || doc === null)
|
|
60
|
-
return undefined;
|
|
61
|
-
const root = doc;
|
|
62
|
-
const at = root["attestation"];
|
|
63
|
-
if (typeof at !== "object" || at === null)
|
|
64
|
-
return undefined;
|
|
65
|
-
const a = at;
|
|
66
|
-
const delivered = Array.isArray(a["delivered"])
|
|
67
|
-
? a["delivered"].map((d) => ({
|
|
68
|
-
symbol: String(d["symbol"] ?? ""),
|
|
69
|
-
...(typeof d["path"] === "string" ? { path: d["path"] } : {}),
|
|
70
|
-
behavior: (() => {
|
|
71
|
-
const v = d["behavior"];
|
|
72
|
-
return v === "partial" || v === "scaffolded" ? v : "full";
|
|
73
|
-
})(),
|
|
74
|
-
...(Array.isArray(d["sensors_passed"])
|
|
75
|
-
? { sensors_passed: d["sensors_passed"].map(String) }
|
|
76
|
-
: {}),
|
|
77
|
-
}))
|
|
78
|
-
: [];
|
|
79
|
-
const deferred = Array.isArray(a["deferred"])
|
|
80
|
-
? a["deferred"].map((d) => ({
|
|
81
|
-
symbol: String(d["symbol"] ?? ""),
|
|
82
|
-
reason: String(d["reason"] ?? ""),
|
|
83
|
-
}))
|
|
84
|
-
: [];
|
|
85
|
-
const known_limitations = Array.isArray(a["known_limitations"])
|
|
86
|
-
? a["known_limitations"].map(String)
|
|
87
|
-
: [];
|
|
88
|
-
const todos_introduced = typeof a["todos_introduced"] === "number" ? a["todos_introduced"] : 0;
|
|
89
|
-
const stubs_introduced = typeof a["stubs_introduced"] === "number" ? a["stubs_introduced"] : 0;
|
|
90
|
-
const files_touched = Array.isArray(a["files_touched"])
|
|
91
|
-
? a["files_touched"].map(String)
|
|
92
|
-
: [];
|
|
93
|
-
const out = {
|
|
94
|
-
delivered,
|
|
95
|
-
deferred,
|
|
96
|
-
known_limitations,
|
|
97
|
-
todos_introduced,
|
|
98
|
-
stubs_introduced,
|
|
99
|
-
files_touched,
|
|
100
|
-
};
|
|
101
|
-
// Optional blocked_by from the same root or under attestation.
|
|
102
|
-
const block = (root["blocked_by"] ?? a["blocked_by"]);
|
|
103
|
-
if (typeof block === "object" && block !== null) {
|
|
104
|
-
const b = block;
|
|
105
|
-
if (typeof b["reason"] === "string") {
|
|
106
|
-
out.blocked_by = {
|
|
107
|
-
reason: b["reason"],
|
|
108
|
-
...(typeof b["needed_from_operator"] === "string"
|
|
109
|
-
? { needed_from_operator: b["needed_from_operator"] }
|
|
110
|
-
: {}),
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return out;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Cross-check the attestation against the diff. Returns the sensor result.
|
|
118
|
-
*
|
|
119
|
-
* Hard fails:
|
|
120
|
-
* - attestation absent or unparseable
|
|
121
|
-
* - files_touched mismatches actual changed paths (set-equality)
|
|
122
|
-
* - todos_introduced != count of TODO/FIXME/XXX/HACK markers added
|
|
123
|
-
* - stubs_introduced != count of hard-severity stub-pattern hits
|
|
124
|
-
* - any delivered item declared `behavior: full` whose path/text contains
|
|
125
|
-
* a stub-pattern hit (lying about completeness)
|
|
126
|
-
*/
|
|
127
|
-
export function runAttestationCrossCheck(args) {
|
|
128
|
-
const startedAt = Date.now();
|
|
129
|
-
const findings = [];
|
|
130
|
-
if (!args.attestation) {
|
|
131
|
-
findings.push({
|
|
132
|
-
sensor_id: SENSOR_ID,
|
|
133
|
-
message: "agent emitted no `attestation:` YAML block in final response — Layer B contract requires one",
|
|
134
|
-
severity: "hard",
|
|
135
|
-
});
|
|
136
|
-
return {
|
|
137
|
-
sensor_id: SENSOR_ID,
|
|
138
|
-
ok: false,
|
|
139
|
-
duration_ms: Date.now() - startedAt,
|
|
140
|
-
findings,
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
if (args.attestation.blocked_by) {
|
|
144
|
-
// Agent declared it can't proceed. Surface as soft so the orchestrator
|
|
145
|
-
// routes it back to the operator instead of looping.
|
|
146
|
-
findings.push({
|
|
147
|
-
sensor_id: SENSOR_ID,
|
|
148
|
-
message: `agent reported blocked_by: ${args.attestation.blocked_by.reason}`,
|
|
149
|
-
severity: "soft",
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
const diffPaths = new Set(args.diff
|
|
153
|
-
.filter((d) => d.status !== "deleted")
|
|
154
|
-
.map((d) => d.path));
|
|
155
|
-
const ignore = args.ignoreGlobs ?? [];
|
|
156
|
-
const declared = new Set(args.attestation.files_touched);
|
|
157
|
-
// Set-equality: every changed file must be declared, and every declared
|
|
158
|
-
// file must be in the diff (catches "I changed these other files too" lies).
|
|
159
|
-
for (const path of diffPaths) {
|
|
160
|
-
if (declared.has(path))
|
|
161
|
-
continue;
|
|
162
|
-
if (ignore.length > 0 && matchAnyGlob(path, ignore))
|
|
163
|
-
continue;
|
|
164
|
-
findings.push({
|
|
165
|
-
sensor_id: SENSOR_ID,
|
|
166
|
-
path,
|
|
167
|
-
message: `file changed but not in attestation.files_touched: ${path}`,
|
|
168
|
-
severity: "hard",
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
for (const path of declared) {
|
|
172
|
-
if (diffPaths.has(path))
|
|
173
|
-
continue;
|
|
174
|
-
findings.push({
|
|
175
|
-
sensor_id: SENSOR_ID,
|
|
176
|
-
path,
|
|
177
|
-
message: `attestation.files_touched lists a file not actually changed: ${path}`,
|
|
178
|
-
severity: "hard",
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
// Count markers added in the diff.
|
|
182
|
-
const addedTodoCount = countAddedMarkers(args.diff);
|
|
183
|
-
if (args.attestation.todos_introduced !== addedTodoCount) {
|
|
184
|
-
findings.push({
|
|
185
|
-
sensor_id: SENSOR_ID,
|
|
186
|
-
message: `attestation.todos_introduced=${args.attestation.todos_introduced} but diff adds ${addedTodoCount} TODO/FIXME/XXX/HACK marker(s)`,
|
|
187
|
-
severity: "hard",
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
// Count hard-stub matches in the diff.
|
|
191
|
-
const stubHits = detectStubMatches({
|
|
192
|
-
diff: args.diff,
|
|
193
|
-
catalog: args.stubCatalog,
|
|
194
|
-
/** All languages — Layer B doesn't get to filter by profile (the agent's
|
|
195
|
-
* number must match the same denominator we'll use). */
|
|
196
|
-
languages: undefined,
|
|
197
|
-
});
|
|
198
|
-
const hardStubCount = stubHits.filter((h) => h.severity === "hard").length;
|
|
199
|
-
if (args.attestation.stubs_introduced !== hardStubCount) {
|
|
200
|
-
findings.push({
|
|
201
|
-
sensor_id: SENSOR_ID,
|
|
202
|
-
message: `attestation.stubs_introduced=${args.attestation.stubs_introduced} but Layer A finds ${hardStubCount} hard-severity stub pattern(s)`,
|
|
203
|
-
severity: "hard",
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
// behavior:full + stub-pattern coexistence = lie about completeness.
|
|
207
|
-
for (const d of args.attestation.delivered) {
|
|
208
|
-
if (d.behavior !== "full")
|
|
209
|
-
continue;
|
|
210
|
-
const matches = stubHits.filter((h) => {
|
|
211
|
-
if (d.path && h.path !== d.path)
|
|
212
|
-
return false;
|
|
213
|
-
// If no path, just see whether any matched_text references the symbol.
|
|
214
|
-
if (!d.path)
|
|
215
|
-
return (h.matched_text ?? "").includes(d.symbol);
|
|
216
|
-
return true;
|
|
217
|
-
});
|
|
218
|
-
for (const m of matches) {
|
|
219
|
-
const f = {
|
|
220
|
-
sensor_id: SENSOR_ID,
|
|
221
|
-
message: `delivered "${d.symbol}" claimed behavior:full but contains stub pattern \`${m.pattern_id}\``,
|
|
222
|
-
severity: "hard",
|
|
223
|
-
};
|
|
224
|
-
if (m.path !== undefined)
|
|
225
|
-
f.path = m.path;
|
|
226
|
-
if (m.line !== undefined)
|
|
227
|
-
f.line = m.line;
|
|
228
|
-
if (m.matched_text !== undefined)
|
|
229
|
-
f.matched_text = m.matched_text;
|
|
230
|
-
if (m.pattern_id !== undefined)
|
|
231
|
-
f.pattern_id = m.pattern_id;
|
|
232
|
-
findings.push(f);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
const ok = findings.every((f) => f.severity !== "hard");
|
|
236
|
-
return {
|
|
237
|
-
sensor_id: SENSOR_ID,
|
|
238
|
-
ok,
|
|
239
|
-
duration_ms: Date.now() - startedAt,
|
|
240
|
-
findings,
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Count TODO/FIXME/XXX/HACK markers introduced in the diff (added lines only).
|
|
245
|
-
* Modified files: counts markers in content not present at the SHA pin.
|
|
246
|
-
* Added files: counts every marker.
|
|
247
|
-
*/
|
|
248
|
-
function countAddedMarkers(diff) {
|
|
249
|
-
const re = /(?:\/\/|#|\/\*|--)\s*(TODO|FIXME|XXX|HACK)\b/g;
|
|
250
|
-
let total = 0;
|
|
251
|
-
for (const entry of diff) {
|
|
252
|
-
if (entry.status === "deleted")
|
|
253
|
-
continue;
|
|
254
|
-
const after = entry.afterContent ?? "";
|
|
255
|
-
const before = entry.beforeContent ?? "";
|
|
256
|
-
const beforeCount = (before.match(re) ?? []).length;
|
|
257
|
-
const afterCount = (after.match(re) ?? []).length;
|
|
258
|
-
total += Math.max(0, afterCount - beforeCount);
|
|
259
|
-
}
|
|
260
|
-
return total;
|
|
261
|
-
}
|
|
262
|
-
//# sourceMappingURL=attestation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attestation.js","sourceRoot":"","sources":["../../src/sensors/att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