@iowarp/clio-coder 0.3.0 → 0.3.1
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 +33 -0
- package/README.md +50 -53
- package/dist/acp-FPR54DGL.js +138 -0
- package/dist/{agents-Q4MYPMUW.js → agents-OGPIHPJH.js} +33 -25
- package/dist/assets/codewiki.json +1 -0
- package/dist/assets/grammars/notices/@vscode__tree-sitter-wasm/LICENSE +21 -0
- package/dist/assets/grammars/notices/@vscode__tree-sitter-wasm/cgmanifest.json +16 -0
- package/dist/assets/grammars/notices/tree-sitter-wasms/LICENSE +24 -0
- package/dist/assets/grammars/tree-sitter-c-sharp.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-c.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-cpp.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-go.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-java.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-javascript.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-python.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-ruby.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-rust.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-tsx.wasm +0 -0
- package/dist/assets/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/assets/grammars/tree-sitter.wasm +0 -0
- package/dist/{auth-O6HYIJ6J.js → auth-IC3K6NIZ.js} +22 -15
- package/dist/{chunk-KKKPTZLM.js → chunk-2STGEDFV.js} +8 -1
- package/dist/chunk-3I7MS7N2.js +40 -0
- package/dist/chunk-3R73A4XB.js +69 -0
- package/dist/{chunk-26BZQOAD.js → chunk-474KN5II.js} +86 -115
- package/dist/{chunk-NI4DEJMC.js → chunk-4QKXUHSR.js} +26 -3
- package/dist/{chunk-X3BR7HWV.js → chunk-5WIGXA4T.js} +7 -1
- package/dist/{chunk-TFSSEXL6.js → chunk-673JJUWJ.js} +14 -4
- package/dist/{chunk-GNGDQYDU.js → chunk-7SS2CTV2.js} +27922 -1249
- package/dist/{chunk-7RBKDI66.js → chunk-ASND7OZK.js} +104 -12
- package/dist/{chunk-X3NE4WVW.js → chunk-BNAZZHFG.js} +7 -1
- package/dist/{chunk-RQDWMVRB.js → chunk-BSU2YIWB.js} +9 -3
- package/dist/{chunk-CLJ5HLUD.js → chunk-C4PTHK7P.js} +24 -5
- package/dist/{chunk-QV47YRF4.js → chunk-CGKSTWHD.js} +7 -1
- package/dist/{chunk-BYEU76JP.js → chunk-DKGKUHFA.js} +34 -9
- package/dist/chunk-EYOKLTMF.js +170 -0
- package/dist/{chunk-PS4PFJQP.js → chunk-FCIH3BIZ.js} +15258 -14130
- package/dist/{chunk-2J63S4SF.js → chunk-FST4FYJB.js} +82 -14
- package/dist/{chunk-3DANZDGR.js → chunk-G34LV2PF.js} +34 -9
- package/dist/{chunk-BBUH4VAA.js → chunk-GAEBEQVI.js} +34 -21
- package/dist/chunk-GB6QRBXN.js +8543 -0
- package/dist/chunk-GEP36Y4X.js +12796 -0
- package/dist/{chunk-TKHQ4DGZ.js → chunk-H6F6BYOH.js} +496 -121
- package/dist/{chunk-UGYAX5YI.js → chunk-HQQID6OA.js} +10 -5
- package/dist/chunk-IHXBNWMM.js +137 -0
- package/dist/{chunk-ME6DNWIU.js → chunk-IS3ONKU3.js} +7 -1
- package/dist/{chunk-DXQNI4PC.js → chunk-IWHMRKLL.js} +8 -1
- package/dist/chunk-K2ITRMHZ.js +642 -0
- package/dist/{chunk-KBR4MZZR.js → chunk-K5XEMXTI.js} +7 -1
- package/dist/{chunk-AMFR5YA3.js → chunk-KKNLWXI6.js} +24 -10
- package/dist/{chunk-JWHCJDCI.js → chunk-KY56HMHH.js} +145 -61
- package/dist/{chunk-E3NYWENM.js → chunk-LU4TK2PR.js} +52 -7
- package/dist/{chunk-UWIJNAOB.js → chunk-M5T5VO65.js} +109 -42
- package/dist/{chunk-JPOWPFCU.js → chunk-MAR7Y6HW.js} +38 -16
- package/dist/chunk-N6F52NLF.js +6951 -0
- package/dist/{chunk-UHTSULZS.js → chunk-NMOX6HFD.js} +20 -7
- package/dist/{chunk-WD6AJM35.js → chunk-OLBBMFRD.js} +30 -13
- package/dist/{chunk-VOO7NYPP.js → chunk-PFEFKVGL.js} +22 -6
- package/dist/{chunk-6CWDTGUC.js → chunk-PIUMUEMV.js} +7 -1
- package/dist/chunk-PV4JUBVJ.js +462 -0
- package/dist/{chunk-527KG6XR.js → chunk-Q3RUPKEJ.js} +22 -4
- package/dist/{chunk-D5YD55AR.js → chunk-Q5WJOSJ7.js} +11 -1
- package/dist/{chunk-5N2FG33Q.js → chunk-R346GLFC.js} +7 -1
- package/dist/{chunk-4UQA7NCT.js → chunk-R5KLMSBV.js} +7 -2
- package/dist/{chunk-PIDUD6M2.js → chunk-RDLVBZEO.js} +11 -6
- package/dist/{chunk-O4EJEDHO.js → chunk-RPTR2H26.js} +40 -31
- package/dist/{chunk-HBU5MTAM.js → chunk-SVNXH4L2.js} +7 -1
- package/dist/{chunk-XNISANGE.js → chunk-TEKV33Q5.js} +122 -57
- package/dist/chunk-TXOTCRLG.js +15 -0
- package/dist/{chunk-VPAWTYLY.js → chunk-WEPFGWHJ.js} +7 -1
- package/dist/{chunk-HMYNFFY4.js → chunk-XPLRXC72.js} +7 -2
- package/dist/{chunk-UU3R62TT.js → chunk-XYWBQRDM.js} +13 -4
- package/dist/{chunk-7BHLZB3A.js → chunk-ZPY3JZ5E.js} +32 -10
- package/dist/cli/index.js +39 -33
- package/dist/clio-BZVGEUFJ.js +58 -0
- package/dist/{components-JVHMUBEB.js → components-DMAOEKFB.js} +26 -9
- package/dist/{config-ZFCDBMDC.js → config-IRUQ7SE4.js} +42 -31
- package/dist/configure-S7S6F6CL.js +32 -0
- package/dist/{context-CDXTP2MP.js → context-3KWFLHJG.js} +17 -11
- package/dist/{context-E3KIFVXI.js → context-5RADCKTR.js} +33 -28
- package/dist/{context-clear-3F4PLXOS.js → context-clear-7TSNPAAI.js} +36 -28
- package/dist/{context-index-Q7YSYTR3.js → context-index-W4RLWOQH.js} +10 -4
- package/dist/{docs-YIETIWZI.js → docs-5AWSPS37.js} +16 -10
- package/dist/doctor-UC5NAJYQ.js +77 -0
- package/dist/{eval-B3KZZESM.js → eval-U6TJHRLX.js} +77 -24
- package/dist/{evidence-V67CHM35.js → evidence-YEGUW4L3.js} +34 -26
- package/dist/{evolve-YDZSUQYA.js → evolve-TXARCTPG.js} +39 -26
- package/dist/{extensions-SRG7XCAH.js → extensions-OZFJ3A3G.js} +13 -7
- package/dist/{fleet-CA2CRTVG.js → fleet-6G3DHNYE.js} +45 -37
- package/dist/fleet-preflight-DSNT37JK.js +23 -0
- package/dist/{init-2OZDJE2D.js → init-KZ5QTF6M.js} +42 -34
- package/dist/{memory-3PIQQAKX.js → memory-73ESV5YC.js} +35 -27
- package/dist/{models-DY35XI7Y.js → models-A4PVNWJK.js} +34 -23
- package/dist/{paths-5OMXW7Z4.js → paths-C4H6IV77.js} +12 -6
- package/dist/preload-6WVMHX3A.js +13 -0
- package/dist/{reset-PIFYNOS3.js → reset-BGW6OGMV.js} +17 -11
- package/dist/{run-3VSPP24F.js → run-YTPEYQOH.js} +60 -48
- package/dist/{share-D36RQCXM.js → share-YIFFV4NQ.js} +16 -10
- package/dist/{skills-F2MRLELY.js → skills-2V6RA3OQ.js} +18 -11
- package/dist/{skills-eval-E2ZTW4PL.js → skills-eval-S2TVJO4F.js} +45 -36
- package/dist/{targets-DZMEZAH4.js → targets-TYXLPB23.js} +61 -59
- package/dist/{trace-7NYCUI2J.js → trace-GGOJ6Q6Z.js} +9 -3
- package/dist/{uninstall-AD3JWHBB.js → uninstall-LLLT4F4W.js} +14 -8
- package/dist/{upgrade-WYYBKGDY.js → upgrade-33G2LMM5.js} +45 -23
- package/dist/{usage-ULIDAGFF.js → usage-ZAFSXKKG.js} +35 -27
- package/dist/version-KGEG7EPO.js +21 -0
- package/dist/{wiki-generate-PKFIX6OB.js → wiki-generate-NUQCVOQ3.js} +55 -45
- package/dist/worker/entry.js +101 -43
- package/docs/README.md +12 -9
- package/docs/acp.md +28 -5
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +23 -2
- package/docs/artifact-placement.md +101 -0
- package/docs/artifact-versions.md +1 -1
- package/docs/built-in-agents.md +4 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +125 -41
- package/docs/configuration-and-targets.md +88 -18
- package/docs/context-engine.md +6 -2
- package/docs/development-pipeline.md +77 -0
- package/docs/documentation-coverage.md +4 -4
- package/docs/documentation-guide.md +3 -3
- package/docs/environment-variables.md +2 -1
- package/docs/eval-runner.md +3 -3
- package/docs/evals-internal.md +2 -2
- package/docs/evidence-and-memory.md +6 -2
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +1 -1
- package/docs/extensions-and-sharing.md +18 -11
- package/docs/fleet-demo-runbook.md +22 -23
- package/docs/fleet-dispatch.md +111 -12
- package/docs/glossary.md +107 -15
- package/docs/html/agents_blueprint.html +3 -3
- package/docs/html/alcf_blueprint.html +3 -3
- package/docs/html/architecture_blueprint.html +3 -3
- package/docs/html/commands_blueprint.html +187 -42
- package/docs/html/configuration_blueprint.html +7 -7
- package/docs/html/context_blueprint.html +3 -3
- package/docs/html/documentation_blueprint.html +1 -1
- package/docs/html/environment_blueprint.html +3 -3
- package/docs/html/eval_blueprint.html +4 -4
- package/docs/html/evals_internal_blueprint.html +3 -3
- package/docs/html/evolution_blueprint.html +3 -3
- package/docs/html/extensions_blueprint.html +3 -3
- package/docs/html/fleet_dispatch_blueprint.html +8 -8
- package/docs/html/index.html +5 -5
- package/docs/html/lifecycle_blueprint.html +4 -4
- package/docs/html/memory_blueprint.html +3 -3
- package/docs/html/middleware_blueprint.html +3 -3
- package/docs/html/models_blueprint.html +2 -2
- package/docs/html/observability_blueprint.html +2 -2
- package/docs/html/provider_adapter_blueprint.html +3 -3
- package/docs/html/safety_blueprint.html +3 -3
- package/docs/html/skills_blueprint.html +2 -2
- package/docs/html/soak_blueprint.html +3 -3
- package/docs/html/tool_usage_blueprint.html +4 -4
- package/docs/html/tools_blueprint.html +2 -2
- package/docs/html/trace_blueprint.html +3 -3
- package/docs/html/tui_design_blueprint.html +100 -40
- package/docs/html/validation_blueprint.html +1 -1
- package/docs/html/worker_dispatch_blueprint.html +3 -3
- package/docs/installation-and-lifecycle.md +62 -11
- package/docs/middleware-and-components.md +1 -1
- package/docs/model-catalog.md +2 -2
- package/docs/observability.md +3 -3
- package/docs/proactive-memory.md +12 -12
- package/docs/prompt-envelope-and-tools.md +2 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +4 -0
- package/docs/safety-model.md +21 -5
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +2 -2
- package/docs/skills-marketplace.md +1 -1
- package/docs/time-conventions.md +101 -0
- package/docs/tool-usage.md +5 -4
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +83 -27
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +16 -16
- package/skills/README.md +5 -6
- package/skills/git/file-ticket/SKILL.md +107 -0
- package/skills/git/file-ticket/evals.md +54 -0
- package/skills/git/fix-issue/SKILL.md +106 -0
- package/skills/git/fix-issue/evals.md +71 -0
- package/skills/git/ship/SKILL.md +92 -0
- package/skills/git/ship/evals.md +72 -0
- package/skills/skill-marketplace.json +12 -20
- package/src/cli/acp.ts +88 -0
- package/src/cli/agents.ts +60 -0
- package/src/cli/args.ts +280 -0
- package/src/cli/argv.ts +170 -0
- package/src/cli/ask.ts +34 -0
- package/src/cli/auth.ts +468 -0
- package/src/cli/bootstrap-generate.ts +498 -0
- package/src/cli/clio.ts +34 -0
- package/src/cli/components.ts +195 -0
- package/src/cli/config-inspect.ts +330 -0
- package/src/cli/config.ts +72 -0
- package/src/cli/configure-interop.ts +67 -0
- package/src/cli/configure-layout.ts +172 -0
- package/src/cli/configure.ts +1487 -0
- package/src/cli/context-clear.ts +76 -0
- package/src/cli/context-index.ts +102 -0
- package/src/cli/context.ts +316 -0
- package/src/cli/default-target.ts +63 -0
- package/src/cli/docs.ts +340 -0
- package/src/cli/doctor.ts +54 -0
- package/src/cli/eval.ts +315 -0
- package/src/cli/evidence.ts +222 -0
- package/src/cli/evolve.ts +219 -0
- package/src/cli/extensions.ts +205 -0
- package/src/cli/fleet.ts +827 -0
- package/src/cli/index.ts +309 -0
- package/src/cli/init.ts +219 -0
- package/src/cli/initial-message.ts +47 -0
- package/src/cli/internal-dispatch.ts +55 -0
- package/src/cli/memory.ts +180 -0
- package/src/cli/models.ts +257 -0
- package/src/cli/modes/json-stream.ts +85 -0
- package/src/cli/modes/jsonl.ts +9 -0
- package/src/cli/modes/print.ts +589 -0
- package/src/cli/oauth-manual-input.ts +72 -0
- package/src/cli/oauth-select.ts +36 -0
- package/src/cli/output-guard.ts +48 -0
- package/src/cli/paths.ts +44 -0
- package/src/cli/provider-target.ts +113 -0
- package/src/cli/removal.ts +72 -0
- package/src/cli/reset.ts +253 -0
- package/src/cli/run.ts +497 -0
- package/src/cli/share.ts +243 -0
- package/src/cli/shared.ts +60 -0
- package/src/cli/skills-eval.ts +1225 -0
- package/src/cli/skills.ts +470 -0
- package/src/cli/steer-channel.ts +86 -0
- package/src/cli/targets.ts +1150 -0
- package/src/cli/text-layout.ts +102 -0
- package/src/cli/trace.ts +274 -0
- package/src/cli/uninstall.ts +405 -0
- package/src/cli/upgrade.ts +270 -0
- package/src/cli/usage.ts +869 -0
- package/src/cli/validate-model.ts +28 -0
- package/src/cli/version.ts +7 -0
- package/src/cli/wiki-generate.ts +509 -0
- package/src/core/artifact-paths.ts +43 -0
- package/src/core/bash-exec.ts +242 -0
- package/src/core/boot-trace.ts +37 -0
- package/src/core/bus-events.ts +728 -0
- package/src/core/bus-trace.ts +53 -0
- package/src/core/c-header-language.ts +265 -0
- package/src/core/clio-repo.ts +78 -0
- package/src/core/config.ts +1593 -0
- package/src/core/context-floor.ts +33 -0
- package/src/core/defaults.ts +625 -0
- package/src/core/domain-loader.ts +170 -0
- package/src/core/event-bus.ts +94 -0
- package/src/core/file-references.ts +282 -0
- package/src/core/guardrails.ts +185 -0
- package/src/core/headless-permission.ts +21 -0
- package/src/core/init.ts +223 -0
- package/src/core/json-payload.ts +58 -0
- package/src/core/package-root.ts +54 -0
- package/src/core/path-canonical.ts +37 -0
- package/src/core/process-identity.ts +41 -0
- package/src/core/recent-models.ts +91 -0
- package/src/core/release.ts +2 -0
- package/src/core/residency-protection.ts +56 -0
- package/src/core/resolve-config-value.ts +88 -0
- package/src/core/response-schema.ts +279 -0
- package/src/core/run-overrides.ts +77 -0
- package/src/core/safe-exec.ts +193 -0
- package/src/core/safe-id.ts +37 -0
- package/src/core/safe-resource-write.ts +162 -0
- package/src/core/session-routing.ts +339 -0
- package/src/core/settings-layers.ts +220 -0
- package/src/core/shared-bus.ts +8 -0
- package/src/core/shell-quote.ts +26 -0
- package/src/core/skill-activation.ts +190 -0
- package/src/core/startup-timer.ts +37 -0
- package/src/core/state-file-lock.ts +207 -0
- package/src/core/termination.ts +202 -0
- package/src/core/timers.ts +38 -0
- package/src/core/tool-names.ts +65 -0
- package/src/core/verification-scripts.ts +13 -0
- package/src/core/workspace-files.ts +492 -0
- package/src/core/xdg.ts +177 -0
- package/src/domains/agents/builtins/architect.md +4 -4
- package/src/domains/agents/builtins/coder.md +3 -2
- package/src/domains/agents/builtins/debugger.md +1 -1
- package/src/domains/agents/builtins/documenter.md +1 -1
- package/src/domains/agents/builtins/git-master.md +3 -3
- package/src/domains/agents/builtins/provenance.md +1 -1
- package/src/domains/agents/builtins/researcher.md +1 -1
- package/src/domains/agents/builtins/scout.md +1 -1
- package/src/domains/agents/builtins/tester.md +1 -1
- package/src/domains/agents/builtins/verifier.md +1 -1
- package/src/domains/agents/builtins/wiki-writer.md +1 -1
- package/src/domains/agents/catalog.ts +172 -0
- package/src/domains/agents/contract.ts +16 -0
- package/src/domains/agents/extension.ts +110 -0
- package/src/domains/agents/fleet-commands.ts +154 -0
- package/src/domains/agents/fleet-contract.ts +797 -0
- package/src/domains/agents/frontmatter.ts +40 -0
- package/src/domains/agents/index.ts +102 -0
- package/src/domains/agents/manifest.ts +6 -0
- package/src/domains/agents/recipe-schema.ts +202 -0
- package/src/domains/agents/recipe.ts +125 -0
- package/src/domains/agents/registry.ts +111 -0
- package/src/domains/agents/result-contract.ts +1265 -0
- package/src/domains/agents/spec.ts +371 -0
- package/src/domains/agents/write-boundary.ts +109 -0
- package/src/domains/components/diff.ts +99 -0
- package/src/domains/components/hash.ts +21 -0
- package/src/domains/components/index.ts +3 -0
- package/src/domains/components/scan.ts +304 -0
- package/src/domains/components/snapshot.ts +108 -0
- package/src/domains/components/types.ts +82 -0
- package/src/domains/config/agent-namespace.ts +13 -0
- package/src/domains/config/classify.ts +94 -0
- package/src/domains/config/contract.ts +22 -0
- package/src/domains/config/extension.ts +136 -0
- package/src/domains/config/index.ts +13 -0
- package/src/domains/config/keybindings.ts +164 -0
- package/src/domains/config/manifest.ts +6 -0
- package/src/domains/config/watcher.ts +41 -0
- package/src/domains/context/adoption.ts +880 -0
- package/src/domains/context/bootstrap-prompt.ts +273 -0
- package/src/domains/context/bootstrap.ts +1409 -0
- package/src/domains/context/clear.ts +86 -0
- package/src/domains/context/clio-md.ts +327 -0
- package/src/domains/context/codewiki/cmake.ts +356 -0
- package/src/domains/context/codewiki/cooperative.ts +46 -0
- package/src/domains/context/codewiki/digest.ts +135 -0
- package/src/domains/context/codewiki/grammar-assets.ts +33 -0
- package/src/domains/context/codewiki/indexer.ts +1614 -0
- package/src/domains/context/codewiki/tree-sitter.ts +771 -0
- package/src/domains/context/contract.ts +62 -0
- package/src/domains/context/excluded-dirs.ts +1 -0
- package/src/domains/context/extension.ts +407 -0
- package/src/domains/context/fingerprint.ts +196 -0
- package/src/domains/context/index.ts +164 -0
- package/src/domains/context/init-options.ts +69 -0
- package/src/domains/context/manifest.ts +6 -0
- package/src/domains/context/operator-profile.ts +157 -0
- package/src/domains/context/project-metadata.ts +510 -0
- package/src/domains/context/project-rules.ts +227 -0
- package/src/domains/context/prompt-context.ts +62 -0
- package/src/domains/context/refresh.ts +170 -0
- package/src/domains/context/sibling-files.ts +10 -0
- package/src/domains/context/state.ts +237 -0
- package/src/domains/context/wiki/assemble.ts +303 -0
- package/src/domains/context/wiki/frontmatter.ts +210 -0
- package/src/domains/context/wiki/generate.ts +590 -0
- package/src/domains/context/wiki/layout.ts +111 -0
- package/src/domains/context/wiki/meta.ts +221 -0
- package/src/domains/context/wiki/plan-store.ts +217 -0
- package/src/domains/context/wiki/plan.ts +250 -0
- package/src/domains/context/wiki/prompts.ts +270 -0
- package/src/domains/context/wiki/staleness.ts +198 -0
- package/src/domains/dispatch/active-route-planner.ts +168 -0
- package/src/domains/dispatch/admission-queue.ts +150 -0
- package/src/domains/dispatch/admission.ts +334 -0
- package/src/domains/dispatch/agent-candidates.ts +307 -0
- package/src/domains/dispatch/agent-ledger-hub.ts +71 -0
- package/src/domains/dispatch/agent-ledger-store.ts +257 -0
- package/src/domains/dispatch/agent-ledger.ts +212 -0
- package/src/domains/dispatch/agent-plan-adapter.ts +85 -0
- package/src/domains/dispatch/assignment-events.ts +132 -0
- package/src/domains/dispatch/assignment-reconcile.ts +76 -0
- package/src/domains/dispatch/assignment-store.ts +162 -0
- package/src/domains/dispatch/assignment.ts +278 -0
- package/src/domains/dispatch/backoff.ts +59 -0
- package/src/domains/dispatch/batch-store.ts +134 -0
- package/src/domains/dispatch/batch-tracker.ts +66 -0
- package/src/domains/dispatch/capability-match.ts +155 -0
- package/src/domains/dispatch/capacity-lease.ts +413 -0
- package/src/domains/dispatch/code-step-store.ts +52 -0
- package/src/domains/dispatch/code-step.ts +368 -0
- package/src/domains/dispatch/contract.ts +278 -0
- package/src/domains/dispatch/dedup.ts +133 -0
- package/src/domains/dispatch/event-pump.ts +251 -0
- package/src/domains/dispatch/execution-handoff.ts +29 -0
- package/src/domains/dispatch/execution-plan.ts +328 -0
- package/src/domains/dispatch/execution-role.ts +277 -0
- package/src/domains/dispatch/execution-scheduler.ts +583 -0
- package/src/domains/dispatch/extension.ts +5869 -0
- package/src/domains/dispatch/failure-classification.ts +141 -0
- package/src/domains/dispatch/fleet-plan.ts +225 -0
- package/src/domains/dispatch/fleet-preflight.ts +394 -0
- package/src/domains/dispatch/gate-decisions.ts +1040 -0
- package/src/domains/dispatch/gate-role-prompts.ts +58 -0
- package/src/domains/dispatch/heartbeat.ts +27 -0
- package/src/domains/dispatch/index.ts +137 -0
- package/src/domains/dispatch/joint-route-adapter.ts +114 -0
- package/src/domains/dispatch/joint-route-resolver.ts +283 -0
- package/src/domains/dispatch/manifest.ts +6 -0
- package/src/domains/dispatch/orphan-recovery.ts +224 -0
- package/src/domains/dispatch/outcome.ts +109 -0
- package/src/domains/dispatch/phase-timing.ts +47 -0
- package/src/domains/dispatch/placement.ts +202 -0
- package/src/domains/dispatch/receipt-findings.ts +255 -0
- package/src/domains/dispatch/receipt-integrity.ts +378 -0
- package/src/domains/dispatch/recovery-candidates.ts +74 -0
- package/src/domains/dispatch/reproducibility.ts +48 -0
- package/src/domains/dispatch/reservation-store.ts +501 -0
- package/src/domains/dispatch/route-approval.ts +177 -0
- package/src/domains/dispatch/route-candidates.ts +57 -0
- package/src/domains/dispatch/route-decision.ts +1079 -0
- package/src/domains/dispatch/route-facts.ts +187 -0
- package/src/domains/dispatch/route-history.ts +238 -0
- package/src/domains/dispatch/route-observer.ts +488 -0
- package/src/domains/dispatch/route-policy.ts +327 -0
- package/src/domains/dispatch/route-quality.ts +256 -0
- package/src/domains/dispatch/route-readiness.ts +120 -0
- package/src/domains/dispatch/routing-intent.ts +287 -0
- package/src/domains/dispatch/run-identity.ts +56 -0
- package/src/domains/dispatch/scout-transition.ts +130 -0
- package/src/domains/dispatch/state.ts +277 -0
- package/src/domains/dispatch/tool-stats.ts +132 -0
- package/src/domains/dispatch/transport.ts +209 -0
- package/src/domains/dispatch/types.ts +785 -0
- package/src/domains/dispatch/validation-grounding.ts +154 -0
- package/src/domains/dispatch/validation.ts +721 -0
- package/src/domains/dispatch/worker-protocol.ts +275 -0
- package/src/domains/dispatch/worker-spawn.ts +566 -0
- package/src/domains/dispatch/write-boundary-enforcer.ts +97 -0
- package/src/domains/dispatch/write-boundary.ts +426 -0
- package/src/domains/eval/artifacts/redact.ts +42 -0
- package/src/domains/eval/artifacts/store.ts +173 -0
- package/src/domains/eval/compare/compare.ts +33 -0
- package/src/domains/eval/compare/gates.ts +66 -0
- package/src/domains/eval/compare/thresholds.ts +92 -0
- package/src/domains/eval/harness-metrics.ts +62 -0
- package/src/domains/eval/index.ts +66 -0
- package/src/domains/eval/metrics/chaos-stream.ts +93 -0
- package/src/domains/eval/metrics/context.ts +34 -0
- package/src/domains/eval/metrics/coverage.ts +21 -0
- package/src/domains/eval/metrics/evidence.ts +182 -0
- package/src/domains/eval/metrics/fleet-loop-stream.ts +196 -0
- package/src/domains/eval/metrics/invariants.ts +736 -0
- package/src/domains/eval/metrics/latency.ts +4 -0
- package/src/domains/eval/metrics/token-stream.ts +139 -0
- package/src/domains/eval/metrics/tokens.ts +51 -0
- package/src/domains/eval/metrics/tool-calls.ts +7 -0
- package/src/domains/eval/proactive-memory.ts +279 -0
- package/src/domains/eval/provenance.ts +35 -0
- package/src/domains/eval/report.ts +234 -0
- package/src/domains/eval/reports/json.ts +5 -0
- package/src/domains/eval/reports/junit.ts +23 -0
- package/src/domains/eval/reports/markdown.ts +20 -0
- package/src/domains/eval/reports/swe-jsonl.ts +16 -0
- package/src/domains/eval/reports/text.ts +25 -0
- package/src/domains/eval/run-compare.ts +274 -0
- package/src/domains/eval/runner.ts +244 -0
- package/src/domains/eval/runners/clio-run.ts +148 -0
- package/src/domains/eval/runners/context-index.ts +56 -0
- package/src/domains/eval/runners/context-init.ts +203 -0
- package/src/domains/eval/runners/external-command.ts +350 -0
- package/src/domains/eval/runtime-paths.ts +171 -0
- package/src/domains/eval/schema/artifact.ts +75 -0
- package/src/domains/eval/schema/suite.ts +235 -0
- package/src/domains/eval/schema/validate.ts +339 -0
- package/src/domains/eval/store.ts +392 -0
- package/src/domains/eval/suites/load.ts +74 -0
- package/src/domains/eval/suites/matrix.ts +19 -0
- package/src/domains/eval/suites/resolve.ts +44 -0
- package/src/domains/eval/suites/run.ts +325 -0
- package/src/domains/eval/task-file.ts +186 -0
- package/src/domains/eval/types.ts +141 -0
- package/src/domains/eval/verifiers/command.ts +27 -0
- package/src/domains/eval/verifiers/file-exists.ts +6 -0
- package/src/domains/eval/verifiers/patch.ts +22 -0
- package/src/domains/eval/workspaces/git.ts +41 -0
- package/src/domains/eval/workspaces/local.ts +17 -0
- package/src/domains/eval/workspaces/temp-copy.ts +29 -0
- package/src/domains/evidence/build.ts +1714 -0
- package/src/domains/evidence/eval.ts +605 -0
- package/src/domains/evidence/failure-attribution.ts +54 -0
- package/src/domains/evidence/finish-contract-map.ts +42 -0
- package/src/domains/evidence/index.ts +55 -0
- package/src/domains/evidence/provenance.ts +200 -0
- package/src/domains/evidence/redact.ts +81 -0
- package/src/domains/evidence/store.ts +291 -0
- package/src/domains/evidence/types.ts +325 -0
- package/src/domains/evolution/SELF_EDIT_GATE.md +91 -0
- package/src/domains/evolution/index.ts +26 -0
- package/src/domains/evolution/manifest.ts +154 -0
- package/src/domains/evolution/validate.ts +304 -0
- package/src/domains/extensions/contract.ts +22 -0
- package/src/domains/extensions/discovery.ts +193 -0
- package/src/domains/extensions/extension.ts +46 -0
- package/src/domains/extensions/index.ts +34 -0
- package/src/domains/extensions/manager.ts +30 -0
- package/src/domains/extensions/manifest.ts +6 -0
- package/src/domains/extensions/resources.ts +38 -0
- package/src/domains/extensions/state.ts +224 -0
- package/src/domains/extensions/types.ts +83 -0
- package/src/domains/interop/consent.ts +185 -0
- package/src/domains/interop/contract.ts +29 -0
- package/src/domains/interop/detect.ts +173 -0
- package/src/domains/interop/extension.ts +59 -0
- package/src/domains/interop/index.ts +34 -0
- package/src/domains/interop/manifest.ts +6 -0
- package/src/domains/interop/registry.ts +139 -0
- package/src/domains/interop/state.ts +92 -0
- package/src/domains/interop/types.ts +109 -0
- package/src/domains/lifecycle/contract.ts +11 -0
- package/src/domains/lifecycle/doctor.ts +536 -0
- package/src/domains/lifecycle/extension.ts +23 -0
- package/src/domains/lifecycle/index.ts +21 -0
- package/src/domains/lifecycle/install-method.ts +51 -0
- package/src/domains/lifecycle/manifest.ts +6 -0
- package/src/domains/lifecycle/migrations/index.ts +94 -0
- package/src/domains/lifecycle/state.ts +93 -0
- package/src/domains/lifecycle/upgrade-notice.ts +35 -0
- package/src/domains/lifecycle/version.ts +35 -0
- package/src/domains/memory/index.ts +128 -0
- package/src/domains/memory/operations.ts +143 -0
- package/src/domains/memory/prompt-section.ts +86 -0
- package/src/domains/memory/proposal.ts +180 -0
- package/src/domains/memory/store.ts +163 -0
- package/src/domains/memory/task-bank.ts +229 -0
- package/src/domains/memory/task-memory-handoff.ts +222 -0
- package/src/domains/memory/task-memory-policy.ts +602 -0
- package/src/domains/memory/task-memory-status.ts +58 -0
- package/src/domains/memory/task-memory-telemetry.ts +346 -0
- package/src/domains/memory/task-memory-trace.ts +89 -0
- package/src/domains/memory/types.ts +74 -0
- package/src/domains/memory/validate.ts +297 -0
- package/src/domains/middleware/budget.ts +216 -0
- package/src/domains/middleware/contract.ts +35 -0
- package/src/domains/middleware/dispatch-nudge.ts +469 -0
- package/src/domains/middleware/extension.ts +129 -0
- package/src/domains/middleware/hook-receipts.ts +70 -0
- package/src/domains/middleware/hooks-io.ts +174 -0
- package/src/domains/middleware/hooks.ts +432 -0
- package/src/domains/middleware/index.ts +154 -0
- package/src/domains/middleware/manifest.ts +6 -0
- package/src/domains/middleware/memory-intervention.ts +701 -0
- package/src/domains/middleware/rules.ts +42 -0
- package/src/domains/middleware/runtime.ts +333 -0
- package/src/domains/middleware/skills-reminder.ts +187 -0
- package/src/domains/middleware/snapshot.ts +71 -0
- package/src/domains/middleware/stalled-turn.ts +71 -0
- package/src/domains/middleware/task-board-reminder.ts +87 -0
- package/src/domains/middleware/task-nudge.ts +77 -0
- package/src/domains/middleware/tool-choice-control.ts +42 -0
- package/src/domains/middleware/types.ts +131 -0
- package/src/domains/middleware/validate.ts +329 -0
- package/src/domains/observability/accountability.ts +67 -0
- package/src/domains/observability/contract.ts +168 -0
- package/src/domains/observability/cost.ts +206 -0
- package/src/domains/observability/evidence-index.ts +123 -0
- package/src/domains/observability/extension.ts +281 -0
- package/src/domains/observability/index.ts +78 -0
- package/src/domains/observability/manifest.ts +10 -0
- package/src/domains/observability/metrics.ts +37 -0
- package/src/domains/observability/projection.ts +477 -0
- package/src/domains/observability/telemetry.ts +89 -0
- package/src/domains/observability/trace-store.ts +1454 -0
- package/src/domains/prompts/compiler.ts +556 -0
- package/src/domains/prompts/contract.ts +30 -0
- package/src/domains/prompts/extension.ts +304 -0
- package/src/domains/prompts/fragment-loader.ts +139 -0
- package/src/domains/prompts/fragments/identity/clio.md +3 -2
- package/src/domains/prompts/fragments/identity/self-awareness.md +63 -0
- package/src/domains/prompts/fragments/operating/contract.md +10 -1
- package/src/domains/prompts/hash.ts +73 -0
- package/src/domains/prompts/index.ts +32 -0
- package/src/domains/prompts/manifest.ts +8 -0
- package/src/domains/prompts/memory-intervention.ts +57 -0
- package/src/domains/prompts/preload.ts +82 -0
- package/src/domains/providers/auth/api-key.ts +47 -0
- package/src/domains/providers/auth/backend-file.ts +69 -0
- package/src/domains/providers/auth/backend-memory.ts +17 -0
- package/src/domains/providers/auth/index.ts +37 -0
- package/src/domains/providers/auth/oauth.ts +36 -0
- package/src/domains/providers/auth/storage.ts +667 -0
- package/src/domains/providers/capabilities.ts +50 -0
- package/src/domains/providers/catalog.ts +162 -0
- package/src/domains/providers/contract.ts +151 -0
- package/src/domains/providers/credentials.ts +20 -0
- package/src/domains/providers/eligibility.ts +24 -0
- package/src/domains/providers/errors.ts +64 -0
- package/src/domains/providers/extension.ts +536 -0
- package/src/domains/providers/index.ts +142 -0
- package/src/domains/providers/knowledge-base-path.ts +102 -0
- package/src/domains/providers/manifest.ts +6 -0
- package/src/domains/providers/model-capabilities.ts +136 -0
- package/src/domains/providers/model-discovery.ts +144 -0
- package/src/domains/providers/model-family.ts +32 -0
- package/src/domains/providers/model-runtime-capabilities.ts +712 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +2 -2
- package/src/domains/providers/plugins.ts +59 -0
- package/src/domains/providers/probe/fingerprint.ts +44 -0
- package/src/domains/providers/probe/http.ts +114 -0
- package/src/domains/providers/probe/reasoning.ts +111 -0
- package/src/domains/providers/registry.ts +166 -0
- package/src/domains/providers/resolver.ts +156 -0
- package/src/domains/providers/runtime-resolution.ts +720 -0
- package/src/domains/providers/runtimes/antigravity/antigravity-code.ts +90 -0
- package/src/domains/providers/runtimes/builtins.ts +78 -0
- package/src/domains/providers/runtimes/claude/claude-code.ts +38 -0
- package/src/domains/providers/runtimes/claude/claude-sdk.ts +38 -0
- package/src/domains/providers/runtimes/claude/common.ts +55 -0
- package/src/domains/providers/runtimes/cloud/alcf.ts +171 -0
- package/src/domains/providers/runtimes/cloud/anthropic-max.ts +71 -0
- package/src/domains/providers/runtimes/cloud/anthropic.ts +43 -0
- package/src/domains/providers/runtimes/cloud/bedrock.ts +35 -0
- package/src/domains/providers/runtimes/cloud/deepseek.ts +50 -0
- package/src/domains/providers/runtimes/cloud/google.ts +41 -0
- package/src/domains/providers/runtimes/cloud/groq.ts +46 -0
- package/src/domains/providers/runtimes/cloud/mistral.ts +46 -0
- package/src/domains/providers/runtimes/cloud/openai-codex.ts +49 -0
- package/src/domains/providers/runtimes/cloud/openai.ts +46 -0
- package/src/domains/providers/runtimes/cloud/openrouter.ts +111 -0
- package/src/domains/providers/runtimes/common/lmstudio-logger.ts +32 -0
- package/src/domains/providers/runtimes/common/local-synth.ts +165 -0
- package/src/domains/providers/runtimes/common/probe-helpers.ts +474 -0
- package/src/domains/providers/runtimes/local-native/lemonade-anthropic.ts +27 -0
- package/src/domains/providers/runtimes/local-native/lemonade-openai.ts +26 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-anthropic.ts +88 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-completion.ts +207 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-embed.ts +180 -0
- package/src/domains/providers/runtimes/local-native/llamacpp-rerank.ts +126 -0
- package/src/domains/providers/runtimes/local-native/llamacpp.ts +98 -0
- package/src/domains/providers/runtimes/local-native/lmstudio-native.ts +491 -0
- package/src/domains/providers/runtimes/local-native/ollama-native.ts +117 -0
- package/src/domains/providers/runtimes/local-native/sglang.ts +26 -0
- package/src/domains/providers/runtimes/local-native/vllm.ts +27 -0
- package/src/domains/providers/runtimes/protocol/anthropic-compat.ts +104 -0
- package/src/domains/providers/runtimes/protocol/anthropic-messages.ts +28 -0
- package/src/domains/providers/runtimes/protocol/bedrock.ts +26 -0
- package/src/domains/providers/runtimes/protocol/google.ts +27 -0
- package/src/domains/providers/runtimes/protocol/openai-compat.ts +145 -0
- package/src/domains/providers/support.ts +238 -0
- package/src/domains/providers/thinking-control-policy.ts +85 -0
- package/src/domains/providers/types/capability-flags.ts +114 -0
- package/src/domains/providers/types/cost-provenance.ts +7 -0
- package/src/domains/providers/types/inference.ts +41 -0
- package/src/domains/providers/types/knowledge-base.ts +156 -0
- package/src/domains/providers/types/local-model-quirks.ts +218 -0
- package/src/domains/providers/types/runtime-descriptor.ts +170 -0
- package/src/domains/providers/types/target-descriptor.ts +38 -0
- package/src/domains/resources/collision.ts +92 -0
- package/src/domains/resources/common-loader.ts +140 -0
- package/src/domains/resources/contract.ts +25 -0
- package/src/domains/resources/extension.ts +61 -0
- package/src/domains/resources/index.ts +74 -0
- package/src/domains/resources/loader.ts +86 -0
- package/src/domains/resources/manifest.ts +6 -0
- package/src/domains/resources/prompts/loader.ts +232 -0
- package/src/domains/resources/prompts/substitute.ts +65 -0
- package/src/domains/resources/skills/content-hash.ts +105 -0
- package/src/domains/resources/skills/evals.ts +175 -0
- package/src/domains/resources/skills/install.ts +410 -0
- package/src/domains/resources/skills/loader.ts +978 -0
- package/src/domains/resources/skills/marketplace.ts +255 -0
- package/src/domains/resources/skills/provenance-pin.ts +115 -0
- package/src/domains/safety/action-classifier.ts +268 -0
- package/src/domains/safety/approval-axis.ts +23 -0
- package/src/domains/safety/audit.ts +487 -0
- package/src/domains/safety/autonomy.ts +174 -0
- package/src/domains/safety/call-target.ts +59 -0
- package/src/domains/safety/contract.ts +65 -0
- package/src/domains/safety/damage-control.ts +44 -0
- package/src/domains/safety/default-path-policy.ts +117 -0
- package/src/domains/safety/extension.ts +383 -0
- package/src/domains/safety/finish-contract-registration.ts +128 -0
- package/src/domains/safety/finish-contract.ts +554 -0
- package/src/domains/safety/index.ts +44 -0
- package/src/domains/safety/loop-detector.ts +143 -0
- package/src/domains/safety/manifest.ts +6 -0
- package/src/domains/safety/path-policy.ts +164 -0
- package/src/domains/safety/policy-engine.ts +994 -0
- package/src/domains/safety/project-policy.ts +391 -0
- package/src/domains/safety/protected-artifacts-registration.ts +189 -0
- package/src/domains/safety/protected-artifacts.ts +993 -0
- package/src/domains/safety/rejection-feedback.ts +102 -0
- package/src/domains/safety/rigor.ts +72 -0
- package/src/domains/safety/rule-compiler.ts +48 -0
- package/src/domains/safety/rule-pack-loader.ts +92 -0
- package/src/domains/safety/run-effects.ts +197 -0
- package/src/domains/safety/scope.ts +61 -0
- package/src/domains/scheduling/budget.ts +35 -0
- package/src/domains/scheduling/cluster.ts +175 -0
- package/src/domains/scheduling/contract.ts +30 -0
- package/src/domains/scheduling/extension.ts +91 -0
- package/src/domains/scheduling/index.ts +12 -0
- package/src/domains/scheduling/manifest.ts +6 -0
- package/src/domains/session/archive-readers.ts +208 -0
- package/src/domains/session/checkpoint.ts +38 -0
- package/src/domains/session/compaction/auto.ts +89 -0
- package/src/domains/session/compaction/branch-summary.ts +186 -0
- package/src/domains/session/compaction/compact.ts +493 -0
- package/src/domains/session/compaction/cut-point.ts +171 -0
- package/src/domains/session/compaction/defaults.ts +34 -0
- package/src/domains/session/compaction/mask-observations.ts +265 -0
- package/src/domains/session/compaction/session-entries.ts +18 -0
- package/src/domains/session/compaction/tokens.ts +147 -0
- package/src/domains/session/context-accounting.ts +583 -0
- package/src/domains/session/context-ledger.ts +348 -0
- package/src/domains/session/contract.ts +144 -0
- package/src/domains/session/cwd-fallback.ts +65 -0
- package/src/domains/session/entries.ts +509 -0
- package/src/domains/session/extension.ts +322 -0
- package/src/domains/session/history.ts +172 -0
- package/src/domains/session/index.ts +84 -0
- package/src/domains/session/manager.ts +128 -0
- package/src/domains/session/manifest.ts +6 -0
- package/src/domains/session/migrations/index.ts +27 -0
- package/src/domains/session/prompt-manifest.ts +173 -0
- package/src/domains/session/protected-artifact-journal.ts +241 -0
- package/src/domains/session/protected-artifacts.ts +90 -0
- package/src/domains/session/retry.ts +238 -0
- package/src/domains/session/task-board.ts +375 -0
- package/src/domains/session/tree/active-path.ts +98 -0
- package/src/domains/session/tree/fork.ts +160 -0
- package/src/domains/session/tree/manager.ts +128 -0
- package/src/domains/session/tree/navigator.ts +177 -0
- package/src/domains/session/tree/preview.ts +259 -0
- package/src/domains/session/usage.ts +148 -0
- package/src/domains/session/workspace/git-probe.ts +161 -0
- package/src/domains/session/workspace/index.ts +4 -0
- package/src/domains/session/workspace/project-type.ts +217 -0
- package/src/domains/session/workspace/snapshot.ts +74 -0
- package/src/domains/share/archive.ts +684 -0
- package/src/domains/share/contract.ts +9 -0
- package/src/domains/share/extension.ts +26 -0
- package/src/domains/share/index.ts +28 -0
- package/src/domains/share/manifest.ts +6 -0
- package/src/engine/acp/adapter.ts +397 -0
- package/src/engine/acp/errors.ts +32 -0
- package/src/engine/acp/event-mapper.ts +154 -0
- package/src/engine/acp/server.ts +656 -0
- package/src/engine/acp/tool-mediator.ts +686 -0
- package/src/engine/acp/transport.ts +654 -0
- package/src/engine/acp/types.ts +170 -0
- package/src/engine/agent.ts +29 -0
- package/src/engine/ai.ts +202 -0
- package/src/engine/alcf-oauth.ts +198 -0
- package/src/engine/antigravity/subprocess-runtime.ts +205 -0
- package/src/engine/apis/degraded-inference.ts +95 -0
- package/src/engine/apis/index.ts +20 -0
- package/src/engine/apis/llamacpp-residency.ts +252 -0
- package/src/engine/apis/lmstudio-native.ts +1438 -0
- package/src/engine/apis/lmstudio-residency.ts +92 -0
- package/src/engine/apis/ollama-native.ts +507 -0
- package/src/engine/apis/openai-completions.ts +716 -0
- package/src/engine/apis/output-budget.ts +99 -0
- package/src/engine/apis/residency-lock.ts +29 -0
- package/src/engine/apis/residency.ts +640 -0
- package/src/engine/apis/resident-models.ts +42 -0
- package/src/engine/apis/sampling-overrides.ts +38 -0
- package/src/engine/apis/thinking-replay.ts +11 -0
- package/src/engine/claude/sdk-runtime.ts +685 -0
- package/src/engine/claude/session-id.ts +5 -0
- package/src/engine/claude/subprocess-runtime.ts +316 -0
- package/src/engine/claude/tool-safety.ts +400 -0
- package/src/engine/external-subprocess.ts +23 -0
- package/src/engine/harmony-response.ts +165 -0
- package/src/engine/loop-guard.ts +1127 -0
- package/src/engine/oauth.ts +192 -0
- package/src/engine/pi-mono-names.ts +13 -0
- package/src/engine/provider-payload.ts +315 -0
- package/src/engine/select-list.ts +53 -0
- package/src/engine/session.ts +834 -0
- package/src/engine/strip-tokenizer-sentinels.ts +125 -0
- package/src/engine/tui.ts +103 -0
- package/src/engine/types.ts +66 -0
- package/src/engine/worker-events.ts +100 -0
- package/src/engine/worker-runtime.ts +1022 -0
- package/src/engine/worker-tools.ts +203 -0
- package/src/entry/orchestrator.ts +1873 -0
- package/src/interactive/application-controller.ts +346 -0
- package/src/interactive/bus-notices.ts +265 -0
- package/src/interactive/chat-loop-messages.ts +626 -0
- package/src/interactive/chat-loop-policy.ts +18 -0
- package/src/interactive/chat-loop.ts +865 -0
- package/src/interactive/chat-panel.ts +1694 -0
- package/src/interactive/chat-renderer.ts +1038 -0
- package/src/interactive/clio-editor.ts +166 -0
- package/src/interactive/command-fallbacks.ts +23 -0
- package/src/interactive/command-output.ts +85 -0
- package/src/interactive/context-activity.ts +203 -0
- package/src/interactive/context-meter.ts +223 -0
- package/src/interactive/context-overlay.ts +220 -0
- package/src/interactive/cost-overlay.ts +279 -0
- package/src/interactive/dispatch-board.ts +1319 -0
- package/src/interactive/dispatch-steering.ts +86 -0
- package/src/interactive/editor-bash.ts +46 -0
- package/src/interactive/editor-steer.ts +51 -0
- package/src/interactive/editor-submit.ts +303 -0
- package/src/interactive/external-editor.ts +67 -0
- package/src/interactive/follow-up-queue-panel.ts +75 -0
- package/src/interactive/footer/dashboard.ts +534 -0
- package/src/interactive/footer/notifications.ts +275 -0
- package/src/interactive/footer/widgets.ts +1246 -0
- package/src/interactive/footer-panel.ts +187 -0
- package/src/interactive/format-time.ts +85 -0
- package/src/interactive/index.ts +11 -0
- package/src/interactive/interactive-application.ts +755 -0
- package/src/interactive/interactive-event-projection.ts +380 -0
- package/src/interactive/interactive-input-runtime.ts +261 -0
- package/src/interactive/interactive-presentation.ts +452 -0
- package/src/interactive/interactive-shell.ts +134 -0
- package/src/interactive/interactive-slash-runtime.ts +492 -0
- package/src/interactive/interactive-subscriptions.ts +111 -0
- package/src/interactive/interactive-tickers.ts +152 -0
- package/src/interactive/keybinding-manager.ts +496 -0
- package/src/interactive/layout.ts +20 -0
- package/src/interactive/leader-key.ts +143 -0
- package/src/interactive/loop-guard-interrupt.ts +101 -0
- package/src/interactive/memory-overlay.ts +280 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +110 -0
- package/src/interactive/overlay-auth-lifecycle.ts +308 -0
- package/src/interactive/overlay-frame.ts +502 -0
- package/src/interactive/overlay-general-openers.ts +217 -0
- package/src/interactive/overlay-key-routing.ts +213 -0
- package/src/interactive/overlay-lifecycle.ts +413 -0
- package/src/interactive/overlay-model-selectors.ts +127 -0
- package/src/interactive/overlay-permission-lifecycle.ts +344 -0
- package/src/interactive/overlay-resource-openers.ts +112 -0
- package/src/interactive/overlay-session-lifecycle.ts +270 -0
- package/src/interactive/overlay-transitions.ts +57 -0
- package/src/interactive/overlays/agents.ts +69 -0
- package/src/interactive/overlays/ask-user.ts +921 -0
- package/src/interactive/overlays/auth-dialog.ts +221 -0
- package/src/interactive/overlays/context-reset.ts +108 -0
- package/src/interactive/overlays/cwd-fallback.ts +141 -0
- package/src/interactive/overlays/extensions.ts +54 -0
- package/src/interactive/overlays/help-reference.ts +140 -0
- package/src/interactive/overlays/interop.ts +139 -0
- package/src/interactive/overlays/keybinding-detail.ts +90 -0
- package/src/interactive/overlays/list-overlay.ts +606 -0
- package/src/interactive/overlays/message-picker.ts +155 -0
- package/src/interactive/overlays/model-selector.ts +1091 -0
- package/src/interactive/overlays/prompts.ts +72 -0
- package/src/interactive/overlays/session-selector-search.ts +31 -0
- package/src/interactive/overlays/session-selector.ts +266 -0
- package/src/interactive/overlays/settings.ts +3363 -0
- package/src/interactive/overlays/skills-hub.ts +237 -0
- package/src/interactive/overlays/tree-selector.ts +387 -0
- package/src/interactive/permission-overlay.ts +170 -0
- package/src/interactive/render-trace.ts +125 -0
- package/src/interactive/renderers/branch-summary.ts +86 -0
- package/src/interactive/renderers/code-ink.ts +420 -0
- package/src/interactive/renderers/compaction-summary.ts +112 -0
- package/src/interactive/renderers/diff.ts +126 -0
- package/src/interactive/renderers/notice.ts +28 -0
- package/src/interactive/renderers/retry-status.ts +31 -0
- package/src/interactive/renderers/structured.ts +89 -0
- package/src/interactive/renderers/tool-execution.ts +1104 -0
- package/src/interactive/renderers/worker-entry.ts +264 -0
- package/src/interactive/session-last-turn.ts +186 -0
- package/src/interactive/session-transcript.ts +105 -0
- package/src/interactive/session-usage-reseed.ts +74 -0
- package/src/interactive/slash-autocomplete.ts +364 -0
- package/src/interactive/slash-commands.ts +1319 -0
- package/src/interactive/slash-spec.ts +453 -0
- package/src/interactive/status/controller.ts +256 -0
- package/src/interactive/status/index.ts +23 -0
- package/src/interactive/status/state-machine.ts +530 -0
- package/src/interactive/status/summary.ts +170 -0
- package/src/interactive/status/types.ts +121 -0
- package/src/interactive/status/verbs.ts +163 -0
- package/src/interactive/status/watchdog.ts +24 -0
- package/src/interactive/tasks-overlay.ts +186 -0
- package/src/interactive/theme/components.ts +55 -0
- package/src/interactive/theme/glyphs.ts +70 -0
- package/src/interactive/theme/index.ts +15 -0
- package/src/interactive/theme/labels.ts +88 -0
- package/src/interactive/theme/rules.ts +138 -0
- package/src/interactive/theme/segments.ts +88 -0
- package/src/interactive/theme/tokens.ts +121 -0
- package/src/interactive/thinking-level-policy.ts +6 -0
- package/src/interactive/tool-prose-loop.ts +122 -0
- package/src/interactive/tool-prose-registration.ts +48 -0
- package/src/interactive/turn-context.ts +854 -0
- package/src/interactive/turn-middleware.ts +283 -0
- package/src/interactive/turn-persistence.ts +441 -0
- package/src/interactive/turn-queues.ts +169 -0
- package/src/interactive/turn-recovery.ts +306 -0
- package/src/interactive/turn-runtime.ts +802 -0
- package/src/interactive/turn-state.ts +123 -0
- package/src/interactive/view/artifacts.ts +1342 -0
- package/src/interactive/view/view-overlay.ts +732 -0
- package/src/interactive/welcome-dashboard.ts +536 -0
- package/src/interactive/worker-receipts.ts +94 -0
- package/src/interactive/worker-replay.ts +111 -0
- package/src/interactive/worker-share.ts +100 -0
- package/src/interactive/worker-stream.ts +442 -0
- package/src/interactive/workspace-facts.ts +141 -0
- package/src/tools/agent-tools.ts +382 -0
- package/src/tools/artifact.ts +103 -0
- package/src/tools/ask-user.ts +656 -0
- package/src/tools/bash.ts +176 -0
- package/src/tools/bootstrap.ts +474 -0
- package/src/tools/codewiki/code-nav.ts +563 -0
- package/src/tools/codewiki/shared.ts +115 -0
- package/src/tools/compete-worktrees.ts +898 -0
- package/src/tools/context/docs-engine.ts +619 -0
- package/src/tools/context/index.ts +435 -0
- package/src/tools/credential-present.ts +151 -0
- package/src/tools/dispatch-arguments.ts +228 -0
- package/src/tools/dispatch-plan.ts +741 -0
- package/src/tools/dispatch-scout.ts +461 -0
- package/src/tools/dispatch.ts +3338 -0
- package/src/tools/edit-diff.ts +534 -0
- package/src/tools/edit.ts +128 -0
- package/src/tools/executables.ts +22 -0
- package/src/tools/file-mutation-queue.ts +35 -0
- package/src/tools/find.ts +292 -0
- package/src/tools/grep.ts +495 -0
- package/src/tools/ignore-policy.ts +169 -0
- package/src/tools/ledger.ts +206 -0
- package/src/tools/ls.ts +110 -0
- package/src/tools/monitor.ts +797 -0
- package/src/tools/network-policy.ts +29 -0
- package/src/tools/observation.ts +421 -0
- package/src/tools/observers.ts +99 -0
- package/src/tools/path-utils.ts +79 -0
- package/src/tools/policy.ts +154 -0
- package/src/tools/profiles.ts +108 -0
- package/src/tools/read.ts +173 -0
- package/src/tools/registry.ts +1157 -0
- package/src/tools/result-shaping.ts +204 -0
- package/src/tools/safe-exec.ts +128 -0
- package/src/tools/spawn-hygiene.ts +182 -0
- package/src/tools/steer.ts +88 -0
- package/src/tools/string-enum.ts +15 -0
- package/src/tools/tasks.ts +168 -0
- package/src/tools/truncate-utf8.ts +17 -0
- package/src/tools/truncate.ts +202 -0
- package/src/tools/verify/frontend.ts +685 -0
- package/src/tools/verify/index.ts +66 -0
- package/src/tools/verify/scripts.ts +108 -0
- package/src/tools/web-fetch.ts +777 -0
- package/src/tools/worker-evidence.ts +215 -0
- package/src/tools/write.ts +52 -0
- package/src/utils/exif-orientation.ts +192 -0
- package/src/utils/git.ts +24 -0
- package/src/utils/image-resize.ts +148 -0
- package/src/utils/photon.ts +103 -0
- package/src/worker/control-lane.ts +22 -0
- package/src/worker/entry.ts +257 -0
- package/src/worker/event-projection.ts +56 -0
- package/src/worker/heartbeat.ts +24 -0
- package/src/worker/ledger-mirror.ts +95 -0
- package/src/worker/ndjson.ts +40 -0
- package/src/worker/protocol.ts +529 -0
- package/src/worker/resource-facts.ts +79 -0
- package/src/worker/runtime-registry.ts +12 -0
- package/src/worker/spec-contract.ts +654 -0
- package/src/worker/stdin-demux.ts +316 -0
- package/dist/acp-UMLFVA3F.js +0 -92
- package/dist/chunk-262G75JS.js +0 -35
- package/dist/chunk-5LDRNKX2.js +0 -1063
- package/dist/chunk-67MTHP2E.js +0 -135
- package/dist/chunk-GOTUR54M.js +0 -9
- package/dist/chunk-TPOCL34A.js +0 -2876
- package/dist/chunk-XV4ZJ6ZM.js +0 -3177
- package/dist/clio-KIQ5SNDS.js +0 -53
- package/dist/configure-G4E3A2PG.js +0 -27
- package/dist/doctor-M5HJJZOL.js +0 -61
- package/dist/domains/agents/builtins/architect.md +0 -33
- package/dist/domains/agents/builtins/coder.md +0 -31
- package/dist/domains/agents/builtins/context-bootstrap.md +0 -38
- package/dist/domains/agents/builtins/debugger.md +0 -30
- package/dist/domains/agents/builtins/documenter.md +0 -31
- package/dist/domains/agents/builtins/git-master.md +0 -30
- package/dist/domains/agents/builtins/provenance.md +0 -30
- package/dist/domains/agents/builtins/researcher.md +0 -71
- package/dist/domains/agents/builtins/scout.md +0 -42
- package/dist/domains/agents/builtins/tester.md +0 -31
- package/dist/domains/agents/builtins/verifier.md +0 -30
- package/dist/domains/agents/builtins/wiki-writer.md +0 -41
- package/dist/fleet-preflight-CLIAX7YR.js +0 -21
- package/dist/preload-KZVHET2B.js +0 -11
- package/dist/version-ROZ6CZKH.js +0 -16
- package/skills/git/commit-crafting/SKILL.md +0 -79
- package/skills/git/commit-crafting/evals.md +0 -92
- package/skills/git/create-pr/SKILL.md +0 -116
- package/skills/git/create-pr/evals.md +0 -114
- package/skills/git/investigate-issue/SKILL.md +0 -139
- package/skills/git/investigate-issue/evals.md +0 -94
- package/skills/git/review-changes/SKILL.md +0 -103
- package/skills/git/review-changes/evals.md +0 -85
package/dist/worker/entry.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
3
|
import {
|
|
3
4
|
createEngineAgent,
|
|
4
5
|
createLoopGuardRegistration,
|
|
@@ -6,11 +7,12 @@ import {
|
|
|
6
7
|
describeCallTarget,
|
|
7
8
|
isLoopGuardSynthesisBackstopReason,
|
|
8
9
|
isReserveAdmittedTool,
|
|
10
|
+
lockedSynthesisFallbackText,
|
|
9
11
|
patchWorkerRequestPayload,
|
|
10
12
|
resolveDeliveryTools,
|
|
11
13
|
sanitizeLockedSynthesisMessage,
|
|
12
14
|
workerLoopBlockBudget
|
|
13
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-DKGKUHFA.js";
|
|
14
16
|
import {
|
|
15
17
|
DEFAULT_ESCALATION_FALLBACK,
|
|
16
18
|
DEFAULT_ESCALATION_TIMEOUT_MS,
|
|
@@ -32,29 +34,30 @@ import {
|
|
|
32
34
|
startAntigravityWorkerRun,
|
|
33
35
|
startClaudeCodeWorkerRun,
|
|
34
36
|
validateRehydratedWorkerRuntime
|
|
35
|
-
} from "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
37
|
+
} from "../chunk-7SS2CTV2.js";
|
|
38
|
+
import "../chunk-FST4FYJB.js";
|
|
39
|
+
import "../chunk-BSU2YIWB.js";
|
|
40
|
+
import "../chunk-ZPY3JZ5E.js";
|
|
41
|
+
import "../chunk-N6F52NLF.js";
|
|
42
|
+
import "../chunk-LU4TK2PR.js";
|
|
41
43
|
import {
|
|
42
44
|
RESULT_CONTRACT_REPAIR_LIMIT,
|
|
43
45
|
parseResultContract,
|
|
44
|
-
|
|
46
|
+
resultContractRepairMessages,
|
|
45
47
|
validateResultContract
|
|
46
|
-
} from "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
48
|
+
} from "../chunk-GEP36Y4X.js";
|
|
49
|
+
import "../chunk-OLBBMFRD.js";
|
|
50
|
+
import "../chunk-474KN5II.js";
|
|
49
51
|
import {
|
|
50
52
|
ToolNames
|
|
51
|
-
} from "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
+
} from "../chunk-CGKSTWHD.js";
|
|
54
|
+
import "../chunk-C4PTHK7P.js";
|
|
53
55
|
import {
|
|
54
56
|
UNKNOWN_RESOURCE,
|
|
55
57
|
WORKER_PROTOCOL_VERSION,
|
|
56
58
|
WORKER_RESOURCE_LABEL_MAX,
|
|
57
59
|
WORKER_STDIN_FRAME_MAX_BYTES,
|
|
60
|
+
canonicalJson,
|
|
58
61
|
encodeControlFrame,
|
|
59
62
|
endpointIdentityHash,
|
|
60
63
|
knownResource,
|
|
@@ -62,8 +65,8 @@ import {
|
|
|
62
65
|
parseAgentLedgerEntry,
|
|
63
66
|
withinFrameBudget,
|
|
64
67
|
workerSpecDigest
|
|
65
|
-
} from "../chunk-
|
|
66
|
-
import "../chunk-
|
|
68
|
+
} from "../chunk-GAEBEQVI.js";
|
|
69
|
+
import "../chunk-TXOTCRLG.js";
|
|
67
70
|
import {
|
|
68
71
|
FileKnowledgeBase,
|
|
69
72
|
applyModelCapabilityPatch,
|
|
@@ -78,31 +81,42 @@ import {
|
|
|
78
81
|
setGlobalDefaultMaxOutputTokens,
|
|
79
82
|
setProtectedModelsProvider,
|
|
80
83
|
setResidencyNoticeSink
|
|
81
|
-
} from "../chunk-
|
|
82
|
-
import "../chunk-
|
|
84
|
+
} from "../chunk-H6F6BYOH.js";
|
|
85
|
+
import "../chunk-EYOKLTMF.js";
|
|
86
|
+
import "../chunk-IHXBNWMM.js";
|
|
87
|
+
import "../chunk-Q5WJOSJ7.js";
|
|
83
88
|
import {
|
|
84
89
|
readSettings,
|
|
85
90
|
validateSettingsFile
|
|
86
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-KY56HMHH.js";
|
|
87
92
|
import {
|
|
88
93
|
configureGuardrails,
|
|
89
94
|
isWorkerToolCallCapExceededReason,
|
|
90
95
|
isWorkerToolCallCapSynthesisReason
|
|
91
|
-
} from "../chunk-
|
|
92
|
-
import "../chunk-
|
|
93
|
-
import "../chunk-
|
|
94
|
-
import "../chunk-
|
|
95
|
-
import "../chunk-
|
|
96
|
-
import "../chunk-
|
|
96
|
+
} from "../chunk-NMOX6HFD.js";
|
|
97
|
+
import "../chunk-GB6QRBXN.js";
|
|
98
|
+
import "../chunk-3I7MS7N2.js";
|
|
99
|
+
import "../chunk-HQQID6OA.js";
|
|
100
|
+
import "../chunk-R346GLFC.js";
|
|
101
|
+
import "../chunk-WEPFGWHJ.js";
|
|
102
|
+
import "../chunk-BNAZZHFG.js";
|
|
97
103
|
import {
|
|
98
104
|
readClioVersion
|
|
99
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-IWHMRKLL.js";
|
|
106
|
+
import {
|
|
107
|
+
init_esm_shims
|
|
108
|
+
} from "../chunk-3R73A4XB.js";
|
|
109
|
+
|
|
110
|
+
// src/worker/entry.ts
|
|
111
|
+
init_esm_shims();
|
|
100
112
|
|
|
101
113
|
// src/engine/worker-runtime.ts
|
|
114
|
+
init_esm_shims();
|
|
102
115
|
import { existsSync, readFileSync } from "node:fs";
|
|
103
116
|
import path from "node:path";
|
|
104
117
|
|
|
105
118
|
// src/engine/claude/sdk-runtime.ts
|
|
119
|
+
init_esm_shims();
|
|
106
120
|
import {
|
|
107
121
|
query
|
|
108
122
|
} from "@anthropic-ai/claude-agent-sdk";
|
|
@@ -648,6 +662,9 @@ function terminalContractViolation(contract, message, cwd, observedReadRanges, o
|
|
|
648
662
|
if (!isAssistantMessage(message)) return null;
|
|
649
663
|
const text = assistantMessageText(message);
|
|
650
664
|
if (text === null || text.length === 0) return "missing final result";
|
|
665
|
+
if (text.trim() === lockedSynthesisFallbackText()) {
|
|
666
|
+
return "the reply after the tool-call lockout held only tool-call markup and was removed; tools are off, so state the final result as plain text";
|
|
667
|
+
}
|
|
651
668
|
const stopReason = message.stopReason;
|
|
652
669
|
if (shouldRequestStalledTurnContinuation({
|
|
653
670
|
hook: "turn_end",
|
|
@@ -775,6 +792,7 @@ function startWorkerRun(input, emit) {
|
|
|
775
792
|
let workerBoundFailure = null;
|
|
776
793
|
let workerBoundAborted = false;
|
|
777
794
|
let abortWorkerForBound = null;
|
|
795
|
+
const STOP_AFTER_ANY_TOOL_RESULT = /* @__PURE__ */ Symbol("stop-after-any-tool-result");
|
|
778
796
|
let stopAfterToolResultCallId = null;
|
|
779
797
|
const workerBudget = resolveWorkerRuntimeBudget(input);
|
|
780
798
|
const readReserve = input.allowedTools.includes(ToolNames.Read) ? workerBudget.readReserve : 0;
|
|
@@ -810,9 +828,11 @@ function startWorkerRun(input, emit) {
|
|
|
810
828
|
...deliveryTools.length > 0 ? { deliveryTools } : {},
|
|
811
829
|
turnSynthesisLockout: workerBudget.synthesis,
|
|
812
830
|
// Once locked, the next model round is forced text-only at the
|
|
813
|
-
// request level (
|
|
814
|
-
// directive alone relies on model compliance, and
|
|
815
|
-
// models kept calling tools until the backstop
|
|
831
|
+
// request level (the tool surface is removed in onPayload below):
|
|
832
|
+
// the lockout directive alone relies on model compliance, and
|
|
833
|
+
// measured local models kept calling tools until the backstop
|
|
834
|
+
// aborted the run, or answered the forced round with tool-call
|
|
835
|
+
// markup that the loop guard then removed.
|
|
816
836
|
onSynthesisLockout: () => {
|
|
817
837
|
if (workerBudget.synthesis) {
|
|
818
838
|
synthesisToolLock = true;
|
|
@@ -823,7 +843,7 @@ function startWorkerRun(input, emit) {
|
|
|
823
843
|
if (workerBoundFailure === null) {
|
|
824
844
|
workerBoundFailure = `worker agent budget reached (${workerBudget.toolCalls}); synthesis is disabled`;
|
|
825
845
|
}
|
|
826
|
-
stopAfterToolResultCallId = toolCallId ??
|
|
846
|
+
stopAfterToolResultCallId = toolCallId ?? STOP_AFTER_ANY_TOOL_RESULT;
|
|
827
847
|
}
|
|
828
848
|
} : {},
|
|
829
849
|
// Forcing the next round to `read` is only correct when reading is
|
|
@@ -936,7 +956,8 @@ function startWorkerRun(input, emit) {
|
|
|
936
956
|
runtimeId: input.runtime.id,
|
|
937
957
|
thinkingLevel: effectiveThinkingLevel,
|
|
938
958
|
...input.responseSchema !== void 0 ? { responseSchema: input.responseSchema } : {},
|
|
939
|
-
|
|
959
|
+
toolSurfaceLocked: synthesisToolLock,
|
|
960
|
+
toolChoiceNone: middlewareChoice.kind === "none",
|
|
940
961
|
...middlewareChoice.kind === "required" ? { toolChoiceName: middlewareChoice.toolName } : {}
|
|
941
962
|
});
|
|
942
963
|
},
|
|
@@ -944,6 +965,7 @@ function startWorkerRun(input, emit) {
|
|
|
944
965
|
};
|
|
945
966
|
if (input.sessionId) options.sessionId = input.sessionId;
|
|
946
967
|
const { agent } = createEngineAgent(options);
|
|
968
|
+
agent.followUpMode = "all";
|
|
947
969
|
abortWorkerForBound = () => agent.abort();
|
|
948
970
|
const unsubscribe = agent.subscribe(async (event) => {
|
|
949
971
|
if (event.type === "turn_start") workerModelRound += 1;
|
|
@@ -983,16 +1005,11 @@ function startWorkerRun(input, emit) {
|
|
|
983
1005
|
if (resultContractRepairsQueued < RESULT_CONTRACT_REPAIR_LIMIT) {
|
|
984
1006
|
resultContractRepairsQueued += 1;
|
|
985
1007
|
synthesisToolLock = true;
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
contract,
|
|
990
|
-
reason: violation,
|
|
991
|
-
attempt: resultContractRepairsQueued,
|
|
992
|
-
anchors: observedReadAnchors()
|
|
993
|
-
})
|
|
994
|
-
)
|
|
1008
|
+
const repair = resultContractRepairMessages(
|
|
1009
|
+
{ contract, reason: violation, attempt: resultContractRepairsQueued, anchors: observedReadAnchors() },
|
|
1010
|
+
{ provider: model.provider, api: model.api, model: model.id }
|
|
995
1011
|
);
|
|
1012
|
+
for (const message of repair) agent.followUp(message);
|
|
996
1013
|
} else if (workerBoundFailure === null) {
|
|
997
1014
|
workerBoundFailure = `result contract failed after ${RESULT_CONTRACT_REPAIR_LIMIT} bounded repair rounds: ${violation}`;
|
|
998
1015
|
emit({ type: "clio_run_outcome", payload: { outcomeCode: "result_contract_exhausted" } });
|
|
@@ -1002,7 +1019,7 @@ function startWorkerRun(input, emit) {
|
|
|
1002
1019
|
}
|
|
1003
1020
|
}
|
|
1004
1021
|
emit(event);
|
|
1005
|
-
if (stopAfterToolResultCallId !== null && event.type === "message_end" && event.message.role === "toolResult" && (stopAfterToolResultCallId
|
|
1022
|
+
if (stopAfterToolResultCallId !== null && event.type === "message_end" && event.message.role === "toolResult" && (stopAfterToolResultCallId === STOP_AFTER_ANY_TOOL_RESULT || event.message.toolCallId === stopAfterToolResultCallId)) {
|
|
1006
1023
|
stopAfterToolResultCallId = null;
|
|
1007
1024
|
workerBoundAborted = true;
|
|
1008
1025
|
abortWorkerForBound?.();
|
|
@@ -1017,6 +1034,8 @@ function startWorkerRun(input, emit) {
|
|
|
1017
1034
|
const denyReason = (tool, actionClass) => `permission denied by policy: dispatched workers run non-interactively (workers.onPermission=deny); ${tool} requires ${actionClass} confirmation`;
|
|
1018
1035
|
const failReason = (tool, actionClass) => `permission required for ${tool} (${actionClass}); workers.onPermission=fail ends this run`;
|
|
1019
1036
|
let activeEscalation = null;
|
|
1037
|
+
const answeredEscalations = /* @__PURE__ */ new Map();
|
|
1038
|
+
const escalationCallKey = (tool, args) => `${tool}\0${canonicalJson(args ?? {})}`;
|
|
1020
1039
|
const clearActiveEscalation = () => {
|
|
1021
1040
|
if (activeEscalation) {
|
|
1022
1041
|
clearTimeout(activeEscalation.timer);
|
|
@@ -1027,6 +1046,7 @@ function startWorkerRun(input, emit) {
|
|
|
1027
1046
|
const active = activeEscalation;
|
|
1028
1047
|
if (!active || active.requestId !== requestId) return false;
|
|
1029
1048
|
clearActiveEscalation();
|
|
1049
|
+
answeredEscalations.set(active.callKey, { decision, requestId });
|
|
1030
1050
|
if (decision === "approve") {
|
|
1031
1051
|
emit({
|
|
1032
1052
|
type: "clio_permission_resolved",
|
|
@@ -1093,10 +1113,38 @@ function startWorkerRun(input, emit) {
|
|
|
1093
1113
|
const unsubscribePermission = registry.onPermissionRequired((call, decision, meta) => {
|
|
1094
1114
|
const actionClass = decision.classification.actionClass;
|
|
1095
1115
|
if (escalationConfig) {
|
|
1116
|
+
const callKey = escalationCallKey(call.tool, call.args);
|
|
1117
|
+
const remembered = answeredEscalations.get(callKey);
|
|
1118
|
+
if (remembered !== void 0) {
|
|
1119
|
+
const approved = remembered.decision === "approve";
|
|
1120
|
+
const reason2 = approved ? `operator approved an identical ${call.tool} call earlier in this run (request ${remembered.requestId}); the answer stands without a new prompt` : `permission denied by operator: an identical ${call.tool} call was already denied earlier in this run (request ${remembered.requestId}); the answer stands, so do not repeat this call`;
|
|
1121
|
+
emit({
|
|
1122
|
+
type: "clio_permission_resolved",
|
|
1123
|
+
payload: {
|
|
1124
|
+
tool: call.tool,
|
|
1125
|
+
actionClass,
|
|
1126
|
+
mode: "escalate",
|
|
1127
|
+
source: "remembered",
|
|
1128
|
+
requestId: meta.requestId,
|
|
1129
|
+
decision: approved ? "approved" : "denied",
|
|
1130
|
+
reason: reason2
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
if (approved) {
|
|
1134
|
+
void registry.resumeParkedCalls({
|
|
1135
|
+
actionClass,
|
|
1136
|
+
requestId: meta.requestId,
|
|
1137
|
+
requestedBy: "escalation:remembered"
|
|
1138
|
+
});
|
|
1139
|
+
} else {
|
|
1140
|
+
registry.cancelParkedCall(meta.requestId, reason2);
|
|
1141
|
+
}
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1096
1144
|
if (activeEscalation !== null) return;
|
|
1097
1145
|
const requestId = meta.requestId;
|
|
1098
1146
|
const timer = setTimeout(() => resolveEscalation(requestId, "deny", "timeout"), escalationConfig.timeoutMs);
|
|
1099
|
-
activeEscalation = { requestId, tool: call.tool, actionClass, timer };
|
|
1147
|
+
activeEscalation = { requestId, tool: call.tool, actionClass, callKey, timer };
|
|
1100
1148
|
const target = describeCallTarget(call.args).slice(0, 200);
|
|
1101
1149
|
emit({
|
|
1102
1150
|
type: "clio_permission_escalated",
|
|
@@ -1198,6 +1246,7 @@ function startWorkerRun(input, emit) {
|
|
|
1198
1246
|
}
|
|
1199
1247
|
|
|
1200
1248
|
// src/worker/control-lane.ts
|
|
1249
|
+
init_esm_shims();
|
|
1201
1250
|
function emitControlFrame(frame) {
|
|
1202
1251
|
try {
|
|
1203
1252
|
process.stderr.write(encodeControlFrame(frame));
|
|
@@ -1206,6 +1255,7 @@ function emitControlFrame(frame) {
|
|
|
1206
1255
|
}
|
|
1207
1256
|
|
|
1208
1257
|
// src/worker/event-projection.ts
|
|
1258
|
+
init_esm_shims();
|
|
1209
1259
|
function isRecord(value) {
|
|
1210
1260
|
return typeof value === "object" && value !== null;
|
|
1211
1261
|
}
|
|
@@ -1218,14 +1268,16 @@ function projectWorkerEventForStdout(event) {
|
|
|
1218
1268
|
}
|
|
1219
1269
|
|
|
1220
1270
|
// src/worker/heartbeat.ts
|
|
1271
|
+
init_esm_shims();
|
|
1221
1272
|
function startWorkerHeartbeat(intervalMs = 1e3) {
|
|
1222
|
-
emitControlFrame({ kind: "heartbeat"
|
|
1223
|
-
const id = setInterval(() => emitControlFrame({ kind: "heartbeat"
|
|
1273
|
+
emitControlFrame({ kind: "heartbeat" });
|
|
1274
|
+
const id = setInterval(() => emitControlFrame({ kind: "heartbeat" }), intervalMs);
|
|
1224
1275
|
id.unref?.();
|
|
1225
1276
|
return () => clearInterval(id);
|
|
1226
1277
|
}
|
|
1227
1278
|
|
|
1228
1279
|
// src/worker/ledger-mirror.ts
|
|
1280
|
+
init_esm_shims();
|
|
1229
1281
|
var WORKER_AGENT_LEDGER_POST_CAP = 20;
|
|
1230
1282
|
function createWorkerAgentLedgerMirror() {
|
|
1231
1283
|
const bySequence = /* @__PURE__ */ new Map();
|
|
@@ -1270,6 +1322,7 @@ function createWorkerAgentLedgerPort(deps) {
|
|
|
1270
1322
|
}
|
|
1271
1323
|
|
|
1272
1324
|
// src/worker/ndjson.ts
|
|
1325
|
+
init_esm_shims();
|
|
1273
1326
|
function emitEvent(event) {
|
|
1274
1327
|
try {
|
|
1275
1328
|
process.stdout.write(`${JSON.stringify(event)}
|
|
@@ -1299,6 +1352,7 @@ function drainStdout(timeoutMs = 2e3) {
|
|
|
1299
1352
|
}
|
|
1300
1353
|
|
|
1301
1354
|
// src/worker/resource-facts.ts
|
|
1355
|
+
init_esm_shims();
|
|
1302
1356
|
import { execFileSync } from "node:child_process";
|
|
1303
1357
|
import { cpus, freemem, hostname, totalmem } from "node:os";
|
|
1304
1358
|
var GPU_PROBE_TIMEOUT_MS = 1e3;
|
|
@@ -1343,6 +1397,7 @@ function observeHostIdentity() {
|
|
|
1343
1397
|
}
|
|
1344
1398
|
|
|
1345
1399
|
// src/worker/runtime-registry.ts
|
|
1400
|
+
init_esm_shims();
|
|
1346
1401
|
async function resolveWorkerRuntime(runtimeId) {
|
|
1347
1402
|
const registry = getRuntimeRegistry();
|
|
1348
1403
|
registerBuiltinRuntimes(registry);
|
|
@@ -1351,6 +1406,7 @@ async function resolveWorkerRuntime(runtimeId) {
|
|
|
1351
1406
|
}
|
|
1352
1407
|
|
|
1353
1408
|
// src/worker/stdin-demux.ts
|
|
1409
|
+
init_esm_shims();
|
|
1354
1410
|
function createOrderedSteerHandler(deliver, onAccepted, onRejected) {
|
|
1355
1411
|
let tail = Promise.resolve();
|
|
1356
1412
|
return (steer) => {
|
|
@@ -1569,6 +1625,7 @@ function createWorkerStdinDemux() {
|
|
|
1569
1625
|
}
|
|
1570
1626
|
|
|
1571
1627
|
// src/worker/entry.ts
|
|
1628
|
+
process.title = "clio-coder-worker";
|
|
1572
1629
|
var CHANNEL_CLOSE_EXIT_GRACE_MS = 5e3;
|
|
1573
1630
|
function configuredNodeLabels() {
|
|
1574
1631
|
return (process.env.CLIO_CODER_WORKER_LABELS ?? "").split(",").map((label) => label.trim()).filter((label) => label.length > 0);
|
|
@@ -1619,6 +1676,7 @@ async function main() {
|
|
|
1619
1676
|
process.stdin.on("error", () => demux.eof());
|
|
1620
1677
|
process.stdin.resume();
|
|
1621
1678
|
const spec = await demux.readSpec();
|
|
1679
|
+
process.title = `clio-coder-worker:${spec.agentId}`;
|
|
1622
1680
|
setProtectedModelsProvider(() => spec.protectedModels ?? []);
|
|
1623
1681
|
const stopHeartbeat = startWorkerHeartbeat();
|
|
1624
1682
|
const runtime = await resolveWorkerRuntime(spec.runtimeId);
|
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.1` 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`.
|
|
@@ -23,10 +23,11 @@ current source, tests, and `CHANGELOG.md`.
|
|
|
23
23
|
| Source layout, compile-time boundaries, domain loading, and runtime data flow | [architecture.md](architecture.md) ([Interactive Blueprint](html/architecture_blueprint.html)) |
|
|
24
24
|
| Why the dispatch domain is not split, which invariants cross the obvious seams, and why direct subpath imports are permitted | [dispatch-architecture-rationale.md](dispatch-architecture-rationale.md) |
|
|
25
25
|
| Prompt envelope reuse, provider tool delivery, and bounded tool results | [prompt-envelope-and-tools.md](prompt-envelope-and-tools.md) ([Interactive Blueprint](html/tools_blueprint.html)) |
|
|
26
|
-
| In-depth reference for all
|
|
26
|
+
| In-depth reference for all 20 worker tools: parameters, typical payloads, and error examples | [tool-usage.md](tool-usage.md) ([Interactive Blueprint](html/tool_usage_blueprint.html)) |
|
|
27
27
|
| Developer guide to implementing custom model runtimes and inference server integrations | [provider-adapter-cookbook.md](provider-adapter-cookbook.md) ([Interactive Blueprint](html/provider_adapter_blueprint.html)) |
|
|
28
28
|
| Built-in agent recipes, discovery roots, frontmatter schema, and dispatch admission | [built-in-agents.md](built-in-agents.md) ([Interactive Blueprint](html/agents_blueprint.html)) |
|
|
29
29
|
| Artifact browsing, receipt verification, dispatch diagnostics, and observability routing | [observability.md](observability.md) ([Interactive Blueprint](html/observability_blueprint.html)) |
|
|
30
|
+
| Where every generated file lands: the working tree, `.clio-coder/`, and the XDG dirs, by audience | [artifact-placement.md](artifact-placement.md) |
|
|
30
31
|
| Evidence directory structures, findings, and operator-approved memory retrieval | [evidence-and-memory.md](evidence-and-memory.md) ([Interactive Blueprint](html/memory_blueprint.html)) |
|
|
31
32
|
| Local YAML eval suites, reports, comparisons, and command evidence | [eval-runner.md](eval-runner.md) ([Interactive Blueprint](html/eval_blueprint.html)) |
|
|
32
33
|
| Prompt and skill resources, extension manifests, and portable share archives | [extensions-and-sharing.md](extensions-and-sharing.md) ([Interactive Blueprint](html/extensions_blueprint.html)) |
|
|
@@ -46,12 +47,14 @@ current source, tests, and `CHANGELOG.md`.
|
|
|
46
47
|
| Version registry and migration policies for all 9 serialized artifact schemas | [artifact-versions.md](artifact-versions.md) |
|
|
47
48
|
| Process exit code taxonomy, `--help` standard, machine-readable JSON streaming, and headless output contracts | [exit-codes-and-output.md](exit-codes-and-output.md) |
|
|
48
49
|
| Actionable error remediation and diagnostics keyed by exact user-facing messages | [troubleshooting.md](troubleshooting.md) |
|
|
49
|
-
| Canonical definitions of
|
|
50
|
+
| Canonical definitions of 40 core architectural concepts mapped to `src/` types | [glossary.md](glossary.md) |
|
|
50
51
|
| Complete source-to-documentation mapping matrix and subsystem coverage status | [documentation-coverage.md](documentation-coverage.md) |
|
|
52
|
+
| Issue-driven development lifecycle: file-ticket through release, label taxonomy, and dogfooding setup | [development-pipeline.md](development-pipeline.md) |
|
|
51
53
|
| Proactive task memory architecture, session task bank, intervention rules, and handoff carrying | [proactive-memory.md](proactive-memory.md) ([Interactive Blueprint](html/memory_blueprint.html)) |
|
|
52
54
|
| 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)) |
|
|
53
55
|
| Private context index determinism, target smoke matrices, and Clio machinery soak benchmark suite | [evals-internal.md](evals-internal.md) ([Blueprints: evals_internal](html/evals_internal_blueprint.html), [soak](html/soak_blueprint.html)) |
|
|
54
56
|
| 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)) |
|
|
57
|
+
| Clock and timestamp conventions: durations, instants, ordering, and formatting | [time-conventions.md](time-conventions.md) |
|
|
55
58
|
|
|
56
59
|
Every project Clio works in gets its context from a checked-in `CLIO-CODER.md`,
|
|
57
60
|
bootstrapped and maintained by `clio-coder context init`. The root
|
|
@@ -74,12 +77,12 @@ under `src/`, run `npm run build` again or keep `npm run dev` running.
|
|
|
74
77
|
## Release Notes
|
|
75
78
|
|
|
76
79
|
The release entry point is [../README.md](../README.md); detailed release
|
|
77
|
-
history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.
|
|
78
|
-
install
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
history lives in [../CHANGELOG.md](../CHANGELOG.md). For v0.3.1 the supported
|
|
81
|
+
install paths are `npm install -g @iowarp/clio-coder` and a source checkout
|
|
82
|
+
through `npm run install:local`, the deterministic release gate is
|
|
83
|
+
`npm run ci:release`, and live model smoke validation is local/manual and
|
|
84
|
+
opt-in through `npm run test:live` (add `-- --delegation` for
|
|
85
|
+
opencode/copilot checks).
|
|
83
86
|
|
|
84
87
|
## Writing Documentation
|
|
85
88
|
|
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.1`.
|
|
4
4
|
|
|
5
5
|
Source implementations: `src/engine/acp/` and `src/cli/acp.ts`.
|
|
6
6
|
|
|
@@ -30,8 +30,8 @@ The server is invoked via:
|
|
|
30
30
|
clio-coder acp [--cwd PATH] [--permission-timeout MS]
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
- `--cwd PATH`:
|
|
34
|
-
- `--permission-timeout MS`:
|
|
33
|
+
- `--cwd PATH`: Workspace root the server boots in. Clio changes into the directory before it reads settings, builds project context, or opens a session ledger, so a session opens at that root. A path the process cannot enter exits 2 without starting the server.
|
|
34
|
+
- `--permission-timeout MS`: How long a mediated permission request may wait for the client before it is denied, as a positive whole number of milliseconds. It overrides `delegation.defaults.permissionTimeoutMs` for this server only, which itself defaults to `DEFAULT_DELEGATION_PERMISSION_TIMEOUT_MS = 120000` (`src/core/defaults.ts:143`).
|
|
35
35
|
|
|
36
36
|
Transport frames are JSON-RPC 2.0 messages serialized over `stdin`/`stdout`. All logging and diagnostic output is strictly routed to `stderr` to preserve standard I/O framing integrity.
|
|
37
37
|
|
|
@@ -85,12 +85,35 @@ Under `clio-policy` governance:
|
|
|
85
85
|
The ACP boundary enforces strict isolation rules:
|
|
86
86
|
|
|
87
87
|
1. **Autonomy Snapshotting**: The autonomy level is snapshotted at `session/new`. A subsequent configuration change on the host does not alter an active remote session's security policy.
|
|
88
|
-
2. **Metadata Namespacing**: Clio-specific extensions travel exclusively within namespaced metadata fields (`ACP_USAGE_META_KEY = "clio
|
|
88
|
+
2. **Metadata Namespacing**: Clio-specific extensions travel exclusively within namespaced metadata fields (`ACP_USAGE_META_KEY = "clio-coder/usage"`, `ACP_SESSION_META_KEY = "clio-coder/session"` in `src/engine/acp/types.ts:8-9`). Strict clients (e.g. Zed Serde deserializers) never encounter unmapped top-level keys.
|
|
89
89
|
3. **No External Outcome Overrides**: External ACP processes cannot self-assert terminal outcome codes (e.g. `worker_final_output_missing` is enforced at Clio's trusted finalization seam).
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
## 6.
|
|
93
|
+
## 6. Delegation Peers in the Transcript
|
|
94
|
+
|
|
95
|
+
The sections above describe Clio as an ACP server. In the other direction, Clio
|
|
96
|
+
is an ACP client: `/delegate <agent-id> <task>` and any dispatch to an agent id
|
|
97
|
+
configured under `delegation.agents` run the task on an external peer such as
|
|
98
|
+
`codex` or `opencode`.
|
|
99
|
+
|
|
100
|
+
A delegated peer is a worker like any other on screen. The adapter maps the
|
|
101
|
+
peer's `text_delta` and `message_end` notifications onto the same dispatch event
|
|
102
|
+
stream a local Clio worker publishes, so the peer's answer renders in the chat
|
|
103
|
+
transcript as the same attributed block, with the same fold behavior, the same
|
|
104
|
+
`--share` and `/share` path into the main agent's context, and the same replay
|
|
105
|
+
from a sealed receipt. There is no ACP-specific UI path.
|
|
106
|
+
|
|
107
|
+
The header is where the difference shows. A local Clio worker names the target
|
|
108
|
+
and model it ran on; a peer runs behind someone else's process and can honestly
|
|
109
|
+
name only the protocol it was reached through, so its header reads `◇ codex
|
|
110
|
+
(acp) · run 7hq2ab`. Its footer reports elapsed and, when the peer reports no
|
|
111
|
+
token usage, the count of mediated tool calls in place of a token count; a peer
|
|
112
|
+
that does report usage gets the same `tok` unit a local worker does.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 7. Error Taxonomy
|
|
94
117
|
|
|
95
118
|
The ACP subsystem defines four typed error classes (`src/engine/acp/errors.ts`):
|
|
96
119
|
|
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.1).
|
|
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.1).
|
|
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.1` development line.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -37,6 +37,7 @@ Registered domain modules include:
|
|
|
37
37
|
| evidence | `src/domains/evidence/**` | Forensic evidence bundles, failure attribution. |
|
|
38
38
|
| evolution | `src/domains/evolution/**` | Authority-tiered self-edit manifests and gates. |
|
|
39
39
|
| extensions | `src/domains/extensions/**` | Extension discovery, packaging, and lifecycle. |
|
|
40
|
+
| interop | `src/domains/interop/**` | The agent-kind registry, bounded detection of other coding agents, and consent to wire one as a delegation peer. |
|
|
40
41
|
| lifecycle | `src/domains/lifecycle/**` | Doctor diagnostics, upgrade mechanics, uninstallation. |
|
|
41
42
|
| memory | `src/domains/memory/**` | Approved long-term memory, proactive task intervention. |
|
|
42
43
|
| middleware | `src/domains/middleware/**` | Declarative and programmatic lifecycle hooks and budgets. |
|
|
@@ -49,6 +50,26 @@ Registered domain modules include:
|
|
|
49
50
|
| session | `src/domains/session/**` | Append-only JSONL transcripts, tree navigation, compaction. |
|
|
50
51
|
| share | `src/domains/share/**` | Portable workspace and resource archive export/import. |
|
|
51
52
|
|
|
53
|
+
The `interop` domain owns one question: which other coding agents are on this
|
|
54
|
+
machine and in this project. `src/domains/interop/registry.ts` is pure data, one
|
|
55
|
+
entry per known agent carrying its binaries, the directories it owns, its skill
|
|
56
|
+
and prompt roots, its instruction filenames, and the ACP launch recipe when it
|
|
57
|
+
has one. Every other module that used to keep its own copy of that list now
|
|
58
|
+
derives it: the skills loader and the prompts loader take their compatibility
|
|
59
|
+
roots from the table, the adoption scanner takes its candidate files from it,
|
|
60
|
+
and the safety path policy takes the foreign directories it refuses to write
|
|
61
|
+
into from it.
|
|
62
|
+
|
|
63
|
+
The domain owns detection and consent, and nothing else. It never executes a
|
|
64
|
+
foreign agent's work command, never loads a skill, prompt, or rule itself, and
|
|
65
|
+
never reads under a foreign agent's `sessions`, `history`, `cache`, `projects`,
|
|
66
|
+
or `state` directory. Detection resolves binaries with `access(X_OK)` and no
|
|
67
|
+
shell, checks install directories, and runs a bounded `--version` only when the
|
|
68
|
+
caller asks and only for a binary that already resolved; a probe that cannot
|
|
69
|
+
answer reports `unknown` and never `absent`. The one durable configuration write
|
|
70
|
+
is an append to `delegation.agents`, and it happens only after an operator
|
|
71
|
+
decision.
|
|
72
|
+
|
|
52
73
|
---
|
|
53
74
|
|
|
54
75
|
## Session Routing vs. Persisted Settings
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Artifact Placement
|
|
2
|
+
|
|
3
|
+
Every file Clio generates has one home, decided by who reads it. The rule that
|
|
4
|
+
follows from that: **the repo working tree holds files a human asked for.**
|
|
5
|
+
Anything Clio produced on its own initiative lands in the gitignored project
|
|
6
|
+
directory or under the XDG dirs, never beside your source.
|
|
7
|
+
|
|
8
|
+
This page is the contract. `src/core/artifact-paths.ts` is the code that
|
|
9
|
+
implements the part of it the `artifact` tool owns.
|
|
10
|
+
|
|
11
|
+
## Three audiences
|
|
12
|
+
|
|
13
|
+
| Audience | What it means | Where it goes |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Human deliverable | A file the user asked to keep, and will read and commit | Repo working tree, at the path the user named |
|
|
16
|
+
| Human transient | Something a human may want to read once; losing it costs nothing | Project-local `.clio-coder/` (gitignored) |
|
|
17
|
+
| Agent-to-agent state | Machine-read plumbing between turns, workers, and sessions | `.clio-coder/` for per-project state; XDG data/state/cache for per-machine state |
|
|
18
|
+
|
|
19
|
+
A class is human-facing only if a person is expected to open it. A plan an
|
|
20
|
+
agent wrote for its own next step is agent-to-agent state even though it is
|
|
21
|
+
Markdown.
|
|
22
|
+
|
|
23
|
+
## Placement by class
|
|
24
|
+
|
|
25
|
+
| Class | Location | Audience |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `artifact` tool plan / review / report | `.clio-coder/artifacts/PLAN.md`, `REVIEW.md`, `REPORT.md` | Human transient |
|
|
28
|
+
| Any artifact the user named a path for | that path, inside the workspace | Human deliverable |
|
|
29
|
+
| RCA write-ups for shipped fixes | the GitHub issue's closing comment, never a committed file | Human deliverable |
|
|
30
|
+
| Codewiki index | `.clio-coder/codewiki.json` | Agent-to-agent |
|
|
31
|
+
| Markdown wiki | `.clio-coder/wiki/` | Human transient |
|
|
32
|
+
| Session context state | `.clio-coder/state.json` | Agent-to-agent |
|
|
33
|
+
| Task-memory handoffs | `.clio-coder/handoffs/` | Agent-to-agent |
|
|
34
|
+
| Dispatch proposals | `.clio-coder/proposals/` | Agent-to-agent |
|
|
35
|
+
| Compete worktrees | `.clio-coder/worktrees/` | Agent-to-agent |
|
|
36
|
+
| Test scratch | `.clio-coder/test-scratch/` | Agent-to-agent |
|
|
37
|
+
| Evidence bundles | XDG data `evidence/` | Human transient (`clio-coder evidence`) |
|
|
38
|
+
| Approved memory | XDG data `memory/` | Human transient (`clio-coder memory`) |
|
|
39
|
+
| Eval artifacts | XDG data `evals/` | Human transient (`clio-coder eval`) |
|
|
40
|
+
| Session ledgers | XDG state `sessions/` | Agent-to-agent |
|
|
41
|
+
| Dispatch receipts | XDG state `receipts/` | Human transient (`clio-coder trace`) |
|
|
42
|
+
| Audit records | XDG state `audit/` | Human transient |
|
|
43
|
+
| Interview transcripts | XDG state `interviews/` | Agent-to-agent |
|
|
44
|
+
| Harness scratch | XDG state `scratch/` | Agent-to-agent |
|
|
45
|
+
| Caches | XDG cache | Agent-to-agent |
|
|
46
|
+
|
|
47
|
+
`clio-coder paths` prints the resolved XDG directories for your machine.
|
|
48
|
+
|
|
49
|
+
## The `artifact` tool default
|
|
50
|
+
|
|
51
|
+
`artifact(kind: plan|review|report)` without a `path` writes to
|
|
52
|
+
`.clio-coder/artifacts/` under the workspace root. Passing `path` writes exactly
|
|
53
|
+
there instead, working tree included, because a path the user named is a file
|
|
54
|
+
the user asked for. A path that escapes the workspace is refused.
|
|
55
|
+
|
|
56
|
+
The default is a pure function of `kind`, and has to stay that way. The action
|
|
57
|
+
classifier, the policy engine's write-root check, and the protected-artifacts
|
|
58
|
+
guard all predict where a pathless call will write, from its arguments alone,
|
|
59
|
+
before the tool runs. A default keyed on a session id or a timestamp would make
|
|
60
|
+
that prediction impossible and leave the safety layer guarding a path nobody
|
|
61
|
+
writes. The consequence is one file per kind: a second report overwrites the
|
|
62
|
+
first. Keep several by naming explicit paths.
|
|
63
|
+
|
|
64
|
+
## `.clio-coder/` and git
|
|
65
|
+
|
|
66
|
+
`.clio-coder/` is gitignored in full. Everything above that lands there is
|
|
67
|
+
generated, reproducible, and worthless in a diff, and the whole point of the
|
|
68
|
+
contract is that a dogfooding session ends with `git status` clean.
|
|
69
|
+
|
|
70
|
+
Some `.clio-coder/` content is authored rather than generated, and a project
|
|
71
|
+
that wants it reviewed and shared commits it deliberately by adding negations
|
|
72
|
+
next to the ignore:
|
|
73
|
+
|
|
74
|
+
```gitignore
|
|
75
|
+
.clio-coder/
|
|
76
|
+
!.clio-coder/fleets/ # fleet contracts: repo-owned dispatch policy
|
|
77
|
+
!.clio-coder/fleets/**
|
|
78
|
+
!.clio-coder/rules/ # path-scoped project rules
|
|
79
|
+
!.clio-coder/rules/**
|
|
80
|
+
!.clio-coder/safety.yaml # project safety policy
|
|
81
|
+
!.clio-coder/agents/ # project agent recipes
|
|
82
|
+
!.clio-coder/agents/**
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This repository commits none of those, so its `.clio-coder/` stays fully
|
|
86
|
+
ignored except the seeded soak fixtures under `benchmarks/soak/fixtures/`,
|
|
87
|
+
which are test inputs rather than session output.
|
|
88
|
+
|
|
89
|
+
## Finding what was hidden
|
|
90
|
+
|
|
91
|
+
Hiding transient output from the working tree must not mean losing it.
|
|
92
|
+
|
|
93
|
+
- `.clio-coder/artifacts/` is a plain directory; open it.
|
|
94
|
+
- `clio-coder evidence` lists and inspects evidence bundles.
|
|
95
|
+
- `clio-coder trace` queries the dispatch trace mirror and its receipts.
|
|
96
|
+
- `clio-coder memory` lists proposed and approved memory.
|
|
97
|
+
- `clio-coder paths` locates every XDG root.
|
|
98
|
+
|
|
99
|
+
Related: [evidence-and-memory.md](evidence-and-memory.md),
|
|
100
|
+
[trace-store.md](trace-store.md), [observability.md](observability.md),
|
|
101
|
+
[development-pipeline.md](development-pipeline.md) for where RCAs are committed.
|
|
@@ -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.1`.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|