@iowarp/clio-coder 0.3.8 → 0.3.9
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 +49 -0
- package/README.md +7 -3
- package/dist/{acp-U67UHUK2.js → acp-7LOELQFP.js} +6 -6
- package/dist/{agents-YU6SGALZ.js → agents-FIBG2SHA.js} +27 -25
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-5ZPJOIVG.js → auth-OI4LIH2I.js} +11 -12
- package/dist/{builtins-C6JMZVV6.js → builtins-AD25UL3C.js} +5 -5
- package/dist/{chunk-5FR74PWO.js → chunk-2JDWVJND.js} +2 -2
- package/dist/chunk-3DPEIQKN.js +113 -0
- package/dist/{chunk-4SPRNWDE.js → chunk-3DUR4WUA.js} +15 -15
- package/dist/{chunk-VHN4MY6O.js → chunk-3MRC2YSQ.js} +2 -2
- package/dist/{chunk-5DHKRSMQ.js → chunk-3UUY7R3Z.js} +11 -7
- package/dist/{chunk-IGWKHNIQ.js → chunk-3V5AYSEQ.js} +8 -8
- package/dist/{chunk-FHJEP5SW.js → chunk-465CC7FK.js} +8 -5
- package/dist/{chunk-5WIGXA4T.js → chunk-47CMYGET.js} +111 -4
- package/dist/{chunk-A3WNZD3P.js → chunk-4H6ULJ3H.js} +67 -21
- package/dist/{chunk-TB5666IT.js → chunk-4LJX2PUC.js} +3 -3
- package/dist/{chunk-XWSF374K.js → chunk-56KB5IJP.js} +2 -2
- package/dist/{chunk-SPULKLCF.js → chunk-5DQRIYDZ.js} +2 -2
- package/dist/{chunk-2HEJ2F35.js → chunk-5HFBWUMU.js} +20 -8
- package/dist/{chunk-WNIJTQQK.js → chunk-5PVQ4SRS.js} +78 -6
- package/dist/{chunk-DYIM5TJT.js → chunk-5QKCQQ3E.js} +262 -6
- package/dist/{chunk-TYPGUK6W.js → chunk-5T7RBWN2.js} +111 -5
- package/dist/{chunk-IIZWH4XA.js → chunk-774ILSRL.js} +2 -2
- package/dist/chunk-7C6RYZGQ.js +391 -0
- package/dist/{chunk-TANS5ZJS.js → chunk-AD7Y7STJ.js} +3 -3
- package/dist/{chunk-RWSI4YD7.js → chunk-AEYBF3TB.js} +33 -12
- package/dist/{chunk-DGSYXYMX.js → chunk-AMKHQW3C.js} +2 -2
- package/dist/{chunk-VWZOAB7K.js → chunk-B5XRQOLB.js} +7 -7
- package/dist/{chunk-WXY7KU3G.js → chunk-BVDVID7E.js} +2 -2
- package/dist/{chunk-PMDBGQSJ.js → chunk-CA42X6KT.js} +2 -2
- package/dist/{chunk-HLE42MG7.js → chunk-D73KXYPF.js} +3 -3
- package/dist/{chunk-5Q2VVUKB.js → chunk-DG4M6ZUE.js} +3 -3
- package/dist/{chunk-ME6CCNFO.js → chunk-EBOC7MT3.js} +6 -6
- package/dist/{chunk-MXKJU4JB.js → chunk-ECUO3KDP.js} +48 -7
- package/dist/{chunk-26LEYJZH.js → chunk-FALJGAWU.js} +2 -2
- package/dist/{chunk-GWS3VEIW.js → chunk-FWDFM5ZU.js} +24 -3
- package/dist/{chunk-7RGZWPB6.js → chunk-GAYUJ7LE.js} +67 -13
- package/dist/{chunk-VCBR6CU7.js → chunk-HAY4ZE2P.js} +2 -2
- package/dist/{chunk-FBVTI2TJ.js → chunk-HCBCAYZU.js} +11 -130
- package/dist/{chunk-WSB3FPX7.js → chunk-HJB5IUKP.js} +32 -136
- package/dist/{chunk-J3YUBZWY.js → chunk-HKO36JWF.js} +33 -5
- package/dist/{chunk-E77JEWSD.js → chunk-HPCTNZM2.js} +6 -36
- package/dist/{chunk-FJ3H4MN5.js → chunk-IHKBWSXF.js} +2 -2
- package/dist/{chunk-NMPKI6XL.js → chunk-JEQQR47K.js} +37 -18
- package/dist/{chunk-3BINW3FP.js → chunk-KV2AOLDF.js} +24 -4
- package/dist/{chunk-YS5VLNH5.js → chunk-LXPJXFM5.js} +7 -7
- package/dist/{chunk-7RFXX52T.js → chunk-MIX5N5AC.js} +271 -41
- package/dist/{chunk-K4XHGFR5.js → chunk-MLOK6ZOS.js} +1297 -218
- package/dist/{chunk-ZNLWCMVZ.js → chunk-MV2VUEJC.js} +2 -2
- package/dist/{chunk-MVVUPGPW.js → chunk-MXHC5QYU.js} +6 -6
- package/dist/{chunk-5H3GB5BO.js → chunk-N3PBVRTZ.js} +4 -382
- package/dist/{chunk-2HFZQUHL.js → chunk-N5XKWMDW.js} +17 -7
- package/dist/{chunk-5C3AQNDW.js → chunk-NNNWO6F2.js} +124 -36
- package/dist/{chunk-GU2UIAFZ.js → chunk-NQ6UCCOD.js} +3 -3
- package/dist/{chunk-N22QMJKY.js → chunk-NZU6YDNV.js} +4 -4
- package/dist/{chunk-ZVJ5BLO2.js → chunk-O6I4CIEU.js} +151 -13
- package/dist/{chunk-XN3L4EYL.js → chunk-OEDBCISO.js} +2 -2
- package/dist/{chunk-VAWNZU7Z.js → chunk-P3JGPQFL.js} +2 -2
- package/dist/{chunk-IJ7RPIYJ.js → chunk-PNY46YEY.js} +20 -3
- package/dist/{chunk-U6MBIEMB.js → chunk-PZ4I4JE2.js} +56 -35
- package/dist/{chunk-GPIEI3LY.js → chunk-QQ7EKM72.js} +2 -2
- package/dist/{chunk-WLFILSD5.js → chunk-R7LNVMCS.js} +66 -28
- package/dist/{chunk-GOXNB3AO.js → chunk-RAPCMZL4.js} +75 -4
- package/dist/chunk-RKKLTLYB.js +45 -0
- package/dist/{chunk-TT36MB5S.js → chunk-RKRLDWD3.js} +3 -1
- package/dist/{chunk-TTHACPOM.js → chunk-S4COXYBG.js} +456 -18
- package/dist/{chunk-WWCZ5F23.js → chunk-T3Z6VAAF.js} +69 -10
- package/dist/{chunk-GN57SG4G.js → chunk-TD7UE2L5.js} +9 -7
- package/dist/{chunk-TLQJPP24.js → chunk-TEO2TLVN.js} +523 -322
- package/dist/{chunk-FCSXB6T2.js → chunk-UOSL25KY.js} +14 -2
- package/dist/{chunk-KTYTFRMB.js → chunk-VKBMFOYV.js} +17 -15
- package/dist/{chunk-PT7HYKEM.js → chunk-VO2LKSTM.js} +2 -2
- package/dist/{chunk-P43ETTHK.js → chunk-VPTUJU4P.js} +2 -2
- package/dist/{chunk-WEH5XRJQ.js → chunk-WIE7ZOSW.js} +2 -2
- package/dist/{chunk-EMYUUSFG.js → chunk-WXCJ7VME.js} +5 -5
- package/dist/{chunk-4DGYLA73.js → chunk-XDOQXGFO.js} +22 -7
- package/dist/{chunk-JOZYP4GM.js → chunk-YKOFT37S.js} +5 -5
- package/dist/chunk-YSEHGPCT.js +127 -0
- package/dist/{chunk-HFSBBKSQ.js → chunk-YW7UVM5V.js} +138 -3
- package/dist/cli/index.js +27 -27
- package/dist/{clio-QVTYJ57A.js → clio-LT5V7SSZ.js} +6 -6
- package/dist/{code-nav-FGGFIE7L.js → code-nav-LMW275PA.js} +4 -4
- package/dist/{config-LW5IJFQN.js → config-RXS5T3JT.js} +71 -43
- package/dist/{configure-7XIZCOU4.js → configure-2WYWSCSD.js} +14 -15
- package/dist/{context-Y6Y7QPR6.js → context-I3BTOTCS.js} +12 -12
- package/dist/{context-L3WL3X7K.js → context-MVOORGMF.js} +34 -33
- package/dist/{context-N52ZA626.js → context-PALKKQYL.js} +20 -20
- package/dist/{context-clear-MBQRLSDQ.js → context-clear-N2WOYZ2K.js} +34 -33
- package/dist/{context-index-HVMFQHK3.js → context-index-HNG3MOME.js} +2 -2
- package/dist/{context-working-set-GS6DSO7F.js → context-working-set-MIEVECVZ.js} +10 -11
- package/dist/{dispatch-runner-22ZCNOM3.js → dispatch-runner-VVA4SRRH.js} +34 -33
- package/dist/doctor-TWBWFK5V.js +165 -0
- package/dist/{eval-BEC2WHDA.js → eval-IJ5VEZDJ.js} +2016 -142
- package/dist/{evidence-REJUMSKM.js → evidence-L5APPXNV.js} +29 -28
- package/dist/{evolve-PY5ZBA5K.js → evolve-RGNKFJ52.js} +29 -28
- package/dist/{extensions-HVKU65YU.js → extensions-7WYWUX5A.js} +9 -3
- package/dist/{fleet-7WZEWRFA.js → fleet-6CNVBZZP.js} +87 -55
- package/dist/{fleet-commands-UVHWM76J.js → fleet-commands-L2SXSYEI.js} +6 -6
- package/dist/{fleet-graph-6ULH7PES.js → fleet-graph-2J3OOIPO.js} +14 -12
- package/dist/{fleet-preflight-J53T6CCE.js → fleet-preflight-CZRJ4JP5.js} +3 -4
- package/dist/{fleet-validate-72PC4SLA.js → fleet-validate-C5RI6DP7.js} +16 -15
- package/dist/{init-OG3TPGQG.js → init-VBN2ACVA.js} +50 -48
- package/dist/{library-CNTMPLRF.js → library-JHGUMLY2.js} +13 -11
- package/dist/{memory-6IS7F275.js → memory-K4OQIYWG.js} +31 -30
- package/dist/{models-ENRJDA5W.js → models-2NCZUWDD.js} +23 -22
- package/dist/{monitor-XLDVO7TN.js → monitor-MMVTJABD.js} +35 -34
- package/dist/{orchestrator-6KSPYRHA.js → orchestrator-ZKBPCHW6.js} +1627 -294
- package/dist/{reset-RZ4ER727.js → reset-DD5JGOY3.js} +3 -3
- package/dist/{run-Y2CNK5RU.js → run-QEGNX7FL.js} +56 -55
- package/dist/{share-A55GYP6Z.js → share-JKD3BQMW.js} +13 -11
- package/dist/{skills-ALC5J6AT.js → skills-LMQIKDOZ.js} +14 -12
- package/dist/{skills-eval-JPBEBYQU.js → skills-eval-I7X2774U.js} +34 -32
- package/dist/{steer-GGWFUJUD.js → steer-CF5TDANS.js} +3 -3
- package/dist/{support-MIETYA5E.js → support-I7LOJLIF.js} +4 -4
- package/dist/{targets-VGNXIR3S.js → targets-RUSR6B5Z.js} +58 -32
- package/dist/{terminal-lease-WOBR64YA.js → terminal-lease-QYVORFR4.js} +6 -4
- package/dist/{trace-PNCASAXC.js → trace-ODOQIVIW.js} +61 -6
- package/dist/{upgrade-FUSUAGHR.js → upgrade-XANW3FXB.js} +17 -16
- package/dist/{usage-N4MKVHKD.js → usage-4H7ZRXQT.js} +88 -44
- package/dist/{verifiers-YAWOJ3H2.js → verifiers-UZXNBZEB.js} +6 -6
- package/dist/{verify-LTDHYBGY.js → verify-BVKWTNDL.js} +5 -5
- package/dist/{wiki-generate-6M7GHTBJ.js → wiki-generate-MY7WV2QI.js} +49 -47
- package/dist/worker/entry.js +29 -33
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/artifact-versions.md +6 -1
- package/docs/built-in-agents.md +1 -1
- package/docs/capacity-and-scheduling.md +23 -2
- package/docs/commands-and-modes.md +1 -1
- package/docs/configuration-and-targets.md +30 -3
- package/docs/context-engine.md +63 -4
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/eval-runner.md +262 -11
- package/docs/evals-internal.md +72 -2
- package/docs/evidence-and-memory.md +11 -10
- package/docs/evolution.md +1 -1
- package/docs/extensions-and-sharing.md +3 -1
- package/docs/fleet-dispatch.md +4 -4
- package/docs/installation-and-lifecycle.md +1 -1
- package/docs/middleware-and-components.md +1 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +53 -2
- package/docs/proactive-memory.md +127 -14
- package/docs/prompt-envelope-and-tools.md +19 -1
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +19 -3
- package/docs/safety-model.md +1 -1
- package/docs/scientific-validation.md +1 -1
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +1 -1
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +87 -0
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +1 -1
- package/package.json +2 -1
- package/src/cli/agents.ts +1 -1
- package/src/cli/config-inspect.ts +33 -6
- package/src/cli/config.ts +1 -1
- package/src/cli/doctor-state-size.ts +82 -0
- package/src/cli/doctor.ts +3 -1
- package/src/cli/eval.ts +80 -16
- package/src/cli/extensions.ts +5 -1
- package/src/cli/fleet.ts +32 -3
- package/src/cli/targets.ts +44 -13
- package/src/cli/trace.ts +63 -4
- package/src/cli/usage.ts +63 -14
- package/src/core/bus-events.ts +29 -1
- package/src/core/cache-telemetry.ts +42 -0
- package/src/core/config.ts +18 -0
- package/src/core/defaults.ts +36 -6
- package/src/core/endpoint-key.ts +27 -0
- package/src/core/residency-target-key.ts +25 -0
- package/src/core/response-schema.ts +36 -2
- package/src/domains/config/classify.ts +3 -0
- package/src/domains/context/codewiki/coordinator.ts +12 -4
- package/src/domains/dispatch/admission.ts +40 -3
- package/src/domains/dispatch/capacity-lease.ts +98 -9
- package/src/domains/dispatch/contract.ts +11 -0
- package/src/domains/dispatch/execution-plan.ts +44 -4
- package/src/domains/dispatch/extension.ts +166 -42
- package/src/domains/dispatch/fleet-run.ts +23 -3
- package/src/domains/dispatch/heartbeat.ts +32 -8
- package/src/domains/dispatch/index.ts +3 -0
- package/src/domains/dispatch/orphan-recovery.ts +5 -0
- package/src/domains/dispatch/reservation-store.ts +116 -8
- package/src/domains/dispatch/state.ts +4 -0
- package/src/domains/dispatch/worker-spawn.ts +25 -11
- package/src/domains/dispatch/write-boundary-enforcer.ts +20 -3
- package/src/domains/dispatch/write-boundary.ts +62 -1
- package/src/domains/eval/artifacts/store.ts +62 -0
- package/src/domains/eval/compare/behavioral.ts +224 -0
- package/src/domains/eval/compare/compare.ts +355 -2
- package/src/domains/eval/compare/envelope.ts +128 -0
- package/src/domains/eval/compare/gates.ts +24 -6
- package/src/domains/eval/compare/thresholds.ts +30 -3
- package/src/domains/eval/execution-provenance.ts +240 -0
- package/src/domains/eval/metrics/aggregate.ts +136 -0
- package/src/domains/eval/metrics/call-ledger-stream.ts +112 -0
- package/src/domains/eval/metrics/tracked.ts +413 -0
- package/src/domains/eval/provenance.ts +117 -0
- package/src/domains/eval/reports/comparison.ts +128 -0
- package/src/domains/eval/reports/junit.ts +17 -3
- package/src/domains/eval/reports/markdown.ts +3 -3
- package/src/domains/eval/reports/text.ts +14 -0
- package/src/domains/eval/run-compare.ts +20 -0
- package/src/domains/eval/runners/clio-run.ts +127 -0
- package/src/domains/eval/runners/external-command.ts +28 -3
- package/src/domains/eval/schema/adapter.ts +111 -0
- package/src/domains/eval/schema/artifact.ts +20 -0
- package/src/domains/eval/schema/behavioral-metrics.ts +204 -0
- package/src/domains/eval/schema/behavioral.ts +520 -0
- package/src/domains/eval/schema/execution-envelope.ts +194 -0
- package/src/domains/eval/schema/serving.ts +74 -0
- package/src/domains/eval/schema/suite.ts +38 -8
- package/src/domains/eval/schema/validate.ts +58 -3
- package/src/domains/eval/schema/verdict.ts +237 -0
- package/src/domains/eval/suites/resolve.ts +2 -0
- package/src/domains/eval/suites/run.ts +264 -33
- package/src/domains/eval/verifiers/command.ts +2 -1
- package/src/domains/eval/workspaces/temp-copy.ts +145 -13
- package/src/domains/evidence/build.ts +2 -13
- package/src/domains/evidence/eval.ts +2 -12
- package/src/domains/evidence/findings-markdown.ts +33 -0
- package/src/domains/evidence/run-trust.ts +7 -113
- package/src/domains/evidence/trust-projection.ts +2 -2
- package/src/domains/extensions/compatibility.ts +285 -0
- package/src/domains/extensions/discovery.ts +38 -3
- package/src/domains/extensions/resources.ts +1 -1
- package/src/domains/extensions/state.ts +12 -3
- package/src/domains/extensions/types.ts +2 -0
- package/src/domains/lifecycle/doctor.ts +69 -1
- package/src/domains/memory/index.ts +14 -0
- package/src/domains/memory/task-bank-promotion.ts +64 -0
- package/src/domains/memory/task-memory-policy.ts +77 -8
- package/src/domains/memory/task-memory-spend.ts +131 -0
- package/src/domains/memory/task-memory-status.ts +7 -0
- package/src/domains/memory/task-memory-telemetry.ts +2 -0
- package/src/domains/middleware/index.ts +1 -0
- package/src/domains/middleware/memory-intervention.ts +69 -5
- package/src/domains/middleware/memory-step-endpoint.ts +71 -0
- package/src/domains/observability/background-memory-usage.ts +140 -0
- package/src/domains/observability/cost.ts +1 -1
- package/src/domains/observability/index.ts +7 -0
- package/src/domains/observability/out-of-turn-usage.ts +51 -2
- package/src/domains/observability/trace-store.ts +192 -2
- package/src/domains/prompts/compiler.ts +100 -13
- package/src/domains/providers/endpoint-capacity.ts +96 -0
- package/src/domains/providers/index.ts +10 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +243 -1
- package/src/domains/providers/runtime-resolution.ts +8 -1
- package/src/domains/providers/runtimes/common/probe-helpers.ts +31 -9
- package/src/domains/providers/runtimes/local-native/llamacpp-anthropic.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-completion.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-embed.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp-rerank.ts +1 -1
- package/src/domains/providers/runtimes/local-native/llamacpp.ts +4 -1
- package/src/domains/providers/runtimes/local-native/lmstudio.ts +4 -1
- package/src/domains/providers/runtimes/local-native/ollama-native.ts +6 -1
- package/src/domains/providers/types/capability-flags.ts +2 -0
- package/src/domains/providers/types/target-descriptor.ts +2 -0
- package/src/domains/resources/prompts/loader.ts +95 -33
- package/src/domains/safety/call-target.ts +52 -0
- package/src/domains/safety/run-effects.ts +35 -4
- package/src/domains/session/context-accounting.ts +52 -1
- package/src/domains/session/context-ledger.ts +37 -13
- package/src/domains/session/index.ts +6 -0
- package/src/domains/session/prompt-cache.ts +140 -0
- package/src/domains/session/prompt-manifest.ts +42 -0
- package/src/engine/acp/adapter.ts +18 -3
- package/src/engine/ai.ts +35 -0
- package/src/engine/apis/llamacpp-residency.ts +55 -3
- package/src/engine/apis/lmstudio.ts +25 -5
- package/src/engine/apis/ollama-native.ts +2 -1
- package/src/engine/apis/openai-completions.ts +80 -17
- package/src/engine/apis/residency-lock.ts +3 -1
- package/src/engine/apis/residency.ts +34 -1
- package/src/engine/provider-payload.ts +29 -1
- package/src/entry/orchestrator.ts +176 -30
- package/src/interactive/chat-loop-messages.ts +26 -7
- package/src/interactive/chat-loop.ts +318 -41
- package/src/interactive/chat-panel.ts +62 -8
- package/src/interactive/clio-editor.ts +45 -8
- package/src/interactive/context-activity.ts +5 -1
- package/src/interactive/context-meter.ts +1 -1
- package/src/interactive/context-overlay.ts +40 -10
- package/src/interactive/cost-overlay.ts +64 -6
- package/src/interactive/dispatch-board.ts +84 -12
- package/src/interactive/fleet-run-preview.ts +41 -15
- package/src/interactive/handoff-round.ts +41 -2
- package/src/interactive/interactive-application.ts +24 -1
- package/src/interactive/interactive-input-runtime.ts +8 -0
- package/src/interactive/interactive-presentation.ts +4 -0
- package/src/interactive/interactive-shell.ts +20 -17
- package/src/interactive/interactive-slash-runtime.ts +27 -4
- package/src/interactive/memory-overlay.ts +8 -0
- package/src/interactive/mutation-preview.ts +295 -0
- package/src/interactive/overlay-general-openers.ts +16 -0
- package/src/interactive/overlay-key-routing.ts +38 -0
- package/src/interactive/overlay-lifecycle.ts +38 -5
- package/src/interactive/overlay-permission-lifecycle.ts +22 -2
- package/src/interactive/overlay-session-lifecycle.ts +73 -9
- package/src/interactive/overlays/ask-user.ts +91 -19
- package/src/interactive/overlays/help-reference.ts +4 -0
- package/src/interactive/overlays/prompts.ts +11 -1
- package/src/interactive/overlays/settings.ts +35 -1
- package/src/interactive/permission-hint.ts +34 -2
- package/src/interactive/permission-overlay.ts +159 -9
- package/src/interactive/prewarm.ts +197 -0
- package/src/interactive/render-trace.ts +162 -15
- package/src/interactive/renderers/tool-execution.ts +4 -0
- package/src/interactive/side-question.ts +58 -1
- package/src/interactive/status/controller.ts +11 -0
- package/src/interactive/status/state-machine.ts +54 -2
- package/src/interactive/status/types.ts +7 -0
- package/src/interactive/terminal-lease.ts +2 -0
- package/src/interactive/turn-context.ts +299 -31
- package/src/interactive/turn-persistence.ts +14 -4
- package/src/interactive/turn-prewarm.ts +364 -0
- package/src/interactive/turn-queues.ts +7 -4
- package/src/interactive/turn-runtime.ts +8 -1
- package/src/interactive/turn-state.ts +23 -0
- package/src/interactive/view/view-overlay.ts +28 -3
- package/src/tools/ask-user.ts +43 -2
- package/src/tools/dispatch-plan.ts +17 -9
- package/src/tools/dispatch-scout.ts +1 -1
- package/src/tools/registry.ts +16 -0
- package/dist/chunk-AOCYTWAV.js +0 -449
- package/dist/chunk-HWUFFB6L.js +0 -83
- package/dist/chunk-R346GLFC.js +0 -31
- package/dist/doctor-M7YEDGAE.js +0 -91
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
discoverAgentRecipes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HCBCAYZU.js";
|
|
5
5
|
import {
|
|
6
6
|
compileFleetExecutionPlan
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HKO36JWF.js";
|
|
8
8
|
import {
|
|
9
9
|
loadFleetCommands,
|
|
10
10
|
loadFleetContract,
|
|
11
11
|
renderFleetPrompt
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HPCTNZM2.js";
|
|
13
13
|
import {
|
|
14
14
|
requestExecutionRole,
|
|
15
15
|
withAttemptRole
|
|
16
16
|
} from "./chunk-H7IXIC72.js";
|
|
17
17
|
import {
|
|
18
18
|
normalizeAgentSpec
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-S4COXYBG.js";
|
|
20
20
|
import {
|
|
21
21
|
readSettings
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PNY46YEY.js";
|
|
23
23
|
import {
|
|
24
24
|
init_esm_shims
|
|
25
25
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -105,4 +105,4 @@ function inspectFleet(name, vars) {
|
|
|
105
105
|
export {
|
|
106
106
|
inspectFleet
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-EBOC7MT3.js.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
normalizeWriteBoundary,
|
|
5
5
|
normalizeWriteBoundaryEntry,
|
|
6
6
|
writeBoundaryCovers
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HPCTNZM2.js";
|
|
8
8
|
import {
|
|
9
9
|
asDirectoryPathBoundary,
|
|
10
10
|
pathBoundaryEntryCovers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-S4COXYBG.js";
|
|
12
12
|
import {
|
|
13
13
|
atomicWrite
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KV2AOLDF.js";
|
|
15
15
|
import {
|
|
16
16
|
clioStateDir
|
|
17
17
|
} from "./chunk-BNAZZHFG.js";
|
|
@@ -839,6 +839,20 @@ function diffWorkspace(snapshot) {
|
|
|
839
839
|
}
|
|
840
840
|
return changes;
|
|
841
841
|
}
|
|
842
|
+
function describeWriteBoundaryAttributionDowngrade(downgrade) {
|
|
843
|
+
if (downgrade.reason === "opaque_tool_succeeded") {
|
|
844
|
+
const tool = downgrade.tool ?? "unknown";
|
|
845
|
+
const call = downgrade.toolCallId === null ? "" : ` (call ${downgrade.toolCallId})`;
|
|
846
|
+
return `a successful '${tool}' call${call} can write paths its arguments do not name`;
|
|
847
|
+
}
|
|
848
|
+
if (downgrade.reason === "incomplete_tool_telemetry") {
|
|
849
|
+
return downgrade.runId === null ? "tool telemetry was incomplete" : `run '${downgrade.runId}' reported incomplete tool telemetry`;
|
|
850
|
+
}
|
|
851
|
+
if (downgrade.reason === "code_step_untracked") {
|
|
852
|
+
return downgrade.stepId === null ? "a code step ran through the untracked command runner" : `code step '${downgrade.stepId}' ran through the untracked command runner`;
|
|
853
|
+
}
|
|
854
|
+
return downgrade.stepId === null ? "no usable write record was available" : `step '${downgrade.stepId}' supplied no usable write record`;
|
|
855
|
+
}
|
|
842
856
|
function canonicalVerdict(verdict) {
|
|
843
857
|
return JSON.stringify(verdict);
|
|
844
858
|
}
|
|
@@ -893,6 +907,15 @@ function enforceWriteBoundary(input) {
|
|
|
893
907
|
const changes = diffWorkspace(input.snapshot);
|
|
894
908
|
const outside = changes.filter((change) => !writeBoundaryCovers(allow, change.path));
|
|
895
909
|
const attributionComplete = input.attribution?.complete === true;
|
|
910
|
+
const attributionDowngrades = attributionComplete ? [] : input.attribution?.downgrades !== void 0 && input.attribution.downgrades.length > 0 ? input.attribution.downgrades.map((entry) => ({ ...entry })) : [
|
|
911
|
+
{
|
|
912
|
+
reason: "write_record_unavailable",
|
|
913
|
+
tool: null,
|
|
914
|
+
toolCallId: null,
|
|
915
|
+
runId: null,
|
|
916
|
+
stepId: input.stepIds.length === 1 ? input.stepIds[0] ?? null : null
|
|
917
|
+
}
|
|
918
|
+
];
|
|
896
919
|
const recorded = /* @__PURE__ */ new Set();
|
|
897
920
|
for (const target of input.attribution?.recorded ?? []) {
|
|
898
921
|
const relativeTarget = repoRelative(input.snapshot.root, target);
|
|
@@ -914,7 +937,7 @@ function enforceWriteBoundary(input) {
|
|
|
914
937
|
`Unauthorized paths: ${violations.map((change) => change.path).join(", ")}.`,
|
|
915
938
|
`Declared writes: ${describeWriteBoundary(allow)}.`,
|
|
916
939
|
status === "rolled-back" ? "Those paths were rolled back to the baseline commit." : `Rollback is incomplete; the working tree is left as the step made it. Unrestorable: ${unrecoverable.map((entry) => `${entry.path} (${entry.reason})`).join("; ")}.`,
|
|
917
|
-
attributionComplete ? "Each was blamed on this window because a run in it recorded writing that path." :
|
|
940
|
+
attributionComplete ? "Each was blamed on this window because a run in it recorded writing that path." : `Attribution was incomplete because ${attributionDowngrades.map(describeWriteBoundaryAttributionDowngrade).join("; ")}, so every change outside the declaration was blamed on this window.`,
|
|
918
941
|
"If the change was legitimate, widen the step's `writes:` declaration to cover it."
|
|
919
942
|
];
|
|
920
943
|
const concurrentDetail = unattributed.length === 0 ? [] : [
|
|
@@ -934,6 +957,7 @@ function enforceWriteBoundary(input) {
|
|
|
934
957
|
violations: violations.map((change) => change.path),
|
|
935
958
|
unattributed: unattributed.map((change) => change.path),
|
|
936
959
|
attributionComplete,
|
|
960
|
+
attributionDowngrades,
|
|
937
961
|
rolledBack,
|
|
938
962
|
unrecoverable,
|
|
939
963
|
status,
|
|
@@ -1024,16 +1048,32 @@ function createWriteBoundaryEnforcer(input) {
|
|
|
1024
1048
|
const recordedWritesFor = input.recordedWritesFor;
|
|
1025
1049
|
if (recordedWritesFor === void 0) return void 0;
|
|
1026
1050
|
const recorded = /* @__PURE__ */ new Set();
|
|
1051
|
+
const downgrades = [];
|
|
1027
1052
|
let complete = true;
|
|
1028
1053
|
for (const stepId of stepIds) {
|
|
1029
1054
|
const observed = recordedWritesFor(stepId);
|
|
1030
1055
|
if (observed === null) {
|
|
1031
1056
|
complete = false;
|
|
1057
|
+
downgrades.push({
|
|
1058
|
+
reason: "write_record_unavailable",
|
|
1059
|
+
tool: null,
|
|
1060
|
+
toolCallId: null,
|
|
1061
|
+
runId: null,
|
|
1062
|
+
stepId
|
|
1063
|
+
});
|
|
1032
1064
|
continue;
|
|
1033
1065
|
}
|
|
1034
|
-
|
|
1066
|
+
if (!("recorded" in observed)) {
|
|
1067
|
+
for (const target of observed) recorded.add(target);
|
|
1068
|
+
continue;
|
|
1069
|
+
}
|
|
1070
|
+
for (const target of observed.recorded) recorded.add(target);
|
|
1071
|
+
if (!observed.complete) complete = false;
|
|
1072
|
+
for (const downgrade of observed.downgrades ?? []) {
|
|
1073
|
+
downgrades.push({ ...downgrade, stepId: downgrade.stepId ?? stepId });
|
|
1074
|
+
}
|
|
1035
1075
|
}
|
|
1036
|
-
return { recorded: [...recorded].sort(), complete };
|
|
1076
|
+
return { recorded: [...recorded].sort(), complete, downgrades };
|
|
1037
1077
|
};
|
|
1038
1078
|
return {
|
|
1039
1079
|
begin(window, stepIds) {
|
|
@@ -1094,7 +1134,8 @@ export {
|
|
|
1094
1134
|
recoverCleanupReadyCompeteGroups,
|
|
1095
1135
|
WRITE_BOUNDARY_VIOLATION_REASON,
|
|
1096
1136
|
captureWorkspaceSnapshot,
|
|
1137
|
+
describeWriteBoundaryAttributionDowngrade,
|
|
1097
1138
|
preflightWriteBoundaries,
|
|
1098
1139
|
createWriteBoundaryEnforcer
|
|
1099
1140
|
};
|
|
1100
|
-
//# sourceMappingURL=chunk-
|
|
1141
|
+
//# sourceMappingURL=chunk-ECUO3KDP.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
settingsPath,
|
|
6
6
|
updateSavedSettingsDocument,
|
|
7
7
|
validateSettings
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PNY46YEY.js";
|
|
9
9
|
import {
|
|
10
10
|
require_dist
|
|
11
11
|
} from "./chunk-APJ265NV.js";
|
|
@@ -226,4 +226,4 @@ export {
|
|
|
226
226
|
updateLayeredSettings,
|
|
227
227
|
settingsSourceFor
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=chunk-
|
|
229
|
+
//# sourceMappingURL=chunk-FALJGAWU.js.map
|
|
@@ -150,10 +150,13 @@ function readOutOfTurnUsageRows(stateDir) {
|
|
|
150
150
|
function asOutOfTurnUsageRow(value) {
|
|
151
151
|
if (!isRecord(value)) return null;
|
|
152
152
|
const label = value.label;
|
|
153
|
-
if (label !== "side-question" && label !== "handoff"
|
|
153
|
+
if (label !== "side-question" && label !== "handoff" && label !== "prewarm" && label !== "background-memory")
|
|
154
|
+
return null;
|
|
154
155
|
if (typeof value.timestamp !== "string" || value.timestamp.length === 0) return null;
|
|
155
156
|
if (!isRecord(value.usage)) return null;
|
|
156
157
|
const usage = value.usage;
|
|
158
|
+
const timing = asTiming(value.timing);
|
|
159
|
+
const promptCache = asPromptCache(value.promptCache);
|
|
157
160
|
return {
|
|
158
161
|
label,
|
|
159
162
|
sessionId: typeof value.sessionId === "string" ? value.sessionId : null,
|
|
@@ -170,7 +173,25 @@ function asOutOfTurnUsageRow(value) {
|
|
|
170
173
|
totalTokens: numberOr0(usage.totalTokens),
|
|
171
174
|
costUsd: numberOr0(usage.costUsd),
|
|
172
175
|
costProvenance: asCostProvenance(usage.costProvenance)
|
|
173
|
-
}
|
|
176
|
+
},
|
|
177
|
+
...timing === null ? {} : { timing },
|
|
178
|
+
...promptCache === null ? {} : { promptCache }
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function asTiming(value) {
|
|
182
|
+
if (!isRecord(value)) return null;
|
|
183
|
+
const durationMs = numberOr0(value.durationMs);
|
|
184
|
+
return durationMs === 0 ? null : { durationMs };
|
|
185
|
+
}
|
|
186
|
+
function asPromptCache(value) {
|
|
187
|
+
if (!isRecord(value)) return null;
|
|
188
|
+
if (typeof value.source !== "string" || value.source.length === 0) return null;
|
|
189
|
+
return {
|
|
190
|
+
promptTokens: numberOr0(value.promptTokens),
|
|
191
|
+
cachedTokens: typeof value.cachedTokens === "number" ? value.cachedTokens : null,
|
|
192
|
+
uncachedPrefillTokens: typeof value.uncachedPrefillTokens === "number" ? value.uncachedPrefillTokens : null,
|
|
193
|
+
promptMs: numberOr0(value.promptMs),
|
|
194
|
+
source: value.source
|
|
174
195
|
};
|
|
175
196
|
}
|
|
176
197
|
function asCostProvenance(value) {
|
|
@@ -192,4 +213,4 @@ export {
|
|
|
192
213
|
appendOutOfTurnUsageRow,
|
|
193
214
|
readOutOfTurnUsageRows
|
|
194
215
|
};
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-FWDFM5ZU.js.map
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
TASK_MEMORY_POLICY_DEFAULT_TIMEOUT_MS,
|
|
8
8
|
runTaskMemoryPolicy,
|
|
9
9
|
taskMemoryBankDelta
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-O6I4CIEU.js";
|
|
11
11
|
import {
|
|
12
12
|
isTerminalRunEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4H6ULJ3H.js";
|
|
14
14
|
import {
|
|
15
15
|
taskBoardCounts
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2JDWVJND.js";
|
|
17
17
|
import {
|
|
18
18
|
SKILL_SUGGESTION_ANCHOR,
|
|
19
19
|
SKILL_SUGGESTION_PREFIX
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RAPCMZL4.js";
|
|
21
21
|
import {
|
|
22
22
|
legacyToolResultDigest,
|
|
23
23
|
sanitizeToolResultDigest
|
|
@@ -25,13 +25,19 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
ToolNames
|
|
27
27
|
} from "./chunk-CGKSTWHD.js";
|
|
28
|
+
import {
|
|
29
|
+
registerForegroundStream
|
|
30
|
+
} from "./chunk-MIX5N5AC.js";
|
|
28
31
|
import {
|
|
29
32
|
ceilChars
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AEYBF3TB.js";
|
|
31
34
|
import {
|
|
32
35
|
reportCommitAttributionDiagnostic,
|
|
33
36
|
withManagedGitCommitAttributionEnvironment
|
|
34
37
|
} from "./chunk-B5CSFE7B.js";
|
|
38
|
+
import {
|
|
39
|
+
BusChannels
|
|
40
|
+
} from "./chunk-RKRLDWD3.js";
|
|
35
41
|
import {
|
|
36
42
|
require_dist
|
|
37
43
|
} from "./chunk-APJ265NV.js";
|
|
@@ -1559,6 +1565,7 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1559
1565
|
reminder: null,
|
|
1560
1566
|
inputTokens: 0,
|
|
1561
1567
|
outputTokens: 0,
|
|
1568
|
+
usage: null,
|
|
1562
1569
|
effects: NO_EFFECTS
|
|
1563
1570
|
});
|
|
1564
1571
|
const live = settings();
|
|
@@ -1572,10 +1579,16 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1572
1579
|
let tier = "rules";
|
|
1573
1580
|
promptedStepTier = tier;
|
|
1574
1581
|
let promptedResult;
|
|
1582
|
+
let telemetryDecision = null;
|
|
1575
1583
|
try {
|
|
1576
1584
|
const client = deps.getModelClient?.() ?? null;
|
|
1577
1585
|
if (client === null) {
|
|
1578
1586
|
promptedResult = silent("no_client");
|
|
1587
|
+
} else if (deps.backgroundEndpointBusy?.() === true) {
|
|
1588
|
+
tier = "llm";
|
|
1589
|
+
promptedStepTier = tier;
|
|
1590
|
+
promptedResult = silent("endpoint_busy");
|
|
1591
|
+
telemetryDecision = "dropped";
|
|
1579
1592
|
} else {
|
|
1580
1593
|
tier = "llm";
|
|
1581
1594
|
promptedStepTier = tier;
|
|
@@ -1605,10 +1618,17 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1605
1618
|
});
|
|
1606
1619
|
}
|
|
1607
1620
|
lastDecision = promptedResult.decision;
|
|
1621
|
+
if (promptedResult.usage !== null) {
|
|
1622
|
+
try {
|
|
1623
|
+
deps.onStepUsage?.(promptedResult.usage);
|
|
1624
|
+
} catch {
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
if (promptedResult.decision === "injected") reportInjectedEntries(promptedResult.reminder);
|
|
1608
1628
|
emitTelemetry(
|
|
1609
1629
|
triggers,
|
|
1610
1630
|
tier,
|
|
1611
|
-
promptedResult.decision,
|
|
1631
|
+
telemetryDecision ?? promptedResult.decision,
|
|
1612
1632
|
promptedResult.reason,
|
|
1613
1633
|
citedEntryCount(promptedResult.reminder),
|
|
1614
1634
|
promptedResult.inputTokens,
|
|
@@ -1621,7 +1641,7 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1621
1641
|
effects: promptedResult.reminder === null ? NO_EFFECTS : [{ kind: "inject_reminder", message: promptedResult.reminder, severity: "advisory" }]
|
|
1622
1642
|
};
|
|
1623
1643
|
}
|
|
1624
|
-
function emitTelemetry(triggerReasons, tier, decision, reason,
|
|
1644
|
+
function emitTelemetry(triggerReasons, tier, decision, reason, citedEntries2, inputTokens, outputTokens, started, operations = { bankOperations: 0, droppedOperations: 0 }) {
|
|
1625
1645
|
const next = deps.bank.snapshot();
|
|
1626
1646
|
const bankDelta = taskMemoryBankDelta(telemetryBankSnapshot, next);
|
|
1627
1647
|
telemetryBankSnapshot = next;
|
|
@@ -1635,7 +1655,7 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1635
1655
|
reason,
|
|
1636
1656
|
bankOperations: operations.bankOperations,
|
|
1637
1657
|
droppedOperations: operations.droppedOperations,
|
|
1638
|
-
citedEntries,
|
|
1658
|
+
citedEntries: citedEntries2,
|
|
1639
1659
|
inputTokens,
|
|
1640
1660
|
outputTokens,
|
|
1641
1661
|
latencyMs
|
|
@@ -1648,17 +1668,29 @@ function createMemoryInterventionRegistration(deps) {
|
|
|
1648
1668
|
tier,
|
|
1649
1669
|
decision,
|
|
1650
1670
|
reason,
|
|
1651
|
-
citedEntries,
|
|
1671
|
+
citedEntries: citedEntries2,
|
|
1652
1672
|
bankWrites: countBankWrites(bankDelta),
|
|
1653
1673
|
latencyMs
|
|
1654
1674
|
};
|
|
1655
1675
|
activity.unshift(event);
|
|
1656
1676
|
if (activity.length > MEMORY_INTERVENTION_ACTIVITY_LIMIT) activity.length = MEMORY_INTERVENTION_ACTIVITY_LIMIT;
|
|
1657
1677
|
}
|
|
1658
|
-
function
|
|
1659
|
-
if (message === null) return
|
|
1678
|
+
function citedEntries(message) {
|
|
1679
|
+
if (message === null) return [];
|
|
1660
1680
|
const snapshot = deps.bank.snapshot();
|
|
1661
|
-
return [...snapshot.knowledge, ...snapshot.procedural].filter((entry) => message.includes(`[${entry.id}]`))
|
|
1681
|
+
return [...snapshot.knowledge, ...snapshot.procedural].filter((entry) => message.includes(`[${entry.id}]`));
|
|
1682
|
+
}
|
|
1683
|
+
function citedEntryCount(message) {
|
|
1684
|
+
return citedEntries(message).length;
|
|
1685
|
+
}
|
|
1686
|
+
function reportInjectedEntries(reminder) {
|
|
1687
|
+
if (deps.onInjectedEntries === void 0) return;
|
|
1688
|
+
const entries = citedEntries(reminder);
|
|
1689
|
+
if (entries.length === 0) return;
|
|
1690
|
+
try {
|
|
1691
|
+
deps.onInjectedEntries(entries);
|
|
1692
|
+
} catch {
|
|
1693
|
+
}
|
|
1662
1694
|
}
|
|
1663
1695
|
function observeBeforeTool(input) {
|
|
1664
1696
|
const prepared = prepareToolStep(input);
|
|
@@ -1867,6 +1899,27 @@ function setBounded(map, key, value, capacity) {
|
|
|
1867
1899
|
map.set(key, value);
|
|
1868
1900
|
}
|
|
1869
1901
|
|
|
1902
|
+
// src/domains/middleware/memory-step-endpoint.ts
|
|
1903
|
+
init_esm_shims();
|
|
1904
|
+
function announceMemoryStepEndpoint(deps, complete) {
|
|
1905
|
+
const { bus, endpointKey, targetId } = deps;
|
|
1906
|
+
if (endpointKey === null) return complete;
|
|
1907
|
+
return async (request) => {
|
|
1908
|
+
const releaseEndpointSlot = registerForegroundStream(endpointKey);
|
|
1909
|
+
try {
|
|
1910
|
+
return await complete(request);
|
|
1911
|
+
} finally {
|
|
1912
|
+
releaseEndpointSlot();
|
|
1913
|
+
if (bus !== null) {
|
|
1914
|
+
try {
|
|
1915
|
+
bus.emit(BusChannels.MemoryStepCompleted, { endpointKey, targetId });
|
|
1916
|
+
} catch {
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1870
1923
|
// src/domains/middleware/skills-reminder.ts
|
|
1871
1924
|
init_esm_shims();
|
|
1872
1925
|
var SKILLS_REMINDER_REGISTRATION_ID = "observer.skills-reminder";
|
|
@@ -2395,6 +2448,7 @@ export {
|
|
|
2395
2448
|
readHookSources,
|
|
2396
2449
|
installUserHooks,
|
|
2397
2450
|
createMemoryInterventionRegistration,
|
|
2451
|
+
announceMemoryStepEndpoint,
|
|
2398
2452
|
createSkillsReminderRegistration,
|
|
2399
2453
|
createTaskBoardReminderRegistration,
|
|
2400
2454
|
createTaskNudgeRegistration,
|
|
@@ -2404,4 +2458,4 @@ export {
|
|
|
2404
2458
|
createWatchdogRegistration,
|
|
2405
2459
|
MiddlewareDomainModule
|
|
2406
2460
|
};
|
|
2407
|
-
//# sourceMappingURL=chunk-
|
|
2461
|
+
//# sourceMappingURL=chunk-GAYUJ7LE.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
asDirectoryPathBoundary,
|
|
4
4
|
pathBoundaryEntryCovers,
|
|
5
5
|
resolvePathBoundary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S4COXYBG.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
WORKSPACE_SCOPE,
|
|
54
54
|
CONFIRMED_SCOPE
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-HAY4ZE2P.js.map
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
assertAgentIdNamespace
|
|
4
|
-
} from "./chunk-DR52UMZW.js";
|
|
5
2
|
import {
|
|
6
3
|
loadSkills
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AD7Y7STJ.js";
|
|
8
5
|
import {
|
|
9
6
|
parseFrontmatter
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RKKLTLYB.js";
|
|
11
8
|
import {
|
|
12
9
|
enabledExtensionResourceRoots
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
parseResultContract
|
|
16
|
-
} from "./chunk-TTHACPOM.js";
|
|
10
|
+
} from "./chunk-5QKCQQ3E.js";
|
|
17
11
|
import {
|
|
18
12
|
assertAgentSpecPolicy,
|
|
19
13
|
isAgentAudience,
|
|
@@ -23,8 +17,9 @@ import {
|
|
|
23
17
|
isAgentProduct,
|
|
24
18
|
isAgentProjectContextTier,
|
|
25
19
|
isShadowAgent,
|
|
26
|
-
normalizeAgentSpec
|
|
27
|
-
|
|
20
|
+
normalizeAgentSpec,
|
|
21
|
+
parseResultContract
|
|
22
|
+
} from "./chunk-S4COXYBG.js";
|
|
28
23
|
import {
|
|
29
24
|
resolvePackageRoot
|
|
30
25
|
} from "./chunk-IWHMRKLL.js";
|
|
@@ -35,17 +30,6 @@ import {
|
|
|
35
30
|
init_esm_shims
|
|
36
31
|
} from "./chunk-3R73A4XB.js";
|
|
37
32
|
|
|
38
|
-
// src/domains/agents/index.ts
|
|
39
|
-
init_esm_shims();
|
|
40
|
-
|
|
41
|
-
// src/domains/agents/extension.ts
|
|
42
|
-
init_esm_shims();
|
|
43
|
-
|
|
44
|
-
// src/domains/agents/registry.ts
|
|
45
|
-
init_esm_shims();
|
|
46
|
-
import { existsSync, readdirSync, readFileSync, realpathSync } from "node:fs";
|
|
47
|
-
import path2 from "node:path";
|
|
48
|
-
|
|
49
33
|
// src/domains/agents/recipe.ts
|
|
50
34
|
init_esm_shims();
|
|
51
35
|
import path from "node:path";
|
|
@@ -268,6 +252,9 @@ function parseAgentRecipeSchema(input) {
|
|
|
268
252
|
}
|
|
269
253
|
|
|
270
254
|
// src/domains/agents/registry.ts
|
|
255
|
+
init_esm_shims();
|
|
256
|
+
import { existsSync, readdirSync, readFileSync, realpathSync } from "node:fs";
|
|
257
|
+
import path2 from "node:path";
|
|
271
258
|
var RESERVED_CUSTOM_AGENT_IDS = /* @__PURE__ */ new Set(["worker", "delegate", "auto"]);
|
|
272
259
|
function resolveBoundSkills(recipe, source) {
|
|
273
260
|
if (recipe.skills.length === 0) return { ...recipe, boundSkillPaths: [] };
|
|
@@ -405,114 +392,8 @@ function discoverAgentRecipes(cwd = process.cwd(), diagnostics = []) {
|
|
|
405
392
|
return mergeRecipes(builtin, ...extensionRecipes, user, project);
|
|
406
393
|
}
|
|
407
394
|
|
|
408
|
-
// src/domains/agents/extension.ts
|
|
409
|
-
function createAgentsBundle(_context) {
|
|
410
|
-
let recipes = [];
|
|
411
|
-
let specs = [];
|
|
412
|
-
let diagnostics = [];
|
|
413
|
-
function discover() {
|
|
414
|
-
const nextDiagnostics = [];
|
|
415
|
-
const merged = discoverAgentRecipes(process.cwd(), nextDiagnostics);
|
|
416
|
-
const config = _context.getContract("config");
|
|
417
|
-
assertAgentIdNamespace(merged, config?.get()?.delegation?.agents ?? []);
|
|
418
|
-
recipes = merged;
|
|
419
|
-
specs = recipes.map(normalizeAgentSpec);
|
|
420
|
-
diagnostics = nextDiagnostics;
|
|
421
|
-
}
|
|
422
|
-
const extension = {
|
|
423
|
-
async start() {
|
|
424
|
-
discover();
|
|
425
|
-
},
|
|
426
|
-
async stop() {
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
const contract = {
|
|
430
|
-
list() {
|
|
431
|
-
return recipes;
|
|
432
|
-
},
|
|
433
|
-
get(id) {
|
|
434
|
-
return recipes.find((r) => r.id === id) ?? null;
|
|
435
|
-
},
|
|
436
|
-
diagnostics() {
|
|
437
|
-
return diagnostics.map((diagnostic) => ({ ...diagnostic }));
|
|
438
|
-
},
|
|
439
|
-
listSpecs() {
|
|
440
|
-
const config = _context.getContract("config");
|
|
441
|
-
const delegationAgents = config?.get()?.delegation?.agents ?? [];
|
|
442
|
-
const delegationSpecs = delegationAgents.map((agent) => ({
|
|
443
|
-
version: 1,
|
|
444
|
-
id: agent.id,
|
|
445
|
-
name: agent.id,
|
|
446
|
-
description: `External ACP delegation agent: ${agent.command} ${(agent.args ?? []).join(" ")}`,
|
|
447
|
-
source: "custom",
|
|
448
|
-
filepath: "settings.yaml",
|
|
449
|
-
tools: [],
|
|
450
|
-
toolRequirements: { required: [], optional: [] },
|
|
451
|
-
category: "explore",
|
|
452
|
-
capabilityClass: "orchestration",
|
|
453
|
-
latencyClass: "deep",
|
|
454
|
-
projectContextTier: "none",
|
|
455
|
-
audience: "custom",
|
|
456
|
-
tags: ["delegation", "acp"],
|
|
457
|
-
skills: [],
|
|
458
|
-
resultContract: { kind: "external-delegation" },
|
|
459
|
-
budget: { toolCalls: 1, readReserve: 0, synthesis: false },
|
|
460
|
-
body: "External ACP delegation."
|
|
461
|
-
}));
|
|
462
|
-
return [...specs, ...delegationSpecs];
|
|
463
|
-
},
|
|
464
|
-
getSpec(id) {
|
|
465
|
-
const found = specs.find((r) => r.id === id);
|
|
466
|
-
if (found) return found;
|
|
467
|
-
const config = _context.getContract("config");
|
|
468
|
-
const agent = config?.get()?.delegation?.agents?.find((entry) => entry.id === id);
|
|
469
|
-
if (agent) {
|
|
470
|
-
return {
|
|
471
|
-
version: 1,
|
|
472
|
-
id: agent.id,
|
|
473
|
-
name: agent.id,
|
|
474
|
-
description: `External ACP delegation agent: ${agent.command} ${(agent.args ?? []).join(" ")}`,
|
|
475
|
-
source: "custom",
|
|
476
|
-
filepath: "settings.yaml",
|
|
477
|
-
tools: [],
|
|
478
|
-
toolRequirements: { required: [], optional: [] },
|
|
479
|
-
category: "explore",
|
|
480
|
-
capabilityClass: "orchestration",
|
|
481
|
-
latencyClass: "deep",
|
|
482
|
-
projectContextTier: "none",
|
|
483
|
-
audience: "custom",
|
|
484
|
-
tags: ["delegation", "acp"],
|
|
485
|
-
skills: [],
|
|
486
|
-
resultContract: { kind: "external-delegation" },
|
|
487
|
-
budget: { toolCalls: 1, readReserve: 0, synthesis: false },
|
|
488
|
-
body: "External ACP delegation."
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
return null;
|
|
492
|
-
},
|
|
493
|
-
reload() {
|
|
494
|
-
discover();
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
return { extension, contract };
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// src/domains/agents/manifest.ts
|
|
501
|
-
init_esm_shims();
|
|
502
|
-
var AgentsManifest = {
|
|
503
|
-
name: "agents",
|
|
504
|
-
dependsOn: ["config"]
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
// src/domains/agents/index.ts
|
|
508
|
-
var AgentsDomainModule = {
|
|
509
|
-
manifest: AgentsManifest,
|
|
510
|
-
createExtension: createAgentsBundle
|
|
511
|
-
};
|
|
512
|
-
|
|
513
395
|
export {
|
|
514
396
|
parseAgentRecipeSchema,
|
|
515
|
-
discoverAgentRecipes
|
|
516
|
-
AgentsDomainModule
|
|
397
|
+
discoverAgentRecipes
|
|
517
398
|
};
|
|
518
|
-
//# sourceMappingURL=chunk-
|
|
399
|
+
//# sourceMappingURL=chunk-HCBCAYZU.js.map
|