wicked-crew 0.16.4 → 0.16.6

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 (158) hide show
  1. package/dist/api/ask-paths.d.ts +5 -2
  2. package/dist/api/ask-paths.d.ts.map +1 -1
  3. package/dist/api/ask-paths.js +6 -3
  4. package/dist/api/ask-paths.js.map +1 -1
  5. package/dist/api/chat-scope.d.ts +8 -3
  6. package/dist/api/chat-scope.d.ts.map +1 -1
  7. package/dist/api/chat-scope.js +17 -5
  8. package/dist/api/chat-scope.js.map +1 -1
  9. package/dist/api/chat-workflow.d.ts +60 -0
  10. package/dist/api/chat-workflow.d.ts.map +1 -0
  11. package/dist/api/chat-workflow.js +80 -0
  12. package/dist/api/chat-workflow.js.map +1 -0
  13. package/dist/api/endpoint-manifest-live.d.ts.map +1 -1
  14. package/dist/api/endpoint-manifest-live.js +2 -0
  15. package/dist/api/endpoint-manifest-live.js.map +1 -1
  16. package/dist/api/needs.d.ts +116 -0
  17. package/dist/api/needs.d.ts.map +1 -0
  18. package/dist/api/needs.js +618 -0
  19. package/dist/api/needs.js.map +1 -0
  20. package/dist/api/routes.d.ts +23 -1
  21. package/dist/api/routes.d.ts.map +1 -1
  22. package/dist/api/routes.js +297 -25
  23. package/dist/api/routes.js.map +1 -1
  24. package/dist/api/run-liveness.d.ts +8 -0
  25. package/dist/api/run-liveness.d.ts.map +1 -1
  26. package/dist/api/run-liveness.js +39 -7
  27. package/dist/api/run-liveness.js.map +1 -1
  28. package/dist/api/run-timing-index.d.ts +6 -0
  29. package/dist/api/run-timing-index.d.ts.map +1 -1
  30. package/dist/api/run-timing-index.js +18 -0
  31. package/dist/api/run-timing-index.js.map +1 -1
  32. package/dist/api/server.d.ts +8 -0
  33. package/dist/api/server.d.ts.map +1 -1
  34. package/dist/api/server.js +149 -3
  35. package/dist/api/server.js.map +1 -1
  36. package/dist/api/system-snapshot.d.ts +7 -15
  37. package/dist/api/system-snapshot.d.ts.map +1 -1
  38. package/dist/api/system-snapshot.js +7 -115
  39. package/dist/api/system-snapshot.js.map +1 -1
  40. package/dist/core/run-identity.d.ts.map +1 -1
  41. package/dist/core/run-identity.js +3 -0
  42. package/dist/core/run-identity.js.map +1 -1
  43. package/dist/evals/capture.d.ts +93 -0
  44. package/dist/evals/capture.d.ts.map +1 -0
  45. package/dist/evals/capture.js +419 -0
  46. package/dist/evals/capture.js.map +1 -0
  47. package/dist/evals/replay.d.ts +33 -0
  48. package/dist/evals/replay.d.ts.map +1 -0
  49. package/dist/evals/replay.js +87 -0
  50. package/dist/evals/replay.js.map +1 -0
  51. package/dist/evals/routes.d.ts +48 -0
  52. package/dist/evals/routes.d.ts.map +1 -0
  53. package/dist/evals/routes.js +121 -0
  54. package/dist/evals/routes.js.map +1 -0
  55. package/dist/evals/run-cli.d.ts +31 -0
  56. package/dist/evals/run-cli.d.ts.map +1 -0
  57. package/dist/evals/run-cli.js +128 -0
  58. package/dist/evals/run-cli.js.map +1 -0
  59. package/dist/evals/runner.d.ts +34 -0
  60. package/dist/evals/runner.d.ts.map +1 -0
  61. package/dist/evals/runner.js +181 -0
  62. package/dist/evals/runner.js.map +1 -0
  63. package/dist/evals/score.d.ts +31 -0
  64. package/dist/evals/score.d.ts.map +1 -0
  65. package/dist/evals/score.js +191 -0
  66. package/dist/evals/score.js.map +1 -0
  67. package/dist/evals/seed-needs-you.d.ts +17 -0
  68. package/dist/evals/seed-needs-you.d.ts.map +1 -0
  69. package/dist/evals/seed-needs-you.js +57 -0
  70. package/dist/evals/seed-needs-you.js.map +1 -0
  71. package/dist/evals/seed-rig.d.ts +9 -0
  72. package/dist/evals/seed-rig.d.ts.map +1 -0
  73. package/dist/evals/seed-rig.js +156 -0
  74. package/dist/evals/seed-rig.js.map +1 -0
  75. package/dist/evals/stats.d.ts +31 -0
  76. package/dist/evals/stats.d.ts.map +1 -0
  77. package/dist/evals/stats.js +59 -0
  78. package/dist/evals/stats.js.map +1 -0
  79. package/dist/evals/steering.d.ts +9 -0
  80. package/dist/evals/steering.d.ts.map +1 -0
  81. package/dist/evals/steering.js +25 -0
  82. package/dist/evals/steering.js.map +1 -0
  83. package/dist/evals/store.d.ts +26 -0
  84. package/dist/evals/store.d.ts.map +1 -0
  85. package/dist/evals/store.js +96 -0
  86. package/dist/evals/store.js.map +1 -0
  87. package/dist/evals/synthetic.d.ts +17 -0
  88. package/dist/evals/synthetic.d.ts.map +1 -0
  89. package/dist/evals/synthetic.js +71 -0
  90. package/dist/evals/synthetic.js.map +1 -0
  91. package/dist/evals/types.d.ts +29 -0
  92. package/dist/evals/types.d.ts.map +1 -0
  93. package/dist/evals/types.js +25 -0
  94. package/dist/evals/types.js.map +1 -0
  95. package/dist/evals/workflow.d.ts +33 -0
  96. package/dist/evals/workflow.d.ts.map +1 -0
  97. package/dist/evals/workflow.js +66 -0
  98. package/dist/evals/workflow.js.map +1 -0
  99. package/dist/insights/analyze-cli.d.ts +18 -0
  100. package/dist/insights/analyze-cli.d.ts.map +1 -0
  101. package/dist/insights/analyze-cli.js +71 -0
  102. package/dist/insights/analyze-cli.js.map +1 -0
  103. package/dist/insights/analyze.d.ts +136 -0
  104. package/dist/insights/analyze.d.ts.map +1 -0
  105. package/dist/insights/analyze.js +358 -0
  106. package/dist/insights/analyze.js.map +1 -0
  107. package/dist/insights/review-service.d.ts +127 -0
  108. package/dist/insights/review-service.d.ts.map +1 -0
  109. package/dist/insights/review-service.js +392 -0
  110. package/dist/insights/review-service.js.map +1 -0
  111. package/dist/insights/routes.d.ts +15 -0
  112. package/dist/insights/routes.d.ts.map +1 -0
  113. package/dist/insights/routes.js +66 -0
  114. package/dist/insights/routes.js.map +1 -0
  115. package/dist/insights/run-facts.d.ts +64 -0
  116. package/dist/insights/run-facts.d.ts.map +1 -0
  117. package/dist/insights/run-facts.js +152 -0
  118. package/dist/insights/run-facts.js.map +1 -0
  119. package/dist/insights/stats.d.ts +38 -0
  120. package/dist/insights/stats.d.ts.map +1 -0
  121. package/dist/insights/stats.js +102 -0
  122. package/dist/insights/stats.js.map +1 -0
  123. package/dist/insights/store.d.ts +89 -0
  124. package/dist/insights/store.d.ts.map +1 -0
  125. package/dist/insights/store.js +87 -0
  126. package/dist/insights/store.js.map +1 -0
  127. package/dist/insights/workflow.d.ts +22 -0
  128. package/dist/insights/workflow.d.ts.map +1 -0
  129. package/dist/insights/workflow.js +39 -0
  130. package/dist/insights/workflow.js.map +1 -0
  131. package/dist/qe/ledger.d.ts +15 -0
  132. package/dist/qe/ledger.d.ts.map +1 -1
  133. package/dist/qe/ledger.js +24 -0
  134. package/dist/qe/ledger.js.map +1 -1
  135. package/dist/schedules/routes.d.ts +48 -0
  136. package/dist/schedules/routes.d.ts.map +1 -0
  137. package/dist/schedules/routes.js +72 -0
  138. package/dist/schedules/routes.js.map +1 -0
  139. package/dist/schedules/scheduler.d.ts +58 -0
  140. package/dist/schedules/scheduler.d.ts.map +1 -0
  141. package/dist/schedules/scheduler.js +194 -0
  142. package/dist/schedules/scheduler.js.map +1 -0
  143. package/dist/schedules/store.d.ts +67 -0
  144. package/dist/schedules/store.d.ts.map +1 -0
  145. package/dist/schedules/store.js +148 -0
  146. package/dist/schedules/store.js.map +1 -0
  147. package/dist/skills/runtime.d.ts +12 -2
  148. package/dist/skills/runtime.d.ts.map +1 -1
  149. package/dist/skills/runtime.js +27 -1
  150. package/dist/skills/runtime.js.map +1 -1
  151. package/dist/team/routes.d.ts +10 -0
  152. package/dist/team/routes.d.ts.map +1 -1
  153. package/dist/team/routes.js +3 -0
  154. package/dist/team/routes.js.map +1 -1
  155. package/endpoint-manifest.json +132 -1
  156. package/package.json +4 -3
  157. package/workflows/review-recent-work.json +54 -0
  158. package/workflows/run-evals.json +29 -0
@@ -0,0 +1,419 @@
1
+ /**
2
+ * Real cases, captured from the run store (DES-DEFAULT-EVALS-001 §4). Pure: runs, their events, the operator's
3
+ * gate decisions and the QE ledger's verdicts in; cases out. Idempotent: a case id is derived from the run, unit and
4
+ * event it came from, so capturing twice yields the same cases.
5
+ *
6
+ * `observed` is always what the system recorded THEN (`by: 'recorded'`). `expected` comes from the operator's answer
7
+ * at the gate when it says something about the class, else from a deterministic rule over the case's own evidence.
8
+ * A case is only made when such a label exists: a label that merely repeats the observation would inflate agreement.
9
+ */
10
+ const str = (v) => (typeof v === 'string' && v !== '' ? v : null);
11
+ const num = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : null);
12
+ /** The place a run belongs to: its project, else its repo. */
13
+ export function placeOf(session) {
14
+ return str(session['project_id']) ?? str(session['repo_ref']);
15
+ }
16
+ /** Short, path-free text for a case input: home paths and absolute paths are cut, length capped. */
17
+ export function scrub(text, max = 160) {
18
+ const cut = text
19
+ .replace(/(?:\/Users|\/home|\/private\/tmp|\/var\/folders)\/[^\s'"`)]*/g, '<path>')
20
+ .replace(/[A-Za-z]:\\[^\s'"`)]*/g, '<path>')
21
+ .replace(/\s+/g, ' ')
22
+ .trim();
23
+ return cut.length > max ? `${cut.slice(0, max - 1)}…` : cut;
24
+ }
25
+ function sortedEvents(events) {
26
+ return [...events].sort((a, b) => (num(a.seq) ?? 0) - (num(b.seq) ?? 0));
27
+ }
28
+ /** The operator's first decision on a run's unit at or after `ts` (and before `until`, when given). */
29
+ function decisionAfter(decisions, runId, ord, ts, until) {
30
+ let best = null;
31
+ for (const d of decisions) {
32
+ if (d.origin.run_id !== runId || d.origin.ord !== ord || d.at < ts)
33
+ continue;
34
+ if (until !== null && d.at >= until)
35
+ continue;
36
+ if (best === null || d.at < best.at)
37
+ best = d;
38
+ }
39
+ return best;
40
+ }
41
+ // ── S2: the floor decision class ───────────────────────────────────────────────────────────────────────────────
42
+ export const FLOOR_CLASSES = ['pass', 'real_fail', 'base_red', 'inconclusive', 'boundary_deny'];
43
+ /** What a floor's own check outcomes say it is (the rule the escalation class must agree with). */
44
+ export function floorClassOf(ev) {
45
+ const checks = (Array.isArray(ev['checks']) ? ev['checks'] : []);
46
+ // A floor that produced no result (detection failed, no sandbox, not run) is inconclusive, never a pass.
47
+ if (ev['outcome'] === 'not_run' || ev['outcome'] === 'timed_out' || str(ev['detectError']) !== null || str(ev['sandboxError']) !== null)
48
+ return 'inconclusive';
49
+ const failing = checks.filter((c) => c.outcome !== 'passed' && c.outcome !== 'skipped');
50
+ if (failing.length === 0) {
51
+ if (checks.length === 0)
52
+ return 'inconclusive';
53
+ return ev['passed'] === false ? 'inconclusive' : 'pass';
54
+ }
55
+ if (failing.some((c) => c.outcome === 'timed_out'))
56
+ return 'inconclusive';
57
+ if (failing.some((c) => Array.isArray(c.envCannotRun) && c.envCannotRun.length > 0))
58
+ return 'inconclusive';
59
+ if (failing.some((c) => c.decision?.outcome === 'flaky_twice'))
60
+ return 'inconclusive';
61
+ if (failing.every((c) => c.decision?.outcome === 'base_red_unseparated'))
62
+ return 'base_red';
63
+ return 'real_fail';
64
+ }
65
+ /** What the engine TOLD the operator: the escalation's condition, read with the floor it sits on. */
66
+ export function engineFloorClass(esc, floor) {
67
+ if (esc['condition'] === 'boundary_deny')
68
+ return 'boundary_deny';
69
+ return ruleFloorClass(esc, floor);
70
+ }
71
+ /** What the floor's own evidence says an escalation on it is. An escalation is never a pass: a floor with no
72
+ * failing row behind a denial could not say what failed (inconclusive). */
73
+ export function ruleFloorClass(esc, floor) {
74
+ if (esc['denialSource'] === 'repo_checks_timeout')
75
+ return 'inconclusive';
76
+ if (floor === null)
77
+ return 'inconclusive';
78
+ const c = floorClassOf(floor);
79
+ return c === 'pass' ? 'inconclusive' : c;
80
+ }
81
+ export function captureFloorCases(input) {
82
+ const out = [];
83
+ for (const run of input.runs) {
84
+ const runId = str(run.session['id']);
85
+ if (runId === null)
86
+ continue;
87
+ const events = sortedEvents(input.events(runId));
88
+ const escalations = events.filter((e) => e.type === 'gateEscalated' && typeof e['denialSource'] === 'string' && e['denialSource'].startsWith('repo_checks'));
89
+ for (const esc of escalations) {
90
+ const ord = num(esc.ord);
91
+ const ts = num(esc.ts);
92
+ if (ord === null || ts === null)
93
+ continue;
94
+ // The floor of the SAME attempt (agy r1): an attempt that escalated without its own floor reads none.
95
+ const attempt = num(esc['attempt']);
96
+ const floor = [...events]
97
+ .reverse()
98
+ .find((e) => e.type === 'repoChecksEvaluated' && e.ord === ord && (num(e.ts) ?? 0) <= ts && (attempt === null || num(e['attempt']) === null || num(e['attempt']) === attempt)) ?? null;
99
+ const ruleClass = ruleFloorClass(esc, floor);
100
+ const observed = engineFloorClass(esc, floor);
101
+ const nextEsc = events.find((e) => e.type === 'gateEscalated' && e.ord === ord && (num(e.ts) ?? 0) > ts);
102
+ const decision = decisionAfter(input.decisions, runId, ord, ts, nextEsc !== undefined ? (num(nextEsc.ts) ?? null) : null);
103
+ let expected = {
104
+ label: ruleClass,
105
+ by: 'rule',
106
+ why: `a floor that ran (denial source ${String(esc['denialSource'])}) is judged by its own checks, never as a boundary deny`,
107
+ };
108
+ if (decision?.origin.choice === 'operator_judgment' && ruleClass === 'real_fail') {
109
+ expected = { label: 'inconclusive', by: 'operator', why: 'the operator overrode the floor: not a real failure of the change' };
110
+ }
111
+ else if (decision?.origin.choice === 'request_changes') {
112
+ expected = { label: 'real_fail', by: 'operator', why: 'the operator sent the work back: the failure was real' };
113
+ }
114
+ // A case only when something other than the observation labels it: a disagreement with the rule, or the
115
+ // operator's answer. Agreeing rule-only cases are still evidence (the engine got it right) and are kept.
116
+ const failing = (Array.isArray(floor?.['checks']) ? floor['checks'] : [])
117
+ .filter((c) => c.outcome !== 'passed' && c.outcome !== 'skipped')
118
+ .map((c) => String(c.name ?? '?'))
119
+ .sort();
120
+ out.push({
121
+ id: `floor-class:${runId}:${ord}:${num(esc.seq) ?? ts}`,
122
+ suite: 'floor-class',
123
+ source: 'real',
124
+ project: placeOf(run.session),
125
+ inputKey: `floor:${ruleClass}:${String(esc['denialSource'])}`,
126
+ input: { condition: esc['condition'], denialSource: esc['denialSource'], attempt: esc['attempt'] ?? null, failing },
127
+ observed: { label: observed, by: 'recorded' },
128
+ expected,
129
+ evidence: { runId, ord, ...(num(esc.seq) !== null ? { seq: num(esc.seq) } : {}), ...(decision !== null ? { decisionId: decision.id } : {}) },
130
+ });
131
+ }
132
+ }
133
+ return out;
134
+ }
135
+ // ── S3: the QE verdict ─────────────────────────────────────────────────────────────────────────────────────────
136
+ /**
137
+ * The verdict a QE reason states in its own words, read conservatively: only an explicit verdict token counts, at
138
+ * the very start of the reason (after an optional `[tag]`), or after `verdict:` or a colon (`review: PASS.`).
139
+ * Prose that merely mentions passing or failing ("no tests failed", "cannot pass") states no verdict: `null`,
140
+ * and the case is left unlabelled rather than labelled wrong.
141
+ */
142
+ export function verdictInReason(reason) {
143
+ const head = reason.slice(0, 160);
144
+ const word = (w) => (/^inc/i.test(w) ? 'INCONCLUSIVE' : /^pass/i.test(w) ? 'PASS' : 'FAIL');
145
+ const lead = /^\s*(?:\[[^\]]*\]\s*)?(inconclusive|pass|fail)\b(?!\s+(?:to|if|when|because)\b)/i.exec(head);
146
+ if (lead !== null)
147
+ return word(lead[1]);
148
+ const declared = /(?:\bverdict\s*[:=]|:)\s*(PASS|FAIL|INCONCLUSIVE)\b/.exec(head);
149
+ if (declared !== null)
150
+ return word(declared[1]);
151
+ return null;
152
+ }
153
+ /** The tree the run's QE decision named last at or before `at` (ms); `null` when none did. */
154
+ export function qeTreeAt(events, at) {
155
+ let tree = null;
156
+ for (const e of sortedEvents([...events])) {
157
+ if (e.type !== 'qeAcceptanceDecided' || (num(e.ts) ?? Infinity) > at)
158
+ continue;
159
+ tree = str(e['qe']?.['tree']) ?? tree;
160
+ }
161
+ return tree;
162
+ }
163
+ export function captureQeCases(input) {
164
+ const out = [];
165
+ const place = new Map(input.runs.map((r) => [str(r.session['id']), placeOf(r.session)]));
166
+ for (const v of input.qeVerdicts) {
167
+ const said = verdictInReason(v.reason);
168
+ if (said === null)
169
+ continue;
170
+ out.push({
171
+ id: `qe-verdict:${v.runId}:${v.id}`,
172
+ suite: 'qe-verdict',
173
+ source: 'real',
174
+ project: place.get(v.runId) ?? null,
175
+ inputKey: `qe:${said}`,
176
+ input: { reason: scrub(v.reason), tree: v.tree },
177
+ observed: { label: v.verdict.toUpperCase(), by: 'recorded' },
178
+ expected: { label: said, by: 'rule', why: 'the reviewer’s own reason states this verdict' },
179
+ evidence: { runId: v.runId },
180
+ });
181
+ }
182
+ // Test-retest: one tree judged twice should get one answer. A verdict that carries no tree stamp judged the tree
183
+ // the run's QE decision named last before the verdict was written.
184
+ const byTree = new Map();
185
+ for (const raw of input.qeVerdicts) {
186
+ const v = raw.tree !== null ? raw : { ...raw, tree: qeTreeAt(input.events(raw.runId), Date.parse(raw.createdAt)) };
187
+ if (v.tree === null)
188
+ continue;
189
+ const k = `${v.runId}\u0000${v.tree}`;
190
+ byTree.set(k, [...(byTree.get(k) ?? []), v]);
191
+ }
192
+ for (const vs of byTree.values()) {
193
+ if (vs.length < 2)
194
+ continue;
195
+ const words = new Set(vs.map((v) => v.verdict.toUpperCase()));
196
+ const first = vs[0];
197
+ out.push({
198
+ id: `qe-verdict:retest:${first.runId}:${first.tree}`,
199
+ suite: 'qe-verdict',
200
+ source: 'real',
201
+ project: place.get(first.runId) ?? null,
202
+ inputKey: 'qe:retest',
203
+ input: { tree: first.tree, verdicts: vs.map((v) => v.verdict.toUpperCase()).sort() },
204
+ observed: { label: words.size === 1 ? 'same' : 'differs', by: 'recorded' },
205
+ expected: { label: 'same', by: 'rule', why: 'one tree, one verdict' },
206
+ evidence: { runId: first.runId },
207
+ });
208
+ }
209
+ return out;
210
+ }
211
+ // ── S4: builder attribution ────────────────────────────────────────────────────────────────────────────────────
212
+ /**
213
+ * The seats whose attempts on a unit changed the tree, and the last of them. One chronological pass: the seat in
214
+ * force is the latest of the engine's own seat events for the unit (`skillsSnapshotHanded {cli}` for an attempt,
215
+ * `unitReassigned.newCli`, a `stepFailed` "failing over to"); the plan-time `unitDistributed.cli` is only the
216
+ * starting point (it can name a seat the unit never ran on). An attempt is an author only when its floor recorded
217
+ * changed paths. `null` when the unit ran no floor (nothing to read).
218
+ */
219
+ export function changingSeats(events, ord, firstCli) {
220
+ let cli = firstCli;
221
+ let last = null;
222
+ const authors = new Set();
223
+ let sawFloor = false;
224
+ for (const e of events) {
225
+ if (e.ord !== ord)
226
+ continue;
227
+ if (e.type === 'skillsSnapshotHanded' && str(e['cli']) !== null)
228
+ cli = str(e['cli']);
229
+ if (e.type === 'unitReassigned' && str(e['newCli']) !== null)
230
+ cli = str(e['newCli']);
231
+ if (e.type === 'stepFailed') {
232
+ const m = /failing over to '([^']+)'/.exec(String(e['detail'] ?? ''));
233
+ if (m !== null)
234
+ cli = m[1];
235
+ }
236
+ if (e.type === 'repoChecksEvaluated') {
237
+ sawFloor = true;
238
+ const changed = Array.isArray(e['changed']) ? e['changed'] : [];
239
+ if (changed.length > 0 && cli !== null) {
240
+ authors.add(cli);
241
+ last = cli;
242
+ }
243
+ }
244
+ }
245
+ return sawFloor ? { authors: [...authors].sort(), last } : null;
246
+ }
247
+ const NOT_A_SEAT = new Set(['bash', 'tool']);
248
+ export function captureAttributionCases(input) {
249
+ const out = [];
250
+ for (const run of input.runs) {
251
+ const runId = str(run.session['id']);
252
+ if (runId === null)
253
+ continue;
254
+ const events = sortedEvents(input.events(runId));
255
+ const firstCli = new Map();
256
+ for (const e of events)
257
+ if (e.type === 'unitDistributed' && num(e.ord) !== null && str(e['cli']) !== null && !firstCli.has(e.ord))
258
+ firstCli.set(e.ord, String(e['cli']));
259
+ const builders = new Map();
260
+ for (const u of run.units) {
261
+ const ord = num(u['ord']);
262
+ if (ord === null || u['stage'] !== 'build' || u['role'] !== 'creator')
263
+ continue;
264
+ const seats = changingSeats(events, ord, firstCli.get(ord) ?? str(u['assigned_cli']));
265
+ if (seats === null || seats.authors.length === 0)
266
+ continue;
267
+ builders.set(ord, seats);
268
+ const authored = (Array.isArray(u['authored_by']) ? u['authored_by'] : []).filter((x) => typeof x === 'string');
269
+ if (authored.length > 0) {
270
+ out.push({
271
+ id: `attribution:${runId}:${ord}:authors`,
272
+ suite: 'attribution',
273
+ source: 'real',
274
+ project: placeOf(run.session),
275
+ // Each unit's authorship is its own question (different runs have different builders), so no cross-place key.
276
+ inputKey: `attribution:${runId}:${ord}:authors`,
277
+ input: { unit: ord, kind: 'build unit authors' },
278
+ observed: { labels: [...authored].sort(), by: 'recorded' },
279
+ expected: { labels: seats.authors, by: 'rule', why: 'an author is a seat whose attempt changed the tree' },
280
+ evidence: { runId, ord },
281
+ });
282
+ }
283
+ }
284
+ if (builders.size === 0)
285
+ continue;
286
+ for (const u of run.units) {
287
+ const ord = num(u['ord']);
288
+ if (ord === null || u['role'] !== 'evaluator')
289
+ continue;
290
+ const creator = str(u['assurance']?.['creator']);
291
+ if (creator === null || NOT_A_SEAT.has(creator))
292
+ continue;
293
+ // The receipt's creator is ONE seat: the latest builder's (codex r1). The full author set is scored on the
294
+ // build unit itself, above.
295
+ const latest = [...builders.entries()].filter(([o]) => o < ord).sort(([a], [b]) => b - a)[0];
296
+ if (latest === undefined || latest[1].last === null)
297
+ continue;
298
+ out.push({
299
+ id: `attribution:${runId}:${ord}:creator`,
300
+ suite: 'attribution',
301
+ source: 'real',
302
+ project: placeOf(run.session),
303
+ inputKey: `attribution:${runId}:${ord}:creator`,
304
+ input: { unit: ord, kind: 'creator named on a reviewing unit' },
305
+ observed: { labels: creator.split(/,\s*/).sort(), by: 'recorded' },
306
+ expected: { labels: [latest[1].last], by: 'rule', why: 'the creator of reviewed work is the seat that last changed the tree' },
307
+ evidence: { runId, ord },
308
+ });
309
+ }
310
+ }
311
+ return out;
312
+ }
313
+ // ── S5: steering firing, from real denials ─────────────────────────────────────────────────────────────────────
314
+ /** An input-governance deny the operator then let through is a candidate false alarm; one they stopped stood. */
315
+ export function captureSteeringDenials(input) {
316
+ const out = [];
317
+ for (const run of input.runs) {
318
+ const runId = str(run.session['id']);
319
+ if (runId === null)
320
+ continue;
321
+ const events = sortedEvents(input.events(runId));
322
+ for (const esc of events) {
323
+ if (esc.type !== 'gateEscalated' || esc['denialSource'] !== 'input_governance')
324
+ continue;
325
+ const ord = num(esc.ord);
326
+ const ts = num(esc.ts);
327
+ if (ord === null || ts === null)
328
+ continue;
329
+ const next = events.find((e) => e.type === 'gateEscalated' && e.ord === ord && (num(e.ts) ?? 0) > ts);
330
+ const d = decisionAfter(input.decisions, runId, ord, ts, next !== undefined ? (num(next.ts) ?? null) : null);
331
+ const choice = d?.origin.choice ?? null;
332
+ if (choice === null)
333
+ continue;
334
+ const letThrough = choice === 'approve' || choice === 'operator_judgment' || choice === 'rejudge';
335
+ const stood = choice === 'reject' || choice === 'request_changes';
336
+ if (!letThrough && !stood)
337
+ continue;
338
+ out.push({
339
+ id: `steering:${runId}:${ord}:${num(esc.seq) ?? ts}`,
340
+ suite: 'steering',
341
+ source: 'real',
342
+ project: placeOf(run.session),
343
+ inputKey: 'steering:input-governance-deny',
344
+ input: { condition: esc['condition'], summary: scrub(String(esc['verdictSummary'] ?? '')) },
345
+ observed: { label: 'block', by: 'recorded' },
346
+ expected: {
347
+ label: letThrough ? 'allow' : 'block',
348
+ by: 'operator',
349
+ why: letThrough ? 'the operator approved the refused work' : 'the operator stopped or sent back the refused work',
350
+ },
351
+ evidence: { runId, ord, ...(num(esc.seq) !== null ? { seq: num(esc.seq) } : {}), ...(d !== null ? { decisionId: d.id } : {}) },
352
+ });
353
+ }
354
+ }
355
+ return out;
356
+ }
357
+ // ── S7: archetype routing, real prompts with the workflow the operator chose ───────────────────────────────────
358
+ /** The workflow a person launched → the garden archetype it is. System workflows are not a routing choice. */
359
+ export function archetypeOfWorkflow(workflowId) {
360
+ if (workflowId.startsWith('wf-'))
361
+ return 'explore'; // an ask / chat turn: a question about the code
362
+ switch (workflowId) {
363
+ case 'bug':
364
+ case 'feature':
365
+ case 'mcp-server':
366
+ case 'editor-plugin':
367
+ return 'build';
368
+ case 'learn':
369
+ return 'explore';
370
+ case 'review':
371
+ return 'review';
372
+ default:
373
+ return null; // onboarding, capture-learnings and other system workflows
374
+ }
375
+ }
376
+ export function captureArchetypeCases(input) {
377
+ const seen = new Set();
378
+ const out = [];
379
+ for (const run of input.runs) {
380
+ const s = run.session;
381
+ const wf = str(s['workflow_id']);
382
+ const title = str(s['title']);
383
+ if (wf === null || title === null)
384
+ continue;
385
+ const label = archetypeOfWorkflow(wf);
386
+ if (label === null)
387
+ continue;
388
+ const prompt = scrub(title, 200);
389
+ // One prompt asked twice in one place is one case (repeats are not evidence); the same prompt in another
390
+ // project is that project's evidence, and the cross-project comparison needs it (codex r1).
391
+ const key = `${placeOf(s) ?? ''}\u0000${label}\u0000${prompt.toLowerCase()}`;
392
+ if (seen.has(key))
393
+ continue;
394
+ seen.add(key);
395
+ out.push({
396
+ id: `archetype:${String(s['id'])}`,
397
+ suite: 'archetype',
398
+ source: 'real',
399
+ project: placeOf(s),
400
+ inputKey: `archetype:${prompt.toLowerCase()}`,
401
+ input: { prompt },
402
+ observed: null, // replayed through the current classifier at run time
403
+ expected: { label, by: 'operator', why: `the operator launched it as ${wf.startsWith('wf-') ? 'an ask' : wf}` },
404
+ evidence: { runId: String(s['id']) },
405
+ });
406
+ }
407
+ return out;
408
+ }
409
+ /** Every real case the run store yields. */
410
+ export function captureAll(input) {
411
+ return [
412
+ ...captureFloorCases(input),
413
+ ...captureQeCases(input),
414
+ ...captureAttributionCases(input),
415
+ ...captureSteeringDenials(input),
416
+ ...captureArchetypeCases(input),
417
+ ];
418
+ }
419
+ //# sourceMappingURL=capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.js","sourceRoot":"","sources":["../../src/evals/capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4CH,MAAM,GAAG,GAAG,CAAC,CAAU,EAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1F,MAAM,GAAG,GAAG,CAAC,CAAU,EAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,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AM,UAAU,UAAU,CAAC,KAAmB;IAC5C,OAAO;QACL,GAAG,iBAAiB,CAAC,KAAK,CAAC;QAC3B,GAAG,cAAc,CAAC,KAAK,CAAC;QACxB,GAAG,uBAAuB,CAAC,KAAK,CAAC;QACjC,GAAG,sBAAsB,CAAC,KAAK,CAAC;QAChC,GAAG,qBAAqB,CAAC,KAAK,CAAC;KAChC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Replay adapters (DES-DEFAULT-EVALS-001 §4): the CURRENT classifier, run on a case's input, so synthetic cases can
3
+ * be scored and real cases can show whether today's behaviour differs from what was recorded.
4
+ *
5
+ * Crew can replay only what it can call. The archetype classifier is garden's (`scripts/crew/archetypes_v11.py`,
6
+ * stdlib-only Python), run as one batch per eval. The floor class, the QE verdict and builder attribution are decided
7
+ * inside the engine (core) with no replay entry, so they have no adapter here and say so.
8
+ */
9
+ import type { EvalCase, Observed, SuiteId } from './types.js';
10
+ export interface ReplayAdapter {
11
+ suite: SuiteId;
12
+ /** Answers for the cases it can replay, by case id. A case it could not answer is absent. */
13
+ replay(cases: readonly EvalCase[]): Promise<Map<string, Observed>>;
14
+ }
15
+ export interface ReplaySet {
16
+ adapters: Partial<Record<SuiteId, ReplayAdapter>>;
17
+ /** Why a suite has no adapter, for the report's notes. */
18
+ missing: Partial<Record<SuiteId, string>>;
19
+ }
20
+ export type RunPython = (args: string[], stdin: string, timeoutMs: number) => Promise<{
21
+ code: number | null;
22
+ stdout: string;
23
+ stderr: string;
24
+ }>;
25
+ export declare const runPython: RunPython;
26
+ /** The archetype adapter over a garden root, or `null` when the root has no classifier. */
27
+ export declare function archetypeAdapter(gardenRoot: string | null, run?: RunPython): ReplayAdapter | null;
28
+ export declare const NO_REPLAY: Partial<Record<SuiteId, string>>;
29
+ export declare function defaultReplaySet(opts: {
30
+ gardenRoot: string | null;
31
+ run?: RunPython;
32
+ }): ReplaySet;
33
+ //# sourceMappingURL=replay.d.ts.map
@@ -0,0 +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G"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Replay adapters (DES-DEFAULT-EVALS-001 §4): the CURRENT classifier, run on a case's input, so synthetic cases can
3
+ * be scored and real cases can show whether today's behaviour differs from what was recorded.
4
+ *
5
+ * Crew can replay only what it can call. The archetype classifier is garden's (`scripts/crew/archetypes_v11.py`,
6
+ * stdlib-only Python), run as one batch per eval. The floor class, the QE verdict and builder attribution are decided
7
+ * inside the engine (core) with no replay entry, so they have no adapter here and say so.
8
+ */
9
+ import { spawn } from 'node:child_process';
10
+ import { existsSync } from 'node:fs';
11
+ import { join } from 'node:path';
12
+ import { childEnvWithBootEstateDb } from '../core/governance-store.js';
13
+ /** The batch the garden classifier runs: JSON prompts on stdin, one `[label, confidence|null]` per prompt out. */
14
+ const ARCHETYPE_BATCH = `
15
+ import json, sys
16
+ sys.path.insert(0, sys.argv[1])
17
+ from archetypes_v11 import detect_archetypes
18
+ out = []
19
+ for p in json.loads(sys.stdin.read()):
20
+ m = [x for x in detect_archetypes(prompt=p) if x[0] != "triage"]
21
+ out.append([m[0][0], m[0][1]] if m else ["none", None])
22
+ sys.stdout.write(json.dumps(out))
23
+ `;
24
+ export const runPython = (args, stdin, timeoutMs) => new Promise((resolve) => {
25
+ const child = spawn('python3', args, { stdio: ['pipe', 'pipe', 'pipe'], env: childEnvWithBootEstateDb(process.env) });
26
+ let stdout = '';
27
+ let stderr = '';
28
+ const timer = setTimeout(() => child.kill('SIGKILL'), timeoutMs);
29
+ child.stdout.on('data', (b) => (stdout += b.toString('utf8')));
30
+ child.stderr.on('data', (b) => (stderr += b.toString('utf8')));
31
+ child.on('error', (err) => {
32
+ clearTimeout(timer);
33
+ resolve({ code: null, stdout, stderr: stderr + String(err) });
34
+ });
35
+ child.on('close', (code) => {
36
+ clearTimeout(timer);
37
+ resolve({ code, stdout, stderr });
38
+ });
39
+ // A python3 that is missing or exits early must not crash the daemon on EPIPE (agy r1).
40
+ child.stdin.on('error', () => { });
41
+ child.stdin.end(stdin);
42
+ });
43
+ /** The archetype adapter over a garden root, or `null` when the root has no classifier. */
44
+ export function archetypeAdapter(gardenRoot, run = runPython) {
45
+ if (gardenRoot === null)
46
+ return null;
47
+ const dir = join(gardenRoot, 'scripts', 'crew');
48
+ if (!existsSync(join(dir, 'archetypes_v11.py')))
49
+ return null;
50
+ return {
51
+ suite: 'archetype',
52
+ async replay(cases) {
53
+ const out = new Map();
54
+ const todo = cases.filter((c) => typeof c.input['prompt'] === 'string');
55
+ if (todo.length === 0)
56
+ return out;
57
+ const res = await run(['-I', '-c', ARCHETYPE_BATCH, dir], JSON.stringify(todo.map((c) => c.input['prompt'])), 30_000);
58
+ if (res.code !== 0)
59
+ throw new Error(`archetype classifier exited ${String(res.code)}: ${res.stderr.trim().slice(0, 200)}`);
60
+ const rows = JSON.parse(res.stdout);
61
+ todo.forEach((c, i) => {
62
+ const row = rows[i];
63
+ if (row === undefined)
64
+ return;
65
+ out.set(c.id, { label: row[0], ...(typeof row[1] === 'number' ? { confidence: row[1] } : {}), by: 'replay' });
66
+ });
67
+ return out;
68
+ },
69
+ };
70
+ }
71
+ export const NO_REPLAY = {
72
+ 'floor-class': 'the floor class is decided inside the engine (core), which has no replay entry yet',
73
+ 'qe-verdict': 'a QE verdict is a model’s judgment; only recorded verdicts are scored',
74
+ attribution: 'authorship is decided inside the engine (core), which has no replay entry yet',
75
+ 'needs-you': 'the needs-you rule is being rebuilt in crew (needs-one); recorded surfaces are scored until it lands',
76
+ };
77
+ export function defaultReplaySet(opts) {
78
+ const missing = { ...NO_REPLAY };
79
+ const adapters = {};
80
+ const a = archetypeAdapter(opts.gardenRoot, opts.run);
81
+ if (a !== null)
82
+ adapters.archetype = a;
83
+ else
84
+ missing.archetype = 'garden’s archetype classifier was not found (set WICKED_GARDEN_ROOT)';
85
+ return { adapters, missing };
86
+ }
87
+ //# sourceMappingURL=replay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay.js","sourceRoot":"","sources":["../../src/evals/replay.ts"],"names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oD;IACnF,MAAM,OAAO,GAAqC,EAAE,GAAG,SAAS,EAAE,CAAC;IACnE,MAAM,QAAQ,GAA4C,EAAE,CAAC;IAC7D,MAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,IAAI;QAAE,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC;;QAClC,OAAO,CAAC,SAAS,GAAG,sEAAsE,CAAC;IAChG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * `/api/v1/testing/default-evals*` (DES-DEFAULT-EVALS-001 §7): run the default evals over this daemon's own run
3
+ * store, per project or across projects, and read the history.
4
+ *
5
+ * GET /testing/default-evals/suites what each suite checks, and whether crew can replay it
6
+ * POST /testing/default-evals/run {project?: string | "all", suites?: SuiteId[], baseline?: boolean}
7
+ * GET /testing/default-evals the history, newest first
8
+ * GET /testing/default-evals/:id one run's report and its cases
9
+ *
10
+ * Everything is read from the run store (sessions, events, decisions, QE ledgers, the latest steering eval); the
11
+ * only write is the report itself, under `<home>/evals/default/`.
12
+ */
13
+ import type { FastifyInstance } from 'fastify';
14
+ import type { EvalRunStore } from '../api/eval-store.js';
15
+ import { type DecisionLike, type EventLike, type RunLike } from './capture.js';
16
+ import type { ReplaySet } from './replay.js';
17
+ import type { DefaultEvalStore } from './store.js';
18
+ import { type DefaultEvalReport, type EvalCase, type SuiteId } from './types.js';
19
+ export interface DefaultEvalDeps {
20
+ /** Where runs are kept. Absent (a directly-driven route set): a run is computed and answered, never stored. */
21
+ store?: DefaultEvalStore;
22
+ /** Every run with its units (`adapter.sessionsDetail()`). */
23
+ runs: () => Promise<RunLike[]>;
24
+ /** One run's recorded events (`adapter.runEvents(id)`); `null` when the engine predates the binding. */
25
+ events: (runId: string) => Promise<EventLike[] | null>;
26
+ /** The operator's gate decisions (the decision ledger); empty when decision capture is off. */
27
+ decisions: () => DecisionLike[];
28
+ /** The steering evals' run history, for S5. */
29
+ steeringEvals?: EvalRunStore;
30
+ replay: ReplaySet;
31
+ now?: () => Date;
32
+ newId?: () => string;
33
+ }
34
+ /** The cases this daemon's own store yields right now (and the baseline, when asked for). */
35
+ export declare function gatherCases(deps: DefaultEvalDeps, opts: {
36
+ baseline: boolean;
37
+ }): Promise<EvalCase[]>;
38
+ /** Run the default evals over this daemon's store and keep the report: the one path the route, the `run-evals`
39
+ * workflow's launch and the schedule share. */
40
+ export declare function runAndRecord(deps: DefaultEvalDeps, opts: {
41
+ project: string | null;
42
+ baseline: boolean;
43
+ suites?: SuiteId[];
44
+ id: string;
45
+ now: Date;
46
+ }): Promise<DefaultEvalReport>;
47
+ export declare function registerDefaultEvalRoutes(app: FastifyInstance, deps: DefaultEvalDeps): void;
48
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/evals/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAiC,KAAK,YAAY,EAAE,KAAK,SAAS,EAAsB,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAClI,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAa,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5F,MAAM,WAAW,eAAe;IAC9B,+GAA+G;IAC/G,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,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