instar 1.3.830 → 1.3.832

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.
Files changed (114) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +83 -12
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/AutonomousRealCheckAnnotator.d.ts +105 -0
  5. package/dist/core/AutonomousRealCheckAnnotator.d.ts.map +1 -0
  6. package/dist/core/AutonomousRealCheckAnnotator.js +122 -0
  7. package/dist/core/AutonomousRealCheckAnnotator.js.map +1 -0
  8. package/dist/core/AutonomousRunStore.d.ts +29 -0
  9. package/dist/core/AutonomousRunStore.d.ts.map +1 -1
  10. package/dist/core/AutonomousRunStore.js +38 -0
  11. package/dist/core/AutonomousRunStore.js.map +1 -1
  12. package/dist/core/BackupManager.d.ts.map +1 -1
  13. package/dist/core/BackupManager.js +47 -1
  14. package/dist/core/BackupManager.js.map +1 -1
  15. package/dist/core/CircuitBreakingIntelligenceProvider.d.ts +12 -0
  16. package/dist/core/CircuitBreakingIntelligenceProvider.d.ts.map +1 -1
  17. package/dist/core/CircuitBreakingIntelligenceProvider.js +56 -4
  18. package/dist/core/CircuitBreakingIntelligenceProvider.js.map +1 -1
  19. package/dist/core/CompletionEvaluator.d.ts +62 -2
  20. package/dist/core/CompletionEvaluator.d.ts.map +1 -1
  21. package/dist/core/CompletionEvaluator.js +124 -6
  22. package/dist/core/CompletionEvaluator.js.map +1 -1
  23. package/dist/core/DecisionQualityRecorderImpl.d.ts +192 -0
  24. package/dist/core/DecisionQualityRecorderImpl.d.ts.map +1 -0
  25. package/dist/core/DecisionQualityRecorderImpl.js +363 -0
  26. package/dist/core/DecisionQualityRecorderImpl.js.map +1 -0
  27. package/dist/core/IntelligenceRouter.d.ts +33 -0
  28. package/dist/core/IntelligenceRouter.d.ts.map +1 -1
  29. package/dist/core/IntelligenceRouter.js +240 -54
  30. package/dist/core/IntelligenceRouter.js.map +1 -1
  31. package/dist/core/JudgmentProvenanceLog.d.ts +102 -2
  32. package/dist/core/JudgmentProvenanceLog.d.ts.map +1 -1
  33. package/dist/core/JudgmentProvenanceLog.js +239 -11
  34. package/dist/core/JudgmentProvenanceLog.js.map +1 -1
  35. package/dist/core/MessagingToneGate.d.ts +30 -0
  36. package/dist/core/MessagingToneGate.d.ts.map +1 -1
  37. package/dist/core/MessagingToneGate.js +63 -0
  38. package/dist/core/MessagingToneGate.js.map +1 -1
  39. package/dist/core/PostUpdateMigrator.d.ts +11 -0
  40. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  41. package/dist/core/PostUpdateMigrator.js +32 -0
  42. package/dist/core/PostUpdateMigrator.js.map +1 -1
  43. package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
  44. package/dist/core/WriteDomainRegistry.js +24 -0
  45. package/dist/core/WriteDomainRegistry.js.map +1 -1
  46. package/dist/core/decisionGradingPass.d.ts +89 -0
  47. package/dist/core/decisionGradingPass.d.ts.map +1 -0
  48. package/dist/core/decisionGradingPass.js +188 -0
  49. package/dist/core/decisionGradingPass.js.map +1 -0
  50. package/dist/core/decisionQualityTypes.d.ts +170 -0
  51. package/dist/core/decisionQualityTypes.d.ts.map +1 -0
  52. package/dist/core/decisionQualityTypes.js +85 -0
  53. package/dist/core/decisionQualityTypes.js.map +1 -0
  54. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  55. package/dist/core/devGatedFeatures.js +6 -0
  56. package/dist/core/devGatedFeatures.js.map +1 -1
  57. package/dist/core/machineCoherenceManifest.d.ts.map +1 -1
  58. package/dist/core/machineCoherenceManifest.js +4 -0
  59. package/dist/core/machineCoherenceManifest.js.map +1 -1
  60. package/dist/core/types.d.ts +69 -4
  61. package/dist/core/types.d.ts.map +1 -1
  62. package/dist/core/types.js.map +1 -1
  63. package/dist/data/provenanceCoverage.d.ts +156 -0
  64. package/dist/data/provenanceCoverage.d.ts.map +1 -0
  65. package/dist/data/provenanceCoverage.js +674 -0
  66. package/dist/data/provenanceCoverage.js.map +1 -0
  67. package/dist/monitoring/ExternalHogDecisionStore.d.ts +256 -0
  68. package/dist/monitoring/ExternalHogDecisionStore.d.ts.map +1 -0
  69. package/dist/monitoring/ExternalHogDecisionStore.js +481 -0
  70. package/dist/monitoring/ExternalHogDecisionStore.js.map +1 -0
  71. package/dist/monitoring/ExternalHogRealAdapters.d.ts +6 -2
  72. package/dist/monitoring/ExternalHogRealAdapters.d.ts.map +1 -1
  73. package/dist/monitoring/ExternalHogRealAdapters.js +2 -2
  74. package/dist/monitoring/ExternalHogRealAdapters.js.map +1 -1
  75. package/dist/monitoring/ExternalHogScanTick.d.ts +95 -3
  76. package/dist/monitoring/ExternalHogScanTick.d.ts.map +1 -1
  77. package/dist/monitoring/ExternalHogScanTick.js +102 -9
  78. package/dist/monitoring/ExternalHogScanTick.js.map +1 -1
  79. package/dist/monitoring/ExternalHogSentinel.d.ts +71 -3
  80. package/dist/monitoring/ExternalHogSentinel.d.ts.map +1 -1
  81. package/dist/monitoring/ExternalHogSentinel.js +126 -2
  82. package/dist/monitoring/ExternalHogSentinel.js.map +1 -1
  83. package/dist/monitoring/ExternalHogServerPrimitives.d.ts +10 -2
  84. package/dist/monitoring/ExternalHogServerPrimitives.d.ts.map +1 -1
  85. package/dist/monitoring/ExternalHogServerPrimitives.js +1 -1
  86. package/dist/monitoring/ExternalHogServerPrimitives.js.map +1 -1
  87. package/dist/monitoring/FeatureMetricsLedger.d.ts +304 -0
  88. package/dist/monitoring/FeatureMetricsLedger.d.ts.map +1 -1
  89. package/dist/monitoring/FeatureMetricsLedger.js +731 -0
  90. package/dist/monitoring/FeatureMetricsLedger.js.map +1 -1
  91. package/dist/scaffold/templates.d.ts.map +1 -1
  92. package/dist/scaffold/templates.js +2 -1
  93. package/dist/scaffold/templates.js.map +1 -1
  94. package/dist/server/AgentServer.d.ts.map +1 -1
  95. package/dist/server/AgentServer.js +55 -1
  96. package/dist/server/AgentServer.js.map +1 -1
  97. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  98. package/dist/server/CapabilityIndex.js +15 -1
  99. package/dist/server/CapabilityIndex.js.map +1 -1
  100. package/dist/server/fileRoutes.d.ts.map +1 -1
  101. package/dist/server/fileRoutes.js +9 -0
  102. package/dist/server/fileRoutes.js.map +1 -1
  103. package/dist/server/routes.d.ts.map +1 -1
  104. package/dist/server/routes.js +334 -5
  105. package/dist/server/routes.js.map +1 -1
  106. package/package.json +1 -1
  107. package/src/data/builtin-manifest.json +65 -65
  108. package/src/data/provenanceCoverage.ts +850 -0
  109. package/src/scaffold/templates/jobs/instar/llm-decision-grading.md +32 -0
  110. package/src/scaffold/templates.ts +2 -1
  111. package/upgrades/1.3.831.md +30 -0
  112. package/upgrades/1.3.832.md +22 -0
  113. package/upgrades/side-effects/llm-decision-quality-meter.md +95 -0
  114. package/upgrades/side-effects/messaging-tone-gate-provenance-enrollment.md +68 -0
@@ -0,0 +1,674 @@
1
+ /**
2
+ * PROVENANCE_COVERAGE census — LLM-Decision Quality Meter ratchet (G5).
3
+ *
4
+ * Spec: docs/specs/llm-decision-quality-meter.md §5.6 (census) + §5.4.2 (rule
5
+ * registry). Same declare-or-fail pattern as LLM_BENCH_COVERAGE
6
+ * (src/data/llmBenchCoverage.ts precedent), tightened per review: a declaration
7
+ * per DECISION POINT (a component may hold several distinct decision points
8
+ * with different prompts/outcomes), each entry one of:
9
+ * - status 'wired' — the callsite carries `options.provenance`
10
+ * enrollment (typed import of the decision-point id exported HERE; the
11
+ * settlement write additionally validates decisionPoint ∈ census at
12
+ * runtime and counts unknowns). Wired entries declare their volumeClass —
13
+ * the PROVENANCE store's volume valve (§5.6; the ~250-byte decision_quality
14
+ * row is written for every enrolled settlement regardless of class).
15
+ * - status 'pending:<ACT-ref>' — the retrofit backlog, format-validated +
16
+ * PINNED shrink-only in tests/unit/provenance-coverage-ratchet.test.ts
17
+ * (count can only go down; re-pointing an entry to a different ACT is a
18
+ * reviewed baseline change — shrink-only covers count, not identity). The
19
+ * runtime half of the two-layer check (§5.6 pending-ref-dead) lives on
20
+ * GET /decision-quality, where the evolution queue exists.
21
+ * - status 'exempt:<taxonomy>' — a CLOSED taxonomy (an exemption is a
22
+ * classification, not an essay): 'deterministic-only' (no LLM verdict at
23
+ * this point) | 'no-decision-content' (nothing reconstructable beyond what
24
+ * feature_metrics already records) | 'operator-ratified:<resolvable-ref>'.
25
+ * Free-text exemptions are refused by the ratchet; the exempt baseline is
26
+ * pinned shrink-only exactly like pending (ADV r5).
27
+ *
28
+ * ENROLLMENT KEY CONVENTION (§5.6, a census-test ASSERTION, not prose): each
29
+ * decision point uses a 1:1 `attribution.component` key (the existing
30
+ * `CompletionEvaluator` vs `CompletionEvaluator/P13` suffix pattern); the key
31
+ * is UNIQUE across census entries REGARDLESS of status (ADV r7 — uniform
32
+ * uniqueness closes the pending-absorbs-wired-activity and exempt-false-flags
33
+ * carve-out attacks). Multi-call compositions get one unique suffixed key PER
34
+ * point with linkage ONLY via the `composition` field (§5.1.1 — key sharing
35
+ * would re-open the same-key blind spot).
36
+ *
37
+ * WHY (operator goal, 2026-07-10 topic 11960): a new LLM decision point that
38
+ * skips provenance must fail CI — an unlogged decision-maker cannot be graded,
39
+ * and "does this gate need a bigger model or a prompt change?" is unanswerable
40
+ * without provenance + outcomes. Structure > Willpower.
41
+ *
42
+ * Companion chain: componentCategories keeps COMPONENT_CATEGORY exhaustive
43
+ * over LLM callsites; LLM_BENCH_COVERAGE keeps bench coverage exhaustive over
44
+ * COMPONENT_CATEGORY; THIS census keeps provenance posture exhaustive over
45
+ * COMPONENT_CATEGORY, per decision point.
46
+ */
47
+ export const EXEMPT_TAXONOMY_KEYS = [
48
+ 'deterministic-only',
49
+ 'no-decision-content',
50
+ ];
51
+ // ───────────────────────────────────────────────────────────────────────────
52
+ // Wired decision-point id constants (typed registration, §5.6).
53
+ //
54
+ // NAMING CONVENTION (ratchet-enforced): a wired decision point 'a-b-c' exports
55
+ // `DP_A_B_C`. Enrolling callsites import the constant — never restate the
56
+ // string (the census is the single source of truth).
57
+ // ───────────────────────────────────────────────────────────────────────────
58
+ /** External-hog kill/leave decision point — the classifier verdict inside the
59
+ * scan-tick decision loop (ExternalHogScanTick; spec §5.3 first customer). */
60
+ export const DP_EXTERNAL_HOG_KILL_LEAVE = 'external-hog-kill-leave';
61
+ /** Autonomous completion judge — CompletionEvaluator.evaluate() (spec §5.3). */
62
+ export const DP_COMPLETION_EVALUATE = 'completion-evaluate';
63
+ /** P13 stop-rationale judge — CompletionEvaluator.evaluateStopRationale()
64
+ * (component 'CompletionEvaluator/P13'; spec §5.3). */
65
+ export const DP_COMPLETION_STOP_RATIONALE = 'completion-stop-rationale';
66
+ /** Outbound tone/leak verdict — MessagingToneGate.review() (component
67
+ * 'MessagingToneGate'; spec §5.6). An ALWAYS-ON HIGH-VOLUME gate: it declares a
68
+ * `budget:<rows/day>` volume valve (NEVER `full`) and stores content as IDENTITY
69
+ * only (candidate hash + bounds + code-derived features), never the outbound
70
+ * body or any plaintext slice of it. */
71
+ export const DP_MESSAGING_TONE_GATE = 'messaging-tone-gate';
72
+ // ───────────────────────────────────────────────────────────────────────────
73
+ // The census
74
+ // ───────────────────────────────────────────────────────────────────────────
75
+ export const PROVENANCE_COVERAGE = [
76
+ // ── Wired first customers (§5.3 — genuinely low-frequency + high-stakes;
77
+ // volumeClass 'full' is RESERVED for this class) ──────────────────────
78
+ {
79
+ decisionPoint: DP_EXTERNAL_HOG_KILL_LEAVE,
80
+ component: 'ExternalHogClassifier',
81
+ status: 'wired',
82
+ volumeClass: 'full',
83
+ // §5.3: judges an attacker-controllable process name (argv is HASHED at the
84
+ // envelope — the floor needs argv, the provenance row does not); context =
85
+ // commandHash/ledgerKey/classId, floor booleans, CPU numbers, identity tuples.
86
+ contentClass: 'content-bearing',
87
+ reason: 'First customer (spec §5.3): the kill/leave verdict is the highest-consequence LLM decision on the host; enacted disposition + evidence rules grade it.',
88
+ },
89
+ {
90
+ decisionPoint: DP_COMPLETION_EVALUATE,
91
+ component: 'CompletionEvaluator',
92
+ status: 'wired',
93
+ volumeClass: 'full',
94
+ // §5.3: context carries transcript-slice IDENTITY (hash + bounds) + the
95
+ // StopSignals corroboration block — never transcript text.
96
+ contentClass: 'content-bearing',
97
+ reason: 'First customer (spec §5.3): the autonomous continue/stop judge gates whether a run keeps burning budget; realcheck gives it deterministic ground truth.',
98
+ },
99
+ {
100
+ decisionPoint: DP_COMPLETION_STOP_RATIONALE,
101
+ component: 'CompletionEvaluator/P13',
102
+ status: 'wired',
103
+ volumeClass: 'full',
104
+ contentClass: 'content-bearing',
105
+ reason: 'First customer (spec §5.3): the P13 stop-rationale judge decides whether a stop-attempt is EARNED; same transcript-slice-identity envelope as evaluate().',
106
+ },
107
+ // ── Wired high-volume gate (§5.6 — NOT full-class; the third enrolled
108
+ // customer, which required the grading-pass per-point sub-budget FIRST —
109
+ // SUBBUDGET_IMPLEMENTED is now true) ─────────────────────────────────────
110
+ {
111
+ decisionPoint: DP_MESSAGING_TONE_GATE,
112
+ component: 'MessagingToneGate',
113
+ status: 'wired',
114
+ // §5.6 volume valve: an ALWAYS-ON high-volume gate MUST NOT be `full`. A
115
+ // per-UTC-day COUNT budget gives a hard, count-enforced ceiling on the
116
+ // provenance JSONL archive (loud droppedByBudget counter when hit) — a
117
+ // deterministic bound preferable to probabilistic sampling for a gate that
118
+ // fires on every drafted outbound message. 500/day = a representative daily
119
+ // sample without unbounded growth; the ~250-byte decision_quality row is
120
+ // ALWAYS written regardless (counts stay complete).
121
+ volumeClass: 'budget:500',
122
+ // Content-bearing: the gate judges an agent-authored outbound message. It
123
+ // enters the row as IDENTITY ONLY — a sha256 of the candidate + byte/char
124
+ // bounds + code-derived features — never the full body or any plaintext
125
+ // slice (the provenance store must not become an outbound-message archive;
126
+ // mirrors the CompletionEvaluator content-bearing sibling, §5.3).
127
+ contentClass: 'content-bearing',
128
+ reason: 'The outbound tone/leak authority (spec §5.6 named high-volume point). Enrolled at budget:500/day, identity-only content — never the message body.',
129
+ },
130
+ // ── Pending (the ACT-1193 uniform-provenance retrofit backlog — §5.6: "Not
131
+ // retrofitting all ~60+ decision points in one PR"; the census makes the
132
+ // backlog visible, ratcheted, and re-surfaced as census debt on
133
+ // GET /decision-quality). Each enrolls via the §5.1.4 per-callsite
134
+ // contract and declares its REAL volume class at enrollment.
135
+ // contentClass mirrors the reviewed LLM_UNTRUSTED_INPUT axis
136
+ // (src/data/llmBenchCoverage.ts): every point below judges user/model/
137
+ // tool-authored text → content-bearing. ─────────────────────────────────
138
+ // — Sentinels —
139
+ {
140
+ decisionPoint: 'input-guard',
141
+ component: 'InputGuard',
142
+ status: 'pending:ACT-1193',
143
+ contentClass: 'content-bearing',
144
+ reason: 'Input-coherence verdict over an inbound prompt; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
145
+ },
146
+ {
147
+ decisionPoint: 'session-activity-digest',
148
+ component: 'SessionActivitySentinel',
149
+ status: 'pending:ACT-1193',
150
+ contentClass: 'content-bearing',
151
+ reason: 'Activity digest authored over session tmux output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
152
+ },
153
+ {
154
+ decisionPoint: 'stall-triage-diagnosis',
155
+ component: 'StallTriageNurse',
156
+ status: 'pending:ACT-1193',
157
+ contentClass: 'content-bearing',
158
+ reason: 'Stall-triage diagnosis over session output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
159
+ },
160
+ {
161
+ decisionPoint: 'commitment-detect',
162
+ component: 'CommitmentSentinel',
163
+ status: 'pending:ACT-1193',
164
+ contentClass: 'content-bearing',
165
+ reason: 'Commitment detection over conversation text; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
166
+ },
167
+ {
168
+ decisionPoint: 'presence-stall-judge',
169
+ component: 'PresenceProxy',
170
+ status: 'pending:ACT-1193',
171
+ contentClass: 'content-bearing',
172
+ reason: 'Tier-3 stall judgment over session output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
173
+ },
174
+ {
175
+ decisionPoint: 'message-sentinel-classify',
176
+ component: 'MessageSentinel',
177
+ status: 'pending:ACT-1193',
178
+ contentClass: 'content-bearing',
179
+ reason: 'Pause/emergency/normal intent classification over an inbound user message (latency-critical); enrollment queued in the ACT-1193 retrofit backlog.',
180
+ },
181
+ {
182
+ decisionPoint: 'project-drift-check',
183
+ component: 'ProjectDriftChecker',
184
+ status: 'pending:ACT-1193',
185
+ contentClass: 'content-bearing',
186
+ reason: 'Is-work-on-project coherence verdict over session work + files; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
187
+ },
188
+ {
189
+ decisionPoint: 'temporal-coherence-check',
190
+ component: 'TemporalCoherenceChecker',
191
+ status: 'pending:ACT-1193',
192
+ contentClass: 'content-bearing',
193
+ reason: 'Temporal-coherence verdict over conversation content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
194
+ },
195
+ {
196
+ decisionPoint: 'watchdog-stuck-judge',
197
+ component: 'SessionWatchdog',
198
+ status: 'pending:ACT-1193',
199
+ contentClass: 'content-bearing',
200
+ reason: 'Stuck-session judgment over live session output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
201
+ },
202
+ {
203
+ decisionPoint: 'resume-sanity-check',
204
+ component: 'ResumeQueueDrainer',
205
+ status: 'pending:ACT-1193',
206
+ contentClass: 'content-bearing',
207
+ reason: 'Resume-sanity verdict before a queued mid-work revival; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
208
+ },
209
+ {
210
+ decisionPoint: 'topic-intent-arc-check',
211
+ component: 'TopicIntentArcCheck',
212
+ status: 'pending:ACT-1193',
213
+ contentClass: 'content-bearing',
214
+ reason: 'Arc-check classification of a topic intent over conversation; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
215
+ },
216
+ {
217
+ decisionPoint: 'slack-stall-confirm',
218
+ component: 'SlackAdapter',
219
+ status: 'pending:ACT-1193',
220
+ contentClass: 'content-bearing',
221
+ reason: 'Stall-confirm alert-suppression judgment over session output (Slack arm); enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
222
+ },
223
+ // — Gates —
224
+ {
225
+ decisionPoint: 'prompt-injection-detect',
226
+ component: 'PromptGate',
227
+ status: 'pending:ACT-1193',
228
+ contentClass: 'content-bearing',
229
+ reason: 'Prompt-injection detection over inbound content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
230
+ },
231
+ {
232
+ decisionPoint: 'external-operation-gate',
233
+ component: 'ExternalOperationGate',
234
+ status: 'pending:ACT-1193',
235
+ contentClass: 'content-bearing',
236
+ reason: 'Operation mutability/reversibility classification incl. in-content approval claims; enrollment queued in the ACT-1193 retrofit backlog.',
237
+ },
238
+ {
239
+ decisionPoint: 'warrants-reply-gate',
240
+ component: 'WarrantsReplyGate',
241
+ status: 'pending:ACT-1193',
242
+ contentClass: 'content-bearing',
243
+ reason: 'Should-I-reply verdict over an inbound message; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
244
+ },
245
+ {
246
+ decisionPoint: 'unjustified-stop-gate',
247
+ component: 'UnjustifiedStopGate',
248
+ status: 'pending:ACT-1193',
249
+ contentClass: 'content-bearing',
250
+ reason: 'Stop-justified verdict over session state; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
251
+ },
252
+ {
253
+ decisionPoint: 'coherence-review',
254
+ component: 'CoherenceReviewer',
255
+ status: 'pending:ACT-1193',
256
+ contentClass: 'content-bearing',
257
+ reason: 'Outbound coherence review — THE measured high-volume point (3,641 of 4,098 llm calls/24h on the dev agent, spec §5.6); MUST declare sampled:<rate> or budget:<rows/day> at enrollment, never full.',
258
+ },
259
+ {
260
+ decisionPoint: 'move-intent-classify',
261
+ component: 'MoveIntentClassifier',
262
+ status: 'pending:ACT-1193',
263
+ contentClass: 'content-bearing',
264
+ reason: 'Move/pin command-vs-discussion intent over an inbound message + context; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
265
+ },
266
+ {
267
+ decisionPoint: 'hub-intent-classify',
268
+ component: 'HubIntentClassifier',
269
+ status: 'pending:ACT-1193',
270
+ contentClass: 'content-bearing',
271
+ reason: 'Hub open/tie bind-intent over an inbound hub message; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
272
+ },
273
+ {
274
+ decisionPoint: 'profile-intent-classify',
275
+ component: 'ProfileIntentClassifier',
276
+ status: 'pending:ACT-1193',
277
+ contentClass: 'content-bearing',
278
+ reason: 'Topic-profile change intent (framework/model/thinking) over an inbound message; enrollment queued in the ACT-1193 retrofit backlog.',
279
+ },
280
+ {
281
+ decisionPoint: 'llm-sanitize',
282
+ component: 'LLMSanitizer',
283
+ status: 'pending:ACT-1193',
284
+ contentClass: 'content-bearing',
285
+ reason: 'Sanitize verdict over untrusted inbound content (definitionally injection-exposed); enrollment queued in the ACT-1193 retrofit backlog.',
286
+ },
287
+ {
288
+ decisionPoint: 'override-detect',
289
+ component: 'OverrideDetector',
290
+ status: 'pending:ACT-1193',
291
+ contentClass: 'content-bearing',
292
+ reason: 'Override-intent detection over a user turn (uxConfirm pre-routing); enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
293
+ },
294
+ {
295
+ decisionPoint: 'task-classify',
296
+ component: 'TaskClassifier',
297
+ status: 'pending:ACT-1193',
298
+ contentClass: 'content-bearing',
299
+ reason: 'Task-type classification over a user task description; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
300
+ },
301
+ // — Reflectors —
302
+ {
303
+ decisionPoint: 'job-reflect',
304
+ component: 'JobReflector',
305
+ status: 'pending:ACT-1193',
306
+ contentClass: 'content-bearing',
307
+ reason: 'Job-outcome reflection over job output/transcript; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
308
+ },
309
+ {
310
+ decisionPoint: 'cross-model-review',
311
+ component: 'crossModelReviewer',
312
+ status: 'pending:ACT-1193',
313
+ contentClass: 'content-bearing',
314
+ reason: 'Cross-model spec-document review over file content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
315
+ },
316
+ {
317
+ decisionPoint: 'self-knowledge-extract',
318
+ component: 'SelfKnowledgeTree',
319
+ status: 'pending:ACT-1193',
320
+ contentClass: 'content-bearing',
321
+ reason: 'Self-knowledge extraction over transcripts; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
322
+ },
323
+ {
324
+ decisionPoint: 'tree-triage',
325
+ component: 'TreeTriage',
326
+ status: 'pending:ACT-1193',
327
+ contentClass: 'content-bearing',
328
+ reason: 'Knowledge-tree fragment triage over stored content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
329
+ },
330
+ {
331
+ decisionPoint: 'topic-summarize',
332
+ component: 'TopicSummarizer',
333
+ status: 'pending:ACT-1193',
334
+ contentClass: 'content-bearing',
335
+ reason: 'Topic summary authoring over conversation content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
336
+ },
337
+ {
338
+ decisionPoint: 'contextual-evaluate',
339
+ component: 'ContextualEvaluator',
340
+ status: 'pending:ACT-1193',
341
+ contentClass: 'content-bearing',
342
+ reason: 'Context-relevance evaluation over conversation/session content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
343
+ },
344
+ {
345
+ decisionPoint: 'relationship-extract',
346
+ component: 'RelationshipManager',
347
+ status: 'pending:ACT-1193',
348
+ contentClass: 'content-bearing',
349
+ reason: 'Relationship-fact extraction from conversation (PII-adjacent content); enrollment queued in the ACT-1193 retrofit backlog.',
350
+ },
351
+ {
352
+ decisionPoint: 'standards-conformance-review',
353
+ component: 'StandardsConformanceReviewer',
354
+ status: 'pending:ACT-1193',
355
+ contentClass: 'content-bearing',
356
+ reason: 'Artifact-vs-standard conformance review over file content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
357
+ },
358
+ {
359
+ decisionPoint: 'discovery-evaluate',
360
+ component: 'DiscoveryEvaluator',
361
+ status: 'pending:ACT-1193',
362
+ contentClass: 'content-bearing',
363
+ reason: 'Serendipity-discovery evaluation over subagent output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
364
+ },
365
+ {
366
+ decisionPoint: 'dashboard-insight',
367
+ component: 'DashboardInsightEngine',
368
+ status: 'pending:ACT-1193',
369
+ contentClass: 'content-bearing',
370
+ reason: 'Awareness-only page-data insight authoring (degrades to a deterministic floor); enrollment queued in the ACT-1193 retrofit backlog.',
371
+ },
372
+ // — Jobs —
373
+ {
374
+ decisionPoint: 'pipe-session-spawn',
375
+ component: 'PipeSessionSpawner',
376
+ status: 'pending:ACT-1193',
377
+ contentClass: 'content-bearing',
378
+ reason: 'Session authoring from (possibly user-authored) task descriptions; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
379
+ },
380
+ {
381
+ decisionPoint: 'cartographer-summary-author',
382
+ component: 'CartographerSweep',
383
+ status: 'pending:ACT-1193',
384
+ contentClass: 'content-bearing',
385
+ reason: 'Doc-tree summary authoring over untrusted code; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
386
+ },
387
+ {
388
+ decisionPoint: 'standards-coverage-enrich',
389
+ component: 'StandardsCoverageEnrichment',
390
+ status: 'pending:ACT-1193',
391
+ contentClass: 'content-bearing',
392
+ reason: 'Standards-coverage row enrichment over repo content (dark LLM path); enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
393
+ },
394
+ // — Previously-uncategorized callsites (LLM Routing Registry audit set) —
395
+ {
396
+ decisionPoint: 'input-classify',
397
+ component: 'InputClassifier',
398
+ status: 'pending:ACT-1193',
399
+ contentClass: 'content-bearing',
400
+ reason: 'Auto-approve vs relay classification of inbound input; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
401
+ },
402
+ {
403
+ decisionPoint: 'session-summary-extract',
404
+ component: 'SessionSummarySentinel',
405
+ status: 'pending:ACT-1193',
406
+ contentClass: 'content-bearing',
407
+ reason: 'Task/phase/files extraction over tmux output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
408
+ },
409
+ {
410
+ decisionPoint: 'telegram-stall-confirm',
411
+ component: 'TelegramAdapter',
412
+ status: 'pending:ACT-1193',
413
+ contentClass: 'content-bearing',
414
+ reason: 'Stall-confirm alert-suppression judgment over session output (Telegram arm); enrollment queued in the ACT-1193 retrofit backlog.',
415
+ },
416
+ {
417
+ decisionPoint: 'resume-uuid-validate',
418
+ component: 'ResumeValidator',
419
+ status: 'pending:ACT-1193',
420
+ contentClass: 'content-bearing',
421
+ reason: 'Resume-UUID-vs-topic match verdict over session/resume state; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
422
+ },
423
+ {
424
+ decisionPoint: 'usher-topic-route',
425
+ component: 'Usher',
426
+ status: 'pending:ACT-1193',
427
+ contentClass: 'content-bearing',
428
+ reason: 'Per-turn topic routing over an inbound user turn; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
429
+ },
430
+ {
431
+ decisionPoint: 'topic-intent-extract',
432
+ component: 'TopicIntentExtractor',
433
+ status: 'pending:ACT-1193',
434
+ contentClass: 'content-bearing',
435
+ reason: 'Topic-intent extraction from a user turn; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
436
+ },
437
+ {
438
+ decisionPoint: 'pre-compaction-flush',
439
+ component: 'PreCompactionFlush',
440
+ status: 'pending:ACT-1193',
441
+ contentClass: 'content-bearing',
442
+ reason: 'Durable-fact extraction over a transcript before compaction; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
443
+ },
444
+ {
445
+ decisionPoint: 'tree-synthesize',
446
+ component: 'TreeSynthesis',
447
+ status: 'pending:ACT-1193',
448
+ contentClass: 'content-bearing',
449
+ reason: 'Knowledge-fragment synthesis into an answer; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
450
+ },
451
+ {
452
+ decisionPoint: 'llm-conflict-resolve',
453
+ component: 'LLMConflictResolver',
454
+ status: 'pending:ACT-1193',
455
+ contentClass: 'content-bearing',
456
+ reason: 'Divergent multi-machine state resolution over untrusted peer data; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
457
+ },
458
+ {
459
+ decisionPoint: 'open-conversation-brief',
460
+ component: 'openConversationBrief',
461
+ status: 'pending:ACT-1193',
462
+ contentClass: 'content-bearing',
463
+ reason: 'A2A conversation-brief authoring over peer content; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
464
+ },
465
+ {
466
+ decisionPoint: 'a2a-checkin-summarize',
467
+ component: 'a2a-checkin',
468
+ status: 'pending:ACT-1193',
469
+ contentClass: 'content-bearing',
470
+ reason: 'A2A check-in thread summarization over peer-authored threads; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
471
+ },
472
+ {
473
+ decisionPoint: 'correction-distill',
474
+ component: 'correction-learning',
475
+ status: 'pending:ACT-1193',
476
+ contentClass: 'content-bearing',
477
+ reason: 'Recurring-correction distillation into a durable preference; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
478
+ },
479
+ {
480
+ decisionPoint: 'mentor-stage-b-classify',
481
+ component: 'mentor-stage-b',
482
+ status: 'pending:ACT-1193',
483
+ contentClass: 'content-bearing',
484
+ reason: 'Mentor-signal classification over mentee output; enrollment queued in the ACT-1193 uniform-provenance retrofit backlog.',
485
+ },
486
+ // ── Argued exemptions (closed taxonomy; pinned shrink-only) ──────────────
487
+ {
488
+ decisionPoint: 'input-detector-alias',
489
+ component: 'InputDetector',
490
+ status: 'exempt:deterministic-only',
491
+ contentClass: 'metadata',
492
+ reason: 'Attribution-manifest alias only (a legacy prompt-pattern matcher) — no LLM verdict at this point; the live matcher calls with attribution PromptGate, declared there.',
493
+ },
494
+ {
495
+ decisionPoint: 'auto-approve-injection',
496
+ component: 'AutoApprover',
497
+ status: 'exempt:deterministic-only',
498
+ contentClass: 'metadata',
499
+ reason: 'Mechanical key injection + audit logging — no LLM verdict at this point; the upstream judgment is InputClassifier.classify(), declared as input-classify.',
500
+ },
501
+ {
502
+ decisionPoint: 'integration-gate-delegate',
503
+ component: 'IntegrationGate',
504
+ status: 'exempt:deterministic-only',
505
+ contentClass: 'metadata',
506
+ reason: 'No LLM prompt of its own — delegates to JobReflector.reflect() (attribution JobReflector, declared as job-reflect); zero LLM-provider callsites of its own.',
507
+ },
508
+ {
509
+ decisionPoint: 'coherence-gate-delegate',
510
+ component: 'CoherenceGate',
511
+ status: 'exempt:deterministic-only',
512
+ contentClass: 'metadata',
513
+ reason: 'No callsite carries attribution CoherenceGate — all LLM calls flow through CoherenceReviewer.callApi(), declared as coherence-review.',
514
+ },
515
+ {
516
+ decisionPoint: 'promise-beacon-status-line',
517
+ component: 'PromiseBeacon',
518
+ status: 'exempt:deterministic-only',
519
+ contentClass: 'metadata',
520
+ reason: 'No live LLM prompt — generateStatusLine/classifyProgress hooks are unwired at the construction site; no LLM verdict exists at this point. Revisit if a generator is wired.',
521
+ },
522
+ {
523
+ decisionPoint: 'interactive-pool-canary-judge',
524
+ component: 'InteractivePoolCanaryJudge',
525
+ status: 'exempt:no-decision-content',
526
+ contentClass: 'metadata',
527
+ reason: 'Judges a FIXED known-answer canary probe — the input is a constant, so nothing is reconstructable beyond what feature_metrics already records (the canary is its own provenance). NOT deterministic-only: it legitimately emits llm-kind metric rows.',
528
+ },
529
+ ];
530
+ // ───────────────────────────────────────────────────────────────────────────
531
+ // Grading-pass fairness marker (§5.5 / LES r6).
532
+ //
533
+ // The grading endpoint's per-pass bound was GLOBAL, not per-point — safe for the
534
+ // two seeded low-frequency full-class customers, but a third ENROLLED customer
535
+ // could starve sibling points' evidence windows. The census ratchet asserts
536
+ // structurally that enrolling beyond the seeded first-customer set requires the
537
+ // per-point round-robin sub-budget FIRST: this is now true because
538
+ // `runDecisionGradingPass` divides its global budget round-robin across the
539
+ // grade-pass-driven points (src/core/decisionGradingPass.ts — the sub-budget
540
+ // helper `perPointSubBudget`), so no single point can consume a whole pass and
541
+ // starve a sibling's maturing evidence window. Flipped in the PR that
542
+ // implements that sub-budget (MessagingToneGate enrollment, the third customer).
543
+ // ───────────────────────────────────────────────────────────────────────────
544
+ export const SUBBUDGET_IMPLEMENTED = true;
545
+ // ───────────────────────────────────────────────────────────────────────────
546
+ // Evidence-rule registry (§5.4.2) — ruleId → rung + evidence-strength + OWNING
547
+ // component (+ registered window parameter). Co-located with the census by
548
+ // spec: imported by the annotate chokepoint and the grading endpoint; the
549
+ // ratchet pins the enums and the existing rule identities.
550
+ //
551
+ // Rung is DERIVED from this registry, never caller-supplied: an annotation
552
+ // claiming a ruleId whose registered rung disagrees, or an unregistered
553
+ // ruleId, is REJECTED and counted (§5.4.2). The chokepoint also rejects an
554
+ // annotation whose gradedBy.component is not the ruleId's registered owner
555
+ // (ADV r5 — a confused in-process annotator cannot inherit another rule's
556
+ // rung/precedence by claiming its id).
557
+ //
558
+ // Rules are precise predicates with IMMUTABLE, VERSIONED ids (§5.4.5): a
559
+ // predicate change — or a change to a registered parameter like windowMs —
560
+ // mints a new ruleId ('-v2'), never mutates '-v1' in place.
561
+ // ───────────────────────────────────────────────────────────────────────────
562
+ /** Grading-ladder rungs, in PRECEDENCE ORDER (§5.4.3): earlier beats later.
563
+ * A self-reported outcome NEVER overrides an independent grader. */
564
+ export const EVIDENCE_RUNGS = [
565
+ 'deterministic-ground-truth',
566
+ 'recurrence',
567
+ 'llm-interpreter', // DORMANT this build (FD11) — no rule may register it until ACT-1198's preconditions land.
568
+ 'self-report',
569
+ ];
570
+ /** Evidence-strength classes (§5.4.2, codex r3): the read surface splits
571
+ * proof-like from heuristic grades so aggregates cannot imply stronger
572
+ * correctness than the evidence supports. */
573
+ export const EVIDENCE_STRENGTHS = [
574
+ 'deterministic-proof',
575
+ 'negative-evidence',
576
+ 'recurrence-proxy',
577
+ 'self-report',
578
+ ];
579
+ /** Default hog evidence window (§5.4.5 "bounded window (default 6h)"). */
580
+ const HOG_EVIDENCE_WINDOW_MS = 6 * 60 * 60 * 1000;
581
+ export const RULE_REGISTRY = {
582
+ // A kill graded `wrong` ONLY IF a same-commandHash candidate respawns in-window
583
+ // AND the kill-time ordering test re-runs TRUE at evidence time (§5.4.5).
584
+ // Positive-evidence grading runs in the sentinel's scan ticks + grade-on-supersede.
585
+ 'hog-respawn-wrong-v1': {
586
+ ruleId: 'hog-respawn-wrong-v1',
587
+ rung: 'deterministic-ground-truth',
588
+ evidenceStrength: 'deterministic-proof',
589
+ owningComponent: 'ExternalHogSentinel',
590
+ windowMs: HOG_EVIDENCE_WINDOW_MS,
591
+ },
592
+ // A kill whose commandHash does NOT re-flag in-window (owner recorded dead at
593
+ // kill time) grades `right` at window close — negative evidence, never proof
594
+ // (quiet respawns are invisible to the sustained-CPU sensor; §5.4.5). Window-
595
+ // close grading runs in the grading job reading the durable hog store.
596
+ 'hog-sustained-right-v1': {
597
+ ruleId: 'hog-sustained-right-v1',
598
+ rung: 'deterministic-ground-truth',
599
+ evidenceStrength: 'negative-evidence',
600
+ owningComponent: 'DecisionGrading',
601
+ windowMs: HOG_EVIDENCE_WINDOW_MS,
602
+ },
603
+ // Applies ONLY to verdict==='leave' AND enacted==='alert-only-model-spared'
604
+ // AND floorPermitted===true: the SAME PROCESS (targetTuple pid+start-time)
605
+ // re-flagging in-window grades the leave `wrong`; a same-commandHash
606
+ // DIFFERENT process grades `unknown` (§5.4.5). Re-flag detection runs in the
607
+ // sentinel's scan ticks + grade-on-supersede.
608
+ 'hog-leave-recurrence-v1': {
609
+ ruleId: 'hog-leave-recurrence-v1',
610
+ rung: 'recurrence',
611
+ evidenceStrength: 'recurrence-proxy',
612
+ owningComponent: 'ExternalHogSentinel',
613
+ windowMs: HOG_EVIDENCE_WINDOW_MS,
614
+ },
615
+ // met:true + realcheck pass → right; met:true + realcheck fail → wrong; no
616
+ // realcheck configured → unknown, never guessed (§5.3/§5.4.5). The annotator
617
+ // is the deterministic realcheck arm of the autonomous completion path (P8
618
+ // wiring binds gradedBy.component to this owner).
619
+ 'completion-realcheck-v1': {
620
+ ruleId: 'completion-realcheck-v1',
621
+ rung: 'deterministic-ground-truth',
622
+ evidenceStrength: 'deterministic-proof',
623
+ owningComponent: 'AutonomousRealCheck',
624
+ },
625
+ // §5.3 enacted-disposition self-reports: the deterministic actor that applied
626
+ // floors/breakers/governors records what was ACTUALLY enacted, immediately,
627
+ // as a self-report-rung annotation (never overrides an independent grader).
628
+ 'hog-enacted-disposition-v1': {
629
+ ruleId: 'hog-enacted-disposition-v1',
630
+ rung: 'self-report',
631
+ evidenceStrength: 'self-report',
632
+ owningComponent: 'ExternalHogSentinel',
633
+ },
634
+ 'completion-enacted-disposition-v1': {
635
+ ruleId: 'completion-enacted-disposition-v1',
636
+ rung: 'self-report',
637
+ evidenceStrength: 'self-report',
638
+ owningComponent: 'CompletionChokepoint',
639
+ },
640
+ };
641
+ // ───────────────────────────────────────────────────────────────────────────
642
+ // Lookup helpers (imported by the settlement seam, the annotate chokepoint,
643
+ // the grading endpoint, and the read surface).
644
+ // ───────────────────────────────────────────────────────────────────────────
645
+ const CENSUS_BY_POINT = new Map(PROVENANCE_COVERAGE.map((e) => [e.decisionPoint, e]));
646
+ const CENSUS_BY_COMPONENT = new Map(PROVENANCE_COVERAGE.map((e) => [e.component, e]));
647
+ /** The census entry for a decision point, or undefined (an unknown decision
648
+ * point at the settlement write is counted, never thrown — §5.6). */
649
+ export function getCensusEntry(decisionPoint) {
650
+ return CENSUS_BY_POINT.get(decisionPoint);
651
+ }
652
+ /** The census entry keyed by the 1:1 `attribution.component` enrollment key
653
+ * (the bridge the wired-but-silent / exempt-but-active runtime flags use). */
654
+ export function getCensusEntryByComponent(componentKey) {
655
+ return CENSUS_BY_COMPONENT.get(componentKey);
656
+ }
657
+ /** True iff the decision point is declared AND wired (enrolled). Pending and
658
+ * exempt points are NOT enrolled — the seam writes nothing for them. */
659
+ export function isEnrolled(decisionPoint) {
660
+ return CENSUS_BY_POINT.get(decisionPoint)?.status === 'wired';
661
+ }
662
+ /** The volume class governing the provenance JSONL row for an ENROLLED point
663
+ * (undefined for unknown/pending/exempt points — a forward-declared class on a
664
+ * pending entry is advisory and must not valve anything before enrollment). */
665
+ export function getVolumeClass(decisionPoint) {
666
+ const e = CENSUS_BY_POINT.get(decisionPoint);
667
+ return e?.status === 'wired' ? e.volumeClass : undefined;
668
+ }
669
+ /** The registered evidence rule for a ruleId, or undefined (the annotate
670
+ * chokepoint REJECTS and counts annotations claiming an unregistered id). */
671
+ export function getRule(ruleId) {
672
+ return RULE_REGISTRY[ruleId];
673
+ }
674
+ //# sourceMappingURL=provenanceCoverage.js.map