peaks-loop 4.0.21 → 4.0.24
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/CHANGELOG.md +109 -0
- package/dist/cli/commands/_register.js +2 -1
- package/dist/cli/commands/best-practice-scan-command.d.ts +36 -0
- package/dist/cli/commands/best-practice-scan-command.js +118 -0
- package/dist/cli/commands/request-commands.js +21 -9
- package/dist/services/best-practice/language-detector.d.ts +7 -0
- package/dist/services/best-practice/language-detector.js +96 -0
- package/dist/services/best-practice/output-formatter.d.ts +41 -0
- package/dist/services/best-practice/output-formatter.js +116 -0
- package/dist/services/best-practice/scan-orchestrator.d.ts +39 -0
- package/dist/services/best-practice/scan-orchestrator.js +85 -0
- package/dist/services/context/collector.d.ts +5 -12
- package/dist/services/context/context-builder.d.ts +12 -20
- package/dist/services/context/context-builder.js +1 -1
- package/dist/services/context/context-schema.d.ts +51 -364
- package/dist/services/context/context-schema.js +3 -3
- package/dist/services/crystallization/crystallization-service.d.ts +2 -12
- package/dist/services/crystallization/crystallization-service.js +3 -9
- package/dist/services/crystallization/crystallization-types.d.ts +45 -153
- package/dist/services/crystallization/crystallization-types.js +17 -11
- package/dist/services/crystallization/evidence-brief-builder.d.ts +12 -112
- package/dist/services/evolution/evolution-types.d.ts +83 -497
- package/dist/services/evolution/evolution-types.js +6 -10
- package/dist/services/fixture/fixture-sanitize-service.d.ts +10 -36
- package/dist/services/fixture/fixture-sanitize-service.js +1 -1
- package/dist/services/job/job-progress-store.d.ts +1 -17
- package/dist/services/job/job-progress-store.js +2 -2
- package/dist/services/job/job-types.d.ts +63 -370
- package/dist/services/job/job-types.js +46 -11
- package/dist/services/loop/loop-bee-relation-types.d.ts +20 -32
- package/dist/services/loop/loop-bee-relation-types.js +2 -2
- package/dist/services/loop/loop-release-types.d.ts +31 -110
- package/dist/services/migrate-skill-name/schema.d.ts +3 -19
- package/dist/services/migrate-skill-name/schema.js +4 -4
- package/dist/services/observability/observability-service.d.ts +21 -19
- package/dist/services/observability/observability-service.js +1 -1
- package/dist/services/prd/best-practice-auto-trigger.d.ts +61 -0
- package/dist/services/prd/best-practice-auto-trigger.js +126 -0
- package/dist/services/rd/types.d.ts +25 -194
- package/dist/services/sediment/json-schema.d.ts +39 -224
- package/dist/services/sediment/json-schema.js +2 -2
- package/dist/services/session/binding-store.d.ts +5 -47
- package/dist/services/session/binding-store.js +1 -1
- package/dist/services/share/bundle-types.d.ts +12 -180
- package/dist/services/share/bundle-types.js +15 -9
- package/dist/services/share/run-state-contract.d.ts +8 -25
- package/dist/services/skill/skill-search-service.d.ts +26 -46
- package/dist/services/skill/skill-search-service.js +2 -2
- package/dist/services/skills/hooks-settings-service.d.ts +9 -0
- package/dist/services/skills/hooks-settings-service.js +31 -1
- package/dist/services/skills/skill-presence-service.d.ts +24 -0
- package/dist/services/skills/skill-presence-service.js +33 -0
- package/package.json +8 -8
- package/schemas/context.schema.json +17 -8
- package/skills/bee/peaks-prd/SKILL.md +17 -0
- package/skills/peaks-code/SKILL.md +28 -1
- package/skills/peaks-code/references/skill-presence-and-title.md +3 -3
|
@@ -65,19 +65,13 @@ export const CRYSTALLIZATION_TASK_STATUSES = [
|
|
|
65
65
|
export const CrystallizationTaskStateSchema = z.object({
|
|
66
66
|
task_id: z.string().trim().min(1).max(256),
|
|
67
67
|
task_status: z.literal("completed", {
|
|
68
|
-
|
|
69
|
-
message: "task_status must be 'completed' for crystallization (AC-4 / RL-2)",
|
|
70
|
-
}),
|
|
68
|
+
error: () => "task_status must be 'completed' for crystallization (AC-4 / RL-2)",
|
|
71
69
|
}),
|
|
72
70
|
gates_passed: z.literal(true, {
|
|
73
|
-
|
|
74
|
-
message: "gates_passed must be true for crystallization (AC-4 / RL-2)",
|
|
75
|
-
}),
|
|
71
|
+
error: () => "gates_passed must be true for crystallization (AC-4 / RL-2)",
|
|
76
72
|
}),
|
|
77
73
|
evidence_collected: z.literal(true, {
|
|
78
|
-
|
|
79
|
-
message: "evidence_collected must be true for crystallization (AC-4 / RL-2)",
|
|
80
|
-
}),
|
|
74
|
+
error: () => "evidence_collected must be true for crystallization (AC-4 / RL-2)",
|
|
81
75
|
}),
|
|
82
76
|
});
|
|
83
77
|
export class CrystallizationIntegrityError extends Error {
|
|
@@ -32,10 +32,19 @@ import { z } from "zod";
|
|
|
32
32
|
* - cross-event aggregation (loop crystallized N times).
|
|
33
33
|
* - brief rewrite-on-update semantics (M8 dogfood).
|
|
34
34
|
*/
|
|
35
|
-
export declare const CrystallizationTriggerSchema: z.ZodEnum<
|
|
35
|
+
export declare const CrystallizationTriggerSchema: z.ZodEnum<{
|
|
36
|
+
user_explicit: "user_explicit";
|
|
37
|
+
llm_suggested: "llm_suggested";
|
|
38
|
+
success_default_prompt: "success_default_prompt";
|
|
39
|
+
similar_task_recurrence: "similar_task_recurrence";
|
|
40
|
+
}>;
|
|
36
41
|
export type CrystallizationTrigger = z.infer<typeof CrystallizationTriggerSchema>;
|
|
37
42
|
export declare const CRYSTALLIZATION_TRIGGERS: readonly CrystallizationTrigger[];
|
|
38
|
-
export declare const CrystallizationEventStatusSchema: z.ZodEnum<
|
|
43
|
+
export declare const CrystallizationEventStatusSchema: z.ZodEnum<{
|
|
44
|
+
candidate: "candidate";
|
|
45
|
+
stable: "stable";
|
|
46
|
+
retired: "retired";
|
|
47
|
+
}>;
|
|
39
48
|
export type CrystallizationEventStatus = z.infer<typeof CrystallizationEventStatusSchema>;
|
|
40
49
|
/**
|
|
41
50
|
* EvidenceBrief — the 4-section brief (spec §4.7).
|
|
@@ -56,32 +65,12 @@ export type CrystallizationEventStatus = z.infer<typeof CrystallizationEventStat
|
|
|
56
65
|
* - what_action — 1-sentence recommended action with
|
|
57
66
|
* rationale.
|
|
58
67
|
*/
|
|
59
|
-
export declare const EvidenceBriefSchema: z.
|
|
68
|
+
export declare const EvidenceBriefSchema: z.ZodObject<{
|
|
60
69
|
what_happened: z.ZodString;
|
|
61
70
|
why_it_matters: z.ZodString;
|
|
62
71
|
what_learned: z.ZodString;
|
|
63
72
|
what_action: z.ZodString;
|
|
64
|
-
},
|
|
65
|
-
what_happened: string;
|
|
66
|
-
why_it_matters: string;
|
|
67
|
-
what_learned: string;
|
|
68
|
-
what_action: string;
|
|
69
|
-
}, {
|
|
70
|
-
what_happened: string;
|
|
71
|
-
why_it_matters: string;
|
|
72
|
-
what_learned: string;
|
|
73
|
-
what_action: string;
|
|
74
|
-
}>, {
|
|
75
|
-
what_happened: string;
|
|
76
|
-
why_it_matters: string;
|
|
77
|
-
what_learned: string;
|
|
78
|
-
what_action: string;
|
|
79
|
-
}, {
|
|
80
|
-
what_happened: string;
|
|
81
|
-
why_it_matters: string;
|
|
82
|
-
what_learned: string;
|
|
83
|
-
what_action: string;
|
|
84
|
-
}>;
|
|
73
|
+
}, z.core.$strict>;
|
|
85
74
|
export type EvidenceBrief = z.infer<typeof EvidenceBriefSchema>;
|
|
86
75
|
/**
|
|
87
76
|
* Helper for downstream code that needs to know whether a parsed
|
|
@@ -99,77 +88,32 @@ export declare function hasAllFourBriefSections(brief: EvidenceBrief): boolean;
|
|
|
99
88
|
* guard so a brief cannot sneak through via a partial-input path.
|
|
100
89
|
*/
|
|
101
90
|
export declare const CrystallizationEventInputSchema: z.ZodObject<{
|
|
102
|
-
trigger: z.ZodEnum<
|
|
103
|
-
|
|
91
|
+
trigger: z.ZodEnum<{
|
|
92
|
+
user_explicit: "user_explicit";
|
|
93
|
+
llm_suggested: "llm_suggested";
|
|
94
|
+
success_default_prompt: "success_default_prompt";
|
|
95
|
+
similar_task_recurrence: "similar_task_recurrence";
|
|
96
|
+
}>;
|
|
97
|
+
evidence_brief: z.ZodObject<{
|
|
104
98
|
what_happened: z.ZodString;
|
|
105
99
|
why_it_matters: z.ZodString;
|
|
106
100
|
what_learned: z.ZodString;
|
|
107
101
|
what_action: z.ZodString;
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
what_learned: string;
|
|
112
|
-
what_action: string;
|
|
113
|
-
}, {
|
|
114
|
-
what_happened: string;
|
|
115
|
-
why_it_matters: string;
|
|
116
|
-
what_learned: string;
|
|
117
|
-
what_action: string;
|
|
118
|
-
}>, {
|
|
119
|
-
what_happened: string;
|
|
120
|
-
why_it_matters: string;
|
|
121
|
-
what_learned: string;
|
|
122
|
-
what_action: string;
|
|
123
|
-
}, {
|
|
124
|
-
what_happened: string;
|
|
125
|
-
why_it_matters: string;
|
|
126
|
-
what_learned: string;
|
|
127
|
-
what_action: string;
|
|
128
|
-
}>;
|
|
129
|
-
evidence_bullets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
130
|
-
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
102
|
+
}, z.core.$strict>;
|
|
103
|
+
evidence_bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
104
|
+
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
131
105
|
evaluator_summary: z.ZodDefault<z.ZodString>;
|
|
132
106
|
user_decision_summary: z.ZodDefault<z.ZodString>;
|
|
133
107
|
created_loop_release_id: z.ZodOptional<z.ZodString>;
|
|
134
108
|
updated_loop_release_id: z.ZodOptional<z.ZodString>;
|
|
135
109
|
created_bee_release_id: z.ZodOptional<z.ZodNumber>;
|
|
136
110
|
updated_bee_release_id: z.ZodOptional<z.ZodNumber>;
|
|
137
|
-
lifecycle_status: z.ZodDefault<z.ZodEnum<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
what_learned: string;
|
|
144
|
-
what_action: string;
|
|
145
|
-
};
|
|
146
|
-
evidence_bullets: string[];
|
|
147
|
-
source_trace_pointers: string[];
|
|
148
|
-
evaluator_summary: string;
|
|
149
|
-
user_decision_summary: string;
|
|
150
|
-
lifecycle_status: "candidate" | "stable" | "retired";
|
|
151
|
-
created_loop_release_id?: string | undefined;
|
|
152
|
-
updated_loop_release_id?: string | undefined;
|
|
153
|
-
created_bee_release_id?: number | undefined;
|
|
154
|
-
updated_bee_release_id?: number | undefined;
|
|
155
|
-
}, {
|
|
156
|
-
trigger: "user_explicit" | "llm_suggested" | "success_default_prompt" | "similar_task_recurrence";
|
|
157
|
-
evidence_brief: {
|
|
158
|
-
what_happened: string;
|
|
159
|
-
why_it_matters: string;
|
|
160
|
-
what_learned: string;
|
|
161
|
-
what_action: string;
|
|
162
|
-
};
|
|
163
|
-
evidence_bullets?: string[] | undefined;
|
|
164
|
-
source_trace_pointers?: string[] | undefined;
|
|
165
|
-
evaluator_summary?: string | undefined;
|
|
166
|
-
user_decision_summary?: string | undefined;
|
|
167
|
-
created_loop_release_id?: string | undefined;
|
|
168
|
-
updated_loop_release_id?: string | undefined;
|
|
169
|
-
created_bee_release_id?: number | undefined;
|
|
170
|
-
updated_bee_release_id?: number | undefined;
|
|
171
|
-
lifecycle_status?: "candidate" | "stable" | "retired" | undefined;
|
|
172
|
-
}>;
|
|
111
|
+
lifecycle_status: z.ZodDefault<z.ZodEnum<{
|
|
112
|
+
candidate: "candidate";
|
|
113
|
+
stable: "stable";
|
|
114
|
+
retired: "retired";
|
|
115
|
+
}>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
173
117
|
export type CrystallizationEventInput = z.input<typeof CrystallizationEventInputSchema>;
|
|
174
118
|
/**
|
|
175
119
|
* Full persisted row schema. Adds `id` (the event id) and stamps
|
|
@@ -181,87 +125,35 @@ export type CrystallizationEventInput = z.input<typeof CrystallizationEventInput
|
|
|
181
125
|
* the store boundary.
|
|
182
126
|
*/
|
|
183
127
|
export declare const CrystallizationEventSchema: z.ZodObject<{
|
|
184
|
-
trigger: z.ZodEnum<
|
|
185
|
-
|
|
128
|
+
trigger: z.ZodEnum<{
|
|
129
|
+
user_explicit: "user_explicit";
|
|
130
|
+
llm_suggested: "llm_suggested";
|
|
131
|
+
success_default_prompt: "success_default_prompt";
|
|
132
|
+
similar_task_recurrence: "similar_task_recurrence";
|
|
133
|
+
}>;
|
|
134
|
+
evidence_brief: z.ZodObject<{
|
|
186
135
|
what_happened: z.ZodString;
|
|
187
136
|
why_it_matters: z.ZodString;
|
|
188
137
|
what_learned: z.ZodString;
|
|
189
138
|
what_action: z.ZodString;
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
what_learned: string;
|
|
194
|
-
what_action: string;
|
|
195
|
-
}, {
|
|
196
|
-
what_happened: string;
|
|
197
|
-
why_it_matters: string;
|
|
198
|
-
what_learned: string;
|
|
199
|
-
what_action: string;
|
|
200
|
-
}>, {
|
|
201
|
-
what_happened: string;
|
|
202
|
-
why_it_matters: string;
|
|
203
|
-
what_learned: string;
|
|
204
|
-
what_action: string;
|
|
205
|
-
}, {
|
|
206
|
-
what_happened: string;
|
|
207
|
-
why_it_matters: string;
|
|
208
|
-
what_learned: string;
|
|
209
|
-
what_action: string;
|
|
210
|
-
}>;
|
|
211
|
-
evidence_bullets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
212
|
-
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
evidence_bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
141
|
+
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
213
142
|
evaluator_summary: z.ZodDefault<z.ZodString>;
|
|
214
143
|
user_decision_summary: z.ZodDefault<z.ZodString>;
|
|
215
144
|
created_loop_release_id: z.ZodOptional<z.ZodString>;
|
|
216
145
|
updated_loop_release_id: z.ZodOptional<z.ZodString>;
|
|
217
146
|
created_bee_release_id: z.ZodOptional<z.ZodNumber>;
|
|
218
147
|
updated_bee_release_id: z.ZodOptional<z.ZodNumber>;
|
|
219
|
-
lifecycle_status: z.ZodDefault<z.ZodEnum<
|
|
220
|
-
|
|
148
|
+
lifecycle_status: z.ZodDefault<z.ZodEnum<{
|
|
149
|
+
candidate: "candidate";
|
|
150
|
+
stable: "stable";
|
|
151
|
+
retired: "retired";
|
|
152
|
+
}>>;
|
|
221
153
|
id: z.ZodString;
|
|
222
154
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.crystallization/1">>;
|
|
223
155
|
created_at: z.ZodString;
|
|
224
|
-
},
|
|
225
|
-
schema_version: "peaks.crystallization/1";
|
|
226
|
-
trigger: "user_explicit" | "llm_suggested" | "success_default_prompt" | "similar_task_recurrence";
|
|
227
|
-
evidence_brief: {
|
|
228
|
-
what_happened: string;
|
|
229
|
-
why_it_matters: string;
|
|
230
|
-
what_learned: string;
|
|
231
|
-
what_action: string;
|
|
232
|
-
};
|
|
233
|
-
evidence_bullets: string[];
|
|
234
|
-
source_trace_pointers: string[];
|
|
235
|
-
evaluator_summary: string;
|
|
236
|
-
user_decision_summary: string;
|
|
237
|
-
lifecycle_status: "candidate" | "stable" | "retired";
|
|
238
|
-
id: string;
|
|
239
|
-
created_at: string;
|
|
240
|
-
created_loop_release_id?: string | undefined;
|
|
241
|
-
updated_loop_release_id?: string | undefined;
|
|
242
|
-
created_bee_release_id?: number | undefined;
|
|
243
|
-
updated_bee_release_id?: number | undefined;
|
|
244
|
-
}, {
|
|
245
|
-
trigger: "user_explicit" | "llm_suggested" | "success_default_prompt" | "similar_task_recurrence";
|
|
246
|
-
evidence_brief: {
|
|
247
|
-
what_happened: string;
|
|
248
|
-
why_it_matters: string;
|
|
249
|
-
what_learned: string;
|
|
250
|
-
what_action: string;
|
|
251
|
-
};
|
|
252
|
-
id: string;
|
|
253
|
-
created_at: string;
|
|
254
|
-
schema_version?: "peaks.crystallization/1" | undefined;
|
|
255
|
-
evidence_bullets?: string[] | undefined;
|
|
256
|
-
source_trace_pointers?: string[] | undefined;
|
|
257
|
-
evaluator_summary?: string | undefined;
|
|
258
|
-
user_decision_summary?: string | undefined;
|
|
259
|
-
created_loop_release_id?: string | undefined;
|
|
260
|
-
updated_loop_release_id?: string | undefined;
|
|
261
|
-
created_bee_release_id?: number | undefined;
|
|
262
|
-
updated_bee_release_id?: number | undefined;
|
|
263
|
-
lifecycle_status?: "candidate" | "stable" | "retired" | undefined;
|
|
264
|
-
}>;
|
|
156
|
+
}, z.core.$strip>;
|
|
265
157
|
export type CrystallizationEvent = z.infer<typeof CrystallizationEventSchema>;
|
|
266
158
|
/**
|
|
267
159
|
* Convenience: strict-parse an unknown payload into a
|
|
@@ -111,16 +111,22 @@ export const EvidenceBriefSchema = z
|
|
|
111
111
|
what_action: BriefSectionSchema,
|
|
112
112
|
})
|
|
113
113
|
.strict()
|
|
114
|
-
.
|
|
115
|
-
b.what_happened
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
.superRefine((b, ctx) => {
|
|
115
|
+
const ok = typeof b.what_happened === "string" &&
|
|
116
|
+
b.what_happened.trim().length > 0 &&
|
|
117
|
+
typeof b.why_it_matters === "string" &&
|
|
118
|
+
b.why_it_matters.trim().length > 0 &&
|
|
119
|
+
typeof b.what_learned === "string" &&
|
|
120
|
+
b.what_learned.trim().length > 0 &&
|
|
121
|
+
typeof b.what_action === "string" &&
|
|
122
|
+
b.what_action.trim().length > 0;
|
|
123
|
+
if (!ok) {
|
|
124
|
+
ctx.addIssue({
|
|
125
|
+
code: "custom",
|
|
126
|
+
path: [],
|
|
127
|
+
message: "evidence_brief must contain all 4 sections (what_happened, why_it_matters, what_learned, what_action) with non-empty content (spec §4.7 / RL-7)",
|
|
128
|
+
});
|
|
129
|
+
}
|
|
124
130
|
});
|
|
125
131
|
/**
|
|
126
132
|
* Helper for downstream code that needs to know whether a parsed
|
|
@@ -158,7 +164,7 @@ const OptionalLoopId = z
|
|
|
158
164
|
const OptionalBeeId = z
|
|
159
165
|
.number()
|
|
160
166
|
.int()
|
|
161
|
-
.
|
|
167
|
+
.gt(0)
|
|
162
168
|
.max(CRYS_BEE_ID_MAX_I32, "bee_release_id out of 32-bit range")
|
|
163
169
|
.optional();
|
|
164
170
|
/**
|
|
@@ -43,55 +43,13 @@ import { type EvidenceBrief } from "./crystallization-types.js";
|
|
|
43
43
|
*/
|
|
44
44
|
export declare const BriefTraceInputSchema: z.ZodObject<{
|
|
45
45
|
trace_id: z.ZodString;
|
|
46
|
-
/**
|
|
47
|
-
* The full NL recap of the run. Required for what_happened.
|
|
48
|
-
* 1-2 sentences is the spec guidance; the builder does not
|
|
49
|
-
* truncate, but tests passing multi-paragraph input will be
|
|
50
|
-
* warned at the Zod boundary (max 4000 chars per section).
|
|
51
|
-
*/
|
|
52
46
|
what_happened: z.ZodString;
|
|
53
|
-
/**
|
|
54
|
-
* The "why this matters" recap. Required for why_it_matters.
|
|
55
|
-
*/
|
|
56
47
|
why_it_matters: z.ZodString;
|
|
57
|
-
/**
|
|
58
|
-
* Failure-mode and preference-extraction recap. Required for
|
|
59
|
-
* what_learned.
|
|
60
|
-
*/
|
|
61
48
|
what_learned: z.ZodString;
|
|
62
|
-
/**
|
|
63
|
-
* The recommended action. Required for what_action (1
|
|
64
|
-
* sentence per spec).
|
|
65
|
-
*/
|
|
66
49
|
what_action: z.ZodString;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* brief section is the NL primary (RL-7).
|
|
71
|
-
*/
|
|
72
|
-
bullets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
-
/**
|
|
74
|
-
* Source trace ids backing the brief (the column on
|
|
75
|
-
* crystallization_event spec §4.5).
|
|
76
|
-
*/
|
|
77
|
-
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
what_happened: string;
|
|
80
|
-
why_it_matters: string;
|
|
81
|
-
what_learned: string;
|
|
82
|
-
what_action: string;
|
|
83
|
-
source_trace_pointers: string[];
|
|
84
|
-
trace_id: string;
|
|
85
|
-
bullets: string[];
|
|
86
|
-
}, {
|
|
87
|
-
what_happened: string;
|
|
88
|
-
why_it_matters: string;
|
|
89
|
-
what_learned: string;
|
|
90
|
-
what_action: string;
|
|
91
|
-
trace_id: string;
|
|
92
|
-
source_trace_pointers?: string[] | undefined;
|
|
93
|
-
bullets?: string[] | undefined;
|
|
94
|
-
}>;
|
|
50
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
51
|
+
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
95
53
|
export type BriefTraceInput = z.input<typeof BriefTraceInputSchema>;
|
|
96
54
|
/**
|
|
97
55
|
* The summary emitted by the independent evaluators (spec §4.5
|
|
@@ -101,81 +59,23 @@ export type BriefTraceInput = z.input<typeof BriefTraceInputSchema>;
|
|
|
101
59
|
*/
|
|
102
60
|
export declare const EvaluatorSummarySchema: z.ZodObject<{
|
|
103
61
|
one_liner: z.ZodDefault<z.ZodString>;
|
|
104
|
-
risk_tags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
105
|
-
},
|
|
106
|
-
one_liner: string;
|
|
107
|
-
risk_tags: string[];
|
|
108
|
-
}, {
|
|
109
|
-
one_liner?: string | undefined;
|
|
110
|
-
risk_tags?: string[] | undefined;
|
|
111
|
-
}>;
|
|
62
|
+
risk_tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
112
64
|
export type EvaluatorSummary = z.input<typeof EvaluatorSummarySchema>;
|
|
113
65
|
export declare const RecommendationPayloadSchema: z.ZodObject<{
|
|
114
|
-
brief: z.
|
|
66
|
+
brief: z.ZodObject<{
|
|
115
67
|
what_happened: z.ZodString;
|
|
116
68
|
why_it_matters: z.ZodString;
|
|
117
69
|
what_learned: z.ZodString;
|
|
118
70
|
what_action: z.ZodString;
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
what_learned: string;
|
|
123
|
-
what_action: string;
|
|
124
|
-
}, {
|
|
125
|
-
what_happened: string;
|
|
126
|
-
why_it_matters: string;
|
|
127
|
-
what_learned: string;
|
|
128
|
-
what_action: string;
|
|
129
|
-
}>, {
|
|
130
|
-
what_happened: string;
|
|
131
|
-
why_it_matters: string;
|
|
132
|
-
what_learned: string;
|
|
133
|
-
what_action: string;
|
|
134
|
-
}, {
|
|
135
|
-
what_happened: string;
|
|
136
|
-
why_it_matters: string;
|
|
137
|
-
what_learned: string;
|
|
138
|
-
what_action: string;
|
|
139
|
-
}>;
|
|
140
|
-
bullets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
141
|
-
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
bullets: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
73
|
+
source_trace_pointers: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
142
74
|
evaluator_summary: z.ZodDefault<z.ZodObject<{
|
|
143
75
|
one_liner: z.ZodDefault<z.ZodString>;
|
|
144
|
-
risk_tags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
risk_tags: string[];
|
|
148
|
-
}, {
|
|
149
|
-
one_liner?: string | undefined;
|
|
150
|
-
risk_tags?: string[] | undefined;
|
|
151
|
-
}>>;
|
|
152
|
-
}, "strip", z.ZodTypeAny, {
|
|
153
|
-
source_trace_pointers: string[];
|
|
154
|
-
evaluator_summary: {
|
|
155
|
-
one_liner: string;
|
|
156
|
-
risk_tags: string[];
|
|
157
|
-
};
|
|
158
|
-
bullets: string[];
|
|
159
|
-
brief: {
|
|
160
|
-
what_happened: string;
|
|
161
|
-
why_it_matters: string;
|
|
162
|
-
what_learned: string;
|
|
163
|
-
what_action: string;
|
|
164
|
-
};
|
|
165
|
-
}, {
|
|
166
|
-
brief: {
|
|
167
|
-
what_happened: string;
|
|
168
|
-
why_it_matters: string;
|
|
169
|
-
what_learned: string;
|
|
170
|
-
what_action: string;
|
|
171
|
-
};
|
|
172
|
-
source_trace_pointers?: string[] | undefined;
|
|
173
|
-
evaluator_summary?: {
|
|
174
|
-
one_liner?: string | undefined;
|
|
175
|
-
risk_tags?: string[] | undefined;
|
|
176
|
-
} | undefined;
|
|
177
|
-
bullets?: string[] | undefined;
|
|
178
|
-
}>;
|
|
76
|
+
risk_tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
179
79
|
export type RecommendationPayload = z.infer<typeof RecommendationPayloadSchema>;
|
|
180
80
|
export declare class BriefSectionError extends Error {
|
|
181
81
|
readonly code: "MISSING_BRIEF_SECTION";
|