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
|
@@ -23,10 +23,20 @@ import { z } from "zod";
|
|
|
23
23
|
* - Crystallization event integration (M5).
|
|
24
24
|
* - Revert audit trail table (M5 / M7).
|
|
25
25
|
*/
|
|
26
|
-
export declare const EvolutionTargetKindSchema: z.ZodEnum<
|
|
26
|
+
export declare const EvolutionTargetKindSchema: z.ZodEnum<{
|
|
27
|
+
loop: "loop";
|
|
28
|
+
bee: "bee";
|
|
29
|
+
gate: "gate";
|
|
30
|
+
policy: "policy";
|
|
31
|
+
evaluator: "evaluator";
|
|
32
|
+
}>;
|
|
27
33
|
export type EvolutionTargetKind = z.infer<typeof EvolutionTargetKindSchema>;
|
|
28
34
|
export declare const EVOLUTION_TARGET_KINDS: readonly EvolutionTargetKind[];
|
|
29
|
-
export declare const EvolutionVerdictSchema: z.ZodEnum<
|
|
35
|
+
export declare const EvolutionVerdictSchema: z.ZodEnum<{
|
|
36
|
+
keep: "keep";
|
|
37
|
+
revert: "revert";
|
|
38
|
+
"needs-user-decision": "needs-user-decision";
|
|
39
|
+
}>;
|
|
30
40
|
export type EvolutionVerdict = z.infer<typeof EvolutionVerdictSchema>;
|
|
31
41
|
export declare const EVOLUTION_VERDICTS: readonly EvolutionVerdict[];
|
|
32
42
|
/**
|
|
@@ -42,12 +52,14 @@ export declare const EVOLUTION_VERDICTS: readonly EvolutionVerdict[];
|
|
|
42
52
|
* `after_score - before_score < score_delta_min` (default 1.0).
|
|
43
53
|
*/
|
|
44
54
|
export declare const EvolutionProposalInputSchema: z.ZodObject<{
|
|
45
|
-
target_kind: z.ZodEnum<
|
|
55
|
+
target_kind: z.ZodEnum<{
|
|
56
|
+
loop: "loop";
|
|
57
|
+
bee: "bee";
|
|
58
|
+
gate: "gate";
|
|
59
|
+
policy: "policy";
|
|
60
|
+
evaluator: "evaluator";
|
|
61
|
+
}>;
|
|
46
62
|
target_release_id: z.ZodString;
|
|
47
|
-
/**
|
|
48
|
-
* Single optimization dimension (AC-8). Multi-dimension proposals
|
|
49
|
-
* must be split into multiple rounds.
|
|
50
|
-
*/
|
|
51
63
|
optimization_dimension: z.ZodString;
|
|
52
64
|
before_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
65
|
after_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -56,55 +68,12 @@ export declare const EvolutionProposalInputSchema: z.ZodObject<{
|
|
|
56
68
|
after_score: z.ZodNumber;
|
|
57
69
|
score_delta_min: z.ZodDefault<z.ZodNumber>;
|
|
58
70
|
author_id: z.ZodString;
|
|
59
|
-
/**
|
|
60
|
-
* The LLM-side marker that this proposal targets a SINGLE object
|
|
61
|
-
* (AC-8). Multi-object proposals must be split into multiple
|
|
62
|
-
* rounds. The service layer rejects proposals with
|
|
63
|
-
* `single_object !== true`.
|
|
64
|
-
*/
|
|
65
71
|
single_object: z.ZodLiteral<true>;
|
|
66
|
-
/**
|
|
67
|
-
* The LLM-side marker that this proposal targets a SINGLE
|
|
68
|
-
* optimization dimension (AC-8). The service layer rejects
|
|
69
|
-
* proposals with `single_optimization_dimension !== true`.
|
|
70
|
-
*/
|
|
71
72
|
single_optimization_dimension: z.ZodLiteral<true>;
|
|
72
73
|
rubric: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
-
red_lines: z.ZodDefault<z.ZodArray<z.ZodString
|
|
74
|
-
source_traces: z.ZodDefault<z.ZodArray<z.ZodString
|
|
75
|
-
},
|
|
76
|
-
diff: Record<string, unknown>;
|
|
77
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
78
|
-
target_release_id: string;
|
|
79
|
-
optimization_dimension: string;
|
|
80
|
-
before_snapshot: Record<string, unknown>;
|
|
81
|
-
after_snapshot: Record<string, unknown>;
|
|
82
|
-
before_score: number;
|
|
83
|
-
after_score: number;
|
|
84
|
-
score_delta_min: number;
|
|
85
|
-
author_id: string;
|
|
86
|
-
single_object: true;
|
|
87
|
-
single_optimization_dimension: true;
|
|
88
|
-
rubric: Record<string, unknown>;
|
|
89
|
-
red_lines: string[];
|
|
90
|
-
source_traces: string[];
|
|
91
|
-
}, {
|
|
92
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
93
|
-
target_release_id: string;
|
|
94
|
-
optimization_dimension: string;
|
|
95
|
-
before_score: number;
|
|
96
|
-
after_score: number;
|
|
97
|
-
author_id: string;
|
|
98
|
-
single_object: true;
|
|
99
|
-
single_optimization_dimension: true;
|
|
100
|
-
diff?: Record<string, unknown> | undefined;
|
|
101
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
102
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
103
|
-
score_delta_min?: number | undefined;
|
|
104
|
-
rubric?: Record<string, unknown> | undefined;
|
|
105
|
-
red_lines?: string[] | undefined;
|
|
106
|
-
source_traces?: string[] | undefined;
|
|
107
|
-
}>;
|
|
74
|
+
red_lines: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
75
|
+
source_traces: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
108
77
|
export type EvolutionProposalInput = z.input<typeof EvolutionProposalInputSchema>;
|
|
109
78
|
/**
|
|
110
79
|
* The PERSISTED proposal shape — adds `dimensions` (a length-1
|
|
@@ -113,12 +82,14 @@ export type EvolutionProposalInput = z.input<typeof EvolutionProposalInputSchema
|
|
|
113
82
|
* `dimensions` array on persist.
|
|
114
83
|
*/
|
|
115
84
|
export declare const EvolutionProposalSchema: z.ZodObject<{
|
|
116
|
-
target_kind: z.ZodEnum<
|
|
85
|
+
target_kind: z.ZodEnum<{
|
|
86
|
+
loop: "loop";
|
|
87
|
+
bee: "bee";
|
|
88
|
+
gate: "gate";
|
|
89
|
+
policy: "policy";
|
|
90
|
+
evaluator: "evaluator";
|
|
91
|
+
}>;
|
|
117
92
|
target_release_id: z.ZodString;
|
|
118
|
-
/**
|
|
119
|
-
* Single optimization dimension (AC-8). Multi-dimension proposals
|
|
120
|
-
* must be split into multiple rounds.
|
|
121
|
-
*/
|
|
122
93
|
optimization_dimension: z.ZodString;
|
|
123
94
|
before_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
124
95
|
after_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -127,74 +98,18 @@ export declare const EvolutionProposalSchema: z.ZodObject<{
|
|
|
127
98
|
after_score: z.ZodNumber;
|
|
128
99
|
score_delta_min: z.ZodDefault<z.ZodNumber>;
|
|
129
100
|
author_id: z.ZodString;
|
|
130
|
-
/**
|
|
131
|
-
* The LLM-side marker that this proposal targets a SINGLE object
|
|
132
|
-
* (AC-8). Multi-object proposals must be split into multiple
|
|
133
|
-
* rounds. The service layer rejects proposals with
|
|
134
|
-
* `single_object !== true`.
|
|
135
|
-
*/
|
|
136
101
|
single_object: z.ZodLiteral<true>;
|
|
137
|
-
/**
|
|
138
|
-
* The LLM-side marker that this proposal targets a SINGLE
|
|
139
|
-
* optimization dimension (AC-8). The service layer rejects
|
|
140
|
-
* proposals with `single_optimization_dimension !== true`.
|
|
141
|
-
*/
|
|
142
102
|
single_optimization_dimension: z.ZodLiteral<true>;
|
|
143
103
|
rubric: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
144
|
-
red_lines: z.ZodDefault<z.ZodArray<z.ZodString
|
|
145
|
-
source_traces: z.ZodDefault<z.ZodArray<z.ZodString
|
|
146
|
-
} & {
|
|
104
|
+
red_lines: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
105
|
+
source_traces: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
147
106
|
id: z.ZodString;
|
|
148
|
-
dimensions: z.ZodArray<z.ZodString
|
|
107
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
149
108
|
target_count: z.ZodLiteral<1>;
|
|
150
109
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.evolution/1">>;
|
|
151
110
|
created_at: z.ZodString;
|
|
152
111
|
score_delta: z.ZodNumber;
|
|
153
|
-
},
|
|
154
|
-
schema_version: "peaks.evolution/1";
|
|
155
|
-
id: string;
|
|
156
|
-
created_at: string;
|
|
157
|
-
diff: Record<string, unknown>;
|
|
158
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
159
|
-
target_release_id: string;
|
|
160
|
-
optimization_dimension: string;
|
|
161
|
-
before_snapshot: Record<string, unknown>;
|
|
162
|
-
after_snapshot: Record<string, unknown>;
|
|
163
|
-
before_score: number;
|
|
164
|
-
after_score: number;
|
|
165
|
-
score_delta_min: number;
|
|
166
|
-
author_id: string;
|
|
167
|
-
single_object: true;
|
|
168
|
-
single_optimization_dimension: true;
|
|
169
|
-
rubric: Record<string, unknown>;
|
|
170
|
-
red_lines: string[];
|
|
171
|
-
source_traces: string[];
|
|
172
|
-
dimensions: string[];
|
|
173
|
-
target_count: 1;
|
|
174
|
-
score_delta: number;
|
|
175
|
-
}, {
|
|
176
|
-
id: string;
|
|
177
|
-
created_at: string;
|
|
178
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
179
|
-
target_release_id: string;
|
|
180
|
-
optimization_dimension: string;
|
|
181
|
-
before_score: number;
|
|
182
|
-
after_score: number;
|
|
183
|
-
author_id: string;
|
|
184
|
-
single_object: true;
|
|
185
|
-
single_optimization_dimension: true;
|
|
186
|
-
dimensions: string[];
|
|
187
|
-
target_count: 1;
|
|
188
|
-
score_delta: number;
|
|
189
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
190
|
-
diff?: Record<string, unknown> | undefined;
|
|
191
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
192
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
193
|
-
score_delta_min?: number | undefined;
|
|
194
|
-
rubric?: Record<string, unknown> | undefined;
|
|
195
|
-
red_lines?: string[] | undefined;
|
|
196
|
-
source_traces?: string[] | undefined;
|
|
197
|
-
}>;
|
|
112
|
+
}, z.core.$strip>;
|
|
198
113
|
export type EvolutionProposal = z.infer<typeof EvolutionProposalSchema>;
|
|
199
114
|
/**
|
|
200
115
|
* The independent evaluator's verdict. AC-12 / AC-13: the evaluator
|
|
@@ -202,38 +117,20 @@ export type EvolutionProposal = z.infer<typeof EvolutionProposalSchema>;
|
|
|
202
117
|
*/
|
|
203
118
|
export declare const IndependentEvaluatorResultSchema: z.ZodObject<{
|
|
204
119
|
score: z.ZodNumber;
|
|
205
|
-
riskTags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
120
|
+
riskTags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
206
121
|
refuteParagraph: z.ZodString;
|
|
207
|
-
},
|
|
208
|
-
score: number;
|
|
209
|
-
riskTags: string[];
|
|
210
|
-
refuteParagraph: string;
|
|
211
|
-
}, {
|
|
212
|
-
score: number;
|
|
213
|
-
refuteParagraph: string;
|
|
214
|
-
riskTags?: string[] | undefined;
|
|
215
|
-
}>;
|
|
122
|
+
}, z.core.$strip>;
|
|
216
123
|
export type IndependentEvaluatorResult = z.infer<typeof IndependentEvaluatorResultSchema>;
|
|
217
124
|
/**
|
|
218
125
|
* The regression skeptic's verdict. AC-14: a separate sub-agent
|
|
219
126
|
* that attempts to refute the proposal.
|
|
220
127
|
*/
|
|
221
128
|
export declare const RegressionSkepticResultSchema: z.ZodObject<{
|
|
222
|
-
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
223
|
-
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
224
|
-
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
129
|
+
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
130
|
+
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
131
|
+
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
225
132
|
blocker: z.ZodOptional<z.ZodString>;
|
|
226
|
-
},
|
|
227
|
-
driftRisks: string[];
|
|
228
|
-
overfitRisks: string[];
|
|
229
|
-
safetyRegressionRisks: string[];
|
|
230
|
-
blocker?: string | undefined;
|
|
231
|
-
}, {
|
|
232
|
-
driftRisks?: string[] | undefined;
|
|
233
|
-
overfitRisks?: string[] | undefined;
|
|
234
|
-
safetyRegressionRisks?: string[] | undefined;
|
|
235
|
-
blocker?: string | undefined;
|
|
236
|
-
}>;
|
|
133
|
+
}, z.core.$strip>;
|
|
237
134
|
export type RegressionSkepticResult = z.infer<typeof RegressionSkepticResultSchema>;
|
|
238
135
|
/**
|
|
239
136
|
* The full evolution evaluation row as persisted. Differs from the
|
|
@@ -252,12 +149,14 @@ export type RegressionSkepticResult = z.infer<typeof RegressionSkepticResultSche
|
|
|
252
149
|
export declare const EvolutionEvaluationInputSchema: z.ZodObject<{
|
|
253
150
|
id: z.ZodString;
|
|
254
151
|
proposal: z.ZodObject<{
|
|
255
|
-
target_kind: z.ZodEnum<
|
|
152
|
+
target_kind: z.ZodEnum<{
|
|
153
|
+
loop: "loop";
|
|
154
|
+
bee: "bee";
|
|
155
|
+
gate: "gate";
|
|
156
|
+
policy: "policy";
|
|
157
|
+
evaluator: "evaluator";
|
|
158
|
+
}>;
|
|
256
159
|
target_release_id: z.ZodString;
|
|
257
|
-
/**
|
|
258
|
-
* Single optimization dimension (AC-8). Multi-dimension proposals
|
|
259
|
-
* must be split into multiple rounds.
|
|
260
|
-
*/
|
|
261
160
|
optimization_dimension: z.ZodString;
|
|
262
161
|
before_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
263
162
|
after_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -266,197 +165,41 @@ export declare const EvolutionEvaluationInputSchema: z.ZodObject<{
|
|
|
266
165
|
after_score: z.ZodNumber;
|
|
267
166
|
score_delta_min: z.ZodDefault<z.ZodNumber>;
|
|
268
167
|
author_id: z.ZodString;
|
|
269
|
-
/**
|
|
270
|
-
* The LLM-side marker that this proposal targets a SINGLE object
|
|
271
|
-
* (AC-8). Multi-object proposals must be split into multiple
|
|
272
|
-
* rounds. The service layer rejects proposals with
|
|
273
|
-
* `single_object !== true`.
|
|
274
|
-
*/
|
|
275
168
|
single_object: z.ZodLiteral<true>;
|
|
276
|
-
/**
|
|
277
|
-
* The LLM-side marker that this proposal targets a SINGLE
|
|
278
|
-
* optimization dimension (AC-8). The service layer rejects
|
|
279
|
-
* proposals with `single_optimization_dimension !== true`.
|
|
280
|
-
*/
|
|
281
169
|
single_optimization_dimension: z.ZodLiteral<true>;
|
|
282
170
|
rubric: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
283
|
-
red_lines: z.ZodDefault<z.ZodArray<z.ZodString
|
|
284
|
-
source_traces: z.ZodDefault<z.ZodArray<z.ZodString
|
|
285
|
-
} & {
|
|
171
|
+
red_lines: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
172
|
+
source_traces: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
286
173
|
id: z.ZodString;
|
|
287
|
-
dimensions: z.ZodArray<z.ZodString
|
|
174
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
288
175
|
target_count: z.ZodLiteral<1>;
|
|
289
176
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.evolution/1">>;
|
|
290
177
|
created_at: z.ZodString;
|
|
291
178
|
score_delta: z.ZodNumber;
|
|
292
|
-
},
|
|
293
|
-
schema_version: "peaks.evolution/1";
|
|
294
|
-
id: string;
|
|
295
|
-
created_at: string;
|
|
296
|
-
diff: Record<string, unknown>;
|
|
297
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
298
|
-
target_release_id: string;
|
|
299
|
-
optimization_dimension: string;
|
|
300
|
-
before_snapshot: Record<string, unknown>;
|
|
301
|
-
after_snapshot: Record<string, unknown>;
|
|
302
|
-
before_score: number;
|
|
303
|
-
after_score: number;
|
|
304
|
-
score_delta_min: number;
|
|
305
|
-
author_id: string;
|
|
306
|
-
single_object: true;
|
|
307
|
-
single_optimization_dimension: true;
|
|
308
|
-
rubric: Record<string, unknown>;
|
|
309
|
-
red_lines: string[];
|
|
310
|
-
source_traces: string[];
|
|
311
|
-
dimensions: string[];
|
|
312
|
-
target_count: 1;
|
|
313
|
-
score_delta: number;
|
|
314
|
-
}, {
|
|
315
|
-
id: string;
|
|
316
|
-
created_at: string;
|
|
317
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
318
|
-
target_release_id: string;
|
|
319
|
-
optimization_dimension: string;
|
|
320
|
-
before_score: number;
|
|
321
|
-
after_score: number;
|
|
322
|
-
author_id: string;
|
|
323
|
-
single_object: true;
|
|
324
|
-
single_optimization_dimension: true;
|
|
325
|
-
dimensions: string[];
|
|
326
|
-
target_count: 1;
|
|
327
|
-
score_delta: number;
|
|
328
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
329
|
-
diff?: Record<string, unknown> | undefined;
|
|
330
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
331
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
332
|
-
score_delta_min?: number | undefined;
|
|
333
|
-
rubric?: Record<string, unknown> | undefined;
|
|
334
|
-
red_lines?: string[] | undefined;
|
|
335
|
-
source_traces?: string[] | undefined;
|
|
336
|
-
}>;
|
|
179
|
+
}, z.core.$strip>;
|
|
337
180
|
evaluator_id: z.ZodString;
|
|
338
181
|
skeptic_id: z.ZodString;
|
|
339
182
|
evaluator_result: z.ZodObject<{
|
|
340
183
|
score: z.ZodNumber;
|
|
341
|
-
riskTags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
184
|
+
riskTags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
342
185
|
refuteParagraph: z.ZodString;
|
|
343
|
-
},
|
|
344
|
-
score: number;
|
|
345
|
-
riskTags: string[];
|
|
346
|
-
refuteParagraph: string;
|
|
347
|
-
}, {
|
|
348
|
-
score: number;
|
|
349
|
-
refuteParagraph: string;
|
|
350
|
-
riskTags?: string[] | undefined;
|
|
351
|
-
}>;
|
|
186
|
+
}, z.core.$strip>;
|
|
352
187
|
skeptic_result: z.ZodObject<{
|
|
353
|
-
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
354
|
-
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
355
|
-
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
188
|
+
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
189
|
+
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
190
|
+
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
356
191
|
blocker: z.ZodOptional<z.ZodString>;
|
|
357
|
-
},
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}, {
|
|
363
|
-
driftRisks?: string[] | undefined;
|
|
364
|
-
overfitRisks?: string[] | undefined;
|
|
365
|
-
safetyRegressionRisks?: string[] | undefined;
|
|
366
|
-
blocker?: string | undefined;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
verdict: z.ZodEnum<{
|
|
194
|
+
keep: "keep";
|
|
195
|
+
revert: "revert";
|
|
196
|
+
"needs-user-decision": "needs-user-decision";
|
|
367
197
|
}>;
|
|
368
|
-
verdict: z.ZodEnum<["keep", "revert", "needs-user-decision"]>;
|
|
369
198
|
user_confirmation_pointer: z.ZodOptional<z.ZodString>;
|
|
370
199
|
brief_pointer: z.ZodOptional<z.ZodString>;
|
|
371
200
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.evolution/1">>;
|
|
372
201
|
created_at: z.ZodString;
|
|
373
|
-
},
|
|
374
|
-
schema_version: "peaks.evolution/1";
|
|
375
|
-
id: string;
|
|
376
|
-
created_at: string;
|
|
377
|
-
verdict: "keep" | "revert" | "needs-user-decision";
|
|
378
|
-
proposal: {
|
|
379
|
-
schema_version: "peaks.evolution/1";
|
|
380
|
-
id: string;
|
|
381
|
-
created_at: string;
|
|
382
|
-
diff: Record<string, unknown>;
|
|
383
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
384
|
-
target_release_id: string;
|
|
385
|
-
optimization_dimension: string;
|
|
386
|
-
before_snapshot: Record<string, unknown>;
|
|
387
|
-
after_snapshot: Record<string, unknown>;
|
|
388
|
-
before_score: number;
|
|
389
|
-
after_score: number;
|
|
390
|
-
score_delta_min: number;
|
|
391
|
-
author_id: string;
|
|
392
|
-
single_object: true;
|
|
393
|
-
single_optimization_dimension: true;
|
|
394
|
-
rubric: Record<string, unknown>;
|
|
395
|
-
red_lines: string[];
|
|
396
|
-
source_traces: string[];
|
|
397
|
-
dimensions: string[];
|
|
398
|
-
target_count: 1;
|
|
399
|
-
score_delta: number;
|
|
400
|
-
};
|
|
401
|
-
evaluator_id: string;
|
|
402
|
-
skeptic_id: string;
|
|
403
|
-
evaluator_result: {
|
|
404
|
-
score: number;
|
|
405
|
-
riskTags: string[];
|
|
406
|
-
refuteParagraph: string;
|
|
407
|
-
};
|
|
408
|
-
skeptic_result: {
|
|
409
|
-
driftRisks: string[];
|
|
410
|
-
overfitRisks: string[];
|
|
411
|
-
safetyRegressionRisks: string[];
|
|
412
|
-
blocker?: string | undefined;
|
|
413
|
-
};
|
|
414
|
-
user_confirmation_pointer?: string | undefined;
|
|
415
|
-
brief_pointer?: string | undefined;
|
|
416
|
-
}, {
|
|
417
|
-
id: string;
|
|
418
|
-
created_at: string;
|
|
419
|
-
verdict: "keep" | "revert" | "needs-user-decision";
|
|
420
|
-
proposal: {
|
|
421
|
-
id: string;
|
|
422
|
-
created_at: string;
|
|
423
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
424
|
-
target_release_id: string;
|
|
425
|
-
optimization_dimension: string;
|
|
426
|
-
before_score: number;
|
|
427
|
-
after_score: number;
|
|
428
|
-
author_id: string;
|
|
429
|
-
single_object: true;
|
|
430
|
-
single_optimization_dimension: true;
|
|
431
|
-
dimensions: string[];
|
|
432
|
-
target_count: 1;
|
|
433
|
-
score_delta: number;
|
|
434
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
435
|
-
diff?: Record<string, unknown> | undefined;
|
|
436
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
437
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
438
|
-
score_delta_min?: number | undefined;
|
|
439
|
-
rubric?: Record<string, unknown> | undefined;
|
|
440
|
-
red_lines?: string[] | undefined;
|
|
441
|
-
source_traces?: string[] | undefined;
|
|
442
|
-
};
|
|
443
|
-
evaluator_id: string;
|
|
444
|
-
skeptic_id: string;
|
|
445
|
-
evaluator_result: {
|
|
446
|
-
score: number;
|
|
447
|
-
refuteParagraph: string;
|
|
448
|
-
riskTags?: string[] | undefined;
|
|
449
|
-
};
|
|
450
|
-
skeptic_result: {
|
|
451
|
-
driftRisks?: string[] | undefined;
|
|
452
|
-
overfitRisks?: string[] | undefined;
|
|
453
|
-
safetyRegressionRisks?: string[] | undefined;
|
|
454
|
-
blocker?: string | undefined;
|
|
455
|
-
};
|
|
456
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
457
|
-
user_confirmation_pointer?: string | undefined;
|
|
458
|
-
brief_pointer?: string | undefined;
|
|
459
|
-
}>;
|
|
202
|
+
}, z.core.$strip>;
|
|
460
203
|
export type EvolutionEvaluationInput = z.input<typeof EvolutionEvaluationInputSchema>;
|
|
461
204
|
/**
|
|
462
205
|
* The PERSISTED evolution evaluation row. Differs from the input
|
|
@@ -465,12 +208,14 @@ export type EvolutionEvaluationInput = z.input<typeof EvolutionEvaluationInputSc
|
|
|
465
208
|
export declare const EvolutionEvaluationSchema: z.ZodObject<{
|
|
466
209
|
id: z.ZodString;
|
|
467
210
|
proposal: z.ZodObject<{
|
|
468
|
-
target_kind: z.ZodEnum<
|
|
211
|
+
target_kind: z.ZodEnum<{
|
|
212
|
+
loop: "loop";
|
|
213
|
+
bee: "bee";
|
|
214
|
+
gate: "gate";
|
|
215
|
+
policy: "policy";
|
|
216
|
+
evaluator: "evaluator";
|
|
217
|
+
}>;
|
|
469
218
|
target_release_id: z.ZodString;
|
|
470
|
-
/**
|
|
471
|
-
* Single optimization dimension (AC-8). Multi-dimension proposals
|
|
472
|
-
* must be split into multiple rounds.
|
|
473
|
-
*/
|
|
474
219
|
optimization_dimension: z.ZodString;
|
|
475
220
|
before_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
476
221
|
after_snapshot: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -479,201 +224,42 @@ export declare const EvolutionEvaluationSchema: z.ZodObject<{
|
|
|
479
224
|
after_score: z.ZodNumber;
|
|
480
225
|
score_delta_min: z.ZodDefault<z.ZodNumber>;
|
|
481
226
|
author_id: z.ZodString;
|
|
482
|
-
/**
|
|
483
|
-
* The LLM-side marker that this proposal targets a SINGLE object
|
|
484
|
-
* (AC-8). Multi-object proposals must be split into multiple
|
|
485
|
-
* rounds. The service layer rejects proposals with
|
|
486
|
-
* `single_object !== true`.
|
|
487
|
-
*/
|
|
488
227
|
single_object: z.ZodLiteral<true>;
|
|
489
|
-
/**
|
|
490
|
-
* The LLM-side marker that this proposal targets a SINGLE
|
|
491
|
-
* optimization dimension (AC-8). The service layer rejects
|
|
492
|
-
* proposals with `single_optimization_dimension !== true`.
|
|
493
|
-
*/
|
|
494
228
|
single_optimization_dimension: z.ZodLiteral<true>;
|
|
495
229
|
rubric: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
496
|
-
red_lines: z.ZodDefault<z.ZodArray<z.ZodString
|
|
497
|
-
source_traces: z.ZodDefault<z.ZodArray<z.ZodString
|
|
498
|
-
} & {
|
|
230
|
+
red_lines: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
231
|
+
source_traces: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
499
232
|
id: z.ZodString;
|
|
500
|
-
dimensions: z.ZodArray<z.ZodString
|
|
233
|
+
dimensions: z.ZodArray<z.ZodString>;
|
|
501
234
|
target_count: z.ZodLiteral<1>;
|
|
502
235
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.evolution/1">>;
|
|
503
236
|
created_at: z.ZodString;
|
|
504
237
|
score_delta: z.ZodNumber;
|
|
505
|
-
},
|
|
506
|
-
schema_version: "peaks.evolution/1";
|
|
507
|
-
id: string;
|
|
508
|
-
created_at: string;
|
|
509
|
-
diff: Record<string, unknown>;
|
|
510
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
511
|
-
target_release_id: string;
|
|
512
|
-
optimization_dimension: string;
|
|
513
|
-
before_snapshot: Record<string, unknown>;
|
|
514
|
-
after_snapshot: Record<string, unknown>;
|
|
515
|
-
before_score: number;
|
|
516
|
-
after_score: number;
|
|
517
|
-
score_delta_min: number;
|
|
518
|
-
author_id: string;
|
|
519
|
-
single_object: true;
|
|
520
|
-
single_optimization_dimension: true;
|
|
521
|
-
rubric: Record<string, unknown>;
|
|
522
|
-
red_lines: string[];
|
|
523
|
-
source_traces: string[];
|
|
524
|
-
dimensions: string[];
|
|
525
|
-
target_count: 1;
|
|
526
|
-
score_delta: number;
|
|
527
|
-
}, {
|
|
528
|
-
id: string;
|
|
529
|
-
created_at: string;
|
|
530
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
531
|
-
target_release_id: string;
|
|
532
|
-
optimization_dimension: string;
|
|
533
|
-
before_score: number;
|
|
534
|
-
after_score: number;
|
|
535
|
-
author_id: string;
|
|
536
|
-
single_object: true;
|
|
537
|
-
single_optimization_dimension: true;
|
|
538
|
-
dimensions: string[];
|
|
539
|
-
target_count: 1;
|
|
540
|
-
score_delta: number;
|
|
541
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
542
|
-
diff?: Record<string, unknown> | undefined;
|
|
543
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
544
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
545
|
-
score_delta_min?: number | undefined;
|
|
546
|
-
rubric?: Record<string, unknown> | undefined;
|
|
547
|
-
red_lines?: string[] | undefined;
|
|
548
|
-
source_traces?: string[] | undefined;
|
|
549
|
-
}>;
|
|
238
|
+
}, z.core.$strip>;
|
|
550
239
|
evaluator_id: z.ZodString;
|
|
551
240
|
skeptic_id: z.ZodString;
|
|
552
241
|
evaluator_result: z.ZodObject<{
|
|
553
242
|
score: z.ZodNumber;
|
|
554
|
-
riskTags: z.ZodDefault<z.ZodArray<z.ZodString
|
|
243
|
+
riskTags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
555
244
|
refuteParagraph: z.ZodString;
|
|
556
|
-
},
|
|
557
|
-
score: number;
|
|
558
|
-
riskTags: string[];
|
|
559
|
-
refuteParagraph: string;
|
|
560
|
-
}, {
|
|
561
|
-
score: number;
|
|
562
|
-
refuteParagraph: string;
|
|
563
|
-
riskTags?: string[] | undefined;
|
|
564
|
-
}>;
|
|
245
|
+
}, z.core.$strip>;
|
|
565
246
|
skeptic_result: z.ZodObject<{
|
|
566
|
-
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
567
|
-
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
568
|
-
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString
|
|
247
|
+
driftRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
248
|
+
overfitRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
249
|
+
safetyRegressionRisks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
569
250
|
blocker: z.ZodOptional<z.ZodString>;
|
|
570
|
-
},
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}, {
|
|
576
|
-
driftRisks?: string[] | undefined;
|
|
577
|
-
overfitRisks?: string[] | undefined;
|
|
578
|
-
safetyRegressionRisks?: string[] | undefined;
|
|
579
|
-
blocker?: string | undefined;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
verdict: z.ZodEnum<{
|
|
253
|
+
keep: "keep";
|
|
254
|
+
revert: "revert";
|
|
255
|
+
"needs-user-decision": "needs-user-decision";
|
|
580
256
|
}>;
|
|
581
|
-
verdict: z.ZodEnum<["keep", "revert", "needs-user-decision"]>;
|
|
582
257
|
user_confirmation_pointer: z.ZodOptional<z.ZodString>;
|
|
583
258
|
brief_pointer: z.ZodOptional<z.ZodString>;
|
|
584
259
|
schema_version: z.ZodDefault<z.ZodLiteral<"peaks.evolution/1">>;
|
|
585
260
|
created_at: z.ZodString;
|
|
586
|
-
} & {
|
|
587
261
|
score_delta: z.ZodNumber;
|
|
588
|
-
},
|
|
589
|
-
schema_version: "peaks.evolution/1";
|
|
590
|
-
id: string;
|
|
591
|
-
created_at: string;
|
|
592
|
-
verdict: "keep" | "revert" | "needs-user-decision";
|
|
593
|
-
score_delta: number;
|
|
594
|
-
proposal: {
|
|
595
|
-
schema_version: "peaks.evolution/1";
|
|
596
|
-
id: string;
|
|
597
|
-
created_at: string;
|
|
598
|
-
diff: Record<string, unknown>;
|
|
599
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
600
|
-
target_release_id: string;
|
|
601
|
-
optimization_dimension: string;
|
|
602
|
-
before_snapshot: Record<string, unknown>;
|
|
603
|
-
after_snapshot: Record<string, unknown>;
|
|
604
|
-
before_score: number;
|
|
605
|
-
after_score: number;
|
|
606
|
-
score_delta_min: number;
|
|
607
|
-
author_id: string;
|
|
608
|
-
single_object: true;
|
|
609
|
-
single_optimization_dimension: true;
|
|
610
|
-
rubric: Record<string, unknown>;
|
|
611
|
-
red_lines: string[];
|
|
612
|
-
source_traces: string[];
|
|
613
|
-
dimensions: string[];
|
|
614
|
-
target_count: 1;
|
|
615
|
-
score_delta: number;
|
|
616
|
-
};
|
|
617
|
-
evaluator_id: string;
|
|
618
|
-
skeptic_id: string;
|
|
619
|
-
evaluator_result: {
|
|
620
|
-
score: number;
|
|
621
|
-
riskTags: string[];
|
|
622
|
-
refuteParagraph: string;
|
|
623
|
-
};
|
|
624
|
-
skeptic_result: {
|
|
625
|
-
driftRisks: string[];
|
|
626
|
-
overfitRisks: string[];
|
|
627
|
-
safetyRegressionRisks: string[];
|
|
628
|
-
blocker?: string | undefined;
|
|
629
|
-
};
|
|
630
|
-
user_confirmation_pointer?: string | undefined;
|
|
631
|
-
brief_pointer?: string | undefined;
|
|
632
|
-
}, {
|
|
633
|
-
id: string;
|
|
634
|
-
created_at: string;
|
|
635
|
-
verdict: "keep" | "revert" | "needs-user-decision";
|
|
636
|
-
score_delta: number;
|
|
637
|
-
proposal: {
|
|
638
|
-
id: string;
|
|
639
|
-
created_at: string;
|
|
640
|
-
target_kind: "loop" | "bee" | "gate" | "policy" | "evaluator";
|
|
641
|
-
target_release_id: string;
|
|
642
|
-
optimization_dimension: string;
|
|
643
|
-
before_score: number;
|
|
644
|
-
after_score: number;
|
|
645
|
-
author_id: string;
|
|
646
|
-
single_object: true;
|
|
647
|
-
single_optimization_dimension: true;
|
|
648
|
-
dimensions: string[];
|
|
649
|
-
target_count: 1;
|
|
650
|
-
score_delta: number;
|
|
651
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
652
|
-
diff?: Record<string, unknown> | undefined;
|
|
653
|
-
before_snapshot?: Record<string, unknown> | undefined;
|
|
654
|
-
after_snapshot?: Record<string, unknown> | undefined;
|
|
655
|
-
score_delta_min?: number | undefined;
|
|
656
|
-
rubric?: Record<string, unknown> | undefined;
|
|
657
|
-
red_lines?: string[] | undefined;
|
|
658
|
-
source_traces?: string[] | undefined;
|
|
659
|
-
};
|
|
660
|
-
evaluator_id: string;
|
|
661
|
-
skeptic_id: string;
|
|
662
|
-
evaluator_result: {
|
|
663
|
-
score: number;
|
|
664
|
-
refuteParagraph: string;
|
|
665
|
-
riskTags?: string[] | undefined;
|
|
666
|
-
};
|
|
667
|
-
skeptic_result: {
|
|
668
|
-
driftRisks?: string[] | undefined;
|
|
669
|
-
overfitRisks?: string[] | undefined;
|
|
670
|
-
safetyRegressionRisks?: string[] | undefined;
|
|
671
|
-
blocker?: string | undefined;
|
|
672
|
-
};
|
|
673
|
-
schema_version?: "peaks.evolution/1" | undefined;
|
|
674
|
-
user_confirmation_pointer?: string | undefined;
|
|
675
|
-
brief_pointer?: string | undefined;
|
|
676
|
-
}>;
|
|
262
|
+
}, z.core.$strip>;
|
|
677
263
|
export type EvolutionEvaluation = z.infer<typeof EvolutionEvaluationSchema>;
|
|
678
264
|
/**
|
|
679
265
|
* Default for `score_delta_min` per spec §6.1 #5.
|