@multileaf/ai-workflow 0.14.0 → 0.16.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/CHANGELOG.md +17 -0
- package/README.md +11 -0
- package/dist/adapter.js +3 -3
- package/dist/artifact-paths.d.ts +16 -0
- package/dist/artifact-paths.js +51 -0
- package/dist/completion-report.d.ts +17 -0
- package/dist/completion-report.js +42 -0
- package/dist/dashboard.js +7 -1
- package/dist/decision.d.ts +15 -0
- package/dist/decision.js +63 -0
- package/dist/eval/brief.d.ts +7 -0
- package/dist/eval/brief.js +28 -0
- package/dist/eval/generated.d.ts +17 -0
- package/dist/eval/generated.js +41 -0
- package/dist/eval/git.d.ts +13 -0
- package/dist/eval/git.js +70 -0
- package/dist/eval/monitor.d.ts +32 -0
- package/dist/eval/monitor.js +66 -0
- package/dist/eval/policy.d.ts +8 -0
- package/dist/eval/policy.js +9 -0
- package/dist/eval/proposals.d.ts +48 -0
- package/dist/eval/proposals.js +202 -0
- package/dist/eval/scenarios.d.ts +100 -0
- package/dist/eval/scenarios.js +374 -0
- package/dist/eval/signals.d.ts +21 -0
- package/dist/eval/signals.js +155 -0
- package/dist/eval/types.d.ts +38 -0
- package/dist/eval/types.js +1 -0
- package/dist/eval/validate.d.ts +28 -0
- package/dist/eval/validate.js +66 -0
- package/dist/generator.d.ts +8 -1
- package/dist/generator.js +24 -1
- package/dist/risk-assess.d.ts +1 -1
- package/dist/risk-assess.js +26 -2
- package/dist/semantic.d.ts +19 -0
- package/dist/semantic.js +57 -0
- package/dist/services.d.ts +3 -0
- package/dist/telemetry.d.ts +6 -0
- package/dist/telemetry.js +14 -7
- package/dist/workflow.js +532 -68
- package/docs/backlog.md +13 -3
- package/docs/decision-model-evaluation.md +7 -2
- package/docs/opportunities/OPP-007-decision-findings-triage-scope-watch.md +1 -1
- package/docs/opportunities/OPP-008-embedding-covering-tests-judge-context.md +1 -1
- package/docs/opportunities/OPP-016-behavioral-eval-scenarios.md +1 -1
- package/docs/quality.md +15 -0
- package/docs/semantic-mapping.md +9 -0
- package/package.json +1 -1
- package/resources/evals/README.md +59 -0
- package/resources/evals/scenarios/approval-boundary-full.yml +42 -0
- package/resources/evals/scenarios/bugfix-process-entry.yml +41 -0
- package/resources/evals/scenarios/evaluator-draft-contract.yml +65 -0
- package/resources/evals/scenarios/light-lane-skips-durable-artifacts.yml +40 -0
- package/resources/evals/scenarios/rejection-regate.yml +74 -0
- package/resources/evals/scenarios/risk-escalation-high-risk-area.yml +45 -0
- package/resources/package.yaml +1 -0
- package/resources/skills/resource-evaluator.md +24 -0
- package/resources/skills/review-judge-a.md +4 -0
- package/resources/skills/review-judge-b.md +4 -0
- package/resources/skills/review-refuter.md +4 -0
- package/resources/skills/ticket.md +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ProposalKind, type ProposalStore, type SurfaceVerdict } from "./types.js";
|
|
2
|
+
export declare const PROPOSALS_STORE_SCHEMA = 1;
|
|
3
|
+
/** Evidence refs kept per proposal: bounded growth, most recent first-class. */
|
|
4
|
+
export declare const MAX_EVIDENCE_REFS = 20;
|
|
5
|
+
/** Evidence refs kept after a proposal reaches a terminal state. */
|
|
6
|
+
export declare const COMPACT_EVIDENCE_REFS = 5;
|
|
7
|
+
export declare function createEmptyStore(): ProposalStore;
|
|
8
|
+
export type Occurrence = {
|
|
9
|
+
kind: ProposalKind;
|
|
10
|
+
signature: string;
|
|
11
|
+
origin?: "onboarding" | "monitor";
|
|
12
|
+
/** Artifact reference for this occurrence; defaults to a sequence marker. */
|
|
13
|
+
evidence?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Stable content hash of a draft record: identical re-imports are no-ops. */
|
|
16
|
+
export declare function draftSignatureHash(record: {
|
|
17
|
+
kind: string;
|
|
18
|
+
signature: string;
|
|
19
|
+
title: string;
|
|
20
|
+
outline: string;
|
|
21
|
+
evidence: string[];
|
|
22
|
+
}): string;
|
|
23
|
+
/**
|
|
24
|
+
* Record one observation of a pattern. Occurrences deduplicate by signature:
|
|
25
|
+
* the proposal is created once and its evidence list grows per occurrence.
|
|
26
|
+
*/
|
|
27
|
+
export declare function recordOccurrence(store: ProposalStore, occurrence: Occurrence): void;
|
|
28
|
+
/** Record `count` occurrences of one pattern in a single call (test/batch helper). */
|
|
29
|
+
export declare function recordMany(store: ProposalStore, occurrence: Occurrence, count: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* Compact terminal proposals (approved/rejected/suppressed): their evidence
|
|
32
|
+
* already served the human review, so only the most recent refs are kept.
|
|
33
|
+
* Deterministic normalization — does not advance the sequence.
|
|
34
|
+
*/
|
|
35
|
+
export declare function compactProposalStore(store: ProposalStore): void;
|
|
36
|
+
/**
|
|
37
|
+
* Decide whether a pattern may surface to the human. Pure check plus one
|
|
38
|
+
* honest side effect: a positive verdict records the surface event
|
|
39
|
+
* (`lastSurfacedSeq`), which is what makes the cooldown gap measurable.
|
|
40
|
+
* Callers that only inspect state should read the returned reason.
|
|
41
|
+
*/
|
|
42
|
+
export declare function shouldSurfaceProposal(store: ProposalStore, signature: string): SurfaceVerdict;
|
|
43
|
+
export declare function approveProposal(store: ProposalStore, id: string): void;
|
|
44
|
+
export declare function rejectProposal(store: ProposalStore, id: string, reason: string): void;
|
|
45
|
+
export declare function suppressProposal(store: ProposalStore, id: string): void;
|
|
46
|
+
/** Deterministic serialization: same store state yields byte-identical YAML. */
|
|
47
|
+
export declare function serializeProposalStore(store: ProposalStore): string;
|
|
48
|
+
export declare function parseProposalStore(content: string): ProposalStore;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { parseDocument } from "yaml";
|
|
3
|
+
import { defaultPolicy } from "./policy.js";
|
|
4
|
+
import { PROPOSAL_KINDS, } from "./types.js";
|
|
5
|
+
export const PROPOSALS_STORE_SCHEMA = 1;
|
|
6
|
+
/** Evidence refs kept per proposal: bounded growth, most recent first-class. */
|
|
7
|
+
export const MAX_EVIDENCE_REFS = 20;
|
|
8
|
+
/** Evidence refs kept after a proposal reaches a terminal state. */
|
|
9
|
+
export const COMPACT_EVIDENCE_REFS = 5;
|
|
10
|
+
export function createEmptyStore() {
|
|
11
|
+
return {
|
|
12
|
+
schema: PROPOSALS_STORE_SCHEMA,
|
|
13
|
+
seq: 0,
|
|
14
|
+
lastSurfacedSeq: 0,
|
|
15
|
+
policy: defaultPolicy(),
|
|
16
|
+
proposals: [],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Stable content hash of a draft record: identical re-imports are no-ops. */
|
|
20
|
+
export function draftSignatureHash(record) {
|
|
21
|
+
return createHash("sha256")
|
|
22
|
+
.update([record.kind, record.signature, record.title, record.outline, record.evidence.join(",")].join("\u0000"))
|
|
23
|
+
.digest("hex");
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Record one observation of a pattern. Occurrences deduplicate by signature:
|
|
27
|
+
* the proposal is created once and its evidence list grows per occurrence.
|
|
28
|
+
*/
|
|
29
|
+
export function recordOccurrence(store, occurrence) {
|
|
30
|
+
store.seq += 1;
|
|
31
|
+
const existing = store.proposals.find((proposal) => proposal.signature === occurrence.signature);
|
|
32
|
+
if (existing) {
|
|
33
|
+
existing.occurrences += 1;
|
|
34
|
+
existing.lastSeq = store.seq;
|
|
35
|
+
existing.evidence.push(occurrence.evidence ?? `occurrences/${store.seq}`);
|
|
36
|
+
if (existing.evidence.length > MAX_EVIDENCE_REFS)
|
|
37
|
+
existing.evidence.splice(0, existing.evidence.length - MAX_EVIDENCE_REFS);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const number = store.proposals.length + 1;
|
|
41
|
+
store.proposals.push({
|
|
42
|
+
id: `prop-${String(number).padStart(3, "0")}`,
|
|
43
|
+
kind: occurrence.kind,
|
|
44
|
+
origin: occurrence.origin ?? "monitor",
|
|
45
|
+
signature: occurrence.signature,
|
|
46
|
+
status: "proposed",
|
|
47
|
+
title: "",
|
|
48
|
+
outline: "",
|
|
49
|
+
evidence: [occurrence.evidence ?? `occurrences/${store.seq}`],
|
|
50
|
+
occurrences: 1,
|
|
51
|
+
lastSeq: store.seq,
|
|
52
|
+
rejectReason: null,
|
|
53
|
+
rejectedAtOccurrences: null,
|
|
54
|
+
provenance: "",
|
|
55
|
+
draftHash: null,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** Record `count` occurrences of one pattern in a single call (test/batch helper). */
|
|
59
|
+
export function recordMany(store, occurrence, count) {
|
|
60
|
+
for (let index = 0; index < count; index += 1)
|
|
61
|
+
recordOccurrence(store, occurrence);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Compact terminal proposals (approved/rejected/suppressed): their evidence
|
|
65
|
+
* already served the human review, so only the most recent refs are kept.
|
|
66
|
+
* Deterministic normalization — does not advance the sequence.
|
|
67
|
+
*/
|
|
68
|
+
export function compactProposalStore(store) {
|
|
69
|
+
for (const proposal of store.proposals)
|
|
70
|
+
if (proposal.status !== "proposed" && proposal.evidence.length > COMPACT_EVIDENCE_REFS)
|
|
71
|
+
proposal.evidence.splice(0, proposal.evidence.length - COMPACT_EVIDENCE_REFS);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Decide whether a pattern may surface to the human. Pure check plus one
|
|
75
|
+
* honest side effect: a positive verdict records the surface event
|
|
76
|
+
* (`lastSurfacedSeq`), which is what makes the cooldown gap measurable.
|
|
77
|
+
* Callers that only inspect state should read the returned reason.
|
|
78
|
+
*/
|
|
79
|
+
export function shouldSurfaceProposal(store, signature) {
|
|
80
|
+
const proposal = store.proposals.find((candidate) => candidate.signature === signature);
|
|
81
|
+
if (!proposal)
|
|
82
|
+
return { surface: false, reason: "no proposal recorded for this signature" };
|
|
83
|
+
if (store.policy.suppressed.includes(signature) || proposal.status === "suppressed")
|
|
84
|
+
return { surface: false, reason: "suppressed by do-not-suggest-again policy" };
|
|
85
|
+
if (proposal.status === "approved")
|
|
86
|
+
return { surface: false, reason: "already approved" };
|
|
87
|
+
if (proposal.status === "rejected") {
|
|
88
|
+
const cited = proposal.rejectedAtOccurrences ?? proposal.occurrences;
|
|
89
|
+
if (proposal.occurrences <= cited)
|
|
90
|
+
return { surface: false, reason: "rejected without new occurrences since rejection" };
|
|
91
|
+
}
|
|
92
|
+
if (proposal.occurrences < store.policy.threshold)
|
|
93
|
+
return {
|
|
94
|
+
surface: false,
|
|
95
|
+
reason: `below threshold: ${proposal.occurrences}/${store.policy.threshold} occurrences`,
|
|
96
|
+
};
|
|
97
|
+
if (store.lastSurfacedSeq > 0 && store.seq - store.lastSurfacedSeq < store.policy.cooldown)
|
|
98
|
+
return {
|
|
99
|
+
surface: false,
|
|
100
|
+
reason: `cooldown: ${store.seq - store.lastSurfacedSeq}/${store.policy.cooldown} sequence gap since last surfacing`,
|
|
101
|
+
};
|
|
102
|
+
store.lastSurfacedSeq = store.seq;
|
|
103
|
+
return { surface: true, reason: `threshold met with ${proposal.occurrences} occurrences` };
|
|
104
|
+
}
|
|
105
|
+
function byId(store, id) {
|
|
106
|
+
const proposal = store.proposals.find((candidate) => candidate.id === id);
|
|
107
|
+
if (!proposal)
|
|
108
|
+
throw new Error(`Unknown proposal id: ${id}`);
|
|
109
|
+
return proposal;
|
|
110
|
+
}
|
|
111
|
+
export function approveProposal(store, id) {
|
|
112
|
+
store.seq += 1;
|
|
113
|
+
byId(store, id).status = "approved";
|
|
114
|
+
}
|
|
115
|
+
export function rejectProposal(store, id, reason) {
|
|
116
|
+
store.seq += 1;
|
|
117
|
+
const proposal = byId(store, id);
|
|
118
|
+
proposal.status = "rejected";
|
|
119
|
+
proposal.rejectReason = reason;
|
|
120
|
+
proposal.rejectedAtOccurrences = proposal.occurrences;
|
|
121
|
+
}
|
|
122
|
+
export function suppressProposal(store, id) {
|
|
123
|
+
store.seq += 1;
|
|
124
|
+
const proposal = byId(store, id);
|
|
125
|
+
proposal.status = "suppressed";
|
|
126
|
+
if (!store.policy.suppressed.includes(proposal.signature))
|
|
127
|
+
store.policy.suppressed.push(proposal.signature);
|
|
128
|
+
}
|
|
129
|
+
function scalar(value) {
|
|
130
|
+
return `"${value.replaceAll("\\", "\\\\").replaceAll('"', '\\"').replaceAll("\n", "\\n")}"`;
|
|
131
|
+
}
|
|
132
|
+
/** Deterministic serialization: same store state yields byte-identical YAML. */
|
|
133
|
+
export function serializeProposalStore(store) {
|
|
134
|
+
const lines = [
|
|
135
|
+
`schema: ${store.schema}`,
|
|
136
|
+
`seq: ${store.seq}`,
|
|
137
|
+
`last_surfaced_seq: ${store.lastSurfacedSeq}`,
|
|
138
|
+
"policy:",
|
|
139
|
+
` threshold: ${store.policy.threshold}`,
|
|
140
|
+
` cooldown: ${store.policy.cooldown}`,
|
|
141
|
+
` suppressed: [${store.policy.suppressed.join(", ")}]`,
|
|
142
|
+
"proposals:",
|
|
143
|
+
];
|
|
144
|
+
for (const proposal of store.proposals) {
|
|
145
|
+
lines.push(` - id: ${proposal.id}`, ` kind: ${proposal.kind}`, ` origin: ${proposal.origin}`, ` signature: ${scalar(proposal.signature)}`, ` status: ${proposal.status}`, ` title: ${scalar(proposal.title)}`, ` outline: ${scalar(proposal.outline)}`, ` evidence: [${proposal.evidence.map(scalar).join(", ")}]`, ` occurrences: ${proposal.occurrences}`, ` last_seq: ${proposal.lastSeq}`, ` reject_reason: ${proposal.rejectReason === null ? "null" : scalar(proposal.rejectReason)}`, ` rejected_at_occurrences: ${proposal.rejectedAtOccurrences ?? "null"}`, ` provenance: ${scalar(proposal.provenance)}`, ` draft_hash: ${proposal.draftHash === null ? "null" : scalar(proposal.draftHash)}`);
|
|
146
|
+
}
|
|
147
|
+
return `${lines.join("\n")}\n`;
|
|
148
|
+
}
|
|
149
|
+
function parseProposal(raw, index) {
|
|
150
|
+
const kind = String(raw.kind);
|
|
151
|
+
if (!PROPOSAL_KINDS.includes(kind))
|
|
152
|
+
throw new Error(`Invalid proposal kind: ${kind}`);
|
|
153
|
+
const status = raw.status;
|
|
154
|
+
if (!["proposed", "approved", "rejected", "suppressed"].includes(String(status)))
|
|
155
|
+
throw new Error(`Invalid proposal status: ${status}`);
|
|
156
|
+
return {
|
|
157
|
+
id: String(raw.id ?? `prop-${String(index + 1).padStart(3, "0")}`),
|
|
158
|
+
kind: kind,
|
|
159
|
+
origin: (raw.origin === "onboarding" ? "onboarding" : "monitor"),
|
|
160
|
+
signature: String(raw.signature ?? ""),
|
|
161
|
+
status: status,
|
|
162
|
+
title: String(raw.title ?? ""),
|
|
163
|
+
outline: String(raw.outline ?? ""),
|
|
164
|
+
evidence: Array.isArray(raw.evidence) ? raw.evidence.map(String) : [],
|
|
165
|
+
occurrences: Number(raw.occurrences ?? 0),
|
|
166
|
+
lastSeq: Number(raw.last_seq ?? 0),
|
|
167
|
+
rejectReason: raw.reject_reason === null || raw.reject_reason === undefined
|
|
168
|
+
? null
|
|
169
|
+
: String(raw.reject_reason),
|
|
170
|
+
rejectedAtOccurrences: raw.rejected_at_occurrences === null || raw.rejected_at_occurrences === undefined
|
|
171
|
+
? null
|
|
172
|
+
: Number(raw.rejected_at_occurrences),
|
|
173
|
+
provenance: String(raw.provenance ?? ""),
|
|
174
|
+
draftHash: raw.draft_hash === null || raw.draft_hash === undefined ? null : String(raw.draft_hash),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export function parseProposalStore(content) {
|
|
178
|
+
const document = parseDocument(content);
|
|
179
|
+
const raw = document.toJS();
|
|
180
|
+
if (!raw || Number(raw.schema) !== PROPOSALS_STORE_SCHEMA)
|
|
181
|
+
throw new Error(`Unsupported proposal store schema: ${String(raw?.schema)}`);
|
|
182
|
+
const policy = defaultPolicy();
|
|
183
|
+
const rawPolicy = raw.policy;
|
|
184
|
+
if (rawPolicy) {
|
|
185
|
+
if (Number.isFinite(Number(rawPolicy.threshold)))
|
|
186
|
+
policy.threshold = Number(rawPolicy.threshold);
|
|
187
|
+
if (Number.isFinite(Number(rawPolicy.cooldown)))
|
|
188
|
+
policy.cooldown = Number(rawPolicy.cooldown);
|
|
189
|
+
if (Array.isArray(rawPolicy.suppressed))
|
|
190
|
+
policy.suppressed = rawPolicy.suppressed.map(String);
|
|
191
|
+
}
|
|
192
|
+
const proposals = Array.isArray(raw.proposals)
|
|
193
|
+
? raw.proposals.map((entry, index) => parseProposal(entry, index))
|
|
194
|
+
: [];
|
|
195
|
+
return {
|
|
196
|
+
schema: PROPOSALS_STORE_SCHEMA,
|
|
197
|
+
seq: Number(raw.seq ?? 0),
|
|
198
|
+
lastSurfacedSeq: Number(raw.last_surfaced_seq ?? 0),
|
|
199
|
+
policy,
|
|
200
|
+
proposals,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export type ScenarioStatus = "passed" | "failed" | "skipped-harness-unavailable" | "flaky-suspect" | "aborted-timeout" | "aborted-budget" | "aborted-pool";
|
|
2
|
+
export type ScenarioExpectation = {
|
|
3
|
+
exitCode?: number;
|
|
4
|
+
files?: Record<string, {
|
|
5
|
+
contains?: string;
|
|
6
|
+
notContains?: string;
|
|
7
|
+
absent?: boolean;
|
|
8
|
+
matches?: string;
|
|
9
|
+
}>;
|
|
10
|
+
/** Directory-level assertions (e.g. durable artifacts a light lane must skip). */
|
|
11
|
+
dirs?: Record<string, {
|
|
12
|
+
absent?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
export type ScenarioDefinition = {
|
|
16
|
+
schema: number;
|
|
17
|
+
id: string;
|
|
18
|
+
family: string;
|
|
19
|
+
description: string;
|
|
20
|
+
/** Harness CLI id (e.g. codex, claude, gemini) — availability is probed on PATH. */
|
|
21
|
+
harness: string;
|
|
22
|
+
/** Shell command template; must contain the {prompt} placeholder. */
|
|
23
|
+
command: string;
|
|
24
|
+
prompt: string;
|
|
25
|
+
fixture: {
|
|
26
|
+
files: {
|
|
27
|
+
path: string;
|
|
28
|
+
content: string;
|
|
29
|
+
}[];
|
|
30
|
+
setup?: string[];
|
|
31
|
+
git?: boolean;
|
|
32
|
+
};
|
|
33
|
+
expected: ScenarioExpectation;
|
|
34
|
+
budget?: {
|
|
35
|
+
wallClockS?: number;
|
|
36
|
+
tokenCeiling?: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type ScenarioUsage = {
|
|
40
|
+
tokensIn: number;
|
|
41
|
+
tokensOut: number;
|
|
42
|
+
};
|
|
43
|
+
export type ScenarioResult = {
|
|
44
|
+
scenario: string;
|
|
45
|
+
family: string;
|
|
46
|
+
status: ScenarioStatus;
|
|
47
|
+
attempts: number;
|
|
48
|
+
durationMs: number;
|
|
49
|
+
usage?: ScenarioUsage;
|
|
50
|
+
detail: string;
|
|
51
|
+
};
|
|
52
|
+
export type ScenarioRunReport = {
|
|
53
|
+
schema: "aiw.scenario-results/v1";
|
|
54
|
+
harness: string;
|
|
55
|
+
startedAt: string;
|
|
56
|
+
finishedAt: string;
|
|
57
|
+
poolBudget?: {
|
|
58
|
+
tokenCeiling: number;
|
|
59
|
+
tokensSpent: number;
|
|
60
|
+
};
|
|
61
|
+
missingHarnesses: string[];
|
|
62
|
+
results: ScenarioResult[];
|
|
63
|
+
};
|
|
64
|
+
export type ShellResult = {
|
|
65
|
+
exitCode: number;
|
|
66
|
+
stdout: string;
|
|
67
|
+
stderr: string;
|
|
68
|
+
timedOut?: boolean;
|
|
69
|
+
signal?: string;
|
|
70
|
+
};
|
|
71
|
+
export type ShellRunner = (cwd: string, command: string, timeoutMs: number) => Promise<ShellResult>;
|
|
72
|
+
export declare function parseScenarioRegistry(entries: {
|
|
73
|
+
path: string;
|
|
74
|
+
content: string;
|
|
75
|
+
}[]): ScenarioDefinition[];
|
|
76
|
+
/** Replaces {prompt} with a safely single-quoted shell literal. */
|
|
77
|
+
export declare function expandCommand(template: string, prompt: string): string;
|
|
78
|
+
/**
|
|
79
|
+
* Best-effort usage sidecar: parses harness stdout for known usage shapes
|
|
80
|
+
* (codex `token_usage`, claude `usage`). Absence returns undefined — usage is
|
|
81
|
+
* never fabricated.
|
|
82
|
+
*/
|
|
83
|
+
export declare function extractUsage(output: string): ScenarioUsage | undefined;
|
|
84
|
+
/** PATH probe for a harness CLI binary; injectable for tests. */
|
|
85
|
+
export declare function isHarnessAvailable(harness: string, pathEnv?: string): boolean;
|
|
86
|
+
export declare function outcomeFingerprint(report: ScenarioRunReport): string[];
|
|
87
|
+
export declare function serializeScenarioResults(report: ScenarioRunReport): string;
|
|
88
|
+
export type Fixture = {
|
|
89
|
+
dir: string;
|
|
90
|
+
cleanup: () => void;
|
|
91
|
+
};
|
|
92
|
+
export declare function runScenarios(options: {
|
|
93
|
+
scenarios: ScenarioDefinition[];
|
|
94
|
+
runShell: ShellRunner;
|
|
95
|
+
buildFixture?: (scenario: ScenarioDefinition) => Promise<Fixture>;
|
|
96
|
+
isAvailable?: (harness: string) => boolean;
|
|
97
|
+
poolTokenCeiling?: number;
|
|
98
|
+
now?: () => Date;
|
|
99
|
+
}): Promise<ScenarioRunReport>;
|
|
100
|
+
export declare function defaultShellRunner(cwd: string, command: string, timeoutMs: number): Promise<ShellResult>;
|