@post-print/agent-test 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/cli.d.ts +1 -1
- package/dist/sdk/cli.d.ts.map +1 -1
- package/dist/sdk/cli.js +49 -14
- package/dist/sdk/cli.js.map +1 -1
- package/dist/sdk/definitions.js +1 -1
- package/dist/sdk/definitions.js.map +1 -1
- package/dist/sdk/execution-reporter.d.ts +18 -0
- package/dist/sdk/execution-reporter.d.ts.map +1 -0
- package/dist/sdk/execution-reporter.js +171 -0
- package/dist/sdk/execution-reporter.js.map +1 -0
- package/dist/sdk/execution-runner.d.ts +14 -0
- package/dist/sdk/execution-runner.d.ts.map +1 -0
- package/dist/sdk/execution-runner.js +80 -0
- package/dist/sdk/execution-runner.js.map +1 -0
- package/dist/sdk/execution-store.d.ts +92 -0
- package/dist/sdk/execution-store.d.ts.map +1 -0
- package/dist/sdk/execution-store.js +357 -0
- package/dist/sdk/execution-store.js.map +1 -0
- package/dist/sdk/expect.d.ts.map +1 -1
- package/dist/sdk/expect.js +33 -5
- package/dist/sdk/expect.js.map +1 -1
- package/dist/sdk/playwright-cli.d.ts +2 -0
- package/dist/sdk/playwright-cli.d.ts.map +1 -0
- package/dist/sdk/playwright-cli.js +6 -0
- package/dist/sdk/playwright-cli.js.map +1 -0
- package/dist/sdk/reporter.d.ts.map +1 -1
- package/dist/sdk/reporter.js +40 -0
- package/dist/sdk/reporter.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.d.ts.map +1 -1
- package/dist/sdk/runtime.js +14 -5
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/test.d.ts +10 -1
- package/dist/sdk/test.d.ts.map +1 -1
- package/dist/sdk/test.js +45 -4
- package/dist/sdk/test.js.map +1 -1
- package/dist/sdk/types.d.ts +2 -1
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/viewer.d.ts +3 -9
- package/dist/sdk/viewer.d.ts.map +1 -1
- package/dist/sdk/viewer.js +41 -127
- package/dist/sdk/viewer.js.map +1 -1
- package/dist/viewer/bootstrap.d.ts +10 -0
- package/dist/viewer/bootstrap.d.ts.map +1 -0
- package/dist/viewer/bootstrap.js +2 -0
- package/dist/viewer/bootstrap.js.map +1 -0
- package/dist/viewer/client-entry.d.ts +2 -0
- package/dist/viewer/client-entry.d.ts.map +1 -0
- package/dist/viewer/client-entry.js +31 -0
- package/dist/viewer/client-entry.js.map +1 -0
- package/dist/viewer/generated-api.d.ts +15 -0
- package/dist/viewer/generated-api.d.ts.map +1 -0
- package/dist/viewer/generated-api.js +42 -0
- package/dist/viewer/generated-api.js.map +1 -0
- package/dist/viewer/generated-contracts.d.ts +13 -0
- package/dist/viewer/generated-contracts.d.ts.map +1 -0
- package/dist/viewer/generated-contracts.js +12 -0
- package/dist/viewer/generated-contracts.js.map +1 -0
- package/dist/viewer/main.js +64 -3
- package/dist/viewer/main.js.map +1 -1
- package/dist/viewer/page.d.ts +2 -4
- package/dist/viewer/page.d.ts.map +1 -1
- package/dist/viewer/page.js +18 -194
- package/dist/viewer/page.js.map +1 -1
- package/dist/viewer/presentation.d.ts +8 -0
- package/dist/viewer/presentation.d.ts.map +1 -0
- package/dist/viewer/presentation.js +45 -0
- package/dist/viewer/presentation.js.map +1 -0
- package/dist/viewer/protocol.d.ts +21 -0
- package/dist/viewer/protocol.d.ts.map +1 -0
- package/dist/viewer/protocol.js +6 -0
- package/dist/viewer/protocol.js.map +1 -0
- package/dist/viewer/server.d.ts +5 -10
- package/dist/viewer/server.d.ts.map +1 -1
- package/dist/viewer/server.js +301 -199
- package/dist/viewer/server.js.map +1 -1
- package/dist/viewer/styles.d.ts +1 -1
- package/dist/viewer/styles.d.ts.map +1 -1
- package/dist/viewer/styles.js +82 -429
- package/dist/viewer/styles.js.map +1 -1
- package/dist/viewer/stylex.css +1322 -0
- package/dist/viewer/test-catalog.d.ts +43 -0
- package/dist/viewer/test-catalog.d.ts.map +1 -0
- package/dist/viewer/test-catalog.js +27 -0
- package/dist/viewer/test-catalog.js.map +1 -0
- package/dist/viewer/v2-client.d.ts +7 -0
- package/dist/viewer/v2-client.d.ts.map +1 -0
- package/dist/viewer/v2-client.js +1862 -0
- package/dist/viewer/v2-client.js.map +1 -0
- package/package.json +14 -4
- package/dist/compare-scenario.d.ts +0 -65
- package/dist/compare-scenario.d.ts.map +0 -1
- package/dist/compare-scenario.js +0 -325
- package/dist/compare-scenario.js.map +0 -1
- package/dist/failures.d.ts +0 -8
- package/dist/failures.d.ts.map +0 -1
- package/dist/failures.js +0 -7
- package/dist/failures.js.map +0 -1
- package/dist/scenario-story.d.ts +0 -41
- package/dist/scenario-story.d.ts.map +0 -1
- package/dist/scenario-story.js +0 -477
- package/dist/scenario-story.js.map +0 -1
- package/dist/scenario-usage.d.ts +0 -15
- package/dist/scenario-usage.d.ts.map +0 -1
- package/dist/scenario-usage.js +0 -18
- package/dist/scenario-usage.js.map +0 -1
- package/dist/sdk/viewer-results.d.ts +0 -43
- package/dist/sdk/viewer-results.d.ts.map +0 -1
- package/dist/sdk/viewer-results.js +0 -126
- package/dist/sdk/viewer-results.js.map +0 -1
- package/dist/types.d.ts +0 -328
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/viewer/catalog.d.ts +0 -66
- package/dist/viewer/catalog.d.ts.map +0 -1
- package/dist/viewer/catalog.js +0 -49
- package/dist/viewer/catalog.js.map +0 -1
- package/dist/viewer/client.d.ts +0 -7
- package/dist/viewer/client.d.ts.map +0 -1
- package/dist/viewer/client.js +0 -14
- package/dist/viewer/client.js.map +0 -1
- package/dist/viewer/events.d.ts +0 -118
- package/dist/viewer/events.d.ts.map +0 -1
- package/dist/viewer/events.js +0 -51
- package/dist/viewer/events.js.map +0 -1
- package/dist/viewer/run-controller.d.ts +0 -43
- package/dist/viewer/run-controller.d.ts.map +0 -1
- package/dist/viewer/run-controller.js +0 -475
- package/dist/viewer/run-controller.js.map +0 -1
- package/dist/worker-pool.d.ts +0 -12
- package/dist/worker-pool.d.ts.map +0 -1
- package/dist/worker-pool.js +0 -26
- package/dist/worker-pool.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-usage.js","sourceRoot":"","sources":["../src/scenario-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,2BAA2B,EAC3B,mBAAmB,EAEnB,aAAa,GACb,MAAM,2BAA2B,CAAC;AAInC,MAAM,UAAU,sBAAsB,CAAC,QAA+B;IACrE,OAAO,aAAa,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAIxC;IAKA,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvF,MAAM,KAAK,GAAG,2BAA2B,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAClE,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,EAAE,CAAC;IACX,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAC1C,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,4BAA4B,CAC3C,KAA8B,EAC9B,QAAqB;IAErB,OAAO,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ViewerJob } from "../viewer/catalog.js";
|
|
2
|
-
import type { ViewerEvent } from "../viewer/events.js";
|
|
3
|
-
export interface TestEntry {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
listFile: string;
|
|
7
|
-
file: string;
|
|
8
|
-
project: string;
|
|
9
|
-
}
|
|
10
|
-
interface RunEvent {
|
|
11
|
-
type: string;
|
|
12
|
-
runId: string;
|
|
13
|
-
value: unknown;
|
|
14
|
-
}
|
|
15
|
-
export interface WireEvent {
|
|
16
|
-
type: string;
|
|
17
|
-
tests?: TestEntry[];
|
|
18
|
-
event?: RunEvent;
|
|
19
|
-
passed?: boolean;
|
|
20
|
-
skipped?: boolean;
|
|
21
|
-
durationMs?: number;
|
|
22
|
-
errors?: string[];
|
|
23
|
-
message?: string;
|
|
24
|
-
}
|
|
25
|
-
/** One test result owns its captured runs, checks, and independent grades. */
|
|
26
|
-
export declare class ViewerTestResult {
|
|
27
|
-
private readonly emit;
|
|
28
|
-
private readonly runs;
|
|
29
|
-
private readonly evaluations;
|
|
30
|
-
private result?;
|
|
31
|
-
private readonly envelope;
|
|
32
|
-
constructor(job: ViewerJob, emit: (event: ViewerEvent) => void);
|
|
33
|
-
start(): void;
|
|
34
|
-
receive(wire: WireEvent): void;
|
|
35
|
-
private capture;
|
|
36
|
-
private agentEvent;
|
|
37
|
-
private section;
|
|
38
|
-
private completedResult;
|
|
39
|
-
finish(code: number, cancelled: boolean): void;
|
|
40
|
-
private missingResult;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=viewer-results.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-results.d.ts","sourceRoot":"","sources":["../../src/sdk/viewer-results.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,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Calls),
|
|
5
|
-
shellCommands: runs.flatMap((run) => run.trace.shellCommands),
|
|
6
|
-
artifacts: {},
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
/** One test result owns its captured runs, checks, and independent grades. */
|
|
10
|
-
export class ViewerTestResult {
|
|
11
|
-
emit;
|
|
12
|
-
runs = new Map();
|
|
13
|
-
evaluations = [];
|
|
14
|
-
result;
|
|
15
|
-
envelope;
|
|
16
|
-
constructor(job, emit) {
|
|
17
|
-
this.emit = emit;
|
|
18
|
-
this.envelope = { suite: job.suite, scenario: job.scenario, host: job.host };
|
|
19
|
-
}
|
|
20
|
-
start() {
|
|
21
|
-
this.emit({ ...this.envelope, type: "cell_started" });
|
|
22
|
-
}
|
|
23
|
-
receive(wire) {
|
|
24
|
-
if (wire.event)
|
|
25
|
-
this.capture(wire.event);
|
|
26
|
-
if (wire.type === "error")
|
|
27
|
-
this.emit({ ...this.envelope, type: "status", text: wire.message ?? "Runner error" });
|
|
28
|
-
if (wire.type === "result")
|
|
29
|
-
this.result = this.completedResult(wire);
|
|
30
|
-
}
|
|
31
|
-
capture(event) {
|
|
32
|
-
switch (event.type) {
|
|
33
|
-
case "start":
|
|
34
|
-
this.emit({
|
|
35
|
-
...this.envelope,
|
|
36
|
-
type: "prompt",
|
|
37
|
-
text: event.value.prompt,
|
|
38
|
-
});
|
|
39
|
-
break;
|
|
40
|
-
case "agent":
|
|
41
|
-
this.agentEvent(event.value);
|
|
42
|
-
break;
|
|
43
|
-
case "complete":
|
|
44
|
-
this.runs.set(event.runId, event.value);
|
|
45
|
-
break;
|
|
46
|
-
case "evaluation":
|
|
47
|
-
this.evaluations.push(event.value);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
agentEvent(raw) {
|
|
52
|
-
const value = raw;
|
|
53
|
-
if (value.type === "text")
|
|
54
|
-
this.emit({ ...this.envelope, type: "text", text: value.text ?? "" });
|
|
55
|
-
if (value.type === "tool")
|
|
56
|
-
this.emit({ ...this.envelope, type: "tool", name: value.name ?? "tool", args: value.args });
|
|
57
|
-
}
|
|
58
|
-
section(run) {
|
|
59
|
-
return {
|
|
60
|
-
title: run.name,
|
|
61
|
-
checks: [],
|
|
62
|
-
notes: [run.output, `Agent tokens: ${run.usage.tokens.total ?? "unavailable"}`],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
completedResult(wire) {
|
|
66
|
-
const all = [...this.runs.values()];
|
|
67
|
-
const errors = wire.errors?.length ? wire.errors : ["Test did not pass"];
|
|
68
|
-
return {
|
|
69
|
-
authoring: "typescript",
|
|
70
|
-
suite: this.envelope.suite,
|
|
71
|
-
scenario: this.envelope.scenario,
|
|
72
|
-
passed: wire.passed === true,
|
|
73
|
-
skipped: wire.skipped,
|
|
74
|
-
durationMs: wire.durationMs ?? 0,
|
|
75
|
-
trace: combinedTrace(all),
|
|
76
|
-
failures: wire.passed
|
|
77
|
-
? []
|
|
78
|
-
: errors.map((message) => ({ matcher: "test", message, category: "rubric_miss" })),
|
|
79
|
-
story: {
|
|
80
|
-
criteria: [],
|
|
81
|
-
result: [],
|
|
82
|
-
verdict: wire.errors ?? [],
|
|
83
|
-
sections: [
|
|
84
|
-
...all.map((run) => this.section(run)),
|
|
85
|
-
...this.evaluations.map((value) => ({
|
|
86
|
-
title: value.name,
|
|
87
|
-
checks: [],
|
|
88
|
-
notes: [
|
|
89
|
-
JSON.stringify(value.output),
|
|
90
|
-
`Judge tokens: ${value.usage.tokens.total ?? "unavailable"}`,
|
|
91
|
-
],
|
|
92
|
-
})),
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
finish(code, cancelled) {
|
|
98
|
-
const result = this.result ?? this.missingResult(code, cancelled);
|
|
99
|
-
this.emit({ ...this.envelope, type: "scenario_result", result });
|
|
100
|
-
this.emit({
|
|
101
|
-
...this.envelope,
|
|
102
|
-
type: "cell_finished",
|
|
103
|
-
passed: result.passed,
|
|
104
|
-
skipped: result.skipped,
|
|
105
|
-
durationMs: result.durationMs,
|
|
106
|
-
failures: result.failures,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
missingResult(code, cancelled) {
|
|
110
|
-
return {
|
|
111
|
-
authoring: "typescript",
|
|
112
|
-
suite: this.envelope.suite,
|
|
113
|
-
scenario: this.envelope.scenario,
|
|
114
|
-
passed: false,
|
|
115
|
-
durationMs: 0,
|
|
116
|
-
failures: [
|
|
117
|
-
{
|
|
118
|
-
matcher: "runner",
|
|
119
|
-
message: cancelled ? "Cancelled" : `Runner exited without a result (${code})`,
|
|
120
|
-
category: "agent_runtime",
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=viewer-results.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-results.js","sourceRoot":"","sources":["../../src/sdk/viewer-results.ts"],"names":[],"mappings":"AA4BA,SAAS,aAAa,CAAC,IAAW;IACjC,OAAO;QACN,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;QACnD,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC;QAC/C,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC;QAC7D,SAAS,EAAE,EAAE;KACb,CAAC;AACH,CAAC;AACD,8EAA8E;AAC9E,MAAM,OAAO,gBAAgB;IAOV,IAAI;IANL,IAAI,GAAG,IAAI,GAAG,EAAe,CAAC;IAC9B,WAAW,GAAiB,EAAE,CAAC;IACxC,MAAM,CAAkB;IACf,QAAQ,CAAC;IAC1B,YACC,GAAc,EACG,IAAkC;oBAAlC,IAAI;QAErB,IA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IAAI,CAAC,IAAI,CAAC;YACT,GAAG,IAAI,CAAC,QAAQ;YAChB,IAAI,EAAE,eAAe;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;SACzB,CAAC,CAAC;IACJ,CAAC;IACO,aAAa,CAAC,IAAY,EAAE,SAAkB;QACrD,OAAO;YACN,SAAS,EAAE,YAAY;YACvB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ;YAChC,MAAM,EAAE,KAAK;YACb,UAAU,EAAE,CAAC;YACb,QAAQ,EAAE;gBACT;oBACC,OAAO,EAAE,QAAQ;oBACjB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,mCAAmC,IAAI,GAAG;oBAC7E,QAAQ,EAAE,eAAe;iBACzB;aACD;SACD,CAAC;IACH,CAAC;CACD"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import type { AgentHost, AgentTrace, AgentUsage, ContextMode, ContextProfile, McpServerConfig, ScenarioUsageBreakdown, SkillContextSetting } from "@post-print/agent-harness";
|
|
2
|
-
export type { AgentUsage, ContextMode, McpServerConfig, ScenarioUsageBreakdown, } from "@post-print/agent-harness";
|
|
3
|
-
export type JudgeRubricItem = string | {
|
|
4
|
-
id?: string;
|
|
5
|
-
question: string;
|
|
6
|
-
};
|
|
7
|
-
/** Why the runner put a file in the host preamble. */
|
|
8
|
-
export type ScenarioContextReason = "contextSources" | "profile" | "skills";
|
|
9
|
-
/** One preamble file the host received for a run. */
|
|
10
|
-
export interface ScenarioContextFile {
|
|
11
|
-
path: string;
|
|
12
|
-
text: string;
|
|
13
|
-
reason: ScenarioContextReason;
|
|
14
|
-
why: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ScenarioRubric {
|
|
17
|
-
tier?: "low" | "medium" | "high";
|
|
18
|
-
/** Chat-style tier announce — infer one-line routing from transcript when routing.tier absent. */
|
|
19
|
-
handsOnRouting?: boolean;
|
|
20
|
-
/** Substring that must appear in assistant reply text. */
|
|
21
|
-
must?: string[];
|
|
22
|
-
/** Substring that must not appear in assistant text, commands, artifacts, or tool args. Tool results are ignored. */
|
|
23
|
-
mustNot?: string[];
|
|
24
|
-
mustRun?: string[];
|
|
25
|
-
/** Shell command substring that must be observed with a successful structured execution result. */
|
|
26
|
-
mustRunSuccessfully?: string[];
|
|
27
|
-
/**
|
|
28
|
-
* When set, every shell statement must include one listed fragment.
|
|
29
|
-
* Combined commands split on `&&`, `||`, `;`, `|`, and newlines.
|
|
30
|
-
* An empty list forbids every shell command.
|
|
31
|
-
*/
|
|
32
|
-
allowedCommands?: string[];
|
|
33
|
-
/**
|
|
34
|
-
* Tool name substring, or `name:fragment` where fragment must appear in
|
|
35
|
-
* JSON args or the tool result. Matches built-in and MCP tool calls.
|
|
36
|
-
*/
|
|
37
|
-
mustCallTool?: string[];
|
|
38
|
-
/** Required tool calls in chronological order. Extra calls are permitted. */
|
|
39
|
-
mustCallToolsInOrder?: string[];
|
|
40
|
-
mustNotCallTool?: string[];
|
|
41
|
-
/**
|
|
42
|
-
* Substring that must appear in Read-family args or a Shell/Bash path access.
|
|
43
|
-
* Hallucination scoring stays in live `judge` questions — these are lightweight proxies.
|
|
44
|
-
*/
|
|
45
|
-
mustReadPath?: string[];
|
|
46
|
-
/** Substring that must not appear in any Read tool's JSON args. */
|
|
47
|
-
mustNotReadPath?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Skill folder names. Deterministic match is a SKILL.md / references read
|
|
50
|
-
* on a host skill path. Live judge then scores whether the agent followed it.
|
|
51
|
-
*/
|
|
52
|
-
mustInvokeSkill?: string[];
|
|
53
|
-
mustNotInvokeSkill?: string[];
|
|
54
|
-
routingBlock?: boolean;
|
|
55
|
-
reviewDepth?: "quick" | "standard" | "thorough" | "full";
|
|
56
|
-
/** Any transcript outcome. The judge sees assistant text, tool args, and tool results. */
|
|
57
|
-
judge?: JudgeRubricItem[];
|
|
58
|
-
}
|
|
59
|
-
/** Arm id. Two-arm form uses `a` and `b`. Named arms use a lowercase slug. */
|
|
60
|
-
export type CompareArmId = string;
|
|
61
|
-
/** Named winner-versus-loser pair for a metric gate. */
|
|
62
|
-
export type CompareMetric = "outcome" | "turns" | "tokens" | "tools" | "durationMs" | `judge:${string}`;
|
|
63
|
-
export type CompareGateOperator = "equal" | "lessThan" | "atMost" | "atLeast" | "greaterThan";
|
|
64
|
-
export type CompareGate = {
|
|
65
|
-
metric: CompareMetric;
|
|
66
|
-
winner: CompareArmId;
|
|
67
|
-
loser: CompareArmId;
|
|
68
|
-
} | {
|
|
69
|
-
metric: CompareMetric;
|
|
70
|
-
arm: CompareArmId;
|
|
71
|
-
operator: CompareGateOperator;
|
|
72
|
-
value: number | "pass" | "fail";
|
|
73
|
-
};
|
|
74
|
-
export interface CompareJudgeMetric {
|
|
75
|
-
id: string;
|
|
76
|
-
question: string;
|
|
77
|
-
}
|
|
78
|
-
export interface CompareGateResult {
|
|
79
|
-
gate: CompareGate;
|
|
80
|
-
passed: boolean;
|
|
81
|
-
left?: number | "pass" | "fail";
|
|
82
|
-
right?: number | "pass" | "fail";
|
|
83
|
-
message: string;
|
|
84
|
-
}
|
|
85
|
-
/** Overrides for one side of a compare scenario. Omitted fields inherit the scenario. */
|
|
86
|
-
export interface CompareArm {
|
|
87
|
-
/** Required on `compare.arms`. Implicit `a` / `b` in the two-arm form. */
|
|
88
|
-
id?: CompareArmId;
|
|
89
|
-
/** Display name. Omitted labels are control (a), experimental (b), or the arm id. */
|
|
90
|
-
label?: string;
|
|
91
|
-
/** Required. Says what this arm tests. */
|
|
92
|
-
description?: string;
|
|
93
|
-
prompt?: string;
|
|
94
|
-
host?: AgentHost;
|
|
95
|
-
/** How workspace instructions reach the host. */
|
|
96
|
-
contextMode?: ContextMode;
|
|
97
|
-
profile?: ContextProfile;
|
|
98
|
-
workspace?: string;
|
|
99
|
-
skills?: SkillContextSetting;
|
|
100
|
-
contextSources?: string[];
|
|
101
|
-
mcpServers?: Record<string, McpServerConfig>;
|
|
102
|
-
includeGlobalSkills?: boolean;
|
|
103
|
-
seedPatch?: string;
|
|
104
|
-
seedStageOnly?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Extra deterministic checks for this arm only.
|
|
107
|
-
* Arrays append onto the scenario rubric. Do not set judge here.
|
|
108
|
-
*/
|
|
109
|
-
rubric?: ScenarioRubric;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Two or more live arms in one scenario.
|
|
113
|
-
* Keep `a` and `b` for the two-arm form. Use `arms` when the scenario has more than two workspaces.
|
|
114
|
-
* `gates` are optional outcome and measurement requirements.
|
|
115
|
-
* `rubric.judge` is optional and scores every arm transcript.
|
|
116
|
-
*/
|
|
117
|
-
export interface ScenarioCompare {
|
|
118
|
-
a?: CompareArm;
|
|
119
|
-
b?: CompareArm;
|
|
120
|
-
/** Named arms. Each row needs `id`, `description`, and a workspace override when the trees differ. */
|
|
121
|
-
arms?: CompareArm[];
|
|
122
|
-
/** Questions that the judge scores once for each arm. */
|
|
123
|
-
judgeMetrics?: CompareJudgeMetric[];
|
|
124
|
-
/** Independent conditions that decide an experiment. */
|
|
125
|
-
gates?: CompareGate[];
|
|
126
|
-
}
|
|
127
|
-
export interface CompareArmResult {
|
|
128
|
-
id: CompareArmId;
|
|
129
|
-
label: string;
|
|
130
|
-
prompt: string;
|
|
131
|
-
/** Plain-language note for this arm. */
|
|
132
|
-
description?: string;
|
|
133
|
-
trace?: AgentTrace;
|
|
134
|
-
durationMs?: number;
|
|
135
|
-
passed?: boolean;
|
|
136
|
-
failures?: AssertionFailure[];
|
|
137
|
-
judgeVerdicts?: JudgeVerdictResult[];
|
|
138
|
-
/** Whether this arm used host discovery or a runner-built preamble. */
|
|
139
|
-
contextMode?: ContextMode;
|
|
140
|
-
/** Preamble files this arm sent to the host. */
|
|
141
|
-
contextFiles?: ScenarioContextFile[];
|
|
142
|
-
/** Exact initial user input submitted through a builtin host adapter. */
|
|
143
|
-
hostInput?: string;
|
|
144
|
-
/** Internal parent-owned judge workspace handoff. */
|
|
145
|
-
judgeWorkspace?: {
|
|
146
|
-
name: string;
|
|
147
|
-
path: string;
|
|
148
|
-
cleanup: () => Promise<void>;
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
export interface ScenarioCompareResult {
|
|
152
|
-
/** Every arm in author order. */
|
|
153
|
-
arms: CompareArmResult[];
|
|
154
|
-
/** Present when an arm id is `a`. */
|
|
155
|
-
a?: CompareArmResult;
|
|
156
|
-
/** Present when an arm id is `b`. */
|
|
157
|
-
b?: CompareArmResult;
|
|
158
|
-
gates?: CompareGate[];
|
|
159
|
-
gateResults?: CompareGateResult[];
|
|
160
|
-
}
|
|
161
|
-
export interface AgentScenario {
|
|
162
|
-
name: string;
|
|
163
|
-
/** Plain-language note. Says what this scenario tests. */
|
|
164
|
-
description?: string;
|
|
165
|
-
/** Run two or more arms. Optional metric gates and an optional shared judge. */
|
|
166
|
-
compare?: ScenarioCompare;
|
|
167
|
-
prompt: string;
|
|
168
|
-
host?: AgentHost;
|
|
169
|
-
/** Default `harness-preamble` preserves agent-test 1.0 behavior. */
|
|
170
|
-
contextMode?: ContextMode;
|
|
171
|
-
profile?: ContextProfile;
|
|
172
|
-
/** Extra skill folders to overlay. Project skills in the git repo load without this. */
|
|
173
|
-
skills?: SkillContextSetting;
|
|
174
|
-
/** Additive context paths (merged after suite defaults.contextSources). */
|
|
175
|
-
contextSources?: string[];
|
|
176
|
-
/** Inline MCP servers for live Cursor (merged over suite defaults by server name). */
|
|
177
|
-
mcpServers?: Record<string, McpServerConfig>;
|
|
178
|
-
/**
|
|
179
|
-
* Caller-relative folder that becomes the sealed repo.
|
|
180
|
-
* Omit or `"."` copies caller HEAD. A subfolder copies only that tree.
|
|
181
|
-
*/
|
|
182
|
-
workspace?: string;
|
|
183
|
-
/**
|
|
184
|
-
* Load host-global user skills from the developer machine.
|
|
185
|
-
* Default false. Keep false for a custom `workspace` fixture.
|
|
186
|
-
*/
|
|
187
|
-
includeGlobalSkills?: boolean;
|
|
188
|
-
/** OpenAI only: allow network access in the Codex workspace-write sandbox. Default false. */
|
|
189
|
-
networkAccess?: boolean;
|
|
190
|
-
/** Live-only: apply patch + commit in worktree so pr-mode branch diff exists. */
|
|
191
|
-
seedPatch?: string;
|
|
192
|
-
/** Live-only: with seedPatch, stage changes without committing (staged review mode). */
|
|
193
|
-
seedStageOnly?: boolean;
|
|
194
|
-
/** Captured rubric metadata retained for imported viewer results. */
|
|
195
|
-
rubric: ScenarioRubric;
|
|
196
|
-
skip?: boolean;
|
|
197
|
-
}
|
|
198
|
-
export interface AssertionFailure {
|
|
199
|
-
matcher: string;
|
|
200
|
-
message: string;
|
|
201
|
-
/** Normalized failure class for console, bundles, and CI consumers. */
|
|
202
|
-
category: FailureCategory;
|
|
203
|
-
/** Optional diagnostic detail (printed in --debug). */
|
|
204
|
-
evidence?: string;
|
|
205
|
-
}
|
|
206
|
-
export type FailureCategory = "rubric_miss" | "judge_infra" | "judge_parse" | "agent_runtime" | "worktree_leak" | "recording_error";
|
|
207
|
-
export interface JudgeVerdictResult {
|
|
208
|
-
id: string;
|
|
209
|
-
question: string;
|
|
210
|
-
pass: boolean;
|
|
211
|
-
rationale: string;
|
|
212
|
-
evidence?: string[];
|
|
213
|
-
/** Exact prompt sent to the judge classifier. */
|
|
214
|
-
prompt?: string;
|
|
215
|
-
/** Exact text returned by the judge classifier. */
|
|
216
|
-
response?: string;
|
|
217
|
-
infraError?: string;
|
|
218
|
-
parseError?: string;
|
|
219
|
-
rawSdkStatus?: string;
|
|
220
|
-
sdkError?: {
|
|
221
|
-
message?: string;
|
|
222
|
-
code?: string;
|
|
223
|
-
};
|
|
224
|
-
attempt?: number;
|
|
225
|
-
transcriptChars?: number;
|
|
226
|
-
promptChars?: number;
|
|
227
|
-
workspaceEvidence?: string[];
|
|
228
|
-
usage?: AgentUsage;
|
|
229
|
-
}
|
|
230
|
-
export type StoryCheckStatus = "pass" | "fail" | "info";
|
|
231
|
-
/** One scored rubric or metric line. */
|
|
232
|
-
export interface StoryCheck {
|
|
233
|
-
text: string;
|
|
234
|
-
status: StoryCheckStatus;
|
|
235
|
-
}
|
|
236
|
-
/** One verdict block. Compare runs use one section per arm. */
|
|
237
|
-
export interface StorySection {
|
|
238
|
-
title?: string;
|
|
239
|
-
description?: string;
|
|
240
|
-
checks: StoryCheck[];
|
|
241
|
-
/** Trace summary and observational notes. */
|
|
242
|
-
notes?: string[];
|
|
243
|
-
}
|
|
244
|
-
/** CLI and HTML summary of rubric checks and what the run produced. */
|
|
245
|
-
export interface ScenarioStory {
|
|
246
|
-
criteria: string[];
|
|
247
|
-
result: string[];
|
|
248
|
-
/** Failures and judge notes. Shown under Result. */
|
|
249
|
-
verdict: string[];
|
|
250
|
-
/** Scored checks grouped by arm. Theme and HTML prefer this when set. */
|
|
251
|
-
sections?: StorySection[];
|
|
252
|
-
}
|
|
253
|
-
export interface ScenarioResult {
|
|
254
|
-
authoring?: "typescript";
|
|
255
|
-
suite: string;
|
|
256
|
-
scenario: string;
|
|
257
|
-
passed: boolean;
|
|
258
|
-
failures: AssertionFailure[];
|
|
259
|
-
skipped?: boolean;
|
|
260
|
-
durationMs: number;
|
|
261
|
-
/** Total live attempts including announce-stop retries (omit or 1 when no retry). */
|
|
262
|
-
attempts?: number;
|
|
263
|
-
/** LLM judge verdicts when judge criteria were evaluated. */
|
|
264
|
-
judgeVerdicts?: JudgeVerdictResult[];
|
|
265
|
-
/** Agent + judge + total token usage when reported. */
|
|
266
|
-
usage?: ScenarioUsageBreakdown;
|
|
267
|
-
/** Denormalized agent-run usage. */
|
|
268
|
-
agentUsage?: AgentUsage;
|
|
269
|
-
/** Denormalized judge usage (sum of criteria). */
|
|
270
|
-
judgeUsage?: AgentUsage;
|
|
271
|
-
/** Scenario prompt sent to the host (for HTML conversation). */
|
|
272
|
-
prompt?: string;
|
|
273
|
-
/** Whether workspace instructions used host discovery or a runner-built preamble. */
|
|
274
|
-
contextMode?: ContextMode;
|
|
275
|
-
/** Preamble files this run sent to the host. */
|
|
276
|
-
contextFiles?: ScenarioContextFile[];
|
|
277
|
-
/** Exact initial user input submitted through a builtin host adapter. */
|
|
278
|
-
hostInput?: string;
|
|
279
|
-
/** Plain-language note. Says what this scenario tests. */
|
|
280
|
-
description?: string;
|
|
281
|
-
/** Full agent transcript when available (for HTML reports / debug bundles). */
|
|
282
|
-
trace?: AgentTrace;
|
|
283
|
-
/** Compare arms when this scenario is a compare run. */
|
|
284
|
-
compare?: ScenarioCompareResult;
|
|
285
|
-
/** Plain-language summary of the check, the agent run, and the verdict. */
|
|
286
|
-
story?: ScenarioStory;
|
|
287
|
-
/** Absolute path to the debug bundle directory when --debug wrote one. */
|
|
288
|
-
debugBundleDir?: string;
|
|
289
|
-
/** Internal handoff for parent-owned compare judging; omitted from reports. */
|
|
290
|
-
judgeWorkspace?: {
|
|
291
|
-
name: string;
|
|
292
|
-
path: string;
|
|
293
|
-
cleanup: () => Promise<void>;
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
/** Aggregate token usage across scenarios that reported it. */
|
|
297
|
-
export interface UsageStats {
|
|
298
|
-
scenariosWithUsage: number;
|
|
299
|
-
sumTotalTokens?: number;
|
|
300
|
-
p50TotalTokens?: number;
|
|
301
|
-
p95TotalTokens?: number;
|
|
302
|
-
maxTotalTokens?: number;
|
|
303
|
-
sumInputTokens?: number;
|
|
304
|
-
sumOutputTokens?: number;
|
|
305
|
-
}
|
|
306
|
-
export interface RunSummary {
|
|
307
|
-
infraFailures: number;
|
|
308
|
-
rubricFailures: number;
|
|
309
|
-
agentRuntimeFailures: number;
|
|
310
|
-
worktreeLeaks: number;
|
|
311
|
-
recordingErrors: number;
|
|
312
|
-
judgeParseFailures: number;
|
|
313
|
-
/** Scenarios where the LLM judge used more than one attempt. */
|
|
314
|
-
retriedScenarios: number;
|
|
315
|
-
/** Scenarios where announce-stop scenario retry re-ran the agent. */
|
|
316
|
-
scenarioRetriedScenarios: number;
|
|
317
|
-
usage?: UsageStats;
|
|
318
|
-
}
|
|
319
|
-
export interface SuiteRunReport {
|
|
320
|
-
suite: string;
|
|
321
|
-
host: AgentHost;
|
|
322
|
-
passed: number;
|
|
323
|
-
failed: number;
|
|
324
|
-
skipped: number;
|
|
325
|
-
results: ScenarioResult[];
|
|
326
|
-
summary?: RunSummary;
|
|
327
|
-
}
|
|
328
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACX,UAAU,EACV,WAAW,EACX,eAAe,EACf,sBAAsB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,sDAAsD;AACtD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5E,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACjC,kGAAk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C1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,wBAAwB,EAAE,MAAM,CAAC;IACjC,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/dist/viewer/catalog.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { AgentHost, ContextMode } from "@post-print/agent-harness";
|
|
2
|
-
import type { CompareGate, CompareJudgeMetric, ScenarioRubric } from "../types.js";
|
|
3
|
-
export interface ViewerCatalogArm {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
prompt: string;
|
|
8
|
-
rubric: ScenarioRubric;
|
|
9
|
-
contextMode?: ContextMode;
|
|
10
|
-
/** Repository-relative source folder copied into this arm's sealed workspace. */
|
|
11
|
-
workspace?: string;
|
|
12
|
-
contextSources?: string[];
|
|
13
|
-
suppliedMcp?: ViewerSuppliedMcpServer[];
|
|
14
|
-
suppliedSkills?: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface ViewerSuppliedMcpServer {
|
|
17
|
-
name: string;
|
|
18
|
-
tools: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface ViewerCatalogScenario {
|
|
21
|
-
authoring?: "typescript";
|
|
22
|
-
name: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
prompt: string;
|
|
25
|
-
skip?: boolean;
|
|
26
|
-
host?: AgentHost;
|
|
27
|
-
contextMode?: ContextMode;
|
|
28
|
-
/** Repository-relative source folder copied into the sealed workspace. */
|
|
29
|
-
workspace?: string;
|
|
30
|
-
rubric: ScenarioRubric;
|
|
31
|
-
compare?: ViewerCatalogArm[];
|
|
32
|
-
gates?: CompareGate[];
|
|
33
|
-
judgeMetrics?: CompareJudgeMetric[];
|
|
34
|
-
contextSources?: string[];
|
|
35
|
-
suppliedMcp?: ViewerSuppliedMcpServer[];
|
|
36
|
-
suppliedSkills?: string[];
|
|
37
|
-
}
|
|
38
|
-
export interface ViewerCatalogSuite {
|
|
39
|
-
name: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
hosts: AgentHost[];
|
|
42
|
-
scenarios: ViewerCatalogScenario[];
|
|
43
|
-
}
|
|
44
|
-
export interface ViewerCatalog {
|
|
45
|
-
suitesDir: string;
|
|
46
|
-
defaultSelectedHosts: AgentHost[];
|
|
47
|
-
suites: ViewerCatalogSuite[];
|
|
48
|
-
}
|
|
49
|
-
export interface ViewerRunRequest {
|
|
50
|
-
suite?: string;
|
|
51
|
-
scenario?: string;
|
|
52
|
-
hosts?: AgentHost[];
|
|
53
|
-
parallelHosts?: boolean;
|
|
54
|
-
/** Maximum concurrent agent jobs for this run. */
|
|
55
|
-
workers?: number;
|
|
56
|
-
}
|
|
57
|
-
export interface ViewerJob {
|
|
58
|
-
suite: string;
|
|
59
|
-
scenario: string;
|
|
60
|
-
host: AgentHost;
|
|
61
|
-
arm?: string;
|
|
62
|
-
prompt: string;
|
|
63
|
-
}
|
|
64
|
-
/** Expand a viewer run into one job per host cell, or per compare arm. */
|
|
65
|
-
export declare function expandViewerJobs(catalog: ViewerCatalog, request: ViewerRunRequest): ViewerJob[];
|
|
66
|
-
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/viewer/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnF,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACrC,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAA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0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS,EAAE,CAmB/F"}
|
package/dist/viewer/catalog.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** Expand a viewer run into one job per host cell, or per compare arm. */
|
|
2
|
-
export function expandViewerJobs(catalog, request) {
|
|
3
|
-
const selectedHosts = request.hosts ?? catalog.defaultSelectedHosts;
|
|
4
|
-
const suites = request.suite
|
|
5
|
-
? catalog.suites.filter((suite) => suite.name === request.suite)
|
|
6
|
-
: catalog.suites;
|
|
7
|
-
const jobs = [];
|
|
8
|
-
for (const suite of suites) {
|
|
9
|
-
const hosts = selectedHosts.filter((host) => suite.hosts.includes(host));
|
|
10
|
-
const scenarios = request.scenario
|
|
11
|
-
? suite.scenarios.filter((scenario) => scenario.name === request.scenario)
|
|
12
|
-
: suite.scenarios;
|
|
13
|
-
for (const scenario of scenarios) {
|
|
14
|
-
if (scenario.skip) {
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
jobs.push(...scenarioJobs(suite.name, scenario, hosts));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return jobs;
|
|
21
|
-
}
|
|
22
|
-
function scenarioJobs(suite, scenario, hosts) {
|
|
23
|
-
const jobs = [];
|
|
24
|
-
for (const host of hosts) {
|
|
25
|
-
if (scenario.host && scenario.host !== host) {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
if (scenario.compare?.length) {
|
|
29
|
-
for (const arm of scenario.compare) {
|
|
30
|
-
jobs.push({
|
|
31
|
-
suite: suite,
|
|
32
|
-
scenario: scenario.name,
|
|
33
|
-
host,
|
|
34
|
-
arm: arm.id,
|
|
35
|
-
prompt: arm.prompt ?? scenario.prompt,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
jobs.push({
|
|
41
|
-
suite: suite,
|
|
42
|
-
scenario: scenario.name,
|
|
43
|
-
host,
|
|
44
|
-
prompt: scenario.prompt,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
return jobs;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/viewer/catalog.ts"],"names":[],"mappings":"AAsEA,0EAA0E;AAC1E,MAAM,UAAU,gBAAgB,CAAC,OAAsB,EAAE,OAAyB;IACjF,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,oBAAoB,CAAC;IACpE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK;QAC3B,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAClB,MAAM,IAAI,GAAgB,EAAE,CAAC;IAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QACzE,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ;YACjC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,OAAO,CAAC,QAAQ,CAAC;YAC1E,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;QACnB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACnB,SAAS;YACV,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,GAAG,YAAY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