harnery 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +45 -2
- package/dist/core/workflow/engine.d.ts +5 -0
- package/dist/core/workflow/engine.d.ts.map +1 -1
- package/dist/core/workflow/engine.js +153 -14
- package/dist/core/workflow/index.d.ts +5 -0
- package/dist/core/workflow/index.d.ts.map +1 -0
- package/dist/core/workflow/index.js +3 -0
- package/dist/core/workflow/proof.d.ts +42 -0
- package/dist/core/workflow/proof.d.ts.map +1 -0
- package/dist/core/workflow/proof.js +342 -0
- package/dist/core/workflow/types.d.ts +147 -0
- package/dist/core/workflow/types.d.ts.map +1 -1
- package/dist/core/workflow/types.js +1 -1
- package/package.json +11 -6
- package/src/commands/workflow.ts +54 -2
- package/src/core/workflow/engine.ts +171 -14
- package/src/core/workflow/index.ts +43 -0
- package/src/core/workflow/proof.ts +434 -0
- package/src/core/workflow/types.ts +167 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { WORKFLOW_PROOF_SCHEMA_VERSION } from "./types.js";
|
|
5
|
+
const MAX_ACCEPTANCE_CRITERIA = 50;
|
|
6
|
+
const MAX_EVIDENCE_RECORDS = 200;
|
|
7
|
+
const MAX_PACKET_BYTES = 512 * 1024;
|
|
8
|
+
const MAX_NAME_CHARS = 200;
|
|
9
|
+
const MAX_OBJECTIVE_CHARS = 2_000;
|
|
10
|
+
const MAX_CRITERION_CHARS = 500;
|
|
11
|
+
const MAX_LABEL_CHARS = 200;
|
|
12
|
+
const MAX_SUMMARY_CHARS = 2_000;
|
|
13
|
+
const MAX_REF_CHARS = 1_000;
|
|
14
|
+
const ACCEPTANCE_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
15
|
+
const RUN_ID = /^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$/;
|
|
16
|
+
export function normalizeWorkflowMeta(meta, fallbackName) {
|
|
17
|
+
const name = boundedRequired(meta?.name ?? fallbackName, "workflow name", MAX_NAME_CHARS);
|
|
18
|
+
const objective = boundedOptional(meta?.objective, "workflow objective", MAX_OBJECTIVE_CHARS);
|
|
19
|
+
const description = boundedOptional(meta?.description, "workflow description", MAX_OBJECTIVE_CHARS);
|
|
20
|
+
const acceptance = meta?.acceptance ?? [];
|
|
21
|
+
if (!Array.isArray(acceptance))
|
|
22
|
+
throw new Error("workflow acceptance must be an array");
|
|
23
|
+
if (acceptance.length > MAX_ACCEPTANCE_CRITERIA) {
|
|
24
|
+
throw new Error(`workflow acceptance exceeds ${MAX_ACCEPTANCE_CRITERIA} criteria`);
|
|
25
|
+
}
|
|
26
|
+
const seen = new Set();
|
|
27
|
+
const normalized = acceptance.map((criterion, index) => {
|
|
28
|
+
if (!criterion || typeof criterion !== "object") {
|
|
29
|
+
throw new Error(`workflow acceptance[${index}] must be an object`);
|
|
30
|
+
}
|
|
31
|
+
const id = boundedRequired(criterion.id, `workflow acceptance[${index}].id`, 64);
|
|
32
|
+
if (!ACCEPTANCE_ID.test(id)) {
|
|
33
|
+
throw new Error(`workflow acceptance id ${JSON.stringify(id)} must match ${ACCEPTANCE_ID.source}`);
|
|
34
|
+
}
|
|
35
|
+
if (seen.has(id))
|
|
36
|
+
throw new Error(`duplicate workflow acceptance id ${JSON.stringify(id)}`);
|
|
37
|
+
seen.add(id);
|
|
38
|
+
return {
|
|
39
|
+
id,
|
|
40
|
+
statement: boundedRequired(criterion.statement, `workflow acceptance[${index}].statement`, MAX_CRITERION_CHARS),
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
return { name, description, objective, acceptance: normalized };
|
|
44
|
+
}
|
|
45
|
+
export function createEvidenceRecord(input) {
|
|
46
|
+
if (input.sequence > MAX_EVIDENCE_RECORDS) {
|
|
47
|
+
throw new Error(`workflow evidence exceeds ${MAX_EVIDENCE_RECORDS} records`);
|
|
48
|
+
}
|
|
49
|
+
const value = input.value;
|
|
50
|
+
const acceptanceIds = value.acceptanceIds ?? [];
|
|
51
|
+
if (!Array.isArray(acceptanceIds))
|
|
52
|
+
throw new Error("evidence acceptanceIds must be an array");
|
|
53
|
+
const uniqueAcceptanceIds = [...new Set(acceptanceIds)];
|
|
54
|
+
for (const id of uniqueAcceptanceIds) {
|
|
55
|
+
if (typeof id !== "string" || !input.acceptanceIds.has(id)) {
|
|
56
|
+
throw new Error(`evidence references unknown acceptance id ${JSON.stringify(id)}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
id: `e${input.sequence}`,
|
|
61
|
+
source: "workflow",
|
|
62
|
+
recorded_at: input.recordedAt ?? new Date().toISOString(),
|
|
63
|
+
kind: enumValue(value.kind, ["test", "command", "artifact", "change", "review", "observation"], "evidence kind"),
|
|
64
|
+
status: enumValue(value.status, ["passed", "failed", "observed", "unknown"], "evidence status"),
|
|
65
|
+
label: boundedRequired(value.label, "evidence label", MAX_LABEL_CHARS),
|
|
66
|
+
summary: boundedOptional(value.summary, "evidence summary", MAX_SUMMARY_CHARS),
|
|
67
|
+
ref: boundedOptional(value.ref, "evidence ref", MAX_REF_CHARS),
|
|
68
|
+
stage: boundedOptional(input.stage, "evidence stage", MAX_LABEL_CHARS),
|
|
69
|
+
acceptance_ids: uniqueAcceptanceIds,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export function rollupAcceptance(criteria, evidence) {
|
|
73
|
+
const results = criteria.map((criterion) => {
|
|
74
|
+
const attached = evidence.filter((item) => item.acceptance_ids.includes(criterion.id));
|
|
75
|
+
const failed = attached.filter((item) => item.status === "failed");
|
|
76
|
+
const passed = attached.filter((item) => item.status === "passed");
|
|
77
|
+
const decisive = failed.length > 0 ? failed : passed;
|
|
78
|
+
const status = failed.length > 0 ? "unsatisfied" : passed.length > 0 ? "satisfied" : "unknown";
|
|
79
|
+
return {
|
|
80
|
+
...criterion,
|
|
81
|
+
status,
|
|
82
|
+
evidence_ids: attached.map((item) => item.id),
|
|
83
|
+
sources: [...new Set(decisive.map((item) => item.source))],
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
criteria: results,
|
|
88
|
+
summary: {
|
|
89
|
+
satisfied: results.filter((item) => item.status === "satisfied").length,
|
|
90
|
+
unsatisfied: results.filter((item) => item.status === "unsatisfied").length,
|
|
91
|
+
unknown: results.filter((item) => item.status === "unknown").length,
|
|
92
|
+
total: results.length,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export function digestResult(value, kind) {
|
|
97
|
+
const resolvedKind = kind ?? (typeof value === "string" ? "text" : "json");
|
|
98
|
+
const serialized = resolvedKind === "text" ? String(value) : (JSON.stringify(value) ?? "null");
|
|
99
|
+
return {
|
|
100
|
+
kind: resolvedKind,
|
|
101
|
+
sha256: createHash("sha256").update(serialized).digest("hex"),
|
|
102
|
+
bytes: Buffer.byteLength(serialized),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export function buildWorkflowProof(input) {
|
|
106
|
+
const acceptance = rollupAcceptance(input.meta.acceptance, input.evidence);
|
|
107
|
+
const repository = buildRepoEvidence(input.before, input.after);
|
|
108
|
+
const agents = input.agents.map((agent) => ({
|
|
109
|
+
...agent,
|
|
110
|
+
label: clipped(agent.label, MAX_LABEL_CHARS),
|
|
111
|
+
model: clippedOptional(agent.model, MAX_LABEL_CHARS),
|
|
112
|
+
session_id: clippedOptional(agent.session_id, MAX_REF_CHARS),
|
|
113
|
+
error: clippedOptional(agent.error, MAX_SUMMARY_CHARS),
|
|
114
|
+
}));
|
|
115
|
+
const harnesses = buildHarnessCoverage(agents, input.harnessEvidence);
|
|
116
|
+
const unknowns = buildUnknowns(agents, harnesses, repository);
|
|
117
|
+
const journal = readFileSync(input.journalPath);
|
|
118
|
+
return {
|
|
119
|
+
schema_version: WORKFLOW_PROOF_SCHEMA_VERSION,
|
|
120
|
+
run: {
|
|
121
|
+
id: input.runId,
|
|
122
|
+
name: input.meta.name,
|
|
123
|
+
status: input.status,
|
|
124
|
+
started_at: input.startedAt,
|
|
125
|
+
ended_at: input.endedAt,
|
|
126
|
+
duration_ms: input.durationMs,
|
|
127
|
+
objective: input.meta.objective,
|
|
128
|
+
error: clippedOptional(input.error, MAX_SUMMARY_CHARS),
|
|
129
|
+
result: input.result === undefined ? undefined : digestResult(input.result),
|
|
130
|
+
},
|
|
131
|
+
acceptance,
|
|
132
|
+
agents,
|
|
133
|
+
evidence: input.evidence,
|
|
134
|
+
repository,
|
|
135
|
+
harnesses,
|
|
136
|
+
unknowns,
|
|
137
|
+
integrity: {
|
|
138
|
+
journal: {
|
|
139
|
+
path: "journal.jsonl",
|
|
140
|
+
sha256: createHash("sha256").update(journal).digest("hex"),
|
|
141
|
+
bytes: journal.byteLength,
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export function writeWorkflowProof(path, proof) {
|
|
147
|
+
const body = `${JSON.stringify(proof, null, 2)}\n`;
|
|
148
|
+
const bytes = Buffer.byteLength(body);
|
|
149
|
+
if (bytes > MAX_PACKET_BYTES) {
|
|
150
|
+
throw new Error(`workflow proof is ${bytes} bytes; limit is ${MAX_PACKET_BYTES}`);
|
|
151
|
+
}
|
|
152
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
153
|
+
const temporary = `${path}.tmp-${process.pid}-${randomUUID()}`;
|
|
154
|
+
try {
|
|
155
|
+
writeFileSync(temporary, body, { encoding: "utf8", flag: "wx", mode: 0o600 });
|
|
156
|
+
renameSync(temporary, path);
|
|
157
|
+
chmodSync(path, 0o600);
|
|
158
|
+
}
|
|
159
|
+
finally {
|
|
160
|
+
if (existsSync(temporary))
|
|
161
|
+
unlinkSync(temporary);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
export function readWorkflowProof(coordRoot, runId) {
|
|
165
|
+
if (!RUN_ID.test(runId))
|
|
166
|
+
throw new Error(`invalid workflow run id ${JSON.stringify(runId)}`);
|
|
167
|
+
const path = join(coordRoot, ".harnery", "workflows", runId, "proof.json");
|
|
168
|
+
if (!existsSync(path))
|
|
169
|
+
throw new Error(`workflow run ${runId} has no proof packet at ${path}`);
|
|
170
|
+
const size = statSync(path).size;
|
|
171
|
+
if (size > MAX_PACKET_BYTES) {
|
|
172
|
+
throw new Error(`workflow proof is ${size} bytes; limit is ${MAX_PACKET_BYTES}`);
|
|
173
|
+
}
|
|
174
|
+
let proof;
|
|
175
|
+
try {
|
|
176
|
+
proof = JSON.parse(readFileSync(path, "utf8"));
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
throw new Error(`cannot parse workflow proof at ${path}: ${error.message}`);
|
|
180
|
+
}
|
|
181
|
+
if (proof.schema_version !== WORKFLOW_PROOF_SCHEMA_VERSION || proof.run?.id !== runId) {
|
|
182
|
+
throw new Error(`workflow proof at ${path} has an unsupported or mismatched schema`);
|
|
183
|
+
}
|
|
184
|
+
return proof;
|
|
185
|
+
}
|
|
186
|
+
export function renderWorkflowProof(proof) {
|
|
187
|
+
const lines = [
|
|
188
|
+
`run ${proof.run.id} (${proof.run.name}): ${proof.run.status}`,
|
|
189
|
+
`duration: ${Math.round(proof.run.duration_ms / 1000)}s`,
|
|
190
|
+
];
|
|
191
|
+
if (proof.run.objective)
|
|
192
|
+
lines.push(`objective: ${proof.run.objective}`);
|
|
193
|
+
const summary = proof.acceptance.summary;
|
|
194
|
+
lines.push(`acceptance: ${summary.satisfied} satisfied, ${summary.unsatisfied} unsatisfied, ${summary.unknown} unknown`);
|
|
195
|
+
for (const criterion of proof.acceptance.criteria) {
|
|
196
|
+
const mark = criterion.status === "satisfied" ? "PASS" : criterion.status === "unsatisfied" ? "FAIL" : "?";
|
|
197
|
+
const refs = criterion.evidence_ids.length > 0 ? ` [${criterion.evidence_ids.join(", ")}]` : "";
|
|
198
|
+
lines.push(` ${mark} ${criterion.id}: ${criterion.statement}${refs}`);
|
|
199
|
+
}
|
|
200
|
+
lines.push(`evidence: ${proof.evidence.length} record(s); agents: ${proof.agents.length}`);
|
|
201
|
+
const repo = proof.repository;
|
|
202
|
+
const drift = repo.drift;
|
|
203
|
+
lines.push(`repository: branch ${repo.before.branch ?? "unknown"} -> ${repo.after.branch ?? "unknown"}; ` +
|
|
204
|
+
`HEAD ${short(repo.before.head)} -> ${short(repo.after.head)}; ` +
|
|
205
|
+
`${drift.dirty_paths_added.length} dirty added, ${drift.dirty_paths_cleared.length} cleared`);
|
|
206
|
+
if (proof.unknowns.length > 0) {
|
|
207
|
+
lines.push(`unknowns: ${proof.unknowns.length}`);
|
|
208
|
+
for (const unknown of proof.unknowns)
|
|
209
|
+
lines.push(` - ${unknown.message}`);
|
|
210
|
+
}
|
|
211
|
+
lines.push(`journal sha256: ${proof.integrity.journal.sha256}`);
|
|
212
|
+
return `${lines.join("\n")}\n`;
|
|
213
|
+
}
|
|
214
|
+
function buildRepoEvidence(beforeRaw, afterRaw) {
|
|
215
|
+
const before = normalizeRepoSnapshot(beforeRaw);
|
|
216
|
+
const after = normalizeRepoSnapshot(afterRaw);
|
|
217
|
+
const beforeDirty = new Set(before.dirty_paths);
|
|
218
|
+
const afterDirty = new Set(after.dirty_paths);
|
|
219
|
+
const retained = after.dirty_paths.filter((path) => beforeDirty.has(path));
|
|
220
|
+
const incomplete = Boolean(before.dirty_paths_truncated || after.dirty_paths_truncated || retained.length > 0);
|
|
221
|
+
return {
|
|
222
|
+
source: "engine",
|
|
223
|
+
before,
|
|
224
|
+
after,
|
|
225
|
+
drift: {
|
|
226
|
+
branch_changed: before.branch !== after.branch,
|
|
227
|
+
head_changed: before.head !== after.head,
|
|
228
|
+
dirty_paths_added: after.dirty_paths.filter((path) => !beforeDirty.has(path)),
|
|
229
|
+
dirty_paths_cleared: before.dirty_paths.filter((path) => !afterDirty.has(path)),
|
|
230
|
+
dirty_paths_retained: retained,
|
|
231
|
+
incomplete,
|
|
232
|
+
note: incomplete
|
|
233
|
+
? "Snapshots cannot prove whether retained dirty paths changed during the run, and truncated lists may omit paths."
|
|
234
|
+
: undefined,
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
function normalizeRepoSnapshot(snapshot) {
|
|
239
|
+
return {
|
|
240
|
+
cwd: snapshot.cwd,
|
|
241
|
+
root: snapshot.root,
|
|
242
|
+
branch: snapshot.branch,
|
|
243
|
+
head: snapshot.head,
|
|
244
|
+
dirty_paths: snapshot.dirty_paths,
|
|
245
|
+
dirty_paths_truncated: snapshot.dirty_paths_truncated,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function buildHarnessCoverage(agents, claims) {
|
|
249
|
+
return [...new Set(agents.map((agent) => agent.harness))].map((harness) => {
|
|
250
|
+
const harnessAgents = agents.filter((agent) => agent.harness === harness);
|
|
251
|
+
return {
|
|
252
|
+
harness,
|
|
253
|
+
tool_evidence: claims?.[harness]?.toolEvidence ?? {
|
|
254
|
+
support: "unknown",
|
|
255
|
+
note: "No harness capability claim was supplied to this workflow run.",
|
|
256
|
+
},
|
|
257
|
+
observed: {
|
|
258
|
+
final_results: harnessAgents.filter((agent) => agent.result).length,
|
|
259
|
+
session_ids: harnessAgents.filter((agent) => agent.session_id).length,
|
|
260
|
+
costs: harnessAgents.filter((agent) => agent.cost_usd !== undefined).length,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function buildUnknowns(agents, harnesses, repository) {
|
|
266
|
+
const unknowns = [];
|
|
267
|
+
for (const harness of harnesses) {
|
|
268
|
+
if (harness.tool_evidence.support === "unknown") {
|
|
269
|
+
unknowns.push({
|
|
270
|
+
code: "harness_capability_unregistered",
|
|
271
|
+
harness: harness.harness,
|
|
272
|
+
message: `${harness.harness}: tool-evidence capability was not registered for this run.`,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
else if (harness.tool_evidence.support !== "supported") {
|
|
276
|
+
unknowns.push({
|
|
277
|
+
code: "tool_evidence_unavailable",
|
|
278
|
+
harness: harness.harness,
|
|
279
|
+
message: `${harness.harness}: adapter-native tool evidence is ${harness.tool_evidence.support}.`,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
for (const agent of agents.filter((item) => item.status !== "failed")) {
|
|
284
|
+
if (agent.cost_usd === undefined) {
|
|
285
|
+
unknowns.push({
|
|
286
|
+
code: "agent_cost_unreported",
|
|
287
|
+
harness: agent.harness,
|
|
288
|
+
agent_id: agent.id,
|
|
289
|
+
message: `${agent.id}: ${agent.harness} did not report per-run cost.`,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
if (!agent.session_id) {
|
|
293
|
+
unknowns.push({
|
|
294
|
+
code: "agent_session_unreported",
|
|
295
|
+
harness: agent.harness,
|
|
296
|
+
agent_id: agent.id,
|
|
297
|
+
message: `${agent.id}: ${agent.harness} did not report a child session id.`,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
if (repository.drift.incomplete) {
|
|
302
|
+
unknowns.push({
|
|
303
|
+
code: "repository_drift_incomplete",
|
|
304
|
+
message: repository.drift.note ?? "Repository drift is incomplete.",
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
return unknowns;
|
|
308
|
+
}
|
|
309
|
+
function boundedRequired(value, field, max) {
|
|
310
|
+
if (typeof value !== "string" || value.trim() === "")
|
|
311
|
+
throw new Error(`${field} is required`);
|
|
312
|
+
const normalized = value.trim();
|
|
313
|
+
if (normalized.length > max)
|
|
314
|
+
throw new Error(`${field} exceeds ${max} characters`);
|
|
315
|
+
return normalized;
|
|
316
|
+
}
|
|
317
|
+
function boundedOptional(value, field, max) {
|
|
318
|
+
if (value === undefined)
|
|
319
|
+
return undefined;
|
|
320
|
+
if (typeof value !== "string")
|
|
321
|
+
throw new Error(`${field} must be a string`);
|
|
322
|
+
const normalized = value.trim();
|
|
323
|
+
if (normalized === "")
|
|
324
|
+
return undefined;
|
|
325
|
+
if (normalized.length > max)
|
|
326
|
+
throw new Error(`${field} exceeds ${max} characters`);
|
|
327
|
+
return normalized;
|
|
328
|
+
}
|
|
329
|
+
function enumValue(value, values, field) {
|
|
330
|
+
if (typeof value === "string" && values.includes(value))
|
|
331
|
+
return value;
|
|
332
|
+
throw new Error(`${field} must be one of: ${values.join(", ")}`);
|
|
333
|
+
}
|
|
334
|
+
function short(value) {
|
|
335
|
+
return value ? value.slice(0, 8) : "unknown";
|
|
336
|
+
}
|
|
337
|
+
function clipped(value, max) {
|
|
338
|
+
return value.length <= max ? value : `${value.slice(0, Math.max(0, max - 1))}…`;
|
|
339
|
+
}
|
|
340
|
+
function clippedOptional(value, max) {
|
|
341
|
+
return value === undefined ? undefined : clipped(value, max);
|
|
342
|
+
}
|
|
@@ -7,6 +7,144 @@
|
|
|
7
7
|
* Design record: decision 0015 (portable coordination-aware workflows).
|
|
8
8
|
*/
|
|
9
9
|
import type { BillingMode, BillingProber } from "./billing.js";
|
|
10
|
+
export declare const WORKFLOW_PROOF_SCHEMA_VERSION: 1;
|
|
11
|
+
export type EvidenceKind = "test" | "command" | "artifact" | "change" | "review" | "observation";
|
|
12
|
+
export type EvidenceStatus = "passed" | "failed" | "observed" | "unknown";
|
|
13
|
+
export type EvidenceSource = "workflow" | "engine";
|
|
14
|
+
export type AcceptanceStatus = "satisfied" | "unsatisfied" | "unknown";
|
|
15
|
+
export type WorkflowRunStatus = "succeeded" | "failed";
|
|
16
|
+
export interface AcceptanceCriterion {
|
|
17
|
+
/** Stable identifier referenced by evidence, for example `tests-pass`. */
|
|
18
|
+
id: string;
|
|
19
|
+
statement: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WorkflowEvidenceInput {
|
|
22
|
+
kind: EvidenceKind;
|
|
23
|
+
status: EvidenceStatus;
|
|
24
|
+
label: string;
|
|
25
|
+
summary?: string;
|
|
26
|
+
/** Inspectable local path, URL, command name, or other bounded reference. */
|
|
27
|
+
ref?: string;
|
|
28
|
+
/** Declared acceptance criteria this evidence bears on. */
|
|
29
|
+
acceptanceIds?: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface WorkflowEvidenceRecord {
|
|
32
|
+
id: string;
|
|
33
|
+
source: EvidenceSource;
|
|
34
|
+
recorded_at: string;
|
|
35
|
+
kind: EvidenceKind;
|
|
36
|
+
status: EvidenceStatus;
|
|
37
|
+
label: string;
|
|
38
|
+
summary?: string;
|
|
39
|
+
ref?: string;
|
|
40
|
+
stage?: string;
|
|
41
|
+
acceptance_ids: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface AcceptanceResult extends AcceptanceCriterion {
|
|
44
|
+
status: AcceptanceStatus;
|
|
45
|
+
evidence_ids: string[];
|
|
46
|
+
/** Sources behind the decisive evidence. Empty when status is unknown. */
|
|
47
|
+
sources: EvidenceSource[];
|
|
48
|
+
}
|
|
49
|
+
export interface AcceptanceSummary {
|
|
50
|
+
satisfied: number;
|
|
51
|
+
unsatisfied: number;
|
|
52
|
+
unknown: number;
|
|
53
|
+
total: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ResultDigest {
|
|
56
|
+
kind: "text" | "json";
|
|
57
|
+
sha256: string;
|
|
58
|
+
bytes: number;
|
|
59
|
+
}
|
|
60
|
+
export interface WorkflowAgentProof {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
stage?: string;
|
|
64
|
+
harness: HarnessName;
|
|
65
|
+
model?: string;
|
|
66
|
+
status: "succeeded" | "failed" | "cached";
|
|
67
|
+
attempts: number;
|
|
68
|
+
duration_ms: number;
|
|
69
|
+
cost_usd?: number;
|
|
70
|
+
session_id?: string;
|
|
71
|
+
result?: ResultDigest;
|
|
72
|
+
error?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface WorkflowRepoSnapshot {
|
|
75
|
+
cwd: string;
|
|
76
|
+
root?: string;
|
|
77
|
+
branch?: string;
|
|
78
|
+
head?: string;
|
|
79
|
+
dirty_paths: string[];
|
|
80
|
+
dirty_paths_truncated?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export interface WorkflowRepoEvidence {
|
|
83
|
+
source: "engine";
|
|
84
|
+
before: WorkflowRepoSnapshot;
|
|
85
|
+
after: WorkflowRepoSnapshot;
|
|
86
|
+
drift: {
|
|
87
|
+
branch_changed: boolean;
|
|
88
|
+
head_changed: boolean;
|
|
89
|
+
dirty_paths_added: string[];
|
|
90
|
+
dirty_paths_cleared: string[];
|
|
91
|
+
dirty_paths_retained: string[];
|
|
92
|
+
/** True when snapshots cannot prove whether every retained dirty path changed. */
|
|
93
|
+
incomplete: boolean;
|
|
94
|
+
note?: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface HarnessEvidenceCoverage {
|
|
98
|
+
harness: HarnessName;
|
|
99
|
+
tool_evidence: {
|
|
100
|
+
support: "supported" | "partial" | "unsupported" | "unknown";
|
|
101
|
+
note?: string;
|
|
102
|
+
};
|
|
103
|
+
observed: {
|
|
104
|
+
final_results: number;
|
|
105
|
+
session_ids: number;
|
|
106
|
+
costs: number;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export interface WorkflowProofUnknown {
|
|
110
|
+
code: "tool_evidence_unavailable" | "harness_capability_unregistered" | "agent_cost_unreported" | "agent_session_unreported" | "repository_drift_incomplete";
|
|
111
|
+
message: string;
|
|
112
|
+
harness?: HarnessName;
|
|
113
|
+
agent_id?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface WorkflowProof {
|
|
116
|
+
schema_version: typeof WORKFLOW_PROOF_SCHEMA_VERSION;
|
|
117
|
+
run: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
status: WorkflowRunStatus;
|
|
121
|
+
started_at: string;
|
|
122
|
+
ended_at: string;
|
|
123
|
+
duration_ms: number;
|
|
124
|
+
objective?: string;
|
|
125
|
+
error?: string;
|
|
126
|
+
result?: ResultDigest;
|
|
127
|
+
};
|
|
128
|
+
acceptance: {
|
|
129
|
+
criteria: AcceptanceResult[];
|
|
130
|
+
summary: AcceptanceSummary;
|
|
131
|
+
};
|
|
132
|
+
agents: WorkflowAgentProof[];
|
|
133
|
+
evidence: WorkflowEvidenceRecord[];
|
|
134
|
+
repository: WorkflowRepoEvidence;
|
|
135
|
+
harnesses: HarnessEvidenceCoverage[];
|
|
136
|
+
unknowns: WorkflowProofUnknown[];
|
|
137
|
+
integrity: {
|
|
138
|
+
journal: {
|
|
139
|
+
path: "journal.jsonl";
|
|
140
|
+
sha256: string;
|
|
141
|
+
bytes: number;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export interface HarnessEvidenceCapability {
|
|
146
|
+
toolEvidence: HarnessEvidenceCoverage["tool_evidence"];
|
|
147
|
+
}
|
|
10
148
|
/** JSON-schema *subset* accepted by stage gates (see validate.ts). */
|
|
11
149
|
export interface StageSchema {
|
|
12
150
|
type: "object" | "array" | "string" | "number" | "boolean";
|
|
@@ -86,10 +224,14 @@ export interface WorkflowContext {
|
|
|
86
224
|
stage: (title: string) => void;
|
|
87
225
|
/** Narrate progress (stderr + journal). */
|
|
88
226
|
log: (message: string) => void;
|
|
227
|
+
/** Attach a bounded, sourced receipt to the run and optional acceptance criteria. */
|
|
228
|
+
evidence: (input: WorkflowEvidenceInput) => string;
|
|
89
229
|
}
|
|
90
230
|
export interface WorkflowMeta {
|
|
91
231
|
name: string;
|
|
92
232
|
description?: string;
|
|
233
|
+
objective?: string;
|
|
234
|
+
acceptance?: AcceptanceCriterion[];
|
|
93
235
|
}
|
|
94
236
|
/** Loaded script shape: `export const meta` + `export default async (ctx) => …`. */
|
|
95
237
|
export interface WorkflowModule {
|
|
@@ -127,6 +269,9 @@ export interface EngineOpts {
|
|
|
127
269
|
allowApiBilling?: boolean;
|
|
128
270
|
/** Billing-probe override for tests (default: the real probeBilling). */
|
|
129
271
|
probeBilling?: BillingProber;
|
|
272
|
+
/** Capability claims used to state whether adapter-native tool evidence was
|
|
273
|
+
* available. Missing claims remain unknown. */
|
|
274
|
+
harnessEvidence?: Readonly<Record<HarnessName, HarnessEvidenceCapability | undefined>>;
|
|
130
275
|
}
|
|
131
276
|
export interface RunReport {
|
|
132
277
|
runId: string;
|
|
@@ -139,6 +284,8 @@ export interface RunReport {
|
|
|
139
284
|
costUsd: number;
|
|
140
285
|
durationMs: number;
|
|
141
286
|
journalPath: string;
|
|
287
|
+
proofPath: string;
|
|
288
|
+
acceptance: AcceptanceSummary;
|
|
142
289
|
/** Estimated tokens of repo instructions (CLAUDE.md/AGENTS.md at the child
|
|
143
290
|
* cwd) that EVERY child cache-writes on spawn — the fixed per-child context
|
|
144
291
|
* overhead a fan-out multiplies. bytes/4 heuristic; 0 when no such file. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/workflow/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE/D,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC3D,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,qDAAqD;IACrD,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,SAAS;IACxB;;8EAE0E;IAC1E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,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
|
|
2
2
|
"name": "harnery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Multi-agent coordination for AI coding agents - Claude Code, Cursor, and Codex.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ryan Kelly",
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
"types": "./dist/core/context/index.d.ts",
|
|
63
63
|
"import": "./dist/core/context/index.js"
|
|
64
64
|
},
|
|
65
|
+
"./core/workflow": {
|
|
66
|
+
"bun": "./src/core/workflow/index.ts",
|
|
67
|
+
"types": "./dist/core/workflow/index.d.ts",
|
|
68
|
+
"import": "./dist/core/workflow/index.js"
|
|
69
|
+
},
|
|
65
70
|
"./lib/agent-browser": {
|
|
66
71
|
"bun": "./src/lib/agent-browser/index.ts",
|
|
67
72
|
"types": "./dist/lib/agent-browser/index.d.ts",
|
|
@@ -125,7 +130,7 @@
|
|
|
125
130
|
"!src/**/*.test.tsx"
|
|
126
131
|
],
|
|
127
132
|
"engines": {
|
|
128
|
-
"node": ">=20"
|
|
133
|
+
"node": ">=20.19.0"
|
|
129
134
|
},
|
|
130
135
|
"publishConfig": {
|
|
131
136
|
"access": "public",
|
|
@@ -147,17 +152,17 @@
|
|
|
147
152
|
"test:web": "cd web && bun install && bun test",
|
|
148
153
|
"test:integration": "bash tests/integration/run.sh",
|
|
149
154
|
"smoke": "node scripts/smoke-test.mjs",
|
|
150
|
-
"docs:dev": "bun --cwd docs
|
|
151
|
-
"docs:build": "bun --cwd docs
|
|
155
|
+
"docs:dev": "bun run --bun --cwd docs dev",
|
|
156
|
+
"docs:build": "bun run --bun --cwd docs build",
|
|
152
157
|
"brand:showcase": "node scripts/build-brand-showcase.mjs"
|
|
153
158
|
},
|
|
154
159
|
"dependencies": {
|
|
155
160
|
"@mozilla/readability": "^0.6.0",
|
|
156
|
-
"commander": "^
|
|
161
|
+
"commander": "^14.0.3",
|
|
157
162
|
"gpt-tokenizer": "^3.4.0",
|
|
158
163
|
"js-yaml": "^4.1.1",
|
|
159
164
|
"linkedom": "^0.18.0",
|
|
160
|
-
"mailparser": "^3.9.
|
|
165
|
+
"mailparser": "^3.9.14",
|
|
161
166
|
"pixelmatch": "^7.2.0",
|
|
162
167
|
"playwright": "^1.59.1",
|
|
163
168
|
"pngjs": "^7.0.0",
|