@ouispec/agent-evals 0.20.1 → 0.22.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/README.md +7 -4
- package/dist/cassettes.d.ts +6 -0
- package/dist/cassettes.d.ts.map +1 -1
- package/dist/cassettes.js +8 -2
- package/dist/cassettes.js.map +1 -1
- package/dist/cli.js +9 -8
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +30 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +14 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/judge.d.ts +30 -4
- package/dist/judge.d.ts.map +1 -1
- package/dist/judge.js +65 -14
- package/dist/judge.js.map +1 -1
- package/dist/memory.d.ts +81 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +32 -2
- package/dist/memory.js.map +1 -1
- package/dist/page.d.ts +56 -0
- package/dist/page.d.ts.map +1 -0
- package/dist/page.js +526 -0
- package/dist/page.js.map +1 -0
- package/dist/report.d.ts +10 -2
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +23 -15
- package/dist/report.js.map +1 -1
- package/dist/run.d.ts +45 -5
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +240 -47
- package/dist/run.js.map +1 -1
- package/dist/suite.d.ts.map +1 -1
- package/dist/suite.js +37 -1
- package/dist/suite.js.map +1 -1
- package/dist/usage.d.ts +29 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +65 -0
- package/dist/usage.js.map +1 -0
- package/package.json +6 -4
package/dist/page.js
ADDED
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The person's page, scripted: a fixture surface runtime that answers the
|
|
3
|
+
* agent's page actions as the person's tab would.
|
|
4
|
+
*
|
|
5
|
+
* It is a real oui-spec surface runtime in index form, the tab's own, run in
|
|
6
|
+
* the process. Its surfaces are the suite's (`page.surfaces`), or the
|
|
7
|
+
* product's own: the controls of its generated manifest, registered with a
|
|
8
|
+
* real binding registry and connected with `connectBindings`, as the product's
|
|
9
|
+
* tab does, so the agent is offered exactly the actions, inputs and page state
|
|
10
|
+
* the product's build declares. A router in memory holds where the page is.
|
|
11
|
+
* Going to a page (`app.navigate`) is the bindings' own navigation surface,
|
|
12
|
+
* the manifest's or, with none, one made from the fixture's routes, so an
|
|
13
|
+
* address is checked as the product's runtime checks it; it mounts what is
|
|
14
|
+
* there and unmounts what is not, and each turn is sent from wherever the
|
|
15
|
+
* page then is.
|
|
16
|
+
*
|
|
17
|
+
* What the page shows and what its actions do is the fixture's. Nothing it
|
|
18
|
+
* runs reaches the product: an action records that it ran, answers as the
|
|
19
|
+
* fixture says, and changes what the fixture says it changes.
|
|
20
|
+
*
|
|
21
|
+
* What a page shows that is not a control (its displays' facts, `shown`) and
|
|
22
|
+
* the problems it shows are the fixture's too, registered with the binding
|
|
23
|
+
* registry as the product's displays and page areas register them, so the
|
|
24
|
+
* page state carries them in the runtime's own shape. A control bound to a
|
|
25
|
+
* query parameter (`query`) shows the address's value, read with the page's
|
|
26
|
+
* declared query (`readQuery`), and writes the value it is given back to the
|
|
27
|
+
* address (`writeQuery`), as a page that keeps its filters in its address does.
|
|
28
|
+
*/
|
|
29
|
+
import { createSurfaceRuntime, defineSurface } from 'oui-spec/core';
|
|
30
|
+
import { createBindingRegistry, generatedNavigationSurface, isRoutePath, NAVIGATE_ACTION_ID, NAVIGATION_SURFACE_ID, navigationQueries, pageQueryOf, PROBLEMS_OBSERVATION_ID, PROBLEMS_SCHEMA, readQuery, resolveKnowledge, SHOWN_ROWS, toolName, writeQuery, } from '@ouispec/bindings';
|
|
31
|
+
import { connectBindings, PAGE_STATE_OBSERVATION_ID } from '@ouispec/bindings/oui';
|
|
32
|
+
import { CLIENT_KNOWLEDGE_KEY, CLIENT_SNAPSHOT_KEY } from '@ouispec/agent-worker';
|
|
33
|
+
import { holdsSubset } from './matchers.js';
|
|
34
|
+
/** A fixture that cannot be built, with every reason. */
|
|
35
|
+
export class EvalPageError extends Error {
|
|
36
|
+
problems;
|
|
37
|
+
constructor(problems) {
|
|
38
|
+
super(`the page cannot be built:\n${problems.map((p) => ` - ${p}`).join('\n')}`);
|
|
39
|
+
this.problems = problems;
|
|
40
|
+
this.name = 'EvalPageError';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const NOTHING = { type: 'object', properties: {}, additionalProperties: false };
|
|
44
|
+
const pathOf = (address) => address.split(/[?#]/)[0].replace(/\/+$/, '') || '/';
|
|
45
|
+
/** An address's query string, without its `?`. */
|
|
46
|
+
const searchOf = (address) => {
|
|
47
|
+
const beforeHash = address.split('#')[0];
|
|
48
|
+
const at = beforeHash.indexOf('?');
|
|
49
|
+
return at === -1 ? '' : beforeHash.slice(at + 1);
|
|
50
|
+
};
|
|
51
|
+
/** The address with this query string in place of its own, its path and fragment kept. */
|
|
52
|
+
const withSearch = (address, search) => {
|
|
53
|
+
const hashAt = address.indexOf('#');
|
|
54
|
+
const hash = hashAt === -1 ? '' : address.slice(hashAt);
|
|
55
|
+
return `${address.split(/[?#]/)[0]}${search ? `?${search}` : ''}${hash}`;
|
|
56
|
+
};
|
|
57
|
+
/** The schema of a declared surface's `state` when it shows facts: `shown`, indexed as a generated page's is. */
|
|
58
|
+
const SHOWN_STATE_SCHEMA = {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
shown: {
|
|
62
|
+
type: 'array',
|
|
63
|
+
description: 'What the page shows that is not an action, by display: its id, heading and facts, each as text by its label',
|
|
64
|
+
items: { type: 'object' },
|
|
65
|
+
'x-rows': { ...SHOWN_ROWS, index: [...SHOWN_ROWS.index] },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
/** A display's entry as the page state reports it (`useAgentFacts`): each fact as text, an empty one left out. */
|
|
70
|
+
function shownFacts(entry, title) {
|
|
71
|
+
const facts = {};
|
|
72
|
+
for (const [label, value] of Object.entries(entry.facts)) {
|
|
73
|
+
const text = String(value);
|
|
74
|
+
if (text !== '')
|
|
75
|
+
facts[label] = text;
|
|
76
|
+
}
|
|
77
|
+
return { id: entry.id, title, facts, ...(entry.item ? { item: { ...entry.item } } : {}) };
|
|
78
|
+
}
|
|
79
|
+
/** What a call does: the first case whose `when` its input holds, else the action's own defaults. */
|
|
80
|
+
function outcomeOf(declared, input) {
|
|
81
|
+
const hit = declared.cases?.find((c) => c.when === undefined || holdsSubset(input, c.when));
|
|
82
|
+
return hit ?? declared;
|
|
83
|
+
}
|
|
84
|
+
const handlerResult = (result) => !result || result.success
|
|
85
|
+
? { success: true, ...(result?.data !== undefined ? { data: result.data } : {}) }
|
|
86
|
+
: { success: false, error: { code: 'FAILED', message: result.error ?? 'It failed.' }, ...(result.data !== undefined ? { data: result.data } : {}) };
|
|
87
|
+
/** The manifest's surfaces mounted at `path`: every one whose routes match (a shell's, with none, everywhere), and of the pages only the router's pick. */
|
|
88
|
+
function manifestSurfacesAt(manifest, path) {
|
|
89
|
+
const matching = manifest.surfaces.filter((s) => s.kind !== 'navigation' && (s.routes.length === 0 ? s.kind !== 'page' : isRoutePath(s.routes, path)));
|
|
90
|
+
const pages = matching.filter((s) => s.kind === 'page');
|
|
91
|
+
// A page whose route is the address itself wins over one whose route only matches it (`/dashboard/:tab`).
|
|
92
|
+
const exact = pages.filter((s) => s.routes.some((r) => pathOf(r) === pathOf(path)));
|
|
93
|
+
const page = exact.length > 0 ? exact : pages.slice(0, 1);
|
|
94
|
+
return matching.filter((s) => s.kind !== 'page' || page.includes(s));
|
|
95
|
+
}
|
|
96
|
+
/** The query the page at `address` declares: its own route's, an exact route before one that only matches it. */
|
|
97
|
+
function queryAt(queries, address) {
|
|
98
|
+
const path = pathOf(address);
|
|
99
|
+
const exact = queries.find((q) => q.routes.some((r) => pathOf(r) === path));
|
|
100
|
+
return (exact ?? queries.find((q) => isRoutePath(q.routes, path)))?.declaration ?? null;
|
|
101
|
+
}
|
|
102
|
+
/** Whether the address holds each parameter: as the page's declaration reads it (its default included), else as written. */
|
|
103
|
+
function holdsQuery(want, address, declaration) {
|
|
104
|
+
if (!want)
|
|
105
|
+
return true;
|
|
106
|
+
const search = searchOf(address);
|
|
107
|
+
const read = declaration ? readQuery(declaration, search) : null;
|
|
108
|
+
const written = new URLSearchParams(search);
|
|
109
|
+
return Object.entries(want).every(([name, expected]) => {
|
|
110
|
+
const got = read && name in declaration ? read[name] : (written.get(name) ?? undefined);
|
|
111
|
+
const text = Array.isArray(got) ? got.join(',') : got === undefined || got === null ? undefined : String(got);
|
|
112
|
+
return text === String(expected);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Build the page a fixture declares, on a real oui-spec runtime in index form.
|
|
117
|
+
* Throws an `EvalPageError` naming every problem: a control the manifest does
|
|
118
|
+
* not declare, `controls` with no manifest, two surfaces with one id, a
|
|
119
|
+
* display the manifest does not record, a control bound to a query parameter
|
|
120
|
+
* no page declares.
|
|
121
|
+
*/
|
|
122
|
+
export function createFixturePage(fixture, source = {}) {
|
|
123
|
+
const { manifest, knowledge } = source;
|
|
124
|
+
const problems = [];
|
|
125
|
+
if (fixture.controls && !manifest)
|
|
126
|
+
problems.push('`controls` names the product’s controls, and the configuration gives no manifest (`page.manifest`)');
|
|
127
|
+
if (fixture.shown && !manifest)
|
|
128
|
+
problems.push('`shown` is what the product’s pages show, and the configuration gives no manifest (`page.manifest`): a declared surface shows its own (`surfaces[].shown`)');
|
|
129
|
+
const controlActions = new Map();
|
|
130
|
+
for (const surface of manifest?.surfaces ?? []) {
|
|
131
|
+
for (const action of surface.actions)
|
|
132
|
+
if (action.source === 'control')
|
|
133
|
+
controlActions.set(action.id, { surface, action });
|
|
134
|
+
}
|
|
135
|
+
if (manifest) {
|
|
136
|
+
for (const id of Object.keys(fixture.controls ?? {})) {
|
|
137
|
+
if (!controlActions.has(id))
|
|
138
|
+
problems.push(`the manifest declares no control "${id}"`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
const surfaceIds = new Set();
|
|
142
|
+
for (const s of fixture.surfaces ?? []) {
|
|
143
|
+
if (surfaceIds.has(s.id))
|
|
144
|
+
problems.push(`two surfaces are "${s.id}"`);
|
|
145
|
+
surfaceIds.add(s.id);
|
|
146
|
+
if (manifest?.surfaces.some((m) => m.id === s.id))
|
|
147
|
+
problems.push(`the surface "${s.id}" is also one of the manifest’s`);
|
|
148
|
+
}
|
|
149
|
+
// The displays the manifest records (a manifest generated before 0.10 records none, and is not held to it).
|
|
150
|
+
const displays = new Map();
|
|
151
|
+
for (const surface of manifest?.surfaces ?? []) {
|
|
152
|
+
for (const display of surface.displays ?? []) {
|
|
153
|
+
const known = displays.get(display.id) ?? { title: display.title, surfaces: new Set() };
|
|
154
|
+
known.surfaces.add(surface.id);
|
|
155
|
+
displays.set(display.id, known);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (displays.size > 0) {
|
|
159
|
+
for (const id of new Set((fixture.shown ?? []).map((e) => e.id))) {
|
|
160
|
+
if (!displays.has(id))
|
|
161
|
+
problems.push(`the manifest records no display "${id}"`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const titleOf = (entry) => entry.title ?? displays.get(entry.id)?.title ?? entry.id;
|
|
165
|
+
// ─── Where the page can go ─────────────────────────────────────────────────
|
|
166
|
+
const manifestNavigation = manifest?.surfaces.find((s) => s.id === NAVIGATION_SURFACE_ID && s.kind === 'navigation');
|
|
167
|
+
const routes = [
|
|
168
|
+
...new Set([
|
|
169
|
+
...(fixture.routes ?? []),
|
|
170
|
+
...(fixture.surfaces ?? []).flatMap((s) => s.routes ?? []),
|
|
171
|
+
...(manifestNavigation?.routes ?? []),
|
|
172
|
+
...(manifest?.surfaces ?? []).filter((s) => s.kind === 'page').flatMap((s) => s.routes),
|
|
173
|
+
pathOf(fixture.at),
|
|
174
|
+
]),
|
|
175
|
+
];
|
|
176
|
+
const offersNavigation = fixture.navigation !== false;
|
|
177
|
+
// With no manifest, or one that declares no navigation, going to a page is
|
|
178
|
+
// the surface the generator would make from these routes.
|
|
179
|
+
const routeTitle = (route) => manifest?.surfaces.find((s) => s.kind === 'page' && s.routes.includes(route))?.title ??
|
|
180
|
+
fixture.surfaces?.find((s) => s.routes?.includes(route))?.name ??
|
|
181
|
+
route;
|
|
182
|
+
const navigationSurface = manifestNavigation ?? (offersNavigation ? generatedNavigationSurface(routes.map((path) => ({ path, title: routeTitle(path) }))) : null);
|
|
183
|
+
// The query each page declares, where the generator records it.
|
|
184
|
+
const navigateInput = navigationSurface?.actions.find((a) => a.id === NAVIGATE_ACTION_ID)?.input;
|
|
185
|
+
const queries = navigationQueries(navigateInput).map((q) => ({ routes: q.routes, declaration: pageQueryOf(q.schema) }));
|
|
186
|
+
for (const [id, spec] of Object.entries(fixture.controls ?? {})) {
|
|
187
|
+
if (!spec.query)
|
|
188
|
+
continue;
|
|
189
|
+
if (spec.rows)
|
|
190
|
+
problems.push(`the control "${id}" is a list’s, one per row, and follows no query parameter (?${spec.query})`);
|
|
191
|
+
else if (!queries.some((q) => spec.query in q.declaration)) {
|
|
192
|
+
problems.push(`the control "${id}" follows ?${spec.query}, and no page’s query takes it (the manifest’s ${NAVIGATE_ACTION_ID} declares ${queries.length ? queries.flatMap((q) => Object.keys(q.declaration).map((n) => `?${n}`)).join(', ') : 'none'})`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (problems.length > 0)
|
|
196
|
+
throw new EvalPageError(problems);
|
|
197
|
+
const runtime = createSurfaceRuntime({ form: 'index', announce: false, settle: { quietMs: 5, timeoutMs: 500 } });
|
|
198
|
+
const ran = [];
|
|
199
|
+
const requests = [];
|
|
200
|
+
let location = fixture.at;
|
|
201
|
+
const listeners = new Set();
|
|
202
|
+
const go = (path) => {
|
|
203
|
+
location = path;
|
|
204
|
+
remount();
|
|
205
|
+
for (const listener of [...listeners])
|
|
206
|
+
listener();
|
|
207
|
+
};
|
|
208
|
+
const navigation = {
|
|
209
|
+
navigate: (path) => {
|
|
210
|
+
ran.push({ action: toolName(NAVIGATE_ACTION_ID), id: NAVIGATE_ACTION_ID, surface: NAVIGATION_SURFACE_ID, input: { path }, at: location });
|
|
211
|
+
go(path);
|
|
212
|
+
},
|
|
213
|
+
location: () => location,
|
|
214
|
+
subscribe: (listener) => {
|
|
215
|
+
listeners.add(listener);
|
|
216
|
+
return () => listeners.delete(listener);
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
// ─── The product's controls, and going to a page, as its tab connects them ──
|
|
220
|
+
const connected = {
|
|
221
|
+
...(manifest ?? { version: 1, buildId: 'agent-evals' }),
|
|
222
|
+
surfaces: [...(manifest?.surfaces ?? []), ...(navigationSurface && !manifestNavigation ? [navigationSurface] : [])],
|
|
223
|
+
};
|
|
224
|
+
const registry = createBindingRegistry();
|
|
225
|
+
const disconnect = connectBindings({ registry, runtime, manifest: connected, ...(offersNavigation ? { navigation } : {}) });
|
|
226
|
+
/** A control's value as the page last showed it, kept while the page is elsewhere, as an app's state is. */
|
|
227
|
+
const values = new Map();
|
|
228
|
+
const registered = new Map();
|
|
229
|
+
/**
|
|
230
|
+
* A control bound to a query parameter the page here declares: its value
|
|
231
|
+
* as the address holds it, read as the declaration reads it (`value` when
|
|
232
|
+
* the address leaves it out and the declaration has no default). Null when
|
|
233
|
+
* the control follows no parameter of this page's.
|
|
234
|
+
*/
|
|
235
|
+
const fromAddress = (spec) => {
|
|
236
|
+
if (!spec.query || spec.rows)
|
|
237
|
+
return null;
|
|
238
|
+
const declaration = queryAt(queries, location);
|
|
239
|
+
if (!declaration || !(spec.query in declaration))
|
|
240
|
+
return null;
|
|
241
|
+
const read = readQuery(declaration, searchOf(location))[spec.query];
|
|
242
|
+
return { declaration, value: read === undefined ? spec.value : read };
|
|
243
|
+
};
|
|
244
|
+
const registerControl = (id, spec) => {
|
|
245
|
+
const { surface, action } = controlActions.get(id);
|
|
246
|
+
const declaredValue = action.input.properties?.value ?? null;
|
|
247
|
+
const handles = [];
|
|
248
|
+
const register = (row) => {
|
|
249
|
+
const key = row ? `${id}#${row.key}` : id;
|
|
250
|
+
const bound = row ? null : fromAddress(spec);
|
|
251
|
+
const value = bound ? bound.value : values.has(key) ? values.get(key) : row ? row.value : spec.value;
|
|
252
|
+
const handle = registry.registerControl({
|
|
253
|
+
id,
|
|
254
|
+
kind: action.control,
|
|
255
|
+
title: spec.title ?? action.title,
|
|
256
|
+
valueSchema: spec.valueSchema ?? declaredValue,
|
|
257
|
+
...(value !== undefined ? { value } : {}),
|
|
258
|
+
...(spec.disabled ? { disabled: true } : {}),
|
|
259
|
+
...(row ? { item: { key: row.key, title: row.title, ...(row.description ? { description: row.description } : {}) } } : {}),
|
|
260
|
+
run: (input) => {
|
|
261
|
+
const given = (input ?? {});
|
|
262
|
+
ran.push({ action: action.name, id, surface: surface.id, input: row ? { ...given, item: row.key } : given, at: location });
|
|
263
|
+
const outcome = outcomeOf(spec, given);
|
|
264
|
+
if (outcome.result && !outcome.result.success)
|
|
265
|
+
return { ok: false, code: 'FAILED', message: outcome.result.error ?? 'It failed.' };
|
|
266
|
+
// A field takes the value it is given, as the person's typing would.
|
|
267
|
+
if ('value' in given) {
|
|
268
|
+
values.set(key, given.value);
|
|
269
|
+
handle.update({ value: given.value });
|
|
270
|
+
// A filter kept in the address is written to it, as the page's `writeQuery` does.
|
|
271
|
+
const writes = row ? null : fromAddress(spec);
|
|
272
|
+
if (writes && !outcome.navigate) {
|
|
273
|
+
const next = withSearch(location, writeQuery(writes.declaration, searchOf(location), { [spec.query]: given.value }).toString());
|
|
274
|
+
if (next !== location)
|
|
275
|
+
queueMicrotask(() => go(next));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (outcome.navigate)
|
|
279
|
+
queueMicrotask(() => go(outcome.navigate));
|
|
280
|
+
return { ok: true, ...(outcome.result?.data !== undefined ? { data: outcome.result.data } : {}) };
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
handles.push(handle);
|
|
284
|
+
};
|
|
285
|
+
if (spec.rows)
|
|
286
|
+
for (const row of spec.rows)
|
|
287
|
+
register(row);
|
|
288
|
+
else
|
|
289
|
+
register();
|
|
290
|
+
registered.set(id, { spec, handles });
|
|
291
|
+
};
|
|
292
|
+
/** The controls the page shows at `path`. */
|
|
293
|
+
const controlsAt = (path) => {
|
|
294
|
+
const wanted = new Map();
|
|
295
|
+
if (!manifest)
|
|
296
|
+
return wanted;
|
|
297
|
+
const mounted = new Set(manifestSurfacesAt(manifest, path).map((s) => s.id));
|
|
298
|
+
for (const [id, spec] of Object.entries(fixture.controls ?? {})) {
|
|
299
|
+
const { surface } = controlActions.get(id);
|
|
300
|
+
if (spec.routes ? isRoutePath(spec.routes, path) : mounted.has(surface.id))
|
|
301
|
+
wanted.set(id, spec);
|
|
302
|
+
}
|
|
303
|
+
if (fixture.allControls) {
|
|
304
|
+
for (const surface of manifest.surfaces) {
|
|
305
|
+
if (!mounted.has(surface.id))
|
|
306
|
+
continue;
|
|
307
|
+
for (const action of surface.actions) {
|
|
308
|
+
// A list's control is one per row, and no row is rendered here.
|
|
309
|
+
if (action.source !== 'control' || action.itemized || !action.control || wanted.has(action.id))
|
|
310
|
+
continue;
|
|
311
|
+
wanted.set(action.id, {});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return wanted;
|
|
316
|
+
};
|
|
317
|
+
// ─── What the product's pages show, and the problems they show ─────────────
|
|
318
|
+
/** Whether the page at `address` shows it: on its routes, else where the manifest records it, else anywhere; and its address holds its query. */
|
|
319
|
+
const showsHere = (entry, address, mounted, display) => {
|
|
320
|
+
const path = pathOf(address);
|
|
321
|
+
const where = entry.routes
|
|
322
|
+
? isRoutePath(entry.routes, path)
|
|
323
|
+
: display !== undefined && displays.has(display)
|
|
324
|
+
? [...displays.get(display).surfaces].some((id) => mounted.has(id))
|
|
325
|
+
: true;
|
|
326
|
+
return where && holdsQuery(entry.query, address, queryAt(queries, address));
|
|
327
|
+
};
|
|
328
|
+
let factsShown = { at: [], handles: [] };
|
|
329
|
+
let problemsShown = { key: '', handles: [] };
|
|
330
|
+
const showFacts = (address, mounted) => {
|
|
331
|
+
const at = (fixture.shown ?? []).flatMap((entry, i) => (showsHere(entry, address, mounted, entry.id) ? [i] : []));
|
|
332
|
+
if (at.join() === factsShown.at.join())
|
|
333
|
+
return;
|
|
334
|
+
// Registered again in the order declared, so the page state lists them so (`factsByDisplay`).
|
|
335
|
+
for (const handle of factsShown.handles)
|
|
336
|
+
handle.unregister();
|
|
337
|
+
factsShown = {
|
|
338
|
+
at,
|
|
339
|
+
handles: at.map((i) => {
|
|
340
|
+
const entry = fixture.shown[i];
|
|
341
|
+
const handle = registry.registerFacts();
|
|
342
|
+
handle.set(shownFacts(entry, titleOf(entry)));
|
|
343
|
+
return handle;
|
|
344
|
+
}),
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
const showProblems = (address, mounted) => {
|
|
348
|
+
// One area's problems are one registration, as `useAgentProblems` makes them.
|
|
349
|
+
const bySource = new Map();
|
|
350
|
+
for (const entry of fixture.problems ?? []) {
|
|
351
|
+
if (!showsHere(entry, address, mounted))
|
|
352
|
+
continue;
|
|
353
|
+
const source = entry.source ?? 'page';
|
|
354
|
+
bySource.set(source, [...(bySource.get(source) ?? []), ...entry.problems]);
|
|
355
|
+
}
|
|
356
|
+
const key = JSON.stringify([...bySource]);
|
|
357
|
+
if (key === problemsShown.key)
|
|
358
|
+
return;
|
|
359
|
+
for (const handle of problemsShown.handles)
|
|
360
|
+
handle.unregister();
|
|
361
|
+
problemsShown = {
|
|
362
|
+
key,
|
|
363
|
+
handles: [...bySource].map(([source, list]) => {
|
|
364
|
+
const handle = registry.registerProblems(source);
|
|
365
|
+
handle.set(list);
|
|
366
|
+
return handle;
|
|
367
|
+
}),
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
// ─── The fixture's own surfaces ─────────────────────────────────────────────
|
|
371
|
+
/** Each surface's observations as they are now, kept while it is not mounted. */
|
|
372
|
+
const states = new Map((fixture.surfaces ?? []).map((s) => [s.id, { ...(s.state ?? {}) }]));
|
|
373
|
+
const mountedSurfaces = new Map();
|
|
374
|
+
/** A surface's observations: its state, with what it shows and its problems where neither its state nor an action gave them. */
|
|
375
|
+
const observed = (surface) => {
|
|
376
|
+
const state = { ...states.get(surface.id) };
|
|
377
|
+
const declaration = queryAt(queries, location);
|
|
378
|
+
const own = state[PAGE_STATE_OBSERVATION_ID];
|
|
379
|
+
if (surface.shown && !(own && typeof own === 'object' && 'shown' in own)) {
|
|
380
|
+
const shown = surface.shown.filter((e) => holdsQuery(e.query, location, declaration) && (!e.routes || isRoutePath(e.routes, pathOf(location))));
|
|
381
|
+
state[PAGE_STATE_OBSERVATION_ID] = { ...(own && typeof own === 'object' ? own : {}), shown: shown.map((e) => shownFacts(e, titleOf(e))) };
|
|
382
|
+
}
|
|
383
|
+
if (surface.problems && !(PROBLEMS_OBSERVATION_ID in state)) {
|
|
384
|
+
state[PROBLEMS_OBSERVATION_ID] = surface.problems
|
|
385
|
+
.filter((e) => holdsQuery(e.query, location, declaration) && (!e.routes || isRoutePath(e.routes, pathOf(location))))
|
|
386
|
+
.flatMap((e) => e.problems);
|
|
387
|
+
}
|
|
388
|
+
return state;
|
|
389
|
+
};
|
|
390
|
+
const push = (surface) => {
|
|
391
|
+
const mounted = mountedSurfaces.get(surface.id);
|
|
392
|
+
if (!mounted)
|
|
393
|
+
return;
|
|
394
|
+
for (const [id, value] of Object.entries(observed(surface)))
|
|
395
|
+
mounted.pushObservation(id, value);
|
|
396
|
+
};
|
|
397
|
+
const observationIds = (surface) => [
|
|
398
|
+
...new Set([
|
|
399
|
+
...Object.keys(surface.state ?? {}),
|
|
400
|
+
...(surface.shown ? [PAGE_STATE_OBSERVATION_ID] : []),
|
|
401
|
+
...(surface.problems ? [PROBLEMS_OBSERVATION_ID] : []),
|
|
402
|
+
...surface.actions.flatMap((a) => [a, ...(a.cases ?? [])].flatMap((o) => Object.keys(o.state ?? {}))),
|
|
403
|
+
]),
|
|
404
|
+
];
|
|
405
|
+
/** An observation's schema: what a page's is, for its state when it shows facts and for its problems. */
|
|
406
|
+
const observationSchema = (surface, id) => id === PAGE_STATE_OBSERVATION_ID && surface.shown
|
|
407
|
+
? SHOWN_STATE_SCHEMA
|
|
408
|
+
: id === PROBLEMS_OBSERVATION_ID && surface.problems
|
|
409
|
+
? PROBLEMS_SCHEMA
|
|
410
|
+
: {};
|
|
411
|
+
const defined = new Map((fixture.surfaces ?? []).map((surface) => [
|
|
412
|
+
surface.id,
|
|
413
|
+
defineSurface({
|
|
414
|
+
id: surface.id,
|
|
415
|
+
name: surface.name,
|
|
416
|
+
description: surface.description,
|
|
417
|
+
observations: observationIds(surface).map((id) => ({ id, description: id, schema: observationSchema(surface, id) })),
|
|
418
|
+
actions: surface.actions.map((action) => ({
|
|
419
|
+
id: action.id,
|
|
420
|
+
description: action.description,
|
|
421
|
+
...(action.title ? { title: action.title } : {}),
|
|
422
|
+
...(action.effect ? { effect: action.effect } : {}),
|
|
423
|
+
...(action.confirm ? { confirm: true } : {}),
|
|
424
|
+
input: action.input ?? NOTHING,
|
|
425
|
+
handler: async (params) => {
|
|
426
|
+
ran.push({ action: action.id, id: action.id, surface: surface.id, input: params, at: location });
|
|
427
|
+
const outcome = outcomeOf(action, params);
|
|
428
|
+
if (!outcome.result || outcome.result.success) {
|
|
429
|
+
if (outcome.state)
|
|
430
|
+
states.set(surface.id, { ...states.get(surface.id), ...outcome.state });
|
|
431
|
+
push(surface);
|
|
432
|
+
if (outcome.navigate)
|
|
433
|
+
queueMicrotask(() => go(outcome.navigate));
|
|
434
|
+
}
|
|
435
|
+
return handlerResult(outcome.result);
|
|
436
|
+
},
|
|
437
|
+
})),
|
|
438
|
+
}),
|
|
439
|
+
]));
|
|
440
|
+
/** Mount what the page shows where it is now, and unmount what it does not. */
|
|
441
|
+
function remount() {
|
|
442
|
+
const path = location;
|
|
443
|
+
for (const surface of fixture.surfaces ?? []) {
|
|
444
|
+
const shown = !surface.routes || isRoutePath(surface.routes, path);
|
|
445
|
+
const mounted = mountedSurfaces.get(surface.id);
|
|
446
|
+
if (shown && !mounted) {
|
|
447
|
+
mountedSurfaces.set(surface.id, runtime.mount(defined.get(surface.id), () => null));
|
|
448
|
+
push(surface);
|
|
449
|
+
}
|
|
450
|
+
else if (shown && (surface.shown || surface.problems)) {
|
|
451
|
+
// Still here: what it shows may follow the address's query.
|
|
452
|
+
push(surface);
|
|
453
|
+
}
|
|
454
|
+
else if (mounted) {
|
|
455
|
+
mounted.unmount();
|
|
456
|
+
mountedSurfaces.delete(surface.id);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
const wanted = controlsAt(path);
|
|
460
|
+
for (const [id, { handles }] of [...registered]) {
|
|
461
|
+
if (wanted.has(id))
|
|
462
|
+
continue;
|
|
463
|
+
for (const handle of handles)
|
|
464
|
+
handle.unregister();
|
|
465
|
+
registered.delete(id);
|
|
466
|
+
}
|
|
467
|
+
for (const [id, spec] of wanted)
|
|
468
|
+
if (!registered.has(id))
|
|
469
|
+
registerControl(id, spec);
|
|
470
|
+
// A control bound to the address follows it, as the page re-reads its query.
|
|
471
|
+
for (const { spec, handles } of registered.values()) {
|
|
472
|
+
const bound = fromAddress(spec);
|
|
473
|
+
if (bound)
|
|
474
|
+
for (const handle of handles)
|
|
475
|
+
handle.update({ value: bound.value });
|
|
476
|
+
}
|
|
477
|
+
const mounted = new Set(manifest ? manifestSurfacesAt(manifest, path).map((s) => s.id) : []);
|
|
478
|
+
showFacts(path, mounted);
|
|
479
|
+
showProblems(path, mounted);
|
|
480
|
+
}
|
|
481
|
+
remount();
|
|
482
|
+
/** The registry tells the connection what mounted once the current task ends; the runtime then settles. */
|
|
483
|
+
const settled = () => new Promise((resolve) => setTimeout(resolve, 10));
|
|
484
|
+
const answers = new Map();
|
|
485
|
+
const channel = {
|
|
486
|
+
async dispatch(_room, request) {
|
|
487
|
+
requests.push(request);
|
|
488
|
+
if (!answers.has(request.requestId))
|
|
489
|
+
answers.set(request.requestId, settled().then(() => runtime.execute(request)));
|
|
490
|
+
return { acknowledged: 1, accepted: 1 };
|
|
491
|
+
},
|
|
492
|
+
async awaitResult(requestId) {
|
|
493
|
+
return (await answers.get(requestId)) ?? null;
|
|
494
|
+
},
|
|
495
|
+
};
|
|
496
|
+
return {
|
|
497
|
+
channel,
|
|
498
|
+
location: () => location,
|
|
499
|
+
async context() {
|
|
500
|
+
await settled();
|
|
501
|
+
return {
|
|
502
|
+
currentPath: location,
|
|
503
|
+
[CLIENT_SNAPSHOT_KEY]: runtime.snapshot(),
|
|
504
|
+
...(knowledge ? { [CLIENT_KNOWLEDGE_KEY]: resolveKnowledge(knowledge, location) } : {}),
|
|
505
|
+
};
|
|
506
|
+
},
|
|
507
|
+
ran,
|
|
508
|
+
requests,
|
|
509
|
+
grant(grant) {
|
|
510
|
+
runtime.grantApproval(grant);
|
|
511
|
+
},
|
|
512
|
+
close() {
|
|
513
|
+
disconnect();
|
|
514
|
+
for (const { handles } of registered.values())
|
|
515
|
+
for (const handle of handles)
|
|
516
|
+
handle.unregister();
|
|
517
|
+
registered.clear();
|
|
518
|
+
for (const handle of factsShown.handles)
|
|
519
|
+
handle.unregister();
|
|
520
|
+
for (const handle of problemsShown.handles)
|
|
521
|
+
handle.unregister();
|
|
522
|
+
runtime.dispose();
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
//# sourceMappingURL=page.js.map
|
package/dist/page.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../src/page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAiD,MAAM,eAAe,CAAC;AAEnH,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,WAAW,EACX,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@ -1,9 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What a run says: a line per case, every failed assertion
|
|
3
3
|
* with its turn, its channel and the reply; and JUnit XML for a CI's test
|
|
4
|
-
* view.
|
|
4
|
+
* view. A case none of whose assertions failed, but one of whose rubrics the
|
|
5
|
+
* judge gave no verdict on, is reported as not judged (`JUDGE`), apart from
|
|
6
|
+
* the cases that failed: in JUnit, as an error rather than a failure.
|
|
5
7
|
*/
|
|
6
|
-
import { type EvalReport } from './run.js';
|
|
8
|
+
import { type EvalCaseResult, type EvalReport } from './run.js';
|
|
9
|
+
/** A case's status as its line starts: `PASS`, `FAIL`, or `JUDGE` when only the judge failed. */
|
|
10
|
+
export declare const statusWord: (c: EvalCaseResult) => "PASS" | "JUDGE" | "FAIL";
|
|
11
|
+
/** A case's line, and under it every failure. */
|
|
12
|
+
export declare function caseLines(c: EvalCaseResult): string[];
|
|
13
|
+
/** The report's last line: how many passed, failed and could not be judged. */
|
|
14
|
+
export declare function summaryLine(report: EvalReport): string;
|
|
7
15
|
/** The report as text: one line per case, and under each failed case every failure. */
|
|
8
16
|
export declare function formatReport(report: EvalReport): string;
|
|
9
17
|
/** The report as JUnit XML: a test suite per eval suite, a test case per scenario and channel. */
|
package/dist/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7E,iGAAiG;AACjG,eAAO,MAAM,UAAU,GAAI,GAAG,cAAc,8BAAkF,CAAC;AAE/H,iDAAiD;AACjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,EAAE,CAErD;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAItD;AAED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEvD;AAiBD,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAoBtD"}
|