@pixelzx/genesis 2026.5.10-2 → 2026.5.10-3
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 +7 -0
- package/dist/.buildstamp +1 -1
- package/dist/abort-o_hg2xtq.js +201 -0
- package/dist/abort.runtime-C8y_LD66.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/accounts-BaxyfsNG.js +107 -0
- package/dist/accounts-CBI-56kp.js +104 -0
- package/dist/accounts-m2xbhdqn.js +2 -0
- package/dist/acp-cli-BOlwnmxd.js +2193 -0
- package/dist/acp-spawn-BrI6X9SH.js +2 -0
- package/dist/acp-spawn-xahA0x4e.js +1093 -0
- package/dist/acp-stateful-target-driver-B0_0BB8d.js +89 -0
- package/dist/action-agents-BLXVAHpm.js +67 -0
- package/dist/action-focus-Bl80EFqG.js +132 -0
- package/dist/action-help-CBbcn9Xo.js +7 -0
- package/dist/action-info-DrggqbpC.js +101 -0
- package/dist/action-kill-p6a-p_Wl.js +33 -0
- package/dist/action-list-4o0eiRPy.js +21 -0
- package/dist/action-log-C2VTzCV-.js +30 -0
- package/dist/action-send-DQE2YhZv.js +39 -0
- package/dist/action-spawn-DeTOlrlr.js +47 -0
- package/dist/action-unfocus-CUJ_-To0.js +29 -0
- package/dist/actions.runtime-BME76tM1.js +18 -0
- package/dist/actions.runtime-DgFQtpdt.js +5 -0
- package/dist/actions.runtime.js +1 -1
- package/dist/agent-DvPQGyLY.js +2 -0
- package/dist/agent-command-Dv8Kifbw.js +874 -0
- package/dist/agent-harness-runtime-rPtHDzbH.js +144 -0
- package/dist/agent-runner-utils-Cwcsq2Vg.js +239 -0
- package/dist/agent-runner.runtime-EDmsi-tw.js +3455 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-BZ7qw7Go.js +18 -0
- package/dist/agents-BmdK7DYn.js +954 -0
- package/dist/agents-ojp3yzuP.js +5 -0
- package/dist/aliases-B-xkGRWv.js +2 -0
- package/dist/aliases-CeyLk8gs.js +96 -0
- package/dist/api-7RMNrU--.js +139 -0
- package/dist/api-DuTxAbzX.js +5 -0
- package/dist/api-S68mLw4i.js +3 -0
- package/dist/approval-gateway-resolver-D6GUSzWU.js +29 -0
- package/dist/approval-gateway-runtime-CLSx2pjl.js +2 -0
- package/dist/approval-handler-runtime-D_pDErDf.js +439 -0
- package/dist/approval-native-runtime-DMmho8f_.js +729 -0
- package/dist/attempt-execution.runtime-BiBQNA9X.js +509 -0
- package/dist/attempt-execution.runtime.js +1 -1
- package/dist/attempt.prompt-helpers-NLkGfNY6.js +221 -0
- package/dist/attempt.tool-run-context-DWlgJ-_O.js +933 -0
- package/dist/audit-UgEtgbwZ.js +939 -0
- package/dist/audit.runtime--guvdA_A.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-C50R0MRq.js +2 -0
- package/dist/auth-D0-jQ58t.js +383 -0
- package/dist/auth-order-BFJrCRu5.js +96 -0
- package/dist/auth-order-DSgYrJ_p.js +2 -0
- package/dist/bash-tools-DHuwAZ58.js +2824 -0
- package/dist/bash-tools-D_feNjoF.js +3 -0
- package/dist/binding-routing-CY1eMDau.js +85 -0
- package/dist/binding-targets-WwNSyphm.js +121 -0
- package/dist/bridge-server-D6UfpfpG.js +113 -0
- package/dist/browser-control-auth-D68lDX1S.js +2 -0
- package/dist/browser-node-runtime-CY1lVQqq.js +12 -0
- package/dist/browser-profiles-B49YcSoc.js +2 -0
- package/dist/browser-runtime-BDL147Ka.js +387 -0
- package/dist/browser-setup-tools-C03RsiTe.js +13 -0
- package/dist/build-DLN8Lh14.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-BNALogg6.js +331 -0
- package/dist/call-PW7UP-CK.js +3 -0
- package/dist/call.runtime-CYfH8MdC.js +2 -0
- package/dist/call.runtime.js +1 -1
- package/dist/capability-cli-B4UpH1T0.js +1401 -0
- package/dist/catchup-CXQzIWv3.js +300 -0
- package/dist/channel-BiZSvVcj.js +297 -0
- package/dist/channel-BkI_5MRp.js +453 -0
- package/dist/channel-BnG-E5UX.js +595 -0
- package/dist/channel-CNZdJ8HY.js +1174 -0
- package/dist/channel-COcBdBbn.js +1100 -0
- package/dist/channel-CQI0hLJk.js +350 -0
- package/dist/channel-CkoM-a7d.js +226 -0
- package/dist/channel-CrHTdcH4.js +840 -0
- package/dist/channel-DvgX6dVj.js +1320 -0
- package/dist/channel-HtE-iRkv.js +491 -0
- package/dist/channel-OequV7Gf.js +1802 -0
- package/dist/channel-core-ChdqmAmk.js +5 -0
- package/dist/channel-inbound-Q2rVZZUs.js +31 -0
- package/dist/channel-plugin-runtime-DaijXHro.js +771 -0
- package/dist/channel-runtime-y4XUEoQY.js +425 -0
- package/dist/channel.runtime-BrEbVLLQ.js +576 -0
- package/dist/channel.runtime-C9UaDpbO.js +2364 -0
- package/dist/channel.runtime-Ccnjrmpx.js +109 -0
- package/dist/channel.runtime-CerUOlEZ.js +430 -0
- package/dist/channel.runtime-Du87a5jR.js +89 -0
- package/dist/channel.runtime-FklQos16.js +4 -0
- package/dist/channel.runtime-pynPO2Q-.js +34702 -0
- package/dist/channel.runtime.js +1 -1
- package/dist/channel.setup-D2BshGlh.js +10 -0
- package/dist/channels-DXbWBAhP.js +733 -0
- package/dist/channels-cli-DowVHylc.js +268 -0
- package/dist/chat-BMLW9p0d.js +2830 -0
- package/dist/clawbot-cli-DYF742Fr.js +9 -0
- package/dist/cli/daemon-cli.js +3 -3
- package/dist/cli-BebcHCJY.js +219 -0
- package/dist/cli-BnQ5RUbX.js +2 -0
- package/dist/cli-CsJTitwJ.js +72 -0
- package/dist/cli-D1z_Lra2.js +2 -0
- package/dist/cli-runner-DCfEJ3Dl.js +286 -0
- package/dist/cli-runner.runtime-1YoJduVc.js +3 -0
- package/dist/cli-runner.runtime-DaIWshs8.js +4 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-startup-metadata.json +2 -2
- package/dist/cli.runtime-0QJWPe0Y.js +1261 -0
- package/dist/cli.runtime.js +1 -1
- package/dist/client-BR4n6hNI.js +713 -0
- package/dist/client-hrT_8w_f.js +138 -0
- package/dist/command-auth-BI6iswCp.js +76 -0
- package/dist/command-config-resolution-BvDykKQ0.js +23 -0
- package/dist/command-config-resolution-CJz3dmjF.js +2 -0
- package/dist/command-config-resolution.runtime-C1xIzrMA.js +2 -0
- package/dist/command-config-resolution.runtime.js +1 -1
- package/dist/command-registry-BQh49BOI.js +9 -0
- package/dist/command-registry-COW3Dwow.js +4 -0
- package/dist/command-registry-core-Bq5tHbQ5.js +106 -0
- package/dist/command-secret-gateway-CWH-56qF.js +528 -0
- package/dist/command-status.runtime-BUceIW-k.js +87 -0
- package/dist/command-status.runtime.js +1 -1
- package/dist/commands-acp-CDM0_szW.js +77 -0
- package/dist/commands-compact.runtime-BpuJhNyp.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-handlers.runtime-DikW0yB0.js +4597 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-status-DgbzuFLf.js +16 -0
- package/dist/commands-status.runtime-BtoVY07x.js +3 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-B1MwVPHf.js +2 -0
- package/dist/commands-subagents-control.runtime-CPSMKJqB.js +3 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands-system-prompt-DNA0qsTv.js +2 -0
- package/dist/commands-system-prompt-DdoBQ8ad.js +158 -0
- package/dist/commands.runtime-B8F59wvr.js +166 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/compact-DevuFvwc.js +1118 -0
- package/dist/compact.runtime-DFxdJbZX.js +12 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-94LY3Cno.js +328 -0
- package/dist/config-cli-3wKyVoWG.js +1078 -0
- package/dist/config-x0GQmd_p.js +252 -0
- package/dist/configure-DXBHXi9E.js +1252 -0
- package/dist/configure-iqDkqwpX.js +2 -0
- package/dist/connect-options-pZ4TVfhD.js +699 -0
- package/dist/control-auth-C0_VWbFV.js +125 -0
- package/dist/control-service-DKz9pgNJ.js +156 -0
- package/dist/conversation-id-C1ZMSaUv.js +235 -0
- package/dist/conversation-id-Cn8LoNiS.js +38 -0
- package/dist/conversation-runtime-PeJkl-ts.js +31 -0
- package/dist/core-BXR05azh.js +275 -0
- package/dist/cron-cli-C9SgQQXV.js +713 -0
- package/dist/daemon-cli-CJ8VUS9L.js +12 -0
- package/dist/dashboard-B7cbYfiK.js +81 -0
- package/dist/dashboard-SJJ1gpY7.js +2 -0
- package/dist/delegate-Bb6bHoIc.js +64 -0
- package/dist/detached-task-runtime-DUb2_Az9.js +73 -0
- package/dist/devices-cli-CZLTVAzc.js +498 -0
- package/dist/diagnostics-CElgAkJx.js +154 -0
- package/dist/direct-dm-B-q3BnYs.js +64 -0
- package/dist/dispatch-D6RvPlwP.js +1131 -0
- package/dist/dispatch-acp-Bit9gfDS.js +981 -0
- package/dist/dispatch-acp-manager.runtime-BDYoaEzk.js +3 -0
- package/dist/dispatch-acp-manager.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-9yBydATu.js +19 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/doctor-device-pairing-CALw5gAh.js +307 -0
- package/dist/doctor-gateway-daemon-flow-DH90Xuwv.js +250 -0
- package/dist/doctor-gateway-health-DLTQr7oR.js +63 -0
- package/dist/doctor-health-UickjAEG.js +59 -0
- package/dist/doctor-health-contributions-CT2_osp-.js +493 -0
- package/dist/doctor-prompter-CmsL_aNs.js +56 -0
- package/dist/doctor-workspace-status-DrfJ_CMh.js +75 -0
- package/dist/dreaming-BjlelMwS.js +1574 -0
- package/dist/dreaming-narrative-Cioh4-iE.js +595 -0
- package/dist/embedded-gateway-stub.runtime-D3axE_Gz.js +9 -0
- package/dist/embedded-gateway-stub.runtime.js +1 -1
- package/dist/entry.js +2 -2
- package/dist/exec-approvals-cli-C61OIas5.js +498 -0
- package/dist/execute.runtime-Dh2PQVjB.js +1363 -0
- package/dist/execute.runtime.js +1 -1
- 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-7WaQrL4w.js +2 -0
- package/dist/fallbacks-D030WgeJ.js +31 -0
- package/dist/fallbacks-shared-D0Irg6Dc.js +111 -0
- package/dist/gateway-Drmf7aeu.js +115 -0
- package/dist/gateway-cli-DzsJzCar.js +1283 -0
- package/dist/gateway-rpc-ByhpcN5x.js +14 -0
- package/dist/gateway-rpc.runtime-4zXMZEZA.js +23 -0
- package/dist/gateway-rpc.runtime.js +1 -1
- package/dist/gateway-runtime-BGIrLVc5.js +15 -0
- package/dist/gateway-status-Dcpg0Z1K.js +584 -0
- package/dist/genesis-tools-ZNGlG9Ij.js +9144 -0
- package/dist/genesis-tools.runtime-CSl_w_fx.js +2 -0
- package/dist/genesis-tools.runtime.js +1 -1
- package/dist/get-reply-BG-YgQgk.js +3879 -0
- package/dist/get-reply-from-config.runtime-CTTbEqgi.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/graph-users-DBkBwndc.js +1337 -0
- package/dist/health-DP9-SUDF.js +3 -0
- package/dist/health-Dn4lrkX0.js +469 -0
- package/dist/health-route-BOUp8_1m.js +2 -0
- package/dist/health-route-BhuLVeKt.js +41 -0
- package/dist/heartbeat-runner-B5ZUS0Zj.js +1292 -0
- package/dist/heartbeat-runner-BIlNfweM.js +5 -0
- package/dist/heartbeat-runner.runtime-YmoU6ZZ3.js +4 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/hooks-cli-hN5FtPX4.js +433 -0
- package/dist/image-fallbacks-Cq3R8m7Y.js +2 -0
- package/dist/image-fallbacks-Dd4BCf1D.js +31 -0
- package/dist/inbound-reply-dispatch-Be4j__jx.js +73 -0
- package/dist/index.js +2 -2
- package/dist/infra-runtime-dEG-SNc-.js +39 -0
- package/dist/init-C1wrook_.js +59 -0
- package/dist/library-B6SYgaHj.js +45 -0
- package/dist/lifecycle-BJuODKPo.js +229 -0
- package/dist/lifecycle-Dhj0KywB.js +571 -0
- package/dist/lifecycle.runtime-CwSjoTkX.js +2 -0
- package/dist/lifecycle.runtime.js +1 -1
- package/dist/list-Bj2cpmBs.js +1212 -0
- package/dist/list-CBe1cOSo.js +2 -0
- package/dist/list-CktR5l_P.js +2 -0
- package/dist/list-ydeAMfpS.js +131 -0
- package/dist/list.probe-0SQPzjrW.js +419 -0
- package/dist/llm-slug-generator-CyQx7U_Q.js +79 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/load-config-BHd00lHp.js +35 -0
- package/dist/local-dispatch.runtime-CqTNOXfw.js +8 -0
- package/dist/local-dispatch.runtime.js +1 -1
- package/dist/logs-cli-BWOEA5qi.js +265 -0
- package/dist/logs-cli.runtime-DSIEK1BE.js +2 -0
- package/dist/logs-cli.runtime.js +1 -1
- package/dist/main-session-restart-recovery-Cfc3B2Uj.js +206 -0
- package/dist/managed-image-attachments-BZbPdPC8.js +2 -0
- package/dist/managed-image-attachments-CxLohd8A.js +635 -0
- package/dist/manager-Cg7vl9NG.js +2057 -0
- package/dist/manager-CiI4zE-D.js +2 -0
- package/dist/markdown-to-line-B8FYeJdD.js +790 -0
- package/dist/mcp/plugin-tools-serve.js +1 -1
- package/dist/mcp-cli-BS4_9Zoo.js +725 -0
- package/dist/mcp-http-wF9LvDEz.js +529 -0
- package/dist/memory-core-host-runtime-cli-06ivr1qR.js +9 -0
- package/dist/message-BzaLYgSG.js +232 -0
- package/dist/message-action-runner-BazMarN6.js +1407 -0
- package/dist/message-action-runner-Bq7rUhnL.js +2 -0
- package/dist/message-actions-DcnuU8Sm.js +143 -0
- package/dist/message.gateway.runtime-BCFg5opz.js +2 -0
- package/dist/message.gateway.runtime.js +1 -1
- package/dist/models-auth-status-6d3I6qIv.js +201 -0
- package/dist/models-cli-DZPcli0C.js +219 -0
- package/dist/monitor-BYFZsGcy.js +2 -0
- package/dist/monitor-C2nxTIum.js +1459 -0
- package/dist/monitor-CD5DZfT0.js +1237 -0
- package/dist/monitor-C_5rnpcO.js +1661 -0
- package/dist/monitor-CxPzN2U-.js +671 -0
- package/dist/monitor-G_A80TYD.js +788 -0
- package/dist/monitor-auth-Bjr6pzE-.js +207 -0
- package/dist/monitor-processing-Du6MiEEU.js +1974 -0
- package/dist/monitor.runtime-BHjQO73F.js +2 -0
- package/dist/monitor.runtime.js +1 -1
- package/dist/monitor.webhook-BU61VqG-.js +180 -0
- package/dist/msteams-HKEY9u2h.js +35 -0
- package/dist/native-hook-relay-DcIfpN38.js +519 -0
- package/dist/nextcloud-talk-BAwtzO7T.js +17 -0
- package/dist/node-cli-BM5NVTG7.js +2506 -0
- package/dist/nodes-cli-BAuBgmem.js +1046 -0
- package/dist/nodes-utils-Bs6GofNl.js +84 -0
- package/dist/nodes.helpers-9SdaPWam.js +34 -0
- package/dist/notify-bMIvLU57.js +315 -0
- package/dist/onboard-DZRCsQKI.js +70 -0
- package/dist/onboard-WrvK1ncB.js +2 -0
- package/dist/onboard-helpers-iMWEmZ9M.js +204 -0
- package/dist/onboard-helpers-nf1FCDx1.js +6 -0
- package/dist/onboard-interactive-BqvHTpjq.js +24 -0
- package/dist/onboard-non-interactive-QqRYgGmh.js +548 -0
- package/dist/onboard-remote-Btb7Elo9.js +2 -0
- package/dist/onboard-remote-YLLAXD5a.js +193 -0
- package/dist/onboard-skills-CbVEWgXS.js +134 -0
- package/dist/onboard-skills-Dlrodw-j.js +2 -0
- package/dist/openai-http-D9C2CUw5.js +500 -0
- package/dist/openresponses-http-Cm1pNnoN.js +1128 -0
- package/dist/operator-approvals-client-Crk-kZWE.js +68 -0
- package/dist/outbound.runtime-EJrjRipL.js +2 -0
- package/dist/outbound.runtime.js +1 -1
- package/dist/pair-command-approve-BEGwU4IB.js +44 -0
- package/dist/persistent-bindings.lifecycle-DQF-e-Qa.js +85 -0
- package/dist/persistent-bindings.lifecycle-lkGrqLnW.js +2 -0
- package/dist/pi-embedded-BDlMkZq9.js +2905 -0
- package/dist/pi-embedded-Duzz1mtI.js +4 -0
- package/dist/pi-embedded.runtime-Ct_Aa3c5.js +4 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/pi-tool-definition-adapter-CZw0LtV5.js +229 -0
- package/dist/pi-tools-C6B-SOzB.js +1057 -0
- package/dist/pi-tools.before-tool-call-9joq1aHl.js +2 -0
- package/dist/pi-tools.before-tool-call-DNnie5TY.js +433 -0
- package/dist/plugin-BCPNJxM9.js +12195 -0
- package/dist/plugin-enabled-BjLKAsAC.js +140 -0
- package/dist/plugin-registration-BId8vb01.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-q43trexG.js +2892 -0
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/policy-B4NUBI6t.js +328 -0
- package/dist/postinstall-inventory.json +417 -417
- package/dist/prepare.runtime-_zemfjv3.js +815 -0
- package/dist/prepare.runtime.js +1 -1
- package/dist/probe-BY3B9tTH.js +2205 -0
- package/dist/probe-BvnxVXPF.js +2 -0
- package/dist/probe-BxfJkCo7.js +1443 -0
- package/dist/probe-CVdSkKEj.js +241 -0
- package/dist/probe-HJKXZScl.js +74 -0
- package/dist/probe-cSkWLlnk.js +45 -0
- package/dist/probe-mvSMIO0q.js +2 -0
- package/dist/program-B59QlcJQ.js +111 -0
- package/dist/prompt-select-styled-4Jq2F-H9.js +20 -0
- package/dist/protocol-AGt54mci.js +2335 -0
- package/dist/provider-dispatcher-CP48ghhH.js +2 -0
- package/dist/provider-dispatcher-DEGzYrP8.js +22 -0
- package/dist/qr-cli-l0w87b13.js +349 -0
- package/dist/qr-cli-rJZ8om76.js +2 -0
- package/dist/reaction-runtime-api-Bkt3VyFC.js +116 -0
- package/dist/reactions-m2szYDeb.js +998 -0
- package/dist/register-service-commands-BW-5D4CL.js +71 -0
- package/dist/register.agent-0oONdLoj.js +248 -0
- package/dist/register.configure-DJgbhQEd.js +15 -0
- package/dist/register.maintenance-qDzsg7Rx.js +363 -0
- package/dist/register.message-D3IcSeh2.js +329 -0
- package/dist/register.onboard-712D2YIY.js +88 -0
- package/dist/register.runtime-9LgalpKP.js +81 -0
- package/dist/register.runtime.js +1 -1
- package/dist/register.setup-olmzCf4M.js +150 -0
- package/dist/register.status-health-sessions-BcSscPyw.js +1215 -0
- package/dist/register.subclis-Cb_7jF2M.js +29 -0
- package/dist/register.subclis-DohysWLE.js +3 -0
- package/dist/register.subclis-core-Db1skJ4w.js +249 -0
- package/dist/register.wallet-WGlu7P0C.js +271 -0
- package/dist/reply-dispatch-runtime-C6kPvDIT.js +13 -0
- package/dist/reply-runtime-m8R8imuO.js +11 -0
- package/dist/reply.runtime-yz20DuV3.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/restart-health-B3BG9cWC.js +2 -0
- package/dist/restart-health-Blxs74k_.js +202 -0
- package/dist/root-help-CtdC-lhj.js +44 -0
- package/dist/routes-DlHk_d4H.js +2 -0
- package/dist/routes-vuPJqxDc.js +3341 -0
- package/dist/rpc-CvdOvi6M.js +61 -0
- package/dist/rpc.runtime-BTkO-5N6.js +21 -0
- package/dist/rpc.runtime.js +1 -1
- package/dist/run-delivery.runtime-Bu0IyFs-.js +530 -0
- package/dist/run-delivery.runtime.js +1 -1
- package/dist/run-embedded.runtime-Bptomyr6.js +4 -0
- package/dist/run-embedded.runtime.js +1 -1
- package/dist/run-execution-cli.runtime-DVoDazG0.js +4 -0
- package/dist/run-execution-cli.runtime.js +1 -1
- package/dist/run-executor.runtime-LRWKlZ-B.js +277 -0
- package/dist/run-executor.runtime.js +1 -1
- package/dist/run-main-C-5waIfA.js +567 -0
- package/dist/run-subagent-registry.runtime-eNmO4Ulf.js +2 -0
- package/dist/run-subagent-registry.runtime.js +1 -1
- package/dist/run-wait-CYFrtm-o.js +135 -0
- package/dist/runtime-BRPRR2hE.js +973 -0
- package/dist/runtime-CokulBmy.js +9 -0
- package/dist/runtime-api-BJ2r-OR5.js +14 -0
- package/dist/runtime-api-BfGhe369.js +9 -0
- package/dist/runtime-api-Bfjma1I2.js +9 -0
- package/dist/runtime-api-CxY0DKnr.js +4 -0
- package/dist/runtime-embedded-pi.runtime-BvnxDutF.js +2 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-internal-BIVfP__L.js +2 -0
- package/dist/runtime-options-BljbnMxi.js +275 -0
- package/dist/runtime-schema-Dyv3hS1d.js +27938 -0
- package/dist/scan-D9X5Lj0l.js +523 -0
- package/dist/scan-M3OixEI7.js +2 -0
- package/dist/secrets-cli-fpxI67tT.js +2101 -0
- package/dist/security-cli-B9FOJsn-.js +486 -0
- package/dist/selection-CFlY2XMr.js +2 -0
- package/dist/selection-CdRMYsTR.js +7736 -0
- package/dist/send-BHKn9mJM.js +156 -0
- package/dist/send-CSAuufSI.js +102 -0
- package/dist/send.runtime-Csjbw0LF.js +2 -0
- package/dist/send.runtime.js +1 -1
- package/dist/server-CtGKkNXK.js +77 -0
- package/dist/server-QZSxYkIl.js +13 -0
- package/dist/server-context-CCzwJPYE.js +847 -0
- package/dist/server-context-SQimgHbw.js +2 -0
- package/dist/server-node-events-Bw07_egU.js +481 -0
- package/dist/server-plugin-bootstrap-BxVzrft3.js +2 -0
- package/dist/server-plugin-bootstrap-Ma9J_GSY.js +11652 -0
- package/dist/server-restart-sentinel-n_4jiXSF.js +697 -0
- package/dist/server.impl-CY_ZY-Mq.js +12822 -0
- package/dist/service-CPRBqblN.js +1446 -0
- package/dist/session-kill-http-bilLl8tM.js +110 -0
- package/dist/session-reset-service-DHbmMELT.js +471 -0
- package/dist/session-route-CHPZxwZH.js +93 -0
- package/dist/session-status.runtime-Cco6tPQ0.js +2 -0
- package/dist/session-status.runtime.js +1 -1
- package/dist/session-subagent-reactivation.runtime-D8SYYjgF.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-9W3qSiwY.js +581 -0
- package/dist/session-visibility-Csvz8y2g.js +147 -0
- package/dist/sessions-helpers-DJtsPRok.js +304 -0
- package/dist/sessions-history-http-BwN8qdVu.js +383 -0
- package/dist/sessions-patch-Cn6ICCbl.js +309 -0
- package/dist/sessions-resolve-DkokaXLV.js +174 -0
- package/dist/sessions.runtime-CUhGDDdQ.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/setup-CXrByuF0.js +505 -0
- package/dist/setup-api-CAUnAQYK.js +29 -0
- package/dist/setup-core-0kUhQgXj.js +171 -0
- package/dist/setup-core-CgIvNnqV.js +176 -0
- package/dist/setup-surface-BICUCTSY.js +219 -0
- package/dist/setup-surface-CWN6fRnj.js +286 -0
- package/dist/setup-surface-DAO84q-l.js +403 -0
- package/dist/setup.finalize-Cz-xAyXq.js +547 -0
- package/dist/setup.gateway-config-B_6xO6qg.js +250 -0
- package/dist/shared-54WHS6Zf.js +198 -0
- package/dist/shared-BM7A3tRo.js +121 -0
- package/dist/shared-ZX79gVvR.js +76 -0
- package/dist/slash-state-D9XJzIhC.js +1911 -0
- package/dist/src-CeLenBVS.js +3974 -0
- package/dist/startup-context-ExpfHx39.js +312 -0
- package/dist/status-B3pfZ-ob.js +2 -0
- package/dist/status-BxtYUkFv.js +209 -0
- package/dist/status-CBKaYlp2.js +397 -0
- package/dist/status-DXMGfco1.js +3 -0
- package/dist/status-Dveq2FJA.js +190 -0
- package/dist/status-all-C0Rv7_MK.js +498 -0
- package/dist/status-json-command-FP5kOrjW.js +84 -0
- package/dist/status-json-jAko1YQ3.js +14 -0
- package/dist/status-ooCzELGj.js +2 -0
- package/dist/status-runtime-shared-t7ZNH_at.js +257 -0
- package/dist/status-subagents.runtime-B0-FFd7k.js +18 -0
- package/dist/status-subagents.runtime.js +1 -1
- package/dist/status-text-D5Wb2Eyv.js +237 -0
- package/dist/status.gateway-connection.runtime-DX3GFQOy.js +2 -0
- package/dist/status.gateway-connection.runtime.js +1 -1
- package/dist/status.gather-BLaJs7JK.js +292 -0
- package/dist/status.gather-DXcgE-uZ.js +2 -0
- package/dist/status.runtime-BW8lvcAk.js +2 -0
- package/dist/status.runtime.js +1 -1
- package/dist/status.scan-CqSxwChE.js +65 -0
- package/dist/status.scan-overview-C50E8dW7.js +379 -0
- package/dist/status.scan.fast-json-DZD93o5C.js +132 -0
- package/dist/status.scan.fast-json-aLbUp_Zj.js +2 -0
- package/dist/status.summary-CSXp0VuE.js +2 -0
- package/dist/status.summary-CZhlDozR.js +214 -0
- package/dist/subagent-announce-DQNhTREe.js +351 -0
- package/dist/subagent-announce-delivery-DzexQBXL.js +726 -0
- package/dist/subagent-announce-output-DHdUIOLb.js +364 -0
- package/dist/subagent-control-BIHPVfEC.js +506 -0
- package/dist/subagent-followup.runtime-B2vIi_N7.js +68 -0
- package/dist/subagent-followup.runtime.js +1 -1
- package/dist/subagent-orphan-recovery-acE2Akzk.js +305 -0
- package/dist/subagent-registry-DscgS64s.js +1753 -0
- package/dist/subagent-registry-VBEsKIg8.js +3 -0
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/subagent-spawn-ClpDxVim.js +1005 -0
- package/dist/system-cli-Cwoirti-.js +59 -0
- package/dist/targets-Du7kf5pU.js +67 -0
- package/dist/task-executor-Cex7gyKp.js +360 -0
- package/dist/task-owner-access-CfZCzFm8.js +74 -0
- package/dist/task-registry-delivery-runtime-7UMu_ADx.js +3 -0
- package/dist/task-registry-delivery-runtime-anQhKoeF.js +2 -0
- package/dist/task-registry-dsUR7cO8.js +2366 -0
- package/dist/task-registry.maintenance-8t06izZG.js +416 -0
- package/dist/task-registry.maintenance-BKCkUElL.js +2 -0
- package/dist/telegram/token.js +1 -1
- package/dist/testing-XS9mU0gy.js +575 -0
- package/dist/text-report-CW3trTAs.js +587 -0
- package/dist/tool-resolution-CbhdQ1Hc.js +90 -0
- package/dist/tools-effective-inventory-C-fhTbL3.js +152 -0
- package/dist/tools-invoke-http-DwLDiTC-.js +206 -0
- package/dist/trash-BPfwuXw1.js +24 -0
- package/dist/tui-cli-CwcpeUI3.js +4575 -0
- package/dist/update-cli-C7wZCVxw.js +1759 -0
- package/dist/upgrade-I1DlWIOT.js +1226 -0
- package/dist/video-generation-task-status-BTNgjS3Y.js +163 -0
- package/dist/wait-for-idle-before-flush-jA-mGgw_.js +5986 -0
- package/dist/wizard-models-CJ9pSHsX.js +334 -0
- package/package.json +1 -1
- package/dist/abort-CFK2Nhip.js +0 -201
- package/dist/abort.runtime-BuAaxnKL.js +0 -2
- package/dist/accounts-CHbim_qS.js +0 -107
- package/dist/accounts-DtkNyn-Q.js +0 -2
- package/dist/accounts-J3zyVXXx.js +0 -104
- package/dist/acp-cli-C3I6FHf2.js +0 -2193
- package/dist/acp-spawn-D3xu_-rE.js +0 -1093
- package/dist/acp-spawn-vcfww9lP.js +0 -2
- package/dist/acp-stateful-target-driver-CiSxPJNY.js +0 -89
- package/dist/action-agents-CIlhSgnP.js +0 -67
- package/dist/action-focus-Cf5CQqOj.js +0 -132
- package/dist/action-help-B0yl4Pe2.js +0 -7
- package/dist/action-info-CFUHIn0u.js +0 -101
- package/dist/action-kill-C95CsdAp.js +0 -33
- package/dist/action-list-BX3RIjsZ.js +0 -21
- package/dist/action-log-BOalIOnb.js +0 -30
- package/dist/action-send-Bw-K12vK.js +0 -39
- package/dist/action-spawn-DSTqN3n1.js +0 -47
- package/dist/action-unfocus-BRGuE47t.js +0 -29
- package/dist/actions.runtime-5qLo-JvI.js +0 -5
- package/dist/actions.runtime-CB7fr1mE.js +0 -18
- package/dist/agent-4OUfop4W.js +0 -2
- package/dist/agent-command-9KZKjUCs.js +0 -874
- package/dist/agent-harness-runtime-Dn6m6FbT.js +0 -144
- package/dist/agent-runner-utils-I_WM4CKu.js +0 -239
- package/dist/agent-runner.runtime-CXepXPjv.js +0 -3455
- package/dist/agent-runtime-DPkZZoYt.js +0 -18
- package/dist/agents-3DAP4x-2.js +0 -954
- package/dist/agents-DkjDVIbt.js +0 -5
- package/dist/aliases-83bfbKwd.js +0 -96
- package/dist/aliases-CNWj4VYC.js +0 -2
- package/dist/api-BEjdCEtU.js +0 -5
- package/dist/api-CkjarVLC.js +0 -139
- package/dist/api-Dn4kHUcI.js +0 -3
- package/dist/approval-gateway-resolver-CC1SlTbX.js +0 -29
- package/dist/approval-gateway-runtime-d2TZtKpe.js +0 -2
- package/dist/approval-handler-runtime-COVHjwvD.js +0 -439
- package/dist/approval-native-runtime-BVIV224X.js +0 -729
- package/dist/attempt-execution.runtime-CszeM4rO.js +0 -509
- package/dist/attempt.prompt-helpers-CJwtdWVk.js +0 -221
- package/dist/attempt.tool-run-context-D3pOtNpQ.js +0 -933
- package/dist/audit-CI0PTe8o.js +0 -939
- package/dist/audit.runtime-CVT0pKNw.js +0 -7
- package/dist/auth-B6BvjceY.js +0 -383
- package/dist/auth-C24A8Bdb.js +0 -2
- package/dist/auth-order--2Z2RfgO.js +0 -2
- package/dist/auth-order-Cab5pbli.js +0 -96
- package/dist/bash-tools-D4Ow1Dnu.js +0 -3
- package/dist/bash-tools-N8ycn0zw.js +0 -2824
- package/dist/binding-routing-IdC_J5YZ.js +0 -85
- package/dist/binding-targets-BD3JnlsK.js +0 -121
- package/dist/bridge-server-DReQkRlc.js +0 -113
- package/dist/browser-control-auth-BDpXA4Fa.js +0 -2
- package/dist/browser-node-runtime-CUEWaMPj.js +0 -12
- package/dist/browser-profiles-CKoK0REq.js +0 -2
- package/dist/browser-runtime-DctmCqop.js +0 -387
- package/dist/browser-setup-tools-D_hWDm_d.js +0 -13
- package/dist/build-00dHETnB.js +0 -550
- package/dist/call-BEBMfrmf.js +0 -331
- package/dist/call-J1xym_da.js +0 -3
- package/dist/call.runtime-DpiL_m7V.js +0 -2
- package/dist/capability-cli-Dcgy6e0s.js +0 -1401
- package/dist/catchup-BIWAuu8n.js +0 -300
- package/dist/channel-1CgTIJaH.js +0 -595
- package/dist/channel-471U1pny.js +0 -1100
- package/dist/channel-B-pPhXQ4.js +0 -453
- package/dist/channel-BYutJYNS.js +0 -297
- package/dist/channel-C2g916cY.js +0 -491
- package/dist/channel-C5JVIEYG.js +0 -226
- package/dist/channel-C6PLBfBu.js +0 -1320
- package/dist/channel-DFhzKEOr.js +0 -1802
- package/dist/channel-DaaKYb-X.js +0 -350
- package/dist/channel-LS_UWVN6.js +0 -840
- package/dist/channel-UwrUqsgJ.js +0 -1174
- package/dist/channel-core-u67ncUuJ.js +0 -5
- package/dist/channel-inbound-CZj1nuJ5.js +0 -31
- package/dist/channel-plugin-runtime-DbjaJmEm.js +0 -771
- package/dist/channel-runtime-o1M6R948.js +0 -425
- package/dist/channel.runtime-BBqx6vVj.js +0 -430
- package/dist/channel.runtime-ChXnhf2V.js +0 -2364
- package/dist/channel.runtime-CiZ5wg5-.js +0 -89
- package/dist/channel.runtime-DOIkahiZ.js +0 -109
- package/dist/channel.runtime-DUe0Bv9U.js +0 -4
- package/dist/channel.runtime-DwICmfFu.js +0 -576
- package/dist/channel.runtime-EBX0cQWh.js +0 -34702
- package/dist/channel.setup-DtHhxlgN.js +0 -10
- package/dist/channels-ChLA3Mda.js +0 -733
- package/dist/channels-cli-BqXA071P.js +0 -268
- package/dist/chat-B0vA8pOW.js +0 -2830
- package/dist/clawbot-cli-BkpkeI6b.js +0 -9
- package/dist/cli-DLD4HPRd.js +0 -72
- package/dist/cli-ME5Ufp83.js +0 -219
- package/dist/cli-ZcCIz0qL.js +0 -2
- package/dist/cli-eAgnabrD.js +0 -2
- package/dist/cli-runner-BBu8Rh95.js +0 -286
- package/dist/cli-runner.runtime-VDLuf97Y.js +0 -4
- package/dist/cli-runner.runtime-jK2bwGDS.js +0 -3
- package/dist/cli.runtime-BquKQJFI.js +0 -1261
- package/dist/client-CDLetywx.js +0 -713
- package/dist/client-CvwHGzRM.js +0 -138
- package/dist/command-auth-BavEEGzq.js +0 -76
- package/dist/command-config-resolution-CgnDlwiW.js +0 -2
- package/dist/command-config-resolution-M1sLQtCC.js +0 -23
- package/dist/command-config-resolution.runtime-BjVMJcFa.js +0 -2
- package/dist/command-registry-BuZbFhmG.js +0 -4
- package/dist/command-registry-DugzbSDU.js +0 -9
- package/dist/command-registry-core-BF-C6kEk.js +0 -106
- package/dist/command-secret-gateway-DJUQmmqr.js +0 -528
- package/dist/command-status.runtime-Ws0MIfwY.js +0 -87
- package/dist/commands-acp-COM5kx3I.js +0 -77
- package/dist/commands-compact.runtime-ZKLATU16.js +0 -10
- package/dist/commands-handlers.runtime-BonxJuOb.js +0 -4597
- package/dist/commands-status-fYAnTzxd.js +0 -16
- package/dist/commands-status.runtime-NM9_L71Y.js +0 -3
- package/dist/commands-subagents-control.runtime-C7DNjqgK.js +0 -2
- package/dist/commands-subagents-control.runtime-DrvwTszJ.js +0 -3
- package/dist/commands-system-prompt-CF7mFq3s.js +0 -158
- package/dist/commands-system-prompt-DAynyctS.js +0 -2
- package/dist/commands.runtime-CdVSeunO.js +0 -166
- package/dist/compact-CQZ7fcfj.js +0 -1118
- package/dist/compact.runtime-QhgOP3dH.js +0 -12
- package/dist/completion-cli-CkA79Zyd.js +0 -328
- package/dist/config-B0nwYGOq.js +0 -252
- package/dist/config-cli-DQy3aiyu.js +0 -1078
- package/dist/configure-D9182v2z.js +0 -1252
- package/dist/configure-DFK_gG4o.js +0 -2
- package/dist/connect-options-ClIicH76.js +0 -699
- package/dist/control-auth-C9KfGTux.js +0 -125
- package/dist/control-service-BNB3JMwD.js +0 -156
- package/dist/conversation-id-BfPCu1Wm.js +0 -235
- package/dist/conversation-id-Btjce0dU.js +0 -38
- package/dist/conversation-runtime-nC5e5AUD.js +0 -31
- package/dist/core-cKYNneLh.js +0 -275
- package/dist/cron-cli-B61Ct4d1.js +0 -713
- package/dist/daemon-cli-BDUJ0J9c.js +0 -12
- package/dist/dashboard-BY0SQ1Xk.js +0 -81
- package/dist/dashboard-BfFLhcnp.js +0 -2
- package/dist/delegate-C5l7xFfl.js +0 -64
- package/dist/detached-task-runtime-jUnU2hI1.js +0 -73
- package/dist/devices-cli-C2Yk5InD.js +0 -498
- package/dist/diagnostics-vLNGss4R.js +0 -154
- package/dist/direct-dm-CY7NvWjO.js +0 -64
- package/dist/dispatch-acp-D7us-JIr.js +0 -981
- package/dist/dispatch-acp-manager.runtime-CvUvPlIu.js +0 -3
- package/dist/dispatch-acp.runtime-BD04s8Zg.js +0 -19
- package/dist/dispatch-dxndBjvg.js +0 -1131
- package/dist/doctor-device-pairing-BWOuDvCO.js +0 -307
- package/dist/doctor-gateway-daemon-flow-CfcG9HqL.js +0 -250
- package/dist/doctor-gateway-health-CgtIAXiV.js +0 -63
- package/dist/doctor-health-Dl8qTbf0.js +0 -59
- package/dist/doctor-health-contributions-7VvQGU8Z.js +0 -493
- package/dist/doctor-prompter-C1E_9epq.js +0 -56
- package/dist/doctor-workspace-status-D_hKwgSB.js +0 -75
- package/dist/dreaming-narrative-CGIhjB7J.js +0 -595
- package/dist/dreaming-zER_6Edx.js +0 -1574
- package/dist/embedded-gateway-stub.runtime-DW85g-TS.js +0 -9
- package/dist/exec-approvals-cli-Cw---PEd.js +0 -498
- package/dist/execute.runtime-g2ckBHQo.js +0 -1366
- package/dist/fallbacks-pV2ELjMN.js +0 -31
- package/dist/fallbacks-shared-w3hzF-a3.js +0 -111
- package/dist/fallbacks-w-04P5Ca.js +0 -2
- package/dist/gateway-D6iHe5yM.js +0 -115
- package/dist/gateway-cli-DA66EGkc.js +0 -1283
- package/dist/gateway-rpc-C-wnj8-r.js +0 -14
- package/dist/gateway-rpc.runtime-UIPl38ru.js +0 -23
- package/dist/gateway-runtime-4_MNp5Fb.js +0 -15
- package/dist/gateway-status-qhNQ0-uT.js +0 -584
- package/dist/genesis-tools-Zt9xVisn.js +0 -9144
- package/dist/genesis-tools.runtime-DOqh6dkQ.js +0 -2
- package/dist/get-reply-DQ0O9TtJ.js +0 -3879
- package/dist/get-reply-from-config.runtime-BuatHlOY.js +0 -2
- package/dist/graph-users-wwfIkVlV.js +0 -1337
- package/dist/health-Be7drwbn.js +0 -3
- package/dist/health-DJnGvMzg.js +0 -469
- package/dist/health-route-Du-tYbyy.js +0 -41
- package/dist/health-route-yas5DRN8.js +0 -2
- package/dist/heartbeat-runner-CgkBGYmZ.js +0 -1292
- package/dist/heartbeat-runner-DGh3rGv3.js +0 -5
- package/dist/heartbeat-runner.runtime-Cx_T3Yrs.js +0 -4
- package/dist/hooks-cli-BMwaAVjB.js +0 -433
- package/dist/image-fallbacks-NW-B8h53.js +0 -31
- package/dist/image-fallbacks-twUg-Ew1.js +0 -2
- package/dist/inbound-reply-dispatch-B3xJheBv.js +0 -73
- package/dist/infra-runtime-D0KgiuPR.js +0 -39
- package/dist/init-Bw8qk4Lv.js +0 -59
- package/dist/library-BNl9tYJG.js +0 -45
- package/dist/lifecycle-8ptHb58U.js +0 -571
- package/dist/lifecycle-CRrSobXZ.js +0 -229
- package/dist/lifecycle.runtime-BDtzaxrU.js +0 -2
- package/dist/list-C-ACwyIs.js +0 -131
- package/dist/list-CJ6S9iAc.js +0 -1212
- package/dist/list-DYwQ_Gfw.js +0 -2
- package/dist/list-kHLQDpvt.js +0 -2
- package/dist/list.probe-CBJUHqju.js +0 -419
- package/dist/llm-slug-generator-DLZt8Bt6.js +0 -79
- package/dist/load-config-D_5019M3.js +0 -35
- package/dist/local-dispatch.runtime-Dau5kHVW.js +0 -8
- package/dist/logs-cli-B1tDn7oN.js +0 -265
- package/dist/logs-cli.runtime-Cx4fMzWz.js +0 -2
- package/dist/main-session-restart-recovery-CK0sXd7f.js +0 -206
- package/dist/managed-image-attachments-97PVDeFD.js +0 -635
- package/dist/managed-image-attachments-CC4KLL8v.js +0 -2
- package/dist/manager-BQ31y7iX.js +0 -2057
- package/dist/manager-CFkV693Y.js +0 -2
- package/dist/markdown-to-line-zHVHdZSu.js +0 -790
- package/dist/mcp-cli-DJlict1A.js +0 -725
- package/dist/mcp-http-BARh68Sy.js +0 -529
- package/dist/memory-core-host-runtime-cli-BoZwOAnU.js +0 -9
- package/dist/message-BlYpA3Rj.js +0 -232
- package/dist/message-action-runner-l7HQgRsA.js +0 -2
- package/dist/message-action-runner-xpyTSTjc.js +0 -1407
- package/dist/message-actions-BYCdd6QG.js +0 -143
- package/dist/message.gateway.runtime-Cb8XMFan.js +0 -2
- package/dist/models-auth-status-D3gt082v.js +0 -201
- package/dist/models-cli-9FhzxcFw.js +0 -219
- package/dist/monitor-B0WA83w1.js +0 -788
- package/dist/monitor-B6-pdSFR.js +0 -671
- package/dist/monitor-BX1yfW2U.js +0 -2
- package/dist/monitor-DKv9iSX7.js +0 -1459
- package/dist/monitor-DNDx4gOO.js +0 -1237
- package/dist/monitor-DpAuHTne.js +0 -1661
- package/dist/monitor-auth-B42F9dgo.js +0 -207
- package/dist/monitor-processing-DyP1l7Er.js +0 -1974
- package/dist/monitor.runtime-DbcwE5XS.js +0 -2
- package/dist/monitor.webhook-Dthw-aQB.js +0 -180
- package/dist/msteams-D2mb7FnE.js +0 -35
- package/dist/native-hook-relay-CdaoEdNX.js +0 -519
- package/dist/nextcloud-talk-B18eVVV7.js +0 -17
- package/dist/node-cli-Ck0VwYwV.js +0 -2506
- package/dist/nodes-cli-DC-DcHIP.js +0 -1046
- package/dist/nodes-utils-BWIRDyv_.js +0 -84
- package/dist/nodes.helpers-BEHH7X2_.js +0 -34
- package/dist/notify-JkL7xdrB.js +0 -315
- package/dist/onboard-C5BIoHo2.js +0 -70
- package/dist/onboard-helpers-C2zyBKT7.js +0 -204
- package/dist/onboard-helpers-CaQKQFzC.js +0 -6
- package/dist/onboard-interactive-Bq6kHQx1.js +0 -24
- package/dist/onboard-non-interactive-DQFp1nqn.js +0 -548
- package/dist/onboard-qYbyvbbw.js +0 -2
- package/dist/onboard-remote-BrlKFoRp.js +0 -193
- package/dist/onboard-remote-CGK4Eovr.js +0 -2
- package/dist/onboard-skills-BOatQ3qu.js +0 -2
- package/dist/onboard-skills-MIp5L4Bg.js +0 -134
- package/dist/openai-http-BzR_snW0.js +0 -500
- package/dist/openresponses-http-D_qmLKbV.js +0 -1128
- package/dist/operator-approvals-client-BMXsikiI.js +0 -68
- package/dist/outbound.runtime-sBaP-y4C.js +0 -2
- package/dist/pair-command-approve-DJLjxT6x.js +0 -44
- package/dist/persistent-bindings.lifecycle-DzeMqt76.js +0 -85
- package/dist/persistent-bindings.lifecycle-zRaTKjMh.js +0 -2
- package/dist/pi-embedded-CeDhWvgx.js +0 -4
- package/dist/pi-embedded-DUpRXfJO.js +0 -2905
- package/dist/pi-embedded.runtime-DtYM7NdD.js +0 -4
- package/dist/pi-tool-definition-adapter-CB0HS-nc.js +0 -229
- package/dist/pi-tools-Bj9D94l1.js +0 -1057
- package/dist/pi-tools.before-tool-call-BbQkYemc.js +0 -2
- package/dist/pi-tools.before-tool-call-DgbBDh3b.js +0 -433
- package/dist/plugin-PC7i4gKf.js +0 -12195
- package/dist/plugin-enabled-CfTRDw44.js +0 -140
- package/dist/plugin-registration-B-k3D6sT.js +0 -23
- package/dist/plugin-service-BK8-VUTt.js +0 -2892
- package/dist/policy-BW0acqi4.js +0 -328
- package/dist/prepare.runtime-_AbiM89x.js +0 -815
- package/dist/probe-BMLDcZ32.js +0 -241
- package/dist/probe-Ba3TRP2B.js +0 -45
- package/dist/probe-CUiwktQB.js +0 -74
- package/dist/probe-DebEe8F0.js +0 -2
- package/dist/probe-DezLtnJj.js +0 -2
- package/dist/probe-V8OIWFIZ.js +0 -1443
- package/dist/probe-dGp0-neY.js +0 -2205
- package/dist/program-DW7m0H8i.js +0 -111
- package/dist/prompt-select-styled-jplnVzKe.js +0 -20
- package/dist/protocol-C83jsm03.js +0 -2335
- package/dist/provider-dispatcher-CE-8HFJ3.js +0 -22
- package/dist/provider-dispatcher-CvSHrBCK.js +0 -2
- package/dist/qr-cli-N0rKzCLa.js +0 -349
- package/dist/qr-cli-anaRAjRO.js +0 -2
- package/dist/reaction-runtime-api-D0RKf7dw.js +0 -116
- package/dist/reactions-D5tTqX43.js +0 -998
- package/dist/register-service-commands-DR8PFCDH.js +0 -71
- package/dist/register.agent-C0S6Qd9d.js +0 -248
- package/dist/register.configure-Syn4zjBT.js +0 -15
- package/dist/register.maintenance-DlWVxmgp.js +0 -363
- package/dist/register.message-Ca0UvwH3.js +0 -329
- package/dist/register.onboard-BrPnofu3.js +0 -88
- package/dist/register.runtime-DrxUrGzO.js +0 -81
- package/dist/register.setup-DgnkDiBO.js +0 -150
- package/dist/register.status-health-sessions-BvccPkCF.js +0 -1215
- package/dist/register.subclis-BybdnCZ1.js +0 -29
- package/dist/register.subclis-CmiGzm_7.js +0 -3
- package/dist/register.subclis-core-CdzVfdg9.js +0 -249
- package/dist/register.wallet-CY_R6-2U.js +0 -271
- package/dist/reply-dispatch-runtime-C1FpfnAM.js +0 -13
- package/dist/reply-runtime-s43-M8Jj.js +0 -11
- package/dist/reply.runtime-7wnQxEUw.js +0 -2
- package/dist/restart-health-COnZzsKp.js +0 -202
- package/dist/restart-health-eI6OqLsK.js +0 -2
- package/dist/root-help-DeQ9PX0j.js +0 -44
- package/dist/routes-BWEN5YAF.js +0 -2
- package/dist/routes-C672_WKa.js +0 -3341
- package/dist/rpc-B426srGJ.js +0 -61
- package/dist/rpc.runtime-DUM1XyRX.js +0 -21
- package/dist/run-delivery.runtime-CXw2jVkt.js +0 -530
- package/dist/run-embedded.runtime-xS-1mmyO.js +0 -4
- package/dist/run-execution-cli.runtime-aDPMKzJX.js +0 -4
- package/dist/run-executor.runtime-C4ZFsj8q.js +0 -277
- package/dist/run-main-4Rq8UxLR.js +0 -567
- package/dist/run-subagent-registry.runtime-DzAf7j8r.js +0 -2
- package/dist/run-wait-T_9raRki.js +0 -135
- package/dist/runtime-Bi-FG7ze.js +0 -973
- package/dist/runtime-DTEEU-FQ.js +0 -9
- package/dist/runtime-api-CD1uwpvJ.js +0 -4
- package/dist/runtime-api-CuUMmc6o.js +0 -9
- package/dist/runtime-api-D1I8x3ZK.js +0 -9
- package/dist/runtime-api-N4ICzHSN.js +0 -14
- package/dist/runtime-embedded-pi.runtime-TzUSObio.js +0 -2
- package/dist/runtime-internal-BpmmUWVj.js +0 -2
- package/dist/runtime-options-lwiANMrp.js +0 -275
- package/dist/runtime-schema-DyZs3Hqj.js +0 -27938
- package/dist/scan-KAzO-hG8.js +0 -523
- package/dist/scan-WYNB2yvG.js +0 -2
- package/dist/secrets-cli-V8e9noRa.js +0 -2101
- package/dist/security-cli-DQAHIStH.js +0 -486
- package/dist/selection-B1sx7E0M.js +0 -2
- package/dist/selection-CdYrfYRk.js +0 -7736
- package/dist/send-CS2Grx1T.js +0 -102
- package/dist/send-DD9fqnsS.js +0 -156
- package/dist/send.runtime-UBa9b0KL.js +0 -2
- package/dist/server-DTBpPcSJ.js +0 -77
- package/dist/server-LnjMkCwG.js +0 -13
- package/dist/server-context-CgUkot1S.js +0 -2
- package/dist/server-context-e5qiFYb9.js +0 -847
- package/dist/server-node-events-DGbm1S0O.js +0 -481
- package/dist/server-plugin-bootstrap-BAb2yBlZ.js +0 -11652
- package/dist/server-plugin-bootstrap-QC6Ie4eo.js +0 -2
- package/dist/server-restart-sentinel-CHIEkMav.js +0 -697
- package/dist/server.impl-smIsMGyM.js +0 -12822
- package/dist/service-CzJ-5DK_.js +0 -1415
- package/dist/session-kill-http-J_6Qu28L.js +0 -110
- package/dist/session-reset-service-BpBipveT.js +0 -471
- package/dist/session-route-CpYl3T8Y.js +0 -93
- package/dist/session-status.runtime-UUa0VU0y.js +0 -2
- package/dist/session-subagent-reactivation.runtime-L2O0yOy4.js +0 -2
- package/dist/session-tab-registry-DxPANUw6.js +0 -581
- package/dist/session-visibility-CPIadgvQ.js +0 -147
- package/dist/sessions-helpers-DdEWQ3o2.js +0 -304
- package/dist/sessions-history-http-B9AS9VFQ.js +0 -383
- package/dist/sessions-patch-DRBy0uu3.js +0 -309
- package/dist/sessions-resolve-DM6s9pot.js +0 -174
- package/dist/sessions.runtime-ixcVUViJ.js +0 -2
- package/dist/setup-BKyIGRRk.js +0 -505
- package/dist/setup-api-D3Djxtka.js +0 -29
- package/dist/setup-core-C5ITyKzA.js +0 -171
- package/dist/setup-core-Nm6km7jp.js +0 -176
- package/dist/setup-surface-BEpfVHSH.js +0 -403
- package/dist/setup-surface-D4gEPCHR.js +0 -219
- package/dist/setup-surface-DdkjjhYB.js +0 -286
- package/dist/setup.finalize-BOnrhqzV.js +0 -547
- package/dist/setup.gateway-config-CmRGTkaE.js +0 -250
- package/dist/shared-Bb4YCXx6.js +0 -198
- package/dist/shared-CZCh0WCN.js +0 -121
- package/dist/shared-Df0CbtUw.js +0 -76
- package/dist/slash-state-BQJu5tOn.js +0 -1911
- package/dist/src-C4ImkbSW.js +0 -3974
- package/dist/startup-context-nffy5sQU.js +0 -312
- package/dist/status-0QDxMlFq.js +0 -2
- package/dist/status-5OjwhqkA.js +0 -209
- package/dist/status-C306d1iE.js +0 -2
- package/dist/status-Crg2u6MB.js +0 -397
- package/dist/status-DMLvl7RU.js +0 -190
- package/dist/status-N59cRl1N.js +0 -3
- package/dist/status-all-WKQtyBf9.js +0 -498
- package/dist/status-json-C2DgeCRG.js +0 -14
- package/dist/status-json-command-B2k_1ZuR.js +0 -84
- package/dist/status-runtime-shared-ZCbKKj-y.js +0 -257
- package/dist/status-subagents.runtime-CmaY9hZm.js +0 -18
- package/dist/status-text-NR1x0nMa.js +0 -237
- package/dist/status.gateway-connection.runtime-DBlvpSWB.js +0 -2
- package/dist/status.gather-BkL7J_y1.js +0 -292
- package/dist/status.gather-CWbs5-z2.js +0 -2
- package/dist/status.runtime-BOc5e8DI.js +0 -2
- package/dist/status.scan-DY4x5vdB.js +0 -65
- package/dist/status.scan-overview-CF96KtOa.js +0 -379
- package/dist/status.scan.fast-json-CUQQXpr8.js +0 -2
- package/dist/status.scan.fast-json-Dd2Q4LW7.js +0 -132
- package/dist/status.summary-CfGo54T4.js +0 -214
- package/dist/status.summary-CyG5QMo9.js +0 -2
- package/dist/subagent-announce-DW816JCC.js +0 -351
- package/dist/subagent-announce-delivery-DgKXtDWV.js +0 -726
- package/dist/subagent-announce-output-BrJdNBlx.js +0 -364
- package/dist/subagent-control-xz3ZcUrb.js +0 -506
- package/dist/subagent-followup.runtime-DQS6ipTt.js +0 -68
- package/dist/subagent-orphan-recovery-CzwjvW_o.js +0 -305
- package/dist/subagent-registry-88vWnDP5.js +0 -1753
- package/dist/subagent-registry-B_JB7WyN.js +0 -3
- package/dist/subagent-spawn-ChRpfSX6.js +0 -1005
- package/dist/system-cli-BiYfWkTS.js +0 -59
- package/dist/targets-TpH8-6iR.js +0 -67
- package/dist/task-executor-Chx2YFYp.js +0 -360
- package/dist/task-owner-access-CPMM8lVh.js +0 -74
- package/dist/task-registry-Cb_XGvuS.js +0 -2366
- package/dist/task-registry-delivery-runtime-6z8W4up9.js +0 -2
- package/dist/task-registry-delivery-runtime-OqkDQtLj.js +0 -3
- package/dist/task-registry.maintenance-Ci6oLcFg.js +0 -2
- package/dist/task-registry.maintenance-i69b0iH7.js +0 -416
- package/dist/testing-BmGGzr14.js +0 -575
- package/dist/text-report-WpPbFau5.js +0 -587
- package/dist/tool-resolution-DCK5whNz.js +0 -90
- package/dist/tools-effective-inventory-CkymEUkf.js +0 -152
- package/dist/tools-invoke-http-BECDcy94.js +0 -206
- package/dist/trash-Cz555AtH.js +0 -24
- package/dist/tui-cli-BTNsU35D.js +0 -4575
- package/dist/update-cli-CEi34S-K.js +0 -1759
- package/dist/upgrade-CeMGojsg.js +0 -1226
- package/dist/video-generation-task-status-BGbHX8xJ.js +0 -163
- package/dist/wait-for-idle-before-flush-CUNJdPz7.js +0 -5986
- package/dist/wizard-models-DGVbHDnh.js +0 -334
|
@@ -0,0 +1,2335 @@
|
|
|
1
|
+
import { n as ENV_SECRET_REF_ID_RE } from "./types.secrets-ews2W8BF.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-GkHI8jyU.js";
|
|
3
|
+
import { n as GATEWAY_CLIENT_IDS, r as GATEWAY_CLIENT_MODES } from "./client-info-CfESmEX1.js";
|
|
4
|
+
import { t as INPUT_PROVENANCE_KIND_VALUES } from "./input-provenance-Dr0BI482.js";
|
|
5
|
+
import { n as MAX_PLUGIN_APPROVAL_TIMEOUT_MS } from "./plugin-approvals-CIi8dLMB.js";
|
|
6
|
+
import Ajv 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/nodes.ts
|
|
1498
|
+
const NodePendingWorkTypeSchema = Type.String({ enum: ["status.request", "location.request"] });
|
|
1499
|
+
const NodePendingWorkPrioritySchema = Type.String({ enum: ["normal", "high"] });
|
|
1500
|
+
const NodePairRequestParamsSchema = Type.Object({
|
|
1501
|
+
nodeId: NonEmptyString,
|
|
1502
|
+
displayName: Type.Optional(NonEmptyString),
|
|
1503
|
+
platform: Type.Optional(NonEmptyString),
|
|
1504
|
+
version: Type.Optional(NonEmptyString),
|
|
1505
|
+
coreVersion: Type.Optional(NonEmptyString),
|
|
1506
|
+
uiVersion: Type.Optional(NonEmptyString),
|
|
1507
|
+
deviceFamily: Type.Optional(NonEmptyString),
|
|
1508
|
+
modelIdentifier: Type.Optional(NonEmptyString),
|
|
1509
|
+
caps: Type.Optional(Type.Array(NonEmptyString)),
|
|
1510
|
+
commands: Type.Optional(Type.Array(NonEmptyString)),
|
|
1511
|
+
remoteIp: Type.Optional(NonEmptyString),
|
|
1512
|
+
silent: Type.Optional(Type.Boolean())
|
|
1513
|
+
}, { additionalProperties: false });
|
|
1514
|
+
const NodePairListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1515
|
+
const NodePairApproveParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1516
|
+
const NodePairRejectParamsSchema = Type.Object({ requestId: NonEmptyString }, { additionalProperties: false });
|
|
1517
|
+
const NodePairVerifyParamsSchema = Type.Object({
|
|
1518
|
+
nodeId: NonEmptyString,
|
|
1519
|
+
token: NonEmptyString
|
|
1520
|
+
}, { additionalProperties: false });
|
|
1521
|
+
const NodeRenameParamsSchema = Type.Object({
|
|
1522
|
+
nodeId: NonEmptyString,
|
|
1523
|
+
displayName: NonEmptyString
|
|
1524
|
+
}, { additionalProperties: false });
|
|
1525
|
+
const NodeListParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1526
|
+
const NodePendingAckParamsSchema = Type.Object({ ids: Type.Array(NonEmptyString, { minItems: 1 }) }, { additionalProperties: false });
|
|
1527
|
+
const NodeDescribeParamsSchema = Type.Object({ nodeId: NonEmptyString }, { additionalProperties: false });
|
|
1528
|
+
const NodeInvokeParamsSchema = Type.Object({
|
|
1529
|
+
nodeId: NonEmptyString,
|
|
1530
|
+
command: NonEmptyString,
|
|
1531
|
+
params: Type.Optional(Type.Unknown()),
|
|
1532
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1533
|
+
idempotencyKey: NonEmptyString
|
|
1534
|
+
}, { additionalProperties: false });
|
|
1535
|
+
const NodeInvokeResultParamsSchema = Type.Object({
|
|
1536
|
+
id: NonEmptyString,
|
|
1537
|
+
nodeId: NonEmptyString,
|
|
1538
|
+
ok: Type.Boolean(),
|
|
1539
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1540
|
+
payloadJSON: Type.Optional(Type.String()),
|
|
1541
|
+
error: Type.Optional(Type.Object({
|
|
1542
|
+
code: Type.Optional(NonEmptyString),
|
|
1543
|
+
message: Type.Optional(NonEmptyString)
|
|
1544
|
+
}, { additionalProperties: false }))
|
|
1545
|
+
}, { additionalProperties: false });
|
|
1546
|
+
const NodeEventParamsSchema = Type.Object({
|
|
1547
|
+
event: NonEmptyString,
|
|
1548
|
+
payload: Type.Optional(Type.Unknown()),
|
|
1549
|
+
payloadJSON: Type.Optional(Type.String())
|
|
1550
|
+
}, { additionalProperties: false });
|
|
1551
|
+
const NodePendingDrainParamsSchema = Type.Object({ maxItems: Type.Optional(Type.Integer({
|
|
1552
|
+
minimum: 1,
|
|
1553
|
+
maximum: 10
|
|
1554
|
+
})) }, { additionalProperties: false });
|
|
1555
|
+
const NodePendingDrainItemSchema = Type.Object({
|
|
1556
|
+
id: NonEmptyString,
|
|
1557
|
+
type: NodePendingWorkTypeSchema,
|
|
1558
|
+
priority: Type.String({ enum: [
|
|
1559
|
+
"default",
|
|
1560
|
+
"normal",
|
|
1561
|
+
"high"
|
|
1562
|
+
] }),
|
|
1563
|
+
createdAtMs: Type.Integer({ minimum: 0 }),
|
|
1564
|
+
expiresAtMs: Type.Optional(Type.Union([Type.Integer({ minimum: 0 }), Type.Null()])),
|
|
1565
|
+
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown()))
|
|
1566
|
+
}, { additionalProperties: false });
|
|
1567
|
+
Type.Object({
|
|
1568
|
+
nodeId: NonEmptyString,
|
|
1569
|
+
revision: Type.Integer({ minimum: 0 }),
|
|
1570
|
+
items: Type.Array(NodePendingDrainItemSchema),
|
|
1571
|
+
hasMore: Type.Boolean()
|
|
1572
|
+
}, { additionalProperties: false });
|
|
1573
|
+
const NodePendingEnqueueParamsSchema = Type.Object({
|
|
1574
|
+
nodeId: NonEmptyString,
|
|
1575
|
+
type: NodePendingWorkTypeSchema,
|
|
1576
|
+
priority: Type.Optional(NodePendingWorkPrioritySchema),
|
|
1577
|
+
expiresInMs: Type.Optional(Type.Integer({
|
|
1578
|
+
minimum: 1e3,
|
|
1579
|
+
maximum: 864e5
|
|
1580
|
+
})),
|
|
1581
|
+
wake: Type.Optional(Type.Boolean())
|
|
1582
|
+
}, { additionalProperties: false });
|
|
1583
|
+
Type.Object({
|
|
1584
|
+
nodeId: NonEmptyString,
|
|
1585
|
+
revision: Type.Integer({ minimum: 0 }),
|
|
1586
|
+
queued: NodePendingDrainItemSchema,
|
|
1587
|
+
wakeTriggered: Type.Boolean()
|
|
1588
|
+
}, { additionalProperties: false });
|
|
1589
|
+
Type.Object({
|
|
1590
|
+
id: NonEmptyString,
|
|
1591
|
+
nodeId: NonEmptyString,
|
|
1592
|
+
command: NonEmptyString,
|
|
1593
|
+
paramsJSON: Type.Optional(Type.String()),
|
|
1594
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1595
|
+
idempotencyKey: Type.Optional(NonEmptyString)
|
|
1596
|
+
}, { additionalProperties: false });
|
|
1597
|
+
//#endregion
|
|
1598
|
+
//#region src/gateway/protocol/schema/plugin-approvals.ts
|
|
1599
|
+
const PluginApprovalRequestParamsSchema = Type.Object({
|
|
1600
|
+
pluginId: Type.Optional(NonEmptyString),
|
|
1601
|
+
title: Type.String({
|
|
1602
|
+
minLength: 1,
|
|
1603
|
+
maxLength: 80
|
|
1604
|
+
}),
|
|
1605
|
+
description: Type.String({
|
|
1606
|
+
minLength: 1,
|
|
1607
|
+
maxLength: 256
|
|
1608
|
+
}),
|
|
1609
|
+
severity: Type.Optional(Type.String({ enum: [
|
|
1610
|
+
"info",
|
|
1611
|
+
"warning",
|
|
1612
|
+
"critical"
|
|
1613
|
+
] })),
|
|
1614
|
+
toolName: Type.Optional(Type.String()),
|
|
1615
|
+
toolCallId: Type.Optional(Type.String()),
|
|
1616
|
+
agentId: Type.Optional(Type.String()),
|
|
1617
|
+
sessionKey: Type.Optional(Type.String()),
|
|
1618
|
+
turnSourceChannel: Type.Optional(Type.String()),
|
|
1619
|
+
turnSourceTo: Type.Optional(Type.String()),
|
|
1620
|
+
turnSourceAccountId: Type.Optional(Type.String()),
|
|
1621
|
+
turnSourceThreadId: Type.Optional(Type.Union([Type.String(), Type.Number()])),
|
|
1622
|
+
timeoutMs: Type.Optional(Type.Integer({
|
|
1623
|
+
minimum: 1,
|
|
1624
|
+
maximum: MAX_PLUGIN_APPROVAL_TIMEOUT_MS
|
|
1625
|
+
})),
|
|
1626
|
+
twoPhase: Type.Optional(Type.Boolean())
|
|
1627
|
+
}, { additionalProperties: false });
|
|
1628
|
+
const PluginApprovalResolveParamsSchema = Type.Object({
|
|
1629
|
+
id: NonEmptyString,
|
|
1630
|
+
decision: NonEmptyString
|
|
1631
|
+
}, { additionalProperties: false });
|
|
1632
|
+
//#endregion
|
|
1633
|
+
//#region src/gateway/protocol/schema/plugins.ts
|
|
1634
|
+
const NullableStringSchema = Type.Union([Type.String(), Type.Null()]);
|
|
1635
|
+
const PluginPackageFamilySchema = Type.Union([Type.Literal("code-plugin"), Type.Literal("bundle-plugin")]);
|
|
1636
|
+
const PluginPackageChannelSchema = Type.Union([
|
|
1637
|
+
Type.Literal("official"),
|
|
1638
|
+
Type.Literal("community"),
|
|
1639
|
+
Type.Literal("private")
|
|
1640
|
+
]);
|
|
1641
|
+
const PluginInstallRecordSchema = Type.Object({
|
|
1642
|
+
source: NonEmptyString,
|
|
1643
|
+
spec: Type.Optional(Type.String()),
|
|
1644
|
+
sourcePath: Type.Optional(Type.String()),
|
|
1645
|
+
installPath: Type.Optional(Type.String()),
|
|
1646
|
+
version: Type.Optional(Type.String()),
|
|
1647
|
+
resolvedName: Type.Optional(Type.String()),
|
|
1648
|
+
resolvedVersion: Type.Optional(Type.String()),
|
|
1649
|
+
resolvedSpec: Type.Optional(Type.String()),
|
|
1650
|
+
marketplaceName: Type.Optional(Type.String()),
|
|
1651
|
+
marketplaceSource: Type.Optional(Type.String()),
|
|
1652
|
+
marketplacePlugin: Type.Optional(Type.String()),
|
|
1653
|
+
clawhubUrl: Type.Optional(Type.String()),
|
|
1654
|
+
clawhubPackage: Type.Optional(Type.String()),
|
|
1655
|
+
clawhubFamily: Type.Optional(Type.String()),
|
|
1656
|
+
clawhubChannel: Type.Optional(Type.String()),
|
|
1657
|
+
installedAt: Type.Optional(Type.String()),
|
|
1658
|
+
resolvedAt: Type.Optional(Type.String())
|
|
1659
|
+
}, { additionalProperties: false });
|
|
1660
|
+
const PluginStatusEntrySchema = Type.Object({
|
|
1661
|
+
id: NonEmptyString,
|
|
1662
|
+
name: NonEmptyString,
|
|
1663
|
+
status: Type.Union([
|
|
1664
|
+
Type.Literal("loaded"),
|
|
1665
|
+
Type.Literal("disabled"),
|
|
1666
|
+
Type.Literal("error")
|
|
1667
|
+
]),
|
|
1668
|
+
source: Type.String(),
|
|
1669
|
+
origin: Type.String(),
|
|
1670
|
+
enabled: Type.Boolean(),
|
|
1671
|
+
explicitlyEnabled: Type.Optional(Type.Boolean()),
|
|
1672
|
+
imported: Type.Optional(Type.Boolean()),
|
|
1673
|
+
description: Type.Optional(Type.String()),
|
|
1674
|
+
version: Type.Optional(Type.String()),
|
|
1675
|
+
format: Type.Optional(Type.String()),
|
|
1676
|
+
bundleFormat: Type.Optional(Type.String()),
|
|
1677
|
+
kind: Type.Optional(Type.Union([Type.String(), Type.Array(Type.String())])),
|
|
1678
|
+
rootDir: Type.Optional(Type.String()),
|
|
1679
|
+
activationReason: Type.Optional(Type.String()),
|
|
1680
|
+
error: Type.Optional(Type.String()),
|
|
1681
|
+
configSchema: Type.Boolean(),
|
|
1682
|
+
install: Type.Optional(PluginInstallRecordSchema),
|
|
1683
|
+
toolNames: Type.Array(Type.String()),
|
|
1684
|
+
channelIds: Type.Array(Type.String()),
|
|
1685
|
+
providerIds: Type.Array(Type.String()),
|
|
1686
|
+
speechProviderIds: Type.Array(Type.String()),
|
|
1687
|
+
webSearchProviderIds: Type.Array(Type.String()),
|
|
1688
|
+
webFetchProviderIds: Type.Array(Type.String()),
|
|
1689
|
+
agentHarnessIds: Type.Array(Type.String()),
|
|
1690
|
+
commands: Type.Array(Type.String()),
|
|
1691
|
+
gatewayMethods: Type.Array(Type.String()),
|
|
1692
|
+
services: Type.Array(Type.String()),
|
|
1693
|
+
httpRoutes: Type.Integer({ minimum: 0 })
|
|
1694
|
+
}, { additionalProperties: false });
|
|
1695
|
+
const PluginsStatusParamsSchema = Type.Object({}, { additionalProperties: false });
|
|
1696
|
+
Type.Object({
|
|
1697
|
+
workspaceDir: Type.Optional(Type.String()),
|
|
1698
|
+
plugins: Type.Array(PluginStatusEntrySchema),
|
|
1699
|
+
diagnostics: Type.Array(Type.Object({
|
|
1700
|
+
level: Type.String(),
|
|
1701
|
+
message: Type.String(),
|
|
1702
|
+
pluginId: Type.Optional(Type.String())
|
|
1703
|
+
}, { additionalProperties: false }))
|
|
1704
|
+
}, { additionalProperties: false });
|
|
1705
|
+
const ClawHubPackageListItemSchema = Type.Object({
|
|
1706
|
+
name: NonEmptyString,
|
|
1707
|
+
displayName: NonEmptyString,
|
|
1708
|
+
family: PluginPackageFamilySchema,
|
|
1709
|
+
runtimeId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1710
|
+
channel: PluginPackageChannelSchema,
|
|
1711
|
+
isOfficial: Type.Boolean(),
|
|
1712
|
+
summary: Type.Optional(NullableStringSchema),
|
|
1713
|
+
ownerHandle: Type.Optional(NullableStringSchema),
|
|
1714
|
+
createdAt: Type.Integer(),
|
|
1715
|
+
updatedAt: Type.Integer(),
|
|
1716
|
+
latestVersion: Type.Optional(NullableStringSchema),
|
|
1717
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1718
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1719
|
+
verificationTier: Type.Optional(NullableStringSchema)
|
|
1720
|
+
}, { additionalProperties: false });
|
|
1721
|
+
const PluginsSearchParamsSchema = Type.Object({
|
|
1722
|
+
query: NonEmptyString,
|
|
1723
|
+
limit: Type.Optional(Type.Integer({
|
|
1724
|
+
minimum: 1,
|
|
1725
|
+
maximum: 100
|
|
1726
|
+
}))
|
|
1727
|
+
}, { additionalProperties: false });
|
|
1728
|
+
Type.Object({ results: Type.Array(Type.Object({
|
|
1729
|
+
score: Type.Number(),
|
|
1730
|
+
package: ClawHubPackageListItemSchema
|
|
1731
|
+
}, { additionalProperties: false })) }, { additionalProperties: false });
|
|
1732
|
+
const PluginsDetailParamsSchema = Type.Object({ name: NonEmptyString }, { additionalProperties: false });
|
|
1733
|
+
Type.Object({
|
|
1734
|
+
package: Type.Union([Type.Object({
|
|
1735
|
+
name: NonEmptyString,
|
|
1736
|
+
displayName: NonEmptyString,
|
|
1737
|
+
family: PluginPackageFamilySchema,
|
|
1738
|
+
runtimeId: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1739
|
+
channel: PluginPackageChannelSchema,
|
|
1740
|
+
isOfficial: Type.Boolean(),
|
|
1741
|
+
summary: Type.Optional(NullableStringSchema),
|
|
1742
|
+
ownerHandle: Type.Optional(NullableStringSchema),
|
|
1743
|
+
createdAt: Type.Integer(),
|
|
1744
|
+
updatedAt: Type.Integer(),
|
|
1745
|
+
latestVersion: Type.Optional(NullableStringSchema),
|
|
1746
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1747
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1748
|
+
verificationTier: Type.Optional(NullableStringSchema),
|
|
1749
|
+
tags: Type.Optional(Type.Record(NonEmptyString, Type.String())),
|
|
1750
|
+
compatibility: Type.Optional(Type.Union([Type.Object({
|
|
1751
|
+
pluginApiRange: Type.Optional(Type.String()),
|
|
1752
|
+
builtWithGenesisVersion: Type.Optional(Type.String()),
|
|
1753
|
+
pluginSdkVersion: Type.Optional(Type.String()),
|
|
1754
|
+
minGatewayVersion: Type.Optional(Type.String())
|
|
1755
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
1756
|
+
capabilities: Type.Optional(Type.Union([Type.Object({
|
|
1757
|
+
executesCode: Type.Optional(Type.Boolean()),
|
|
1758
|
+
runtimeId: Type.Optional(Type.String()),
|
|
1759
|
+
capabilityTags: Type.Optional(Type.Array(Type.String())),
|
|
1760
|
+
bundleFormat: Type.Optional(Type.String()),
|
|
1761
|
+
hostTargets: Type.Optional(Type.Array(Type.String())),
|
|
1762
|
+
pluginKind: Type.Optional(Type.String()),
|
|
1763
|
+
channels: Type.Optional(Type.Array(Type.String())),
|
|
1764
|
+
providers: Type.Optional(Type.Array(Type.String())),
|
|
1765
|
+
hooks: Type.Optional(Type.Array(Type.String())),
|
|
1766
|
+
bundledSkills: Type.Optional(Type.Array(Type.String()))
|
|
1767
|
+
}, { additionalProperties: false }), Type.Null()])),
|
|
1768
|
+
verification: Type.Optional(Type.Union([Type.Object({
|
|
1769
|
+
tier: Type.Optional(Type.String()),
|
|
1770
|
+
scope: Type.Optional(Type.String()),
|
|
1771
|
+
summary: Type.Optional(Type.String()),
|
|
1772
|
+
sourceRepo: Type.Optional(Type.String()),
|
|
1773
|
+
sourceCommit: Type.Optional(Type.String()),
|
|
1774
|
+
hasProvenance: Type.Optional(Type.Boolean()),
|
|
1775
|
+
scanStatus: Type.Optional(Type.String())
|
|
1776
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
1777
|
+
}, { additionalProperties: false }), Type.Null()]),
|
|
1778
|
+
owner: Type.Optional(Type.Union([Type.Object({
|
|
1779
|
+
handle: Type.Optional(NullableStringSchema),
|
|
1780
|
+
displayName: Type.Optional(NullableStringSchema),
|
|
1781
|
+
image: Type.Optional(NullableStringSchema)
|
|
1782
|
+
}, { additionalProperties: false }), Type.Null()]))
|
|
1783
|
+
}, { additionalProperties: false });
|
|
1784
|
+
const PluginsInstallParamsSchema = Type.Object({
|
|
1785
|
+
source: Type.Literal("clawhub"),
|
|
1786
|
+
name: NonEmptyString,
|
|
1787
|
+
version: Type.Optional(NonEmptyString),
|
|
1788
|
+
force: Type.Optional(Type.Boolean()),
|
|
1789
|
+
dangerouslyForceUnsafeInstall: Type.Optional(Type.Boolean())
|
|
1790
|
+
}, { additionalProperties: false });
|
|
1791
|
+
Type.Object({
|
|
1792
|
+
ok: Type.Literal(true),
|
|
1793
|
+
message: NonEmptyString,
|
|
1794
|
+
pluginId: NonEmptyString,
|
|
1795
|
+
version: Type.Optional(Type.String()),
|
|
1796
|
+
installPath: Type.Optional(Type.String()),
|
|
1797
|
+
warnings: Type.Array(Type.String())
|
|
1798
|
+
}, { additionalProperties: false });
|
|
1799
|
+
const PluginsUpdateParamsSchema = Type.Object({
|
|
1800
|
+
pluginId: NonEmptyString,
|
|
1801
|
+
enabled: Type.Boolean()
|
|
1802
|
+
}, { additionalProperties: false });
|
|
1803
|
+
Type.Object({
|
|
1804
|
+
ok: Type.Literal(true),
|
|
1805
|
+
pluginId: NonEmptyString,
|
|
1806
|
+
enabled: Type.Boolean(),
|
|
1807
|
+
message: NonEmptyString,
|
|
1808
|
+
warnings: Type.Array(Type.String())
|
|
1809
|
+
}, { additionalProperties: false });
|
|
1810
|
+
const PluginsUninstallParamsSchema = Type.Object({
|
|
1811
|
+
pluginId: NonEmptyString,
|
|
1812
|
+
keepFiles: Type.Optional(Type.Boolean())
|
|
1813
|
+
}, { additionalProperties: false });
|
|
1814
|
+
Type.Object({
|
|
1815
|
+
ok: Type.Literal(true),
|
|
1816
|
+
pluginId: NonEmptyString,
|
|
1817
|
+
removed: Type.Array(Type.String()),
|
|
1818
|
+
warnings: Type.Array(Type.String()),
|
|
1819
|
+
message: NonEmptyString
|
|
1820
|
+
}, { additionalProperties: false });
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region src/gateway/protocol/schema/push.ts
|
|
1823
|
+
const ApnsEnvironmentSchema = Type.String({ enum: ["sandbox", "production"] });
|
|
1824
|
+
const PushTestParamsSchema = Type.Object({
|
|
1825
|
+
nodeId: NonEmptyString,
|
|
1826
|
+
title: Type.Optional(Type.String()),
|
|
1827
|
+
body: Type.Optional(Type.String()),
|
|
1828
|
+
environment: Type.Optional(ApnsEnvironmentSchema)
|
|
1829
|
+
}, { additionalProperties: false });
|
|
1830
|
+
Type.Object({
|
|
1831
|
+
ok: Type.Boolean(),
|
|
1832
|
+
status: Type.Integer(),
|
|
1833
|
+
apnsId: Type.Optional(Type.String()),
|
|
1834
|
+
reason: Type.Optional(Type.String()),
|
|
1835
|
+
tokenSuffix: Type.String(),
|
|
1836
|
+
topic: Type.String(),
|
|
1837
|
+
environment: ApnsEnvironmentSchema,
|
|
1838
|
+
transport: Type.String({ enum: ["direct", "relay"] })
|
|
1839
|
+
}, { additionalProperties: false });
|
|
1840
|
+
Type.Object({}, { additionalProperties: false });
|
|
1841
|
+
const SecretsResolveParamsSchema = Type.Object({
|
|
1842
|
+
commandName: NonEmptyString,
|
|
1843
|
+
targetIds: Type.Array(NonEmptyString)
|
|
1844
|
+
}, { additionalProperties: false });
|
|
1845
|
+
const SecretsResolveAssignmentSchema = Type.Object({
|
|
1846
|
+
path: Type.Optional(NonEmptyString),
|
|
1847
|
+
pathSegments: Type.Array(NonEmptyString),
|
|
1848
|
+
value: Type.Unknown()
|
|
1849
|
+
}, { additionalProperties: false });
|
|
1850
|
+
const SecretsResolveResultSchema = Type.Object({
|
|
1851
|
+
ok: Type.Optional(Type.Boolean()),
|
|
1852
|
+
assignments: Type.Optional(Type.Array(SecretsResolveAssignmentSchema)),
|
|
1853
|
+
diagnostics: Type.Optional(Type.Array(NonEmptyString)),
|
|
1854
|
+
inactiveRefPaths: Type.Optional(Type.Array(NonEmptyString))
|
|
1855
|
+
}, { additionalProperties: false });
|
|
1856
|
+
//#endregion
|
|
1857
|
+
//#region src/gateway/protocol/schema/sessions.ts
|
|
1858
|
+
const SessionCompactionCheckpointReasonSchema = Type.Union([
|
|
1859
|
+
Type.Literal("manual"),
|
|
1860
|
+
Type.Literal("auto-threshold"),
|
|
1861
|
+
Type.Literal("overflow-retry"),
|
|
1862
|
+
Type.Literal("timeout-retry")
|
|
1863
|
+
]);
|
|
1864
|
+
const SessionCompactionTranscriptReferenceSchema = Type.Object({
|
|
1865
|
+
sessionId: NonEmptyString,
|
|
1866
|
+
sessionFile: Type.Optional(NonEmptyString),
|
|
1867
|
+
leafId: Type.Optional(NonEmptyString),
|
|
1868
|
+
entryId: Type.Optional(NonEmptyString)
|
|
1869
|
+
}, { additionalProperties: false });
|
|
1870
|
+
const SessionCompactionCheckpointSchema = Type.Object({
|
|
1871
|
+
checkpointId: NonEmptyString,
|
|
1872
|
+
sessionKey: NonEmptyString,
|
|
1873
|
+
sessionId: NonEmptyString,
|
|
1874
|
+
createdAt: Type.Integer({ minimum: 0 }),
|
|
1875
|
+
reason: SessionCompactionCheckpointReasonSchema,
|
|
1876
|
+
tokensBefore: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1877
|
+
tokensAfter: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1878
|
+
summary: Type.Optional(Type.String()),
|
|
1879
|
+
firstKeptEntryId: Type.Optional(NonEmptyString),
|
|
1880
|
+
preCompaction: SessionCompactionTranscriptReferenceSchema,
|
|
1881
|
+
postCompaction: SessionCompactionTranscriptReferenceSchema
|
|
1882
|
+
}, { additionalProperties: false });
|
|
1883
|
+
const SessionsListParamsSchema = Type.Object({
|
|
1884
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1885
|
+
activeMinutes: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1886
|
+
includeGlobal: Type.Optional(Type.Boolean()),
|
|
1887
|
+
includeUnknown: Type.Optional(Type.Boolean()),
|
|
1888
|
+
includeDerivedTitles: Type.Optional(Type.Boolean()),
|
|
1889
|
+
includeLastMessage: Type.Optional(Type.Boolean()),
|
|
1890
|
+
includeTranscriptUsage: Type.Optional(Type.Boolean()),
|
|
1891
|
+
label: Type.Optional(SessionLabelString),
|
|
1892
|
+
spawnedBy: Type.Optional(NonEmptyString),
|
|
1893
|
+
agentId: Type.Optional(NonEmptyString),
|
|
1894
|
+
search: Type.Optional(Type.String())
|
|
1895
|
+
}, { additionalProperties: false });
|
|
1896
|
+
const SessionsPreviewParamsSchema = Type.Object({
|
|
1897
|
+
keys: Type.Array(NonEmptyString, { minItems: 1 }),
|
|
1898
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
1899
|
+
maxChars: Type.Optional(Type.Integer({ minimum: 20 }))
|
|
1900
|
+
}, { additionalProperties: false });
|
|
1901
|
+
const SessionsResolveParamsSchema = Type.Object({
|
|
1902
|
+
key: Type.Optional(NonEmptyString),
|
|
1903
|
+
sessionId: Type.Optional(NonEmptyString),
|
|
1904
|
+
label: Type.Optional(SessionLabelString),
|
|
1905
|
+
agentId: Type.Optional(NonEmptyString),
|
|
1906
|
+
spawnedBy: Type.Optional(NonEmptyString),
|
|
1907
|
+
includeGlobal: Type.Optional(Type.Boolean()),
|
|
1908
|
+
includeUnknown: Type.Optional(Type.Boolean())
|
|
1909
|
+
}, { additionalProperties: false });
|
|
1910
|
+
const SessionsCreateParamsSchema = Type.Object({
|
|
1911
|
+
key: Type.Optional(NonEmptyString),
|
|
1912
|
+
agentId: Type.Optional(NonEmptyString),
|
|
1913
|
+
label: Type.Optional(SessionLabelString),
|
|
1914
|
+
model: Type.Optional(NonEmptyString),
|
|
1915
|
+
parentSessionKey: Type.Optional(NonEmptyString),
|
|
1916
|
+
task: Type.Optional(Type.String()),
|
|
1917
|
+
message: Type.Optional(Type.String())
|
|
1918
|
+
}, { additionalProperties: false });
|
|
1919
|
+
const SessionsSendParamsSchema = Type.Object({
|
|
1920
|
+
key: NonEmptyString,
|
|
1921
|
+
message: Type.String(),
|
|
1922
|
+
thinking: Type.Optional(Type.String()),
|
|
1923
|
+
attachments: Type.Optional(Type.Array(Type.Unknown())),
|
|
1924
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1925
|
+
idempotencyKey: Type.Optional(NonEmptyString)
|
|
1926
|
+
}, { additionalProperties: false });
|
|
1927
|
+
const SessionsMessagesSubscribeParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
1928
|
+
const SessionsMessagesUnsubscribeParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
1929
|
+
const SessionsAbortParamsSchema = Type.Object({
|
|
1930
|
+
key: NonEmptyString,
|
|
1931
|
+
runId: Type.Optional(NonEmptyString)
|
|
1932
|
+
}, { additionalProperties: false });
|
|
1933
|
+
const SessionsPatchParamsSchema = Type.Object({
|
|
1934
|
+
key: NonEmptyString,
|
|
1935
|
+
label: Type.Optional(Type.Union([SessionLabelString, Type.Null()])),
|
|
1936
|
+
thinkingLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1937
|
+
fastMode: Type.Optional(Type.Union([Type.Boolean(), Type.Null()])),
|
|
1938
|
+
verboseLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1939
|
+
traceLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1940
|
+
reasoningLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1941
|
+
responseUsage: Type.Optional(Type.Union([
|
|
1942
|
+
Type.Literal("off"),
|
|
1943
|
+
Type.Literal("tokens"),
|
|
1944
|
+
Type.Literal("full"),
|
|
1945
|
+
Type.Literal("on"),
|
|
1946
|
+
Type.Null()
|
|
1947
|
+
])),
|
|
1948
|
+
elevatedLevel: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1949
|
+
execHost: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1950
|
+
execSecurity: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1951
|
+
execAsk: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1952
|
+
execNode: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1953
|
+
model: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1954
|
+
spawnedBy: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1955
|
+
spawnedWorkspaceDir: Type.Optional(Type.Union([NonEmptyString, Type.Null()])),
|
|
1956
|
+
spawnDepth: Type.Optional(Type.Union([Type.Integer({ minimum: 0 }), Type.Null()])),
|
|
1957
|
+
subagentRole: Type.Optional(Type.Union([
|
|
1958
|
+
Type.Literal("orchestrator"),
|
|
1959
|
+
Type.Literal("leaf"),
|
|
1960
|
+
Type.Null()
|
|
1961
|
+
])),
|
|
1962
|
+
subagentControlScope: Type.Optional(Type.Union([
|
|
1963
|
+
Type.Literal("children"),
|
|
1964
|
+
Type.Literal("none"),
|
|
1965
|
+
Type.Null()
|
|
1966
|
+
])),
|
|
1967
|
+
sendPolicy: Type.Optional(Type.Union([
|
|
1968
|
+
Type.Literal("allow"),
|
|
1969
|
+
Type.Literal("deny"),
|
|
1970
|
+
Type.Null()
|
|
1971
|
+
])),
|
|
1972
|
+
groupActivation: Type.Optional(Type.Union([
|
|
1973
|
+
Type.Literal("mention"),
|
|
1974
|
+
Type.Literal("always"),
|
|
1975
|
+
Type.Null()
|
|
1976
|
+
]))
|
|
1977
|
+
}, { additionalProperties: false });
|
|
1978
|
+
const SessionsResetParamsSchema = Type.Object({
|
|
1979
|
+
key: NonEmptyString,
|
|
1980
|
+
reason: Type.Optional(Type.Union([Type.Literal("new"), Type.Literal("reset")]))
|
|
1981
|
+
}, { additionalProperties: false });
|
|
1982
|
+
const SessionsDeleteParamsSchema = Type.Object({
|
|
1983
|
+
key: NonEmptyString,
|
|
1984
|
+
deleteTranscript: Type.Optional(Type.Boolean()),
|
|
1985
|
+
emitLifecycleHooks: Type.Optional(Type.Boolean())
|
|
1986
|
+
}, { additionalProperties: false });
|
|
1987
|
+
const SessionsCompactParamsSchema = Type.Object({
|
|
1988
|
+
key: NonEmptyString,
|
|
1989
|
+
maxLines: Type.Optional(Type.Integer({ minimum: 1 }))
|
|
1990
|
+
}, { additionalProperties: false });
|
|
1991
|
+
const SessionsCompactionListParamsSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
1992
|
+
const SessionsCompactionGetParamsSchema = Type.Object({
|
|
1993
|
+
key: NonEmptyString,
|
|
1994
|
+
checkpointId: NonEmptyString
|
|
1995
|
+
}, { additionalProperties: false });
|
|
1996
|
+
const SessionsCompactionBranchParamsSchema = Type.Object({
|
|
1997
|
+
key: NonEmptyString,
|
|
1998
|
+
checkpointId: NonEmptyString
|
|
1999
|
+
}, { additionalProperties: false });
|
|
2000
|
+
const SessionsCompactionRestoreParamsSchema = Type.Object({
|
|
2001
|
+
key: NonEmptyString,
|
|
2002
|
+
checkpointId: NonEmptyString
|
|
2003
|
+
}, { additionalProperties: false });
|
|
2004
|
+
Type.Object({
|
|
2005
|
+
ok: Type.Literal(true),
|
|
2006
|
+
key: NonEmptyString,
|
|
2007
|
+
checkpoints: Type.Array(SessionCompactionCheckpointSchema)
|
|
2008
|
+
}, { additionalProperties: false });
|
|
2009
|
+
Type.Object({
|
|
2010
|
+
ok: Type.Literal(true),
|
|
2011
|
+
key: NonEmptyString,
|
|
2012
|
+
checkpoint: SessionCompactionCheckpointSchema
|
|
2013
|
+
}, { additionalProperties: false });
|
|
2014
|
+
Type.Object({
|
|
2015
|
+
ok: Type.Literal(true),
|
|
2016
|
+
sourceKey: NonEmptyString,
|
|
2017
|
+
key: NonEmptyString,
|
|
2018
|
+
sessionId: NonEmptyString,
|
|
2019
|
+
checkpoint: SessionCompactionCheckpointSchema,
|
|
2020
|
+
entry: Type.Object({
|
|
2021
|
+
sessionId: NonEmptyString,
|
|
2022
|
+
updatedAt: Type.Integer({ minimum: 0 })
|
|
2023
|
+
}, { additionalProperties: true })
|
|
2024
|
+
}, { additionalProperties: false });
|
|
2025
|
+
Type.Object({
|
|
2026
|
+
ok: Type.Literal(true),
|
|
2027
|
+
key: NonEmptyString,
|
|
2028
|
+
sessionId: NonEmptyString,
|
|
2029
|
+
checkpoint: SessionCompactionCheckpointSchema,
|
|
2030
|
+
entry: Type.Object({
|
|
2031
|
+
sessionId: NonEmptyString,
|
|
2032
|
+
updatedAt: Type.Integer({ minimum: 0 })
|
|
2033
|
+
}, { additionalProperties: true })
|
|
2034
|
+
}, { additionalProperties: false });
|
|
2035
|
+
const SessionsUsageParamsSchema = Type.Object({
|
|
2036
|
+
key: Type.Optional(NonEmptyString),
|
|
2037
|
+
startDate: Type.Optional(Type.String({ pattern: "^\\d{4}-\\d{2}-\\d{2}$" })),
|
|
2038
|
+
endDate: Type.Optional(Type.String({ pattern: "^\\d{4}-\\d{2}-\\d{2}$" })),
|
|
2039
|
+
mode: Type.Optional(Type.Union([
|
|
2040
|
+
Type.Literal("utc"),
|
|
2041
|
+
Type.Literal("gateway"),
|
|
2042
|
+
Type.Literal("specific")
|
|
2043
|
+
])),
|
|
2044
|
+
utcOffset: Type.Optional(Type.String({ pattern: "^UTC[+-]\\d{1,2}(?::[0-5]\\d)?$" })),
|
|
2045
|
+
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
2046
|
+
includeContextWeight: Type.Optional(Type.Boolean())
|
|
2047
|
+
}, { additionalProperties: false });
|
|
2048
|
+
//#endregion
|
|
2049
|
+
//#region src/gateway/protocol/schema/wallet.ts
|
|
2050
|
+
const WalletChainSchema = Type.Union([
|
|
2051
|
+
Type.Literal("btc"),
|
|
2052
|
+
Type.Literal("evm"),
|
|
2053
|
+
Type.Literal("sol"),
|
|
2054
|
+
Type.Literal("trx"),
|
|
2055
|
+
Type.Literal("xmr")
|
|
2056
|
+
]);
|
|
2057
|
+
const WalletSummaryParamsSchema = Type.Object({ includeBalances: Type.Optional(Type.Boolean()) }, { additionalProperties: false });
|
|
2058
|
+
const WalletRecoveryPhraseModeSchema = Type.Union([Type.Literal("generate"), Type.Literal("import")]);
|
|
2059
|
+
const WalletRecoveryPhraseSetParamsSchema = Type.Object({
|
|
2060
|
+
mode: WalletRecoveryPhraseModeSchema,
|
|
2061
|
+
passphrase: Type.Optional(Type.String({ maxLength: 16 * 1024 })),
|
|
2062
|
+
mnemonic: Type.Optional(Type.String({
|
|
2063
|
+
minLength: 1,
|
|
2064
|
+
maxLength: 64 * 1024
|
|
2065
|
+
})),
|
|
2066
|
+
overwrite: Type.Optional(Type.Boolean())
|
|
2067
|
+
}, { additionalProperties: false });
|
|
2068
|
+
const WalletPublicAccountSchema = Type.Object({
|
|
2069
|
+
id: Type.String({ minLength: 1 }),
|
|
2070
|
+
chain: WalletChainSchema,
|
|
2071
|
+
address: Type.String({ minLength: 1 }),
|
|
2072
|
+
label: Type.Optional(Type.String()),
|
|
2073
|
+
network: Type.Optional(Type.String()),
|
|
2074
|
+
derivationPath: Type.Optional(Type.String()),
|
|
2075
|
+
createdAt: Type.String(),
|
|
2076
|
+
updatedAt: Type.String()
|
|
2077
|
+
}, { additionalProperties: false });
|
|
2078
|
+
const WalletBalanceSchema = Type.Object({
|
|
2079
|
+
chain: WalletChainSchema,
|
|
2080
|
+
accountId: Type.String({ minLength: 1 }),
|
|
2081
|
+
address: Type.String({ minLength: 1 }),
|
|
2082
|
+
network: Type.Optional(Type.String()),
|
|
2083
|
+
asset: Type.String({ minLength: 1 }),
|
|
2084
|
+
amountAtomic: Type.String(),
|
|
2085
|
+
amount: Type.String(),
|
|
2086
|
+
confirmedAmountAtomic: Type.Optional(Type.String()),
|
|
2087
|
+
pendingAmountAtomic: Type.Optional(Type.String())
|
|
2088
|
+
}, { additionalProperties: false });
|
|
2089
|
+
const WalletSummaryResultSchema = Type.Object({
|
|
2090
|
+
enabled: Type.Boolean(),
|
|
2091
|
+
keystore: Type.Object({
|
|
2092
|
+
exists: Type.Boolean(),
|
|
2093
|
+
locked: Type.Boolean()
|
|
2094
|
+
}, { additionalProperties: false }),
|
|
2095
|
+
primaryAccount: Type.Optional(Type.String()),
|
|
2096
|
+
accounts: Type.Array(WalletPublicAccountSchema),
|
|
2097
|
+
balances: Type.Optional(Type.Array(WalletBalanceSchema)),
|
|
2098
|
+
warnings: Type.Array(Type.String())
|
|
2099
|
+
}, { additionalProperties: false });
|
|
2100
|
+
const WalletRecoveryPhraseSetResultSchema = Type.Object({
|
|
2101
|
+
mnemonicGenerated: Type.Boolean(),
|
|
2102
|
+
mnemonic: Type.Optional(Type.String({ minLength: 1 })),
|
|
2103
|
+
summary: WalletSummaryResultSchema
|
|
2104
|
+
}, { additionalProperties: false });
|
|
2105
|
+
//#endregion
|
|
2106
|
+
//#region src/gateway/protocol/schema/wizard.ts
|
|
2107
|
+
const WizardRunStatusSchema = Type.Union([
|
|
2108
|
+
Type.Literal("running"),
|
|
2109
|
+
Type.Literal("done"),
|
|
2110
|
+
Type.Literal("cancelled"),
|
|
2111
|
+
Type.Literal("error")
|
|
2112
|
+
]);
|
|
2113
|
+
const WizardStartParamsSchema = Type.Object({
|
|
2114
|
+
target: Type.Optional(Type.Union([
|
|
2115
|
+
Type.Literal("setup"),
|
|
2116
|
+
Type.Literal("channels"),
|
|
2117
|
+
Type.Literal("models")
|
|
2118
|
+
])),
|
|
2119
|
+
mode: Type.Optional(Type.Union([Type.Literal("local"), Type.Literal("remote")])),
|
|
2120
|
+
workspace: Type.Optional(Type.String()),
|
|
2121
|
+
channel: Type.Optional(Type.String()),
|
|
2122
|
+
provider: Type.Optional(Type.String()),
|
|
2123
|
+
authMethod: Type.Optional(Type.String()),
|
|
2124
|
+
setDefault: Type.Optional(Type.Boolean())
|
|
2125
|
+
}, { additionalProperties: false });
|
|
2126
|
+
const WizardAnswerSchema = Type.Object({
|
|
2127
|
+
stepId: NonEmptyString,
|
|
2128
|
+
value: Type.Optional(Type.Unknown())
|
|
2129
|
+
}, { additionalProperties: false });
|
|
2130
|
+
const WizardNextParamsSchema = Type.Object({
|
|
2131
|
+
sessionId: NonEmptyString,
|
|
2132
|
+
answer: Type.Optional(WizardAnswerSchema)
|
|
2133
|
+
}, { additionalProperties: false });
|
|
2134
|
+
const WizardSessionIdParamsSchema = Type.Object({ sessionId: NonEmptyString }, { additionalProperties: false });
|
|
2135
|
+
const WizardCancelParamsSchema = WizardSessionIdParamsSchema;
|
|
2136
|
+
const WizardStatusParamsSchema = WizardSessionIdParamsSchema;
|
|
2137
|
+
const WizardStepOptionSchema = Type.Object({
|
|
2138
|
+
value: Type.Unknown(),
|
|
2139
|
+
label: NonEmptyString,
|
|
2140
|
+
hint: Type.Optional(Type.String())
|
|
2141
|
+
}, { additionalProperties: false });
|
|
2142
|
+
const WizardStepSchema = Type.Object({
|
|
2143
|
+
id: NonEmptyString,
|
|
2144
|
+
type: Type.Union([
|
|
2145
|
+
Type.Literal("note"),
|
|
2146
|
+
Type.Literal("select"),
|
|
2147
|
+
Type.Literal("text"),
|
|
2148
|
+
Type.Literal("confirm"),
|
|
2149
|
+
Type.Literal("multiselect"),
|
|
2150
|
+
Type.Literal("progress"),
|
|
2151
|
+
Type.Literal("action")
|
|
2152
|
+
]),
|
|
2153
|
+
title: Type.Optional(Type.String()),
|
|
2154
|
+
message: Type.Optional(Type.String()),
|
|
2155
|
+
options: Type.Optional(Type.Array(WizardStepOptionSchema)),
|
|
2156
|
+
initialValue: Type.Optional(Type.Unknown()),
|
|
2157
|
+
placeholder: Type.Optional(Type.String()),
|
|
2158
|
+
sensitive: Type.Optional(Type.Boolean()),
|
|
2159
|
+
executor: Type.Optional(Type.Union([Type.Literal("gateway"), Type.Literal("client")]))
|
|
2160
|
+
}, { additionalProperties: false });
|
|
2161
|
+
const WizardResultFields = {
|
|
2162
|
+
done: Type.Boolean(),
|
|
2163
|
+
step: Type.Optional(WizardStepSchema),
|
|
2164
|
+
status: Type.Optional(WizardRunStatusSchema),
|
|
2165
|
+
error: Type.Optional(Type.String())
|
|
2166
|
+
};
|
|
2167
|
+
Type.Object(WizardResultFields, { additionalProperties: false });
|
|
2168
|
+
Type.Object({
|
|
2169
|
+
sessionId: NonEmptyString,
|
|
2170
|
+
...WizardResultFields
|
|
2171
|
+
}, { additionalProperties: false });
|
|
2172
|
+
Type.Object({
|
|
2173
|
+
status: WizardRunStatusSchema,
|
|
2174
|
+
error: Type.Optional(Type.String())
|
|
2175
|
+
}, { additionalProperties: false });
|
|
2176
|
+
//#endregion
|
|
2177
|
+
//#region src/gateway/protocol/index.ts
|
|
2178
|
+
const ajv = new Ajv({
|
|
2179
|
+
allErrors: true,
|
|
2180
|
+
strict: false,
|
|
2181
|
+
removeAdditional: false
|
|
2182
|
+
});
|
|
2183
|
+
const validateCommandsListParams = ajv.compile(CommandsListParamsSchema);
|
|
2184
|
+
const validateConnectParams = ajv.compile(ConnectParamsSchema);
|
|
2185
|
+
const validateRequestFrame = ajv.compile(RequestFrameSchema);
|
|
2186
|
+
const validateResponseFrame = ajv.compile(ResponseFrameSchema);
|
|
2187
|
+
const validateEventFrame = ajv.compile(EventFrameSchema);
|
|
2188
|
+
const validateMessageActionParams = ajv.compile(MessageActionParamsSchema);
|
|
2189
|
+
const validateSendParams = ajv.compile(SendParamsSchema);
|
|
2190
|
+
const validatePollParams = ajv.compile(PollParamsSchema);
|
|
2191
|
+
const validateAgentParams = ajv.compile(AgentParamsSchema);
|
|
2192
|
+
const validateAgentIdentityParams = ajv.compile(AgentIdentityParamsSchema);
|
|
2193
|
+
const validateAgentWaitParams = ajv.compile(AgentWaitParamsSchema);
|
|
2194
|
+
const validateWakeParams = ajv.compile(WakeParamsSchema);
|
|
2195
|
+
const validateAgentsListParams = ajv.compile(AgentsListParamsSchema);
|
|
2196
|
+
const validateAgentsCreateParams = ajv.compile(AgentsCreateParamsSchema);
|
|
2197
|
+
const validateAgentsUpdateParams = ajv.compile(AgentsUpdateParamsSchema);
|
|
2198
|
+
const validateAgentsDeleteParams = ajv.compile(AgentsDeleteParamsSchema);
|
|
2199
|
+
const validateAgentsFilesListParams = ajv.compile(AgentsFilesListParamsSchema);
|
|
2200
|
+
const validateAgentsFilesGetParams = ajv.compile(AgentsFilesGetParamsSchema);
|
|
2201
|
+
const validateAgentsFilesSetParams = ajv.compile(AgentsFilesSetParamsSchema);
|
|
2202
|
+
const validateNodePairRequestParams = ajv.compile(NodePairRequestParamsSchema);
|
|
2203
|
+
const validateNodePairListParams = ajv.compile(NodePairListParamsSchema);
|
|
2204
|
+
const validateNodePairApproveParams = ajv.compile(NodePairApproveParamsSchema);
|
|
2205
|
+
const validateNodePairRejectParams = ajv.compile(NodePairRejectParamsSchema);
|
|
2206
|
+
const validateNodePairVerifyParams = ajv.compile(NodePairVerifyParamsSchema);
|
|
2207
|
+
const validateNodeRenameParams = ajv.compile(NodeRenameParamsSchema);
|
|
2208
|
+
const validateNodeListParams = ajv.compile(NodeListParamsSchema);
|
|
2209
|
+
const validateNodePendingAckParams = ajv.compile(NodePendingAckParamsSchema);
|
|
2210
|
+
const validateNodeDescribeParams = ajv.compile(NodeDescribeParamsSchema);
|
|
2211
|
+
const validateNodeInvokeParams = ajv.compile(NodeInvokeParamsSchema);
|
|
2212
|
+
const validateNodeInvokeResultParams = ajv.compile(NodeInvokeResultParamsSchema);
|
|
2213
|
+
const validateNodeEventParams = ajv.compile(NodeEventParamsSchema);
|
|
2214
|
+
const validateNodePendingDrainParams = ajv.compile(NodePendingDrainParamsSchema);
|
|
2215
|
+
const validateNodePendingEnqueueParams = ajv.compile(NodePendingEnqueueParamsSchema);
|
|
2216
|
+
const validateCanvasDocumentCreateParams = ajv.compile(CanvasDocumentCreateParamsSchema);
|
|
2217
|
+
const validateCanvasDocumentUpdateParams = ajv.compile(CanvasDocumentUpdateParamsSchema);
|
|
2218
|
+
ajv.compile(CanvasDocumentCreateResultSchema);
|
|
2219
|
+
const validateCanvasDocumentListParams = ajv.compile(CanvasDocumentListParamsSchema);
|
|
2220
|
+
ajv.compile(CanvasDocumentListResultSchema);
|
|
2221
|
+
const validatePushTestParams = ajv.compile(PushTestParamsSchema);
|
|
2222
|
+
const validateSecretsResolveParams = ajv.compile(SecretsResolveParamsSchema);
|
|
2223
|
+
const validateSecretsResolveResult = ajv.compile(SecretsResolveResultSchema);
|
|
2224
|
+
const validateSessionsListParams = ajv.compile(SessionsListParamsSchema);
|
|
2225
|
+
const validateSessionsPreviewParams = ajv.compile(SessionsPreviewParamsSchema);
|
|
2226
|
+
const validateSessionsResolveParams = ajv.compile(SessionsResolveParamsSchema);
|
|
2227
|
+
const validateSessionsCreateParams = ajv.compile(SessionsCreateParamsSchema);
|
|
2228
|
+
const validateSessionsSendParams = ajv.compile(SessionsSendParamsSchema);
|
|
2229
|
+
const validateSessionsMessagesSubscribeParams = ajv.compile(SessionsMessagesSubscribeParamsSchema);
|
|
2230
|
+
const validateSessionsMessagesUnsubscribeParams = ajv.compile(SessionsMessagesUnsubscribeParamsSchema);
|
|
2231
|
+
const validateSessionsAbortParams = ajv.compile(SessionsAbortParamsSchema);
|
|
2232
|
+
const validateSessionsPatchParams = ajv.compile(SessionsPatchParamsSchema);
|
|
2233
|
+
const validateSessionsResetParams = ajv.compile(SessionsResetParamsSchema);
|
|
2234
|
+
const validateSessionsDeleteParams = ajv.compile(SessionsDeleteParamsSchema);
|
|
2235
|
+
const validateSessionsCompactParams = ajv.compile(SessionsCompactParamsSchema);
|
|
2236
|
+
const validateSessionsCompactionListParams = ajv.compile(SessionsCompactionListParamsSchema);
|
|
2237
|
+
const validateSessionsCompactionGetParams = ajv.compile(SessionsCompactionGetParamsSchema);
|
|
2238
|
+
const validateSessionsCompactionBranchParams = ajv.compile(SessionsCompactionBranchParamsSchema);
|
|
2239
|
+
const validateSessionsCompactionRestoreParams = ajv.compile(SessionsCompactionRestoreParamsSchema);
|
|
2240
|
+
const validateSessionsUsageParams = ajv.compile(SessionsUsageParamsSchema);
|
|
2241
|
+
const validateConfigGetParams = ajv.compile(ConfigGetParamsSchema);
|
|
2242
|
+
const validateConfigSetParams = ajv.compile(ConfigSetParamsSchema);
|
|
2243
|
+
const validateConfigApplyParams = ajv.compile(ConfigApplyParamsSchema);
|
|
2244
|
+
const validateConfigPatchParams = ajv.compile(ConfigPatchParamsSchema);
|
|
2245
|
+
const validateConfigSchemaParams = ajv.compile(ConfigSchemaParamsSchema);
|
|
2246
|
+
const validateConfigSchemaLookupParams = ajv.compile(ConfigSchemaLookupParamsSchema);
|
|
2247
|
+
const validateConfigSchemaLookupResult = ajv.compile(ConfigSchemaLookupResultSchema);
|
|
2248
|
+
const validateWizardStartParams = ajv.compile(WizardStartParamsSchema);
|
|
2249
|
+
const validateWizardNextParams = ajv.compile(WizardNextParamsSchema);
|
|
2250
|
+
const validateWizardCancelParams = ajv.compile(WizardCancelParamsSchema);
|
|
2251
|
+
const validateWizardStatusParams = ajv.compile(WizardStatusParamsSchema);
|
|
2252
|
+
const validateTalkModeParams = ajv.compile(TalkModeParamsSchema);
|
|
2253
|
+
const validateTalkConfigParams = ajv.compile(TalkConfigParamsSchema);
|
|
2254
|
+
ajv.compile(TalkConfigResultSchema);
|
|
2255
|
+
const validateTalkRealtimeSessionParams = ajv.compile(TalkRealtimeSessionParamsSchema);
|
|
2256
|
+
ajv.compile(TalkRealtimeSessionResultSchema);
|
|
2257
|
+
const validateTalkSpeakParams = ajv.compile(TalkSpeakParamsSchema);
|
|
2258
|
+
ajv.compile(TalkSpeakResultSchema);
|
|
2259
|
+
const validateChannelsStatusParams = ajv.compile(ChannelsStatusParamsSchema);
|
|
2260
|
+
const validateChannelsStartParams = ajv.compile(ChannelsStartParamsSchema);
|
|
2261
|
+
const validateChannelsLogoutParams = ajv.compile(ChannelsLogoutParamsSchema);
|
|
2262
|
+
const validateModelsListParams = ajv.compile(ModelsListParamsSchema);
|
|
2263
|
+
const validateSkillsStatusParams = ajv.compile(SkillsStatusParamsSchema);
|
|
2264
|
+
const validateToolsCatalogParams = ajv.compile(ToolsCatalogParamsSchema);
|
|
2265
|
+
const validateToolsEffectiveParams = ajv.compile(ToolsEffectiveParamsSchema);
|
|
2266
|
+
const validateSkillsBinsParams = ajv.compile(SkillsBinsParamsSchema);
|
|
2267
|
+
const validateSkillsInstallParams = ajv.compile(SkillsInstallParamsSchema);
|
|
2268
|
+
const validateSkillsUpdateParams = ajv.compile(SkillsUpdateParamsSchema);
|
|
2269
|
+
const validateSkillsSearchParams = ajv.compile(SkillsSearchParamsSchema);
|
|
2270
|
+
const validateSkillsDetailParams = ajv.compile(SkillsDetailParamsSchema);
|
|
2271
|
+
const validateCronListParams = ajv.compile(CronListParamsSchema);
|
|
2272
|
+
const validateCronStatusParams = ajv.compile(CronStatusParamsSchema);
|
|
2273
|
+
const validateCronAddParams = ajv.compile(CronAddParamsSchema);
|
|
2274
|
+
const validateCronUpdateParams = ajv.compile(CronUpdateParamsSchema);
|
|
2275
|
+
const validateCronRemoveParams = ajv.compile(CronRemoveParamsSchema);
|
|
2276
|
+
const validateCronRunParams = ajv.compile(CronRunParamsSchema);
|
|
2277
|
+
const validateCronRunsParams = ajv.compile(CronRunsParamsSchema);
|
|
2278
|
+
const validateDevicePairListParams = ajv.compile(DevicePairListParamsSchema);
|
|
2279
|
+
const validateDevicePairApproveParams = ajv.compile(DevicePairApproveParamsSchema);
|
|
2280
|
+
const validateDevicePairRejectParams = ajv.compile(DevicePairRejectParamsSchema);
|
|
2281
|
+
const validateDevicePairRemoveParams = ajv.compile(DevicePairRemoveParamsSchema);
|
|
2282
|
+
const validateDeviceTokenRotateParams = ajv.compile(DeviceTokenRotateParamsSchema);
|
|
2283
|
+
const validateDeviceTokenRevokeParams = ajv.compile(DeviceTokenRevokeParamsSchema);
|
|
2284
|
+
const validateExecApprovalsGetParams = ajv.compile(ExecApprovalsGetParamsSchema);
|
|
2285
|
+
const validateExecApprovalsSetParams = ajv.compile(ExecApprovalsSetParamsSchema);
|
|
2286
|
+
const validateExecApprovalGetParams = ajv.compile(ExecApprovalGetParamsSchema);
|
|
2287
|
+
const validateExecApprovalRequestParams = ajv.compile(ExecApprovalRequestParamsSchema);
|
|
2288
|
+
const validateExecApprovalResolveParams = ajv.compile(ExecApprovalResolveParamsSchema);
|
|
2289
|
+
const validatePluginApprovalRequestParams = ajv.compile(PluginApprovalRequestParamsSchema);
|
|
2290
|
+
const validatePluginApprovalResolveParams = ajv.compile(PluginApprovalResolveParamsSchema);
|
|
2291
|
+
const validatePluginsStatusParams = ajv.compile(PluginsStatusParamsSchema);
|
|
2292
|
+
const validatePluginsSearchParams = ajv.compile(PluginsSearchParamsSchema);
|
|
2293
|
+
const validatePluginsDetailParams = ajv.compile(PluginsDetailParamsSchema);
|
|
2294
|
+
const validatePluginsInstallParams = ajv.compile(PluginsInstallParamsSchema);
|
|
2295
|
+
const validatePluginsUpdateParams = ajv.compile(PluginsUpdateParamsSchema);
|
|
2296
|
+
const validatePluginsUninstallParams = ajv.compile(PluginsUninstallParamsSchema);
|
|
2297
|
+
const validateExecApprovalsNodeGetParams = ajv.compile(ExecApprovalsNodeGetParamsSchema);
|
|
2298
|
+
const validateExecApprovalsNodeSetParams = ajv.compile(ExecApprovalsNodeSetParamsSchema);
|
|
2299
|
+
const validateLogsTailParams = ajv.compile(LogsTailParamsSchema);
|
|
2300
|
+
const validateChatHistoryParams = ajv.compile(ChatHistoryParamsSchema);
|
|
2301
|
+
const validateChatSendParams = ajv.compile(ChatSendParamsSchema);
|
|
2302
|
+
const validateChatAbortParams = ajv.compile(ChatAbortParamsSchema);
|
|
2303
|
+
const validateChatInjectParams = ajv.compile(ChatInjectParamsSchema);
|
|
2304
|
+
ajv.compile(ChatEventSchema);
|
|
2305
|
+
const validateUpdateRunParams = ajv.compile(UpdateRunParamsSchema);
|
|
2306
|
+
const validateWebLoginStartParams = ajv.compile(WebLoginStartParamsSchema);
|
|
2307
|
+
const validateWebLoginWaitParams = ajv.compile(WebLoginWaitParamsSchema);
|
|
2308
|
+
const validateWalletSummaryParams = ajv.compile(WalletSummaryParamsSchema);
|
|
2309
|
+
ajv.compile(WalletSummaryResultSchema);
|
|
2310
|
+
const validateWalletRecoveryPhraseSetParams = ajv.compile(WalletRecoveryPhraseSetParamsSchema);
|
|
2311
|
+
ajv.compile(WalletRecoveryPhraseSetResultSchema);
|
|
2312
|
+
function formatValidationErrors(errors) {
|
|
2313
|
+
if (!errors?.length) return "unknown validation error";
|
|
2314
|
+
const parts = [];
|
|
2315
|
+
for (const err of errors) {
|
|
2316
|
+
const keyword = typeof err?.keyword === "string" ? err.keyword : "";
|
|
2317
|
+
const instancePath = typeof err?.instancePath === "string" ? err.instancePath : "";
|
|
2318
|
+
if (keyword === "additionalProperties") {
|
|
2319
|
+
const additionalProperty = (err?.params)?.additionalProperty;
|
|
2320
|
+
if (typeof additionalProperty === "string" && additionalProperty.trim()) {
|
|
2321
|
+
const where = instancePath ? `at ${instancePath}` : "at root";
|
|
2322
|
+
parts.push(`${where}: unexpected property '${additionalProperty}'`);
|
|
2323
|
+
continue;
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
const message = typeof err?.message === "string" && err.message.trim() ? err.message : "validation error";
|
|
2327
|
+
const where = instancePath ? `at ${instancePath}: ` : "";
|
|
2328
|
+
parts.push(`${where}${message}`);
|
|
2329
|
+
}
|
|
2330
|
+
const unique = Array.from(new Set(parts.filter((part) => part.trim())));
|
|
2331
|
+
if (!unique.length) return ajv.errorsText(errors, { separator: "; " }) || "unknown validation error";
|
|
2332
|
+
return unique.join("; ");
|
|
2333
|
+
}
|
|
2334
|
+
//#endregion
|
|
2335
|
+
export { validateMessageActionParams as $, validateTalkConfigParams as $t, validateConnectParams as A, validateSessionsAbortParams as At, validateDevicePairRejectParams as B, validateSessionsMessagesUnsubscribeParams as Bt, validateConfigApplyParams as C, validatePollParams as Ct, validateConfigSchemaLookupResult as D, validateSecretsResolveParams as Dt, validateConfigSchemaLookupParams as E, validateResponseFrame as Et, validateCronRunsParams as F, validateSessionsCompactionRestoreParams as Ft, validateExecApprovalGetParams as G, validateSessionsSendParams as Gt, validateDeviceTokenRevokeParams as H, validateSessionsPreviewParams as Ht, validateCronStatusParams as I, validateSessionsCreateParams as It, validateExecApprovalsGetParams as J, validateSkillsDetailParams as Jt, validateExecApprovalRequestParams as K, validateSessionsUsageParams as Kt, validateCronUpdateParams as L, validateSessionsDeleteParams as Lt, validateCronListParams as M, validateSessionsCompactionBranchParams as Mt, validateCronRemoveParams as N, validateSessionsCompactionGetParams as Nt, validateConfigSchemaParams as O, validateSecretsResolveResult as Ot, validateCronRunParams as P, validateSessionsCompactionListParams as Pt, validateLogsTailParams as Q, validateSkillsUpdateParams as Qt, validateDevicePairApproveParams as R, validateSessionsListParams as Rt, validateCommandsListParams as S, validatePluginsUpdateParams as St, validateConfigPatchParams as T, validateRequestFrame as Tt, validateDeviceTokenRotateParams as U, validateSessionsResetParams as Ut, validateDevicePairRemoveParams as V, validateSessionsPatchParams as Vt, validateEventFrame as W, validateSessionsResolveParams as Wt, validateExecApprovalsNodeSetParams as X, validateSkillsSearchParams as Xt, validateExecApprovalsNodeGetParams as Y, validateSkillsInstallParams as Yt, validateExecApprovalsSetParams as Z, validateSkillsStatusParams as Zt, validateChannelsStatusParams as _, COMMAND_DESCRIPTION_MAX_LENGTH as _n, validatePluginsDetailParams as _t, validateAgentsCreateParams as a, validateUpdateRunParams as an, validateNodeListParams as at, validateChatInjectParams as b, validatePluginsStatusParams as bt, validateAgentsFilesListParams as c, validateWalletSummaryParams as cn, validateNodePairRejectParams as ct, validateAgentsUpdateParams as d, validateWizardCancelParams as dn, validateNodePendingAckParams as dt, validateTalkModeParams as en, validateModelsListParams as et, validateCanvasDocumentCreateParams as f, validateWizardNextParams as fn, validateNodePendingDrainParams as ft, validateChannelsStartParams as g, errorShape as gn, validatePluginApprovalResolveParams as gt, validateChannelsLogoutParams as h, ErrorCodes as hn, validatePluginApprovalRequestParams as ht, validateAgentWaitParams as i, validateToolsEffectiveParams as in, validateNodeInvokeResultParams as it, validateCronAddParams as j, validateSessionsCompactParams as jt, validateConfigSetParams as k, validateSendParams as kt, validateAgentsFilesSetParams as l, validateWebLoginStartParams as ln, validateNodePairRequestParams as lt, validateCanvasDocumentUpdateParams as m, validateWizardStatusParams as mn, validateNodeRenameParams as mt, validateAgentIdentityParams as n, validateTalkSpeakParams as nn, validateNodeEventParams as nt, validateAgentsDeleteParams as o, validateWakeParams as on, validateNodePairApproveParams as ot, validateCanvasDocumentListParams as p, validateWizardStartParams as pn, validateNodePendingEnqueueParams as pt, validateExecApprovalResolveParams as q, validateSkillsBinsParams as qt, validateAgentParams as r, validateToolsCatalogParams as rn, validateNodeInvokeParams as rt, validateAgentsFilesGetParams as s, validateWalletRecoveryPhraseSetParams as sn, validateNodePairListParams as st, formatValidationErrors as t, validateTalkRealtimeSessionParams as tn, validateNodeDescribeParams as tt, validateAgentsListParams as u, validateWebLoginWaitParams as un, validateNodePairVerifyParams as ut, validateChatAbortParams as v, parseSessionLabel as vn, validatePluginsInstallParams as vt, validateConfigGetParams as w, validatePushTestParams as wt, validateChatSendParams as x, validatePluginsUninstallParams as xt, validateChatHistoryParams as y, validatePluginsSearchParams as yt, validateDevicePairListParams as z, validateSessionsMessagesSubscribeParams as zt };
|