@iowarp/clio-coder 0.3.6 → 0.3.7
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 +28 -0
- package/README.md +16 -5
- package/dist/{acp-2BEHC4DL.js → acp-SK4MD6MM.js} +10 -10
- package/dist/{agents-LNNFTM53.js → agents-2FN2K6ME.js} +30 -25
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-KXXFI2VS.js → auth-QIYZWM5I.js} +13 -13
- package/dist/{chunk-KHSFENX2.js → chunk-3HAPLH5M.js} +10 -10
- package/dist/{chunk-24I7BN55.js → chunk-465YSENW.js} +2 -2
- package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
- package/dist/{chunk-CYQKWTG3.js → chunk-4DWFMQDR.js} +4 -4
- package/dist/{chunk-E2ER4LJF.js → chunk-5C3AQNDW.js} +25 -1
- package/dist/{chunk-22NAGB7X.js → chunk-5C77SEEY.js} +5 -94
- package/dist/{chunk-43AOLP7E.js → chunk-5FR74PWO.js} +2 -1
- package/dist/{chunk-K7T3E2SR.js → chunk-5UJ6ECTS.js} +10 -9
- package/dist/{chunk-6US73PDB.js → chunk-6M7VS3J3.js} +5 -5
- package/dist/{chunk-CJUB2JJ2.js → chunk-6TUKSZVF.js} +5 -5
- package/dist/{chunk-5JGRAMKL.js → chunk-AB4XIIVB.js} +8 -6
- package/dist/{chunk-R46L2BIR.js → chunk-BMWK7ZIZ.js} +14 -20
- package/dist/{chunk-4BPJXDWC.js → chunk-C4JBQ5SR.js} +30 -14
- package/dist/{chunk-XXQNGV4M.js → chunk-CEYBNUGC.js} +243 -63
- package/dist/{chunk-VEZEGCGW.js → chunk-D4MDIG46.js} +20 -18
- package/dist/chunk-DJNLUABN.js +843 -0
- package/dist/{chunk-RY3LY4J5.js → chunk-DMD2AGVS.js} +5 -4
- package/dist/{chunk-KOHPCX4K.js → chunk-DOOEX22V.js} +2 -2
- package/dist/chunk-DQA7QLMD.js +123 -0
- package/dist/chunk-DR52UMZW.js +21 -0
- package/dist/{chunk-XF5N4U5A.js → chunk-EBEFWSGL.js} +6 -5
- package/dist/{chunk-EYPA3EGJ.js → chunk-EELBMBT6.js} +120 -13
- package/dist/{chunk-CKXWIANG.js → chunk-EOOQZZDE.js} +16 -14
- package/dist/{chunk-WR67VIZY.js → chunk-FOT2FX5J.js} +63 -5
- package/dist/{chunk-FYYLNIL5.js → chunk-GH5622CP.js} +2 -2
- package/dist/chunk-GWS3VEIW.js +195 -0
- package/dist/{chunk-LYF7OHWH.js → chunk-J7PIKKWC.js} +8 -463
- package/dist/{chunk-NILBFAPG.js → chunk-JNXPYBB4.js} +2 -2
- package/dist/{chunk-4VP4KH3K.js → chunk-JRIO5UD2.js} +4 -4
- package/dist/{chunk-6XXKFVSN.js → chunk-JTSEDYVQ.js} +7 -7
- package/dist/{chunk-QKMUKYO7.js → chunk-KCMKRQX4.js} +236 -84
- package/dist/chunk-KZ2H5X4G.js +1026 -0
- package/dist/{chunk-QNQHSOLF.js → chunk-LADCF22A.js} +12 -12
- package/dist/chunk-M4AKACEO.js +382 -0
- package/dist/{chunk-XYDYPRZI.js → chunk-MXI6J5JF.js} +7 -7
- package/dist/{chunk-G7MUEIGA.js → chunk-OB5HIGJY.js} +1 -1
- package/dist/{chunk-EKY57CSP.js → chunk-OBMAI2DP.js} +61 -767
- package/dist/chunk-PD3MESLB.js +242 -0
- package/dist/{chunk-ZRGEBJ4T.js → chunk-QCTRSGHQ.js} +21 -21
- package/dist/chunk-RVG5JXAL.js +41 -0
- package/dist/{chunk-RD5U66HV.js → chunk-SROCI7ZU.js} +7 -7
- package/dist/{chunk-MFFY33HR.js → chunk-THKY7CD7.js} +466 -205
- package/dist/{chunk-PCZJO5TI.js → chunk-UFQ3F4FW.js} +13 -178
- package/dist/{chunk-AD2SYQYC.js → chunk-UHXRNZ2J.js} +121 -3
- package/dist/chunk-UND3GU2L.js +103 -0
- package/dist/{chunk-QM3F2GKX.js → chunk-UUANF5CR.js} +2247 -2096
- package/dist/chunk-UVDSQ6LW.js +472 -0
- package/dist/{chunk-DJVECN66.js → chunk-VQNODYQ4.js} +14 -14
- package/dist/{chunk-3BPUFZDL.js → chunk-VREKEFLL.js} +3 -3
- package/dist/{chunk-PBTHKCPN.js → chunk-WJHBC77E.js} +6 -6
- package/dist/{chunk-XE2VEJHX.js → chunk-X2KV5FXT.js} +2 -2
- package/dist/{chunk-ZXF4XRKW.js → chunk-XEGB6BCN.js} +157 -7
- package/dist/{chunk-E25LMLRW.js → chunk-YD734TPH.js} +2 -2
- package/dist/{verifiers-NCBTHHN2.js → chunk-YTYFXUI3.js} +65 -322
- package/dist/{chunk-OH3TOQTB.js → chunk-ZGH7FGS5.js} +13 -7
- package/dist/cli/index.js +32 -30
- package/dist/{clio-M2KGYUFZ.js → clio-WBVQEBKO.js} +7 -7
- package/dist/{code-nav-GQNL7XA6.js → code-nav-FGGFIE7L.js} +3 -3
- package/dist/{components-5TTYYX6G.js → components-F7OEATSO.js} +4 -4
- package/dist/{config-XUUYQIWO.js → config-TRBL3RCF.js} +34 -29
- package/dist/{configure-IHJ7YOMV.js → configure-OLCVPHNM.js} +15 -15
- package/dist/{context-74JLXAWD.js → context-MJIJ6GOX.js} +11 -11
- package/dist/{context-ZQ7SIFJV.js → context-WFPKQSM6.js} +19 -3
- package/dist/{context-75MIWW3U.js → context-XEWE3MOJ.js} +31 -26
- package/dist/{context-clear-GYKWNUML.js → context-clear-KNOS2JPB.js} +31 -26
- package/dist/{context-working-set-UX5KEP4J.js → context-working-set-EUXAZI6N.js} +8 -8
- package/dist/{dispatch-runner-GIJBHNFL.js → dispatch-runner-B7MTOVKL.js} +313 -53
- package/dist/{docs-6FZSCG5B.js → docs-FLJTIDSE.js} +4 -4
- package/dist/{doctor-SVJ5BZCW.js → doctor-RN4YKO2X.js} +14 -14
- package/dist/{eval-CG6LLBLD.js → eval-RUBJVSNQ.js} +8 -7
- package/dist/{evidence-ZYFIEN42.js → evidence-JZNBUOQZ.js} +30 -25
- package/dist/{evolve-QGEXEMDW.js → evolve-FJVC4KKI.js} +30 -25
- package/dist/{extensions-ADGNCJJD.js → extensions-IQL36S7K.js} +4 -4
- package/dist/{fleet-S5R4ZOQY.js → fleet-BDKYJFCP.js} +214 -360
- package/dist/fleet-commands-ZFIWZSB3.js +70 -0
- package/dist/fleet-graph-Y6HPXIVF.js +125 -0
- package/dist/fleet-new-RDVJLHHH.js +48 -0
- package/dist/fleet-validate-BIYREGIK.js +79 -0
- package/dist/{init-5DRU55YR.js → init-LQUB5COQ.js} +44 -37
- package/dist/library-NJAHIGG4.js +217 -0
- package/dist/{memory-7YKKR6UC.js → memory-OG6HOYKM.js} +31 -26
- package/dist/{models-ZPOLRU2C.js → models-5ZG5XY7J.js} +21 -20
- package/dist/{monitor-US5F5YGZ.js → monitor-TJ7AMTGB.js} +49 -30
- package/dist/{orchestrator-E2AL4T5N.js → orchestrator-WZYB54DM.js} +3827 -581
- package/dist/{paths-E7KYAQWE.js → paths-XUC7GS6E.js} +4 -4
- package/dist/{reset-KZ652EK6.js → reset-PXQT45IY.js} +7 -7
- package/dist/{run-SRNBKDWD.js → run-FQ74YF62.js} +53 -45
- package/dist/{share-CGZE33UP.js → share-FW7SVCL3.js} +33 -9
- package/dist/{skills-S2X4DLY5.js → skills-7E7IRB3R.js} +24 -8
- package/dist/{skills-eval-W2GGIC4R.js → skills-eval-LI75W6OK.js} +34 -27
- package/dist/{targets-54SWINWB.js → targets-4CIFKCTW.js} +23 -22
- package/dist/{terminal-lease-SAIF2OGY.js → terminal-lease-WUZY7ZV5.js} +4 -4
- package/dist/{uninstall-BVLWXKBT.js → uninstall-7FV7IP4E.js} +4 -4
- package/dist/{upgrade-JKAR27XC.js → upgrade-K2HVIVMQ.js} +20 -19
- package/dist/{usage-MSAWCLX4.js → usage-GTZELZQX.js} +116 -49
- package/dist/verifiers-RLAHT27O.js +336 -0
- package/dist/{verify-X5HDROLA.js → verify-BX3BRKH5.js} +7 -6
- package/dist/{wiki-generate-GUSOQ6ZP.js → wiki-generate-ASIFASCN.js} +45 -37
- package/dist/worker/entry.js +38 -35
- package/docs/README.md +3 -2
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-versions.md +10 -6
- package/docs/built-in-agents.md +26 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +82 -2
- package/docs/configuration-and-targets.md +79 -2
- package/docs/context-engine.md +1 -1
- package/docs/development-pipeline.md +1 -1
- package/docs/dispatch-architecture-rationale.md +1 -1
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +3 -3
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +1 -1
- package/docs/evidence-and-memory.md +5 -5
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +4 -1
- package/docs/extensions-and-sharing.md +6 -2
- package/docs/fleet-demo-runbook.md +2 -2
- package/docs/fleet-dispatch.md +197 -10
- package/docs/git-commit-provenance.md +2 -2
- package/docs/glossary.md +1 -1
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +2 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +55 -8
- package/docs/proactive-memory.md +1 -1
- package/docs/prompt-envelope-and-tools.md +1 -1
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +79 -64
- package/docs/resource-library.md +59 -0
- package/docs/safety-model.md +2 -2
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +37 -1
- package/docs/skills-marketplace.md +16 -3
- package/docs/tool-usage.md +14 -7
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +1 -1
- package/src/cli/fleet-commands.ts +37 -0
- package/src/cli/fleet-graph.ts +102 -0
- package/src/cli/fleet-new.ts +36 -0
- package/src/cli/fleet-preflight.ts +121 -0
- package/src/cli/fleet-validate.ts +30 -0
- package/src/cli/fleet.ts +173 -335
- package/src/cli/index.ts +3 -1
- package/src/cli/library.ts +190 -0
- package/src/cli/share.ts +13 -1
- package/src/cli/usage.ts +111 -19
- package/src/core/bus-events.ts +4 -0
- package/src/core/commit-attribution.ts +4 -4
- package/src/core/config.ts +130 -0
- package/src/core/defaults.ts +81 -0
- package/src/domains/agents/builtins/architect.md +1 -0
- package/src/domains/agents/builtins/oracle.md +33 -0
- package/src/domains/agents/catalog.ts +13 -1
- package/src/domains/agents/fleet-contract.ts +278 -16
- package/src/domains/agents/index.ts +14 -0
- package/src/domains/agents/result-contract.ts +235 -1
- package/src/domains/config/classify.ts +4 -0
- package/src/domains/dispatch/active-route-planner.ts +14 -0
- package/src/domains/dispatch/backoff.ts +2 -1
- package/src/domains/dispatch/capability-match.ts +1 -0
- package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
- package/src/domains/dispatch/contract.ts +34 -0
- package/src/domains/dispatch/delegation-plan.ts +167 -0
- package/src/domains/dispatch/execution-plan.ts +76 -5
- package/src/domains/dispatch/execution-role.ts +3 -1
- package/src/domains/dispatch/execution-scheduler.ts +183 -67
- package/src/domains/dispatch/extension.ts +258 -9
- package/src/domains/dispatch/fleet-gate.ts +14 -0
- package/src/domains/dispatch/fleet-plan.ts +63 -3
- package/src/domains/dispatch/fleet-run.ts +737 -0
- package/src/domains/dispatch/gate-role-prompts.ts +9 -0
- package/src/domains/dispatch/host-verification.ts +178 -0
- package/src/domains/dispatch/index.ts +38 -0
- package/src/domains/dispatch/intent.ts +159 -0
- package/src/domains/dispatch/receipt-integrity.ts +8 -4
- package/src/domains/dispatch/state.ts +36 -3
- package/src/domains/dispatch/types.ts +51 -6
- package/src/domains/dispatch/validation.ts +66 -6
- package/src/domains/evidence/trust-status.ts +10 -1
- package/src/domains/middleware/index.ts +15 -0
- package/src/domains/middleware/watchdog.ts +281 -0
- package/src/domains/observability/contract.ts +3 -1
- package/src/domains/observability/cost.ts +12 -1
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/observability/index.ts +10 -0
- package/src/domains/observability/out-of-turn-usage.ts +223 -0
- package/src/domains/resources/index.ts +20 -0
- package/src/domains/resources/library.ts +326 -0
- package/src/domains/resources/skills/marketplace.ts +37 -12
- package/src/domains/session/handoff.ts +629 -0
- package/src/domains/share/archive.ts +67 -2
- package/src/entry/orchestrator.ts +37 -0
- package/src/interactive/bus-notices.ts +26 -0
- package/src/interactive/chat-loop.ts +235 -1
- package/src/interactive/chat-renderer.ts +22 -0
- package/src/interactive/cost-overlay.ts +31 -3
- package/src/interactive/council-dispatch.ts +30 -0
- package/src/interactive/council-grid.ts +213 -0
- package/src/interactive/council.ts +99 -0
- package/src/interactive/dispatch-board.ts +260 -16
- package/src/interactive/fleet-run-preview.ts +307 -0
- package/src/interactive/footer/notifications.ts +219 -0
- package/src/interactive/handoff-round.ts +56 -0
- package/src/interactive/interactive-application.ts +43 -1
- package/src/interactive/interactive-event-projection.ts +9 -1
- package/src/interactive/interactive-slash-runtime.ts +52 -2
- package/src/interactive/interactive-subscriptions.ts +14 -2
- package/src/interactive/oracle.ts +179 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +6 -0
- package/src/interactive/overlay-general-openers.ts +190 -1
- package/src/interactive/overlay-key-routing.ts +17 -1
- package/src/interactive/overlay-lifecycle.ts +41 -1
- package/src/interactive/overlay-permission-lifecycle.ts +10 -0
- package/src/interactive/overlay-resource-openers.ts +11 -3
- package/src/interactive/overlay-session-lifecycle.ts +234 -2
- package/src/interactive/overlays/fleet-run-approval.ts +208 -0
- package/src/interactive/overlays/handoff-review.ts +185 -0
- package/src/interactive/overlays/library-install-confirm.ts +151 -0
- package/src/interactive/overlays/list-overlay.ts +168 -2
- package/src/interactive/overlays/settings.ts +101 -4
- package/src/interactive/overlays/side-question.ts +139 -0
- package/src/interactive/overlays/skills-hub.ts +401 -15
- package/src/interactive/side-question.ts +171 -0
- package/src/interactive/slash-commands.ts +432 -5
- package/src/interactive/slash-spec.ts +19 -6
- package/src/interactive/theme/tokens.ts +30 -0
- package/src/interactive/turn-middleware.ts +15 -1
- package/src/interactive/watchdog-run.ts +75 -0
- package/src/interactive/worker-share.ts +56 -1
- package/src/interactive/worker-stream.ts +7 -0
- package/src/tools/bootstrap.ts +3 -0
- package/src/tools/compete-worktrees.ts +13 -79
- package/src/tools/dispatch-admission.ts +242 -8
- package/src/tools/dispatch-arguments.ts +57 -1
- package/src/tools/dispatch-plan.ts +136 -6
- package/src/tools/dispatch-runner.ts +319 -13
- package/src/tools/dispatch-types.ts +20 -1
- package/src/tools/dispatch.ts +72 -2
- package/src/tools/monitor.ts +16 -0
- package/src/tools/profiles.ts +18 -4
- package/src/tools/task-worktree.ts +238 -0
- package/src/tools/verify/authoring.ts +61 -1
- package/src/tools/verify/scripts.ts +62 -0
- package/src/tools/worker-evidence.ts +2 -1
- package/src/worker/spec-contract.ts +1 -0
- package/dist/chunk-HC4CLZ2Y.js +0 -68
|
@@ -4,92 +4,102 @@ import {
|
|
|
4
4
|
receiptEvidenceLabels,
|
|
5
5
|
workerTextLabel,
|
|
6
6
|
workerTextNonEvidenceNotices
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DMD2AGVS.js";
|
|
8
8
|
import {
|
|
9
9
|
createDispatchRunEventRegistry
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-AB4XIIVB.js";
|
|
11
|
+
import "./chunk-VREKEFLL.js";
|
|
12
12
|
import {
|
|
13
13
|
UNVERIFIABLE_RECEIPT_VERIFICATION,
|
|
14
14
|
adaptRunReceiptTrustStatus,
|
|
15
|
-
candidateDiffStat,
|
|
16
|
-
claimCompeteGroup,
|
|
17
|
-
cleanupCompeteGroup,
|
|
18
15
|
closeAgentLedger,
|
|
19
|
-
commitCandidateWork,
|
|
20
|
-
compileExecutionPlan,
|
|
21
|
-
createCandidateWorktree,
|
|
22
16
|
decideReviewGate,
|
|
23
17
|
durableAssistantTextFromEvent,
|
|
24
18
|
executePlan,
|
|
25
19
|
extractRunProvenance,
|
|
26
20
|
finalizePendingGateDecision,
|
|
27
|
-
isGitRepository,
|
|
28
|
-
loadCompeteGroup,
|
|
29
|
-
markCompeteGroupCleanupReady,
|
|
30
|
-
markCompeteGroupWinnerPreserved,
|
|
31
21
|
materializePendingGateDecision,
|
|
32
|
-
mergeWinnerBranch,
|
|
33
22
|
openAgentLedger,
|
|
34
23
|
parseCompeteGateResult,
|
|
35
24
|
preflightPendingGateDecisionMaterialization,
|
|
36
25
|
preparePendingGateDecisionRecovery,
|
|
37
|
-
protectedPathsChangedByCompeteBranch,
|
|
38
26
|
provenanceCompactSuffix,
|
|
39
27
|
readGateDecisionArtifacts,
|
|
40
|
-
recoverCleanupReadyCompeteGroups,
|
|
41
|
-
registerCompeteGroupRun,
|
|
42
|
-
removeCandidateWorktree,
|
|
43
28
|
renderAgentLedgerBoard,
|
|
44
|
-
requireAgentSteps,
|
|
45
29
|
resolvePendingGateDecision,
|
|
46
|
-
settleCompeteGroupRun,
|
|
47
|
-
settleRecoveredCompeteDecision,
|
|
48
30
|
stagePendingGateDecision,
|
|
49
31
|
stagePendingGateOutput
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import
|
|
32
|
+
} from "./chunk-UUANF5CR.js";
|
|
33
|
+
import "./chunk-6TUKSZVF.js";
|
|
34
|
+
import {
|
|
35
|
+
candidateDiffStat,
|
|
36
|
+
claimCompeteGroup,
|
|
37
|
+
cleanupCompeteGroup,
|
|
38
|
+
commitCandidateWork,
|
|
39
|
+
createCandidateWorktree,
|
|
40
|
+
isGitRepository,
|
|
41
|
+
loadCompeteGroup,
|
|
42
|
+
markCompeteGroupCleanupReady,
|
|
43
|
+
markCompeteGroupWinnerPreserved,
|
|
44
|
+
mergeWinnerBranch,
|
|
45
|
+
protectedPathsChangedByCompeteBranch,
|
|
46
|
+
recoverCleanupReadyCompeteGroups,
|
|
47
|
+
registerCompeteGroupRun,
|
|
48
|
+
removeCandidateWorktree,
|
|
49
|
+
settleCompeteGroupRun,
|
|
50
|
+
settleRecoveredCompeteDecision
|
|
51
|
+
} from "./chunk-KZ2H5X4G.js";
|
|
52
|
+
import {
|
|
53
|
+
compileExecutionPlan,
|
|
54
|
+
requireAgentSteps
|
|
55
|
+
} from "./chunk-M4AKACEO.js";
|
|
56
|
+
import "./chunk-RVG5JXAL.js";
|
|
53
57
|
import {
|
|
54
58
|
verifyReceiptIntegrity
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ZGH7FGS5.js";
|
|
56
60
|
import "./chunk-TSHXZTOQ.js";
|
|
57
61
|
import "./chunk-TXOTCRLG.js";
|
|
58
62
|
import "./chunk-HVDIIIQW.js";
|
|
59
63
|
import "./chunk-W6GROXXM.js";
|
|
64
|
+
import "./chunk-KCMKRQX4.js";
|
|
60
65
|
import {
|
|
61
66
|
RESOLVED_DISPATCH_PLAN_ARGUMENT,
|
|
62
67
|
describeDispatchPlan,
|
|
63
68
|
withResolvedPlanTaskPin
|
|
64
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-EELBMBT6.js";
|
|
65
70
|
import {
|
|
66
71
|
COMPETE_STANCES,
|
|
72
|
+
COUNCIL_JUDGE_PROMPT,
|
|
67
73
|
JUDGE_GATE_PROMPT,
|
|
68
74
|
REVIEWER_GATE_PROMPT
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-CEYBNUGC.js";
|
|
76
|
+
import "./chunk-5FR74PWO.js";
|
|
77
|
+
import "./chunk-OBMAI2DP.js";
|
|
71
78
|
import {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} from "./chunk-EKY57CSP.js";
|
|
79
|
+
explainRouteDecision
|
|
80
|
+
} from "./chunk-5C77SEEY.js";
|
|
75
81
|
import {
|
|
76
|
-
explainRouteDecision,
|
|
77
82
|
gateDeciderAgentId,
|
|
78
83
|
gateRouteCorrelation
|
|
79
|
-
} from "./chunk-
|
|
80
|
-
import "./chunk-AOCYTWAV.js";
|
|
81
|
-
import "./chunk-MV3K5QF2.js";
|
|
84
|
+
} from "./chunk-UND3GU2L.js";
|
|
82
85
|
import "./chunk-CMZWFGD2.js";
|
|
83
86
|
import "./chunk-I4HZDVNP.js";
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-UL3WSD3F.js";
|
|
87
|
+
import "./chunk-GH5622CP.js";
|
|
86
88
|
import "./chunk-OQE5J4C6.js";
|
|
87
|
-
import "./chunk-ECH6PKUQ.js";
|
|
88
89
|
import "./chunk-GOXNB3AO.js";
|
|
89
90
|
import "./chunk-HWUFFB6L.js";
|
|
91
|
+
import {
|
|
92
|
+
parseJsonObjectPayload,
|
|
93
|
+
parseScoutResult,
|
|
94
|
+
resultContractSourceId
|
|
95
|
+
} from "./chunk-DJNLUABN.js";
|
|
96
|
+
import "./chunk-AOCYTWAV.js";
|
|
97
|
+
import "./chunk-MV3K5QF2.js";
|
|
98
|
+
import "./chunk-UL3WSD3F.js";
|
|
90
99
|
import "./chunk-ODFEOB4F.js";
|
|
91
100
|
import "./chunk-OZNBF4L3.js";
|
|
92
101
|
import "./chunk-4BJ5BYCE.js";
|
|
102
|
+
import "./chunk-ECH6PKUQ.js";
|
|
93
103
|
import {
|
|
94
104
|
truncateUtf8
|
|
95
105
|
} from "./chunk-6XLNIQDB.js";
|
|
@@ -97,22 +107,22 @@ import "./chunk-5B2AEOW5.js";
|
|
|
97
107
|
import "./chunk-CGKSTWHD.js";
|
|
98
108
|
import "./chunk-XAKHZX5N.js";
|
|
99
109
|
import "./chunk-33YXPOE3.js";
|
|
100
|
-
import "./chunk-
|
|
110
|
+
import "./chunk-VQNODYQ4.js";
|
|
101
111
|
import "./chunk-CFGTUFWB.js";
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-4OC57DA6.js";
|
|
104
|
-
import "./chunk-LL4KHSZI.js";
|
|
105
|
-
import "./chunk-4VP4KH3K.js";
|
|
106
|
-
import "./chunk-VEZEGCGW.js";
|
|
107
|
-
import "./chunk-FQ4SKYE4.js";
|
|
108
|
-
import "./chunk-IKCO5N3L.js";
|
|
109
|
-
import "./chunk-3I7MS7N2.js";
|
|
112
|
+
import "./chunk-JRIO5UD2.js";
|
|
110
113
|
import "./chunk-IHXBNWMM.js";
|
|
111
114
|
import "./chunk-GEYXPTRF.js";
|
|
115
|
+
import "./chunk-UHXRNZ2J.js";
|
|
116
|
+
import "./chunk-4DGYLA73.js";
|
|
117
|
+
import "./chunk-LL4KHSZI.js";
|
|
112
118
|
import "./chunk-SST6Z5JA.js";
|
|
113
119
|
import "./chunk-FO5ZOVUY.js";
|
|
114
120
|
import "./chunk-R346GLFC.js";
|
|
121
|
+
import "./chunk-D4MDIG46.js";
|
|
122
|
+
import "./chunk-FQ4SKYE4.js";
|
|
115
123
|
import "./chunk-4ZG3XFUR.js";
|
|
124
|
+
import "./chunk-IKCO5N3L.js";
|
|
125
|
+
import "./chunk-3I7MS7N2.js";
|
|
116
126
|
import "./chunk-FCSXB6T2.js";
|
|
117
127
|
import "./chunk-APJ265NV.js";
|
|
118
128
|
import "./chunk-YXLYO42X.js";
|
|
@@ -124,7 +134,7 @@ import "./chunk-WEPFGWHJ.js";
|
|
|
124
134
|
import "./chunk-ZGVHUX3M.js";
|
|
125
135
|
import {
|
|
126
136
|
BusChannels
|
|
127
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-OB5HIGJY.js";
|
|
128
138
|
import "./chunk-7CR24IG7.js";
|
|
129
139
|
import "./chunk-IWHMRKLL.js";
|
|
130
140
|
import {
|
|
@@ -506,7 +516,10 @@ function formatDispatchOutput(mode, runs, maxOutputBytes, board = null) {
|
|
|
506
516
|
const stepLabel = mode === "pipeline" ? `step ${index + 1}/${runs.length} ` : "";
|
|
507
517
|
const provenance = provenanceCompactSuffix(extractRunProvenance(receipt));
|
|
508
518
|
const verification = run.integrity.ok ? receipt.verification : UNVERIFIABLE_RECEIPT_VERIFICATION;
|
|
509
|
-
const trustStatus = adaptRunReceiptTrustStatus(
|
|
519
|
+
const trustStatus = adaptRunReceiptTrustStatus(
|
|
520
|
+
{ ...receipt, verification },
|
|
521
|
+
{ integrity: run.integrity }
|
|
522
|
+
);
|
|
510
523
|
const evidenceSuffix = ` ${receiptEvidenceLabels(receipt, verification, run.integrity).join(" ")}`;
|
|
511
524
|
const routingSuffix = run.integrity.ok && receipt.routeDecision !== void 0 && receipt.routingIntent !== void 0 ? ` route_decision=${receipt.routeDecision.decisionHash} route_mode=${receipt.routeDecision.mode}` : "";
|
|
512
525
|
const answerText = run.integrity.ok && (receipt.output?.state === "final" || receipt.outcome !== void 0 && receipt.outcome !== "succeeded") ? receipt.output?.text ?? "" : "";
|
|
@@ -559,6 +572,7 @@ function dispatchDetails(deps, mode, runs, board = null) {
|
|
|
559
572
|
// sealed receipt read-only, plus the integrity check so a tampered
|
|
560
573
|
// receipt is machine-visible here too.
|
|
561
574
|
verification: integrity.ok ? receipt.verification : UNVERIFIABLE_RECEIPT_VERIFICATION,
|
|
575
|
+
hostVerification: integrity.ok ? receipt.hostVerification ?? null : null,
|
|
562
576
|
receiptIntegrity: integrity,
|
|
563
577
|
trustStatus,
|
|
564
578
|
...receipt.outcome !== void 0 && receipt.outcome !== "succeeded" ? { outcome: receipt.outcome, outcomeDetail: receipt.outcomeDetail ?? null } : {},
|
|
@@ -1546,6 +1560,196 @@ ${body}`,
|
|
|
1546
1560
|
details
|
|
1547
1561
|
};
|
|
1548
1562
|
}
|
|
1563
|
+
var COUNCIL_BRIEFING_MAX_BYTES = 8 * 1024;
|
|
1564
|
+
var COUNCIL_BRIEFING_TRUNCATION = "\n[council peer briefing truncated]";
|
|
1565
|
+
function councilVerdict(text) {
|
|
1566
|
+
const parsed = parseJsonObjectPayload(text);
|
|
1567
|
+
return parsed.ok && typeof parsed.value.verdict === "string" && parsed.value.verdict.trim().length > 0 ? parsed.value.verdict.trim() : void 0;
|
|
1568
|
+
}
|
|
1569
|
+
function councilJudgeText(text) {
|
|
1570
|
+
const parsed = parseJsonObjectPayload(text);
|
|
1571
|
+
return parsed.ok && typeof parsed.value.text === "string" && parsed.value.text.trim().length > 0 ? parsed.value.text.trim() : text;
|
|
1572
|
+
}
|
|
1573
|
+
function boundedCouncilBriefing(parts) {
|
|
1574
|
+
return truncateUtf8(parts.join("\n\n"), COUNCIL_BRIEFING_MAX_BYTES, COUNCIL_BRIEFING_TRUNCATION);
|
|
1575
|
+
}
|
|
1576
|
+
async function runCouncil(deps, base, council, timeoutMs, signal) {
|
|
1577
|
+
const group = newGateGroupId("council");
|
|
1578
|
+
const runs = [];
|
|
1579
|
+
let prior = /* @__PURE__ */ new Map();
|
|
1580
|
+
const runMember = async (request) => {
|
|
1581
|
+
if (signal?.aborted) throw new Error("council dispatch aborted");
|
|
1582
|
+
const handle = await deps.dispatch.dispatch(request);
|
|
1583
|
+
let timer;
|
|
1584
|
+
if (timeoutMs !== void 0) {
|
|
1585
|
+
timer = setTimeout(
|
|
1586
|
+
() => deps.dispatch.abort(handle.runId, { cause: "timeout", detail: `timed out after ${timeoutMs}ms` }),
|
|
1587
|
+
timeoutMs
|
|
1588
|
+
);
|
|
1589
|
+
}
|
|
1590
|
+
const abort = () => deps.dispatch.abort(handle.runId);
|
|
1591
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
1592
|
+
try {
|
|
1593
|
+
const [summary, receipt] = await Promise.all([
|
|
1594
|
+
consumeGateSensitiveDispatchEvents(deps, handle.runId, request.agentId, handle.events),
|
|
1595
|
+
handle.finalPromise
|
|
1596
|
+
]);
|
|
1597
|
+
return completeRun(deps, receipt, summary);
|
|
1598
|
+
} finally {
|
|
1599
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
1600
|
+
signal?.removeEventListener("abort", abort);
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
for (let round = 1; round <= council.rounds; round += 1) {
|
|
1604
|
+
const settled = await Promise.all(
|
|
1605
|
+
council.members.map(async (member, index) => {
|
|
1606
|
+
const peerParts = base.briefing === void 0 ? [] : [`[original briefing] ${base.briefing}`];
|
|
1607
|
+
if (round > 1) {
|
|
1608
|
+
for (const peer of council.members) {
|
|
1609
|
+
if (peer.label === member.label) continue;
|
|
1610
|
+
const previous = prior.get(peer.label);
|
|
1611
|
+
if (previous === void 0 || isPipelineStepFailure(previous.receipt)) {
|
|
1612
|
+
peerParts.push(`[${peer.label}] failed in prior round; no answer contributed.`);
|
|
1613
|
+
} else {
|
|
1614
|
+
peerParts.push(`[${peer.label}] ${normalizedAssistantText(previous.summary)}`);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
const position = (round - 1) * council.members.length + index + 1;
|
|
1619
|
+
const pinned = council.resolvedTasks?.find((task) => task.role === "member" && task.position === position);
|
|
1620
|
+
const request = {
|
|
1621
|
+
...base,
|
|
1622
|
+
executionRole: "researcher",
|
|
1623
|
+
autonomy: "read-only",
|
|
1624
|
+
toolProfile: "council-read-only",
|
|
1625
|
+
target: member.target,
|
|
1626
|
+
...member.model ? { model: member.model } : {},
|
|
1627
|
+
...member.thinking ? { thinkingLevel: member.thinking } : {},
|
|
1628
|
+
gate: {
|
|
1629
|
+
role: "member",
|
|
1630
|
+
group,
|
|
1631
|
+
cycle: round,
|
|
1632
|
+
...round > 1 ? {
|
|
1633
|
+
subjects: [...prior.entries()].filter(([label]) => label !== member.label).map(([, run]) => subjectRef(run.receipt))
|
|
1634
|
+
} : {}
|
|
1635
|
+
},
|
|
1636
|
+
council: { group, label: member.label, ...member.color ? { color: member.color } : {}, round },
|
|
1637
|
+
...round > 1 ? { briefing: boundedCouncilBriefing(peerParts) } : base.briefing !== void 0 ? { briefing: base.briefing } : {}
|
|
1638
|
+
};
|
|
1639
|
+
return [
|
|
1640
|
+
member.label,
|
|
1641
|
+
await runMember(withResolvedPlanTaskPin(request, pinned, { pinTask: false, pinBriefing: false }))
|
|
1642
|
+
];
|
|
1643
|
+
})
|
|
1644
|
+
);
|
|
1645
|
+
prior = new Map(settled);
|
|
1646
|
+
runs.push(...settled.map(([, run]) => run));
|
|
1647
|
+
}
|
|
1648
|
+
const members = runs.map((run) => {
|
|
1649
|
+
const text = normalizedAssistantText(run.summary);
|
|
1650
|
+
const failed = isPipelineStepFailure(run.receipt);
|
|
1651
|
+
const verdict = councilVerdict(text);
|
|
1652
|
+
return {
|
|
1653
|
+
label: run.receipt.council?.label ?? "member",
|
|
1654
|
+
runId: run.receipt.runId,
|
|
1655
|
+
round: run.receipt.council?.round ?? 1,
|
|
1656
|
+
answer: text,
|
|
1657
|
+
...verdict !== void 0 ? { verdict } : {},
|
|
1658
|
+
...failed ? { failed: { reason: pipelineFailureReason(run.receipt) } } : {}
|
|
1659
|
+
};
|
|
1660
|
+
});
|
|
1661
|
+
const finalMembers = members.filter((member) => member.round === council.rounds && member.failed === void 0);
|
|
1662
|
+
const finalReports = members.filter((member) => member.round === council.rounds);
|
|
1663
|
+
let synthesis = { kind: council.synthesis };
|
|
1664
|
+
if (council.synthesis === "vote") {
|
|
1665
|
+
const tally = {};
|
|
1666
|
+
for (const member of finalMembers)
|
|
1667
|
+
if (member.verdict !== void 0) tally[member.verdict] = (tally[member.verdict] ?? 0) + 1;
|
|
1668
|
+
const ranked = Object.entries(tally).sort((left, right) => right[1] - left[1] || left[0].localeCompare(right[0]));
|
|
1669
|
+
const winner = ranked[0];
|
|
1670
|
+
const verdict = winner === void 0 ? "no_verdict_field" : winner[1] > finalMembers.length / 2 ? winner[0] : "no_majority";
|
|
1671
|
+
synthesis = { kind: "vote", verdict, tally };
|
|
1672
|
+
} else if (council.synthesis === "judge") {
|
|
1673
|
+
const finalRuns = [...prior.values()];
|
|
1674
|
+
const judgeRequest = {
|
|
1675
|
+
agentId: council.judge?.agent ?? base.agentId,
|
|
1676
|
+
executionRole: "judge",
|
|
1677
|
+
task: `Synthesize the council answers for this task:
|
|
1678
|
+
|
|
1679
|
+
${base.task}`,
|
|
1680
|
+
briefing: boundedCouncilBriefing(
|
|
1681
|
+
finalReports.map(
|
|
1682
|
+
(member) => member.failed === void 0 ? `[${member.label}] ${member.answer}` : `[${member.label}] failed; no final answer contributed. Reason: ${member.failed.reason}`
|
|
1683
|
+
)
|
|
1684
|
+
),
|
|
1685
|
+
systemPrompt: COUNCIL_JUDGE_PROMPT,
|
|
1686
|
+
autonomy: "read-only",
|
|
1687
|
+
toolProfile: "council-read-only",
|
|
1688
|
+
gate: { role: "synthesis", group, cycle: council.rounds, subjects: finalRuns.map((run) => subjectRef(run.receipt)) },
|
|
1689
|
+
council: { group, label: "synthesis", round: council.rounds },
|
|
1690
|
+
...council.judge?.target ? { target: council.judge.target } : {},
|
|
1691
|
+
...council.judge?.model ? { model: council.judge.model } : {},
|
|
1692
|
+
...council.judge?.node ? { node: council.judge.node } : {},
|
|
1693
|
+
...base.plan ? { plan: base.plan } : {},
|
|
1694
|
+
...base.parentToolCallId ? { parentToolCallId: base.parentToolCallId } : {}
|
|
1695
|
+
};
|
|
1696
|
+
const pinned = council.resolvedTasks?.find((task) => task.role === "synthesis");
|
|
1697
|
+
const judgeRun = await runMember(
|
|
1698
|
+
withResolvedPlanTaskPin(judgeRequest, pinned, { pinTask: false, pinBriefing: false })
|
|
1699
|
+
);
|
|
1700
|
+
runs.push(judgeRun);
|
|
1701
|
+
const rawText = normalizedAssistantText(judgeRun.summary);
|
|
1702
|
+
const text = councilJudgeText(rawText);
|
|
1703
|
+
const verdict = councilVerdict(rawText);
|
|
1704
|
+
synthesis = {
|
|
1705
|
+
kind: "judge",
|
|
1706
|
+
text,
|
|
1707
|
+
...verdict !== void 0 ? { verdict } : {},
|
|
1708
|
+
judgeRunId: judgeRun.receipt.runId
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1711
|
+
if (council.synthesis !== "judge" && prior.size > 0 && deps.dispatch.sealCouncilSynthesis !== void 0) {
|
|
1712
|
+
const finalRuns = [...prior.values()];
|
|
1713
|
+
const template = finalRuns[0];
|
|
1714
|
+
if (template === void 0) throw new Error("council synthesis has no final member receipt");
|
|
1715
|
+
const text = JSON.stringify({ members, synthesis });
|
|
1716
|
+
const receipt = await deps.dispatch.sealCouncilSynthesis({
|
|
1717
|
+
group,
|
|
1718
|
+
round: council.rounds,
|
|
1719
|
+
kind: council.synthesis,
|
|
1720
|
+
text,
|
|
1721
|
+
subjects: finalRuns.map((run) => subjectRef(run.receipt)),
|
|
1722
|
+
template: template.receipt
|
|
1723
|
+
});
|
|
1724
|
+
runs.push(
|
|
1725
|
+
completeRun(deps, receipt, {
|
|
1726
|
+
count: 0,
|
|
1727
|
+
types: [],
|
|
1728
|
+
lastAssistantText: text,
|
|
1729
|
+
terminalAttemptRunId: receipt.runId
|
|
1730
|
+
})
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
return { report: { members, synthesis }, runs, group };
|
|
1734
|
+
}
|
|
1735
|
+
function councilResult(deps, outcome) {
|
|
1736
|
+
const sections = outcome.report.members.filter((member) => member.round === Math.max(...outcome.report.members.map((entry) => entry.round))).map((member) => {
|
|
1737
|
+
const run = outcome.runs.find((entry) => entry.receipt.runId === member.runId);
|
|
1738
|
+
return `[${member.label}] ${run?.receipt.targetId ?? "unknown"}/${run?.receipt.wireModelId ?? "unknown"}
|
|
1739
|
+
${member.answer}`;
|
|
1740
|
+
});
|
|
1741
|
+
sections.push(
|
|
1742
|
+
`[synthesis] ${outcome.report.synthesis.kind}
|
|
1743
|
+
${outcome.report.synthesis.text ?? outcome.report.synthesis.verdict ?? "none"}`
|
|
1744
|
+
);
|
|
1745
|
+
const details = {
|
|
1746
|
+
...dispatchDetails(deps, "council", outcome.runs),
|
|
1747
|
+
council: { group: outcome.group, ...outcome.report }
|
|
1748
|
+
};
|
|
1749
|
+
const finalRound = Math.max(...outcome.report.members.map((member) => member.round));
|
|
1750
|
+
const failed = outcome.report.members.some((member) => member.round === finalRound && member.failed !== void 0) || outcome.runs.some((run) => run.receipt.gate?.role === "synthesis" && isPipelineStepFailure(run.receipt));
|
|
1751
|
+
return failed ? { kind: "error", message: sections.join("\n\n"), details } : { kind: "ok", output: sections.join("\n\n"), details };
|
|
1752
|
+
}
|
|
1549
1753
|
async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
1550
1754
|
const deps = {
|
|
1551
1755
|
...inputDeps,
|
|
@@ -1607,6 +1811,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1607
1811
|
const maxOutputBytes = snapshot.maxOutputBytes;
|
|
1608
1812
|
const timeoutMs = snapshot.timeoutMs;
|
|
1609
1813
|
let review = snapshot.review === void 0 ? void 0 : structuredClone(snapshot.review);
|
|
1814
|
+
let council = snapshot.council === void 0 ? void 0 : structuredClone(snapshot.council);
|
|
1610
1815
|
const autonomy = deps.getAutonomy?.() ?? "auto-edit";
|
|
1611
1816
|
const authenticatedApproval = options?.approval?.actionClass === "dispatch" ? options.approval : void 0;
|
|
1612
1817
|
const trustedResolvedPlan = admissionState.trustedResolvedPlans.get(args) ?? null;
|
|
@@ -1625,7 +1830,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1625
1830
|
};
|
|
1626
1831
|
}
|
|
1627
1832
|
if (resolvedPlan !== null) {
|
|
1628
|
-
const primaryRole = review !== void 0 ? "builder" : mode === "compete" ? "candidate" : "task";
|
|
1833
|
+
const primaryRole = review !== void 0 ? "builder" : mode === "compete" ? "candidate" : mode === "council" ? "member" : "task";
|
|
1629
1834
|
const primaryTasks = resolvedPlan.tasks.filter((task) => task.role === primaryRole);
|
|
1630
1835
|
const executionTasks = primaryRole === "task" ? primaryTasks : primaryTasks.slice(0, 1);
|
|
1631
1836
|
if (executionTasks.length !== requests.length) {
|
|
@@ -1659,6 +1864,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1659
1864
|
resolvedTasks: resolvedPlan.tasks
|
|
1660
1865
|
};
|
|
1661
1866
|
}
|
|
1867
|
+
if (council !== void 0) council = { ...council, resolvedTasks: resolvedPlan.tasks };
|
|
1662
1868
|
}
|
|
1663
1869
|
if (planView.planScale) {
|
|
1664
1870
|
const plan = {
|
|
@@ -1680,7 +1886,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1680
1886
|
};
|
|
1681
1887
|
requests = requests.map((request) => ({ ...request, plan }));
|
|
1682
1888
|
}
|
|
1683
|
-
const backgroundRefusal = resolvedPlan?.topology === "fleet" ? "a Scout dependency plan drives its stages from this turn" : mode === "compete" ? "compete holds its judge gate in this turn" : review !== void 0 ? "a review gate holds its cycle state in this turn" : mode === "pipeline" && requests.length > 1 ? "a pipeline threads each step's output through this turn" : timeoutMs !== void 0 ? `this call set timeout_ms=${timeoutMs} and nobody would be left to enforce the deadline` : deps.dispatch.detached === void 0 ? "detached batch records are unavailable in this context" : null;
|
|
1889
|
+
const backgroundRefusal = resolvedPlan?.topology === "fleet" ? "a Scout dependency plan drives its stages from this turn" : mode === "compete" ? "compete holds its judge gate in this turn" : mode === "council" ? "council holds its rounds and synthesis in this turn" : review !== void 0 ? "a review gate holds its cycle state in this turn" : mode === "pipeline" && requests.length > 1 ? "a pipeline threads each step's output through this turn" : timeoutMs !== void 0 ? `this call set timeout_ms=${timeoutMs} and nobody would be left to enforce the deadline` : deps.dispatch.detached === void 0 ? "detached batch records are unavailable in this context" : null;
|
|
1684
1890
|
const background = createBackgroundSwitch();
|
|
1685
1891
|
const backgroundLabel = resolvedPlan?.topology === "fleet" ? "fleet" : review !== void 0 ? "review" : mode;
|
|
1686
1892
|
const releaseBackground = registerBackgroundControl(deps, options?.toolCallId, {
|
|
@@ -1704,6 +1910,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1704
1910
|
topology: executionPlan.topology,
|
|
1705
1911
|
rootTask: executionPlan.rootTask,
|
|
1706
1912
|
maxWorkers: executionPlan.maxWorkers,
|
|
1913
|
+
...executionPlan.writers === 1 ? { writers: 1 } : {},
|
|
1707
1914
|
onFailure: executionPlan.onFailure,
|
|
1708
1915
|
steps: requireAgentSteps(executionPlan.steps).map((step) => ({
|
|
1709
1916
|
...step,
|
|
@@ -1790,6 +1997,16 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1790
1997
|
return { kind: "error", message: dispatchErrorMessage(err) };
|
|
1791
1998
|
}
|
|
1792
1999
|
}
|
|
2000
|
+
if (mode === "council") {
|
|
2001
|
+
if (requests.length !== 1 || requests[0] === void 0 || council === void 0) {
|
|
2002
|
+
return { kind: "error", message: "dispatch: trusted council settings are unavailable" };
|
|
2003
|
+
}
|
|
2004
|
+
try {
|
|
2005
|
+
return councilResult(deps, await runCouncil(deps, requests[0], council, timeoutMs, options?.signal));
|
|
2006
|
+
} catch (err) {
|
|
2007
|
+
return { kind: "error", message: dispatchErrorMessage(err) };
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
1793
2010
|
if (review !== void 0) {
|
|
1794
2011
|
if (requests.length !== 1 || requests[0] === void 0) {
|
|
1795
2012
|
return { kind: "error", message: REVIEW_SINGLE_TASK_MESSAGE };
|
|
@@ -1812,7 +2029,7 @@ async function runDispatchTool(inputDeps, admissionState, args, options) {
|
|
|
1812
2029
|
} else if (mode === "sequential" || mode === "pipeline" || requests.length === 1) {
|
|
1813
2030
|
runs = await runSequential(deps, requests, mode, timeoutMs, options?.signal, background);
|
|
1814
2031
|
} else {
|
|
1815
|
-
const batch = await runBatch(deps, requests, timeoutMs, options?.signal, background);
|
|
2032
|
+
const batch = snapshot.writers === 1 ? await runWriterLimitedBatch(deps, requests, timeoutMs, options?.signal) : await runBatch(deps, requests, timeoutMs, options?.signal, background);
|
|
1816
2033
|
runs = batch.runs;
|
|
1817
2034
|
board = batch.board;
|
|
1818
2035
|
}
|
|
@@ -2006,7 +2223,50 @@ async function runBatch(deps, requests, timeoutMs, signal, background) {
|
|
|
2006
2223
|
if (!backgrounded) await closeAgentLedger(ledgerId);
|
|
2007
2224
|
}
|
|
2008
2225
|
}
|
|
2226
|
+
async function runWriterLimitedBatch(deps, requests, timeoutMs, signal) {
|
|
2227
|
+
const specs = new Map(deps.getAgentSpecs().map((spec) => [spec.id, spec]));
|
|
2228
|
+
const readers = requests.filter((request) => specs.get(request.agentId)?.capabilityClass === "read-only");
|
|
2229
|
+
const writers = requests.filter((request) => specs.get(request.agentId)?.capabilityClass !== "read-only");
|
|
2230
|
+
const ledgerId = newGateGroupId("ledger");
|
|
2231
|
+
await openAgentLedger(ledgerId);
|
|
2232
|
+
const activeIds = /* @__PURE__ */ new Set();
|
|
2233
|
+
const completed = /* @__PURE__ */ new Map();
|
|
2234
|
+
const start = async (request) => {
|
|
2235
|
+
const ledgered = { ...request, ledger: { id: ledgerId, sequence: 0 } };
|
|
2236
|
+
const handle = await deps.dispatch.dispatch(ledgered);
|
|
2237
|
+
activeIds.add(handle.runId);
|
|
2238
|
+
const registered = deps.runEvents.registerSingle(handle, request.agentId, fallbackProgressBus(deps));
|
|
2239
|
+
const value = await registered.completion;
|
|
2240
|
+
activeIds.delete(handle.runId);
|
|
2241
|
+
const run = completeRun(deps, value.receipt, value.summary);
|
|
2242
|
+
completed.set(request, run);
|
|
2243
|
+
return run;
|
|
2244
|
+
};
|
|
2245
|
+
const abort = (bySignal) => {
|
|
2246
|
+
const reason = bySignal ? void 0 : { cause: "timeout", detail: `timed out after ${timeoutMs}ms` };
|
|
2247
|
+
for (const runId of activeIds) deps.dispatch.abort(runId, reason);
|
|
2248
|
+
};
|
|
2249
|
+
const onSignalAbort = () => abort(true);
|
|
2250
|
+
const timer = timeoutMs === void 0 ? null : setTimeout(() => abort(false), timeoutMs);
|
|
2251
|
+
signal?.addEventListener("abort", onSignalAbort, { once: true });
|
|
2252
|
+
try {
|
|
2253
|
+
const readerPromises = readers.map((request) => start(request));
|
|
2254
|
+
for (const writer of writers) await start(writer);
|
|
2255
|
+
await Promise.all(readerPromises);
|
|
2256
|
+
return {
|
|
2257
|
+
runs: requests.flatMap((request) => {
|
|
2258
|
+
const run = completed.get(request);
|
|
2259
|
+
return run === void 0 ? [] : [run];
|
|
2260
|
+
}),
|
|
2261
|
+
board: renderAgentLedgerBoard(ledgerId)
|
|
2262
|
+
};
|
|
2263
|
+
} finally {
|
|
2264
|
+
if (timer !== null) clearTimeout(timer);
|
|
2265
|
+
signal?.removeEventListener("abort", onSignalAbort);
|
|
2266
|
+
await closeAgentLedger(ledgerId);
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2009
2269
|
export {
|
|
2010
2270
|
runDispatchTool
|
|
2011
2271
|
};
|
|
2012
|
-
//# sourceMappingURL=dispatch-runner-
|
|
2272
|
+
//# sourceMappingURL=dispatch-runner-B7MTOVKL.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-465YSENW.js";
|
|
3
3
|
import {
|
|
4
4
|
printError,
|
|
5
5
|
printHeader
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
source_default
|
|
9
9
|
} from "./chunk-5TSRNF4G.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-JRIO5UD2.js";
|
|
11
|
+
import "./chunk-SST6Z5JA.js";
|
|
11
12
|
import "./chunk-IKCO5N3L.js";
|
|
12
13
|
import "./chunk-3I7MS7N2.js";
|
|
13
|
-
import "./chunk-SST6Z5JA.js";
|
|
14
14
|
import "./chunk-APJ265NV.js";
|
|
15
15
|
import "./chunk-YXLYO42X.js";
|
|
16
16
|
import "./chunk-BNAZZHFG.js";
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
synthesizeMenu,
|
|
297
297
|
topicToFile
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=docs-
|
|
299
|
+
//# sourceMappingURL=docs-FLJTIDSE.js.map
|
|
@@ -6,32 +6,32 @@ import {
|
|
|
6
6
|
runDoctorFleetChecks,
|
|
7
7
|
runDoctorInteropChecks,
|
|
8
8
|
runDoctorRuntimeChecks
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-3HAPLH5M.js";
|
|
10
|
+
import "./chunk-C4JBQ5SR.js";
|
|
11
11
|
import "./chunk-2SFS6XQE.js";
|
|
12
12
|
import "./chunk-ZWLZP4ZT.js";
|
|
13
13
|
import "./chunk-CGKSTWHD.js";
|
|
14
14
|
import "./chunk-XPLRXC72.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-SROCI7ZU.js";
|
|
16
|
+
import "./chunk-DOOEX22V.js";
|
|
17
|
+
import "./chunk-465YSENW.js";
|
|
18
18
|
import {
|
|
19
19
|
printError
|
|
20
20
|
} from "./chunk-PPAMZ32Z.js";
|
|
21
21
|
import "./chunk-5TSRNF4G.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-4OC57DA6.js";
|
|
24
|
-
import "./chunk-LL4KHSZI.js";
|
|
25
|
-
import "./chunk-4VP4KH3K.js";
|
|
26
|
-
import "./chunk-VEZEGCGW.js";
|
|
27
|
-
import "./chunk-FQ4SKYE4.js";
|
|
28
|
-
import "./chunk-IKCO5N3L.js";
|
|
29
|
-
import "./chunk-3I7MS7N2.js";
|
|
22
|
+
import "./chunk-JRIO5UD2.js";
|
|
30
23
|
import "./chunk-IHXBNWMM.js";
|
|
24
|
+
import "./chunk-UHXRNZ2J.js";
|
|
25
|
+
import "./chunk-4DGYLA73.js";
|
|
26
|
+
import "./chunk-LL4KHSZI.js";
|
|
31
27
|
import "./chunk-SST6Z5JA.js";
|
|
32
28
|
import "./chunk-FO5ZOVUY.js";
|
|
33
29
|
import "./chunk-R346GLFC.js";
|
|
30
|
+
import "./chunk-D4MDIG46.js";
|
|
31
|
+
import "./chunk-FQ4SKYE4.js";
|
|
34
32
|
import "./chunk-4ZG3XFUR.js";
|
|
33
|
+
import "./chunk-IKCO5N3L.js";
|
|
34
|
+
import "./chunk-3I7MS7N2.js";
|
|
35
35
|
import "./chunk-APJ265NV.js";
|
|
36
36
|
import "./chunk-YXLYO42X.js";
|
|
37
37
|
import "./chunk-BNAZZHFG.js";
|
|
@@ -84,4 +84,4 @@ async function runDoctorCommand(args = []) {
|
|
|
84
84
|
export {
|
|
85
85
|
runDoctorCommand
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=doctor-
|
|
87
|
+
//# sourceMappingURL=doctor-RN4YKO2X.js.map
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
loadEvalTaskFile,
|
|
12
12
|
verifyReceiptIntegrity,
|
|
13
13
|
writeEvalArtifactV4
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZGH7FGS5.js";
|
|
15
15
|
import {
|
|
16
16
|
shellQuote
|
|
17
17
|
} from "./chunk-TXOTCRLG.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5C77SEEY.js";
|
|
19
|
+
import "./chunk-UND3GU2L.js";
|
|
19
20
|
import "./chunk-AOCYTWAV.js";
|
|
20
21
|
import "./chunk-MV3K5QF2.js";
|
|
21
22
|
import "./chunk-UL3WSD3F.js";
|
|
@@ -31,18 +32,18 @@ import {
|
|
|
31
32
|
import {
|
|
32
33
|
enumerateWorkspaceFiles
|
|
33
34
|
} from "./chunk-33YXPOE3.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-465YSENW.js";
|
|
35
36
|
import {
|
|
36
37
|
printError
|
|
37
38
|
} from "./chunk-PPAMZ32Z.js";
|
|
38
39
|
import "./chunk-5TSRNF4G.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-IKCO5N3L.js";
|
|
41
|
-
import "./chunk-3I7MS7N2.js";
|
|
40
|
+
import "./chunk-JRIO5UD2.js";
|
|
42
41
|
import "./chunk-SST6Z5JA.js";
|
|
43
42
|
import {
|
|
44
43
|
InvalidIdError
|
|
45
44
|
} from "./chunk-R346GLFC.js";
|
|
45
|
+
import "./chunk-IKCO5N3L.js";
|
|
46
|
+
import "./chunk-3I7MS7N2.js";
|
|
46
47
|
import {
|
|
47
48
|
require_dist
|
|
48
49
|
} from "./chunk-APJ265NV.js";
|
|
@@ -2553,4 +2554,4 @@ function reportFormat(value) {
|
|
|
2553
2554
|
export {
|
|
2554
2555
|
runEvalCommand
|
|
2555
2556
|
};
|
|
2556
|
-
//# sourceMappingURL=eval-
|
|
2557
|
+
//# sourceMappingURL=eval-RUBJVSNQ.js.map
|