@introspection-ai/recipes 0.57.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents.d.ts +6 -0
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/batch/files.d.ts +5 -0
- package/dist/batch/files.d.ts.map +1 -1
- package/dist/batch/files.js +39 -0
- package/dist/batch/files.js.map +1 -1
- package/dist/batch/index.d.ts +33 -7
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +59 -27
- package/dist/batch/index.js.map +1 -1
- package/dist/batch/lines.d.ts +51 -9
- package/dist/batch/lines.d.ts.map +1 -1
- package/dist/batch/lines.js +86 -30
- package/dist/batch/lines.js.map +1 -1
- package/dist/batch/runner.d.ts +44 -5
- package/dist/batch/runner.d.ts.map +1 -1
- package/dist/batch/runner.js +433 -52
- package/dist/batch/runner.js.map +1 -1
- package/dist/compaction.d.ts +11 -0
- package/dist/compaction.d.ts.map +1 -0
- package/dist/compaction.js +27 -0
- package/dist/compaction.js.map +1 -0
- package/dist/issues/arguments.d.ts +51 -1
- package/dist/issues/arguments.d.ts.map +1 -1
- package/dist/issues/arguments.generated.d.ts.map +1 -1
- package/dist/issues/arguments.generated.js +97 -0
- package/dist/issues/arguments.generated.js.map +1 -1
- package/dist/issues/module.d.ts.map +1 -1
- package/dist/issues/module.js +8 -1
- package/dist/issues/module.js.map +1 -1
- package/dist/issues/tool.d.ts.map +1 -1
- package/dist/issues/tool.js +127 -4
- package/dist/issues/tool.js.map +1 -1
- package/dist/issues/types.d.ts +40 -1
- package/dist/issues/types.d.ts.map +1 -1
- package/dist/issues/types.js +8 -1
- package/dist/issues/types.js.map +1 -1
- package/dist/judges/classifier.d.ts +16 -0
- package/dist/judges/classifier.d.ts.map +1 -0
- package/dist/judges/classifier.js +47 -0
- package/dist/judges/classifier.js.map +1 -0
- package/dist/judges/cli-main.d.ts +41 -0
- package/dist/judges/cli-main.d.ts.map +1 -0
- package/dist/judges/cli-main.js +184 -0
- package/dist/judges/cli-main.js.map +1 -0
- package/dist/judges/cli.d.ts +2 -0
- package/dist/judges/cli.d.ts.map +1 -0
- package/dist/judges/cli.js +43 -0
- package/dist/judges/cli.js.map +1 -0
- package/dist/judges/controller.d.ts +78 -0
- package/dist/judges/controller.d.ts.map +1 -0
- package/dist/judges/controller.js +243 -0
- package/dist/judges/controller.js.map +1 -0
- package/dist/judges/definition.d.ts +93 -0
- package/dist/judges/definition.d.ts.map +1 -0
- package/dist/judges/definition.js +105 -0
- package/dist/judges/definition.js.map +1 -0
- package/dist/judges/gate.d.ts +46 -0
- package/dist/judges/gate.d.ts.map +1 -0
- package/dist/judges/gate.js +256 -0
- package/dist/judges/gate.js.map +1 -0
- package/dist/judges/identity.d.ts +21 -0
- package/dist/judges/identity.d.ts.map +1 -0
- package/dist/judges/identity.js +48 -0
- package/dist/judges/identity.js.map +1 -0
- package/dist/judges/index.d.ts +10 -0
- package/dist/judges/index.d.ts.map +1 -0
- package/dist/judges/index.js +10 -0
- package/dist/judges/index.js.map +1 -0
- package/dist/judges/resolve-hooks.d.ts +10 -0
- package/dist/judges/resolve-hooks.d.ts.map +1 -0
- package/dist/judges/resolve-hooks.js +25 -0
- package/dist/judges/resolve-hooks.js.map +1 -0
- package/dist/judges/run.d.ts +130 -0
- package/dist/judges/run.d.ts.map +1 -0
- package/dist/judges/run.js +356 -0
- package/dist/judges/run.js.map +1 -0
- package/dist/judges/session.d.ts +9 -0
- package/dist/judges/session.d.ts.map +1 -0
- package/dist/judges/session.js +109 -0
- package/dist/judges/session.js.map +1 -0
- package/dist/judges/trajectory.d.ts +82 -0
- package/dist/judges/trajectory.d.ts.map +1 -0
- package/dist/judges/trajectory.js +170 -0
- package/dist/judges/trajectory.js.map +1 -0
- package/dist/judges/verdict.d.ts +31 -0
- package/dist/judges/verdict.d.ts.map +1 -0
- package/dist/judges/verdict.js +121 -0
- package/dist/judges/verdict.js.map +1 -0
- package/dist/model-binding.d.ts +12 -0
- package/dist/model-binding.d.ts.map +1 -1
- package/dist/model-binding.js +38 -6
- package/dist/model-binding.js.map +1 -1
- package/dist/prompts/budget.d.ts +28 -0
- package/dist/prompts/budget.d.ts.map +1 -0
- package/dist/prompts/budget.js +31 -0
- package/dist/prompts/budget.js.map +1 -0
- package/dist/prompts/builder.d.ts +32 -0
- package/dist/prompts/builder.d.ts.map +1 -0
- package/dist/prompts/builder.js +22 -0
- package/dist/prompts/builder.js.map +1 -0
- package/dist/prompts/builders/conversation-synthesis.d.ts +106 -0
- package/dist/prompts/builders/conversation-synthesis.d.ts.map +1 -0
- package/dist/prompts/builders/conversation-synthesis.js +495 -0
- package/dist/prompts/builders/conversation-synthesis.js.map +1 -0
- package/dist/prompts/builders/trajectory.d.ts +14 -0
- package/dist/prompts/builders/trajectory.d.ts.map +1 -0
- package/dist/prompts/builders/trajectory.js +66 -0
- package/dist/prompts/builders/trajectory.js.map +1 -0
- package/dist/prompts/fit.d.ts +7 -0
- package/dist/prompts/fit.d.ts.map +1 -0
- package/dist/prompts/fit.js +15 -0
- package/dist/prompts/fit.js.map +1 -0
- package/dist/prompts/index.d.ts +8 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +8 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/registry.d.ts +8 -0
- package/dist/prompts/registry.d.ts.map +1 -0
- package/dist/prompts/registry.js +15 -0
- package/dist/prompts/registry.js.map +1 -0
- package/dist/prompts/spec.d.ts +16 -0
- package/dist/prompts/spec.d.ts.map +1 -0
- package/dist/prompts/spec.js +12 -0
- package/dist/prompts/spec.js.map +1 -0
- package/dist/prompts/template.d.ts +12 -0
- package/dist/prompts/template.d.ts.map +1 -0
- package/dist/prompts/template.js +31 -0
- package/dist/prompts/template.js.map +1 -0
- package/dist/prompts/text.d.ts +5 -0
- package/dist/prompts/text.d.ts.map +1 -0
- package/dist/prompts/text.js +13 -0
- package/dist/prompts/text.js.map +1 -0
- package/dist/recipe/agent.d.ts +11 -1
- package/dist/recipe/agent.d.ts.map +1 -1
- package/dist/recipe/agent.js +76 -1
- package/dist/recipe/agent.js.map +1 -1
- package/dist/recipe/manifest.generated.d.ts +1 -1
- package/dist/recipe/manifest.generated.js +1 -1
- package/dist/recipe/model.d.ts +5 -12
- package/dist/recipe/model.d.ts.map +1 -1
- package/dist/recipe/model.js +197 -263
- package/dist/recipe/model.js.map +1 -1
- package/dist/recipe/session.d.ts +5 -0
- package/dist/recipe/session.d.ts.map +1 -1
- package/dist/recipe/session.js +82 -4
- package/dist/recipe/session.js.map +1 -1
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +4 -0
- package/dist/run-controller.js.map +1 -1
- package/dist/session.d.ts +6 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +6 -2
- package/dist/session.js.map +1 -1
- package/docs/README.md +1 -0
- package/docs/agent-composition.md +3 -2
- package/docs/issues/README.md +34 -12
- package/docs/judges.md +269 -0
- package/docs/providers.md +12 -3
- package/docs/recipe-format.md +80 -12
- package/docs/recipe-judges.md +149 -61
- package/package.json +14 -6
- package/skills/issues/SKILL.md +28 -10
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { canonical, TOOL_RESULT_TRUNCATE_BYTES, } from "./trajectory.js";
|
|
2
|
+
function isRecord(value) {
|
|
3
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function valueBytes(value) {
|
|
6
|
+
if (value === undefined || value === null)
|
|
7
|
+
return 0;
|
|
8
|
+
return Buffer.byteLength(typeof value === "string" ? value : JSON.stringify(value));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The messages and executed tool calls a gate matches. A tool call counts
|
|
12
|
+
* only once it has a result: a request alone is transcript evidence, not an
|
|
13
|
+
* executed tool event.
|
|
14
|
+
*/
|
|
15
|
+
export function gateView(input, feedbackEvents = []) {
|
|
16
|
+
const results = new Map();
|
|
17
|
+
for (const event of input.trajectory) {
|
|
18
|
+
if (event.type === "tool_result") {
|
|
19
|
+
results.set(event.tool_call_id, {
|
|
20
|
+
content: event.content,
|
|
21
|
+
...(event.error ? { error: event.error.message } : {}),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const messages = [];
|
|
26
|
+
const toolCalls = [];
|
|
27
|
+
let turn = 0;
|
|
28
|
+
let ordinal = 0;
|
|
29
|
+
for (const event of input.trajectory) {
|
|
30
|
+
if (event.type === "message") {
|
|
31
|
+
if (event.role === "user")
|
|
32
|
+
turn += 1;
|
|
33
|
+
messages.push({
|
|
34
|
+
ordinal,
|
|
35
|
+
agent: "agent",
|
|
36
|
+
turn,
|
|
37
|
+
role: event.role,
|
|
38
|
+
text: event.content,
|
|
39
|
+
ref: `trajectory-${ordinal}`,
|
|
40
|
+
});
|
|
41
|
+
ordinal += 1;
|
|
42
|
+
}
|
|
43
|
+
else if (event.type === "tool_call") {
|
|
44
|
+
const settled = results.get(event.id);
|
|
45
|
+
if (!settled)
|
|
46
|
+
continue;
|
|
47
|
+
const result = settled.error ?? settled.content;
|
|
48
|
+
toolCalls.push({
|
|
49
|
+
ordinal,
|
|
50
|
+
agent: "agent",
|
|
51
|
+
turn,
|
|
52
|
+
name: event.name,
|
|
53
|
+
status: settled.error === undefined ? "ok" : "error",
|
|
54
|
+
ref: event.id,
|
|
55
|
+
truncated: valueBytes(result) > TOOL_RESULT_TRUNCATE_BYTES,
|
|
56
|
+
...(event.arguments !== undefined ? { args: event.arguments } : {}),
|
|
57
|
+
...(result !== undefined ? { result } : {}),
|
|
58
|
+
});
|
|
59
|
+
ordinal += 1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (input.system_instructions?.trim()) {
|
|
63
|
+
messages.push({
|
|
64
|
+
ordinal,
|
|
65
|
+
agent: "agent",
|
|
66
|
+
turn: 0,
|
|
67
|
+
role: "system",
|
|
68
|
+
text: input.system_instructions,
|
|
69
|
+
ref: `system-${ordinal}`,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
messages,
|
|
74
|
+
tool_calls: toolCalls,
|
|
75
|
+
feedback_events: [...feedbackEvents],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
const EXACT_FIELDS = new Set([
|
|
79
|
+
"name",
|
|
80
|
+
"role",
|
|
81
|
+
"status",
|
|
82
|
+
"source",
|
|
83
|
+
"channel",
|
|
84
|
+
"surface",
|
|
85
|
+
"message_id",
|
|
86
|
+
"turn_id",
|
|
87
|
+
"response_id",
|
|
88
|
+
"user_id",
|
|
89
|
+
"anonymous_id",
|
|
90
|
+
"agent_name",
|
|
91
|
+
"agent_id",
|
|
92
|
+
"service_name",
|
|
93
|
+
]);
|
|
94
|
+
function textLike(path) {
|
|
95
|
+
return (path === "text" ||
|
|
96
|
+
path === "comments" ||
|
|
97
|
+
path.startsWith("args.") ||
|
|
98
|
+
path.startsWith("result.") ||
|
|
99
|
+
path.startsWith("attributes."));
|
|
100
|
+
}
|
|
101
|
+
function isResultPath(path) {
|
|
102
|
+
return path === "result" || path.startsWith("result.");
|
|
103
|
+
}
|
|
104
|
+
function readParts(value, head, rest) {
|
|
105
|
+
if (Array.isArray(value)) {
|
|
106
|
+
return value.flatMap((item) => readParts(item, head, rest));
|
|
107
|
+
}
|
|
108
|
+
if (!isRecord(value) || !(head in value))
|
|
109
|
+
return [];
|
|
110
|
+
const next = value[head];
|
|
111
|
+
if (rest.length === 0)
|
|
112
|
+
return [next];
|
|
113
|
+
const joined = rest.join(".");
|
|
114
|
+
if (isRecord(next) && joined in next)
|
|
115
|
+
return [next[joined]];
|
|
116
|
+
return readParts(next, rest[0], rest.slice(1));
|
|
117
|
+
}
|
|
118
|
+
/** Every value at a dotted path; a key that itself contains dots wins over descending. */
|
|
119
|
+
function readPath(value, path) {
|
|
120
|
+
if (isRecord(value) && path in value)
|
|
121
|
+
return [value[path]];
|
|
122
|
+
const [head, ...rest] = path.split(".");
|
|
123
|
+
return readParts(value, head, rest);
|
|
124
|
+
}
|
|
125
|
+
const REGEX_FLAGS = new Set(["i", "m", "s", "u"]);
|
|
126
|
+
/** A `/pattern/flags` target as a regular expression, or null when it is a plain string. */
|
|
127
|
+
function regexLiteral(target) {
|
|
128
|
+
if (!target.startsWith("/"))
|
|
129
|
+
return null;
|
|
130
|
+
const end = target.lastIndexOf("/");
|
|
131
|
+
if (end === 0)
|
|
132
|
+
return null;
|
|
133
|
+
const flags = [...target.slice(end + 1)];
|
|
134
|
+
if (!flags.every((flag) => REGEX_FLAGS.has(flag))) {
|
|
135
|
+
throw new Error(`unsupported regex flags in "${target}"; a judge gate supports i, m, s and u`);
|
|
136
|
+
}
|
|
137
|
+
if (new Set(flags).size !== flags.length) {
|
|
138
|
+
throw new Error(`duplicate regex flag in "${target}"`);
|
|
139
|
+
}
|
|
140
|
+
const own = flags.filter((flag) => flag !== "u").join("");
|
|
141
|
+
const pattern = target.slice(1, end);
|
|
142
|
+
// Unicode sets mode first: it reads the class set operations (`--`, `&&`)
|
|
143
|
+
// gate patterns may use. Never the legacy mode, which would match a
|
|
144
|
+
// pattern it cannot parse as something else instead of refusing it.
|
|
145
|
+
for (const mode of ["v", "u"]) {
|
|
146
|
+
try {
|
|
147
|
+
return new RegExp(pattern, own + mode);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
// Try the next mode.
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
throw new Error(`invalid regex "${target}"`);
|
|
154
|
+
}
|
|
155
|
+
function scalarString(value) {
|
|
156
|
+
if (value === null || value === undefined)
|
|
157
|
+
return null;
|
|
158
|
+
if (typeof value === "string")
|
|
159
|
+
return value;
|
|
160
|
+
if (typeof value === "boolean" || typeof value === "number")
|
|
161
|
+
return String(value);
|
|
162
|
+
return JSON.stringify(canonical(value));
|
|
163
|
+
}
|
|
164
|
+
function sameValue(a, b) {
|
|
165
|
+
return JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
|
|
166
|
+
}
|
|
167
|
+
function scalarMatches(path, value, target) {
|
|
168
|
+
if (Array.isArray(target)) {
|
|
169
|
+
return target.some((one) => scalarMatches(path, value, one));
|
|
170
|
+
}
|
|
171
|
+
if (typeof target !== "string")
|
|
172
|
+
return sameValue(value, target);
|
|
173
|
+
const regex = regexLiteral(target);
|
|
174
|
+
if (regex) {
|
|
175
|
+
const text = scalarString(value);
|
|
176
|
+
return text !== null && regex.test(text);
|
|
177
|
+
}
|
|
178
|
+
if (typeof value !== "string")
|
|
179
|
+
return sameValue(value, target);
|
|
180
|
+
if (EXACT_FIELDS.has(path) || !textLike(path))
|
|
181
|
+
return value === target;
|
|
182
|
+
return value.toLowerCase().includes(target.toLowerCase());
|
|
183
|
+
}
|
|
184
|
+
function itemMatches(item, spec) {
|
|
185
|
+
if (!spec)
|
|
186
|
+
return true;
|
|
187
|
+
for (const [path, target] of Object.entries(spec)) {
|
|
188
|
+
if (path === "event") {
|
|
189
|
+
throw new Error("`event` belongs beside `match`, not inside it");
|
|
190
|
+
}
|
|
191
|
+
const values = readPath(item, path);
|
|
192
|
+
if (!values.some((value) => scalarMatches(path, value, target))) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Whether a judge applies to a conversation. `on` absent or empty means
|
|
200
|
+
* always; otherwise any one matcher suffices, and every field of a matcher's
|
|
201
|
+
* `match` must hold on one event.
|
|
202
|
+
*
|
|
203
|
+
* A tool matcher that tests a result cannot decide a call whose result was
|
|
204
|
+
* captured truncated. If such a call would otherwise match and no other
|
|
205
|
+
* event does, the gate throws rather than guess.
|
|
206
|
+
*/
|
|
207
|
+
export function evaluateGate(on, view) {
|
|
208
|
+
if (on === null || on === undefined)
|
|
209
|
+
return true;
|
|
210
|
+
if (Array.isArray(on)
|
|
211
|
+
? on.length === 0
|
|
212
|
+
: isRecord(on) && Object.keys(on).length === 0) {
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
if (!Array.isArray(on)) {
|
|
216
|
+
throw new Error("judge `on` must be a list of event matchers");
|
|
217
|
+
}
|
|
218
|
+
let indeterminate = false;
|
|
219
|
+
for (const matcher of on) {
|
|
220
|
+
if (!isRecord(matcher) || typeof matcher.event !== "string") {
|
|
221
|
+
throw new Error("each `on` entry must be `{ event, match? }`");
|
|
222
|
+
}
|
|
223
|
+
const spec = isRecord(matcher.match) ? matcher.match : undefined;
|
|
224
|
+
if (matcher.event === "tool") {
|
|
225
|
+
const resultPaths = spec ? Object.keys(spec).filter(isResultPath) : [];
|
|
226
|
+
const withoutResult = spec
|
|
227
|
+
? Object.fromEntries(Object.entries(spec).filter(([path]) => !isResultPath(path)))
|
|
228
|
+
: undefined;
|
|
229
|
+
for (const call of view.tool_calls) {
|
|
230
|
+
if (call.truncated && resultPaths.length > 0) {
|
|
231
|
+
if (itemMatches(call, withoutResult))
|
|
232
|
+
indeterminate = true;
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
if (itemMatches(call, spec))
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
const items = matcher.event === "message"
|
|
241
|
+
? view.messages
|
|
242
|
+
: matcher.event === "feedback"
|
|
243
|
+
? view.feedback_events
|
|
244
|
+
: null;
|
|
245
|
+
if (items === null) {
|
|
246
|
+
throw new Error(`judge \`on\` event "${matcher.event}" is not message, tool or feedback`);
|
|
247
|
+
}
|
|
248
|
+
if (items.some((item) => itemMatches(item, spec)))
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
if (indeterminate) {
|
|
252
|
+
throw new Error("judge gate cannot inspect a truncated tool result");
|
|
253
|
+
}
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../../src/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AC,IAAI,CAAC,eAAe;gBACtB,CAAC,CAAC,IAAI,CAAC;QACb,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,uBAAuB,OAAO,CAAC,KAAK,oCAAoC,CACzE,CAAC;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IACjE,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The version of the judge contract a judgement was made under: the evidence
|
|
3
|
+
* a judge reads, how its gate matches, and what counts as a verdict.
|
|
4
|
+
* Judgements compare only within one contract version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CONTRACT_VERSION = "3";
|
|
7
|
+
/**
|
|
8
|
+
* The version of the judge runner's report, and of the input it reads: the
|
|
9
|
+
* runner prints it for `--schema`, so a caller can check it speaks the same
|
|
10
|
+
* protocol before running.
|
|
11
|
+
*/
|
|
12
|
+
export declare const JUDGE_REPORT_SCHEMA_VERSION = 2;
|
|
13
|
+
/**
|
|
14
|
+
* The judgement a judge makes of one conversation's evidence: the same judge
|
|
15
|
+
* definition over the same evidence is the same judgement, so a repeat run
|
|
16
|
+
* can be recognised rather than counted twice.
|
|
17
|
+
*/
|
|
18
|
+
export declare function judgementId(judgeId: string, definitionHash: string, evidence: string, conversationId: string): string;
|
|
19
|
+
/** Whether a conversation falls inside a judge's sample: stable per judge and conversation. */
|
|
20
|
+
export declare function samplesIn(judgeId: string, conversationId: string, rate: number): boolean;
|
|
21
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/judges/identity.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAmB7C;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GACrB,MAAM,CAKR;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,GACX,OAAO,CAOT"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
/**
|
|
3
|
+
* The version of the judge contract a judgement was made under: the evidence
|
|
4
|
+
* a judge reads, how its gate matches, and what counts as a verdict.
|
|
5
|
+
* Judgements compare only within one contract version.
|
|
6
|
+
*/
|
|
7
|
+
export const CONTRACT_VERSION = "3";
|
|
8
|
+
/**
|
|
9
|
+
* The version of the judge runner's report, and of the input it reads: the
|
|
10
|
+
* runner prints it for `--schema`, so a caller can check it speaks the same
|
|
11
|
+
* protocol before running.
|
|
12
|
+
*/
|
|
13
|
+
export const JUDGE_REPORT_SCHEMA_VERSION = 2;
|
|
14
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
15
|
+
function uuidV5(namespace, name) {
|
|
16
|
+
if (!UUID.test(namespace)) {
|
|
17
|
+
throw new Error(`judge id "${namespace}" is not a UUID`);
|
|
18
|
+
}
|
|
19
|
+
const bytes = createHash("sha1")
|
|
20
|
+
.update(Buffer.from(namespace.replaceAll("-", ""), "hex"))
|
|
21
|
+
.update(name)
|
|
22
|
+
.digest()
|
|
23
|
+
.subarray(0, 16);
|
|
24
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x50;
|
|
25
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
26
|
+
const hex = bytes.toString("hex");
|
|
27
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The judgement a judge makes of one conversation's evidence: the same judge
|
|
31
|
+
* definition over the same evidence is the same judgement, so a repeat run
|
|
32
|
+
* can be recognised rather than counted twice.
|
|
33
|
+
*/
|
|
34
|
+
export function judgementId(judgeId, definitionHash, evidence, conversationId) {
|
|
35
|
+
return uuidV5(judgeId, `${definitionHash}|${CONTRACT_VERSION}|${evidence}|${conversationId}`);
|
|
36
|
+
}
|
|
37
|
+
/** Whether a conversation falls inside a judge's sample: stable per judge and conversation. */
|
|
38
|
+
export function samplesIn(judgeId, conversationId, rate) {
|
|
39
|
+
if (rate >= 1)
|
|
40
|
+
return true;
|
|
41
|
+
if (rate <= 0)
|
|
42
|
+
return false;
|
|
43
|
+
const digest = createHash("sha256")
|
|
44
|
+
.update(`${judgeId}:${conversationId}`)
|
|
45
|
+
.digest();
|
|
46
|
+
return digest.readUIntBE(0, 6) / 2 ** 48 < rate;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/judges/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAE/E,SAAS,MAAM,CAAC,SAAiB,EAAE,IAAY;IAC7C,IAAI,CAAC,IAAI,CA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AI,IAAI,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3B,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC;SAChC,MAAM,CAAC,GAAG,OAAO,IAAI,cAAc,EAAE,CAAC;SACtC,MAAM,EAAE,CAAC;IACZ,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { piClassifier } from "./classifier.js";
|
|
2
|
+
export { createJudgeRunController, judgeRecipe, type JudgeClassifier, type JudgeRunController, type JudgeRunDetails, type JudgeUsage, type JudgeRunControllerOptions, } from "./controller.js";
|
|
3
|
+
export { JudgeDefinitionError, loadJudges, parseJudgeDefinition, parseJudgeDefinitions, RECIPE_CHECK_BIN_ENV, type ClassifierJudgeDefinition, type JudgeDefinition, type JudgeDefinitionOptions, type JudgeQuestion, type JudgeSource, type NormalizedJudgeDefinition, type LlmJudgeDefinition, } from "./definition.js";
|
|
4
|
+
export { evaluateGate, gateView, type GateView, type JudgeFeedbackEvent, } from "./gate.js";
|
|
5
|
+
export { CONTRACT_VERSION, judgementId, samplesIn } from "./identity.js";
|
|
6
|
+
export { runJudges, type JudgeInputLine, type JudgementLine, type JudgeOperationalConfig, type JudgesOutcome, type RunJudgesOptions, type SkippedJudgement, } from "./run.js";
|
|
7
|
+
export { trajectoryFromPiSession } from "./session.js";
|
|
8
|
+
export { evidenceHash, normalizeReplayTrajectory, toJudgeInput, type JudgeInput, type ReplayTrajectoryRecord, type TrajectoryEvent, } from "./trajectory.js";
|
|
9
|
+
export { completeClassifierVerdict, completeLlmVerdict, type JudgeVerdict, type Verdict, } from "./verdict.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/judges/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,yBAAyB,GAC/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,yBAAyB,EACzB,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,OAAO,GACb,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { piClassifier } from "./classifier.js";
|
|
2
|
+
export { createJudgeRunController, judgeRecipe, } from "./controller.js";
|
|
3
|
+
export { JudgeDefinitionError, loadJudges, parseJudgeDefinition, parseJudgeDefinitions, RECIPE_CHECK_BIN_ENV, } from "./definition.js";
|
|
4
|
+
export { evaluateGate, gateView, } from "./gate.js";
|
|
5
|
+
export { CONTRACT_VERSION, judgementId, samplesIn } from "./identity.js";
|
|
6
|
+
export { runJudges, } from "./run.js";
|
|
7
|
+
export { trajectoryFromPiSession } from "./session.js";
|
|
8
|
+
export { evidenceHash, normalizeReplayTrajectory, toJudgeInput, } from "./trajectory.js";
|
|
9
|
+
export { completeClassifierVerdict, completeLlmVerdict, } from "./verdict.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/judges/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EACxB,WAAW,GAMZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,GAQrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,QAAQ,GAGT,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACL,SAAS,GAOV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,yBAAyB,EACzB,YAAY,GAIb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,kBAAkB,GAGnB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function initialize(data: {
|
|
2
|
+
parentURL: string;
|
|
3
|
+
}): void;
|
|
4
|
+
interface ResolveContext {
|
|
5
|
+
parentURL?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function resolve(specifier: string, context: ResolveContext, next: (specifier: string, context: ResolveContext) => Promise<unknown>): Promise<unknown>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=resolve-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-hooks.d.ts","sourceRoot":"","sources":["../../src/judges/resolve-hooks.ts"],"names":[],"mappings":"AAQA,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAE5D;AAED,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,wBAAsB,OAAO,CAC3B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,GACrE,OAAO,CAAC,OAAO,CAAC,CAclB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module resolution hooks for the judge runner started as a plain Node
|
|
3
|
+
* process. Recipes' Pi packages are peers: Pi supplies them when it loads the
|
|
4
|
+
* extension, and nothing does for a script. A bare import that does not
|
|
5
|
+
* resolve from Recipes is resolved again from the installed Pi.
|
|
6
|
+
*/
|
|
7
|
+
let fallback;
|
|
8
|
+
export function initialize(data) {
|
|
9
|
+
fallback = data.parentURL;
|
|
10
|
+
}
|
|
11
|
+
export async function resolve(specifier, context, next) {
|
|
12
|
+
try {
|
|
13
|
+
return await next(specifier, context);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
const bare = !/^(\.|\/|node:|file:|data:)/.test(specifier);
|
|
17
|
+
if (!fallback ||
|
|
18
|
+
!bare ||
|
|
19
|
+
error.code !== "ERR_MODULE_NOT_FOUND") {
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
return next(specifier, { ...context, parentURL: fallback });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=resolve-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-hooks.js","sourceRoot":"","sources":["../../src/judges/resolve-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,IAAI,QAA4B,CAAC;AAEjC,MAAM,UAAU,UAAU,CAAC,IAA2B;IACpD,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;AAC5B,CAAC;AAOD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,SAAiB,EACjB,OAAuB,EACvB,IAAsE;IAEtE,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,CAAC,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3D,IACE,CAAC,QAAQ;YACT,CAAC,IAAI;YACJ,KAA2B,CAAC,IAAI,KAAK,sBAAsB,EAC5D,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { ModelRegistry } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { type BatchFiles } from "../batch/files.js";
|
|
3
|
+
import type { BatchRunController } from "../batch/runner.js";
|
|
4
|
+
import type { JudgeRunController, JudgeUsage } from "./controller.js";
|
|
5
|
+
import type { JudgeDefinition } from "./definition.js";
|
|
6
|
+
import { type JudgeFeedbackEvent } from "./gate.js";
|
|
7
|
+
import { type Verdict } from "./verdict.js";
|
|
8
|
+
/** One conversation to judge: a line of an input file. */
|
|
9
|
+
export interface JudgeInputLine {
|
|
10
|
+
/**
|
|
11
|
+
* Your id for the conversation, unique across every input file. A line
|
|
12
|
+
* without one is named by its `conversation_id`.
|
|
13
|
+
*/
|
|
14
|
+
custom_id: string;
|
|
15
|
+
/** The platform conversation this is, when it is one. Defaults to `custom_id`. */
|
|
16
|
+
conversation_id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The conversation: a trajectory export's records (keyed by `role`), or
|
|
19
|
+
* events already normalized (keyed by `type`).
|
|
20
|
+
*/
|
|
21
|
+
trajectory: unknown[];
|
|
22
|
+
/**
|
|
23
|
+
* In an input file, a line may name a Pi session file in place of
|
|
24
|
+
* `trajectory`; the session's active branch is read as the conversation.
|
|
25
|
+
*/
|
|
26
|
+
session_file?: string;
|
|
27
|
+
/** The agent's effective system instructions, when they are evidence too. */
|
|
28
|
+
system_instructions?: string;
|
|
29
|
+
/** Feedback on the conversation, for a judge whose gate matches `feedback`. */
|
|
30
|
+
feedback_events?: JudgeFeedbackEvent[];
|
|
31
|
+
/** Where the conversation ran. Sampling applies only in `production`. */
|
|
32
|
+
environment?: string;
|
|
33
|
+
}
|
|
34
|
+
/** What the platform has set for a judge, by judge name. */
|
|
35
|
+
export interface JudgeOperationalConfig {
|
|
36
|
+
/** The judge's registered id: the namespace its judgement ids derive from. */
|
|
37
|
+
judge_id?: string;
|
|
38
|
+
/** Default true. */
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/** The fraction of production conversations judged, 0 to 1. Default 1. */
|
|
41
|
+
sample_rate?: number;
|
|
42
|
+
}
|
|
43
|
+
/** One judge's judgement of one conversation: a line of `results.jsonl`. */
|
|
44
|
+
export interface JudgementLine {
|
|
45
|
+
custom_id: string;
|
|
46
|
+
judge: string;
|
|
47
|
+
conversation_id: string;
|
|
48
|
+
definition_hash: string;
|
|
49
|
+
contract_version: string;
|
|
50
|
+
/** Present when the judge has a registered id to derive it from. */
|
|
51
|
+
judgement_id?: string;
|
|
52
|
+
/** `error` when the judge could not reach a verdict; never a silent fail. */
|
|
53
|
+
result: Verdict | "error";
|
|
54
|
+
status: "ok" | "error";
|
|
55
|
+
reasoning?: string;
|
|
56
|
+
/** A classifier judge's probability of yes for each question. */
|
|
57
|
+
scores?: Record<string, number>;
|
|
58
|
+
/** The hash of the evidence the judge read: `evidenceHash` of its input. */
|
|
59
|
+
sequence_hash?: string;
|
|
60
|
+
/** The `<provider>/<model>` that answered, after any `ai.fallbacks`. */
|
|
61
|
+
model?: string;
|
|
62
|
+
/** The tokens the judgement took; absent when the model reported none. */
|
|
63
|
+
usage?: JudgeUsage;
|
|
64
|
+
error?: string;
|
|
65
|
+
/** The batch run that produced it, and how many attempts it took. */
|
|
66
|
+
run_id?: string;
|
|
67
|
+
attempts?: number;
|
|
68
|
+
}
|
|
69
|
+
/** A judge that did not run on a conversation, and why. */
|
|
70
|
+
export interface SkippedJudgement {
|
|
71
|
+
custom_id: string;
|
|
72
|
+
judge: string;
|
|
73
|
+
reason: "gate" | "no_evidence" | "disabled" | "sampled_out";
|
|
74
|
+
}
|
|
75
|
+
export interface RunJudgesOptions {
|
|
76
|
+
judges: readonly JudgeDefinition[];
|
|
77
|
+
/**
|
|
78
|
+
* The conversations: inline lines, and the paths (or `file:` URLs) of JSONL
|
|
79
|
+
* files of them, in any mix. Everything runs as one batch.
|
|
80
|
+
*/
|
|
81
|
+
input: readonly (string | URL | JudgeInputLine)[];
|
|
82
|
+
/**
|
|
83
|
+
* Runs each judgement: `createJudgeRunController`, or your own. With
|
|
84
|
+
* `runDetails`, each judgement names the model that answered and its usage.
|
|
85
|
+
*/
|
|
86
|
+
controller: BatchRunController & Partial<Pick<JudgeRunController, "runDetails">>;
|
|
87
|
+
/**
|
|
88
|
+
* Where the run keeps its state and writes `results.jsonl`. Running again
|
|
89
|
+
* with the same directory skips every judgement that already succeeded for
|
|
90
|
+
* the same judge definition and transcript. Without it, nothing is written.
|
|
91
|
+
*/
|
|
92
|
+
directory?: string;
|
|
93
|
+
/** Judgements in flight at once, across every judge. Default 8. */
|
|
94
|
+
concurrency?: number;
|
|
95
|
+
/** Attempts per judgement when the provider rate-limits it. Default 3. */
|
|
96
|
+
max_attempts?: number;
|
|
97
|
+
operational?: Readonly<Record<string, JudgeOperationalConfig>>;
|
|
98
|
+
signal?: AbortSignal;
|
|
99
|
+
/** Called with each judgement as it completes, in the order they finish. */
|
|
100
|
+
onResult?: (line: JudgementLine) => Promise<void> | void;
|
|
101
|
+
/** Replaces the local file system. */
|
|
102
|
+
files?: BatchFiles;
|
|
103
|
+
/**
|
|
104
|
+
* The catalog each judge's prompt budget is read from: the smallest context
|
|
105
|
+
* window across its `ai.model` and `ai.fallbacks`. Pi's built-in catalog
|
|
106
|
+
* without it; a model neither knows keeps the fixed budget.
|
|
107
|
+
*/
|
|
108
|
+
modelRegistry?: ModelRegistry;
|
|
109
|
+
}
|
|
110
|
+
export interface JudgesOutcome {
|
|
111
|
+
/** Every judgement, by judge and then in input order. */
|
|
112
|
+
results: JudgementLine[];
|
|
113
|
+
skipped: SkippedJudgement[];
|
|
114
|
+
/** True when a signal ended the run before every judgement ran. */
|
|
115
|
+
stopped: boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Run every judge over every conversation it applies to, as one batch, and
|
|
119
|
+
* return the judgements. A judge whose gate does not match a conversation is
|
|
120
|
+
* skipped, not graded; a judge that cannot reach a verdict records `error`,
|
|
121
|
+
* never `fail`.
|
|
122
|
+
*
|
|
123
|
+
* Each judge and conversation pair is one line of the batch: an LLM judge's
|
|
124
|
+
* line is a fresh session with the judge's `ai:` settings, and a classifier
|
|
125
|
+
* judge's line is one decision-model call. One conversation under many judges
|
|
126
|
+
* and many conversations under one judge are the same run, sharing the
|
|
127
|
+
* batch's pool, its rate-limit retries and its resume.
|
|
128
|
+
*/
|
|
129
|
+
export declare function runJudges(options: RunJudgesOptions): Promise<JudgesOutc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