@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
|
@@ -3,8 +3,7 @@ import { getSessionMetadata, init_session_read_repository } from "../../../stora
|
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
4
4
|
import { init_paths } from "../../../config/paths.js";
|
|
5
5
|
import { resolveEffectiveAgentConfigForAgent } from "../../../config/agent-profile.js";
|
|
6
|
-
import {
|
|
7
|
-
import { init_providers, isProviderConfiguredSync } from "../../../providers/index.js";
|
|
6
|
+
import { getAllModels, init_providers, isProviderConfiguredSync, resolveModel } from "../../../providers/index.js";
|
|
8
7
|
import { phoneAllowsApp } from "../../../phone/app-access.js";
|
|
9
8
|
import { managedPhoneAdbPath } from "../../../runtime-tools/phone-dependency-catalog.js";
|
|
10
9
|
import { phoneModelProfile } from "../../../phone/model-adapter.js";
|
|
@@ -17,9 +16,15 @@ import { z } from "zod";
|
|
|
17
16
|
//#region src/gateway/hono/routes/phone-setup.ts
|
|
18
17
|
init_repository();
|
|
19
18
|
init_paths();
|
|
20
|
-
init_model_registry();
|
|
21
19
|
init_providers();
|
|
22
20
|
init_session_read_repository();
|
|
21
|
+
function resolvePhoneSetupModel(ref) {
|
|
22
|
+
try {
|
|
23
|
+
return resolveModel(ref);
|
|
24
|
+
} catch {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
23
28
|
function createPhoneSetupService(service) {
|
|
24
29
|
const runtime = getPhoneRuntime();
|
|
25
30
|
const manager = () => new PhoneDependencyManager({
|
|
@@ -37,14 +42,15 @@ function createPhoneSetupService(service) {
|
|
|
37
42
|
};
|
|
38
43
|
return new PhoneSetupService({
|
|
39
44
|
runtime,
|
|
40
|
-
models: () =>
|
|
45
|
+
models: () => getAllModels().filter((model) => phoneModelProfile(model)).map((model) => ({
|
|
41
46
|
ref: `${model.provider}/${model.id}`,
|
|
42
47
|
name: model.name,
|
|
43
48
|
configured: isProviderConfiguredSync(model.provider)
|
|
44
49
|
})),
|
|
45
|
-
setModel: async (agentId, ref) => {
|
|
50
|
+
setModel: async (agentId, ref, mutation) => {
|
|
51
|
+
mutation?.check();
|
|
46
52
|
requireIdle();
|
|
47
|
-
const model =
|
|
53
|
+
const model = resolvePhoneSetupModel(ref);
|
|
48
54
|
if (!model || !phoneModelProfile(model) || !isProviderConfiguredSync(model.provider)) throw new Error("PHONE_SETUP_MODEL_REQUIRED: Choose a compatible model with configured credentials.");
|
|
49
55
|
const repository = new AgentCatalogRepository();
|
|
50
56
|
const agent = repository.get(agentId);
|
|
@@ -55,30 +61,39 @@ function createPhoneSetupService(service) {
|
|
|
55
61
|
primary: ref,
|
|
56
62
|
fallbacks: []
|
|
57
63
|
}
|
|
58
|
-
} }, agent.revision);
|
|
64
|
+
} }, agent.revision, mutation?.check);
|
|
59
65
|
service.refreshAgentCatalog();
|
|
60
66
|
},
|
|
61
|
-
configure: async (enabled) => {
|
|
67
|
+
configure: async (enabled, mutation) => {
|
|
68
|
+
mutation?.check();
|
|
62
69
|
requireIdle();
|
|
63
70
|
const config = service.currentConfig;
|
|
64
71
|
const next = structuredClone(config);
|
|
65
72
|
next.phone.enabled = enabled;
|
|
66
|
-
if (!(await service.saveConfig(next, config)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
73
|
+
if (!(await service.saveConfig(next, config, mutation?.check)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
67
74
|
},
|
|
68
|
-
install: async (kind, repair) => {
|
|
75
|
+
install: async (kind, repair, mutation) => {
|
|
76
|
+
mutation?.check();
|
|
69
77
|
if (kind === "adb") requireIdle();
|
|
70
78
|
const config = service.currentConfig;
|
|
71
|
-
await manager().install(kind, {
|
|
79
|
+
await manager().install(kind, {
|
|
80
|
+
repair,
|
|
81
|
+
signal: mutation?.signal,
|
|
82
|
+
beforeCommit: mutation?.check
|
|
83
|
+
});
|
|
84
|
+
mutation?.check();
|
|
72
85
|
if (kind === "adb" && config.phone.adbPath) {
|
|
73
86
|
const path = managedPhoneAdbPath(resolveStateDir());
|
|
74
87
|
await probePhoneAdb(path);
|
|
88
|
+
mutation?.check();
|
|
75
89
|
const next = structuredClone(config);
|
|
76
90
|
next.phone.adbPath = path;
|
|
77
|
-
if (!(await service.saveConfig(next, config)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
91
|
+
if (!(await service.saveConfig(next, config, mutation?.check)).saved) throw new Error("PHONE_SETUP_CONFIG_CONFLICT");
|
|
78
92
|
}
|
|
79
93
|
},
|
|
80
|
-
registerLocal: async (serial, name) => {
|
|
94
|
+
registerLocal: async (serial, name, mutation) => {
|
|
81
95
|
const discovered = (await runtime.discover(service.currentConfig)).find((phone) => phone.serial === serial && phone.state === "device");
|
|
96
|
+
mutation?.check();
|
|
82
97
|
if (!discovered) throw new Error("PHONE_SETUP_DEVICE_OFFLINE: Select an online discovered local phone.");
|
|
83
98
|
if (!runtime.repository.list().some((phone) => phone.serial === serial)) runtime.repository.save({
|
|
84
99
|
serial,
|
|
@@ -91,7 +106,7 @@ function createPhoneSetupService(service) {
|
|
|
91
106
|
revision: (context, deviceId) => {
|
|
92
107
|
const agent = resolveEffectiveAgentConfigForAgent(context.agentId).config;
|
|
93
108
|
const device = runtime.repository.list().find((device) => device.id === deviceId);
|
|
94
|
-
const model = agent.models.phoneUse?.primary ?
|
|
109
|
+
const model = agent.models.phoneUse?.primary ? resolvePhoneSetupModel(agent.models.phoneUse.primary) : void 0;
|
|
95
110
|
return createHash("sha256").update(JSON.stringify([
|
|
96
111
|
service.currentConfig.phone,
|
|
97
112
|
agent.models.phoneUse,
|
|
@@ -119,7 +134,7 @@ function createPhoneSetupService(service) {
|
|
|
119
134
|
const resolved = resolveEffectiveAgentConfigForAgent(context.agentId);
|
|
120
135
|
const agent = resolved.config;
|
|
121
136
|
const ref = agent.models.phoneUse?.primary;
|
|
122
|
-
const model = ref ?
|
|
137
|
+
const model = ref ? resolvePhoneSetupModel(ref) : void 0;
|
|
123
138
|
const dependencies = await new PhoneDependencyManager({
|
|
124
139
|
stateDir: resolveStateDir(),
|
|
125
140
|
config: config.runtimeTools,
|
|
@@ -177,10 +192,13 @@ function registerPhoneSetupRoutes(app, deps) {
|
|
|
177
192
|
"get",
|
|
178
193
|
"recheck",
|
|
179
194
|
"source",
|
|
195
|
+
"set_model",
|
|
180
196
|
"begin_verification",
|
|
181
197
|
"release",
|
|
182
198
|
"cancel"
|
|
183
199
|
]),
|
|
200
|
+
modelRef: z.string().min(1).max(500).optional(),
|
|
201
|
+
replaceExisting: z.boolean().optional(),
|
|
184
202
|
source: z.enum(["local", "aliyun"]).optional(),
|
|
185
203
|
deviceId: z.string().uuid().optional(),
|
|
186
204
|
expectedRevision: z.number().int().positive().optional()
|
|
@@ -204,7 +222,18 @@ function registerPhoneSetupRoutes(app, deps) {
|
|
|
204
222
|
const setup = deps.service.phoneSetup;
|
|
205
223
|
try {
|
|
206
224
|
let payload;
|
|
207
|
-
if (body.action === "
|
|
225
|
+
if (body.action === "set_model") {
|
|
226
|
+
if (!body.setupId || !body.modelRef || !body.expectedRevision) throw new Error("Choose a compatible model and refresh current progress");
|
|
227
|
+
payload = await setup.command("set_model", {
|
|
228
|
+
setupId: body.setupId,
|
|
229
|
+
modelRef: body.modelRef,
|
|
230
|
+
expectedRevision: body.expectedRevision,
|
|
231
|
+
replaceExisting: body.replaceExisting
|
|
232
|
+
}, {
|
|
233
|
+
...context,
|
|
234
|
+
canConfigure: true
|
|
235
|
+
});
|
|
236
|
+
} else if (body.action === "source") {
|
|
208
237
|
if (!body.setupId || !body.source || !body.expectedRevision) throw new Error("Choose a source and refresh current progress");
|
|
209
238
|
payload = await setup.source(context, body.setupId, body.source, body.expectedRevision);
|
|
210
239
|
} else if (body.action === "begin_verification") {
|
|
@@ -6,8 +6,7 @@ import { init_session_repository } from "../../../storage/sqlite/session-reposit
|
|
|
6
6
|
import { MOCK_PHONE_MODEL, PhoneActionSchema, PhoneConfigSchema, PhoneDeviceSchema, PhoneError, PhoneExecutionModeSchema, PhoneInputSchema, init_contracts } from "../../../phone/contracts.js";
|
|
7
7
|
import { createConversation, init_conversation_repository } from "../../../storage/sqlite/conversation-repository.js";
|
|
8
8
|
import { getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
9
|
-
import {
|
|
10
|
-
import { init_providers, isProviderConfiguredSync } from "../../../providers/index.js";
|
|
9
|
+
import { getAllModels, init_providers, isProviderConfiguredSync } from "../../../providers/index.js";
|
|
11
10
|
import { normalizePhoneAppAccess, phoneAppAccess } from "../../../phone/app-access.js";
|
|
12
11
|
import { cancelPhoneAssistance, pendingPhoneAssistance, phoneAssistance, phoneAssistanceReport } from "../../../phone/assistance.js";
|
|
13
12
|
import { resolveAdbPath } from "../../../phone/adb-driver.js";
|
|
@@ -24,7 +23,6 @@ import { bodyLimit } from "hono/body-limit";
|
|
|
24
23
|
//#region src/gateway/hono/routes/phone.ts
|
|
25
24
|
init_session_repository();
|
|
26
25
|
init_resolve_route();
|
|
27
|
-
init_model_registry();
|
|
28
26
|
init_providers();
|
|
29
27
|
init_contracts();
|
|
30
28
|
init_logger();
|
|
@@ -398,7 +396,7 @@ function registerPhoneRoutes(parent, deps, runtime = getPhoneRuntime()) {
|
|
|
398
396
|
});
|
|
399
397
|
app.get("/api/phone/models", (c) => c.json({
|
|
400
398
|
ok: true,
|
|
401
|
-
payload: { models: [...
|
|
399
|
+
payload: { models: [...getAllModels().flatMap((model) => {
|
|
402
400
|
const profile = phoneModelProfile(model);
|
|
403
401
|
return profile ? [{
|
|
404
402
|
id: `${model.provider}/${model.id}`,
|
|
@@ -19,9 +19,9 @@ import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
|
19
19
|
import { inferSuggestedProjectDefaultAgentId } from "../../../projects/project-agent-suggestion.js";
|
|
20
20
|
import { buildProjectLoopOverview } from "../../../projects/project-loop.js";
|
|
21
21
|
import "../../../projects/index.js";
|
|
22
|
-
import { defineTaskContract } from "../../../tasks/task-contract-definition.js";
|
|
23
22
|
import { TaskApplicationService } from "../../../tasks/task-application-service.js";
|
|
24
23
|
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
24
|
+
import { defineTaskContract } from "../../../tasks/task-contract-definition.js";
|
|
25
25
|
import { ProjectOperatingViewService, summarizeProjectOperatingView } from "../../../tasks/project-operating-view-service.js";
|
|
26
26
|
import "../../../tasks/index.js";
|
|
27
27
|
import { parseActivityIncludeRelated, parseActivityQuery } from "./activity.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
2
2
|
import { listGlobalDefaults, prepareUpdateGlobalDefaults, updateGlobalDefaults } from "../../global-defaults-admin.js";
|
|
3
|
+
import { withGatewayConfigWriteLock } from "../lib/config-write-lock.js";
|
|
3
4
|
import { completeXopcCloudModelRoutes } from "../../xopc-cloud-capability-setup.js";
|
|
4
5
|
import { applySetupVoice } from "../../../providers/setup/voice.js";
|
|
5
6
|
import { loadProviderSetupSnapshot } from "../../provider-model-setup.js";
|
|
6
7
|
import { SetupConflictError, applyProviderSetup, previewProviderSetup } from "../../../providers/setup/engine.js";
|
|
7
|
-
import { withGatewayConfigWriteLock } from "../lib/config-write-lock.js";
|
|
8
8
|
import { isDeepStrictEqual } from "node:util";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/gateway/hono/routes/provider-setup.ts
|
|
@@ -25,6 +25,28 @@ function secretsEqual(actual, expected) {
|
|
|
25
25
|
return timingSafeEqual(createHash("sha256").update(actual).digest(), createHash("sha256").update(expected).digest());
|
|
26
26
|
}
|
|
27
27
|
function registerPublicGatewayRoutes(app, service) {
|
|
28
|
+
app.get("/mcp-setup/callback/:id", (c) => {
|
|
29
|
+
c.header("Cache-Control", "no-store");
|
|
30
|
+
c.header("Referrer-Policy", "no-referrer");
|
|
31
|
+
try {
|
|
32
|
+
const incoming = new URL(c.req.url);
|
|
33
|
+
if (incoming.search.length > 8192 || [...incoming.searchParams.keys()].some((key) => ![
|
|
34
|
+
"code",
|
|
35
|
+
"state",
|
|
36
|
+
"iss",
|
|
37
|
+
"error",
|
|
38
|
+
"error_description"
|
|
39
|
+
].includes(key) || incoming.searchParams.getAll(key).length !== 1)) return c.text("Invalid authorization response.", 400);
|
|
40
|
+
const origin = service.currentConfig.gateway.publicUrl;
|
|
41
|
+
if (!origin) return c.text("Secure callback is unavailable.", 400);
|
|
42
|
+
const target = new URL(`/mcp-setup/callback/${encodeURIComponent(c.req.param("id"))}`, origin);
|
|
43
|
+
target.search = incoming.search;
|
|
44
|
+
const path = service.mcpSetup.relayCallback(c.req.param("id"), target.href);
|
|
45
|
+
return c.redirect(path, 303);
|
|
46
|
+
} catch {
|
|
47
|
+
return c.text("Authorization response was rejected. Return to the secure connection page and check its status.", 400);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
28
50
|
app.get("/health", (c) => {
|
|
29
51
|
const health = service.getHealth();
|
|
30
52
|
return c.json({
|
|
@@ -8,8 +8,8 @@ import { endpointTurnClaimSchema, init_src as init_src$1 } from "../../../../pac
|
|
|
8
8
|
import { init_providers, resolveModel } from "../../../providers/index.js";
|
|
9
9
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
10
10
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
11
|
-
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
12
11
|
import { parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
12
|
+
import { getModelThinking } from "../../../providers/model-thinking.js";
|
|
13
13
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
14
14
|
import { isTaskDestructiveCommand } from "../../../session/reset-triggers.js";
|
|
15
15
|
import { parseSlashCommand } from "../../../chat-commands/command-parse.js";
|
|
@@ -2,6 +2,7 @@ import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
|
2
2
|
import { loadCompactionSourceSnapshot } from "../../../storage/sqlite/transcript-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
4
|
import { FileServiceError } from "../../../files/file-service.js";
|
|
5
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
5
6
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
6
7
|
import { SHARE_CONFIG_DEFAULTS } from "../../../share/share-types.js";
|
|
7
8
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
@@ -13,7 +14,6 @@ import { SessionShareService, SessionShareSnapshotConflictError } from "../../..
|
|
|
13
14
|
import { HostedPublicationPublisher, HostedSessionShareBuilder, HostedShareAuthorizationError, HostedShareBindingStore, HostedShareRemoteError } from "../../../share/hosted-session-share.js";
|
|
14
15
|
import { HostedStaticSitePublicationBuilder } from "../../../share/hosted-static-site-publication.js";
|
|
15
16
|
import { publishHostedStaticSite } from "../../../share/hosted-static-site-publish.js";
|
|
16
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
17
17
|
import { audienceDefaults, cleanupStagedSite, decideShareKind, forgetStagedSite, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../../share/share-auto.js";
|
|
18
18
|
import { deleteThumbnail, placeholderSvg, readThumbnail, scheduleThumbnail, thumbnailContentType, thumbnailExists } from "../../../share/share-thumbnail.js";
|
|
19
19
|
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
1
2
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
2
3
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|
|
3
4
|
import { getSiteShareStore } from "../../../share/site-share-store.js";
|
|
4
5
|
import { resolveSiteShareUrl } from "../../../share/share-url.js";
|
|
5
|
-
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
6
6
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/gateway/hono/routes/site-shares.ts
|
|
@@ -9,10 +9,10 @@ import { TaskRunRepository, init_task_run_repository } from "../../../tasks/task
|
|
|
9
9
|
import { TaskConversationRepository } from "../../../tasks/task-conversation-repository.js";
|
|
10
10
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
11
11
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
12
|
-
import { TaskCollaborationRepository } from "../../../tasks/task-collaboration-repository.js";
|
|
13
12
|
import { TaskCriterionReviewRepository } from "../../../tasks/task-criterion-review-repository.js";
|
|
14
13
|
import { TaskContextMutationOutputSchema } from "../../../tasks/capabilities/relations.js";
|
|
15
14
|
import { TaskDeleteOutputSchema } from "../../../tasks/capabilities/management.js";
|
|
15
|
+
import { TaskCollaborationRepository } from "../../../tasks/task-collaboration-repository.js";
|
|
16
16
|
import { TaskMutationOutputSchema } from "../../../tasks/capabilities/write.js";
|
|
17
17
|
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
18
18
|
import { ProjectOperatingViewService } from "../../../tasks/project-operating-view-service.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
2
2
|
import { resolveMediaReference } from "../media/media-reference.js";
|
|
3
|
+
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
3
4
|
import { FileServiceError } from "../files/file-service.js";
|
|
4
5
|
import { pendingTranscriptReferencesMediaUri } from "../agent/inbound/attachment-pipeline.js";
|
|
5
|
-
import { TaskContextRepository } from "../tasks/task-context-repository.js";
|
|
6
6
|
import { messagesReferenceMediaUri, taskResultReferencesMediaUri } from "../media/session-references.js";
|
|
7
7
|
//#region src/gateway/media-access.ts
|
|
8
8
|
init_task_repository();
|
|
@@ -14,6 +14,7 @@ import type { UserTurnAttachment, UserTurnInput } from '../user-turn-input.js';
|
|
|
14
14
|
import type { AgentSourceContext, TurnContextRef } from '../../agent/source-context/types.js';
|
|
15
15
|
import { SessionInputCoordinator, type ReplaceLatestTurnInput, type SubmitSessionInput } from './session-input-coordinator.js';
|
|
16
16
|
export interface GatewayAgentRunnerOptions {
|
|
17
|
+
afterConnectionResume?: (input: import('../../storage/sqlite/session-input-repository.js').SessionInput, status: string) => Promise<void>;
|
|
17
18
|
validateConnectionResume?: (input: import('../../storage/sqlite/session-input-repository.js').SessionInput) => Promise<boolean>;
|
|
18
19
|
continueConnection?: (wait: import('@xopcai/gateway-contract').ConnectionWait, idempotencyKey: string) => Promise<void>;
|
|
19
20
|
cancelConnection?: (wait: import('@xopcai/gateway-contract').ConnectionWait) => void;
|
|
@@ -12,8 +12,8 @@ import { AgentRunCancelledError } from "../../agent/orchestration/run-terminatio
|
|
|
12
12
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
13
13
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
14
14
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
15
|
-
import { reserveEmbeddedRunCancellation } from "../../agent/embedded/runs.js";
|
|
16
15
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
16
|
+
import { reserveEmbeddedRunCancellation } from "../../agent/embedded/runs.js";
|
|
17
17
|
import { EphemeralClarificationWaiter } from "../ephemeral-clarification-waiter.js";
|
|
18
18
|
import { completePhoneAssistanceFromUser, preparePhoneContinuation } from "../../phone/assistance-service.js";
|
|
19
19
|
import { describeActiveExecution } from "./active-execution.js";
|
|
@@ -96,6 +96,8 @@ var GatewayAgentRunner = class {
|
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
+
const persisted = findSessionInputByRunId(input.conversationId, input.runId);
|
|
100
|
+
if (persisted?.clientMessageId.startsWith("mcp-setup:")) await opts.afterConnectionResume?.(persisted, result?.status ?? "error");
|
|
99
101
|
return result;
|
|
100
102
|
},
|
|
101
103
|
onInputReceived: (conversationId) => {
|
|
@@ -99,7 +99,7 @@ var GatewayConfigCoordinator = class {
|
|
|
99
99
|
error: result.error
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
async saveConfig(config, expectedConfig = this.opts.getConfig()) {
|
|
102
|
+
async saveConfig(config, expectedConfig = this.opts.getConfig(), beforeCommit) {
|
|
103
103
|
const candidate = structuredClone(config), expected = structuredClone(expectedConfig);
|
|
104
104
|
return this.queueConfigWrite(async () => {
|
|
105
105
|
if (!isDeepStrictEqual(this.opts.getConfig(), expected)) return {
|
|
@@ -107,6 +107,7 @@ var GatewayConfigCoordinator = class {
|
|
|
107
107
|
conflict: true,
|
|
108
108
|
error: "Configuration changed before saving. Please retry."
|
|
109
109
|
};
|
|
110
|
+
beforeCommit?.();
|
|
110
111
|
return this.persistConfig(candidate);
|
|
111
112
|
});
|
|
112
113
|
}
|
|
@@ -14,9 +14,9 @@ import { init_session_key } from "../../routing/session-key.js";
|
|
|
14
14
|
import { resolveAgentTurnTimeoutMs } from "../../agent/orchestration/run-agent-turn-with-timeout.js";
|
|
15
15
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
16
16
|
import { isPhoneAssistanceSuspended } from "../../phone/assistance.js";
|
|
17
|
-
import { recordPersonalPerformance } from "../../personal-agent/performance.js";
|
|
18
17
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
19
18
|
import { TaskRunCoordinator } from "../../tasks/task-run-coordinator.js";
|
|
19
|
+
import { recordPersonalPerformance } from "../../personal-agent/performance.js";
|
|
20
20
|
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
21
21
|
import "../chat-limits.js";
|
|
22
22
|
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
@@ -189,7 +189,8 @@ var GatewaySessionsApi = class {
|
|
|
189
189
|
});
|
|
190
190
|
return performSessionReset(key, {
|
|
191
191
|
sessionIndex: this.opts.sessionIndex,
|
|
192
|
-
getAgentService: this.opts.getAgentService
|
|
192
|
+
getAgentService: this.opts.getAgentService,
|
|
193
|
+
cancelConfigurationSetups: (conversationId) => this.opts.getAgentService().cancelConfigurationSetups(conversationId)
|
|
193
194
|
});
|
|
194
195
|
}
|
|
195
196
|
deleteMany(keys) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BrowserSetupService } from '../browser/setup/service.js';
|
|
2
|
+
import { McpConversationSetup } from '../agent/mcp/conversation-setup.js';
|
|
2
3
|
import type { ClarificationSubmission } from '@xopcai/gateway-contract';
|
|
3
4
|
import { PhoneStreamGateway } from '../phone/stream-gateway.js';
|
|
4
5
|
import { WorkDiscoveryService } from '../work-discovery/service.js';
|
|
@@ -60,6 +61,8 @@ export declare class GatewayService {
|
|
|
60
61
|
readonly phoneStreams: PhoneStreamGateway;
|
|
61
62
|
readonly voiceRealtime: VoiceRealtimeRuntime;
|
|
62
63
|
getConfig(): Config;
|
|
64
|
+
private _mcpSetup?;
|
|
65
|
+
get mcpSetup(): McpConversationSetup;
|
|
63
66
|
getModelCatalogSync(): ModelCatalogSyncService;
|
|
64
67
|
private _phoneSetup?;
|
|
65
68
|
get phoneSetup(): import("../phone/setup/service.js").PhoneSetupService;
|
|
@@ -246,7 +249,7 @@ export declare class GatewayService {
|
|
|
246
249
|
}>;
|
|
247
250
|
afterWeixinCredentialsPersisted(): Promise<void>;
|
|
248
251
|
afterFeishuCredentialsPersisted(): Promise<void>;
|
|
249
|
-
saveConfig(config: Config, expectedConfig?: Config): Promise<{
|
|
252
|
+
saveConfig(config: Config, expectedConfig?: Config, beforeCommit?: () => void): Promise<{
|
|
250
253
|
saved: boolean;
|
|
251
254
|
error?: string;
|
|
252
255
|
persisted?: boolean;
|
|
@@ -361,6 +364,7 @@ export declare class GatewayService {
|
|
|
361
364
|
/** Process a message directly through the agent (for CLI mode). */
|
|
362
365
|
processDirect(content: string, conversationId?: string): Promise<string>;
|
|
363
366
|
emit(type: string, payload: unknown): void;
|
|
367
|
+
private deliverWeixinAutomation;
|
|
364
368
|
private handleAutomationRunCompleted;
|
|
365
369
|
private startSessionTranscriptEventIngestion;
|
|
366
370
|
ingestAutomationEvent(event: AutomationEvent, options?: {
|
|
@@ -41,24 +41,22 @@ import { TaskAllocationRepository } from "../tasks/task-allocation-repository.js
|
|
|
41
41
|
import { stopPersonalResultPreparations } from "../personal-agent/result-reader.js";
|
|
42
42
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
43
43
|
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
|
|
44
|
-
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
45
|
-
import { ProjectService } from "../projects/project-service.js";
|
|
46
|
-
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
47
|
-
import "../projects/index.js";
|
|
48
|
-
import { onTaskResultQueued } from "../tasks/task-result-delivery-repository.js";
|
|
49
|
-
import { runMemoryMaintenance } from "../memory-maintenance/service.js";
|
|
50
|
-
import "../memory-maintenance/index.js";
|
|
51
|
-
import { RealtimeExtensionBrowserProvider } from "../browser/providers/realtime-extension.js";
|
|
52
|
-
import { drainEmbeddedSessionRunnerShutdowns, evictAllEmbeddedSessionRunners } from "../agent/embedded/session-runner.js";
|
|
53
44
|
import { buildNoteAgentContext } from "../notes/agent-context.js";
|
|
54
45
|
import { NotesStore } from "../notes/store.js";
|
|
46
|
+
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
55
47
|
import { NotesService } from "../notes/service.js";
|
|
56
48
|
import { LocalAppService } from "../local-apps/service.js";
|
|
49
|
+
import { ProjectService } from "../projects/project-service.js";
|
|
50
|
+
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
57
51
|
import { buildResultAgentContext } from "../agent/source-context/result-context.js";
|
|
58
52
|
import { buildTaskAgentContext } from "../agent/source-context/task-context.js";
|
|
59
53
|
import { buildUserAssertionAgentContext } from "../agent/source-context/user-assertion-context.js";
|
|
54
|
+
import "../projects/index.js";
|
|
60
55
|
import { assertTaskHandoffAccess, getTaskHandoff } from "../tasks/task-handoff.js";
|
|
56
|
+
import { onTaskResultQueued } from "../tasks/task-result-delivery-repository.js";
|
|
61
57
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
58
|
+
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
59
|
+
import { weixinPrivateIdentity } from "../agent/mcp/weixin-setup-scope.js";
|
|
62
60
|
import { AutomationService } from "../automations/service/automation-service.js";
|
|
63
61
|
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
64
62
|
import { createProductDispatcher } from "../capabilities/runtime/product.js";
|
|
@@ -66,6 +64,10 @@ import "../automations/index.js";
|
|
|
66
64
|
import { assertTaskExecutorReady } from "../tasks/task-execution-capabilities.js";
|
|
67
65
|
import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
68
66
|
import "../tasks/index.js";
|
|
67
|
+
import { runMemoryMaintenance } from "../memory-maintenance/service.js";
|
|
68
|
+
import "../memory-maintenance/index.js";
|
|
69
|
+
import { RealtimeExtensionBrowserProvider } from "../browser/providers/realtime-extension.js";
|
|
70
|
+
import { drainEmbeddedSessionRunnerShutdowns, evictAllEmbeddedSessionRunners } from "../agent/embedded/session-runner.js";
|
|
69
71
|
import { drainPersonalResultReads } from "../personal-agent/result-read-continuations.js";
|
|
70
72
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
71
73
|
import { SessionIndex } from "../session/manager.js";
|
|
@@ -80,7 +82,6 @@ import "../infra/bus/index.js";
|
|
|
80
82
|
import { collectMediaUrisFromMessages, deleteMediaUris } from "../media/session-references.js";
|
|
81
83
|
import { AgentService } from "../agent/service.js";
|
|
82
84
|
import { bootstrapApplicationStateSync } from "../bootstrap/application-state.js";
|
|
83
|
-
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
84
85
|
import { registerClarificationChannelRuntime } from "./clarify-runtime.js";
|
|
85
86
|
import { ChannelManager } from "../channels/manager.js";
|
|
86
87
|
import { ChatPreviewService } from "../chat-previews/service.js";
|
|
@@ -110,6 +111,8 @@ import { getGatewayFileSpaceService } from "./file-space-service.js";
|
|
|
110
111
|
import { reconcileHomeIntelligenceAutomation } from "./home-intelligence-automation-reconciler.js";
|
|
111
112
|
import { createPhoneSetupService } from "./hono/routes/phone-setup.js";
|
|
112
113
|
import { BrowserSetupService } from "../browser/setup/service.js";
|
|
114
|
+
import { McpConversationSetup } from "../agent/mcp/conversation-setup.js";
|
|
115
|
+
import { withGatewayConfigWriteLock } from "./hono/lib/config-write-lock.js";
|
|
113
116
|
import { PhoneStreamGateway } from "../phone/stream-gateway.js";
|
|
114
117
|
import { PersonalProactivityService } from "../personal-agent/proactivity/service.js";
|
|
115
118
|
import { reconcilePersonalProactivityAutomation } from "../personal-agent/proactivity/automation.js";
|
|
@@ -298,6 +301,43 @@ var GatewayService = class {
|
|
|
298
301
|
getConfig() {
|
|
299
302
|
return this.config;
|
|
300
303
|
}
|
|
304
|
+
_mcpSetup;
|
|
305
|
+
get mcpSetup() {
|
|
306
|
+
return this._mcpSetup ??= new McpConversationSetup({
|
|
307
|
+
readConfig: () => this.currentConfig,
|
|
308
|
+
changed: (conversationId) => this.emit("session.mcp-setup.changed", { conversationId }),
|
|
309
|
+
deliver: (destination, text, setupId) => this.channelManager.send({
|
|
310
|
+
channel: "weixin",
|
|
311
|
+
chat_id: destination.peerId,
|
|
312
|
+
content: text,
|
|
313
|
+
type: "message",
|
|
314
|
+
metadata: {
|
|
315
|
+
accountId: destination.accountId,
|
|
316
|
+
mcpSetupId: setupId,
|
|
317
|
+
strictWeixinIdentity: true
|
|
318
|
+
}
|
|
319
|
+
}, {
|
|
320
|
+
skipPersist: true,
|
|
321
|
+
requireDelivery: true
|
|
322
|
+
}),
|
|
323
|
+
saveConfig: (next, expected) => this.saveConfig(next, expected),
|
|
324
|
+
withConfigLock: (operation) => withGatewayConfigWriteLock(this, operation),
|
|
325
|
+
resume: async (goal) => (await this.agentRunner.submitSessionInput({
|
|
326
|
+
conversationId: goal.conversationId,
|
|
327
|
+
expectedTranscriptId: goal.transcriptId,
|
|
328
|
+
clientMessageId: `mcp-setup:${goal.id}`,
|
|
329
|
+
delivery: "next",
|
|
330
|
+
origin: {
|
|
331
|
+
type: "system",
|
|
332
|
+
source: "internal"
|
|
333
|
+
},
|
|
334
|
+
content: `MCP configuration is saved. Discover the newly available native MCP tools and complete the original user objective. If the user only requested a connection, explain available uses without reading account data. After the actual result or accurate blocker, give one or two relevant example requests grounded in the discovered tools, and link the trusted management route ${goal.channel ? `${goal.channel.origin}/#/capabilities/connectors?tab=connected` : "/capabilities/connectors?tab=connected"}. Do not repeat configuration, request secrets, or treat this status as extra write permission. Setup data: ${JSON.stringify({
|
|
335
|
+
serverId: goal.serverId,
|
|
336
|
+
originalObjective: goal.purpose
|
|
337
|
+
})}`
|
|
338
|
+
})).ok
|
|
339
|
+
});
|
|
340
|
+
}
|
|
301
341
|
getModelCatalogSync() {
|
|
302
342
|
return this.modelCatalogSync;
|
|
303
343
|
}
|
|
@@ -549,9 +589,11 @@ var GatewayService = class {
|
|
|
549
589
|
});
|
|
550
590
|
this.chatPreviews = new ChatPreviewService({ localApps: this.localApps });
|
|
551
591
|
this.agentRunner = new GatewayAgentRunner({
|
|
592
|
+
afterConnectionResume: (input, status) => this.mcpSetup.completeContinuation(input, status === "ok" ? this.agentService.getLastAssistantPlainText(input.conversationId) : "连接已保存,但后续读取未完成。请在原微信私聊查看状态或重试;尚未验证业务结果。"),
|
|
552
593
|
continueConnection: (wait, idempotencyKey) => this.connectionRecovery.continueObjective(wait, idempotencyKey),
|
|
553
594
|
cancelConnection: (wait) => this.connectionRecovery.cancelObjective(wait),
|
|
554
595
|
validateConnectionResume: async (input) => {
|
|
596
|
+
if (!this.mcpSetup.permitsContinuation(input)) return false;
|
|
555
597
|
for (const source of input.contextSnapshots ?? []) if (source.kind === "app_context") await checkAppContextAccess(source, this.appContextDispatcher(), this.auth);
|
|
556
598
|
return this.connectionRecovery.preflight(input);
|
|
557
599
|
},
|
|
@@ -661,6 +703,7 @@ var GatewayService = class {
|
|
|
661
703
|
getConfig: () => this.config,
|
|
662
704
|
setConfig: (next) => {
|
|
663
705
|
this.config = next;
|
|
706
|
+
this._mcpSetup?.reconcileWeixinScopes();
|
|
664
707
|
},
|
|
665
708
|
getAgentService: () => this.ensureAgentService(),
|
|
666
709
|
getChannelManager: () => this.channelManager,
|
|
@@ -723,6 +766,7 @@ var GatewayService = class {
|
|
|
723
766
|
getAutomationService: () => this.automationService,
|
|
724
767
|
getBrowserAutomationService: () => this.browserAutomations,
|
|
725
768
|
getBrowserSetupService: () => this.browserSetup,
|
|
769
|
+
getMcpSetupService: () => this.mcpSetup,
|
|
726
770
|
getPhoneSetupService: () => this.phoneSetup,
|
|
727
771
|
canConfigureEndpoint: (endpointId) => this.realtime.canConfigureEndpoint(endpointId),
|
|
728
772
|
emitBrowserEvent: (type, payload) => this.emit(type, payload),
|
|
@@ -765,6 +809,7 @@ var GatewayService = class {
|
|
|
765
809
|
switchModelForSession: (sk, id) => this._agentService.switchModelForSession(sk, id)
|
|
766
810
|
});
|
|
767
811
|
this.automationService.setDeps({
|
|
812
|
+
getConfig: () => this.config,
|
|
768
813
|
agentService: this._agentService,
|
|
769
814
|
getDefaultAgentId: () => getDefaultAgentId(),
|
|
770
815
|
isAgentAvailable: (id) => listAgentEntries().some((agent) => agent.id === id && agent.enabled !== false),
|
|
@@ -798,6 +843,7 @@ var GatewayService = class {
|
|
|
798
843
|
};
|
|
799
844
|
},
|
|
800
845
|
executeSystemAction: (input) => this.executeSystemAutomationAction(input),
|
|
846
|
+
onWeixinRunCompleted: (conversationId, principalId, run) => this.deliverWeixinAutomation(conversationId, principalId, run),
|
|
801
847
|
onRunCompleted: (run, context) => this.handleAutomationRunCompleted(run, context)
|
|
802
848
|
});
|
|
803
849
|
return this._agentService;
|
|
@@ -856,6 +902,7 @@ var GatewayService = class {
|
|
|
856
902
|
return this.notificationService;
|
|
857
903
|
}
|
|
858
904
|
taskRunDispatch = createBackgroundTask(async () => {
|
|
905
|
+
await this._mcpSetup?.resumePending();
|
|
859
906
|
new TaskSignalService().tick();
|
|
860
907
|
this.notesService.flushCommittedEffects();
|
|
861
908
|
this.projects.flushCommittedEffects();
|
|
@@ -1281,6 +1328,7 @@ var GatewayService = class {
|
|
|
1281
1328
|
this.realtime.broker.publish("logs", "log.entry", entry);
|
|
1282
1329
|
});
|
|
1283
1330
|
setPairingBroadcastSink((type, payload) => {
|
|
1331
|
+
if (type === "channels.pairing.revoked" && payload.channel === "weixin") this.mcpSetup.revokeWeixinRequests(payload.accountId, payload.senderId);
|
|
1284
1332
|
this.emit(type, payload);
|
|
1285
1333
|
});
|
|
1286
1334
|
log.debug("Starting gateway service...");
|
|
@@ -1433,6 +1481,7 @@ var GatewayService = class {
|
|
|
1433
1481
|
await trace.measure("sessions.initialize", () => this.sessionIndex.initialize());
|
|
1434
1482
|
log.debug("Session manager initialized");
|
|
1435
1483
|
this.automationService.setDeps({
|
|
1484
|
+
getConfig: () => this.config,
|
|
1436
1485
|
agentService: this.agentService,
|
|
1437
1486
|
getDefaultAgentId: () => getDefaultAgentId(),
|
|
1438
1487
|
isAgentAvailable: (id) => listAgentEntries().some((agent) => agent.id === id && agent.enabled !== false),
|
|
@@ -1466,6 +1515,7 @@ var GatewayService = class {
|
|
|
1466
1515
|
};
|
|
1467
1516
|
},
|
|
1468
1517
|
executeSystemAction: (input) => this.executeSystemAutomationAction(input),
|
|
1518
|
+
onWeixinRunCompleted: (conversationId, principalId, run) => this.deliverWeixinAutomation(conversationId, principalId, run),
|
|
1469
1519
|
onRunCompleted: (run, context) => this.handleAutomationRunCompleted(run, context),
|
|
1470
1520
|
onEvent: (event) => this.projectAutomationEvent(event),
|
|
1471
1521
|
onReliabilityAttention: (input) => this.emit("automation.attention.required", input)
|
|
@@ -1555,6 +1605,10 @@ var GatewayService = class {
|
|
|
1555
1605
|
markGatewayReady() {
|
|
1556
1606
|
if (this.readiness.isReady()) return;
|
|
1557
1607
|
this.readiness.markReady();
|
|
1608
|
+
this.mcpSetup.resumePending(true).catch((err) => log.warn({
|
|
1609
|
+
err,
|
|
1610
|
+
phase: "mcp_setup_resume"
|
|
1611
|
+
}, "MCP setup continuation could not be queued"));
|
|
1558
1612
|
this.startupTrace?.mark("ready");
|
|
1559
1613
|
this.schedulePostReadySidecars();
|
|
1560
1614
|
}
|
|
@@ -1619,6 +1673,7 @@ var GatewayService = class {
|
|
|
1619
1673
|
await flushTracing();
|
|
1620
1674
|
if (!this.running) return;
|
|
1621
1675
|
this.stopping = true;
|
|
1676
|
+
this._mcpSetup?.dispose();
|
|
1622
1677
|
const { getPhoneRuntime } = await import("../phone/runtime.js");
|
|
1623
1678
|
await getPhoneRuntime().shutdown();
|
|
1624
1679
|
this.phoneStreams.close();
|
|
@@ -1718,8 +1773,8 @@ var GatewayService = class {
|
|
|
1718
1773
|
afterFeishuCredentialsPersisted() {
|
|
1719
1774
|
return this.configCoordinator.afterFeishuCredentialsPersisted();
|
|
1720
1775
|
}
|
|
1721
|
-
saveConfig(config, expectedConfig) {
|
|
1722
|
-
return this.configCoordinator.saveConfig(config, expectedConfig);
|
|
1776
|
+
saveConfig(config, expectedConfig, beforeCommit) {
|
|
1777
|
+
return this.configCoordinator.saveConfig(config, expectedConfig, beforeCommit);
|
|
1723
1778
|
}
|
|
1724
1779
|
async syncVoiceLanguage(language) {
|
|
1725
1780
|
const mode = this.config.voice?.languageMode ?? "auto";
|
|
@@ -2004,6 +2059,25 @@ var GatewayService = class {
|
|
|
2004
2059
|
}
|
|
2005
2060
|
this.createNotificationService().handleGatewayEvent(type, notificationPayload);
|
|
2006
2061
|
}
|
|
2062
|
+
async deliverWeixinAutomation(conversationId, principalId, run) {
|
|
2063
|
+
const destination = weixinPrivateIdentity(conversationId, this.currentConfig);
|
|
2064
|
+
if (!destination || destination.principalId !== principalId) throw new Error("The original Weixin notification identity is unavailable or revoked.");
|
|
2065
|
+
await this.channelManager.send({
|
|
2066
|
+
channel: "weixin",
|
|
2067
|
+
chat_id: destination.peerId,
|
|
2068
|
+
content: `${run.automationName} · ${run.status}\n${run.summary ?? run.error ?? "运行结束,无可用结果。"}`,
|
|
2069
|
+
type: "message",
|
|
2070
|
+
metadata: {
|
|
2071
|
+
accountId: destination.accountId,
|
|
2072
|
+
conversationId,
|
|
2073
|
+
automationRunId: run.id,
|
|
2074
|
+
strictWeixinIdentity: true
|
|
2075
|
+
}
|
|
2076
|
+
}, {
|
|
2077
|
+
skipPersist: true,
|
|
2078
|
+
requireDelivery: true
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2007
2081
|
async handleAutomationRunCompleted(run, context) {
|
|
2008
2082
|
deliverAutomationCompletion(run, context, this.createNotificationService(), (type, payload) => this.emit(type, payload));
|
|
2009
2083
|
}
|