@iowarp/clio-coder 0.3.6 → 0.3.8
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 +59 -0
- package/README.md +22 -6
- package/dist/{acp-2BEHC4DL.js → acp-U67UHUK2.js} +14 -14
- package/dist/{agents-LNNFTM53.js → agents-YU6SGALZ.js} +42 -35
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-KXXFI2VS.js → auth-5ZPJOIVG.js} +32 -24
- package/dist/builtins-C6JMZVV6.js +17 -0
- package/dist/{chunk-E25LMLRW.js → chunk-26LEYJZH.js} +2 -2
- package/dist/{chunk-TSHXZTOQ.js → chunk-2HEJ2F35.js} +5 -5
- package/dist/{chunk-PBTHKCPN.js → chunk-2HFZQUHL.js} +7 -7
- package/dist/{chunk-FO5ZOVUY.js → chunk-3BINW3FP.js} +5 -5
- package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
- package/dist/{chunk-CKXWIANG.js → chunk-4SPRNWDE.js} +18 -16
- package/dist/{chunk-E2ER4LJF.js → chunk-5C3AQNDW.js} +25 -1
- package/dist/{chunk-XF5N4U5A.js → chunk-5DHKRSMQ.js} +9 -8
- package/dist/{chunk-43AOLP7E.js → chunk-5FR74PWO.js} +2 -1
- package/dist/{chunk-EKY57CSP.js → chunk-5H3GB5BO.js} +68 -772
- package/dist/{chunk-6XXKFVSN.js → chunk-5Q2VVUKB.js} +4 -4
- package/dist/{chunk-DJVECN66.js → chunk-7RFXX52T.js} +295 -3705
- package/dist/{chunk-ZXF4XRKW.js → chunk-7RGZWPB6.js} +158 -8
- package/dist/{chunk-FYYLNIL5.js → chunk-A2NJGIB3.js} +2 -2
- package/dist/{chunk-XXQNGV4M.js → chunk-A3WNZD3P.js} +548 -72
- package/dist/{chunk-VEZEGCGW.js → chunk-B5CSFE7B.js} +23 -21
- package/dist/{chunk-2SFS6XQE.js → chunk-DGSYXYMX.js} +3 -2
- package/dist/chunk-DR52UMZW.js +21 -0
- package/dist/{chunk-ZWLZP4ZT.js → chunk-DYIM5TJT.js} +98 -12
- package/dist/{chunk-QKMUKYO7.js → chunk-E77JEWSD.js} +270 -125
- package/dist/{chunk-LYF7OHWH.js → chunk-EMYUUSFG.js} +12 -467
- package/dist/{chunk-4VP4KH3K.js → chunk-EQ63NRB7.js} +8 -8
- package/dist/chunk-FBVTI2TJ.js +518 -0
- package/dist/{chunk-R46L2BIR.js → chunk-FHJEP5SW.js} +19 -25
- package/dist/{chunk-WR67VIZY.js → chunk-GN57SG4G.js} +66 -8
- package/dist/{chunk-RD5U66HV.js → chunk-GPIEI3LY.js} +9 -9
- package/dist/{chunk-PCZJO5TI.js → chunk-GU2UIAFZ.js} +13 -178
- package/dist/chunk-GWS3VEIW.js +195 -0
- package/dist/chunk-H7IXIC72.js +103 -0
- package/dist/{chunk-3BPUFZDL.js → chunk-HLE42MG7.js} +3 -3
- package/dist/{chunk-24I7BN55.js → chunk-IFBNV6H6.js} +3 -3
- package/dist/{chunk-QNQHSOLF.js → chunk-IGWKHNIQ.js} +114 -55
- package/dist/chunk-IIZWH4XA.js +172 -0
- package/dist/{chunk-AD2SYQYC.js → chunk-IJ7RPIYJ.js} +124 -6
- package/dist/chunk-J3YUBZWY.js +382 -0
- package/dist/{chunk-5JGRAMKL.js → chunk-JOZYP4GM.js} +8 -6
- package/dist/{chunk-OH3TOQTB.js → chunk-K4XHGFR5.js} +751 -15
- package/dist/{chunk-EYPA3EGJ.js → chunk-KTYTFRMB.js} +178 -14
- package/dist/chunk-LU7P4LHA.js +33 -0
- package/dist/chunk-ME6CCNFO.js +108 -0
- package/dist/chunk-MXKJU4JB.js +1100 -0
- package/dist/{chunk-RY3LY4J5.js → chunk-N22QMJKY.js} +21 -18
- package/dist/chunk-NMPKI6XL.js +3006 -0
- package/dist/chunk-NUGM5KR6.js +165 -0
- package/dist/{chunk-22NAGB7X.js → chunk-P43ETTHK.js} +5 -94
- package/dist/{chunk-NILBFAPG.js → chunk-PMDBGQSJ.js} +2 -2
- package/dist/chunk-PT7HYKEM.js +165 -0
- package/dist/chunk-RVG5JXAL.js +41 -0
- package/dist/{chunk-GEYXPTRF.js → chunk-RWSI4YD7.js} +2 -2
- package/dist/{chunk-4BPJXDWC.js → chunk-TANS5ZJS.js} +35 -19
- package/dist/{verifiers-NCBTHHN2.js → chunk-TB5666IT.js} +67 -324
- package/dist/{chunk-QM3F2GKX.js → chunk-TLQJPP24.js} +7927 -8088
- package/dist/{chunk-G7MUEIGA.js → chunk-TT36MB5S.js} +2 -1
- package/dist/chunk-TTHACPOM.js +961 -0
- package/dist/{chunk-6US73PDB.js → chunk-TYPGUK6W.js} +7 -7
- package/dist/{chunk-MFFY33HR.js → chunk-U6MBIEMB.js} +554 -209
- package/dist/chunk-VAWNZU7Z.js +242 -0
- package/dist/{chunk-IR4CFBFN.js → chunk-VCBR6CU7.js} +12 -12
- package/dist/{chunk-WHJYKASB.js → chunk-VHN4MY6O.js} +2 -2
- package/dist/{chunk-XYDYPRZI.js → chunk-VWZOAB7K.js} +10 -10
- package/dist/{chunk-ZRGEBJ4T.js → chunk-WLFILSD5.js} +48 -48
- package/dist/{chunk-K7T3E2SR.js → chunk-WNIJTQQK.js} +12 -11
- package/dist/{chunk-CYQKWTG3.js → chunk-WSB3FPX7.js} +68 -20
- package/dist/{chunk-KHSFENX2.js → chunk-WWCZ5F23.js} +116 -14
- package/dist/{chunk-XE2VEJHX.js → chunk-WXY7KU3G.js} +2 -2
- package/dist/{chunk-PPAMZ32Z.js → chunk-XK56QHLX.js} +6 -1
- package/dist/{chunk-KOHPCX4K.js → chunk-XWSF374K.js} +5 -5
- package/dist/{chunk-CJUB2JJ2.js → chunk-YS5VLNH5.js} +10 -10
- package/dist/{chunk-ZZMN5OM4.js → chunk-ZNLWCMVZ.js} +2 -2
- package/dist/{chunk-WHGPSPT5.js → chunk-ZVJ5BLO2.js} +2 -2
- package/dist/cli/index.js +33 -31
- package/dist/{clio-M2KGYUFZ.js → clio-QVTYJ57A.js} +10 -10
- package/dist/{code-nav-GQNL7XA6.js → code-nav-FGGFIE7L.js} +5 -5
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-5TTYYX6G.js → components-ZFA3SAER.js} +9 -9
- package/dist/{config-XUUYQIWO.js → config-LW5IJFQN.js} +65 -55
- package/dist/{configure-IHJ7YOMV.js → configure-7XIZCOU4.js} +29 -24
- package/dist/{context-75MIWW3U.js → context-L3WL3X7K.js} +54 -43
- package/dist/{context-ZQ7SIFJV.js → context-N52ZA626.js} +30 -14
- package/dist/{context-74JLXAWD.js → context-Y6Y7QPR6.js} +12 -12
- package/dist/{context-clear-GYKWNUML.js → context-clear-MBQRLSDQ.js} +54 -43
- package/dist/{context-index-SSR5ECNE.js → context-index-HVMFQHK3.js} +5 -5
- package/dist/{context-working-set-UX5KEP4J.js → context-working-set-GS6DSO7F.js} +18 -18
- package/dist/{dispatch-runner-GIJBHNFL.js → dispatch-runner-22ZCNOM3.js} +367 -79
- package/dist/{docs-6FZSCG5B.js → docs-7LQ23DLM.js} +9 -9
- package/dist/{doctor-SVJ5BZCW.js → doctor-M7YEDGAE.js} +27 -23
- package/dist/{eval-CG6LLBLD.js → eval-BEC2WHDA.js} +73 -20
- package/dist/{evidence-ZYFIEN42.js → evidence-REJUMSKM.js} +70 -59
- package/dist/{evolve-QGEXEMDW.js → evolve-PY5ZBA5K.js} +50 -39
- package/dist/{extensions-ADGNCJJD.js → extensions-HVKU65YU.js} +7 -7
- package/dist/{fleet-S5R4ZOQY.js → fleet-7WZEWRFA.js} +236 -377
- package/dist/fleet-commands-UVHWM76J.js +70 -0
- package/dist/fleet-graph-6ULH7PES.js +125 -0
- package/dist/fleet-new-RDVJLHHH.js +48 -0
- package/dist/{fleet-preflight-BHSNPBMH.js → fleet-preflight-J53T6CCE.js} +5 -5
- package/dist/fleet-validate-72PC4SLA.js +79 -0
- package/dist/{init-5DRU55YR.js → init-OG3TPGQG.js} +69 -57
- package/dist/library-CNTMPLRF.js +217 -0
- package/dist/{memory-7YKKR6UC.js → memory-6IS7F275.js} +52 -41
- package/dist/{models-ZPOLRU2C.js → models-ENRJDA5W.js} +37 -31
- package/dist/{monitor-US5F5YGZ.js → monitor-XLDVO7TN.js} +79 -42
- package/dist/{orchestrator-E2AL4T5N.js → orchestrator-6KSPYRHA.js} +4126 -762
- package/dist/{paths-E7KYAQWE.js → paths-DBXMZMDU.js} +6 -6
- package/dist/registry-LG64LTF4.js +11 -0
- package/dist/{reset-KZ652EK6.js → reset-RZ4ER727.js} +12 -12
- package/dist/{run-SRNBKDWD.js → run-Y2CNK5RU.js} +89 -76
- package/dist/{share-CGZE33UP.js → share-A55GYP6Z.js} +37 -13
- package/dist/{skills-S2X4DLY5.js → skills-ALC5J6AT.js} +29 -13
- package/dist/{skills-eval-W2GGIC4R.js → skills-eval-JPBEBYQU.js} +60 -48
- package/dist/support-MIETYA5E.js +38 -0
- package/dist/{targets-54SWINWB.js → targets-VGNXIR3S.js} +46 -36
- package/dist/{terminal-lease-SAIF2OGY.js → terminal-lease-WOBR64YA.js} +4 -4
- package/dist/{uninstall-BVLWXKBT.js → uninstall-ZJF5H5ZN.js} +9 -9
- package/dist/{upgrade-JKAR27XC.js → upgrade-FUSUAGHR.js} +31 -28
- package/dist/{usage-MSAWCLX4.js → usage-N4MKVHKD.js} +140 -68
- package/dist/verifiers-YAWOJ3H2.js +336 -0
- package/dist/{verify-X5HDROLA.js → verify-LTDHYBGY.js} +10 -9
- package/dist/{wiki-generate-GUSOQ6ZP.js → wiki-generate-6M7GHTBJ.js} +75 -62
- package/dist/worker/entry.js +67 -57
- package/docs/README.md +3 -2
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-versions.md +11 -6
- package/docs/built-in-agents.md +26 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +83 -3
- package/docs/configuration-and-targets.md +86 -4
- package/docs/context-engine.md +1 -1
- package/docs/development-pipeline.md +1 -1
- package/docs/dispatch-architecture-rationale.md +1 -1
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +3 -3
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +1 -1
- package/docs/evidence-and-memory.md +74 -10
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +4 -1
- package/docs/extensions-and-sharing.md +6 -2
- package/docs/fleet-demo-runbook.md +2 -2
- package/docs/fleet-dispatch.md +228 -16
- package/docs/git-commit-provenance.md +2 -2
- package/docs/glossary.md +22 -2
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +2 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +56 -9
- package/docs/proactive-memory.md +1 -1
- package/docs/prompt-envelope-and-tools.md +4 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +83 -65
- package/docs/resource-library.md +59 -0
- package/docs/safety-model.md +2 -2
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +37 -1
- package/docs/skills-marketplace.md +16 -3
- package/docs/tool-usage.md +14 -7
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +1 -2
- package/src/cli/argv.ts +5 -0
- package/src/cli/configure.ts +107 -23
- package/src/cli/doctor.ts +5 -1
- package/src/cli/evidence.ts +30 -25
- package/src/cli/fleet-commands.ts +37 -0
- package/src/cli/fleet-graph.ts +102 -0
- package/src/cli/fleet-new.ts +36 -0
- package/src/cli/fleet-preflight.ts +111 -0
- package/src/cli/fleet-validate.ts +30 -0
- package/src/cli/fleet.ts +173 -335
- package/src/cli/index.ts +3 -1
- package/src/cli/library.ts +190 -0
- package/src/cli/share.ts +13 -1
- package/src/cli/shared.ts +1 -0
- package/src/cli/targets.ts +4 -1
- package/src/cli/usage.ts +111 -19
- package/src/cli/validate-model.ts +60 -5
- package/src/core/bus-events.ts +29 -0
- package/src/core/commit-attribution.ts +4 -4
- package/src/core/config.ts +130 -0
- package/src/core/defaults.ts +81 -0
- package/src/core/path-boundary.ts +100 -0
- package/src/domains/agents/builtins/architect.md +1 -0
- package/src/domains/agents/builtins/oracle.md +33 -0
- package/src/domains/agents/catalog.ts +13 -1
- package/src/domains/agents/extension.ts +2 -11
- package/src/domains/agents/fleet-contract.ts +304 -24
- package/src/domains/agents/index.ts +14 -0
- package/src/domains/agents/recipe.ts +7 -1
- package/src/domains/agents/registry.ts +73 -5
- package/src/domains/agents/result-contract.ts +360 -15
- package/src/domains/agents/write-boundary.ts +15 -50
- package/src/domains/config/classify.ts +4 -0
- package/src/domains/context/project-rules.ts +51 -1
- package/src/domains/dispatch/active-route-planner.ts +14 -0
- package/src/domains/dispatch/assignment-reconcile.ts +22 -5
- package/src/domains/dispatch/assignment-store.ts +151 -14
- package/src/domains/dispatch/backoff.ts +2 -1
- package/src/domains/dispatch/capability-match.ts +1 -0
- package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
- package/src/domains/dispatch/contract.ts +48 -0
- package/src/domains/dispatch/delegation-plan.ts +164 -0
- package/src/domains/dispatch/execution-plan.ts +76 -5
- package/src/domains/dispatch/execution-role.ts +12 -2
- package/src/domains/dispatch/execution-scheduler.ts +183 -67
- package/src/domains/dispatch/extension.ts +412 -74
- package/src/domains/dispatch/fleet-gate.ts +14 -0
- package/src/domains/dispatch/fleet-plan.ts +63 -3
- package/src/domains/dispatch/fleet-run.ts +791 -0
- package/src/domains/dispatch/gate-role-prompts.ts +47 -0
- package/src/domains/dispatch/host-verification.ts +178 -0
- package/src/domains/dispatch/index.ts +41 -1
- package/src/domains/dispatch/intent-requirements.ts +40 -0
- package/src/domains/dispatch/intent.ts +235 -0
- package/src/domains/dispatch/path-scope.ts +370 -0
- package/src/domains/dispatch/receipt-integrity.ts +9 -4
- package/src/domains/dispatch/state.ts +36 -3
- package/src/domains/dispatch/types.ts +64 -12
- package/src/domains/dispatch/validation.ts +69 -6
- package/src/domains/dispatch/write-boundary-enforcer.ts +45 -0
- package/src/domains/dispatch/write-boundary.ts +201 -22
- package/src/domains/eval/metrics/evidence.ts +79 -2
- package/src/domains/eval/runners/clio-run.ts +12 -2
- package/src/domains/evidence/build.ts +69 -11
- package/src/domains/evidence/index.ts +21 -0
- package/src/domains/evidence/provenance.ts +46 -11
- package/src/domains/evidence/trust-projection.ts +274 -0
- package/src/domains/evidence/trust-status.ts +155 -18
- package/src/domains/evidence/types.ts +4 -0
- package/src/domains/extensions/discovery.ts +88 -1
- package/src/domains/extensions/resources.ts +20 -8
- package/src/domains/extensions/state.ts +6 -2
- package/src/domains/extensions/types.ts +4 -1
- package/src/domains/lifecycle/doctor.ts +140 -1
- package/src/domains/middleware/index.ts +15 -0
- package/src/domains/middleware/watchdog.ts +281 -0
- package/src/domains/observability/contract.ts +3 -1
- package/src/domains/observability/cost.ts +12 -1
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/observability/index.ts +10 -0
- package/src/domains/observability/out-of-turn-usage.ts +223 -0
- package/src/domains/prompts/contract.ts +3 -5
- package/src/domains/providers/extension.ts +30 -2
- package/src/domains/resources/common-loader.ts +3 -0
- package/src/domains/resources/index.ts +20 -0
- package/src/domains/resources/library.ts +326 -0
- package/src/domains/resources/prompts/loader.ts +119 -14
- package/src/domains/resources/skills/marketplace.ts +37 -12
- package/src/domains/safety/policy-engine.ts +5 -5
- package/src/domains/safety/run-effects.ts +64 -1
- package/src/domains/safety/scope.ts +7 -12
- package/src/domains/session/handoff.ts +629 -0
- package/src/domains/share/archive.ts +67 -2
- package/src/engine/acp/server.ts +4 -1
- package/src/engine/prompt-templates.ts +18 -1
- package/src/engine/worker-runtime.ts +6 -3
- package/src/entry/orchestrator.ts +37 -0
- package/src/interactive/bus-notices.ts +26 -0
- package/src/interactive/chat-loop.ts +235 -1
- package/src/interactive/chat-renderer.ts +22 -0
- package/src/interactive/cost-overlay.ts +31 -3
- package/src/interactive/council-dispatch.ts +30 -0
- package/src/interactive/council-grid.ts +213 -0
- package/src/interactive/council.ts +99 -0
- package/src/interactive/dispatch-board.ts +311 -17
- package/src/interactive/fleet-run-preview.ts +307 -0
- package/src/interactive/footer/notifications.ts +219 -0
- package/src/interactive/handoff-round.ts +56 -0
- package/src/interactive/interactive-application.ts +43 -1
- package/src/interactive/interactive-event-projection.ts +23 -1
- package/src/interactive/interactive-slash-runtime.ts +52 -2
- package/src/interactive/interactive-subscriptions.ts +14 -2
- package/src/interactive/oracle.ts +179 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +6 -0
- package/src/interactive/overlay-general-openers.ts +190 -1
- package/src/interactive/overlay-key-routing.ts +17 -1
- package/src/interactive/overlay-lifecycle.ts +41 -1
- package/src/interactive/overlay-permission-lifecycle.ts +10 -0
- package/src/interactive/overlay-resource-openers.ts +11 -3
- package/src/interactive/overlay-session-lifecycle.ts +234 -2
- package/src/interactive/overlays/fleet-run-approval.ts +208 -0
- package/src/interactive/overlays/handoff-review.ts +185 -0
- package/src/interactive/overlays/library-install-confirm.ts +151 -0
- package/src/interactive/overlays/list-overlay.ts +168 -2
- package/src/interactive/overlays/settings.ts +221 -30
- package/src/interactive/overlays/side-question.ts +139 -0
- package/src/interactive/overlays/skills-hub.ts +401 -15
- package/src/interactive/side-question.ts +171 -0
- package/src/interactive/slash-commands.ts +439 -7
- package/src/interactive/slash-spec.ts +19 -6
- package/src/interactive/theme/tokens.ts +30 -0
- package/src/interactive/turn-middleware.ts +15 -1
- package/src/interactive/view/artifacts.ts +42 -9
- package/src/interactive/view/view-overlay.ts +15 -3
- package/src/interactive/watchdog-run.ts +75 -0
- package/src/interactive/worker-receipts.ts +14 -2
- package/src/interactive/worker-share.ts +56 -1
- package/src/interactive/worker-stream.ts +15 -0
- package/src/tools/bootstrap.ts +3 -0
- package/src/tools/compete-worktrees.ts +13 -79
- package/src/tools/dispatch-admission.ts +251 -18
- package/src/tools/dispatch-arguments.ts +84 -1
- package/src/tools/dispatch-plan.ts +165 -6
- package/src/tools/dispatch-runner.ts +364 -23
- package/src/tools/dispatch-types.ts +20 -1
- package/src/tools/dispatch.ts +72 -2
- package/src/tools/monitor.ts +29 -0
- package/src/tools/profiles.ts +18 -4
- package/src/tools/task-worktree.ts +238 -0
- package/src/tools/verify/authoring.ts +61 -1
- package/src/tools/verify/scripts.ts +62 -0
- package/src/tools/worker-evidence.ts +21 -14
- package/src/worker/spec-contract.ts +3 -1
- package/dist/chunk-HC4CLZ2Y.js +0 -68
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
durableAssistantTextFromEvent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TLQJPP24.js";
|
|
5
5
|
import {
|
|
6
6
|
responseModelIdObservationFromRecord
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YS5VLNH5.js";
|
|
8
8
|
import {
|
|
9
9
|
init_esm_shims
|
|
10
10
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
assistantTextFromEvent,
|
|
35
35
|
receiptResponseModelIdObservationLabel
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-HLE42MG7.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
printError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XK56QHLX.js";
|
|
5
5
|
import {
|
|
6
6
|
source_default
|
|
7
7
|
} from "./chunk-5TSRNF4G.js";
|
|
8
8
|
import {
|
|
9
9
|
authStoragePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EQ63NRB7.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
13
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
printPlaintextCredentialWarning,
|
|
36
36
|
credentialWriteFailed
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-IFBNV6H6.js.map
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
INHERITED_PROJECT_CONTEXT,
|
|
4
|
-
acceptInteropAgents,
|
|
5
|
-
declineInteropAgents,
|
|
6
|
-
detectInteropAgents,
|
|
7
|
-
fingerprintNativeRuntime,
|
|
8
|
-
interopProposals,
|
|
9
|
-
renderProposalEntry
|
|
10
|
-
} from "./chunk-RD5U66HV.js";
|
|
11
|
-
import {
|
|
12
|
-
initializeClioHome
|
|
13
|
-
} from "./chunk-KOHPCX4K.js";
|
|
14
2
|
import {
|
|
15
3
|
createDelayedManualCodeInput,
|
|
16
4
|
promptOAuthSelection
|
|
@@ -25,39 +13,61 @@ import {
|
|
|
25
13
|
import {
|
|
26
14
|
credentialWriteFailed,
|
|
27
15
|
printPlaintextCredentialWarning
|
|
28
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IFBNV6H6.js";
|
|
17
|
+
import {
|
|
18
|
+
INHERITED_PROJECT_CONTEXT,
|
|
19
|
+
acceptInteropAgents,
|
|
20
|
+
declineInteropAgents,
|
|
21
|
+
detectInteropAgents,
|
|
22
|
+
fingerprintNativeRuntime,
|
|
23
|
+
interopProposals,
|
|
24
|
+
renderProposalEntry
|
|
25
|
+
} from "./chunk-GPIEI3LY.js";
|
|
26
|
+
import {
|
|
27
|
+
initializeClioHome
|
|
28
|
+
} from "./chunk-XWSF374K.js";
|
|
29
29
|
import {
|
|
30
30
|
printError,
|
|
31
31
|
printOk
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XK56QHLX.js";
|
|
33
33
|
import {
|
|
34
|
-
buildProviderSupportEntry,
|
|
35
|
-
configuredTargetsForRuntime,
|
|
36
|
-
credentialsPresent,
|
|
37
|
-
describeRuntimeModels,
|
|
38
|
-
getCatalogModelForRuntime,
|
|
39
|
-
getRuntimeRegistry,
|
|
40
|
-
greetLmStudio,
|
|
41
34
|
isOrchestratorEligibleRuntime,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} from "./chunk-DJVECN66.js";
|
|
35
|
+
probeCapabilitiesForModel
|
|
36
|
+
} from "./chunk-7RFXX52T.js";
|
|
37
|
+
import {
|
|
38
|
+
credentialsPresent
|
|
39
|
+
} from "./chunk-LU7P4LHA.js";
|
|
48
40
|
import {
|
|
49
41
|
readSettings,
|
|
50
42
|
removeTargetFromSettings,
|
|
51
43
|
settingsPath,
|
|
52
44
|
updateSettings
|
|
53
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IJ7RPIYJ.js";
|
|
46
|
+
import {
|
|
47
|
+
greetLmStudio,
|
|
48
|
+
registerBuiltinRuntimes
|
|
49
|
+
} from "./chunk-NMPKI6XL.js";
|
|
50
|
+
import {
|
|
51
|
+
buildProviderSupportEntry,
|
|
52
|
+
configuredTargetsForRuntime,
|
|
53
|
+
describeRuntimeModels,
|
|
54
|
+
listKnownModelsForRuntime,
|
|
55
|
+
listProviderSupportEntries,
|
|
56
|
+
supportGroupLabel
|
|
57
|
+
} from "./chunk-IIZWH4XA.js";
|
|
54
58
|
import {
|
|
55
59
|
openAuthStorage,
|
|
56
60
|
registerClioOAuthProviders,
|
|
57
61
|
resolveAuthTarget,
|
|
58
62
|
resolveRuntimeAuthTarget,
|
|
59
63
|
targetRequiresAuth
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-EQ63NRB7.js";
|
|
65
|
+
import {
|
|
66
|
+
getRuntimeRegistry
|
|
67
|
+
} from "./chunk-NUGM5KR6.js";
|
|
68
|
+
import {
|
|
69
|
+
getCatalogModelForRuntime
|
|
70
|
+
} from "./chunk-PT7HYKEM.js";
|
|
61
71
|
import {
|
|
62
72
|
init_esm_shims
|
|
63
73
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -261,9 +271,21 @@ function formatRuntimeList(rows, width) {
|
|
|
261
271
|
|
|
262
272
|
// src/cli/validate-model.ts
|
|
263
273
|
init_esm_shims();
|
|
274
|
+
var SAMPLE_SIZE = 10;
|
|
275
|
+
function sample(models) {
|
|
276
|
+
const shown = models.slice(0, SAMPLE_SIZE).join(", ");
|
|
277
|
+
return models.length > SAMPLE_SIZE ? `${shown}, \u2026` : shown;
|
|
278
|
+
}
|
|
279
|
+
function describeLiveTarget(live) {
|
|
280
|
+
return live.url ? `target '${live.targetId}' at ${live.url}` : `target '${live.targetId}'`;
|
|
281
|
+
}
|
|
282
|
+
function formatUnadvertisedModelReason(modelId, live) {
|
|
283
|
+
const resident = live.resident.length > 0 ? live.resident.join(", ") : "none";
|
|
284
|
+
return `${describeLiveTarget(live)} does not advertise model '${modelId}'. Advertised (${live.models.length}): ${sample(live.models)}. Resident instances: ${resident}. Pass one of the advertised ids with --model, or --force to save a model the target cannot serve.`;
|
|
285
|
+
}
|
|
264
286
|
function validateModelChoice(input2) {
|
|
265
|
-
const { runtimeId, modelId, knownModels, force } = input2;
|
|
266
|
-
if (knownModels.length === 0) return
|
|
287
|
+
const { runtimeId, modelId, knownModels, live, force } = input2;
|
|
288
|
+
if (knownModels.length === 0) return validateAgainstLive(modelId, live, force);
|
|
267
289
|
if (knownModels.includes(modelId)) return { ok: true };
|
|
268
290
|
if (force) {
|
|
269
291
|
return {
|
|
@@ -271,13 +293,19 @@ function validateModelChoice(input2) {
|
|
|
271
293
|
warning: `model '${modelId}' not in ${runtimeId} catalog (use without --force to reject)`
|
|
272
294
|
};
|
|
273
295
|
}
|
|
274
|
-
const sample = knownModels.slice(0, 10).join(", ");
|
|
275
296
|
return {
|
|
276
297
|
ok: false,
|
|
277
|
-
reason: `model '${modelId}' not in ${runtimeId} catalog. Known: ${sample}. Use --force to skip validation.`,
|
|
278
|
-
knownModels: knownModels.slice(0,
|
|
298
|
+
reason: `model '${modelId}' not in ${runtimeId} catalog. Known: ${sample(knownModels)}. Use --force to skip validation.`,
|
|
299
|
+
knownModels: knownModels.slice(0, SAMPLE_SIZE)
|
|
279
300
|
};
|
|
280
301
|
}
|
|
302
|
+
function validateAgainstLive(modelId, live, force) {
|
|
303
|
+
if (!live || live.models.length === 0) return { ok: true };
|
|
304
|
+
if (live.models.includes(modelId)) return { ok: true };
|
|
305
|
+
const reason = formatUnadvertisedModelReason(modelId, live);
|
|
306
|
+
if (force) return { ok: true, warning: `${reason.replace(/ Pass one of.*$/u, "")} Saved anyway because of --force.` };
|
|
307
|
+
return { ok: false, reason, knownModels: live.models.slice(0, SAMPLE_SIZE) };
|
|
308
|
+
}
|
|
281
309
|
|
|
282
310
|
// src/cli/configure.ts
|
|
283
311
|
var HELP = `clio-coder configure
|
|
@@ -304,7 +332,8 @@ Non-interactive flags:
|
|
|
304
332
|
--agent-profile-model <id> model to use for --agent-profile
|
|
305
333
|
--api-key-env <VAR> read API key from this env var at call time
|
|
306
334
|
--api-key <literal> store API key in credentials.yaml
|
|
307
|
-
--force
|
|
335
|
+
--force save a model outside the runtime catalog, or one the
|
|
336
|
+
target does not advertise, without refusing
|
|
308
337
|
--gateway mark the target as a gateway
|
|
309
338
|
--lifecycle <user-managed|clio-managed>
|
|
310
339
|
resident model lifecycle policy
|
|
@@ -552,14 +581,11 @@ function catalogContextWindowFor(runtime, modelId) {
|
|
|
552
581
|
}
|
|
553
582
|
return null;
|
|
554
583
|
}
|
|
555
|
-
function validateResolvedModel(
|
|
584
|
+
function validateResolvedModel(runtime, target, modelId, force, inventory) {
|
|
556
585
|
if (!modelId) return true;
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
knownModels: runtimeKnownModelsFor(runtimeId),
|
|
561
|
-
force
|
|
562
|
-
});
|
|
586
|
+
const knownModels = runtimeKnownModelsFor(runtime.id);
|
|
587
|
+
const live = inventory.source === "probe" ? liveInventoryFor(target, inventory) : void 0;
|
|
588
|
+
const validation = validateModelChoice({ runtimeId: runtime.id, modelId, knownModels, live, force });
|
|
563
589
|
if (!validation.ok) {
|
|
564
590
|
process.stderr.write(`error: ${validation.reason}
|
|
565
591
|
`);
|
|
@@ -567,6 +593,12 @@ function validateResolvedModel(runtimeId, modelId, force) {
|
|
|
567
593
|
}
|
|
568
594
|
if (validation.warning) process.stderr.write(`warning: ${validation.warning}
|
|
569
595
|
`);
|
|
596
|
+
if (knownModels.length === 0 && live === void 0 && runtime.kind === "http") {
|
|
597
|
+
process.stderr.write(
|
|
598
|
+
`warning: could not verify model '${modelId}': ${target.url ?? `target '${target.id}'`} returned no model list; it is saved as written
|
|
599
|
+
`
|
|
600
|
+
);
|
|
601
|
+
}
|
|
570
602
|
return true;
|
|
571
603
|
}
|
|
572
604
|
function validateContextWindowOverride(runtime, modelId, contextWindow, force) {
|
|
@@ -583,10 +615,11 @@ function validateContextWindowOverride(runtime, modelId, contextWindow, force) {
|
|
|
583
615
|
`);
|
|
584
616
|
return true;
|
|
585
617
|
}
|
|
586
|
-
async function runtimeProbe(runtime, target) {
|
|
618
|
+
async function runtimeProbe(runtime, target, authToken) {
|
|
587
619
|
if (typeof runtime.probe !== "function") return null;
|
|
588
620
|
try {
|
|
589
|
-
|
|
621
|
+
const context = await buildProbeContext(runtime, target);
|
|
622
|
+
return await runtime.probe(target, authToken === void 0 ? context : { ...context, authToken });
|
|
590
623
|
} catch (err) {
|
|
591
624
|
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
592
625
|
}
|
|
@@ -807,12 +840,36 @@ Open: ${verificationUri}
|
|
|
807
840
|
manualCodeInput.cancel();
|
|
808
841
|
}
|
|
809
842
|
}
|
|
843
|
+
function advertisedModelIds(inventory) {
|
|
844
|
+
const ids = [...inventory.models];
|
|
845
|
+
for (const id of Object.keys(inventory.modelStates ?? {})) if (!ids.includes(id)) ids.push(id);
|
|
846
|
+
return ids;
|
|
847
|
+
}
|
|
848
|
+
function residentModelIds(modelStates) {
|
|
849
|
+
return Object.entries(modelStates ?? {}).filter(([, status]) => status.state === "loaded" || status.state === "loading").map(([id]) => id);
|
|
850
|
+
}
|
|
851
|
+
function liveInventoryFor(target, inventory) {
|
|
852
|
+
return {
|
|
853
|
+
targetId: target.id,
|
|
854
|
+
url: target.url,
|
|
855
|
+
models: advertisedModelIds(inventory),
|
|
856
|
+
resident: residentModelIds(inventory.modelStates)
|
|
857
|
+
};
|
|
858
|
+
}
|
|
810
859
|
async function resolveSupportedWireModels(runtime, target, existing, authToken) {
|
|
811
860
|
const known = listKnownModelsForRuntime(runtime.id);
|
|
812
|
-
if (known.length > 0) return known;
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
861
|
+
if (known.length > 0) return { models: known, source: "catalog" };
|
|
862
|
+
if (runtime.kind === "http") {
|
|
863
|
+
const probe = await runtimeProbe(runtime, target, authToken);
|
|
864
|
+
if (probe?.ok && probe.models && probe.models.length > 0) {
|
|
865
|
+
return { models: [...probe.models], source: "probe", modelStates: probe.modelStates };
|
|
866
|
+
}
|
|
867
|
+
const discovered = await runtimeProbeModels(runtime, target, authToken);
|
|
868
|
+
if (discovered.length > 0) return { models: discovered, source: "probe" };
|
|
869
|
+
}
|
|
870
|
+
if (existing?.wireModels && existing.wireModels.length > 0)
|
|
871
|
+
return { models: [...existing.wireModels], source: "existing" };
|
|
872
|
+
return { models: [], source: "none" };
|
|
816
873
|
}
|
|
817
874
|
function resolveModelChoice(answer, wireModels, defaultValue) {
|
|
818
875
|
if (answer.length === 0) return defaultValue;
|
|
@@ -903,13 +960,14 @@ async function runNonInteractive(runtime, args) {
|
|
|
903
960
|
...args.reasoning !== void 0 ? { reasoning: args.reasoning } : {},
|
|
904
961
|
...existing?.lmstudio ? { lmstudio: existing.lmstudio } : {}
|
|
905
962
|
});
|
|
906
|
-
const
|
|
963
|
+
const inventory = await resolveSupportedWireModels(runtime, seed, existing, args.apiKey);
|
|
964
|
+
const wireModels = inventory.models;
|
|
907
965
|
const model = args.model ?? existing?.defaultModel ?? support.defaultModel ?? (support.modelSource === "catalog" ? void 0 : wireModels[0]);
|
|
908
966
|
if (model === void 0 && support.modelSource === "catalog") {
|
|
909
967
|
refuseCatalogSeededModel(runtime, support);
|
|
910
968
|
return 2;
|
|
911
969
|
}
|
|
912
|
-
if (!validateResolvedModel(runtime
|
|
970
|
+
if (!validateResolvedModel(runtime, seed, model, args.force, inventory)) return 2;
|
|
913
971
|
if (!validateContextWindowOverride(runtime, model, args.contextWindow, args.force)) return 2;
|
|
914
972
|
const descriptor = buildDescriptor(runtime, args.id, {
|
|
915
973
|
...url !== void 0 ? { url } : {},
|
|
@@ -1222,7 +1280,7 @@ Selected runtime: ${runtime.id} (${support.summary})
|
|
|
1222
1280
|
oauthProfile = runtime.oauthProviderId ?? runtime.id;
|
|
1223
1281
|
}
|
|
1224
1282
|
let model = defaults.model;
|
|
1225
|
-
let
|
|
1283
|
+
let inventory = existing?.wireModels && existing.wireModels.length > 0 ? { models: [...existing.wireModels], source: "existing" } : { models: [], source: "none" };
|
|
1226
1284
|
const tentative = buildDescriptor(runtime, targetId, {
|
|
1227
1285
|
...url !== void 0 ? { url } : {},
|
|
1228
1286
|
...apiKeyEnv !== void 0 ? { apiKeyEnv } : {},
|
|
@@ -1236,8 +1294,9 @@ Selected runtime: ${runtime.id} (${support.summary})
|
|
|
1236
1294
|
...existing?.lmstudio ? { lmstudio: existing.lmstudio } : {}
|
|
1237
1295
|
});
|
|
1238
1296
|
if (runtime.kind === "http") {
|
|
1239
|
-
|
|
1297
|
+
inventory = await resolveSupportedWireModels(runtime, tentative, existing ?? void 0);
|
|
1240
1298
|
}
|
|
1299
|
+
const wireModels = inventory.models;
|
|
1241
1300
|
const catalogOrdered = support.modelSource === "catalog";
|
|
1242
1301
|
model = model ?? existing?.defaultModel ?? support.defaultModel ?? (catalogOrdered ? void 0 : wireModels[0]);
|
|
1243
1302
|
if (wireModels.length > 0) {
|
|
@@ -1258,11 +1317,11 @@ Selected runtime: ${runtime.id} (${support.summary})
|
|
|
1258
1317
|
process.stdout.write(" a model is required: enter a number from the list or a model id.\n");
|
|
1259
1318
|
continue;
|
|
1260
1319
|
}
|
|
1261
|
-
if (validateResolvedModel(runtime
|
|
1320
|
+
if (validateResolvedModel(runtime, tentative, model, defaults.force, inventory)) break;
|
|
1262
1321
|
}
|
|
1263
1322
|
} else {
|
|
1264
1323
|
for (; ; ) {
|
|
1265
|
-
if (model && validateResolvedModel(runtime
|
|
1324
|
+
if (model && validateResolvedModel(runtime, tentative, model, defaults.force, inventory)) break;
|
|
1266
1325
|
const manual = await ask(rl, "Default model id (blank to leave empty)", model ?? "");
|
|
1267
1326
|
if (manual === null) return 0;
|
|
1268
1327
|
model = manual.length > 0 ? manual : void 0;
|
|
@@ -1489,4 +1548,4 @@ export {
|
|
|
1489
1548
|
runTargetRename,
|
|
1490
1549
|
runConfigureCommand
|
|
1491
1550
|
};
|
|
1492
|
-
//# sourceMappingURL=chunk-
|
|
1551
|
+
//# sourceMappingURL=chunk-IGWKHNIQ.js.map
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
resolveAuthTarget,
|
|
4
|
+
resolveRuntimeAuthTarget
|
|
5
|
+
} from "./chunk-EQ63NRB7.js";
|
|
6
|
+
import {
|
|
7
|
+
getRuntimeRegistry
|
|
8
|
+
} from "./chunk-NUGM5KR6.js";
|
|
9
|
+
import {
|
|
10
|
+
catalogProviderForRuntime,
|
|
11
|
+
listCatalogModelsForRuntime
|
|
12
|
+
} from "./chunk-PT7HYKEM.js";
|
|
13
|
+
import {
|
|
14
|
+
init_esm_shims
|
|
15
|
+
} from "./chunk-3R73A4XB.js";
|
|
16
|
+
|
|
17
|
+
// src/domains/providers/support.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
var SUMMARY_BY_RUNTIME_ID = {
|
|
20
|
+
alcf: "ALCF inference gateway (Sophia/Metis) via Globus",
|
|
21
|
+
anthropic: "Anthropic API",
|
|
22
|
+
"anthropic-max": "Claude Pro/Max subscription via Anthropic OAuth",
|
|
23
|
+
bedrock: "Amazon Bedrock",
|
|
24
|
+
"claude-code": "Claude Code subscription via installed claude CLI",
|
|
25
|
+
"claude-sdk": "Claude Code subscription via Claude Agent SDK",
|
|
26
|
+
deepseek: "DeepSeek API",
|
|
27
|
+
google: "Google Gemini API",
|
|
28
|
+
groq: "Groq API",
|
|
29
|
+
mistral: "Mistral API",
|
|
30
|
+
openai: "OpenAI Platform API",
|
|
31
|
+
"openai-codex": "ChatGPT Plus/Pro via Codex OAuth",
|
|
32
|
+
openrouter: "OpenRouter API",
|
|
33
|
+
"ollama-native": "Ollama native API",
|
|
34
|
+
lmstudio: "LM Studio chat over OpenAI-compatible REST with native REST model management",
|
|
35
|
+
llamacpp: "llama.cpp server (auto-detect surface)",
|
|
36
|
+
"anthropic-compat": "Generic Anthropic-compatible REST",
|
|
37
|
+
"openai-compat": "Generic OpenAI-compatible REST"
|
|
38
|
+
};
|
|
39
|
+
function groupPriority(group) {
|
|
40
|
+
switch (group) {
|
|
41
|
+
case "featured":
|
|
42
|
+
return 0;
|
|
43
|
+
case "subscription":
|
|
44
|
+
return 1;
|
|
45
|
+
case "cloud-api":
|
|
46
|
+
return 2;
|
|
47
|
+
case "local-http":
|
|
48
|
+
return 3;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function supportGroupLabel(group) {
|
|
52
|
+
switch (group) {
|
|
53
|
+
case "featured":
|
|
54
|
+
return "Featured";
|
|
55
|
+
case "subscription":
|
|
56
|
+
return "Subscriptions";
|
|
57
|
+
case "cloud-api":
|
|
58
|
+
return "Cloud APIs";
|
|
59
|
+
case "local-http":
|
|
60
|
+
return "Local HTTP";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function classifyGroup(runtime) {
|
|
64
|
+
if (runtime.id === "openai-codex") return "featured";
|
|
65
|
+
if (runtime.id === "alcf") return "cloud-api";
|
|
66
|
+
if (runtime.auth === "oauth" || runtime.auth === "claude-cli") return "subscription";
|
|
67
|
+
if (catalogProviderForRuntime(runtime.id) || runtime.auth === "api-key" && !runtime.probe) {
|
|
68
|
+
return "cloud-api";
|
|
69
|
+
}
|
|
70
|
+
return "local-http";
|
|
71
|
+
}
|
|
72
|
+
function knownModelsFor(runtimeId, runtime) {
|
|
73
|
+
const catalogModels = listCatalogModelsForRuntime(runtimeId);
|
|
74
|
+
if (catalogModels.length === 0) return runtime?.knownModels ? [...runtime.knownModels] : [];
|
|
75
|
+
return catalogModels.map((model) => model.id);
|
|
76
|
+
}
|
|
77
|
+
function listKnownModelsForRuntime(runtimeId) {
|
|
78
|
+
return knownModelsFor(runtimeId, getRuntimeIfRegistered(runtimeId));
|
|
79
|
+
}
|
|
80
|
+
function getRuntimeIfRegistered(runtimeId) {
|
|
81
|
+
try {
|
|
82
|
+
return getRuntimeRegistry().get(runtimeId);
|
|
83
|
+
} catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function runtimeModelListSource(runtime) {
|
|
88
|
+
if (runtime.knownModels && runtime.knownModels.length > 0) return "runtime";
|
|
89
|
+
if (listCatalogModelsForRuntime(runtime.id).length > 0) return "catalog";
|
|
90
|
+
return "none";
|
|
91
|
+
}
|
|
92
|
+
function modelListSourceForRuntimeId(runtimeId) {
|
|
93
|
+
const runtime = getRuntimeIfRegistered(runtimeId);
|
|
94
|
+
if (runtime) return runtimeModelListSource(runtime);
|
|
95
|
+
return listCatalogModelsForRuntime(runtimeId).length > 0 ? "catalog" : "none";
|
|
96
|
+
}
|
|
97
|
+
function defaultModelForRuntime(runtimeId) {
|
|
98
|
+
if (modelListSourceForRuntimeId(runtimeId) === "catalog") return void 0;
|
|
99
|
+
return listKnownModelsForRuntime(runtimeId)[0];
|
|
100
|
+
}
|
|
101
|
+
function describeRuntimeModels(entry, sample) {
|
|
102
|
+
if (entry.modelSource === "catalog") return `${entry.modelHints.length} in catalog`;
|
|
103
|
+
if (entry.modelHints.length === 0) return "-";
|
|
104
|
+
return entry.modelHints.slice(0, sample).join(", ");
|
|
105
|
+
}
|
|
106
|
+
function buildProviderSupportEntry(runtime) {
|
|
107
|
+
const modelHints = knownModelsFor(runtime.id, runtime);
|
|
108
|
+
const modelSource = runtimeModelListSource(runtime);
|
|
109
|
+
const defaultModel = modelSource === "catalog" ? void 0 : modelHints[0];
|
|
110
|
+
return {
|
|
111
|
+
runtimeId: runtime.id,
|
|
112
|
+
label: runtime.displayName,
|
|
113
|
+
group: classifyGroup(runtime),
|
|
114
|
+
summary: SUMMARY_BY_RUNTIME_ID[runtime.id] ?? runtime.displayName,
|
|
115
|
+
...defaultModel ? { defaultModel } : {},
|
|
116
|
+
modelHints,
|
|
117
|
+
modelSource,
|
|
118
|
+
featured: runtime.id === "openai-codex",
|
|
119
|
+
connectable: runtime.auth === "oauth" || runtime.auth === "api-key",
|
|
120
|
+
supportsCustomUrl: runtime.kind === "http" && (classifyGroup(runtime) === "local-http" || runtime.id === "openai-compat" || runtime.id === "anthropic-compat" || runtime.id === "alcf")
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function compareProviderSupportEntries(a, b) {
|
|
124
|
+
return groupPriority(a.group) - groupPriority(b.group) || (a.featured === b.featured ? 0 : a.featured ? -1 : 1) || a.label.localeCompare(b.label) || a.runtimeId.localeCompare(b.runtimeId);
|
|
125
|
+
}
|
|
126
|
+
function listProviderSupportEntries(runtimes, options = {}) {
|
|
127
|
+
const filtered = options.includeHidden ? runtimes : runtimes.filter((runtime) => runtime.hidden !== true);
|
|
128
|
+
return filtered.map((runtime) => buildProviderSupportEntry(runtime)).sort(compareProviderSupportEntries);
|
|
129
|
+
}
|
|
130
|
+
function configuredTargetsForRuntime(settings, runtimeId) {
|
|
131
|
+
const canonical = getRuntimeIfRegistered(runtimeId)?.id ?? runtimeId;
|
|
132
|
+
return settings.targets.filter(
|
|
133
|
+
(target) => (getRuntimeIfRegistered(target.runtime)?.id ?? target.runtime) === canonical
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function resolveProviderReference(input, settings, getRuntime) {
|
|
137
|
+
const trimmed = input.trim();
|
|
138
|
+
if (trimmed.length === 0) return null;
|
|
139
|
+
const target = settings.targets.find((entry) => entry.id === trimmed) ?? null;
|
|
140
|
+
if (target) {
|
|
141
|
+
const runtime2 = getRuntime(target.runtime);
|
|
142
|
+
if (!runtime2) return null;
|
|
143
|
+
return {
|
|
144
|
+
input: trimmed,
|
|
145
|
+
target,
|
|
146
|
+
runtime: runtime2,
|
|
147
|
+
authTarget: resolveAuthTarget(target, runtime2)
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const runtime = getRuntime(trimmed);
|
|
151
|
+
if (!runtime) return null;
|
|
152
|
+
return {
|
|
153
|
+
input: trimmed,
|
|
154
|
+
target: null,
|
|
155
|
+
runtime,
|
|
156
|
+
authTarget: resolveRuntimeAuthTarget(runtime)
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export {
|
|
161
|
+
supportGroupLabel,
|
|
162
|
+
listKnownModelsForRuntime,
|
|
163
|
+
runtimeModelListSource,
|
|
164
|
+
defaultModelForRuntime,
|
|
165
|
+
describeRuntimeModels,
|
|
166
|
+
buildProviderSupportEntry,
|
|
167
|
+
compareProviderSupportEntries,
|
|
168
|
+
listProviderSupportEntries,
|
|
169
|
+
configuredTargetsForRuntime,
|
|
170
|
+
resolveProviderReference
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=chunk-IIZWH4XA.js.map
|