@iowarp/clio-coder 0.3.4 → 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 +65 -2
- package/CONTRIBUTING.md +6 -6
- package/README.md +16 -5
- package/dist/{acp-S5R4RR5B.js → acp-SK4MD6MM.js} +11 -11
- package/dist/{agents-P6DMMVZY.js → agents-2FN2K6ME.js} +33 -26
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-2XCZLPKS.js → auth-QIYZWM5I.js} +15 -15
- package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
- package/dist/{chunk-VAWWTKDP.js → chunk-3HAPLH5M.js} +11 -11
- package/dist/{chunk-YCWGATWI.js → chunk-465YSENW.js} +3 -3
- package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
- package/dist/{chunk-UZHIZC5S.js → chunk-4DWFMQDR.js} +61 -76
- package/dist/{chunk-ZWMF7253.js → chunk-5C3AQNDW.js} +328 -9
- package/dist/{chunk-22NAGB7X.js → chunk-5C77SEEY.js} +5 -94
- package/dist/{chunk-WPQLXFOZ.js → chunk-5FR74PWO.js} +3 -2
- package/dist/{chunk-35MKKU5R.js → chunk-5UJ6ECTS.js} +18 -10
- package/dist/{chunk-BRXQQJFP.js → chunk-6M7VS3J3.js} +571 -50
- package/dist/{chunk-QQK64KLB.js → chunk-6TUKSZVF.js} +141 -23
- package/dist/{chunk-N4CZJQRK.js → chunk-AB4XIIVB.js} +8 -6
- package/dist/{chunk-KRPY7NTG.js → chunk-BMWK7ZIZ.js} +14 -20
- package/dist/{chunk-4BPJXDWC.js → chunk-C4JBQ5SR.js} +30 -14
- package/dist/{chunk-ZYKPLLNQ.js → chunk-CEYBNUGC.js} +821 -83
- package/dist/{chunk-VEZEGCGW.js → chunk-D4MDIG46.js} +20 -18
- package/dist/chunk-DJNLUABN.js +843 -0
- package/dist/{chunk-BP4OYD6A.js → chunk-DMD2AGVS.js} +21 -2
- 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-3HZ5RWN2.js → chunk-EBEFWSGL.js} +9 -7
- package/dist/{chunk-EDRHSCIE.js → chunk-EELBMBT6.js} +128 -13
- package/dist/{chunk-HV5X7OR2.js → chunk-EOOQZZDE.js} +16 -14
- package/dist/{chunk-WR67VIZY.js → chunk-FOT2FX5J.js} +63 -5
- package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
- package/dist/{chunk-FYYLNIL5.js → chunk-GH5622CP.js} +2 -2
- package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
- package/dist/chunk-GWS3VEIW.js +195 -0
- package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
- package/dist/chunk-HWUFFB6L.js +83 -0
- package/dist/{chunk-X6COSD2O.js → chunk-J7PIKKWC.js} +8 -436
- package/dist/{chunk-NILBFAPG.js → chunk-JNXPYBB4.js} +2 -2
- package/dist/{chunk-4VP4KH3K.js → chunk-JRIO5UD2.js} +4 -4
- package/dist/{chunk-K6WL7QZT.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-A2GZF7DC.js → chunk-LADCF22A.js} +13 -13
- package/dist/chunk-LCGCVYZ4.js +57 -0
- package/dist/chunk-M4AKACEO.js +382 -0
- package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
- package/dist/{chunk-4JUF2NNX.js → chunk-MXI6J5JF.js} +7 -7
- package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
- package/dist/{chunk-TTNYS3EA.js → chunk-OB5HIGJY.js} +1 -1
- package/dist/{chunk-7RXG6QRZ.js → chunk-OBMAI2DP.js} +61 -840
- package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
- package/dist/chunk-PD3MESLB.js +242 -0
- package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
- package/dist/{chunk-VMNQ6OZA.js → chunk-QCTRSGHQ.js} +963 -786
- 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-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
- 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-QQL5RT5M.js → chunk-UUANF5CR.js} +2323 -2114
- package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
- package/dist/chunk-UVDSQ6LW.js +472 -0
- package/dist/{chunk-QWU7ZBO7.js → chunk-VQNODYQ4.js} +215 -56
- package/dist/chunk-VREKEFLL.js +37 -0
- package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
- package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
- package/dist/{chunk-MEQ45TQ4.js → chunk-WJHBC77E.js} +21 -7
- package/dist/{chunk-HXG4IURW.js → chunk-X2KV5FXT.js} +2 -2
- package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
- package/dist/{chunk-2LZI5CAG.js → chunk-XEGB6BCN.js} +228 -36
- package/dist/{chunk-E25LMLRW.js → chunk-YD734TPH.js} +2 -2
- package/dist/{verifiers-4UUM6TEE.js → chunk-YTYFXUI3.js} +121 -372
- package/dist/{chunk-3JLKSKD7.js → chunk-ZGH7FGS5.js} +17 -7
- package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
- package/dist/cli/index.js +34 -32
- package/dist/{clio-J5JIOIDS.js → clio-WBVQEBKO.js} +7 -7
- package/dist/{code-nav-AXCXSBHX.js → code-nav-FGGFIE7L.js} +7 -7
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-KELWS457.js → components-F7OEATSO.js} +5 -5
- package/dist/{config-OEBMIN2U.js → config-TRBL3RCF.js} +48 -41
- package/dist/{configure-PUQOSIXQ.js → configure-OLCVPHNM.js} +17 -17
- package/dist/{context-URSXPBCK.js → context-MJIJ6GOX.js} +12 -12
- package/dist/{context-EKDCKUUZ.js → context-WFPKQSM6.js} +26 -9
- package/dist/{context-MGSE4Z2T.js → context-XEWE3MOJ.js} +44 -37
- package/dist/{context-clear-KDAJRNUK.js → context-clear-KNOS2JPB.js} +44 -37
- package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
- package/dist/{context-working-set-SBKMPPI2.js → context-working-set-EUXAZI6N.js} +14 -13
- package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-B7MTOVKL.js} +321 -60
- package/dist/{docs-2C2LTVT2.js → docs-FLJTIDSE.js} +5 -5
- package/dist/{doctor-7BSE27PJ.js → doctor-RN4YKO2X.js} +15 -15
- package/dist/{eval-IZGDOO4H.js → eval-RUBJVSNQ.js} +52 -236
- package/dist/{evidence-SR7WXB5B.js → evidence-JZNBUOQZ.js} +39 -33
- package/dist/{evolve-K7VE2CBX.js → evolve-FJVC4KKI.js} +39 -33
- package/dist/{extensions-QVDOHDGJ.js → extensions-IQL36S7K.js} +5 -5
- package/dist/{fleet-7XMJNQNF.js → fleet-BDKYJFCP.js} +243 -370
- 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-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
- package/dist/fleet-validate-BIYREGIK.js +79 -0
- package/dist/{init-JGNPAYXT.js → init-LQUB5COQ.js} +57 -48
- package/dist/library-NJAHIGG4.js +217 -0
- package/dist/memory-OG6HOYKM.js +472 -0
- package/dist/{models-ZMMLFJNN.js → models-5ZG5XY7J.js} +23 -22
- package/dist/{monitor-2F3T5KHP.js → monitor-TJ7AMTGB.js} +69 -35
- package/dist/{orchestrator-ORHT43JB.js → orchestrator-WZYB54DM.js} +4868 -1189
- package/dist/{paths-UXLN5YYZ.js → paths-XUC7GS6E.js} +5 -5
- package/dist/{reset-NXGTYNUO.js → reset-PXQT45IY.js} +8 -8
- package/dist/{run-RF4WJGMT.js → run-FQ74YF62.js} +82 -62
- package/dist/{share-UT3W6E4M.js → share-FW7SVCL3.js} +34 -10
- package/dist/{skills-PSACKC5Q.js → skills-7E7IRB3R.js} +25 -9
- package/dist/{skills-eval-WJSI55RZ.js → skills-eval-LI75W6OK.js} +43 -35
- package/dist/{targets-PIIRAOYS.js → targets-4CIFKCTW.js} +27 -24
- package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-WUZY7ZV5.js} +5 -4
- package/dist/{uninstall-FZCQCDKC.js → uninstall-7FV7IP4E.js} +5 -5
- package/dist/{upgrade-346TZ6AV.js → upgrade-K2HVIVMQ.js} +21 -20
- package/dist/{usage-6KKXR32N.js → usage-GTZELZQX.js} +159 -59
- package/dist/verifiers-RLAHT27O.js +336 -0
- package/dist/{verify-X5HDROLA.js → verify-BX3BRKH5.js} +7 -6
- package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-ASIFASCN.js} +58 -48
- package/dist/worker/entry.js +98 -84
- package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
- package/docs/README.md +4 -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 +10 -6
- package/docs/built-in-agents.md +26 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +90 -8
- package/docs/configuration-and-targets.md +90 -2
- package/docs/context-engine.md +4 -2
- package/docs/context-working-set.md +4 -4
- package/docs/development-pipeline.md +1 -1
- package/docs/dispatch-architecture-rationale.md +1 -1
- package/docs/documentation-coverage.md +4 -4
- package/docs/documentation-guide.md +4 -4
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +4 -45
- package/docs/evidence-and-memory.md +70 -10
- 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 +224 -11
- 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 +20 -2
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +55 -8
- 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 +83 -65
- package/docs/resource-library.md +59 -0
- package/docs/safety-model.md +29 -7
- 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 +38 -4
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +7 -4
- package/src/cli/agents.ts +2 -3
- package/src/cli/argv.ts +14 -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 +188 -335
- package/src/cli/index.ts +4 -2
- package/src/cli/library.ts +190 -0
- 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/share.ts +13 -1
- package/src/cli/targets.ts +12 -3
- package/src/cli/usage.ts +160 -20
- package/src/core/bus-events.ts +7 -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/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 +2 -1
- package/src/domains/agents/builtins/oracle.md +33 -0
- package/src/domains/agents/catalog.ts +18 -5
- package/src/domains/agents/fleet-contract.ts +278 -16
- package/src/domains/agents/index.ts +14 -0
- package/src/domains/agents/recipe.ts +54 -14
- package/src/domains/agents/result-contract.ts +242 -5
- package/src/domains/config/classify.ts +4 -0
- 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/active-route-planner.ts +14 -0
- package/src/domains/dispatch/backoff.ts +2 -1
- package/src/domains/dispatch/budget-envelope.ts +396 -0
- 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 +36 -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 +339 -36
- 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/orphan-recovery.ts +1 -0
- package/src/domains/dispatch/receipt-integrity.ts +12 -4
- package/src/domains/dispatch/state.ts +37 -3
- package/src/domains/dispatch/types.ts +61 -9
- package/src/domains/dispatch/validation.ts +80 -6
- 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/evidence/trust-status.ts +10 -1
- 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/index.ts +15 -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/middleware/watchdog.ts +281 -0
- package/src/domains/observability/contract.ts +9 -2
- package/src/domains/observability/cost.ts +31 -4
- 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/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/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/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/handoff.ts +629 -0
- package/src/domains/session/history.ts +68 -19
- package/src/domains/session/usage.ts +24 -7
- package/src/domains/share/archive.ts +67 -2
- 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 +55 -1
- package/src/interactive/bus-notices.ts +26 -0
- package/src/interactive/chat-loop-messages.ts +22 -0
- package/src/interactive/chat-loop.ts +248 -1
- package/src/interactive/chat-renderer.ts +41 -3
- package/src/interactive/clio-editor.ts +44 -7
- package/src/interactive/context-overlay.ts +43 -5
- package/src/interactive/cost-overlay.ts +70 -11
- 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 +471 -50
- package/src/interactive/fleet-run-preview.ts +307 -0
- package/src/interactive/footer/notifications.ts +219 -0
- package/src/interactive/footer/widgets.ts +13 -0
- package/src/interactive/handoff-round.ts +56 -0
- package/src/interactive/interactive-application.ts +49 -2
- package/src/interactive/interactive-event-projection.ts +9 -1
- package/src/interactive/interactive-input-runtime.ts +11 -1
- package/src/interactive/interactive-presentation.ts +11 -1
- package/src/interactive/interactive-slash-runtime.ts +52 -2
- package/src/interactive/interactive-subscriptions.ts +14 -2
- package/src/interactive/memory-overlay.ts +89 -4
- package/src/interactive/oracle.ts +179 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +7 -1
- package/src/interactive/overlay-frame.ts +5 -2
- package/src/interactive/overlay-general-openers.ts +230 -2
- package/src/interactive/overlay-key-routing.ts +58 -2
- package/src/interactive/overlay-lifecycle.ts +52 -5
- package/src/interactive/overlay-permission-lifecycle.ts +33 -8
- package/src/interactive/overlay-resource-openers.ts +11 -3
- package/src/interactive/overlay-session-lifecycle.ts +234 -2
- 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/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/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/side-question.ts +171 -0
- package/src/interactive/slash-commands.ts +434 -7
- package/src/interactive/slash-spec.ts +19 -6
- 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/theme/tokens.ts +30 -0
- package/src/interactive/turn-context.ts +96 -23
- package/src/interactive/turn-middleware.ts +16 -1
- package/src/interactive/turn-runtime.ts +37 -8
- package/src/interactive/turn-state.ts +3 -0
- package/src/interactive/watchdog-run.ts +75 -0
- package/src/interactive/worker-progress.ts +440 -0
- package/src/interactive/worker-share.ts +56 -1
- package/src/interactive/worker-stream.ts +58 -110
- package/src/tools/agent-tools.ts +28 -3
- package/src/tools/ask-user.ts +21 -1
- package/src/tools/bootstrap.ts +3 -0
- package/src/tools/compete-worktrees.ts +13 -79
- package/src/tools/context/index.ts +2 -2
- package/src/tools/dispatch-admission.ts +242 -8
- package/src/tools/dispatch-arguments.ts +65 -1
- package/src/tools/dispatch-event-text.ts +19 -0
- 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 +96 -3
- package/src/tools/monitor.ts +31 -0
- package/src/tools/profiles.ts +18 -4
- 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/task-worktree.ts +238 -0
- package/src/tools/verify/authoring.ts +116 -55
- package/src/tools/verify/scripts.ts +62 -0
- package/src/tools/worker-evidence.ts +21 -1
- package/src/worker/spec-contract.ts +44 -3
- package/dist/chunk-EFADSJET.js +0 -18
- package/dist/chunk-HC4CLZ2Y.js +0 -68
- package/dist/memory-4ALKDJ4Q.js +0 -246
- package/src/domains/eval/metrics/chaos-stream.ts +0 -93
package/dist/worker/entry.js
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
createLoopGuardRegistration,
|
|
7
7
|
createProtectedArtifactsRegistration,
|
|
8
8
|
createRegistry,
|
|
9
|
-
describeCallTarget,
|
|
10
9
|
effectiveToolNames,
|
|
11
10
|
isLoopGuardSynthesisBackstopReason,
|
|
12
11
|
isReserveAdmittedTool,
|
|
@@ -17,13 +16,13 @@ import {
|
|
|
17
16
|
resolveDeliveryTools,
|
|
18
17
|
sanitizeLockedSynthesisMessage,
|
|
19
18
|
workerLoopBlockBudget
|
|
20
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-QCTRSGHQ.js";
|
|
21
20
|
import "../chunk-K7VKOLQQ.js";
|
|
22
21
|
import {
|
|
23
22
|
createMiddlewareContractFromSnapshot,
|
|
24
23
|
createMiddlewareToolChoiceControl,
|
|
25
24
|
shouldRequestStalledTurnContinuation
|
|
26
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-XEGB6BCN.js";
|
|
27
26
|
import {
|
|
28
27
|
CONFIRMED_SCOPE,
|
|
29
28
|
READONLY_SCOPE,
|
|
@@ -34,8 +33,8 @@ import {
|
|
|
34
33
|
createLoopState,
|
|
35
34
|
observe
|
|
36
35
|
} from "../chunk-UOV2BYIW.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-EELBMBT6.js";
|
|
37
|
+
import "../chunk-WHGPSPT5.js";
|
|
39
38
|
import {
|
|
40
39
|
DEFAULT_ESCALATION_FALLBACK,
|
|
41
40
|
DEFAULT_ESCALATION_TIMEOUT_MS,
|
|
@@ -43,6 +42,7 @@ import {
|
|
|
43
42
|
claudeToolsOutsideProfile,
|
|
44
43
|
coerceToolInput,
|
|
45
44
|
createRunEffectsRecorder,
|
|
45
|
+
describeCallTarget,
|
|
46
46
|
emitClaudeToolPermissionDecision,
|
|
47
47
|
isClaudeCodeSessionId,
|
|
48
48
|
parseWorkerSpec,
|
|
@@ -50,23 +50,13 @@ import {
|
|
|
50
50
|
startAntigravityWorkerRun,
|
|
51
51
|
startClaudeCodeWorkerRun,
|
|
52
52
|
validateRehydratedWorkerRuntime
|
|
53
|
-
} from "../chunk-
|
|
54
|
-
import "../chunk-
|
|
55
|
-
import {
|
|
56
|
-
DEFAULT_AUTONOMY_LEVEL,
|
|
57
|
-
RESULT_CONTRACT_REPAIR_LIMIT,
|
|
58
|
-
createSafetyPolicyEngine,
|
|
59
|
-
parseResultContract,
|
|
60
|
-
resultContractRepairMessages,
|
|
61
|
-
validateResultContract
|
|
62
|
-
} from "../chunk-7RXG6QRZ.js";
|
|
63
|
-
import "../chunk-22NAGB7X.js";
|
|
53
|
+
} from "../chunk-CEYBNUGC.js";
|
|
54
|
+
import "../chunk-5FR74PWO.js";
|
|
64
55
|
import {
|
|
65
|
-
|
|
66
|
-
} from "../chunk-
|
|
67
|
-
import
|
|
68
|
-
|
|
69
|
-
} from "../chunk-MV3K5QF2.js";
|
|
56
|
+
createSafetyPolicyEngine
|
|
57
|
+
} from "../chunk-OBMAI2DP.js";
|
|
58
|
+
import "../chunk-5C77SEEY.js";
|
|
59
|
+
import "../chunk-UND3GU2L.js";
|
|
70
60
|
import {
|
|
71
61
|
UNKNOWN_RESOURCE,
|
|
72
62
|
WORKER_PROTOCOL_VERSION,
|
|
@@ -86,20 +76,35 @@ import {
|
|
|
86
76
|
deleteInjectedCompileCacheFrom
|
|
87
77
|
} from "../chunk-I4HZDVNP.js";
|
|
88
78
|
import "../chunk-ZI647VB5.js";
|
|
89
|
-
import "../chunk-
|
|
90
|
-
import "../chunk-
|
|
91
|
-
import "../chunk-UL3WSD3F.js";
|
|
79
|
+
import "../chunk-JNXPYBB4.js";
|
|
80
|
+
import "../chunk-GH5622CP.js";
|
|
92
81
|
import "../chunk-XN3L4EYL.js";
|
|
93
82
|
import "../chunk-VG7TBQIY.js";
|
|
94
83
|
import "../chunk-OQE5J4C6.js";
|
|
95
|
-
import "../chunk-ECH6PKUQ.js";
|
|
96
84
|
import "../chunk-SPULKLCF.js";
|
|
97
85
|
import {
|
|
98
86
|
agentSkillToolPolicy
|
|
99
|
-
} from "../chunk-
|
|
100
|
-
import
|
|
87
|
+
} from "../chunk-GOXNB3AO.js";
|
|
88
|
+
import {
|
|
89
|
+
DEFAULT_AUTONOMY_LEVEL
|
|
90
|
+
} from "../chunk-HWUFFB6L.js";
|
|
91
|
+
import {
|
|
92
|
+
RESULT_CONTRACT_REPAIR_LIMIT,
|
|
93
|
+
parseResultContract,
|
|
94
|
+
resultContractRepairMessages,
|
|
95
|
+
validateResultContract
|
|
96
|
+
} from "../chunk-DJNLUABN.js";
|
|
97
|
+
import {
|
|
98
|
+
classify
|
|
99
|
+
} from "../chunk-AOCYTWAV.js";
|
|
100
|
+
import {
|
|
101
|
+
protectedArtifactMutationBlockReason
|
|
102
|
+
} from "../chunk-MV3K5QF2.js";
|
|
103
|
+
import "../chunk-UL3WSD3F.js";
|
|
104
|
+
import "../chunk-ODFEOB4F.js";
|
|
101
105
|
import "../chunk-OZNBF4L3.js";
|
|
102
106
|
import "../chunk-4BJ5BYCE.js";
|
|
107
|
+
import "../chunk-ECH6PKUQ.js";
|
|
103
108
|
import "../chunk-6XLNIQDB.js";
|
|
104
109
|
import "../chunk-5B2AEOW5.js";
|
|
105
110
|
import {
|
|
@@ -118,32 +123,32 @@ import {
|
|
|
118
123
|
setGlobalDefaultMaxOutputTokens,
|
|
119
124
|
setProtectedModelsProvider,
|
|
120
125
|
setResidencyNoticeSink
|
|
121
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-VQNODYQ4.js";
|
|
122
127
|
import "../chunk-CFGTUFWB.js";
|
|
128
|
+
import "../chunk-JRIO5UD2.js";
|
|
129
|
+
import "../chunk-IHXBNWMM.js";
|
|
130
|
+
import "../chunk-GEYXPTRF.js";
|
|
123
131
|
import {
|
|
124
132
|
readSettings,
|
|
125
133
|
validateSettingsFile
|
|
126
|
-
} from "../chunk-
|
|
127
|
-
import "../chunk-
|
|
134
|
+
} from "../chunk-UHXRNZ2J.js";
|
|
135
|
+
import "../chunk-4DGYLA73.js";
|
|
128
136
|
import "../chunk-LL4KHSZI.js";
|
|
129
|
-
import "../chunk-
|
|
137
|
+
import "../chunk-SST6Z5JA.js";
|
|
138
|
+
import "../chunk-FO5ZOVUY.js";
|
|
139
|
+
import "../chunk-R346GLFC.js";
|
|
130
140
|
import {
|
|
131
141
|
setGitCommitAttributionEnabled,
|
|
132
142
|
withManagedGitCommitAttributionEnvironment
|
|
133
|
-
} from "../chunk-
|
|
143
|
+
} from "../chunk-D4MDIG46.js";
|
|
134
144
|
import "../chunk-FQ4SKYE4.js";
|
|
135
|
-
import "../chunk-IKCO5N3L.js";
|
|
136
|
-
import "../chunk-3I7MS7N2.js";
|
|
137
|
-
import "../chunk-IHXBNWMM.js";
|
|
138
|
-
import "../chunk-BPGS2WCQ.js";
|
|
139
|
-
import "../chunk-SST6Z5JA.js";
|
|
140
|
-
import "../chunk-FO5ZOVUY.js";
|
|
141
|
-
import "../chunk-R346GLFC.js";
|
|
142
145
|
import {
|
|
143
146
|
configureGuardrails,
|
|
144
147
|
isWorkerToolCallCapExceededReason,
|
|
145
148
|
isWorkerToolCallCapSynthesisReason
|
|
146
149
|
} from "../chunk-4ZG3XFUR.js";
|
|
150
|
+
import "../chunk-IKCO5N3L.js";
|
|
151
|
+
import "../chunk-3I7MS7N2.js";
|
|
147
152
|
import {
|
|
148
153
|
registerFauxFromEnv
|
|
149
154
|
} from "../chunk-FCSXB6T2.js";
|
|
@@ -155,7 +160,7 @@ import {
|
|
|
155
160
|
} from "../chunk-6EJMN2Y3.js";
|
|
156
161
|
import "../chunk-WEPFGWHJ.js";
|
|
157
162
|
import "../chunk-ZGVHUX3M.js";
|
|
158
|
-
import "../chunk-
|
|
163
|
+
import "../chunk-OB5HIGJY.js";
|
|
159
164
|
import {
|
|
160
165
|
readClioVersion
|
|
161
166
|
} from "../chunk-IWHMRKLL.js";
|
|
@@ -574,9 +579,10 @@ function permissionResultForDecision(decision, toolUseID, input) {
|
|
|
574
579
|
if (toolUseID !== void 0) result.toolUseID = toolUseID;
|
|
575
580
|
return result;
|
|
576
581
|
}
|
|
577
|
-
function decideToolUse(input, toolName, toolInput) {
|
|
582
|
+
function decideToolUse(input, toolCallId, toolName, toolInput) {
|
|
578
583
|
return emitClaudeToolPermissionDecision({
|
|
579
584
|
toolName,
|
|
585
|
+
...toolCallId !== void 0 ? { toolCallId } : {},
|
|
580
586
|
input: coerceToolInput(toolInput),
|
|
581
587
|
safety: input.safety,
|
|
582
588
|
cwd: input.cwd,
|
|
@@ -598,7 +604,7 @@ function decideToolUseOnce(input, toolUseID, toolName, toolInput) {
|
|
|
598
604
|
return decideClaudeSdkToolUseOnce(
|
|
599
605
|
input.handledToolDecisions,
|
|
600
606
|
toolUseID,
|
|
601
|
-
() => decideToolUse(input, toolName, toolInput)
|
|
607
|
+
() => decideToolUse(input, toolUseID, toolName, toolInput)
|
|
602
608
|
);
|
|
603
609
|
}
|
|
604
610
|
function buildCanUseTool(input) {
|
|
@@ -977,6 +983,36 @@ function startWorkerRun(input, emit) {
|
|
|
977
983
|
const deliveryTools = resolveDeliveryTools(input.allowedTools, input.product);
|
|
978
984
|
const middlewareToolChoice = createMiddlewareToolChoiceControl();
|
|
979
985
|
let workerModelRound = 0;
|
|
986
|
+
const loopGuardRegistration = createLoopGuardRegistration({
|
|
987
|
+
safety,
|
|
988
|
+
toolCallCap: workerBudget.hardCap,
|
|
989
|
+
toolCallSoftLimit: workerBudget.toolCalls,
|
|
990
|
+
// A worker's blocks all land in one run-long bucket, so the bound on
|
|
991
|
+
// them is a statement about this run's length, not about a turn.
|
|
992
|
+
turnBlockBudget: workerLoopBlockBudget(workerBudget.revision?.toolCalls ?? workerBudget.toolCalls),
|
|
993
|
+
toolCallSoftReadReserve: readReserve,
|
|
994
|
+
...deliveryTools.length > 0 ? { deliveryTools } : {},
|
|
995
|
+
turnSynthesisLockout: workerBudget.synthesis,
|
|
996
|
+
// Once locked, the next model round is forced text-only at the
|
|
997
|
+
// request level. The lockout directive alone relies on model compliance.
|
|
998
|
+
onSynthesisLockout: () => {
|
|
999
|
+
if (workerBudget.synthesis) synthesisToolLock = true;
|
|
1000
|
+
},
|
|
1001
|
+
...!workerBudget.synthesis ? {
|
|
1002
|
+
onSoftLimitFinalCallAdmitted: (toolCallId) => {
|
|
1003
|
+
if (workerBoundFailure === null) {
|
|
1004
|
+
workerBoundFailure = `worker agent budget reached (${workerBudget.toolCalls}); synthesis is disabled`;
|
|
1005
|
+
}
|
|
1006
|
+
stopAfterToolResultCallId = toolCallId ?? STOP_AFTER_ANY_TOOL_RESULT;
|
|
1007
|
+
}
|
|
1008
|
+
} : {},
|
|
1009
|
+
// Requiring read is correct only when reading is the whole reserve.
|
|
1010
|
+
...readReserve > 0 && deliveryTools.length === 0 ? {
|
|
1011
|
+
onSoftReadReserve: () => {
|
|
1012
|
+
middlewareToolChoice.apply([{ kind: "require_tool", toolName: ToolNames.Read }]);
|
|
1013
|
+
}
|
|
1014
|
+
} : {}
|
|
1015
|
+
});
|
|
980
1016
|
const registry = createWorkerToolRegistry(
|
|
981
1017
|
input.middlewareSnapshot,
|
|
982
1018
|
safety,
|
|
@@ -995,45 +1031,7 @@ function startWorkerRun(input, emit) {
|
|
|
995
1031
|
// and has no persistence sink. It can still absorb worker-local
|
|
996
1032
|
// protect_path effects from snapshot rules for the rest of this run.
|
|
997
1033
|
[
|
|
998
|
-
|
|
999
|
-
safety,
|
|
1000
|
-
toolCallCap: workerBudget.hardCap,
|
|
1001
|
-
toolCallSoftLimit: workerBudget.toolCalls,
|
|
1002
|
-
// A worker's blocks all land in one run-long bucket, so the bound on
|
|
1003
|
-
// them is a statement about this run's length, not about a turn.
|
|
1004
|
-
turnBlockBudget: workerLoopBlockBudget(workerBudget.toolCalls),
|
|
1005
|
-
toolCallSoftReadReserve: readReserve,
|
|
1006
|
-
...deliveryTools.length > 0 ? { deliveryTools } : {},
|
|
1007
|
-
turnSynthesisLockout: workerBudget.synthesis,
|
|
1008
|
-
// Once locked, the next model round is forced text-only at the
|
|
1009
|
-
// request level (the tool surface is removed in onPayload below):
|
|
1010
|
-
// the lockout directive alone relies on model compliance, and
|
|
1011
|
-
// measured local models kept calling tools until the backstop
|
|
1012
|
-
// aborted the run, or answered the forced round with tool-call
|
|
1013
|
-
// markup that the loop guard then removed.
|
|
1014
|
-
onSynthesisLockout: () => {
|
|
1015
|
-
if (workerBudget.synthesis) {
|
|
1016
|
-
synthesisToolLock = true;
|
|
1017
|
-
}
|
|
1018
|
-
},
|
|
1019
|
-
...!workerBudget.synthesis ? {
|
|
1020
|
-
onSoftLimitFinalCallAdmitted: (toolCallId) => {
|
|
1021
|
-
if (workerBoundFailure === null) {
|
|
1022
|
-
workerBoundFailure = `worker agent budget reached (${workerBudget.toolCalls}); synthesis is disabled`;
|
|
1023
|
-
}
|
|
1024
|
-
stopAfterToolResultCallId = toolCallId ?? STOP_AFTER_ANY_TOOL_RESULT;
|
|
1025
|
-
}
|
|
1026
|
-
} : {},
|
|
1027
|
-
// Forcing the next round to `read` is only correct when reading is
|
|
1028
|
-
// the whole reserve. An agent with delivery tools must be able to
|
|
1029
|
-
// write in its own reserve window, so it gets the steering directive
|
|
1030
|
-
// without the request-level lock.
|
|
1031
|
-
...readReserve > 0 && deliveryTools.length === 0 ? {
|
|
1032
|
-
onSoftReadReserve: () => {
|
|
1033
|
-
middlewareToolChoice.apply([{ kind: "require_tool", toolName: ToolNames.Read }]);
|
|
1034
|
-
}
|
|
1035
|
-
} : {}
|
|
1036
|
-
}),
|
|
1034
|
+
loopGuardRegistration,
|
|
1037
1035
|
createProtectedArtifactsRegistration({
|
|
1038
1036
|
...input.protectedArtifactState !== void 0 ? { initialState: { artifacts: [...input.protectedArtifactState.artifacts] } } : {}
|
|
1039
1037
|
})
|
|
@@ -1044,6 +1042,7 @@ function startWorkerRun(input, emit) {
|
|
|
1044
1042
|
);
|
|
1045
1043
|
const contractCwd = input.cwd ?? process.cwd();
|
|
1046
1044
|
let resultContractRepairsQueued = 0;
|
|
1045
|
+
let resultContractRevisionActive = false;
|
|
1047
1046
|
const pendingReadCitations = /* @__PURE__ */ new Map();
|
|
1048
1047
|
const observedReadRanges = /* @__PURE__ */ new Map();
|
|
1049
1048
|
const runEffects = createRunEffectsRecorder(contractCwd);
|
|
@@ -1182,9 +1181,24 @@ function startWorkerRun(input, emit) {
|
|
|
1182
1181
|
if (violation !== null) {
|
|
1183
1182
|
if (resultContractRepairsQueued < RESULT_CONTRACT_REPAIR_LIMIT) {
|
|
1184
1183
|
resultContractRepairsQueued += 1;
|
|
1185
|
-
|
|
1184
|
+
if (!resultContractRevisionActive && workerBudget.revision !== void 0) {
|
|
1185
|
+
resultContractRevisionActive = loopGuardRegistration.extendWorkerToolCallPhase(workerBudget.revision);
|
|
1186
|
+
if (resultContractRevisionActive) {
|
|
1187
|
+
synthesisToolLock = false;
|
|
1188
|
+
middlewareToolChoice.reset();
|
|
1189
|
+
stopAfterToolResultCallId = null;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
const revisionToolsAvailable = resultContractRevisionActive && !synthesisToolLock;
|
|
1193
|
+
if (!revisionToolsAvailable) synthesisToolLock = true;
|
|
1186
1194
|
const repair = resultContractRepairMessages(
|
|
1187
|
-
{
|
|
1195
|
+
{
|
|
1196
|
+
contract,
|
|
1197
|
+
reason: violation,
|
|
1198
|
+
attempt: resultContractRepairsQueued,
|
|
1199
|
+
anchors: observedReadAnchors(),
|
|
1200
|
+
...revisionToolsAvailable ? { toolsAvailable: true } : {}
|
|
1201
|
+
},
|
|
1188
1202
|
{ provider: model.provider, api: model.api, model: model.id }
|
|
1189
1203
|
);
|
|
1190
1204
|
for (const message of repair) agent.followUp(message);
|
|
@@ -1323,7 +1337,7 @@ function startWorkerRun(input, emit) {
|
|
|
1323
1337
|
const requestId = meta.requestId;
|
|
1324
1338
|
const timer = setTimeout(() => resolveEscalation(requestId, "deny", "timeout"), escalationConfig.timeoutMs);
|
|
1325
1339
|
activeEscalation = { requestId, tool: call.tool, actionClass, callKey, timer };
|
|
1326
|
-
const target = describeCallTarget(call.
|
|
1340
|
+
const target = describeCallTarget(call.tool, call.args);
|
|
1327
1341
|
emit({
|
|
1328
1342
|
type: "clio_permission_escalated",
|
|
1329
1343
|
payload: {
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
probeGitStatusAsync,
|
|
7
7
|
probeWorkspace,
|
|
8
8
|
probeWorkspaceAsync
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HVDIIIQW.js";
|
|
10
|
+
import "./chunk-XAKHZX5N.js";
|
|
11
|
+
import "./chunk-33YXPOE3.js";
|
|
12
12
|
import "./chunk-7CR24IG7.js";
|
|
13
13
|
import "./chunk-3R73A4XB.js";
|
|
14
14
|
export {
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
probeWorkspace,
|
|
20
20
|
probeWorkspaceAsync
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=workspace-
|
|
22
|
+
//# sourceMappingURL=workspace-ZJ6BFM3Q.js.map
|
package/docs/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# Clio Coder Documentation
|
|
6
6
|
|
|
7
|
-
These pages document `v0.3.
|
|
7
|
+
These pages document `v0.3.7` of Clio Coder, an open-source coding orchestrator within the [IOWarp](https://iowarp.ai) scientific computing platform, created by the [Gnosis Research Center](https://grc.iit.edu) at the [Illinois Institute of Technology](https://www.iit.edu).
|
|
8
8
|
|
|
9
9
|
They are source-aligned guides: when prose and source disagree, prefer the
|
|
10
10
|
current source, tests, and `CHANGELOG.md`.
|
|
@@ -39,6 +39,7 @@ current source, tests, and `CHANGELOG.md`.
|
|
|
39
39
|
| Advisory validation-contract patterns for scientific artifacts and HPC assumptions | [scientific-validation.md](scientific-validation.md) ([Interactive Blueprint](html/validation_blueprint.html)) |
|
|
40
40
|
| Falsifiable Change Manifest JSON templates, auditability, and `clio-coder evolve` | [evolution.md](evolution.md) ([Interactive Blueprint](html/evolution_blueprint.html)) |
|
|
41
41
|
| Source-first docs workflow, mapping matrix, and alpha wording guidance | [documentation-guide.md](documentation-guide.md) ([Interactive Blueprint](html/documentation_blueprint.html)) |
|
|
42
|
+
| Typed resource catalogs, private synchronization, installation roots, and library CLI | [resource-library.md](resource-library.md) |
|
|
42
43
|
| Interface layout, colors palette, Unicode character vocabulary, and drawing choreography | [tui-design.md](tui-design.md) ([Interactive Blueprint](html/tui_design_blueprint.html)) |
|
|
43
44
|
| NDJSON parent-child socket protocols, watchdog timers, and exit status mapping | [worker-dispatch-mechanics.md](worker-dispatch-mechanics.md) ([Interactive Blueprint](html/worker_dispatch_blueprint.html)) |
|
|
44
45
|
| Multi-node fleet dispatch: process-safe admission, attested workers, measured routing, activation, agent automation, topologies, and receipts | [fleet-dispatch.md](fleet-dispatch.md) ([Interactive Blueprint](html/fleet_dispatch_blueprint.html)) |
|
|
@@ -54,7 +55,7 @@ current source, tests, and `CHANGELOG.md`.
|
|
|
54
55
|
| Issue-driven development lifecycle: file-ticket through release, label taxonomy, and dogfooding setup | [development-pipeline.md](development-pipeline.md) |
|
|
55
56
|
| Proactive task memory architecture, session task bank, intervention rules, and handoff carrying | [proactive-memory.md](proactive-memory.md) ([Interactive Blueprint](html/memory_blueprint.html)) |
|
|
56
57
|
| WAL SQLite trace mirror database schema, rowid cursor queries, rebuildability, and CLI trace subcommands | [trace-store.md](trace-store.md) ([Interactive Blueprint](html/trace_blueprint.html)) |
|
|
57
|
-
| Private context index determinism
|
|
58
|
+
| Private context index determinism and target smoke matrices | [evals-internal.md](evals-internal.md) ([Blueprint](html/evals_internal_blueprint.html)) |
|
|
58
59
|
| Point-in-time inventory of legacy environment variables (Historical Appendix) | [config-knobs-audit.md](config-knobs-audit.md) ([Interactive Blueprint](html/config_knobs_audit_blueprint.html)) |
|
|
59
60
|
| Clock and timestamp conventions: durations, instants, ordering, and formatting | [time-conventions.md](time-conventions.md) ([Interactive Blueprint](html/time_conventions_blueprint.html)) |
|
|
60
61
|
| Correct render, PTY, startup, compile-cache, and import-graph measurement endpoints and the 0.3.3 baseline | [performance-methodology.md](performance-methodology.md) |
|
|
@@ -83,7 +84,7 @@ under `src/`, run `npm run build` again or keep `npm run dev` running.
|
|
|
83
84
|
## Release Notes
|
|
84
85
|
|
|
85
86
|
The release entry point is [../README.md](../README.md); detailed release
|
|
86
|
-
history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.
|
|
87
|
+
history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.7 the supported
|
|
87
88
|
install paths are `npm install -g @iowarp/clio-coder` and a source checkout
|
|
88
89
|
through `npm run install:local`, the deterministic release gate is
|
|
89
90
|
`npm run ci:release`, and live model smoke validation is local/manual and
|
package/docs/acp.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Client Protocol (ACP) Server
|
|
2
2
|
|
|
3
|
-
This document defines the architecture, transport protocols, tool mediation layers, permission handling, and error taxonomy for Clio Coder's Agent Client Protocol (ACP) server implementation in `v0.3.
|
|
3
|
+
This document defines the architecture, transport protocols, tool mediation layers, permission handling, and error taxonomy for Clio Coder's Agent Client Protocol (ACP) server implementation in `v0.3.7`.
|
|
4
4
|
|
|
5
5
|
Source implementations: `src/engine/acp/` and `src/cli/acp.ts`.
|
|
6
6
|
|
package/docs/alcf-provider.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ALCF Inference Provider
|
|
2
2
|
|
|
3
3
|
> [!TIP]
|
|
4
|
-
> **Interactive Spec Available:** An interactive target configurator and Globus OAuth flow diagram is located at [docs/html/alcf_blueprint.html](html/alcf_blueprint.html) (Version: 0.3.
|
|
4
|
+
> **Interactive Spec Available:** An interactive target configurator and Globus OAuth flow diagram is located at [docs/html/alcf_blueprint.html](html/alcf_blueprint.html) (Version: 0.3.7).
|
|
5
5
|
|
|
6
6
|
Clio can use Argonne's ALCF inference gateway as an OpenAI-compatible target
|
|
7
7
|
backed by Globus OAuth. The runtime id is `alcf`; each configured target points
|
package/docs/architecture.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Clio Coder Architecture and Boundaries
|
|
2
2
|
|
|
3
3
|
> [!TIP]
|
|
4
|
-
> **Interactive Spec Available:** An interactive dashboard is located at [docs/html/architecture_blueprint.html](html/architecture_blueprint.html) (Version: 0.3.
|
|
4
|
+
> **Interactive Spec Available:** An interactive dashboard is located at [docs/html/architecture_blueprint.html](html/architecture_blueprint.html) (Version: 0.3.7).
|
|
5
5
|
|
|
6
6
|
Clio Coder is an experimental, terminal-first coding harness for the CLIO ecosystem. CLIO stands for Context Layer for Input/Output; the project is named for the Greek muse of history and developed by the Gnosis Research Center at Illinois Tech. Its architecture favors small, auditable subsystems over a single monolithic agent loop: CLI entry points, the interactive TUI, provider/runtime code, worker subprocesses, tools, and feature domains are kept separate so local-model support and scientific-software workflows can evolve without collapsing safety boundaries.
|
|
7
7
|
|
|
8
|
-
This page is source-code aligned for the current `v0.3.
|
|
8
|
+
This page is source-code aligned for the current `v0.3.7` development line.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -83,8 +83,7 @@ next to the ignore:
|
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
This repository commits none of those, so its `.clio-coder/` stays fully
|
|
86
|
-
ignored
|
|
87
|
-
which are test inputs rather than session output.
|
|
86
|
+
ignored. Benchmark workspaces are temporary external repositories.
|
|
88
87
|
|
|
89
88
|
## Finding what was hidden
|
|
90
89
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Artifact Versions & Serialization Contracts
|
|
2
2
|
|
|
3
|
-
This document is the canonical registry of all versioned file formats, serialized data structures, integrity digests, and migration rules across Clio Coder in `v0.3.
|
|
3
|
+
This document is the canonical registry of all versioned file formats, serialized data structures, integrity digests, and migration rules across Clio Coder in `v0.3.7`.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,23 +10,27 @@ Clio Coder strictly versions every persistent or network-transported data struct
|
|
|
10
10
|
|
|
11
11
|
| Artifact / Subsystem | Current Version | Symbol / Type & Source Location | Persisted Path / Wire Location | Schema Semantics & Version Differences | Mismatch Handling |
|
|
12
12
|
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
13
|
-
| **Run Receipt** | `
|
|
13
|
+
| **Run Receipt** | `19` | `RUN_RECEIPT_INTEGRITY_VERSION = 19`<br>`src/domains/dispatch/receipt-integrity.ts:13` | `<stateDir>/receipts/<runId>.json` | Cryptographically sealed run record. Version 19 covers all base provenance fields, routing intent, quality labels, `validationGrounding`, `capabilityMismatch`, council provenance, and fleet gate provenance. | Fail-closed. Incompatible receipts fail verification and are never read as evidence. |
|
|
14
14
|
| **Session Ledger** | `3` | `CURRENT_SESSION_FORMAT_VERSION = 3`<br>`src/engine/session.ts:66` | `<stateDir>/sessions/<cwdHash>/<sessionId>/` (`meta.json`, `current.jsonl`, `tree.json`) | Append-only ledger format with UUIDv7 turn IDs, session header line, and tree graph linkage. | Automated migration via `src/domains/session/migrations/` on `/resume`. Earlier unmigratable versions rejected. |
|
|
15
15
|
| **Worker Spec** | `3` | `WORKER_SPEC_VERSION = 3`<br>`src/worker/spec-contract.ts:22` | Subprocess `stdin` control plane JSON payload | Worker invocation parameters, tool surface profile, and execution bounds. | Fail-closed preflight rejection before worker activation. |
|
|
16
16
|
| **Worker Runtime Descriptor** | `2` | `WORKER_RUNTIME_DESCRIPTOR_VERSION = 2`<br>`src/worker/spec-contract.ts:23` | Worker attestation descriptor payload | Attestation descriptor for worker runtime environment and hardware facts. | Attestation mismatch causes immediate process termination. |
|
|
17
17
|
| **Worker Protected Artifact State** | `1` | `WORKER_PROTECTED_ARTIFACT_STATE_VERSION = 1`<br>`src/worker/spec-contract.ts:24` | Worker spec initialization snapshot | Snapshot of active protected artifact paths and validation commands passed to worker. | Worker fails closed before executing mutations. |
|
|
18
|
-
| **Fleet Contract** | `1 \| 2 \| 3 \| 4` (Current: `
|
|
18
|
+
| **Fleet Contract** | `1 \| 2 \| 3 \| 4 \| 5` (Current: `5`) | `FleetContractVersion = 1 \| 2 \| 3 \| 4 \| 5`<br>`FLEET_WRITE_BOUNDARY_VERSION = 4`<br>`FLEET_DYNAMIC_STEP_VERSION = 5`<br>`src/domains/agents/fleet-contract.ts` | `.clio-coder/fleets/<name>.yaml`, `.clio-coder/fleets/<name>.yml`, or built-in recipes | Multi-agent workflow contract. v1 is agent-only; v2 adds deterministic code steps; v3 adds bounded loops and commit steps; v4 adds declared per-step write boundaries; v5 adds plan steps, gate steps, per-step target or profile routing, and the single-writer declaration. | Reader refuses contracts whose version features it does not support. |
|
|
19
19
|
| **Execution Plan** | `4` | `version: 4` in `interface ExecutionPlan`<br>`src/domains/dispatch/execution-plan.ts:98` | Statically compiled DAG representation in dispatch memory and receipts | Statically unrolled, deterministically hashed execution plan. v4 adds bounded loop nodes, verification staleness tracking, and commit nodes. | Preflight validation rejects unsupported plan versions. |
|
|
20
20
|
| **Eval Artifact** | `4` | `version: 4` in `interface EvalArtifactV4`<br>`src/domains/eval/schema/artifact.ts:51-52` | `<stateDir>/evals/<evalId>.json` | Stored eval results with suite provenance, matrix parameters, and itemized metric outcomes. Note: `EVAL_ARTIFACT_VERSION = 1` in `src/domains/eval/types.ts:2` is legacy/dead code. | Incompatible eval artifacts are rejected during `clio-coder eval report` and `compare`. |
|
|
21
21
|
| **Trace Database** | `1` | `TRACE_SCHEMA_VERSION = 1`<br>`src/domains/observability/trace-store.ts:23` | `<stateDir>/trace.sqlite` (`meta` table `schema_version`) | Schema version for the 7 SQLite trace mirror tables (`runs`, `phases`, `events`, `envelopes`, `gate_results`, `agent_sessions`, `processes`). | Log warning (`[clio:trace]`), trace writing degrades without failing the parent run. |
|
|
22
22
|
| **Capacity State File** | `2` | `version: 2` in `interface CapacityStateFile`<br>`src/domains/dispatch/capacity-lease.ts:40` | `<stateDir>/dispatch-admission.json` | Active capacity leases, drain status, and cross-process lock state. | Corrupted or unparseable state file causes admission to fail closed. |
|
|
23
23
|
| **Protected Artifact Journal** | `1` | `version: 1` in `interface PendingProtectedArtifactRecord`<br>`src/domains/session/protected-artifact-journal.ts:22` | `<stateDir>/protected-artifact-pending/<key>/<id>.json` | Write-ahead durability records for pending protected artifacts. | Leftover records reconciled during session initialization. |
|
|
24
|
+
| **Fleet Run Record** | `1` | `version: 1` in `interface FleetRunRecord`<br>`src/domains/dispatch/fleet-run.ts` | `<stateDir>/fleet-runs/<runId>.json` | Durable record of one fleet run: contract name, plan hash, static step ids and steps, `--var` values, replayed and settled step results, and the delegation plan hash a `kind: plan` step produced. Read by `fleet run --resume`. | Resume refuses a changed plan hash with a per-step diff and refuses differing `--var` values. |
|
|
25
|
+
| **Checkout Writer Lease** | `1` | `version: 1` in `interface CheckoutWriterLeaseRecord`<br>`src/domains/dispatch/checkout-writer-lease.ts` | `<stateDir>/checkout-writer-leases/<key>.json` (key derived from the canonical checkout path) | Cross-process single-writer lease: checkout path, pid, process birth token, acquisition time. | A live sibling holder is refused with `checkout_writer_lease_held`; a dead owner is reclaimed; a malformed record is treated as absent. |
|
|
26
|
+
| **Out-of-turn Usage Ledger** | unversioned JSONL | `OutOfTurnUsageRow`<br>`src/domains/observability/out-of-turn-usage.ts` | `<stateDir>/usage/out-of-turn.jsonl` | One row per priced `/btw` or `/handoff` call: label, session id, repo identity, timestamp, target, attributed model, provider usage. Bounded ring of `MAX_OUT_OF_TURN_USAGE_ROWS = 1000`, rewritten atomically under the state-file lock. | Unparseable rows are skipped and counted by `usage report`; the session ledger is never affected. |
|
|
27
|
+
| **Library Pins** | unversioned YAML map | `readLibraryPins`<br>`src/domains/resources/library.ts` | `<configDir>/library-pins.yaml` | Typed ref (`skill:x`, `agent:y`, `prompt:p`, `fleet:z`) to `{sha256, sourceUrl}` for every resource `library add` or the Skills Hub installed. | A non-map document reads as empty; an entry whose installed file is missing is reported as available, not installed. |
|
|
24
28
|
|
|
25
29
|
---
|
|
26
30
|
|
|
27
31
|
## 2. Integrity Verification Contracts
|
|
28
32
|
|
|
29
|
-
### Receipt Integrity (Version
|
|
33
|
+
### Receipt Integrity (Version 19)
|
|
30
34
|
|
|
31
35
|
Receipt integrity authenticates that a sealed receipt matches its ledger envelope without modification. Verification reproduces the canonical JSON serialization and computes the SHA-256 digest:
|
|
32
36
|
|
|
@@ -38,9 +42,9 @@ export function computeReceiptDigest(receipt: RunReceiptV15): string {
|
|
|
38
42
|
```
|
|
39
43
|
|
|
40
44
|
Receipt verification checks:
|
|
41
|
-
1. `integrity.version ===
|
|
45
|
+
1. `integrity.version === 19`.
|
|
42
46
|
2. Calculated SHA-256 matches `integrity.digest`.
|
|
43
|
-
3. All optional fields present in the schema (`validationGrounding`, `capabilityMismatch`, `steering`, `gate`, `plan`, `briefing`) conform to the strict
|
|
47
|
+
3. All optional fields present in the schema (`validationGrounding`, `capabilityMismatch`, `steering`, `gate`, `fleetGate`, `council`, `plan`, `briefing`) conform to the strict v19 specification.
|
|
44
48
|
|
|
45
49
|
---
|
|
46
50
|
|
package/docs/built-in-agents.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Clio Coder dispatches focused fleet agents from Markdown recipes. Recipes are data files, not hidden code plugins: YAML frontmatter declares identity, mode, tools, optional target/model hints, and thinking level; the Markdown body is the agent instruction text.
|
|
4
4
|
|
|
5
5
|
> [!TIP]
|
|
6
|
-
> **Interactive Spec Available:** An interactive dashboard for the agent registry and dispatch admission check gates is located at [docs/html/agents_blueprint.html](html/agents_blueprint.html) (Version: 0.3.
|
|
6
|
+
> **Interactive Spec Available:** An interactive dashboard for the agent registry and dispatch admission check gates is located at [docs/html/agents_blueprint.html](html/agents_blueprint.html) (Version: 0.3.7).
|
|
7
7
|
|
|
8
8
|
The source of truth is `src/domains/agents/**`. Clio's agent dispatch engine and execution boundaries are built upon the [@earendil-works/pi-agent-core](https://www.npmjs.com/package/@earendil-works/pi-agent-core) library.
|
|
9
9
|
|
|
@@ -34,7 +34,7 @@ Recipe IDs are derived from filenames (e.g., `architect.md` -> `architect`). Rec
|
|
|
34
34
|
* **Built-in Protection**: Project agents cannot override any shipped built-ins; they are strictly treated as custom/domain agents.
|
|
35
35
|
* **Reserved IDs**: The IDs `worker` and `delegate` are strictly reserved for custom/internal contexts and cannot be registered as custom agent IDs.
|
|
36
36
|
* **Local Ignored Custom Examples**: Local examples (e.g., `benchmark-runner`, `clio-dev`, `implementer`, `scientific-validator`) may exist under `.clio-coder/agents` for documentation or test purposes, but are ignored if they collide with reserved/built-in rules.
|
|
37
|
-
* **Fleet Contracts**: Shipped builtin fleet contracts (`build-test`, `build-review`, `sdlc`) live under `src/domains/agents/fleets/*.md`.
|
|
37
|
+
* **Fleet Contracts**: Shipped builtin fleet contracts (`build-test`, `build-review`, `sdlc`) live under `src/domains/agents/fleets/*.md`. Library-installed contracts live at `<configDir>/fleets/<name>.md`. Project contracts at `.clio-coder/fleets/<name>.md` take highest precedence. Deterministic code steps reference commands declared in `.clio-coder/fleets/commands.yaml`. Contract v4 requires per-step write boundaries (`writes`).
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
@@ -64,12 +64,36 @@ Internal orchestration helpers and internal process agents. They are hidden from
|
|
|
64
64
|
| `scout` | read, grep, find, ls, context, code_nav, git | Broad repository reconnaissance, codebase orientation, structure and entry-point mapping, and multi-file symbol hunting. | `read-only` | `fast` |
|
|
65
65
|
| `researcher` | read, web_fetch, context | Shadow docs and external-source researcher for coding decisions. | `read-only` | `deep` |
|
|
66
66
|
| `provenance` | read, grep, find, ls, git | Shadow evidence, receipt, diff, and telemetry reader for handoffs. | `read-only` | `balanced` |
|
|
67
|
+
| `oracle` | read, grep, find, ls, code_nav, context | Shadow advisor behind `/oracle` that protects consistency with prior decisions and returns the strongest challenge to a question. | `read-only` | `deep` |
|
|
67
68
|
| `context-bootstrap` | read, grep, find, ls, context, code_nav | Internal agent behind `clio-coder context init` that parses repository and returns CLIO-CODER.md payload. | `read-only` | `balanced` |
|
|
68
69
|
|
|
70
|
+
The builtin `architect` also serves as the default author for a version 5 fleet `plan` step. In that role it returns the coordinator-owned `delegation-plan` result shape instead of writing its ordinary plan artifact. It may name only agents from the contract roster. The coordinator supplies the plan step's target or profile to every admitted task.
|
|
71
|
+
|
|
69
72
|
`scout` is bound by a live-grounding contract: its whole final response is one `scout-report` object whose every finding carries the `claim` it observed and the `path:line` that grounds it, a lead it could not confirm live is simply left out, and wiki or index content is orientation only, never citable as evidence. It has an 18-call exploration phase followed by a tool-free synthesis phase; wide parallel batches cannot consume the synthesis backstop as separate violations. Dispatch labels its answer `reconnaissance output (advisory leads, not validation evidence):`.
|
|
70
73
|
|
|
71
74
|
Grounding is checked against the run's own reads, not just against the file. The worker records the exact line span every successful read returned, and a cited line must fall inside one. A line that exists in the file but was never read fails, which is what stops an approximated or inferred line number from passing as observation. `grep` and `code_nav` hits are leads: read the file before citing what they point at.
|
|
72
75
|
|
|
76
|
+
`oracle` is the only shadow agent an operator reaches directly, and only through
|
|
77
|
+
`/oracle <question>`. It never receives a forked transcript. `/oracle` packs a
|
|
78
|
+
bounded digest instead and sends it as dispatch briefing data: the settled
|
|
79
|
+
decisions from the session decision board, the open tasks from the task board,
|
|
80
|
+
the last compaction summary when one exists, and the question. The digest is
|
|
81
|
+
capped at 12 KiB total, with per-section caps of 5120 bytes and 24 rows for
|
|
82
|
+
decisions, 3072 bytes and 24 rows for open tasks, 2048 bytes for the compaction
|
|
83
|
+
summary, and 1536 bytes for the question. Every cap that cuts content appends a
|
|
84
|
+
`[truncated]` marker, so an advisor always knows it is reading a tail-less
|
|
85
|
+
record. Entries are filtered to the active branch before the fold, so a `/tree`
|
|
86
|
+
switch never briefs the advisor on decisions the operator walked away from.
|
|
87
|
+
|
|
88
|
+
The run is an ordinary singular dispatch with `requestOrigin: "internal"` and
|
|
89
|
+
`autonomy: "read-only"`, so admission, receipts, and the Fleet Runs island apply
|
|
90
|
+
to it exactly as they apply to `/run`. Its `oracle-report` contract carries the
|
|
91
|
+
answer shape: a verdict line, the strongest challenge the advisor can mount, the
|
|
92
|
+
evidence that would change its mind, and the decisions it cited. The rendered
|
|
93
|
+
answer reaches the main agent the way `/share` puts a worker result there, as an
|
|
94
|
+
operator-authored note on the ordinary user-turn path. `/oracle` during an
|
|
95
|
+
in-flight turn is refused rather than queued.
|
|
96
|
+
|
|
73
97
|
Every contract-bearing agent gets bounded in-worker repair. When the terminal result misses its contract, the worker replays the validator's own reason, the exact accepted shape, and the `path:line` locations this run actually read, then asks for the result again. Two repair rounds is the whole allowance; after that the run fails with `result_contract_exhausted`. This is what keeps a small local model that gathered the right evidence from being failed for a shape mistake nobody told it about.
|
|
74
98
|
|
|
75
99
|
Two rounds only help when the reason is actionable, so a validator reason names the mistake and shows the value that would have passed. A `mutation-report` with `"validations":[]` is told the array was empty and is given one entry shaped like `{"name":"npm test","passed":true,"evidence":"exit 0"}`, and a report whose entries are malformed is told which keys each entry carries. Naming the requirement alone left a small model re-emitting the same empty array through both rounds.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Capacity Leases & Fleet Scheduling
|
|
2
2
|
|
|
3
|
-
This document specifies the multi-process capacity leasing protocols, node scheduling models, cross-process transaction locks, and failure recovery mechanics implemented in Clio Coder `v0.3.
|
|
3
|
+
This document specifies the multi-process capacity leasing protocols, node scheduling models, cross-process transaction locks, and failure recovery mechanics implemented in Clio Coder `v0.3.7`.
|
|
4
4
|
|
|
5
5
|
Source implementations: `src/domains/scheduling/` and `src/domains/dispatch/capacity-lease.ts`.
|
|
6
6
|
|