@xopcai/xopc 0.0.426 → 0.0.428
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/manifest.json +1 -1
- package/dist/extensions/telegram/src/adapters/security-adapter.js +1 -1
- package/dist/extensions/telegram/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/auth/accounts.js +2 -2
- package/dist/extensions/weixin/src/auth/pairing.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
- package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +2 -2
- package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
- package/dist/extensions/weixin/src/messaging/send.js +12 -3
- package/dist/extensions/weixin/src/monitor/monitor.js +1 -1
- package/dist/extensions/weixin/src/outbound-send.js +12 -3
- package/dist/extensions/weixin/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/gateway/static/root/assets/{activity-store-D_DXNHba.js → activity-store-WqnVruhY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CjaQxFQt.js → agent-avatar-dicebear-CSiO9c2F.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-6Z4m31Fz.js → agent-avatar-display-D-yds6wG.js} +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-_UT9C7bg.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DVzYXsAy.js +1 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-u5c3GREg.js → agents-admin-api-Bgv4lJ9Y.js} +1 -1
- package/dist/gateway/static/root/assets/agents-yTsbcxRi.js +77 -0
- package/dist/gateway/static/root/assets/{api-C3Tp9MkF.js → api-C-9J9ghT.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CRT9ZyH0.js → api-Dv6Cn-Rs.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-DRy3-k7j.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C8yc3yHG.js → app-management-settings-panel-BXJrrjH5.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BELgtR3O.js → appearance-settings-oYjAVulT.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-D95yzj-f.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BCQnOkV8.js → archive-plugin-DBPu3xCJ.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-load-DrVGNxJm.js +1 -0
- package/dist/gateway/static/root/assets/automation-api-DAou8Kji.js +1 -0
- package/dist/gateway/static/root/assets/{automation-result-state-CMfVTv_i.js → automation-result-state-CA7LV098.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-w6cKxfaP.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-CdIPdwF0.js → automations-page-D4LyOLzY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BGyvZZj5.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CIB5cbvQ.js → binary-plugins-D25P9ZxQ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BQtTLe6Q.js → block-editor-BI105p1U.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DeraGZ1y.js → browser-automation-inputs-DhDRvWQE.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-SpPzRNqU.js → browser-automations-page-CCPi1Bvy.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-control-api-CbbPvhHR.js → browser-control-api-BN4F-bM1.js} +1 -1
- package/dist/gateway/static/root/assets/browser-settings-page-BZXUZpjp.js +3 -0
- package/dist/gateway/static/root/assets/{button-CnRSIP6m.js → button-Cc4hUNTt.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DLMuj21P.js → capabilities-LC-yEQYo.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-DHJLl4RD.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-FJ3Vo7Wa.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-u2z_KFRt.js +1 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-CTUCuBlW.js → capability-header-actions-BxMYfQ8y.js} +1 -1
- package/dist/gateway/static/root/assets/channels-9Uaa-IN0.js +1 -0
- package/dist/gateway/static/root/assets/{chat-agents-api-D8YS5amE.js → chat-agents-api-Cffxfzi1.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DCzUECct.js → chat-chart-block-Bbk0b3TV.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page--dKUIg5W.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dl-OTkJI.js → chat-terminal-dock-CQMuG-Bz.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-Dijix7V6.js → command-palette-api-BRxfFgGA.js} +1 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-_9L2A5AZ.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-B-lGMimW.js → computer-settings-page-Bm70SIjD.js} +1 -1
- package/dist/gateway/static/root/assets/confirm-dialog-D7dQJytv.js +1 -0
- package/dist/gateway/static/root/assets/connected-providers-grid-B7ktDgqt.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-C8InhrMt.js → connector-service-page-BVMEg8n-.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DEJU8mgn.js → connectors-api-B07yoCzk.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-hPKaJUWY.js +1 -0
- package/dist/gateway/static/root/assets/{copy-text-row-CYIv7RfP.js → copy-text-row-CpiRzq4G.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-kqic8j73.js → date-picker-BvEnSGZK.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-XjPB8FJS.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DFNehTtd.js → desktop-pet-C1z9YDEg.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BDS7_tQ_.js → desktop-pet-settings-CbbVb8GY.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-CeZZLOc6.js → dev-view-store-38EmUIEC.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-Wb1EKiXA.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Di0h3ws4.js → directory-picker-path-field-BvKDrKc4.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-ClKEyXmN.js → discussion-annotation-sync-BfVzIwe2.js} +1 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +1 -0
- package/dist/gateway/static/root/assets/dist-BuHnPloF.js +1 -0
- package/dist/gateway/static/root/assets/dist-GJ8-1PAx.js +1 -0
- package/dist/gateway/static/root/assets/dist-ZrL34Ps4.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DwB5KMGk.js → extension-debug-page-CB9Lu3Sq.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-Cqg1K70e.js → extension-iframe-host-BzjrVAUR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DRBszrCR.js → extension-marketplace-api-DigziAgd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DyrQtG82.js → extension-page-DUa9MeaZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-C_uKqJxP.js → extension-provider-301x0rh-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BAMQHzkX.js → extension-settings-page-CP9ciZUI.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-DfkXvFnc.js → file-preview-surface-BaMGmCbw.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BOCt_zOo.js → gateway-config-swr-BD4Bf8uu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BL_Cf0OQ.js → gateway-realtime-CSd9VB7Z.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Bxkv62qs.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-CHf8qY7H.js → gateway-restart-CIUCTKYR.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-uAboiElC.js → gateway-settings-CCqF1uZv.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CvkJYurV.js → gateway-startup-retry-BsU5k8oi.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BWMbKu72.js → global-defaults-api-asOZQeM8.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Bb_RC1O9.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CQxZSTWA.js → image-generation-api-BbEnKsK1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C90644id.js → imports-page-CVnoGUyp.js} +1 -1
- package/dist/gateway/static/root/assets/index-ClPeYgQk.js +11 -0
- package/dist/gateway/static/root/assets/index-Cz-VjTNd.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-DXVOHMhS.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CbeubKe1.js → keyboard-shortcuts-settings-BCl90SrD.js} +1 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcJc9xLJ.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-C6zFgwkr.js → local-apps-page-CdAKoWfg.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-BJ1B1dQ7.js → local-session-drafts-nRGeybku.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Br7IfbXK.js → locale-store-B7y-RVe8.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CpVCvAWE.js → logs-page-McbSQwJI.js} +2 -2
- package/dist/gateway/static/root/assets/management-settings-BIR0BwNV.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DrVAMlwc.js → markdown-view-DFHa8rUg.js} +2 -2
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-Dwx4TuIr.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-Ba6vUE4J.js → media-plugins-BzzLV7wW.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DYDkJvXj.js +3 -0
- package/dist/gateway/static/root/assets/model-selector-DJSVr3LM.js +1 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-Bd-fYUrV.js → models-hub-cache-BUapaPTN.js} +1 -1
- package/dist/gateway/static/root/assets/new-chat-navigation-B6NPQ4h4.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-CJ-dPovd.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-ClPkeHe5.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CUlhTRv0.js → notes-api-ulup1oFS.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-eoKX85K5.js → notes-page-BaFNplIr.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-DMMdeaNd.js → oauth-api-DINa08-z.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-C8BXow79.js → oauth-provider-connect-C0PVEHC2.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CBFK41OS.js → page-context-capture-button-CGfR0dsc.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-LF33STHC.js → page-context-draft-DhRNxc0v.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-CoKMiYoi.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-D6CzIIfo.js → personal-avatar-DiVFO2Aw.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CiKdXLeR.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-DnYapLo7.js → personal-settings-panel-Ds4ntiqu.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DBiKtzwz.js → phone-dependencies-card-B3R6L5Qu.js} +1 -1
- package/dist/gateway/static/root/assets/phone-model-connection-ucX3Tvl8.js +1 -0
- package/dist/gateway/static/root/assets/{phone-model-picker-BmSxEr7M.js → phone-model-picker-CU37sziM.js} +1 -1
- package/dist/gateway/static/root/assets/phone-settings-page-BSdB2pnW.js +1 -0
- package/dist/gateway/static/root/assets/{phone-workspace-store-SN7hfddU.js → phone-workspace-store-Cmes9gQ4.js} +1 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-DblFhnuC.js +1 -0
- package/dist/gateway/static/root/assets/{popover-select-DD8fmrxH.js → popover-select-CEMWIrtY.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-Cu_ZC9Up.js → preference-select-fields-D2-QfMN5.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-Tn2dUJWM.js → product-automation-feedback-BzY3z8zu.js} +2 -2
- package/dist/gateway/static/root/assets/{product-open-page-Nf-Oqf1h.js → product-open-page-BKw6H0Mn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-D6NwUm3A.js → product-preview-content-CNaJb6Bj.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-BfNcGgXA.js → product-preview-modal-DgwrrpqJ.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-FReFYUv0.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-B1BK7Ixi.js → project-understanding-CrSkrJnM.js} +1 -1
- package/dist/gateway/static/root/assets/projects-page-Cp91_KzA.js +1 -0
- package/dist/gateway/static/root/assets/{providers-api-DOnNfkwQ.js → providers-api-CBSC3jdu.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-RAhaLUcQ.js → recording-upload-DBHAGKZj.js} +1 -1
- package/dist/gateway/static/root/assets/{refresh-button-bU_0NarN.js → refresh-button-DiWdGAaX.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DFDvOTg4.js → registry-api-QZEjziDq.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DWsOWetc.js → remote-access-hub-BdXxFQfH.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-TQcRCpAg.js → resource-unavailable-BTNhcOHF.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-DS4fVFbc.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-9o3Wfji1.js → runtime-tools-api-BDTUD8Rj.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BGiXeHF5.js → runtime-tools-settings-panel-CYEzIrDf.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BKeP5G7b.js → schema-form-C-jw6Hid.js} +1 -1
- package/dist/gateway/static/root/assets/{secret-input-BQvFXqzz.js → secret-input-Dryrns2s.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-BEnNx0u7.js → service-recommendation-list-CfeYH6lK.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bs3r_d2_.js → session-api-DVXLCZX2.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DjRWxXJG.js +23 -0
- package/dist/gateway/static/root/assets/sessions-page-C8gwrFHR.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BMHe9uwy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CURRjsLK.js → settings-advanced-section-BmrbHgQa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-CiRpsdTJ.js → settings-mode-store-Bk_hzwPK.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-GtsbT6as.js → settings-page-DCQnHCNN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-DBL0_u0Z.js → settings-page-header-BLKI3_9N.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-IAvpbz4A.js → settings-page-layout-BqBVrkC9.js} +1 -1
- package/dist/gateway/static/root/assets/setup-interaction-page-B9ACeAvO.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-DEefuWo3.js +1 -0
- package/dist/gateway/static/root/assets/share-link-dialog-C2LyeNzj.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-L9KYu8M7.js → share-preview-page-BFwEr7Ws.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-D8Q-m46d.js → shares-api-CTFkLQxq.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CpK3yhtc.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-uKU4sRiv.js → skill-api-DpicfA6o.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-BzKzG-xG.js → skill-list-api-B8fegRLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DkUXekcd.js → skill-reload-api-VmC8ySUy.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-BIWXS6Ki.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CsvcFoaJ.js → system-settings-panel-BmoA92oX.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-L5RIelv0.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-B8xUiwW3.js → task-result-evidence-BV-6hBVU.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DJVC7HqA.js → terminal-panel-store-BGdKE9hU.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-Dlnmgryi.js → theme-store-Dvv79Wb2.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-B4uA4Pnz.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-BB7u79ID.js → tunnel-api-BurZtvqx.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-C4bblRnQ.js → understanding-activity-store-C1cLL8zq.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BvCj9-Ue.js → understanding-refresh-store-C3Lr_pjY.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Cv4Je5XJ.js → usage-page-C91ZzLm9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-YHxQ-UZg.js → use-autosave-zkzRuUtx.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CoiQAgjo.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DFzy6iVy.js +2 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-D2Un8G1L.js → use-personal-profile-BB10h9ED.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-BQEiJzK7.js → use-workspace-tree-sF5DcONt.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-WFnD5utO.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DCM69u8Y.js → voice-api-key-field-Bqa4PeZx.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CrULrSKC.js → voice-config-api-LNO2xXHk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-DFMNIyy4.js → voice-input-shortcut-events-AzfhxBX7.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cb8i6dLb.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CVe9UmFl.js → work-discovery-overlay-CdQUiV-a.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CtqkRMN5.js → work-discovery-page-HcUloXxf.js} +1 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-Dv1HUipe.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-api-tbifz2zY.js → workspace-api-Am2ee4R6.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CqHcVFhS.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BubQwQwU.js → workspace-file-preview-dialog-z5Q00v92.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-DZk3MBSa.js → workspace-open-location-menu-4ONYaGy0.js} +1 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-DimGN59n.js +1 -0
- package/dist/gateway/static/root/index.html +99 -97
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +8 -0
- package/dist/packages/gateway-contract/src/capabilities.js +7 -3
- package/dist/packages/gateway-contract/src/home.js +12 -2
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +1 -0
- package/dist/src/agent/background-review/prompts.js +11 -6
- package/dist/src/agent/background-review/run-background-review.js +12 -3
- package/dist/src/agent/child-agent-factory.js +1 -1
- package/dist/src/agent/context/execution-context.js +3 -1
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/configuration-capability-correction.d.ts +3 -0
- package/dist/src/agent/embedded/configuration-capability-correction.js +14 -0
- package/dist/src/agent/embedded/run-for-session.js +20 -5
- package/dist/src/agent/embedded/run-turn.js +25 -2
- package/dist/src/agent/embedded/session-runner.js +10 -3
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +4 -1
- package/dist/src/agent/independent-execution.js +1 -1
- package/dist/src/agent/mcp/config.js +1 -1
- package/dist/src/agent/mcp/connection-drafts.d.ts +5 -2
- package/dist/src/agent/mcp/connection-drafts.js +6 -4
- package/dist/src/agent/mcp/connection-setup.d.ts +15 -1
- package/dist/src/agent/mcp/connection-setup.js +223 -78
- package/dist/src/agent/mcp/continuation-guard.d.ts +3 -0
- package/dist/src/agent/mcp/continuation-guard.js +54 -0
- package/dist/src/agent/mcp/continuation-input.d.ts +4 -0
- package/dist/src/agent/mcp/continuation-input.js +13 -0
- package/dist/src/agent/mcp/conversation-setup.d.ts +282 -0
- package/dist/src/agent/mcp/conversation-setup.js +856 -0
- package/dist/src/agent/mcp/discovery.d.ts +102 -0
- package/dist/src/agent/mcp/discovery.js +219 -0
- package/dist/src/agent/mcp/native-mcp.d.ts +1 -0
- package/dist/src/agent/mcp/native-mcp.js +8 -1
- package/dist/src/agent/mcp/setup-plan.d.ts +76 -0
- package/dist/src/agent/mcp/setup-plan.js +93 -0
- package/dist/src/agent/mcp/tool-catalog.d.ts +7 -0
- package/dist/src/agent/mcp/tool-catalog.js +26 -3
- package/dist/src/agent/mcp/transport.d.ts +20 -0
- package/dist/src/agent/mcp/transport.js +188 -0
- package/dist/src/agent/mcp/weixin-setup-scope.d.ts +12 -0
- package/dist/src/agent/mcp/weixin-setup-scope.js +43 -0
- package/dist/src/agent/orchestration/delegation-scope.d.ts +2 -1
- package/dist/src/agent/prompt/conversational-configuration-guide.js +2 -1
- package/dist/src/agent/prompt/sections/tooling.js +3 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +3 -2
- package/dist/src/agent/service/process-direct-streaming.js +4 -3
- package/dist/src/agent/service.d.ts +2 -0
- package/dist/src/agent/service.js +15 -1
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +6 -4
- package/dist/src/agent/tool-manuals/xopc-configuration.js +125 -8
- package/dist/src/agent/tools/automation-tool.d.ts +9 -1
- package/dist/src/agent/tools/automation-tool.js +34 -5
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -0
- package/dist/src/agent/tools/factory.js +35 -24
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +5 -4
- package/dist/src/agent/tools/mcp-setup-tool.d.ts +9 -0
- package/dist/src/agent/tools/mcp-setup-tool.js +36 -0
- package/dist/src/agent/tools/personal-task-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/skill-install-tool.js +56 -1
- package/dist/src/agent/tools/skill-manage-tool.d.ts +4 -0
- package/dist/src/agent/tools/skill-manage-tool.js +74 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/tool-manual-tool.d.ts +1 -1
- package/dist/src/agent/tools/tool-manual-tool.js +3 -1
- package/dist/src/agent/tools/toolExposure.js +2 -0
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +5 -2
- package/dist/src/agent/tools/xopc-use-tool.js +81 -10
- package/dist/src/agent-catalog/service.d.ts +1 -1
- package/dist/src/agent-catalog/service.js +2 -1
- package/dist/src/automations/api/routes.js +13 -5
- package/dist/src/automations/capabilities/drafts.js +5 -2
- package/dist/src/automations/capabilities/read.js +49 -10
- package/dist/src/automations/capabilities/write.d.ts +111 -52
- package/dist/src/automations/capabilities/write.js +44 -10
- package/dist/src/automations/delivery/delivery-router.d.ts +1 -0
- package/dist/src/automations/delivery/delivery-router.js +7 -1
- package/dist/src/automations/domain/types.d.ts +10 -0
- package/dist/src/automations/domain/validation.d.ts +24 -0
- package/dist/src/automations/domain/validation.js +7 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +6 -0
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/mcp-source.d.ts +60 -0
- package/dist/src/automations/mcp-source.js +173 -0
- package/dist/src/automations/service/action-executor.js +15 -1
- package/dist/src/automations/service/automation-service.d.ts +12 -0
- package/dist/src/automations/service/automation-service.js +61 -4
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-run-repository.d.ts +11 -2
- package/dist/src/automations/storage/automation-run-repository.js +28 -24
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/browser/setup/repository.d.ts +1 -0
- package/dist/src/browser/setup/repository.js +7 -1
- package/dist/src/browser/setup/service.d.ts +3 -0
- package/dist/src/browser/setup/service.js +41 -18
- package/dist/src/browser/setup/types.d.ts +1 -0
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.d.ts +1 -0
- package/dist/src/channels/outbound-sender.d.ts +1 -0
- package/dist/src/channels/outbound-sender.js +3 -0
- package/dist/src/channels/pairing/pairing-service.js +1 -1
- package/dist/src/channels/weixin/account-identity.d.ts +2 -0
- package/dist/src/channels/weixin/account-identity.js +15 -0
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/channels.js +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/config/schema.d.ts +3 -0
- package/dist/src/config/schema.js +3 -2
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.d.ts +2 -1
- package/dist/src/extensions/agent-plugins/setup.js +4 -3
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/channels.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +39 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +33 -9
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/provider-setup.js +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +22 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -5
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +3 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +2 -1
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/sessions-api.js +2 -1
- package/dist/src/gateway/service.d.ts +5 -1
- package/dist/src/gateway/service.js +97 -22
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/session-reset-service.d.ts +1 -0
- package/dist/src/gateway/session-reset-service.js +15 -2
- package/dist/src/home-intelligence/evidence-presentation.d.ts +3 -0
- package/dist/src/home-intelligence/evidence-presentation.js +30 -0
- package/dist/src/home-intelligence/generator.d.ts +8 -0
- package/dist/src/home-intelligence/generator.js +15 -4
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/home-intelligence/policy.js +3 -0
- package/dist/src/memory-learning/repository.d.ts +6 -1
- package/dist/src/memory-learning/repository.js +10 -5
- package/dist/src/memory-learning/service.js +23 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/request-service.js +3 -3
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/setup/service.d.ts +14 -4
- package/dist/src/phone/setup/service.js +106 -28
- package/dist/src/process/mcp-stdio-supervisor.d.ts +1 -0
- package/dist/src/process/mcp-stdio-supervisor.js +14 -0
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.d.ts +2 -0
- package/dist/src/runtime-tools/phone-dependencies.js +10 -0
- package/dist/src/share/note-share-service.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +3 -3
- package/dist/src/tasks/task-application-service.js +2 -2
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-criterion-review-repository.js +1 -1
- package/dist/src/tasks/task-handoff.js +1 -1
- package/dist/src/tasks/task-research-result.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/extraction/registry.js +2 -2
- package/dist/src/user-model/capture/executor.d.ts +1 -0
- package/dist/src/user-model/capture/executor.js +6 -6
- package/dist/src/user-model/capture/semantic.d.ts +3 -0
- package/dist/src/user-model/capture/semantic.js +14 -4
- package/package.json +3 -1
- package/skills/tools/configure-xopc/SKILL.md +10 -3
- package/skills/tools/configure-xopc/references/browser/chrome-extension.md +4 -1
- package/skills/tools/configure-xopc/references/browser/overview.md +2 -2
- package/skills/tools/configure-xopc/references/phone/aliyun.md +3 -2
- package/skills/tools/configure-xopc/references/phone/overview.md +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Dne9A10p.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BoHL-b1o.js +0 -1
- package/dist/gateway/static/root/assets/agents-CIiIlVBp.js +0 -77
- package/dist/gateway/static/root/assets/app-link-1j40sJ-z.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-vgS1CHDj.js +0 -1
- package/dist/gateway/static/root/assets/attachment-load-qjPpQzYY.js +0 -1
- package/dist/gateway/static/root/assets/automation-api-hRsGx-qe.js +0 -1
- package/dist/gateway/static/root/assets/automation-task-card-MnzgyTVA.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-C3xZLafX.js +0 -9
- package/dist/gateway/static/root/assets/browser-settings-page-BD1uF_Nb.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-BGE6hiUE.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-Bda4mSdf.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B2B7no22.js +0 -8
- package/dist/gateway/static/root/assets/channels-NtsjZThx.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-BnOCCAXG.js +0 -72
- package/dist/gateway/static/root/assets/composer-payload-handoff-CQc-VTaL.js +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-XGclfBqe.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-CcXe9kz5.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Ci0L2How.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-cbC6-2Ya.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-_3BJFWVQ.js +0 -1
- package/dist/gateway/static/root/assets/dist-CaUuvp8-.js +0 -1
- package/dist/gateway/static/root/assets/dist-D3lWNSe7.js +0 -1
- package/dist/gateway/static/root/assets/dist-DfWfZ9iu.js +0 -1
- package/dist/gateway/static/root/assets/dist-DusecO_p.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BHBOPF_q.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D6pCBY1V.js +0 -2
- package/dist/gateway/static/root/assets/index-Cc41XQid.css +0 -1
- package/dist/gateway/static/root/assets/index-CnOYR6jq.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-BuNXON0P.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CP-BkbB6.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-I-pXv4ML.js +0 -1
- package/dist/gateway/static/root/assets/messages-ByFlEbsu.js +0 -3
- package/dist/gateway/static/root/assets/model-selector-CXcxc30J.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CbpLXAVh.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-cLGiF8oU.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-Du44NIEJ.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CXR1Gy0x.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-vg65qilc.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-B3Hn2cbx.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-Ch-ZMyTu.js +0 -7
- package/dist/gateway/static/root/assets/projects-page-B7cetxao.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-Zc5Z3fNv.js +0 -2
- package/dist/gateway/static/root/assets/send-1f1Ntw6E.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-ChUtTAoG.js +0 -23
- package/dist/gateway/static/root/assets/sessions-page-Bt52kBvJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BI4DMz4_.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-A6uMpGRy.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-D1otGSXD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bmfadz8A.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BZklXTX9.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-SjZGW1Dx.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-MvG4SH64.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-vDdxHtUb.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-Ce2mgYme.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DRSsn4EV.js +0 -2
- package/dist/gateway/static/root/assets/voice-transcribe-api-Bbyj0yGR.js +0 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-CDZ1xh3o.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-4cZ26iaD.js +0 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-CIavPUr3.js +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getBrowserTabBinding } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
4
|
+
import { getSessionMetadata, init_session_read_repository } from "../../storage/sqlite/session-read-repository.js";
|
|
4
5
|
import "../../../packages/browser-control-contract/src/index.js";
|
|
5
|
-
import { createBrowserSetup, findBrowserSetup, readBrowserSetup, saveBrowserSetup } from "./repository.js";
|
|
6
|
+
import { createBrowserSetup, findBrowserSetup, listConversationBrowserSetups, readBrowserSetup, saveBrowserSetup } from "./repository.js";
|
|
6
7
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
8
|
//#region src/browser/setup/service.ts
|
|
9
|
+
init_session_read_repository();
|
|
8
10
|
init_logger();
|
|
9
11
|
const log = createLogger("BrowserSetup");
|
|
10
12
|
const VERSION = "1";
|
|
@@ -20,9 +22,21 @@ const browserConfigRevision = (config) => createHash("sha256").update(JSON.strin
|
|
|
20
22
|
/** Setup writes use host-authorized interactive turns or existing owner grants. */
|
|
21
23
|
var BrowserSetupService = class {
|
|
22
24
|
preparing = /* @__PURE__ */ new Set();
|
|
25
|
+
preparationSettled = /* @__PURE__ */ new Map();
|
|
23
26
|
constructor(deps) {
|
|
24
27
|
this.deps = deps;
|
|
25
28
|
}
|
|
29
|
+
scopeCurrent(setup) {
|
|
30
|
+
const metadata = getSessionMetadata(setup.conversationId);
|
|
31
|
+
return setup.transcriptId ? metadata?.transcriptId === setup.transcriptId && metadata.agentId === setup.agentId : !metadata;
|
|
32
|
+
}
|
|
33
|
+
async cancelConversation(conversationId) {
|
|
34
|
+
const setups = listConversationBrowserSetups(conversationId).map((setup) => this.cancel(setup));
|
|
35
|
+
await Promise.all(setups.map(async (setup) => {
|
|
36
|
+
await this.preparationSettled.get(setup.id);
|
|
37
|
+
await this.release(readBrowserSetup(setup.id));
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
26
40
|
policyRevision(agentId) {
|
|
27
41
|
return this.deps.policyRevision?.(agentId) ?? String(this.deps.canUseBrowser(agentId));
|
|
28
42
|
}
|
|
@@ -47,13 +61,14 @@ var BrowserSetupService = class {
|
|
|
47
61
|
};
|
|
48
62
|
const attempt = setup.attempt ? (({ observation: _observation, ...summary }) => summary)(setup.attempt) : void 0;
|
|
49
63
|
const endpoint = setup.attempt ? this.endpoints().find((e) => e.endpointId === setup.attempt.endpointId) : void 0;
|
|
50
|
-
const changed = setup.configRevision !== browserConfigRevision(this.deps.getConfig()) || Boolean(setup.attempt && (setup.attempt.policyRevision !== this.policyRevision(setup.agentId) || !this.deps.canUseBrowser(setup.agentId) || endpoint && (endpoint.principalId !== setup.attempt.principalId || endpoint.appVersion !== setup.attempt.appVersion)));
|
|
64
|
+
const changed = !this.scopeCurrent(setup) || setup.configRevision !== browserConfigRevision(this.deps.getConfig()) || Boolean(setup.attempt && (setup.attempt.policyRevision !== this.policyRevision(setup.agentId) || !this.deps.canUseBrowser(setup.agentId) || endpoint && (endpoint.principalId !== setup.attempt.principalId || endpoint.appVersion !== setup.attempt.appVersion)));
|
|
51
65
|
return {
|
|
52
66
|
...setup,
|
|
53
67
|
attempt: setup.attempt ? attempt : void 0,
|
|
54
68
|
sceneId: "browser",
|
|
55
69
|
skillName: "configure-xopc",
|
|
56
70
|
resourceVersion: VERSION,
|
|
71
|
+
interactionPath: `/configuration/browser/${setup.id}?conversationId=${encodeURIComponent(setup.conversationId)}`,
|
|
57
72
|
stale: changed,
|
|
58
73
|
toolPermission: this.deps.canUseBrowser(setup.agentId) ? "allowed" : "denied",
|
|
59
74
|
currentDriverKind: this.deps.getConfig().browser.driver.kind,
|
|
@@ -141,6 +156,7 @@ var BrowserSetupService = class {
|
|
|
141
156
|
"open",
|
|
142
157
|
"begin_verification"
|
|
143
158
|
].includes(command)) {
|
|
159
|
+
if (!this.scopeCurrent(setup)) throw new Error("SETUP_SCOPE_CHANGED: Start a new setup in the current conversation.");
|
|
144
160
|
if (!context.canConfigure) throw new Error("SETUP_INTERACTIVE_REQUIRED: Continue in an authorized interactive conversation.");
|
|
145
161
|
if (!Number.isInteger(args.expectedRevision) || args.expectedRevision !== setup.revision) throw new Error("SETUP_CONFLICT: Read the current progress.");
|
|
146
162
|
if (!this.deps.canUseBrowser(context.agentId)) throw new Error("AGENT_BROWSER_DENIED: Review this Agent tool permission in settings.");
|
|
@@ -173,7 +189,7 @@ var BrowserSetupService = class {
|
|
|
173
189
|
}
|
|
174
190
|
approve(setup, principalId, revision) {
|
|
175
191
|
this.revision(setup, revision);
|
|
176
|
-
if (setup.state === "cancelled" || setup.state === "verifying" || setup.state === "completed") throw new Error("SETUP_STATE_CHANGED");
|
|
192
|
+
if (!this.scopeCurrent(setup) || setup.state === "cancelled" || setup.state === "verifying" || setup.state === "completed") throw new Error("SETUP_STATE_CHANGED");
|
|
177
193
|
if (setup.configRevision !== browserConfigRevision(this.deps.getConfig())) throw new Error("CONFIG_CHANGED: Review the current configuration before approving.");
|
|
178
194
|
return saveBrowserSetup({
|
|
179
195
|
...setup,
|
|
@@ -185,7 +201,7 @@ var BrowserSetupService = class {
|
|
|
185
201
|
if (setup.revision !== revision) throw new Error("SETUP_CONFLICT: Read the current progress.");
|
|
186
202
|
}
|
|
187
203
|
async prepare(setup) {
|
|
188
|
-
if (!setup.approvedBy || setup.state === "cancelled" || setup.state === "verifying" || setup.state === "completed") throw new Error("OWNER_APPROVAL_REQUIRED");
|
|
204
|
+
if (!this.scopeCurrent(setup) || !setup.approvedBy || setup.state === "cancelled" || setup.state === "verifying" || setup.state === "completed") throw new Error("OWNER_APPROVAL_REQUIRED");
|
|
189
205
|
if (setup.attempt && !setup.attempt.released) throw new Error("CONTROL_RELEASE_REQUIRED");
|
|
190
206
|
if (this.preparing.has(setup.id)) return readBrowserSetup(setup.id);
|
|
191
207
|
if (["waiting_extension", "ready_for_verification"].includes(setup.state) && !setup.error) return this.recheck(setup);
|
|
@@ -196,17 +212,22 @@ var BrowserSetupService = class {
|
|
|
196
212
|
state: "needs_attention",
|
|
197
213
|
error: "BROWSER_BUSY: Release existing browser sessions and wait for other runs before switching the shared driver."
|
|
198
214
|
}, setup.revision);
|
|
215
|
+
let settled;
|
|
216
|
+
this.preparationSettled.set(setup.id, new Promise((resolve) => {
|
|
217
|
+
settled = resolve;
|
|
218
|
+
}));
|
|
199
219
|
this.preparing.add(setup.id);
|
|
200
|
-
let current =
|
|
201
|
-
...setup,
|
|
202
|
-
state: "preparing",
|
|
203
|
-
error: void 0,
|
|
204
|
-
operation: {
|
|
205
|
-
key: setup.operation?.key ?? randomUUID(),
|
|
206
|
-
startedAt: Date.now()
|
|
207
|
-
}
|
|
208
|
-
}, setup.revision);
|
|
220
|
+
let current = setup;
|
|
209
221
|
try {
|
|
222
|
+
current = saveBrowserSetup({
|
|
223
|
+
...setup,
|
|
224
|
+
state: "preparing",
|
|
225
|
+
error: void 0,
|
|
226
|
+
operation: {
|
|
227
|
+
key: setup.operation?.key ?? randomUUID(),
|
|
228
|
+
startedAt: Date.now()
|
|
229
|
+
}
|
|
230
|
+
}, setup.revision);
|
|
210
231
|
const next = structuredClone(config);
|
|
211
232
|
next.browser.enabled = true;
|
|
212
233
|
next.browser.driver = { kind: "extension" };
|
|
@@ -243,6 +264,8 @@ var BrowserSetupService = class {
|
|
|
243
264
|
}, current.revision);
|
|
244
265
|
} finally {
|
|
245
266
|
this.preparing.delete(setup.id);
|
|
267
|
+
this.preparationSettled.delete(setup.id);
|
|
268
|
+
settled();
|
|
246
269
|
}
|
|
247
270
|
}
|
|
248
271
|
async recheck(setup) {
|
|
@@ -266,12 +289,12 @@ var BrowserSetupService = class {
|
|
|
266
289
|
}, setup.revision);
|
|
267
290
|
}
|
|
268
291
|
async open(setup, action) {
|
|
269
|
-
if (!setup.approvedBy || setup.state === "cancelled") throw new Error("OWNER_APPROVAL_REQUIRED");
|
|
292
|
+
if (!this.scopeCurrent(setup) || !setup.approvedBy || setup.state === "cancelled") throw new Error("OWNER_APPROVAL_REQUIRED");
|
|
270
293
|
return this.deps.open(action);
|
|
271
294
|
}
|
|
272
295
|
begin(setup, endpointId, origin, revision) {
|
|
273
296
|
this.revision(setup, revision);
|
|
274
|
-
if (!setup.approvedBy || setup.state !== "ready_for_verification") throw new Error("SETUP_NOT_READY");
|
|
297
|
+
if (!this.scopeCurrent(setup) || !setup.approvedBy || setup.state !== "ready_for_verification") throw new Error("SETUP_NOT_READY");
|
|
275
298
|
if (setup.configRevision !== browserConfigRevision(this.deps.getConfig())) throw new Error("CONFIG_CHANGED");
|
|
276
299
|
if (setup.attempt && !setup.attempt.released) throw new Error("CONTROL_RELEASE_REQUIRED");
|
|
277
300
|
if (!this.deps.canUseBrowser(setup.agentId)) throw new Error("AGENT_BROWSER_DENIED: Enable browser_use for this Agent and start a refreshed turn.");
|
|
@@ -331,7 +354,7 @@ var BrowserSetupService = class {
|
|
|
331
354
|
const [prefix, setupId, attemptId] = taskKey.split(":");
|
|
332
355
|
if (prefix !== "browser-setup" || !setupId) return false;
|
|
333
356
|
const setup = readBrowserSetup(setupId);
|
|
334
|
-
return Boolean(setup
|
|
357
|
+
return Boolean(setup && this.scopeCurrent(setup) && setup.approvedBy && setup.state === "verifying" && setup.attempt?.id === attemptId && setup.attempt.fixtureUrl === url && Date.now() <= setup.attempt.expiresAt && setup.configRevision === browserConfigRevision(this.deps.getConfig()));
|
|
335
358
|
}
|
|
336
359
|
/** Called only by the real Agent browser tool, before its normal runtime/policy path. */
|
|
337
360
|
beforeAction(conversationId, agentId, input) {
|
|
@@ -344,7 +367,7 @@ var BrowserSetupService = class {
|
|
|
344
367
|
].includes(setup.state)) return void 0;
|
|
345
368
|
const a = setup.attempt;
|
|
346
369
|
if (!(input.action === "close")) {
|
|
347
|
-
if (setup.state !== "verifying") throw new Error("VERIFICATION_STOPPED: Close the verification session first.");
|
|
370
|
+
if (!this.scopeCurrent(setup) || setup.state !== "verifying") throw new Error("VERIFICATION_STOPPED: Close the verification session first.");
|
|
348
371
|
if (Date.now() > a.expiresAt || a.actions >= MAX_ACTIONS) throw new Error("VERIFICATION_BUDGET_EXCEEDED: Close the verification session.");
|
|
349
372
|
if (setup.configRevision !== browserConfigRevision(this.deps.getConfig()) || a.policyRevision !== this.policyRevision(setup.agentId)) throw new Error("CONFIG_CHANGED: Close the verification session.");
|
|
350
373
|
const endpoint = this.endpoints().find((e) => e.endpointId === a.endpointId);
|
|
@@ -381,7 +404,7 @@ var BrowserSetupService = class {
|
|
|
381
404
|
if (input.action === "close" && result.ok && result.receipt.action === "close" && result.receipt.verified) {
|
|
382
405
|
a.released = true;
|
|
383
406
|
delete a.observation;
|
|
384
|
-
const complete = setup.state === "verifying" && setup.configRevision === browserConfigRevision(this.deps.getConfig()) && Date.now() <= a.expiresAt && a.policyRevision === this.policyRevision(setup.agentId) && this.deps.canUseBrowser(setup.agentId) && a.read && a.clicked && a.filled;
|
|
407
|
+
const complete = this.scopeCurrent(setup) && setup.state === "verifying" && setup.configRevision === browserConfigRevision(this.deps.getConfig()) && Date.now() <= a.expiresAt && a.policyRevision === this.policyRevision(setup.agentId) && this.deps.canUseBrowser(setup.agentId) && a.read && a.clicked && a.filled;
|
|
385
408
|
return saveBrowserSetup({
|
|
386
409
|
...setup,
|
|
387
410
|
attempt: a,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
4
3
|
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
5
4
|
import { isSTTAvailable } from "../../voice/stt/availability.js";
|
|
6
5
|
import "../../voice/stt/index.js";
|
|
6
|
+
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
7
7
|
//#region src/channels/attachments/voice-stt-webchat.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const STT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
|
|
2
|
+
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
2
3
|
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
3
4
|
import { findFenceSpanAt, isSafeFenceBreak, parseFenceSpans } from "../markdown/fences.js";
|
|
4
5
|
import { chunkText } from "../markdown/chunk.js";
|
|
5
6
|
import { chunkMarkdownIR, markdownToIR, markdownToIRWithMeta } from "../markdown/ir.js";
|
|
6
|
-
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
7
7
|
import { renderMarkdownWithMarkers } from "../markdown/render.js";
|
|
8
8
|
import { convertMarkdownTables } from "../markdown/tables.js";
|
|
9
9
|
import { buildCodeSpanIndex, createInlineCodeState } from "../markdown/code-spans.js";
|
|
@@ -50,6 +50,7 @@ export declare class ChannelManager {
|
|
|
50
50
|
listDeferConnectChannelIds(cfg: Config): string[];
|
|
51
51
|
send(msg: OutboundMessage, options?: {
|
|
52
52
|
skipPersist?: boolean;
|
|
53
|
+
requireDelivery?: boolean;
|
|
53
54
|
}): Promise<void>;
|
|
54
55
|
replayPendingOutboundMessages(): Promise<void>;
|
|
55
56
|
startStream(channel: string, chatId: string, accountId?: string, opts?: {
|
|
@@ -51,6 +51,7 @@ var ChannelOutboundSender = class {
|
|
|
51
51
|
if (this.hooks) {
|
|
52
52
|
const hookResult = await this.hooks.runMessageSending(processedMsg.chat_id, processedMsg.content ?? "", processedMsg.channel);
|
|
53
53
|
if (!hookResult.send) {
|
|
54
|
+
if (options?.requireDelivery) throw new Error("Channel delivery was blocked by policy.");
|
|
54
55
|
if (queueId) this.persistStore.ack(queueId);
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
@@ -66,6 +67,7 @@ var ChannelOutboundSender = class {
|
|
|
66
67
|
}
|
|
67
68
|
const plugin = this.opts.registry.get(processedMsg.channel);
|
|
68
69
|
if (!plugin?.outbound) {
|
|
70
|
+
if (options?.requireDelivery) throw new Error("The requested channel is unavailable.");
|
|
69
71
|
log.error({ channel: processedMsg.channel }, "Unknown channel or no outbound adapter");
|
|
70
72
|
if (queueId) this.persistStore.ack(queueId);
|
|
71
73
|
return;
|
|
@@ -79,6 +81,7 @@ var ChannelOutboundSender = class {
|
|
|
79
81
|
const err = result && !result.success ? result.error : void 0;
|
|
80
82
|
await this.hooks.runMessageSent(processedMsg.chat_id, processedMsg.content ?? "", result?.success ?? false, err, processedMsg.channel);
|
|
81
83
|
}
|
|
84
|
+
if (options?.requireDelivery && !result?.success) throw new Error("Channel delivery did not succeed.");
|
|
82
85
|
if (!result) {
|
|
83
86
|
if (queueId) this.persistStore.ack(queueId);
|
|
84
87
|
return;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { resolveDmPolicy } from "../security.js";
|
|
2
1
|
import { resolveStandardAllowFromPath, resolveStandardPairingPath } from "./paths.js";
|
|
3
2
|
import { readAllowFromIdsSync, removeAllowFromIdSync } from "./allow-from-file.js";
|
|
4
3
|
import "./pairing-constants.js";
|
|
5
4
|
import { PAIRING_PENDING_TTL_MS, approvePairingBySenderIdSync, approvePairingCodeSync, dismissPairingBySenderIdSync, listPendingPairingRequestsSync } from "./pairing-store.js";
|
|
6
5
|
import { broadcastPairingEvent } from "./pairing-events.js";
|
|
6
|
+
import { resolveDmPolicy } from "../security.js";
|
|
7
7
|
//#region src/channels/pairing/pairing-service.ts
|
|
8
8
|
const pairingResolvers = /* @__PURE__ */ new Map();
|
|
9
9
|
function registerPairingChannelResolver(channel, resolver) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { loadWeixinAccount } from "../../../extensions/weixin/src/auth/accounts.js";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
//#region src/channels/weixin/account-identity.ts
|
|
4
|
+
/** An opaque login revision; never expose the channel credential or silently rebind a recipient. */
|
|
5
|
+
function weixinAccountIdentityRevision(accountId) {
|
|
6
|
+
const account = loadWeixinAccount(accountId);
|
|
7
|
+
if (!account?.token?.trim()) return;
|
|
8
|
+
return createHash("sha256").update(JSON.stringify([
|
|
9
|
+
account.userId ?? "",
|
|
10
|
+
account.token.trim(),
|
|
11
|
+
account.baseUrl?.trim() || "https://ilinkai.weixin.qq.com"
|
|
12
|
+
])).digest("hex");
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { weixinAccountIdentityRevision };
|
|
@@ -2,11 +2,11 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
5
|
+
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
5
6
|
import { commandRegistry } from "../registry.js";
|
|
6
7
|
import { parseConfigValue } from "../config-value.js";
|
|
7
8
|
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
8
9
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
9
|
-
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
10
10
|
//#region src/chat-commands/builtins/config.ts
|
|
11
11
|
init_schema();
|
|
12
12
|
init_paths();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildChannelCatalogForConfig } from "../../channels/catalog/channel-catalog-service.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
1
|
import { listChannelPairingState } from "../../channels/pairing/pairing-service.js";
|
|
4
2
|
import { approveChannelPairingFromCli } from "../../channels/pairing/approve-cli.js";
|
|
3
|
+
import { buildChannelCatalogForConfig } from "../../channels/catalog/channel-catalog-service.js";
|
|
4
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadConfig } from "../../../../config/loader.js";
|
|
2
1
|
import { collectPairingPendingIssues } from "../../../../channels/pairing/pairing-service.js";
|
|
2
|
+
import { loadConfig } from "../../../../config/loader.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
//#region src/cli/commands/doctor/checks/channel-pairing-pending.ts
|
|
5
5
|
function hasEnabledChannel(cfg) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveMcpSetupConfig } from "../../agent/mcp/effective-server.js";
|
|
1
2
|
import { getNativePiAgentDir, prepareNativeMcpConfig } from "../../agent/mcp/native-mcp.js";
|
|
2
3
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { resolveMcpSetupConfig } from "../../agent/mcp/effective-server.js";
|
|
4
4
|
import { register } from "../registry.js";
|
|
5
5
|
import { createGatewayHttpClientFromConfig } from "../../mcp/gateway-http-client.js";
|
|
6
6
|
import { createCapabilityMcpServer } from "../../mcp/capability-server.js";
|
|
@@ -1168,6 +1168,7 @@ export declare const McpServerSchema: z.ZodObject<{
|
|
|
1168
1168
|
http: "http";
|
|
1169
1169
|
stdio: "stdio";
|
|
1170
1170
|
"streamable-http": "streamable-http";
|
|
1171
|
+
sse: "sse";
|
|
1171
1172
|
}>>;
|
|
1172
1173
|
command: z.ZodOptional<z.ZodString>;
|
|
1173
1174
|
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1255,6 +1256,7 @@ export declare const McpConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1255
1256
|
http: "http";
|
|
1256
1257
|
stdio: "stdio";
|
|
1257
1258
|
"streamable-http": "streamable-http";
|
|
1259
|
+
sse: "sse";
|
|
1258
1260
|
}>>;
|
|
1259
1261
|
command: z.ZodOptional<z.ZodString>;
|
|
1260
1262
|
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1968,6 +1970,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1968
1970
|
http: "http";
|
|
1969
1971
|
stdio: "stdio";
|
|
1970
1972
|
"streamable-http": "streamable-http";
|
|
1973
|
+
sse: "sse";
|
|
1971
1974
|
}>>;
|
|
1972
1975
|
command: z.ZodOptional<z.ZodString>;
|
|
1973
1976
|
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -960,7 +960,8 @@ tts: TTSConfigSchema.optional() }).optional();
|
|
|
960
960
|
type: z.enum([
|
|
961
961
|
"stdio",
|
|
962
962
|
"http",
|
|
963
|
-
"streamable-http"
|
|
963
|
+
"streamable-http",
|
|
964
|
+
"sse"
|
|
964
965
|
]).optional(),
|
|
965
966
|
command: z.string().min(1).optional(),
|
|
966
967
|
args: z.array(z.string()).optional(),
|
|
@@ -988,7 +989,7 @@ tts: TTSConfigSchema.optional() }).optional();
|
|
|
988
989
|
code: "custom",
|
|
989
990
|
message: "stdio requires command"
|
|
990
991
|
});
|
|
991
|
-
if ((value.type === "http" || value.type === "streamable-http") && !value.url) ctx.addIssue({
|
|
992
|
+
if ((value.type === "http" || value.type === "streamable-http" || value.type === "sse") && !value.url) ctx.addIssue({
|
|
992
993
|
code: "custom",
|
|
993
994
|
message: "HTTP requires url"
|
|
994
995
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { pluginName, pluginServerId } from "./validation.js";
|
|
3
3
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
|
-
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
5
4
|
import { pluginCredentialProviderPrefix } from "./auth.js";
|
|
6
5
|
import { pluginOAuthCredentialId } from "./mcp-adapter.js";
|
|
6
|
+
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
7
7
|
import { getNativePiAgentDir } from "../../agent/mcp/native-mcp.js";
|
|
8
8
|
import { join } from "node:path";
|
|
9
9
|
import { existsSync, rmSync } from "node:fs";
|
|
@@ -31,6 +31,7 @@ declare const schema: z.ZodObject<{
|
|
|
31
31
|
connected: "connected";
|
|
32
32
|
oauth_required: "oauth_required";
|
|
33
33
|
token_required: "token_required";
|
|
34
|
+
auth_unknown: "auth_unknown";
|
|
34
35
|
}>;
|
|
35
36
|
toolCount: z.ZodOptional<z.ZodNumber>;
|
|
36
37
|
authorizationId: z.ZodOptional<z.ZodString>;
|
|
@@ -118,7 +119,7 @@ export declare class PluginSetupService {
|
|
|
118
119
|
id: string;
|
|
119
120
|
name: string;
|
|
120
121
|
}>>>;
|
|
121
|
-
authorization(id: string, owner: string, server: string, config: Config): Promise<import("
|
|
122
|
+
authorization(id: string, owner: string, server: string, config: Config): Promise<import("../../agent/mcp/connection-setup.js").McpAuthorization | import("./cli-authorization.js").PluginCliAuthorization>;
|
|
122
123
|
redirect(id: string, owner: string, server: string, url: string, config: Config): boolean;
|
|
123
124
|
private config;
|
|
124
125
|
startPrepare(id: string, owner: string, revision: number, config: Config, workspace: string, idempotencyKey?: string): PluginSetupJob;
|
|
@@ -5,14 +5,14 @@ import { pluginAuthorizations, pluginPermissionIssueSchema } from "./setup-contr
|
|
|
5
5
|
import { preparePluginResources } from "./resources.js";
|
|
6
6
|
import { pluginName, pluginServerId } from "./validation.js";
|
|
7
7
|
import { AgentPluginStore } from "./store.js";
|
|
8
|
-
import { connectionFingerprint, matchingReusableConnection } from "./connection-reuse.js";
|
|
9
|
-
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
10
8
|
import { readPluginAuthBinding, savePluginAuthBinding, savePluginOAuthReference } from "./auth.js";
|
|
11
9
|
import { pluginConfigMissing, readPluginUserConfig, savePluginUserConfig } from "./user-config.js";
|
|
12
10
|
import { materializePluginServers } from "./mcp-adapter.js";
|
|
11
|
+
import { connectionFingerprint, matchingReusableConnection } from "./connection-reuse.js";
|
|
12
|
+
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
13
13
|
import { getNativePiAgentDir } from "../../agent/mcp/native-mcp.js";
|
|
14
|
-
import { cancelPluginCliAuthorizations, getPluginCliAuthorization, inspectPluginCliAuthorization, startPluginCliAuthorization } from "./cli-authorization.js";
|
|
15
14
|
import { cancelMcpAuthorization, getMcpAuthorization, probeMcpConnection, startMcpAuthorization, submitMcpRedirect } from "../../agent/mcp/connection-setup.js";
|
|
15
|
+
import { cancelPluginCliAuthorizations, getPluginCliAuthorization, inspectPluginCliAuthorization, startPluginCliAuthorization } from "./cli-authorization.js";
|
|
16
16
|
import { join } from "node:path";
|
|
17
17
|
import { existsSync, readFileSync } from "node:fs";
|
|
18
18
|
import { randomUUID } from "node:crypto";
|
|
@@ -28,6 +28,7 @@ const connection = z.object({
|
|
|
28
28
|
"connected",
|
|
29
29
|
"oauth_required",
|
|
30
30
|
"token_required",
|
|
31
|
+
"auth_unknown",
|
|
31
32
|
"error",
|
|
32
33
|
"skipped"
|
|
33
34
|
]),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
4
|
-
import { registerMarketplaceAdapter, unregisterMarketplaceAdapter } from "../agent/skills/marketplace/registry.js";
|
|
5
4
|
import { registerMediaUnderstandingProvider } from "../media-understanding/registry.js";
|
|
5
|
+
import { registerMarketplaceAdapter, unregisterMarketplaceAdapter } from "../agent/skills/marketplace/registry.js";
|
|
6
6
|
import { registerSpeechProvider } from "../voice/tts/speech-registry.js";
|
|
7
7
|
import { HOOK_EXECUTION_MODES } from "./types/hooks.js";
|
|
8
8
|
import { commandRegistry } from "../chat-commands/registry.js";
|
|
@@ -277,4 +277,4 @@ export declare const GATEWAY_BUILTIN_TOOLS: readonly [{
|
|
|
277
277
|
readonly zh: "使用已验证的参数执行选定的外部工具。";
|
|
278
278
|
};
|
|
279
279
|
}];
|
|
280
|
-
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "xopc_tool_search" | "xopc_tool_describe" | "phone_use" | "skill_view" | "skills_list" | "image_generate" | "skill_manage" | "skills_marketplace_search" | "computer_use" | "send_message" | "text_to_speech" | "execute_code" | "send_media" | "create_share" | "memory_maintenance" | "
|
|
280
|
+
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "xopc_tool_search" | "xopc_tool_describe" | "phone_use" | "skill_view" | "skills_list" | "image_generate" | "skill_manage" | "skills_marketplace_search" | "computer_use" | "send_message" | "text_to_speech" | "execute_code" | "send_media" | "create_share" | "memory_maintenance" | "skill_install" | "delegate_task" | "create_desktop_pet")[];
|
|
@@ -3,8 +3,8 @@ import { AgentCatalogRepository, init_repository } from "../agent-catalog/reposi
|
|
|
3
3
|
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath } from "../agent/agent-scope.js";
|
|
4
4
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
|
-
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
6
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
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";
|
|
10
10
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
2
1
|
import { resolveReverseProxyPublicUrl } from "./public-url.js";
|
|
2
|
+
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
3
3
|
import { getTailscaleExposureState } from "./tailscale-lifecycle.js";
|
|
4
4
|
import crypto from "node:crypto";
|
|
5
5
|
//#region src/gateway/device-routes.ts
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { resolveAllowedBrowserOrigins, resolveGatewayServiceListenPort } from "../host.js";
|
|
4
4
|
import { listDevices } from "../../storage/sqlite/device-access-repository.js";
|
|
5
5
|
import { ENDPOINT_MAX_FILE_BYTES, init_src } from "../../../packages/endpoint-tools-protocol/src/index.js";
|
|
6
|
+
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
6
7
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
7
8
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
8
|
-
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
9
9
|
import { maxSessionInputRequestBodyBytes } from "../chat-limits.js";
|
|
10
10
|
import { BROWSER_EXTENSION_ID } from "../../browser/extension-identity.js";
|
|
11
11
|
import { isLoopbackIpAddress, isTrustedProxyAddress } from "../client-ip.js";
|
|
@@ -7,9 +7,9 @@ import { init_models_json, loadModelsJson } from "../../../config/models-json.js
|
|
|
7
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
8
8
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
9
9
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
10
|
+
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
10
11
|
import { resolveShareConfig } from "../../../share/share-config.js";
|
|
11
12
|
import { maskTunnelSecretForWeb } from "../../../tunnel/env.js";
|
|
12
|
-
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
13
13
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus } from "../../../channels/catalog/channel-catalog-service.js";
|
|
14
14
|
import { resolveSessionConfigForWeb, resolveUpdateConfigForWeb } from "../../../config/web-patch.js";
|
|
15
15
|
import { GENERIC_MASKED_SECRET, maskSecretLength } from "./mask-secret-length.js";
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { isLoopbackHost } from "../host.js";
|
|
4
4
|
import { getOAuthProviderInterfaces, init_registry } from "../../auth/oauth/registry.js";
|
|
5
5
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
|
-
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
7
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
8
7
|
import "../../capabilities/readiness/index.js";
|
|
8
|
+
import { resolveReverseProxyPublicUrl } from "../public-url.js";
|
|
9
9
|
import { applyXopcCloudCapabilitySetup } from "../xopc-cloud-capability-setup.js";
|
|
10
10
|
import { Hono } from "hono";
|
|
11
11
|
//#region src/gateway/hono/oauth-async.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus } from "../../../channels/catalog/channel-catalog-service.js";
|
|
2
1
|
import { approveChannelPairing, approveChannelPairingBySender, dismissChannelPairingPending, listChannelPairingState, listChannelPairingSummary, revokeChannelPairingPaired } from "../../../channels/pairing/pairing-service.js";
|
|
2
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus } from "../../../channels/catalog/channel-catalog-service.js";
|
|
3
3
|
//#region src/gateway/hono/routes/channels.ts
|
|
4
4
|
function channelIdParam(raw) {
|
|
5
5
|
return (raw ?? "").trim().toLowerCase();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { enumerateLanGatewayCandidates } from "../../host.js";
|
|
2
2
|
import { getTunnelService } from "../../../tunnel/tunnel-service.js";
|
|
3
|
+
import { withGatewayConfigWriteLock } from "../lib/config-write-lock.js";
|
|
3
4
|
import { VOICE_SETTING_SCOPES, voiceSettingsRevisions } from "../lib/voice-settings-revisions.js";
|
|
4
5
|
import { buildSafeWebConfigPayload } from "../lib/config-payload.js";
|
|
5
|
-
import { withGatewayConfigWriteLock } from "../lib/config-write-lock.js";
|
|
6
6
|
import { applyChannelsPatch } from "./config-patch/channels.js";
|
|
7
7
|
import { applyGatewayPatch } from "./config-patch/gateway.js";
|
|
8
8
|
import { applyMiscPatch, validateGatewayAfterPatch } from "./config-patch/misc.js";
|
|
@@ -465,7 +465,7 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
465
465
|
},
|
|
466
466
|
{
|
|
467
467
|
id: "mcp",
|
|
468
|
-
match: (path) => path === "/api/mcp/servers" || /^\/api\/mcp\/servers\/[^/]+$/.test(path) || path === "/api/mcp/drafts" || /^\/api\/mcp\/drafts\/[^/]+(?:\/(?:probe|commit|tools|auth(?:\/redirect)?))?$/.test(path) || /^\/api\/mcp\/servers\/[^/]+\/(tools|probe|auth)$/.test(path) || /^\/api\/mcp\/auth\/[^/]+(?:\/redirect)?$/.test(path),
|
|
468
|
+
match: (path) => path === "/api/mcp/servers" || /^\/api\/mcp\/servers\/[^/]+$/.test(path) || path === "/api/mcp/drafts" || /^\/api\/mcp\/drafts\/[^/]+(?:\/(?:probe|commit|tools|auth(?:\/redirect)?))?$/.test(path) || /^\/api\/mcp\/servers\/[^/]+\/(tools|probe|auth)$/.test(path) || /^\/api\/mcp\/auth\/[^/]+(?:\/redirect)?$/.test(path) || /^\/api\/mcp\/setup\/[^/]+$/.test(path) || /^\/api\/mcp\/setup\/conversations\/[^/]+$/.test(path),
|
|
469
469
|
load: async () => {
|
|
470
470
|
const { registerMcpRoutes } = await import("./mcp.js");
|
|
471
471
|
return { register: registerMcpRoutes };
|
|
@@ -1,14 +1,51 @@
|
|
|
1
1
|
import { getWorkspacePath } from "../../../config/workspace-path-helpers.js";
|
|
2
2
|
import { isManagedConnectorServer } from "../../../connectors/materialize.js";
|
|
3
|
-
import { loadMergedMcpConfig } from "../../../agent/mcp/config.js";
|
|
4
3
|
import { resolveMcpSetupConfig } from "../../../agent/mcp/effective-server.js";
|
|
4
|
+
import { loadMergedMcpConfig } from "../../../agent/mcp/config.js";
|
|
5
5
|
import { discoverMcpTools } from "../../../agent/mcp/tool-catalog.js";
|
|
6
6
|
import { cancelMcpAuthorization, getMcpAuthorization, probeMcpConnection, startMcpAuthorization, submitMcpRedirect } from "../../../agent/mcp/connection-setup.js";
|
|
7
|
-
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
8
7
|
import { McpConnectionDrafts, McpDraftError, mcpConfigRevision } from "../../../agent/mcp/connection-drafts.js";
|
|
9
8
|
import { withGatewayConfigWriteLock } from "../lib/config-write-lock.js";
|
|
9
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
10
10
|
//#region src/gateway/hono/routes/mcp.ts
|
|
11
11
|
function registerMcpRoutes(app, deps) {
|
|
12
|
+
const secureSetup = (handler) => async (c) => {
|
|
13
|
+
const principal = getGatewayPrincipal(c);
|
|
14
|
+
if (principal.kind !== "owner" || !principal.scopes.includes("gateway.admin")) return c.json({
|
|
15
|
+
ok: false,
|
|
16
|
+
error: "Owner administration is required."
|
|
17
|
+
}, 403);
|
|
18
|
+
c.header("Cache-Control", "no-store");
|
|
19
|
+
try {
|
|
20
|
+
return c.json({
|
|
21
|
+
ok: true,
|
|
22
|
+
payload: await handler(c)
|
|
23
|
+
});
|
|
24
|
+
} catch (error) {
|
|
25
|
+
return c.json({
|
|
26
|
+
ok: false,
|
|
27
|
+
error: error instanceof McpDraftError ? error.message : "MCP setup could not be completed."
|
|
28
|
+
}, error instanceof McpDraftError ? error.status : 500);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
app.get("/api/mcp/setup/conversations/:id", secureSetup(async (c) => deps.service.mcpSetup.currentForConversation(c.req.param("id"))));
|
|
32
|
+
app.get("/api/mcp/setup/:id", secureSetup((c) => deps.service.mcpSetup.interact(c.req.param("id"), "get")));
|
|
33
|
+
app.post("/api/mcp/setup/:id", deps.strictRateLimitMiddleware, secureSetup(async (c) => {
|
|
34
|
+
const body = await c.req.json().catch(() => null);
|
|
35
|
+
if (!body || ![
|
|
36
|
+
"advance",
|
|
37
|
+
"authorize",
|
|
38
|
+
"token",
|
|
39
|
+
"cancel",
|
|
40
|
+
"approve",
|
|
41
|
+
"retry_delivery"
|
|
42
|
+
].includes(body.action) || !Number.isSafeInteger(body.expectedVersion) || Object.keys(body).some((key) => ![
|
|
43
|
+
"action",
|
|
44
|
+
"value",
|
|
45
|
+
"expectedVersion"
|
|
46
|
+
].includes(key)) || body.value !== void 0 && (body.action !== "token" || typeof body.value !== "string" && (!body.value || typeof body.value !== "object" || Array.isArray(body.value) || Object.values(body.value).some((value) => typeof value !== "string")))) throw new McpDraftError(400, "Invalid MCP setup action.");
|
|
47
|
+
return deps.service.mcpSetup.interact(c.req.param("id"), body.action, body.value, body.expectedVersion, getGatewayPrincipal(c).principalId);
|
|
48
|
+
}));
|
|
12
49
|
const drafts = new McpConnectionDrafts({
|
|
13
50
|
readConfig: () => deps.service.currentConfig,
|
|
14
51
|
saveConfig: (config, expected) => deps.service.saveConfig(config, expected)
|
|
@@ -4,11 +4,11 @@ import { init_session_key, resolveConversationId } from "../../../routing/sessio
|
|
|
4
4
|
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
5
5
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
6
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
7
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
8
|
+
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
7
9
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
8
10
|
import { getShareStore } from "../../../share/share-store.js";
|
|
9
11
|
import { resolveShareUrl } from "../../../share/share-url.js";
|
|
10
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
11
|
-
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
12
12
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
13
13
|
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
14
14
|
import { NoteShareService, NoteShareVersionConflictError } from "../../../share/note-share-service.js";
|