@xopcai/xopc 0.0.425 → 0.0.427
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-CMw8qBuC.js → activity-store-D_DXNHba.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-JI0YWOIm.js → agent-avatar-dicebear-CjaQxFQt.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-YqmwzOSa.js → agent-avatar-display-6Z4m31Fz.js} +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D4ClP_DJ.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-m1A8wF9p.js +1 -0
- package/dist/gateway/static/root/assets/agents-B9slUA_1.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-DLnmdC1h.js → agents-admin-api-u5c3GREg.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Boc-CVh7.js → api-C3Tp9MkF.js} +1 -1
- package/dist/gateway/static/root/assets/{api-bL7sxjAF.js → api-CRT9ZyH0.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-jIG5i7KE.js → app-management-settings-panel-XqoIBF2H.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BnaQW9Xd.js → appearance-settings-9ZtqCASo.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-DUeu_7iC.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DjboG3kA.js → archive-plugin-BCQnOkV8.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-load-DrVGNxJm.js +1 -0
- package/dist/gateway/static/root/assets/{automation-api-CZqL9l_d.js → automation-api-hRsGx-qe.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-DRd-X_Ai.js → automation-result-state-CMfVTv_i.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-Bur78p68.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-HyBQIfmn.js → automations-page-DMIyWsP0.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DEkDjxeU.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Bg8ARZUH.js → binary-plugins-CIB5cbvQ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DKohqFAW.js → block-editor-CXdlNAmZ.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-automation-inputs-YeibTzw4.js → browser-automation-inputs-Fxo7HbK6.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BWNcbuz2.js → browser-automations-page-Dn3LN5wo.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-control-api-CDeuxy2x.js → browser-control-api-CbbPvhHR.js} +1 -1
- package/dist/gateway/static/root/assets/browser-settings-page-Cpm9fEPV.js +3 -0
- package/dist/gateway/static/root/assets/{button-CnRSIP6m.js → button-Cc4hUNTt.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BcQa8c9n.js → capabilities-BEvywfF9.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-Bo2qEJhH.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-BCzsIzvC.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Cr67ziwX.js +8 -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-CA5z5dGY.js +1 -0
- package/dist/gateway/static/root/assets/{chat-agents-api-B8JO6Tcj.js → chat-agents-api-D8YS5amE.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DRtuFfF1.js → chat-chart-block-B39npsXj.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-D92AWJbh.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dkqq5FSL.js → chat-terminal-dock-DjFnElAM.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-qujvNqkK.js → command-palette-api-Dijix7V6.js} +1 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-BQXlFKf4.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-8q4hRmoo.js → computer-settings-page-MkqyKyf3.js} +1 -1
- package/dist/gateway/static/root/assets/confirm-dialog-D7dQJytv.js +1 -0
- package/dist/gateway/static/root/assets/connected-providers-grid-BSvKP2u-.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-DQaTI21R.js → connector-service-page-DlIl9bLx.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-BjypBp2g.js → connectors-api-DEJU8mgn.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-Vx8-MY0Y.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-D_PSHGpe.js → date-picker-BIfjfOTM.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-XjPB8FJS.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-1Et9VqkM.js → desktop-pet-DFNehTtd.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-rADKU0FX.js → desktop-pet-narrative-ChwjpnsG.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-0fCGgaG7.js → desktop-pet-settings-BDjsFown.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-TTj_djD8.js → dev-view-store-CeZZLOc6.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DH_uJ698.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-C07a7wYX.js → directory-picker-path-field-DiZXY7jF.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-BFqKm9ky.js → discussion-annotation-sync-BXqNuZnx.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-DFaVlqas.js → extension-debug-page-myQqsol2.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-BfzPfXBq.js → extension-iframe-host-DaL-OcTw.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-ow0K1Y4_.js → extension-marketplace-api-DRBszrCR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CrDADV5W.js → extension-page-DvlGhZLa.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-mnRoa63o.js → extension-provider-fOi6V6Cr.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BLl02GFY.js → extension-settings-page-DOGlQpkx.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-TGdKqhCf.js → file-preview-surface-DfkXvFnc.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DfPQIHOL.js → gateway-config-swr-BOCt_zOo.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-67vWg_M2.js → gateway-realtime-BL_Cf0OQ.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BHBOPF_q.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-CLtR2wkL.js → gateway-restart-CHf8qY7H.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-COvC3r-l.js → gateway-settings-Di41peSM.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-9YQllbw2.js → gateway-startup-retry-CvkJYurV.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-DYMRjGvd.js → global-defaults-api-BWMbKu72.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-B3sgqrl3.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-Dzydfvy8.js → image-generation-api-Ce-IY7Ug.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-Csd_YZXZ.js → imports-page-W7_cDbxy.js} +1 -1
- package/dist/gateway/static/root/assets/index-D4B6O8B3.js +11 -0
- package/dist/gateway/static/root/assets/index-DGWBJDAM.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-DWVl9ekV.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-B201bMIa.js → keyboard-shortcuts-settings-Doyu0Q9e.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-B3h3P6aI.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-BOwqNH0L.js → local-apps-page-D6D2bZGW.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DjmK-SM9.js → local-session-drafts-BJ1B1dQ7.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Bg_XR36n.js → locale-store-Br7IfbXK.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-gw3E9CMQ.js → logs-page-qiXos_12.js} +2 -2
- package/dist/gateway/static/root/assets/management-settings-C0WcSdK7.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-BUpXJUPv.js → markdown-view-Ck5s16p9.js} +2 -2
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-CENs3hGU.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-_shnaEMY.js → media-plugins-Ba6vUE4J.js} +1 -1
- package/dist/gateway/static/root/assets/messages-ByFlEbsu.js +3 -0
- package/dist/gateway/static/root/assets/model-selector-DCBmsHzj.js +1 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-KOJC3z6Q.js → models-hub-cache-Bd-fYUrV.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CnuxqWMd.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-BFKZ7qJr.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-BSmikUKI.js → notes-api-8kp0X1x6.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CA0NRL8O.js → notes-page-XMdy-H3H.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-D2t9HXoC.js → oauth-api-DMMdeaNd.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-DGGGGtcB.js → oauth-provider-connect-CfOK8mPM.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BH54VO0V.js → page-context-capture-button-CKlKWSJ7.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-BS5y8Cx9.js → page-context-draft-LF33STHC.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-Du44NIEJ.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-D8DtpDTa.js → personal-avatar-D6CzIIfo.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CIMMSI25.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-9uDaNJy5.js → personal-settings-panel-wKdlrfPq.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DLYrI0C4.js → phone-dependencies-card-CDhk5277.js} +1 -1
- package/dist/gateway/static/root/assets/phone-model-connection-DZ-ZunPz.js +1 -0
- package/dist/gateway/static/root/assets/{phone-model-picker-BbA2iI-3.js → phone-model-picker-DuZc5jYO.js} +1 -1
- package/dist/gateway/static/root/assets/phone-settings-page-0u0GQl_R.js +1 -0
- package/dist/gateway/static/root/assets/{phone-workspace-store-CVDk80Bf.js → phone-workspace-store-SN7hfddU.js} +1 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-Bfc-Wmrd.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-BVoN-lAv.js → preference-select-fields-BKeHZLXZ.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-DCo90zGh.js → product-automation-feedback-BPur0vyo.js} +2 -2
- package/dist/gateway/static/root/assets/{product-open-page-OWl8IAoY.js → product-open-page-Bfd7R483.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-Cjas7UNe.js → product-preview-content-Bnq68oVw.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-CPWRvBI9.js → product-preview-modal-BPmTeweh.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-D9nnyvrI.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-Ba02SFzB.js → project-understanding-DLvxAoTT.js} +1 -1
- package/dist/gateway/static/root/assets/projects-page-BGy1pw9a.js +1 -0
- package/dist/gateway/static/root/assets/{providers-api-rwQ4LWzr.js → providers-api-DOnNfkwQ.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-BSmvRrZQ.js → recording-upload-CHFJbqW1.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-Vy7LfH6E.js → registry-api-DFDvOTg4.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-UXrnpGev.js → remote-access-hub-BVqwnOqO.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-f9OzSi4W.js → resource-unavailable-TQcRCpAg.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-DI43HQV_.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Bt8t37z5.js → runtime-tools-api-9o3Wfji1.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DU4UXnBm.js → runtime-tools-settings-panel-ccVBG-bZ.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-CuYsRcBB.js → service-recommendation-list-CNghOavt.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-DJI9eSgw.js → session-api-Bs3r_d2_.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-Bnq3qpqy.js +23 -0
- package/dist/gateway/static/root/assets/sessions-page-CyBj1Xw2.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BI4DMz4_.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-BxUuF_yi.js → settings-advanced-section-DwpPPxT0.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-CaoRh2gt.js → settings-mode-store-CiRpsdTJ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-qQ8-6dJ_.js → settings-page-Cd8Ermnn.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-CyUHrn7c.js → settings-page-header-BZl4AMiN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DGVqXrlp.js → settings-page-layout-onhEgq-K.js} +1 -1
- package/dist/gateway/static/root/assets/setup-interaction-page-Cvvj6JyV.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-D4qgE7QM.js +1 -0
- package/dist/gateway/static/root/assets/share-link-dialog-DA0QuFOD.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-Cem96FbB.js → share-preview-page-YDpIY4dC.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-Dowes16l.js → shares-api-D8Q-m46d.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DUvjOMmA.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-D8ZwFEVe.js → skill-api-uKU4sRiv.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-B4gp00-f.js → skill-list-api-BzKzG-xG.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-ClmaaDXo.js → skill-reload-api-DkUXekcd.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-ClyNSh-7.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-D095uacX.js → system-settings-panel-BN6sUX0H.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-CS9m7Ipo.js +2 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-LUrJlUhb.js → task-result-evidence-DKygspo2.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-BqEDB1Vl.js → terminal-panel-store-DJVC7HqA.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-gAcojLgP.js → theme-store-Dlnmgryi.js} +1 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-DcCc6g7o.js +1 -0
- package/dist/gateway/static/root/assets/tracing-settings-page-Bs76WeoF.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-C9u9E3UQ.js → tunnel-api-B7nx0NQJ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-BTrzsR6_.js → understanding-activity-store-C4bblRnQ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-5Qava3jh.js → understanding-refresh-store-BvCj9-Ue.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-DFMLYKAc.js → usage-page-anU5gslJ.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-3O-X7x15.js → use-autosave-YHxQ-UZg.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-DYY3Yz4a.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-CYgWzDnv.js +2 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-MusPgljM.js → use-personal-profile-D2Un8G1L.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-Ck_U2yTw.js → use-workspace-tree-Dkg9tUr4.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-DIgPL3tN.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C5zJApoa.js → voice-api-key-field-BUes-Jlp.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DC1bYDt1.js → voice-config-api-CrULrSKC.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-0SZjJdVV.js → voice-input-shortcut-events-DFMNIyy4.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Dy4hfftb.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DAQ8McVe.js → work-discovery-overlay-CFF4cRFl.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-DUQysEyb.js → work-discovery-page-BnYaVH3V.js} +1 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-GFwVefVA.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-api-ZrN6yUER.js → workspace-api-BdB4NEOh.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-4cZ26iaD.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-Yj_kBWSb.js → workspace-file-preview-dialog-NRL3YRjg.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-yxT7wajO.js → workspace-open-location-menu-Dcij7wvJ.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-IcH9KDzx.js → xopc-cloud-account-card-DC9aG7Pl.js} +1 -1
- package/dist/gateway/static/root/index.html +100 -98
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +7 -0
- package/dist/packages/gateway-contract/src/capabilities.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +1 -0
- package/dist/src/agent/child-agent-factory.js +1 -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 +13 -1
- package/dist/src/agent/embedded/session-runner.js +6 -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 +3 -1
- package/dist/src/agent/mcp/connection-drafts.js +3 -2
- package/dist/src/agent/mcp/connection-setup.js +34 -2
- package/dist/src/agent/mcp/conversation-setup.d.ts +163 -0
- package/dist/src/agent/mcp/conversation-setup.js +621 -0
- package/dist/src/agent/mcp/native-mcp.d.ts +1 -0
- package/dist/src/agent/mcp/tool-catalog.d.ts +5 -0
- package/dist/src/agent/mcp/tool-catalog.js +19 -2
- 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/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 +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.d.ts +2 -0
- package/dist/src/agent/service.js +11 -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 +92 -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 +34 -23
- 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 +32 -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 +4 -2
- package/dist/src/agent/tools/xopc-use-tool.js +60 -10
- package/dist/src/agent-catalog/service.d.ts +1 -1
- package/dist/src/agent-catalog/service.js +2 -1
- package/dist/src/automations/capabilities/drafts.js +5 -2
- package/dist/src/automations/capabilities/read.js +18 -7
- 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 +8 -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 +5 -0
- package/dist/src/automations/service/automation-service.js +52 -2
- package/dist/src/automations/service/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/backup.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/models-json.d.ts +12 -0
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.d.ts +1 -1
- package/dist/src/extensions/agent-plugins/setup.js +3 -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/global-defaults-admin.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 +45 -16
- package/dist/src/gateway/hono/routes/phone.js +2 -4
- 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 -1
- 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 +1 -1
- 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 +86 -12
- 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/gateway/xopc-cloud-capability-setup.js +9 -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/cloud-adb-connection.js +8 -5
- package/dist/src/phone/contracts.d.ts +4 -0
- package/dist/src/phone/contracts.js +6 -1
- package/dist/src/phone/gui-protocol.d.ts +7 -0
- package/dist/src/phone/gui-protocol.js +302 -0
- package/dist/src/phone/model-adapter.d.ts +1 -1
- package/dist/src/phone/model-adapter.js +7 -4
- package/dist/src/phone/runtime.js +8 -2
- package/dist/src/phone/setup/service.d.ts +14 -4
- package/dist/src/phone/setup/service.js +106 -28
- package/dist/src/phone/ui-dump-binary.d.ts +1 -1
- package/dist/src/phone/ui-dump-binary.js +1 -1
- package/dist/src/phone/ui-session.d.ts +2 -0
- package/dist/src/phone/ui-session.js +23 -4
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/providers/env-keys.js +2 -0
- package/dist/src/providers/index.js +11 -0
- package/dist/src/providers/model-catalog-types.d.ts +1 -1
- package/dist/src/providers/model-supplements.d.ts +1 -1
- package/dist/src/providers/model-supplements.js +6 -3
- package/dist/src/providers/phone-models.d.ts +3 -0
- package/dist/src/providers/phone-models.js +33 -0
- package/dist/src/providers/presentation.js +0 -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-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/voice/platform-catalog.d.ts +1 -1
- 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-DlvjxWg6.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-OBueuQSc.js +0 -1
- package/dist/gateway/static/root/assets/agents-Cp6_5OOQ.js +0 -77
- package/dist/gateway/static/root/assets/app-link-1j40sJ-z.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-C2WKUwtN.js +0 -1
- package/dist/gateway/static/root/assets/attachment-load-qjPpQzYY.js +0 -1
- package/dist/gateway/static/root/assets/automation-task-card-wbnR5i6N.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-D6cTOKr7.js +0 -9
- package/dist/gateway/static/root/assets/browser-settings-page-L0nBjfhG.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-aT-QjNTl.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-DlpuHdHi.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-pvqkN2-2.js +0 -8
- package/dist/gateway/static/root/assets/channels-BUPtawh6.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-BP0huA-W.js +0 -72
- package/dist/gateway/static/root/assets/composer-payload-handoff-CYIhcczq.js +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-XGclfBqe.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-CKZfhHSD.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Lf1ZzaVn.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-UqKVJ9dv.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-ByEL5lvM.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-Bkt1z-xo.js +0 -1
- package/dist/gateway/static/root/assets/home-page-k9LFXcVa.js +0 -2
- package/dist/gateway/static/root/assets/index-CpwPxKQ8.css +0 -1
- package/dist/gateway/static/root/assets/index-DKW7BeT_.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-CTQAKTPv.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CD_8_gd_.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-t_Z2mCyw.js +0 -1
- package/dist/gateway/static/root/assets/messages-DG4HLOER.js +0 -3
- package/dist/gateway/static/root/assets/model-selector-a7PIT1Lk.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-BsHYUFgk.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-B-bEtjhj.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-BdZnUh-D.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-KJezmTKP.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-Cg_BPss4.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-DgibLkc3.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-B_HlZux_.js +0 -7
- package/dist/gateway/static/root/assets/projects-page-CdfKjp95.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-BtObM-co.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-CtKgACGl.js +0 -23
- package/dist/gateway/static/root/assets/sessions-page-BAsKzRHt.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CjAFqg2U.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BpaPb625.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-CQJ6Ykm2.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DZEkZDR0.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CV0X9rvG.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-CY2C4AM2.js +0 -2
- package/dist/gateway/static/root/assets/tool-friendly-title-o6sxGVUu.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-B1ZRh-Is.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-BLc4dBfe.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-BaOmTXsT.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-Den5Lg-k.js +0 -2
- package/dist/gateway/static/root/assets/voice-transcribe-api-CxVeANPX.js +0 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-BO9qdJyZ.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Bo5dwoWP.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
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths, resolveConfigPath, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { createStateBackup, restoreStateBackup, verifyStateBackup } from "../../backup/archive.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
6
6
|
import { lstat, readFile } from "node:fs/promises";
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -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";
|
|
@@ -376,6 +376,8 @@ export declare const CustomModelSchema: z.ZodObject<{
|
|
|
376
376
|
profile: z.ZodEnum<{
|
|
377
377
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
378
378
|
"structured-phone-v1": "structured-phone-v1";
|
|
379
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
380
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
379
381
|
}>;
|
|
380
382
|
}, z.core.$strict>>;
|
|
381
383
|
id: z.ZodString;
|
|
@@ -464,6 +466,8 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
464
466
|
profile: z.ZodEnum<{
|
|
465
467
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
466
468
|
"structured-phone-v1": "structured-phone-v1";
|
|
469
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
470
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
467
471
|
}>;
|
|
468
472
|
}, z.core.$strict>>;
|
|
469
473
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -556,6 +560,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
556
560
|
profile: z.ZodEnum<{
|
|
557
561
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
558
562
|
"structured-phone-v1": "structured-phone-v1";
|
|
563
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
564
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
559
565
|
}>;
|
|
560
566
|
}, z.core.$strict>>;
|
|
561
567
|
id: z.ZodString;
|
|
@@ -644,6 +650,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
644
650
|
profile: z.ZodEnum<{
|
|
645
651
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
646
652
|
"structured-phone-v1": "structured-phone-v1";
|
|
653
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
654
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
647
655
|
}>;
|
|
648
656
|
}, z.core.$strict>>;
|
|
649
657
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -851,6 +859,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
851
859
|
profile: z.ZodEnum<{
|
|
852
860
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
853
861
|
"structured-phone-v1": "structured-phone-v1";
|
|
862
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
863
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
854
864
|
}>;
|
|
855
865
|
}, z.core.$strict>>;
|
|
856
866
|
id: z.ZodString;
|
|
@@ -939,6 +949,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
939
949
|
profile: z.ZodEnum<{
|
|
940
950
|
"autoglm-phone-v1": "autoglm-phone-v1";
|
|
941
951
|
"structured-phone-v1": "structured-phone-v1";
|
|
952
|
+
"doubao-seed-phone-v1": "doubao-seed-phone-v1";
|
|
953
|
+
"gui-owl-phone-v1": "gui-owl-phone-v1";
|
|
942
954
|
}>;
|
|
943
955
|
}, z.core.$strict>>;
|
|
944
956
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -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";
|
|
@@ -118,7 +118,7 @@ export declare class PluginSetupService {
|
|
|
118
118
|
id: string;
|
|
119
119
|
name: string;
|
|
120
120
|
}>>>;
|
|
121
|
-
authorization(id: string, owner: string, server: string, config: Config): Promise<import("
|
|
121
|
+
authorization(id: string, owner: string, server: string, config: Config): Promise<import("../../agent/mcp/connection-setup.js").McpAuthorization | import("./cli-authorization.js").PluginCliAuthorization>;
|
|
122
122
|
redirect(id: string, owner: string, server: string, url: string, config: Config): boolean;
|
|
123
123
|
private config;
|
|
124
124
|
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";
|
|
@@ -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,8 +3,8 @@ import { init_agent_config } from "../agent-config/index.js";
|
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
4
4
|
import { validatePhoneModelChange } from "../phone/model-adapter.js";
|
|
5
5
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
6
|
-
import { GATEWAY_BUILTIN_TOOLS } from "./agent-builtin-tools.js";
|
|
7
6
|
import { validateComputerModelChange } from "../computer/model-config.js";
|
|
7
|
+
import { GATEWAY_BUILTIN_TOOLS } from "./agent-builtin-tools.js";
|
|
8
8
|
import { isDeepStrictEqual } from "node:util";
|
|
9
9
|
//#region src/gateway/global-defaults-admin.ts
|
|
10
10
|
init_agent_config();
|
|
@@ -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 && (typeof body.value !== "string" || body.action !== "token")) 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";
|