@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
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
DEFAULT_SETTINGS,
|
|
11
11
|
THEME_NAMED_COLORS,
|
|
12
12
|
THINKING_LEVELS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XDOQXGFO.js";
|
|
14
14
|
import {
|
|
15
15
|
withStateFileLockSync
|
|
16
16
|
} from "./chunk-IKCO5N3L.js";
|
|
@@ -388,7 +388,8 @@ function validateTarget(issues, path, value) {
|
|
|
388
388
|
"lifecycle",
|
|
389
389
|
"gateway",
|
|
390
390
|
"pricing",
|
|
391
|
-
"lmstudio"
|
|
391
|
+
"lmstudio",
|
|
392
|
+
"maxConcurrentRequests"
|
|
392
393
|
]);
|
|
393
394
|
const id = "id" in value ? expectString(issues, `${path}.id`, value.id) : void 0;
|
|
394
395
|
const runtime = "runtime" in value ? expectString(issues, `${path}.runtime`, value.runtime) : void 0;
|
|
@@ -434,6 +435,10 @@ function validateTarget(issues, path, value) {
|
|
|
434
435
|
const v = validateLmStudioSettings(issues, `${path}.lmstudio`, value.lmstudio);
|
|
435
436
|
if (v !== void 0) target.lmstudio = v;
|
|
436
437
|
}
|
|
438
|
+
if ("maxConcurrentRequests" in value) {
|
|
439
|
+
const v = expectInteger(issues, `${path}.maxConcurrentRequests`, value.maxConcurrentRequests, { min: 1 });
|
|
440
|
+
if (v !== void 0) target.maxConcurrentRequests = v;
|
|
441
|
+
}
|
|
437
442
|
return target;
|
|
438
443
|
}
|
|
439
444
|
function validateWorkerTarget(issues, path, value, defaults, targets, options) {
|
|
@@ -812,6 +817,7 @@ var TOP_LEVEL_KEYS = [
|
|
|
812
817
|
"keybindings",
|
|
813
818
|
"compaction",
|
|
814
819
|
"context",
|
|
820
|
+
"prewarm",
|
|
815
821
|
"retry",
|
|
816
822
|
"guardrails"
|
|
817
823
|
];
|
|
@@ -1353,6 +1359,17 @@ function validateSettings(raw) {
|
|
|
1353
1359
|
}
|
|
1354
1360
|
}
|
|
1355
1361
|
}
|
|
1362
|
+
if ("prewarm" in raw) {
|
|
1363
|
+
if (!isPlainObject(raw.prewarm)) {
|
|
1364
|
+
issues.add("prewarm", `expected a map, got ${describe(raw.prewarm)}`);
|
|
1365
|
+
} else {
|
|
1366
|
+
issues.unknownKeys("prewarm", raw.prewarm, ["enabled"]);
|
|
1367
|
+
if ("enabled" in raw.prewarm) {
|
|
1368
|
+
const v = expectBoolean(issues, "prewarm.enabled", raw.prewarm.enabled);
|
|
1369
|
+
if (v !== void 0) settings.prewarm.enabled = v;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1356
1373
|
if ("retry" in raw) {
|
|
1357
1374
|
if (!isPlainObject(raw.retry)) {
|
|
1358
1375
|
issues.add("retry", `expected a map, got ${describe(raw.retry)}`);
|
|
@@ -1561,4 +1578,4 @@ export {
|
|
|
1561
1578
|
removeFleetProfileFromSettings,
|
|
1562
1579
|
bindAgentProfileInSettings
|
|
1563
1580
|
};
|
|
1564
|
-
//# sourceMappingURL=chunk-
|
|
1581
|
+
//# sourceMappingURL=chunk-PNY46YEY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
parseAgentRecipeSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HCBCAYZU.js";
|
|
5
5
|
import {
|
|
6
6
|
discoverMarketplaceSkills,
|
|
7
7
|
expandSkillInvocationInput,
|
|
@@ -10,22 +10,24 @@ import {
|
|
|
10
10
|
normalizedSkillHash,
|
|
11
11
|
parsePendingSkillRequests,
|
|
12
12
|
projectCompatTrusted
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AD7Y7STJ.js";
|
|
14
14
|
import {
|
|
15
15
|
COMPAT_RESOURCE_PRECEDENCE,
|
|
16
16
|
defaultScopedResourceRoots,
|
|
17
17
|
sourceInfoForRoot,
|
|
18
18
|
splitYamlFrontmatter,
|
|
19
19
|
stringField
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AMKHQW3C.js";
|
|
21
|
+
import {
|
|
22
|
+
parseFleetContract
|
|
23
|
+
} from "./chunk-HPCTNZM2.js";
|
|
21
24
|
import {
|
|
22
|
-
parseFleetContract,
|
|
23
25
|
parseFrontmatter
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RKKLTLYB.js";
|
|
25
27
|
import {
|
|
26
28
|
assertAgentSpecPolicy,
|
|
27
29
|
normalizeAgentSpec
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-S4COXYBG.js";
|
|
29
31
|
import {
|
|
30
32
|
INTEROP_AGENT_KINDS
|
|
31
33
|
} from "./chunk-IHXBNWMM.js";
|
|
@@ -35,7 +37,7 @@ import {
|
|
|
35
37
|
import {
|
|
36
38
|
readSettings,
|
|
37
39
|
updateSettings
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PNY46YEY.js";
|
|
39
41
|
import {
|
|
40
42
|
expandConfigPath
|
|
41
43
|
} from "./chunk-SST6Z5JA.js";
|
|
@@ -173,18 +175,13 @@ function contained(root, candidate) {
|
|
|
173
175
|
const relative = path.relative(root, candidate);
|
|
174
176
|
return relative === "" || !relative.startsWith(`..${path.sep}`) && relative !== ".." && !path.isAbsolute(relative);
|
|
175
177
|
}
|
|
176
|
-
function resolveExtensionReferences(body, root
|
|
177
|
-
if (root.rootPath === void 0 || !body.includes(EXTENSION_ROOT_TOKEN)) return body;
|
|
178
|
+
function resolveExtensionReferences(body, root) {
|
|
179
|
+
if (root.rootPath === void 0 || !body.includes(EXTENSION_ROOT_TOKEN)) return { body };
|
|
178
180
|
let canonicalRoot;
|
|
179
181
|
try {
|
|
180
182
|
canonicalRoot = realpathSync(root.rootPath);
|
|
181
183
|
} catch (error) {
|
|
182
|
-
|
|
183
|
-
type: "warning",
|
|
184
|
-
message: `extension root could not be resolved: ${error instanceof Error ? error.message : String(error)}`,
|
|
185
|
-
path: filePath
|
|
186
|
-
});
|
|
187
|
-
return null;
|
|
184
|
+
return { reason: `extension root could not be resolved: ${error instanceof Error ? error.message : String(error)}` };
|
|
188
185
|
}
|
|
189
186
|
let invalid = null;
|
|
190
187
|
const resolved = body.replace(EXTENSION_ROOT_REFERENCE, (reference, suffix) => {
|
|
@@ -198,26 +195,30 @@ function resolveExtensionReferences(body, root, filePath, diagnostics) {
|
|
|
198
195
|
return candidate;
|
|
199
196
|
});
|
|
200
197
|
if (invalid !== null) {
|
|
201
|
-
|
|
202
|
-
type: "warning",
|
|
203
|
-
message: `prompt template has an unresolved or escaping extension reference: ${invalid}`,
|
|
204
|
-
path: filePath
|
|
205
|
-
});
|
|
206
|
-
return null;
|
|
198
|
+
return { reason: `prompt template has an unresolved or escaping extension reference: ${invalid}` };
|
|
207
199
|
}
|
|
208
|
-
return resolved;
|
|
200
|
+
return { body: resolved };
|
|
201
|
+
}
|
|
202
|
+
function unavailableTemplate(name, filePath, root, reason, diagnostics, description) {
|
|
203
|
+
diagnostics.push({ type: "warning", message: reason, path: filePath });
|
|
204
|
+
const sourceInfo = sourceInfoForRoot(root, filePath);
|
|
205
|
+
return {
|
|
206
|
+
name,
|
|
207
|
+
value: {
|
|
208
|
+
name,
|
|
209
|
+
description: description ?? "Prompt template (unavailable)",
|
|
210
|
+
content: "",
|
|
211
|
+
filePath,
|
|
212
|
+
sourceInfo,
|
|
213
|
+
trusted: root.trusted !== false,
|
|
214
|
+
unavailable: `${reason} (${filePath})`
|
|
215
|
+
},
|
|
216
|
+
source: sourceInfo
|
|
217
|
+
};
|
|
209
218
|
}
|
|
210
219
|
function loadPromptFile(filePath, root, diagnostics) {
|
|
211
220
|
const ext = path.extname(filePath).toLowerCase();
|
|
212
221
|
if (ext !== ".md") return null;
|
|
213
|
-
let raw;
|
|
214
|
-
try {
|
|
215
|
-
raw = readFileSync(filePath, "utf8");
|
|
216
|
-
} catch (err) {
|
|
217
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
218
|
-
diagnostics.push({ type: "warning", message: `prompt template could not be read: ${reason}`, path: filePath });
|
|
219
|
-
return null;
|
|
220
|
-
}
|
|
221
222
|
const relativePath = path.relative(root.path, filePath);
|
|
222
223
|
if (relativePath === "" || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
|
|
223
224
|
diagnostics.push({ type: "warning", message: "prompt template escaped its discovery root", path: filePath });
|
|
@@ -225,16 +226,26 @@ function loadPromptFile(filePath, root, diagnostics) {
|
|
|
225
226
|
}
|
|
226
227
|
const name = relativePath.slice(0, -ext.length).split(path.sep).join(":");
|
|
227
228
|
if (name.trim().length === 0) return null;
|
|
229
|
+
let raw;
|
|
230
|
+
try {
|
|
231
|
+
raw = readFileSync(filePath, "utf8");
|
|
232
|
+
} catch (err) {
|
|
233
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
234
|
+
return unavailableTemplate(name, filePath, root, `prompt template could not be read: ${reason}`, diagnostics);
|
|
235
|
+
}
|
|
228
236
|
const { frontmatter, body } = splitOptionalFrontmatter(raw, filePath, diagnostics);
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
237
|
+
const declaredDescription = stringField(frontmatter, "description");
|
|
238
|
+
const resolution = resolveExtensionReferences(body, root);
|
|
239
|
+
if ("reason" in resolution) {
|
|
240
|
+
return unavailableTemplate(name, filePath, root, resolution.reason, diagnostics, declaredDescription ?? void 0);
|
|
241
|
+
}
|
|
242
|
+
const description = declaredDescription ?? fallbackDescription(resolution.body);
|
|
232
243
|
const argumentHint = stringField(frontmatter, "argument-hint") ?? stringField(frontmatter, "argumentHint");
|
|
233
244
|
const sourceInfo = sourceInfoForRoot(root, filePath);
|
|
234
245
|
const template = {
|
|
235
246
|
name,
|
|
236
247
|
description,
|
|
237
|
-
content:
|
|
248
|
+
content: resolution.body.trim(),
|
|
238
249
|
filePath,
|
|
239
250
|
sourceInfo,
|
|
240
251
|
trusted: root.trusted !== false
|
|
@@ -321,6 +332,16 @@ function expandPromptTemplateInput(input, templates) {
|
|
|
321
332
|
if (!command) return { expanded: false, text: input, args: [], diagnostics: templates.diagnostics };
|
|
322
333
|
const template = templates.items.find((entry) => entry.name === command.name);
|
|
323
334
|
if (!template) return { expanded: false, text: input, args: [], diagnostics: templates.diagnostics };
|
|
335
|
+
if (template.unavailable !== void 0) {
|
|
336
|
+
const message = `prompt template /${template.name} cannot run: ${template.unavailable}`;
|
|
337
|
+
return {
|
|
338
|
+
expanded: false,
|
|
339
|
+
text: input,
|
|
340
|
+
args: [],
|
|
341
|
+
diagnostics: templates.diagnostics,
|
|
342
|
+
refusal: { template, message }
|
|
343
|
+
};
|
|
344
|
+
}
|
|
324
345
|
if (!template.trusted) {
|
|
325
346
|
const message = `prompt template ${template.name} comes from an untrusted project root; set skills.trustProjectCompatRoots to use it`;
|
|
326
347
|
return {
|
|
@@ -877,4 +898,4 @@ export {
|
|
|
877
898
|
ResourcesDomainModule,
|
|
878
899
|
createResourcesDomainModule
|
|
879
900
|
};
|
|
880
|
-
//# sourceMappingURL=chunk-
|
|
901
|
+
//# sourceMappingURL=chunk-PZ4I4JE2.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
readSettings,
|
|
11
11
|
updateSettings
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PNY46YEY.js";
|
|
13
13
|
import {
|
|
14
14
|
withStateFileLockSync
|
|
15
15
|
} from "./chunk-IKCO5N3L.js";
|
|
@@ -478,4 +478,4 @@ export {
|
|
|
478
478
|
detectInteropAgents,
|
|
479
479
|
InteropDomainModule
|
|
480
480
|
};
|
|
481
|
-
//# sourceMappingURL=chunk-
|
|
481
|
+
//# sourceMappingURL=chunk-QQ7EKM72.js.map
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
gitTool,
|
|
10
10
|
verifyToolSurface
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CA42X6KT.js";
|
|
12
12
|
import {
|
|
13
13
|
codeNavToolSurface
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OEDBCISO.js";
|
|
15
15
|
import {
|
|
16
16
|
contextToolSurface
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5DQRIYDZ.js";
|
|
18
18
|
import {
|
|
19
19
|
describeDispatchPlan
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VKBMFOYV.js";
|
|
21
21
|
import {
|
|
22
22
|
compileGlobRegex,
|
|
23
23
|
fallbackIgnoredDirs,
|
|
@@ -35,33 +35,22 @@ import {
|
|
|
35
35
|
readMaxBytes,
|
|
36
36
|
readTool,
|
|
37
37
|
renderAgentLedger
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-4H6ULJ3H.js";
|
|
39
39
|
import {
|
|
40
40
|
createTaskBoardStore,
|
|
41
41
|
taskBoardCounts
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2JDWVJND.js";
|
|
43
43
|
import {
|
|
44
44
|
formatModelRejection
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-N3PBVRTZ.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveReadPath,
|
|
48
48
|
resolveToCwd,
|
|
49
49
|
toPosixPath
|
|
50
50
|
} from "./chunk-OQE5J4C6.js";
|
|
51
|
-
import {
|
|
52
|
-
evaluateSkillToolSurface,
|
|
53
|
-
skillActivationFromToolDetails
|
|
54
|
-
} from "./chunk-GOXNB3AO.js";
|
|
55
|
-
import {
|
|
56
|
-
DEFAULT_AUTONOMY_EXPOSURE,
|
|
57
|
-
DEFAULT_AUTONOMY_LEVEL,
|
|
58
|
-
autonomyAskRejection,
|
|
59
|
-
autonomyDenyRejection,
|
|
60
|
-
mapAutonomy
|
|
61
|
-
} from "./chunk-HWUFFB6L.js";
|
|
62
51
|
import {
|
|
63
52
|
classify
|
|
64
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-S4COXYBG.js";
|
|
65
54
|
import {
|
|
66
55
|
CLIO_ARTIFACT_DIR,
|
|
67
56
|
artifactDefaultPath,
|
|
@@ -69,6 +58,15 @@ import {
|
|
|
69
58
|
protectArtifact,
|
|
70
59
|
protectedArtifactMutationBlockReason
|
|
71
60
|
} from "./chunk-MV3K5QF2.js";
|
|
61
|
+
import {
|
|
62
|
+
DEFAULT_AUTONOMY_EXPOSURE,
|
|
63
|
+
DEFAULT_AUTONOMY_LEVEL,
|
|
64
|
+
autonomyAskRejection,
|
|
65
|
+
autonomyDenyRejection,
|
|
66
|
+
evaluateSkillToolSurface,
|
|
67
|
+
mapAutonomy,
|
|
68
|
+
skillActivationFromToolDetails
|
|
69
|
+
} from "./chunk-RAPCMZL4.js";
|
|
72
70
|
import {
|
|
73
71
|
DEFAULT_TOOL_RESULT_MAX_BYTES,
|
|
74
72
|
OBSERVATION_POLICY_SLACK_BYTES,
|
|
@@ -112,7 +110,7 @@ import {
|
|
|
112
110
|
} from "./chunk-B5CSFE7B.js";
|
|
113
111
|
import {
|
|
114
112
|
BusChannels
|
|
115
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-RKRLDWD3.js";
|
|
116
114
|
import {
|
|
117
115
|
GUARDRAIL_DEFAULTS,
|
|
118
116
|
isWorkerToolCallCapExceededReason,
|
|
@@ -128,7 +126,7 @@ import {
|
|
|
128
126
|
import {
|
|
129
127
|
StringEnum,
|
|
130
128
|
engineStreamSimple
|
|
131
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-UOSL25KY.js";
|
|
132
130
|
import {
|
|
133
131
|
init_esm_shims
|
|
134
132
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -611,6 +609,11 @@ function normalizeAskUserCall(args) {
|
|
|
611
609
|
function cancelledAskUserResult() {
|
|
612
610
|
return { answers: [], cancelled: true };
|
|
613
611
|
}
|
|
612
|
+
function normalizeAnswerOptions(value) {
|
|
613
|
+
if (!Array.isArray(value)) return void 0;
|
|
614
|
+
const labels = value.filter((entry) => typeof entry === "string" && entry.trim().length > 0);
|
|
615
|
+
return labels.length > 0 ? labels : void 0;
|
|
616
|
+
}
|
|
614
617
|
function normalizeAskUserResult(questions, result) {
|
|
615
618
|
if (result.cancelled === true) return cancelledAskUserResult();
|
|
616
619
|
const answers = [];
|
|
@@ -620,7 +623,15 @@ function normalizeAskUserResult(questions, result) {
|
|
|
620
623
|
if (!raw) continue;
|
|
621
624
|
const question = typeof raw.question === "string" && raw.question.trim().length > 0 ? raw.question : fallbackQuestion;
|
|
622
625
|
const answer = typeof raw.answer === "string" ? raw.answer.trim() : "";
|
|
623
|
-
if (question.length
|
|
626
|
+
if (question.length === 0 || answer.length === 0) continue;
|
|
627
|
+
const options = normalizeAnswerOptions(raw.options);
|
|
628
|
+
const value = typeof raw.value === "string" && raw.value.length > 0 ? raw.value : void 0;
|
|
629
|
+
answers.push({
|
|
630
|
+
question,
|
|
631
|
+
answer,
|
|
632
|
+
...options ? { options } : {},
|
|
633
|
+
...value !== void 0 ? { value } : {}
|
|
634
|
+
});
|
|
624
635
|
}
|
|
625
636
|
return { answers };
|
|
626
637
|
}
|
|
@@ -667,7 +678,12 @@ function transcriptQuestions(questions) {
|
|
|
667
678
|
}));
|
|
668
679
|
}
|
|
669
680
|
function transcriptAnswers(answers) {
|
|
670
|
-
return answers.map((answer) => ({
|
|
681
|
+
return answers.map((answer) => ({
|
|
682
|
+
question: answer.question,
|
|
683
|
+
answer: answer.answer,
|
|
684
|
+
...answer.options && answer.options.length > 0 ? { options: [...answer.options] } : {},
|
|
685
|
+
...answer.value !== void 0 ? { value: answer.value } : {}
|
|
686
|
+
}));
|
|
671
687
|
}
|
|
672
688
|
function toDecisionKey(value) {
|
|
673
689
|
const key = value.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 56);
|
|
@@ -690,6 +706,8 @@ function decisionFromAnswer(answer, questions, existing) {
|
|
|
690
706
|
key,
|
|
691
707
|
value: answer.answer,
|
|
692
708
|
...label ? { label } : {},
|
|
709
|
+
...answer.options && answer.options.length > 0 ? { options: [...answer.options] } : {},
|
|
710
|
+
...answer.value !== void 0 ? { text: answer.value } : {},
|
|
693
711
|
source_question: answer.question
|
|
694
712
|
};
|
|
695
713
|
}
|
|
@@ -698,6 +716,8 @@ function toTranscriptDecision(decision) {
|
|
|
698
716
|
key: toDecisionKey(decision.key),
|
|
699
717
|
value: decision.value,
|
|
700
718
|
...decision.label ? { label: decision.label } : {},
|
|
719
|
+
...decision.options && decision.options.length > 0 ? { options: [...decision.options] } : {},
|
|
720
|
+
...decision.text !== void 0 ? { text: decision.text } : {},
|
|
701
721
|
...decision.source_question ? { source_question: decision.source_question } : {}
|
|
702
722
|
};
|
|
703
723
|
}
|
|
@@ -2369,6 +2389,19 @@ function patchLlamaCppResponseSchemaPayload(payload, runtimeId, responseSchema)
|
|
|
2369
2389
|
}
|
|
2370
2390
|
};
|
|
2371
2391
|
}
|
|
2392
|
+
function patchResponseSchemaPayloadForDialect(payload, dialect, responseSchema, schemaName) {
|
|
2393
|
+
if (!isRecord3(payload)) return void 0;
|
|
2394
|
+
if (dialect === "llamacpp-json-object") {
|
|
2395
|
+
return { ...payload, response_format: { type: "json_object", schema: responseSchema } };
|
|
2396
|
+
}
|
|
2397
|
+
return {
|
|
2398
|
+
...payload,
|
|
2399
|
+
response_format: {
|
|
2400
|
+
type: "json_schema",
|
|
2401
|
+
json_schema: { name: schemaName, strict: true, schema: responseSchema }
|
|
2402
|
+
}
|
|
2403
|
+
};
|
|
2404
|
+
}
|
|
2372
2405
|
function patchWorkerRequestPayload(payload, model, options) {
|
|
2373
2406
|
let patched = payload;
|
|
2374
2407
|
let changed = false;
|
|
@@ -5076,13 +5109,13 @@ function registerCoreTools(registry, deps = {}) {
|
|
|
5076
5109
|
});
|
|
5077
5110
|
registry.register({
|
|
5078
5111
|
...builtin(
|
|
5079
|
-
lazyTool(verifyToolSurface, async () => (await import("./verify-
|
|
5112
|
+
lazyTool(verifyToolSurface, async () => (await import("./verify-BVKWTNDL.js")).verifyTool),
|
|
5080
5113
|
{ path: "src/tools/verify/index.ts", scope: "core" }
|
|
5081
5114
|
)
|
|
5082
5115
|
});
|
|
5083
5116
|
registry.register({
|
|
5084
5117
|
...builtin(
|
|
5085
|
-
lazyTool(codeNavToolSurface, async () => (await import("./code-nav-
|
|
5118
|
+
lazyTool(codeNavToolSurface, async () => (await import("./code-nav-LMW275PA.js")).codeNavTool),
|
|
5086
5119
|
{ path: "src/tools/codewiki/code-nav.ts", scope: "core" }
|
|
5087
5120
|
)
|
|
5088
5121
|
});
|
|
@@ -5107,7 +5140,7 @@ function registerCoreTools(registry, deps = {}) {
|
|
|
5107
5140
|
registry.register({
|
|
5108
5141
|
...builtin(
|
|
5109
5142
|
lazyTool(contextToolSurface, async () => {
|
|
5110
|
-
const { createContextTool } = await import("./context-
|
|
5143
|
+
const { createContextTool } = await import("./context-PALKKQYL.js");
|
|
5111
5144
|
if (!session) return createContextTool(skillToolDeps);
|
|
5112
5145
|
const { probeWorkspace } = await import("./workspace-ZJ6BFM3Q.js");
|
|
5113
5146
|
return createContextTool({
|
|
@@ -5193,11 +5226,16 @@ export {
|
|
|
5193
5226
|
resolveAgentTools,
|
|
5194
5227
|
effectiveToolNames,
|
|
5195
5228
|
resolveSessionTools,
|
|
5196
|
-
diffWords,
|
|
5197
5229
|
patchProviderThinkingPayload,
|
|
5198
5230
|
patchToolChoiceNonePayload,
|
|
5199
5231
|
patchToolChoiceNamedPayload,
|
|
5232
|
+
patchResponseSchemaPayloadForDialect,
|
|
5200
5233
|
patchWorkerRequestPayload,
|
|
5234
|
+
diffWords,
|
|
5235
|
+
normalizeToLF,
|
|
5236
|
+
stripBom,
|
|
5237
|
+
applyEditsToNormalizedContent,
|
|
5238
|
+
generateDiffString,
|
|
5201
5239
|
askAxis,
|
|
5202
5240
|
resolveFdBinary,
|
|
5203
5241
|
lazyTool,
|
|
@@ -5205,4 +5243,4 @@ export {
|
|
|
5205
5243
|
assertRegisteredBuiltinTools,
|
|
5206
5244
|
createRegistry
|
|
5207
5245
|
};
|
|
5208
|
-
//# sourceMappingURL=chunk-
|
|
5246
|
+
//# sourceMappingURL=chunk-R7LNVMCS.js.map
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
AUTONOMY_EXPOSURES
|
|
4
|
-
} from "./chunk-HWUFFB6L.js";
|
|
5
2
|
import {
|
|
6
3
|
init_esm_shims
|
|
7
4
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -72,6 +69,73 @@ function isSkillActivation(value) {
|
|
|
72
69
|
return typeof record.name === "string" && typeof record.filePath === "string" && typeof record.hash === "string" && typeof record.source === "string" && (record.sourceOrigin === void 0 || typeof record.sourceOrigin === "string") && (record.triggeredBy === "slash-command" || record.triggeredBy === "tool") && (record.turnId === void 0 || typeof record.turnId === "string") && (record.runId === void 0 || typeof record.runId === "string");
|
|
73
70
|
}
|
|
74
71
|
|
|
72
|
+
// src/domains/safety/autonomy.ts
|
|
73
|
+
init_esm_shims();
|
|
74
|
+
var AUTONOMY_LEVELS = ["read-only", "suggest", "auto-edit", "full-auto"];
|
|
75
|
+
var DEFAULT_AUTONOMY_LEVEL = "auto-edit";
|
|
76
|
+
function isAutonomyLevel(value) {
|
|
77
|
+
return typeof value === "string" && AUTONOMY_LEVELS.includes(value);
|
|
78
|
+
}
|
|
79
|
+
var AUTONOMY_EXPOSURES = ["local", "outward"];
|
|
80
|
+
var DEFAULT_AUTONOMY_EXPOSURE = "local";
|
|
81
|
+
function mapAutonomy(level, actionClass, options = {}) {
|
|
82
|
+
if (actionClass === "git_destructive") return "deny";
|
|
83
|
+
if ((level === "auto-edit" || level === "suggest") && options.exposure === "outward") return "ask";
|
|
84
|
+
if (actionClass === "read") return "allow";
|
|
85
|
+
if (level === "read-only") return "deny";
|
|
86
|
+
if (level === "suggest") return "ask";
|
|
87
|
+
switch (actionClass) {
|
|
88
|
+
case "write":
|
|
89
|
+
return "allow";
|
|
90
|
+
case "dispatch":
|
|
91
|
+
if (options.dispatchPlanScale === true && level !== "full-auto") return "ask";
|
|
92
|
+
return "allow";
|
|
93
|
+
case "execute": {
|
|
94
|
+
if (options.executeRecognized !== false) return "allow";
|
|
95
|
+
return level === "full-auto" ? "allow" : "ask";
|
|
96
|
+
}
|
|
97
|
+
case "unknown":
|
|
98
|
+
return "ask";
|
|
99
|
+
default:
|
|
100
|
+
return "ask";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function autonomyDenyRejection(level, tool, actionClass) {
|
|
104
|
+
return {
|
|
105
|
+
short: `${tool} denied: autonomy level is ${level}`,
|
|
106
|
+
detail: `Clio is at autonomy ${level}: ${actionClass} actions are denied without prompting. Describe the change you would make instead, so the operator can apply it or raise the autonomy level.`,
|
|
107
|
+
hints: ["Propose the exact edit or command as text.", "The operator can change the level in /settings."]
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function autonomyAskRejection(level, tool, actionClass, exposure = DEFAULT_AUTONOMY_EXPOSURE) {
|
|
111
|
+
if (exposure === "outward") {
|
|
112
|
+
return {
|
|
113
|
+
short: `${tool} needs approval: outward-facing gate at autonomy ${level}`,
|
|
114
|
+
detail: `The call declared exposure=outward, so answering it publishes or sends something outside the workspace. Autonomy ${level} auto-answers local gates and parks outward-facing ones for the operator.`,
|
|
115
|
+
hints: [
|
|
116
|
+
"Approving resumes only this call.",
|
|
117
|
+
"Autonomy full-auto answers outward gates too; the safety net still applies there."
|
|
118
|
+
]
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
short: `${tool} needs approval (${actionClass}) at autonomy ${level}`,
|
|
123
|
+
detail: `Autonomy ${level} routes ${actionClass} actions through operator approval. The call is parked until the operator approves it once or cancels it.`,
|
|
124
|
+
hints: [
|
|
125
|
+
"Approving resumes only this call.",
|
|
126
|
+
"Recognized commands can be added to .clio-coder/safety.yaml.",
|
|
127
|
+
// The sanctioned pivots for a gated shell command: typed verification
|
|
128
|
+
// and read-class observe tools run without approval at this level,
|
|
129
|
+
// and models otherwise stall retrying denied bash for checks or
|
|
130
|
+
// directory listings.
|
|
131
|
+
...actionClass === "execute" ? [
|
|
132
|
+
'A declared package or project-catalog check runs without approval through the verify tool: verify(check="<id>").',
|
|
133
|
+
"Read-only inspection runs without approval through the ls, read, grep, and find tools."
|
|
134
|
+
] : []
|
|
135
|
+
]
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
75
139
|
// src/domains/session/entries.ts
|
|
76
140
|
init_esm_shims();
|
|
77
141
|
var EVICTION_REASONS = [
|
|
@@ -255,7 +319,14 @@ export {
|
|
|
255
319
|
agentSkillToolPolicy,
|
|
256
320
|
skillActivationFromToolDetails,
|
|
257
321
|
isSkillActivation,
|
|
322
|
+
AUTONOMY_LEVELS,
|
|
323
|
+
DEFAULT_AUTONOMY_LEVEL,
|
|
324
|
+
isAutonomyLevel,
|
|
325
|
+
DEFAULT_AUTONOMY_EXPOSURE,
|
|
326
|
+
mapAutonomy,
|
|
327
|
+
autonomyDenyRejection,
|
|
328
|
+
autonomyAskRejection,
|
|
258
329
|
isSessionHeader,
|
|
259
330
|
isSessionEntry
|
|
260
331
|
};
|
|
261
|
-
//# sourceMappingURL=chunk-
|
|
332
|
+
//# sourceMappingURL=chunk-RAPCMZL4.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
require_dist
|
|
4
|
+
} from "./chunk-APJ265NV.js";
|
|
5
|
+
import {
|
|
6
|
+
__toESM,
|
|
7
|
+
init_esm_shims
|
|
8
|
+
} from "./chunk-3R73A4XB.js";
|
|
9
|
+
|
|
10
|
+
// src/domains/agents/frontmatter.ts
|
|
11
|
+
init_esm_shims();
|
|
12
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
13
|
+
function parseFrontmatter(raw, sourcePath) {
|
|
14
|
+
const opening = raw.match(/^---\r?\n/);
|
|
15
|
+
if (!opening) {
|
|
16
|
+
throw new Error(`frontmatter: ${sourcePath}: missing YAML frontmatter opening delimiter`);
|
|
17
|
+
}
|
|
18
|
+
const closeRegex = /\r?\n---(?:\r?\n|$)/g;
|
|
19
|
+
closeRegex.lastIndex = opening[0].length;
|
|
20
|
+
const closing = closeRegex.exec(raw);
|
|
21
|
+
if (!closing) {
|
|
22
|
+
throw new Error(`frontmatter: ${sourcePath}: missing YAML frontmatter closing delimiter`);
|
|
23
|
+
}
|
|
24
|
+
const frontmatterText = raw.slice(opening[0].length, closing.index);
|
|
25
|
+
const body = raw.slice(closing.index + closing[0].length);
|
|
26
|
+
let parsed;
|
|
27
|
+
try {
|
|
28
|
+
parsed = import_yaml.default.parse(frontmatterText);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
31
|
+
throw new Error(`frontmatter: ${sourcePath}: invalid YAML frontmatter (${reason})`);
|
|
32
|
+
}
|
|
33
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
34
|
+
throw new Error(`frontmatter: ${sourcePath}: frontmatter must be a YAML object`);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
frontmatter: parsed,
|
|
38
|
+
body
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
parseFrontmatter
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk-RKKLTLYB.js.map
|
|
@@ -26,6 +26,7 @@ var BusChannels = {
|
|
|
26
26
|
ToolBudgetExceeded: "safety.toolBudgetExceeded",
|
|
27
27
|
ProviderHealth: "provider.health",
|
|
28
28
|
RuntimeNotice: "runtime.notice",
|
|
29
|
+
ResidencyMutation: "residency.mutation",
|
|
29
30
|
DispatchScopeNotice: "dispatch.scopeNotice",
|
|
30
31
|
DispatchEnqueued: "dispatch.enqueued",
|
|
31
32
|
DispatchStarted: "dispatch.started",
|
|
@@ -39,6 +40,7 @@ var BusChannels = {
|
|
|
39
40
|
ContextWarning: "context.warning",
|
|
40
41
|
ContextPruned: "context.pruned",
|
|
41
42
|
ContextRecalled: "context.recalled",
|
|
43
|
+
MemoryStepCompleted: "memory.stepCompleted",
|
|
42
44
|
AgentStatusChanged: "agent.status.changed",
|
|
43
45
|
RunAborted: "run.aborted",
|
|
44
46
|
BudgetAlert: "budget.alert",
|
|
@@ -68,4 +70,4 @@ export {
|
|
|
68
70
|
BusChannels,
|
|
69
71
|
isRunAbortedPayload
|
|
70
72
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-RKRLDWD3.js.map
|