@maintainabilityai/research-runner 0.1.19 → 0.1.22
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/cli.js +38 -0
- package/dist/runner/court-recorder.d.ts +52 -0
- package/dist/runner/court-recorder.js +77 -0
- package/dist/runner/hatters-tag-builder.d.ts +78 -0
- package/dist/runner/hatters-tag-builder.js +58 -0
- package/dist/runner/skills.d.ts +20 -0
- package/dist/runner/skills.js +792 -0
- package/dist/schemas/audit-event.d.ts +144 -0
- package/dist/schemas/audit-event.js +11 -0
- package/package.json +1 -1
|
@@ -23,6 +23,12 @@ declare const PureApiEvent: z.ZodObject<{
|
|
|
23
23
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
24
24
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
25
25
|
event_hash: z.ZodString;
|
|
26
|
+
/** Which OKR phase this event belongs to. */
|
|
27
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
28
|
+
/** Anchor OKR id (human-readable). */
|
|
29
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
31
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
26
32
|
} & {
|
|
27
33
|
node_kind: z.ZodLiteral<"pure_api">;
|
|
28
34
|
api: z.ZodObject<{
|
|
@@ -61,6 +67,9 @@ declare const PureApiEvent: z.ZodObject<{
|
|
|
61
67
|
http_status: number;
|
|
62
68
|
response_byte_count: number;
|
|
63
69
|
};
|
|
70
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
71
|
+
okr_id?: string | undefined;
|
|
72
|
+
intent_thread_uuid?: string | undefined;
|
|
64
73
|
}, {
|
|
65
74
|
run_id: string;
|
|
66
75
|
event_id: number;
|
|
@@ -77,6 +86,9 @@ declare const PureApiEvent: z.ZodObject<{
|
|
|
77
86
|
http_status: number;
|
|
78
87
|
response_byte_count: number;
|
|
79
88
|
};
|
|
89
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
90
|
+
okr_id?: string | undefined;
|
|
91
|
+
intent_thread_uuid?: string | undefined;
|
|
80
92
|
}>;
|
|
81
93
|
/** `llm` — non-deterministic LLM call (plan_queries, synthesize, expert reviews). */
|
|
82
94
|
declare const LlmEvent: z.ZodObject<{
|
|
@@ -90,6 +102,12 @@ declare const LlmEvent: z.ZodObject<{
|
|
|
90
102
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
91
103
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
92
104
|
event_hash: z.ZodString;
|
|
105
|
+
/** Which OKR phase this event belongs to. */
|
|
106
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
107
|
+
/** Anchor OKR id (human-readable). */
|
|
108
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
110
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
93
111
|
} & {
|
|
94
112
|
node_kind: z.ZodLiteral<"llm">;
|
|
95
113
|
llm: z.ZodObject<{
|
|
@@ -180,6 +198,9 @@ declare const LlmEvent: z.ZodObject<{
|
|
|
180
198
|
output_tokens: number;
|
|
181
199
|
cost_usd: number;
|
|
182
200
|
};
|
|
201
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
202
|
+
okr_id?: string | undefined;
|
|
203
|
+
intent_thread_uuid?: string | undefined;
|
|
183
204
|
}, {
|
|
184
205
|
run_id: string;
|
|
185
206
|
event_id: number;
|
|
@@ -205,6 +226,9 @@ declare const LlmEvent: z.ZodObject<{
|
|
|
205
226
|
output_tokens: number;
|
|
206
227
|
cost_usd: number;
|
|
207
228
|
};
|
|
229
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
230
|
+
okr_id?: string | undefined;
|
|
231
|
+
intent_thread_uuid?: string | undefined;
|
|
208
232
|
}>;
|
|
209
233
|
/** `pure` — local-only deterministic computation (validate, dedupe, structural check). */
|
|
210
234
|
declare const PureEvent: z.ZodObject<{
|
|
@@ -218,6 +242,12 @@ declare const PureEvent: z.ZodObject<{
|
|
|
218
242
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
219
243
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
220
244
|
event_hash: z.ZodString;
|
|
245
|
+
/** Which OKR phase this event belongs to. */
|
|
246
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
247
|
+
/** Anchor OKR id (human-readable). */
|
|
248
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
249
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
250
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
221
251
|
} & {
|
|
222
252
|
node_kind: z.ZodLiteral<"pure">;
|
|
223
253
|
pure: z.ZodObject<{
|
|
@@ -243,6 +273,9 @@ declare const PureEvent: z.ZodObject<{
|
|
|
243
273
|
inputs_summary: string;
|
|
244
274
|
outputs_summary: string;
|
|
245
275
|
};
|
|
276
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
277
|
+
okr_id?: string | undefined;
|
|
278
|
+
intent_thread_uuid?: string | undefined;
|
|
246
279
|
}, {
|
|
247
280
|
run_id: string;
|
|
248
281
|
event_id: number;
|
|
@@ -256,6 +289,9 @@ declare const PureEvent: z.ZodObject<{
|
|
|
256
289
|
inputs_summary: string;
|
|
257
290
|
outputs_summary: string;
|
|
258
291
|
};
|
|
292
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
293
|
+
okr_id?: string | undefined;
|
|
294
|
+
intent_thread_uuid?: string | undefined;
|
|
259
295
|
}>;
|
|
260
296
|
/** `node_error` — any node failure, before any retry. */
|
|
261
297
|
declare const NodeErrorEvent: z.ZodObject<{
|
|
@@ -269,6 +305,12 @@ declare const NodeErrorEvent: z.ZodObject<{
|
|
|
269
305
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
270
306
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
271
307
|
event_hash: z.ZodString;
|
|
308
|
+
/** Which OKR phase this event belongs to. */
|
|
309
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
310
|
+
/** Anchor OKR id (human-readable). */
|
|
311
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
312
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
313
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
272
314
|
} & {
|
|
273
315
|
node_kind: z.ZodLiteral<"node_error">;
|
|
274
316
|
error: z.ZodObject<{
|
|
@@ -299,6 +341,9 @@ declare const NodeErrorEvent: z.ZodObject<{
|
|
|
299
341
|
retryable: boolean;
|
|
300
342
|
stack?: string | undefined;
|
|
301
343
|
};
|
|
344
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
345
|
+
okr_id?: string | undefined;
|
|
346
|
+
intent_thread_uuid?: string | undefined;
|
|
302
347
|
}, {
|
|
303
348
|
run_id: string;
|
|
304
349
|
event_id: number;
|
|
@@ -313,6 +358,9 @@ declare const NodeErrorEvent: z.ZodObject<{
|
|
|
313
358
|
retryable: boolean;
|
|
314
359
|
stack?: string | undefined;
|
|
315
360
|
};
|
|
361
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
362
|
+
okr_id?: string | undefined;
|
|
363
|
+
intent_thread_uuid?: string | undefined;
|
|
316
364
|
}>;
|
|
317
365
|
/**
|
|
318
366
|
* `iteration_summary` — emitted once per PRD refinement loop iteration after
|
|
@@ -331,6 +379,12 @@ declare const IterationSummaryEvent: z.ZodObject<{
|
|
|
331
379
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
332
380
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
333
381
|
event_hash: z.ZodString;
|
|
382
|
+
/** Which OKR phase this event belongs to. */
|
|
383
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
384
|
+
/** Anchor OKR id (human-readable). */
|
|
385
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
386
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
387
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
334
388
|
} & {
|
|
335
389
|
node_kind: z.ZodLiteral<"iteration_summary">;
|
|
336
390
|
iteration: z.ZodNumber;
|
|
@@ -467,6 +521,9 @@ declare const IterationSummaryEvent: z.ZodObject<{
|
|
|
467
521
|
verdict: "PASS" | "ITERATE" | "EXHAUSTED";
|
|
468
522
|
reason: string;
|
|
469
523
|
};
|
|
524
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
525
|
+
okr_id?: string | undefined;
|
|
526
|
+
intent_thread_uuid?: string | undefined;
|
|
470
527
|
}, {
|
|
471
528
|
run_id: string;
|
|
472
529
|
iteration: number;
|
|
@@ -501,6 +558,9 @@ declare const IterationSummaryEvent: z.ZodObject<{
|
|
|
501
558
|
verdict: "PASS" | "ITERATE" | "EXHAUSTED";
|
|
502
559
|
reason: string;
|
|
503
560
|
};
|
|
561
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
562
|
+
okr_id?: string | undefined;
|
|
563
|
+
intent_thread_uuid?: string | undefined;
|
|
504
564
|
}>;
|
|
505
565
|
/** `run_complete` — final event emitted by verify_and_trigger. Closes the chain. */
|
|
506
566
|
declare const RunCompleteEvent: z.ZodObject<{
|
|
@@ -514,6 +574,12 @@ declare const RunCompleteEvent: z.ZodObject<{
|
|
|
514
574
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
515
575
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
516
576
|
event_hash: z.ZodString;
|
|
577
|
+
/** Which OKR phase this event belongs to. */
|
|
578
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
579
|
+
/** Anchor OKR id (human-readable). */
|
|
580
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
581
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
582
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
517
583
|
} & {
|
|
518
584
|
node_kind: z.ZodLiteral<"run_complete">;
|
|
519
585
|
outcome: z.ZodObject<{
|
|
@@ -564,6 +630,9 @@ declare const RunCompleteEvent: z.ZodObject<{
|
|
|
564
630
|
chain_root_hash: string;
|
|
565
631
|
pr_url?: string | undefined;
|
|
566
632
|
};
|
|
633
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
634
|
+
okr_id?: string | undefined;
|
|
635
|
+
intent_thread_uuid?: string | undefined;
|
|
567
636
|
}, {
|
|
568
637
|
run_id: string;
|
|
569
638
|
event_id: number;
|
|
@@ -583,6 +652,9 @@ declare const RunCompleteEvent: z.ZodObject<{
|
|
|
583
652
|
chain_root_hash: string;
|
|
584
653
|
pr_url?: string | undefined;
|
|
585
654
|
};
|
|
655
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
656
|
+
okr_id?: string | undefined;
|
|
657
|
+
intent_thread_uuid?: string | undefined;
|
|
586
658
|
}>;
|
|
587
659
|
export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObject<{
|
|
588
660
|
run_id: z.ZodString;
|
|
@@ -595,6 +667,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
595
667
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
596
668
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
597
669
|
event_hash: z.ZodString;
|
|
670
|
+
/** Which OKR phase this event belongs to. */
|
|
671
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
672
|
+
/** Anchor OKR id (human-readable). */
|
|
673
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
674
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
675
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
598
676
|
} & {
|
|
599
677
|
node_kind: z.ZodLiteral<"pure_api">;
|
|
600
678
|
api: z.ZodObject<{
|
|
@@ -633,6 +711,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
633
711
|
http_status: number;
|
|
634
712
|
response_byte_count: number;
|
|
635
713
|
};
|
|
714
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
715
|
+
okr_id?: string | undefined;
|
|
716
|
+
intent_thread_uuid?: string | undefined;
|
|
636
717
|
}, {
|
|
637
718
|
run_id: string;
|
|
638
719
|
event_id: number;
|
|
@@ -649,6 +730,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
649
730
|
http_status: number;
|
|
650
731
|
response_byte_count: number;
|
|
651
732
|
};
|
|
733
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
734
|
+
okr_id?: string | undefined;
|
|
735
|
+
intent_thread_uuid?: string | undefined;
|
|
652
736
|
}>, z.ZodObject<{
|
|
653
737
|
run_id: z.ZodString;
|
|
654
738
|
/** Monotonically incrementing within a run, starting at 1. */
|
|
@@ -660,6 +744,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
660
744
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
661
745
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
662
746
|
event_hash: z.ZodString;
|
|
747
|
+
/** Which OKR phase this event belongs to. */
|
|
748
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
749
|
+
/** Anchor OKR id (human-readable). */
|
|
750
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
751
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
752
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
663
753
|
} & {
|
|
664
754
|
node_kind: z.ZodLiteral<"llm">;
|
|
665
755
|
llm: z.ZodObject<{
|
|
@@ -750,6 +840,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
750
840
|
output_tokens: number;
|
|
751
841
|
cost_usd: number;
|
|
752
842
|
};
|
|
843
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
844
|
+
okr_id?: string | undefined;
|
|
845
|
+
intent_thread_uuid?: string | undefined;
|
|
753
846
|
}, {
|
|
754
847
|
run_id: string;
|
|
755
848
|
event_id: number;
|
|
@@ -775,6 +868,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
775
868
|
output_tokens: number;
|
|
776
869
|
cost_usd: number;
|
|
777
870
|
};
|
|
871
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
872
|
+
okr_id?: string | undefined;
|
|
873
|
+
intent_thread_uuid?: string | undefined;
|
|
778
874
|
}>, z.ZodObject<{
|
|
779
875
|
run_id: z.ZodString;
|
|
780
876
|
/** Monotonically incrementing within a run, starting at 1. */
|
|
@@ -786,6 +882,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
786
882
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
787
883
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
788
884
|
event_hash: z.ZodString;
|
|
885
|
+
/** Which OKR phase this event belongs to. */
|
|
886
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
887
|
+
/** Anchor OKR id (human-readable). */
|
|
888
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
889
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
890
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
789
891
|
} & {
|
|
790
892
|
node_kind: z.ZodLiteral<"pure">;
|
|
791
893
|
pure: z.ZodObject<{
|
|
@@ -811,6 +913,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
811
913
|
inputs_summary: string;
|
|
812
914
|
outputs_summary: string;
|
|
813
915
|
};
|
|
916
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
917
|
+
okr_id?: string | undefined;
|
|
918
|
+
intent_thread_uuid?: string | undefined;
|
|
814
919
|
}, {
|
|
815
920
|
run_id: string;
|
|
816
921
|
event_id: number;
|
|
@@ -824,6 +929,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
824
929
|
inputs_summary: string;
|
|
825
930
|
outputs_summary: string;
|
|
826
931
|
};
|
|
932
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
933
|
+
okr_id?: string | undefined;
|
|
934
|
+
intent_thread_uuid?: string | undefined;
|
|
827
935
|
}>, z.ZodObject<{
|
|
828
936
|
run_id: z.ZodString;
|
|
829
937
|
/** Monotonically incrementing within a run, starting at 1. */
|
|
@@ -835,6 +943,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
835
943
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
836
944
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
837
945
|
event_hash: z.ZodString;
|
|
946
|
+
/** Which OKR phase this event belongs to. */
|
|
947
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
948
|
+
/** Anchor OKR id (human-readable). */
|
|
949
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
950
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
951
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
838
952
|
} & {
|
|
839
953
|
node_kind: z.ZodLiteral<"node_error">;
|
|
840
954
|
error: z.ZodObject<{
|
|
@@ -865,6 +979,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
865
979
|
retryable: boolean;
|
|
866
980
|
stack?: string | undefined;
|
|
867
981
|
};
|
|
982
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
983
|
+
okr_id?: string | undefined;
|
|
984
|
+
intent_thread_uuid?: string | undefined;
|
|
868
985
|
}, {
|
|
869
986
|
run_id: string;
|
|
870
987
|
event_id: number;
|
|
@@ -879,6 +996,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
879
996
|
retryable: boolean;
|
|
880
997
|
stack?: string | undefined;
|
|
881
998
|
};
|
|
999
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
1000
|
+
okr_id?: string | undefined;
|
|
1001
|
+
intent_thread_uuid?: string | undefined;
|
|
882
1002
|
}>, z.ZodObject<{
|
|
883
1003
|
run_id: z.ZodString;
|
|
884
1004
|
/** Monotonically incrementing within a run, starting at 1. */
|
|
@@ -890,6 +1010,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
890
1010
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
891
1011
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
892
1012
|
event_hash: z.ZodString;
|
|
1013
|
+
/** Which OKR phase this event belongs to. */
|
|
1014
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
1015
|
+
/** Anchor OKR id (human-readable). */
|
|
1016
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
1017
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
1018
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
893
1019
|
} & {
|
|
894
1020
|
node_kind: z.ZodLiteral<"iteration_summary">;
|
|
895
1021
|
iteration: z.ZodNumber;
|
|
@@ -1026,6 +1152,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
1026
1152
|
verdict: "PASS" | "ITERATE" | "EXHAUSTED";
|
|
1027
1153
|
reason: string;
|
|
1028
1154
|
};
|
|
1155
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
1156
|
+
okr_id?: string | undefined;
|
|
1157
|
+
intent_thread_uuid?: string | undefined;
|
|
1029
1158
|
}, {
|
|
1030
1159
|
run_id: string;
|
|
1031
1160
|
iteration: number;
|
|
@@ -1060,6 +1189,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
1060
1189
|
verdict: "PASS" | "ITERATE" | "EXHAUSTED";
|
|
1061
1190
|
reason: string;
|
|
1062
1191
|
};
|
|
1192
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
1193
|
+
okr_id?: string | undefined;
|
|
1194
|
+
intent_thread_uuid?: string | undefined;
|
|
1063
1195
|
}>, z.ZodObject<{
|
|
1064
1196
|
run_id: z.ZodString;
|
|
1065
1197
|
/** Monotonically incrementing within a run, starting at 1. */
|
|
@@ -1071,6 +1203,12 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
1071
1203
|
prev_event_hash: z.ZodNullable<z.ZodString>;
|
|
1072
1204
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
1073
1205
|
event_hash: z.ZodString;
|
|
1206
|
+
/** Which OKR phase this event belongs to. */
|
|
1207
|
+
phase: z.ZodOptional<z.ZodEnum<["why", "how", "what"]>>;
|
|
1208
|
+
/** Anchor OKR id (human-readable). */
|
|
1209
|
+
okr_id: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
1211
|
+
intent_thread_uuid: z.ZodOptional<z.ZodString>;
|
|
1074
1212
|
} & {
|
|
1075
1213
|
node_kind: z.ZodLiteral<"run_complete">;
|
|
1076
1214
|
outcome: z.ZodObject<{
|
|
@@ -1121,6 +1259,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
1121
1259
|
chain_root_hash: string;
|
|
1122
1260
|
pr_url?: string | undefined;
|
|
1123
1261
|
};
|
|
1262
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
1263
|
+
okr_id?: string | undefined;
|
|
1264
|
+
intent_thread_uuid?: string | undefined;
|
|
1124
1265
|
}, {
|
|
1125
1266
|
run_id: string;
|
|
1126
1267
|
event_id: number;
|
|
@@ -1140,6 +1281,9 @@ export declare const AuditEvent: z.ZodDiscriminatedUnion<"node_kind", [z.ZodObje
|
|
|
1140
1281
|
chain_root_hash: string;
|
|
1141
1282
|
pr_url?: string | undefined;
|
|
1142
1283
|
};
|
|
1284
|
+
phase?: "why" | "how" | "what" | undefined;
|
|
1285
|
+
okr_id?: string | undefined;
|
|
1286
|
+
intent_thread_uuid?: string | undefined;
|
|
1143
1287
|
}>]>;
|
|
1144
1288
|
export type AuditEvent = z.infer<typeof AuditEvent>;
|
|
1145
1289
|
export type PureApiEvent = z.infer<typeof PureApiEvent>;
|
|
@@ -27,6 +27,17 @@ const Envelope = zod_1.z.object({
|
|
|
27
27
|
prev_event_hash: primitives_1.Sha256.nullable(),
|
|
28
28
|
/** SHA-256 of THIS event with `event_hash` set to the empty string. */
|
|
29
29
|
event_hash: primitives_1.Sha256,
|
|
30
|
+
// ── v4 agentic-SDLC governance fields (Phase A-PR4) ─────────────────
|
|
31
|
+
// All three are OPTIONAL so legacy CI-only runs (without an OKR anchor)
|
|
32
|
+
// continue to validate. Phase B+ OKR-anchored runs populate them so
|
|
33
|
+
// verify-chain can stitch events across repos via intent_thread_uuid.
|
|
34
|
+
// See vscode-extension/design/agentic-sdlc.md §4.4 + §11.1.6.
|
|
35
|
+
/** Which OKR phase this event belongs to. */
|
|
36
|
+
phase: zod_1.z.enum(['why', 'how', 'what']).optional(),
|
|
37
|
+
/** Anchor OKR id (human-readable). */
|
|
38
|
+
okr_id: zod_1.z.string().optional(),
|
|
39
|
+
/** Cross-repo audit correlation key (UUID v4). */
|
|
40
|
+
intent_thread_uuid: zod_1.z.string().uuid().optional(),
|
|
30
41
|
});
|
|
31
42
|
/** `pure_api` — deterministic external HTTP call (Tavily, arXiv, USPTO, HN, GitHub REST). */
|
|
32
43
|
const PureApiEvent = Envelope.extend({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maintainabilityai/research-runner",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Research + PRD agent runner — orchestrates the Archeologist and PRD pipelines for the MaintainabilityAI governance mesh",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MaintainabilityAI",
|