@iowarp/clio-coder 0.3.4 → 0.3.6
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 +37 -2
- package/CONTRIBUTING.md +6 -6
- package/README.md +2 -2
- package/dist/{acp-S5R4RR5B.js → acp-2BEHC4DL.js} +4 -4
- package/dist/{agents-P6DMMVZY.js → agents-LNNFTM53.js} +13 -11
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-2XCZLPKS.js → auth-KXXFI2VS.js} +6 -6
- package/dist/{chunk-YCWGATWI.js → chunk-24I7BN55.js} +2 -2
- package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
- package/dist/chunk-3BPUFZDL.js +37 -0
- package/dist/{chunk-WPQLXFOZ.js → chunk-43AOLP7E.js} +2 -2
- package/dist/{chunk-N4CZJQRK.js → chunk-5JGRAMKL.js} +4 -4
- package/dist/{chunk-BRXQQJFP.js → chunk-6US73PDB.js} +568 -47
- package/dist/{chunk-K6WL7QZT.js → chunk-6XXKFVSN.js} +2 -2
- package/dist/{chunk-QQK64KLB.js → chunk-CJUB2JJ2.js} +138 -20
- package/dist/{chunk-HV5X7OR2.js → chunk-CKXWIANG.js} +12 -12
- package/dist/{chunk-UZHIZC5S.js → chunk-CYQKWTG3.js} +61 -76
- package/dist/{chunk-QWU7ZBO7.js → chunk-DJVECN66.js} +204 -45
- package/dist/{chunk-ZWMF7253.js → chunk-E2ER4LJF.js} +304 -9
- package/dist/{chunk-7RXG6QRZ.js → chunk-EKY57CSP.js} +2 -75
- package/dist/{chunk-EDRHSCIE.js → chunk-EYPA3EGJ.js} +10 -2
- package/dist/{chunk-TTNYS3EA.js → chunk-G7MUEIGA.js} +1 -1
- package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
- package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
- package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
- package/dist/chunk-HWUFFB6L.js +83 -0
- package/dist/{chunk-35MKKU5R.js → chunk-K7T3E2SR.js} +15 -8
- package/dist/{chunk-VAWWTKDP.js → chunk-KHSFENX2.js} +2 -2
- package/dist/chunk-LCGCVYZ4.js +57 -0
- package/dist/{chunk-X6COSD2O.js → chunk-LYF7OHWH.js} +41 -14
- package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
- package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
- package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
- package/dist/{chunk-3JLKSKD7.js → chunk-OH3TOQTB.js} +5 -1
- package/dist/{chunk-MEQ45TQ4.js → chunk-PBTHKCPN.js} +18 -4
- package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
- package/dist/{chunk-QQL5RT5M.js → chunk-QM3F2GKX.js} +94 -36
- package/dist/{chunk-A2GZF7DC.js → chunk-QNQHSOLF.js} +4 -4
- package/dist/{chunk-KRPY7NTG.js → chunk-R46L2BIR.js} +3 -3
- package/dist/{chunk-BP4OYD6A.js → chunk-RY3LY4J5.js} +20 -2
- package/dist/{chunk-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
- package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
- package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
- package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
- package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
- package/dist/{chunk-HXG4IURW.js → chunk-XE2VEJHX.js} +2 -2
- package/dist/{chunk-3HZ5RWN2.js → chunk-XF5N4U5A.js} +7 -6
- package/dist/{chunk-ZYKPLLNQ.js → chunk-XXQNGV4M.js} +590 -32
- package/dist/{chunk-4JUF2NNX.js → chunk-XYDYPRZI.js} +4 -4
- package/dist/{chunk-VMNQ6OZA.js → chunk-ZRGEBJ4T.js} +971 -794
- package/dist/{chunk-2LZI5CAG.js → chunk-ZXF4XRKW.js} +75 -33
- package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
- package/dist/cli/index.js +31 -31
- package/dist/{clio-J5JIOIDS.js → clio-M2KGYUFZ.js} +2 -2
- package/dist/{code-nav-AXCXSBHX.js → code-nav-GQNL7XA6.js} +5 -5
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-KELWS457.js → components-5TTYYX6G.js} +3 -3
- package/dist/{config-OEBMIN2U.js → config-XUUYQIWO.js} +27 -25
- package/dist/{configure-PUQOSIXQ.js → configure-IHJ7YOMV.js} +7 -7
- package/dist/{context-URSXPBCK.js → context-74JLXAWD.js} +12 -12
- package/dist/{context-MGSE4Z2T.js → context-75MIWW3U.js} +24 -22
- package/dist/{context-EKDCKUUZ.js → context-ZQ7SIFJV.js} +8 -7
- package/dist/{context-clear-KDAJRNUK.js → context-clear-GYKWNUML.js} +24 -22
- package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
- package/dist/{context-working-set-SBKMPPI2.js → context-working-set-UX5KEP4J.js} +11 -10
- package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-GIJBHNFL.js} +21 -20
- package/dist/{docs-2C2LTVT2.js → docs-6FZSCG5B.js} +3 -3
- package/dist/{doctor-7BSE27PJ.js → doctor-SVJ5BZCW.js} +4 -4
- package/dist/{eval-IZGDOO4H.js → eval-CG6LLBLD.js} +47 -232
- package/dist/{evidence-SR7WXB5B.js → evidence-ZYFIEN42.js} +19 -18
- package/dist/{evolve-K7VE2CBX.js → evolve-QGEXEMDW.js} +19 -18
- package/dist/{extensions-QVDOHDGJ.js → extensions-ADGNCJJD.js} +3 -3
- package/dist/{fleet-7XMJNQNF.js → fleet-S5R4ZOQY.js} +49 -30
- package/dist/{fleet-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
- package/dist/{init-JGNPAYXT.js → init-5DRU55YR.js} +31 -29
- package/dist/memory-7YKKR6UC.js +467 -0
- package/dist/{models-ZMMLFJNN.js → models-ZPOLRU2C.js} +10 -10
- package/dist/{monitor-2F3T5KHP.js → monitor-US5F5YGZ.js} +33 -18
- package/dist/{orchestrator-ORHT43JB.js → orchestrator-E2AL4T5N.js} +1092 -659
- package/dist/{paths-UXLN5YYZ.js → paths-E7KYAQWE.js} +3 -3
- package/dist/{reset-NXGTYNUO.js → reset-KZ652EK6.js} +3 -3
- package/dist/{run-RF4WJGMT.js → run-SRNBKDWD.js} +52 -40
- package/dist/{share-UT3W6E4M.js → share-CGZE33UP.js} +3 -3
- package/dist/{skills-PSACKC5Q.js → skills-S2X4DLY5.js} +4 -4
- package/dist/{skills-eval-WJSI55RZ.js → skills-eval-W2GGIC4R.js} +19 -18
- package/dist/{targets-PIIRAOYS.js → targets-54SWINWB.js} +14 -12
- package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-SAIF2OGY.js} +5 -4
- package/dist/{uninstall-FZCQCDKC.js → uninstall-BVLWXKBT.js} +3 -3
- package/dist/{upgrade-346TZ6AV.js → upgrade-JKAR27XC.js} +8 -8
- package/dist/{usage-6KKXR32N.js → usage-MSAWCLX4.js} +60 -27
- package/dist/{verifiers-4UUM6TEE.js → verifiers-NCBTHHN2.js} +60 -54
- package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-GUSOQ6ZP.js} +30 -28
- package/dist/worker/entry.js +69 -58
- package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
- package/docs/README.md +3 -3
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-placement.md +1 -2
- package/docs/artifact-versions.md +1 -1
- package/docs/built-in-agents.md +1 -1
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +9 -7
- package/docs/configuration-and-targets.md +12 -1
- package/docs/context-engine.md +4 -2
- package/docs/context-working-set.md +4 -4
- package/docs/development-pipeline.md +1 -1
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +2 -2
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +4 -45
- package/docs/evidence-and-memory.md +67 -7
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +1 -1
- package/docs/extensions-and-sharing.md +2 -2
- package/docs/fleet-dispatch.md +28 -2
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +19 -2
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +3 -3
- package/docs/proactive-memory.md +26 -16
- package/docs/prompt-envelope-and-tools.md +4 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +38 -35
- package/docs/safety-model.md +29 -7
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +1 -1
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +2 -2
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +38 -4
- package/docs/worker-dispatch-mechanics.md +1 -1
- package/package.json +7 -4
- package/src/cli/agents.ts +2 -3
- package/src/cli/argv.ts +14 -1
- package/src/cli/fleet.ts +15 -0
- package/src/cli/index.ts +1 -1
- package/src/cli/memory.ts +272 -10
- package/src/cli/modes/json-stream.ts +2 -2
- package/src/cli/modes/print.ts +12 -1
- package/src/cli/run.ts +22 -2
- package/src/cli/targets.ts +12 -3
- package/src/cli/usage.ts +55 -7
- package/src/core/bus-events.ts +3 -0
- package/src/core/response-model-id.ts +134 -0
- package/src/core/toml.ts +62 -0
- package/src/core/workspace-files.ts +0 -1
- package/src/domains/agents/builtins/architect.md +1 -1
- package/src/domains/agents/catalog.ts +5 -4
- package/src/domains/agents/recipe.ts +54 -14
- package/src/domains/agents/result-contract.ts +7 -4
- package/src/domains/context/bootstrap.ts +36 -27
- package/src/domains/context/project-metadata.ts +19 -63
- package/src/domains/context/prompt-context.ts +8 -0
- package/src/domains/context/working-set/policies/index.ts +3 -4
- package/src/domains/dispatch/budget-envelope.ts +396 -0
- package/src/domains/dispatch/contract.ts +2 -0
- package/src/domains/dispatch/extension.ts +81 -27
- package/src/domains/dispatch/orphan-recovery.ts +1 -0
- package/src/domains/dispatch/receipt-integrity.ts +4 -0
- package/src/domains/dispatch/state.ts +1 -0
- package/src/domains/dispatch/types.ts +10 -3
- package/src/domains/dispatch/validation.ts +14 -0
- package/src/domains/dispatch/worker-spawn.ts +14 -3
- package/src/domains/eval/metrics/evidence.ts +0 -116
- package/src/domains/eval/metrics/invariants.ts +1 -1
- package/src/domains/eval/runners/clio-run.ts +1 -10
- package/src/domains/eval/runners/external-command.ts +2 -29
- package/src/domains/eval/schema/suite.ts +0 -7
- package/src/domains/eval/suites/run.ts +1 -7
- package/src/domains/memory/index.ts +22 -0
- package/src/domains/memory/operations.ts +58 -1
- package/src/domains/memory/promotion.ts +281 -0
- package/src/domains/memory/prompt-section.ts +25 -5
- package/src/domains/memory/proposal.ts +51 -7
- package/src/domains/memory/task-bank.ts +3 -2
- package/src/domains/memory/task-memory-handoff.ts +181 -24
- package/src/domains/memory/task-memory-policy.ts +3 -1
- package/src/domains/memory/types.ts +37 -0
- package/src/domains/memory/validate.ts +178 -0
- package/src/domains/middleware/memory-intervention.ts +35 -25
- package/src/domains/middleware/runtime.ts +6 -0
- package/src/domains/middleware/skills-reminder.ts +19 -4
- package/src/domains/middleware/stalled-turn.ts +43 -1
- package/src/domains/middleware/types.ts +10 -0
- package/src/domains/observability/contract.ts +6 -1
- package/src/domains/observability/cost.ts +20 -4
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/providers/index.ts +3 -0
- package/src/domains/providers/model-discovery.ts +9 -0
- package/src/domains/providers/runtime-resolution.ts +38 -1
- package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
- package/src/domains/providers/types/context-window-slots.ts +18 -0
- package/src/domains/providers/types/runtime-descriptor.ts +3 -1
- package/src/domains/safety/call-target.ts +211 -14
- package/src/domains/safety/decision-presentation.ts +268 -0
- package/src/domains/safety/redaction.ts +73 -0
- package/src/domains/session/context-ledger.ts +10 -1
- package/src/domains/session/decision-board.ts +4 -0
- package/src/domains/session/entries.ts +3 -0
- package/src/domains/session/history.ts +68 -19
- package/src/domains/session/usage.ts +24 -7
- package/src/engine/acp/event-mapper.ts +7 -0
- package/src/engine/acp/server.ts +29 -2
- package/src/engine/apis/lmstudio.ts +25 -4
- package/src/engine/apis/openai-completions.ts +147 -22
- package/src/engine/claude/sdk-runtime.ts +8 -2
- package/src/engine/claude/tool-safety.ts +13 -0
- package/src/engine/loop-guard.ts +27 -3
- package/src/engine/worker-events.ts +4 -3
- package/src/engine/worker-runtime.ts +59 -54
- package/src/entry/orchestrator.ts +18 -1
- package/src/interactive/chat-loop-messages.ts +22 -0
- package/src/interactive/chat-loop.ts +13 -0
- package/src/interactive/chat-renderer.ts +19 -3
- package/src/interactive/clio-editor.ts +44 -7
- package/src/interactive/context-overlay.ts +43 -5
- package/src/interactive/cost-overlay.ts +39 -8
- package/src/interactive/dispatch-board.ts +212 -35
- package/src/interactive/footer/widgets.ts +13 -0
- package/src/interactive/interactive-application.ts +6 -1
- package/src/interactive/interactive-input-runtime.ts +11 -1
- package/src/interactive/interactive-presentation.ts +11 -1
- package/src/interactive/memory-overlay.ts +89 -4
- package/src/interactive/overlay-ask-user-lifecycle.ts +1 -1
- package/src/interactive/overlay-frame.ts +5 -2
- package/src/interactive/overlay-general-openers.ts +40 -1
- package/src/interactive/overlay-key-routing.ts +41 -1
- package/src/interactive/overlay-lifecycle.ts +11 -4
- package/src/interactive/overlay-permission-lifecycle.ts +23 -8
- package/src/interactive/overlay-transitions.ts +11 -0
- package/src/interactive/overlays/ask-user.ts +74 -30
- package/src/interactive/overlays/decisions.ts +3 -1
- package/src/interactive/permission-hint.ts +35 -0
- package/src/interactive/permission-overlay.ts +95 -45
- package/src/interactive/renderers/tool-execution.ts +19 -49
- package/src/interactive/session-last-turn.ts +8 -1
- package/src/interactive/session-usage-reseed.ts +36 -10
- package/src/interactive/slash-commands.ts +2 -2
- package/src/interactive/status/summary.ts +5 -0
- package/src/interactive/status/types.ts +5 -0
- package/src/interactive/terminal-lease.ts +1 -0
- package/src/interactive/turn-context.ts +96 -23
- package/src/interactive/turn-middleware.ts +1 -0
- package/src/interactive/turn-runtime.ts +37 -8
- package/src/interactive/turn-state.ts +3 -0
- package/src/interactive/worker-progress.ts +440 -0
- package/src/interactive/worker-stream.ts +51 -110
- package/src/tools/agent-tools.ts +28 -3
- package/src/tools/ask-user.ts +21 -1
- package/src/tools/context/index.ts +2 -2
- package/src/tools/dispatch-arguments.ts +8 -0
- package/src/tools/dispatch-event-text.ts +19 -0
- package/src/tools/dispatch.ts +24 -1
- package/src/tools/monitor.ts +15 -0
- package/src/tools/registry.ts +15 -5
- package/src/tools/result-disposition.ts +156 -0
- package/src/tools/result-shaping.ts +59 -1
- package/src/tools/verify/authoring.ts +55 -54
- package/src/tools/worker-evidence.ts +19 -0
- package/src/worker/spec-contract.ts +43 -3
- package/dist/chunk-EFADSJET.js +0 -18
- package/dist/memory-4ALKDJ4Q.js +0 -246
- package/src/domains/eval/metrics/chaos-stream.ts +0 -93
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadEvalTaskFile,
|
|
12
12
|
verifyReceiptIntegrity,
|
|
13
13
|
writeEvalArtifactV4
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OH3TOQTB.js";
|
|
15
15
|
import {
|
|
16
16
|
shellQuote
|
|
17
17
|
} from "./chunk-TXOTCRLG.js";
|
|
@@ -23,18 +23,18 @@ import "./chunk-ECH6PKUQ.js";
|
|
|
23
23
|
import "./chunk-CGKSTWHD.js";
|
|
24
24
|
import {
|
|
25
25
|
detectProjectProfile
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XAKHZX5N.js";
|
|
27
27
|
import {
|
|
28
28
|
readCodewiki,
|
|
29
29
|
structuralCodewikiHash
|
|
30
30
|
} from "./chunk-LBMZMYH2.js";
|
|
31
31
|
import {
|
|
32
32
|
enumerateWorkspaceFiles
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-33YXPOE3.js";
|
|
34
|
+
import "./chunk-24I7BN55.js";
|
|
35
35
|
import {
|
|
36
36
|
printError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
38
38
|
import "./chunk-5TSRNF4G.js";
|
|
39
39
|
import "./chunk-4VP4KH3K.js";
|
|
40
40
|
import "./chunk-IKCO5N3L.js";
|
|
@@ -1323,100 +1323,6 @@ function evidenceMetricsFromReceipt(receipt) {
|
|
|
1323
1323
|
...typeof receipt.costUsd === "number" && Number.isFinite(receipt.costUsd) ? { "cost.usd": receipt.costUsd } : {}
|
|
1324
1324
|
};
|
|
1325
1325
|
}
|
|
1326
|
-
function dispatchCountFromJsonl(stdout) {
|
|
1327
|
-
let executionEnds = 0;
|
|
1328
|
-
let canonicalFinishes = 0;
|
|
1329
|
-
const seenExecutionEnds = /* @__PURE__ */ new Set();
|
|
1330
|
-
const seenCanonicalFinishes = /* @__PURE__ */ new Set();
|
|
1331
|
-
let sawCanonicalFinishEvent = false;
|
|
1332
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1333
|
-
if (event.type === "tool_execution_end") {
|
|
1334
|
-
if (stringField(event, "toolName") !== "dispatch") continue;
|
|
1335
|
-
const callId2 = stringField(event, "toolCallId");
|
|
1336
|
-
if (callId2 !== void 0) {
|
|
1337
|
-
if (seenExecutionEnds.has(callId2)) continue;
|
|
1338
|
-
seenExecutionEnds.add(callId2);
|
|
1339
|
-
}
|
|
1340
|
-
executionEnds += 1;
|
|
1341
|
-
continue;
|
|
1342
|
-
}
|
|
1343
|
-
if (event.type !== "clio_tool_finish" || !isRecord5(event.payload)) continue;
|
|
1344
|
-
sawCanonicalFinishEvent = true;
|
|
1345
|
-
if (stringField(event.payload, "tool") !== "dispatch") continue;
|
|
1346
|
-
const callId = stringField(event.payload, "toolCallId") ?? stringField(event, "toolCallId");
|
|
1347
|
-
if (callId !== void 0) {
|
|
1348
|
-
if (seenCanonicalFinishes.has(callId)) continue;
|
|
1349
|
-
seenCanonicalFinishes.add(callId);
|
|
1350
|
-
}
|
|
1351
|
-
canonicalFinishes += 1;
|
|
1352
|
-
}
|
|
1353
|
-
return sawCanonicalFinishEvent ? canonicalFinishes : executionEnds;
|
|
1354
|
-
}
|
|
1355
|
-
function scoutDispatchCountFromJsonl(stdout) {
|
|
1356
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1357
|
-
let count = 0;
|
|
1358
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1359
|
-
if (event.type !== "tool_execution_start" || stringField(event, "toolName") !== "dispatch") continue;
|
|
1360
|
-
if (!isRecord5(event.args) || !dispatchArgsIncludeAgent(event.args, "scout")) continue;
|
|
1361
|
-
const callId = stringField(event, "toolCallId");
|
|
1362
|
-
if (callId !== void 0) {
|
|
1363
|
-
if (seen.has(callId)) continue;
|
|
1364
|
-
seen.add(callId);
|
|
1365
|
-
}
|
|
1366
|
-
count += 1;
|
|
1367
|
-
}
|
|
1368
|
-
return count;
|
|
1369
|
-
}
|
|
1370
|
-
function dispatchArgsIncludeAgent(args, expectedAgent) {
|
|
1371
|
-
const sharedAgent = stringField(args, "agent") ?? stringField(args, "agent_id") ?? stringField(args, "agentId");
|
|
1372
|
-
let tasks = args.tasks;
|
|
1373
|
-
if (typeof tasks === "string") {
|
|
1374
|
-
const trimmed = tasks.trim();
|
|
1375
|
-
if (trimmed.startsWith("[") || trimmed.startsWith("{")) {
|
|
1376
|
-
try {
|
|
1377
|
-
tasks = JSON.parse(trimmed);
|
|
1378
|
-
} catch {
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
const taskList = Array.isArray(tasks) ? tasks : tasks === void 0 ? [{ task: args.task }] : [tasks];
|
|
1383
|
-
return taskList.some((task) => {
|
|
1384
|
-
if (typeof task === "string") return sharedAgent?.toLowerCase() === expectedAgent;
|
|
1385
|
-
if (!isRecord5(task)) return false;
|
|
1386
|
-
const agent = stringField(task, "agent") ?? stringField(task, "agent_id") ?? stringField(task, "agentId") ?? sharedAgent;
|
|
1387
|
-
return agent?.toLowerCase() === expectedAgent;
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
function wikiStaleAcknowledgedFromJsonl(stdout) {
|
|
1391
|
-
let sawWikiLookup = false;
|
|
1392
|
-
for (const event of jsonlEvents(stdout)) {
|
|
1393
|
-
if (event.type !== "tool_execution_start") continue;
|
|
1394
|
-
const toolName = stringField(event, "toolName");
|
|
1395
|
-
if (toolName === "code_nav" && isRecord5(event.args) && event.args.mode === "wiki") {
|
|
1396
|
-
sawWikiLookup = true;
|
|
1397
|
-
continue;
|
|
1398
|
-
}
|
|
1399
|
-
if (sawWikiLookup && (toolName === "read" || toolName === "grep")) return true;
|
|
1400
|
-
}
|
|
1401
|
-
return false;
|
|
1402
|
-
}
|
|
1403
|
-
function* jsonlEvents(stdout) {
|
|
1404
|
-
for (const line of stdout.split(/\r?\n/)) {
|
|
1405
|
-
if (line.trim().length === 0) continue;
|
|
1406
|
-
try {
|
|
1407
|
-
const parsed = JSON.parse(line);
|
|
1408
|
-
if (isRecord5(parsed)) yield parsed;
|
|
1409
|
-
} catch {
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
function stringField(record, field) {
|
|
1414
|
-
const value = record[field];
|
|
1415
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1416
|
-
}
|
|
1417
|
-
function isRecord5(value) {
|
|
1418
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1419
|
-
}
|
|
1420
1326
|
|
|
1421
1327
|
// src/domains/eval/metrics/token-stream.ts
|
|
1422
1328
|
init_esm_shims();
|
|
@@ -1438,10 +1344,10 @@ function createTokenUsageFold() {
|
|
|
1438
1344
|
} catch {
|
|
1439
1345
|
return;
|
|
1440
1346
|
}
|
|
1441
|
-
if (!
|
|
1442
|
-
const message =
|
|
1347
|
+
if (!isRecord5(event) || event.type !== "message_end") return;
|
|
1348
|
+
const message = isRecord5(event.message) ? event.message : void 0;
|
|
1443
1349
|
if (message === void 0 || message.role !== "assistant") return;
|
|
1444
|
-
const usage =
|
|
1350
|
+
const usage = isRecord5(message.usage) ? message.usage : void 0;
|
|
1445
1351
|
if (usage === void 0) return;
|
|
1446
1352
|
measured = true;
|
|
1447
1353
|
const input = numberField2(usage, "input");
|
|
@@ -1454,7 +1360,7 @@ function createTokenUsageFold() {
|
|
|
1454
1360
|
tokens.cacheRead += cacheRead;
|
|
1455
1361
|
tokens.cacheWrite += cacheWrite;
|
|
1456
1362
|
tokens.total += totalTokens > 0 ? totalTokens : input + output + cacheRead + cacheWrite;
|
|
1457
|
-
if (
|
|
1363
|
+
if (isRecord5(usage.cost)) costUsd += numberField2(usage.cost, "total");
|
|
1458
1364
|
};
|
|
1459
1365
|
return {
|
|
1460
1366
|
push(chunk) {
|
|
@@ -1504,7 +1410,7 @@ function numberField2(record, field) {
|
|
|
1504
1410
|
const value = record[field];
|
|
1505
1411
|
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
1506
1412
|
}
|
|
1507
|
-
function
|
|
1413
|
+
function isRecord5(value) {
|
|
1508
1414
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1509
1415
|
}
|
|
1510
1416
|
|
|
@@ -1512,76 +1418,6 @@ function isRecord6(value) {
|
|
|
1512
1418
|
init_esm_shims();
|
|
1513
1419
|
import { spawn } from "node:child_process";
|
|
1514
1420
|
import { performance } from "node:perf_hooks";
|
|
1515
|
-
|
|
1516
|
-
// src/domains/eval/metrics/chaos-stream.ts
|
|
1517
|
-
init_esm_shims();
|
|
1518
|
-
var EMPTY_CHAOS_OBSERVATION = { markerCount: 0, marker: null };
|
|
1519
|
-
function createChaosFold() {
|
|
1520
|
-
let markerCount = 0;
|
|
1521
|
-
let marker = null;
|
|
1522
|
-
let pending = "";
|
|
1523
|
-
const consume = (line) => {
|
|
1524
|
-
if (line.trim().length === 0) return;
|
|
1525
|
-
let parsed;
|
|
1526
|
-
try {
|
|
1527
|
-
parsed = JSON.parse(line);
|
|
1528
|
-
} catch {
|
|
1529
|
-
return;
|
|
1530
|
-
}
|
|
1531
|
-
if (!isRecord7(parsed) || parsed.type !== "clio_soak_chaos") return;
|
|
1532
|
-
markerCount += 1;
|
|
1533
|
-
marker = parseChaosMarker(parsed);
|
|
1534
|
-
};
|
|
1535
|
-
return {
|
|
1536
|
-
push(chunk) {
|
|
1537
|
-
pending += chunk;
|
|
1538
|
-
for (; ; ) {
|
|
1539
|
-
const newline = pending.indexOf("\n");
|
|
1540
|
-
if (newline === -1) break;
|
|
1541
|
-
consume(pending.slice(0, newline).replace(/\r$/u, ""));
|
|
1542
|
-
pending = pending.slice(newline + 1);
|
|
1543
|
-
}
|
|
1544
|
-
},
|
|
1545
|
-
observation() {
|
|
1546
|
-
if (pending.length > 0) {
|
|
1547
|
-
consume(pending.replace(/\r$/u, ""));
|
|
1548
|
-
pending = "";
|
|
1549
|
-
}
|
|
1550
|
-
return { markerCount, marker: marker === null ? null : { ...marker } };
|
|
1551
|
-
}
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
function addChaosObservations(left, right) {
|
|
1555
|
-
const markerCount = left.markerCount + right.markerCount;
|
|
1556
|
-
return {
|
|
1557
|
-
markerCount,
|
|
1558
|
-
marker: markerCount === 1 ? left.marker ?? right.marker : null
|
|
1559
|
-
};
|
|
1560
|
-
}
|
|
1561
|
-
function chaosMetricEntries(observation) {
|
|
1562
|
-
if (observation.markerCount !== 1 || observation.marker === null) return {};
|
|
1563
|
-
return {
|
|
1564
|
-
"chaos.seed": observation.marker.seed,
|
|
1565
|
-
"chaos.faultInjected": observation.marker.faultInjected,
|
|
1566
|
-
"chaos.exitCode": observation.marker.exitCode,
|
|
1567
|
-
"process.orphanedChildren": observation.marker.orphanedChildren
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
function parseChaosMarker(event) {
|
|
1571
|
-
if (event.type !== "clio_soak_chaos") return null;
|
|
1572
|
-
const { seed, faultInjected, exitCode, orphanedChildren } = event;
|
|
1573
|
-
if (!isFiniteInteger2(seed) || typeof faultInjected !== "boolean" || !isFiniteInteger2(exitCode)) return null;
|
|
1574
|
-
if (!isFiniteInteger2(orphanedChildren) || orphanedChildren < 0) return null;
|
|
1575
|
-
return { seed, faultInjected, exitCode, orphanedChildren };
|
|
1576
|
-
}
|
|
1577
|
-
function isFiniteInteger2(value) {
|
|
1578
|
-
return typeof value === "number" && Number.isFinite(value) && Number.isInteger(value);
|
|
1579
|
-
}
|
|
1580
|
-
function isRecord7(value) {
|
|
1581
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
// src/domains/eval/runners/external-command.ts
|
|
1585
1421
|
var OUTPUT_LIMIT = 2e5;
|
|
1586
1422
|
var OUTPUT_HEAD_LIMIT = 2e4;
|
|
1587
1423
|
var OUTPUT_TRUNCATION_MARKER = "\n[output middle truncated; tail preserved]\n";
|
|
@@ -1595,7 +1431,6 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1595
1431
|
let wallTimeMs = 0;
|
|
1596
1432
|
let usage = UNMEASURED_TOKEN_USAGE;
|
|
1597
1433
|
let streamInvariants = EMPTY_STREAM_INVARIANTS;
|
|
1598
|
-
let chaos = EMPTY_CHAOS_OBSERVATION;
|
|
1599
1434
|
let fleetLoops = EMPTY_FLEET_LOOP_OBSERVATION;
|
|
1600
1435
|
for (const command of commands) {
|
|
1601
1436
|
const result = await runShellCommand(command, cwd, runner.timeoutMs ?? timeoutMs, env);
|
|
@@ -1604,7 +1439,6 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1604
1439
|
wallTimeMs += result.wallTimeMs;
|
|
1605
1440
|
usage = addTokenStreamUsage(usage, result.usage);
|
|
1606
1441
|
streamInvariants = addStreamInvariants(streamInvariants, result.streamInvariants);
|
|
1607
|
-
chaos = addChaosObservations(chaos, result.chaos);
|
|
1608
1442
|
fleetLoops = addFleetLoopObservations(fleetLoops, result.fleetLoops);
|
|
1609
1443
|
if (result.exitCode !== 0) {
|
|
1610
1444
|
return {
|
|
@@ -1618,11 +1452,10 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1618
1452
|
"latency.wallMs": wallTimeMs,
|
|
1619
1453
|
...tokenMetricEntries(usage),
|
|
1620
1454
|
...streamInvariantMetrics(streamInvariants),
|
|
1621
|
-
...chaosMetricEntries(chaos),
|
|
1622
1455
|
...fleetLoopMetricEntries(fleetLoops),
|
|
1623
1456
|
"verifier.exitCode": result.exitCode
|
|
1624
1457
|
},
|
|
1625
|
-
artifacts:
|
|
1458
|
+
artifacts: {}
|
|
1626
1459
|
};
|
|
1627
1460
|
}
|
|
1628
1461
|
}
|
|
@@ -1637,11 +1470,10 @@ async function runExternalCommandRunner(runner, cwd, timeoutMs, env) {
|
|
|
1637
1470
|
"latency.wallMs": wallTimeMs,
|
|
1638
1471
|
...tokenMetricEntries(usage),
|
|
1639
1472
|
...streamInvariantMetrics(streamInvariants),
|
|
1640
|
-
...chaosMetricEntries(chaos),
|
|
1641
1473
|
...fleetLoopMetricEntries(fleetLoops),
|
|
1642
1474
|
"verifier.exitCode": 0
|
|
1643
1475
|
},
|
|
1644
|
-
artifacts:
|
|
1476
|
+
artifacts: {}
|
|
1645
1477
|
};
|
|
1646
1478
|
}
|
|
1647
1479
|
function runShellCommand(command, cwd, timeoutMs, env) {
|
|
@@ -1652,7 +1484,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1652
1484
|
const metricCapture = createJsonlMetricCapture();
|
|
1653
1485
|
const usageFold = createTokenUsageFold();
|
|
1654
1486
|
const streamFold = createStreamInvariantFold();
|
|
1655
|
-
const chaosFold = createChaosFold();
|
|
1656
1487
|
const fleetLoopFold = createFleetLoopFold();
|
|
1657
1488
|
let timedOut = false;
|
|
1658
1489
|
let settled = false;
|
|
@@ -1671,7 +1502,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1671
1502
|
metricCapture.push(chunk);
|
|
1672
1503
|
usageFold.push(chunk);
|
|
1673
1504
|
streamFold.push(chunk);
|
|
1674
|
-
chaosFold.push(chunk);
|
|
1675
1505
|
fleetLoopFold.push(chunk);
|
|
1676
1506
|
});
|
|
1677
1507
|
child.stderr.on("data", (chunk) => {
|
|
@@ -1693,7 +1523,6 @@ function runShellCommand(command, cwd, timeoutMs, env) {
|
|
|
1693
1523
|
metricJsonl: metricCapture.finish(),
|
|
1694
1524
|
usage: usageFold.usage(),
|
|
1695
1525
|
streamInvariants: streamFold.invariants(),
|
|
1696
|
-
chaos: chaosFold.observation(),
|
|
1697
1526
|
fleetLoops: fleetLoopFold.observation(),
|
|
1698
1527
|
stderr,
|
|
1699
1528
|
wallTimeMs: Math.round(performance.now() - started),
|
|
@@ -1728,7 +1557,7 @@ function createJsonlMetricCapture() {
|
|
|
1728
1557
|
} catch {
|
|
1729
1558
|
return;
|
|
1730
1559
|
}
|
|
1731
|
-
if (!
|
|
1560
|
+
if (!isRecord6(parsed)) return;
|
|
1732
1561
|
const compact = compactMetricEvent(parsed);
|
|
1733
1562
|
if (compact === null) return;
|
|
1734
1563
|
const encoded = JSON.stringify(compact);
|
|
@@ -1773,48 +1602,41 @@ function createJsonlMetricCapture() {
|
|
|
1773
1602
|
}
|
|
1774
1603
|
function compactMetricEvent(event) {
|
|
1775
1604
|
const type = event.type;
|
|
1776
|
-
if (type === "clio_soak_chaos") {
|
|
1777
|
-
const marker = parseChaosMarker(event);
|
|
1778
|
-
return marker === null ? null : { type, ...marker };
|
|
1779
|
-
}
|
|
1780
1605
|
if (type === "tool_execution_start") {
|
|
1781
|
-
const toolName =
|
|
1606
|
+
const toolName = stringField(event, "toolName");
|
|
1782
1607
|
if (toolName !== "dispatch" && toolName !== "code_nav" && toolName !== "read" && toolName !== "grep") {
|
|
1783
1608
|
return null;
|
|
1784
1609
|
}
|
|
1785
1610
|
return {
|
|
1786
1611
|
type,
|
|
1787
|
-
...
|
|
1612
|
+
...stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1788
1613
|
toolName,
|
|
1789
|
-
...toolName === "dispatch" &&
|
|
1614
|
+
...toolName === "dispatch" && isRecord6(event.args) ? { args: event.args } : toolName === "code_nav" && isRecord6(event.args) ? { args: { mode: event.args.mode } } : {}
|
|
1790
1615
|
};
|
|
1791
1616
|
}
|
|
1792
1617
|
if (type === "tool_execution_end") {
|
|
1793
1618
|
return {
|
|
1794
1619
|
type,
|
|
1795
|
-
...
|
|
1796
|
-
...
|
|
1620
|
+
...stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1621
|
+
...stringField(event, "toolName") !== void 0 ? { toolName: stringField(event, "toolName") } : {},
|
|
1797
1622
|
...event.isError === true ? { isError: true } : {},
|
|
1798
|
-
...
|
|
1623
|
+
...stringField(event, "outcome") !== void 0 ? { outcome: stringField(event, "outcome") } : {}
|
|
1799
1624
|
};
|
|
1800
1625
|
}
|
|
1801
|
-
if (type !== "clio_tool_finish" || !
|
|
1626
|
+
if (type !== "clio_tool_finish" || !isRecord6(event.payload)) return null;
|
|
1802
1627
|
return {
|
|
1803
1628
|
type,
|
|
1804
1629
|
payload: {
|
|
1805
|
-
...
|
|
1806
|
-
...
|
|
1807
|
-
...
|
|
1630
|
+
...stringField(event.payload, "tool") !== void 0 ? { tool: stringField(event.payload, "tool") } : {},
|
|
1631
|
+
...stringField(event.payload, "toolCallId") !== void 0 ? { toolCallId: stringField(event.payload, "toolCallId") } : stringField(event, "toolCallId") !== void 0 ? { toolCallId: stringField(event, "toolCallId") } : {},
|
|
1632
|
+
...stringField(event.payload, "outcome") !== void 0 ? { outcome: stringField(event.payload, "outcome") } : {}
|
|
1808
1633
|
}
|
|
1809
1634
|
};
|
|
1810
1635
|
}
|
|
1811
|
-
function
|
|
1812
|
-
return observation.markerCount === 1 && observation.marker !== null ? { chaosSeed: String(observation.marker.seed) } : {};
|
|
1813
|
-
}
|
|
1814
|
-
function isRecord8(value) {
|
|
1636
|
+
function isRecord6(value) {
|
|
1815
1637
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1816
1638
|
}
|
|
1817
|
-
function
|
|
1639
|
+
function stringField(record, field) {
|
|
1818
1640
|
const value = record[field];
|
|
1819
1641
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1820
1642
|
}
|
|
@@ -1855,9 +1677,6 @@ async function runClioRunRunner(runner, cwd, clioEntry, timeoutMs, target, env)
|
|
|
1855
1677
|
"tools.failed": tools.failed,
|
|
1856
1678
|
"tools.blocked": tools.blocked,
|
|
1857
1679
|
"verifier.exitCode": result.exitCode,
|
|
1858
|
-
"dispatch.count": dispatchCountFromJsonl(toolMetricStream),
|
|
1859
|
-
"dispatch.scoutCount": scoutDispatchCountFromJsonl(toolMetricStream),
|
|
1860
|
-
"wiki.staleAcknowledged": wikiStaleAcknowledgedFromJsonl(toolMetricStream),
|
|
1861
1680
|
...receipt === null ? {} : evidenceMetricsFromReceipt(receipt),
|
|
1862
1681
|
...receipt === null ? {} : { "evidence.qualityLabel": receipt.quality.typedValidations.length > 0 ? "measured" : "unmeasured" }
|
|
1863
1682
|
},
|
|
@@ -1878,13 +1697,13 @@ function toolCallMetricsFromJsonl(stdout) {
|
|
|
1878
1697
|
let event;
|
|
1879
1698
|
try {
|
|
1880
1699
|
const parsed = JSON.parse(line);
|
|
1881
|
-
if (!
|
|
1700
|
+
if (!isRecord7(parsed)) continue;
|
|
1882
1701
|
event = parsed;
|
|
1883
1702
|
} catch {
|
|
1884
1703
|
continue;
|
|
1885
1704
|
}
|
|
1886
1705
|
if (event.type === "tool_execution_end") {
|
|
1887
|
-
const callId2 =
|
|
1706
|
+
const callId2 = stringField2(event, "toolCallId");
|
|
1888
1707
|
if (callId2 !== void 0) {
|
|
1889
1708
|
if (seenExecutionEnds.has(callId2)) continue;
|
|
1890
1709
|
seenExecutionEnds.add(callId2);
|
|
@@ -1892,10 +1711,10 @@ function toolCallMetricsFromJsonl(stdout) {
|
|
|
1892
1711
|
recordToolOutcome(executionEnds, toolOutcome(event) ?? (event.isError === true ? "error" : "ok"));
|
|
1893
1712
|
continue;
|
|
1894
1713
|
}
|
|
1895
|
-
if (event.type !== "clio_tool_finish" || !
|
|
1714
|
+
if (event.type !== "clio_tool_finish" || !isRecord7(event.payload)) continue;
|
|
1896
1715
|
const outcome = toolOutcome(event.payload);
|
|
1897
1716
|
if (outcome === void 0) continue;
|
|
1898
|
-
const callId =
|
|
1717
|
+
const callId = stringField2(event.payload, "toolCallId") ?? stringField2(event, "toolCallId");
|
|
1899
1718
|
if (callId !== void 0) {
|
|
1900
1719
|
if (seenCanonicalFinishes.has(callId)) continue;
|
|
1901
1720
|
seenCanonicalFinishes.add(callId);
|
|
@@ -1913,11 +1732,11 @@ function toolOutcome(record) {
|
|
|
1913
1732
|
const outcome = record.outcome;
|
|
1914
1733
|
return outcome === "ok" || outcome === "error" || outcome === "blocked" ? outcome : void 0;
|
|
1915
1734
|
}
|
|
1916
|
-
function
|
|
1735
|
+
function stringField2(record, field) {
|
|
1917
1736
|
const value = record[field];
|
|
1918
1737
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
1919
1738
|
}
|
|
1920
|
-
function
|
|
1739
|
+
function isRecord7(value) {
|
|
1921
1740
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1922
1741
|
}
|
|
1923
1742
|
|
|
@@ -1995,12 +1814,12 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
1995
1814
|
` : result.stderr;
|
|
1996
1815
|
const run = recordField(generation, "run");
|
|
1997
1816
|
const tokens = recordField(run, "tokens");
|
|
1998
|
-
const effectiveTarget =
|
|
1999
|
-
const effectiveModel =
|
|
2000
|
-
const effectiveRuntime =
|
|
2001
|
-
const effectiveRuntimeKind =
|
|
2002
|
-
const effectiveThinking =
|
|
2003
|
-
const structuredOutputMode =
|
|
1817
|
+
const effectiveTarget = stringField3(run, "targetId");
|
|
1818
|
+
const effectiveModel = stringField3(run, "wireModelId");
|
|
1819
|
+
const effectiveRuntime = stringField3(run, "runtimeId");
|
|
1820
|
+
const effectiveRuntimeKind = stringField3(run, "runtimeKind");
|
|
1821
|
+
const effectiveThinking = stringField3(run, "thinkingLevel");
|
|
1822
|
+
const structuredOutputMode = stringField3(run, "structuredOutputMode");
|
|
2004
1823
|
const clioMdPath = join2(cwd, "CLIO-CODER.md");
|
|
2005
1824
|
const clioMdBytes = existsSync2(clioMdPath) ? statSync(clioMdPath).size : 0;
|
|
2006
1825
|
return {
|
|
@@ -2022,9 +1841,9 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
2022
1841
|
"tools.failed": numberField3(run, "toolFailures"),
|
|
2023
1842
|
"tools.blocked": numberField3(run, "toolBlocked"),
|
|
2024
1843
|
"context.clioMdBytes": clioMdBytes,
|
|
2025
|
-
"context.initMode":
|
|
2026
|
-
"context.initParserOutcome":
|
|
2027
|
-
"context.initFallback":
|
|
1844
|
+
"context.initMode": stringField3(generation, "mode") ?? "unknown",
|
|
1845
|
+
"context.initParserOutcome": stringField3(generation, "parserOutcome") ?? "unknown",
|
|
1846
|
+
"context.initFallback": stringField3(generation, "fallbackReason") !== null,
|
|
2028
1847
|
"context.initPromptBytes": numberField3(run, "promptBytes"),
|
|
2029
1848
|
"context.initOutputBytes": numberField3(run, "outputBytes"),
|
|
2030
1849
|
"context.initTargetId": effectiveTarget,
|
|
@@ -2045,7 +1864,7 @@ async function runContextInitRunner(runner, cwd, clioEntry, timeoutMs, target, e
|
|
|
2045
1864
|
effectiveModel,
|
|
2046
1865
|
effectiveRuntime,
|
|
2047
1866
|
effectiveThinking,
|
|
2048
|
-
bootstrapRunId:
|
|
1867
|
+
bootstrapRunId: stringField3(run, "runId")
|
|
2049
1868
|
}
|
|
2050
1869
|
};
|
|
2051
1870
|
}
|
|
@@ -2099,9 +1918,9 @@ function isValidGenerationPayload(payload, generation) {
|
|
|
2099
1918
|
function generationRouteError(generation, target) {
|
|
2100
1919
|
const run = recordField(generation, "run");
|
|
2101
1920
|
if (!run) return null;
|
|
2102
|
-
const actualTarget =
|
|
2103
|
-
const actualModel =
|
|
2104
|
-
const actualThinking =
|
|
1921
|
+
const actualTarget = stringField3(run, "targetId");
|
|
1922
|
+
const actualModel = stringField3(run, "wireModelId");
|
|
1923
|
+
const actualThinking = stringField3(run, "thinkingLevel");
|
|
2105
1924
|
if (actualTarget !== null && actualTarget !== target.id) {
|
|
2106
1925
|
return `context-init runner requested target '${target.id}' but the bootstrap receipt used '${actualTarget}'`;
|
|
2107
1926
|
}
|
|
@@ -2130,7 +1949,7 @@ function numberField3(value, field) {
|
|
|
2130
1949
|
const selected = record?.[field];
|
|
2131
1950
|
return typeof selected === "number" && Number.isFinite(selected) ? selected : null;
|
|
2132
1951
|
}
|
|
2133
|
-
function
|
|
1952
|
+
function stringField3(value, field) {
|
|
2134
1953
|
const record = recordField(value);
|
|
2135
1954
|
const selected = record?.[field];
|
|
2136
1955
|
return typeof selected === "string" && selected.length > 0 ? selected : null;
|
|
@@ -2325,7 +2144,7 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry) {
|
|
|
2325
2144
|
CLIO_CODER_ENTRY: clioEntry
|
|
2326
2145
|
});
|
|
2327
2146
|
const patch = collectPatchMetrics(workspace.dir);
|
|
2328
|
-
const receiptExitCode =
|
|
2147
|
+
const receiptExitCode = runner.exitCode;
|
|
2329
2148
|
const journalMetrics = invariantMetrics(stateDir, receiptExitCode);
|
|
2330
2149
|
const metrics = {
|
|
2331
2150
|
...zeroToolCallMetrics(),
|
|
@@ -2388,10 +2207,6 @@ async function runMatrixItem(loaded, task, target, repeatIndex, clioEntry) {
|
|
|
2388
2207
|
await rm3(stateDir, { recursive: true, force: true });
|
|
2389
2208
|
}
|
|
2390
2209
|
}
|
|
2391
|
-
function receiptProcessExitCode(runner) {
|
|
2392
|
-
const chaosExitCode = runner.metrics["chaos.exitCode"];
|
|
2393
|
-
return typeof chaosExitCode === "number" && Number.isInteger(chaosExitCode) ? chaosExitCode : runner.exitCode;
|
|
2394
|
-
}
|
|
2395
2210
|
function invariantMetrics(stateDir, runnerExitCode) {
|
|
2396
2211
|
const journal = readRunJournal(stateDir);
|
|
2397
2212
|
return {
|
|
@@ -2738,4 +2553,4 @@ function reportFormat(value) {
|
|
|
2738
2553
|
export {
|
|
2739
2554
|
runEvalCommand
|
|
2740
2555
|
};
|
|
2741
|
-
//# sourceMappingURL=eval-
|
|
2556
|
+
//# sourceMappingURL=eval-CG6LLBLD.js.map
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
listEvidenceOverviews,
|
|
8
8
|
loadEvidenceRunProvenance,
|
|
9
9
|
provenanceTranscriptLines
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QM3F2GKX.js";
|
|
11
|
+
import "./chunk-CJUB2JJ2.js";
|
|
12
12
|
import "./chunk-QKMUKYO7.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OH3TOQTB.js";
|
|
14
|
+
import "./chunk-TSHXZTOQ.js";
|
|
15
15
|
import "./chunk-TXOTCRLG.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-HVDIIIQW.js";
|
|
17
17
|
import "./chunk-W6GROXXM.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-XXQNGV4M.js";
|
|
19
|
+
import "./chunk-43AOLP7E.js";
|
|
20
|
+
import "./chunk-EKY57CSP.js";
|
|
21
21
|
import "./chunk-22NAGB7X.js";
|
|
22
22
|
import "./chunk-AOCYTWAV.js";
|
|
23
23
|
import "./chunk-MV3K5QF2.js";
|
|
@@ -27,22 +27,23 @@ import "./chunk-FYYLNIL5.js";
|
|
|
27
27
|
import "./chunk-UL3WSD3F.js";
|
|
28
28
|
import "./chunk-OQE5J4C6.js";
|
|
29
29
|
import "./chunk-ECH6PKUQ.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-GOXNB3AO.js";
|
|
31
|
+
import "./chunk-HWUFFB6L.js";
|
|
32
|
+
import "./chunk-ODFEOB4F.js";
|
|
32
33
|
import "./chunk-OZNBF4L3.js";
|
|
33
34
|
import "./chunk-4BJ5BYCE.js";
|
|
34
35
|
import "./chunk-6XLNIQDB.js";
|
|
35
36
|
import "./chunk-5B2AEOW5.js";
|
|
36
37
|
import "./chunk-CGKSTWHD.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-XAKHZX5N.js";
|
|
39
|
+
import "./chunk-33YXPOE3.js";
|
|
40
|
+
import "./chunk-24I7BN55.js";
|
|
40
41
|
import {
|
|
41
42
|
printError,
|
|
42
43
|
printOk
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
44
45
|
import "./chunk-5TSRNF4G.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-DJVECN66.js";
|
|
46
47
|
import "./chunk-CFGTUFWB.js";
|
|
47
48
|
import "./chunk-AD2SYQYC.js";
|
|
48
49
|
import "./chunk-4OC57DA6.js";
|
|
@@ -53,7 +54,7 @@ import "./chunk-FQ4SKYE4.js";
|
|
|
53
54
|
import "./chunk-IKCO5N3L.js";
|
|
54
55
|
import "./chunk-3I7MS7N2.js";
|
|
55
56
|
import "./chunk-IHXBNWMM.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-GEYXPTRF.js";
|
|
57
58
|
import "./chunk-SST6Z5JA.js";
|
|
58
59
|
import "./chunk-FO5ZOVUY.js";
|
|
59
60
|
import {
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
import "./chunk-6EJMN2Y3.js";
|
|
71
72
|
import "./chunk-WEPFGWHJ.js";
|
|
72
73
|
import "./chunk-ZGVHUX3M.js";
|
|
73
|
-
import "./chunk-
|
|
74
|
+
import "./chunk-G7MUEIGA.js";
|
|
74
75
|
import "./chunk-7CR24IG7.js";
|
|
75
76
|
import "./chunk-IWHMRKLL.js";
|
|
76
77
|
import {
|
|
@@ -286,4 +287,4 @@ function formatList(values) {
|
|
|
286
287
|
export {
|
|
287
288
|
runEvidenceCommand
|
|
288
289
|
};
|
|
289
|
-
//# sourceMappingURL=evidence-
|
|
290
|
+
//# sourceMappingURL=evidence-ZYFIEN42.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
listEvidenceOverviews
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-QM3F2GKX.js";
|
|
5
|
+
import "./chunk-CJUB2JJ2.js";
|
|
6
6
|
import "./chunk-QKMUKYO7.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-OH3TOQTB.js";
|
|
8
|
+
import "./chunk-TSHXZTOQ.js";
|
|
9
9
|
import "./chunk-TXOTCRLG.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-HVDIIIQW.js";
|
|
11
11
|
import "./chunk-W6GROXXM.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-XXQNGV4M.js";
|
|
13
|
+
import "./chunk-43AOLP7E.js";
|
|
14
|
+
import "./chunk-EKY57CSP.js";
|
|
15
15
|
import "./chunk-22NAGB7X.js";
|
|
16
16
|
import "./chunk-AOCYTWAV.js";
|
|
17
17
|
import "./chunk-MV3K5QF2.js";
|
|
@@ -21,22 +21,23 @@ import "./chunk-FYYLNIL5.js";
|
|
|
21
21
|
import "./chunk-UL3WSD3F.js";
|
|
22
22
|
import "./chunk-OQE5J4C6.js";
|
|
23
23
|
import "./chunk-ECH6PKUQ.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-GOXNB3AO.js";
|
|
25
|
+
import "./chunk-HWUFFB6L.js";
|
|
26
|
+
import "./chunk-ODFEOB4F.js";
|
|
26
27
|
import "./chunk-OZNBF4L3.js";
|
|
27
28
|
import "./chunk-4BJ5BYCE.js";
|
|
28
29
|
import "./chunk-6XLNIQDB.js";
|
|
29
30
|
import "./chunk-5B2AEOW5.js";
|
|
30
31
|
import "./chunk-CGKSTWHD.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-XAKHZX5N.js";
|
|
33
|
+
import "./chunk-33YXPOE3.js";
|
|
34
|
+
import "./chunk-24I7BN55.js";
|
|
34
35
|
import {
|
|
35
36
|
printError,
|
|
36
37
|
printOk
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
38
39
|
import "./chunk-5TSRNF4G.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-DJVECN66.js";
|
|
40
41
|
import "./chunk-CFGTUFWB.js";
|
|
41
42
|
import "./chunk-AD2SYQYC.js";
|
|
42
43
|
import "./chunk-4OC57DA6.js";
|
|
@@ -47,7 +48,7 @@ import "./chunk-FQ4SKYE4.js";
|
|
|
47
48
|
import "./chunk-IKCO5N3L.js";
|
|
48
49
|
import "./chunk-3I7MS7N2.js";
|
|
49
50
|
import "./chunk-IHXBNWMM.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-GEYXPTRF.js";
|
|
51
52
|
import "./chunk-SST6Z5JA.js";
|
|
52
53
|
import "./chunk-FO5ZOVUY.js";
|
|
53
54
|
import "./chunk-R346GLFC.js";
|
|
@@ -61,7 +62,7 @@ import {
|
|
|
61
62
|
import "./chunk-6EJMN2Y3.js";
|
|
62
63
|
import "./chunk-WEPFGWHJ.js";
|
|
63
64
|
import "./chunk-ZGVHUX3M.js";
|
|
64
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-G7MUEIGA.js";
|
|
65
66
|
import "./chunk-7CR24IG7.js";
|
|
66
67
|
import "./chunk-IWHMRKLL.js";
|
|
67
68
|
import {
|
|
@@ -558,4 +559,4 @@ function formatCount(count, singular, plural = `${singular}s`) {
|
|
|
558
559
|
export {
|
|
559
560
|
runEvolveCommand
|
|
560
561
|
};
|
|
561
|
-
//# sourceMappingURL=evolve-
|
|
562
|
+
//# sourceMappingURL=evolve-QGEXEMDW.js.map
|