akribes 0.21.17
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 +30 -0
- package/LICENSE +21 -0
- package/README.md +160 -0
- package/dist/client.d.ts +240 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +272 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +196 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +274 -0
- package/dist/errors.js.map +1 -0
- package/dist/execution/index.d.ts +3 -0
- package/dist/execution/index.d.ts.map +1 -0
- package/dist/execution/index.js +3 -0
- package/dist/execution/index.js.map +1 -0
- package/dist/execution/replay.d.ts +37 -0
- package/dist/execution/replay.d.ts.map +1 -0
- package/dist/execution/replay.js +59 -0
- package/dist/execution/replay.js.map +1 -0
- package/dist/execution/steps.d.ts +327 -0
- package/dist/execution/steps.d.ts.map +1 -0
- package/dist/execution/steps.js +1068 -0
- package/dist/execution/steps.js.map +1 -0
- package/dist/http.d.ts +53 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +141 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/runStream.d.ts +176 -0
- package/dist/runStream.d.ts.map +1 -0
- package/dist/runStream.js +408 -0
- package/dist/runStream.js.map +1 -0
- package/dist/sse.d.ts +46 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +218 -0
- package/dist/sse.js.map +1 -0
- package/dist/sub/bench.d.ts +182 -0
- package/dist/sub/bench.d.ts.map +1 -0
- package/dist/sub/bench.js +420 -0
- package/dist/sub/bench.js.map +1 -0
- package/dist/sub/channels.d.ts +22 -0
- package/dist/sub/channels.d.ts.map +1 -0
- package/dist/sub/channels.js +32 -0
- package/dist/sub/channels.js.map +1 -0
- package/dist/sub/clients.d.ts +79 -0
- package/dist/sub/clients.d.ts.map +1 -0
- package/dist/sub/clients.js +190 -0
- package/dist/sub/clients.js.map +1 -0
- package/dist/sub/documents.d.ts +113 -0
- package/dist/sub/documents.d.ts.map +1 -0
- package/dist/sub/documents.js +329 -0
- package/dist/sub/documents.js.map +1 -0
- package/dist/sub/evals.d.ts +71 -0
- package/dist/sub/evals.d.ts.map +1 -0
- package/dist/sub/evals.js +86 -0
- package/dist/sub/evals.js.map +1 -0
- package/dist/sub/events.d.ts +65 -0
- package/dist/sub/events.d.ts.map +1 -0
- package/dist/sub/events.js +154 -0
- package/dist/sub/events.js.map +1 -0
- package/dist/sub/executions.d.ts +255 -0
- package/dist/sub/executions.d.ts.map +1 -0
- package/dist/sub/executions.js +322 -0
- package/dist/sub/executions.js.map +1 -0
- package/dist/sub/mcp.d.ts +51 -0
- package/dist/sub/mcp.d.ts.map +1 -0
- package/dist/sub/mcp.js +42 -0
- package/dist/sub/mcp.js.map +1 -0
- package/dist/sub/projects.d.ts +73 -0
- package/dist/sub/projects.d.ts.map +1 -0
- package/dist/sub/projects.js +101 -0
- package/dist/sub/projects.js.map +1 -0
- package/dist/sub/scripts.d.ts +58 -0
- package/dist/sub/scripts.d.ts.map +1 -0
- package/dist/sub/scripts.js +82 -0
- package/dist/sub/scripts.js.map +1 -0
- package/dist/sub/tokens.d.ts +126 -0
- package/dist/sub/tokens.d.ts.map +1 -0
- package/dist/sub/tokens.js +105 -0
- package/dist/sub/tokens.js.map +1 -0
- package/dist/sub/versions.d.ts +29 -0
- package/dist/sub/versions.d.ts.map +1 -0
- package/dist/sub/versions.js +52 -0
- package/dist/sub/versions.js.map +1 -0
- package/dist/tokenSafety.d.ts +15 -0
- package/dist/tokenSafety.d.ts.map +1 -0
- package/dist/tokenSafety.js +24 -0
- package/dist/tokenSafety.js.map +1 -0
- package/dist/types.d.ts +1147 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +132 -0
- package/dist/types.js.map +1 -0
- package/dist/workflowEvents.d.ts +297 -0
- package/dist/workflowEvents.d.ts.map +1 -0
- package/dist/workflowEvents.js +612 -0
- package/dist/workflowEvents.js.map +1 -0
- package/package.json +57 -0
package/dist/sse.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/** Parse a complete SSE message block (lines between blank-line delimiters). */
|
|
2
|
+
export function parseSseMessage(block) {
|
|
3
|
+
let event = '';
|
|
4
|
+
let data = '';
|
|
5
|
+
let id;
|
|
6
|
+
for (const line of block.split('\n')) {
|
|
7
|
+
if (line.startsWith('data: ')) {
|
|
8
|
+
if (data)
|
|
9
|
+
data += '\n';
|
|
10
|
+
data += line.slice(6);
|
|
11
|
+
}
|
|
12
|
+
else if (line.startsWith('data:')) {
|
|
13
|
+
if (data)
|
|
14
|
+
data += '\n';
|
|
15
|
+
data += line.slice(5);
|
|
16
|
+
}
|
|
17
|
+
else if (line.startsWith('event: ')) {
|
|
18
|
+
event = line.slice(7);
|
|
19
|
+
}
|
|
20
|
+
else if (line.startsWith('event:')) {
|
|
21
|
+
event = line.slice(6);
|
|
22
|
+
}
|
|
23
|
+
else if (line.startsWith('id: ')) {
|
|
24
|
+
id = line.slice(4);
|
|
25
|
+
}
|
|
26
|
+
else if (line.startsWith('id:')) {
|
|
27
|
+
id = line.slice(3);
|
|
28
|
+
}
|
|
29
|
+
// retry: field is still ignored
|
|
30
|
+
}
|
|
31
|
+
if (!data)
|
|
32
|
+
return null;
|
|
33
|
+
return id !== undefined ? { event, data, id } : { event, data };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Open an SSE connection with proper message parsing and auto-reconnection.
|
|
37
|
+
* Uses EventSource when available, fetch-based ReadableStream otherwise.
|
|
38
|
+
*
|
|
39
|
+
* On reconnect the connector sends `Last-Event-ID: <lastSeenId>` per the
|
|
40
|
+
* SSE spec — the server-side replay layer can use it to resume from the
|
|
41
|
+
* gap. EventSource handles this natively; the fetch fallback wires it
|
|
42
|
+
* through the request headers.
|
|
43
|
+
*
|
|
44
|
+
* Returns a dispose function.
|
|
45
|
+
*/
|
|
46
|
+
export function connectSse(options) {
|
|
47
|
+
const { url, headers, onMessage, onError, onOpen, reconnect = true, reconnectDelayMs = 1000, reconnectMaxDelayMs = 30000, } = options;
|
|
48
|
+
// Merged abort controller: combines external signal + internal dispose
|
|
49
|
+
const internal = new AbortController();
|
|
50
|
+
const disposed = () => internal.signal.aborted || options.signal?.aborted;
|
|
51
|
+
const resolveUrl = async () => typeof url === 'function' ? await url() : url;
|
|
52
|
+
// `Last-Event-ID` tracking: every message with an `id:` line updates this
|
|
53
|
+
// cursor. On reconnect we replay it as the header so the server can backfill
|
|
54
|
+
// events emitted during the gap. The cursor is captured by every parser
|
|
55
|
+
// path (EventSource native + fetch-fallback parseSseMessage).
|
|
56
|
+
let lastEventId;
|
|
57
|
+
const wrappedOnMessage = (msg) => {
|
|
58
|
+
if (msg.id !== undefined)
|
|
59
|
+
lastEventId = msg.id;
|
|
60
|
+
onMessage(msg);
|
|
61
|
+
};
|
|
62
|
+
// Reconnect backoff state. Exponential with full jitter, base 1s, cap 30s
|
|
63
|
+
// (the SDK-wide canonical curve — see #1182).
|
|
64
|
+
let attempt = 0;
|
|
65
|
+
const nextDelay = () => {
|
|
66
|
+
attempt += 1;
|
|
67
|
+
const exp = Math.min(reconnectDelayMs * 2 ** (attempt - 1), reconnectMaxDelayMs);
|
|
68
|
+
return Math.random() * exp;
|
|
69
|
+
};
|
|
70
|
+
const resetBackoff = () => { attempt = 0; };
|
|
71
|
+
// EventSource cannot set custom request headers, so it is only useful
|
|
72
|
+
// when the caller authenticates via a URL-embedded credential (e.g.
|
|
73
|
+
// `?token=…`). When the caller has supplied an Authorization header,
|
|
74
|
+
// we deliberately skip EventSource and use the fetch-fallback instead:
|
|
75
|
+
// the header path keeps long-lived tokens out of reverse-proxy access
|
|
76
|
+
// logs and OTel `http.url` span attributes.
|
|
77
|
+
const hasAuthHeader = headers && (headers['Authorization'] || headers['authorization']);
|
|
78
|
+
if (typeof globalThis.EventSource !== 'undefined' && !hasAuthHeader) {
|
|
79
|
+
// EventSource has no public API for replacing the URL on reconnect, so
|
|
80
|
+
// when the URL is dynamic we fall back to a manual reconnect loop: tear
|
|
81
|
+
// down the current EventSource on error, build a fresh URL, and open a
|
|
82
|
+
// new one. EventSource's native reconnect also sends `Last-Event-ID`
|
|
83
|
+
// automatically — but only on the same instance, not after we tear it
|
|
84
|
+
// down and re-open. So we track + replay it explicitly.
|
|
85
|
+
let es = null;
|
|
86
|
+
let reconnecting = false;
|
|
87
|
+
const open = async () => {
|
|
88
|
+
if (disposed() || reconnecting)
|
|
89
|
+
return;
|
|
90
|
+
reconnecting = true;
|
|
91
|
+
try {
|
|
92
|
+
let resolved = await resolveUrl();
|
|
93
|
+
if (disposed())
|
|
94
|
+
return;
|
|
95
|
+
if (lastEventId !== undefined) {
|
|
96
|
+
// EventSource does not let callers set headers, so we encode the
|
|
97
|
+
// last-event-id in the query string for the fallback path on the
|
|
98
|
+
// server. Browsers that ALSO send the native `Last-Event-ID`
|
|
99
|
+
// header in this scenario are fine — the server reads whichever
|
|
100
|
+
// it finds first. (See server `sse.rs`.)
|
|
101
|
+
const u = new URL(resolved);
|
|
102
|
+
u.searchParams.set('last_event_id', lastEventId);
|
|
103
|
+
resolved = u.toString();
|
|
104
|
+
}
|
|
105
|
+
es = new EventSource(resolved);
|
|
106
|
+
es.onopen = () => { resetBackoff(); onOpen?.(); };
|
|
107
|
+
es.addEventListener('batch', (e) => {
|
|
108
|
+
wrappedOnMessage({ event: 'batch', data: e.data, id: e.lastEventId });
|
|
109
|
+
});
|
|
110
|
+
es.onmessage = (e) => {
|
|
111
|
+
wrappedOnMessage({ event: '', data: e.data, id: e.lastEventId });
|
|
112
|
+
};
|
|
113
|
+
es.onerror = () => {
|
|
114
|
+
if (disposed())
|
|
115
|
+
return;
|
|
116
|
+
onError?.(new Error('EventSource connection error'));
|
|
117
|
+
if (typeof url === 'function' && reconnect) {
|
|
118
|
+
try {
|
|
119
|
+
es?.close();
|
|
120
|
+
}
|
|
121
|
+
catch { /* ignore */ }
|
|
122
|
+
setTimeout(() => { if (!disposed())
|
|
123
|
+
open(); }, nextDelay());
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
reconnecting = false;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
open();
|
|
132
|
+
const dispose = () => { internal.abort(); if (es)
|
|
133
|
+
try {
|
|
134
|
+
es.close();
|
|
135
|
+
}
|
|
136
|
+
catch { /* ignore */ } };
|
|
137
|
+
options.signal?.addEventListener('abort', dispose, { once: true });
|
|
138
|
+
return dispose;
|
|
139
|
+
}
|
|
140
|
+
// Fetch-based fallback with reconnection
|
|
141
|
+
const run = async () => {
|
|
142
|
+
while (!disposed()) {
|
|
143
|
+
try {
|
|
144
|
+
const resolved = await resolveUrl();
|
|
145
|
+
if (disposed())
|
|
146
|
+
return;
|
|
147
|
+
const reqHeaders = { 'Accept': 'text/event-stream', ...headers };
|
|
148
|
+
if (lastEventId !== undefined) {
|
|
149
|
+
reqHeaders['Last-Event-ID'] = lastEventId;
|
|
150
|
+
}
|
|
151
|
+
const res = await fetch(resolved, {
|
|
152
|
+
headers: reqHeaders,
|
|
153
|
+
signal: internal.signal,
|
|
154
|
+
});
|
|
155
|
+
if (!res.ok || !res.body)
|
|
156
|
+
return;
|
|
157
|
+
// Subscribe-before-POST hand-off: the server has accepted the GET
|
|
158
|
+
// (and thus attached its broadcast subscriber) the moment fetch
|
|
159
|
+
// resolves with a 2xx response and a body. Fire `onOpen` before
|
|
160
|
+
// we start parsing so callers waiting on the ready signal can
|
|
161
|
+
// proceed to issue their dependent POST.
|
|
162
|
+
resetBackoff();
|
|
163
|
+
onOpen?.();
|
|
164
|
+
const reader = res.body.getReader();
|
|
165
|
+
const decoder = new TextDecoder();
|
|
166
|
+
let buf = '';
|
|
167
|
+
while (!disposed()) {
|
|
168
|
+
const { value, done } = await reader.read();
|
|
169
|
+
if (done)
|
|
170
|
+
break;
|
|
171
|
+
buf += decoder.decode(value, { stream: true });
|
|
172
|
+
// Process complete SSE messages delimited by blank lines.
|
|
173
|
+
// Per the SSE spec, \n\n, \r\n\r\n, and \r\r are all valid
|
|
174
|
+
// separators — servers or intermediaries may emit any of them.
|
|
175
|
+
while (true) {
|
|
176
|
+
const split = findSseDelimiter(buf);
|
|
177
|
+
if (!split)
|
|
178
|
+
break;
|
|
179
|
+
const block = buf.slice(0, split.pos);
|
|
180
|
+
buf = buf.slice(split.pos + split.len);
|
|
181
|
+
const msg = parseSseMessage(block);
|
|
182
|
+
if (msg)
|
|
183
|
+
wrappedOnMessage(msg);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
if (disposed() || (e instanceof Error && e.name === 'AbortError'))
|
|
189
|
+
return;
|
|
190
|
+
onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
191
|
+
}
|
|
192
|
+
if (!reconnect || disposed())
|
|
193
|
+
return;
|
|
194
|
+
await new Promise(r => setTimeout(r, nextDelay()));
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
run();
|
|
198
|
+
options.signal?.addEventListener('abort', () => internal.abort(), { once: true });
|
|
199
|
+
return () => internal.abort();
|
|
200
|
+
}
|
|
201
|
+
/** Find the earliest SSE message delimiter in `buf`. Returns its position
|
|
202
|
+
* and length, or `null` if no complete delimiter is present yet. */
|
|
203
|
+
function findSseDelimiter(buf) {
|
|
204
|
+
const delimiters = [
|
|
205
|
+
['\r\n\r\n', 4],
|
|
206
|
+
['\n\n', 2],
|
|
207
|
+
['\r\r', 2],
|
|
208
|
+
];
|
|
209
|
+
let best = null;
|
|
210
|
+
for (const [d, len] of delimiters) {
|
|
211
|
+
const pos = buf.indexOf(d);
|
|
212
|
+
if (pos !== -1 && (best === null || pos < best.pos)) {
|
|
213
|
+
best = { pos, len };
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return best;
|
|
217
|
+
}
|
|
218
|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C,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;IACH,CAAC,CAAC;IAEF,GAAG,EAAE,CAAC;IACN,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC;AAED;qEACqE;AACrE,SAAS,gBAAgB,CAAC,GAAW;IACnC,MAAM,UAAU,GAA4B;QAC1C,CAAC,UAAU,EAAE,CAAC,CAAC;QACf,CAAC,MAAM,EAAE,CAAC,CAAC;QACX,CAAC,MAAM,EAAE,CAAC,CAAC;KACZ,CAAC;IACF,IAAI,IAAI,GAAwC,IAAI,CAAC;IACrD,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,UAAU,EAAE,CAAC;QAClC,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACpD,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sub-client for the akribes-server bench substrate.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `crates/akribes-sdk-rust/src/sub/bench.rs`. Two surfaces glued onto
|
|
5
|
+
* one TypeScript class for ergonomic Studio consumption:
|
|
6
|
+
*
|
|
7
|
+
* - Project-scoped operations live under
|
|
8
|
+
* `/projects/{id}/scripts/{name}/bench/...`. The `projectId` is captured
|
|
9
|
+
* at construction (`new AkribesClient({ projectId })`) and the script
|
|
10
|
+
* name is the first argument to each method.
|
|
11
|
+
* - Run-scoped + case-id-keyed operations live under `/bench-runs/{id}/...`
|
|
12
|
+
* and `/cases/{id}` and aren't tied to a project (the server resolves
|
|
13
|
+
* the owning project from the row). These are exposed on the same class
|
|
14
|
+
* so studios don't juggle two client instances.
|
|
15
|
+
*
|
|
16
|
+
* Typed errors:
|
|
17
|
+
* - 404 with a `{"error": ...}` body → `AkribesNotFoundError`.
|
|
18
|
+
* - 400 `{"error": "case_type_mismatch", "field_errors": [...]}` →
|
|
19
|
+
* `CaseTypeMismatchError`.
|
|
20
|
+
* - 400 with a `Judge contract mismatch: ...` prefix → `JudgeContractError`
|
|
21
|
+
* (with the trailing `breaks` list parsed when present).
|
|
22
|
+
* - 409 with `error_type: "..._already_exists"` → `AkribesAlreadyExistsError`
|
|
23
|
+
* (handled by the shared `fetchOk`).
|
|
24
|
+
* - All other 4xx/5xx → `AkribesHttpError`.
|
|
25
|
+
*/
|
|
26
|
+
import type { HttpClient } from '../http';
|
|
27
|
+
import type { Bench, BenchCase, BenchResult, BenchRun, BenchRunEventsPage, BenchRunTagSessionResponse, CompareReport, ContractPreview, CreateBenchCaseRequest, CreateOrUpdateBenchRequest, DriftReport, PatchBenchCaseRequest, ProjectBenchSummary, PromoteExecutionRequest, ScriptSignature, TriggerBenchRunRequest } from '../types';
|
|
28
|
+
export declare class BenchClient {
|
|
29
|
+
private http;
|
|
30
|
+
private projectId;
|
|
31
|
+
constructor(http: HttpClient, projectId: number);
|
|
32
|
+
private benchPath;
|
|
33
|
+
private scriptOnlyPath;
|
|
34
|
+
private runUrl;
|
|
35
|
+
private caseUrl;
|
|
36
|
+
/** `GET /projects/{id}/scripts/{name}/bench` — 404 → `null`. Other 4xx/5xx
|
|
37
|
+
* surface via {@link AkribesHttpError}. */
|
|
38
|
+
get(scriptName: string, opts?: {
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}): Promise<Bench | null>;
|
|
41
|
+
/** `POST /projects/{id}/scripts/{name}/bench` — create or update. The
|
|
42
|
+
* server upserts on `(script_id)`, so this is idempotent w.r.t. an
|
|
43
|
+
* existing bench config. */
|
|
44
|
+
save(scriptName: string, req: CreateOrUpdateBenchRequest, opts?: {
|
|
45
|
+
signal?: AbortSignal;
|
|
46
|
+
}): Promise<Bench>;
|
|
47
|
+
/** `DELETE /projects/{id}/scripts/{name}/bench`. The server emits a
|
|
48
|
+
* `{"deleted": true}` body either way; we discard it. */
|
|
49
|
+
delete(scriptName: string, opts?: {
|
|
50
|
+
signal?: AbortSignal;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
/** `GET /projects/{id}/benches` — one row per script with a bench
|
|
53
|
+
* configured, joined with the latest run's summary. Backs the project-
|
|
54
|
+
* level evals landing page. */
|
|
55
|
+
listProjectSummaries(opts?: {
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
}): Promise<ProjectBenchSummary[]>;
|
|
58
|
+
/** `GET /projects/{id}/scripts/{name}/signature` — parsed script inputs +
|
|
59
|
+
* outputs + named type defs. Used by the case-builder modal. */
|
|
60
|
+
getSignature(scriptName: string, opts?: {
|
|
61
|
+
signal?: AbortSignal;
|
|
62
|
+
}): Promise<ScriptSignature>;
|
|
63
|
+
/** `GET /projects/{id}/scripts/{name}/bench/contract-preview` — workflow
|
|
64
|
+
* + judge signature pair plus the structured `breaks` list. Used by the
|
|
65
|
+
* judge-picker UI to surface incompatibilities before a save. */
|
|
66
|
+
contractPreview(scriptName: string, args: {
|
|
67
|
+
judgeScriptId: number;
|
|
68
|
+
channel?: string;
|
|
69
|
+
}, opts?: {
|
|
70
|
+
signal?: AbortSignal;
|
|
71
|
+
}): Promise<ContractPreview>;
|
|
72
|
+
/** `GET /projects/{id}/scripts/{name}/bench/cases`. 404 (no bench
|
|
73
|
+
* configured) → empty list. */
|
|
74
|
+
listCases(scriptName: string, opts?: {
|
|
75
|
+
signal?: AbortSignal;
|
|
76
|
+
}): Promise<BenchCase[]>;
|
|
77
|
+
/** `POST /projects/{id}/scripts/{name}/bench/cases` — form-builder create.
|
|
78
|
+
* Throws {@link CaseTypeMismatchError} on a 400 `case_type_mismatch`
|
|
79
|
+
* envelope so form layers can surface per-field violations. */
|
|
80
|
+
createCase(scriptName: string, req: CreateBenchCaseRequest, opts?: {
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}): Promise<BenchCase>;
|
|
83
|
+
/** `GET /projects/{id}/scripts/{name}/bench/cases/contract-drift`. Returns
|
|
84
|
+
* an empty drift report when the endpoint 404s (script never published). */
|
|
85
|
+
caseContractDrift(scriptName: string, opts?: {
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}): Promise<DriftReport>;
|
|
88
|
+
/** `PATCH /cases/{id}` — sparse update. */
|
|
89
|
+
patchCase(caseId: string, req: PatchBenchCaseRequest, opts?: {
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
}): Promise<BenchCase>;
|
|
92
|
+
/** `DELETE /cases/{id}`. The server emits `{"deleted": true}`; we discard
|
|
93
|
+
* it for an idiomatic `void` return. */
|
|
94
|
+
deleteCase(caseId: string, opts?: {
|
|
95
|
+
signal?: AbortSignal;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
/** `POST /executions/{exec_id}/promote-to-case` — promote a completed
|
|
98
|
+
* execution into a bench case, with an optional `edits` overlay. Lives
|
|
99
|
+
* on `/executions` rather than `/bench-runs` but is the natural
|
|
100
|
+
* counterpart to the case-builder flow, so it lives on this client. */
|
|
101
|
+
promoteExecution(executionId: string, req?: PromoteExecutionRequest, opts?: {
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
}): Promise<BenchCase>;
|
|
104
|
+
/** `GET /projects/{id}/scripts/{name}/bench/runs` — paginated via
|
|
105
|
+
* `limit` / `offset`. 404 → empty list. */
|
|
106
|
+
listRuns(scriptName: string, params?: {
|
|
107
|
+
limit?: number;
|
|
108
|
+
offset?: number;
|
|
109
|
+
}, opts?: {
|
|
110
|
+
signal?: AbortSignal;
|
|
111
|
+
}): Promise<BenchRun[]>;
|
|
112
|
+
/** `POST /projects/{id}/scripts/{name}/bench/runs` — trigger a run.
|
|
113
|
+
* `case_ids` constrains the fan-out to a subset. Throws
|
|
114
|
+
* {@link JudgeContractError} on the contract pre-flight 400. */
|
|
115
|
+
triggerRun(scriptName: string, req: TriggerBenchRunRequest, opts?: {
|
|
116
|
+
signal?: AbortSignal;
|
|
117
|
+
}): Promise<BenchRun>;
|
|
118
|
+
/** `GET /bench-runs/{id}` — 404 → `null`. */
|
|
119
|
+
getRun(runId: number, opts?: {
|
|
120
|
+
signal?: AbortSignal;
|
|
121
|
+
}): Promise<BenchRun | null>;
|
|
122
|
+
/** `DELETE /bench-runs/{id}`. Cancels first (best-effort) before
|
|
123
|
+
* dropping. The server emits a JSON receipt; we discard it. */
|
|
124
|
+
deleteRun(runId: number, opts?: {
|
|
125
|
+
signal?: AbortSignal;
|
|
126
|
+
}): Promise<void>;
|
|
127
|
+
/** `GET /bench-runs/{id}/results`. 404 → empty list. */
|
|
128
|
+
listResults(runId: number, opts?: {
|
|
129
|
+
signal?: AbortSignal;
|
|
130
|
+
}): Promise<BenchResult[]>;
|
|
131
|
+
/** `POST /bench-runs/{id}/cancel`. Flips the cancel token; in-flight cases
|
|
132
|
+
* complete naturally. Returns the run row as it stands. */
|
|
133
|
+
cancelRun(runId: number, opts?: {
|
|
134
|
+
signal?: AbortSignal;
|
|
135
|
+
}): Promise<BenchRun>;
|
|
136
|
+
/** `GET /bench-runs/{a}/compare/{b}` — diff two runs of the same bench. */
|
|
137
|
+
compareRuns(runA: number, runB: number, opts?: {
|
|
138
|
+
signal?: AbortSignal;
|
|
139
|
+
}): Promise<CompareReport>;
|
|
140
|
+
/** `GET /bench-runs/{id}/events?after_id=N` — JSON-page form of the
|
|
141
|
+
* bench-run event stream. Use for MCP-style polling; for live UI prefer
|
|
142
|
+
* {@link BenchClient.subscribeRunEvents}. */
|
|
143
|
+
runEvents(runId: number, params?: {
|
|
144
|
+
afterId?: number;
|
|
145
|
+
}, opts?: {
|
|
146
|
+
signal?: AbortSignal;
|
|
147
|
+
}): Promise<BenchRunEventsPage>;
|
|
148
|
+
/** `PATCH /bench-runs/{id}/tag-session` — attribute the run to an MCP
|
|
149
|
+
* session id so the coordinator's finalize step writes the cost into
|
|
150
|
+
* `mcp_session_cost`. */
|
|
151
|
+
tagSession(runId: number, mcpSessionId: string, opts?: {
|
|
152
|
+
signal?: AbortSignal;
|
|
153
|
+
}): Promise<BenchRunTagSessionResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Subscribe to a bench run's live result stream via SSE.
|
|
156
|
+
*
|
|
157
|
+
* The server emits two event types on `/bench-runs/{id}/events`:
|
|
158
|
+
* - `result` — a new {@link BenchResult} row.
|
|
159
|
+
* - `lagged` — broadcast-stream lag report (`{ dropped: N }`).
|
|
160
|
+
*
|
|
161
|
+
* Built on the shared {@link connectSse} helper, which uses
|
|
162
|
+
* {@link EventSource} in browsers and a fetch-based reader in Node / Bun.
|
|
163
|
+
* Auth rides on the Authorization header from the SDK's `HttpClient`.
|
|
164
|
+
* Older revisions also appended `opts.token` to the URL as a `?token=`
|
|
165
|
+
* fallback so EventSource (which can't set headers) would authenticate;
|
|
166
|
+
* that leaked long-lived service-token secrets into reverse-proxy
|
|
167
|
+
* access logs. `sse.ts` now skips EventSource whenever an Authorization
|
|
168
|
+
* header is present and uses the fetch-fallback path instead — so the
|
|
169
|
+
* `opts.token` URL fallback is no longer needed. `opts.token` is kept
|
|
170
|
+
* on the API for now (a no-op) to avoid breaking compiled callers.
|
|
171
|
+
* Returns an unsubscribe function.
|
|
172
|
+
*/
|
|
173
|
+
subscribeRunEvents(runId: number, handlers: {
|
|
174
|
+
onResult?: (result: BenchResult) => void;
|
|
175
|
+
onLagged?: (dropped: number) => void;
|
|
176
|
+
onError?: (error: Error) => void;
|
|
177
|
+
}, opts?: {
|
|
178
|
+
token?: string;
|
|
179
|
+
signal?: AbortSignal;
|
|
180
|
+
}): () => void;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=bench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bench.d.ts","sourceRoot":"","sources":["../../src/sub/bench.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAS1C,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,0BAA0B,EAC1B,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAsGlB,qBAAa,WAAW;IAEpB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,SAAS;gBADT,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,MAAM;IAK3B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,OAAO;IAMf;gDAC4C;IACtC,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IASrF;;iCAE6B;IACvB,IAAI,CACR,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,0BAA0B,EAC/B,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAC9B,OAAO,CAAC,KAAK,CAAC;IASjB;8DAC0D;IACpD,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;I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