opencode-swarm 7.115.0 → 7.116.1
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/.opencode/skills/commit-pr/SKILL.md +60 -579
- package/README.md +3 -1
- package/dist/cli/{curator-drift-c0by7063.js → curator-drift-7p2ky1th.js} +2 -2
- package/dist/cli/{curator-llm-factory-6n9sgaj8.js → curator-llm-factory-9qn52fnv.js} +17 -16
- package/dist/cli/{curator-hpc4tsjv.js → curator-yxmtp8py.js} +17 -16
- package/dist/cli/{dispatch-mczsxy5s.js → dispatch-07jgc3hn.js} +1 -1
- package/dist/cli/{evidence-summary-service-fehwj116.js → evidence-summary-service-bwt6drb3.js} +7 -7
- package/dist/cli/{gate-evidence-vkpqt300.js → gate-evidence-j2m4cd85.js} +5 -4
- package/dist/cli/{guardrail-explain-hecpd738.js → guardrail-explain-xvyz2eag.js} +18 -17
- package/dist/cli/{hive-promoter-0kfb4vjk.js → hive-promoter-ykqc60w1.js} +17 -16
- package/dist/cli/{index-0p660a87.js → index-0pfqcjp6.js} +5 -1
- package/dist/cli/{index-g40r5d08.js → index-34g1mv3c.js} +1 -1
- package/dist/cli/{index-4sckv7y6.js → index-42cx6g2h.js} +9 -4
- package/dist/cli/index-4905hd2m.js +19 -0
- package/dist/cli/{index-80jkseqw.js → index-5bcrp3bc.js} +2 -2
- package/dist/cli/{index-rk6qhyng.js → index-5h7d37nf.js} +7 -7
- package/dist/cli/{index-m766gvdt.js → index-7kcpkm4y.js} +7016 -1994
- package/dist/cli/{index-4h2ea8h5.js → index-abjjn4yh.js} +2 -2
- package/dist/cli/{index-m0rce3x6.js → index-efdyjgeh.js} +2 -2
- package/dist/cli/{index-jtqkh8jf.js → index-fsrp8wp3.js} +10 -1
- package/dist/cli/{index-8f2270hc.js → index-g4p13g8t.js} +3 -3
- package/dist/cli/{index-wh8949ef.js → index-kzj3fp7c.js} +3 -3
- package/dist/cli/{index-ga4ta3cr.js → index-nprawcc0.js} +7 -1
- package/dist/cli/{index-2etc05tv.js → index-p9jf8gt8.js} +28 -20
- package/dist/cli/{index-pa6t33pt.js → index-q2rrv0cy.js} +11 -0
- package/dist/cli/{index-n18yy0z1.js → index-t5f01hnz.js} +3 -3
- package/dist/cli/{index-6f6y2rbp.js → index-wegc6xwr.js} +3 -3
- package/dist/cli/{index-x12hvfpf.js → index-wxkf3089.js} +3 -3
- package/dist/cli/{index-yrrqs4b0.js → index-xdsd2hma.js} +1164 -51
- package/dist/cli/index.js +17 -16
- package/dist/cli/{knowledge-escalator-5gwp1ar8.js → knowledge-escalator-tthw6c9q.js} +8 -8
- package/dist/cli/{knowledge-events-m304swh6.js → knowledge-events-hrbmwxxj.js} +6 -5
- package/dist/cli/{knowledge-store-9babt8rd.js → knowledge-store-5cns5sns.js} +6 -6
- package/dist/cli/{knowledge-validator-t9sym59g.js → knowledge-validator-xre0s774.js} +7 -7
- package/dist/cli/{pending-delegations-ddbkbgxy.js → pending-delegations-9cn17983.js} +4 -4
- package/dist/cli/{pr-subscriptions-vwv7zm2p.js → pr-subscriptions-8a6jwek2.js} +5 -5
- package/dist/cli/runtime-ykafcwc6.js +3397 -0
- package/dist/cli/{skill-generator-tav44xpm.js → skill-generator-22nk6c6a.js} +9 -9
- package/dist/cli/{telemetry-jny76r83.js → telemetry-qh78ymq4.js} +1 -1
- package/dist/commands/archive.d.ts +4 -4
- package/dist/commands/close.d.ts +12 -0
- package/dist/commands/command-dispatch.d.ts +2 -0
- package/dist/commands/gate-audit.d.ts +28 -0
- package/dist/commands/gate-stats.d.ts +1 -0
- package/dist/commands/index.d.ts +4 -0
- package/dist/commands/registry.d.ts +25 -8
- package/dist/commands/reset-backup.d.ts +32 -0
- package/dist/commands/reset-session.d.ts +2 -0
- package/dist/commands/reset.d.ts +9 -0
- package/dist/config/plan-schema.d.ts +7 -7
- package/dist/evaluation/contracts.d.ts +545 -0
- package/dist/evaluation/disposable-worktree.d.ts +38 -0
- package/dist/evaluation/fixtures.d.ts +8 -0
- package/dist/evaluation/gate-audit.d.ts +32 -0
- package/dist/evaluation/gate-ground-truth.d.ts +43 -0
- package/dist/evaluation/gate-stats.d.ts +47 -0
- package/dist/evaluation/hashing.d.ts +34 -0
- package/dist/evaluation/index.d.ts +17 -0
- package/dist/evaluation/model-dispatcher.d.ts +30 -0
- package/dist/evaluation/public-api.d.ts +87 -0
- package/dist/evaluation/retention.d.ts +56 -0
- package/dist/evaluation/runner.d.ts +48 -0
- package/dist/evaluation/statistics.d.ts +9 -0
- package/dist/evaluation/store.d.ts +26 -0
- package/dist/evidence/manager.d.ts +18 -0
- package/dist/evidence/task-file.d.ts +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +468 -451
- package/dist/mutation/engine.d.ts +29 -5
- package/dist/telemetry.d.ts +11 -1
- package/dist/tools/plugin-registration.d.ts +2 -1
- package/dist/tools/sast-scan.d.ts +9 -0
- package/dist/tools/swarm-command.d.ts +2 -1
- package/dist/tools/update-task-status.d.ts +16 -4
- package/dist/utils/external-tool-runner.d.ts +2 -1
- package/dist/utils/swarm-artifact-cache.d.ts +13 -0
- package/evaluation-fixtures/tier1/boundary-error/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/boundary-error/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/boundary-error/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/boundary-error/instruction.md +1 -0
- package/evaluation-fixtures/tier1/boundary-error/manifest.json +1 -0
- package/evaluation-fixtures/tier1/branch-swap/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/branch-swap/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/branch-swap/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/branch-swap/instruction.md +1 -0
- package/evaluation-fixtures/tier1/branch-swap/manifest.json +1 -0
- package/evaluation-fixtures/tier1/curated-off-by-one/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/curated-off-by-one/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/curated-off-by-one/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/curated-off-by-one/instruction.md +1 -0
- package/evaluation-fixtures/tier1/curated-off-by-one/manifest.json +1 -0
- package/evaluation-fixtures/tier1/guard-removal/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/guard-removal/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/guard-removal/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/guard-removal/instruction.md +1 -0
- package/evaluation-fixtures/tier1/guard-removal/manifest.json +1 -0
- package/evaluation-fixtures/tier1/injection-prone-string/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/injection-prone-string/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/injection-prone-string/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/injection-prone-string/instruction.md +1 -0
- package/evaluation-fixtures/tier1/injection-prone-string/manifest.json +1 -0
- package/evaluation-fixtures/tier1/missing-auth-check/environment/baseline.ts +4 -0
- package/evaluation-fixtures/tier1/missing-auth-check/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/missing-auth-check/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/missing-auth-check/instruction.md +1 -0
- package/evaluation-fixtures/tier1/missing-auth-check/manifest.json +1 -0
- package/evaluation-fixtures/tier1/missing-await/environment/baseline.ts +7 -0
- package/evaluation-fixtures/tier1/missing-await/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/missing-await/environment/defect.ts +4 -0
- package/evaluation-fixtures/tier1/missing-await/instruction.md +1 -0
- package/evaluation-fixtures/tier1/missing-await/manifest.json +1 -0
- package/evaluation-fixtures/tier1/mutation-off-by-one/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/mutation-off-by-one/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/mutation-off-by-one/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/mutation-off-by-one/instruction.md +1 -0
- package/evaluation-fixtures/tier1/mutation-off-by-one/manifest.json +1 -0
- package/evaluation-fixtures/tier1/null-substitution/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/null-substitution/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/null-substitution/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/null-substitution/instruction.md +1 -0
- package/evaluation-fixtures/tier1/null-substitution/manifest.json +1 -0
- package/evaluation-fixtures/tier1/operator-swap/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/operator-swap/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/operator-swap/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/operator-swap/instruction.md +1 -0
- package/evaluation-fixtures/tier1/operator-swap/manifest.json +1 -0
- package/evaluation-fixtures/tier1/side-effect-deletion/environment/baseline.ts +4 -0
- package/evaluation-fixtures/tier1/side-effect-deletion/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/side-effect-deletion/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/side-effect-deletion/instruction.md +1 -0
- package/evaluation-fixtures/tier1/side-effect-deletion/manifest.json +1 -0
- package/evaluation-fixtures/tier1/swallowed-error/environment/baseline.ts +3 -0
- package/evaluation-fixtures/tier1/swallowed-error/environment/defect.test.ts +3 -0
- package/evaluation-fixtures/tier1/swallowed-error/environment/defect.ts +3 -0
- package/evaluation-fixtures/tier1/swallowed-error/instruction.md +1 -0
- package/evaluation-fixtures/tier1/swallowed-error/manifest.json +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const IdentifierSchema: z.ZodString;
|
|
3
|
+
declare const Sha256Schema: z.ZodString;
|
|
4
|
+
declare const RelativePathSchema: z.ZodString;
|
|
5
|
+
export { IdentifierSchema as EvaluationIdentifierSchema };
|
|
6
|
+
export { Sha256Schema as EvaluationSha256Schema };
|
|
7
|
+
export { RelativePathSchema as EvaluationRelativePathSchema };
|
|
8
|
+
export declare const EvaluationSplitSchema: z.ZodEnum<{
|
|
9
|
+
test: "test";
|
|
10
|
+
train: "train";
|
|
11
|
+
validation: "validation";
|
|
12
|
+
}>;
|
|
13
|
+
export type EvaluationSplit = z.infer<typeof EvaluationSplitSchema>;
|
|
14
|
+
export declare const CostRecordSchema: z.ZodObject<{
|
|
15
|
+
source: z.ZodEnum<{
|
|
16
|
+
reported: "reported";
|
|
17
|
+
estimated: "estimated";
|
|
18
|
+
unavailable: "unavailable";
|
|
19
|
+
}>;
|
|
20
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type CostRecord = z.infer<typeof CostRecordSchema>;
|
|
23
|
+
export declare const HumanReviewReceiptSchema: z.ZodObject<{
|
|
24
|
+
reviewer: z.ZodString;
|
|
25
|
+
reviewedAt: z.ZodISODateTime;
|
|
26
|
+
instruction: z.ZodLiteral<true>;
|
|
27
|
+
fixture: z.ZodLiteral<true>;
|
|
28
|
+
scorer: z.ZodLiteral<true>;
|
|
29
|
+
secretsPrivacy: z.ZodLiteral<true>;
|
|
30
|
+
license: z.ZodLiteral<true>;
|
|
31
|
+
split: z.ZodLiteral<true>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const EvaluationTaskV1Schema: z.ZodObject<{
|
|
34
|
+
v: z.ZodLiteral<1>;
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
derivedFromTaskId: z.ZodOptional<z.ZodString>;
|
|
37
|
+
source: z.ZodEnum<{
|
|
38
|
+
curated: "curated";
|
|
39
|
+
"trace-proposal": "trace-proposal";
|
|
40
|
+
}>;
|
|
41
|
+
split: z.ZodEnum<{
|
|
42
|
+
test: "test";
|
|
43
|
+
train: "train";
|
|
44
|
+
validation: "validation";
|
|
45
|
+
}>;
|
|
46
|
+
category: z.ZodString;
|
|
47
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
48
|
+
instructionPath: z.ZodString;
|
|
49
|
+
environment: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
kind: z.ZodLiteral<"fixture">;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"container">;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
}, z.core.$strict>], "kind">;
|
|
56
|
+
scorer: z.ZodObject<{
|
|
57
|
+
kind: z.ZodEnum<{
|
|
58
|
+
project: "project";
|
|
59
|
+
builtin: "builtin";
|
|
60
|
+
}>;
|
|
61
|
+
argv: z.ZodArray<z.ZodString>;
|
|
62
|
+
timeoutMs: z.ZodNumber;
|
|
63
|
+
scoreRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
provenance: z.ZodObject<{
|
|
66
|
+
origin: z.ZodString;
|
|
67
|
+
license: z.ZodString;
|
|
68
|
+
collectedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
69
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
reviewer: z.ZodString;
|
|
71
|
+
reviewedAt: z.ZodISODateTime;
|
|
72
|
+
instruction: z.ZodLiteral<true>;
|
|
73
|
+
fixture: z.ZodLiteral<true>;
|
|
74
|
+
scorer: z.ZodLiteral<true>;
|
|
75
|
+
secretsPrivacy: z.ZodLiteral<true>;
|
|
76
|
+
license: z.ZodLiteral<true>;
|
|
77
|
+
split: z.ZodLiteral<true>;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
contentHash: z.ZodString;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
export type EvaluationTaskV1 = z.infer<typeof EvaluationTaskV1Schema>;
|
|
83
|
+
export declare const EvaluationCandidateV1Schema: z.ZodObject<{
|
|
84
|
+
v: z.ZodLiteral<1>;
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
baseline: "baseline";
|
|
88
|
+
skill: "skill";
|
|
89
|
+
harness: "harness";
|
|
90
|
+
}>;
|
|
91
|
+
payloadPath: z.ZodString;
|
|
92
|
+
model: z.ZodString;
|
|
93
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
94
|
+
contentHash: z.ZodString;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
export type EvaluationCandidateV1 = z.infer<typeof EvaluationCandidateV1Schema>;
|
|
97
|
+
export declare const EvaluationOutcomeSchema: z.ZodEnum<{
|
|
98
|
+
timeout: "timeout";
|
|
99
|
+
cancelled: "cancelled";
|
|
100
|
+
unsupported: "unsupported";
|
|
101
|
+
scored: "scored";
|
|
102
|
+
infrastructure_failure: "infrastructure_failure";
|
|
103
|
+
malformed: "malformed";
|
|
104
|
+
integrity_failure: "integrity_failure";
|
|
105
|
+
}>;
|
|
106
|
+
export type EvaluationOutcome = z.infer<typeof EvaluationOutcomeSchema>;
|
|
107
|
+
export declare const EvaluationResultV1Schema: z.ZodObject<{
|
|
108
|
+
v: z.ZodLiteral<1>;
|
|
109
|
+
taskId: z.ZodString;
|
|
110
|
+
category: z.ZodString;
|
|
111
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
112
|
+
repetition: z.ZodNumber;
|
|
113
|
+
candidateId: z.ZodString;
|
|
114
|
+
seed: z.ZodString;
|
|
115
|
+
outcome: z.ZodEnum<{
|
|
116
|
+
timeout: "timeout";
|
|
117
|
+
cancelled: "cancelled";
|
|
118
|
+
unsupported: "unsupported";
|
|
119
|
+
scored: "scored";
|
|
120
|
+
infrastructure_failure: "infrastructure_failure";
|
|
121
|
+
malformed: "malformed";
|
|
122
|
+
integrity_failure: "integrity_failure";
|
|
123
|
+
}>;
|
|
124
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
scoreRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
126
|
+
cost: z.ZodObject<{
|
|
127
|
+
source: z.ZodEnum<{
|
|
128
|
+
reported: "reported";
|
|
129
|
+
estimated: "estimated";
|
|
130
|
+
unavailable: "unavailable";
|
|
131
|
+
}>;
|
|
132
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
durationMs: z.ZodNumber;
|
|
135
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
136
|
+
failureCode: z.ZodOptional<z.ZodString>;
|
|
137
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
export type EvaluationResultV1 = z.infer<typeof EvaluationResultV1Schema>;
|
|
140
|
+
export declare const EvaluationBudgetsV1Schema: z.ZodObject<{
|
|
141
|
+
maxTasks: z.ZodNumber;
|
|
142
|
+
maxRepetitions: z.ZodNumber;
|
|
143
|
+
maxConcurrency: z.ZodNumber;
|
|
144
|
+
maxTaskTimeMs: z.ZodNumber;
|
|
145
|
+
maxRetries: z.ZodNumber;
|
|
146
|
+
maxOutputBytes: z.ZodNumber;
|
|
147
|
+
maxSpendUsd: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strict>;
|
|
149
|
+
export declare const EnvironmentFingerprintV1Schema: z.ZodObject<{
|
|
150
|
+
platform: z.ZodString;
|
|
151
|
+
arch: z.ZodString;
|
|
152
|
+
runtime: z.ZodString;
|
|
153
|
+
baseSha: z.ZodString;
|
|
154
|
+
activeTreeHash: z.ZodString;
|
|
155
|
+
taskSetHash: z.ZodString;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
export declare const EvaluationRunV1Schema: z.ZodObject<{
|
|
158
|
+
v: z.ZodLiteral<1>;
|
|
159
|
+
runId: z.ZodString;
|
|
160
|
+
createdAt: z.ZodISODateTime;
|
|
161
|
+
status: z.ZodEnum<{
|
|
162
|
+
complete: "complete";
|
|
163
|
+
cancelled: "cancelled";
|
|
164
|
+
inconclusive: "inconclusive";
|
|
165
|
+
}>;
|
|
166
|
+
baseline: z.ZodObject<{
|
|
167
|
+
v: z.ZodLiteral<1>;
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
kind: z.ZodEnum<{
|
|
170
|
+
baseline: "baseline";
|
|
171
|
+
skill: "skill";
|
|
172
|
+
harness: "harness";
|
|
173
|
+
}>;
|
|
174
|
+
payloadPath: z.ZodString;
|
|
175
|
+
model: z.ZodString;
|
|
176
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
177
|
+
contentHash: z.ZodString;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
candidate: z.ZodObject<{
|
|
180
|
+
v: z.ZodLiteral<1>;
|
|
181
|
+
id: z.ZodString;
|
|
182
|
+
kind: z.ZodEnum<{
|
|
183
|
+
baseline: "baseline";
|
|
184
|
+
skill: "skill";
|
|
185
|
+
harness: "harness";
|
|
186
|
+
}>;
|
|
187
|
+
payloadPath: z.ZodString;
|
|
188
|
+
model: z.ZodString;
|
|
189
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
190
|
+
contentHash: z.ZodString;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
taskSet: z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
contentHash: z.ZodString;
|
|
195
|
+
taskIds: z.ZodArray<z.ZodString>;
|
|
196
|
+
}, z.core.$strict>;
|
|
197
|
+
split: z.ZodEnum<{
|
|
198
|
+
test: "test";
|
|
199
|
+
train: "train";
|
|
200
|
+
validation: "validation";
|
|
201
|
+
}>;
|
|
202
|
+
seed: z.ZodString;
|
|
203
|
+
models: z.ZodArray<z.ZodString>;
|
|
204
|
+
environment: z.ZodObject<{
|
|
205
|
+
platform: z.ZodString;
|
|
206
|
+
arch: z.ZodString;
|
|
207
|
+
runtime: z.ZodString;
|
|
208
|
+
baseSha: z.ZodString;
|
|
209
|
+
activeTreeHash: z.ZodString;
|
|
210
|
+
taskSetHash: z.ZodString;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
budgets: z.ZodObject<{
|
|
213
|
+
maxTasks: z.ZodNumber;
|
|
214
|
+
maxRepetitions: z.ZodNumber;
|
|
215
|
+
maxConcurrency: z.ZodNumber;
|
|
216
|
+
maxTaskTimeMs: z.ZodNumber;
|
|
217
|
+
maxRetries: z.ZodNumber;
|
|
218
|
+
maxOutputBytes: z.ZodNumber;
|
|
219
|
+
maxSpendUsd: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
results: z.ZodArray<z.ZodObject<{
|
|
222
|
+
v: z.ZodLiteral<1>;
|
|
223
|
+
taskId: z.ZodString;
|
|
224
|
+
category: z.ZodString;
|
|
225
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
226
|
+
repetition: z.ZodNumber;
|
|
227
|
+
candidateId: z.ZodString;
|
|
228
|
+
seed: z.ZodString;
|
|
229
|
+
outcome: z.ZodEnum<{
|
|
230
|
+
timeout: "timeout";
|
|
231
|
+
cancelled: "cancelled";
|
|
232
|
+
unsupported: "unsupported";
|
|
233
|
+
scored: "scored";
|
|
234
|
+
infrastructure_failure: "infrastructure_failure";
|
|
235
|
+
malformed: "malformed";
|
|
236
|
+
integrity_failure: "integrity_failure";
|
|
237
|
+
}>;
|
|
238
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
scoreRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
240
|
+
cost: z.ZodObject<{
|
|
241
|
+
source: z.ZodEnum<{
|
|
242
|
+
reported: "reported";
|
|
243
|
+
estimated: "estimated";
|
|
244
|
+
unavailable: "unavailable";
|
|
245
|
+
}>;
|
|
246
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
}, z.core.$strict>;
|
|
248
|
+
durationMs: z.ZodNumber;
|
|
249
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
250
|
+
failureCode: z.ZodOptional<z.ZodString>;
|
|
251
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
252
|
+
}, z.core.$strict>>;
|
|
253
|
+
cost: z.ZodObject<{
|
|
254
|
+
source: z.ZodEnum<{
|
|
255
|
+
reported: "reported";
|
|
256
|
+
estimated: "estimated";
|
|
257
|
+
unavailable: "unavailable";
|
|
258
|
+
}>;
|
|
259
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strict>;
|
|
261
|
+
integrityHash: z.ZodString;
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
export type EvaluationRunV1 = z.infer<typeof EvaluationRunV1Schema>;
|
|
264
|
+
export declare const PromotionPolicyV1Schema: z.ZodObject<{
|
|
265
|
+
v: z.ZodLiteral<1>;
|
|
266
|
+
minValidPairs: z.ZodDefault<z.ZodNumber>;
|
|
267
|
+
minCoverage: z.ZodDefault<z.ZodNumber>;
|
|
268
|
+
deadband: z.ZodDefault<z.ZodNumber>;
|
|
269
|
+
confidence: z.ZodDefault<z.ZodLiteral<0.95>>;
|
|
270
|
+
bootstrapResamples: z.ZodDefault<z.ZodLiteral<10000>>;
|
|
271
|
+
requireAvailableCosts: z.ZodDefault<z.ZodBoolean>;
|
|
272
|
+
protectedCategoryTolerances: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
273
|
+
}, z.core.$strict>;
|
|
274
|
+
export type PromotionPolicyV1 = z.infer<typeof PromotionPolicyV1Schema>;
|
|
275
|
+
export declare const PromotionDecisionV1Schema: z.ZodObject<{
|
|
276
|
+
v: z.ZodLiteral<1>;
|
|
277
|
+
decisionId: z.ZodString;
|
|
278
|
+
runId: z.ZodString;
|
|
279
|
+
decidedAt: z.ZodISODateTime;
|
|
280
|
+
status: z.ZodEnum<{
|
|
281
|
+
inconclusive: "inconclusive";
|
|
282
|
+
accept: "accept";
|
|
283
|
+
reject: "reject";
|
|
284
|
+
}>;
|
|
285
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
286
|
+
baseline: z.ZodObject<{
|
|
287
|
+
baselineRunId: z.ZodString;
|
|
288
|
+
baselineCandidateId: z.ZodString;
|
|
289
|
+
baselineMean: z.ZodNumber;
|
|
290
|
+
candidateMean: z.ZodNumber;
|
|
291
|
+
pairedDelta: z.ZodNumber;
|
|
292
|
+
confidenceInterval: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
293
|
+
validPairs: z.ZodNumber;
|
|
294
|
+
missingPairs: z.ZodNumber;
|
|
295
|
+
coverage: z.ZodNumber;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
historicalBest: z.ZodObject<{
|
|
298
|
+
baselineRunId: z.ZodString;
|
|
299
|
+
baselineCandidateId: z.ZodString;
|
|
300
|
+
baselineMean: z.ZodNumber;
|
|
301
|
+
candidateMean: z.ZodNumber;
|
|
302
|
+
pairedDelta: z.ZodNumber;
|
|
303
|
+
confidenceInterval: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
304
|
+
validPairs: z.ZodNumber;
|
|
305
|
+
missingPairs: z.ZodNumber;
|
|
306
|
+
coverage: z.ZodNumber;
|
|
307
|
+
}, z.core.$strict>;
|
|
308
|
+
deadband: z.ZodNumber;
|
|
309
|
+
bootstrap: z.ZodObject<{
|
|
310
|
+
resamples: z.ZodLiteral<10000>;
|
|
311
|
+
confidence: z.ZodLiteral<0.95>;
|
|
312
|
+
seedHash: z.ZodString;
|
|
313
|
+
}, z.core.$strict>;
|
|
314
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
315
|
+
category: z.ZodString;
|
|
316
|
+
protected: z.ZodBoolean;
|
|
317
|
+
tolerance: z.ZodNumber;
|
|
318
|
+
baselineMean: z.ZodNumber;
|
|
319
|
+
candidateMean: z.ZodNumber;
|
|
320
|
+
pairedDelta: z.ZodNumber;
|
|
321
|
+
regression: z.ZodBoolean;
|
|
322
|
+
}, z.core.$strict>>;
|
|
323
|
+
lineage: z.ZodObject<{
|
|
324
|
+
baselineRunId: z.ZodString;
|
|
325
|
+
historicalBestRunId: z.ZodString;
|
|
326
|
+
taskSetHash: z.ZodString;
|
|
327
|
+
baselineHash: z.ZodString;
|
|
328
|
+
candidateHash: z.ZodString;
|
|
329
|
+
historicalBestHash: z.ZodString;
|
|
330
|
+
}, z.core.$strict>;
|
|
331
|
+
policyHash: z.ZodString;
|
|
332
|
+
unavailableQualityMetrics: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
333
|
+
complexity_delta: "complexity_delta";
|
|
334
|
+
public_api_delta: "public_api_delta";
|
|
335
|
+
}>>>;
|
|
336
|
+
}, z.core.$strict>;
|
|
337
|
+
export type PromotionDecisionV1 = z.infer<typeof PromotionDecisionV1Schema>;
|
|
338
|
+
export declare const GateNameSchema: z.ZodEnum<{
|
|
339
|
+
reviewer: "reviewer";
|
|
340
|
+
sast: "sast";
|
|
341
|
+
"test-engineer": "test-engineer";
|
|
342
|
+
mutation: "mutation";
|
|
343
|
+
quality: "quality";
|
|
344
|
+
}>;
|
|
345
|
+
export type GateName = z.infer<typeof GateNameSchema>;
|
|
346
|
+
export declare const GateAuditManifestV1Schema: z.ZodObject<{
|
|
347
|
+
v: z.ZodLiteral<1>;
|
|
348
|
+
id: z.ZodString;
|
|
349
|
+
createdAt: z.ZodISODateTime;
|
|
350
|
+
taskIds: z.ZodArray<z.ZodString>;
|
|
351
|
+
gates: z.ZodArray<z.ZodEnum<{
|
|
352
|
+
reviewer: "reviewer";
|
|
353
|
+
sast: "sast";
|
|
354
|
+
"test-engineer": "test-engineer";
|
|
355
|
+
mutation: "mutation";
|
|
356
|
+
quality: "quality";
|
|
357
|
+
}>>;
|
|
358
|
+
models: z.ZodArray<z.ZodString>;
|
|
359
|
+
preferredSwarm: z.ZodOptional<z.ZodString>;
|
|
360
|
+
repetitions: z.ZodNumber;
|
|
361
|
+
seed: z.ZodString;
|
|
362
|
+
maxConcurrency: z.ZodNumber;
|
|
363
|
+
maxRetries: z.ZodNumber;
|
|
364
|
+
maxTimeMs: z.ZodNumber;
|
|
365
|
+
maxCostUsd: z.ZodOptional<z.ZodNumber>;
|
|
366
|
+
contentHash: z.ZodString;
|
|
367
|
+
}, z.core.$strict>;
|
|
368
|
+
export type GateAuditManifestV1 = z.infer<typeof GateAuditManifestV1Schema>;
|
|
369
|
+
export declare const GateAuditCellV1Schema: z.ZodObject<{
|
|
370
|
+
v: z.ZodLiteral<1>;
|
|
371
|
+
taskId: z.ZodString;
|
|
372
|
+
candidateId: z.ZodOptional<z.ZodString>;
|
|
373
|
+
defectType: z.ZodString;
|
|
374
|
+
gate: z.ZodEnum<{
|
|
375
|
+
reviewer: "reviewer";
|
|
376
|
+
sast: "sast";
|
|
377
|
+
"test-engineer": "test-engineer";
|
|
378
|
+
mutation: "mutation";
|
|
379
|
+
quality: "quality";
|
|
380
|
+
}>;
|
|
381
|
+
model: z.ZodString;
|
|
382
|
+
repetition: z.ZodNumber;
|
|
383
|
+
outcome: z.ZodEnum<{
|
|
384
|
+
unsupported: "unsupported";
|
|
385
|
+
infrastructure_failure: "infrastructure_failure";
|
|
386
|
+
caught: "caught";
|
|
387
|
+
missed: "missed";
|
|
388
|
+
false_rejection: "false_rejection";
|
|
389
|
+
}>;
|
|
390
|
+
retries: z.ZodNumber;
|
|
391
|
+
cost: z.ZodObject<{
|
|
392
|
+
source: z.ZodEnum<{
|
|
393
|
+
reported: "reported";
|
|
394
|
+
estimated: "estimated";
|
|
395
|
+
unavailable: "unavailable";
|
|
396
|
+
}>;
|
|
397
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
}, z.core.$strict>;
|
|
399
|
+
durationMs: z.ZodNumber;
|
|
400
|
+
failureClassification: z.ZodOptional<z.ZodEnum<{
|
|
401
|
+
clean: "clean";
|
|
402
|
+
infrastructure_failure: "infrastructure_failure";
|
|
403
|
+
pre_existing_failure: "pre_existing_failure";
|
|
404
|
+
new_regression: "new_regression";
|
|
405
|
+
flaky_failure: "flaky_failure";
|
|
406
|
+
unknown_failure: "unknown_failure";
|
|
407
|
+
}>>;
|
|
408
|
+
failureCode: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strict>;
|
|
410
|
+
export type GateAuditCellV1 = z.infer<typeof GateAuditCellV1Schema>;
|
|
411
|
+
export declare const GateAuditResultV1Schema: z.ZodObject<{
|
|
412
|
+
v: z.ZodLiteral<1>;
|
|
413
|
+
runId: z.ZodString;
|
|
414
|
+
manifestHash: z.ZodString;
|
|
415
|
+
createdAt: z.ZodISODateTime;
|
|
416
|
+
status: z.ZodEnum<{
|
|
417
|
+
complete: "complete";
|
|
418
|
+
cancelled: "cancelled";
|
|
419
|
+
inconclusive: "inconclusive";
|
|
420
|
+
}>;
|
|
421
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
422
|
+
v: z.ZodLiteral<1>;
|
|
423
|
+
taskId: z.ZodString;
|
|
424
|
+
candidateId: z.ZodOptional<z.ZodString>;
|
|
425
|
+
defectType: z.ZodString;
|
|
426
|
+
gate: z.ZodEnum<{
|
|
427
|
+
reviewer: "reviewer";
|
|
428
|
+
sast: "sast";
|
|
429
|
+
"test-engineer": "test-engineer";
|
|
430
|
+
mutation: "mutation";
|
|
431
|
+
quality: "quality";
|
|
432
|
+
}>;
|
|
433
|
+
model: z.ZodString;
|
|
434
|
+
repetition: z.ZodNumber;
|
|
435
|
+
outcome: z.ZodEnum<{
|
|
436
|
+
unsupported: "unsupported";
|
|
437
|
+
infrastructure_failure: "infrastructure_failure";
|
|
438
|
+
caught: "caught";
|
|
439
|
+
missed: "missed";
|
|
440
|
+
false_rejection: "false_rejection";
|
|
441
|
+
}>;
|
|
442
|
+
retries: z.ZodNumber;
|
|
443
|
+
cost: z.ZodObject<{
|
|
444
|
+
source: z.ZodEnum<{
|
|
445
|
+
reported: "reported";
|
|
446
|
+
estimated: "estimated";
|
|
447
|
+
unavailable: "unavailable";
|
|
448
|
+
}>;
|
|
449
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
450
|
+
}, z.core.$strict>;
|
|
451
|
+
durationMs: z.ZodNumber;
|
|
452
|
+
failureClassification: z.ZodOptional<z.ZodEnum<{
|
|
453
|
+
clean: "clean";
|
|
454
|
+
infrastructure_failure: "infrastructure_failure";
|
|
455
|
+
pre_existing_failure: "pre_existing_failure";
|
|
456
|
+
new_regression: "new_regression";
|
|
457
|
+
flaky_failure: "flaky_failure";
|
|
458
|
+
unknown_failure: "unknown_failure";
|
|
459
|
+
}>>;
|
|
460
|
+
failureCode: z.ZodOptional<z.ZodString>;
|
|
461
|
+
}, z.core.$strict>>;
|
|
462
|
+
cost: z.ZodObject<{
|
|
463
|
+
source: z.ZodEnum<{
|
|
464
|
+
reported: "reported";
|
|
465
|
+
estimated: "estimated";
|
|
466
|
+
unavailable: "unavailable";
|
|
467
|
+
}>;
|
|
468
|
+
usd: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
}, z.core.$strict>;
|
|
470
|
+
qualityMetricAvailability: z.ZodObject<{
|
|
471
|
+
complexity_delta: z.ZodLiteral<"unavailable">;
|
|
472
|
+
public_api_delta: z.ZodLiteral<"unavailable">;
|
|
473
|
+
}, z.core.$strict>;
|
|
474
|
+
}, z.core.$strict>;
|
|
475
|
+
export type GateAuditResultV1 = z.infer<typeof GateAuditResultV1Schema>;
|
|
476
|
+
export declare const TestConsumptionClaimV1Schema: z.ZodObject<{
|
|
477
|
+
v: z.ZodLiteral<1>;
|
|
478
|
+
runId: z.ZodString;
|
|
479
|
+
taskSetHash: z.ZodString;
|
|
480
|
+
baselineHash: z.ZodString;
|
|
481
|
+
candidateHash: z.ZodString;
|
|
482
|
+
claimedAt: z.ZodISODateTime;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
export type TestConsumptionClaimV1 = z.infer<typeof TestConsumptionClaimV1Schema>;
|
|
485
|
+
export declare const TaskSetSnapshotV1Schema: z.ZodObject<{
|
|
486
|
+
v: z.ZodLiteral<1>;
|
|
487
|
+
id: z.ZodString;
|
|
488
|
+
split: z.ZodEnum<{
|
|
489
|
+
test: "test";
|
|
490
|
+
train: "train";
|
|
491
|
+
validation: "validation";
|
|
492
|
+
}>;
|
|
493
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
494
|
+
v: z.ZodLiteral<1>;
|
|
495
|
+
id: z.ZodString;
|
|
496
|
+
derivedFromTaskId: z.ZodOptional<z.ZodString>;
|
|
497
|
+
source: z.ZodEnum<{
|
|
498
|
+
curated: "curated";
|
|
499
|
+
"trace-proposal": "trace-proposal";
|
|
500
|
+
}>;
|
|
501
|
+
split: z.ZodEnum<{
|
|
502
|
+
test: "test";
|
|
503
|
+
train: "train";
|
|
504
|
+
validation: "validation";
|
|
505
|
+
}>;
|
|
506
|
+
category: z.ZodString;
|
|
507
|
+
protected: z.ZodDefault<z.ZodBoolean>;
|
|
508
|
+
instructionPath: z.ZodString;
|
|
509
|
+
environment: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
510
|
+
kind: z.ZodLiteral<"fixture">;
|
|
511
|
+
path: z.ZodString;
|
|
512
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
513
|
+
kind: z.ZodLiteral<"container">;
|
|
514
|
+
path: z.ZodString;
|
|
515
|
+
}, z.core.$strict>], "kind">;
|
|
516
|
+
scorer: z.ZodObject<{
|
|
517
|
+
kind: z.ZodEnum<{
|
|
518
|
+
project: "project";
|
|
519
|
+
builtin: "builtin";
|
|
520
|
+
}>;
|
|
521
|
+
argv: z.ZodArray<z.ZodString>;
|
|
522
|
+
timeoutMs: z.ZodNumber;
|
|
523
|
+
scoreRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
524
|
+
}, z.core.$strict>;
|
|
525
|
+
provenance: z.ZodObject<{
|
|
526
|
+
origin: z.ZodString;
|
|
527
|
+
license: z.ZodString;
|
|
528
|
+
collectedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
529
|
+
review: z.ZodOptional<z.ZodObject<{
|
|
530
|
+
reviewer: z.ZodString;
|
|
531
|
+
reviewedAt: z.ZodISODateTime;
|
|
532
|
+
instruction: z.ZodLiteral<true>;
|
|
533
|
+
fixture: z.ZodLiteral<true>;
|
|
534
|
+
scorer: z.ZodLiteral<true>;
|
|
535
|
+
secretsPrivacy: z.ZodLiteral<true>;
|
|
536
|
+
license: z.ZodLiteral<true>;
|
|
537
|
+
split: z.ZodLiteral<true>;
|
|
538
|
+
}, z.core.$strict>>;
|
|
539
|
+
}, z.core.$strict>;
|
|
540
|
+
contentHash: z.ZodString;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
contentHash: z.ZodString;
|
|
543
|
+
createdAt: z.ZodISODateTime;
|
|
544
|
+
}, z.core.$strict>;
|
|
545
|
+
export type TaskSetSnapshotV1 = z.infer<typeof TaskSetSnapshotV1Schema>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as os from 'node:os';
|
|
3
|
+
import { resolveExecutableFromPath, runExternalTool } from '../utils/external-tool-runner.js';
|
|
4
|
+
export type WorkingTreeFingerprint = {
|
|
5
|
+
head: string;
|
|
6
|
+
porcelainHash: string;
|
|
7
|
+
};
|
|
8
|
+
export type DisposableWorktree = {
|
|
9
|
+
path: string;
|
|
10
|
+
baseSha: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class DisposableWorktreeCleanupError extends Error {
|
|
13
|
+
readonly worktreePath: string;
|
|
14
|
+
readonly pathPresent: boolean;
|
|
15
|
+
readonly registrationPresent: boolean | undefined;
|
|
16
|
+
readonly cleanupErrors: string[];
|
|
17
|
+
readonly code = "evaluation-worktree-cleanup-failed";
|
|
18
|
+
constructor(worktreePath: string, pathPresent: boolean, registrationPresent: boolean | undefined, cleanupErrors: string[]);
|
|
19
|
+
}
|
|
20
|
+
export declare function captureWorkingTreeFingerprint(projectRoot: string, abortSignal?: AbortSignal): Promise<WorkingTreeFingerprint>;
|
|
21
|
+
export declare function createDisposableWorktree(projectRoot: string, baseRef: string, abortSignal?: AbortSignal): Promise<DisposableWorktree>;
|
|
22
|
+
export declare function removeDisposableWorktree(projectRoot: string, worktreePath: string): Promise<void>;
|
|
23
|
+
export declare function withDisposableWorktree<T>(args: {
|
|
24
|
+
projectRoot: string;
|
|
25
|
+
baseRef: string;
|
|
26
|
+
abortSignal?: AbortSignal;
|
|
27
|
+
run: (worktree: DisposableWorktree) => Promise<T>;
|
|
28
|
+
}): Promise<T>;
|
|
29
|
+
export declare const _internals: {
|
|
30
|
+
runExternalTool: typeof runExternalTool;
|
|
31
|
+
resolveExecutableFromPath: typeof resolveExecutableFromPath;
|
|
32
|
+
tmpdir: typeof os.tmpdir;
|
|
33
|
+
rmSync: typeof fs.rmSync;
|
|
34
|
+
existsSync: typeof fs.existsSync;
|
|
35
|
+
captureWorkingTreeFingerprint: typeof captureWorkingTreeFingerprint;
|
|
36
|
+
createDisposableWorktree: typeof createDisposableWorktree;
|
|
37
|
+
removeDisposableWorktree: typeof removeDisposableWorktree;
|
|
38
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type EvaluationTaskV1 } from './contracts.js';
|
|
2
|
+
export declare const TIER1_FIXTURE_IDS: readonly ["mutation-off-by-one", "null-substitution", "operator-swap", "guard-removal", "branch-swap", "side-effect-deletion", "curated-off-by-one", "missing-await", "swallowed-error", "injection-prone-string", "missing-auth-check", "boundary-error"];
|
|
3
|
+
export type Tier1FixtureId = (typeof TIER1_FIXTURE_IDS)[number];
|
|
4
|
+
export declare function resolveTier1FixtureRoot(packageRoot: string): string;
|
|
5
|
+
export declare function resolveTier1FixtureDirectory(packageRoot: string, fixtureId: Tier1FixtureId): string;
|
|
6
|
+
export declare function listTier1FixtureManifests(packageRoot: string): string[];
|
|
7
|
+
/** Load packed Harbor-style manifests and rebase their package-relative paths. */
|
|
8
|
+
export declare function loadTier1EvaluationTasks(packageRoot: string): Promise<EvaluationTaskV1[]>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { GateAuditManifestV1, GateAuditResultV1 } from './contracts.js';
|
|
2
|
+
import { captureWorkingTreeFingerprint } from './disposable-worktree.js';
|
|
3
|
+
import type { EvaluationModelDispatcher } from './model-dispatcher.js';
|
|
4
|
+
declare const CANDIDATE_VARIANTS: readonly ["defect", "clean"];
|
|
5
|
+
type CandidateVariant = (typeof CANDIDATE_VARIANTS)[number];
|
|
6
|
+
export type RunGateAuditOptions = {
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
packageRoot: string;
|
|
9
|
+
manifest: GateAuditManifestV1;
|
|
10
|
+
dispatcher?: EvaluationModelDispatcher;
|
|
11
|
+
parentSessionId?: string;
|
|
12
|
+
abortSignal?: AbortSignal;
|
|
13
|
+
};
|
|
14
|
+
type MutationGateResult = {
|
|
15
|
+
outcome: 'caught' | 'missed' | 'infrastructure_failure';
|
|
16
|
+
failureCode?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Run a green baseline first, then apply and test the reviewed real defect patch. */
|
|
19
|
+
export declare function runMutationGateAdapter(args: {
|
|
20
|
+
directory: string;
|
|
21
|
+
mutationType: string;
|
|
22
|
+
timeoutMs: number;
|
|
23
|
+
variant: CandidateVariant;
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
}): Promise<MutationGateResult>;
|
|
26
|
+
export declare function runGateAudit(options: RunGateAuditOptions): Promise<GateAuditResultV1>;
|
|
27
|
+
export declare function createGateAuditManifest(input: Omit<GateAuditManifestV1, 'contentHash'>): GateAuditManifestV1;
|
|
28
|
+
export declare function defaultGateAuditId(seed: string): string;
|
|
29
|
+
export declare const _gateAuditInternals: {
|
|
30
|
+
captureWorkingTreeFingerprint: typeof captureWorkingTreeFingerprint;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GateGroundTruthV1Schema: z.ZodObject<{
|
|
3
|
+
v: z.ZodLiteral<1>;
|
|
4
|
+
runId: z.ZodString;
|
|
5
|
+
taskId: z.ZodString;
|
|
6
|
+
candidateId: z.ZodString;
|
|
7
|
+
model: z.ZodString;
|
|
8
|
+
gate: z.ZodEnum<{
|
|
9
|
+
reviewer: "reviewer";
|
|
10
|
+
sast: "sast";
|
|
11
|
+
"test-engineer": "test-engineer";
|
|
12
|
+
mutation: "mutation";
|
|
13
|
+
quality: "quality";
|
|
14
|
+
}>;
|
|
15
|
+
repetition: z.ZodNumber;
|
|
16
|
+
source: z.ZodEnum<{
|
|
17
|
+
integration: "integration";
|
|
18
|
+
"test-impact": "test-impact";
|
|
19
|
+
}>;
|
|
20
|
+
classification: z.ZodEnum<{
|
|
21
|
+
unknown: "unknown";
|
|
22
|
+
clean: "clean";
|
|
23
|
+
infrastructure_failure: "infrastructure_failure";
|
|
24
|
+
new_regression: "new_regression";
|
|
25
|
+
pre_existing: "pre_existing";
|
|
26
|
+
flaky: "flaky";
|
|
27
|
+
}>;
|
|
28
|
+
observedAt: z.ZodISODateTime;
|
|
29
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type GateGroundTruthV1 = z.infer<typeof GateGroundTruthV1Schema>;
|
|
32
|
+
export type TestImpactGateGroundTruthInput = Omit<GateGroundTruthV1, 'v' | 'source'>;
|
|
33
|
+
export declare function gateGroundTruthJoinKey(value: Pick<GateGroundTruthV1, 'runId' | 'taskId' | 'candidateId' | 'model' | 'gate' | 'repetition'>): string;
|
|
34
|
+
/** Persist the exact offline join relation once; conflicting rewrites fail closed. */
|
|
35
|
+
export declare function saveGateGroundTruth(directory: string, runId: string, input: GateGroundTruthV1[]): Promise<GateGroundTruthV1[]>;
|
|
36
|
+
/** Supported ingestion adapter for exact-key test-impact/integration sidecars. */
|
|
37
|
+
export declare function recordTestImpactGateGroundTruth(directory: string, runId: string, input: TestImpactGateGroundTruthInput[]): Promise<GateGroundTruthV1[]>;
|
|
38
|
+
export type GateGroundTruthReadSummary = {
|
|
39
|
+
events: GateGroundTruthV1[];
|
|
40
|
+
malformed: number;
|
|
41
|
+
};
|
|
42
|
+
/** Read historical evidence line-by-line so one malformed record is unavailable, not trusted. */
|
|
43
|
+
export declare function readGateGroundTruth(directory: string, runId: string): Promise<GateGroundTruthReadSummary>;
|