@pixelzx/genesis 2026.6.4 → 2026.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/.buildstamp +1 -1
- package/dist/abort-CcNxEsSq.js +201 -0
- package/dist/abort.runtime-DZJDSf0d.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/accounts-B7M6y8l8.js +107 -0
- package/dist/accounts-DddcYo7u.js +2 -0
- package/dist/accounts-v0Cqfnse.js +104 -0
- package/dist/acp-cli-D_2_Nim8.js +2193 -0
- package/dist/acp-spawn-BZPupfsZ.js +2 -0
- package/dist/acp-spawn-CWfIrbK7.js +1093 -0
- package/dist/acp-stateful-target-driver-DpCTjH5T.js +89 -0
- package/dist/action-agents-fjIM4rpc.js +67 -0
- package/dist/action-focus-cx1pm1ym.js +132 -0
- package/dist/action-help-DtyAnULB.js +7 -0
- package/dist/action-info-DF30-xZl.js +101 -0
- package/dist/action-kill-rsSdXzvX.js +33 -0
- package/dist/action-list-4VN835m2.js +21 -0
- package/dist/action-log-L032mq5B.js +30 -0
- package/dist/action-send-Dm62UP-n.js +39 -0
- package/dist/action-spawn-BuZHKlpL.js +47 -0
- package/dist/action-unfocus-CTIWf8WX.js +29 -0
- package/dist/actions.runtime-0ezEcm7K.js +18 -0
- package/dist/actions.runtime-DKsCTTnH.js +5 -0
- package/dist/actions.runtime.js +1 -1
- package/dist/agent-BTOBOCIw.js +2 -0
- package/dist/agent-command-C-_EFUUu.js +874 -0
- package/dist/agent-harness-runtime-Bye6j3EL.js +144 -0
- package/dist/agent-runner-utils-CX2vCMkx.js +239 -0
- package/dist/agent-runner.runtime-BBqrjZv4.js +3455 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-D1LIGcNj.js +18 -0
- package/dist/agents-CME2O1l9.js +5 -0
- package/dist/agents-DsDQvAPy.js +954 -0
- package/dist/aliases-C807OidC.js +2 -0
- package/dist/aliases-jq1ap6Dz.js +96 -0
- package/dist/api-BbxKoRkD.js +3 -0
- package/dist/api-CwJPCW9U.js +139 -0
- package/dist/api-N5Kaaq64.js +5 -0
- package/dist/approval-gateway-resolver-DIPFgTnx.js +29 -0
- package/dist/approval-gateway-runtime-i0yziXk2.js +2 -0
- package/dist/approval-handler-runtime-Cdm-10f9.js +439 -0
- package/dist/approval-native-runtime-BRjeBoqL.js +729 -0
- package/dist/attempt-execution.runtime-NFTF7Cbt.js +509 -0
- package/dist/attempt-execution.runtime.js +1 -1
- package/dist/attempt.prompt-helpers-DuBXv46v.js +221 -0
- package/dist/attempt.tool-run-context-Qf-tbC-C.js +933 -0
- package/dist/audit-DsDfRhB8.js +939 -0
- package/dist/audit.runtime-ComjcUGJ.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-BT_gqC-D.js +2 -0
- package/dist/auth-DeUz_8w8.js +383 -0
- package/dist/auth-order-DM7UkPDa.js +96 -0
- package/dist/auth-order-yS8hXrXh.js +2 -0
- package/dist/bash-tools-D0M9gBDu.js +3 -0
- package/dist/bash-tools-tnj1gSbO.js +2824 -0
- package/dist/binding-routing-C7atXiTD.js +85 -0
- package/dist/binding-targets-CCv7agx9.js +121 -0
- package/dist/bridge-server-C5O9rTJg.js +113 -0
- package/dist/browser-control-auth-GGN_kbqE.js +2 -0
- package/dist/browser-node-runtime-B-uTSVqP.js +12 -0
- package/dist/browser-profiles-Dex2eaLH.js +2 -0
- package/dist/browser-runtime-BPocB6yO.js +387 -0
- package/dist/browser-setup-tools-gHfYeDWA.js +13 -0
- package/dist/build-BqG7RkBz.js +550 -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/call-BI4JvjcR.js +3 -0
- package/dist/call-wY43fzOF.js +331 -0
- package/dist/call.runtime-Dh61oVeL.js +2 -0
- package/dist/call.runtime.js +1 -1
- package/dist/capability-cli-BHz-2Stx.js +1401 -0
- package/dist/catchup-Be7tHJwK.js +300 -0
- package/dist/channel-B-6VmF4-.js +840 -0
- package/dist/channel-BCJccV-O.js +226 -0
- package/dist/channel-BDZqLbod.js +1100 -0
- package/dist/channel-BQDNgTea.js +1174 -0
- package/dist/channel-BwjThGwK.js +453 -0
- package/dist/channel-CPoThmda.js +595 -0
- package/dist/channel-CUT8NJ-B.js +350 -0
- package/dist/channel-C_Y7lv8v.js +491 -0
- package/dist/channel-Ck7-C-lB.js +297 -0
- package/dist/channel-DOpVjq4i.js +1802 -0
- package/dist/channel-core-QV9-eAtb.js +5 -0
- package/dist/channel-inbound-D_tebgdx.js +31 -0
- package/dist/channel-plugin-runtime-DXcBwNNM.js +771 -0
- package/dist/channel-runtime-D4ci0o4V.js +425 -0
- package/dist/channel-sAdF_zH-.js +1320 -0
- package/dist/channel.runtime-1swLIpNV.js +89 -0
- package/dist/channel.runtime-B9hljdNF.js +4 -0
- package/dist/channel.runtime-CSbR2pni.js +430 -0
- package/dist/channel.runtime-CdpqhnLO.js +2364 -0
- package/dist/channel.runtime-DOx6WROg.js +40130 -0
- package/dist/channel.runtime-H5Kb2LbC.js +109 -0
- package/dist/channel.runtime-V7boBc_e.js +576 -0
- package/dist/channel.runtime.js +1 -1
- package/dist/channel.setup-BXyeNJ2_.js +10 -0
- package/dist/channels-KU7bwUUs.js +733 -0
- package/dist/channels-cli-CTX6_5z3.js +268 -0
- package/dist/chat-C_i6Wp50.js +2830 -0
- package/dist/clawbot-cli-CLGPtbt-.js +9 -0
- package/dist/cli/daemon-cli.js +3 -3
- package/dist/cli-BhwHu1dK.js +72 -0
- package/dist/cli-CFsq8f2H.js +2 -0
- package/dist/cli-CNVlwurq.js +219 -0
- package/dist/cli-DLP8hKbi.js +2 -0
- package/dist/cli-runner-BbNBHV6v.js +286 -0
- package/dist/cli-runner.runtime-CfPaauuM.js +4 -0
- package/dist/cli-runner.runtime-MxBlCOO2.js +3 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-startup-metadata.json +2 -2
- package/dist/cli.runtime-3cD-pSyn.js +1261 -0
- package/dist/cli.runtime.js +1 -1
- package/dist/client-Bl0d_7ak.js +138 -0
- package/dist/client-ClJyHgmq.js +713 -0
- package/dist/command-auth-DO32coey.js +76 -0
- package/dist/command-config-resolution-CAsa4fGg.js +2 -0
- package/dist/command-config-resolution-D6YcwuRh.js +23 -0
- package/dist/command-config-resolution.runtime-CSHDu35A.js +2 -0
- package/dist/command-config-resolution.runtime.js +1 -1
- package/dist/command-registry-BJEQrMqR.js +4 -0
- package/dist/command-registry-DI9i95nj.js +9 -0
- package/dist/command-registry-core-BpF1mggD.js +106 -0
- package/dist/command-secret-gateway-DDNHxysD.js +528 -0
- package/dist/command-status.runtime-DqYUCcEA.js +87 -0
- package/dist/command-status.runtime.js +1 -1
- package/dist/commands-acp-C_zCJPvL.js +77 -0
- package/dist/commands-compact.runtime-B6e3kwMS.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-handlers.runtime-B0gTkAC0.js +4599 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-status-BgZ64sA8.js +16 -0
- package/dist/commands-status.runtime-JI89gIEU.js +3 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-B0hdcBxr.js +2 -0
- package/dist/commands-subagents-control.runtime-DUeSQ5j4.js +3 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands-system-prompt-B7moUaCI.js +158 -0
- package/dist/commands-system-prompt-DTUkp9TH.js +2 -0
- package/dist/commands.runtime-BjCVVqol.js +167 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/compact-BNJH56SX.js +1118 -0
- package/dist/compact.runtime-CYI8Yi9d.js +12 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-Bb1Tk-vM.js +328 -0
- package/dist/config-DxkleHmo.js +252 -0
- package/dist/config-cli-CtaRB_f8.js +1078 -0
- package/dist/configure-Bp8WFryM.js +1252 -0
- package/dist/configure-DQ_X5zyT.js +2 -0
- package/dist/connect-options-BkWD0Wvv.js +699 -0
- package/dist/control-auth-Iqyldslx.js +125 -0
- package/dist/control-service-xIhkqyZE.js +156 -0
- package/dist/control-ui/assets/agents-Dh_TAFxm.js +1052 -0
- package/dist/control-ui/assets/canvas-BBkF0c_Z.js +269 -0
- package/dist/control-ui/assets/channel-config-extras-CNdHdere.js +2 -0
- package/dist/control-ui/assets/channels-DxBxgFLI.js +463 -0
- package/dist/control-ui/assets/cron-DI85RTUE.js +933 -0
- package/dist/control-ui/assets/de-ona0Q7Bc.js +2 -0
- package/dist/control-ui/assets/debug-DnDu2pj9.js +94 -0
- package/dist/control-ui/assets/es-Dn-oNRUH.js +2 -0
- package/dist/control-ui/assets/format-BvrOTETl.js +9 -0
- package/dist/control-ui/assets/fr-DXJ2RnNl.js +2 -0
- package/dist/control-ui/assets/i18n-BiXTtoQW.js +3 -0
- package/dist/control-ui/assets/id-BWsRmAR3.js +2 -0
- package/dist/control-ui/assets/index-YAwpI05T.js +6366 -0
- package/dist/control-ui/assets/instances-CRNiJVGJ.js +57 -0
- package/dist/control-ui/assets/ja-JP-BUkQN13S.js +2 -0
- package/dist/control-ui/assets/ko-Q_K13wyH.js +2 -0
- package/dist/control-ui/assets/logs-CzRlG5kP.js +74 -0
- package/dist/control-ui/assets/mcp-CAYQSRMs.js +373 -0
- package/dist/control-ui/assets/nodes-92SUclba.js +618 -0
- package/dist/control-ui/assets/pl-WlhlBCqd.js +2 -0
- package/dist/control-ui/assets/plugins-TwSBb6p5.js +273 -0
- package/dist/control-ui/assets/pt-BR-CVchspYo.js +2 -0
- package/dist/control-ui/assets/sessions-CHmx5D2H.js +306 -0
- package/dist/control-ui/assets/skills-C-34EOwN.js +323 -0
- package/dist/control-ui/assets/skills-shared-BbxW-wNm.js +11 -0
- package/dist/control-ui/assets/th-C4FUN3Mq.js +2 -0
- package/dist/control-ui/assets/tr-CoySBXqw.js +2 -0
- package/dist/control-ui/assets/uk-C-mkZs9j.js +2 -0
- package/dist/control-ui/assets/wallet-DjjoYuDY.js +285 -0
- package/dist/control-ui/assets/zh-CN-B7HXiLrY.js +2 -0
- package/dist/control-ui/assets/zh-TW-CKLRstBM.js +2 -0
- package/dist/control-ui/index.html +3 -3
- package/dist/conversation-id-BZtOqHIz.js +38 -0
- package/dist/conversation-id-D1Q9qPFH.js +235 -0
- package/dist/conversation-runtime-B1QZ-DEM.js +31 -0
- package/dist/core-BdVAy0Wv.js +275 -0
- package/dist/cron-cli-BWM2kRKU.js +713 -0
- package/dist/daemon-cli-MRl5nyuF.js +12 -0
- package/dist/dashboard-BkdlJrnf.js +2 -0
- package/dist/dashboard-C9m86rHv.js +81 -0
- package/dist/delegate-BjUvKQlo.js +64 -0
- package/dist/detached-task-runtime-BAEzkNB8.js +73 -0
- package/dist/devices-cli-B1n6tl9f.js +498 -0
- package/dist/diagnostics-DZxWkW3i.js +154 -0
- package/dist/direct-dm-qw-uk31C.js +64 -0
- package/dist/dispatch-D0xiJ6Up.js +1131 -0
- package/dist/dispatch-acp-DVN58m9G.js +981 -0
- package/dist/dispatch-acp-manager.runtime-C8t1i5Wt.js +3 -0
- package/dist/dispatch-acp-manager.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-FR0DUPpn.js +19 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/doctor-device-pairing-DIbiBPlL.js +307 -0
- package/dist/doctor-gateway-daemon-flow-BFjRlXvA.js +250 -0
- package/dist/doctor-gateway-health-uZrukX3c.js +63 -0
- package/dist/doctor-health-DKpg1bxM.js +59 -0
- package/dist/doctor-health-contributions-BoXX8ubw.js +493 -0
- package/dist/doctor-prompter-CLf5Uf10.js +56 -0
- package/dist/doctor-workspace-status-Cw61BbGy.js +75 -0
- package/dist/dreaming-Bk8dVfGi.js +1574 -0
- package/dist/dreaming-narrative-DGSQa-0N.js +595 -0
- package/dist/embedded-gateway-stub.runtime-sokWrs6B.js +9 -0
- package/dist/embedded-gateway-stub.runtime.js +1 -1
- package/dist/entry.js +2 -2
- package/dist/exec-approvals-cli-CnNETs_u.js +498 -0
- package/dist/extensionAPI.js +1 -1
- package/dist/extensions/active-memory/index.js +1 -1
- package/dist/extensions/bluebubbles/api.js +3 -3
- package/dist/extensions/bluebubbles/channel-plugin-api.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 +2 -2
- package/dist/extensions/browser/browser-profiles.js +2 -2
- package/dist/extensions/browser/browser-runtime-api.js +10 -10
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/browser/plugin-registration.js +1 -1
- package/dist/extensions/browser/register.runtime.js +3 -3
- package/dist/extensions/browser/runtime-api.js +11 -11
- package/dist/extensions/browser/test-support.js +1 -1
- package/dist/extensions/device-pair/api.js +1 -1
- package/dist/extensions/device-pair/index.js +3 -3
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/google-meet/index.js +2 -2
- package/dist/extensions/imessage/api.js +3 -3
- package/dist/extensions/imessage/channel-plugin-api.js +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/line/api.js +2 -2
- package/dist/extensions/line/channel-plugin-api.js +1 -1
- package/dist/extensions/line/contract-api.js +1 -1
- package/dist/extensions/line/runtime-api.js +4 -4
- package/dist/extensions/line/setup-api.js +1 -1
- package/dist/extensions/llm-task/index.js +2 -2
- package/dist/extensions/lobster/index.js +3 -3
- package/dist/extensions/lobster/runtime-api.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 +4 -4
- package/dist/extensions/mattermost/slash-route-api.js +1 -1
- package/dist/extensions/memory-core/api.js +1 -1
- package/dist/extensions/memory-core/cli-metadata.js +2 -2
- package/dist/extensions/memory-core/index.js +3 -3
- package/dist/extensions/memory-lancedb/cli-metadata.js +1 -1
- package/dist/extensions/msteams/api.js +1 -1
- package/dist/extensions/msteams/channel-plugin-api.js +1 -1
- package/dist/extensions/msteams/runtime-api.js +3 -3
- package/dist/extensions/msteams/test-api.js +1 -1
- package/dist/extensions/nextcloud-talk/api.js +1 -1
- package/dist/extensions/nextcloud-talk/channel-plugin-api.js +1 -1
- package/dist/extensions/nextcloud-talk/runtime-api.js +2 -2
- package/dist/extensions/openshell/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 +1 -1
- package/dist/extensions/synology-chat/api.js +1 -1
- package/dist/extensions/synology-chat/channel-plugin-api.js +1 -1
- package/dist/extensions/tlon/api.js +2 -2
- package/dist/extensions/tlon/channel-plugin-api.js +1 -1
- package/dist/extensions/tlon/runtime-api.js +1 -1
- package/dist/extensions/tlon/test-api.js +1 -1
- package/dist/extensions/twitch/api.js +1 -1
- package/dist/extensions/twitch/channel-plugin-api.js +1 -1
- package/dist/extensions/twitch/setup-plugin-api.js +1 -1
- package/dist/extensions/zalo/api.js +3 -3
- package/dist/extensions/zalo/channel-plugin-api.js +1 -1
- package/dist/extensions/zalo/runtime-api.js +2 -2
- package/dist/extensions/zalo/setup-api.js +2 -2
- package/dist/extensions/zalouser/api.js +3 -3
- package/dist/extensions/zalouser/channel-plugin-api.js +1 -1
- package/dist/extensions/zalouser/runtime-api.js +6 -6
- package/dist/extensions/zalouser/setup-plugin-api.js +1 -1
- package/dist/extensions/zalouser/test-api.js +1 -1
- package/dist/fallbacks-BwNexEVP.js +31 -0
- package/dist/fallbacks-GwVAaFt5.js +2 -0
- package/dist/fallbacks-shared-DmepG9Mq.js +111 -0
- package/dist/gateway-BB4hdlYm.js +115 -0
- package/dist/gateway-cli-Bzz62NC8.js +1283 -0
- package/dist/gateway-rpc-dyJV2osv.js +14 -0
- package/dist/gateway-rpc.runtime-DYVOEv4W.js +23 -0
- package/dist/gateway-rpc.runtime.js +1 -1
- package/dist/gateway-runtime-CqSQCYo0.js +15 -0
- package/dist/gateway-status-DdCiwrPt.js +584 -0
- package/dist/genesis-tools-Bh6dAUhK.js +9166 -0
- package/dist/genesis-tools.runtime-CiIUponP.js +2 -0
- package/dist/genesis-tools.runtime.js +1 -1
- package/dist/get-reply-from-config.runtime-Cu2DcwOW.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/get-reply-qVmTjhwr.js +3897 -0
- package/dist/graph-users-kkSJYBNX.js +1337 -0
- package/dist/health-CFyVDYng.js +469 -0
- package/dist/health-Cl371mu8.js +3 -0
- package/dist/health-route-D0IspgUK.js +41 -0
- package/dist/health-route-D2tFKCLv.js +2 -0
- package/dist/heartbeat-runner-Bmi8YsXz.js +5 -0
- package/dist/heartbeat-runner-FSCWra2R.js +1292 -0
- package/dist/heartbeat-runner.runtime-QF8dg4j-.js +4 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/hooks-cli-DYoG7Dz1.js +433 -0
- package/dist/image-fallbacks-5ckuJ46I.js +31 -0
- package/dist/image-fallbacks-DYnqzK01.js +2 -0
- package/dist/inbound-reply-dispatch-D5pqDZRa.js +73 -0
- package/dist/index.js +2 -2
- package/dist/infra-runtime-D08WIqN2.js +39 -0
- package/dist/init-BCgwiSZj.js +59 -0
- package/dist/library-CP9n_7AP.js +45 -0
- package/dist/lifecycle-BYam90xH.js +229 -0
- package/dist/lifecycle-DS58sNmu.js +571 -0
- package/dist/lifecycle.runtime-DMwss7xM.js +2 -0
- package/dist/lifecycle.runtime.js +1 -1
- package/dist/list-CASc4IWz.js +131 -0
- package/dist/list-CBPrBS2u.js +1212 -0
- package/dist/list-Cf7fcqQd.js +2 -0
- package/dist/list-Dqd2QyTH.js +2 -0
- package/dist/list.probe-BWcMSWDF.js +419 -0
- package/dist/llm-slug-generator-4LADFhXT.js +79 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/load-config-DI-LDL6p.js +35 -0
- package/dist/local-dispatch.runtime-WDgraH3j.js +8 -0
- package/dist/local-dispatch.runtime.js +1 -1
- package/dist/logs-cli-zoBIelUH.js +265 -0
- package/dist/logs-cli.runtime-DxKNxXAz.js +2 -0
- package/dist/logs-cli.runtime.js +1 -1
- package/dist/main-session-restart-recovery-DWZfkOzH.js +206 -0
- package/dist/managed-image-attachments-DLDa1aE2.js +2 -0
- package/dist/managed-image-attachments-a4v60Bk3.js +635 -0
- package/dist/manager-CfUcsSI9.js +2057 -0
- package/dist/manager-DmBBLCOg.js +2 -0
- package/dist/markdown-to-line-B0mPruD_.js +790 -0
- package/dist/mcp/plugin-tools-serve.js +1 -1
- package/dist/mcp-cli-CLL9nfvE.js +725 -0
- package/dist/mcp-http-p7GbtbMx.js +529 -0
- package/dist/memory-core-host-runtime-cli-CZNYkDoE.js +9 -0
- package/dist/message-CRyNLXch.js +232 -0
- package/dist/message-action-runner-5Y4EFpWh.js +1407 -0
- package/dist/message-action-runner-Dxv-GXkn.js +2 -0
- package/dist/message-actions-DtoR6Mr2.js +143 -0
- package/dist/message.gateway.runtime-RI4cvk_E.js +2 -0
- package/dist/message.gateway.runtime.js +1 -1
- package/dist/models-auth-status-DsheCXaS.js +201 -0
- package/dist/models-cli-CQQG1U-p.js +219 -0
- package/dist/monitor-BRRSjPQY.js +1459 -0
- package/dist/monitor-Ch-cG7Si.js +1661 -0
- package/dist/monitor-ChBhfnC-.js +788 -0
- package/dist/monitor-CsvCTpjq.js +671 -0
- package/dist/monitor-DjemBuVh.js +1237 -0
- package/dist/monitor-LyGEO-KI.js +2 -0
- package/dist/monitor-auth-DVCdDwlp.js +207 -0
- package/dist/monitor-processing-Cib3ZjUe.js +1974 -0
- package/dist/monitor.runtime-DLBFALbV.js +2 -0
- package/dist/monitor.runtime.js +1 -1
- package/dist/monitor.webhook-Dktr8JA-.js +180 -0
- package/dist/msteams-G5I2CO13.js +35 -0
- package/dist/native-hook-relay-B1ArNeG5.js +519 -0
- package/dist/nextcloud-talk-DimOAfaR.js +17 -0
- package/dist/node-cli-RIjV0id4.js +2276 -0
- package/dist/nodes-cli-Cke-B80I.js +1046 -0
- package/dist/nodes-utils-CsTqKwN9.js +84 -0
- package/dist/nodes.helpers-DYpGCFer.js +34 -0
- package/dist/notify-zBChwf0-.js +315 -0
- package/dist/onboard-D6UawRld.js +2 -0
- package/dist/onboard-DfoCtk3_.js +70 -0
- package/dist/onboard-helpers-BKQMe3RX.js +6 -0
- package/dist/onboard-helpers-BLBJlQ50.js +204 -0
- package/dist/onboard-interactive-GAbQD437.js +24 -0
- package/dist/onboard-non-interactive-Bqi-JXh3.js +635 -0
- package/dist/onboard-remote-CNpTyVws.js +193 -0
- package/dist/onboard-remote-GFp2lT6Y.js +2 -0
- package/dist/onboard-skills-BQneolfo.js +2 -0
- package/dist/onboard-skills-BipqJ48b.js +134 -0
- package/dist/openai-http-CLDWjSKC.js +500 -0
- package/dist/openresponses-http-DNvXNiw_.js +1128 -0
- package/dist/operator-approvals-client-gaflvETF.js +68 -0
- package/dist/outbound.runtime-ByVsvEri.js +2 -0
- package/dist/outbound.runtime.js +1 -1
- package/dist/pair-command-approve-Dzkubc-8.js +44 -0
- package/dist/persistent-bindings.lifecycle-BhdRK7Lp.js +2 -0
- package/dist/persistent-bindings.lifecycle-DQ0AiHuy.js +85 -0
- package/dist/pi-embedded-C789hs31.js +4 -0
- package/dist/pi-embedded-CXLkrOwv.js +2905 -0
- package/dist/pi-embedded.runtime-BaHYLgKa.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/pi-tool-definition-adapter-DFutc0D4.js +229 -0
- package/dist/pi-tools-k60jrAVq.js +1057 -0
- package/dist/pi-tools.before-tool-call-CFy20GCz.js +2 -0
- package/dist/pi-tools.before-tool-call-DJmPOVfQ.js +433 -0
- package/dist/plugin-BfFuIgXQ.js +12195 -0
- package/dist/plugin-enabled-dXOUnZwX.js +140 -0
- package/dist/plugin-registration-CEAozQhV.js +23 -0
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/acp-binding-runtime.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-harness-runtime.js +5 -5
- package/dist/plugin-sdk/agent-harness.js +6 -6
- package/dist/plugin-sdk/agent-runtime.js +2 -2
- package/dist/plugin-sdk/approval-gateway-runtime.js +2 -2
- package/dist/plugin-sdk/approval-handler-runtime.js +3 -3
- package/dist/plugin-sdk/approval-runtime.js +1 -1
- package/dist/plugin-sdk/browser-node-runtime.js +4 -4
- package/dist/plugin-sdk/browser-setup-tools.js +3 -3
- package/dist/plugin-sdk/browser-support.js +7 -7
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +2 -2
- 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 +1 -1
- 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-runtime.js +3 -3
- package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +2 -2
- package/dist/plugin-sdk/irc.js +2 -2
- package/dist/plugin-sdk/matrix.js +1 -1
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +2 -2
- package/dist/plugin-sdk/memory-core.js +2 -2
- package/dist/plugin-sdk/msteams.js +2 -2
- package/dist/plugin-sdk/nextcloud-talk.js +2 -2
- package/dist/plugin-sdk/nostr.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/runtime-secret-resolution.js +1 -1
- package/dist/plugin-sdk/runtime.js +2 -2
- package/dist/plugin-sdk/session-visibility.js +1 -1
- package/dist/plugin-sdk/testing.js +4 -4
- package/dist/plugin-sdk/tlon.js +1 -1
- package/dist/plugin-sdk/zalo.js +1 -1
- package/dist/plugin-sdk/zalouser.js +1 -1
- package/dist/plugin-service-BOpLQ8BU.js +2892 -0
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/policy-DiIlt2yW.js +328 -0
- package/dist/postinstall-inventory.json +445 -445
- package/dist/prepare.runtime-Bd8adOy3.js +815 -0
- package/dist/prepare.runtime.js +1 -1
- package/dist/probe-BOlTfbzG.js +2 -0
- package/dist/probe-BSRvsN95.js +2205 -0
- package/dist/probe-CDfjQSnz.js +74 -0
- package/dist/probe-D7gHyiZV.js +241 -0
- package/dist/probe-DTNKTWSs.js +2 -0
- package/dist/probe-DcryDdZh.js +45 -0
- package/dist/probe-nyesoHxj.js +1443 -0
- package/dist/program-BFGavenz.js +111 -0
- package/dist/prompt-select-styled-BhY1zahx.js +20 -0
- package/dist/protocol-DxLbSF2J.js +2477 -0
- package/dist/provider-dispatcher-C-yy1D7r.js +22 -0
- package/dist/provider-dispatcher-ErSjESTP.js +2 -0
- package/dist/qr-cli-C1-oy_ho.js +349 -0
- package/dist/qr-cli-DmEs63Sb.js +2 -0
- package/dist/reaction-runtime-api-gua650a7.js +116 -0
- package/dist/reactions-R-rA7cXz.js +998 -0
- package/dist/register-service-commands-DkbqNKVB.js +71 -0
- package/dist/register.agent-C3nW9wDn.js +248 -0
- package/dist/register.configure-BzLHCu95.js +15 -0
- package/dist/register.maintenance-BHFQo4gr.js +363 -0
- package/dist/register.message-CsYRdfKi.js +329 -0
- package/dist/register.onboard-DltySQ6C.js +88 -0
- package/dist/register.runtime-6Sk1Njnp.js +81 -0
- package/dist/register.runtime.js +1 -1
- package/dist/register.setup-CDvVQJuj.js +150 -0
- package/dist/register.status-health-sessions-B8lorJ2x.js +1215 -0
- package/dist/register.subclis-BD4fuAci.js +3 -0
- package/dist/register.subclis-CbRd3F_m.js +29 -0
- package/dist/register.subclis-core-Dtq9dAjI.js +249 -0
- package/dist/reply-dispatch-runtime-DldslKSK.js +13 -0
- package/dist/reply-runtime-2EGTfk-1.js +11 -0
- package/dist/reply.runtime-OaHntzIS.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/restart-health-BjmfJCUM.js +202 -0
- package/dist/restart-health-hw909zlD.js +2 -0
- package/dist/root-help-_hHiERsR.js +44 -0
- package/dist/routes-BxCk7Pue.js +3341 -0
- package/dist/routes-C1_6oFmZ.js +2 -0
- package/dist/rpc-zRbkEo6W.js +61 -0
- package/dist/rpc.runtime-BZSYNDPa.js +21 -0
- package/dist/rpc.runtime.js +1 -1
- package/dist/run-delivery.runtime-D6YDo67d.js +530 -0
- package/dist/run-delivery.runtime.js +1 -1
- package/dist/run-embedded.runtime-BsgPrPDa.js +4 -0
- package/dist/run-embedded.runtime.js +1 -1
- package/dist/run-execution-cli.runtime-CggaHhrJ.js +4 -0
- package/dist/run-execution-cli.runtime.js +1 -1
- package/dist/run-executor.runtime-CKkLEr_T.js +277 -0
- package/dist/run-executor.runtime.js +1 -1
- package/dist/run-main-CJYYkV6H.js +567 -0
- package/dist/run-subagent-registry.runtime-B0sgf_oy.js +2 -0
- package/dist/run-subagent-registry.runtime.js +1 -1
- package/dist/run-wait-DHizeptL.js +135 -0
- package/dist/runtime-EtV_ChXX.js +9 -0
- package/dist/runtime-api-6H864Pmt.js +9 -0
- package/dist/runtime-api-CbZqRBZQ.js +14 -0
- package/dist/runtime-api-ZxEgu8cW.js +4 -0
- package/dist/runtime-api-j9A6jYUr.js +9 -0
- package/dist/runtime-embedded-pi.runtime-BHjCPnxo.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-hvRzTSAZ.js +973 -0
- package/dist/runtime-internal-C_KZYzFK.js +2 -0
- package/dist/runtime-options-BZEOCnMg.js +275 -0
- package/dist/runtime-schema-R7LWe58K.js +28576 -0
- package/dist/scan-BNDE3dSE.js +523 -0
- package/dist/scan-TG6lVEQ2.js +2 -0
- package/dist/secrets-cli-twD2FWoZ.js +2101 -0
- package/dist/security-cli-Cd1A5yhL.js +486 -0
- package/dist/selection-CqqmU0Hi.js +7764 -0
- package/dist/selection-CsM62vcz.js +2 -0
- package/dist/send-D-EgB64m.js +156 -0
- package/dist/send-DPk5hW1W.js +102 -0
- package/dist/send.runtime-3QDkKN71.js +2 -0
- package/dist/send.runtime.js +1 -1
- package/dist/server-C94r_Qff.js +77 -0
- package/dist/server-Ceiopn_v.js +13 -0
- package/dist/server-context-BFJlu5HY.js +2 -0
- package/dist/server-context-PNEqhnTM.js +847 -0
- package/dist/server-node-events-QOAWLsDC.js +481 -0
- package/dist/server-plugin-bootstrap-CgsjzB17.js +2 -0
- package/dist/server-plugin-bootstrap-Dfuf75EN.js +12728 -0
- package/dist/server-restart-sentinel-BMPqZ7Jw.js +697 -0
- package/dist/server.impl-CCoQpvB7.js +12864 -0
- package/dist/session-kill-http-oPi3ajEp.js +110 -0
- package/dist/session-reset-service-CzDd6PBK.js +497 -0
- package/dist/session-route-DUOQE8-f.js +93 -0
- package/dist/session-status.runtime-W5tlGbXw.js +2 -0
- package/dist/session-status.runtime.js +1 -1
- package/dist/session-subagent-reactivation.runtime-yoYn1awK.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-DkeCaT-2.js +581 -0
- package/dist/session-visibility-B4CFjv43.js +147 -0
- package/dist/sessions-helpers-CDfOVWe3.js +305 -0
- package/dist/sessions-history-http-QXeTdxXM.js +383 -0
- package/dist/sessions-patch-xb4bXPwh.js +309 -0
- package/dist/sessions-resolve-BPlrW8C3.js +174 -0
- package/dist/sessions.runtime-yYJXudA9.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/setup-0Im0LL1d.js +636 -0
- package/dist/setup-api-BxwfqXN-.js +29 -0
- package/dist/setup-core-BWwXgEuM.js +171 -0
- package/dist/setup-core-DzHNbQLG.js +176 -0
- package/dist/setup-surface-BVnqDsfU.js +286 -0
- package/dist/setup-surface-BajZWmKz2.js +403 -0
- package/dist/setup-surface-rDO3YjSb.js +219 -0
- package/dist/setup.finalize-BsnPbdwc.js +547 -0
- package/dist/setup.gateway-config-BFawSWHL.js +250 -0
- package/dist/shared-52tFSlVk.js +121 -0
- package/dist/shared-C8ENgtxM.js +198 -0
- package/dist/shared-DbXvU7JV.js +76 -0
- package/dist/slash-state-CMuPwgKt.js +1911 -0
- package/dist/src-IzaHgU6a.js +3974 -0
- package/dist/startup-context-xJS8ckSG.js +312 -0
- package/dist/status-BO4LMTER.js +2 -0
- package/dist/status-BwY1tASe.js +3 -0
- package/dist/status-BxG6n-ko.js +397 -0
- package/dist/status-Co_cq2vy.js +2 -0
- package/dist/status-DKNeRGzW.js +190 -0
- package/dist/status-DzlIHiTS.js +209 -0
- package/dist/status-all-DF7qaWjo.js +498 -0
- package/dist/status-json-CgCilobT.js +14 -0
- package/dist/status-json-command-DAa78z3e.js +84 -0
- package/dist/status-runtime-shared-CRCuxXn_.js +257 -0
- package/dist/status-subagents.runtime-hUsBd4C5.js +18 -0
- package/dist/status-subagents.runtime.js +1 -1
- package/dist/status-text-BdbRrl1G.js +237 -0
- package/dist/status.gateway-connection.runtime-BmSTYFFO.js +2 -0
- package/dist/status.gateway-connection.runtime.js +1 -1
- package/dist/status.gather-CItmFIHS.js +292 -0
- package/dist/status.gather-qB6WOoH7.js +2 -0
- package/dist/status.runtime-ClZCgYx1.js +2 -0
- package/dist/status.runtime.js +1 -1
- package/dist/status.scan-overview-B0b0Mvng.js +379 -0
- package/dist/status.scan-xY7nUi9N.js +65 -0
- package/dist/status.scan.fast-json-BANGHOys.js +132 -0
- package/dist/status.scan.fast-json-M-DmMy2l.js +2 -0
- package/dist/status.summary-B3PlFnWw.js +2 -0
- package/dist/status.summary-adB75FOM.js +214 -0
- package/dist/subagent-announce-B4w7Mcpr.js +351 -0
- package/dist/subagent-announce-delivery-Dma0A4gL.js +726 -0
- package/dist/subagent-announce-output-sUPLcge-.js +364 -0
- package/dist/subagent-control-CxR0WRrx.js +506 -0
- package/dist/subagent-followup.runtime-XeFe_LA0.js +68 -0
- package/dist/subagent-followup.runtime.js +1 -1
- package/dist/subagent-orphan-recovery-CJPHy8JV.js +305 -0
- package/dist/subagent-registry-CjMWjRCE.js +1753 -0
- package/dist/subagent-registry-H20VxEu0.js +3 -0
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/subagent-spawn-CRM5x6cV.js +1005 -0
- package/dist/system-cli-BJ5mMirj.js +59 -0
- package/dist/targets-CUnlEj96.js +67 -0
- package/dist/task-executor-DKnEwQ6v.js +360 -0
- package/dist/task-owner-access-CfypP1Yc.js +74 -0
- package/dist/task-registry-delivery-runtime-BB6ZzpqH.js +2 -0
- package/dist/task-registry-delivery-runtime-CvHa0gv-.js +3 -0
- package/dist/task-registry-pQuAfAL9.js +2366 -0
- package/dist/task-registry.maintenance-Bfd87wEV.js +416 -0
- package/dist/task-registry.maintenance-VgfbW0yt.js +2 -0
- package/dist/telegram/token.js +1 -1
- package/dist/testing-C_mngO0u.js +575 -0
- package/dist/text-report-Ct6t3he6.js +587 -0
- package/dist/tool-resolution-C4KGgPH-.js +90 -0
- package/dist/tools-effective-inventory-Bo2QC-m8.js +152 -0
- package/dist/tools-invoke-http-CBZPFh5L.js +206 -0
- package/dist/trash-DhZow3jd.js +24 -0
- package/dist/tui-cli-BPdQPozP.js +4575 -0
- package/dist/update-cli-BRi3mVAU.js +1759 -0
- package/dist/upgrade-D9zejtCk.js +1226 -0
- package/dist/video-generation-task-status-BSBQ0_FO.js +163 -0
- package/dist/wait-for-idle-before-flush-D1dTT9th.js +5986 -0
- package/dist/wizard-models-ysyV_WWR.js +334 -0
- package/package.json +1 -1
- package/dist/abort-DaihtnYj.js +0 -201
- package/dist/abort.runtime-BUT9L_5l.js +0 -2
- package/dist/accounts-BY5wsBnV.js +0 -104
- package/dist/accounts-DGth1vsM.js +0 -107
- package/dist/accounts-Do6Ir-q3.js +0 -2
- package/dist/acp-cli-BHgjn8rh.js +0 -2193
- package/dist/acp-spawn-BAM_Jrft.js +0 -2
- package/dist/acp-spawn-DyBD_Y_t.js +0 -1093
- package/dist/acp-stateful-target-driver-DKGnfjWu.js +0 -89
- package/dist/action-agents-CzMSNQdc.js +0 -67
- package/dist/action-focus-CpjIrZFe.js +0 -132
- package/dist/action-help-BhE9UosK.js +0 -7
- package/dist/action-info-CH2j6dKT.js +0 -101
- package/dist/action-kill-CB4AnLIf.js +0 -33
- package/dist/action-list-CQ8LbzvR.js +0 -21
- package/dist/action-log-DZblh247.js +0 -30
- package/dist/action-send-DMe0B4FG.js +0 -39
- package/dist/action-spawn-CkKMESb5.js +0 -47
- package/dist/action-unfocus-DjQzPZwU.js +0 -29
- package/dist/actions.runtime-CUdRdpLB.js +0 -5
- package/dist/actions.runtime-CxRstWdN.js +0 -18
- package/dist/agent-command-Nh_kPL3z.js +0 -874
- package/dist/agent-harness-runtime-BEb7Wk1m.js +0 -144
- package/dist/agent-q6U-cKJn.js +0 -2
- package/dist/agent-runner-utils-x_qJ6xYC.js +0 -239
- package/dist/agent-runner.runtime-DRvTfUPd.js +0 -3455
- package/dist/agent-runtime-jSYYQd6f.js +0 -18
- package/dist/agents-BKOpsZXw.js +0 -5
- package/dist/agents-BY34ViPX.js +0 -954
- package/dist/aliases-CD5YlX7d.js +0 -2
- package/dist/aliases-Dq31zANx.js +0 -96
- package/dist/api-BhxN9fxJ.js +0 -139
- package/dist/api-DjL_3olO.js +0 -5
- package/dist/api-jIYND-S5.js +0 -3
- package/dist/approval-gateway-resolver-BfvdJW5s.js +0 -29
- package/dist/approval-gateway-runtime-BBf976nt.js +0 -2
- package/dist/approval-handler-runtime-Bq4p5wvg.js +0 -439
- package/dist/approval-native-runtime-IrisOZrU.js +0 -729
- package/dist/attempt-execution.runtime-BXGalt-_.js +0 -509
- package/dist/attempt.prompt-helpers-A-pc2LfL.js +0 -221
- package/dist/attempt.tool-run-context-Ukna4ck-.js +0 -933
- package/dist/audit-CVUpfDvE.js +0 -939
- package/dist/audit.runtime-CsuGXvud.js +0 -7
- package/dist/auth-CjcZyRUW.js +0 -383
- package/dist/auth-order-DIkyTpW4.js +0 -2
- package/dist/auth-order-Dpt1K1rT.js +0 -96
- package/dist/auth-sVuL2xeZ.js +0 -2
- package/dist/bash-tools-DDv0zQh9.js +0 -2824
- package/dist/bash-tools-s-QSvRmt.js +0 -3
- package/dist/binding-routing-Cz5R2kFK.js +0 -85
- package/dist/binding-targets-D4j2hdQh.js +0 -121
- package/dist/bridge-server-X8SdeAI3.js +0 -113
- package/dist/browser-control-auth-BrF3DZxC.js +0 -2
- package/dist/browser-node-runtime-BecPmKOx.js +0 -12
- package/dist/browser-profiles-BxAKEG3x.js +0 -2
- package/dist/browser-runtime-D9fTDscJ.js +0 -387
- package/dist/browser-setup-tools--AQGWGvl.js +0 -13
- package/dist/build-B0nbyXrw.js +0 -550
- package/dist/call-BvqN9kay.js +0 -3
- package/dist/call-Dk5rTl-p.js +0 -331
- package/dist/call.runtime-Bx1hKDwO.js +0 -2
- package/dist/capability-cli-286Z3Bq3.js +0 -1401
- package/dist/catchup-DyeQ6GNj.js +0 -300
- package/dist/channel-B5m01jSZ.js +0 -1802
- package/dist/channel-BE26v3WU.js +0 -840
- package/dist/channel-BS7r_Zt1.js +0 -226
- package/dist/channel-BUWCqkGh.js +0 -1320
- package/dist/channel-BhgKqvZn.js +0 -453
- package/dist/channel-Bx703sxQ.js +0 -297
- package/dist/channel-CDjlEQAM.js +0 -491
- package/dist/channel-ChrqAgRS.js +0 -595
- package/dist/channel-Crmp3BHh.js +0 -1100
- package/dist/channel-D7GdDfBl.js +0 -1174
- package/dist/channel-DqSzRIul.js +0 -350
- package/dist/channel-core-DIwclC34.js +0 -5
- package/dist/channel-inbound-DPW1gRUU.js +0 -31
- package/dist/channel-plugin-runtime-BJhRSlBI.js +0 -771
- package/dist/channel-runtime-sV_Sg0EO.js +0 -425
- package/dist/channel.runtime-4BaNapRW.js +0 -89
- package/dist/channel.runtime-Bk2w0Yzd.js +0 -2364
- package/dist/channel.runtime-Bo5_2imz.js +0 -109
- package/dist/channel.runtime-CdYWlMyL.js +0 -40130
- package/dist/channel.runtime-CrYmCmSw.js +0 -4
- package/dist/channel.runtime-D3APPhVs.js +0 -430
- package/dist/channel.runtime-DjF1Gg6N.js +0 -576
- package/dist/channel.setup-BxXrmAYb.js +0 -10
- package/dist/channels-DHcJgMnw.js +0 -733
- package/dist/channels-cli-Dnq08u4r.js +0 -268
- package/dist/chat-BGU3UVKD.js +0 -2830
- package/dist/clawbot-cli-C-rqJUW-.js +0 -9
- package/dist/cli-BlnGJbLJ.js +0 -219
- package/dist/cli-D0RU1q0-.js +0 -2
- package/dist/cli-DBw79G2t.js +0 -72
- package/dist/cli-Dul37_xp.js +0 -2
- package/dist/cli-runner-DY8BKEmu.js +0 -286
- package/dist/cli-runner.runtime-5JMuegF9.js +0 -3
- package/dist/cli-runner.runtime-DQROn9Ve.js +0 -4
- package/dist/cli.runtime-CGOUREQg.js +0 -1261
- package/dist/client-CCBN1ydB.js +0 -138
- package/dist/client-PHLyQ8il.js +0 -713
- package/dist/command-auth-79QKQZZ3.js +0 -76
- package/dist/command-config-resolution-BKAgMItc.js +0 -2
- package/dist/command-config-resolution-BUCAmCZ_.js +0 -23
- package/dist/command-config-resolution.runtime-BVtfeARM.js +0 -2
- package/dist/command-registry-C9axn0de.js +0 -4
- package/dist/command-registry-DkcFlIyM.js +0 -9
- package/dist/command-registry-core-DEDRtJmS.js +0 -106
- package/dist/command-secret-gateway-g0alGmKz.js +0 -528
- package/dist/command-status.runtime-Dw6Zj5hL.js +0 -87
- package/dist/commands-acp-De-XFc40.js +0 -77
- package/dist/commands-compact.runtime-6gixR2a8.js +0 -10
- package/dist/commands-handlers.runtime-DCmZAlRN.js +0 -4599
- package/dist/commands-status-CION7GYY.js +0 -16
- package/dist/commands-status.runtime-FBwoHftv.js +0 -3
- package/dist/commands-subagents-control.runtime-C2xgOYKM.js +0 -2
- package/dist/commands-subagents-control.runtime-CgIEblx3.js +0 -3
- package/dist/commands-system-prompt-B-jC-KV-.js +0 -158
- package/dist/commands-system-prompt-DeK5Jhy_.js +0 -2
- package/dist/commands.runtime-CHSb1kYa.js +0 -167
- package/dist/compact-Dwchggv2.js +0 -1118
- package/dist/compact.runtime-jDUYMSjR.js +0 -12
- package/dist/completion-cli-DGiZcg4E.js +0 -328
- package/dist/config-Bnb9qa1S.js +0 -252
- package/dist/config-cli-BuZ5RUhD.js +0 -1078
- package/dist/configure-BLNGlWh0.js +0 -1252
- package/dist/configure-nPzsEeOb.js +0 -2
- package/dist/connect-options-C9cvS-bh.js +0 -699
- package/dist/control-auth-D2-P54fW.js +0 -125
- package/dist/control-service-CqUPgxlx.js +0 -156
- package/dist/control-ui/assets/agents-CA3uz9sP.js +0 -1052
- package/dist/control-ui/assets/canvas-D0sLy568.js +0 -269
- package/dist/control-ui/assets/channel-config-extras-CWzNTLS-.js +0 -2
- package/dist/control-ui/assets/channels-DXgjbWts.js +0 -463
- package/dist/control-ui/assets/cron-D-rffMH6.js +0 -933
- package/dist/control-ui/assets/de-l9FbKtxt.js +0 -2
- package/dist/control-ui/assets/debug-Vf_bLYLB.js +0 -94
- package/dist/control-ui/assets/es-CC-t9AUQ.js +0 -2
- package/dist/control-ui/assets/format-BL-FisEP.js +0 -9
- package/dist/control-ui/assets/fr-DZKceqST.js +0 -2
- package/dist/control-ui/assets/i18n-DFH8x0DD.js +0 -3
- package/dist/control-ui/assets/id-D93YKkrM.js +0 -2
- package/dist/control-ui/assets/index-lWAwAXYo.js +0 -6366
- package/dist/control-ui/assets/instances-BmzzTloa.js +0 -57
- package/dist/control-ui/assets/ja-JP-DoPdk5L_.js +0 -2
- package/dist/control-ui/assets/ko-8TeOGGHm.js +0 -2
- package/dist/control-ui/assets/logs-BjPSImvD.js +0 -74
- package/dist/control-ui/assets/mcp-CQGmuKdR.js +0 -281
- package/dist/control-ui/assets/nodes-CDhqPGsD.js +0 -618
- package/dist/control-ui/assets/pl-BSP1Y3tH.js +0 -2
- package/dist/control-ui/assets/plugins-D4fXQx07.js +0 -273
- package/dist/control-ui/assets/pt-BR-D4-81_zm.js +0 -2
- package/dist/control-ui/assets/sessions-DzjXl7P7.js +0 -306
- package/dist/control-ui/assets/skills-BTQrLVPj.js +0 -323
- package/dist/control-ui/assets/skills-shared-CX4mwYFK.js +0 -11
- package/dist/control-ui/assets/th-DrnubOIu.js +0 -2
- package/dist/control-ui/assets/tr-BMyrj0eZ.js +0 -2
- package/dist/control-ui/assets/uk-CZhU3bHK.js +0 -2
- package/dist/control-ui/assets/wallet-DPb6whuj.js +0 -285
- package/dist/control-ui/assets/zh-CN-CH12jxSw.js +0 -2
- package/dist/control-ui/assets/zh-TW-CaTySceX.js +0 -2
- package/dist/conversation-id-BAzJOKBB.js +0 -235
- package/dist/conversation-id-WJLKuyy9.js +0 -38
- package/dist/conversation-runtime-D8fK5aI0.js +0 -31
- package/dist/core-DywmHt1k.js +0 -275
- package/dist/cron-cli-CeEJRkfR.js +0 -713
- package/dist/daemon-cli-BZZOjJHx.js +0 -12
- package/dist/dashboard-C0NRxmP3.js +0 -81
- package/dist/dashboard-DqhPgQv-.js +0 -2
- package/dist/delegate-DwVbOeR5.js +0 -64
- package/dist/detached-task-runtime-DiDRj-v-.js +0 -73
- package/dist/devices-cli-BKVbpwVc.js +0 -498
- package/dist/diagnostics-gh3UN_iV.js +0 -154
- package/dist/direct-dm-CwHHUkHV.js +0 -64
- package/dist/dispatch-B5af8_1v.js +0 -1131
- package/dist/dispatch-acp-DgOnUWBl.js +0 -981
- package/dist/dispatch-acp-manager.runtime-XWNjVh_M.js +0 -3
- package/dist/dispatch-acp.runtime-BdYL_ZqM.js +0 -19
- package/dist/doctor-device-pairing-CtGzWmXB.js +0 -307
- package/dist/doctor-gateway-daemon-flow-CCBI0jL4.js +0 -250
- package/dist/doctor-gateway-health-CkjqPFDl.js +0 -63
- package/dist/doctor-health-BOhuy1vP.js +0 -59
- package/dist/doctor-health-contributions-ChEuyLAY.js +0 -493
- package/dist/doctor-prompter-9nOTFD0Q.js +0 -56
- package/dist/doctor-workspace-status-CO5Ocwlt.js +0 -75
- package/dist/dreaming-GOPEFPio.js +0 -1574
- package/dist/dreaming-narrative-DfxHaxOU.js +0 -595
- package/dist/embedded-gateway-stub.runtime-B2OWcbsK.js +0 -9
- package/dist/exec-approvals-cli-CGeFtFbB.js +0 -498
- package/dist/fallbacks-CdfWAgNP.js +0 -2
- package/dist/fallbacks-eXbQ8TBp.js +0 -31
- package/dist/fallbacks-shared-akcCu5CD.js +0 -111
- package/dist/gateway-D-dDKqwi.js +0 -115
- package/dist/gateway-cli-DBS06Da8.js +0 -1283
- package/dist/gateway-rpc-Cxa8dVW5.js +0 -14
- package/dist/gateway-rpc.runtime-D76s-oxs.js +0 -23
- package/dist/gateway-runtime-Dhm_gLh1.js +0 -15
- package/dist/gateway-status-C_L_CdOg.js +0 -584
- package/dist/genesis-tools-rRJB3JXY.js +0 -9166
- package/dist/genesis-tools.runtime-6oKokqaA.js +0 -2
- package/dist/get-reply-BkiDsDVY.js +0 -3897
- package/dist/get-reply-from-config.runtime-CHKCcj9D.js +0 -2
- package/dist/graph-users-BnXIYyC5.js +0 -1337
- package/dist/health-ZsJNENSY.js +0 -3
- package/dist/health-osa9LOJf.js +0 -469
- package/dist/health-route-8TdKOYLp.js +0 -2
- package/dist/health-route-BdLtX2Bg.js +0 -41
- package/dist/heartbeat-runner-BCbkAprr.js +0 -1292
- package/dist/heartbeat-runner-Dc1K8S94.js +0 -5
- package/dist/heartbeat-runner.runtime-pJaAsgLY.js +0 -4
- package/dist/hooks-cli-C3ggAz0i.js +0 -433
- package/dist/image-fallbacks-CiSae-lb.js +0 -2
- package/dist/image-fallbacks-vI8KUh6N.js +0 -31
- package/dist/inbound-reply-dispatch-DLM60UDh.js +0 -73
- package/dist/infra-runtime-CrHVeejV.js +0 -39
- package/dist/init-BKeEiV2q.js +0 -59
- package/dist/library-CHB7yTo5.js +0 -45
- package/dist/lifecycle-CUULToPr.js +0 -229
- package/dist/lifecycle-DCMpTRD2.js +0 -571
- package/dist/lifecycle.runtime-CP4gRxWv.js +0 -2
- package/dist/list-0zDFAWTF.js +0 -2
- package/dist/list-BaxVHTAN.js +0 -131
- package/dist/list-CMRMgrPs.js +0 -1212
- package/dist/list-DSrBtnKI.js +0 -2
- package/dist/list.probe-BJYSCsJY.js +0 -419
- package/dist/llm-slug-generator-Bn_wrWYw.js +0 -79
- package/dist/load-config-qC2BWt8E.js +0 -35
- package/dist/local-dispatch.runtime-DyU7urGc.js +0 -8
- package/dist/logs-cli-zK71r_PE.js +0 -265
- package/dist/logs-cli.runtime-k0UtiaRP.js +0 -2
- package/dist/main-session-restart-recovery-DMT0Oj9a.js +0 -206
- package/dist/managed-image-attachments-B6XXE4--.js +0 -635
- package/dist/managed-image-attachments-BTzWoDWE.js +0 -2
- package/dist/manager-BCKuWA67.js +0 -2057
- package/dist/manager-rGwNUzMp.js +0 -2
- package/dist/markdown-to-line-DmPbXQA1.js +0 -790
- package/dist/mcp-cli-CYpPNMcE.js +0 -725
- package/dist/mcp-http-wiE81iKg.js +0 -529
- package/dist/memory-core-host-runtime-cli-BOSQRX1T.js +0 -9
- package/dist/message-CUDzVGD8.js +0 -232
- package/dist/message-action-runner-Dy0IpKa4.js +0 -1407
- package/dist/message-action-runner-KkBFzZdg.js +0 -2
- package/dist/message-actions-Dcdb5aSR.js +0 -143
- package/dist/message.gateway.runtime-D86fFO99.js +0 -2
- package/dist/models-auth-status-DkiX4s0b.js +0 -201
- package/dist/models-cli-CSUot1R3.js +0 -219
- package/dist/monitor-BA8ByMKR.js +0 -2
- package/dist/monitor-Bv1GIHW5.js +0 -1661
- package/dist/monitor-DTFY0ruF.js +0 -788
- package/dist/monitor-DXH-vNGn.js +0 -1459
- package/dist/monitor-Df5k8NGk.js +0 -671
- package/dist/monitor-Dk2YRF26.js +0 -1237
- package/dist/monitor-auth-CZOW753A.js +0 -207
- package/dist/monitor-processing-Clta8N4C.js +0 -1974
- package/dist/monitor.runtime-3ORbPT0X.js +0 -2
- package/dist/monitor.webhook-CRyTxENk.js +0 -180
- package/dist/msteams-BE0VieXF.js +0 -35
- package/dist/native-hook-relay-DAwGGuEx.js +0 -519
- package/dist/nextcloud-talk-DfYlTFsm.js +0 -17
- package/dist/node-cli-Bzyci_X_.js +0 -2276
- package/dist/nodes-cli-Er3OZkuk.js +0 -1046
- package/dist/nodes-utils-Cp8QZO8-.js +0 -84
- package/dist/nodes.helpers-CwKAAnRA.js +0 -34
- package/dist/notify-D_5n_vEJ.js +0 -315
- package/dist/onboard-BE82RudQ.js +0 -2
- package/dist/onboard-Bk4xL8X7.js +0 -70
- package/dist/onboard-helpers-D4WYa-6g.js +0 -204
- package/dist/onboard-helpers-MuFxPZg5.js +0 -6
- package/dist/onboard-interactive-0zmI-9ia.js +0 -24
- package/dist/onboard-non-interactive-DIRB95mT.js +0 -635
- package/dist/onboard-remote-7qR1knbU.js +0 -2
- package/dist/onboard-remote-CLmoySkk.js +0 -193
- package/dist/onboard-skills-C_873OK_.js +0 -134
- package/dist/onboard-skills-DrlBYc0t.js +0 -2
- package/dist/openai-http-DzCBqW6b.js +0 -500
- package/dist/openresponses-http-B2zgO5hQ.js +0 -1128
- package/dist/operator-approvals-client-mGBl4ptH.js +0 -68
- package/dist/outbound.runtime--HS-MxM_.js +0 -2
- package/dist/pair-command-approve-CCTSQKJH.js +0 -44
- package/dist/persistent-bindings.lifecycle-CnmqGsQf.js +0 -85
- package/dist/persistent-bindings.lifecycle-Dav1TX9E.js +0 -2
- package/dist/pi-embedded-BSKL8IgF.js +0 -4
- package/dist/pi-embedded-DMM8Pfp7.js +0 -2905
- package/dist/pi-embedded.runtime-Bv_roBVx.js +0 -4
- package/dist/pi-tool-definition-adapter-OrxjlSIM.js +0 -229
- package/dist/pi-tools-DD1YegeL.js +0 -1057
- package/dist/pi-tools.before-tool-call-J9ujp9Wp.js +0 -433
- package/dist/pi-tools.before-tool-call-hGEgKGZQ.js +0 -2
- package/dist/plugin-Cg3pHepG.js +0 -12195
- package/dist/plugin-enabled-wEQ8BQNw.js +0 -140
- package/dist/plugin-registration-DLcLJgqz.js +0 -23
- package/dist/plugin-service-BogBl5qk.js +0 -2892
- package/dist/policy-Bkh8Xtnb.js +0 -328
- package/dist/prepare.runtime-Cd31ie7u.js +0 -815
- package/dist/probe-9IM22Rkf.js +0 -2
- package/dist/probe-ButCyV3d.js +0 -1443
- package/dist/probe-D7QBUio1.js +0 -45
- package/dist/probe-DV6CWm0r.js +0 -74
- package/dist/probe-DkfetvwA.js +0 -2
- package/dist/probe-Dxo-LQjn.js +0 -2205
- package/dist/probe-nil3qQAV.js +0 -241
- package/dist/program-AcjZFtZQ.js +0 -111
- package/dist/prompt-select-styled-BSf77q2T.js +0 -20
- package/dist/protocol-C4I0nfuT.js +0 -2477
- package/dist/provider-dispatcher-CkiPxKIr.js +0 -22
- package/dist/provider-dispatcher-PmsHJlUO.js +0 -2
- package/dist/qr-cli-BHY0TO2W.js +0 -2
- package/dist/qr-cli-BbjDJSKp.js +0 -349
- package/dist/reaction-runtime-api-DOigJrbq.js +0 -116
- package/dist/reactions-CogkrjNr.js +0 -998
- package/dist/register-service-commands-IA3Nfza5.js +0 -71
- package/dist/register.agent-DD0aSYye.js +0 -248
- package/dist/register.configure-BOy4i7Ah.js +0 -15
- package/dist/register.maintenance-CUp6FEOF.js +0 -363
- package/dist/register.message-DezTIpNI.js +0 -329
- package/dist/register.onboard-Brpxl9p3.js +0 -88
- package/dist/register.runtime-BfH5rSb_.js +0 -81
- package/dist/register.setup-CIt4FVv0.js +0 -150
- package/dist/register.status-health-sessions-IbGZwSaG.js +0 -1215
- package/dist/register.subclis-B1H4fYxP.js +0 -29
- package/dist/register.subclis-D-_xtNVs.js +0 -3
- package/dist/register.subclis-core-CkJelRU8.js +0 -249
- package/dist/reply-dispatch-runtime-Lu4Metex.js +0 -13
- package/dist/reply-runtime-CgPzru94.js +0 -11
- package/dist/reply.runtime-sw14BA5F.js +0 -2
- package/dist/restart-health-1MNBua3p.js +0 -202
- package/dist/restart-health-BWGpwgPv.js +0 -2
- package/dist/root-help-B3zoC2OP.js +0 -44
- package/dist/routes-BM6fbday.js +0 -3341
- package/dist/routes-pVc_QLiP.js +0 -2
- package/dist/rpc-BGOWS7nj.js +0 -61
- package/dist/rpc.runtime-Ca9K3sx8.js +0 -21
- package/dist/run-delivery.runtime-CabntI64.js +0 -530
- package/dist/run-embedded.runtime-Q7wrP6Qn.js +0 -4
- package/dist/run-execution-cli.runtime-CtRUFc-M.js +0 -4
- package/dist/run-executor.runtime-Nm38xsKA.js +0 -277
- package/dist/run-main-kE0nFgvK.js +0 -567
- package/dist/run-subagent-registry.runtime-D9_scMUr.js +0 -2
- package/dist/run-wait-B2K_6JNL.js +0 -135
- package/dist/runtime-BZ296jTK.js +0 -9
- package/dist/runtime-DnZsw7MB.js +0 -973
- package/dist/runtime-api-BL9vpbvb.js +0 -14
- package/dist/runtime-api-BbsLJB4C.js +0 -9
- package/dist/runtime-api-ChwFrQRw.js +0 -9
- package/dist/runtime-api-_fH7M3Qh.js +0 -4
- package/dist/runtime-embedded-pi.runtime-TOdW-E-2.js +0 -2
- package/dist/runtime-internal-DGwOFi_E.js +0 -2
- package/dist/runtime-options-CSPfxkb1.js +0 -275
- package/dist/runtime-schema-CMRvOPkk.js +0 -28576
- package/dist/scan-D6gkNpKl.js +0 -523
- package/dist/scan-_9J5-5L6.js +0 -2
- package/dist/secrets-cli-DlVSRQPM.js +0 -2101
- package/dist/security-cli-DtzNOYL2.js +0 -486
- package/dist/selection-CBJZE_FL.js +0 -7764
- package/dist/selection-XsoEF2p2.js +0 -2
- package/dist/send-BAaDBRfi.js +0 -156
- package/dist/send-BB-M1afy.js +0 -102
- package/dist/send.runtime-CI_75KUP.js +0 -2
- package/dist/server-B_BiVYFv.js +0 -13
- package/dist/server-D58E1Cua.js +0 -77
- package/dist/server-context-D5AnCc1E.js +0 -2
- package/dist/server-context-bt09wrJu.js +0 -847
- package/dist/server-node-events-CUx4-7FL.js +0 -481
- package/dist/server-plugin-bootstrap-CU5P500z.js +0 -12708
- package/dist/server-plugin-bootstrap-CXm9xWXR.js +0 -2
- package/dist/server-restart-sentinel-ByFI_0MB.js +0 -697
- package/dist/server.impl-BBBEDK9u.js +0 -12864
- package/dist/session-kill-http-9MoO6FXC.js +0 -110
- package/dist/session-reset-service-redPsOs-.js +0 -497
- package/dist/session-route-C8oB2UYs.js +0 -93
- package/dist/session-status.runtime-D3bYBPJe.js +0 -2
- package/dist/session-subagent-reactivation.runtime-aat7tUag.js +0 -2
- package/dist/session-tab-registry-CAJ_oDsb.js +0 -581
- package/dist/session-visibility-Dq88jJYB.js +0 -147
- package/dist/sessions-helpers-C8-IkqhO.js +0 -305
- package/dist/sessions-history-http-4Ftuwnes.js +0 -383
- package/dist/sessions-patch-BsyNHOaz.js +0 -309
- package/dist/sessions-resolve-gKLz2Bup.js +0 -174
- package/dist/sessions.runtime-C1W59rQY.js +0 -2
- package/dist/setup-DhvXyU_5.js +0 -636
- package/dist/setup-api-B9Y4qPgq.js +0 -29
- package/dist/setup-core-CdFQ6ZXC.js +0 -176
- package/dist/setup-core-kXUD3Kat.js +0 -171
- package/dist/setup-surface-BFL9WfBs.js +0 -219
- package/dist/setup-surface-Cxg_nSWc.js +0 -286
- package/dist/setup-surface-DbooMj782.js +0 -403
- package/dist/setup.finalize-CKxukDYi.js +0 -547
- package/dist/setup.gateway-config-BhEtXwaB.js +0 -250
- package/dist/shared-BNVKrp5y.js +0 -76
- package/dist/shared-CM3mnx7z.js +0 -198
- package/dist/shared-CfrsSVhL.js +0 -121
- package/dist/slash-state-2Z-om57Q.js +0 -1911
- package/dist/src-DAoKvK_N.js +0 -3974
- package/dist/startup-context-CtYAdYwd.js +0 -312
- package/dist/status-B2M0Imij.js +0 -3
- package/dist/status-Bd-BNmiE.js +0 -2
- package/dist/status-D6nbpHFi.js +0 -397
- package/dist/status-MByUxUGu.js +0 -209
- package/dist/status-QUjO1tkz.js +0 -2
- package/dist/status-all-DPa-BiHk.js +0 -498
- package/dist/status-erNo8YmW.js +0 -190
- package/dist/status-json-command-C9rbAyj-.js +0 -84
- package/dist/status-json-tO3CQXIQ.js +0 -14
- package/dist/status-runtime-shared-DmBB_gmT.js +0 -257
- package/dist/status-subagents.runtime-BXAZr5y0.js +0 -18
- package/dist/status-text-BCeYk0-q.js +0 -237
- package/dist/status.gateway-connection.runtime-bt35dapy.js +0 -2
- package/dist/status.gather-B9a-CEev.js +0 -292
- package/dist/status.gather-ahBLFzk6.js +0 -2
- package/dist/status.runtime-BrErwtfc.js +0 -2
- package/dist/status.scan-D2mvM4II.js +0 -65
- package/dist/status.scan-overview-uOOaqp1t.js +0 -379
- package/dist/status.scan.fast-json-C9dkN28s.js +0 -2
- package/dist/status.scan.fast-json-DY3Or8S4.js +0 -132
- package/dist/status.summary-Cf4p2BPK.js +0 -2
- package/dist/status.summary-DxfZCcNa.js +0 -214
- package/dist/subagent-announce-CyQZsAIm.js +0 -351
- package/dist/subagent-announce-delivery-CgdPNjMA.js +0 -726
- package/dist/subagent-announce-output-D1xi4Tk1.js +0 -364
- package/dist/subagent-control-D-O6I8Mt.js +0 -506
- package/dist/subagent-followup.runtime-BbA7NPAq.js +0 -68
- package/dist/subagent-orphan-recovery-C6_cmAyE.js +0 -305
- package/dist/subagent-registry-Dn_XpDh0.js +0 -1753
- package/dist/subagent-registry-DodFw3pu.js +0 -3
- package/dist/subagent-spawn-Dw5lttXp.js +0 -1005
- package/dist/system-cli-CSqO2Z4K.js +0 -59
- package/dist/targets-CMdwh9lR.js +0 -67
- package/dist/task-executor-DgZSfcBk.js +0 -360
- package/dist/task-owner-access-9c38idlo.js +0 -74
- package/dist/task-registry-Z-lBPkNj.js +0 -2366
- package/dist/task-registry-delivery-runtime-DOV4qoj4.js +0 -2
- package/dist/task-registry-delivery-runtime-EATr0C3C.js +0 -3
- package/dist/task-registry.maintenance-C1YMEwhk.js +0 -416
- package/dist/task-registry.maintenance-CBfaUWcp.js +0 -2
- package/dist/testing-CFk04o9M.js +0 -575
- package/dist/text-report-QhVG354o.js +0 -587
- package/dist/tool-resolution-D6V4tg-G.js +0 -90
- package/dist/tools-effective-inventory-DFU7yYvD.js +0 -152
- package/dist/tools-invoke-http-y6WIa3Ku.js +0 -206
- package/dist/trash-rhbwNhfQ.js +0 -24
- package/dist/tui-cli-BfxeO4YM.js +0 -4575
- package/dist/update-cli-DaN9bvPV.js +0 -1759
- package/dist/upgrade-f5dlIxir.js +0 -1226
- package/dist/video-generation-task-status-yX54iO8n.js +0 -163
- package/dist/wait-for-idle-before-flush-mZrBNr5z.js +0 -5986
- package/dist/wizard-models-D_avLyHR.js +0 -334
|
@@ -0,0 +1,2477 @@
|
|
|
1
|
+
import { n as ENV_SECRET_REF_ID_RE } from "./types.secrets-BbgGt42I.js";
|
|
2
|
+
import { n as FILE_SECRET_REF_ID_PATTERN, r as SECRET_PROVIDER_ALIAS_PATTERN, t as EXEC_SECRET_REF_ID_JSON_SCHEMA_PATTERN } from "./ref-contract-D_WmZ91C.js";
|
|
3
|
+
import { n as GATEWAY_CLIENT_IDS, r as GATEWAY_CLIENT_MODES } from "./client-info-DZtBR4jU.js";
|
|
4
|
+
import { t as INPUT_PROVENANCE_KIND_VALUES } from "./input-provenance-Cr3VK2K1.js";
|
|
5
|
+
import { n as MAX_PLUGIN_APPROVAL_TIMEOUT_MS } from "./plugin-approvals-BVOH9uWd.js";
|
|
6
|
+
import AjvPkg from "ajv";
|
|
7
|
+
import { Type } from "typebox";
|
|
8
|
+
//#region src/agents/internal-event-contract.ts
|
|
9
|
+
const AGENT_INTERNAL_EVENT_TYPE_TASK_COMPLETION = "task_completion";
|
|
10
|
+
const AGENT_INTERNAL_EVENT_SOURCES = [
|
|
11
|
+
"subagent",
|
|
12
|
+
"cron",
|
|
13
|
+
"video_generation",
|
|
14
|
+
"music_generation"
|
|
15
|
+
];
|
|
16
|
+
const AGENT_INTERNAL_EVENT_STATUSES = [
|
|
17
|
+
"ok",
|
|
18
|
+
"timeout",
|
|
19
|
+
"error",
|
|
20
|
+
"unknown"
|
|
21
|
+
];
|
|
22
|
+
function parseSessionLabel(raw) {
|
|
23
|
+
if (typeof raw !== "string") return {
|
|
24
|
+
ok: false,
|
|
25
|
+
error: "invalid label: must be a string"
|
|
26
|
+
};
|
|
27
|
+
const trimmed = raw.trim();
|
|
28
|
+
if (!trimmed) return {
|
|
29
|
+
ok: false,
|
|
30
|
+
error: "invalid label: empty"
|
|
31
|
+
};
|
|
32
|
+
if (trimmed.length > 512) return {
|
|
33
|
+
ok: false,
|
|
34
|
+
error: `invalid label: too long (max 512)`
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
ok: true,
|
|
38
|
+
label: trimmed
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/gateway/protocol/schema/primitives.ts
|
|
43
|
+
const NonEmptyString = Type.String({ minLength: 1 });
|
|
44
|
+
const ChatSendSessionKeyString = Type.String({
|
|
45
|
+
minLength: 1,
|
|
46
|
+
maxLength: 512
|
|
47
|
+
});
|
|
48
|
+
const SessionLabelString = Type.String({
|
|
49
|
+
minLength: 1,
|
|
50
|
+
maxLength: 512
|
|
51
|
+
});
|
|
52
|
+
const InputProvenanceSchema = Type.Object({
|
|
53
|
+
kind: Type.String({ enum: [...INPUT_PROVENANCE_KIND_VALUES] }),
|
|
54
|
+
originSessionId: Type.Optional(Type.String()),
|
|
55
|
+
sourceSessionKey: Type.Optional(Type.String()),
|
|
56
|
+
sourceChannel: Type.Optional(Type.String()),
|
|
57
|
+
sourceTool: Type.Optional(Type.String())
|
|
58
|
+
}, { additionalProperties: false });
|
|
59
|
+
const GatewayClientIdSchema = Type.Enum(GATEWAY_CLIENT_IDS);
|
|
60
|
+
const GatewayClientModeSchema = Type.Enum(GATEWAY_CLIENT_MODES);
|
|
61
|
+
Type.Union([
|
|
62
|
+
Type.Literal("env"),
|
|
63
|
+
Type.Literal("file"),
|
|
64
|
+
Type.Literal("exec")
|
|
65
|
+
]);
|
|
66
|
+
const SecretProviderAliasString = Type.String({ pattern: SECRET_PROVIDER_ALIAS_PATTERN.source });
|
|
67
|
+
const EnvSecretRefSchema = Type.Object({
|
|
68
|
+
source: Type.Literal("env"),
|
|
69
|
+
provider: SecretProviderAliasString,
|
|
70
|
+
id: Type.String({ pattern: ENV_SECRET_REF_ID_RE.source })
|
|
71
|
+
}, { additionalProperties: false });
|
|
72
|
+
const FileSecretRefSchema = Type.Object({
|
|
73
|
+
source: Type.Literal("file"),
|
|
74
|
+
provider: SecretProviderAliasString,
|
|
75
|
+
id: Type.String({ pattern: FILE_SECRET_REF_ID_PATTERN.source })
|
|
76
|
+
}, { additionalProperties: false });
|
|
77
|
+
const ExecSecretRefSchema = Type.Object({
|
|
78
|
+
source: Type.Literal("exec"),
|
|
79
|
+
provider: SecretProviderAliasString,
|
|
80
|
+
id: Type.String({ pattern: EXEC_SECRET_REF_ID_JSON_SCHEMA_PATTERN })
|
|
81
|
+
}, { additionalProperties: false });
|
|
82
|
+
const SecretRefSchema = Type.Union([
|
|
83
|
+
EnvSecretRefSchema,
|
|
84
|
+
FileSecretRefSchema,
|
|
85
|
+
ExecSecretRefSchema
|
|
86
|
+
]);
|
|
87
|
+
const SecretInputSchema = Type.Union([Type.String(), SecretRefSchema]);
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/gateway/protocol/schema/agent.ts
|
|
90
|
+
const AgentInternalEventSchema = Type.Object({
|
|
91
|
+
type: Type.Literal(AGENT_INTERNAL_EVENT_TYPE_TASK_COMPLETION),
|
|
92
|
+
source: Type.String({ enum: [...AGENT_INTERNAL_EVENT_SOURCES] }),
|
|
93
|
+
childSessionKey: Type.String(),
|
|
94
|
+
childSessionId: Type.Optional(Type.String()),
|
|
95
|
+
announceType: Type.String(),
|
|
96
|
+
taskLabel: Type.String(),
|
|
97
|
+
status: Type.String({ enum: [...AGENT_INTERNAL_EVENT_STATUSES] }),
|
|
98
|
+
statusLabel: Type.String(),
|
|
99
|
+
result: Type.String(),
|
|
100
|
+
mediaUrls: Type.Optional(Type.Array(Type.String())),
|
|
101
|
+
statsLine: Type.Optional(Type.String()),
|
|
102
|
+
replyInstruction: Type.String()
|
|
103
|
+
}, { additionalProperties: false });
|
|
104
|
+
Type.Object({
|
|
105
|
+
runId: NonEmptyString,
|
|
106
|
+
seq: Type.Integer({ minimum: 0 }),
|
|
107
|
+
stream: NonEmptyString,
|
|
108
|
+
ts: Type.Integer({ minimum: 0 }),
|
|
109
|
+
data: Type.Record(Type.String(), Type.Unknown())
|
|
110
|
+
}, { additionalProperties: false });
|
|
111
|
+
const MessageActionToolContextSchema = Type.Object({
|
|
112
|
+
currentChannelId: Type.Optional(Type.String()),
|
|
113
|
+
currentGraphChannelId: Type.Optional(Type.String()),
|
|
114
|
+
currentChannelProvider: Type.Optional(Type.String()),
|
|
115
|
+
currentThreadTs: Type.Optional(Type.String()),
|
|
116
|
+
currentMessageId: Type.Optional(Type.Union([Type.String(), Type.Number()])),
|
|
117
|
+
replyToMode: Type.Optional(Type.Union([
|
|
118
|
+
Type.Literal("off"),
|
|
119
|
+
Type.Literal("first"),
|
|
120
|
+
Type.Literal("all"),
|
|
121
|
+
Type.Literal("batched")
|
|
122
|
+
])),
|
|
123
|
+
hasRepliedRef: Type.Optional(Type.Object({ value: Type.Boolean() }, { additionalProperties: false })),
|
|
124
|
+
skipCrossContextDecoration: Type.Optional(Type.Boolean())
|
|
125
|
+
}, { additionalProperties: false });
|
|
126
|
+
const MessageActionParamsSchema = Type.Object({
|
|
127
|
+
channel: NonEmptyString,
|
|
128
|
+
action: NonEmptyString,
|
|
129
|
+
params: Type.Record(Type.String(), Type.Unknown()),
|
|
130
|
+
accountId: Type.Optional(Type.String()),
|
|
131
|
+
requesterSenderId: Type.Optional(Type.String()),
|
|
132
|
+
senderIsOwner: Type.Optional(Type.Boolean()),
|
|
133
|
+
sessionKey: Type.Optional(Type.String()),
|
|
134
|
+
sessionId: Type.Optional(Type.String()),
|
|
135
|
+
agentId: Type.Optional(Type.String()),
|
|
136
|
+
toolContext: Type.Optional(MessageActionToolContextSchema),
|
|
137
|
+
idempotencyKey: NonEmptyString
|
|
138
|
+
}, { additionalProperties: false });
|
|
139
|
+
const SendParamsSchema = Type.Object({
|
|
140
|
+
to: NonEmptyString,
|
|
141
|
+
message: Type.Optional(Type.String()),
|
|
142
|
+
mediaUrl: Type.Optional(Type.String()),
|
|
143
|
+
mediaUrls: Type.Optional(Type.Array(Type.String())),
|
|
144
|
+
gifPlayback: Type.Optional(Type.Boolean()),
|
|
145
|
+
channel: Type.Optional(Type.String()),
|
|
146
|
+
accountId: Type.Optional(Type.String()),
|
|
147
|
+
agentId: Type.Optional(Type.String()),
|
|
148
|
+
replyToId: Type.Optional(Type.String()),
|
|
149
|
+
threadId: Type.Optional(Type.String()),
|
|
150
|
+
sessionKey: Type.Optional(Type.String()),
|
|
151
|
+
idempotencyKey: NonEmptyString
|
|
152
|
+
}, { additionalProperties: false });
|
|
153
|
+
const PollParamsSchema = Type.Object({
|
|
154
|
+
to: NonEmptyString,
|
|
155
|
+
question: NonEmptyString,
|
|
156
|
+
options: Type.Array(NonEmptyString, {
|
|
157
|
+
minItems: 2,
|
|
158
|
+
maxItems: 12
|
|
159
|
+
}),
|
|
160
|
+
maxSelections: Type.Optional(Type.Integer({
|
|
161
|
+
minimum: 1,
|
|
162
|
+
maximum: 12
|
|
163
|
+
})),
|
|
164
|
+
durationSeconds: Type.Optional(Type.Integer({
|
|
165
|
+
minimum: 1,
|
|
166
|
+
maximum: 604800
|
|
167
|
+
})),
|
|
168
|
+
durationHours: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
169
|
+
silent: Type.Optional(Type.Boolean()),
|
|
170
|
+
isAnonymous: Type.Optional(Type.Boolean()),
|
|
171
|
+
threadId: Type.Optional(Type.String()),
|
|
172
|
+
channel: Type.Optional(Type.String()),
|
|
173
|
+
accountId: Type.Optional(Type.String()),
|
|
174
|
+
idempotencyKey: NonEmptyString
|
|
175
|
+
}, { additionalProperties: false });
|
|
176
|
+
const AgentParamsSchema = Type.Object({
|
|
177
|
+
message: NonEmptyString,
|
|
178
|
+
agentId: Type.Optional(NonEmptyString),
|
|
179
|
+
provider: Type.Optional(Type.String()),
|
|
180
|
+
model: Type.Optional(Type.String()),
|
|
181
|
+
to: Type.Optional(Type.String()),
|
|
182
|
+
replyTo: Type.Optional(Type.String()),
|
|
183
|
+
sessionId: Type.Optional(Type.String()),
|
|
184
|
+
sessionKey: Type.Optional(Type.String()),
|
|
185
|
+
thinking: Type.Optional(Type.String()),
|
|
186
|
+
deliver: Type.Optional(Type.Boolean()),
|
|
187
|
+
attachments: Type.Optional(Type.Array(Type.Unknown())),
|
|
188
|
+
channel: Type.Optional(Type.String()),
|
|
189
|
+
replyChannel: Type.Optional(Type.String()),
|
|
190
|
+
accountId: Type.Optional(Type.String()),
|
|
191
|
+
replyAccountId: Type.Optional(Type.String()),
|
|
192
|
+
threadId: Type.Optional(Type.String()),
|
|
193
|
+
groupId: Type.Optional(Type.String()),
|
|
194
|
+
groupChannel: Type.Optional(Type.String()),
|
|
195
|
+
groupSpace: Type.Optional(Type.String()),
|
|
196
|
+
timeout: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
197
|
+
bestEffortDeliver: Type.Optional(Type.Boolean()),
|
|
198
|
+
lane: Type.Optional(Type.String()),
|
|
199
|
+
cleanupBundleMcpOnRunEnd: Type.Optional(Type.Boolean()),
|
|
200
|
+
extraSystemPrompt: Type.Optional(Type.String()),
|
|
201
|
+
bootstrapContextMode: Type.Optional(Type.Union([Type.Literal("full"), Type.Literal("lightweight")])),
|
|
202
|
+
bootstrapContextRunKind: Type.Optional(Type.Union([
|
|
203
|
+
Type.Literal("default"),
|
|
204
|
+
Type.Literal("heartbeat"),
|
|
205
|
+
Type.Literal("cron")
|
|
206
|
+
])),
|
|
207
|
+
internalEvents: Type.Optional(Type.Array(AgentInternalEventSchema)),
|
|
208
|
+
inputProvenance: Type.Optional(InputProvenanceSchema),
|
|
209
|
+
idempotencyKey: NonEmptyString,
|
|
210
|
+
label: Type.Optional(SessionLabelString)
|
|
211
|
+
}, { additionalProperties: false });
|
|
212
|
+
const AgentIdentityParamsSchema = Type.Object({
|
|
213
|
+
agentId: Type.Optional(NonEmptyString),
|
|
214
|
+
sessionKey: Type.Optional(Type.String())
|
|
215
|
+
}, { additionalProperties: false });
|
|
216
|
+
Type.Object({
|
|
217
|
+
agentId: NonEmptyString,
|
|
218
|
+
name: Type.Optional(NonEmptyString),
|
|
219
|
+
avatar: Type.Optional(NonEmptyString),
|
|
220
|
+
emoji: Type.Optional(NonEmptyString)
|
|
221
|
+
}, { additionalProperties: false });
|
|
222
|
+
const AgentWaitParamsSchema = Type.Object({
|
|
223
|
+
runId: NonEmptyString,
|
|
224
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
225
|
+
}, { additionalProperties: false });
|
|
226
|
+
const WakeParamsSchema = Type.Object({
|
|
227
|
+
mode: Type.Union([Type.Literal("now"), Type.Literal("next-heartbeat")]),
|
|
228
|
+
text: NonEmptyString
|
|
229
|
+
}, { additionalProperties: true });
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/gateway/protocol/schema/agents-models-skills.ts
|
|
232
|
+
const ModelChoiceSchema = Type.Object({
|
|
233
|
+
id: NonEmptyString,
|
|
234
|
+
name: NonEmptyString,
|
|
235
|
+
provider: NonEmptyString,
|
|
236
|
+
alias: Type.Optional(NonEmptyString),
|
|
237
|
+
contextWindow: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
238
|
+
reasoning: Type.Optional(Type.Boolean())
|
|
239
|
+
}, { additionalProperties: false });
|
|
240
|
+
const AgentSummarySchema = Type.Object({
|
|
241
|
+
id: NonEmptyString,
|
|
242
|
+
name: Type.Optional(NonEmptyString),
|
|
243
|
+
identity: Type.Optional(Type.Object({
|
|
244
|
+
name: Type.Optional(NonEmptyString),
|
|
245
|
+
theme: Type.Optional(NonEmptyString),
|
|
246
|
+
emoji: Type.Optional(NonEmptyString),
|
|
247
|
+
avatar: Type.Optional(NonEmptyString),
|
|
248
|
+
avatarUrl: Type.Optional(NonEmptyString)
|
|
249
|
+
}, { additionalProperties: false })),
|
|
250
|
+
workspace: Type.Optional(NonEmptyString),
|
|
251
|
+
model: Type.Optional(Type.Object({
|
|
252
|
+
primary: Type.Optional(NonEmptyString),
|
|
253
|
+
fallbacks: Type.Optional(Type.Array(NonEmptyString))
|
|
254
|
+
}, { additionalProperties: false }))
|
|
255
|
+
}, { additionalProperties: false });
|
|
256
|
+
const AgentsListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
257
|
+
Type.Object({
|
|
258
|
+
defaultId: NonEmptyString,
|
|
259
|
+
mainKey: NonEmptyString,
|
|
260
|
+
scope: Type.Union([Type.Literal("per-sender"), Type.Literal("global")]),
|
|
261
|
+
agents: Type.Array(AgentSummarySchema)
|
|
262
|
+
}, { additionalProperties: false });
|
|
263
|
+
const AgentsCreateParamsSchema = Type.Object({
|
|
264
|
+
name: NonEmptyString,
|
|
265
|
+
workspace: NonEmptyString,
|
|
266
|
+
model: Type.Optional(NonEmptyString),
|
|
267
|
+
emoji: Type.Optional(Type.String()),
|
|
268
|
+
avatar: Type.Optional(Type.String())
|
|
269
|
+
}, { additionalProperties: false });
|
|
270
|
+
Type.Object({
|
|
271
|
+
ok: Type.Literal(true),
|
|
272
|
+
agentId: NonEmptyString,
|
|
273
|
+
name: NonEmptyString,
|
|
274
|
+
workspace: NonEmptyString,
|
|
275
|
+
model: Type.Optional(NonEmptyString)
|
|
276
|
+
}, { additionalProperties: false });
|
|
277
|
+
const AgentsUpdateParamsSchema = Type.Object({
|
|
278
|
+
agentId: NonEmptyString,
|
|
279
|
+
name: Type.Optional(NonEmptyString),
|
|
280
|
+
workspace: Type.Optional(NonEmptyString),
|
|
281
|
+
model: Type.Optional(NonEmptyString),
|
|
282
|
+
emoji: Type.Optional(Type.String()),
|
|
283
|
+
avatar: Type.Optional(Type.String())
|
|
284
|
+
}, { additionalProperties: false });
|
|
285
|
+
Type.Object({
|
|
286
|
+
ok: Type.Literal(true),
|
|
287
|
+
agentId: NonEmptyString
|
|
288
|
+
}, { additionalProperties: false });
|
|
289
|
+
const AgentsDeleteParamsSchema = Type.Object({
|
|
290
|
+
agentId: NonEmptyString,
|
|
291
|
+
deleteFiles: Type.Optional(Type.Boolean())
|
|
292
|
+
}, { additionalProperties: false });
|
|
293
|
+
Type.Object({
|
|
294
|
+
ok: Type.Literal(true),
|
|
295
|
+
agentId: NonEmptyString,
|
|
296
|
+
removedBindings: Type.Integer({ minimum: 0 })
|
|
297
|
+
}, { additionalProperties: false });
|
|
298
|
+
const AgentsFileEntrySchema = Type.Object({
|
|
299
|
+
name: NonEmptyString,
|
|
300
|
+
path: NonEmptyString,
|
|
301
|
+
missing: Type.Boolean(),
|
|
302
|
+
size: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
303
|
+
updatedAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
304
|
+
content: Type.Optional(Type.String())
|
|
305
|
+
}, { additionalProperties: false });
|
|
306
|
+
const AgentsFilesListParamsSchema = Type.Object({ agentId: NonEmptyString }, { additionalProperties: false });
|
|
307
|
+
Type.Object({
|
|
308
|
+
agentId: NonEmptyString,
|
|
309
|
+
workspace: NonEmptyString,
|
|
310
|
+
files: Type.Array(AgentsFileEntrySchema)
|
|
311
|
+
}, { additionalProperties: false });
|
|
312
|
+
const AgentsFilesGetParamsSchema = Type.Object({
|
|
313
|
+
agentId: NonEmptyString,
|
|
314
|
+
name: NonEmptyString
|
|
315
|
+
}, { additionalProperties: false });
|
|
316
|
+
Type.Object({
|
|
317
|
+
agentId: NonEmptyString,
|
|
318
|
+
workspace: NonEmptyString,
|
|
319
|
+
file: AgentsFileEntrySchema
|
|
320
|
+
}, { additionalProperties: false });
|
|
321
|
+
const AgentsFilesSetParamsSchema = Type.Object({
|
|
322
|
+
agentId: NonEmptyString,
|
|
323
|
+
name: NonEmptyString,
|
|
324
|
+
content: Type.String()
|
|
325
|
+
}, { additionalProperties: false });
|
|
326
|
+
Type.Object({
|
|
327
|
+
ok: Type.Literal(true),
|
|
328
|
+
agentId: NonEmptyString,
|
|
329
|
+
workspace: NonEmptyString,
|
|
330
|
+
file: AgentsFileEntrySchema
|
|
331
|
+
}, { additionalProperties: false });
|
|
332
|
+
const ModelsListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
333
|
+
Type.Object({ models: Type.Array(ModelChoiceSchema) }, { additionalProperties: false });
|
|
334
|
+
const SkillsStatusParamsSchema = Type.Object({ agentId: Type.Optional(NonEmptyString) }, { additionalProperties: false });
|
|
335
|
+
const SkillsBinsParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
336
|
+
Type.Object({ bins: Type.Array(NonEmptyString) }, { additionalProperties: false });
|
|
337
|
+
const SkillsInstallParamsSchema = Type.Union([Type.Object({
|
|
338
|
+
name: NonEmptyString,
|
|
339
|
+
installId: NonEmptyString,
|
|
340
|
+
dangerouslyForceUnsafeInstall: Type.Optional(Type.Boolean()),
|
|
341
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 1e3 }))
|
|
342
|
+
}, { additionalProperties: false }), Type.Object({
|
|
343
|
+
source: Type.Literal("clawhub"),
|
|
344
|
+
slug: NonEmptyString,
|
|
345
|
+
version: Type.Optional(NonEmptyString),
|
|
346
|
+
force: Type.Optional(Type.Boolean()),
|
|
347
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 1e3 }))
|
|
348
|
+
}, { additionalProperties: false })]);
|
|
349
|
+
const SkillsUpdateParamsSchema = Type.Union([Type.Object({
|
|
350
|
+
skillKey: NonEmptyString,
|
|
351
|
+
enabled: Type.Optional(Type.Boolean()),
|
|
352
|
+
apiKey: Type.Optional(Type.String()),
|
|
353
|
+
env: Type.Optional(Type.Record(NonEmptyString, Type.String()))
|
|
354
|
+
}, { additionalProperties: false }), Type.Object({
|
|
355
|
+
source: Type.Literal("clawhub"),
|
|
356
|
+
slug: Type.Optional(NonEmptyString),
|
|
357
|
+
all: Type.Optional(Type.Boolean())
|
|
358
|
+
}, { additionalProperties: false })]);
|
|
359
|
+
const SkillsSearchParamsSchema = Type.Object({
|
|
360
|
+
query: Type.Optional(NonEmptyString),
|
|
361
|
+
limit: Type.Optional(Type.Integer({
|
|
362
|
+
minimum: 1,
|
|
363
|
+
maximum: 100
|
|
364
|
+
}))
|
|
365
|
+
}, { additionalProperties: false });
|
|
366
|
+
Type.Object({ results: Type.Array(Type.Object({
|
|
367
|
+
score: Type.Number(),
|
|
368
|
+
slug: NonEmptyString,
|
|
369
|
+
displayName: NonEmptyString,
|
|
370
|
+
summary: Type.Optional(Type.String()),
|
|
371
|
+
version: Type.Optional(NonEmptyString),
|
|
372
|
+
updatedAt: Type.Optional(Type.Integer())
|
|
373
|
+
}, { additionalProperties: false })) }, { additionalProperties: false });
|
|
374
|
+
const SkillsDetailParamsSchema = Type.Object({ slug: NonEmptyString }, { additionalProperties: false });
|
|
375
|
+
Type.Object({
|
|
376
|
+
skill: Type.Union([Type.Object({
|
|
377
|
+
slug: NonEmptyString,
|
|
378
|
+
displayName: NonEmptyString,
|
|
379
|
+
summary: Type.Optional(Type.String()),
|
|
380
|
+
tags: Type.Optional(Type.Record(NonEmptyString, Type.String())),
|
|
381
|
+
createdAt: Type.Integer(),
|
|
382
|
+
updatedAt: Type.Integer()
|
|
383
|
+
}, { additionalProperties: false }), Type.Null()]),
|
|
384
|
+
latestVersion: Type.Optional(Type.Union([Type.Object({
|
|
385
|
+
version: NonEmptyString,
|
|
386
|
+
createdAt: Type.Integer(),
|
|
387
|
+
changelog: Type.Optional(Type.String())
|
|
388
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
389
|
+
metadata: Type.Optional(Type.Union([Type.Object({
|
|
390
|
+
os: Type.Optional(Type.Union([Type.Array(Type.String()), Type.Null()])),
|
|
391
|
+
systems: Type.Optional(Type.Union([Type.Array(Type.String()), Type.Null()]))
|
|
392
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
393
|
+
owner: Type.Optional(Type.Union([Type.Object({
|
|
394
|
+
handle: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
395
|
+
displayName: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
396
|
+
image: Type.Optional(Type.Union([Type.String(), Type.Null()]))
|
|
397
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
398
|
+
}, { additionalProperties: false });
|
|
399
|
+
const ToolsCatalogParamsSchema = Type.Object({
|
|
400
|
+
agentId: Type.Optional(NonEmptyString),
|
|
401
|
+
includePlugins: Type.Optional(Type.Boolean())
|
|
402
|
+
}, { additionalProperties: false });
|
|
403
|
+
const ToolsEffectiveParamsSchema = Type.Object({
|
|
404
|
+
agentId: Type.Optional(NonEmptyString),
|
|
405
|
+
sessionKey: NonEmptyString
|
|
406
|
+
}, { additionalProperties: false });
|
|
407
|
+
const ToolCatalogProfileSchema = Type.Object({
|
|
408
|
+
id: Type.Union([
|
|
409
|
+
Type.Literal("minimal"),
|
|
410
|
+
Type.Literal("coding"),
|
|
411
|
+
Type.Literal("messaging"),
|
|
412
|
+
Type.Literal("full")
|
|
413
|
+
]),
|
|
414
|
+
label: NonEmptyString
|
|
415
|
+
}, { additionalProperties: false });
|
|
416
|
+
const ToolCatalogEntrySchema = Type.Object({
|
|
417
|
+
id: NonEmptyString,
|
|
418
|
+
label: NonEmptyString,
|
|
419
|
+
description: Type.String(),
|
|
420
|
+
source: Type.Union([Type.Literal("core"), Type.Literal("plugin")]),
|
|
421
|
+
pluginId: Type.Optional(NonEmptyString),
|
|
422
|
+
optional: Type.Optional(Type.Boolean()),
|
|
423
|
+
defaultProfiles: Type.Array(Type.Union([
|
|
424
|
+
Type.Literal("minimal"),
|
|
425
|
+
Type.Literal("coding"),
|
|
426
|
+
Type.Literal("messaging"),
|
|
427
|
+
Type.Literal("full")
|
|
428
|
+
]))
|
|
429
|
+
}, { additionalProperties: false });
|
|
430
|
+
const ToolCatalogGroupSchema = Type.Object({
|
|
431
|
+
id: NonEmptyString,
|
|
432
|
+
label: NonEmptyString,
|
|
433
|
+
source: Type.Union([Type.Literal("core"), Type.Literal("plugin")]),
|
|
434
|
+
pluginId: Type.Optional(NonEmptyString),
|
|
435
|
+
tools: Type.Array(ToolCatalogEntrySchema)
|
|
436
|
+
}, { additionalProperties: false });
|
|
437
|
+
Type.Object({
|
|
438
|
+
agentId: NonEmptyString,
|
|
439
|
+
profiles: Type.Array(ToolCatalogProfileSchema),
|
|
440
|
+
groups: Type.Array(ToolCatalogGroupSchema)
|
|
441
|
+
}, { additionalProperties: false });
|
|
442
|
+
const ToolsEffectiveEntrySchema = Type.Object({
|
|
443
|
+
id: NonEmptyString,
|
|
444
|
+
label: NonEmptyString,
|
|
445
|
+
description: Type.String(),
|
|
446
|
+
rawDescription: Type.String(),
|
|
447
|
+
source: Type.Union([
|
|
448
|
+
Type.Literal("core"),
|
|
449
|
+
Type.Literal("plugin"),
|
|
450
|
+
Type.Literal("channel")
|
|
451
|
+
]),
|
|
452
|
+
pluginId: Type.Optional(NonEmptyString),
|
|
453
|
+
channelId: Type.Optional(NonEmptyString)
|
|
454
|
+
}, { additionalProperties: false });
|
|
455
|
+
const ToolsEffectiveGroupSchema = Type.Object({
|
|
456
|
+
id: Type.Union([
|
|
457
|
+
Type.Literal("core"),
|
|
458
|
+
Type.Literal("plugin"),
|
|
459
|
+
Type.Literal("channel")
|
|
460
|
+
]),
|
|
461
|
+
label: NonEmptyString,
|
|
462
|
+
source: Type.Union([
|
|
463
|
+
Type.Literal("core"),
|
|
464
|
+
Type.Literal("plugin"),
|
|
465
|
+
Type.Literal("channel")
|
|
466
|
+
]),
|
|
467
|
+
tools: Type.Array(ToolsEffectiveEntrySchema)
|
|
468
|
+
}, { additionalProperties: false });
|
|
469
|
+
Type.Object({
|
|
470
|
+
agentId: NonEmptyString,
|
|
471
|
+
profile: NonEmptyString,
|
|
472
|
+
groups: Type.Array(ToolsEffectiveGroupSchema)
|
|
473
|
+
}, { additionalProperties: false });
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/gateway/protocol/schema/canvas.ts
|
|
476
|
+
const CanvasDocumentKindSchema = Type.String({ enum: [
|
|
477
|
+
"html_bundle",
|
|
478
|
+
"url_embed",
|
|
479
|
+
"document",
|
|
480
|
+
"image",
|
|
481
|
+
"video_asset",
|
|
482
|
+
"presentation_asset",
|
|
483
|
+
"model_3d",
|
|
484
|
+
"vector_image"
|
|
485
|
+
] });
|
|
486
|
+
const CanvasDocumentSurfaceSchema = Type.String({ enum: [
|
|
487
|
+
"assistant_message",
|
|
488
|
+
"tool_card",
|
|
489
|
+
"sidebar"
|
|
490
|
+
] });
|
|
491
|
+
const CanvasDocumentAssetSchema = Type.Object({
|
|
492
|
+
logicalPath: NonEmptyString,
|
|
493
|
+
sourcePath: NonEmptyString,
|
|
494
|
+
contentType: Type.Optional(NonEmptyString),
|
|
495
|
+
role: Type.Optional(Type.String({ enum: [
|
|
496
|
+
"source",
|
|
497
|
+
"sidecar",
|
|
498
|
+
"texture"
|
|
499
|
+
] }))
|
|
500
|
+
}, { additionalProperties: false });
|
|
501
|
+
const CanvasDocumentMutationProperties = {
|
|
502
|
+
kind: Type.Optional(CanvasDocumentKindSchema),
|
|
503
|
+
title: Type.Optional(NonEmptyString),
|
|
504
|
+
preferredHeight: Type.Optional(Type.Number()),
|
|
505
|
+
surface: Type.Optional(CanvasDocumentSurfaceSchema),
|
|
506
|
+
html: Type.Optional(Type.String({ minLength: 1 })),
|
|
507
|
+
path: Type.Optional(NonEmptyString),
|
|
508
|
+
url: Type.Optional(NonEmptyString),
|
|
509
|
+
workspaceDir: Type.Optional(NonEmptyString),
|
|
510
|
+
assets: Type.Optional(Type.Array(CanvasDocumentAssetSchema)),
|
|
511
|
+
sourceMime: Type.Optional(NonEmptyString),
|
|
512
|
+
sourceFileName: Type.Optional(NonEmptyString),
|
|
513
|
+
viewerOptions: Type.Optional(Type.Record(Type.String(), Type.Unknown()))
|
|
514
|
+
};
|
|
515
|
+
const CanvasDocumentCreateParamsSchema = Type.Object({
|
|
516
|
+
id: Type.Optional(NonEmptyString),
|
|
517
|
+
...CanvasDocumentMutationProperties
|
|
518
|
+
}, { additionalProperties: false });
|
|
519
|
+
const CanvasDocumentUpdateParamsSchema = Type.Object({
|
|
520
|
+
id: NonEmptyString,
|
|
521
|
+
...CanvasDocumentMutationProperties
|
|
522
|
+
}, { additionalProperties: false });
|
|
523
|
+
const CanvasDocumentManifestAssetSchema = Type.Object({
|
|
524
|
+
logicalPath: NonEmptyString,
|
|
525
|
+
contentType: Type.Optional(NonEmptyString),
|
|
526
|
+
sourceFileName: Type.Optional(NonEmptyString),
|
|
527
|
+
sizeBytes: Type.Optional(Type.Number()),
|
|
528
|
+
role: Type.Optional(Type.String({ enum: [
|
|
529
|
+
"source",
|
|
530
|
+
"sidecar",
|
|
531
|
+
"texture"
|
|
532
|
+
] }))
|
|
533
|
+
}, { additionalProperties: false });
|
|
534
|
+
const CanvasDocumentManifestSchema = Type.Object({
|
|
535
|
+
id: NonEmptyString,
|
|
536
|
+
kind: CanvasDocumentKindSchema,
|
|
537
|
+
title: Type.Optional(NonEmptyString),
|
|
538
|
+
preferredHeight: Type.Optional(Type.Number()),
|
|
539
|
+
createdAt: NonEmptyString,
|
|
540
|
+
updatedAt: Type.Optional(NonEmptyString),
|
|
541
|
+
revision: Type.Number(),
|
|
542
|
+
entryUrl: NonEmptyString,
|
|
543
|
+
localEntrypoint: Type.Optional(NonEmptyString),
|
|
544
|
+
externalUrl: Type.Optional(NonEmptyString),
|
|
545
|
+
sourceMime: Type.Optional(NonEmptyString),
|
|
546
|
+
sourceFileName: Type.Optional(NonEmptyString),
|
|
547
|
+
viewer: Type.Optional(Type.String({ enum: [
|
|
548
|
+
"html",
|
|
549
|
+
"url",
|
|
550
|
+
"pdf",
|
|
551
|
+
"image",
|
|
552
|
+
"video",
|
|
553
|
+
"pptx",
|
|
554
|
+
"ppt_fallback",
|
|
555
|
+
"threejs",
|
|
556
|
+
"svg",
|
|
557
|
+
"download"
|
|
558
|
+
] })),
|
|
559
|
+
viewerOptions: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
560
|
+
surface: Type.Optional(CanvasDocumentSurfaceSchema),
|
|
561
|
+
assets: Type.Array(CanvasDocumentManifestAssetSchema)
|
|
562
|
+
}, { additionalProperties: false });
|
|
563
|
+
const CanvasDocumentCreateResultSchema = CanvasDocumentManifestSchema;
|
|
564
|
+
const CanvasDocumentListParamsSchema = Type.Object({ limit: Type.Optional(Type.Integer({
|
|
565
|
+
minimum: 1,
|
|
566
|
+
maximum: 100
|
|
567
|
+
})) }, { additionalProperties: false });
|
|
568
|
+
const CanvasDocumentListResultSchema = Type.Object({ documents: Type.Array(CanvasDocumentManifestSchema) }, { additionalProperties: false });
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/gateway/protocol/schema/channels.ts
|
|
571
|
+
const TalkModeParamsSchema = Type.Object({
|
|
572
|
+
enabled: Type.Boolean(),
|
|
573
|
+
phase: Type.Optional(Type.String())
|
|
574
|
+
}, { additionalProperties: false });
|
|
575
|
+
const TalkConfigParamsSchema = Type.Object({ includeSecrets: Type.Optional(Type.Boolean()) }, { additionalProperties: false });
|
|
576
|
+
const TalkSpeakParamsSchema = Type.Object({
|
|
577
|
+
text: NonEmptyString,
|
|
578
|
+
voiceId: Type.Optional(Type.String()),
|
|
579
|
+
modelId: Type.Optional(Type.String()),
|
|
580
|
+
outputFormat: Type.Optional(Type.String()),
|
|
581
|
+
speed: Type.Optional(Type.Number()),
|
|
582
|
+
rateWpm: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
583
|
+
stability: Type.Optional(Type.Number()),
|
|
584
|
+
similarity: Type.Optional(Type.Number()),
|
|
585
|
+
style: Type.Optional(Type.Number()),
|
|
586
|
+
speakerBoost: Type.Optional(Type.Boolean()),
|
|
587
|
+
seed: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
588
|
+
normalize: Type.Optional(Type.String()),
|
|
589
|
+
language: Type.Optional(Type.String()),
|
|
590
|
+
latencyTier: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
591
|
+
}, { additionalProperties: false });
|
|
592
|
+
const TalkRealtimeSessionParamsSchema = Type.Object({
|
|
593
|
+
sessionKey: Type.Optional(Type.String()),
|
|
594
|
+
provider: Type.Optional(Type.String()),
|
|
595
|
+
model: Type.Optional(Type.String()),
|
|
596
|
+
voice: Type.Optional(Type.String())
|
|
597
|
+
}, { additionalProperties: false });
|
|
598
|
+
const TalkRealtimeSessionResultSchema = Type.Object({
|
|
599
|
+
provider: NonEmptyString,
|
|
600
|
+
clientSecret: NonEmptyString,
|
|
601
|
+
model: Type.Optional(Type.String()),
|
|
602
|
+
voice: Type.Optional(Type.String()),
|
|
603
|
+
expiresAt: Type.Optional(Type.Number())
|
|
604
|
+
}, { additionalProperties: false });
|
|
605
|
+
const talkProviderFieldSchemas = { apiKey: Type.Optional(SecretInputSchema) };
|
|
606
|
+
const TalkProviderConfigSchema = Type.Object(talkProviderFieldSchemas, { additionalProperties: true });
|
|
607
|
+
const ResolvedTalkConfigSchema = Type.Object({
|
|
608
|
+
provider: Type.String(),
|
|
609
|
+
config: TalkProviderConfigSchema
|
|
610
|
+
}, { additionalProperties: false });
|
|
611
|
+
const TalkConfigSchema = Type.Object({
|
|
612
|
+
provider: Type.Optional(Type.String()),
|
|
613
|
+
providers: Type.Optional(Type.Record(Type.String(), TalkProviderConfigSchema)),
|
|
614
|
+
resolved: ResolvedTalkConfigSchema,
|
|
615
|
+
interruptOnSpeech: Type.Optional(Type.Boolean()),
|
|
616
|
+
silenceTimeoutMs: Type.Optional(Type.Integer({ minimum: 1 }))
|
|
617
|
+
}, { additionalProperties: false });
|
|
618
|
+
const TalkConfigResultSchema = Type.Object({ config: Type.Object({
|
|
619
|
+
talk: Type.Optional(TalkConfigSchema),
|
|
620
|
+
session: Type.Optional(Type.Object({ mainKey: Type.Optional(Type.String()) }, { additionalProperties: false })),
|
|
621
|
+
ui: Type.Optional(Type.Object({ seamColor: Type.Optional(Type.String()) }, { additionalProperties: false }))
|
|
622
|
+
}, { additionalProperties: false }) }, { additionalProperties: false });
|
|
623
|
+
const TalkSpeakResultSchema = Type.Object({
|
|
624
|
+
audioBase64: NonEmptyString,
|
|
625
|
+
provider: NonEmptyString,
|
|
626
|
+
outputFormat: Type.Optional(Type.String()),
|
|
627
|
+
voiceCompatible: Type.Optional(Type.Boolean()),
|
|
628
|
+
mimeType: Type.Optional(Type.String()),
|
|
629
|
+
fileExtension: Type.Optional(Type.String())
|
|
630
|
+
}, { additionalProperties: false });
|
|
631
|
+
const ChannelsStatusParamsSchema = Type.Object({
|
|
632
|
+
probe: Type.Optional(Type.Boolean()),
|
|
633
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
634
|
+
}, { additionalProperties: false });
|
|
635
|
+
const ChannelAccountSnapshotSchema = Type.Object({
|
|
636
|
+
accountId: NonEmptyString,
|
|
637
|
+
name: Type.Optional(Type.String()),
|
|
638
|
+
enabled: Type.Optional(Type.Boolean()),
|
|
639
|
+
configured: Type.Optional(Type.Boolean()),
|
|
640
|
+
linked: Type.Optional(Type.Boolean()),
|
|
641
|
+
running: Type.Optional(Type.Boolean()),
|
|
642
|
+
connected: Type.Optional(Type.Boolean()),
|
|
643
|
+
reconnectAttempts: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
644
|
+
lastConnectedAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
645
|
+
lastError: Type.Optional(Type.String()),
|
|
646
|
+
healthState: Type.Optional(Type.String()),
|
|
647
|
+
lastStartAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
648
|
+
lastStopAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
649
|
+
lastInboundAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
650
|
+
lastOutboundAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
651
|
+
lastTransportActivityAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
652
|
+
busy: Type.Optional(Type.Boolean()),
|
|
653
|
+
activeRuns: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
654
|
+
lastRunActivityAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
655
|
+
lastProbeAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
656
|
+
mode: Type.Optional(Type.String()),
|
|
657
|
+
dmPolicy: Type.Optional(Type.String()),
|
|
658
|
+
allowFrom: Type.Optional(Type.Array(Type.String())),
|
|
659
|
+
tokenSource: Type.Optional(Type.String()),
|
|
660
|
+
botTokenSource: Type.Optional(Type.String()),
|
|
661
|
+
appTokenSource: Type.Optional(Type.String()),
|
|
662
|
+
baseUrl: Type.Optional(Type.String()),
|
|
663
|
+
allowUnmentionedGroups: Type.Optional(Type.Boolean()),
|
|
664
|
+
cliPath: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
665
|
+
dbPath: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
666
|
+
port: Type.Optional(Type.Union([Type.Integer({ minimum: 0 }), Type.Null()])),
|
|
667
|
+
probe: Type.Optional(Type.Unknown()),
|
|
668
|
+
audit: Type.Optional(Type.Unknown()),
|
|
669
|
+
application: Type.Optional(Type.Unknown())
|
|
670
|
+
}, { additionalProperties: true });
|
|
671
|
+
const ChannelUiMetaSchema = Type.Object({
|
|
672
|
+
id: NonEmptyString,
|
|
673
|
+
label: NonEmptyString,
|
|
674
|
+
detailLabel: NonEmptyString,
|
|
675
|
+
systemImage: Type.Optional(Type.String())
|
|
676
|
+
}, { additionalProperties: false });
|
|
677
|
+
Type.Object({
|
|
678
|
+
ts: Type.Integer({ minimum: 0 }),
|
|
679
|
+
channelOrder: Type.Array(NonEmptyString),
|
|
680
|
+
channelLabels: Type.Record(NonEmptyString, NonEmptyString),
|
|
681
|
+
channelDetailLabels: Type.Optional(Type.Record(NonEmptyString, NonEmptyString)),
|
|
682
|
+
channelSystemImages: Type.Optional(Type.Record(NonEmptyString, NonEmptyString)),
|
|
683
|
+
channelMeta: Type.Optional(Type.Array(ChannelUiMetaSchema)),
|
|
684
|
+
channels: Type.Record(NonEmptyString, Type.Unknown()),
|
|
685
|
+
channelAccounts: Type.Record(NonEmptyString, Type.Array(ChannelAccountSnapshotSchema)),
|
|
686
|
+
channelDefaultAccountId: Type.Record(NonEmptyString, NonEmptyString)
|
|
687
|
+
}, { additionalProperties: false });
|
|
688
|
+
const ChannelsLogoutParamsSchema = Type.Object({
|
|
689
|
+
channel: NonEmptyString,
|
|
690
|
+
accountId: Type.Optional(Type.String())
|
|
691
|
+
}, { additionalProperties: false });
|
|
692
|
+
const ChannelsStartParamsSchema = Type.Object({
|
|
693
|
+
channel: NonEmptyString,
|
|
694
|
+
accountId: Type.Optional(Type.String())
|
|
695
|
+
}, { additionalProperties: false });
|
|
696
|
+
const WebLoginStartParamsSchema = Type.Object({
|
|
697
|
+
force: Type.Optional(Type.Boolean()),
|
|
698
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
699
|
+
verbose: Type.Optional(Type.Boolean()),
|
|
700
|
+
accountId: Type.Optional(Type.String())
|
|
701
|
+
}, { additionalProperties: false });
|
|
702
|
+
const QrDataUrlSchema = Type.String({
|
|
703
|
+
maxLength: 16384,
|
|
704
|
+
pattern: "^data:image/png;base64,"
|
|
705
|
+
});
|
|
706
|
+
const WebLoginWaitParamsSchema = Type.Object({
|
|
707
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
708
|
+
accountId: Type.Optional(Type.String()),
|
|
709
|
+
currentQrDataUrl: Type.Optional(QrDataUrlSchema)
|
|
710
|
+
}, { additionalProperties: false });
|
|
711
|
+
const COMMAND_DESCRIPTION_MAX_LENGTH = 2e3;
|
|
712
|
+
const BoundedNonEmptyString = (maxLength) => Type.String({
|
|
713
|
+
minLength: 1,
|
|
714
|
+
maxLength
|
|
715
|
+
});
|
|
716
|
+
const CommandSourceSchema = Type.Union([
|
|
717
|
+
Type.Literal("native"),
|
|
718
|
+
Type.Literal("skill"),
|
|
719
|
+
Type.Literal("plugin")
|
|
720
|
+
]);
|
|
721
|
+
const CommandScopeSchema = Type.Union([
|
|
722
|
+
Type.Literal("text"),
|
|
723
|
+
Type.Literal("native"),
|
|
724
|
+
Type.Literal("both")
|
|
725
|
+
]);
|
|
726
|
+
const CommandCategorySchema = Type.Union([
|
|
727
|
+
Type.Literal("session"),
|
|
728
|
+
Type.Literal("options"),
|
|
729
|
+
Type.Literal("status"),
|
|
730
|
+
Type.Literal("management"),
|
|
731
|
+
Type.Literal("media"),
|
|
732
|
+
Type.Literal("tools"),
|
|
733
|
+
Type.Literal("docks")
|
|
734
|
+
]);
|
|
735
|
+
const CommandArgChoiceSchema = Type.Object({
|
|
736
|
+
value: Type.String({ maxLength: 200 }),
|
|
737
|
+
label: Type.String({ maxLength: 200 })
|
|
738
|
+
}, { additionalProperties: false });
|
|
739
|
+
const CommandArgSchema = Type.Object({
|
|
740
|
+
name: BoundedNonEmptyString(200),
|
|
741
|
+
description: Type.String({ maxLength: 500 }),
|
|
742
|
+
type: Type.Union([
|
|
743
|
+
Type.Literal("string"),
|
|
744
|
+
Type.Literal("number"),
|
|
745
|
+
Type.Literal("boolean")
|
|
746
|
+
]),
|
|
747
|
+
required: Type.Optional(Type.Boolean()),
|
|
748
|
+
choices: Type.Optional(Type.Array(CommandArgChoiceSchema, { maxItems: 50 })),
|
|
749
|
+
dynamic: Type.Optional(Type.Boolean())
|
|
750
|
+
}, { additionalProperties: false });
|
|
751
|
+
const CommandEntrySchema = Type.Object({
|
|
752
|
+
name: BoundedNonEmptyString(200),
|
|
753
|
+
nativeName: Type.Optional(BoundedNonEmptyString(200)),
|
|
754
|
+
textAliases: Type.Optional(Type.Array(BoundedNonEmptyString(200), { maxItems: 20 })),
|
|
755
|
+
description: Type.String({ maxLength: COMMAND_DESCRIPTION_MAX_LENGTH }),
|
|
756
|
+
category: Type.Optional(CommandCategorySchema),
|
|
757
|
+
source: CommandSourceSchema,
|
|
758
|
+
scope: CommandScopeSchema,
|
|
759
|
+
acceptsArgs: Type.Boolean(),
|
|
760
|
+
args: Type.Optional(Type.Array(CommandArgSchema, { maxItems: 20 }))
|
|
761
|
+
}, { additionalProperties: false });
|
|
762
|
+
const CommandsListParamsSchema = Type.Object({
|
|
763
|
+
agentId: Type.Optional(NonEmptyString),
|
|
764
|
+
provider: Type.Optional(NonEmptyString),
|
|
765
|
+
scope: Type.Optional(CommandScopeSchema),
|
|
766
|
+
includeArgs: Type.Optional(Type.Boolean())
|
|
767
|
+
}, { additionalProperties: false });
|
|
768
|
+
Type.Object({ commands: Type.Array(CommandEntrySchema, { maxItems: 500 }) }, { additionalProperties: false });
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region src/gateway/protocol/schema/config.ts
|
|
771
|
+
const ConfigSchemaLookupPathString = Type.String({
|
|
772
|
+
minLength: 1,
|
|
773
|
+
maxLength: 1024,
|
|
774
|
+
pattern: "^[A-Za-z0-9_./\\[\\]\\-*]+$"
|
|
775
|
+
});
|
|
776
|
+
const ConfigDeliveryContextSchema = Type.Object({
|
|
777
|
+
channel: Type.Optional(Type.String()),
|
|
778
|
+
to: Type.Optional(Type.String()),
|
|
779
|
+
accountId: Type.Optional(Type.String()),
|
|
780
|
+
threadId: Type.Optional(Type.Union([Type.String(), Type.Number()]))
|
|
781
|
+
}, { additionalProperties: false });
|
|
782
|
+
const ConfigGetParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
783
|
+
const ConfigSetParamsSchema = Type.Object({
|
|
784
|
+
raw: NonEmptyString,
|
|
785
|
+
baseHash: Type.Optional(NonEmptyString)
|
|
786
|
+
}, { additionalProperties: false });
|
|
787
|
+
const ConfigApplyLikeParamsSchema = Type.Object({
|
|
788
|
+
raw: NonEmptyString,
|
|
789
|
+
baseHash: Type.Optional(NonEmptyString),
|
|
790
|
+
sessionKey: Type.Optional(Type.String()),
|
|
791
|
+
deliveryContext: Type.Optional(ConfigDeliveryContextSchema),
|
|
792
|
+
note: Type.Optional(Type.String()),
|
|
793
|
+
restartDelayMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
794
|
+
}, { additionalProperties: false });
|
|
795
|
+
const ConfigApplyParamsSchema = ConfigApplyLikeParamsSchema;
|
|
796
|
+
const ConfigPatchParamsSchema = ConfigApplyLikeParamsSchema;
|
|
797
|
+
const ConfigSchemaParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
798
|
+
const ConfigSchemaLookupParamsSchema = Type.Object({ path: ConfigSchemaLookupPathString }, { additionalProperties: false });
|
|
799
|
+
const UpdateRunParamsSchema = Type.Object({
|
|
800
|
+
sessionKey: Type.Optional(Type.String()),
|
|
801
|
+
deliveryContext: Type.Optional(ConfigDeliveryContextSchema),
|
|
802
|
+
note: Type.Optional(Type.String()),
|
|
803
|
+
restartDelayMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
804
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 1 }))
|
|
805
|
+
}, { additionalProperties: false });
|
|
806
|
+
const ConfigUiHintSchema = Type.Object({
|
|
807
|
+
label: Type.Optional(Type.String()),
|
|
808
|
+
help: Type.Optional(Type.String()),
|
|
809
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
810
|
+
group: Type.Optional(Type.String()),
|
|
811
|
+
order: Type.Optional(Type.Integer()),
|
|
812
|
+
advanced: Type.Optional(Type.Boolean()),
|
|
813
|
+
sensitive: Type.Optional(Type.Boolean()),
|
|
814
|
+
placeholder: Type.Optional(Type.String()),
|
|
815
|
+
itemTemplate: Type.Optional(Type.Unknown())
|
|
816
|
+
}, { additionalProperties: false });
|
|
817
|
+
Type.Object({
|
|
818
|
+
schema: Type.Unknown(),
|
|
819
|
+
uiHints: Type.Record(Type.String(), ConfigUiHintSchema),
|
|
820
|
+
version: NonEmptyString,
|
|
821
|
+
generatedAt: NonEmptyString
|
|
822
|
+
}, { additionalProperties: false });
|
|
823
|
+
const ConfigSchemaLookupChildSchema = Type.Object({
|
|
824
|
+
key: NonEmptyString,
|
|
825
|
+
path: NonEmptyString,
|
|
826
|
+
type: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String())])),
|
|
827
|
+
required: Type.Boolean(),
|
|
828
|
+
hasChildren: Type.Boolean(),
|
|
829
|
+
hint: Type.Optional(ConfigUiHintSchema),
|
|
830
|
+
hintPath: Type.Optional(Type.String())
|
|
831
|
+
}, { additionalProperties: false });
|
|
832
|
+
const ConfigSchemaLookupResultSchema = Type.Object({
|
|
833
|
+
path: NonEmptyString,
|
|
834
|
+
schema: Type.Unknown(),
|
|
835
|
+
hint: Type.Optional(ConfigUiHintSchema),
|
|
836
|
+
hintPath: Type.Optional(Type.String()),
|
|
837
|
+
children: Type.Array(ConfigSchemaLookupChildSchema)
|
|
838
|
+
}, { additionalProperties: false });
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region src/gateway/protocol/schema/cron.ts
|
|
841
|
+
function cronAgentTurnPayloadSchema(params) {
|
|
842
|
+
return Type.Object({
|
|
843
|
+
kind: Type.Literal("agentTurn"),
|
|
844
|
+
message: params.message,
|
|
845
|
+
model: Type.Optional(Type.String()),
|
|
846
|
+
fallbacks: Type.Optional(Type.Array(Type.String())),
|
|
847
|
+
thinking: Type.Optional(Type.String()),
|
|
848
|
+
timeoutSeconds: Type.Optional(Type.Number({ minimum: 0 })),
|
|
849
|
+
allowUnsafeExternalContent: Type.Optional(Type.Boolean()),
|
|
850
|
+
lightContext: Type.Optional(Type.Boolean()),
|
|
851
|
+
toolsAllow: Type.Optional(params.toolsAllow)
|
|
852
|
+
}, { additionalProperties: false });
|
|
853
|
+
}
|
|
854
|
+
const CronSessionTargetSchema = Type.Union([
|
|
855
|
+
Type.Literal("main"),
|
|
856
|
+
Type.Literal("isolated"),
|
|
857
|
+
Type.Literal("current"),
|
|
858
|
+
Type.String({ pattern: "^session:.+" })
|
|
859
|
+
]);
|
|
860
|
+
const CronWakeModeSchema = Type.Union([Type.Literal("next-heartbeat"), Type.Literal("now")]);
|
|
861
|
+
const CronRunStatusSchema = Type.Union([
|
|
862
|
+
Type.Literal("ok"),
|
|
863
|
+
Type.Literal("error"),
|
|
864
|
+
Type.Literal("skipped")
|
|
865
|
+
]);
|
|
866
|
+
const CronSortDirSchema = Type.Union([Type.Literal("asc"), Type.Literal("desc")]);
|
|
867
|
+
const CronJobsEnabledFilterSchema = Type.Union([
|
|
868
|
+
Type.Literal("all"),
|
|
869
|
+
Type.Literal("enabled"),
|
|
870
|
+
Type.Literal("disabled")
|
|
871
|
+
]);
|
|
872
|
+
const CronJobsSortBySchema = Type.Union([
|
|
873
|
+
Type.Literal("nextRunAtMs"),
|
|
874
|
+
Type.Literal("updatedAtMs"),
|
|
875
|
+
Type.Literal("name")
|
|
876
|
+
]);
|
|
877
|
+
const CronRunsStatusFilterSchema = Type.Union([
|
|
878
|
+
Type.Literal("all"),
|
|
879
|
+
Type.Literal("ok"),
|
|
880
|
+
Type.Literal("error"),
|
|
881
|
+
Type.Literal("skipped")
|
|
882
|
+
]);
|
|
883
|
+
const CronRunsStatusValueSchema = Type.Union([
|
|
884
|
+
Type.Literal("ok"),
|
|
885
|
+
Type.Literal("error"),
|
|
886
|
+
Type.Literal("skipped")
|
|
887
|
+
]);
|
|
888
|
+
const CronDeliveryStatusSchema = Type.Union([
|
|
889
|
+
Type.Literal("delivered"),
|
|
890
|
+
Type.Literal("not-delivered"),
|
|
891
|
+
Type.Literal("unknown"),
|
|
892
|
+
Type.Literal("not-requested")
|
|
893
|
+
]);
|
|
894
|
+
const CronFailoverReasonSchema = Type.Union([
|
|
895
|
+
Type.Literal("auth"),
|
|
896
|
+
Type.Literal("format"),
|
|
897
|
+
Type.Literal("rate_limit"),
|
|
898
|
+
Type.Literal("billing"),
|
|
899
|
+
Type.Literal("timeout"),
|
|
900
|
+
Type.Literal("model_not_found"),
|
|
901
|
+
Type.Literal("unknown")
|
|
902
|
+
]);
|
|
903
|
+
const CronCommonOptionalFields = {
|
|
904
|
+
agentId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
905
|
+
sessionKey: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
906
|
+
description: Type.Optional(Type.String()),
|
|
907
|
+
enabled: Type.Optional(Type.Boolean()),
|
|
908
|
+
deleteAfterRun: Type.Optional(Type.Boolean())
|
|
909
|
+
};
|
|
910
|
+
function cronIdOrJobIdParams(extraFields) {
|
|
911
|
+
return Type.Union([Type.Object({
|
|
912
|
+
id: NonEmptyString,
|
|
913
|
+
...extraFields
|
|
914
|
+
}, { additionalProperties: false }), Type.Object({
|
|
915
|
+
jobId: NonEmptyString,
|
|
916
|
+
...extraFields
|
|
917
|
+
}, { additionalProperties: false })]);
|
|
918
|
+
}
|
|
919
|
+
const CronRunLogJobIdSchema = Type.String({
|
|
920
|
+
minLength: 1,
|
|
921
|
+
pattern: "^[^/\\\\]+$"
|
|
922
|
+
});
|
|
923
|
+
const CronScheduleSchema = Type.Union([
|
|
924
|
+
Type.Object({
|
|
925
|
+
kind: Type.Literal("at"),
|
|
926
|
+
at: NonEmptyString
|
|
927
|
+
}, { additionalProperties: false }),
|
|
928
|
+
Type.Object({
|
|
929
|
+
kind: Type.Literal("every"),
|
|
930
|
+
everyMs: Type.Integer({ minimum: 1 }),
|
|
931
|
+
anchorMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
932
|
+
}, { additionalProperties: false }),
|
|
933
|
+
Type.Object({
|
|
934
|
+
kind: Type.Literal("cron"),
|
|
935
|
+
expr: NonEmptyString,
|
|
936
|
+
tz: Type.Optional(Type.String()),
|
|
937
|
+
staggerMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
938
|
+
}, { additionalProperties: false })
|
|
939
|
+
]);
|
|
940
|
+
const CronPayloadSchema = Type.Union([Type.Object({
|
|
941
|
+
kind: Type.Literal("systemEvent"),
|
|
942
|
+
text: NonEmptyString
|
|
943
|
+
}, { additionalProperties: false }), cronAgentTurnPayloadSchema({
|
|
944
|
+
message: NonEmptyString,
|
|
945
|
+
toolsAllow: Type.Array(Type.String())
|
|
946
|
+
})]);
|
|
947
|
+
const CronPayloadPatchSchema = Type.Union([Type.Object({
|
|
948
|
+
kind: Type.Literal("systemEvent"),
|
|
949
|
+
text: Type.Optional(NonEmptyString)
|
|
950
|
+
}, { additionalProperties: false }), cronAgentTurnPayloadSchema({
|
|
951
|
+
message: Type.Optional(NonEmptyString),
|
|
952
|
+
toolsAllow: Type.Union([Type.Array(Type.String()), Type.Null()])
|
|
953
|
+
})]);
|
|
954
|
+
const CronFailureAlertSchema = Type.Object({
|
|
955
|
+
after: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
956
|
+
channel: Type.Optional(Type.Union([Type.Literal("last"), NonEmptyString])),
|
|
957
|
+
to: Type.Optional(Type.String()),
|
|
958
|
+
cooldownMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
959
|
+
mode: Type.Optional(Type.Union([Type.Literal("announce"), Type.Literal("webhook")])),
|
|
960
|
+
accountId: Type.Optional(NonEmptyString)
|
|
961
|
+
}, { additionalProperties: false });
|
|
962
|
+
const CronFailureDestinationSchema = Type.Object({
|
|
963
|
+
channel: Type.Optional(Type.Union([Type.Literal("last"), NonEmptyString])),
|
|
964
|
+
to: Type.Optional(Type.String()),
|
|
965
|
+
accountId: Type.Optional(NonEmptyString),
|
|
966
|
+
mode: Type.Optional(Type.Union([Type.Literal("announce"), Type.Literal("webhook")]))
|
|
967
|
+
}, { additionalProperties: false });
|
|
968
|
+
const CronDeliverySharedProperties = {
|
|
969
|
+
channel: Type.Optional(Type.Union([Type.Literal("last"), NonEmptyString])),
|
|
970
|
+
accountId: Type.Optional(NonEmptyString),
|
|
971
|
+
bestEffort: Type.Optional(Type.Boolean()),
|
|
972
|
+
failureDestination: Type.Optional(CronFailureDestinationSchema)
|
|
973
|
+
};
|
|
974
|
+
const CronDeliveryNoopSchema = Type.Object({
|
|
975
|
+
mode: Type.Literal("none"),
|
|
976
|
+
...CronDeliverySharedProperties,
|
|
977
|
+
to: Type.Optional(Type.String())
|
|
978
|
+
}, { additionalProperties: false });
|
|
979
|
+
const CronDeliveryAnnounceSchema = Type.Object({
|
|
980
|
+
mode: Type.Literal("announce"),
|
|
981
|
+
...CronDeliverySharedProperties,
|
|
982
|
+
to: Type.Optional(Type.String())
|
|
983
|
+
}, { additionalProperties: false });
|
|
984
|
+
const CronDeliveryWebhookSchema = Type.Object({
|
|
985
|
+
mode: Type.Literal("webhook"),
|
|
986
|
+
...CronDeliverySharedProperties,
|
|
987
|
+
to: NonEmptyString
|
|
988
|
+
}, { additionalProperties: false });
|
|
989
|
+
const CronDeliverySchema = Type.Union([
|
|
990
|
+
CronDeliveryNoopSchema,
|
|
991
|
+
CronDeliveryAnnounceSchema,
|
|
992
|
+
CronDeliveryWebhookSchema
|
|
993
|
+
]);
|
|
994
|
+
const CronDeliveryPatchSchema = Type.Object({
|
|
995
|
+
mode: Type.Optional(Type.Union([
|
|
996
|
+
Type.Literal("none"),
|
|
997
|
+
Type.Literal("announce"),
|
|
998
|
+
Type.Literal("webhook")
|
|
999
|
+
])),
|
|
1000
|
+
...CronDeliverySharedProperties,
|
|
1001
|
+
to: Type.Optional(Type.String())
|
|
1002
|
+
}, { additionalProperties: false });
|
|
1003
|
+
const CronJobStateSchema = Type.Object({
|
|
1004
|
+
nextRunAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1005
|
+
runningAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1006
|
+
lastRunAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1007
|
+
lastRunStatus: Type.Optional(CronRunStatusSchema),
|
|
1008
|
+
lastStatus: Type.Optional(CronRunStatusSchema),
|
|
1009
|
+
lastError: Type.Optional(Type.String()),
|
|
1010
|
+
lastErrorReason: Type.Optional(CronFailoverReasonSchema),
|
|
1011
|
+
lastDurationMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1012
|
+
consecutiveErrors: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1013
|
+
lastDelivered: Type.Optional(Type.Boolean()),
|
|
1014
|
+
lastDeliveryStatus: Type.Optional(CronDeliveryStatusSchema),
|
|
1015
|
+
lastDeliveryError: Type.Optional(Type.String()),
|
|
1016
|
+
lastFailureAlertAtMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
1017
|
+
}, { additionalProperties: false });
|
|
1018
|
+
Type.Object({
|
|
1019
|
+
id: NonEmptyString,
|
|
1020
|
+
agentId: Type.Optional(NonEmptyString),
|
|
1021
|
+
sessionKey: Type.Optional(NonEmptyString),
|
|
1022
|
+
name: NonEmptyString,
|
|
1023
|
+
description: Type.Optional(Type.String()),
|
|
1024
|
+
enabled: Type.Boolean(),
|
|
1025
|
+
deleteAfterRun: Type.Optional(Type.Boolean()),
|
|
1026
|
+
createdAtMs: Type.Integer({ minimum: 0 }),
|
|
1027
|
+
updatedAtMs: Type.Integer({ minimum: 0 }),
|
|
1028
|
+
schedule: CronScheduleSchema,
|
|
1029
|
+
sessionTarget: CronSessionTargetSchema,
|
|
1030
|
+
wakeMode: CronWakeModeSchema,
|
|
1031
|
+
payload: CronPayloadSchema,
|
|
1032
|
+
delivery: Type.Optional(CronDeliverySchema),
|
|
1033
|
+
failureAlert: Type.Optional(Type.Union([Type.Literal(false), CronFailureAlertSchema])),
|
|
1034
|
+
state: CronJobStateSchema
|
|
1035
|
+
}, { additionalProperties: false });
|
|
1036
|
+
const CronListParamsSchema = Type.Object({
|
|
1037
|
+
includeDisabled: Type.Optional(Type.Boolean()),
|
|
1038
|
+
limit: Type.Optional(Type.Integer({
|
|
1039
|
+
minimum: 1,
|
|
1040
|
+
maximum: 200
|
|
1041
|
+
})),
|
|
1042
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1043
|
+
query: Type.Optional(Type.String()),
|
|
1044
|
+
enabled: Type.Optional(CronJobsEnabledFilterSchema),
|
|
1045
|
+
sortBy: Type.Optional(CronJobsSortBySchema),
|
|
1046
|
+
sortDir: Type.Optional(CronSortDirSchema)
|
|
1047
|
+
}, { additionalProperties: false });
|
|
1048
|
+
const CronStatusParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1049
|
+
const CronAddParamsSchema = Type.Object({
|
|
1050
|
+
name: NonEmptyString,
|
|
1051
|
+
...CronCommonOptionalFields,
|
|
1052
|
+
schedule: CronScheduleSchema,
|
|
1053
|
+
sessionTarget: CronSessionTargetSchema,
|
|
1054
|
+
wakeMode: CronWakeModeSchema,
|
|
1055
|
+
payload: CronPayloadSchema,
|
|
1056
|
+
delivery: Type.Optional(CronDeliverySchema),
|
|
1057
|
+
failureAlert: Type.Optional(Type.Union([Type.Literal(false), CronFailureAlertSchema]))
|
|
1058
|
+
}, { additionalProperties: false });
|
|
1059
|
+
const CronUpdateParamsSchema = cronIdOrJobIdParams({ patch: Type.Object({
|
|
1060
|
+
name: Type.Optional(NonEmptyString),
|
|
1061
|
+
...CronCommonOptionalFields,
|
|
1062
|
+
schedule: Type.Optional(CronScheduleSchema),
|
|
1063
|
+
sessionTarget: Type.Optional(CronSessionTargetSchema),
|
|
1064
|
+
wakeMode: Type.Optional(CronWakeModeSchema),
|
|
1065
|
+
payload: Type.Optional(CronPayloadPatchSchema),
|
|
1066
|
+
delivery: Type.Optional(CronDeliveryPatchSchema),
|
|
1067
|
+
failureAlert: Type.Optional(Type.Union([Type.Literal(false), CronFailureAlertSchema])),
|
|
1068
|
+
state: Type.Optional(Type.Partial(CronJobStateSchema))
|
|
1069
|
+
}, { additionalProperties: false }) });
|
|
1070
|
+
const CronRemoveParamsSchema = cronIdOrJobIdParams({});
|
|
1071
|
+
const CronRunParamsSchema = cronIdOrJobIdParams({ mode: Type.Optional(Type.Union([Type.Literal("due"), Type.Literal("force")])) });
|
|
1072
|
+
const CronRunsParamsSchema = Type.Object({
|
|
1073
|
+
scope: Type.Optional(Type.Union([Type.Literal("job"), Type.Literal("all")])),
|
|
1074
|
+
id: Type.Optional(CronRunLogJobIdSchema),
|
|
1075
|
+
jobId: Type.Optional(CronRunLogJobIdSchema),
|
|
1076
|
+
limit: Type.Optional(Type.Integer({
|
|
1077
|
+
minimum: 1,
|
|
1078
|
+
maximum: 200
|
|
1079
|
+
})),
|
|
1080
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1081
|
+
statuses: Type.Optional(Type.Array(CronRunsStatusValueSchema, {
|
|
1082
|
+
minItems: 1,
|
|
1083
|
+
maxItems: 3
|
|
1084
|
+
})),
|
|
1085
|
+
status: Type.Optional(CronRunsStatusFilterSchema),
|
|
1086
|
+
deliveryStatuses: Type.Optional(Type.Array(CronDeliveryStatusSchema, {
|
|
1087
|
+
minItems: 1,
|
|
1088
|
+
maxItems: 4
|
|
1089
|
+
})),
|
|
1090
|
+
deliveryStatus: Type.Optional(CronDeliveryStatusSchema),
|
|
1091
|
+
query: Type.Optional(Type.String()),
|
|
1092
|
+
sortDir: Type.Optional(CronSortDirSchema)
|
|
1093
|
+
}, { additionalProperties: false });
|
|
1094
|
+
Type.Object({
|
|
1095
|
+
ts: Type.Integer({ minimum: 0 }),
|
|
1096
|
+
jobId: NonEmptyString,
|
|
1097
|
+
action: Type.Literal("finished"),
|
|
1098
|
+
status: Type.Optional(CronRunStatusSchema),
|
|
1099
|
+
error: Type.Optional(Type.String()),
|
|
1100
|
+
summary: Type.Optional(Type.String()),
|
|
1101
|
+
delivered: Type.Optional(Type.Boolean()),
|
|
1102
|
+
deliveryStatus: Type.Optional(CronDeliveryStatusSchema),
|
|
1103
|
+
deliveryError: Type.Optional(Type.String()),
|
|
1104
|
+
sessionId: Type.Optional(NonEmptyString),
|
|
1105
|
+
sessionKey: Type.Optional(NonEmptyString),
|
|
1106
|
+
runAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1107
|
+
durationMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1108
|
+
nextRunAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1109
|
+
model: Type.Optional(Type.String()),
|
|
1110
|
+
provider: Type.Optional(Type.String()),
|
|
1111
|
+
usage: Type.Optional(Type.Object({
|
|
1112
|
+
input_tokens: Type.Optional(Type.Number()),
|
|
1113
|
+
output_tokens: Type.Optional(Type.Number()),
|
|
1114
|
+
total_tokens: Type.Optional(Type.Number()),
|
|
1115
|
+
cache_read_tokens: Type.Optional(Type.Number()),
|
|
1116
|
+
cache_write_tokens: Type.Optional(Type.Number())
|
|
1117
|
+
}, { additionalProperties: false })),
|
|
1118
|
+
jobName: Type.Optional(Type.String())
|
|
1119
|
+
}, { additionalProperties: false });
|
|
1120
|
+
//#endregion
|
|
1121
|
+
//#region src/gateway/protocol/schema/error-codes.ts
|
|
1122
|
+
const ErrorCodes = {
|
|
1123
|
+
NOT_LINKED: "NOT_LINKED",
|
|
1124
|
+
NOT_PAIRED: "NOT_PAIRED",
|
|
1125
|
+
AGENT_TIMEOUT: "AGENT_TIMEOUT",
|
|
1126
|
+
INVALID_REQUEST: "INVALID_REQUEST",
|
|
1127
|
+
APPROVAL_NOT_FOUND: "APPROVAL_NOT_FOUND",
|
|
1128
|
+
UNAVAILABLE: "UNAVAILABLE"
|
|
1129
|
+
};
|
|
1130
|
+
function errorShape(code, message, opts) {
|
|
1131
|
+
return {
|
|
1132
|
+
code,
|
|
1133
|
+
message,
|
|
1134
|
+
...opts
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
//#endregion
|
|
1138
|
+
//#region src/gateway/protocol/schema/exec-approvals.ts
|
|
1139
|
+
const ExecApprovalsAllowlistEntrySchema = Type.Object({
|
|
1140
|
+
id: Type.Optional(NonEmptyString),
|
|
1141
|
+
pattern: Type.String(),
|
|
1142
|
+
argPattern: Type.Optional(Type.String()),
|
|
1143
|
+
lastUsedAt: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1144
|
+
lastUsedCommand: Type.Optional(Type.String()),
|
|
1145
|
+
lastResolvedPath: Type.Optional(Type.String())
|
|
1146
|
+
}, { additionalProperties: false });
|
|
1147
|
+
const ExecApprovalsPolicyFields = {
|
|
1148
|
+
security: Type.Optional(Type.String()),
|
|
1149
|
+
ask: Type.Optional(Type.String()),
|
|
1150
|
+
askFallback: Type.Optional(Type.String()),
|
|
1151
|
+
autoAllowSkills: Type.Optional(Type.Boolean())
|
|
1152
|
+
};
|
|
1153
|
+
const ExecApprovalsDefaultsSchema = Type.Object(ExecApprovalsPolicyFields, { additionalProperties: false });
|
|
1154
|
+
const ExecApprovalsAgentSchema = Type.Object({
|
|
1155
|
+
...ExecApprovalsPolicyFields,
|
|
1156
|
+
allowlist: Type.Optional(Type.Array(ExecApprovalsAllowlistEntrySchema))
|
|
1157
|
+
}, { additionalProperties: false });
|
|
1158
|
+
const ExecApprovalsFileSchema = Type.Object({
|
|
1159
|
+
version: Type.Literal(1),
|
|
1160
|
+
socket: Type.Optional(Type.Object({
|
|
1161
|
+
path: Type.Optional(Type.String()),
|
|
1162
|
+
token: Type.Optional(Type.String())
|
|
1163
|
+
}, { additionalProperties: false })),
|
|
1164
|
+
defaults: Type.Optional(ExecApprovalsDefaultsSchema),
|
|
1165
|
+
agents: Type.Optional(Type.Record(Type.String(), ExecApprovalsAgentSchema))
|
|
1166
|
+
}, { additionalProperties: false });
|
|
1167
|
+
Type.Object({
|
|
1168
|
+
path: NonEmptyString,
|
|
1169
|
+
exists: Type.Boolean(),
|
|
1170
|
+
hash: NonEmptyString,
|
|
1171
|
+
file: ExecApprovalsFileSchema
|
|
1172
|
+
}, { additionalProperties: false });
|
|
1173
|
+
const ExecApprovalsGetParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1174
|
+
const ExecApprovalsSetParamsSchema = Type.Object({
|
|
1175
|
+
file: ExecApprovalsFileSchema,
|
|
1176
|
+
baseHash: Type.Optional(NonEmptyString)
|
|
1177
|
+
}, { additionalProperties: false });
|
|
1178
|
+
const ExecApprovalsNodeGetParamsSchema = Type.Object({ nodeId: NonEmptyString }, { additionalProperties: false });
|
|
1179
|
+
const ExecApprovalsNodeSetParamsSchema = Type.Object({
|
|
1180
|
+
nodeId: NonEmptyString,
|
|
1181
|
+
file: ExecApprovalsFileSchema,
|
|
1182
|
+
baseHash: Type.Optional(NonEmptyString)
|
|
1183
|
+
}, { additionalProperties: false });
|
|
1184
|
+
const ExecApprovalGetParamsSchema = Type.Object({ id: NonEmptyString }, { additionalProperties: false });
|
|
1185
|
+
const ExecApprovalRequestParamsSchema = Type.Object({
|
|
1186
|
+
id: Type.Optional(NonEmptyString),
|
|
1187
|
+
command: Type.Optional(NonEmptyString),
|
|
1188
|
+
commandArgv: Type.Optional(Type.Array(Type.String())),
|
|
1189
|
+
systemRunPlan: Type.Optional(Type.Object({
|
|
1190
|
+
argv: Type.Array(Type.String()),
|
|
1191
|
+
cwd: Type.Union([Type.String(), Type.Null()]),
|
|
1192
|
+
commandText: Type.String(),
|
|
1193
|
+
commandPreview: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1194
|
+
agentId: Type.Union([Type.String(), Type.Null()]),
|
|
1195
|
+
sessionKey: Type.Union([Type.String(), Type.Null()]),
|
|
1196
|
+
mutableFileOperand: Type.Optional(Type.Union([Type.Object({
|
|
1197
|
+
argvIndex: Type.Integer({ minimum: 0 }),
|
|
1198
|
+
path: Type.String(),
|
|
1199
|
+
sha256: Type.String()
|
|
1200
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
1201
|
+
}, { additionalProperties: false })),
|
|
1202
|
+
env: Type.Optional(Type.Record(NonEmptyString, Type.String())),
|
|
1203
|
+
cwd: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1204
|
+
nodeId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1205
|
+
host: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1206
|
+
security: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1207
|
+
ask: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1208
|
+
agentId: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1209
|
+
resolvedPath: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1210
|
+
sessionKey: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1211
|
+
turnSourceChannel: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1212
|
+
turnSourceTo: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1213
|
+
turnSourceAccountId: Type.Optional(Type.Union([Type.String(), Type.Null()])),
|
|
1214
|
+
turnSourceThreadId: Type.Optional(Type.Union([
|
|
1215
|
+
Type.String(),
|
|
1216
|
+
Type.Number(),
|
|
1217
|
+
Type.Null()
|
|
1218
|
+
])),
|
|
1219
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1220
|
+
twoPhase: Type.Optional(Type.Boolean())
|
|
1221
|
+
}, { additionalProperties: false });
|
|
1222
|
+
const ExecApprovalResolveParamsSchema = Type.Object({
|
|
1223
|
+
id: NonEmptyString,
|
|
1224
|
+
decision: NonEmptyString
|
|
1225
|
+
}, { additionalProperties: false });
|
|
1226
|
+
//#endregion
|
|
1227
|
+
//#region src/gateway/protocol/schema/devices.ts
|
|
1228
|
+
const DevicePairListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1229
|
+
const DevicePairApproveParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1230
|
+
const DevicePairRejectParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1231
|
+
const DevicePairRemoveParamsSchema = Type.Object({ deviceId: NonEmptyString }, { additionalProperties: false });
|
|
1232
|
+
const DeviceTokenRotateParamsSchema = Type.Object({
|
|
1233
|
+
deviceId: NonEmptyString,
|
|
1234
|
+
role: NonEmptyString,
|
|
1235
|
+
scopes: Type.Optional(Type.Array(NonEmptyString))
|
|
1236
|
+
}, { additionalProperties: false });
|
|
1237
|
+
const DeviceTokenRevokeParamsSchema = Type.Object({
|
|
1238
|
+
deviceId: NonEmptyString,
|
|
1239
|
+
role: NonEmptyString
|
|
1240
|
+
}, { additionalProperties: false });
|
|
1241
|
+
Type.Object({
|
|
1242
|
+
requestId: NonEmptyString,
|
|
1243
|
+
deviceId: NonEmptyString,
|
|
1244
|
+
publicKey: NonEmptyString,
|
|
1245
|
+
displayName: Type.Optional(NonEmptyString),
|
|
1246
|
+
platform: Type.Optional(NonEmptyString),
|
|
1247
|
+
deviceFamily: Type.Optional(NonEmptyString),
|
|
1248
|
+
clientId: Type.Optional(NonEmptyString),
|
|
1249
|
+
clientMode: Type.Optional(NonEmptyString),
|
|
1250
|
+
role: Type.Optional(NonEmptyString),
|
|
1251
|
+
roles: Type.Optional(Type.Array(NonEmptyString)),
|
|
1252
|
+
scopes: Type.Optional(Type.Array(NonEmptyString)),
|
|
1253
|
+
remoteIp: Type.Optional(NonEmptyString),
|
|
1254
|
+
silent: Type.Optional(Type.Boolean()),
|
|
1255
|
+
isRepair: Type.Optional(Type.Boolean()),
|
|
1256
|
+
ts: Type.Integer({ minimum: 0 })
|
|
1257
|
+
}, { additionalProperties: false });
|
|
1258
|
+
Type.Object({
|
|
1259
|
+
requestId: NonEmptyString,
|
|
1260
|
+
deviceId: NonEmptyString,
|
|
1261
|
+
decision: NonEmptyString,
|
|
1262
|
+
ts: Type.Integer({ minimum: 0 })
|
|
1263
|
+
}, { additionalProperties: false });
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region src/gateway/protocol/schema/snapshot.ts
|
|
1266
|
+
const PresenceEntrySchema = Type.Object({
|
|
1267
|
+
host: Type.Optional(NonEmptyString),
|
|
1268
|
+
ip: Type.Optional(NonEmptyString),
|
|
1269
|
+
version: Type.Optional(NonEmptyString),
|
|
1270
|
+
platform: Type.Optional(NonEmptyString),
|
|
1271
|
+
deviceFamily: Type.Optional(NonEmptyString),
|
|
1272
|
+
modelIdentifier: Type.Optional(NonEmptyString),
|
|
1273
|
+
mode: Type.Optional(NonEmptyString),
|
|
1274
|
+
lastInputSeconds: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1275
|
+
reason: Type.Optional(NonEmptyString),
|
|
1276
|
+
tags: Type.Optional(Type.Array(NonEmptyString)),
|
|
1277
|
+
text: Type.Optional(Type.String()),
|
|
1278
|
+
ts: Type.Integer({ minimum: 0 }),
|
|
1279
|
+
deviceId: Type.Optional(NonEmptyString),
|
|
1280
|
+
roles: Type.Optional(Type.Array(NonEmptyString)),
|
|
1281
|
+
scopes: Type.Optional(Type.Array(NonEmptyString)),
|
|
1282
|
+
instanceId: Type.Optional(NonEmptyString)
|
|
1283
|
+
}, { additionalProperties: false });
|
|
1284
|
+
const HealthSnapshotSchema = Type.Any();
|
|
1285
|
+
const SessionDefaultsSchema = Type.Object({
|
|
1286
|
+
defaultAgentId: NonEmptyString,
|
|
1287
|
+
mainKey: NonEmptyString,
|
|
1288
|
+
mainSessionKey: NonEmptyString,
|
|
1289
|
+
scope: Type.Optional(NonEmptyString)
|
|
1290
|
+
}, { additionalProperties: false });
|
|
1291
|
+
const StateVersionSchema = Type.Object({
|
|
1292
|
+
presence: Type.Integer({ minimum: 0 }),
|
|
1293
|
+
health: Type.Integer({ minimum: 0 })
|
|
1294
|
+
}, { additionalProperties: false });
|
|
1295
|
+
const SnapshotSchema = Type.Object({
|
|
1296
|
+
presence: Type.Array(PresenceEntrySchema),
|
|
1297
|
+
health: HealthSnapshotSchema,
|
|
1298
|
+
stateVersion: StateVersionSchema,
|
|
1299
|
+
uptimeMs: Type.Integer({ minimum: 0 }),
|
|
1300
|
+
configPath: Type.Optional(NonEmptyString),
|
|
1301
|
+
stateDir: Type.Optional(NonEmptyString),
|
|
1302
|
+
sessionDefaults: Type.Optional(SessionDefaultsSchema),
|
|
1303
|
+
authMode: Type.Optional(Type.Union([
|
|
1304
|
+
Type.Literal("none"),
|
|
1305
|
+
Type.Literal("token"),
|
|
1306
|
+
Type.Literal("password"),
|
|
1307
|
+
Type.Literal("trusted-proxy")
|
|
1308
|
+
])),
|
|
1309
|
+
updateAvailable: Type.Optional(Type.Object({
|
|
1310
|
+
currentVersion: NonEmptyString,
|
|
1311
|
+
latestVersion: NonEmptyString,
|
|
1312
|
+
channel: NonEmptyString
|
|
1313
|
+
}))
|
|
1314
|
+
}, { additionalProperties: false });
|
|
1315
|
+
Type.Object({ ts: Type.Integer({ minimum: 0 }) }, { additionalProperties: false });
|
|
1316
|
+
Type.Object({
|
|
1317
|
+
reason: NonEmptyString,
|
|
1318
|
+
restartExpectedMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
1319
|
+
}, { additionalProperties: false });
|
|
1320
|
+
const ConnectParamsSchema = Type.Object({
|
|
1321
|
+
minProtocol: Type.Integer({ minimum: 1 }),
|
|
1322
|
+
maxProtocol: Type.Integer({ minimum: 1 }),
|
|
1323
|
+
client: Type.Object({
|
|
1324
|
+
id: GatewayClientIdSchema,
|
|
1325
|
+
displayName: Type.Optional(NonEmptyString),
|
|
1326
|
+
version: NonEmptyString,
|
|
1327
|
+
platform: NonEmptyString,
|
|
1328
|
+
deviceFamily: Type.Optional(NonEmptyString),
|
|
1329
|
+
modelIdentifier: Type.Optional(NonEmptyString),
|
|
1330
|
+
mode: GatewayClientModeSchema,
|
|
1331
|
+
instanceId: Type.Optional(NonEmptyString)
|
|
1332
|
+
}, { additionalProperties: false }),
|
|
1333
|
+
caps: Type.Optional(Type.Array(NonEmptyString, { default: [] })),
|
|
1334
|
+
commands: Type.Optional(Type.Array(NonEmptyString)),
|
|
1335
|
+
permissions: Type.Optional(Type.Record(NonEmptyString, Type.Boolean())),
|
|
1336
|
+
pathEnv: Type.Optional(Type.String()),
|
|
1337
|
+
role: Type.Optional(NonEmptyString),
|
|
1338
|
+
scopes: Type.Optional(Type.Array(NonEmptyString)),
|
|
1339
|
+
device: Type.Optional(Type.Object({
|
|
1340
|
+
id: NonEmptyString,
|
|
1341
|
+
publicKey: NonEmptyString,
|
|
1342
|
+
signature: NonEmptyString,
|
|
1343
|
+
signedAt: Type.Integer({ minimum: 0 }),
|
|
1344
|
+
nonce: NonEmptyString
|
|
1345
|
+
}, { additionalProperties: false })),
|
|
1346
|
+
auth: Type.Optional(Type.Object({
|
|
1347
|
+
token: Type.Optional(Type.String()),
|
|
1348
|
+
bootstrapToken: Type.Optional(Type.String()),
|
|
1349
|
+
deviceToken: Type.Optional(Type.String()),
|
|
1350
|
+
password: Type.Optional(Type.String())
|
|
1351
|
+
}, { additionalProperties: false })),
|
|
1352
|
+
locale: Type.Optional(Type.String()),
|
|
1353
|
+
userAgent: Type.Optional(Type.String())
|
|
1354
|
+
}, { additionalProperties: false });
|
|
1355
|
+
Type.Object({
|
|
1356
|
+
type: Type.Literal("hello-ok"),
|
|
1357
|
+
protocol: Type.Integer({ minimum: 1 }),
|
|
1358
|
+
server: Type.Object({
|
|
1359
|
+
version: NonEmptyString,
|
|
1360
|
+
connId: NonEmptyString
|
|
1361
|
+
}, { additionalProperties: false }),
|
|
1362
|
+
features: Type.Object({
|
|
1363
|
+
methods: Type.Array(NonEmptyString),
|
|
1364
|
+
events: Type.Array(NonEmptyString)
|
|
1365
|
+
}, { additionalProperties: false }),
|
|
1366
|
+
snapshot: SnapshotSchema,
|
|
1367
|
+
canvasHostUrl: Type.Optional(NonEmptyString),
|
|
1368
|
+
auth: Type.Optional(Type.Object({
|
|
1369
|
+
deviceToken: Type.Optional(NonEmptyString),
|
|
1370
|
+
role: NonEmptyString,
|
|
1371
|
+
scopes: Type.Array(NonEmptyString),
|
|
1372
|
+
issuedAtMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1373
|
+
deviceTokens: Type.Optional(Type.Array(Type.Object({
|
|
1374
|
+
deviceToken: NonEmptyString,
|
|
1375
|
+
role: NonEmptyString,
|
|
1376
|
+
scopes: Type.Array(NonEmptyString),
|
|
1377
|
+
issuedAtMs: Type.Integer({ minimum: 0 })
|
|
1378
|
+
}, { additionalProperties: false })))
|
|
1379
|
+
}, { additionalProperties: false })),
|
|
1380
|
+
policy: Type.Object({
|
|
1381
|
+
maxPayload: Type.Integer({ minimum: 1 }),
|
|
1382
|
+
maxBufferedBytes: Type.Integer({ minimum: 1 }),
|
|
1383
|
+
tickIntervalMs: Type.Integer({ minimum: 1 })
|
|
1384
|
+
}, { additionalProperties: false })
|
|
1385
|
+
}, { additionalProperties: false });
|
|
1386
|
+
const ErrorShapeSchema = Type.Object({
|
|
1387
|
+
code: NonEmptyString,
|
|
1388
|
+
message: NonEmptyString,
|
|
1389
|
+
details: Type.Optional(Type.Unknown()),
|
|
1390
|
+
retryable: Type.Optional(Type.Boolean()),
|
|
1391
|
+
retryAfterMs: Type.Optional(Type.Integer({ minimum: 0 }))
|
|
1392
|
+
}, { additionalProperties: false });
|
|
1393
|
+
const RequestFrameSchema = Type.Object({
|
|
1394
|
+
type: Type.Literal("req"),
|
|
1395
|
+
id: NonEmptyString,
|
|
1396
|
+
method: NonEmptyString,
|
|
1397
|
+
params: Type.Optional(Type.Unknown())
|
|
1398
|
+
}, { additionalProperties: false });
|
|
1399
|
+
const ResponseFrameSchema = Type.Object({
|
|
1400
|
+
type: Type.Literal("res"),
|
|
1401
|
+
id: NonEmptyString,
|
|
1402
|
+
ok: Type.Boolean(),
|
|
1403
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1404
|
+
error: Type.Optional(ErrorShapeSchema)
|
|
1405
|
+
}, { additionalProperties: false });
|
|
1406
|
+
const EventFrameSchema = Type.Object({
|
|
1407
|
+
type: Type.Literal("event"),
|
|
1408
|
+
event: NonEmptyString,
|
|
1409
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1410
|
+
seq: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1411
|
+
stateVersion: Type.Optional(StateVersionSchema)
|
|
1412
|
+
}, { additionalProperties: false });
|
|
1413
|
+
Type.Union([
|
|
1414
|
+
RequestFrameSchema,
|
|
1415
|
+
ResponseFrameSchema,
|
|
1416
|
+
EventFrameSchema
|
|
1417
|
+
], { discriminator: "type" });
|
|
1418
|
+
//#endregion
|
|
1419
|
+
//#region src/gateway/protocol/schema/logs-chat.ts
|
|
1420
|
+
const LogsTailParamsSchema = Type.Object({
|
|
1421
|
+
cursor: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1422
|
+
limit: Type.Optional(Type.Integer({
|
|
1423
|
+
minimum: 1,
|
|
1424
|
+
maximum: 5e3
|
|
1425
|
+
})),
|
|
1426
|
+
maxBytes: Type.Optional(Type.Integer({
|
|
1427
|
+
minimum: 1,
|
|
1428
|
+
maximum: 1e6
|
|
1429
|
+
}))
|
|
1430
|
+
}, { additionalProperties: false });
|
|
1431
|
+
Type.Object({
|
|
1432
|
+
file: NonEmptyString,
|
|
1433
|
+
cursor: Type.Integer({ minimum: 0 }),
|
|
1434
|
+
size: Type.Integer({ minimum: 0 }),
|
|
1435
|
+
lines: Type.Array(Type.String()),
|
|
1436
|
+
truncated: Type.Optional(Type.Boolean()),
|
|
1437
|
+
reset: Type.Optional(Type.Boolean())
|
|
1438
|
+
}, { additionalProperties: false });
|
|
1439
|
+
const ChatHistoryParamsSchema = Type.Object({
|
|
1440
|
+
sessionKey: NonEmptyString,
|
|
1441
|
+
limit: Type.Optional(Type.Integer({
|
|
1442
|
+
minimum: 1,
|
|
1443
|
+
maximum: 1e3
|
|
1444
|
+
})),
|
|
1445
|
+
maxChars: Type.Optional(Type.Integer({
|
|
1446
|
+
minimum: 1,
|
|
1447
|
+
maximum: 5e5
|
|
1448
|
+
}))
|
|
1449
|
+
}, { additionalProperties: false });
|
|
1450
|
+
const ChatSendParamsSchema = Type.Object({
|
|
1451
|
+
sessionKey: ChatSendSessionKeyString,
|
|
1452
|
+
message: Type.String(),
|
|
1453
|
+
thinking: Type.Optional(Type.String()),
|
|
1454
|
+
deliver: Type.Optional(Type.Boolean()),
|
|
1455
|
+
originatingChannel: Type.Optional(Type.String()),
|
|
1456
|
+
originatingTo: Type.Optional(Type.String()),
|
|
1457
|
+
originatingAccountId: Type.Optional(Type.String()),
|
|
1458
|
+
originatingThreadId: Type.Optional(Type.String()),
|
|
1459
|
+
attachments: Type.Optional(Type.Array(Type.Unknown())),
|
|
1460
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1461
|
+
systemInputProvenance: Type.Optional(InputProvenanceSchema),
|
|
1462
|
+
systemProvenanceReceipt: Type.Optional(Type.String()),
|
|
1463
|
+
idempotencyKey: NonEmptyString
|
|
1464
|
+
}, { additionalProperties: false });
|
|
1465
|
+
const ChatAbortParamsSchema = Type.Object({
|
|
1466
|
+
sessionKey: NonEmptyString,
|
|
1467
|
+
runId: Type.Optional(NonEmptyString)
|
|
1468
|
+
}, { additionalProperties: false });
|
|
1469
|
+
const ChatInjectParamsSchema = Type.Object({
|
|
1470
|
+
sessionKey: NonEmptyString,
|
|
1471
|
+
message: NonEmptyString,
|
|
1472
|
+
label: Type.Optional(Type.String({ maxLength: 100 }))
|
|
1473
|
+
}, { additionalProperties: false });
|
|
1474
|
+
const ChatEventSchema = Type.Object({
|
|
1475
|
+
runId: NonEmptyString,
|
|
1476
|
+
sessionKey: NonEmptyString,
|
|
1477
|
+
seq: Type.Integer({ minimum: 0 }),
|
|
1478
|
+
state: Type.Union([
|
|
1479
|
+
Type.Literal("delta"),
|
|
1480
|
+
Type.Literal("final"),
|
|
1481
|
+
Type.Literal("aborted"),
|
|
1482
|
+
Type.Literal("error")
|
|
1483
|
+
]),
|
|
1484
|
+
message: Type.Optional(Type.Unknown()),
|
|
1485
|
+
errorMessage: Type.Optional(Type.String()),
|
|
1486
|
+
errorKind: Type.Optional(Type.Union([
|
|
1487
|
+
Type.Literal("refusal"),
|
|
1488
|
+
Type.Literal("timeout"),
|
|
1489
|
+
Type.Literal("rate_limit"),
|
|
1490
|
+
Type.Literal("context_length"),
|
|
1491
|
+
Type.Literal("unknown")
|
|
1492
|
+
])),
|
|
1493
|
+
usage: Type.Optional(Type.Unknown()),
|
|
1494
|
+
stopReason: Type.Optional(Type.String())
|
|
1495
|
+
}, { additionalProperties: false });
|
|
1496
|
+
//#endregion
|
|
1497
|
+
//#region src/gateway/protocol/schema/mcp.ts
|
|
1498
|
+
/**
|
|
1499
|
+
* A single MCP server definition. The transport-specific shape lives in
|
|
1500
|
+
* `src/config/types.mcp.ts` (`McpServerConfig`); the protocol passes it through
|
|
1501
|
+
* as an open object so new transport keys do not require a wire-contract bump.
|
|
1502
|
+
*/
|
|
1503
|
+
const McpServerConfigSchema = Type.Object({}, { additionalProperties: true });
|
|
1504
|
+
const McpServersListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1505
|
+
const McpServerSetParamsSchema = Type.Object({
|
|
1506
|
+
name: NonEmptyString,
|
|
1507
|
+
server: McpServerConfigSchema
|
|
1508
|
+
}, { additionalProperties: false });
|
|
1509
|
+
const McpServerUnsetParamsSchema = Type.Object({ name: NonEmptyString }, { additionalProperties: false });
|
|
1510
|
+
Type.Object({
|
|
1511
|
+
path: Type.String(),
|
|
1512
|
+
servers: Type.Record(Type.String(), McpServerConfigSchema),
|
|
1513
|
+
removed: Type.Optional(Type.Boolean())
|
|
1514
|
+
}, { additionalProperties: false });
|
|
1515
|
+
/**
|
|
1516
|
+
* `mcp.servers.metadata` — fetch metadata for a remote MCP server by URL.
|
|
1517
|
+
* Used by the Control UI's "Add by link" flow to discover transport, name,
|
|
1518
|
+
* and OAuth metadata before saving a server config.
|
|
1519
|
+
*/
|
|
1520
|
+
const McpServerMetadataParamsSchema = Type.Object({ url: NonEmptyString }, { additionalProperties: false });
|
|
1521
|
+
Type.Object({
|
|
1522
|
+
name: NonEmptyString,
|
|
1523
|
+
url: NonEmptyString,
|
|
1524
|
+
transport: Type.Union([Type.Literal("streamable-http"), Type.Literal("sse")]),
|
|
1525
|
+
serverName: Type.Optional(Type.String()),
|
|
1526
|
+
serverVersion: Type.Optional(Type.String()),
|
|
1527
|
+
protocolVersion: Type.Optional(Type.String()),
|
|
1528
|
+
capabilities: Type.Optional(Type.Object({
|
|
1529
|
+
tools: Type.Optional(Type.Array(Type.String())),
|
|
1530
|
+
prompts: Type.Optional(Type.Array(Type.String())),
|
|
1531
|
+
resources: Type.Optional(Type.Array(Type.String()))
|
|
1532
|
+
}, { additionalProperties: false })),
|
|
1533
|
+
oauth: Type.Boolean(),
|
|
1534
|
+
oauthIssuer: Type.Optional(Type.String()),
|
|
1535
|
+
oauthAuthorizeUrl: Type.Optional(Type.String()),
|
|
1536
|
+
oauthTokenUrl: Type.Optional(Type.String()),
|
|
1537
|
+
oauthScopes: Type.Optional(Type.Array(Type.String()))
|
|
1538
|
+
}, { additionalProperties: false });
|
|
1539
|
+
/**
|
|
1540
|
+
* `mcp.servers.test` — probe a configured server to confirm reachability and
|
|
1541
|
+
* that the saved credentials (headers or OAuth) are accepted.
|
|
1542
|
+
*/
|
|
1543
|
+
const McpServerTestParamsSchema = Type.Object({ name: NonEmptyString }, { additionalProperties: false });
|
|
1544
|
+
Type.Object({
|
|
1545
|
+
ok: Type.Boolean(),
|
|
1546
|
+
message: Type.String()
|
|
1547
|
+
}, { additionalProperties: false });
|
|
1548
|
+
/**
|
|
1549
|
+
* OAuth flow methods. Genesis acts as a confidential client and stores
|
|
1550
|
+
* encrypted tokens in `~/.genesis/mcp-tokens.json`.
|
|
1551
|
+
*/
|
|
1552
|
+
const McpOAuthStartParamsSchema = Type.Object({
|
|
1553
|
+
name: NonEmptyString,
|
|
1554
|
+
scopes: Type.Optional(Type.Array(Type.String()))
|
|
1555
|
+
}, { additionalProperties: false });
|
|
1556
|
+
Type.Object({
|
|
1557
|
+
state: NonEmptyString,
|
|
1558
|
+
authorizeUrl: NonEmptyString,
|
|
1559
|
+
providerName: Type.Optional(Type.String())
|
|
1560
|
+
}, { additionalProperties: false });
|
|
1561
|
+
const McpOAuthCallbackParamsSchema = Type.Object({
|
|
1562
|
+
name: NonEmptyString,
|
|
1563
|
+
state: NonEmptyString,
|
|
1564
|
+
code: NonEmptyString
|
|
1565
|
+
}, { additionalProperties: false });
|
|
1566
|
+
Type.Object({
|
|
1567
|
+
ok: Type.Boolean(),
|
|
1568
|
+
message: Type.Optional(Type.String()),
|
|
1569
|
+
providerName: Type.Optional(Type.String()),
|
|
1570
|
+
expiresAtMs: Type.Optional(Type.Union([Type.Null(), Type.Integer()]))
|
|
1571
|
+
}, { additionalProperties: false });
|
|
1572
|
+
const McpOAuthStatusParamsSchema = Type.Object({ name: NonEmptyString }, { additionalProperties: false });
|
|
1573
|
+
Type.Object({
|
|
1574
|
+
connected: Type.Boolean(),
|
|
1575
|
+
expiresAtMs: Type.Optional(Type.Union([Type.Null(), Type.Integer()])),
|
|
1576
|
+
providerName: Type.Optional(Type.String()),
|
|
1577
|
+
requiresAuth: Type.Boolean()
|
|
1578
|
+
}, { additionalProperties: false });
|
|
1579
|
+
const McpOAuthDisconnectParamsSchema = McpOAuthStatusParamsSchema;
|
|
1580
|
+
/**
|
|
1581
|
+
* `mcp.oauth.refresh` — force a refresh-token exchange for a server's stored
|
|
1582
|
+
* access token. Admin-scoped, mirrors disconnect.
|
|
1583
|
+
*/
|
|
1584
|
+
const McpOAuthRefreshParamsSchema = McpOAuthStatusParamsSchema;
|
|
1585
|
+
Type.Object({
|
|
1586
|
+
ok: Type.Boolean(),
|
|
1587
|
+
expiresAtMs: Type.Optional(Type.Union([Type.Null(), Type.Integer()])),
|
|
1588
|
+
message: Type.Optional(Type.String())
|
|
1589
|
+
}, { additionalProperties: false });
|
|
1590
|
+
//#endregion
|
|
1591
|
+
//#region src/gateway/protocol/schema/nodes.ts
|
|
1592
|
+
const NodePendingWorkTypeSchema = Type.String({ enum: ["status.request", "location.request"] });
|
|
1593
|
+
const NodePendingWorkPrioritySchema = Type.String({ enum: ["normal", "high"] });
|
|
1594
|
+
const NodePairRequestParamsSchema = Type.Object({
|
|
1595
|
+
nodeId: NonEmptyString,
|
|
1596
|
+
displayName: Type.Optional(NonEmptyString),
|
|
1597
|
+
platform: Type.Optional(NonEmptyString),
|
|
1598
|
+
version: Type.Optional(NonEmptyString),
|
|
1599
|
+
coreVersion: Type.Optional(NonEmptyString),
|
|
1600
|
+
uiVersion: Type.Optional(NonEmptyString),
|
|
1601
|
+
deviceFamily: Type.Optional(NonEmptyString),
|
|
1602
|
+
modelIdentifier: Type.Optional(NonEmptyString),
|
|
1603
|
+
caps: Type.Optional(Type.Array(NonEmptyString)),
|
|
1604
|
+
commands: Type.Optional(Type.Array(NonEmptyString)),
|
|
1605
|
+
remoteIp: Type.Optional(NonEmptyString),
|
|
1606
|
+
silent: Type.Optional(Type.Boolean())
|
|
1607
|
+
}, { additionalProperties: false });
|
|
1608
|
+
const NodePairListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1609
|
+
const NodePairApproveParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1610
|
+
const NodePairRejectParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1611
|
+
const NodePairVerifyParamsSchema = Type.Object({
|
|
1612
|
+
nodeId: NonEmptyString,
|
|
1613
|
+
token: NonEmptyString
|
|
1614
|
+
}, { additionalProperties: false });
|
|
1615
|
+
const NodeRenameParamsSchema = Type.Object({
|
|
1616
|
+
nodeId: NonEmptyString,
|
|
1617
|
+
displayName: NonEmptyString
|
|
1618
|
+
}, { additionalProperties: false });
|
|
1619
|
+
const NodeListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1620
|
+
const NodePendingAckParamsSchema = Type.Object({ ids: Type.Array(NonEmptyString, { minItems: 1 }) }, { additionalProperties: false });
|
|
1621
|
+
const NodeDescribeParamsSchema = Type.Object({ nodeId: NonEmptyString }, { additionalProperties: false });
|
|
1622
|
+
const NodeInvokeParamsSchema = Type.Object({
|
|
1623
|
+
nodeId: NonEmptyString,
|
|
1624
|
+
command: NonEmptyString,
|
|
1625
|
+
params: Type.Optional(Type.Unknown()),
|
|
1626
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1627
|
+
idempotencyKey: NonEmptyString
|
|
1628
|
+
}, { additionalProperties: false });
|
|
1629
|
+
const NodeInvokeResultParamsSchema = Type.Object({
|
|
1630
|
+
id: NonEmptyString,
|
|
1631
|
+
nodeId: NonEmptyString,
|
|
1632
|
+
ok: Type.Boolean(),
|
|
1633
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1634
|
+
payloadJSON: Type.Optional(Type.String()),
|
|
1635
|
+
error: Type.Optional(Type.Object({
|
|
1636
|
+
code: Type.Optional(NonEmptyString),
|
|
1637
|
+
message: Type.Optional(NonEmptyString)
|
|
1638
|
+
}, { additionalProperties: false }))
|
|
1639
|
+
}, { additionalProperties: false });
|
|
1640
|
+
const NodeEventParamsSchema = Type.Object({
|
|
1641
|
+
event: NonEmptyString,
|
|
1642
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1643
|
+
payloadJSON: Type.Optional(Type.String())
|
|
1644
|
+
}, { additionalProperties: false });
|
|
1645
|
+
const NodePendingDrainParamsSchema = Type.Object({ maxItems: Type.Optional(Type.Integer({
|
|
1646
|
+
minimum: 1,
|
|
1647
|
+
maximum: 10
|
|
1648
|
+
})) }, { additionalProperties: false });
|
|
1649
|
+
const NodePendingDrainItemSchema = Type.Object({
|
|
1650
|
+
id: NonEmptyString,
|
|
1651
|
+
type: NodePendingWorkTypeSchema,
|
|
1652
|
+
priority: Type.String({ enum: [
|
|
1653
|
+
"default",
|
|
1654
|
+
"normal",
|
|
1655
|
+
"high"
|
|
1656
|
+
] }),
|
|
1657
|
+
createdAtMs: Type.Integer({ minimum: 0 }),
|
|
1658
|
+
expiresAtMs: Type.Optional(Type.Union([Type.Integer({ minimum: 0 }), Type.Null()])),
|
|
1659
|
+
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown()))
|
|
1660
|
+
}, { additionalProperties: false });
|
|
1661
|
+
Type.Object({
|
|
1662
|
+
nodeId: NonEmptyString,
|
|
1663
|
+
revision: Type.Integer({ minimum: 0 }),
|
|
1664
|
+
items: Type.Array(NodePendingDrainItemSchema),
|
|
1665
|
+
hasMore: Type.Boolean()
|
|
1666
|
+
}, { additionalProperties: false });
|
|
1667
|
+
const NodePendingEnqueueParamsSchema = Type.Object({
|
|
1668
|
+
nodeId: NonEmptyString,
|
|
1669
|
+
type: NodePendingWorkTypeSchema,
|
|
1670
|
+
priority: Type.Optional(NodePendingWorkPrioritySchema),
|
|
1671
|
+
expiresInMs: Type.Optional(Type.Integer({
|
|
1672
|
+
minimum: 1e3,
|
|
1673
|
+
maximum: 864e5
|
|
1674
|
+
})),
|
|
1675
|
+
wake: Type.Optional(Type.Boolean())
|
|
1676
|
+
}, { additionalProperties: false });
|
|
1677
|
+
Type.Object({
|
|
1678
|
+
nodeId: NonEmptyString,
|
|
1679
|
+
revision: Type.Integer({ minimum: 0 }),
|
|
1680
|
+
queued: NodePendingDrainItemSchema,
|
|
1681
|
+
wakeTriggered: Type.Boolean()
|
|
1682
|
+
}, { additionalProperties: false });
|
|
1683
|
+
Type.Object({
|
|
1684
|
+
id: NonEmptyString,
|
|
1685
|
+
nodeId: NonEmptyString,
|
|
1686
|
+
command: NonEmptyString,
|
|
1687
|
+
paramsJSON: Type.Optional(Type.String()),
|
|
1688
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1689
|
+
idempotencyKey: Type.Optional(NonEmptyString)
|
|
1690
|
+
}, { additionalProperties: false });
|
|
1691
|
+
//#endregion
|
|
1692
|
+
//#region src/gateway/protocol/schema/plugin-approvals.ts
|
|
1693
|
+
const PluginApprovalRequestParamsSchema = Type.Object({
|
|
1694
|
+
pluginId: Type.Optional(NonEmptyString),
|
|
1695
|
+
title: Type.String({
|
|
1696
|
+
minLength: 1,
|
|
1697
|
+
maxLength: 80
|
|
1698
|
+
}),
|
|
1699
|
+
description: Type.String({
|
|
1700
|
+
minLength: 1,
|
|
1701
|
+
maxLength: 256
|
|
1702
|
+
}),
|
|
1703
|
+
severity: Type.Optional(Type.String({ enum: [
|
|
1704
|
+
"info",
|
|
1705
|
+
"warning",
|
|
1706
|
+
"critical"
|
|
1707
|
+
] })),
|
|
1708
|
+
toolName: Type.Optional(Type.String()),
|
|
1709
|
+
toolCallId: Type.Optional(Type.String()),
|
|
1710
|
+
agentId: Type.Optional(Type.String()),
|
|
1711
|
+
sessionKey: Type.Optional(Type.String()),
|
|
1712
|
+
turnSourceChannel: Type.Optional(Type.String()),
|
|
1713
|
+
turnSourceTo: Type.Optional(Type.String()),
|
|
1714
|
+
turnSourceAccountId: Type.Optional(Type.String()),
|
|
1715
|
+
turnSourceThreadId: Type.Optional(Type.Union([Type.String(), Type.Number()])),
|
|
1716
|
+
timeoutMs: Type.Optional(Type.Integer({
|
|
1717
|
+
minimum: 1,
|
|
1718
|
+
maximum: MAX_PLUGIN_APPROVAL_TIMEOUT_MS
|
|
1719
|
+
})),
|
|
1720
|
+
twoPhase: Type.Optional(Type.Boolean())
|
|
1721
|
+
}, { additionalProperties: false });
|
|
1722
|
+
const PluginApprovalResolveParamsSchema = Type.Object({
|
|
1723
|
+
id: NonEmptyString,
|
|
1724
|
+
decision: NonEmptyString
|
|
1725
|
+
}, { additionalProperties: false });
|
|
1726
|
+
//#endregion
|
|
1727
|
+
//#region src/gateway/protocol/schema/plugins.ts
|
|
1728
|
+
const NullableStringSchema = Type.Union([Type.String(), Type.Null()]);
|
|
1729
|
+
const PluginPackageFamilySchema = Type.Union([Type.Literal("code-plugin"), Type.Literal("bundle-plugin")]);
|
|
1730
|
+
const PluginPackageChannelSchema = Type.Union([
|
|
1731
|
+
Type.Literal("official"),
|
|
1732
|
+
Type.Literal("community"),
|
|
1733
|
+
Type.Literal("private")
|
|
1734
|
+
]);
|
|
1735
|
+
const PluginInstallRecordSchema = Type.Object({
|
|
1736
|
+
source: NonEmptyString,
|
|
1737
|
+
spec: Type.Optional(Type.String()),
|
|
1738
|
+
sourcePath: Type.Optional(Type.String()),
|
|
1739
|
+
installPath: Type.Optional(Type.String()),
|
|
1740
|
+
version: Type.Optional(Type.String()),
|
|
1741
|
+
resolvedName: Type.Optional(Type.String()),
|
|
1742
|
+
resolvedVersion: Type.Optional(Type.String()),
|
|
1743
|
+
resolvedSpec: Type.Optional(Type.String()),
|
|
1744
|
+
marketplaceName: Type.Optional(Type.String()),
|
|
1745
|
+
marketplaceSource: Type.Optional(Type.String()),
|
|
1746
|
+
marketplacePlugin: Type.Optional(Type.String()),
|
|
1747
|
+
clawhubUrl: Type.Optional(Type.String()),
|
|
1748
|
+
clawhubPackage: Type.Optional(Type.String()),
|
|
1749
|
+
clawhubFamily: Type.Optional(Type.String()),
|
|
1750
|
+
clawhubChannel: Type.Optional(Type.String()),
|
|
1751
|
+
installedAt: Type.Optional(Type.String()),
|
|
1752
|
+
resolvedAt: Type.Optional(Type.String())
|
|
1753
|
+
}, { additionalProperties: false });
|
|
1754
|
+
const PluginStatusEntrySchema = Type.Object({
|
|
1755
|
+
id: NonEmptyString,
|
|
1756
|
+
name: NonEmptyString,
|
|
1757
|
+
status: Type.Union([
|
|
1758
|
+
Type.Literal("loaded"),
|
|
1759
|
+
Type.Literal("disabled"),
|
|
1760
|
+
Type.Literal("error")
|
|
1761
|
+
]),
|
|
1762
|
+
source: Type.String(),
|
|
1763
|
+
origin: Type.String(),
|
|
1764
|
+
enabled: Type.Boolean(),
|
|
1765
|
+
explicitlyEnabled: Type.Optional(Type.Boolean()),
|
|
1766
|
+
imported: Type.Optional(Type.Boolean()),
|
|
1767
|
+
description: Type.Optional(Type.String()),
|
|
1768
|
+
version: Type.Optional(Type.String()),
|
|
1769
|
+
format: Type.Optional(Type.String()),
|
|
1770
|
+
bundleFormat: Type.Optional(Type.String()),
|
|
1771
|
+
kind: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String())])),
|
|
1772
|
+
rootDir: Type.Optional(Type.String()),
|
|
1773
|
+
activationReason: Type.Optional(Type.String()),
|
|
1774
|
+
error: Type.Optional(Type.String()),
|
|
1775
|
+
configSchema: Type.Boolean(),
|
|
1776
|
+
install: Type.Optional(PluginInstallRecordSchema),
|
|
1777
|
+
toolNames: Type.Array(Type.String()),
|
|
1778
|
+
channelIds: Type.Array(Type.String()),
|
|
1779
|
+
providerIds: Type.Array(Type.String()),
|
|
1780
|
+
speechProviderIds: Type.Array(Type.String()),
|
|
1781
|
+
webSearchProviderIds: Type.Array(Type.String()),
|
|
1782
|
+
webFetchProviderIds: Type.Array(Type.String()),
|
|
1783
|
+
agentHarnessIds: Type.Array(Type.String()),
|
|
1784
|
+
commands: Type.Array(Type.String()),
|
|
1785
|
+
gatewayMethods: Type.Array(Type.String()),
|
|
1786
|
+
services: Type.Array(Type.String()),
|
|
1787
|
+
httpRoutes: Type.Integer({ minimum: 0 })
|
|
1788
|
+
}, { additionalProperties: false });
|
|
1789
|
+
const PluginsStatusParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1790
|
+
Type.Object({
|
|
1791
|
+
workspaceDir: Type.Optional(Type.String()),
|
|
1792
|
+
plugins: Type.Array(PluginStatusEntrySchema),
|
|
1793
|
+
diagnostics: Type.Array(Type.Object({
|
|
1794
|
+
level: Type.String(),
|
|
1795
|
+
message: Type.String(),
|
|
1796
|
+
pluginId: Type.Optional(Type.String())
|
|
1797
|
+
}, { additionalProperties: false }))
|
|
1798
|
+
}, { additionalProperties: false });
|
|
1799
|
+
const ClawHubPackageListItemSchema = Type.Object({
|
|
1800
|
+
name: NonEmptyString,
|
|
1801
|
+
displayName: NonEmptyString,
|
|
1802
|
+
family: PluginPackageFamilySchema,
|
|
1803
|
+
runtimeId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1804
|
+
channel: PluginPackageChannelSchema,
|
|
1805
|
+
isOfficial: Type.Boolean(),
|
|
1806
|
+
summary: Type.Optional(NullableStringSchema),
|
|
1807
|
+
ownerHandle: Type.Optional(NullableStringSchema),
|
|
1808
|
+
createdAt: Type.Integer(),
|
|
1809
|
+
updatedAt: Type.Integer(),
|
|
1810
|
+
latestVersion: Type.Optional(NullableStringSchema),
|
|
1811
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1812
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1813
|
+
verificationTier: Type.Optional(NullableStringSchema)
|
|
1814
|
+
}, { additionalProperties: false });
|
|
1815
|
+
const PluginsSearchParamsSchema = Type.Object({
|
|
1816
|
+
query: NonEmptyString,
|
|
1817
|
+
limit: Type.Optional(Type.Integer({
|
|
1818
|
+
minimum: 1,
|
|
1819
|
+
maximum: 100
|
|
1820
|
+
}))
|
|
1821
|
+
}, { additionalProperties: false });
|
|
1822
|
+
Type.Object({ results: Type.Array(Type.Object({
|
|
1823
|
+
score: Type.Number(),
|
|
1824
|
+
package: ClawHubPackageListItemSchema
|
|
1825
|
+
}, { additionalProperties: false })) }, { additionalProperties: false });
|
|
1826
|
+
const PluginsDetailParamsSchema = Type.Object({ name: NonEmptyString }, { additionalProperties: false });
|
|
1827
|
+
Type.Object({
|
|
1828
|
+
package: Type.Union([Type.Object({
|
|
1829
|
+
name: NonEmptyString,
|
|
1830
|
+
displayName: NonEmptyString,
|
|
1831
|
+
family: PluginPackageFamilySchema,
|
|
1832
|
+
runtimeId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1833
|
+
channel: PluginPackageChannelSchema,
|
|
1834
|
+
isOfficial: Type.Boolean(),
|
|
1835
|
+
summary: Type.Optional(NullableStringSchema),
|
|
1836
|
+
ownerHandle: Type.Optional(NullableStringSchema),
|
|
1837
|
+
createdAt: Type.Integer(),
|
|
1838
|
+
updatedAt: Type.Integer(),
|
|
1839
|
+
latestVersion: Type.Optional(NullableStringSchema),
|
|
1840
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1841
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1842
|
+
verificationTier: Type.Optional(NullableStringSchema),
|
|
1843
|
+
tags: Type.Optional(Type.Record(NonEmptyString, Type.String())),
|
|
1844
|
+
compatibility: Type.Optional(Type.Union([Type.Object({
|
|
1845
|
+
pluginApiRange: Type.Optional(Type.String()),
|
|
1846
|
+
builtWithGenesisVersion: Type.Optional(Type.String()),
|
|
1847
|
+
pluginSdkVersion: Type.Optional(Type.String()),
|
|
1848
|
+
minGatewayVersion: Type.Optional(Type.String())
|
|
1849
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
1850
|
+
capabilities: Type.Optional(Type.Union([Type.Object({
|
|
1851
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1852
|
+
runtimeId: Type.Optional(Type.String()),
|
|
1853
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1854
|
+
bundleFormat: Type.Optional(Type.String()),
|
|
1855
|
+
hostTargets: Type.Optional(Type.Array(Type.String())),
|
|
1856
|
+
pluginKind: Type.Optional(Type.String()),
|
|
1857
|
+
channels: Type.Optional(Type.Array(Type.String())),
|
|
1858
|
+
providers: Type.Optional(Type.Array(Type.String())),
|
|
1859
|
+
hooks: Type.Optional(Type.Array(Type.String())),
|
|
1860
|
+
bundledSkills: Type.Optional(Type.Array(Type.String()))
|
|
1861
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
1862
|
+
verification: Type.Optional(Type.Union([Type.Object({
|
|
1863
|
+
tier: Type.Optional(Type.String()),
|
|
1864
|
+
scope: Type.Optional(Type.String()),
|
|
1865
|
+
summary: Type.Optional(Type.String()),
|
|
1866
|
+
sourceRepo: Type.Optional(Type.String()),
|
|
1867
|
+
sourceCommit: Type.Optional(Type.String()),
|
|
1868
|
+
hasProvenance: Type.Optional(Type.Boolean()),
|
|
1869
|
+
scanStatus: Type.Optional(Type.String())
|
|
1870
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
1871
|
+
}, { additionalProperties: false }), Type.Null()]),
|
|
1872
|
+
owner: Type.Optional(Type.Union([Type.Object({
|
|
1873
|
+
handle: Type.Optional(NullableStringSchema),
|
|
1874
|
+
displayName: Type.Optional(NullableStringSchema),
|
|
1875
|
+
image: Type.Optional(NullableStringSchema)
|
|
1876
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
1877
|
+
}, { additionalProperties: false });
|
|
1878
|
+
const PluginsInstallParamsSchema = Type.Object({
|
|
1879
|
+
source: Type.Literal("clawhub"),
|
|
1880
|
+
name: NonEmptyString,
|
|
1881
|
+
version: Type.Optional(NonEmptyString),
|
|
1882
|
+
force: Type.Optional(Type.Boolean()),
|
|
1883
|
+
dangerouslyForceUnsafeInstall: Type.Optional(Type.Boolean())
|
|
1884
|
+
}, { additionalProperties: false });
|
|
1885
|
+
Type.Object({
|
|
1886
|
+
ok: Type.Literal(true),
|
|
1887
|
+
message: NonEmptyString,
|
|
1888
|
+
pluginId: NonEmptyString,
|
|
1889
|
+
version: Type.Optional(Type.String()),
|
|
1890
|
+
installPath: Type.Optional(Type.String()),
|
|
1891
|
+
warnings: Type.Array(Type.String())
|
|
1892
|
+
}, { additionalProperties: false });
|
|
1893
|
+
const PluginsUpdateParamsSchema = Type.Object({
|
|
1894
|
+
pluginId: NonEmptyString,
|
|
1895
|
+
enabled: Type.Boolean()
|
|
1896
|
+
}, { additionalProperties: false });
|
|
1897
|
+
Type.Object({
|
|
1898
|
+
ok: Type.Literal(true),
|
|
1899
|
+
pluginId: NonEmptyString,
|
|
1900
|
+
enabled: Type.Boolean(),
|
|
1901
|
+
message: NonEmptyString,
|
|
1902
|
+
warnings: Type.Array(Type.String())
|
|
1903
|
+
}, { additionalProperties: false });
|
|
1904
|
+
const PluginsUninstallParamsSchema = Type.Object({
|
|
1905
|
+
pluginId: NonEmptyString,
|
|
1906
|
+
keepFiles: Type.Optional(Type.Boolean())
|
|
1907
|
+
}, { additionalProperties: false });
|
|
1908
|
+
Type.Object({
|
|
1909
|
+
ok: Type.Literal(true),
|
|
1910
|
+
pluginId: NonEmptyString,
|
|
1911
|
+
removed: Type.Array(Type.String()),
|
|
1912
|
+
warnings: Type.Array(Type.String()),
|
|
1913
|
+
message: NonEmptyString
|
|
1914
|
+
}, { additionalProperties: false });
|
|
1915
|
+
//#endregion
|
|
1916
|
+
//#region src/gateway/protocol/schema/push.ts
|
|
1917
|
+
const ApnsEnvironmentSchema = Type.String({ enum: ["sandbox", "production"] });
|
|
1918
|
+
const PushTestParamsSchema = Type.Object({
|
|
1919
|
+
nodeId: NonEmptyString,
|
|
1920
|
+
title: Type.Optional(Type.String()),
|
|
1921
|
+
body: Type.Optional(Type.String()),
|
|
1922
|
+
environment: Type.Optional(ApnsEnvironmentSchema)
|
|
1923
|
+
}, { additionalProperties: false });
|
|
1924
|
+
Type.Object({
|
|
1925
|
+
ok: Type.Boolean(),
|
|
1926
|
+
status: Type.Integer(),
|
|
1927
|
+
apnsId: Type.Optional(Type.String()),
|
|
1928
|
+
reason: Type.Optional(Type.String()),
|
|
1929
|
+
tokenSuffix: Type.String(),
|
|
1930
|
+
topic: Type.String(),
|
|
1931
|
+
environment: ApnsEnvironmentSchema,
|
|
1932
|
+
transport: Type.String({ enum: ["direct", "relay"] })
|
|
1933
|
+
}, { additionalProperties: false });
|
|
1934
|
+
Type.Object({}, { additionalProperties: false });
|
|
1935
|
+
const SecretsResolveParamsSchema = Type.Object({
|
|
1936
|
+
commandName: NonEmptyString,
|
|
1937
|
+
targetIds: Type.Array(NonEmptyString)
|
|
1938
|
+
}, { additionalProperties: false });
|
|
1939
|
+
const SecretsResolveAssignmentSchema = Type.Object({
|
|
1940
|
+
path: Type.Optional(NonEmptyString),
|
|
1941
|
+
pathSegments: Type.Array(NonEmptyString),
|
|
1942
|
+
value: Type.Unknown()
|
|
1943
|
+
}, { additionalProperties: false });
|
|
1944
|
+
const SecretsResolveResultSchema = Type.Object({
|
|
1945
|
+
ok: Type.Optional(Type.Boolean()),
|
|
1946
|
+
assignments: Type.Optional(Type.Array(SecretsResolveAssignmentSchema)),
|
|
1947
|
+
diagnostics: Type.Optional(Type.Array(NonEmptyString)),
|
|
1948
|
+
inactiveRefPaths: Type.Optional(Type.Array(NonEmptyString))
|
|
1949
|
+
}, { additionalProperties: false });
|
|
1950
|
+
//#endregion
|
|
1951
|
+
//#region src/gateway/protocol/schema/sessions.ts
|
|
1952
|
+
const SessionCompactionCheckpointReasonSchema = Type.Union([
|
|
1953
|
+
Type.Literal("manual"),
|
|
1954
|
+
Type.Literal("auto-threshold"),
|
|
1955
|
+
Type.Literal("overflow-retry"),
|
|
1956
|
+
Type.Literal("timeout-retry")
|
|
1957
|
+
]);
|
|
1958
|
+
const SessionCompactionTranscriptReferenceSchema = Type.Object({
|
|
1959
|
+
sessionId: NonEmptyString,
|
|
1960
|
+
sessionFile: Type.Optional(NonEmptyString),
|
|
1961
|
+
leafId: Type.Optional(NonEmptyString),
|
|
1962
|
+
entryId: Type.Optional(NonEmptyString)
|
|
1963
|
+
}, { additionalProperties: false });
|
|
1964
|
+
const SessionCompactionCheckpointSchema = Type.Object({
|
|
1965
|
+
checkpointId: NonEmptyString,
|
|
1966
|
+
sessionKey: NonEmptyString,
|
|
1967
|
+
sessionId: NonEmptyString,
|
|
1968
|
+
createdAt: Type.Integer({ minimum: 0 }),
|
|
1969
|
+
reason: SessionCompactionCheckpointReasonSchema,
|
|
1970
|
+
tokensBefore: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1971
|
+
tokensAfter: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1972
|
+
summary: Type.Optional(Type.String()),
|
|
1973
|
+
firstKeptEntryId: Type.Optional(NonEmptyString),
|
|
1974
|
+
preCompaction: SessionCompactionTranscriptReferenceSchema,
|
|
1975
|
+
postCompaction: SessionCompactionTranscriptReferenceSchema
|
|
1976
|
+
}, { additionalProperties: false });
|
|
1977
|
+
const SessionsListParamsSchema = Type.Object({
|
|
1978
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1979
|
+
activeMinutes: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1980
|
+
includeGlobal: Type.Optional(Type.Boolean()),
|
|
1981
|
+
includeUnknown: Type.Optional(Type.Boolean()),
|
|
1982
|
+
includeDerivedTitles: Type.Optional(Type.Boolean()),
|
|
1983
|
+
includeLastMessage: Type.Optional(Type.Boolean()),
|
|
1984
|
+
includeTranscriptUsage: Type.Optional(Type.Boolean()),
|
|
1985
|
+
label: Type.Optional(SessionLabelString),
|
|
1986
|
+
spawnedBy: Type.Optional(NonEmptyString),
|
|
1987
|
+
agentId: Type.Optional(NonEmptyString),
|
|
1988
|
+
search: Type.Optional(Type.String())
|
|
1989
|
+
}, { additionalProperties: false });
|
|
1990
|
+
const SessionsPreviewParamsSchema = Type.Object({
|
|
1991
|
+
keys: Type.Array(NonEmptyString, { minItems: 1 }),
|
|
1992
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1993
|
+
maxChars: Type.Optional(Type.Integer({ minimum: 20 }))
|
|
1994
|
+
}, { additionalProperties: false });
|
|
1995
|
+
const SessionsResolveParamsSchema = Type.Object({
|
|
1996
|
+
key: Type.Optional(NonEmptyString),
|
|
1997
|
+
sessionId: Type.Optional(NonEmptyString),
|
|
1998
|
+
label: Type.Optional(SessionLabelString),
|
|
1999
|
+
agentId: Type.Optional(NonEmptyString),
|
|
2000
|
+
spawnedBy: Type.Optional(NonEmptyString),
|
|
2001
|
+
includeGlobal: Type.Optional(Type.Boolean()),
|
|
2002
|
+
includeUnknown: Type.Optional(Type.Boolean())
|
|
2003
|
+
}, { additionalProperties: false });
|
|
2004
|
+
const SessionsCreateParamsSchema = Type.Object({
|
|
2005
|
+
key: Type.Optional(NonEmptyString),
|
|
2006
|
+
agentId: Type.Optional(NonEmptyString),
|
|
2007
|
+
label: Type.Optional(SessionLabelString),
|
|
2008
|
+
model: Type.Optional(NonEmptyString),
|
|
2009
|
+
parentSessionKey: Type.Optional(NonEmptyString),
|
|
2010
|
+
task: Type.Optional(Type.String()),
|
|
2011
|
+
message: Type.Optional(Type.String())
|
|
2012
|
+
}, { additionalProperties: false });
|
|
2013
|
+
const SessionsSendParamsSchema = Type.Object({
|
|
2014
|
+
key: NonEmptyString,
|
|
2015
|
+
message: Type.String(),
|
|
2016
|
+
thinking: Type.Optional(Type.String()),
|
|
2017
|
+
attachments: Type.Optional(Type.Array(Type.Unknown())),
|
|
2018
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
2019
|
+
idempotencyKey: Type.Optional(NonEmptyString)
|
|
2020
|
+
}, { additionalProperties: false });
|
|
2021
|
+
const SessionsMessagesSubscribeParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
2022
|
+
const SessionsMessagesUnsubscribeParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
2023
|
+
const SessionsAbortParamsSchema = Type.Object({
|
|
2024
|
+
key: NonEmptyString,
|
|
2025
|
+
runId: Type.Optional(NonEmptyString)
|
|
2026
|
+
}, { additionalProperties: false });
|
|
2027
|
+
const SessionsPatchParamsSchema = Type.Object({
|
|
2028
|
+
key: NonEmptyString,
|
|
2029
|
+
label: Type.Optional(Type.Union([SessionLabelString, Type.Null()])),
|
|
2030
|
+
thinkingLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2031
|
+
fastMode: Type.Optional(Type.Union([Type.Boolean(), Type.Null()])),
|
|
2032
|
+
verboseLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2033
|
+
traceLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2034
|
+
reasoningLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2035
|
+
responseUsage: Type.Optional(Type.Union([
|
|
2036
|
+
Type.Literal("off"),
|
|
2037
|
+
Type.Literal("tokens"),
|
|
2038
|
+
Type.Literal("full"),
|
|
2039
|
+
Type.Literal("on"),
|
|
2040
|
+
Type.Null()
|
|
2041
|
+
])),
|
|
2042
|
+
elevatedLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2043
|
+
execHost: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2044
|
+
execSecurity: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2045
|
+
execAsk: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2046
|
+
execNode: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2047
|
+
model: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2048
|
+
spawnedBy: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2049
|
+
spawnedWorkspaceDir: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
2050
|
+
spawnDepth: Type.Optional(Type.Union([Type.Integer({ minimum: 0 }), Type.Null()])),
|
|
2051
|
+
subagentRole: Type.Optional(Type.Union([
|
|
2052
|
+
Type.Literal("orchestrator"),
|
|
2053
|
+
Type.Literal("leaf"),
|
|
2054
|
+
Type.Null()
|
|
2055
|
+
])),
|
|
2056
|
+
subagentControlScope: Type.Optional(Type.Union([
|
|
2057
|
+
Type.Literal("children"),
|
|
2058
|
+
Type.Literal("none"),
|
|
2059
|
+
Type.Null()
|
|
2060
|
+
])),
|
|
2061
|
+
sendPolicy: Type.Optional(Type.Union([
|
|
2062
|
+
Type.Literal("allow"),
|
|
2063
|
+
Type.Literal("deny"),
|
|
2064
|
+
Type.Null()
|
|
2065
|
+
])),
|
|
2066
|
+
groupActivation: Type.Optional(Type.Union([
|
|
2067
|
+
Type.Literal("mention"),
|
|
2068
|
+
Type.Literal("always"),
|
|
2069
|
+
Type.Null()
|
|
2070
|
+
]))
|
|
2071
|
+
}, { additionalProperties: false });
|
|
2072
|
+
const SessionsResetParamsSchema = Type.Object({
|
|
2073
|
+
key: NonEmptyString,
|
|
2074
|
+
reason: Type.Optional(Type.Union([Type.Literal("new"), Type.Literal("reset")]))
|
|
2075
|
+
}, { additionalProperties: false });
|
|
2076
|
+
const SessionsDeleteParamsSchema = Type.Object({
|
|
2077
|
+
key: NonEmptyString,
|
|
2078
|
+
deleteTranscript: Type.Optional(Type.Boolean()),
|
|
2079
|
+
emitLifecycleHooks: Type.Optional(Type.Boolean())
|
|
2080
|
+
}, { additionalProperties: false });
|
|
2081
|
+
const SessionsCompactParamsSchema = Type.Object({
|
|
2082
|
+
key: NonEmptyString,
|
|
2083
|
+
maxLines: Type.Optional(Type.Integer({ minimum: 1 }))
|
|
2084
|
+
}, { additionalProperties: false });
|
|
2085
|
+
const SessionsCompactionListParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
2086
|
+
const SessionsCompactionGetParamsSchema = Type.Object({
|
|
2087
|
+
key: NonEmptyString,
|
|
2088
|
+
checkpointId: NonEmptyString
|
|
2089
|
+
}, { additionalProperties: false });
|
|
2090
|
+
const SessionsCompactionBranchParamsSchema = Type.Object({
|
|
2091
|
+
key: NonEmptyString,
|
|
2092
|
+
checkpointId: NonEmptyString
|
|
2093
|
+
}, { additionalProperties: false });
|
|
2094
|
+
const SessionsCompactionRestoreParamsSchema = Type.Object({
|
|
2095
|
+
key: NonEmptyString,
|
|
2096
|
+
checkpointId: NonEmptyString
|
|
2097
|
+
}, { additionalProperties: false });
|
|
2098
|
+
Type.Object({
|
|
2099
|
+
ok: Type.Literal(true),
|
|
2100
|
+
key: NonEmptyString,
|
|
2101
|
+
checkpoints: Type.Array(SessionCompactionCheckpointSchema)
|
|
2102
|
+
}, { additionalProperties: false });
|
|
2103
|
+
Type.Object({
|
|
2104
|
+
ok: Type.Literal(true),
|
|
2105
|
+
key: NonEmptyString,
|
|
2106
|
+
checkpoint: SessionCompactionCheckpointSchema
|
|
2107
|
+
}, { additionalProperties: false });
|
|
2108
|
+
Type.Object({
|
|
2109
|
+
ok: Type.Literal(true),
|
|
2110
|
+
sourceKey: NonEmptyString,
|
|
2111
|
+
key: NonEmptyString,
|
|
2112
|
+
sessionId: NonEmptyString,
|
|
2113
|
+
checkpoint: SessionCompactionCheckpointSchema,
|
|
2114
|
+
entry: Type.Object({
|
|
2115
|
+
sessionId: NonEmptyString,
|
|
2116
|
+
updatedAt: Type.Integer({ minimum: 0 })
|
|
2117
|
+
}, { additionalProperties: true })
|
|
2118
|
+
}, { additionalProperties: false });
|
|
2119
|
+
Type.Object({
|
|
2120
|
+
ok: Type.Literal(true),
|
|
2121
|
+
key: NonEmptyString,
|
|
2122
|
+
sessionId: NonEmptyString,
|
|
2123
|
+
checkpoint: SessionCompactionCheckpointSchema,
|
|
2124
|
+
entry: Type.Object({
|
|
2125
|
+
sessionId: NonEmptyString,
|
|
2126
|
+
updatedAt: Type.Integer({ minimum: 0 })
|
|
2127
|
+
}, { additionalProperties: true })
|
|
2128
|
+
}, { additionalProperties: false });
|
|
2129
|
+
const SessionsUsageParamsSchema = Type.Object({
|
|
2130
|
+
key: Type.Optional(NonEmptyString),
|
|
2131
|
+
startDate: Type.Optional(Type.String({ pattern: "^\\d{4}-\\d{2}-\\d{2}$" })),
|
|
2132
|
+
endDate: Type.Optional(Type.String({ pattern: "^\\d{4}-\\d{2}-\\d{2}$" })),
|
|
2133
|
+
mode: Type.Optional(Type.Union([
|
|
2134
|
+
Type.Literal("utc"),
|
|
2135
|
+
Type.Literal("gateway"),
|
|
2136
|
+
Type.Literal("specific")
|
|
2137
|
+
])),
|
|
2138
|
+
utcOffset: Type.Optional(Type.String({ pattern: "^UTC[+-]\\d{1,2}(?::[0-5]\\d)?$" })),
|
|
2139
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
2140
|
+
includeContextWeight: Type.Optional(Type.Boolean())
|
|
2141
|
+
}, { additionalProperties: false });
|
|
2142
|
+
//#endregion
|
|
2143
|
+
//#region src/gateway/protocol/schema/wallet.ts
|
|
2144
|
+
const WalletChainSchema = Type.Union([
|
|
2145
|
+
Type.Literal("btc"),
|
|
2146
|
+
Type.Literal("evm"),
|
|
2147
|
+
Type.Literal("sol"),
|
|
2148
|
+
Type.Literal("trx"),
|
|
2149
|
+
Type.Literal("xmr"),
|
|
2150
|
+
Type.Literal("lndhub")
|
|
2151
|
+
]);
|
|
2152
|
+
const WalletSummaryParamsSchema = Type.Object({
|
|
2153
|
+
includeBalances: Type.Optional(Type.Boolean()),
|
|
2154
|
+
includeTokens: Type.Optional(Type.Boolean()),
|
|
2155
|
+
includeNfts: Type.Optional(Type.Boolean())
|
|
2156
|
+
}, { additionalProperties: false });
|
|
2157
|
+
const WalletRecoveryPhraseModeSchema = Type.Union([Type.Literal("generate"), Type.Literal("import")]);
|
|
2158
|
+
const WalletRecoveryPhraseSetParamsSchema = Type.Object({
|
|
2159
|
+
mode: WalletRecoveryPhraseModeSchema,
|
|
2160
|
+
passphrase: Type.Optional(Type.String({ maxLength: 16 * 1024 })),
|
|
2161
|
+
mnemonic: Type.Optional(Type.String({
|
|
2162
|
+
minLength: 1,
|
|
2163
|
+
maxLength: 64 * 1024
|
|
2164
|
+
})),
|
|
2165
|
+
overwrite: Type.Optional(Type.Boolean())
|
|
2166
|
+
}, { additionalProperties: false });
|
|
2167
|
+
const WalletPublicAccountSchema = Type.Object({
|
|
2168
|
+
id: Type.String({ minLength: 1 }),
|
|
2169
|
+
chain: WalletChainSchema,
|
|
2170
|
+
address: Type.String({ minLength: 1 }),
|
|
2171
|
+
label: Type.Optional(Type.String()),
|
|
2172
|
+
network: Type.Optional(Type.String()),
|
|
2173
|
+
derivationPath: Type.Optional(Type.String()),
|
|
2174
|
+
createdAt: Type.String(),
|
|
2175
|
+
updatedAt: Type.String()
|
|
2176
|
+
}, { additionalProperties: false });
|
|
2177
|
+
const WalletBalanceSchema = Type.Object({
|
|
2178
|
+
chain: WalletChainSchema,
|
|
2179
|
+
accountId: Type.String({ minLength: 1 }),
|
|
2180
|
+
address: Type.String({ minLength: 1 }),
|
|
2181
|
+
network: Type.Optional(Type.String()),
|
|
2182
|
+
asset: Type.String({ minLength: 1 }),
|
|
2183
|
+
amountAtomic: Type.String(),
|
|
2184
|
+
amount: Type.String(),
|
|
2185
|
+
confirmedAmountAtomic: Type.Optional(Type.String()),
|
|
2186
|
+
pendingAmountAtomic: Type.Optional(Type.String())
|
|
2187
|
+
}, { additionalProperties: false });
|
|
2188
|
+
const WalletTokenBalanceSchema = Type.Object({
|
|
2189
|
+
chain: Type.Literal("evm"),
|
|
2190
|
+
accountId: Type.String({ minLength: 1 }),
|
|
2191
|
+
address: Type.String({ minLength: 1 }),
|
|
2192
|
+
network: Type.Optional(Type.String()),
|
|
2193
|
+
tokenId: Type.String({ minLength: 1 }),
|
|
2194
|
+
contractAddress: Type.String({ minLength: 1 }),
|
|
2195
|
+
asset: Type.String({ minLength: 1 }),
|
|
2196
|
+
name: Type.Optional(Type.String()),
|
|
2197
|
+
decimals: Type.Number(),
|
|
2198
|
+
amountAtomic: Type.String(),
|
|
2199
|
+
amount: Type.String()
|
|
2200
|
+
}, { additionalProperties: false });
|
|
2201
|
+
const WalletNftTokenSchema = Type.Object({
|
|
2202
|
+
tokenId: Type.String({ minLength: 1 }),
|
|
2203
|
+
amount: Type.Optional(Type.String()),
|
|
2204
|
+
tokenUri: Type.Optional(Type.String())
|
|
2205
|
+
}, { additionalProperties: false });
|
|
2206
|
+
const WalletNftCollectionSchema = Type.Object({
|
|
2207
|
+
chain: Type.Literal("evm"),
|
|
2208
|
+
accountId: Type.String({ minLength: 1 }),
|
|
2209
|
+
address: Type.String({ minLength: 1 }),
|
|
2210
|
+
network: Type.Optional(Type.String()),
|
|
2211
|
+
collectionId: Type.String({ minLength: 1 }),
|
|
2212
|
+
contractAddress: Type.String({ minLength: 1 }),
|
|
2213
|
+
standard: Type.Union([Type.Literal("erc721"), Type.Literal("erc1155")]),
|
|
2214
|
+
name: Type.Optional(Type.String()),
|
|
2215
|
+
symbol: Type.Optional(Type.String()),
|
|
2216
|
+
balance: Type.Optional(Type.String()),
|
|
2217
|
+
tokens: Type.Array(WalletNftTokenSchema)
|
|
2218
|
+
}, { additionalProperties: false });
|
|
2219
|
+
const WalletSummaryResultSchema = Type.Object({
|
|
2220
|
+
enabled: Type.Boolean(),
|
|
2221
|
+
keystore: Type.Object({
|
|
2222
|
+
exists: Type.Boolean(),
|
|
2223
|
+
locked: Type.Boolean()
|
|
2224
|
+
}, { additionalProperties: false }),
|
|
2225
|
+
primaryAccount: Type.Optional(Type.String()),
|
|
2226
|
+
accounts: Type.Array(WalletPublicAccountSchema),
|
|
2227
|
+
balances: Type.Optional(Type.Array(WalletBalanceSchema)),
|
|
2228
|
+
tokens: Type.Optional(Type.Array(WalletTokenBalanceSchema)),
|
|
2229
|
+
nfts: Type.Optional(Type.Array(WalletNftCollectionSchema)),
|
|
2230
|
+
warnings: Type.Array(Type.String())
|
|
2231
|
+
}, { additionalProperties: false });
|
|
2232
|
+
const WalletRecoveryPhraseSetResultSchema = Type.Object({
|
|
2233
|
+
mnemonicGenerated: Type.Boolean(),
|
|
2234
|
+
mnemonic: Type.Optional(Type.String({ minLength: 1 })),
|
|
2235
|
+
summary: WalletSummaryResultSchema
|
|
2236
|
+
}, { additionalProperties: false });
|
|
2237
|
+
//#endregion
|
|
2238
|
+
//#region src/gateway/protocol/schema/wizard.ts
|
|
2239
|
+
const WizardRunStatusSchema = Type.Union([
|
|
2240
|
+
Type.Literal("running"),
|
|
2241
|
+
Type.Literal("done"),
|
|
2242
|
+
Type.Literal("cancelled"),
|
|
2243
|
+
Type.Literal("error")
|
|
2244
|
+
]);
|
|
2245
|
+
const WizardStartParamsSchema = Type.Object({
|
|
2246
|
+
target: Type.Optional(Type.Union([
|
|
2247
|
+
Type.Literal("setup"),
|
|
2248
|
+
Type.Literal("channels"),
|
|
2249
|
+
Type.Literal("models")
|
|
2250
|
+
])),
|
|
2251
|
+
mode: Type.Optional(Type.Union([Type.Literal("local"), Type.Literal("remote")])),
|
|
2252
|
+
workspace: Type.Optional(Type.String()),
|
|
2253
|
+
channel: Type.Optional(Type.String()),
|
|
2254
|
+
provider: Type.Optional(Type.String()),
|
|
2255
|
+
authMethod: Type.Optional(Type.String()),
|
|
2256
|
+
setDefault: Type.Optional(Type.Boolean())
|
|
2257
|
+
}, { additionalProperties: false });
|
|
2258
|
+
const WizardAnswerSchema = Type.Object({
|
|
2259
|
+
stepId: NonEmptyString,
|
|
2260
|
+
value: Type.Optional(Type.Unknown())
|
|
2261
|
+
}, { additionalProperties: false });
|
|
2262
|
+
const WizardNextParamsSchema = Type.Object({
|
|
2263
|
+
sessionId: NonEmptyString,
|
|
2264
|
+
answer: Type.Optional(WizardAnswerSchema)
|
|
2265
|
+
}, { additionalProperties: false });
|
|
2266
|
+
const WizardSessionIdParamsSchema = Type.Object({ sessionId: NonEmptyString }, { additionalProperties: false });
|
|
2267
|
+
const WizardCancelParamsSchema = WizardSessionIdParamsSchema;
|
|
2268
|
+
const WizardStatusParamsSchema = WizardSessionIdParamsSchema;
|
|
2269
|
+
const WizardStepOptionSchema = Type.Object({
|
|
2270
|
+
value: Type.Unknown(),
|
|
2271
|
+
label: NonEmptyString,
|
|
2272
|
+
hint: Type.Optional(Type.String())
|
|
2273
|
+
}, { additionalProperties: false });
|
|
2274
|
+
const WizardStepSchema = Type.Object({
|
|
2275
|
+
id: NonEmptyString,
|
|
2276
|
+
type: Type.Union([
|
|
2277
|
+
Type.Literal("note"),
|
|
2278
|
+
Type.Literal("select"),
|
|
2279
|
+
Type.Literal("text"),
|
|
2280
|
+
Type.Literal("confirm"),
|
|
2281
|
+
Type.Literal("multiselect"),
|
|
2282
|
+
Type.Literal("progress"),
|
|
2283
|
+
Type.Literal("action")
|
|
2284
|
+
]),
|
|
2285
|
+
title: Type.Optional(Type.String()),
|
|
2286
|
+
message: Type.Optional(Type.String()),
|
|
2287
|
+
options: Type.Optional(Type.Array(WizardStepOptionSchema)),
|
|
2288
|
+
initialValue: Type.Optional(Type.Unknown()),
|
|
2289
|
+
placeholder: Type.Optional(Type.String()),
|
|
2290
|
+
sensitive: Type.Optional(Type.Boolean()),
|
|
2291
|
+
executor: Type.Optional(Type.Union([Type.Literal("gateway"), Type.Literal("client")]))
|
|
2292
|
+
}, { additionalProperties: false });
|
|
2293
|
+
const WizardResultFields = {
|
|
2294
|
+
done: Type.Boolean(),
|
|
2295
|
+
step: Type.Optional(WizardStepSchema),
|
|
2296
|
+
status: Type.Optional(WizardRunStatusSchema),
|
|
2297
|
+
error: Type.Optional(Type.String())
|
|
2298
|
+
};
|
|
2299
|
+
Type.Object(WizardResultFields, { additionalProperties: false });
|
|
2300
|
+
Type.Object({
|
|
2301
|
+
sessionId: NonEmptyString,
|
|
2302
|
+
...WizardResultFields
|
|
2303
|
+
}, { additionalProperties: false });
|
|
2304
|
+
Type.Object({
|
|
2305
|
+
status: WizardRunStatusSchema,
|
|
2306
|
+
error: Type.Optional(Type.String())
|
|
2307
|
+
}, { additionalProperties: false });
|
|
2308
|
+
//#endregion
|
|
2309
|
+
//#region src/gateway/protocol/index.ts
|
|
2310
|
+
const ajv = new AjvPkg({
|
|
2311
|
+
allErrors: true,
|
|
2312
|
+
strict: false,
|
|
2313
|
+
removeAdditional: false
|
|
2314
|
+
});
|
|
2315
|
+
const validateCommandsListParams = ajv.compile(CommandsListParamsSchema);
|
|
2316
|
+
const validateConnectParams = ajv.compile(ConnectParamsSchema);
|
|
2317
|
+
const validateRequestFrame = ajv.compile(RequestFrameSchema);
|
|
2318
|
+
const validateResponseFrame = ajv.compile(ResponseFrameSchema);
|
|
2319
|
+
const validateEventFrame = ajv.compile(EventFrameSchema);
|
|
2320
|
+
const validateMessageActionParams = ajv.compile(MessageActionParamsSchema);
|
|
2321
|
+
const validateSendParams = ajv.compile(SendParamsSchema);
|
|
2322
|
+
const validatePollParams = ajv.compile(PollParamsSchema);
|
|
2323
|
+
const validateAgentParams = ajv.compile(AgentParamsSchema);
|
|
2324
|
+
const validateAgentIdentityParams = ajv.compile(AgentIdentityParamsSchema);
|
|
2325
|
+
const validateAgentWaitParams = ajv.compile(AgentWaitParamsSchema);
|
|
2326
|
+
const validateWakeParams = ajv.compile(WakeParamsSchema);
|
|
2327
|
+
const validateAgentsListParams = ajv.compile(AgentsListParamsSchema);
|
|
2328
|
+
const validateAgentsCreateParams = ajv.compile(AgentsCreateParamsSchema);
|
|
2329
|
+
const validateAgentsUpdateParams = ajv.compile(AgentsUpdateParamsSchema);
|
|
2330
|
+
const validateAgentsDeleteParams = ajv.compile(AgentsDeleteParamsSchema);
|
|
2331
|
+
const validateAgentsFilesListParams = ajv.compile(AgentsFilesListParamsSchema);
|
|
2332
|
+
const validateAgentsFilesGetParams = ajv.compile(AgentsFilesGetParamsSchema);
|
|
2333
|
+
const validateAgentsFilesSetParams = ajv.compile(AgentsFilesSetParamsSchema);
|
|
2334
|
+
const validateNodePairRequestParams = ajv.compile(NodePairRequestParamsSchema);
|
|
2335
|
+
const validateNodePairListParams = ajv.compile(NodePairListParamsSchema);
|
|
2336
|
+
const validateNodePairApproveParams = ajv.compile(NodePairApproveParamsSchema);
|
|
2337
|
+
const validateNodePairRejectParams = ajv.compile(NodePairRejectParamsSchema);
|
|
2338
|
+
const validateNodePairVerifyParams = ajv.compile(NodePairVerifyParamsSchema);
|
|
2339
|
+
const validateNodeRenameParams = ajv.compile(NodeRenameParamsSchema);
|
|
2340
|
+
const validateNodeListParams = ajv.compile(NodeListParamsSchema);
|
|
2341
|
+
const validateNodePendingAckParams = ajv.compile(NodePendingAckParamsSchema);
|
|
2342
|
+
const validateNodeDescribeParams = ajv.compile(NodeDescribeParamsSchema);
|
|
2343
|
+
const validateNodeInvokeParams = ajv.compile(NodeInvokeParamsSchema);
|
|
2344
|
+
const validateNodeInvokeResultParams = ajv.compile(NodeInvokeResultParamsSchema);
|
|
2345
|
+
const validateNodeEventParams = ajv.compile(NodeEventParamsSchema);
|
|
2346
|
+
const validateNodePendingDrainParams = ajv.compile(NodePendingDrainParamsSchema);
|
|
2347
|
+
const validateNodePendingEnqueueParams = ajv.compile(NodePendingEnqueueParamsSchema);
|
|
2348
|
+
const validateCanvasDocumentCreateParams = ajv.compile(CanvasDocumentCreateParamsSchema);
|
|
2349
|
+
const validateCanvasDocumentUpdateParams = ajv.compile(CanvasDocumentUpdateParamsSchema);
|
|
2350
|
+
ajv.compile(CanvasDocumentCreateResultSchema);
|
|
2351
|
+
const validateCanvasDocumentListParams = ajv.compile(CanvasDocumentListParamsSchema);
|
|
2352
|
+
ajv.compile(CanvasDocumentListResultSchema);
|
|
2353
|
+
const validatePushTestParams = ajv.compile(PushTestParamsSchema);
|
|
2354
|
+
const validateSecretsResolveParams = ajv.compile(SecretsResolveParamsSchema);
|
|
2355
|
+
const validateSecretsResolveResult = ajv.compile(SecretsResolveResultSchema);
|
|
2356
|
+
const validateSessionsListParams = ajv.compile(SessionsListParamsSchema);
|
|
2357
|
+
const validateSessionsPreviewParams = ajv.compile(SessionsPreviewParamsSchema);
|
|
2358
|
+
const validateSessionsResolveParams = ajv.compile(SessionsResolveParamsSchema);
|
|
2359
|
+
const validateSessionsCreateParams = ajv.compile(SessionsCreateParamsSchema);
|
|
2360
|
+
const validateSessionsSendParams = ajv.compile(SessionsSendParamsSchema);
|
|
2361
|
+
const validateSessionsMessagesSubscribeParams = ajv.compile(SessionsMessagesSubscribeParamsSchema);
|
|
2362
|
+
const validateSessionsMessagesUnsubscribeParams = ajv.compile(SessionsMessagesUnsubscribeParamsSchema);
|
|
2363
|
+
const validateSessionsAbortParams = ajv.compile(SessionsAbortParamsSchema);
|
|
2364
|
+
const validateSessionsPatchParams = ajv.compile(SessionsPatchParamsSchema);
|
|
2365
|
+
const validateSessionsResetParams = ajv.compile(SessionsResetParamsSchema);
|
|
2366
|
+
const validateSessionsDeleteParams = ajv.compile(SessionsDeleteParamsSchema);
|
|
2367
|
+
const validateSessionsCompactParams = ajv.compile(SessionsCompactParamsSchema);
|
|
2368
|
+
const validateSessionsCompactionListParams = ajv.compile(SessionsCompactionListParamsSchema);
|
|
2369
|
+
const validateSessionsCompactionGetParams = ajv.compile(SessionsCompactionGetParamsSchema);
|
|
2370
|
+
const validateSessionsCompactionBranchParams = ajv.compile(SessionsCompactionBranchParamsSchema);
|
|
2371
|
+
const validateSessionsCompactionRestoreParams = ajv.compile(SessionsCompactionRestoreParamsSchema);
|
|
2372
|
+
const validateSessionsUsageParams = ajv.compile(SessionsUsageParamsSchema);
|
|
2373
|
+
const validateConfigGetParams = ajv.compile(ConfigGetParamsSchema);
|
|
2374
|
+
const validateConfigSetParams = ajv.compile(ConfigSetParamsSchema);
|
|
2375
|
+
const validateConfigApplyParams = ajv.compile(ConfigApplyParamsSchema);
|
|
2376
|
+
const validateConfigPatchParams = ajv.compile(ConfigPatchParamsSchema);
|
|
2377
|
+
const validateConfigSchemaParams = ajv.compile(ConfigSchemaParamsSchema);
|
|
2378
|
+
const validateConfigSchemaLookupParams = ajv.compile(ConfigSchemaLookupParamsSchema);
|
|
2379
|
+
const validateConfigSchemaLookupResult = ajv.compile(ConfigSchemaLookupResultSchema);
|
|
2380
|
+
const validateWizardStartParams = ajv.compile(WizardStartParamsSchema);
|
|
2381
|
+
const validateWizardNextParams = ajv.compile(WizardNextParamsSchema);
|
|
2382
|
+
const validateWizardCancelParams = ajv.compile(WizardCancelParamsSchema);
|
|
2383
|
+
const validateWizardStatusParams = ajv.compile(WizardStatusParamsSchema);
|
|
2384
|
+
const validateTalkModeParams = ajv.compile(TalkModeParamsSchema);
|
|
2385
|
+
const validateTalkConfigParams = ajv.compile(TalkConfigParamsSchema);
|
|
2386
|
+
ajv.compile(TalkConfigResultSchema);
|
|
2387
|
+
const validateTalkRealtimeSessionParams = ajv.compile(TalkRealtimeSessionParamsSchema);
|
|
2388
|
+
ajv.compile(TalkRealtimeSessionResultSchema);
|
|
2389
|
+
const validateTalkSpeakParams = ajv.compile(TalkSpeakParamsSchema);
|
|
2390
|
+
ajv.compile(TalkSpeakResultSchema);
|
|
2391
|
+
const validateChannelsStatusParams = ajv.compile(ChannelsStatusParamsSchema);
|
|
2392
|
+
const validateChannelsStartParams = ajv.compile(ChannelsStartParamsSchema);
|
|
2393
|
+
const validateChannelsLogoutParams = ajv.compile(ChannelsLogoutParamsSchema);
|
|
2394
|
+
const validateModelsListParams = ajv.compile(ModelsListParamsSchema);
|
|
2395
|
+
const validateSkillsStatusParams = ajv.compile(SkillsStatusParamsSchema);
|
|
2396
|
+
const validateToolsCatalogParams = ajv.compile(ToolsCatalogParamsSchema);
|
|
2397
|
+
const validateMcpServersListParams = ajv.compile(McpServersListParamsSchema);
|
|
2398
|
+
const validateMcpServerSetParams = ajv.compile(McpServerSetParamsSchema);
|
|
2399
|
+
const validateMcpServerUnsetParams = ajv.compile(McpServerUnsetParamsSchema);
|
|
2400
|
+
const validateMcpServerMetadataParams = ajv.compile(McpServerMetadataParamsSchema);
|
|
2401
|
+
const validateMcpServerTestParams = ajv.compile(McpServerTestParamsSchema);
|
|
2402
|
+
const validateMcpOAuthStartParams = ajv.compile(McpOAuthStartParamsSchema);
|
|
2403
|
+
const validateMcpOAuthCallbackParams = ajv.compile(McpOAuthCallbackParamsSchema);
|
|
2404
|
+
const validateMcpOAuthStatusParams = ajv.compile(McpOAuthStatusParamsSchema);
|
|
2405
|
+
const validateMcpOAuthDisconnectParams = ajv.compile(McpOAuthDisconnectParamsSchema);
|
|
2406
|
+
const validateMcpOAuthRefreshParams = ajv.compile(McpOAuthRefreshParamsSchema);
|
|
2407
|
+
const validateToolsEffectiveParams = ajv.compile(ToolsEffectiveParamsSchema);
|
|
2408
|
+
const validateSkillsBinsParams = ajv.compile(SkillsBinsParamsSchema);
|
|
2409
|
+
const validateSkillsInstallParams = ajv.compile(SkillsInstallParamsSchema);
|
|
2410
|
+
const validateSkillsUpdateParams = ajv.compile(SkillsUpdateParamsSchema);
|
|
2411
|
+
const validateSkillsSearchParams = ajv.compile(SkillsSearchParamsSchema);
|
|
2412
|
+
const validateSkillsDetailParams = ajv.compile(SkillsDetailParamsSchema);
|
|
2413
|
+
const validateCronListParams = ajv.compile(CronListParamsSchema);
|
|
2414
|
+
const validateCronStatusParams = ajv.compile(CronStatusParamsSchema);
|
|
2415
|
+
const validateCronAddParams = ajv.compile(CronAddParamsSchema);
|
|
2416
|
+
const validateCronUpdateParams = ajv.compile(CronUpdateParamsSchema);
|
|
2417
|
+
const validateCronRemoveParams = ajv.compile(CronRemoveParamsSchema);
|
|
2418
|
+
const validateCronRunParams = ajv.compile(CronRunParamsSchema);
|
|
2419
|
+
const validateCronRunsParams = ajv.compile(CronRunsParamsSchema);
|
|
2420
|
+
const validateDevicePairListParams = ajv.compile(DevicePairListParamsSchema);
|
|
2421
|
+
const validateDevicePairApproveParams = ajv.compile(DevicePairApproveParamsSchema);
|
|
2422
|
+
const validateDevicePairRejectParams = ajv.compile(DevicePairRejectParamsSchema);
|
|
2423
|
+
const validateDevicePairRemoveParams = ajv.compile(DevicePairRemoveParamsSchema);
|
|
2424
|
+
const validateDeviceTokenRotateParams = ajv.compile(DeviceTokenRotateParamsSchema);
|
|
2425
|
+
const validateDeviceTokenRevokeParams = ajv.compile(DeviceTokenRevokeParamsSchema);
|
|
2426
|
+
const validateExecApprovalsGetParams = ajv.compile(ExecApprovalsGetParamsSchema);
|
|
2427
|
+
const validateExecApprovalsSetParams = ajv.compile(ExecApprovalsSetParamsSchema);
|
|
2428
|
+
const validateExecApprovalGetParams = ajv.compile(ExecApprovalGetParamsSchema);
|
|
2429
|
+
const validateExecApprovalRequestParams = ajv.compile(ExecApprovalRequestParamsSchema);
|
|
2430
|
+
const validateExecApprovalResolveParams = ajv.compile(ExecApprovalResolveParamsSchema);
|
|
2431
|
+
const validatePluginApprovalRequestParams = ajv.compile(PluginApprovalRequestParamsSchema);
|
|
2432
|
+
const validatePluginApprovalResolveParams = ajv.compile(PluginApprovalResolveParamsSchema);
|
|
2433
|
+
const validatePluginsStatusParams = ajv.compile(PluginsStatusParamsSchema);
|
|
2434
|
+
const validatePluginsSearchParams = ajv.compile(PluginsSearchParamsSchema);
|
|
2435
|
+
const validatePluginsDetailParams = ajv.compile(PluginsDetailParamsSchema);
|
|
2436
|
+
const validatePluginsInstallParams = ajv.compile(PluginsInstallParamsSchema);
|
|
2437
|
+
const validatePluginsUpdateParams = ajv.compile(PluginsUpdateParamsSchema);
|
|
2438
|
+
const validatePluginsUninstallParams = ajv.compile(PluginsUninstallParamsSchema);
|
|
2439
|
+
const validateExecApprovalsNodeGetParams = ajv.compile(ExecApprovalsNodeGetParamsSchema);
|
|
2440
|
+
const validateExecApprovalsNodeSetParams = ajv.compile(ExecApprovalsNodeSetParamsSchema);
|
|
2441
|
+
const validateLogsTailParams = ajv.compile(LogsTailParamsSchema);
|
|
2442
|
+
const validateChatHistoryParams = ajv.compile(ChatHistoryParamsSchema);
|
|
2443
|
+
const validateChatSendParams = ajv.compile(ChatSendParamsSchema);
|
|
2444
|
+
const validateChatAbortParams = ajv.compile(ChatAbortParamsSchema);
|
|
2445
|
+
const validateChatInjectParams = ajv.compile(ChatInjectParamsSchema);
|
|
2446
|
+
ajv.compile(ChatEventSchema);
|
|
2447
|
+
const validateUpdateRunParams = ajv.compile(UpdateRunParamsSchema);
|
|
2448
|
+
const validateWebLoginStartParams = ajv.compile(WebLoginStartParamsSchema);
|
|
2449
|
+
const validateWebLoginWaitParams = ajv.compile(WebLoginWaitParamsSchema);
|
|
2450
|
+
const validateWalletSummaryParams = ajv.compile(WalletSummaryParamsSchema);
|
|
2451
|
+
ajv.compile(WalletSummaryResultSchema);
|
|
2452
|
+
const validateWalletRecoveryPhraseSetParams = ajv.compile(WalletRecoveryPhraseSetParamsSchema);
|
|
2453
|
+
ajv.compile(WalletRecoveryPhraseSetResultSchema);
|
|
2454
|
+
function formatValidationErrors(errors) {
|
|
2455
|
+
if (!errors?.length) return "unknown validation error";
|
|
2456
|
+
const parts = [];
|
|
2457
|
+
for (const err of errors) {
|
|
2458
|
+
const keyword = typeof err?.keyword === "string" ? err.keyword : "";
|
|
2459
|
+
const instancePath = typeof err?.instancePath === "string" ? err.instancePath : "";
|
|
2460
|
+
if (keyword === "additionalProperties") {
|
|
2461
|
+
const additionalProperty = (err?.params)?.additionalProperty;
|
|
2462
|
+
if (typeof additionalProperty === "string" && additionalProperty.trim()) {
|
|
2463
|
+
const where = instancePath ? `at ${instancePath}` : "at root";
|
|
2464
|
+
parts.push(`${where}: unexpected property '${additionalProperty}'`);
|
|
2465
|
+
continue;
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
const message = typeof err?.message === "string" && err.message.trim() ? err.message : "validation error";
|
|
2469
|
+
const where = instancePath ? `at ${instancePath}: ` : "";
|
|
2470
|
+
parts.push(`${where}${message}`);
|
|
2471
|
+
}
|
|
2472
|
+
const unique = Array.from(new Set(parts.filter((part) => part.trim())));
|
|
2473
|
+
if (!unique.length) return ajv.errorsText(errors, { separator: "; " }) || "unknown validation error";
|
|
2474
|
+
return unique.join("; ");
|
|
2475
|
+
}
|
|
2476
|
+
//#endregion
|
|
2477
|
+
export { validateMcpOAuthCallbackParams as $, validateSessionsResetParams as $t, validateConnectParams as A, validatePluginsStatusParams as At, validateDevicePairRejectParams as B, validateSessionsAbortParams as Bt, validateConfigApplyParams as C, validateWizardStartParams as Cn, validateNodePendingEnqueueParams as Ct, validateConfigSchemaLookupResult as D, COMMAND_DESCRIPTION_MAX_LENGTH as Dn, validatePluginsDetailParams as Dt, validateConfigSchemaLookupParams as E, errorShape as En, validatePluginApprovalResolveParams as Et, validateCronRunsParams as F, validateRequestFrame as Ft, validateExecApprovalGetParams as G, validateSessionsCompactionRestoreParams as Gt, validateDeviceTokenRevokeParams as H, validateSessionsCompactionBranchParams as Ht, validateCronStatusParams as I, validateResponseFrame as It, validateExecApprovalsGetParams as J, validateSessionsListParams as Jt, validateExecApprovalRequestParams as K, validateSessionsCreateParams as Kt, validateCronUpdateParams as L, validateSecretsResolveParams as Lt, validateCronListParams as M, validatePluginsUpdateParams as Mt, validateCronRemoveParams as N, validatePollParams as Nt, validateConfigSchemaParams as O, parseSessionLabel as On, validatePluginsInstallParams as Ot, validateCronRunParams as P, validatePushTestParams as Pt, validateLogsTailParams as Q, validateSessionsPreviewParams as Qt, validateDevicePairApproveParams as R, validateSecretsResolveResult as Rt, validateCommandsListParams as S, validateWizardNextParams as Sn, validateNodePendingDrainParams as St, validateConfigPatchParams as T, ErrorCodes as Tn, validatePluginApprovalRequestParams as Tt, validateDeviceTokenRotateParams as U, validateSessionsCompactionGetParams as Ut, validateDevicePairRemoveParams as V, validateSessionsCompactParams as Vt, validateEventFrame as W, validateSessionsCompactionListParams as Wt, validateExecApprovalsNodeSetParams as X, validateSessionsMessagesUnsubscribeParams as Xt, validateExecApprovalsNodeGetParams as Y, validateSessionsMessagesSubscribeParams as Yt, validateExecApprovalsSetParams as Z, validateSessionsPatchParams as Zt, validateChannelsStatusParams as _, validateWalletRecoveryPhraseSetParams as _n, validateNodePairListParams as _t, validateAgentsCreateParams as a, validateSkillsInstallParams as an, validateMcpServerSetParams as at, validateChatInjectParams as b, validateWebLoginWaitParams as bn, validateNodePairVerifyParams as bt, validateAgentsFilesListParams as c, validateSkillsUpdateParams as cn, validateMcpServersListParams as ct, validateAgentsUpdateParams as d, validateTalkRealtimeSessionParams as dn, validateNodeDescribeParams as dt, validateSessionsResolveParams as en, validateMcpOAuthDisconnectParams as et, validateCanvasDocumentCreateParams as f, validateTalkSpeakParams as fn, validateNodeEventParams as ft, validateChannelsStartParams as g, validateWakeParams as gn, validateNodePairApproveParams as gt, validateChannelsLogoutParams as h, validateUpdateRunParams as hn, validateNodeListParams as ht, validateAgentWaitParams as i, validateSkillsDetailParams as in, validateMcpServerMetadataParams as it, validateCronAddParams as j, validatePluginsUninstallParams as jt, validateConfigSetParams as k, validatePluginsSearchParams as kt, validateAgentsFilesSetParams as l, validateTalkConfigParams as ln, validateMessageActionParams as lt, validateCanvasDocumentUpdateParams as m, validateToolsEffectiveParams as mn, validateNodeInvokeResultParams as mt, validateAgentIdentityParams as n, validateSessionsUsageParams as nn, validateMcpOAuthStartParams as nt, validateAgentsDeleteParams as o, validateSkillsSearchParams as on, validateMcpServerTestParams as ot, validateCanvasDocumentListParams as p, validateToolsCatalogParams as pn, validateNodeInvokeParams as pt, validateExecApprovalResolveParams as q, validateSessionsDeleteParams as qt, validateAgentParams as r, validateSkillsBinsParams as rn, validateMcpOAuthStatusParams as rt, validateAgentsFilesGetParams as s, validateSkillsStatusParams as sn, validateMcpServerUnsetParams as st, formatValidationErrors as t, validateSessionsSendParams as tn, validateMcpOAuthRefreshParams as tt, validateAgentsListParams as u, validateTalkModeParams as un, validateModelsListParams as ut, validateChatAbortParams as v, validateWalletSummaryParams as vn, validateNodePairRejectParams as vt, validateConfigGetParams as w, validateWizardStatusParams as wn, validateNodeRenameParams as wt, validateChatSendParams as x, validateWizardCancelParams as xn, validateNodePendingAckParams as xt, validateChatHistoryParams as y, validateWebLoginStartParams as yn, validateNodePairRequestParams as yt, validateDevicePairListParams as z, validateSendParams as zt };
|