@xopcai/xopc 0.0.445 → 0.0.447
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/dist/assets/{auth-DAIwDtVp.js → auth-CQmxIyWw.js} +225 -8
- package/dist/browser-ext/dist/background.js +254 -16
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +3 -49
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/draft-stream-lifecycle.d.ts +2 -3
- package/dist/extensions/telegram/src/plugin.d.ts +0 -1
- package/dist/extensions/telegram/src/plugin.js +0 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CuPXAoLe.js → activity-store-D_KDDoA1.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D92uHOFV.js → agent-avatar-dicebear-CGHzO0HR.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-DINzeGs0.js → agent-avatar-display-Dm1YHaAt.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-rH1QpgiR.js → agent-defaults-settings-panel-BGTfRvG5.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-B2vXlrDW.js → agent-plugin-dialog-D0AQB-2O.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-lvQfOQPN.js → agents-Ckr-T2KU.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DPLtjJtX.js → agents-admin-api-D0qHxAok.js} +1 -1
- package/dist/gateway/static/root/assets/{api-snfMD8_Y.js → api-pQXrYBTk.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CEzBruRJ.js → api-uriioEZx.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CONwDpqL.js → app-management-settings-panel-CQbKhrjd.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Bu7K-_ri.js → appearance-settings-Dm0GM368.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-C3iDd3ZQ.js → apps-page-DCeINCy-.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CfLz9o-2.js → archive-plugin-Cd4FOTEH.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-Dl9fi8t0.js → automation-api-B3df53ms.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-BjjZCxee.js → automation-result-state-CpgaWu2r.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-9IPHu_UC.js → automation-run-list-DrJfwJN_.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-CKbHMLSy.js → automation-task-card-C2mxNw5Q.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-K3trjTZl.js → automations-page-B5bnb-N8.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-D7m3w_9B.js → automations-workspace-7R4mL3M-.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-Bv4ixxo4.js → binary-plugins-C0QOjfJV.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CtaJSB9U.js → block-editor-BY1Mb-WW.js} +3 -2
- package/dist/gateway/static/root/assets/{browser-settings-page-CmBsnx24.js → browser-settings-page-DUsk02LK.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DJYgOjeq.js → capabilities-Bt1fAcDI.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DDJJhQ40.js → capabilities-Bu7efUpH.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CBqvHAyp.js → capabilities-page-DFv5-mPY.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-wjezs0OE.js → capabilities-settings-panel-BtRMZjAx.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-D4q8hiD0.js → channels-CByFQQ_H.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BOB3dILf.js → chat-agents-api-SruH_oEQ.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DsaCatBN.js → chat-chart-block-BBchFbUa.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-C3ttsYGZ.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D9o0nUEV.js → chat-terminal-dock-DCNAz0CB.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-Cj0_7g9o.js → command-palette-api-r8U5soT7.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-CoDWKzBm.js → composer-payload-handoff-RaEQXTjj.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DJ9BIOHC.js → computer-settings-page-C7cj9Zyx.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-C5-3MDIj.js → connected-providers-grid-DgJ7I1do.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-bD1sKiAp.js → connection-usage-guide-De6QJt8B.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BEq3i3Vi.js → connector-service-page-qSYlFATU.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DEExP6a7.js → connectors-api-CqyteNnT.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-QVWuoxuK.js → connectors-page-BB3V-zJS.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-D2whl8Ci.js → date-picker-CB6IVCiq.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-C8zQtMcw.js → desktop-pet-narrative-B7I1II0Z.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C54b1FY4.js → desktop-pet-settings-Cm1O5CEG.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-qnIdmNnH.js → desktop-pet-wqyOn6xs.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-bryv5YRw.js → dev-view-store-BxPWx1Gi.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-Du-yOxZv.js → device-pairing-wizard-CqgjknYy.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-GsMkjw59.js → directory-picker-path-field-BCOUShCs.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-CrpDiC7J.js → discussion-annotation-sync-uvwyXFX3.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CDZfdMAR.js → extension-debug-page-C7ZJumIY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CG70QWPS.js → extension-iframe-host-B0rM3Ohp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-D7Av-sOf.js → extension-marketplace-api-DIGw487r.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DpJTL6-v.js → extension-page-C5LnL_Dy.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BZTbdvCF.js → extension-provider-D5L3t0e3.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CC4rmiFC.js → extension-settings-page-DnXoNNDa.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-Dtla5oAW.js → file-preview-surface-Bfqc0ZKv.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-B5THNdYK.js → gateway-config-swr-Db2fE-gT.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-nI6k8qP8.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-CjYSSi_l.js +1 -0
- package/dist/gateway/static/root/assets/gateway-restart-CyhN9Fk3.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-Nr0Bzbsy.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CqtCJzWJ.js → gateway-startup-retry-Du7l0oxt.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BQMdHLlp.js → global-defaults-api-qGBKLt28.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-Df3X6-Ko.js → home-page-h6D4Pqqc.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-G3tQFhif.js → image-generation-api-DeolJQxY.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BmEqiunH.js → imports-page-B3kUV_dq.js} +1 -1
- package/dist/gateway/static/root/assets/index-Bj6IrJGJ.js +11 -0
- package/dist/gateway/static/root/assets/index-D3YWUSNe.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-Brl22l1N.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CtNI6i7K.js → keyboard-shortcuts-settings-CFrEEDZu.js} +1 -1
- package/dist/gateway/static/root/assets/languages-kF11aUYU.js +2 -0
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CE46mHc0.js → local-app-workbench-page-CbHgQzs4.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DqZT5hLH.js → local-apps-page-Cdeawk2X.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-Bt_e3A8f.js → local-session-drafts-oWhYPECv.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Bld7_m-Q.js → locale-store-BY-fRY-q.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CzajqK40.js → logs-page-3dWLrUy0.js} +1 -1
- package/dist/gateway/static/root/assets/management-api-BzdYxqsC.js +1 -0
- package/dist/gateway/static/root/assets/management-settings-yWWgFlzF.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-editor-BuuGlcfG.js → markdown-editor-CjQJ-Nho.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-B3cFKCfO.js → markdown-view-ClNfoiYC.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-ZcY1nqMO.js → mcp-conversation-setup-page-C0M7yW4O.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DSOplRhW.js → media-plugins-DmVG3TQ5.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DFCLetQl.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-yAKlOR3O.js → model-selector-DkytsBae.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-8V-ZpAIa.js → models-hub-cache-CESzQ_tk.js} +1 -1
- package/dist/gateway/static/root/assets/navigation-ByOzYT0t.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-CQIrUO6h.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-Cw-TaViX.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CVQqqmGI.js → notes-api-32qiHxz2.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DIugUbkV.js → notes-page-gl59x-7l.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-DGa6PTuq.js → oauth-api-CMpfoRed.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-Bc-KLH1e.js → oauth-provider-connect-XzlLkqnK.js} +1 -1
- package/dist/gateway/static/root/assets/page-context-capture-button-CdMxGZaM.js +1 -0
- package/dist/gateway/static/root/assets/{page-context-draft-GveHK8e2.js → page-context-draft-CrgFs0h3.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-BNjlQHqU.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-Cu8lGBXZ.js → personal-avatar-BHMRbUIc.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-BZWJKyZ8.js → personal-page-DUuJe2P9.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-awr10jTV.js → personal-settings-panel-CZjvI9rl.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-CAxn3usD.js → phone-dependencies-card-BCEI4PGp.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-BBG3LxRP.js → phone-model-connection-BqOzyoRr.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CfPjKpnd.js → phone-model-picker-BGAAMeo6.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-C4dJdwRW.js → phone-settings-page-BdoFCa2J.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BKltFHtG.js → phone-workspace-store-D1BS7otl.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BqcFfZFH.js → plugin-details-dialog-BP-ZS2g2.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-QlyIA8ve.js → preference-select-fields-RITbo_ES.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-CRsfuAXl.js → product-automation-feedback-CQvcSORB.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CQ4dk-_l.js → product-open-page-CJfYOVkw.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-content-B0-rh4uS.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-modal-CSFxc7oy.js +2 -0
- package/dist/gateway/static/root/assets/project-detail-page-CgU7vGyT.js +7 -0
- package/dist/gateway/static/root/assets/project-overview-model-DrLXaO-t.js +1 -0
- package/dist/gateway/static/root/assets/{project-understanding-CU2af95r.js → project-understanding-szQw-qin.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BsgZb6n9.js → projects-page-BFZsIyzp.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-CspehmSU.js → providers-api-j511FMYv.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-BOZAOdCI.js → recording-upload-jq70ER5Y.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-Bdp3UUyz.js → registry-api-BnEoY6_B.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Bos3uwAT.js → remote-access-hub-B8AHjzC5.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-DJR3SCy6.js → resource-unavailable-AT-LkLIB.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-ByDpGuZp.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-DsbahxzE.js → runtime-tools-api-BDjAwlQF.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DW9_OFi2.js → runtime-tools-settings-panel-kvbXN_HV.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-Bd1JDO5T.js → service-recommendation-list-DquxQCKH.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-DjnHJ-0n.js → session-api-CgTDekPG.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-ChHnJOWW.js → session-manager-V8cj3NVD.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-BM-oqd22.js → sessions-page-KFescmNm.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-JCPJyeK-.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CM44UlF8.js → settings-advanced-section-Daxv3VGf.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-Blc4C8aw.js → settings-mode-store-LUeLxacj.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-irv-JoTz.js → settings-page-Bi6rvZGw.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-BYFaTD8a.js → settings-page-header-Dmw3nYJ1.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CnUQSxT3.js → settings-page-layout-YJXlkr_Z.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-DqaiLQ0I.js → setup-interaction-page-Dd3Ovfgm.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-iOYgfkoK.js → setup-status-panel-BZZXpXiB.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C_uYNUlp.js → share-link-dialog-B1g7Xero.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CFebGqyB.js → share-preview-page-1GlB7603.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-C2GDyqxP.js → shares-api-DXOD--vt.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-B-7la3QN.js → shares-settings-Bj-HKS3s.js} +1 -1
- package/dist/gateway/static/root/assets/skill-api-HQEXke4-.js +1 -0
- package/dist/gateway/static/root/assets/{skill-list-api-7MY9ewiu.js → skill-list-api-CJBrtxil.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DkDpu3Wd.js → skill-reload-api-CO6jhwui.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-DAxov1a8.js +2 -0
- package/dist/gateway/static/root/assets/{source-workspace-editor-kxosllTu.js → source-workspace-editor-BwYU5OEh.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BltKPJdb.js → system-settings-panel-By3gokfs.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-6awKGnOr.js → task-detail-page-Cf58C6gC.js} +1 -1
- package/dist/gateway/static/root/assets/{task-result-evidence-Cy9txdqV.js → task-result-evidence-DWfp9UIc.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DUEJoa1M.js → terminal-panel-store-DBC-pqGy.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DsvYj7Vy.js → theme-store-C57ZxHqm.js} +1 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-YQmN1S2k.js +2 -0
- package/dist/gateway/static/root/assets/{tracing-settings-page-B_Xdc2VF.js → tracing-settings-page-BQ7regHS.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-B6BhWTh3.js → tunnel-api-BOJVQPqI.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-B7rFXhDk.js → understanding-activity-store-YrDh1XvR.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-DCFASve5.js → understanding-refresh-store-D6gM1s8M.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DqzosTxy.js → usage-page-DpC6gP1I.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DsqcLHV9.js → use-autosave-NOpNkLFw.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-ClakaDU1.js → use-composer-attachments-R6kKpDgc.js} +1 -1
- package/dist/gateway/static/root/assets/use-file-preview-expanded-M7LSoDLc.js +15 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-T2e6P5Ed.js → use-personal-profile-JPLBYzew.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-Dq0qgK3N.js → use-workspace-tree-jzKVAl3N.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Ziz55hVM.js → user-model-page-CPZgl93P.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-D7NPAc1E.js → voice-api-key-field-R_KAYzHp.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-UQDTh6hh.js → voice-config-api-D6ueBjfw.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-SD2gZVg8.js → voice-input-shortcut-events-04u9YoRg.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-Bf9FaI-p.js → voice-transcribe-api-B2NVJYnu.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B41GOFXh.js → work-discovery-overlay-BHaemIrQ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-NNhExALx.js → work-discovery-page-Bt_j5iQ5.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-DeNWVFFK.js → working-directory-picker-modal-5EsBeKBO.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-DrVss2Fd.js → workspace-api-BmUCKePi.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Sy1CLe2K.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-C2egBzza.js → workspace-file-preview-dialog-hYGX2hWZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-XFUtwfLY.js → workspace-open-location-menu-DqLui4B1.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-BlhFT1q9.js → xopc-cloud-account-card-CVq7U7Ft.js} +1 -1
- package/dist/gateway/static/root/index.html +85 -84
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-client/src/index.js +309 -17
- package/dist/packages/endpoint-tools-protocol/src/index.js +62 -10
- package/dist/packages/endpoint-tools-protocol/src/provider-execution.js +32 -0
- package/dist/packages/endpoint-tools-protocol/src/providers.js +233 -0
- package/dist/packages/gateway-contract/src/clarifications.js +1 -1
- package/dist/packages/gateway-contract/src/device-pairing.js +2 -1
- package/dist/packages/gateway-contract/src/device-request-proof.js +32 -0
- package/dist/packages/gateway-contract/src/index.js +2 -2
- package/dist/packages/realtime-client/src/index.js +1 -0
- package/dist/packages/realtime-protocol/src/index.js +4 -1
- package/dist/src/agent/agent-manager.d.ts +0 -1
- package/dist/src/agent/agent-manager.js +1 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +4 -7
- package/dist/src/agent/embedded/session-runner.js +8 -3
- package/dist/src/agent/embedded/tool-metadata.d.ts +1 -1
- package/dist/src/agent/embedded/tool-search-extension.d.ts +1 -0
- package/dist/src/agent/embedded/tool-search-extension.js +35 -2
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +3 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +96 -18
- package/dist/src/agent/external-tools/index.js +2 -2
- package/dist/src/agent/external-tools/personal-request-scope.js +6 -0
- package/dist/src/agent/external-tools/read-policy.js +15 -8
- package/dist/src/agent/external-tools/service.js +8 -0
- package/dist/src/agent/external-tools/types.d.ts +1 -0
- package/dist/src/agent/inbound/inbound-loop.js +2 -1
- package/dist/src/agent/mcp/continuation-guard.js +1 -1
- package/dist/src/agent/mcp/conversation-setup.js +1 -1
- package/dist/src/agent/mcp/discovery.js +1 -1
- package/dist/src/agent/mcp/native-mcp.d.ts +2 -0
- package/dist/src/agent/mcp/native-mcp.js +5 -0
- package/dist/src/agent/mcp/transport.d.ts +2 -1
- package/dist/src/agent/mcp/transport.js +21 -6
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +2 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +6 -5
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.d.ts +1 -0
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +56 -30
- package/dist/src/agent/skills/marketplace/search.js +2 -2
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +2 -0
- package/dist/src/agent/tools/clarify-tool.d.ts +1 -0
- package/dist/src/agent/tools/device-use-tool.d.ts +9 -0
- package/dist/src/agent/tools/device-use-tool.js +158 -0
- package/dist/src/agent/tools/factory.js +24 -3
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/automations/api/routes.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.js +1 -1
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/mcp-source.js +1 -1
- package/dist/src/automations/service/action-executor.js +10 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/browser/remote/device-driver.js +7 -3
- package/dist/src/browser/remote/device-target.d.ts +1 -1
- package/dist/src/browser/remote/device-target.js +8 -6
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/channels/lifecycle-supervisor.js +2 -1
- package/dist/src/channels/pairing/paths.d.ts +1 -1
- package/dist/src/channels/pairing/paths.js +1 -1
- package/dist/src/channels/verified-inbound.d.ts +13 -0
- package/dist/src/channels/verified-inbound.js +29 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/device-host.js +52 -0
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/index.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +3 -3
- package/dist/src/computer/endpoint-transport.js +1 -1
- package/dist/src/computer/errors.js +4 -0
- package/dist/src/computer/evaluation.d.ts +2 -2
- package/dist/src/computer/flows.js +1 -1
- package/dist/src/computer/runtime.d.ts +1 -0
- package/dist/src/computer/runtime.js +25 -3
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/paths.d.ts +1 -1
- package/dist/src/config/paths.js +1 -1
- package/dist/src/config/schema.d.ts +2 -0
- package/dist/src/config/schema.js +1 -0
- package/dist/src/connectors/composio-triggers.js +1 -1
- package/dist/src/endpoint-tools/bridge-host.d.ts +5 -4
- package/dist/src/endpoint-tools/bridge-host.js +165 -30
- package/dist/src/endpoint-tools/bridge.d.ts +1 -1
- package/dist/src/endpoint-tools/bridge.js +39 -7
- package/dist/src/endpoint-tools/capability-catalog.d.ts +1 -1
- package/dist/src/endpoint-tools/capability-catalog.js +1 -1
- package/dist/src/endpoint-tools/delegation.d.ts +60 -0
- package/dist/src/endpoint-tools/delegation.js +130 -0
- package/dist/src/endpoint-tools/desktop-execution.js +1 -1
- package/dist/src/endpoint-tools/device-host.d.ts +98 -0
- package/dist/src/endpoint-tools/device-host.js +89 -0
- package/dist/src/endpoint-tools/execution-actor.d.ts +6 -0
- package/dist/src/endpoint-tools/execution-actor.js +53 -0
- package/dist/src/endpoint-tools/grant-service.d.ts +7 -4
- package/dist/src/endpoint-tools/grant-service.js +12 -4
- package/dist/src/endpoint-tools/host-credentials.d.ts +42 -0
- package/dist/src/endpoint-tools/host-credentials.js +144 -0
- package/dist/src/endpoint-tools/index.d.ts +1 -1
- package/dist/src/endpoint-tools/index.js +3 -3
- package/dist/src/endpoint-tools/invocation-service.d.ts +47 -4
- package/dist/src/endpoint-tools/invocation-service.js +328 -36
- package/dist/src/endpoint-tools/mcp-provider.d.ts +32 -0
- package/dist/src/endpoint-tools/mcp-provider.js +258 -0
- package/dist/src/endpoint-tools/policy.js +0 -3
- package/dist/src/endpoint-tools/provider-catalog.d.ts +45 -0
- package/dist/src/endpoint-tools/provider-catalog.js +202 -0
- package/dist/src/endpoint-tools/provider-operation-journal.d.ts +18 -0
- package/dist/src/endpoint-tools/provider-operation-journal.js +111 -0
- package/dist/src/endpoint-tools/provider-operation-status.d.ts +33 -0
- package/dist/src/endpoint-tools/provider-operation-status.js +80 -0
- package/dist/src/endpoint-tools/registry.d.ts +14 -1
- package/dist/src/endpoint-tools/registry.js +15 -1
- package/dist/src/endpoint-tools/result-projector.d.ts +1 -2
- package/dist/src/endpoint-tools/result-projector.js +3 -11
- package/dist/src/endpoint-tools/runtime.d.ts +10 -2
- package/dist/src/endpoint-tools/runtime.js +102 -11
- package/dist/src/endpoint-tools/target-resolver.d.ts +8 -3
- package/dist/src/endpoint-tools/target-resolver.js +24 -5
- package/dist/src/endpoint-tools/task-targets.d.ts +38 -0
- package/dist/src/endpoint-tools/task-targets.js +95 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +34 -1
- package/dist/src/endpoint-tools/upload-service.js +88 -2
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/refresh-runtime-access.d.ts +7 -2
- package/dist/src/extensions/agent-plugins/refresh-runtime-access.js +36 -25
- package/dist/src/extensions/agent-plugins/setup.d.ts +1 -1
- package/dist/src/extensions/agent-plugins/setup.js +2 -2
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/loader.d.ts +0 -1
- package/dist/src/extensions/loader.js +3 -38
- package/dist/src/extensions/typed-event-bus.d.ts +0 -1
- package/dist/src/extensions/typed-event-bus.js +0 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/routes/agent-stream.js +12 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/device-authorizations.js +4 -10
- package/dist/src/gateway/hono/routes/device-hosts.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-hosts.js +82 -0
- package/dist/src/gateway/hono/routes/device-providers.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-providers.js +297 -0
- package/dist/src/gateway/hono/routes/device-targets.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-targets.js +117 -0
- package/dist/src/gateway/hono/routes/endpoint-compatibility.js +2 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +2 -78
- package/dist/src/gateway/hono/routes/lazy-bundles.js +24 -8
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +3 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/security/device-request-proof.js +8 -18
- package/dist/src/gateway/security/gateway-scopes.js +1 -0
- package/dist/src/gateway/service/agent-runner.d.ts +3 -0
- package/dist/src/gateway/service/agent-runner.js +21 -5
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -0
- package/dist/src/gateway/service.js +9 -4
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/mcp/capability-server.js +1 -1
- package/dist/src/notes/agent-context.d.ts +3 -0
- package/dist/src/notes/agent-context.js +32 -4
- package/dist/src/personal-agent/proactivity/repository.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/phone/assistance.js +1 -1
- package/dist/src/phone/location-environment.js +1 -1
- package/dist/src/phone/repository.js +1 -1
- package/dist/src/phone/setup/service.js +1 -1
- package/dist/src/realtime/runtime.js +5 -0
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/session/session-context-for-llm.js +9 -1
- package/dist/src/session/store.js +1 -1
- package/dist/src/share/hosted-session-share.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +7 -1
- package/dist/src/storage/sqlite/clarification-wait-repository.js +40 -2
- package/dist/src/storage/sqlite/device-access-repository.d.ts +2 -8
- package/dist/src/storage/sqlite/device-access-repository.js +1 -3
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +2 -2
- package/dist/src/storage/sqlite/index.d.ts +0 -1
- package/dist/src/storage/sqlite/index.js +3 -3
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +7 -7
- package/dist/src/storage/sqlite/schema.sql +2 -10
- package/dist/src/storage/sqlite/session-input-repository.js +8 -0
- package/dist/src/storage/sqlite/upgrades/270_device_bridge_kind.sql +30 -0
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +4 -5
- package/dist/extensions/feishu/src/auth/paths.d.ts +0 -2
- package/dist/extensions/feishu/src/auth/paths.js +0 -16
- package/dist/extensions/feishu/src/state/thread-bindings.d.ts +0 -19
- package/dist/extensions/feishu/src/state/thread-bindings.js +0 -44
- package/dist/extensions/feishu/src/subagent-hooks.d.ts +0 -12
- package/dist/extensions/feishu/src/subagent-hooks.js +0 -50
- package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.d.ts +0 -11
- package/dist/extensions/feishu/src/tools/docx/docx-batch-insert.js +0 -93
- package/dist/extensions/feishu/src/tools/docx/docx-color-text.d.ts +0 -15
- package/dist/extensions/feishu/src/tools/docx/docx-color-text.js +0 -73
- package/dist/extensions/feishu/src/tools/docx/docx-table-ops.d.ts +0 -20
- package/dist/extensions/feishu/src/tools/docx/docx-table-ops.js +0 -171
- package/dist/extensions/feishu/src/tools/docx/docx-types.d.ts +0 -34
- package/dist/gateway/static/root/assets/chat-page-CeHOmJqM.js +0 -72
- package/dist/gateway/static/root/assets/gateway-realtime-hnEaDFaA.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-ugwtyD4q.js +0 -1
- package/dist/gateway/static/root/assets/gateway-restart-kwv0njYq.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CxYPJTy8.js +0 -1
- package/dist/gateway/static/root/assets/index-DE2bG5EI.css +0 -1
- package/dist/gateway/static/root/assets/index-PewrhviZ.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-BU4l6KJv.js +0 -1
- package/dist/gateway/static/root/assets/languages-zXtNocoy.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BgdAP0kf.js +0 -1
- package/dist/gateway/static/root/assets/messages-CGO1P4mz.js +0 -3
- package/dist/gateway/static/root/assets/navigation-D62kPsA9.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DWIWloib.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-BbNYW2Rw.js +0 -1
- package/dist/gateway/static/root/assets/page-context-capture-button-B9L7V_n2.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-YZfSLNTg.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-CGbqoID0.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-0wvIDcVr.js +0 -2
- package/dist/gateway/static/root/assets/project-detail-page-Bkxs8knZ.js +0 -7
- package/dist/gateway/static/root/assets/route-preload-BVo8JPwW.js +0 -2
- package/dist/gateway/static/root/assets/settings-advanced-gate-DyGT3o1e.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-BnpTSZGc.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-sL2kGqHZ.js +0 -2
- package/dist/gateway/static/root/assets/tool-friendly-title-DEGpbye4.js +0 -1
- package/dist/gateway/static/root/assets/use-file-preview-expanded-9DED7ohY.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CmSYxTmk.js +0 -1
- package/dist/packages/endpoint-tools-protocol/src/bridge.js +0 -105
- package/dist/packages/gateway-contract/src/desktop-chat.js +0 -29
- package/dist/src/endpoint-tools/binding-service.d.ts +0 -24
- package/dist/src/endpoint-tools/binding-service.js +0 -57
- package/dist/src/gateway/hono/routes/desktop-chat.d.ts +0 -3
- package/dist/src/gateway/hono/routes/desktop-chat.js +0 -30
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +0 -9
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +0 -41
- /package/dist/{extensions/feishu/src/tools/docx/docx-types.js → src/cli/commands/device-host.d.ts} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
//#region src/endpoint-tools/task-targets.ts
|
|
3
|
+
/** An execution target is pinned to a connection and transcript; reconnect never retargets it. */
|
|
4
|
+
var EndpointTaskTargetService = class {
|
|
5
|
+
resources = /* @__PURE__ */ new Map();
|
|
6
|
+
listeners = /* @__PURE__ */ new Set();
|
|
7
|
+
constructor(registry, transcriptId = () => void 0, actorPrincipalId = () => void 0, targets = /* @__PURE__ */ new Map()) {
|
|
8
|
+
this.registry = registry;
|
|
9
|
+
this.transcriptId = transcriptId;
|
|
10
|
+
this.actorPrincipalId = actorPrincipalId;
|
|
11
|
+
this.targets = targets;
|
|
12
|
+
}
|
|
13
|
+
onChange(listener) {
|
|
14
|
+
this.listeners.add(listener);
|
|
15
|
+
return () => {
|
|
16
|
+
this.listeners.delete(listener);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
select(conversationId, endpointId, now = Date.now(), actorPrincipalId) {
|
|
20
|
+
const key = this.key(conversationId), endpoint = this.registry.get(endpointId);
|
|
21
|
+
if (!endpoint) throw new Error("TARGET_OFFLINE");
|
|
22
|
+
actorPrincipalId ??= this.actorPrincipalId(key);
|
|
23
|
+
const current = this.get(key);
|
|
24
|
+
if (current && current.endpointId === endpointId && current.principalId === endpoint.principalId && current.connectionId === endpoint.connectionId && current.actorPrincipalId === actorPrincipalId && current.expiresAt > now) return current;
|
|
25
|
+
this.assertReleased(key);
|
|
26
|
+
if (!current) {
|
|
27
|
+
const stored = [...this.targets.entries()];
|
|
28
|
+
if (stored.length >= 2048) {
|
|
29
|
+
for (const [id, target] of stored) if (!this.resources.has(id) && target.transcriptId && target.transcriptId !== this.transcriptId(id)) this.clear(id);
|
|
30
|
+
if ([...this.targets.entries()].length >= 2048) throw new Error("TARGET_CAPACITY_EXCEEDED");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const target = {
|
|
34
|
+
conversationId: key,
|
|
35
|
+
endpointId,
|
|
36
|
+
principalId: endpoint.principalId,
|
|
37
|
+
connectionId: endpoint.connectionId,
|
|
38
|
+
executionRef: randomUUID(),
|
|
39
|
+
selectedAt: now,
|
|
40
|
+
expiresAt: now + 30 * 6e4,
|
|
41
|
+
transcriptId: this.transcriptId(key),
|
|
42
|
+
actorPrincipalId
|
|
43
|
+
};
|
|
44
|
+
this.targets.set(key, target);
|
|
45
|
+
for (const listener of this.listeners) listener(key);
|
|
46
|
+
return { ...target };
|
|
47
|
+
}
|
|
48
|
+
get(conversationId) {
|
|
49
|
+
const key = this.key(conversationId), target = this.targets.get(key);
|
|
50
|
+
if (!target) return;
|
|
51
|
+
if (target.transcriptId !== this.transcriptId(key)) {
|
|
52
|
+
this.clear(key);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
return { ...target };
|
|
56
|
+
}
|
|
57
|
+
resolve(conversationId) {
|
|
58
|
+
const target = this.get(conversationId);
|
|
59
|
+
if (!target || target.expiresAt <= Date.now()) return;
|
|
60
|
+
if (target.actorPrincipalId && target.actorPrincipalId !== this.actorPrincipalId(conversationId)) return;
|
|
61
|
+
const endpoint = this.registry.get(target.endpointId);
|
|
62
|
+
return endpoint && endpoint.connectionId === target.connectionId && endpoint.principalId === target.principalId ? endpoint : void 0;
|
|
63
|
+
}
|
|
64
|
+
hold(conversationId, resourceId) {
|
|
65
|
+
const key = this.key(conversationId);
|
|
66
|
+
const resources = this.resources.get(key) ?? /* @__PURE__ */ new Set();
|
|
67
|
+
if (resources.has(resourceId)) throw new Error("TARGET_RESOURCE_ALREADY_HELD");
|
|
68
|
+
resources.add(resourceId);
|
|
69
|
+
this.resources.set(key, resources);
|
|
70
|
+
let released = false;
|
|
71
|
+
return () => {
|
|
72
|
+
if (released) return;
|
|
73
|
+
released = true;
|
|
74
|
+
resources.delete(resourceId);
|
|
75
|
+
if (!resources.size && this.resources.get(key) === resources) this.resources.delete(key);
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
assertReleased(key) {
|
|
79
|
+
if (this.resources.get(key)?.size) throw new Error("TARGET_RESOURCE_BUSY: Close the active device resources before changing target");
|
|
80
|
+
}
|
|
81
|
+
clear(conversationId) {
|
|
82
|
+
const key = this.key(conversationId);
|
|
83
|
+
this.assertReleased(key);
|
|
84
|
+
const removed = this.targets.delete(key);
|
|
85
|
+
if (removed) for (const listener of this.listeners) listener(key);
|
|
86
|
+
return removed;
|
|
87
|
+
}
|
|
88
|
+
key(conversationId) {
|
|
89
|
+
const key = conversationId.trim();
|
|
90
|
+
if (!key || key.length > 500) throw new Error("Invalid conversation identity");
|
|
91
|
+
return key;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
export { EndpointTaskTargetService };
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { type EndpointToolContent } from '@xopcai/endpoint-tools-protocol';
|
|
2
2
|
export declare const ENDPOINT_UPLOAD_MAX_BYTES: number;
|
|
3
|
+
export interface EndpointInvocationScope {
|
|
4
|
+
conversationId: string;
|
|
5
|
+
transcriptId: string;
|
|
6
|
+
actorPrincipalId: string;
|
|
7
|
+
}
|
|
8
|
+
interface ArtifactDestination {
|
|
9
|
+
scope: EndpointInvocationScope;
|
|
10
|
+
endpointId: string;
|
|
11
|
+
connectionId: string;
|
|
12
|
+
toolName: string;
|
|
13
|
+
providerDigest: string;
|
|
14
|
+
}
|
|
3
15
|
export interface EndpointUploadedFile {
|
|
4
16
|
fileId: string;
|
|
5
17
|
invocationId: string;
|
|
@@ -29,8 +41,11 @@ export declare class EndpointUploadService {
|
|
|
29
41
|
private readonly frames;
|
|
30
42
|
private readonly pruneTimer;
|
|
31
43
|
private readonly validatingFrames;
|
|
44
|
+
private readonly invocationScopes;
|
|
45
|
+
private readonly transfers;
|
|
46
|
+
private readonly downloads;
|
|
32
47
|
constructor(rootDir: string);
|
|
33
|
-
createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame' | 'personal', principalId?: string): EndpointUploadGrant;
|
|
48
|
+
createGrant(invocationId: string, endpointId: string, now?: number, profile?: 'durable' | 'computer-frame' | 'personal', principalId?: string, scope?: EndpointInvocationScope): EndpointUploadGrant;
|
|
34
49
|
upload(params: {
|
|
35
50
|
invocationId: string;
|
|
36
51
|
endpointId: string;
|
|
@@ -42,6 +57,23 @@ export declare class EndpointUploadService {
|
|
|
42
57
|
validatedFrame?: boolean;
|
|
43
58
|
}): EndpointUploadedFile;
|
|
44
59
|
validateAndClose(invocationId: string, content: EndpointToolContent[]): void;
|
|
60
|
+
issueTransfer(fileId: string, destination: ArtifactDestination, stillAuthorized: () => boolean): {
|
|
61
|
+
transferId: `${string}-${string}-${string}-${string}-${string}`;
|
|
62
|
+
expiresAt: number;
|
|
63
|
+
sourceEndpointId: string;
|
|
64
|
+
name: string;
|
|
65
|
+
size: number;
|
|
66
|
+
};
|
|
67
|
+
listTransferFiles(conversationId: string, transcriptId: string, destinationId: string): Pick<EndpointUploadedFile, "name" | "size" | "endpointId" | "fileId">[];
|
|
68
|
+
bindTransfer(transferId: unknown, destination: ArtifactDestination, invocationId: string, deadlineAt: number): {
|
|
69
|
+
token: `${string}-${string}-${string}-${string}-${string}`;
|
|
70
|
+
size: number;
|
|
71
|
+
sha256: string;
|
|
72
|
+
};
|
|
73
|
+
takeTransfer(invocationId: string, endpointId: string, connectionId: string, token: string, isActorActive: (scope: EndpointInvocationScope) => boolean): Uint8Array | undefined;
|
|
74
|
+
revokeTransfer(transferId: string): void;
|
|
75
|
+
closeTransfer(invocationId: string): void;
|
|
76
|
+
private sameScope;
|
|
45
77
|
abort(invocationId: string): void;
|
|
46
78
|
getFile(fileId: string): EndpointUploadedFile | undefined;
|
|
47
79
|
readFile(fileId: string): Uint8Array | undefined;
|
|
@@ -56,3 +88,4 @@ export declare class EndpointUploadService {
|
|
|
56
88
|
close(): void;
|
|
57
89
|
private deleteFile;
|
|
58
90
|
}
|
|
91
|
+
export {};
|
|
@@ -10,6 +10,7 @@ init_src();
|
|
|
10
10
|
const GRANT_TTL_MS = 5 * 6e4;
|
|
11
11
|
const ENDPOINT_UPLOAD_MAX_BYTES = ENDPOINT_MAX_FILE_BYTES;
|
|
12
12
|
const DEFAULT_MAX_FILES = 8;
|
|
13
|
+
const TRANSFER_TTL_MS = 2 * 6e4;
|
|
13
14
|
var EndpointUploadError = class extends Error {
|
|
14
15
|
constructor(message, code = "INVALID_UPLOAD_GRANT") {
|
|
15
16
|
super(message);
|
|
@@ -22,6 +23,9 @@ var EndpointUploadService = class {
|
|
|
22
23
|
frames = /* @__PURE__ */ new Map();
|
|
23
24
|
pruneTimer;
|
|
24
25
|
validatingFrames = /* @__PURE__ */ new Set();
|
|
26
|
+
invocationScopes = /* @__PURE__ */ new Map();
|
|
27
|
+
transfers = /* @__PURE__ */ new Map();
|
|
28
|
+
downloads = /* @__PURE__ */ new Map();
|
|
25
29
|
constructor(rootDir) {
|
|
26
30
|
this.rootDir = rootDir;
|
|
27
31
|
mkdirSync(rootDir, {
|
|
@@ -31,7 +35,7 @@ var EndpointUploadService = class {
|
|
|
31
35
|
this.pruneTimer = setInterval(() => this.pruneFrames(Date.now()), 1e3);
|
|
32
36
|
this.pruneTimer.unref();
|
|
33
37
|
}
|
|
34
|
-
createGrant(invocationId, endpointId, now = Date.now(), profile = "durable", principalId) {
|
|
38
|
+
createGrant(invocationId, endpointId, now = Date.now(), profile = "durable", principalId, scope) {
|
|
35
39
|
const token = crypto.randomUUID();
|
|
36
40
|
const grant = {
|
|
37
41
|
profile,
|
|
@@ -42,7 +46,8 @@ var EndpointUploadService = class {
|
|
|
42
46
|
expiresAt: now + GRANT_TTL_MS,
|
|
43
47
|
maxBytes: profile === "computer-frame" ? COMPUTER_FRAME_MAX_BYTES : profile === "personal" ? 10 * 1024 * 1024 : ENDPOINT_UPLOAD_MAX_BYTES,
|
|
44
48
|
maxFiles: profile === "durable" ? DEFAULT_MAX_FILES : 1,
|
|
45
|
-
uploadedFileIds: []
|
|
49
|
+
uploadedFileIds: [],
|
|
50
|
+
scope
|
|
46
51
|
};
|
|
47
52
|
this.grants.set(invocationId, grant);
|
|
48
53
|
return {
|
|
@@ -105,9 +110,87 @@ var EndpointUploadService = class {
|
|
|
105
110
|
}
|
|
106
111
|
if (grant) {
|
|
107
112
|
for (const fileId of grant.uploadedFileIds) if (!referenced.some((item) => item.fileId === fileId)) this.deleteFile(fileId);
|
|
113
|
+
else if (grant.scope && grant.profile !== "computer-frame") {
|
|
114
|
+
if (this.invocationScopes.size >= 2048) {
|
|
115
|
+
const oldest = this.invocationScopes.keys().next().value;
|
|
116
|
+
if (oldest) this.invocationScopes.delete(oldest);
|
|
117
|
+
}
|
|
118
|
+
this.invocationScopes.set(fileId, grant.scope);
|
|
119
|
+
}
|
|
108
120
|
this.grants.delete(invocationId);
|
|
109
121
|
} else if (referenced.length > 0) throw new EndpointUploadError("Invocation did not have an upload grant");
|
|
110
122
|
}
|
|
123
|
+
issueTransfer(fileId, destination, stillAuthorized) {
|
|
124
|
+
const now = Date.now();
|
|
125
|
+
for (const [id, transfer] of this.transfers) if (transfer.expiresAt <= now) this.transfers.delete(id);
|
|
126
|
+
const file = this.getFile(fileId), source = this.invocationScopes.get(fileId);
|
|
127
|
+
if (!file || !source || source.conversationId !== destination.scope.conversationId || source.transcriptId !== destination.scope.transcriptId || file.endpointId === destination.endpointId || file.size > 8388608 || this.transfers.size >= 256 || !stillAuthorized()) return;
|
|
128
|
+
const transferId = crypto.randomUUID(), expiresAt = now + TRANSFER_TTL_MS;
|
|
129
|
+
this.transfers.set(transferId, {
|
|
130
|
+
transferId,
|
|
131
|
+
file,
|
|
132
|
+
destination,
|
|
133
|
+
expiresAt,
|
|
134
|
+
stillAuthorized
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
transferId,
|
|
138
|
+
expiresAt,
|
|
139
|
+
sourceEndpointId: file.endpointId,
|
|
140
|
+
name: file.name,
|
|
141
|
+
size: file.size
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
listTransferFiles(conversationId, transcriptId, destinationId) {
|
|
145
|
+
const result = [];
|
|
146
|
+
for (const [fileId, scope] of this.invocationScopes) {
|
|
147
|
+
if (scope.conversationId !== conversationId || scope.transcriptId !== transcriptId) continue;
|
|
148
|
+
const file = this.getFile(fileId);
|
|
149
|
+
if (!file || file.endpointId === destinationId || file.size > 8388608) continue;
|
|
150
|
+
result.push({
|
|
151
|
+
fileId,
|
|
152
|
+
endpointId: file.endpointId,
|
|
153
|
+
name: file.name,
|
|
154
|
+
size: file.size
|
|
155
|
+
});
|
|
156
|
+
if (result.length > 32) result.shift();
|
|
157
|
+
}
|
|
158
|
+
return result.reverse();
|
|
159
|
+
}
|
|
160
|
+
bindTransfer(transferId, destination, invocationId, deadlineAt) {
|
|
161
|
+
if (typeof transferId !== "string") return;
|
|
162
|
+
const transfer = this.transfers.get(transferId), expected = transfer?.destination;
|
|
163
|
+
if (!transfer || !expected || transfer.expiresAt <= Date.now() || !transfer.stillAuthorized() || !this.sameScope(expected.scope, destination.scope) || expected.endpointId !== destination.endpointId || expected.connectionId !== destination.connectionId || expected.toolName !== destination.toolName || expected.providerDigest !== destination.providerDigest) return;
|
|
164
|
+
this.transfers.delete(transferId);
|
|
165
|
+
const token = crypto.randomUUID();
|
|
166
|
+
this.downloads.set(invocationId, {
|
|
167
|
+
...transfer,
|
|
168
|
+
token,
|
|
169
|
+
expiresAt: Math.min(transfer.expiresAt, deadlineAt)
|
|
170
|
+
});
|
|
171
|
+
return {
|
|
172
|
+
token,
|
|
173
|
+
size: transfer.file.size,
|
|
174
|
+
sha256: transfer.file.sha256
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
takeTransfer(invocationId, endpointId, connectionId, token, isActorActive) {
|
|
178
|
+
const transfer = this.downloads.get(invocationId);
|
|
179
|
+
if (!transfer || transfer.destination.endpointId !== endpointId || transfer.destination.connectionId !== connectionId || Buffer.byteLength(token) !== transfer.token.length || !crypto.timingSafeEqual(Buffer.from(token), Buffer.from(transfer.token)) || transfer.expiresAt <= Date.now() || !transfer.stillAuthorized() || !isActorActive(transfer.destination.scope)) return;
|
|
180
|
+
this.downloads.delete(invocationId);
|
|
181
|
+
const bytes = this.readFile(transfer.file.fileId);
|
|
182
|
+
if (bytes?.byteLength === transfer.file.size) return bytes;
|
|
183
|
+
}
|
|
184
|
+
revokeTransfer(transferId) {
|
|
185
|
+
this.transfers.delete(transferId);
|
|
186
|
+
for (const [invocationId, transfer] of this.downloads) if (transfer.transferId === transferId) this.downloads.delete(invocationId);
|
|
187
|
+
}
|
|
188
|
+
closeTransfer(invocationId) {
|
|
189
|
+
this.downloads.delete(invocationId);
|
|
190
|
+
}
|
|
191
|
+
sameScope(a, b) {
|
|
192
|
+
return a.conversationId === b.conversationId && a.transcriptId === b.transcriptId && a.actorPrincipalId === b.actorPrincipalId;
|
|
193
|
+
}
|
|
111
194
|
abort(invocationId) {
|
|
112
195
|
const grant = this.grants.get(invocationId);
|
|
113
196
|
if (!grant) return;
|
|
@@ -198,6 +281,8 @@ var EndpointUploadService = class {
|
|
|
198
281
|
clearInterval(this.pruneTimer);
|
|
199
282
|
for (const id of this.frames.keys()) this.deleteFile(id);
|
|
200
283
|
this.grants.clear();
|
|
284
|
+
this.transfers.clear();
|
|
285
|
+
this.downloads.clear();
|
|
201
286
|
}
|
|
202
287
|
deleteFile(fileId) {
|
|
203
288
|
const file = this.files.get(fileId);
|
|
@@ -206,6 +291,7 @@ var EndpointUploadService = class {
|
|
|
206
291
|
this.frames.get(fileId)?.bytes.fill(0);
|
|
207
292
|
this.frames.delete(fileId);
|
|
208
293
|
this.files.delete(fileId);
|
|
294
|
+
this.invocationScopes.delete(fileId);
|
|
209
295
|
}
|
|
210
296
|
};
|
|
211
297
|
//#endregion
|
|
@@ -8,8 +8,8 @@ import { assertManagedWorktreePath, assertNoNestedRegisteredWorktrees, readDirec
|
|
|
8
8
|
import { dirname, resolve } from "node:path";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { mkdir, rm, stat } from "node:fs/promises";
|
|
12
11
|
import lockfile from "proper-lockfile";
|
|
12
|
+
import { mkdir, rm, stat } from "node:fs/promises";
|
|
13
13
|
//#region src/execution-environments/local-worktree-manager.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
const log = createLogger("ExecutionEnvironment:LocalWorktree");
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { Config } from '../../config/schema.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export type PluginMcpOrigin = {
|
|
3
|
+
id: string;
|
|
4
|
+
revision: string;
|
|
5
|
+
serverName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function schedulePluginRuntimeAccessRefresh(config: Config, workspace: string, agentId?: string): void;
|
|
8
|
+
export declare function assertPluginMcpCallAccess(config: Config, workspace: string, origin: PluginMcpOrigin): Promise<void>;
|
|
@@ -7,30 +7,41 @@ import { PluginSetupService } from "./setup.js";
|
|
|
7
7
|
//#region src/extensions/agent-plugins/refresh-runtime-access.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const log = createLogger("PluginRuntimeAccess");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
const refreshIntervalMs = 6e4;
|
|
11
|
+
const refreshes = /* @__PURE__ */ new Map();
|
|
12
|
+
function refreshPlugin(config, store, plugin, workspace) {
|
|
13
|
+
if (!pluginAuthorizations(plugin.manifest).length && !Object.values(plugin.layout?.userConfig ?? {}).some((field) => field.sensitive) && Object.values(plugin.servers).every((server) => server.type === "stdio" || server.connectionAuth?.mode === "none")) return Promise.resolve();
|
|
14
|
+
const key = JSON.stringify([plugin.id, plugin.receipt.revision]);
|
|
15
|
+
const current = refreshes.get(key);
|
|
16
|
+
if (current) return current;
|
|
17
|
+
const refresh = new PluginSetupService(store).refreshRuntime(plugin.id, config, workspace).finally(() => {
|
|
18
|
+
setTimeout(() => refreshes.delete(key), refreshIntervalMs).unref();
|
|
19
|
+
});
|
|
20
|
+
refreshes.set(key, refresh);
|
|
21
|
+
return refresh;
|
|
22
|
+
}
|
|
23
|
+
function schedulePluginRuntimeAccessRefresh(config, workspace, agentId) {
|
|
24
|
+
setImmediate(() => {
|
|
25
|
+
const store = new AgentPluginStore();
|
|
26
|
+
Promise.resolve().then(() => Promise.all(store.active(agentId, workspace).map(async (plugin) => {
|
|
27
|
+
try {
|
|
28
|
+
await refreshPlugin(config, store, plugin, workspace);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
log.warn({
|
|
31
|
+
err,
|
|
32
|
+
pluginId: plugin.id
|
|
33
|
+
}, "Could not refresh plugin authorization state");
|
|
34
|
+
}
|
|
35
|
+
}))).catch((err) => log.warn({ err }, "Could not list plugins for authorization refresh"));
|
|
36
|
+
}).unref();
|
|
37
|
+
}
|
|
38
|
+
async function assertPluginMcpCallAccess(config, workspace, origin) {
|
|
39
|
+
const store = new AgentPluginStore();
|
|
40
|
+
const allowedPlugin = () => store.active(void 0, workspace).find((plugin) => plugin.id === origin.id && plugin.receipt.revision === origin.revision && resolvePluginCapabilityAccess(plugin, store).server(origin.serverName));
|
|
41
|
+
const plugin = allowedPlugin();
|
|
42
|
+
if (!plugin) throw new Error("Plugin tool authorization is unavailable. Check the plugin connection.");
|
|
43
|
+
await refreshPlugin(config, store, plugin, workspace);
|
|
44
|
+
if (!allowedPlugin()) throw new Error("Plugin tool authorization changed. Check the plugin connection.");
|
|
34
45
|
}
|
|
35
46
|
//#endregion
|
|
36
|
-
export {
|
|
47
|
+
export { assertPluginMcpCallAccess, schedulePluginRuntimeAccessRefresh };
|
|
@@ -119,7 +119,7 @@ export declare class PluginSetupService {
|
|
|
119
119
|
id: string;
|
|
120
120
|
name: string;
|
|
121
121
|
}>>>;
|
|
122
|
-
authorization(id: string, owner: string, server: string, config: Config): Promise<import("
|
|
122
|
+
authorization(id: string, owner: string, server: string, config: Config): Promise<import("./cli-authorization.js").PluginCliAuthorization | import("../../agent/mcp/connection-setup.js").McpAuthorization>;
|
|
123
123
|
redirect(id: string, owner: string, server: string, url: string, config: Config): boolean;
|
|
124
124
|
private config;
|
|
125
125
|
startPrepare(id: string, owner: string, revision: number, config: Config, workspace: string, idempotencyKey?: string): PluginSetupJob;
|
|
@@ -443,7 +443,7 @@ var PluginSetupService = class {
|
|
|
443
443
|
job.state = "running";
|
|
444
444
|
job.resources = "running";
|
|
445
445
|
delete job.error;
|
|
446
|
-
this.write(job);
|
|
446
|
+
if (!refreshOnly) this.write(job);
|
|
447
447
|
try {
|
|
448
448
|
if (!refreshOnly) await preparePluginResources(this.store, plugin, controller.signal);
|
|
449
449
|
job.resources = "ready";
|
|
@@ -488,7 +488,7 @@ var PluginSetupService = class {
|
|
|
488
488
|
const persisted = this.get(id, owner);
|
|
489
489
|
if (!persisted || persisted.id !== job.id || persisted.revision !== job.revision || persisted.state === "cancelled" || !this.store.receipt(id)) throw new Error("Setup changed");
|
|
490
490
|
this.config(id, job.packageRevision, config);
|
|
491
|
-
this.write(job);
|
|
491
|
+
if (!refreshOnly) this.write(job);
|
|
492
492
|
}
|
|
493
493
|
for (const target of job.authorizations) {
|
|
494
494
|
const declaration = declarations.find((value) => value.id === target.id);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
1
|
import { containedPath } from "./contained-path.js";
|
|
3
2
|
import "./validation.js";
|
|
4
3
|
import { AgentPluginStore } from "./store.js";
|
|
4
|
+
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
5
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
6
6
|
import { parseSkillLocalizations } from "../../agent/skills/parse-skill-metadata.js";
|
|
7
7
|
import { buildSkillMarkdownPreviewFromRaw } from "../../agent/skills/skill-markdown-preview-from-raw.js";
|
|
@@ -9,8 +9,8 @@ import { dirname, join, resolve } from "node:path";
|
|
|
9
9
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
import yaml from "js-yaml";
|
|
13
12
|
import { validateHeaderName, validateHeaderValue } from "node:http";
|
|
13
|
+
import yaml from "js-yaml";
|
|
14
14
|
//#region src/extensions/agent-plugins/validation.ts
|
|
15
15
|
init_schema();
|
|
16
16
|
const PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
|
|
@@ -2,7 +2,7 @@ import { PACKAGE_VERSION, init_package_version } from "../package-version.js";
|
|
|
2
2
|
import { createLogger, createServiceLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
|
-
import { init_paths, resolveBundledExtensionsDir,
|
|
5
|
+
import { init_paths, resolveBundledExtensionsDir, resolveExtensionsDir, resolveWorkspaceExtensionsDir } from "../config/paths.js";
|
|
6
6
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
7
7
|
import { normalizeExtensionManifest } from "./normalize-manifest.js";
|
|
8
8
|
import { areExtensionsGloballyDisabled, discoverExtensionsFromDisk } from "./discover-extensions.js";
|
|
@@ -19,10 +19,9 @@ import { EXTENSION_API_VERSION, EXTENSION_UI_API_VERSION, checkExtensionApiCompa
|
|
|
19
19
|
import { DEFAULT_SECURITY_CONFIG, checkExtensionDirSafety, checkExtensionPathSafety, isExtensionAllowed, logSecurityIssue, provenanceTracker } from "./security.js";
|
|
20
20
|
import { getSlotRegistry } from "./slots.js";
|
|
21
21
|
import { getExtensionCache, getExtensionDiagnostics } from "./diagnostics.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { pathToFileURL } from "node:url";
|
|
23
|
+
import { isAbsolute, join } from "path";
|
|
24
24
|
import { existsSync, readFileSync } from "fs";
|
|
25
|
-
import { createJiti } from "jiti";
|
|
26
25
|
//#region src/extensions/loader.ts
|
|
27
26
|
/**
|
|
28
27
|
* Extension Loader and Registry
|
|
@@ -57,7 +56,6 @@ var ExtensionLoader = class {
|
|
|
57
56
|
options;
|
|
58
57
|
extensionInstances = /* @__PURE__ */ new Map();
|
|
59
58
|
startedServiceIds = /* @__PURE__ */ new Set();
|
|
60
|
-
jiti;
|
|
61
59
|
_appConfig;
|
|
62
60
|
_runtimeContext;
|
|
63
61
|
securityConfig;
|
|
@@ -83,39 +81,6 @@ var ExtensionLoader = class {
|
|
|
83
81
|
this.slotRegistry = getSlotRegistry();
|
|
84
82
|
this.cache = getExtensionCache();
|
|
85
83
|
this.diagnostics = getExtensionDiagnostics();
|
|
86
|
-
const alias = {};
|
|
87
|
-
const sdkPath = resolveExtensionSdkPath();
|
|
88
|
-
if (sdkPath) {
|
|
89
|
-
const sdkDir = dirname(sdkPath);
|
|
90
|
-
const sdkSubpaths = [
|
|
91
|
-
"core",
|
|
92
|
-
"lazy",
|
|
93
|
-
"provider",
|
|
94
|
-
"channel",
|
|
95
|
-
"hooks",
|
|
96
|
-
"tools",
|
|
97
|
-
"testing",
|
|
98
|
-
"speech",
|
|
99
|
-
"media"
|
|
100
|
-
];
|
|
101
|
-
const prefix = "@xopcai/xopc/extension-sdk";
|
|
102
|
-
alias[prefix] = sdkPath;
|
|
103
|
-
for (const subpath of sdkSubpaths) alias[`${prefix}/${subpath}`] = join(sdkDir, `${subpath}.ts`);
|
|
104
|
-
}
|
|
105
|
-
this.jiti = createJiti(fileURLToPath(import.meta.url), {
|
|
106
|
-
interopDefault: true,
|
|
107
|
-
extensions: [
|
|
108
|
-
".ts",
|
|
109
|
-
".tsx",
|
|
110
|
-
".mts",
|
|
111
|
-
".cts",
|
|
112
|
-
".js",
|
|
113
|
-
".mjs",
|
|
114
|
-
".cjs",
|
|
115
|
-
".json"
|
|
116
|
-
],
|
|
117
|
-
alias
|
|
118
|
-
});
|
|
119
84
|
}
|
|
120
85
|
/**
|
|
121
86
|
* Reuse a pre-built metadata snapshot (avoids duplicate filesystem discovery).
|
|
@@ -53,7 +53,6 @@ export declare class TypedEventBus<TEvents extends EventMap = EventMap, TRequest
|
|
|
53
53
|
private requestHandlers;
|
|
54
54
|
private pendingRequests;
|
|
55
55
|
private options;
|
|
56
|
-
private requestIdCounter;
|
|
57
56
|
constructor(options?: TypedEventBusOptions);
|
|
58
57
|
/**
|
|
59
58
|
* Subscribe to an event
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath } from "../agent/agent-scope.js";
|
|
4
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
5
6
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
7
7
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
9
|
import { resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentDefaultsSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
4
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
5
4
|
import { validatePhoneModelChange } from "../phone/model-adapter.js";
|
|
5
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
6
|
import { validateComputerModelChange } from "../computer/model-config.js";
|
|
7
7
|
import { GATEWAY_BUILTIN_TOOLS } from "./agent-builtin-tools.js";
|
|
8
8
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packages/gateway-contract/src/user-turn-document.js";
|
|
2
2
|
import { clarificationResponseCommandSchema } from "../../../../packages/gateway-contract/src/clarifications.js";
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
|
+
import { deviceExecutionPrincipalId } from "../../../endpoint-tools/execution-actor.js";
|
|
4
5
|
import { init_types, parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
5
6
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
7
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
8
|
import { replaceLatestSessionTurn } from "./session-input-handler.js";
|
|
7
9
|
import { handleSessionCommand, handleSessionInputReceipt, handleSessionPreparationRetry } from "./session-command-handler.js";
|
|
8
10
|
//#region src/gateway/hono/routes/agent-stream.ts
|
|
@@ -159,6 +161,14 @@ function registerAgentStreamRoutes(authenticated, deps) {
|
|
|
159
161
|
message: "Session not found"
|
|
160
162
|
}
|
|
161
163
|
}, 404);
|
|
164
|
+
const checkpoint = snapshot.clarification?.deviceInteraction;
|
|
165
|
+
if (checkpoint && deviceExecutionPrincipalId(getGatewayPrincipal(c)) !== checkpoint.actorPrincipalId) return c.json({
|
|
166
|
+
ok: true,
|
|
167
|
+
payload: {
|
|
168
|
+
...snapshot,
|
|
169
|
+
clarification: null
|
|
170
|
+
}
|
|
171
|
+
});
|
|
162
172
|
return c.json({
|
|
163
173
|
ok: true,
|
|
164
174
|
payload: snapshot
|
|
@@ -177,7 +187,8 @@ function registerAgentStreamRoutes(authenticated, deps) {
|
|
|
177
187
|
}, 400);
|
|
178
188
|
const result = service.resolveClarificationResponse({
|
|
179
189
|
id,
|
|
180
|
-
...command.data
|
|
190
|
+
...command.data,
|
|
191
|
+
responseActor: getGatewayPrincipal(c)
|
|
181
192
|
});
|
|
182
193
|
if (result.ok === true) return c.json({
|
|
183
194
|
ok: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
1
2
|
import { AgentEntrySchema, AgentModelsOverrideSchema, AgentProfileSchema, RuntimePolicySchema, SkillOverrideSchema, ToolPoliciesSchema } from "../../../agent-config/schema.js";
|
|
2
3
|
import { init_agent_config } from "../../../agent-config/index.js";
|
|
3
|
-
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
4
4
|
import { init_agent_scope } from "../../../agent/agent-scope.js";
|
|
5
5
|
import { getVoiceModelsConfig } from "../../../config/voice.js";
|
|
6
6
|
import { createGatewayAgent, deleteAgentAvatarFile, deleteGatewayAgent, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, readAgentAvatarFile, readAgentProfileFile, resolveAgentAvatarImage, updateGatewayAgent, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BindingsSchema, init_binding_schema } from "../../../../routing/binding-schema.js";
|
|
2
|
-
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
3
2
|
import { ComputerConfigSchema, init_config } from "../../../../computer/config.js";
|
|
4
3
|
import { ContextPlanningConfigSchema, HomeIntelligenceConfigSchema, KnowledgeMemoryConfigSchema, UserContextConfigSchema, UserModelConfigSchema, init_config as init_config$1 } from "../../../../user-context/config.js";
|
|
5
4
|
import { BrowserConfigSchema, McpConfigSchema, VoiceConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
7
6
|
import { canonicalizeConfiguredMcpServer } from "../../../../config/mcp-config-normalize.js";
|
|
7
|
+
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
8
8
|
import { mergeGatewaySkillsMarketplacePatch, mergeSessionConfigPatch, mergeUpdateConfigPatch } from "../../../../config/web-patch.js";
|
|
9
9
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../../../auth.js";
|
|
10
10
|
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import { locationRequestSchema } from "../../../../packages/endpoint-tools-protocol/src/location.js";
|
|
2
|
-
import { init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
1
|
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
4
2
|
import { init_session_repository } from "../../../storage/sqlite/session-repository.js";
|
|
5
3
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
4
|
import { z } from "zod";
|
|
5
|
+
import { bodyLimit } from "hono/body-limit";
|
|
7
6
|
//#region src/gateway/hono/routes/device-authorizations.ts
|
|
8
|
-
init_src();
|
|
9
7
|
init_session_repository();
|
|
10
8
|
const authorizationSchema = z.object({
|
|
11
9
|
conversationId: z.uuid(),
|
|
12
10
|
requestorPrincipalId: z.string().min(1).max(160),
|
|
13
11
|
targetEndpointId: z.string().min(1).max(160),
|
|
14
|
-
toolName: z.
|
|
15
|
-
|
|
16
|
-
"web.device.get_location",
|
|
17
|
-
"desktop.device.get_location"
|
|
18
|
-
]),
|
|
19
|
-
arguments: locationRequestSchema
|
|
12
|
+
toolName: z.string().regex(/^[A-Za-z0-9_.-]{1,202}$/),
|
|
13
|
+
arguments: z.record(z.string(), z.unknown())
|
|
20
14
|
}).strict();
|
|
21
15
|
function registerDeviceAuthorizationRoutes(app, deps) {
|
|
22
16
|
app.use("/api/endpoint-tools/target-authorizations*", async (c, next) => {
|
|
@@ -34,7 +28,7 @@ function registerDeviceAuthorizationRoutes(app, deps) {
|
|
|
34
28
|
ok: true,
|
|
35
29
|
payload: deps.service.endpointTools.grants.list()
|
|
36
30
|
}));
|
|
37
|
-
app.post("/api/endpoint-tools/target-authorizations", async (c) => {
|
|
31
|
+
app.post("/api/endpoint-tools/target-authorizations", bodyLimit({ maxSize: 40 * 1024 }), async (c) => {
|
|
38
32
|
const parsed = authorizationSchema.safeParse(await c.req.json().catch(() => null));
|
|
39
33
|
if (!parsed.success) return c.json({
|
|
40
34
|
ok: false,
|