@gaodefa/daocore 2026.5.29 → 2026.5.30
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/dist/abort-DI3P6TIb.js +277 -0
- package/dist/abort.runtime-B6Z7lDEa.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/account-inspect-BFz7X0TX.js +173 -0
- package/dist/accounts-BoYYrY7x.js +107 -0
- package/dist/accounts-Busq29zW.js +107 -0
- package/dist/accounts-CuvH2tuN.js +119 -0
- package/dist/accounts-DkIcqvf7.js +2 -0
- package/dist/acp-runtime-BA8lzXzf.js +26 -0
- package/dist/acp-spawn-DPz2aX3A.js +2 -0
- package/dist/acp-spawn-DvVCsWYV.js +1275 -0
- package/dist/acp-stateful-target-driver-DcC76aZW.js +89 -0
- package/dist/action-kill-D-dVisIX.js +33 -0
- package/dist/action-runtime-BEiqwxDD.js +469 -0
- package/dist/action-runtime-api-1LzcGjcX.js +2 -0
- package/dist/action-send-c3CnDuPg.js +39 -0
- package/dist/action-spawn-Dj4kwpWs.js +47 -0
- package/dist/actions-qLccmQBc.js +161 -0
- package/dist/actions.runtime-B5vYAgNi.js +5 -0
- package/dist/agent-command-D6Ds198G.js +1367 -0
- package/dist/agent-components.runtime-xquK0B3L.js +10 -0
- package/dist/agent-components.runtime.js +1 -1
- package/dist/agent-harness-runtime-Dq1fCBOM.js +180 -0
- package/dist/agent-harness-task-runtime-DvSEqFkD.js +140 -0
- package/dist/agent-lm5ZYOFy.js +3 -0
- package/dist/agent-runner-execution-Dbh2pDhQ.js +1713 -0
- package/dist/agent-runner-utils-Di3r2T1T.js +266 -0
- package/dist/agent-runner.runtime-BW90EcGW.js +3455 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-BgIT5Ytc.js +229 -0
- package/dist/agent-via-gateway-DMMS8-hK.js +463 -0
- package/dist/agent-ylolD8-V.js +2 -0
- package/dist/api-BB4vXLtW.js +2 -0
- package/dist/api-CUhM3KNB.js +134 -0
- package/dist/api-CewRHSbT.js +6 -0
- package/dist/api-CfKjNJlW.js +2 -0
- package/dist/api-Rsnqui1u.js +3 -0
- package/dist/api-k7AvxwHr.js +639 -0
- package/dist/apply-DQ4TQNMA.js +54 -0
- package/dist/apply-S_75Py4Y.js +41 -0
- package/dist/approval-handler.runtime-Cthxrstu.js +130 -0
- package/dist/assistant-Cp9pGaBw.js +291 -0
- package/dist/attachment-normalize-5R0bLLOj.js +225 -0
- package/dist/attempt-execution-DuyyZYsU.js +558 -0
- package/dist/attempt-execution.runtime-DF2GPgNh.js +3 -0
- package/dist/attempt-execution.runtime.js +1 -1
- package/dist/attempt-execution.shared-CwdukA3t.js +38 -0
- package/dist/attempt.prompt-helpers-CUqKtIa5.js +475 -0
- package/dist/attempt.tool-run-context-BbN4_BYO.js +2094 -0
- package/dist/binding-routing-C6Ex2Blu.js +113 -0
- package/dist/binding-targets-BqREncSL.js +121 -0
- package/dist/bot-DGMEkaIJ.js +7894 -0
- package/dist/bot-deps-BltYjeMX.js +2 -0
- package/dist/bot-deps-XvGCor9f.js +747 -0
- package/dist/bot-message-context.runtime-kK-xvLV7.js +7 -0
- package/dist/bot-message-context.runtime.js +1 -1
- package/dist/bot-message-context.session.runtime-DpOIJUae.js +12 -0
- package/dist/bot-message-context.session.runtime.js +1 -1
- package/dist/bot-native-commands.delivery.runtime-D49p5Lc1.js +4 -0
- package/dist/bot-native-commands.delivery.runtime.js +1 -1
- package/dist/bot-native-commands.runtime-8XBdSpkQ.js +13 -0
- package/dist/bot-native-commands.runtime.js +1 -1
- package/dist/bridge-server-y_XGduPx.js +113 -0
- package/dist/browser-cli-B2jmmTT3.js +230 -0
- package/dist/browser-cli-actions-input-JQt5ZQcn.js +473 -0
- package/dist/browser-cli-actions-observe-CrfKh6AX.js +81 -0
- package/dist/browser-cli-debug-DQACWlvC.js +137 -0
- package/dist/browser-cli-inspect-DDnxx0Xw.js +104 -0
- package/dist/browser-cli-lEuOnZzs.js +2 -0
- package/dist/browser-cli-manage-DogmwtYt.js +443 -0
- package/dist/browser-cli-resize-BHuV71VZ.js +26 -0
- package/dist/browser-cli-shared-CidShgoF.js +50 -0
- package/dist/browser-cli-state-i8cCGbiQ.js +337 -0
- package/dist/browser-control-auth-CKfXdXWj.js +2 -0
- package/dist/browser-profiles-ATBTvUGh.js +2 -0
- package/dist/browser-runtime-KmCT6FuL.js +384 -0
- package/dist/build-DOOT6f62.js +257 -0
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/capability-cli-DwvrwB-g.js +1782 -0
- package/dist/channel-B-wgK1bK.js +481 -0
- package/dist/channel-B1e_k1P0.js +867 -0
- package/dist/channel-BRDfa5tc.js +1777 -0
- package/dist/channel-BVEO1O4p.js +376 -0
- package/dist/channel-BYlO5l1d.js +508 -0
- package/dist/channel-Bl0sPoNx.js +653 -0
- package/dist/channel-C84xtDBy.js +1134 -0
- package/dist/channel-CLgKq4Ds.js +1556 -0
- package/dist/channel-CZT0qxLh.js +1249 -0
- package/dist/channel-CffBHWkb.js +955 -0
- package/dist/channel-D34ZJvVB.js +2126 -0
- package/dist/channel-DcdXLo_W.js +238 -0
- package/dist/channel-DnK5TrXV.js +362 -0
- package/dist/channel-Dzj4RHY2.js +740 -0
- package/dist/channel-OhZzLZCj.js +562 -0
- package/dist/channel-actions.runtime-Cdvhqc9s.js +265 -0
- package/dist/channel-actions.runtime.js +1 -1
- package/dist/channel-core-Dz9I_R4j.js +5 -0
- package/dist/channel-inbound-COGoV_aS.js +80 -0
- package/dist/channel-mP6HCIMr.js +1496 -0
- package/dist/channel-plugin-runtime-C0R46KeG.js +998 -0
- package/dist/channel-quGdgWel.js +808 -0
- package/dist/channel-runtime-FvPQoIF9.js +408 -0
- package/dist/channel.runtime-2vUz3gij.js +109 -0
- package/dist/channel.runtime-BZLDSNuQ.js +254 -0
- package/dist/channel.runtime-Bo5jO0Hj.js +4 -0
- package/dist/channel.runtime-CDgvrjM2.js +652 -0
- package/dist/channel.runtime-COf8SDFn.js +88 -0
- package/dist/channel.runtime-C_C1f8lu.js +733 -0
- package/dist/channel.runtime-CqPbsg8t.js +2528 -0
- package/dist/channel.runtime-DtV85Khx.js +1008 -0
- package/dist/channel.runtime-Spt1ukGW.js +21009 -0
- package/dist/channel.setup-Bc0LUQS1.js +1098 -0
- package/dist/channel.setup-ChTkj2hq.js +343 -0
- package/dist/channel.setup-CpMD9F8i.js +10 -0
- package/dist/chat-mUsjD5YN.js +2666 -0
- package/dist/chrome-u314zcbM.js +1503 -0
- package/dist/cli/run-main.js +5 -5
- package/dist/cli-CJMoqXrc.js +1341 -0
- package/dist/cli-compaction-qGYB7suI.js +347 -0
- package/dist/cli-metadata-BBJFpNU9.js +22 -0
- package/dist/cli-runner-C0kcts0I.js +540 -0
- package/dist/cli-runner-CTm8K6s8.js +2 -0
- package/dist/cli-runner.runtime-C8deL5FL.js +3 -0
- package/dist/cli-runner.runtime-DDAg1D0L.js +4 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-startup-metadata.json +8 -8
- package/dist/client-CPxpgs4m.js +650 -0
- package/dist/client-adapter-CLlqOqfu.js +897 -0
- package/dist/client-factory-R7Rr2jwn.js +9 -0
- package/dist/command-auth-CkQP1buP.js +135 -0
- package/dist/command-handlers-CJEjFyMk.js +1609 -0
- package/dist/command-registry-BDgyOqDw.js +4 -0
- package/dist/command-registry-BVi5Jn1S.js +9 -0
- package/dist/command-registry-core-JCfsVRtz.js +110 -0
- package/dist/command-status.runtime-CM1JLzi6.js +90 -0
- package/dist/command-status.runtime.js +1 -1
- package/dist/commands-acp-C1-I78U6.js +74 -0
- package/dist/commands-compact.runtime-DOsNavwp.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BD1n2WGw.js +6154 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-status-DU_UTQz1.js +16 -0
- package/dist/commands-status-DejfTakp.js +3 -0
- package/dist/commands-status.runtime-DejfTakp.js +3 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-D7vo_2Y_.js +3 -0
- package/dist/commands-subagents-control.runtime-DGybTjJ6.js +2 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands-system-prompt-BEBXAMea.js +2 -0
- package/dist/commands-system-prompt-gj3oQpQO.js +162 -0
- package/dist/commands.runtime-CgXX70IN.js +176 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/commitments/runtime.js +1 -1
- package/dist/compact-C41XxMDt.js +480 -0
- package/dist/compact-DUVAF9EC.js +1141 -0
- package/dist/compact.runtime-COMRg6s3.js +12 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-CmEYoB9a.js +315 -0
- package/dist/computer-use-BwJHu1QF.js +367 -0
- package/dist/config-ATBTvUGh.js +2 -0
- package/dist/config-DlNgjF8W.js +373 -0
- package/dist/config-mutations-tl_OqI6d.js +159 -0
- package/dist/context-engine-host-compat-BNPAIK9F.js +288 -0
- package/dist/context-engine-host-compat-C69CK7zS.js +2 -0
- package/dist/context-engine-lifecycle-iQ8f5a_-.js +1274 -0
- package/dist/control-auth-vVxyGKxY.js +114 -0
- package/dist/control-service-73nj79EW.js +145 -0
- package/dist/control-ui/assets/agents-DdWIz8Vk.js +1008 -0
- package/dist/control-ui/assets/channel-config-extras-C7ELhuDi.js +2 -0
- package/dist/control-ui/assets/channels-Bsoj-9BS.js +367 -0
- package/dist/control-ui/assets/cron-BRTEw1tT.js +1013 -0
- package/dist/control-ui/assets/debug-EKl_F8_L.js +97 -0
- package/dist/control-ui/assets/index-DSbSO7ys.js +7370 -0
- package/dist/control-ui/assets/instances-B1AoYwI5.js +57 -0
- package/dist/control-ui/assets/logs-BChOznzh.js +74 -0
- package/dist/control-ui/assets/nodes-5yebKh9k.js +436 -0
- package/dist/control-ui/assets/sessions-BlDYNThc.js +399 -0
- package/dist/control-ui/assets/skills-shared-CNFnf7KU.js +11 -0
- package/dist/control-ui/assets/skills-uxTDRmLx.js +314 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/sw.js +1 -1
- package/dist/conversation-binding-runtime-CmoTKcY1.js +4 -0
- package/dist/conversation-runtime-BxOHxuin.js +31 -0
- package/dist/core-D0Y2H55f.js +282 -0
- package/dist/core-api-BKlJUtDt.js +5 -0
- package/dist/core-api-_fiftUHn.js +2 -0
- package/dist/crestodian/crestodian.js +1 -1
- package/dist/crestodian/rescue-message.js +1 -1
- package/dist/crestodian-BJifoQiR.js +55 -0
- package/dist/daocore-tools-BMdF8RwK.js +11727 -0
- package/dist/delivery-e2ci_bcX.js +1002 -0
- package/dist/dialogue-BXayGhnz.js +37 -0
- package/dist/dir-fetch-tool-Cara5mZh.js +565 -0
- package/dist/dir-list-tool-CQ8Bo5Ez.js +100 -0
- package/dist/direct-dm-CPk6Qm9D.js +64 -0
- package/dist/directive-handling.fast-lane-BQ9aXqk8.js +68 -0
- package/dist/directive-handling.impl--a5AGurq.js +818 -0
- package/dist/directive-handling.impl-C4JqMwle.js +2 -0
- package/dist/directive-handling.model-selection-pyTYMIXn.js +122 -0
- package/dist/directive-handling.persist.runtime-B7vWT1r9.js +263 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/dispatch-3Ru_eGq1.js +1640 -0
- package/dist/dispatch-acp-transcript.runtime-CYMP-5oE.js +40 -0
- package/dist/dispatch-acp-transcript.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-BVCiklXk.js +18 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/doctor-B8mR3Sgr.js +2 -0
- package/dist/doctor-BJ6DuerV.js +6 -0
- package/dist/doctor-config-flow-BdOGs_zn.js +1741 -0
- package/dist/doctor-core-checks-CDf0stz-.js +2 -0
- package/dist/doctor-core-checks-Cpdnu2XI.js +573 -0
- package/dist/doctor-health-0qv_acBu.js +65 -0
- package/dist/doctor-health-contributions-Db1FQgFw.js +696 -0
- package/dist/doctor-lint-C1g4Llgl.js +94 -0
- package/dist/doctor-state-integrity-C8iXFLJ7.js +1231 -0
- package/dist/doctor-update-CsPu6p3d.js +58 -0
- package/dist/dynamic-tools-YQ0z0YKH.js +486 -0
- package/dist/embedded-backend-S0cahIZw.js +579 -0
- package/dist/embedded-gateway-stub.runtime-Cjw12ALm.js +12 -0
- package/dist/embedded-gateway-stub.runtime.js +1 -1
- package/dist/exec-approvals-ArHHjoE-.js +149 -0
- package/dist/extensionAPI.js +1 -1
- package/dist/extensions/active-memory/index.js +1 -1
- package/dist/extensions/admin-http-rpc/index.js +1 -1
- package/dist/extensions/browser/browser-bridge.js +1 -1
- package/dist/extensions/browser/browser-config.js +4 -4
- package/dist/extensions/browser/browser-control-auth.js +2 -2
- package/dist/extensions/browser/browser-doctor.js +2 -2
- package/dist/extensions/browser/browser-maintenance.js +1 -1
- package/dist/extensions/browser/browser-profiles.js +2 -2
- package/dist/extensions/browser/browser-runtime-api.js +11 -11
- package/dist/extensions/browser/cli-metadata.js +1 -1
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/browser/plugin-registration.js +1 -1
- package/dist/extensions/browser/register.runtime.js +4 -4
- package/dist/extensions/browser/runtime-api.js +13 -13
- package/dist/extensions/canvas/index.js +1 -1
- package/dist/extensions/clickclack/api.js +2 -2
- package/dist/extensions/clickclack/channel-plugin-api.js +1 -1
- package/dist/extensions/clickclack/runtime-api.js +2 -2
- package/dist/extensions/device-pair/api.js +1 -1
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/file-transfer/index.js +4 -4
- package/dist/extensions/imessage/api.js +2 -2
- package/dist/extensions/imessage/channel-plugin-api.js +1 -1
- package/dist/extensions/imessage/message-tool-api.d.ts +1 -1
- package/dist/extensions/imessage/runtime-api.js +3 -3
- package/dist/extensions/irc/api.js +2 -2
- package/dist/extensions/irc/channel-plugin-api.js +1 -1
- package/dist/extensions/llm-task/index.js +1 -1
- package/dist/extensions/mattermost/api.js +1 -1
- package/dist/extensions/mattermost/channel-plugin-api.js +1 -1
- package/dist/extensions/mattermost/channel-plugin-runtime.js +1 -1
- package/dist/extensions/mattermost/policy-api.js +1 -1
- package/dist/extensions/mattermost/runtime-api.js +2 -2
- package/dist/extensions/mattermost/slash-route-api.js +1 -1
- package/dist/extensions/memory-core/cli-metadata.js +1 -1
- package/dist/extensions/migrate-claude/apply.js +1 -1
- package/dist/extensions/migrate-claude/index.js +1 -1
- package/dist/extensions/migrate-claude/plan.js +1 -1
- package/dist/extensions/migrate-claude/provider.js +1 -1
- package/dist/extensions/migrate-claude/targets.js +1 -1
- package/dist/extensions/migrate-hermes/apply.js +1 -1
- package/dist/extensions/migrate-hermes/index.js +1 -1
- package/dist/extensions/migrate-hermes/model.js +1 -1
- package/dist/extensions/migrate-hermes/plan.js +1 -1
- package/dist/extensions/migrate-hermes/provider.js +1 -1
- package/dist/extensions/migrate-hermes/secrets.js +1 -1
- package/dist/extensions/migrate-hermes/targets.js +1 -1
- package/dist/extensions/policy/api.js +1 -1
- package/dist/extensions/policy/index.js +2 -2
- package/dist/extensions/signal/api.js +6 -6
- package/dist/extensions/signal/channel-plugin-api.js +1 -1
- package/dist/extensions/signal/reaction-runtime-api.js +1 -1
- package/dist/extensions/signal/runtime-api.js +7 -7
- package/dist/extensions/skill-workshop/api.js +1 -1
- package/dist/extensions/skill-workshop/index.js +2 -2
- package/dist/extensions/telegram/account-inspect-api.js +1 -1
- package/dist/extensions/telegram/api.js +11 -11
- package/dist/extensions/telegram/channel-plugin-api.js +2 -2
- package/dist/extensions/telegram/contract-api.js +3 -3
- package/dist/extensions/telegram/runtime-api.js +7 -7
- package/dist/extensions/telegram/security-audit-contract-api.js +1 -1
- package/dist/extensions/telegram/setup-plugin-api.js +1 -1
- package/dist/extensions/telegram/test-api.js +2 -2
- package/dist/extensions/webhooks/api.js +1 -1
- package/dist/extensions/webhooks/index.js +1 -1
- package/dist/extensions/xai/index.js +4 -4
- package/dist/extensions/xai/realtime-transcription-provider.js +1 -1
- package/dist/extensions/xai/speech-provider.js +1 -1
- package/dist/extensions/xai/test-api.js +1 -1
- package/dist/extensions/xai/tts.js +1 -1
- package/dist/extensions/xai/web-search.js +1 -1
- package/dist/extensions/xai/xai-oauth.js +1 -1
- package/dist/file-fetch-tool-DQpAtjX4.js +124 -0
- package/dist/file-write-tool-CkB0oYwe.js +127 -0
- package/dist/format-DUJUpMFQ.js +1145 -0
- package/dist/gateway-cli-CQo_E4Ka.js +435 -0
- package/dist/gateway-method-runtime-1QPgVJH7.js +21 -0
- package/dist/get-reply-DfUcsC-O.js +4689 -0
- package/dist/get-reply-from-config.runtime-C95MG73O.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/graph-users-DPJe0fPs.js +1419 -0
- package/dist/group-access-DefaNJ6L.js +112 -0
- package/dist/handle-action.guild-admin-C1sy1kGJ.js +288 -0
- package/dist/harness-BgPRdmNK.js +61 -0
- package/dist/health-DFR9A1YV.js +4 -0
- package/dist/heartbeat-runner-BiYVPs25.js +5 -0
- package/dist/heartbeat-runner.runtime-Bmaq8WUA.js +4 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/hooks-CNJDuJUm.js +534 -0
- package/dist/inbound-direct-dm-runtime-DFt58p71.js +2 -0
- package/dist/inbound-reply-dispatch-kgSDM8ax.js +148 -0
- package/dist/index.js +1 -1
- package/dist/init-B0zO_U4r.js +59 -0
- package/dist/inline-buttons-B6zgQW3J.js +40 -0
- package/dist/internal-events-C3Q5t6hg.js +90 -0
- package/dist/isolated-agent-CaSU5GCJ.js +2 -0
- package/dist/isolated-agent-CnsD2TmP.js +1118 -0
- package/dist/lifecycle-i3WZDaIn.js +571 -0
- package/dist/list.probe-g0rUiVXW.js +449 -0
- package/dist/list.status-command-DG3PrmeO.js +789 -0
- package/dist/llm-slug-generator-CHlf69FU.js +78 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/local-dispatch.runtime-CDeHUp_A.js +9 -0
- package/dist/local-dispatch.runtime.js +1 -1
- package/dist/manager.runtime-BlLMPUTq.js +2714 -0
- package/dist/manager.runtime.js +1 -1
- package/dist/markdown-to-line-r_mBHMdy.js +811 -0
- package/dist/mcp-http-C5UPIJGR.js +555 -0
- package/dist/mcp-http-CTy9gpfA.js +2 -0
- package/dist/media-understanding-provider-BT6TOuVa.js +339 -0
- package/dist/message-actions-BdcjjwFt.js +145 -0
- package/dist/message-handler-B29Tj2p2.js +1715 -0
- package/dist/message-handler-BhHb1FHI.js +384 -0
- package/dist/message-handler.preflight-ouZ_-3o8.js +1125 -0
- package/dist/message-handler.process-CrYiBx_F.js +1484 -0
- package/dist/model-CLbtocQX.js +74 -0
- package/dist/model-selection-BG_vU9Kl.js +272 -0
- package/dist/models-4KERn3ya.js +104 -0
- package/dist/models-BCa-ipxi.js +2 -0
- package/dist/models-cli-DtpGXEsf.js +256 -0
- package/dist/monitor-B-egsvmI.js +1657 -0
- package/dist/monitor-BJX9Yv7k.js +2 -0
- package/dist/monitor-BPrIy3pV.js +715 -0
- package/dist/monitor-BWknZZ7N.js +4377 -0
- package/dist/monitor-C3y_PtI1.js +60 -0
- package/dist/monitor-DCzfdqE4.js +1370 -0
- package/dist/monitor-P24epSwE.js +2788 -0
- package/dist/monitor-auth-CEG_xldE.js +179 -0
- package/dist/monitor-jEePJbbS.js +834 -0
- package/dist/monitor-polling.runtime-BzlHK11u.js +883 -0
- package/dist/monitor-polling.runtime.js +1 -1
- package/dist/monitor-webhook.runtime-vFEhk_Zj.js +387 -0
- package/dist/monitor-webhook.runtime.js +1 -1
- package/dist/monitor.account-BUIfgWXg.js +5233 -0
- package/dist/monitor.runtime-Cp7W4fhb.js +2 -0
- package/dist/monitor.runtime.js +1 -1
- package/dist/monitor.webhook-DzrbeR4T.js +180 -0
- package/dist/node-cli-sessions-CLbI14UA.js +1228 -0
- package/dist/openai-http-BM9BIA_g.js +824 -0
- package/dist/openresponses-http-CNoW9kk8.js +1173 -0
- package/dist/operations-DT4bsxV6.js +805 -0
- package/dist/outbound-adapter-CZRUOgY0.js +543 -0
- package/dist/outbound-session-route-DneMsGNx.js +45 -0
- package/dist/outbound.runtime-CHuoKJJI.js +2 -0
- package/dist/outbound.runtime.js +1 -1
- package/dist/pi-embedded-1-rsueO_.js +3796 -0
- package/dist/pi-embedded-BRfDncVO.js +4 -0
- package/dist/pi-embedded.runtime-DEYoa6bW.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/pi-tools-C0P3NgP5.js +2413 -0
- package/dist/plan-BQUkjBMY.js +81 -0
- package/dist/plan-CRO9_2_k.js +112 -0
- package/dist/plugin-BJCmWhnh.js +12396 -0
- package/dist/plugin-app-cache-key-CXAg0F7A.js +46 -0
- package/dist/plugin-enabled-D93Z9LSo.js +233 -0
- package/dist/plugin-registration-BBrTcZnf.js +88 -0
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/acp-runtime-backend.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-harness-runtime.js +6 -6
- package/dist/plugin-sdk/agent-harness-task-runtime.js +1 -1
- package/dist/plugin-sdk/agent-harness.js +7 -7
- package/dist/plugin-sdk/agent-runtime.js +2 -2
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +2 -2
- package/dist/plugin-sdk/channel-test-helpers.js +1 -1
- package/dist/plugin-sdk/command-auth.js +1 -1
- package/dist/plugin-sdk/command-status-runtime.js +1 -1
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/conversation-binding-runtime.js +2 -2
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +2 -2
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
- package/dist/plugin-sdk/health.js +2 -2
- package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/mattermost.js +1 -1
- package/dist/plugin-sdk/plugin-test-contracts.js +2 -2
- package/dist/plugin-sdk/provider-test-contracts.js +4 -4
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/testing.js +2 -2
- package/dist/plugin-sdk/zalouser.js +1 -1
- package/dist/plugin-service-DnZEPBEA.js +1229 -0
- package/dist/plugins/runtime/index.js +4 -4
- package/dist/policy-CMv5QMPG.js +138 -0
- package/dist/policy-CeoP4t9J.js +680 -0
- package/dist/prepare.runtime-DZ55JiTt.js +732 -0
- package/dist/prepare.runtime.js +1 -1
- package/dist/preview-warnings-O08PZRxu.js +392 -0
- package/dist/probe-C6w3bP8X.js +682 -0
- package/dist/probe-Cs1_X1NA.js +47 -0
- package/dist/probe-Cuee_jyM.js +2204 -0
- package/dist/probe-DZxCnDzn.js +2 -0
- package/dist/program-C2dT8VHB.js +131 -0
- package/dist/provider-C2_vSzYh.js +32 -0
- package/dist/provider-DSfTDQbj.js +152 -0
- package/dist/provider-U8hrm9h-.js +32 -0
- package/dist/provider-_v910H8y.js +8735 -0
- package/dist/provider-dispatcher-C3kmmIEC.js +22 -0
- package/dist/provider-dispatcher.runtime.js +1 -1
- package/dist/provider-session.runtime-Mg0fx5hH.js +9 -0
- package/dist/provider-session.runtime.js +1 -1
- package/dist/provider.runtime-pSTXuHrq.js +2 -0
- package/dist/provider.runtime.js +1 -1
- package/dist/public-surface-loader-09t4TTue.js +114 -0
- package/dist/pw-ai-DjNqHV3_.js +3029 -0
- package/dist/pw-role-snapshot-DoGefdv7.js +333 -0
- package/dist/reaction-level-C8Mqxizo.js +19 -0
- package/dist/reaction-runtime-api-DOP6xOsm.js +116 -0
- package/dist/realtime-transcription-provider-BTGEXXna.js +205 -0
- package/dist/register-CbZPpqI3.js +2178 -0
- package/dist/register.agent-DrBFuPKh.js +156 -0
- package/dist/register.crestodian-DwTbmaK8.js +24 -0
- package/dist/register.maintenance-BIeoYBub.js +83 -0
- package/dist/register.runtime-B5V9_Dwz.js +54 -0
- package/dist/register.subclis-CJE9ISZY.js +31 -0
- package/dist/register.subclis-YQsKas8N.js +3 -0
- package/dist/register.subclis-core-CjwdGeGU.js +273 -0
- package/dist/repair-sequencing-C0jrL5pw.js +640 -0
- package/dist/reply-delivery-B28mTIpb.js +196 -0
- package/dist/reply-runtime-BqQX7HHw.js +11 -0
- package/dist/reply.runtime-C95MG73O.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/request-BqoMvXxH.js +54 -0
- package/dist/resolve-allowlist-hbKKd_kq.js +220 -0
- package/dist/result-fallback-classifier-BrORPoxj.js +79 -0
- package/dist/route-HHRgSzVy.js +469 -0
- package/dist/route-resolution-C7bafjVc.js +274 -0
- package/dist/routes-86XGeo7a.js +2 -0
- package/dist/routes-BhVGr9ie.js +3602 -0
- package/dist/run-Bb5QP5JV.js +1162 -0
- package/dist/run-attempt-CLi0wV7j.js +7704 -0
- package/dist/run-command-Be6GAxiW.js +2 -0
- package/dist/run-command-Ds4hr3iU.js +23 -0
- package/dist/run-embedded.runtime-wX9ORojX.js +4 -0
- package/dist/run-embedded.runtime.js +1 -1
- package/dist/run-execution-cli.runtime-BmNZVB2N.js +4 -0
- package/dist/run-execution-cli.runtime.js +1 -1
- package/dist/run-executor.runtime.js +1 -1
- package/dist/run-subagent-registry.runtime-Uq5sjftu.js +2 -0
- package/dist/run-subagent-registry.runtime.js +1 -1
- package/dist/runtime-BktLQ75j.js +1287 -0
- package/dist/runtime-C9XdR62_.js +438 -0
- package/dist/runtime-CTvWDPx9.js +6179 -0
- package/dist/runtime-api-BojB3MUw.js +21 -0
- package/dist/runtime-api-C92MlAwp.js +13 -0
- package/dist/runtime-api-CFNZE9Xt.js +13 -0
- package/dist/runtime-api-Cimpgm5_.js +3 -0
- package/dist/runtime-api-D8qG_lUm.js +17 -0
- package/dist/runtime-api-DMDMnQEG.js +4 -0
- package/dist/runtime-api-DupQdIlE.js +24 -0
- package/dist/runtime-api.actions-B8i3elqu.js +3 -0
- package/dist/runtime-api.monitor-BntFzf_M.js +6 -0
- package/dist/runtime-api.send-CPlmi1jc.js +4 -0
- package/dist/runtime-api.threads-D-H_r_Nl.js +2 -0
- package/dist/runtime-channel-BGhTxnXZ.js +150 -0
- package/dist/runtime-channel-CPFxNapZ.js +2 -0
- package/dist/runtime-embedded-pi.runtime-BjnMTurB.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/sanitize-outbound-BMUv1NeS.js +127 -0
- package/dist/sdk-setup-tools-Do3DkQi_.js +8 -0
- package/dist/secrets-B8YVPHhk.js +113 -0
- package/dist/security-audit-7Gg_nL4o.js +122 -0
- package/dist/security-audit-Bk3CREj-.js +118 -0
- package/dist/security-audit.runtime-BmSJrdeq.js +2 -0
- package/dist/security-audit.runtime.js +1 -1
- package/dist/selection-BFGde9-_.js +3 -0
- package/dist/selection-DrLFlbgG.js +16157 -0
- package/dist/send-4dLa-BQo.js +1631 -0
- package/dist/send-CV6gCwYP.js +192 -0
- package/dist/send-aGiK3Efu.js +143 -0
- package/dist/send-dB3CehAN.js +2 -0
- package/dist/send.components-BcG9BlkC.js +2 -0
- package/dist/send.components-rLjDlfYU.js +500 -0
- package/dist/send.runtime-D20k2MSr.js +2 -0
- package/dist/send.runtime.js +1 -1
- package/dist/server-BTRx_U1s.js +73 -0
- package/dist/server-CY0ymhBg.js +24 -0
- package/dist/server-close.runtime.js +1 -1
- package/dist/server-context-BxGT8wbK.js +955 -0
- package/dist/server-context-DYlbhAaT.js +2 -0
- package/dist/server-cron-BB_15lcP.js +2 -0
- package/dist/server-cron-CfyJX_a4.js +2989 -0
- package/dist/server-methods-Ck2ab6TC.js +16494 -0
- package/dist/server-node-events-BdRizF-5.js +596 -0
- package/dist/server-plugin-bootstrap-CPUr8NFE.js +70 -0
- package/dist/server-plugins-__5AxjzH.js +432 -0
- package/dist/server-reload-handlers-BMl9Fx9b.js +714 -0
- package/dist/server-restart-sentinel-D11M_ZsH.js +747 -0
- package/dist/server-restart-sentinel-DGptQ27c.js +2 -0
- package/dist/server-runtime-services-BwtLs-8I.js +2 -0
- package/dist/server-runtime-services-aJydixRu.js +267 -0
- package/dist/server-startup-plugins-m_P3gY4m.js +113 -0
- package/dist/server-startup-post-attach-DuXQ1AXL.js +716 -0
- package/dist/server-ws-runtime-mXmxB1W8.js +349 -0
- package/dist/server.impl-fuV8aKSP.js +2586 -0
- package/dist/service-a8cTFka4.js +1446 -0
- package/dist/session-binding-BIycxo9u.js +2 -0
- package/dist/session-binding-xHwQr9vM.js +219 -0
- package/dist/session-kill-http-DiUZhcoN.js +121 -0
- package/dist/session-reset-service-DkepDoob.js +625 -0
- package/dist/session-route-Ba5u7ecb.js +93 -0
- package/dist/session-status.runtime-Cb1X69Rl.js +2 -0
- package/dist/session-status.runtime.js +1 -1
- package/dist/session-subagent-reactivation.runtime-rbqmto4G.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-DSKOoJta.js +521 -0
- package/dist/sessions-history-http-CWP88I_C.js +430 -0
- package/dist/sessions.runtime-1q1OwLn3.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/setup-api-DtrOOYeP.js +29 -0
- package/dist/setup-core-DMrJS6LP.js +174 -0
- package/dist/setup-surface-BFPNu1qA.js +405 -0
- package/dist/setup-surface-CedShqhO.js +288 -0
- package/dist/setup-surface-DLOBH1Vf.js +320 -0
- package/dist/setup-surface-MhCeEWSj.js +221 -0
- package/dist/shared-DamL-e8D.js +121 -0
- package/dist/shared-client-B48JoAsz.js +2 -0
- package/dist/shared-client-BoSiDnUo.js +629 -0
- package/dist/side-question-DQoQ_ETb.js +683 -0
- package/dist/skill-tool-dispatch.runtime-CWLloYA8.js +143 -0
- package/dist/skill-tool-dispatch.runtime.js +1 -1
- package/dist/slash-state-DrrWJQfv.js +2166 -0
- package/dist/speech-provider-8Hx1uw41.js +184 -0
- package/dist/src-BbUYOPwU.js +4256 -0
- package/dist/startup-context-opAJAamX.js +313 -0
- package/dist/status-subagents.runtime-DSo7ZK_Z.js +18 -0
- package/dist/status-subagents.runtime.js +1 -1
- package/dist/status-text-AyPuDzrO.js +296 -0
- package/dist/sticker-cache-91Tp8mLP.js +206 -0
- package/dist/sticker-vision.runtime-DjleFXi5.js +17 -0
- package/dist/sticker-vision.runtime.js +1 -1
- package/dist/subagent-announce-delivery-DS_2W9oZ.js +958 -0
- package/dist/subagent-announce-hatA_PZ2.js +354 -0
- package/dist/subagent-control-IyFIvc7T.js +508 -0
- package/dist/subagent-hooks-BCj5eB0Z.js +2 -0
- package/dist/subagent-hooks-BWjTBkox.js +146 -0
- package/dist/subagent-hooks-CdGLK9_3.js +230 -0
- package/dist/subagent-hooks-EH0tBkw9.js +2 -0
- package/dist/subagent-hooks-api-BhYaXQJV.js +23 -0
- package/dist/subagent-hooks-api-uGsV8Xn5.js +22 -0
- package/dist/subagent-hooks-api-wfJFKIPx.js +23 -0
- package/dist/subagent-hooks-l8Xd94dt.js +2 -0
- package/dist/subagent-hooks-m2eHUO_d.js +116 -0
- package/dist/subagent-orphan-recovery-Bq9zvX3L.js +352 -0
- package/dist/subagent-registry-Bcb3zy6b.js +3 -0
- package/dist/subagent-registry-CoZNTFx-.js +2351 -0
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/subagent-session-cleanup--00EjDLe.js +525 -0
- package/dist/subagent-spawn-ClJJkz3D.js +1164 -0
- package/dist/target-id-BsZLiF3x.js +107 -0
- package/dist/targets-CQMe4AZP.js +44 -0
- package/dist/targets-SmL1AU-H.js +19 -0
- package/dist/targets-Y-roiA47.js +19 -0
- package/dist/task-registry-control.runtime.js +1 -1
- package/dist/telegram/token.js +1 -1
- package/dist/testing-B5hNJDuF.js +267 -0
- package/dist/thread-bindings-BD3eE0kK.js +232 -0
- package/dist/thread-bindings-C9NNiv8K.js +571 -0
- package/dist/thread-bindings-Dl4PN1vZ.js +228 -0
- package/dist/thread-bindings-uK1LLAwy.js +8 -0
- package/dist/thread-bindings.discord-api-BHNEUbnk.js +187 -0
- package/dist/thread-bindings.manager-B0LXiH3F.js +2 -0
- package/dist/thread-bindings.manager-BTlH4XMG.js +536 -0
- package/dist/thread-lifecycle-DG8uyPHd.js +1614 -0
- package/dist/token-BbGCANnE.js +134 -0
- package/dist/tool-actions.runtime-oUUrD8HB.js +534 -0
- package/dist/tool-actions.runtime.js +1 -1
- package/dist/tool-bqg-_vYv.js +139 -0
- package/dist/tool-resolution-CSZsa3kP.js +149 -0
- package/dist/tools-effective-inventory-0CqFp-vq.js +204 -0
- package/dist/tools-invoke-http-DhYHY0Yh.js +67 -0
- package/dist/tools-invoke-shared-CbVJJUj7.js +200 -0
- package/dist/tts-C2qD-ad6.js +66 -0
- package/dist/tui-CzGY254f.js +4709 -0
- package/dist/tui-backend-fzoeoSN0.js +256 -0
- package/dist/tui-cli-B2RWb2gM.js +37 -0
- package/dist/tui-dgS8hdXU.js +2 -0
- package/dist/update-cli-BmiBDf3c.js +3664 -0
- package/dist/update-runner-CM7QVX6u.js +2379 -0
- package/dist/vision-tools-BzoBZnIc.js +1409 -0
- package/dist/web-search-DmfOd66S.js +62 -0
- package/dist/web-search-provider.runtime-3C5-pODD.js +328 -0
- package/dist/web-search-provider.runtime-Doh-Z9We.js +2 -0
- package/dist/web-search-provider.runtime.js +1 -1
- package/dist/xai-oauth-BLvQ43hx.js +479 -0
- package/dist/xai-user-agent-BdMQ_0_O.js +32 -0
- package/package.json +1 -1
- package/dist/abort-DeEb_wKd.js +0 -277
- package/dist/abort.runtime-CoYXQGPK.js +0 -2
- package/dist/account-inspect-D_06-CYS.js +0 -173
- package/dist/accounts-BCTqtj4Y.js +0 -107
- package/dist/accounts-BudLl8P2.js +0 -107
- package/dist/accounts-CUReBDA0.js +0 -2
- package/dist/accounts-PCioSzzr.js +0 -119
- package/dist/acp-runtime-B2t9_BHD.js +0 -26
- package/dist/acp-spawn-0x4Iiu1o.js +0 -2
- package/dist/acp-spawn-B2Ghe0jJ.js +0 -1275
- package/dist/acp-stateful-target-driver-C4VgcSyz.js +0 -89
- package/dist/action-kill-ClYsXEz7.js +0 -33
- package/dist/action-runtime-DrLPkNvU.js +0 -469
- package/dist/action-runtime-api-BqSflr9q.js +0 -2
- package/dist/action-send-CIy9cziD.js +0 -39
- package/dist/action-spawn-BjV6lFnX.js +0 -47
- package/dist/actions-D-QH7wq5.js +0 -161
- package/dist/actions.runtime-hzDtXQGU.js +0 -5
- package/dist/agent-Bb1DTBgv.js +0 -3
- package/dist/agent-Cnqj258q.js +0 -2
- package/dist/agent-command-BRx6ZNgJ.js +0 -1367
- package/dist/agent-components.runtime-D-g6xXJ0.js +0 -10
- package/dist/agent-harness-runtime-dKUQFuOc.js +0 -180
- package/dist/agent-harness-task-runtime-v2crUm3i.js +0 -140
- package/dist/agent-runner-execution-AOzdxvWR.js +0 -1713
- package/dist/agent-runner-utils-Byv50B4Z.js +0 -266
- package/dist/agent-runner.runtime-hhgRE0Z-.js +0 -3455
- package/dist/agent-runtime-BHmh3i0o.js +0 -229
- package/dist/agent-via-gateway-DnCqaK4a.js +0 -463
- package/dist/api-Bzyb8sFU.js +0 -3
- package/dist/api-CIEDFXZs.js +0 -2
- package/dist/api-D_dTQAu8.js +0 -2
- package/dist/api-DilBjZ9Q.js +0 -6
- package/dist/api-E5zoQMmh.js +0 -134
- package/dist/api-OJZug8gQ.js +0 -639
- package/dist/apply-C0eV5T0O.js +0 -41
- package/dist/apply-alsYvxLE.js +0 -54
- package/dist/approval-handler.runtime-C6jqZXSN.js +0 -130
- package/dist/assistant-DDXnAAB5.js +0 -291
- package/dist/attachment-normalize-Cv-_4DWU.js +0 -225
- package/dist/attempt-execution-DECEU59r.js +0 -558
- package/dist/attempt-execution.runtime-kasMxuER.js +0 -3
- package/dist/attempt-execution.shared-ClUxk52p.js +0 -38
- package/dist/attempt.prompt-helpers-Bxlv9VSu.js +0 -475
- package/dist/attempt.tool-run-context-CplQWX6g.js +0 -2094
- package/dist/binding-routing-0Obpp-Ij.js +0 -113
- package/dist/binding-targets-CZHQaZL4.js +0 -121
- package/dist/bot-BPbQ0840.js +0 -7894
- package/dist/bot-deps-Cs1M9USs.js +0 -2
- package/dist/bot-deps-xAcaOtTZ.js +0 -747
- package/dist/bot-message-context.runtime-Bji78Cbn.js +0 -7
- package/dist/bot-message-context.session.runtime-C3dyOIYH.js +0 -12
- package/dist/bot-native-commands.delivery.runtime-WshH99fy.js +0 -4
- package/dist/bot-native-commands.runtime-C1L364gU.js +0 -13
- package/dist/bridge-server-DPlM8_Lk.js +0 -113
- package/dist/browser-cli-DFNQE98N.js +0 -230
- package/dist/browser-cli-Drb5E5--.js +0 -2
- package/dist/browser-cli-actions-input-Dx-1OXmE.js +0 -473
- package/dist/browser-cli-actions-observe-BMDfE7xU.js +0 -81
- package/dist/browser-cli-debug-nu7Ih09g.js +0 -137
- package/dist/browser-cli-inspect-D5X2wohg.js +0 -104
- package/dist/browser-cli-manage-DkzYwph4.js +0 -443
- package/dist/browser-cli-resize-B30Avedl.js +0 -26
- package/dist/browser-cli-shared-cMgQoQzF.js +0 -50
- package/dist/browser-cli-state-CQLDvDy7.js +0 -337
- package/dist/browser-control-auth-D7ArmHUt.js +0 -2
- package/dist/browser-profiles-B39SIZNb.js +0 -2
- package/dist/browser-runtime-DUbSAOOS.js +0 -384
- package/dist/build-D25KqC92.js +0 -257
- package/dist/capability-cli-CuyXrlAB.js +0 -1782
- package/dist/channel-0N3YGMGg.js +0 -1496
- package/dist/channel-1UyKoLyp.js +0 -481
- package/dist/channel-BG87pSEW.js +0 -740
- package/dist/channel-BPGSaZW7.js +0 -1249
- package/dist/channel-BQMPh1J_.js +0 -376
- package/dist/channel-Bd_8V6zn.js +0 -1134
- package/dist/channel-BtBjh_ij.js +0 -362
- package/dist/channel-CpFBlVH6.js +0 -562
- package/dist/channel-CwuTrIrF.js +0 -508
- package/dist/channel-Cxl4sJA-.js +0 -1777
- package/dist/channel-D-VfU4Z2.js +0 -2126
- package/dist/channel-D9q8aYrN.js +0 -867
- package/dist/channel-DKSvVvZh.js +0 -238
- package/dist/channel-DvoFfWLx.js +0 -808
- package/dist/channel-GktTcGHm.js +0 -955
- package/dist/channel-actions.runtime-CKcRA0GW.js +0 -265
- package/dist/channel-core-nm8s1qFZ.js +0 -5
- package/dist/channel-d3t2ESlE.js +0 -653
- package/dist/channel-inbound-DKz40dq-.js +0 -80
- package/dist/channel-plugin-runtime-DKIGZWfW.js +0 -998
- package/dist/channel-runtime-Bh8_GY12.js +0 -408
- package/dist/channel-yQ8jCOb9.js +0 -1556
- package/dist/channel.runtime-BG4mM5cQ.js +0 -652
- package/dist/channel.runtime-BS6PyFFa.js +0 -1008
- package/dist/channel.runtime-CE_xECqN.js +0 -88
- package/dist/channel.runtime-Cd1Sw8U4.js +0 -254
- package/dist/channel.runtime-DIq3XOEe.js +0 -733
- package/dist/channel.runtime-Dy1cx35I.js +0 -21009
- package/dist/channel.runtime-NyIMjLnP.js +0 -109
- package/dist/channel.runtime-Zx5mfE2V.js +0 -4
- package/dist/channel.runtime-rJRibGfN.js +0 -2528
- package/dist/channel.setup--4ACadmF.js +0 -10
- package/dist/channel.setup-DzwqIlo3.js +0 -1098
- package/dist/channel.setup-FKYSJwXR.js +0 -343
- package/dist/chat-CKxSm7r1.js +0 -2666
- package/dist/chrome-rMubJwRG.js +0 -1503
- package/dist/cli-CbTod55I.js +0 -1341
- package/dist/cli-compaction-BbHgjJyW.js +0 -347
- package/dist/cli-metadata-DkOWLC_p.js +0 -22
- package/dist/cli-runner-Cwzv_RKf.js +0 -540
- package/dist/cli-runner-DdnUsgPl.js +0 -2
- package/dist/cli-runner.runtime-BlrSgbEW.js +0 -3
- package/dist/cli-runner.runtime-D8kVfvFH.js +0 -4
- package/dist/client-ClvxsWgL.js +0 -650
- package/dist/client-adapter-CsrIIjK1.js +0 -897
- package/dist/client-factory-DAYClhwm.js +0 -9
- package/dist/command-auth-CCha2ofd.js +0 -135
- package/dist/command-handlers-DCWJzHyB.js +0 -1609
- package/dist/command-registry-BIf61QNz.js +0 -9
- package/dist/command-registry-DJROBy4h.js +0 -4
- package/dist/command-registry-core-BQOWqi6S.js +0 -110
- package/dist/command-status.runtime-D88CUglL.js +0 -90
- package/dist/commands-acp-B-8dHX4Z.js +0 -74
- package/dist/commands-compact.runtime-ComX5mUk.js +0 -10
- package/dist/commands-handlers.runtime-DR3wjXHX.js +0 -6154
- package/dist/commands-status-CDyGrwsI.js +0 -3
- package/dist/commands-status-DV-i_ZIK.js +0 -16
- package/dist/commands-status.runtime-CDyGrwsI.js +0 -3
- package/dist/commands-subagents-control.runtime-B029cXAS.js +0 -3
- package/dist/commands-subagents-control.runtime-DR8Qspe0.js +0 -2
- package/dist/commands-system-prompt-C10ctsG3.js +0 -162
- package/dist/commands-system-prompt-DQlRWwnk.js +0 -2
- package/dist/commands.runtime-BYmIAuN0.js +0 -176
- package/dist/compact-14Ljaaeu.js +0 -480
- package/dist/compact-B--ovdkx.js +0 -1141
- package/dist/compact.runtime-E0Idf2Dq.js +0 -12
- package/dist/completion-cli-DMvvQGSk.js +0 -315
- package/dist/computer-use-CcLwX5SR.js +0 -367
- package/dist/config-B39SIZNb.js +0 -2
- package/dist/config-D4rsGOyV.js +0 -373
- package/dist/config-mutations-CsI3YJu7.js +0 -159
- package/dist/context-engine-host-compat-BZpDFiMJ.js +0 -2
- package/dist/context-engine-host-compat-runUdES5.js +0 -288
- package/dist/context-engine-lifecycle-D6odtNrn.js +0 -1274
- package/dist/control-auth-BPGpPtfz.js +0 -114
- package/dist/control-service-C-OmdPCe.js +0 -145
- package/dist/control-ui/assets/agents-GeyOHPuW.js +0 -1008
- package/dist/control-ui/assets/channel-config-extras-D7en6iUg.js +0 -2
- package/dist/control-ui/assets/channels-DkEyr1w5.js +0 -367
- package/dist/control-ui/assets/cron-C-wThQ1Q.js +0 -1013
- package/dist/control-ui/assets/debug-83AFRtIX.js +0 -97
- package/dist/control-ui/assets/index-CiGEhMOA.js +0 -7370
- package/dist/control-ui/assets/instances-CVl0t-1h.js +0 -57
- package/dist/control-ui/assets/logs-eybVEXxg.js +0 -74
- package/dist/control-ui/assets/nodes-C_A7eoU2.js +0 -436
- package/dist/control-ui/assets/sessions-Cq4Nc69u.js +0 -399
- package/dist/control-ui/assets/skills-ZN6hroIh.js +0 -314
- package/dist/control-ui/assets/skills-shared-DIWGwmdC.js +0 -11
- package/dist/conversation-binding-runtime-C2U1JElL.js +0 -4
- package/dist/conversation-runtime-NmIUd3Zu.js +0 -31
- package/dist/core-DGKJP1dm.js +0 -282
- package/dist/core-api-1fA4sNeC.js +0 -5
- package/dist/core-api-BY822Quq.js +0 -2
- package/dist/crestodian-Bp-NXiBC.js +0 -55
- package/dist/daocore-tools-Defpam0j.js +0 -11727
- package/dist/delivery-CEdVAUGB.js +0 -1002
- package/dist/dialogue-CZ69INPq.js +0 -37
- package/dist/dir-fetch-tool-BCicHhQE.js +0 -565
- package/dist/dir-list-tool-Cv_WktsJ.js +0 -100
- package/dist/direct-dm-Bz89rM8x.js +0 -64
- package/dist/directive-handling.fast-lane-DDnbcc5S.js +0 -68
- package/dist/directive-handling.impl-B0H52Ymr.js +0 -818
- package/dist/directive-handling.impl-CgKpwEW-.js +0 -2
- package/dist/directive-handling.model-selection-_cXAr0vt.js +0 -122
- package/dist/directive-handling.persist.runtime-Dw0mfzXT.js +0 -263
- package/dist/dispatch-C3AeYvyP.js +0 -1640
- package/dist/dispatch-acp-transcript.runtime-CP8pqBwS.js +0 -40
- package/dist/dispatch-acp.runtime-Cdap-AZI.js +0 -18
- package/dist/doctor-BZwVH97p.js +0 -2
- package/dist/doctor-BfkGBii1.js +0 -6
- package/dist/doctor-config-flow-D3JASGDt.js +0 -1741
- package/dist/doctor-core-checks-DH5AIT0Q.js +0 -573
- package/dist/doctor-core-checks-DiNu7VSh.js +0 -2
- package/dist/doctor-health-BDIJ-Nro.js +0 -65
- package/dist/doctor-health-contributions-BgmF7w8X.js +0 -696
- package/dist/doctor-lint-uIxkMUSO.js +0 -94
- package/dist/doctor-state-integrity-ws1b_BGk.js +0 -1231
- package/dist/doctor-update-Cx4CqxaX.js +0 -58
- package/dist/dynamic-tools-DiqOxhJh.js +0 -486
- package/dist/embedded-backend-C634irMl.js +0 -579
- package/dist/embedded-gateway-stub.runtime-CCfrTOeN.js +0 -12
- package/dist/exec-approvals-D85KThSg.js +0 -149
- package/dist/file-fetch-tool-BERaGYCT.js +0 -124
- package/dist/file-write-tool-BjHrMyfe.js +0 -127
- package/dist/format-DE9PuPg1.js +0 -1145
- package/dist/gateway-cli-B5hjhbUy.js +0 -435
- package/dist/gateway-method-runtime-Bu0E9Eki.js +0 -21
- package/dist/get-reply-6PtPz9hv.js +0 -4689
- package/dist/get-reply-from-config.runtime-CwprvhoR.js +0 -2
- package/dist/graph-users-DUp1kgnS.js +0 -1419
- package/dist/group-access-D5GBQ3w6.js +0 -112
- package/dist/handle-action.guild-admin-CA0Y-buD.js +0 -288
- package/dist/harness-B5nOFVfm.js +0 -61
- package/dist/health-D5heIDj3.js +0 -4
- package/dist/heartbeat-runner-BzFkIFHh.js +0 -5
- package/dist/heartbeat-runner.runtime-p6H1_xMV.js +0 -4
- package/dist/hooks-BvTyQ14X.js +0 -534
- package/dist/inbound-direct-dm-runtime-DwiDXi8L.js +0 -2
- package/dist/inbound-reply-dispatch-YoDUOC6C.js +0 -148
- package/dist/init-CPtcV5Xu.js +0 -59
- package/dist/inline-buttons-DeD5d42c.js +0 -40
- package/dist/internal-events-DEb50Sw3.js +0 -90
- package/dist/isolated-agent-CcxFFZ-Z.js +0 -1118
- package/dist/isolated-agent-CpHzq5qr.js +0 -2
- package/dist/lifecycle-DNel-oMe.js +0 -571
- package/dist/list.probe-DCa3N25d.js +0 -449
- package/dist/list.status-command-CyeAJmZW.js +0 -789
- package/dist/llm-slug-generator-CyqTY37Z.js +0 -78
- package/dist/local-dispatch.runtime-nE39kFIP.js +0 -9
- package/dist/manager.runtime-CpAPB8D5.js +0 -2714
- package/dist/markdown-to-line-Ci6TRmoZ.js +0 -811
- package/dist/mcp-http-BR0vmxFL.js +0 -2
- package/dist/mcp-http-C0oniA8h.js +0 -555
- package/dist/media-understanding-provider-BwA0XqC3.js +0 -339
- package/dist/message-actions-C9C_Ngkd.js +0 -145
- package/dist/message-handler-CUUKPC5n.js +0 -384
- package/dist/message-handler-xRTfIXWV.js +0 -1715
- package/dist/message-handler.preflight-Ch2Q7V3M.js +0 -1125
- package/dist/message-handler.process-HM3mK93q.js +0 -1484
- package/dist/model-CB8Ex5xS.js +0 -74
- package/dist/model-selection-2s0Dinux.js +0 -272
- package/dist/models-Cn-6DJ41.js +0 -2
- package/dist/models-CzszJD__.js +0 -104
- package/dist/models-cli-CbhElnA5.js +0 -256
- package/dist/monitor-7aprTsMV.js +0 -715
- package/dist/monitor-BuVhqwDS.js +0 -1370
- package/dist/monitor-C4H_YkgY.js +0 -2
- package/dist/monitor-CPQsMxgv.js +0 -1657
- package/dist/monitor-Ce0V1PiR.js +0 -4377
- package/dist/monitor-D0bcGJWI.js +0 -60
- package/dist/monitor-DEjlJqzh.js +0 -834
- package/dist/monitor-auth-DjJZsjgV.js +0 -179
- package/dist/monitor-ikSYagv3.js +0 -2788
- package/dist/monitor-polling.runtime-D7yEflMM.js +0 -883
- package/dist/monitor-webhook.runtime-CIZt-biI.js +0 -387
- package/dist/monitor.account-C2sMOBCS.js +0 -5233
- package/dist/monitor.runtime-BAi6zmcn.js +0 -2
- package/dist/monitor.webhook-BcjpfRCX.js +0 -180
- package/dist/node-cli-sessions-CIhkJRU4.js +0 -1228
- package/dist/openai-http-Dj21RwSj.js +0 -824
- package/dist/openresponses-http-COnnr1ox.js +0 -1173
- package/dist/operations-H3vUh0lM.js +0 -805
- package/dist/outbound-adapter-WLtWE7wv.js +0 -543
- package/dist/outbound-session-route-CZtd64EH.js +0 -45
- package/dist/outbound.runtime-D98P0sN1.js +0 -2
- package/dist/pi-embedded-BWJzd4mK.js +0 -4
- package/dist/pi-embedded-DeNsSqQQ.js +0 -3796
- package/dist/pi-embedded.runtime-CZnNwFpc.js +0 -4
- package/dist/pi-tools-CNHSpjBa.js +0 -2413
- package/dist/plan-B0reFFlM.js +0 -81
- package/dist/plan-CrfF-TH8.js +0 -112
- package/dist/plugin-DI_8eYOe.js +0 -12396
- package/dist/plugin-app-cache-key-WaTUD3e-.js +0 -46
- package/dist/plugin-enabled-aWLXgGGi.js +0 -233
- package/dist/plugin-registration-ByjRIVJm.js +0 -88
- package/dist/plugin-service-VQm_241d.js +0 -1229
- package/dist/policy-BmJH-swe.js +0 -680
- package/dist/policy-DE-bO1zn.js +0 -138
- package/dist/prepare.runtime-bSj3-res.js +0 -732
- package/dist/preview-warnings-CbuGYsF9.js +0 -392
- package/dist/probe-C_rWg7_m.js +0 -682
- package/dist/probe-CagOFfx6.js +0 -2
- package/dist/probe-thX1HqOh.js +0 -2204
- package/dist/probe-zU6B6gFt.js +0 -47
- package/dist/program-BtVdH743.js +0 -131
- package/dist/provider-CDoD7tO0.js +0 -8735
- package/dist/provider-CK1gMdJ2.js +0 -32
- package/dist/provider-DJqr9djy.js +0 -32
- package/dist/provider-DsOJp5bK.js +0 -152
- package/dist/provider-dispatcher-UNQ-LSx9.js +0 -22
- package/dist/provider-session.runtime-DMrkMb4x.js +0 -9
- package/dist/provider.runtime-C2-t3zm8.js +0 -2
- package/dist/public-surface-loader-hTeyyHcd.js +0 -114
- package/dist/pw-ai-BaL3eVYx.js +0 -3029
- package/dist/pw-role-snapshot-DKeBqhN1.js +0 -333
- package/dist/reaction-level-BV2potsD.js +0 -19
- package/dist/reaction-runtime-api-CCBxgM10.js +0 -116
- package/dist/realtime-transcription-provider-CHYtIXZm.js +0 -205
- package/dist/register-BJf28G9B.js +0 -2178
- package/dist/register.agent-oXAHwNQv.js +0 -156
- package/dist/register.crestodian-CQ0sqdV2.js +0 -24
- package/dist/register.maintenance-CylVRs5M.js +0 -83
- package/dist/register.runtime-CcDgwy0X.js +0 -54
- package/dist/register.subclis-CpBYNw2X.js +0 -3
- package/dist/register.subclis-N2CvieOL.js +0 -31
- package/dist/register.subclis-core-BHaGvbzg.js +0 -273
- package/dist/repair-sequencing-EBBnBdIB.js +0 -640
- package/dist/reply-delivery-BLoPALlI.js +0 -196
- package/dist/reply-runtime-D4asNTSa.js +0 -11
- package/dist/reply.runtime-CwprvhoR.js +0 -2
- package/dist/request-DlWPRUDt.js +0 -54
- package/dist/resolve-allowlist-BukQf58x.js +0 -220
- package/dist/result-fallback-classifier-DyHFnqfV.js +0 -79
- package/dist/route-BMf4keN5.js +0 -469
- package/dist/route-resolution-DWNi1QAu.js +0 -274
- package/dist/routes-C20LC8c4.js +0 -3602
- package/dist/routes-CkK7Vv_m.js +0 -2
- package/dist/run-KDF_AEza.js +0 -1162
- package/dist/run-attempt-JHYCfonU.js +0 -7704
- package/dist/run-command-3PVihYIy.js +0 -2
- package/dist/run-command-QHAXnyKY.js +0 -23
- package/dist/run-embedded.runtime-BJw-2vss.js +0 -4
- package/dist/run-execution-cli.runtime-GHClMn2g.js +0 -4
- package/dist/run-subagent-registry.runtime-BLLMrhtE.js +0 -2
- package/dist/runtime-C2u-dC1r.js +0 -1287
- package/dist/runtime-ClyfkDWT.js +0 -6179
- package/dist/runtime-WXCarlPc.js +0 -438
- package/dist/runtime-api-3QhGLpZf.js +0 -13
- package/dist/runtime-api-DRAu3mjv.js +0 -4
- package/dist/runtime-api-JE07pOem.js +0 -13
- package/dist/runtime-api-JuKylHvw.js +0 -24
- package/dist/runtime-api-bcbk4yax.js +0 -21
- package/dist/runtime-api-dDe9U2_V.js +0 -17
- package/dist/runtime-api-uMexLqGS.js +0 -3
- package/dist/runtime-api.actions-Bo7TLDFl.js +0 -3
- package/dist/runtime-api.monitor-7q78L1Em.js +0 -6
- package/dist/runtime-api.send-Bf9RR4nV.js +0 -4
- package/dist/runtime-api.threads-Dj2QuhHj.js +0 -2
- package/dist/runtime-channel-k1C0Satl.js +0 -2
- package/dist/runtime-channel-qt9t0J-J.js +0 -150
- package/dist/runtime-embedded-pi.runtime-BPB9NlTS.js +0 -2
- package/dist/sanitize-outbound-BLH_SQvg.js +0 -127
- package/dist/sdk-setup-tools-BshlBPau.js +0 -8
- package/dist/secrets-CsHXv7d3.js +0 -113
- package/dist/security-audit-CUXBQXNX.js +0 -122
- package/dist/security-audit-CzdXbRma.js +0 -118
- package/dist/security-audit.runtime-Ca0FMFJG.js +0 -2
- package/dist/selection-BmvQJlSD.js +0 -3
- package/dist/selection-BplDXc9w.js +0 -16157
- package/dist/send--qFg8a9v.js +0 -1631
- package/dist/send-BPdryPPA.js +0 -192
- package/dist/send-Bl4YaRkS.js +0 -143
- package/dist/send-Ccm7RMXC.js +0 -2
- package/dist/send.components-c3OUPSmR.js +0 -2
- package/dist/send.components-rhQJYoXs.js +0 -500
- package/dist/send.runtime-dfUkAp5d.js +0 -2
- package/dist/server-DRhyTMLe.js +0 -73
- package/dist/server-Dv4BzjGn.js +0 -24
- package/dist/server-context-4HRJy2vp.js +0 -955
- package/dist/server-context-DlxYb1G5.js +0 -2
- package/dist/server-cron-Bt8Pkc3i.js +0 -2989
- package/dist/server-cron-CtNWsa4Z.js +0 -2
- package/dist/server-methods-rye_okUW.js +0 -16494
- package/dist/server-node-events-C1yZ5a1u.js +0 -596
- package/dist/server-plugin-bootstrap-DUMyVtlP.js +0 -70
- package/dist/server-plugins-B5ZWWkRE.js +0 -432
- package/dist/server-reload-handlers-CTnMXNjT.js +0 -714
- package/dist/server-restart-sentinel-CAYxtwmY.js +0 -747
- package/dist/server-restart-sentinel-DqrtSIvy.js +0 -2
- package/dist/server-runtime-services-CuptQTe5.js +0 -2
- package/dist/server-runtime-services-aaS2IiW3.js +0 -267
- package/dist/server-startup-plugins-D0ymJgQT.js +0 -113
- package/dist/server-startup-post-attach-DlrN2uyt.js +0 -716
- package/dist/server-ws-runtime-CdpLbv4o.js +0 -349
- package/dist/server.impl-Cb4qcMTg.js +0 -2586
- package/dist/service-qxvDlMQE.js +0 -1446
- package/dist/session-binding-6bLobLHL.js +0 -219
- package/dist/session-binding-Bm6fCpoY.js +0 -2
- package/dist/session-kill-http-B6WjVo8V.js +0 -121
- package/dist/session-reset-service-GUVIhxp4.js +0 -625
- package/dist/session-route-BcRDnvzG.js +0 -93
- package/dist/session-status.runtime-BcjOunV4.js +0 -2
- package/dist/session-subagent-reactivation.runtime-BSmk_KYn.js +0 -2
- package/dist/session-tab-registry-BBYzbSOu.js +0 -521
- package/dist/sessions-history-http-bLJJfgLm.js +0 -430
- package/dist/sessions.runtime-DNRtQzCk.js +0 -2
- package/dist/setup-api-CcolVVJs.js +0 -29
- package/dist/setup-core-eJD18F3B.js +0 -174
- package/dist/setup-surface-B75C2Qtz.js +0 -221
- package/dist/setup-surface-CFuPfVHp.js +0 -405
- package/dist/setup-surface-Dyy-Mzyz.js +0 -288
- package/dist/setup-surface-ZsVF_g8W.js +0 -320
- package/dist/shared-BkCNrcLX.js +0 -121
- package/dist/shared-client-B7zqC9p2.js +0 -2
- package/dist/shared-client-yXjKgZBz.js +0 -629
- package/dist/side-question-DU3gESCb.js +0 -683
- package/dist/skill-tool-dispatch.runtime-CPBuqyvk.js +0 -143
- package/dist/slash-state-Do3bAahA.js +0 -2166
- package/dist/speech-provider-Bg9los3C.js +0 -184
- package/dist/src-D7LzUctH.js +0 -4256
- package/dist/startup-context-CCF2gIOl.js +0 -313
- package/dist/status-subagents.runtime-DX5FTymp.js +0 -18
- package/dist/status-text-B-1u5dSV.js +0 -296
- package/dist/sticker-cache-DwpU_9RJ.js +0 -206
- package/dist/sticker-vision.runtime-Bbldi_YL.js +0 -17
- package/dist/subagent-announce-BCo0VHVL.js +0 -354
- package/dist/subagent-announce-delivery-JcnuDN_N.js +0 -958
- package/dist/subagent-control-BzbA3Suz.js +0 -508
- package/dist/subagent-hooks-BIGZQWrG.js +0 -2
- package/dist/subagent-hooks-Bj4qYZfv.js +0 -230
- package/dist/subagent-hooks-C-rvhVBv.js +0 -2
- package/dist/subagent-hooks-P01_AFl5.js +0 -116
- package/dist/subagent-hooks-VEfak8nl.js +0 -2
- package/dist/subagent-hooks-api-BPnSxxN4.js +0 -23
- package/dist/subagent-hooks-api-DwIAvMoS.js +0 -22
- package/dist/subagent-hooks-api-kgyR9FOb.js +0 -23
- package/dist/subagent-hooks-oED56wqq.js +0 -146
- package/dist/subagent-orphan-recovery-D79ZzwKN.js +0 -352
- package/dist/subagent-registry-D0soBT5j.js +0 -2351
- package/dist/subagent-registry-DRJDkmty.js +0 -3
- package/dist/subagent-session-cleanup-9eAO1aJe.js +0 -525
- package/dist/subagent-spawn-D80vbogm.js +0 -1164
- package/dist/target-id-COLv5LsJ.js +0 -107
- package/dist/targets-CDW5IQ6a.js +0 -44
- package/dist/targets-Ci6O1ZdP.js +0 -19
- package/dist/targets-CsaWFBg1.js +0 -19
- package/dist/testing-BoJit-h1.js +0 -267
- package/dist/thread-bindings-CGCvw0KT.js +0 -571
- package/dist/thread-bindings-ClCTNacX.js +0 -228
- package/dist/thread-bindings-DRb7BMZ6.js +0 -8
- package/dist/thread-bindings-Xc6smav0.js +0 -232
- package/dist/thread-bindings.discord-api-DC467oeF.js +0 -187
- package/dist/thread-bindings.manager-C_mpTDIZ.js +0 -536
- package/dist/thread-bindings.manager-DkCRs612.js +0 -2
- package/dist/thread-lifecycle-DpqCXlx9.js +0 -1614
- package/dist/token-CI6HjbTA.js +0 -134
- package/dist/tool-BMe7hjBK.js +0 -139
- package/dist/tool-actions.runtime-D-h5PI_m.js +0 -534
- package/dist/tool-resolution-CnLx0CHe.js +0 -149
- package/dist/tools-effective-inventory-BR6MUMtE.js +0 -204
- package/dist/tools-invoke-http-CTTs2yMT.js +0 -67
- package/dist/tools-invoke-shared-9B1EjXWf.js +0 -200
- package/dist/tts-eGOviZ5c.js +0 -66
- package/dist/tui-Bw0HqKd7.js +0 -4709
- package/dist/tui-CIZJnPzj.js +0 -2
- package/dist/tui-backend-BJ_r7tcF.js +0 -256
- package/dist/tui-cli-BaSMBpuA.js +0 -37
- package/dist/update-cli-zuCybGNR.js +0 -3664
- package/dist/update-runner-Dek2BHmQ.js +0 -2379
- package/dist/vision-tools-1ps0BEE5.js +0 -1409
- package/dist/web-search-B7EziZXE.js +0 -62
- package/dist/web-search-provider.runtime-DGTCvGch.js +0 -328
- package/dist/web-search-provider.runtime-DWL5t39M.js +0 -2
- package/dist/xai-oauth-CRtsj2Gs.js +0 -479
- package/dist/xai-user-agent-Dndwzw2S.js +0 -32
- /package/dist/{acp-runtime-backend-DSDBcyh9.js → acp-runtime-backend-Cxo7eBHf.js} +0 -0
- /package/dist/{channel-actions-FV66JqtI.js → channel-actions-UDeVjgGz.js} +0 -0
- /package/dist/{command-status-runtime-BRWKSoG7.js → command-status-runtime-CoHd4Fws.js} +0 -0
- /package/dist/{delegate-DGqKhwB4.js → delegate-B-2xZ77o.js} +0 -0
- /package/dist/{dispatch-acp-Ceoxja_Z.js → dispatch-acp-DLPkmK7K.js} +0 -0
- /package/dist/{heartbeat-runner-CJHvr5pG.js → heartbeat-runner-D2j6JwOI.js} +0 -0
- /package/dist/{library-Bq3aDek_.js → library-DBT0cIPP.js} +0 -0
- /package/dist/{run-executor.runtime-DNJhGPbA.js → run-executor.runtime-DE4J7f4M.js} +0 -0
- /package/dist/{shared-CYxmRpq1.js → shared-xeo8Yh5n.js} +0 -0
|
@@ -1,1782 +0,0 @@
|
|
|
1
|
-
import { a as normalizeLowercaseStringOrEmpty, c as normalizeOptionalString, d as normalizeStringifiedOptionalString } from "./string-coerce-DyL154ka.js";
|
|
2
|
-
import { t as formatDocsLink } from "./links-CM5vg8_V.js";
|
|
3
|
-
import { r as theme } from "./theme-D58JpUfy.js";
|
|
4
|
-
import { i as resolveAgentModelPrimaryValue } from "./model-input-ChW9XXsQ.js";
|
|
5
|
-
import "./agent-scope-Dx1S0aWX.js";
|
|
6
|
-
import { a as resolveAgentDir, c as resolveDefaultAgentId } from "./agent-scope-config-CJUQxn7u.js";
|
|
7
|
-
import { n as defaultRuntime, r as writeRuntimeJson } from "./runtime-E_A14BX_.js";
|
|
8
|
-
import { i as isLoopbackHost } from "./net-DCUMtgJy.js";
|
|
9
|
-
import { i as getRuntimeConfig } from "./io-Ct2JqgbR.js";
|
|
10
|
-
import { r as DEFAULT_PROVIDER } from "./defaults-mDjiWzE5.js";
|
|
11
|
-
import { p as normalizeThinkLevel } from "./thinking-DKvrUm8p.js";
|
|
12
|
-
import { _ as setRuntimeConfigSnapshot, s as getRuntimeConfigSourceSnapshot } from "./runtime-snapshot-DgdkBEdP.js";
|
|
13
|
-
import { t as getProviderEnvVars } from "./provider-env-vars-BbrhJD4E.js";
|
|
14
|
-
import "./config-CLrwLpl0.js";
|
|
15
|
-
import { i as GATEWAY_CLIENT_NAMES, r as GATEWAY_CLIENT_MODES } from "./client-info-B56HGdh-.js";
|
|
16
|
-
import { t as buildGatewayConnectionDetailsWithResolvers } from "./connection-details-DwZSGJDv.js";
|
|
17
|
-
import { t as ADMIN_SCOPE } from "./operator-scopes-DGvgHuOd.js";
|
|
18
|
-
import { r as callGateway, u as randomIdempotencyKey } from "./call-BFqofFc5.js";
|
|
19
|
-
import { i as listMemoryEmbeddingProviders, o as registerMemoryEmbeddingProvider } from "./memory-embedding-providers-B5o4DXj5.js";
|
|
20
|
-
import { n as detectMime, r as extensionForMime, u as normalizeMimeType } from "./mime-DppuT-pZ.js";
|
|
21
|
-
import { p as updateAuthProfileStoreWithLock, s as loadAuthProfileStoreForRuntime } from "./store-Bo7D4Hg4.js";
|
|
22
|
-
import { n as canonicalizeCaseOnlyCatalogModelRef } from "./model-selection-D1TyOrqK.js";
|
|
23
|
-
import { n as loadModelCatalog } from "./model-catalog-W4s3tp_Q.js";
|
|
24
|
-
import { c as getImageMetadata, s as convertHeicToJpeg } from "./media-services-C8kJ1LwP.js";
|
|
25
|
-
import "./auth-profiles-DJttKtDp.js";
|
|
26
|
-
import { n as listProfilesForProvider } from "./profile-list-CF9RJs7e.js";
|
|
27
|
-
import { n as listRuntimeImageGenerationProviders, t as generateImage } from "./runtime-D_QP_pnt.js";
|
|
28
|
-
import { u as saveMediaBuffer } from "./store-53qCOCD8.js";
|
|
29
|
-
import { t as buildExplicitSessionIdSessionKey } from "./session-CMmK5oT3.js";
|
|
30
|
-
import { u as buildMediaUnderstandingRegistry } from "./defaults.constants-DKWmIRMD.js";
|
|
31
|
-
import { a as getCapabilityWebSearchCommandSecretTargets, c as getMemoryEmbeddingCommandSecretTargetIds, l as getModelsCommandSecretTargetIds, m as getTtsCommandSecretTargetIds, r as getCapabilityWebFetchCommandSecretTargets } from "./command-secret-targets-HFIWeId5.js";
|
|
32
|
-
import { S as setTtsEnabled, T as setTtsProvider, _ as resolveTtsPrefsPath, a as getTtsPersona, d as listTtsPersonas, g as resolveTtsConfig, k as textToSpeech, m as resolveExplicitTtsOverrides, o as getTtsProvider, u as listSpeechVoices, w as setTtsPersona } from "./tts-runtime-xVEuik1Y.js";
|
|
33
|
-
import "./tts-53iqjiuM.js";
|
|
34
|
-
import { n as listRuntimeVideoGenerationProviders, t as generateVideo } from "./runtime-DCeoa1Hv.js";
|
|
35
|
-
import { i as runWebSearch, r as listWebSearchProviders, t as isWebSearchProviderConfigured } from "./runtime-BPlnOWaU.js";
|
|
36
|
-
import { i as listSpeechProviders, t as canonicalizeSpeechProviderId } from "./provider-registry-CrwRP6HV.js";
|
|
37
|
-
import { t as resolveMemorySearchConfig } from "./memory-search-CSGF3xvm.js";
|
|
38
|
-
import { i as resolveWebFetchDefinition, r as listWebFetchProviders, t as isWebFetchProviderConfigured } from "./runtime-BFzO948G.js";
|
|
39
|
-
import { r as prepareSimpleCompletionModelForAgent, t as completeWithPreparedSimpleCompletionModel } from "./simple-completion-runtime-CJFmCkYk.js";
|
|
40
|
-
import { n as runCommandWithRuntime } from "./cli-utils-BIL-oMVy.js";
|
|
41
|
-
import { t as removeCommandByName } from "./command-tree-vUuz1b4f.js";
|
|
42
|
-
import { t as collectOption } from "./helpers-BNXNWxTW.js";
|
|
43
|
-
import { n as describeImageFileWithModel, o as transcribeAudioFile, r as describeVideoFile, t as describeImageFile } from "./runtime-B9flDXGr.js";
|
|
44
|
-
import { a as registerBuiltInMemoryEmbeddingProviders, t as createEmbeddingProvider } from "./memory-core-bundled-runtime-DbJzonSb.js";
|
|
45
|
-
import { t as resolveCommandConfigWithSecrets } from "./command-config-resolution--CWFXpho.js";
|
|
46
|
-
import { createWriteStream } from "node:fs";
|
|
47
|
-
import path from "node:path";
|
|
48
|
-
import fs$1 from "node:fs/promises";
|
|
49
|
-
import { randomUUID } from "node:crypto";
|
|
50
|
-
import { pipeline } from "node:stream/promises";
|
|
51
|
-
import { Readable } from "node:stream";
|
|
52
|
-
//#region src/cli/capability-cli.ts
|
|
53
|
-
const IMAGE_OUTPUT_FORMATS = [
|
|
54
|
-
"png",
|
|
55
|
-
"jpeg",
|
|
56
|
-
"webp"
|
|
57
|
-
];
|
|
58
|
-
const IMAGE_BACKGROUNDS = [
|
|
59
|
-
"transparent",
|
|
60
|
-
"opaque",
|
|
61
|
-
"auto"
|
|
62
|
-
];
|
|
63
|
-
const LOCAL_MODEL_RUN_SYSTEM_PROMPT = "You are a personal assistant running inside DaoCore.";
|
|
64
|
-
const HEIC_MODEL_RUN_MIMES = new Set(["image/heic", "image/heif"]);
|
|
65
|
-
const CAPABILITY_METADATA = [
|
|
66
|
-
{
|
|
67
|
-
id: "model.run",
|
|
68
|
-
description: "Run a one-shot inference turn through the selected model provider.",
|
|
69
|
-
transports: ["local", "gateway"],
|
|
70
|
-
flags: [
|
|
71
|
-
"--prompt",
|
|
72
|
-
"--file",
|
|
73
|
-
"--model",
|
|
74
|
-
"--local",
|
|
75
|
-
"--gateway",
|
|
76
|
-
"--json"
|
|
77
|
-
],
|
|
78
|
-
resultShape: "normalized payloads plus provider/model attribution"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: "model.list",
|
|
82
|
-
description: "List known models from the model catalog.",
|
|
83
|
-
transports: ["local"],
|
|
84
|
-
flags: ["--json"],
|
|
85
|
-
resultShape: "catalog entries"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: "model.inspect",
|
|
89
|
-
description: "Inspect one model catalog entry.",
|
|
90
|
-
transports: ["local"],
|
|
91
|
-
flags: ["--model", "--json"],
|
|
92
|
-
resultShape: "single catalog entry"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: "model.providers",
|
|
96
|
-
description: "List model providers discovered from the catalog.",
|
|
97
|
-
transports: ["local"],
|
|
98
|
-
flags: ["--json"],
|
|
99
|
-
resultShape: "provider ids with counts and defaults"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "model.auth.login",
|
|
103
|
-
description: "Run the existing provider auth login flow.",
|
|
104
|
-
transports: ["local"],
|
|
105
|
-
flags: ["--provider"],
|
|
106
|
-
resultShape: "interactive auth result"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: "model.auth.logout",
|
|
110
|
-
description: "Remove saved auth profiles for one provider.",
|
|
111
|
-
transports: ["local"],
|
|
112
|
-
flags: ["--provider", "--json"],
|
|
113
|
-
resultShape: "removed profile ids"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: "model.auth.status",
|
|
117
|
-
description: "Show configured model auth state.",
|
|
118
|
-
transports: ["local"],
|
|
119
|
-
flags: ["--json"],
|
|
120
|
-
resultShape: "model status summary"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: "image.generate",
|
|
124
|
-
description: "Generate raster images with configured image providers.",
|
|
125
|
-
transports: ["local"],
|
|
126
|
-
flags: [
|
|
127
|
-
"--prompt",
|
|
128
|
-
"--model",
|
|
129
|
-
"--count",
|
|
130
|
-
"--size",
|
|
131
|
-
"--aspect-ratio",
|
|
132
|
-
"--resolution",
|
|
133
|
-
"--output",
|
|
134
|
-
"--json"
|
|
135
|
-
],
|
|
136
|
-
resultShape: "saved image files plus attempts"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "image.edit",
|
|
140
|
-
description: "Generate edited images from one or more input files.",
|
|
141
|
-
transports: ["local"],
|
|
142
|
-
flags: [
|
|
143
|
-
"--file",
|
|
144
|
-
"--prompt",
|
|
145
|
-
"--model",
|
|
146
|
-
"--size",
|
|
147
|
-
"--aspect-ratio",
|
|
148
|
-
"--resolution",
|
|
149
|
-
"--output-format",
|
|
150
|
-
"--background",
|
|
151
|
-
"--openai-background",
|
|
152
|
-
"--timeout-ms",
|
|
153
|
-
"--output",
|
|
154
|
-
"--json"
|
|
155
|
-
],
|
|
156
|
-
resultShape: "saved image files plus attempts"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
id: "image.describe",
|
|
160
|
-
description: "Describe one image file through media-understanding providers.",
|
|
161
|
-
transports: ["local"],
|
|
162
|
-
flags: [
|
|
163
|
-
"--file",
|
|
164
|
-
"--prompt",
|
|
165
|
-
"--model",
|
|
166
|
-
"--timeout-ms",
|
|
167
|
-
"--json"
|
|
168
|
-
],
|
|
169
|
-
resultShape: "normalized text output"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
id: "image.describe-many",
|
|
173
|
-
description: "Describe multiple image files independently.",
|
|
174
|
-
transports: ["local"],
|
|
175
|
-
flags: [
|
|
176
|
-
"--file",
|
|
177
|
-
"--prompt",
|
|
178
|
-
"--model",
|
|
179
|
-
"--timeout-ms",
|
|
180
|
-
"--json"
|
|
181
|
-
],
|
|
182
|
-
resultShape: "one text output per file"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: "image.providers",
|
|
186
|
-
description: "List image generation providers.",
|
|
187
|
-
transports: ["local"],
|
|
188
|
-
flags: ["--json"],
|
|
189
|
-
resultShape: "provider ids and defaults"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: "audio.transcribe",
|
|
193
|
-
description: "Transcribe one audio file.",
|
|
194
|
-
transports: ["local"],
|
|
195
|
-
flags: [
|
|
196
|
-
"--file",
|
|
197
|
-
"--model",
|
|
198
|
-
"--json"
|
|
199
|
-
],
|
|
200
|
-
resultShape: "normalized text output"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
id: "audio.providers",
|
|
204
|
-
description: "List audio transcription providers.",
|
|
205
|
-
transports: ["local"],
|
|
206
|
-
flags: ["--json"],
|
|
207
|
-
resultShape: "provider ids and capabilities"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: "tts.convert",
|
|
211
|
-
description: "Convert text to speech.",
|
|
212
|
-
transports: ["local", "gateway"],
|
|
213
|
-
flags: [
|
|
214
|
-
"--text",
|
|
215
|
-
"--channel",
|
|
216
|
-
"--voice",
|
|
217
|
-
"--model",
|
|
218
|
-
"--output",
|
|
219
|
-
"--local",
|
|
220
|
-
"--gateway",
|
|
221
|
-
"--json"
|
|
222
|
-
],
|
|
223
|
-
resultShape: "saved audio file plus attempts"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
id: "tts.voices",
|
|
227
|
-
description: "List voices for a speech provider.",
|
|
228
|
-
transports: ["local"],
|
|
229
|
-
flags: ["--provider", "--json"],
|
|
230
|
-
resultShape: "voice entries"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
id: "tts.providers",
|
|
234
|
-
description: "List speech providers.",
|
|
235
|
-
transports: ["local", "gateway"],
|
|
236
|
-
flags: [
|
|
237
|
-
"--local",
|
|
238
|
-
"--gateway",
|
|
239
|
-
"--json"
|
|
240
|
-
],
|
|
241
|
-
resultShape: "provider ids, configured state, models, voices"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
id: "tts.personas",
|
|
245
|
-
description: "List TTS personas.",
|
|
246
|
-
transports: ["local", "gateway"],
|
|
247
|
-
flags: [
|
|
248
|
-
"--local",
|
|
249
|
-
"--gateway",
|
|
250
|
-
"--json"
|
|
251
|
-
],
|
|
252
|
-
resultShape: "persona ids, labels, providers, active persona"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
id: "tts.status",
|
|
256
|
-
description: "Show gateway-managed TTS state.",
|
|
257
|
-
transports: ["gateway"],
|
|
258
|
-
flags: ["--gateway", "--json"],
|
|
259
|
-
resultShape: "enabled/provider state"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
id: "tts.enable",
|
|
263
|
-
description: "Enable TTS in prefs.",
|
|
264
|
-
transports: ["local", "gateway"],
|
|
265
|
-
flags: [
|
|
266
|
-
"--local",
|
|
267
|
-
"--gateway",
|
|
268
|
-
"--json"
|
|
269
|
-
],
|
|
270
|
-
resultShape: "enabled state"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
id: "tts.disable",
|
|
274
|
-
description: "Disable TTS in prefs.",
|
|
275
|
-
transports: ["local", "gateway"],
|
|
276
|
-
flags: [
|
|
277
|
-
"--local",
|
|
278
|
-
"--gateway",
|
|
279
|
-
"--json"
|
|
280
|
-
],
|
|
281
|
-
resultShape: "enabled state"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: "tts.set-provider",
|
|
285
|
-
description: "Set the active TTS provider.",
|
|
286
|
-
transports: ["local", "gateway"],
|
|
287
|
-
flags: [
|
|
288
|
-
"--provider",
|
|
289
|
-
"--local",
|
|
290
|
-
"--gateway",
|
|
291
|
-
"--json"
|
|
292
|
-
],
|
|
293
|
-
resultShape: "selected provider"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
id: "tts.set-persona",
|
|
297
|
-
description: "Set the active TTS persona.",
|
|
298
|
-
transports: ["local", "gateway"],
|
|
299
|
-
flags: [
|
|
300
|
-
"--persona",
|
|
301
|
-
"--off",
|
|
302
|
-
"--local",
|
|
303
|
-
"--gateway",
|
|
304
|
-
"--json"
|
|
305
|
-
],
|
|
306
|
-
resultShape: "selected persona"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
id: "video.generate",
|
|
310
|
-
description: "Generate video files with configured video providers.",
|
|
311
|
-
transports: ["local"],
|
|
312
|
-
flags: [
|
|
313
|
-
"--prompt",
|
|
314
|
-
"--model",
|
|
315
|
-
"--size",
|
|
316
|
-
"--aspect-ratio",
|
|
317
|
-
"--resolution",
|
|
318
|
-
"--duration",
|
|
319
|
-
"--audio",
|
|
320
|
-
"--watermark",
|
|
321
|
-
"--timeout-ms",
|
|
322
|
-
"--output",
|
|
323
|
-
"--json"
|
|
324
|
-
],
|
|
325
|
-
resultShape: "saved video files plus attempts"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
id: "video.describe",
|
|
329
|
-
description: "Describe one video file through media-understanding providers.",
|
|
330
|
-
transports: ["local"],
|
|
331
|
-
flags: [
|
|
332
|
-
"--file",
|
|
333
|
-
"--model",
|
|
334
|
-
"--json"
|
|
335
|
-
],
|
|
336
|
-
resultShape: "normalized text output"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
id: "video.providers",
|
|
340
|
-
description: "List video generation and description providers.",
|
|
341
|
-
transports: ["local"],
|
|
342
|
-
flags: ["--json"],
|
|
343
|
-
resultShape: "provider ids and defaults"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
id: "web.search",
|
|
347
|
-
description: "Run provider-backed web search.",
|
|
348
|
-
transports: ["local"],
|
|
349
|
-
flags: [
|
|
350
|
-
"--query",
|
|
351
|
-
"--provider",
|
|
352
|
-
"--limit",
|
|
353
|
-
"--json"
|
|
354
|
-
],
|
|
355
|
-
resultShape: "search provider result"
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
id: "web.fetch",
|
|
359
|
-
description: "Fetch URL content through configured web fetch providers.",
|
|
360
|
-
transports: ["local"],
|
|
361
|
-
flags: [
|
|
362
|
-
"--url",
|
|
363
|
-
"--provider",
|
|
364
|
-
"--format",
|
|
365
|
-
"--json"
|
|
366
|
-
],
|
|
367
|
-
resultShape: "fetch provider result"
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
id: "web.providers",
|
|
371
|
-
description: "List web search and fetch providers.",
|
|
372
|
-
transports: ["local"],
|
|
373
|
-
flags: ["--json"],
|
|
374
|
-
resultShape: "provider ids grouped by family"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
id: "embedding.create",
|
|
378
|
-
description: "Create embeddings through embedding providers.",
|
|
379
|
-
transports: ["local"],
|
|
380
|
-
flags: [
|
|
381
|
-
"--text",
|
|
382
|
-
"--provider",
|
|
383
|
-
"--model",
|
|
384
|
-
"--json"
|
|
385
|
-
],
|
|
386
|
-
resultShape: "vectors with provider/model attribution"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
id: "embedding.providers",
|
|
390
|
-
description: "List embedding providers.",
|
|
391
|
-
transports: ["local"],
|
|
392
|
-
flags: ["--json"],
|
|
393
|
-
resultShape: "provider ids and default models"
|
|
394
|
-
}
|
|
395
|
-
];
|
|
396
|
-
function findCapabilityMetadata(id) {
|
|
397
|
-
return CAPABILITY_METADATA.find((entry) => entry.id === id);
|
|
398
|
-
}
|
|
399
|
-
function resolveTransport(opts) {
|
|
400
|
-
if (opts.local && opts.gateway) throw new Error("Pass only one of --local or --gateway.");
|
|
401
|
-
if (opts.local) {
|
|
402
|
-
if (!opts.supported.includes("local")) throw new Error("This command does not support --local.");
|
|
403
|
-
return "local";
|
|
404
|
-
}
|
|
405
|
-
if (opts.gateway) {
|
|
406
|
-
if (!opts.supported.includes("gateway")) throw new Error("This command does not support --gateway.");
|
|
407
|
-
return "gateway";
|
|
408
|
-
}
|
|
409
|
-
return opts.defaultTransport;
|
|
410
|
-
}
|
|
411
|
-
function emitJsonOrText(runtime, json, value, textFormatter) {
|
|
412
|
-
if (json) {
|
|
413
|
-
writeRuntimeJson(runtime, value);
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
runtime.log(textFormatter(value));
|
|
417
|
-
}
|
|
418
|
-
function formatEnvelopeForText(value) {
|
|
419
|
-
const envelope = value;
|
|
420
|
-
if (!envelope.ok) return `${envelope.capability} failed: ${envelope.error ?? "unknown error"}`;
|
|
421
|
-
const lines = [
|
|
422
|
-
`${envelope.capability} via ${envelope.transport}`,
|
|
423
|
-
...envelope.provider ? [`provider: ${envelope.provider}`] : [],
|
|
424
|
-
...envelope.model ? [`model: ${envelope.model}`] : [],
|
|
425
|
-
...envelope.ignoredOverrides && envelope.ignoredOverrides.length > 0 ? [`ignoredOverrides: ${JSON.stringify(envelope.ignoredOverrides)}`] : [],
|
|
426
|
-
`outputs: ${String(envelope.outputs.length)}`
|
|
427
|
-
];
|
|
428
|
-
for (const output of envelope.outputs) {
|
|
429
|
-
const pathValue = typeof output.path === "string" ? output.path : void 0;
|
|
430
|
-
const textValue = typeof output.text === "string" ? output.text : void 0;
|
|
431
|
-
if (pathValue) lines.push(pathValue);
|
|
432
|
-
else if (textValue) lines.push(textValue);
|
|
433
|
-
else lines.push(JSON.stringify(output));
|
|
434
|
-
}
|
|
435
|
-
return lines.join("\n");
|
|
436
|
-
}
|
|
437
|
-
function providerSummaryText(value) {
|
|
438
|
-
return value.map((entry) => JSON.stringify(entry)).join("\n");
|
|
439
|
-
}
|
|
440
|
-
function hasOwnKeys(value) {
|
|
441
|
-
return Boolean(value && typeof value === "object" && Object.keys(value).length > 0);
|
|
442
|
-
}
|
|
443
|
-
function resolveSelectedProviderFromModelRef(modelRef) {
|
|
444
|
-
return resolveModelRefOverride(modelRef).provider;
|
|
445
|
-
}
|
|
446
|
-
function getAuthProfileIdsForProvider(cfg, providerId) {
|
|
447
|
-
return listProfilesForProvider(loadAuthProfileStoreForRuntime(resolveAgentDir(cfg, resolveDefaultAgentId(cfg))), providerId);
|
|
448
|
-
}
|
|
449
|
-
function providerHasGenericConfig(params) {
|
|
450
|
-
const modelsProviders = params.cfg.models?.providers ?? {};
|
|
451
|
-
const pluginEntries = params.cfg.plugins?.entries ?? {};
|
|
452
|
-
const ttsProviders = params.cfg.messages?.tts?.providers ?? {};
|
|
453
|
-
const envConfigured = (params.envVars ?? []).some((envVar) => Boolean(process.env[envVar]?.trim()));
|
|
454
|
-
return getAuthProfileIdsForProvider(params.cfg, params.providerId).length > 0 || hasOwnKeys(modelsProviders[params.providerId]) || hasOwnKeys(pluginEntries[params.providerId]?.config) || hasOwnKeys(ttsProviders[params.providerId]) || envConfigured;
|
|
455
|
-
}
|
|
456
|
-
async function writeOutputAsset(params) {
|
|
457
|
-
if (!params.outputPath) {
|
|
458
|
-
const saved = await saveMediaBuffer(params.buffer, params.mimeType, params.subdir, Number.MAX_SAFE_INTEGER, params.originalFilename);
|
|
459
|
-
return {
|
|
460
|
-
path: saved.path,
|
|
461
|
-
mimeType: saved.contentType,
|
|
462
|
-
size: saved.size
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
const resolvedOutput = path.resolve(params.outputPath);
|
|
466
|
-
const parsed = path.parse(resolvedOutput);
|
|
467
|
-
const detectedMime = await detectMime({
|
|
468
|
-
buffer: params.buffer,
|
|
469
|
-
headerMime: params.mimeType
|
|
470
|
-
}) ?? params.mimeType;
|
|
471
|
-
const requestedMime = normalizeMimeType(await detectMime({ filePath: resolvedOutput }));
|
|
472
|
-
const detectedNormalized = normalizeMimeType(detectedMime);
|
|
473
|
-
const canonicalDetectedExt = extensionForMime(detectedNormalized);
|
|
474
|
-
const fallbackExt = parsed.ext || path.extname(params.originalFilename ?? "") || "";
|
|
475
|
-
const ext = parsed.ext && requestedMime === detectedNormalized ? parsed.ext : canonicalDetectedExt ?? fallbackExt;
|
|
476
|
-
const filePath = params.outputCount <= 1 ? path.join(parsed.dir, `${parsed.name}${ext}`) : path.join(parsed.dir, `${parsed.name}-${String(params.outputIndex + 1)}${ext}`);
|
|
477
|
-
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
478
|
-
await fs$1.writeFile(filePath, params.buffer);
|
|
479
|
-
return {
|
|
480
|
-
path: filePath,
|
|
481
|
-
mimeType: detectedNormalized ?? params.mimeType,
|
|
482
|
-
size: params.buffer.byteLength
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
async function readInputFiles(files) {
|
|
486
|
-
return await Promise.all(files.map(async (filePath) => ({
|
|
487
|
-
path: path.resolve(filePath),
|
|
488
|
-
buffer: await fs$1.readFile(path.resolve(filePath))
|
|
489
|
-
})));
|
|
490
|
-
}
|
|
491
|
-
function resolveModelRefOverride(raw) {
|
|
492
|
-
const trimmed = raw?.trim();
|
|
493
|
-
if (!trimmed) return {};
|
|
494
|
-
const slash = trimmed.indexOf("/");
|
|
495
|
-
if (slash <= 0 || slash === trimmed.length - 1) return { model: trimmed };
|
|
496
|
-
return {
|
|
497
|
-
provider: trimmed.slice(0, slash),
|
|
498
|
-
model: trimmed.slice(slash + 1)
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
async function canonicalizeModelRunRef(params) {
|
|
502
|
-
return await canonicalizeCaseOnlyCatalogModelRef({
|
|
503
|
-
cfg: params.cfg,
|
|
504
|
-
raw: params.raw,
|
|
505
|
-
defaultProvider: DEFAULT_PROVIDER,
|
|
506
|
-
loadCatalog: () => loadModelCatalog({
|
|
507
|
-
config: params.cfg,
|
|
508
|
-
readOnly: true
|
|
509
|
-
}),
|
|
510
|
-
preserveAuthProfile: params.preserveAuthProfile
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
function requireProviderModelOverride(raw) {
|
|
514
|
-
const resolved = resolveModelRefOverride(raw);
|
|
515
|
-
if (!raw?.trim()) return;
|
|
516
|
-
if (!resolved.provider || !resolved.model) throw new Error("Model overrides must use the form <provider/model>.");
|
|
517
|
-
return {
|
|
518
|
-
provider: resolved.provider,
|
|
519
|
-
model: resolved.model
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
function collectModelRunText(content) {
|
|
523
|
-
return content.map((block) => block.type === "text" && typeof block.text === "string" ? block.text : "").join("").trim();
|
|
524
|
-
}
|
|
525
|
-
function requireModelRunPrompt(value) {
|
|
526
|
-
if (typeof value !== "string" || normalizeOptionalString(value) === void 0) throw new Error("--prompt cannot be empty or whitespace-only.");
|
|
527
|
-
return value;
|
|
528
|
-
}
|
|
529
|
-
async function readModelRunImageFiles(files) {
|
|
530
|
-
if (!files || files.length === 0) return [];
|
|
531
|
-
return await Promise.all(files.map(async (filePath) => {
|
|
532
|
-
const resolvedPath = path.resolve(filePath);
|
|
533
|
-
const buffer = await fs$1.readFile(resolvedPath);
|
|
534
|
-
const mimeType = normalizeMimeType(await detectMime({
|
|
535
|
-
buffer,
|
|
536
|
-
filePath: resolvedPath
|
|
537
|
-
}));
|
|
538
|
-
if (!mimeType?.startsWith("image/")) throw new Error(`Unsupported --file for model run: ${resolvedPath}. Only image files are supported; use infer audio transcribe for audio files.`);
|
|
539
|
-
if (HEIC_MODEL_RUN_MIMES.has(mimeType)) {
|
|
540
|
-
const converted = await convertHeicToJpeg(buffer);
|
|
541
|
-
return {
|
|
542
|
-
path: resolvedPath,
|
|
543
|
-
fileName: path.basename(resolvedPath),
|
|
544
|
-
mimeType: "image/jpeg",
|
|
545
|
-
data: converted.toString("base64")
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
return {
|
|
549
|
-
path: resolvedPath,
|
|
550
|
-
fileName: path.basename(resolvedPath),
|
|
551
|
-
mimeType,
|
|
552
|
-
data: buffer.toString("base64")
|
|
553
|
-
};
|
|
554
|
-
}));
|
|
555
|
-
}
|
|
556
|
-
function normalizeModelRunThinking(value) {
|
|
557
|
-
if (value === void 0) return;
|
|
558
|
-
if (typeof value !== "string") throw new Error("--thinking must be a string.");
|
|
559
|
-
const normalized = normalizeThinkLevel(value);
|
|
560
|
-
if (!normalized) throw new Error("Invalid thinking level. Use one of: off, minimal, low, medium, high, adaptive, xhigh, max.");
|
|
561
|
-
return normalized;
|
|
562
|
-
}
|
|
563
|
-
async function runModelRun(params) {
|
|
564
|
-
const cfg = params.transport === "local" ? await resolveLocalCapabilityRuntimeConfig({
|
|
565
|
-
commandName: "infer model run",
|
|
566
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
567
|
-
}) : getRuntimeConfig();
|
|
568
|
-
const agentId = resolveDefaultAgentId(cfg);
|
|
569
|
-
const modelRef = await canonicalizeModelRunRef({
|
|
570
|
-
raw: params.model,
|
|
571
|
-
cfg,
|
|
572
|
-
preserveAuthProfile: params.transport === "local"
|
|
573
|
-
});
|
|
574
|
-
const explicitModelOverride = resolveModelRefOverride(params.model);
|
|
575
|
-
const hasExplicitProviderModelOverride = Boolean(params.model?.trim() && explicitModelOverride.provider && explicitModelOverride.model);
|
|
576
|
-
const imageFiles = await readModelRunImageFiles(params.files);
|
|
577
|
-
const messageContent = imageFiles.length > 0 ? [{
|
|
578
|
-
type: "text",
|
|
579
|
-
text: params.prompt
|
|
580
|
-
}, ...imageFiles.map((image) => ({
|
|
581
|
-
type: "image",
|
|
582
|
-
data: image.data,
|
|
583
|
-
mimeType: image.mimeType
|
|
584
|
-
}))] : params.prompt;
|
|
585
|
-
if (params.transport === "local") {
|
|
586
|
-
const prepared = await prepareSimpleCompletionModelForAgent({
|
|
587
|
-
cfg,
|
|
588
|
-
agentId,
|
|
589
|
-
modelRef,
|
|
590
|
-
allowMissingApiKeyModes: ["aws-sdk"],
|
|
591
|
-
...hasExplicitProviderModelOverride ? { allowBundledStaticCatalogFallback: true } : {},
|
|
592
|
-
skipPiDiscovery: true
|
|
593
|
-
});
|
|
594
|
-
if ("error" in prepared) throw new Error(prepared.error);
|
|
595
|
-
if (prepared.selection.provider === "codex") throw new Error("The codex provider is served by the Codex app-server agent runtime, not the local simple-completion transport. Use an openai/<model> ref with agents.defaults.agentRuntime.id: \"codex\", run through the gateway, or use /codex commands.");
|
|
596
|
-
const localModelRunSystemPrompt = prepared.selection.provider === "openai-codex" || prepared.model.api === "openai-codex-responses" ? LOCAL_MODEL_RUN_SYSTEM_PROMPT : void 0;
|
|
597
|
-
const result = await completeWithPreparedSimpleCompletionModel({
|
|
598
|
-
model: prepared.model,
|
|
599
|
-
auth: prepared.auth,
|
|
600
|
-
cfg,
|
|
601
|
-
context: {
|
|
602
|
-
...localModelRunSystemPrompt ? { systemPrompt: localModelRunSystemPrompt } : {},
|
|
603
|
-
messages: [{
|
|
604
|
-
role: "user",
|
|
605
|
-
content: messageContent,
|
|
606
|
-
timestamp: Date.now()
|
|
607
|
-
}]
|
|
608
|
-
},
|
|
609
|
-
options: {
|
|
610
|
-
maxTokens: typeof prepared.model.maxTokens === "number" && Number.isFinite(prepared.model.maxTokens) ? prepared.model.maxTokens : void 0,
|
|
611
|
-
...params.thinking ? { reasoning: params.thinking } : {}
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
const text = collectModelRunText(result.content);
|
|
615
|
-
if (!text) {
|
|
616
|
-
const providerErrorMessage = result.errorMessage;
|
|
617
|
-
const detail = typeof providerErrorMessage === "string" && providerErrorMessage.trim() ? `: ${providerErrorMessage.trim()}` : "";
|
|
618
|
-
throw new Error(`No text output returned for provider "${prepared.selection.provider}" model "${prepared.selection.modelId}"${detail}.`);
|
|
619
|
-
}
|
|
620
|
-
return {
|
|
621
|
-
ok: true,
|
|
622
|
-
capability: "model.run",
|
|
623
|
-
transport: "local",
|
|
624
|
-
provider: prepared.selection.provider,
|
|
625
|
-
model: prepared.selection.modelId,
|
|
626
|
-
attempts: [],
|
|
627
|
-
...imageFiles.length > 0 ? { inputs: imageFiles.map((image) => ({
|
|
628
|
-
path: image.path,
|
|
629
|
-
mimeType: image.mimeType
|
|
630
|
-
})) } : {},
|
|
631
|
-
outputs: [{
|
|
632
|
-
text,
|
|
633
|
-
mediaUrl: null
|
|
634
|
-
}]
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
const { provider, model } = resolveModelRefOverride(modelRef);
|
|
638
|
-
const hasModelOverride = Boolean(provider || model);
|
|
639
|
-
const sessionId = `model-run-${randomUUID()}`;
|
|
640
|
-
const response = await callGateway({
|
|
641
|
-
method: "agent",
|
|
642
|
-
params: {
|
|
643
|
-
agentId,
|
|
644
|
-
sessionId,
|
|
645
|
-
sessionKey: buildExplicitSessionIdSessionKey({
|
|
646
|
-
agentId,
|
|
647
|
-
sessionId
|
|
648
|
-
}),
|
|
649
|
-
message: params.prompt,
|
|
650
|
-
attachments: imageFiles.length > 0 ? imageFiles.map((image) => ({
|
|
651
|
-
type: "image",
|
|
652
|
-
fileName: image.fileName,
|
|
653
|
-
mimeType: image.mimeType,
|
|
654
|
-
content: image.data
|
|
655
|
-
})) : void 0,
|
|
656
|
-
provider,
|
|
657
|
-
model,
|
|
658
|
-
...params.thinking ? { thinking: params.thinking } : {},
|
|
659
|
-
modelRun: true,
|
|
660
|
-
promptMode: "none",
|
|
661
|
-
cleanupBundleMcpOnRunEnd: true,
|
|
662
|
-
idempotencyKey: randomIdempotencyKey()
|
|
663
|
-
},
|
|
664
|
-
expectFinal: true,
|
|
665
|
-
timeoutMs: 12e4,
|
|
666
|
-
clientName: hasModelOverride ? GATEWAY_CLIENT_NAMES.GATEWAY_CLIENT : GATEWAY_CLIENT_NAMES.CLI,
|
|
667
|
-
mode: hasModelOverride ? GATEWAY_CLIENT_MODES.BACKEND : GATEWAY_CLIENT_MODES.CLI,
|
|
668
|
-
...hasModelOverride ? { scopes: [ADMIN_SCOPE] } : {}
|
|
669
|
-
});
|
|
670
|
-
return {
|
|
671
|
-
ok: true,
|
|
672
|
-
capability: "model.run",
|
|
673
|
-
transport: "gateway",
|
|
674
|
-
provider: response?.result?.meta?.agentMeta?.provider,
|
|
675
|
-
model: response?.result?.meta?.agentMeta?.model,
|
|
676
|
-
attempts: response?.result?.meta?.agentMeta?.fallbackAttempts ?? [],
|
|
677
|
-
outputs: (response?.result?.payloads ?? []).map((payload) => ({
|
|
678
|
-
text: payload.text,
|
|
679
|
-
mediaUrl: payload.mediaUrl,
|
|
680
|
-
mediaUrls: payload.mediaUrls
|
|
681
|
-
})),
|
|
682
|
-
...imageFiles.length > 0 ? { inputs: imageFiles.map((image) => ({
|
|
683
|
-
path: image.path,
|
|
684
|
-
mimeType: image.mimeType
|
|
685
|
-
})) } : {}
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
async function buildModelProviders() {
|
|
689
|
-
const cfg = getRuntimeConfig();
|
|
690
|
-
const catalog = await loadModelCatalog({ config: cfg });
|
|
691
|
-
const selectedProvider = resolveSelectedProviderFromModelRef(resolveAgentModelPrimaryValue(cfg.agents?.defaults?.model));
|
|
692
|
-
const grouped = /* @__PURE__ */ new Map();
|
|
693
|
-
for (const entry of catalog) {
|
|
694
|
-
const current = grouped.get(entry.provider) ?? {
|
|
695
|
-
provider: entry.provider,
|
|
696
|
-
count: 0,
|
|
697
|
-
defaults: [],
|
|
698
|
-
available: true,
|
|
699
|
-
configured: providerHasGenericConfig({
|
|
700
|
-
cfg,
|
|
701
|
-
providerId: entry.provider
|
|
702
|
-
}),
|
|
703
|
-
selected: selectedProvider === entry.provider
|
|
704
|
-
};
|
|
705
|
-
current.count += 1;
|
|
706
|
-
if (current.defaults.length < 3) current.defaults.push(entry.id);
|
|
707
|
-
grouped.set(entry.provider, current);
|
|
708
|
-
}
|
|
709
|
-
return [...grouped.values()].toSorted((a, b) => a.provider.localeCompare(b.provider));
|
|
710
|
-
}
|
|
711
|
-
async function runModelAuthStatus() {
|
|
712
|
-
const captured = [];
|
|
713
|
-
const { modelsStatusCommand } = await import("./list.status-command-CyeAJmZW.js");
|
|
714
|
-
await modelsStatusCommand({ json: true }, {
|
|
715
|
-
log: (...args) => captured.push(args.join(" ")),
|
|
716
|
-
error: (message) => {
|
|
717
|
-
throw message instanceof Error ? message : new Error(String(message));
|
|
718
|
-
},
|
|
719
|
-
exit: (code) => {
|
|
720
|
-
throw new Error(`exit ${code}`);
|
|
721
|
-
}
|
|
722
|
-
});
|
|
723
|
-
const raw = captured.find((line) => line.trim().startsWith("{"));
|
|
724
|
-
return raw ? JSON.parse(raw) : {};
|
|
725
|
-
}
|
|
726
|
-
async function runModelAuthLogout(provider, agent) {
|
|
727
|
-
const cfg = getRuntimeConfig();
|
|
728
|
-
const agentDir = resolveAgentDir(cfg, agent?.trim() || resolveDefaultAgentId(cfg));
|
|
729
|
-
const profileIds = listProfilesForProvider(loadAuthProfileStoreForRuntime(agentDir), provider);
|
|
730
|
-
if (!await updateAuthProfileStoreWithLock({
|
|
731
|
-
agentDir,
|
|
732
|
-
updater: (nextStore) => {
|
|
733
|
-
let changed = false;
|
|
734
|
-
for (const profileId of profileIds) {
|
|
735
|
-
if (nextStore.profiles[profileId]) {
|
|
736
|
-
delete nextStore.profiles[profileId];
|
|
737
|
-
changed = true;
|
|
738
|
-
}
|
|
739
|
-
if (nextStore.usageStats?.[profileId]) {
|
|
740
|
-
delete nextStore.usageStats[profileId];
|
|
741
|
-
changed = true;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
if (nextStore.order?.[provider]) {
|
|
745
|
-
delete nextStore.order[provider];
|
|
746
|
-
changed = true;
|
|
747
|
-
}
|
|
748
|
-
if (nextStore.lastGood?.[provider]) {
|
|
749
|
-
delete nextStore.lastGood[provider];
|
|
750
|
-
changed = true;
|
|
751
|
-
}
|
|
752
|
-
return changed;
|
|
753
|
-
}
|
|
754
|
-
})) throw new Error(`Failed to remove saved auth profiles for provider ${provider}.`);
|
|
755
|
-
return {
|
|
756
|
-
provider,
|
|
757
|
-
removedProfiles: profileIds
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
async function runImageGenerate(params) {
|
|
761
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
762
|
-
commandName: `infer ${params.capability}`,
|
|
763
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
764
|
-
});
|
|
765
|
-
const agentDir = resolveAgentDir(cfg, resolveDefaultAgentId(cfg));
|
|
766
|
-
const inputImages = params.file && params.file.length > 0 ? await Promise.all((await readInputFiles(params.file)).map(async (entry) => ({
|
|
767
|
-
buffer: entry.buffer,
|
|
768
|
-
fileName: path.basename(entry.path),
|
|
769
|
-
mimeType: await detectMime({
|
|
770
|
-
buffer: entry.buffer,
|
|
771
|
-
filePath: entry.path
|
|
772
|
-
}) ?? "image/png"
|
|
773
|
-
}))) : void 0;
|
|
774
|
-
const result = await generateImage({
|
|
775
|
-
cfg,
|
|
776
|
-
agentDir,
|
|
777
|
-
prompt: params.prompt,
|
|
778
|
-
modelOverride: params.model,
|
|
779
|
-
count: params.count,
|
|
780
|
-
size: params.size,
|
|
781
|
-
aspectRatio: params.aspectRatio,
|
|
782
|
-
resolution: params.resolution,
|
|
783
|
-
outputFormat: params.outputFormat,
|
|
784
|
-
background: params.background,
|
|
785
|
-
providerOptions: params.openaiBackground ? { openai: { background: params.openaiBackground } } : void 0,
|
|
786
|
-
timeoutMs: params.timeoutMs,
|
|
787
|
-
inputImages
|
|
788
|
-
});
|
|
789
|
-
const outputs = await Promise.all(result.images.map(async (image, index) => {
|
|
790
|
-
const written = await writeOutputAsset({
|
|
791
|
-
buffer: image.buffer,
|
|
792
|
-
mimeType: image.mimeType,
|
|
793
|
-
originalFilename: image.fileName,
|
|
794
|
-
outputPath: params.output,
|
|
795
|
-
outputIndex: index,
|
|
796
|
-
outputCount: result.images.length,
|
|
797
|
-
subdir: "generated"
|
|
798
|
-
});
|
|
799
|
-
const metadata = await getImageMetadata(image.buffer).catch(() => void 0);
|
|
800
|
-
return {
|
|
801
|
-
...written,
|
|
802
|
-
width: metadata?.width,
|
|
803
|
-
height: metadata?.height,
|
|
804
|
-
revisedPrompt: image.revisedPrompt
|
|
805
|
-
};
|
|
806
|
-
}));
|
|
807
|
-
return {
|
|
808
|
-
ok: true,
|
|
809
|
-
capability: params.capability,
|
|
810
|
-
transport: "local",
|
|
811
|
-
provider: result.provider,
|
|
812
|
-
model: result.model,
|
|
813
|
-
attempts: result.attempts,
|
|
814
|
-
outputs,
|
|
815
|
-
ignoredOverrides: result.ignoredOverrides
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
|
-
async function runImageDescribe(params) {
|
|
819
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
820
|
-
commandName: `infer ${params.capability}`,
|
|
821
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
822
|
-
});
|
|
823
|
-
const agentDir = resolveAgentDir(cfg, resolveDefaultAgentId(cfg));
|
|
824
|
-
const activeModel = requireProviderModelOverride(params.model);
|
|
825
|
-
const prompt = normalizeOptionalString(params.prompt);
|
|
826
|
-
const outputs = await Promise.all(params.files.map(async (filePath) => {
|
|
827
|
-
const resolvedPath = resolveImageDescribeInput(filePath);
|
|
828
|
-
const isRemoteUrl = /^https?:\/\//i.test(resolvedPath);
|
|
829
|
-
const result = activeModel ? await describeImageFileWithModel({
|
|
830
|
-
filePath: resolvedPath,
|
|
831
|
-
...isRemoteUrl ? { mediaUrl: resolvedPath } : {},
|
|
832
|
-
cfg,
|
|
833
|
-
agentDir,
|
|
834
|
-
provider: activeModel.provider,
|
|
835
|
-
model: activeModel.model,
|
|
836
|
-
prompt: prompt ?? "Describe the image.",
|
|
837
|
-
timeoutMs: params.timeoutMs
|
|
838
|
-
}) : await describeImageFile({
|
|
839
|
-
filePath: resolvedPath,
|
|
840
|
-
...isRemoteUrl ? { mediaUrl: resolvedPath } : {},
|
|
841
|
-
cfg,
|
|
842
|
-
agentDir,
|
|
843
|
-
prompt,
|
|
844
|
-
timeoutMs: params.timeoutMs
|
|
845
|
-
});
|
|
846
|
-
if (!result.text) {
|
|
847
|
-
if (isMissingMediaUnderstandingProvider(result)) throw new Error("No image understanding provider is configured or ready. Configure tools.media.image.models or agents.defaults.imageModel.primary, or pass --model <provider/model> after configuring that provider's auth/API key.");
|
|
848
|
-
throw new Error(`No description returned for image: ${resolvedPath}`);
|
|
849
|
-
}
|
|
850
|
-
return {
|
|
851
|
-
path: resolvedPath,
|
|
852
|
-
text: result.text,
|
|
853
|
-
provider: activeModel?.provider ?? ("provider" in result ? result.provider : void 0),
|
|
854
|
-
model: result.model,
|
|
855
|
-
kind: "image.description"
|
|
856
|
-
};
|
|
857
|
-
}));
|
|
858
|
-
return {
|
|
859
|
-
ok: true,
|
|
860
|
-
capability: params.capability,
|
|
861
|
-
transport: "local",
|
|
862
|
-
provider: outputs[0]?.provider,
|
|
863
|
-
model: outputs[0]?.model,
|
|
864
|
-
attempts: [],
|
|
865
|
-
outputs
|
|
866
|
-
};
|
|
867
|
-
}
|
|
868
|
-
function isMissingMediaUnderstandingProvider(result) {
|
|
869
|
-
const decision = result.decision;
|
|
870
|
-
return decision?.outcome === "skipped" && decision.attachments.length > 0 && decision.attachments.every((attachment) => attachment.attempts.length === 0);
|
|
871
|
-
}
|
|
872
|
-
async function runAudioTranscribe(params) {
|
|
873
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
874
|
-
commandName: "infer audio transcribe",
|
|
875
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
876
|
-
});
|
|
877
|
-
const activeModel = requireProviderModelOverride(params.model);
|
|
878
|
-
const result = await transcribeAudioFile({
|
|
879
|
-
filePath: path.resolve(params.file),
|
|
880
|
-
cfg,
|
|
881
|
-
language: params.language,
|
|
882
|
-
activeModel,
|
|
883
|
-
prompt: params.prompt
|
|
884
|
-
});
|
|
885
|
-
if (!result.text) {
|
|
886
|
-
if (isMissingMediaUnderstandingProvider(result)) throw new Error("No audio transcription provider is configured or ready. Configure tools.media.audio.models, or pass --model <provider/model> after configuring that provider's auth/API key.");
|
|
887
|
-
throw new Error(`No transcript returned for audio: ${path.resolve(params.file)}`);
|
|
888
|
-
}
|
|
889
|
-
return {
|
|
890
|
-
ok: true,
|
|
891
|
-
capability: "audio.transcribe",
|
|
892
|
-
transport: "local",
|
|
893
|
-
attempts: [],
|
|
894
|
-
outputs: [{
|
|
895
|
-
path: path.resolve(params.file),
|
|
896
|
-
text: result.text,
|
|
897
|
-
kind: "audio.transcription"
|
|
898
|
-
}]
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
function parseOptionalFiniteNumber(raw, label) {
|
|
902
|
-
if (raw === void 0 || typeof raw === "string" && raw.trim() === "") return;
|
|
903
|
-
const value = Number(raw);
|
|
904
|
-
if (!Number.isFinite(value)) throw new Error(`${label} must be a finite number`);
|
|
905
|
-
return value;
|
|
906
|
-
}
|
|
907
|
-
function normalizeImageOutputFormat(raw) {
|
|
908
|
-
const normalized = normalizeLowercaseStringOrEmpty(raw);
|
|
909
|
-
if (!normalized) return;
|
|
910
|
-
if (IMAGE_OUTPUT_FORMATS.includes(normalized)) return normalized;
|
|
911
|
-
throw new Error("--output-format must be one of png, jpeg, or webp");
|
|
912
|
-
}
|
|
913
|
-
function normalizeImageBackground(raw, label = "--background") {
|
|
914
|
-
const normalized = normalizeLowercaseStringOrEmpty(raw);
|
|
915
|
-
if (!normalized) return;
|
|
916
|
-
if (IMAGE_BACKGROUNDS.includes(normalized)) return normalized;
|
|
917
|
-
throw new Error(`${label} must be one of transparent, opaque, or auto`);
|
|
918
|
-
}
|
|
919
|
-
function normalizeVideoResolution(raw) {
|
|
920
|
-
const normalized = raw?.trim().toUpperCase();
|
|
921
|
-
if (!normalized) return;
|
|
922
|
-
if (normalized === "480P" || normalized === "720P" || normalized === "768P" || normalized === "1080P") return normalized;
|
|
923
|
-
throw new Error("video resolution must be one of 480P, 720P, 768P, or 1080P");
|
|
924
|
-
}
|
|
925
|
-
async function runVideoGenerate(params) {
|
|
926
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
927
|
-
commandName: "infer video.generate",
|
|
928
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
929
|
-
});
|
|
930
|
-
const result = await generateVideo({
|
|
931
|
-
cfg,
|
|
932
|
-
agentDir: resolveAgentDir(cfg, resolveDefaultAgentId(cfg)),
|
|
933
|
-
prompt: params.prompt,
|
|
934
|
-
modelOverride: params.model,
|
|
935
|
-
size: params.size,
|
|
936
|
-
aspectRatio: params.aspectRatio,
|
|
937
|
-
resolution: params.resolution,
|
|
938
|
-
durationSeconds: params.durationSeconds,
|
|
939
|
-
audio: params.audio,
|
|
940
|
-
watermark: params.watermark,
|
|
941
|
-
timeoutMs: params.timeoutMs
|
|
942
|
-
});
|
|
943
|
-
const outputs = await Promise.all(result.videos.map(async (video, index) => {
|
|
944
|
-
if (!video.buffer && !video.url) throw new Error(`Video asset at index ${index} has neither buffer nor url`);
|
|
945
|
-
let videoBuffer = video.buffer;
|
|
946
|
-
if (!videoBuffer && video.url) {
|
|
947
|
-
const response = await fetch(video.url, { signal: AbortSignal.timeout(12e4) });
|
|
948
|
-
if (!response.ok) throw new Error(`Failed to download video from ${video.url}: ${response.status}`);
|
|
949
|
-
if (params.output && response.body) {
|
|
950
|
-
const ext = extensionForMime(normalizeMimeType(video.mimeType)) || path.extname(video.fileName ?? "") || path.extname(params.output ?? "");
|
|
951
|
-
const resolvedOutput = path.resolve(params.output);
|
|
952
|
-
const parsed = path.parse(resolvedOutput);
|
|
953
|
-
const filePath = result.videos.length <= 1 ? path.join(parsed.dir, `${parsed.name}${ext}`) : path.join(parsed.dir, `${parsed.name}-${String(index + 1)}${ext}`);
|
|
954
|
-
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
955
|
-
await pipeline(Readable.fromWeb(response.body), createWriteStream(filePath));
|
|
956
|
-
const stat = await fs$1.stat(filePath);
|
|
957
|
-
return {
|
|
958
|
-
path: filePath,
|
|
959
|
-
mimeType: video.mimeType,
|
|
960
|
-
size: stat.size
|
|
961
|
-
};
|
|
962
|
-
}
|
|
963
|
-
videoBuffer = Buffer.from(await response.arrayBuffer());
|
|
964
|
-
}
|
|
965
|
-
return { ...await writeOutputAsset({
|
|
966
|
-
buffer: videoBuffer,
|
|
967
|
-
mimeType: video.mimeType,
|
|
968
|
-
originalFilename: video.fileName,
|
|
969
|
-
outputPath: params.output,
|
|
970
|
-
outputIndex: index,
|
|
971
|
-
outputCount: result.videos.length,
|
|
972
|
-
subdir: "generated"
|
|
973
|
-
}) };
|
|
974
|
-
}));
|
|
975
|
-
return {
|
|
976
|
-
ok: true,
|
|
977
|
-
capability: "video.generate",
|
|
978
|
-
transport: "local",
|
|
979
|
-
provider: result.provider,
|
|
980
|
-
model: result.model,
|
|
981
|
-
attempts: result.attempts,
|
|
982
|
-
outputs
|
|
983
|
-
};
|
|
984
|
-
}
|
|
985
|
-
async function runVideoDescribe(params) {
|
|
986
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
987
|
-
commandName: "infer video.describe",
|
|
988
|
-
targetIds: getModelsCommandSecretTargetIds()
|
|
989
|
-
});
|
|
990
|
-
const activeModel = requireProviderModelOverride(params.model);
|
|
991
|
-
const result = await describeVideoFile({
|
|
992
|
-
filePath: path.resolve(params.file),
|
|
993
|
-
cfg,
|
|
994
|
-
activeModel
|
|
995
|
-
});
|
|
996
|
-
if (!result.text) throw new Error(`No description returned for video: ${path.resolve(params.file)}`);
|
|
997
|
-
return {
|
|
998
|
-
ok: true,
|
|
999
|
-
capability: "video.describe",
|
|
1000
|
-
transport: "local",
|
|
1001
|
-
provider: result.provider,
|
|
1002
|
-
model: result.model,
|
|
1003
|
-
attempts: [],
|
|
1004
|
-
outputs: [{
|
|
1005
|
-
path: path.resolve(params.file),
|
|
1006
|
-
text: result.text,
|
|
1007
|
-
kind: "video.description"
|
|
1008
|
-
}]
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
async function runTtsConvert(params) {
|
|
1012
|
-
if (params.transport === "gateway") {
|
|
1013
|
-
const gatewayConnection = buildGatewayConnectionDetailsWithResolvers({ config: getRuntimeConfig() });
|
|
1014
|
-
const result = await callGateway({
|
|
1015
|
-
method: "tts.convert",
|
|
1016
|
-
params: {
|
|
1017
|
-
text: params.text,
|
|
1018
|
-
channel: params.channel,
|
|
1019
|
-
provider: normalizeOptionalString(params.provider),
|
|
1020
|
-
modelId: params.modelId,
|
|
1021
|
-
voiceId: params.voiceId
|
|
1022
|
-
},
|
|
1023
|
-
timeoutMs: 12e4
|
|
1024
|
-
});
|
|
1025
|
-
let outputPath = result.audioPath;
|
|
1026
|
-
if (params.output && result.audioPath) {
|
|
1027
|
-
const gatewayHost = new URL(gatewayConnection.url).hostname;
|
|
1028
|
-
if (!isLoopbackHost(gatewayHost)) throw new Error(`--output is not supported for remote gateway TTS yet (gateway target: ${gatewayConnection.url}).`);
|
|
1029
|
-
const target = path.resolve(params.output);
|
|
1030
|
-
await fs$1.mkdir(path.dirname(target), { recursive: true });
|
|
1031
|
-
await fs$1.copyFile(result.audioPath, target);
|
|
1032
|
-
outputPath = target;
|
|
1033
|
-
}
|
|
1034
|
-
return {
|
|
1035
|
-
ok: true,
|
|
1036
|
-
capability: "tts.convert",
|
|
1037
|
-
transport: "gateway",
|
|
1038
|
-
provider: result.provider,
|
|
1039
|
-
attempts: [],
|
|
1040
|
-
outputs: [{
|
|
1041
|
-
path: outputPath,
|
|
1042
|
-
format: result.outputFormat,
|
|
1043
|
-
voiceCompatible: result.voiceCompatible
|
|
1044
|
-
}]
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
1048
|
-
commandName: "infer tts convert",
|
|
1049
|
-
targetIds: getTtsCommandSecretTargetIds()
|
|
1050
|
-
});
|
|
1051
|
-
const overrides = resolveExplicitTtsOverrides({
|
|
1052
|
-
cfg,
|
|
1053
|
-
provider: params.provider,
|
|
1054
|
-
modelId: params.modelId,
|
|
1055
|
-
voiceId: params.voiceId
|
|
1056
|
-
});
|
|
1057
|
-
const hasExplicitSelection = Boolean(overrides.provider || normalizeOptionalString(params.modelId) || normalizeOptionalString(params.voiceId));
|
|
1058
|
-
const result = await textToSpeech({
|
|
1059
|
-
text: params.text,
|
|
1060
|
-
cfg,
|
|
1061
|
-
channel: params.channel,
|
|
1062
|
-
overrides,
|
|
1063
|
-
disableFallback: hasExplicitSelection
|
|
1064
|
-
});
|
|
1065
|
-
if (!result.success || !result.audioPath) throw new Error(result.error ?? "TTS conversion failed");
|
|
1066
|
-
let outputPath = result.audioPath;
|
|
1067
|
-
if (params.output) {
|
|
1068
|
-
const target = path.resolve(params.output);
|
|
1069
|
-
await fs$1.mkdir(path.dirname(target), { recursive: true });
|
|
1070
|
-
await fs$1.copyFile(result.audioPath, target);
|
|
1071
|
-
outputPath = target;
|
|
1072
|
-
}
|
|
1073
|
-
return {
|
|
1074
|
-
ok: true,
|
|
1075
|
-
capability: "tts.convert",
|
|
1076
|
-
transport: "local",
|
|
1077
|
-
provider: result.provider,
|
|
1078
|
-
attempts: result.attempts ?? [],
|
|
1079
|
-
outputs: [{
|
|
1080
|
-
path: outputPath,
|
|
1081
|
-
format: result.outputFormat,
|
|
1082
|
-
voiceCompatible: result.voiceCompatible
|
|
1083
|
-
}]
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
async function runTtsProviders(transport) {
|
|
1087
|
-
const cfg = getRuntimeConfig();
|
|
1088
|
-
if (transport === "gateway") {
|
|
1089
|
-
const payload = await callGateway({
|
|
1090
|
-
method: "tts.providers",
|
|
1091
|
-
timeoutMs: 3e4
|
|
1092
|
-
});
|
|
1093
|
-
return {
|
|
1094
|
-
...payload,
|
|
1095
|
-
providers: (payload.providers ?? []).map((provider) => {
|
|
1096
|
-
const id = typeof provider.id === "string" ? provider.id : "";
|
|
1097
|
-
return Object.assign({
|
|
1098
|
-
available: true,
|
|
1099
|
-
configured: typeof provider.configured === `boolean` ? provider.configured : providerHasGenericConfig({
|
|
1100
|
-
cfg,
|
|
1101
|
-
providerId: id
|
|
1102
|
-
}),
|
|
1103
|
-
selected: Boolean(id && payload.active === id)
|
|
1104
|
-
}, provider);
|
|
1105
|
-
})
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
const config = resolveTtsConfig(cfg);
|
|
1109
|
-
const active = getTtsProvider(config, resolveTtsPrefsPath(config));
|
|
1110
|
-
return {
|
|
1111
|
-
providers: listSpeechProviders(cfg).map((provider) => ({
|
|
1112
|
-
available: true,
|
|
1113
|
-
configured: active === provider.id || providerHasGenericConfig({
|
|
1114
|
-
cfg,
|
|
1115
|
-
providerId: provider.id
|
|
1116
|
-
}),
|
|
1117
|
-
selected: active === provider.id,
|
|
1118
|
-
id: provider.id,
|
|
1119
|
-
name: provider.label,
|
|
1120
|
-
models: [...provider.models ?? []],
|
|
1121
|
-
voices: [...provider.voices ?? []]
|
|
1122
|
-
})),
|
|
1123
|
-
active
|
|
1124
|
-
};
|
|
1125
|
-
}
|
|
1126
|
-
function resolveImageDescribeInput(filePath) {
|
|
1127
|
-
const trimmed = filePath.trim();
|
|
1128
|
-
return /^https?:\/\//i.test(trimmed) ? trimmed : path.resolve(filePath);
|
|
1129
|
-
}
|
|
1130
|
-
async function runTtsPersonas(transport) {
|
|
1131
|
-
if (transport === "gateway") return await callGateway({
|
|
1132
|
-
method: "tts.personas",
|
|
1133
|
-
timeoutMs: 3e4
|
|
1134
|
-
});
|
|
1135
|
-
const config = resolveTtsConfig(getRuntimeConfig());
|
|
1136
|
-
return {
|
|
1137
|
-
active: getTtsPersona(config, resolveTtsPrefsPath(config))?.id ?? null,
|
|
1138
|
-
personas: listTtsPersonas(config).map((persona) => ({
|
|
1139
|
-
id: persona.id,
|
|
1140
|
-
label: persona.label,
|
|
1141
|
-
description: persona.description,
|
|
1142
|
-
provider: persona.provider,
|
|
1143
|
-
fallbackPolicy: persona.fallbackPolicy,
|
|
1144
|
-
providers: Object.keys(persona.providers ?? {})
|
|
1145
|
-
}))
|
|
1146
|
-
};
|
|
1147
|
-
}
|
|
1148
|
-
async function runTtsVoices(providerRaw) {
|
|
1149
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
1150
|
-
commandName: "infer tts voices",
|
|
1151
|
-
targetIds: getTtsCommandSecretTargetIds()
|
|
1152
|
-
});
|
|
1153
|
-
const config = resolveTtsConfig(cfg);
|
|
1154
|
-
const prefsPath = resolveTtsPrefsPath(config);
|
|
1155
|
-
return await listSpeechVoices({
|
|
1156
|
-
provider: normalizeOptionalString(providerRaw) || getTtsProvider(config, prefsPath),
|
|
1157
|
-
cfg,
|
|
1158
|
-
config
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
async function runTtsStateMutation(params) {
|
|
1162
|
-
if (params.transport === "gateway") return await callGateway({
|
|
1163
|
-
method: params.capability === "tts.enable" ? "tts.enable" : params.capability === "tts.disable" ? "tts.disable" : params.capability === "tts.set-provider" ? "tts.setProvider" : "tts.setPersona",
|
|
1164
|
-
params: params.capability === "tts.set-provider" ? { provider: params.provider } : params.capability === "tts.set-persona" ? { persona: params.persona ?? "off" } : void 0,
|
|
1165
|
-
timeoutMs: 3e4
|
|
1166
|
-
});
|
|
1167
|
-
const cfg = getRuntimeConfig();
|
|
1168
|
-
const config = resolveTtsConfig(cfg);
|
|
1169
|
-
const prefsPath = resolveTtsPrefsPath(config);
|
|
1170
|
-
if (params.capability === "tts.enable") {
|
|
1171
|
-
setTtsEnabled(prefsPath, true);
|
|
1172
|
-
return { enabled: true };
|
|
1173
|
-
}
|
|
1174
|
-
if (params.capability === "tts.disable") {
|
|
1175
|
-
setTtsEnabled(prefsPath, false);
|
|
1176
|
-
return { enabled: false };
|
|
1177
|
-
}
|
|
1178
|
-
if (params.capability === "tts.set-persona") {
|
|
1179
|
-
if (!params.persona) {
|
|
1180
|
-
setTtsPersona(prefsPath, null);
|
|
1181
|
-
return { persona: null };
|
|
1182
|
-
}
|
|
1183
|
-
const persona = listTtsPersonas(config).find((entry) => entry.id === normalizeLowercaseStringOrEmpty(params.persona ?? ""));
|
|
1184
|
-
if (!persona) throw new Error(`Unknown TTS persona: ${params.persona}`);
|
|
1185
|
-
setTtsPersona(prefsPath, persona.id);
|
|
1186
|
-
return { persona: persona.id };
|
|
1187
|
-
}
|
|
1188
|
-
if (!params.provider) throw new Error("--provider is required");
|
|
1189
|
-
const provider = canonicalizeSpeechProviderId(params.provider, cfg);
|
|
1190
|
-
if (!provider) throw new Error(`Unknown speech provider: ${params.provider}`);
|
|
1191
|
-
setTtsProvider(prefsPath, provider);
|
|
1192
|
-
return { provider };
|
|
1193
|
-
}
|
|
1194
|
-
async function resolveLocalCapabilityRuntimeConfig(params) {
|
|
1195
|
-
const cfg = params.config ?? getRuntimeConfig();
|
|
1196
|
-
const sourceConfig = getRuntimeConfigSourceSnapshot();
|
|
1197
|
-
const { effectiveConfig } = await resolveCommandConfigWithSecrets({
|
|
1198
|
-
config: cfg,
|
|
1199
|
-
commandName: params.commandName,
|
|
1200
|
-
targetIds: params.targetIds,
|
|
1201
|
-
...params.allowedPaths ? { allowedPaths: params.allowedPaths } : {},
|
|
1202
|
-
...params.forcedActivePaths ? { forcedActivePaths: params.forcedActivePaths } : {},
|
|
1203
|
-
...params.optionalActivePaths ? { optionalActivePaths: params.optionalActivePaths } : {},
|
|
1204
|
-
runtime: defaultRuntime,
|
|
1205
|
-
autoEnable: true
|
|
1206
|
-
});
|
|
1207
|
-
if (sourceConfig) setRuntimeConfigSnapshot(effectiveConfig, sourceConfig);
|
|
1208
|
-
else setRuntimeConfigSnapshot(effectiveConfig);
|
|
1209
|
-
return effectiveConfig;
|
|
1210
|
-
}
|
|
1211
|
-
async function runWebSearchCommand(params) {
|
|
1212
|
-
const rawConfig = getRuntimeConfig();
|
|
1213
|
-
const scopedTargets = getCapabilityWebSearchCommandSecretTargets(rawConfig, { providerId: params.provider });
|
|
1214
|
-
const result = await runWebSearch({
|
|
1215
|
-
config: await resolveLocalCapabilityRuntimeConfig({
|
|
1216
|
-
commandName: "infer web search",
|
|
1217
|
-
targetIds: scopedTargets.targetIds,
|
|
1218
|
-
...scopedTargets.allowedPaths ? { allowedPaths: scopedTargets.allowedPaths } : {},
|
|
1219
|
-
...scopedTargets.forcedActivePaths ? { forcedActivePaths: scopedTargets.forcedActivePaths } : {},
|
|
1220
|
-
...scopedTargets.optionalActivePaths ? { optionalActivePaths: scopedTargets.optionalActivePaths } : {},
|
|
1221
|
-
config: rawConfig
|
|
1222
|
-
}),
|
|
1223
|
-
providerId: params.provider,
|
|
1224
|
-
args: {
|
|
1225
|
-
query: params.query,
|
|
1226
|
-
count: params.limit,
|
|
1227
|
-
limit: params.limit
|
|
1228
|
-
}
|
|
1229
|
-
});
|
|
1230
|
-
return {
|
|
1231
|
-
ok: true,
|
|
1232
|
-
capability: "web.search",
|
|
1233
|
-
transport: "local",
|
|
1234
|
-
provider: result.provider,
|
|
1235
|
-
attempts: [],
|
|
1236
|
-
outputs: [{ result: result.result }]
|
|
1237
|
-
};
|
|
1238
|
-
}
|
|
1239
|
-
async function runWebFetchCommand(params) {
|
|
1240
|
-
const rawConfig = getRuntimeConfig();
|
|
1241
|
-
const scopedTargets = getCapabilityWebFetchCommandSecretTargets(rawConfig, { providerId: params.provider });
|
|
1242
|
-
const resolved = resolveWebFetchDefinition({
|
|
1243
|
-
config: await resolveLocalCapabilityRuntimeConfig({
|
|
1244
|
-
commandName: "infer web fetch",
|
|
1245
|
-
targetIds: scopedTargets.targetIds,
|
|
1246
|
-
...scopedTargets.allowedPaths ? { allowedPaths: scopedTargets.allowedPaths } : {},
|
|
1247
|
-
...scopedTargets.forcedActivePaths ? { forcedActivePaths: scopedTargets.forcedActivePaths } : {},
|
|
1248
|
-
...scopedTargets.optionalActivePaths ? { optionalActivePaths: scopedTargets.optionalActivePaths } : {},
|
|
1249
|
-
config: rawConfig
|
|
1250
|
-
}),
|
|
1251
|
-
providerId: params.provider
|
|
1252
|
-
});
|
|
1253
|
-
if (!resolved) throw new Error("web.fetch is disabled or no provider is available.");
|
|
1254
|
-
const result = await resolved.definition.execute({
|
|
1255
|
-
url: params.url,
|
|
1256
|
-
format: params.format
|
|
1257
|
-
});
|
|
1258
|
-
return {
|
|
1259
|
-
ok: true,
|
|
1260
|
-
capability: "web.fetch",
|
|
1261
|
-
transport: "local",
|
|
1262
|
-
provider: resolved.provider.id,
|
|
1263
|
-
attempts: [],
|
|
1264
|
-
outputs: [{ result }]
|
|
1265
|
-
};
|
|
1266
|
-
}
|
|
1267
|
-
async function runMemoryEmbeddingCreate(params) {
|
|
1268
|
-
ensureMemoryEmbeddingProvidersRegistered();
|
|
1269
|
-
const cfg = await resolveLocalCapabilityRuntimeConfig({
|
|
1270
|
-
commandName: "infer embedding create",
|
|
1271
|
-
targetIds: getMemoryEmbeddingCommandSecretTargetIds()
|
|
1272
|
-
});
|
|
1273
|
-
const modelRef = resolveModelRefOverride(params.model);
|
|
1274
|
-
const requestedProvider = normalizeOptionalString(params.provider) || modelRef.provider || "auto";
|
|
1275
|
-
const result = await createEmbeddingProvider({
|
|
1276
|
-
config: cfg,
|
|
1277
|
-
agentDir: resolveAgentDir(cfg, resolveDefaultAgentId(cfg)),
|
|
1278
|
-
provider: requestedProvider,
|
|
1279
|
-
fallback: "none",
|
|
1280
|
-
model: modelRef.model ?? ""
|
|
1281
|
-
});
|
|
1282
|
-
if (!result.provider) throw new Error(result.providerUnavailableReason ?? "No embedding provider available.");
|
|
1283
|
-
const embeddings = await result.provider.embedBatch(params.texts);
|
|
1284
|
-
return {
|
|
1285
|
-
ok: true,
|
|
1286
|
-
capability: "embedding.create",
|
|
1287
|
-
transport: "local",
|
|
1288
|
-
provider: result.provider.id,
|
|
1289
|
-
model: result.provider.model,
|
|
1290
|
-
attempts: result.fallbackFrom ? [{
|
|
1291
|
-
provider: result.fallbackFrom,
|
|
1292
|
-
outcome: "failed",
|
|
1293
|
-
error: result.fallbackReason
|
|
1294
|
-
}] : [],
|
|
1295
|
-
outputs: embeddings.map((embedding, index) => ({
|
|
1296
|
-
text: params.texts[index],
|
|
1297
|
-
embedding,
|
|
1298
|
-
dimensions: embedding.length
|
|
1299
|
-
}))
|
|
1300
|
-
};
|
|
1301
|
-
}
|
|
1302
|
-
function ensureMemoryEmbeddingProvidersRegistered() {
|
|
1303
|
-
if (listMemoryEmbeddingProviders().length > 0) return;
|
|
1304
|
-
registerBuiltInMemoryEmbeddingProviders({ registerMemoryEmbeddingProvider });
|
|
1305
|
-
}
|
|
1306
|
-
function registerCapabilityListAndInspect(capability) {
|
|
1307
|
-
capability.command("list").description("List canonical capability ids and supported transports").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1308
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1309
|
-
const result = CAPABILITY_METADATA.map((entry) => ({
|
|
1310
|
-
id: entry.id,
|
|
1311
|
-
transports: entry.transports,
|
|
1312
|
-
description: entry.description
|
|
1313
|
-
}));
|
|
1314
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, providerSummaryText);
|
|
1315
|
-
});
|
|
1316
|
-
});
|
|
1317
|
-
capability.command("inspect").description("Inspect one canonical capability id").requiredOption("--name <capability>", "Capability id").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1318
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1319
|
-
const entry = findCapabilityMetadata(String(opts.name));
|
|
1320
|
-
if (!entry) throw new Error(`Unknown capability: ${String(opts.name)}`);
|
|
1321
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), entry, (value) => JSON.stringify(value, null, 2));
|
|
1322
|
-
});
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
function registerCapabilityCli(program) {
|
|
1326
|
-
removeCommandByName(program, "infer");
|
|
1327
|
-
removeCommandByName(program, "capability");
|
|
1328
|
-
const capability = program.command("infer").alias("capability").description("Run provider-backed inference commands through a stable CLI surface").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/infer", "docs.openclaw.ai/cli/infer")}\n`);
|
|
1329
|
-
registerCapabilityListAndInspect(capability);
|
|
1330
|
-
const model = capability.command("model").description("Text inference and model catalog commands");
|
|
1331
|
-
model.command("run").description("Run a one-shot model turn").requiredOption("--prompt <text>", "Prompt text").option("--file <path>", "Image file", collectOption, []).option("--model <provider/model>", "Model override").option("--thinking <level>", "Thinking level override").option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1332
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1333
|
-
const prompt = requireModelRunPrompt(opts.prompt);
|
|
1334
|
-
const thinking = normalizeModelRunThinking(opts.thinking);
|
|
1335
|
-
const transport = resolveTransport({
|
|
1336
|
-
local: Boolean(opts.local),
|
|
1337
|
-
gateway: Boolean(opts.gateway),
|
|
1338
|
-
supported: ["local", "gateway"],
|
|
1339
|
-
defaultTransport: "local"
|
|
1340
|
-
});
|
|
1341
|
-
const result = await runModelRun({
|
|
1342
|
-
prompt,
|
|
1343
|
-
files: opts.file,
|
|
1344
|
-
model: opts.model,
|
|
1345
|
-
thinking,
|
|
1346
|
-
transport
|
|
1347
|
-
});
|
|
1348
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1349
|
-
});
|
|
1350
|
-
});
|
|
1351
|
-
model.command("list").description("List known models").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1352
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1353
|
-
const result = await loadModelCatalog({ config: getRuntimeConfig() });
|
|
1354
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, providerSummaryText);
|
|
1355
|
-
});
|
|
1356
|
-
});
|
|
1357
|
-
model.command("inspect").description("Inspect one model catalog entry").requiredOption("--model <provider/model>", "Model id").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1358
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1359
|
-
const target = normalizeStringifiedOptionalString(opts.model) ?? "";
|
|
1360
|
-
const catalog = await loadModelCatalog({ config: getRuntimeConfig() });
|
|
1361
|
-
const entry = catalog.find((candidate) => `${candidate.provider}/${candidate.id}` === target) ?? catalog.find((candidate) => candidate.id === target);
|
|
1362
|
-
if (!entry) throw new Error(`Model not found: ${target}`);
|
|
1363
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), entry, (value) => JSON.stringify(value, null, 2));
|
|
1364
|
-
});
|
|
1365
|
-
});
|
|
1366
|
-
model.command("providers").description("List model providers from the catalog").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1367
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1368
|
-
const result = await buildModelProviders();
|
|
1369
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, providerSummaryText);
|
|
1370
|
-
});
|
|
1371
|
-
});
|
|
1372
|
-
const modelAuth = model.command("auth").description("Provider auth helpers");
|
|
1373
|
-
modelAuth.command("login").description("Run provider auth login").requiredOption("--provider <id>", "Provider id").option("--method <id>", "Provider auth method id").action(async (opts) => {
|
|
1374
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1375
|
-
const { modelsAuthLoginCommand } = await import("./auth-DeO0v6eY.js");
|
|
1376
|
-
await modelsAuthLoginCommand({
|
|
1377
|
-
provider: String(opts.provider),
|
|
1378
|
-
method: opts.method ? String(opts.method) : void 0
|
|
1379
|
-
}, defaultRuntime);
|
|
1380
|
-
});
|
|
1381
|
-
});
|
|
1382
|
-
modelAuth.command("logout").description("Remove saved auth profiles for one provider").requiredOption("--provider <id>", "Provider id").option("--agent <id>", "Agent id (default: configured default agent)").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1383
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1384
|
-
const result = await runModelAuthLogout(String(opts.provider), typeof opts.agent === "string" ? opts.agent : void 0);
|
|
1385
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1386
|
-
});
|
|
1387
|
-
});
|
|
1388
|
-
modelAuth.command("status").description("Show configured auth state").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1389
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1390
|
-
const result = await runModelAuthStatus();
|
|
1391
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1392
|
-
});
|
|
1393
|
-
});
|
|
1394
|
-
const image = capability.command("image").description("Image generation and description");
|
|
1395
|
-
image.command("generate").description("Generate images").requiredOption("--prompt <text>", "Prompt text").option("--model <provider/model>", "Model override").option("--count <n>", "Number of images").option("--size <size>", "Size hint like 1024x1024").option("--aspect-ratio <ratio>", "Aspect ratio hint like 16:9").option("--resolution <value>", "Resolution hint: 1K, 2K, or 4K").option("--output-format <format>", "Output format hint: png, jpeg, or webp").option("--background <value>", "Background hint: transparent, opaque, or auto").option("--openai-background <value>", "OpenAI background hint: transparent, opaque, or auto").option("--timeout-ms <ms>", "Provider request timeout in milliseconds").option("--output <path>", "Output path").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1396
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1397
|
-
const result = await runImageGenerate({
|
|
1398
|
-
capability: "image.generate",
|
|
1399
|
-
prompt: String(opts.prompt),
|
|
1400
|
-
model: opts.model,
|
|
1401
|
-
count: opts.count ? Number.parseInt(String(opts.count), 10) : void 0,
|
|
1402
|
-
size: opts.size,
|
|
1403
|
-
aspectRatio: opts.aspectRatio,
|
|
1404
|
-
resolution: opts.resolution,
|
|
1405
|
-
outputFormat: normalizeImageOutputFormat(opts.outputFormat),
|
|
1406
|
-
background: normalizeImageBackground(opts.background),
|
|
1407
|
-
openaiBackground: normalizeImageBackground(opts.openaiBackground, "--openai-background"),
|
|
1408
|
-
timeoutMs: parseOptionalFiniteNumber(opts.timeoutMs, "--timeout-ms"),
|
|
1409
|
-
output: opts.output
|
|
1410
|
-
});
|
|
1411
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1412
|
-
});
|
|
1413
|
-
});
|
|
1414
|
-
image.command("edit").description("Edit images with one or more input files").requiredOption("--file <path>", "Input file", collectOption, []).requiredOption("--prompt <text>", "Prompt text").option("--model <provider/model>", "Model override").option("--size <size>", "Size hint like 1024x1024").option("--aspect-ratio <ratio>", "Aspect ratio hint like 16:9").option("--resolution <value>", "Resolution hint: 1K, 2K, or 4K").option("--output-format <format>", "Output format hint: png, jpeg, or webp").option("--background <value>", "Background hint: transparent, opaque, or auto").option("--openai-background <value>", "OpenAI background hint: transparent, opaque, or auto").option("--timeout-ms <ms>", "Provider request timeout in milliseconds").option("--output <path>", "Output path").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1415
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1416
|
-
const files = Array.isArray(opts.file) ? opts.file : [String(opts.file)];
|
|
1417
|
-
const result = await runImageGenerate({
|
|
1418
|
-
capability: "image.edit",
|
|
1419
|
-
prompt: String(opts.prompt),
|
|
1420
|
-
model: opts.model,
|
|
1421
|
-
size: opts.size,
|
|
1422
|
-
aspectRatio: opts.aspectRatio,
|
|
1423
|
-
resolution: opts.resolution,
|
|
1424
|
-
file: files,
|
|
1425
|
-
outputFormat: normalizeImageOutputFormat(opts.outputFormat),
|
|
1426
|
-
background: normalizeImageBackground(opts.background),
|
|
1427
|
-
openaiBackground: normalizeImageBackground(opts.openaiBackground, "--openai-background"),
|
|
1428
|
-
timeoutMs: parseOptionalFiniteNumber(opts.timeoutMs, "--timeout-ms"),
|
|
1429
|
-
output: opts.output
|
|
1430
|
-
});
|
|
1431
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1432
|
-
});
|
|
1433
|
-
});
|
|
1434
|
-
image.command("describe").description("Describe one image file").requiredOption("--file <path>", "Image file").option("--prompt <text>", "Prompt hint").option("--model <provider/model>", "Model override").option("--timeout-ms <ms>", "Provider request timeout in milliseconds").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1435
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1436
|
-
const result = await runImageDescribe({
|
|
1437
|
-
capability: "image.describe",
|
|
1438
|
-
files: [String(opts.file)],
|
|
1439
|
-
model: opts.model,
|
|
1440
|
-
prompt: opts.prompt,
|
|
1441
|
-
timeoutMs: parseOptionalFiniteNumber(opts.timeoutMs, "--timeout-ms")
|
|
1442
|
-
});
|
|
1443
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1444
|
-
});
|
|
1445
|
-
});
|
|
1446
|
-
image.command("describe-many").description("Describe multiple image files").requiredOption("--file <path>", "Image file", collectOption, []).option("--prompt <text>", "Prompt hint").option("--model <provider/model>", "Model override").option("--timeout-ms <ms>", "Provider request timeout in milliseconds").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1447
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1448
|
-
const result = await runImageDescribe({
|
|
1449
|
-
capability: "image.describe-many",
|
|
1450
|
-
files: opts.file,
|
|
1451
|
-
model: opts.model,
|
|
1452
|
-
prompt: opts.prompt,
|
|
1453
|
-
timeoutMs: parseOptionalFiniteNumber(opts.timeoutMs, "--timeout-ms")
|
|
1454
|
-
});
|
|
1455
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1456
|
-
});
|
|
1457
|
-
});
|
|
1458
|
-
image.command("providers").description("List image generation providers").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1459
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1460
|
-
const cfg = getRuntimeConfig();
|
|
1461
|
-
const selectedProvider = resolveSelectedProviderFromModelRef(resolveAgentModelPrimaryValue(cfg.agents?.defaults?.imageGenerationModel));
|
|
1462
|
-
const result = listRuntimeImageGenerationProviders({ config: cfg }).map((provider) => ({
|
|
1463
|
-
available: true,
|
|
1464
|
-
configured: selectedProvider === provider.id || providerHasGenericConfig({
|
|
1465
|
-
cfg,
|
|
1466
|
-
providerId: provider.id
|
|
1467
|
-
}),
|
|
1468
|
-
selected: selectedProvider === provider.id,
|
|
1469
|
-
id: provider.id,
|
|
1470
|
-
label: provider.label,
|
|
1471
|
-
defaultModel: provider.defaultModel,
|
|
1472
|
-
models: provider.models ?? [],
|
|
1473
|
-
capabilities: provider.capabilities
|
|
1474
|
-
}));
|
|
1475
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, providerSummaryText);
|
|
1476
|
-
});
|
|
1477
|
-
});
|
|
1478
|
-
const audio = capability.command("audio").description("Audio transcription");
|
|
1479
|
-
audio.command("transcribe").description("Transcribe one audio file").requiredOption("--file <path>", "Audio file").option("--language <code>", "Language hint").option("--prompt <text>", "Prompt hint").option("--model <provider/model>", "Model override").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1480
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1481
|
-
const result = await runAudioTranscribe({
|
|
1482
|
-
file: String(opts.file),
|
|
1483
|
-
language: opts.language,
|
|
1484
|
-
model: opts.model,
|
|
1485
|
-
prompt: opts.prompt
|
|
1486
|
-
});
|
|
1487
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1488
|
-
});
|
|
1489
|
-
});
|
|
1490
|
-
audio.command("providers").description("List audio transcription providers").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1491
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1492
|
-
const cfg = getRuntimeConfig();
|
|
1493
|
-
const providers = [...buildMediaUnderstandingRegistry(void 0, cfg).values()].filter((provider) => provider.capabilities?.includes("audio")).map((provider) => ({
|
|
1494
|
-
available: true,
|
|
1495
|
-
configured: providerHasGenericConfig({
|
|
1496
|
-
cfg,
|
|
1497
|
-
providerId: provider.id,
|
|
1498
|
-
envVars: getProviderEnvVars(provider.id, {
|
|
1499
|
-
config: cfg,
|
|
1500
|
-
includeUntrustedWorkspacePlugins: false
|
|
1501
|
-
})
|
|
1502
|
-
}),
|
|
1503
|
-
selected: false,
|
|
1504
|
-
id: provider.id,
|
|
1505
|
-
capabilities: provider.capabilities,
|
|
1506
|
-
defaultModels: provider.defaultModels
|
|
1507
|
-
}));
|
|
1508
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), providers, providerSummaryText);
|
|
1509
|
-
});
|
|
1510
|
-
});
|
|
1511
|
-
const tts = capability.command("tts").description("Text to speech");
|
|
1512
|
-
tts.command("convert").description("Convert text to speech").requiredOption("--text <text>", "Input text").option("--channel <id>", "Channel hint").option("--voice <id>", "Voice hint").option("--model <provider/model>", "Model override").option("--output <path>", "Output path").option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1513
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1514
|
-
const transport = resolveTransport({
|
|
1515
|
-
local: Boolean(opts.local),
|
|
1516
|
-
gateway: Boolean(opts.gateway),
|
|
1517
|
-
supported: ["local", "gateway"],
|
|
1518
|
-
defaultTransport: "local"
|
|
1519
|
-
});
|
|
1520
|
-
const modelRef = resolveModelRefOverride(opts.model);
|
|
1521
|
-
if (opts.model && !modelRef.provider) throw new Error("TTS model overrides must use the form <provider/model>.");
|
|
1522
|
-
const result = await runTtsConvert({
|
|
1523
|
-
text: String(opts.text),
|
|
1524
|
-
channel: opts.channel,
|
|
1525
|
-
provider: modelRef.provider,
|
|
1526
|
-
modelId: modelRef.provider ? modelRef.model : void 0,
|
|
1527
|
-
voiceId: opts.voice,
|
|
1528
|
-
output: opts.output,
|
|
1529
|
-
transport
|
|
1530
|
-
});
|
|
1531
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1532
|
-
});
|
|
1533
|
-
});
|
|
1534
|
-
tts.command("voices").description("List voices for a TTS provider").option("--provider <id>", "Speech provider id").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1535
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1536
|
-
const voices = await runTtsVoices(opts.provider);
|
|
1537
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), voices, providerSummaryText);
|
|
1538
|
-
});
|
|
1539
|
-
});
|
|
1540
|
-
tts.command("providers").description("List speech providers").option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1541
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1542
|
-
const result = await runTtsProviders(resolveTransport({
|
|
1543
|
-
local: Boolean(opts.local),
|
|
1544
|
-
gateway: Boolean(opts.gateway),
|
|
1545
|
-
supported: ["local", "gateway"],
|
|
1546
|
-
defaultTransport: "local"
|
|
1547
|
-
}));
|
|
1548
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1549
|
-
});
|
|
1550
|
-
});
|
|
1551
|
-
tts.command("personas").description("List TTS personas").option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1552
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1553
|
-
const result = await runTtsPersonas(resolveTransport({
|
|
1554
|
-
local: Boolean(opts.local),
|
|
1555
|
-
gateway: Boolean(opts.gateway),
|
|
1556
|
-
supported: ["local", "gateway"],
|
|
1557
|
-
defaultTransport: "local"
|
|
1558
|
-
}));
|
|
1559
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1560
|
-
});
|
|
1561
|
-
});
|
|
1562
|
-
tts.command("status").description("Show TTS status").option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1563
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1564
|
-
const transport = resolveTransport({
|
|
1565
|
-
gateway: Boolean(opts.gateway),
|
|
1566
|
-
supported: ["gateway"],
|
|
1567
|
-
defaultTransport: "gateway"
|
|
1568
|
-
});
|
|
1569
|
-
const result = await callGateway({
|
|
1570
|
-
method: "tts.status",
|
|
1571
|
-
timeoutMs: 3e4
|
|
1572
|
-
});
|
|
1573
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), {
|
|
1574
|
-
transport,
|
|
1575
|
-
...result
|
|
1576
|
-
}, (value) => JSON.stringify(value, null, 2));
|
|
1577
|
-
});
|
|
1578
|
-
});
|
|
1579
|
-
for (const [commandName, capabilityId] of [["enable", "tts.enable"], ["disable", "tts.disable"]]) tts.command(commandName).description(`${commandName === "enable" ? "Enable" : "Disable"} TTS`).option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1580
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1581
|
-
const result = await runTtsStateMutation({
|
|
1582
|
-
capability: capabilityId,
|
|
1583
|
-
transport: resolveTransport({
|
|
1584
|
-
local: Boolean(opts.local),
|
|
1585
|
-
gateway: Boolean(opts.gateway),
|
|
1586
|
-
supported: ["local", "gateway"],
|
|
1587
|
-
defaultTransport: "gateway"
|
|
1588
|
-
})
|
|
1589
|
-
});
|
|
1590
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1591
|
-
});
|
|
1592
|
-
});
|
|
1593
|
-
tts.command("set-provider").description("Set the active TTS provider").requiredOption("--provider <id>", "Speech provider id").option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1594
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1595
|
-
const transport = resolveTransport({
|
|
1596
|
-
local: Boolean(opts.local),
|
|
1597
|
-
gateway: Boolean(opts.gateway),
|
|
1598
|
-
supported: ["local", "gateway"],
|
|
1599
|
-
defaultTransport: "gateway"
|
|
1600
|
-
});
|
|
1601
|
-
const result = await runTtsStateMutation({
|
|
1602
|
-
capability: "tts.set-provider",
|
|
1603
|
-
provider: String(opts.provider),
|
|
1604
|
-
transport
|
|
1605
|
-
});
|
|
1606
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1607
|
-
});
|
|
1608
|
-
});
|
|
1609
|
-
tts.command("set-persona").description("Set the active TTS persona").option("--persona <id>", "TTS persona id").option("--off", "Disable the active TTS persona", false).option("--local", "Force local execution", false).option("--gateway", "Force gateway execution", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
1610
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1611
|
-
const transport = resolveTransport({
|
|
1612
|
-
local: Boolean(opts.local),
|
|
1613
|
-
gateway: Boolean(opts.gateway),
|
|
1614
|
-
supported: ["local", "gateway"],
|
|
1615
|
-
defaultTransport: "gateway"
|
|
1616
|
-
});
|
|
1617
|
-
if (!opts.off && !opts.persona) throw new Error("--persona is required unless --off is set");
|
|
1618
|
-
const result = await runTtsStateMutation({
|
|
1619
|
-
capability: "tts.set-persona",
|
|
1620
|
-
persona: opts.off ? null : String(opts.persona),
|
|
1621
|
-
transport
|
|
1622
|
-
});
|
|
1623
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1624
|
-
});
|
|
1625
|
-
});
|
|
1626
|
-
const video = capability.command("video").description("Video generation and description");
|
|
1627
|
-
video.command("generate").description("Generate video").requiredOption("--prompt <text>", "Prompt text").option("--model <provider/model>", "Model override").option("--size <size>", "Size hint like 1280x720").option("--aspect-ratio <ratio>", "Aspect ratio hint like 16:9").option("--resolution <value>", "Resolution hint: 480P, 720P, 768P, or 1080P").option("--duration <seconds>", "Target duration in seconds").option("--audio", "Enable generated audio when supported").option("--watermark", "Request provider watermark when supported").option("--timeout-ms <ms>", "Provider request timeout in milliseconds").option("--output <path>", "Output path").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1628
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1629
|
-
const result = await runVideoGenerate({
|
|
1630
|
-
prompt: String(opts.prompt),
|
|
1631
|
-
model: opts.model,
|
|
1632
|
-
output: opts.output,
|
|
1633
|
-
size: opts.size,
|
|
1634
|
-
aspectRatio: opts.aspectRatio,
|
|
1635
|
-
resolution: normalizeVideoResolution(opts.resolution),
|
|
1636
|
-
durationSeconds: parseOptionalFiniteNumber(opts.duration, "--duration"),
|
|
1637
|
-
audio: opts.audio === true ? true : void 0,
|
|
1638
|
-
watermark: opts.watermark === true ? true : void 0,
|
|
1639
|
-
timeoutMs: parseOptionalFiniteNumber(opts.timeoutMs, "--timeout-ms")
|
|
1640
|
-
});
|
|
1641
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1642
|
-
});
|
|
1643
|
-
});
|
|
1644
|
-
video.command("describe").description("Describe one video file").requiredOption("--file <path>", "Video file").option("--model <provider/model>", "Model override").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1645
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1646
|
-
const result = await runVideoDescribe({
|
|
1647
|
-
file: String(opts.file),
|
|
1648
|
-
model: opts.model
|
|
1649
|
-
});
|
|
1650
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1651
|
-
});
|
|
1652
|
-
});
|
|
1653
|
-
video.command("providers").description("List video generation and description providers").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1654
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1655
|
-
const cfg = getRuntimeConfig();
|
|
1656
|
-
const selectedGenerationProvider = resolveSelectedProviderFromModelRef(resolveAgentModelPrimaryValue(cfg.agents?.defaults?.videoGenerationModel));
|
|
1657
|
-
const result = {
|
|
1658
|
-
generation: listRuntimeVideoGenerationProviders({ config: cfg }).map((provider) => ({
|
|
1659
|
-
available: true,
|
|
1660
|
-
configured: selectedGenerationProvider === provider.id || providerHasGenericConfig({
|
|
1661
|
-
cfg,
|
|
1662
|
-
providerId: provider.id
|
|
1663
|
-
}),
|
|
1664
|
-
selected: selectedGenerationProvider === provider.id,
|
|
1665
|
-
id: provider.id,
|
|
1666
|
-
label: provider.label,
|
|
1667
|
-
defaultModel: provider.defaultModel,
|
|
1668
|
-
models: provider.models ?? [],
|
|
1669
|
-
capabilities: provider.capabilities
|
|
1670
|
-
})),
|
|
1671
|
-
description: [...buildMediaUnderstandingRegistry(void 0, cfg).values()].filter((provider) => provider.capabilities?.includes("video")).map((provider) => ({
|
|
1672
|
-
available: true,
|
|
1673
|
-
configured: providerHasGenericConfig({
|
|
1674
|
-
cfg,
|
|
1675
|
-
providerId: provider.id
|
|
1676
|
-
}),
|
|
1677
|
-
selected: false,
|
|
1678
|
-
id: provider.id,
|
|
1679
|
-
capabilities: provider.capabilities,
|
|
1680
|
-
defaultModels: provider.defaultModels
|
|
1681
|
-
}))
|
|
1682
|
-
};
|
|
1683
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1684
|
-
});
|
|
1685
|
-
});
|
|
1686
|
-
const web = capability.command("web").description("Web capabilities");
|
|
1687
|
-
web.command("search").description("Run web search").requiredOption("--query <text>", "Search query").option("--provider <id>", "Provider id").option("--limit <n>", "Result limit").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1688
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1689
|
-
const result = await runWebSearchCommand({
|
|
1690
|
-
query: String(opts.query),
|
|
1691
|
-
provider: opts.provider,
|
|
1692
|
-
limit: opts.limit ? Number.parseInt(String(opts.limit), 10) : void 0
|
|
1693
|
-
});
|
|
1694
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1695
|
-
});
|
|
1696
|
-
});
|
|
1697
|
-
web.command("fetch").description("Fetch one URL").requiredOption("--url <url>", "URL").option("--provider <id>", "Provider id").option("--format <format>", "Format hint").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1698
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1699
|
-
const result = await runWebFetchCommand({
|
|
1700
|
-
url: String(opts.url),
|
|
1701
|
-
provider: opts.provider,
|
|
1702
|
-
format: opts.format
|
|
1703
|
-
});
|
|
1704
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1705
|
-
});
|
|
1706
|
-
});
|
|
1707
|
-
web.command("providers").description("List web providers").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1708
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1709
|
-
const cfg = getRuntimeConfig();
|
|
1710
|
-
const selectedSearchProvider = typeof cfg.tools?.web?.search?.provider === "string" ? normalizeLowercaseStringOrEmpty(cfg.tools.web.search.provider) : "";
|
|
1711
|
-
const selectedFetchProvider = typeof cfg.tools?.web?.fetch?.provider === "string" ? normalizeLowercaseStringOrEmpty(cfg.tools.web.fetch.provider) : "";
|
|
1712
|
-
const result = {
|
|
1713
|
-
search: listWebSearchProviders({ config: cfg }).map((provider) => ({
|
|
1714
|
-
available: true,
|
|
1715
|
-
configured: isWebSearchProviderConfigured({
|
|
1716
|
-
provider,
|
|
1717
|
-
config: cfg
|
|
1718
|
-
}),
|
|
1719
|
-
selected: provider.id === selectedSearchProvider,
|
|
1720
|
-
id: provider.id,
|
|
1721
|
-
envVars: provider.envVars
|
|
1722
|
-
})),
|
|
1723
|
-
fetch: listWebFetchProviders({ config: cfg }).map((provider) => ({
|
|
1724
|
-
available: true,
|
|
1725
|
-
configured: isWebFetchProviderConfigured({
|
|
1726
|
-
provider,
|
|
1727
|
-
config: cfg
|
|
1728
|
-
}),
|
|
1729
|
-
selected: provider.id === selectedFetchProvider,
|
|
1730
|
-
id: provider.id,
|
|
1731
|
-
envVars: provider.envVars
|
|
1732
|
-
}))
|
|
1733
|
-
};
|
|
1734
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, (value) => JSON.stringify(value, null, 2));
|
|
1735
|
-
});
|
|
1736
|
-
});
|
|
1737
|
-
const embedding = capability.command("embedding").description("Embedding providers");
|
|
1738
|
-
embedding.command("create").description("Create embeddings").requiredOption("--text <text>", "Input text", collectOption, []).option("--provider <id>", "Provider id").option("--model <provider/model>", "Model override").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1739
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1740
|
-
const result = await runMemoryEmbeddingCreate({
|
|
1741
|
-
texts: opts.text,
|
|
1742
|
-
provider: opts.provider,
|
|
1743
|
-
model: opts.model
|
|
1744
|
-
});
|
|
1745
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, formatEnvelopeForText);
|
|
1746
|
-
});
|
|
1747
|
-
});
|
|
1748
|
-
embedding.command("providers").description("List embedding providers").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1749
|
-
await runCommandWithRuntime(defaultRuntime, async () => {
|
|
1750
|
-
ensureMemoryEmbeddingProvidersRegistered();
|
|
1751
|
-
const cfg = getRuntimeConfig();
|
|
1752
|
-
const agentId = resolveDefaultAgentId(cfg);
|
|
1753
|
-
const resolvedMemory = resolveMemorySearchConfig(cfg, agentId);
|
|
1754
|
-
const selectedProvider = resolvedMemory?.provider && resolvedMemory.provider !== "auto" ? resolvedMemory.provider : void 0;
|
|
1755
|
-
const autoSelectedProvider = resolvedMemory?.provider === "auto" ? (await createEmbeddingProvider({
|
|
1756
|
-
config: cfg,
|
|
1757
|
-
agentDir: resolveAgentDir(cfg, agentId),
|
|
1758
|
-
provider: "auto",
|
|
1759
|
-
fallback: "none",
|
|
1760
|
-
model: resolvedMemory.model,
|
|
1761
|
-
local: resolvedMemory.local,
|
|
1762
|
-
remote: resolvedMemory.remote,
|
|
1763
|
-
outputDimensionality: resolvedMemory.outputDimensionality
|
|
1764
|
-
}).catch(() => ({ provider: null })))?.provider?.id : void 0;
|
|
1765
|
-
const result = listMemoryEmbeddingProviders().map((provider) => ({
|
|
1766
|
-
available: true,
|
|
1767
|
-
configured: provider.id === selectedProvider || provider.id === autoSelectedProvider || providerHasGenericConfig({
|
|
1768
|
-
cfg,
|
|
1769
|
-
providerId: provider.id
|
|
1770
|
-
}),
|
|
1771
|
-
selected: provider.id === selectedProvider || provider.id === autoSelectedProvider,
|
|
1772
|
-
id: provider.id,
|
|
1773
|
-
defaultModel: provider.defaultModel,
|
|
1774
|
-
transport: provider.transport,
|
|
1775
|
-
autoSelectPriority: provider.autoSelectPriority
|
|
1776
|
-
}));
|
|
1777
|
-
emitJsonOrText(defaultRuntime, Boolean(opts.json), result, providerSummaryText);
|
|
1778
|
-
});
|
|
1779
|
-
});
|
|
1780
|
-
}
|
|
1781
|
-
//#endregion
|
|
1782
|
-
export { registerCapabilityCli };
|