@xopcai/xopc 0.0.426 → 0.0.428
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/adapters/security-adapter.js +1 -1
- package/dist/extensions/telegram/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/auth/accounts.js +2 -2
- package/dist/extensions/weixin/src/auth/pairing.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
- package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +2 -2
- package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
- package/dist/extensions/weixin/src/messaging/send.js +12 -3
- package/dist/extensions/weixin/src/monitor/monitor.js +1 -1
- package/dist/extensions/weixin/src/outbound-send.js +12 -3
- package/dist/extensions/weixin/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/gateway/static/root/assets/{activity-store-D_DXNHba.js → activity-store-WqnVruhY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CjaQxFQt.js → agent-avatar-dicebear-CSiO9c2F.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-6Z4m31Fz.js → agent-avatar-display-D-yds6wG.js} +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-_UT9C7bg.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DVzYXsAy.js +1 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-u5c3GREg.js → agents-admin-api-Bgv4lJ9Y.js} +1 -1
- package/dist/gateway/static/root/assets/agents-yTsbcxRi.js +77 -0
- package/dist/gateway/static/root/assets/{api-C3Tp9MkF.js → api-C-9J9ghT.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CRT9ZyH0.js → api-Dv6Cn-Rs.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-DRy3-k7j.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C8yc3yHG.js → app-management-settings-panel-BXJrrjH5.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BELgtR3O.js → appearance-settings-oYjAVulT.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-D95yzj-f.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BCQnOkV8.js → archive-plugin-DBPu3xCJ.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-load-DrVGNxJm.js +1 -0
- package/dist/gateway/static/root/assets/automation-api-DAou8Kji.js +1 -0
- package/dist/gateway/static/root/assets/{automation-result-state-CMfVTv_i.js → automation-result-state-CA7LV098.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-w6cKxfaP.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-CdIPdwF0.js → automations-page-D4LyOLzY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BGyvZZj5.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CIB5cbvQ.js → binary-plugins-D25P9ZxQ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BQtTLe6Q.js → block-editor-BI105p1U.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DeraGZ1y.js → browser-automation-inputs-DhDRvWQE.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-SpPzRNqU.js → browser-automations-page-CCPi1Bvy.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-control-api-CbbPvhHR.js → browser-control-api-BN4F-bM1.js} +1 -1
- package/dist/gateway/static/root/assets/browser-settings-page-BZXUZpjp.js +3 -0
- package/dist/gateway/static/root/assets/{button-CnRSIP6m.js → button-Cc4hUNTt.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DLMuj21P.js → capabilities-LC-yEQYo.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-DHJLl4RD.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-FJ3Vo7Wa.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-u2z_KFRt.js +1 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-CTUCuBlW.js → capability-header-actions-BxMYfQ8y.js} +1 -1
- package/dist/gateway/static/root/assets/channels-9Uaa-IN0.js +1 -0
- package/dist/gateway/static/root/assets/{chat-agents-api-D8YS5amE.js → chat-agents-api-Cffxfzi1.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DCzUECct.js → chat-chart-block-Bbk0b3TV.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page--dKUIg5W.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dl-OTkJI.js → chat-terminal-dock-CQMuG-Bz.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-Dijix7V6.js → command-palette-api-BRxfFgGA.js} +1 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-_9L2A5AZ.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-B-lGMimW.js → computer-settings-page-Bm70SIjD.js} +1 -1
- package/dist/gateway/static/root/assets/confirm-dialog-D7dQJytv.js +1 -0
- package/dist/gateway/static/root/assets/connected-providers-grid-B7ktDgqt.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-C8InhrMt.js → connector-service-page-BVMEg8n-.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DEJU8mgn.js → connectors-api-B07yoCzk.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-hPKaJUWY.js +1 -0
- package/dist/gateway/static/root/assets/{copy-text-row-CYIv7RfP.js → copy-text-row-CpiRzq4G.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-kqic8j73.js → date-picker-BvEnSGZK.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-XjPB8FJS.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DFNehTtd.js → desktop-pet-C1z9YDEg.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BDS7_tQ_.js → desktop-pet-settings-CbbVb8GY.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-CeZZLOc6.js → dev-view-store-38EmUIEC.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-Wb1EKiXA.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Di0h3ws4.js → directory-picker-path-field-BvKDrKc4.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-ClKEyXmN.js → discussion-annotation-sync-BfVzIwe2.js} +1 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +1 -0
- package/dist/gateway/static/root/assets/dist-BuHnPloF.js +1 -0
- package/dist/gateway/static/root/assets/dist-GJ8-1PAx.js +1 -0
- package/dist/gateway/static/root/assets/dist-ZrL34Ps4.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DwB5KMGk.js → extension-debug-page-CB9Lu3Sq.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-Cqg1K70e.js → extension-iframe-host-BzjrVAUR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DRBszrCR.js → extension-marketplace-api-DigziAgd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DyrQtG82.js → extension-page-DUa9MeaZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-C_uKqJxP.js → extension-provider-301x0rh-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BAMQHzkX.js → extension-settings-page-CP9ciZUI.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-DfkXvFnc.js → file-preview-surface-BaMGmCbw.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BOCt_zOo.js → gateway-config-swr-BD4Bf8uu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BL_Cf0OQ.js → gateway-realtime-CSd9VB7Z.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Bxkv62qs.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-CHf8qY7H.js → gateway-restart-CIUCTKYR.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-uAboiElC.js → gateway-settings-CCqF1uZv.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CvkJYurV.js → gateway-startup-retry-BsU5k8oi.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BWMbKu72.js → global-defaults-api-asOZQeM8.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Bb_RC1O9.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CQxZSTWA.js → image-generation-api-BbEnKsK1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C90644id.js → imports-page-CVnoGUyp.js} +1 -1
- package/dist/gateway/static/root/assets/index-ClPeYgQk.js +11 -0
- package/dist/gateway/static/root/assets/index-Cz-VjTNd.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-DXVOHMhS.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CbeubKe1.js → keyboard-shortcuts-settings-BCl90SrD.js} +1 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcJc9xLJ.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-C6zFgwkr.js → local-apps-page-CdAKoWfg.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-BJ1B1dQ7.js → local-session-drafts-nRGeybku.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Br7IfbXK.js → locale-store-B7y-RVe8.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CpVCvAWE.js → logs-page-McbSQwJI.js} +2 -2
- package/dist/gateway/static/root/assets/management-settings-BIR0BwNV.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DrVAMlwc.js → markdown-view-DFHa8rUg.js} +2 -2
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-Dwx4TuIr.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-Ba6vUE4J.js → media-plugins-BzzLV7wW.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DYDkJvXj.js +3 -0
- package/dist/gateway/static/root/assets/model-selector-DJSVr3LM.js +1 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-Bd-fYUrV.js → models-hub-cache-BUapaPTN.js} +1 -1
- package/dist/gateway/static/root/assets/new-chat-navigation-B6NPQ4h4.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-CJ-dPovd.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-ClPkeHe5.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CUlhTRv0.js → notes-api-ulup1oFS.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-eoKX85K5.js → notes-page-BaFNplIr.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-DMMdeaNd.js → oauth-api-DINa08-z.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-C8BXow79.js → oauth-provider-connect-C0PVEHC2.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CBFK41OS.js → page-context-capture-button-CGfR0dsc.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-LF33STHC.js → page-context-draft-DhRNxc0v.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-CoKMiYoi.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-D6CzIIfo.js → personal-avatar-DiVFO2Aw.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CiKdXLeR.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-DnYapLo7.js → personal-settings-panel-Ds4ntiqu.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DBiKtzwz.js → phone-dependencies-card-B3R6L5Qu.js} +1 -1
- package/dist/gateway/static/root/assets/phone-model-connection-ucX3Tvl8.js +1 -0
- package/dist/gateway/static/root/assets/{phone-model-picker-BmSxEr7M.js → phone-model-picker-CU37sziM.js} +1 -1
- package/dist/gateway/static/root/assets/phone-settings-page-BSdB2pnW.js +1 -0
- package/dist/gateway/static/root/assets/{phone-workspace-store-SN7hfddU.js → phone-workspace-store-Cmes9gQ4.js} +1 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-DblFhnuC.js +1 -0
- package/dist/gateway/static/root/assets/{popover-select-DD8fmrxH.js → popover-select-CEMWIrtY.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-Cu_ZC9Up.js → preference-select-fields-D2-QfMN5.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-Tn2dUJWM.js → product-automation-feedback-BzY3z8zu.js} +2 -2
- package/dist/gateway/static/root/assets/{product-open-page-Nf-Oqf1h.js → product-open-page-BKw6H0Mn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-D6NwUm3A.js → product-preview-content-CNaJb6Bj.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-BfNcGgXA.js → product-preview-modal-DgwrrpqJ.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-FReFYUv0.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-B1BK7Ixi.js → project-understanding-CrSkrJnM.js} +1 -1
- package/dist/gateway/static/root/assets/projects-page-Cp91_KzA.js +1 -0
- package/dist/gateway/static/root/assets/{providers-api-DOnNfkwQ.js → providers-api-CBSC3jdu.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-RAhaLUcQ.js → recording-upload-DBHAGKZj.js} +1 -1
- package/dist/gateway/static/root/assets/{refresh-button-bU_0NarN.js → refresh-button-DiWdGAaX.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DFDvOTg4.js → registry-api-QZEjziDq.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DWsOWetc.js → remote-access-hub-BdXxFQfH.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-TQcRCpAg.js → resource-unavailable-BTNhcOHF.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-DS4fVFbc.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-9o3Wfji1.js → runtime-tools-api-BDTUD8Rj.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BGiXeHF5.js → runtime-tools-settings-panel-CYEzIrDf.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BKeP5G7b.js → schema-form-C-jw6Hid.js} +1 -1
- package/dist/gateway/static/root/assets/{secret-input-BQvFXqzz.js → secret-input-Dryrns2s.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-BEnNx0u7.js → service-recommendation-list-CfeYH6lK.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bs3r_d2_.js → session-api-DVXLCZX2.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DjRWxXJG.js +23 -0
- package/dist/gateway/static/root/assets/sessions-page-C8gwrFHR.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BMHe9uwy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CURRjsLK.js → settings-advanced-section-BmrbHgQa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-CiRpsdTJ.js → settings-mode-store-Bk_hzwPK.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-GtsbT6as.js → settings-page-DCQnHCNN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-DBL0_u0Z.js → settings-page-header-BLKI3_9N.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-IAvpbz4A.js → settings-page-layout-BqBVrkC9.js} +1 -1
- package/dist/gateway/static/root/assets/setup-interaction-page-B9ACeAvO.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-DEefuWo3.js +1 -0
- package/dist/gateway/static/root/assets/share-link-dialog-C2LyeNzj.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-L9KYu8M7.js → share-preview-page-BFwEr7Ws.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-D8Q-m46d.js → shares-api-CTFkLQxq.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CpK3yhtc.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-uKU4sRiv.js → skill-api-DpicfA6o.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-BzKzG-xG.js → skill-list-api-B8fegRLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DkUXekcd.js → skill-reload-api-VmC8ySUy.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-BIWXS6Ki.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CsvcFoaJ.js → system-settings-panel-BmoA92oX.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-L5RIelv0.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-B8xUiwW3.js → task-result-evidence-BV-6hBVU.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DJVC7HqA.js → terminal-panel-store-BGdKE9hU.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-Dlnmgryi.js → theme-store-Dvv79Wb2.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-B4uA4Pnz.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-BB7u79ID.js → tunnel-api-BurZtvqx.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-C4bblRnQ.js → understanding-activity-store-C1cLL8zq.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BvCj9-Ue.js → understanding-refresh-store-C3Lr_pjY.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Cv4Je5XJ.js → usage-page-C91ZzLm9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-YHxQ-UZg.js → use-autosave-zkzRuUtx.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CoiQAgjo.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DFzy6iVy.js +2 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-D2Un8G1L.js → use-personal-profile-BB10h9ED.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-BQEiJzK7.js → use-workspace-tree-sF5DcONt.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-WFnD5utO.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DCM69u8Y.js → voice-api-key-field-Bqa4PeZx.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CrULrSKC.js → voice-config-api-LNO2xXHk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-DFMNIyy4.js → voice-input-shortcut-events-AzfhxBX7.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cb8i6dLb.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CVe9UmFl.js → work-discovery-overlay-CdQUiV-a.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CtqkRMN5.js → work-discovery-page-HcUloXxf.js} +1 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-Dv1HUipe.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-api-tbifz2zY.js → workspace-api-Am2ee4R6.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CqHcVFhS.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BubQwQwU.js → workspace-file-preview-dialog-z5Q00v92.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-DZk3MBSa.js → workspace-open-location-menu-4ONYaGy0.js} +1 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-DimGN59n.js +1 -0
- package/dist/gateway/static/root/index.html +99 -97
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +8 -0
- package/dist/packages/gateway-contract/src/capabilities.js +7 -3
- package/dist/packages/gateway-contract/src/home.js +12 -2
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +1 -0
- package/dist/src/agent/background-review/prompts.js +11 -6
- package/dist/src/agent/background-review/run-background-review.js +12 -3
- package/dist/src/agent/child-agent-factory.js +1 -1
- package/dist/src/agent/context/execution-context.js +3 -1
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/configuration-capability-correction.d.ts +3 -0
- package/dist/src/agent/embedded/configuration-capability-correction.js +14 -0
- package/dist/src/agent/embedded/run-for-session.js +20 -5
- package/dist/src/agent/embedded/run-turn.js +25 -2
- package/dist/src/agent/embedded/session-runner.js +10 -3
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +4 -1
- package/dist/src/agent/independent-execution.js +1 -1
- package/dist/src/agent/mcp/config.js +1 -1
- package/dist/src/agent/mcp/connection-drafts.d.ts +5 -2
- package/dist/src/agent/mcp/connection-drafts.js +6 -4
- package/dist/src/agent/mcp/connection-setup.d.ts +15 -1
- package/dist/src/agent/mcp/connection-setup.js +223 -78
- package/dist/src/agent/mcp/continuation-guard.d.ts +3 -0
- package/dist/src/agent/mcp/continuation-guard.js +54 -0
- package/dist/src/agent/mcp/continuation-input.d.ts +4 -0
- package/dist/src/agent/mcp/continuation-input.js +13 -0
- package/dist/src/agent/mcp/conversation-setup.d.ts +282 -0
- package/dist/src/agent/mcp/conversation-setup.js +856 -0
- package/dist/src/agent/mcp/discovery.d.ts +102 -0
- package/dist/src/agent/mcp/discovery.js +219 -0
- package/dist/src/agent/mcp/native-mcp.d.ts +1 -0
- package/dist/src/agent/mcp/native-mcp.js +8 -1
- package/dist/src/agent/mcp/setup-plan.d.ts +76 -0
- package/dist/src/agent/mcp/setup-plan.js +93 -0
- package/dist/src/agent/mcp/tool-catalog.d.ts +7 -0
- package/dist/src/agent/mcp/tool-catalog.js +26 -3
- package/dist/src/agent/mcp/transport.d.ts +20 -0
- package/dist/src/agent/mcp/transport.js +188 -0
- package/dist/src/agent/mcp/weixin-setup-scope.d.ts +12 -0
- package/dist/src/agent/mcp/weixin-setup-scope.js +43 -0
- package/dist/src/agent/orchestration/delegation-scope.d.ts +2 -1
- package/dist/src/agent/prompt/conversational-configuration-guide.js +2 -1
- package/dist/src/agent/prompt/sections/tooling.js +3 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +3 -2
- package/dist/src/agent/service/process-direct-streaming.js +4 -3
- package/dist/src/agent/service.d.ts +2 -0
- package/dist/src/agent/service.js +15 -1
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +6 -4
- package/dist/src/agent/tool-manuals/xopc-configuration.js +125 -8
- package/dist/src/agent/tools/automation-tool.d.ts +9 -1
- package/dist/src/agent/tools/automation-tool.js +34 -5
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -0
- package/dist/src/agent/tools/factory.js +35 -24
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +5 -4
- package/dist/src/agent/tools/mcp-setup-tool.d.ts +9 -0
- package/dist/src/agent/tools/mcp-setup-tool.js +36 -0
- package/dist/src/agent/tools/personal-task-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/skill-install-tool.js +56 -1
- package/dist/src/agent/tools/skill-manage-tool.d.ts +4 -0
- package/dist/src/agent/tools/skill-manage-tool.js +74 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/tool-manual-tool.d.ts +1 -1
- package/dist/src/agent/tools/tool-manual-tool.js +3 -1
- package/dist/src/agent/tools/toolExposure.js +2 -0
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +5 -2
- package/dist/src/agent/tools/xopc-use-tool.js +81 -10
- package/dist/src/agent-catalog/service.d.ts +1 -1
- package/dist/src/agent-catalog/service.js +2 -1
- package/dist/src/automations/api/routes.js +13 -5
- package/dist/src/automations/capabilities/drafts.js +5 -2
- package/dist/src/automations/capabilities/read.js +49 -10
- package/dist/src/automations/capabilities/write.d.ts +111 -52
- package/dist/src/automations/capabilities/write.js +44 -10
- package/dist/src/automations/delivery/delivery-router.d.ts +1 -0
- package/dist/src/automations/delivery/delivery-router.js +7 -1
- package/dist/src/automations/domain/types.d.ts +10 -0
- package/dist/src/automations/domain/validation.d.ts +24 -0
- package/dist/src/automations/domain/validation.js +7 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +6 -0
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/mcp-source.d.ts +60 -0
- package/dist/src/automations/mcp-source.js +173 -0
- package/dist/src/automations/service/action-executor.js +15 -1
- package/dist/src/automations/service/automation-service.d.ts +12 -0
- package/dist/src/automations/service/automation-service.js +61 -4
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-run-repository.d.ts +11 -2
- package/dist/src/automations/storage/automation-run-repository.js +28 -24
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/browser/setup/repository.d.ts +1 -0
- package/dist/src/browser/setup/repository.js +7 -1
- package/dist/src/browser/setup/service.d.ts +3 -0
- package/dist/src/browser/setup/service.js +41 -18
- package/dist/src/browser/setup/types.d.ts +1 -0
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.d.ts +1 -0
- package/dist/src/channels/outbound-sender.d.ts +1 -0
- package/dist/src/channels/outbound-sender.js +3 -0
- package/dist/src/channels/pairing/pairing-service.js +1 -1
- package/dist/src/channels/weixin/account-identity.d.ts +2 -0
- package/dist/src/channels/weixin/account-identity.js +15 -0
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/channels.js +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/config/schema.d.ts +3 -0
- package/dist/src/config/schema.js +3 -2
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.d.ts +2 -1
- package/dist/src/extensions/agent-plugins/setup.js +4 -3
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/channels.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +39 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +33 -9
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/provider-setup.js +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +22 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -5
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +3 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +2 -1
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/sessions-api.js +2 -1
- package/dist/src/gateway/service.d.ts +5 -1
- package/dist/src/gateway/service.js +97 -22
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/session-reset-service.d.ts +1 -0
- package/dist/src/gateway/session-reset-service.js +15 -2
- package/dist/src/home-intelligence/evidence-presentation.d.ts +3 -0
- package/dist/src/home-intelligence/evidence-presentation.js +30 -0
- package/dist/src/home-intelligence/generator.d.ts +8 -0
- package/dist/src/home-intelligence/generator.js +15 -4
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/home-intelligence/policy.js +3 -0
- package/dist/src/memory-learning/repository.d.ts +6 -1
- package/dist/src/memory-learning/repository.js +10 -5
- package/dist/src/memory-learning/service.js +23 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/request-service.js +3 -3
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/setup/service.d.ts +14 -4
- package/dist/src/phone/setup/service.js +106 -28
- package/dist/src/process/mcp-stdio-supervisor.d.ts +1 -0
- package/dist/src/process/mcp-stdio-supervisor.js +14 -0
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.d.ts +2 -0
- package/dist/src/runtime-tools/phone-dependencies.js +10 -0
- package/dist/src/share/note-share-service.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +3 -3
- package/dist/src/tasks/task-application-service.js +2 -2
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-criterion-review-repository.js +1 -1
- package/dist/src/tasks/task-handoff.js +1 -1
- package/dist/src/tasks/task-research-result.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/extraction/registry.js +2 -2
- package/dist/src/user-model/capture/executor.d.ts +1 -0
- package/dist/src/user-model/capture/executor.js +6 -6
- package/dist/src/user-model/capture/semantic.d.ts +3 -0
- package/dist/src/user-model/capture/semantic.js +14 -4
- package/package.json +3 -1
- package/skills/tools/configure-xopc/SKILL.md +10 -3
- package/skills/tools/configure-xopc/references/browser/chrome-extension.md +4 -1
- package/skills/tools/configure-xopc/references/browser/overview.md +2 -2
- package/skills/tools/configure-xopc/references/phone/aliyun.md +3 -2
- package/skills/tools/configure-xopc/references/phone/overview.md +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Dne9A10p.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BoHL-b1o.js +0 -1
- package/dist/gateway/static/root/assets/agents-CIiIlVBp.js +0 -77
- package/dist/gateway/static/root/assets/app-link-1j40sJ-z.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-vgS1CHDj.js +0 -1
- package/dist/gateway/static/root/assets/attachment-load-qjPpQzYY.js +0 -1
- package/dist/gateway/static/root/assets/automation-api-hRsGx-qe.js +0 -1
- package/dist/gateway/static/root/assets/automation-task-card-MnzgyTVA.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-C3xZLafX.js +0 -9
- package/dist/gateway/static/root/assets/browser-settings-page-BD1uF_Nb.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-BGE6hiUE.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-Bda4mSdf.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B2B7no22.js +0 -8
- package/dist/gateway/static/root/assets/channels-NtsjZThx.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-BnOCCAXG.js +0 -72
- package/dist/gateway/static/root/assets/composer-payload-handoff-CQc-VTaL.js +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-XGclfBqe.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-CcXe9kz5.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Ci0L2How.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-cbC6-2Ya.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-_3BJFWVQ.js +0 -1
- package/dist/gateway/static/root/assets/dist-CaUuvp8-.js +0 -1
- package/dist/gateway/static/root/assets/dist-D3lWNSe7.js +0 -1
- package/dist/gateway/static/root/assets/dist-DfWfZ9iu.js +0 -1
- package/dist/gateway/static/root/assets/dist-DusecO_p.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BHBOPF_q.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D6pCBY1V.js +0 -2
- package/dist/gateway/static/root/assets/index-Cc41XQid.css +0 -1
- package/dist/gateway/static/root/assets/index-CnOYR6jq.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-BuNXON0P.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CP-BkbB6.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-I-pXv4ML.js +0 -1
- package/dist/gateway/static/root/assets/messages-ByFlEbsu.js +0 -3
- package/dist/gateway/static/root/assets/model-selector-CXcxc30J.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CbpLXAVh.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-cLGiF8oU.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-Du44NIEJ.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CXR1Gy0x.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-vg65qilc.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-B3Hn2cbx.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-Ch-ZMyTu.js +0 -7
- package/dist/gateway/static/root/assets/projects-page-B7cetxao.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-Zc5Z3fNv.js +0 -2
- package/dist/gateway/static/root/assets/send-1f1Ntw6E.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-ChUtTAoG.js +0 -23
- package/dist/gateway/static/root/assets/sessions-page-Bt52kBvJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BI4DMz4_.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-A6uMpGRy.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-D1otGSXD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bmfadz8A.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BZklXTX9.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-SjZGW1Dx.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-MvG4SH64.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-vDdxHtUb.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-Ce2mgYme.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DRSsn4EV.js +0 -2
- package/dist/gateway/static/root/assets/voice-transcribe-api-Bbyj0yGR.js +0 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-CDZ1xh3o.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-4cZ26iaD.js +0 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-CIavPUr3.js +0 -1
|
@@ -554,7 +554,7 @@ var init_capabilities = __esmMin((() => {
|
|
|
554
554
|
})
|
|
555
555
|
},
|
|
556
556
|
"xopc.automations.get_run": {
|
|
557
|
-
input: CapabilityResourceInputSchema,
|
|
557
|
+
input: CapabilityResourceInputSchema.extend({ waitMs: z.number().int().min(0).max(3e4).optional() }),
|
|
558
558
|
output: z.object({
|
|
559
559
|
ok: z.literal(true),
|
|
560
560
|
run: AutomationRunSchema.loose()
|
|
@@ -689,7 +689,8 @@ var init_capabilities = __esmMin((() => {
|
|
|
689
689
|
output: z.object({
|
|
690
690
|
ok: z.literal(true),
|
|
691
691
|
items: z.array(AutomationSchema.loose()),
|
|
692
|
-
projectId: z.string().optional()
|
|
692
|
+
projectId: z.string().optional(),
|
|
693
|
+
executionSummaries: z.record(z.string(), z.object({ unreadCount: z.number().int().nonnegative() })).optional()
|
|
693
694
|
})
|
|
694
695
|
},
|
|
695
696
|
"xopc.automations.get": {
|
|
@@ -703,12 +704,15 @@ var init_capabilities = __esmMin((() => {
|
|
|
703
704
|
input: z.strictObject({
|
|
704
705
|
automationId: z.string().trim().min(1).optional(),
|
|
705
706
|
projectId: z.string().trim().min(1).optional(),
|
|
707
|
+
cursor: z.string().max(1024).optional(),
|
|
706
708
|
limit: z.number().int().min(1).max(200).default(50)
|
|
707
709
|
}),
|
|
708
710
|
output: z.object({
|
|
709
711
|
ok: z.literal(true),
|
|
710
712
|
items: z.array(AutomationRunSchema.loose()),
|
|
711
|
-
projectId: z.string().optional()
|
|
713
|
+
projectId: z.string().optional(),
|
|
714
|
+
hasMore: z.boolean().optional(),
|
|
715
|
+
nextCursor: z.string().optional()
|
|
712
716
|
})
|
|
713
717
|
},
|
|
714
718
|
"xopc.settings.open": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region packages/gateway-contract/src/home.ts
|
|
4
|
-
var HomeDecisionSchema, HomeActionSchema, HomeWorkbenchItemSchema, HomeRunningConversationSchema, HomeEvidenceSchema, HomeCapabilityReadinessSchema, HomeCapabilityBlockerSchema, HomeCapabilityPreflightSchema, HomeOpportunitySchema, HomeClarificationSchema, HomeAdvisorSchema, HomeAdvisorRefreshRequestSchema, HomeOpportunityFeedbackRequestSchema, HomeOpportunityFeedbackUndoRequestSchema, HomeOpportunityHistoryItemSchema, HomeOpportunityHistoryResponseSchema, HomeOpportunityActionRequestSchema, HomeAdviceMetricsSchema, TaskValueMetricsSchema;
|
|
4
|
+
var HomeDecisionSchema, HomeActionSchema, HomeWorkbenchItemSchema, HomeRunningConversationSchema, HomeEvidenceSchema, HomeCapabilityReadinessSchema, HomeCapabilityBlockerSchema, HomeCapabilityPreflightSchema, HomeEvidenceGroupSchema, HomeEvidencePresentationSchema, HomeOpportunitySchema, HomeClarificationSchema, HomeAdvisorSchema, HomeAdvisorRefreshRequestSchema, HomeOpportunityFeedbackRequestSchema, HomeOpportunityFeedbackUndoRequestSchema, HomeOpportunityHistoryItemSchema, HomeOpportunityHistoryResponseSchema, HomeOpportunityActionRequestSchema, HomeAdviceMetricsSchema, TaskValueMetricsSchema;
|
|
5
5
|
var init_home = __esmMin((() => {
|
|
6
6
|
HomeDecisionSchema = z.object({
|
|
7
7
|
id: z.string(),
|
|
@@ -177,6 +177,15 @@ var init_home = __esmMin((() => {
|
|
|
177
177
|
})).min(1).max(12),
|
|
178
178
|
degradedAction: z.strictObject({ mode: z.literal("degraded_start") }).optional()
|
|
179
179
|
})]);
|
|
180
|
+
HomeEvidenceGroupSchema = z.strictObject({
|
|
181
|
+
summary: z.string().trim().min(1).max(300),
|
|
182
|
+
evidenceIds: z.array(z.string().trim().min(1).max(300)).min(1).max(8)
|
|
183
|
+
});
|
|
184
|
+
HomeEvidencePresentationSchema = z.strictObject({
|
|
185
|
+
version: z.literal(1),
|
|
186
|
+
locale: z.enum(["zh", "en"]),
|
|
187
|
+
groups: z.array(HomeEvidenceGroupSchema).min(1).max(8)
|
|
188
|
+
});
|
|
180
189
|
HomeOpportunitySchema = z.strictObject({
|
|
181
190
|
id: z.string().trim().min(1).max(200),
|
|
182
191
|
revision: z.number().int().positive(),
|
|
@@ -192,6 +201,7 @@ var init_home = __esmMin((() => {
|
|
|
192
201
|
outcome: z.string().trim().min(1).max(1e3),
|
|
193
202
|
rationale: z.string().trim().min(1).max(1500),
|
|
194
203
|
evidence: z.array(HomeEvidenceSchema).min(1).max(8),
|
|
204
|
+
evidencePresentation: HomeEvidencePresentationSchema.optional(),
|
|
195
205
|
confidence: z.enum([
|
|
196
206
|
"high",
|
|
197
207
|
"medium",
|
|
@@ -423,4 +433,4 @@ var init_home = __esmMin((() => {
|
|
|
423
433
|
}));
|
|
424
434
|
//#endregion
|
|
425
435
|
init_home();
|
|
426
|
-
export { HomeActionSchema, HomeAdviceMetricsSchema, HomeAdvisorRefreshRequestSchema, HomeAdvisorSchema, HomeCapabilityBlockerSchema, HomeCapabilityPreflightSchema, HomeCapabilityReadinessSchema, HomeClarificationSchema, HomeDecisionSchema, HomeEvidenceSchema, HomeOpportunityActionRequestSchema, HomeOpportunityFeedbackRequestSchema, HomeOpportunityFeedbackUndoRequestSchema, HomeOpportunityHistoryItemSchema, HomeOpportunityHistoryResponseSchema, HomeOpportunitySchema, HomeRunningConversationSchema, HomeWorkbenchItemSchema, TaskValueMetricsSchema, init_home };
|
|
436
|
+
export { HomeActionSchema, HomeAdviceMetricsSchema, HomeAdvisorRefreshRequestSchema, HomeAdvisorSchema, HomeCapabilityBlockerSchema, HomeCapabilityPreflightSchema, HomeCapabilityReadinessSchema, HomeClarificationSchema, HomeDecisionSchema, HomeEvidenceGroupSchema, HomeEvidencePresentationSchema, HomeEvidenceSchema, HomeOpportunityActionRequestSchema, HomeOpportunityFeedbackRequestSchema, HomeOpportunityFeedbackUndoRequestSchema, HomeOpportunityHistoryItemSchema, HomeOpportunityHistoryResponseSchema, HomeOpportunitySchema, HomeRunningConversationSchema, HomeWorkbenchItemSchema, TaskValueMetricsSchema, init_home };
|
|
@@ -100,6 +100,7 @@ export interface AgentManagerConfig {
|
|
|
100
100
|
canConfigureEndpoint?: (endpointId: string) => boolean;
|
|
101
101
|
getPhoneSetupService?: () => import('../phone/setup/service.js').PhoneSetupService | undefined;
|
|
102
102
|
getBrowserSetupService?: () => import('../browser/setup/service.js').BrowserSetupService | undefined;
|
|
103
|
+
getMcpSetupService?: () => import('./mcp/conversation-setup.js').McpConversationSetup | undefined;
|
|
103
104
|
getBrowserAutomationService?: () => import('../browser/automations/index.js').BrowserAutomationService | undefined;
|
|
104
105
|
emitBrowserEvent?: (type: string, payload: unknown) => void;
|
|
105
106
|
/** Gateway: exposes first-class xopc product objects for the `xopc_use` tool. */
|
|
@@ -287,6 +287,7 @@ var AgentManager = class {
|
|
|
287
287
|
getAutomationService: this.config.getAutomationService,
|
|
288
288
|
getBrowserAutomationService: this.config.getBrowserAutomationService,
|
|
289
289
|
getBrowserSetupService: this.config.getBrowserSetupService,
|
|
290
|
+
getMcpSetupService: this.config.getMcpSetupService,
|
|
290
291
|
getPhoneSetupService: this.config.getPhoneSetupService,
|
|
291
292
|
canConfigureEndpoint: this.config.canConfigureEndpoint,
|
|
292
293
|
emitBrowserEvent: this.config.emitBrowserEvent,
|
|
@@ -13,15 +13,15 @@ Return exactly this top-level shape:
|
|
|
13
13
|
{"intent":"none","assertions":[],"goals":[],"collaborationRules":[],"knowledge":[],"knowledgeDeletions":[],"targetAssertionIds":[],"abstentionReason":"..."}
|
|
14
14
|
|
|
15
15
|
Assertion operation shape:
|
|
16
|
-
{"action":"create","subject":{"type":"user","id":"self"},"predicate":"preference.response.detail","cardinality":"single","scope":{"type":"global"},"kind":"preference","value":"concise","normalizedValue":"concise","statement":"Prefers concise answers.","authority":"
|
|
16
|
+
{"intent":"user_assertion","action":"create","subject":{"type":"user","id":"self"},"predicate":"preference.response.detail","cardinality":"single","scope":{"type":"global"},"kind":"preference","value":"concise","normalizedValue":"concise","statement":"Prefers concise answers.","authority":"user_explicit","confidence":0.95,"declaredImportance":0.8,"inferredImportance":0.6,"consequence":"medium","actionability":1,"volatility":"stable","sensitivity":"normal","disclosurePolicy":"referenceable","applicability":{"operation":"response"},"temporalResolution":"exact","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
17
17
|
|
|
18
18
|
For merge or replace, use the same assertion operation shape with action set to "merge" or "replace" and include targetAssertionId from the existing assertions. Create must omit targetAssertionId.
|
|
19
19
|
|
|
20
20
|
Goal shape:
|
|
21
|
-
{"title":"Ship Atlas","desiredOutcome":"Atlas is released with all acceptance checks passing.","scope":{"type":"project","id":"exact-project-id"},"declaredImportance":0.9,"targetAt":"2026-09-30T18:00:00+08:00","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
21
|
+
{"intent":"user_assertion","title":"Ship Atlas","desiredOutcome":"Atlas is released with all acceptance checks passing.","scope":{"type":"project","id":"exact-project-id"},"declaredImportance":0.9,"targetAt":"2026-09-30T18:00:00+08:00","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
22
22
|
|
|
23
23
|
Collaboration rule shape:
|
|
24
|
-
{"category":"communication","priority":10,"scope":{"type":"global"},"conditions":{"enforcementLevel":"prompt"},"statement":"Keep status updates concise.","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
24
|
+
{"intent":"user_assertion","category":"communication","priority":10,"scope":{"type":"global"},"conditions":{"enforcementLevel":"prompt"},"statement":"Keep status updates concise.","evidence":[{"ref":"entry-id","quote":"exact quote"}],"selfContained":true,"unresolvedReferences":[]}
|
|
25
25
|
|
|
26
26
|
Work knowledge shape (independent of user intent):
|
|
27
27
|
{"kind":"decision","topicKey":"atlas-storage","predicate":"storage.choice","statement":"Atlas uses SQLite because deployment must stay local.","scope":"${options.scopeContext?.projectId ? "project" : "workspace"}","confidence":0.8,"importance":0.8,"evidence":[{"ref":"entry-id","quote":"exact quote"}]}
|
|
@@ -39,7 +39,7 @@ Knowledge forgetting operation (only an explicit user instruction, never quoted/
|
|
|
39
39
|
Return these in knowledgeDeletions. For dates/times or prices, reread binds a later explicit original-source read to BOTH the same subject and forgotten property (date_time or price). subject must be the exact shortest entity name from the user's forget quote, excluding possessives and the property. Do not include forgotten values. Omit reread for other property types; an unrelated read request must never bypass the boundary. Target all visible old and corrected variants of ONLY the requested fact. If no matching fact was ever admitted, return targetKnowledgeIds=[] with a grounded reread subject/property boundary; never invent a target ID. Preserve unrelated information. If a targeted item also contains facts the user did not ask to forget (especially facts explicitly allowed to remain), retained MUST preserve those facts. Each spans entry must be an exact contiguous substring of that same item's content; include its subject plus retained property and value, exclude ALL forgotten values. The host joins these spans without generating facts. Use retained=[] for atomic facts fully covered by forgetting. Do not delete an unrelated item to manufacture retention. boundary states the requested restriction and permitted exceptions without repeating any forgotten values. Do not recreate forgotten facts in knowledge, assertions or goals. A request to read an original record is query, not permission to store it again. In transcript mode operations may include intent="forget" for their own supporting utterance.
|
|
40
40
|
|
|
41
41
|
Allowed intents: remember, query, confirm, correct, forget, user_assertion, task, none.
|
|
42
|
-
In transcript mode,
|
|
42
|
+
In BOTH turn and transcript mode, give every assertion, goal and collaboration rule its own intent. Classify each supporting clause independently; the top-level intent describes the main request only. A task must not discard a durable preference in the same message or an earlier message. Never use assistant or tool text as an explicit owner instruction.
|
|
43
43
|
Allowed subject types: user, person, goal, project, topic.
|
|
44
44
|
Allowed kinds: identity, preference, value, routine, capability, relationship, current_state, derived_insight.
|
|
45
45
|
Allowed scopes: global without id; agent, workspace, project, or session with the exact supplied id.
|
|
@@ -48,7 +48,12 @@ Rules:
|
|
|
48
48
|
- Omit optional fields when absent; never use null. Use only the documented fields and enum values.
|
|
49
49
|
- Extract at most four goals and four collaboration rules.
|
|
50
50
|
- A question about what is remembered uses query and creates no assertion operation.
|
|
51
|
-
- A request to create, summarize, update, investigate, or track work uses task
|
|
51
|
+
- A request to create, summarize, update, investigate, or track work uses top-level task. Still extract independently supported durable personal statements from it.
|
|
52
|
+
- Example: "Fix this page; from now on use Chinese for UI copy in this project" produces top-level task, a project-scoped preference with intent=user_assertion, and any independent work facts. It does not imply a global language preference.
|
|
53
|
+
- Distinguish the user from their work: identity, capabilities, recurring habits and ongoing collaboration preferences belong in assertions; project technology, bugs, decisions, deadlines and progress belong in knowledge. Do not store the same personal preference only as work knowledge.
|
|
54
|
+
- A direct ongoing preference needs no separate remember command. One-off requests such as "make this title blue" do not establish a lasting preference.
|
|
55
|
+
- Observed behavior or synthesized understanding requires at least two distinct user messages with independent supporting choices. Repeated assistant summaries, copied user messages and a single local choice do not establish a pattern. Preserve scope and label these claims user_observed or system_inferred.
|
|
56
|
+
- Ongoing communication and collaboration preferences must also be represented as personal preference assertions so they can guide the next relevant response without waiting for a rule to be confirmed.
|
|
52
57
|
- Every assertion operation needs an exact quote from a user message. Assistant messages can resolve context but are never evidence.
|
|
53
58
|
- Extract zero to eight independent assertion operations. Each operation represents one stable predicate and one value.
|
|
54
59
|
- Extract a goal only when the user explicitly describes a durable desired outcome, not a one-off task request.
|
|
@@ -64,7 +69,7 @@ Rules:
|
|
|
64
69
|
- Omit temporary reactions and one-off task instructions.
|
|
65
70
|
- Never include passwords, credentials, regulated identifiers, or speculative diagnoses.
|
|
66
71
|
- Use user_explicit only for a fact or preference the user directly states, user_observed for repeated behavior, and system_inferred for synthesis. No separate remember command is required for an ordinary direct statement.
|
|
67
|
-
- A project-specific choice stays scoped to that project. Do not generalize it into a global preference.
|
|
72
|
+
- A project-specific choice stays scoped to that project. If no exact project ID is supplied, use the known session scope rather than inventing an ID or broadening to global. Do not generalize it into a global preference.
|
|
68
73
|
- Existing memory, assistant output, repeated summaries, and lack of objection are not new supporting evidence.
|
|
69
74
|
- If evidence is insufficient, return assertions=[] and explain abstentionReason.
|
|
70
75
|
${existing}`;
|
|
@@ -459,16 +459,25 @@ async function runPersistentLearningJobInner(job, getConfig) {
|
|
|
459
459
|
failLearningJob(job, "policy_changed", true);
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
|
+
const personalRebuild = job.extractor_version?.startsWith("understanding-") === true;
|
|
462
463
|
let committed = false;
|
|
463
464
|
try {
|
|
464
465
|
committed = finishLearningJob(job, () => {
|
|
465
466
|
const access = resolveUserContextSessionAccess(current, job.conversation_id);
|
|
466
467
|
const projectId = getSessionMetadata(job.conversation_id)?.projectId;
|
|
467
468
|
const result = access.userModel ? executeUserModelInterpretation({
|
|
468
|
-
interpretation
|
|
469
|
+
interpretation: personalRebuild ? {
|
|
470
|
+
...interpretation,
|
|
471
|
+
intent: "user_assertion",
|
|
472
|
+
targetAssertionIds: [],
|
|
473
|
+
goals: [],
|
|
474
|
+
collaborationRules: [],
|
|
475
|
+
assertions: interpretation.intent === "forget" ? [] : interpretation.assertions
|
|
476
|
+
} : interpretation,
|
|
469
477
|
evidence,
|
|
470
478
|
extractionRunId: extraction.run.id,
|
|
471
479
|
extractorId: "transcript-synthesis",
|
|
480
|
+
allowRestoreDeleted: !personalRebuild,
|
|
472
481
|
scopeContext: {
|
|
473
482
|
conversationId: job.conversation_id,
|
|
474
483
|
agentId,
|
|
@@ -487,7 +496,7 @@ async function runPersistentLearningJobInner(job, getConfig) {
|
|
|
487
496
|
workspaceId: job.workspace_id,
|
|
488
497
|
projectId
|
|
489
498
|
};
|
|
490
|
-
const deletions = access.knowledge ? applyKnowledgeDeletions({
|
|
499
|
+
const deletions = !personalRebuild && access.knowledge ? applyKnowledgeDeletions({
|
|
491
500
|
interpretation,
|
|
492
501
|
evidence,
|
|
493
502
|
context: deletionContext,
|
|
@@ -496,7 +505,7 @@ async function runPersistentLearningJobInner(job, getConfig) {
|
|
|
496
505
|
limit: 200
|
|
497
506
|
}).filter((item) => canUseKnowledge(item, deletionContext, access.knowledgePolicy)).map((item) => item.id)
|
|
498
507
|
}) : [];
|
|
499
|
-
const work = interpretation.intent !== "forget" && !interpretation.knowledgeDeletions?.length && access.knowledge && current.userContext.knowledgeMemory.writePolicy === "allow" && access.knowledgePolicy.contentSources.includes("memory") ? applyWorkCandidates({
|
|
508
|
+
const work = !personalRebuild && interpretation.intent !== "forget" && !interpretation.knowledgeDeletions?.length && access.knowledge && current.userContext.knowledgeMemory.writePolicy === "allow" && access.knowledgePolicy.contentSources.includes("memory") ? applyWorkCandidates({
|
|
500
509
|
candidates: (interpretation.knowledge ?? []).filter((candidate) => access.knowledgePolicy.scopes.includes(candidate.scope)),
|
|
501
510
|
evidence,
|
|
502
511
|
conversationId: job.conversation_id,
|
|
@@ -3,6 +3,7 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { cloudCreditBudgetStopMessage, isCloudCreditBudgetExhausted } from "../providers/xopc-cloud-credit-budget.js";
|
|
4
4
|
import { resolveAgentAbortReason } from "./orchestration/run-termination.js";
|
|
5
5
|
import { executeWithTimeout } from "./lifecycle/timeout-wrapper.js";
|
|
6
|
+
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
6
7
|
import { withDataToolPermissions } from "./tools/dataBatch.js";
|
|
7
8
|
import { withSearchCache } from "./tools/search/cache.js";
|
|
8
9
|
import { evictEmbeddedSessionRunner } from "./embedded/session-runner.js";
|
|
@@ -11,7 +12,6 @@ import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
|
|
|
11
12
|
import { createAgentTurnPolicy } from "./orchestration/agent-turn-policy.js";
|
|
12
13
|
import { createDelegationBudgetPolicy, resolveDelegationBudget } from "./orchestration/delegation-budget.js";
|
|
13
14
|
import { buildSubagentSystemPrompt } from "./prompt/subagent-context.js";
|
|
14
|
-
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
15
15
|
import { createResearchCheckpointTool } from "./tools/research-checkpoint-tool.js";
|
|
16
16
|
import { randomUUID } from "node:crypto";
|
|
17
17
|
//#region src/agent/child-agent-factory.ts
|
|
@@ -46,6 +46,7 @@ function urgency(assertion, asOf) {
|
|
|
46
46
|
}
|
|
47
47
|
function rankAssertion(assertion, query, asOf, feedbackScore) {
|
|
48
48
|
const taskRelevance = retrievalLexicalSimilarity(query, `${assertion.statement} ${assertion.normalizedValue}`);
|
|
49
|
+
const ongoingCollaboration = assertion.authority === "user_explicit" && assertion.kind === "preference" && (assertion.applicability.operation === "response" || Array.isArray(assertion.applicability.operation) && assertion.applicability.operation.includes("response"));
|
|
49
50
|
const score = calculateExecutionValue({
|
|
50
51
|
declaredImportance: assertion.declaredImportance,
|
|
51
52
|
inferredImportance: assertion.inferredImportance,
|
|
@@ -55,6 +56,7 @@ function rankAssertion(assertion, query, asOf, feedbackScore) {
|
|
|
55
56
|
urgency: urgency(assertion, asOf)
|
|
56
57
|
}) + feedbackScore;
|
|
57
58
|
const reasons = [
|
|
59
|
+
ongoingCollaboration ? "ongoing_collaboration" : "",
|
|
58
60
|
taskRelevance >= .35 ? "task_relevant" : "",
|
|
59
61
|
assertion.declaredImportance !== void 0 ? "user_declared_importance" : "",
|
|
60
62
|
assertion.consequence === "critical" || assertion.consequence === "high" ? "high_consequence" : "",
|
|
@@ -130,7 +132,7 @@ function buildExecutionContext(request) {
|
|
|
130
132
|
use: "answer",
|
|
131
133
|
agentId: request.agentId
|
|
132
134
|
})).map((item) => rankAssertion(item, request.query, asOf, feedbackScores.get(`assertion:${item.id}`) ?? 0)).filter((item) => item.score >= .12 || item.reasons.includes("high_consequence")).sort((left, right) => right.score - left.score) : [];
|
|
133
|
-
const assertions = [...rankedAssertions.filter((item) => item.usage === "confirmed"), ...rankedAssertions.filter((item) => item.usage === "working_assumption")].slice(0, assertionLimit);
|
|
135
|
+
const assertions = [...rankedAssertions.filter((item) => item.usage === "confirmed").sort((left, right) => Number(right.reasons.includes("high_consequence")) - Number(left.reasons.includes("high_consequence")) || Number(right.reasons.includes("ongoing_collaboration")) - Number(left.reasons.includes("ongoing_collaboration")) || right.score - left.score), ...rankedAssertions.filter((item) => item.usage === "working_assumption")].slice(0, assertionLimit);
|
|
134
136
|
const maxKnowledge = Math.max(0, Math.min(100, request.maxKnowledge ?? 12));
|
|
135
137
|
let knowledge = request.includeKnowledge === false || maxKnowledge === 0 ? [] : searchKnowledgeItems({
|
|
136
138
|
query: request.query,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
|
|
2
2
|
import { checkedFilePath, readWorkspaceFileAsync } from "../sandbox/fileAccess.js";
|
|
3
|
-
import { dataScheduler } from "./scheduler.js";
|
|
4
3
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
4
|
+
import { dataScheduler } from "./scheduler.js";
|
|
5
5
|
import { parseRepositoryMatch, repositorySearch } from "../tools/repository-search.js";
|
|
6
6
|
import { DATA_OPERATION_TOOLS, nativeDataArgs, validateDataBatch } from "./schema.js";
|
|
7
7
|
import { readGitData } from "./git.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AgentMessage } from '@earendil-works/pi-agent-core';
|
|
2
|
+
/** Correct an unverified capability denial once; never infer authorization or execute a write. */
|
|
3
|
+
export declare function configurationCapabilityCorrection(toolNames: readonly string[], userText: string, answer: string, messages: readonly AgentMessage[]): string | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/agent/embedded/configuration-capability-correction.ts
|
|
2
|
+
/** Correct an unverified capability denial once; never infer authorization or execute a write. */
|
|
3
|
+
function configurationCapabilityCorrection(toolNames, userText, answer, messages) {
|
|
4
|
+
const explicitSkillInstall = /^(?:请|帮我)?安装(?:这个|此)|^(?:please\s+)?install\s+(?:this|the)\b/i.test(userText.trim()) && /skill|技能|能力/i.test(userText) && /https?:\/\//i.test(userText) && !/mcp/i.test(userText) && !/不要|别|暂不|先不|只推荐|仅查看|do not|don't|not now|only recommend|review only/i.test(userText);
|
|
5
|
+
const skillAttempted = messages.some((message) => message.role === "assistant" && Array.isArray(message.content) && message.content.some((block) => block.type === "toolCall" && ["skill_install", "skill_manage"].includes(block.name)));
|
|
6
|
+
const promiseOnly = /^(?:我会|我将|I will|I'll).{0,100}(?:安装|install)/i.test(answer.trim()) && !/需要.{0,20}(?:确认|授权|权限)|cannot|can.t|denied|不可|无法|失败|拒绝/i.test(answer);
|
|
7
|
+
if (explicitSkillInstall && promiseOnly && !skillAttempted && toolNames.includes("skill_install")) return "Host execution check: the user explicitly requested installing the supplied Skill and using it. The registered skill_install tool has not been attempted; a promise to act is not execution. Continue that exact authorized request with the actual Skill tools and inspect the result, or report an actual blocker. Do not add permissions, force an overwrite, use shell/file configuration, or ask for duplicate consent. This is one bounded continuation, not a new user request.";
|
|
8
|
+
if (!toolNames.includes("mcp_setup") || !/mcp|https?:\/\//i.test(userText)) return;
|
|
9
|
+
if (messages.some((message) => message.role === "assistant" && Array.isArray(message.content) && message.content.some((block) => block.type === "toolCall" && (block.name === "mcp_setup" || block.name === "xopc_use" && block.arguments?.mode === "mcp_setup")))) return;
|
|
10
|
+
if (!/(?:tool|工具|能力).{0,45}(?:not available|isn.t available|unavailable|未提供|不可用|不存在|缺少)|(?:未提供|没有|缺少).{0,30}(?:MCP|配置工具)|(?:cannot|can.t|无法).{0,40}(?:MCP|连接).{0,30}(?:local|回环|localhost|127\.0\.0\.1)/i.test(answer)) return;
|
|
11
|
+
return "Host capability correction: mcp_setup is registered and directly callable in the current function schemas. No MCP setup call was attempted in this turn, so tool absence or endpoint reachability has not been verified. Correct that statement using the actual inspect/probe tools for the existing user request. Probes execute on the Gateway host, including user-provided loopback addresses. This fact grants no additional authorization: preserve the user's scope, do not mutate for advice-only requests, and honor any actual permission refusal or probe failure. Do not ask the user to repeat the request.";
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { configurationCapabilityCorrection };
|
|
@@ -12,8 +12,9 @@ import { resolveAgentTurnTimeoutMs } from "../orchestration/run-agent-turn-with-
|
|
|
12
12
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
13
13
|
import { filterExecutionTools, resolveExecutionToolPolicy } from "./execution-tool-policy.js";
|
|
14
14
|
import { runWithEmbeddedExecutionSession } from "./execution-context.js";
|
|
15
|
-
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
16
15
|
import { prepareNativeMcpConfig } from "../mcp/native-mcp.js";
|
|
16
|
+
import { boundAutomationMcpSource, restrictAutomationMcpConfig } from "../../automations/mcp-source.js";
|
|
17
|
+
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
17
18
|
import { assessContext, recoverContext as recoverContext$1 } from "../memory/context-recovery.js";
|
|
18
19
|
import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
|
|
19
20
|
import { runXopcEmbeddedTurn } from "./run-turn.js";
|
|
@@ -157,10 +158,22 @@ async function runEmbeddedTurnForSessionInner(params) {
|
|
|
157
158
|
if (typeof mm.applyResolvedModel === "function") mm.applyResolvedModel(agent, model, modelRef);
|
|
158
159
|
else await mm.applyModelForSession(agent, conversationId);
|
|
159
160
|
agentManager.setModelForSession(conversationId, modelRef);
|
|
160
|
-
const
|
|
161
|
-
const
|
|
161
|
+
const source = boundAutomationMcpSource(runId, conversationId);
|
|
162
|
+
const baseToolPolicy = resolveExecutionToolPolicy(conversationId);
|
|
163
|
+
if (source && !baseToolPolicy.nativeMcp) throw new Error("This execution surface does not permit native MCP tools.");
|
|
164
|
+
const executionToolPolicy = source ? {
|
|
165
|
+
...baseToolPolicy,
|
|
166
|
+
codemode: false,
|
|
167
|
+
externalMaterialization: false,
|
|
168
|
+
revision: `${baseToolPolicy.revision}:${source.id}`
|
|
169
|
+
} : baseToolPolicy;
|
|
170
|
+
const tools = source ? [] : filterExecutionTools(executionToolPolicy, agent.state.tools);
|
|
162
171
|
const turnPolicy = agentManager.createAgentTurnPolicy(conversationId);
|
|
163
|
-
const systemPrompt = appendDynamicPromptSection([agent.state.systemPrompt ?? "", params.presentation === "voice" ? voicePresentationPrompt : ""].filter(Boolean).join("\n\n"), [
|
|
172
|
+
const systemPrompt = appendDynamicPromptSection([agent.state.systemPrompt ?? "", params.presentation === "voice" ? voicePresentationPrompt : ""].filter(Boolean).join("\n\n"), [
|
|
173
|
+
params.dynamicSystemContext,
|
|
174
|
+
connectionObjectiveContext(conversationId),
|
|
175
|
+
source ? `The host pinned this automation to MCP server ${source.serverId} and tools ${JSON.stringify(source.tools.map((tool) => tool.name))}. Use these exact tools for the requested read. No other external source, configuration change or local file/shell fallback is permitted. An answer without a successful pinned tool call will fail verification.` : ""
|
|
176
|
+
].filter(Boolean).join("\n\n"));
|
|
164
177
|
const idlePolicy = resolveCompactionPolicy(config);
|
|
165
178
|
if (personal && idlePolicy.enabled && idlePolicy.personalIdle.enabled) idleJob = async (signal, isCurrent) => {
|
|
166
179
|
const messages = await sessionStore.load(conversationId);
|
|
@@ -202,7 +215,9 @@ async function runEmbeddedTurnForSessionInner(params) {
|
|
|
202
215
|
conversationId,
|
|
203
216
|
tools
|
|
204
217
|
}));
|
|
205
|
-
const
|
|
218
|
+
const preparedMcp = config && executionToolPolicy.nativeMcp ? await prepareNativeMcpConfig(config, workspaceDir, resolveEffectiveAgentProfileForSession(conversationId).agentId) : void 0;
|
|
219
|
+
if (source && !preparedMcp) throw new Error("The bound MCP source cannot be loaded.");
|
|
220
|
+
const mcp = preparedMcp ? restrictAutomationMcpConfig(runId, conversationId, preparedMcp) : void 0;
|
|
206
221
|
const promptCachePolicy = resolvePromptCachePolicy(config ? resolveEffectiveAgentProfileForSession(conversationId).config.runtime.promptCache : void 0);
|
|
207
222
|
let userMessageForTurn = userMessage;
|
|
208
223
|
if (params.applyStartupContext !== false) {
|
|
@@ -22,6 +22,8 @@ import { allowsExecutionTool, filterExecutionTools, resolveExecutionToolPolicy }
|
|
|
22
22
|
import { isPhoneAssistanceSuspended, phoneAssistance, phoneResumeForRun } from "../../phone/assistance.js";
|
|
23
23
|
import { runWithEmbeddedExecutionSession } from "./execution-context.js";
|
|
24
24
|
import { externalPolicyContext, getXopcToolMetadata } from "./tool-metadata.js";
|
|
25
|
+
import { withDelegationScope } from "../orchestration/delegation-scope.js";
|
|
26
|
+
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
25
27
|
import { isNestedCodemodePolicy } from "./codemode-extension.js";
|
|
26
28
|
import { isComputerControlActive, isComputerLeaseTool, stopComputerControl } from "../../computer/control-guard.js";
|
|
27
29
|
import { bindComputerAgentTurn, computerImagesForRequest, computerRequestFrameCleanup, endComputerAgentTurn, setComputerProgramAuthorization } from "../../computer/agent-context.js";
|
|
@@ -34,6 +36,7 @@ import { getActiveTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
|
34
36
|
import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
|
|
35
37
|
import { wrapStreamFnForXopcExtensions } from "./xopc-stream-bridge.js";
|
|
36
38
|
import { acquireEmbeddedSessionRunner, evictEmbeddedSessionRunner } from "./session-runner.js";
|
|
39
|
+
import { configurationCapabilityCorrection } from "./configuration-capability-correction.js";
|
|
37
40
|
import { createSqliteTranscriptRuntime } from "./transcript-runtime.js";
|
|
38
41
|
import { assessContext, recoverContext as recoverContext$1 } from "../memory/context-recovery.js";
|
|
39
42
|
import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
|
|
@@ -43,7 +46,6 @@ import { markTurnToolResult } from "../memory/turn-provenance.js";
|
|
|
43
46
|
import { RepositoryInstructions } from "../coding/repository-instructions.js";
|
|
44
47
|
import { RunVerification } from "../coding/run-verification.js";
|
|
45
48
|
import { projectWorkEvidence } from "../coding/projectEvidence.js";
|
|
46
|
-
import { withDelegationScope } from "../orchestration/delegation-scope.js";
|
|
47
49
|
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
48
50
|
import "../messaging/no-reply.js";
|
|
49
51
|
import { createAssistantMessageEventStream, getCurrentSystemPrompt, getCurrentTools, isRecoverableLength } from "@earendil-works/pi-ai";
|
|
@@ -373,6 +375,7 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
373
375
|
transcriptRuntime
|
|
374
376
|
});
|
|
375
377
|
const { session, reused } = runner;
|
|
378
|
+
const configurationTurnStart = session.agent.state.messages.length;
|
|
376
379
|
await runLease.attach(session, async () => session.abort());
|
|
377
380
|
const runAbortSignal = params.abortSignal ? AbortSignal.any([runLease.signal, params.abortSignal]) : runLease.signal;
|
|
378
381
|
if (runAbortSignal.aborted) {
|
|
@@ -928,10 +931,20 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
928
931
|
};
|
|
929
932
|
await runAgentTurnWithTimeout(session.agent, () => withDelegationScope({
|
|
930
933
|
tools,
|
|
934
|
+
getToolContext: () => {
|
|
935
|
+
const message = session.agent.state.messages.findLast((item) => item.role === "assistant");
|
|
936
|
+
return message?.role === "assistant" ? {
|
|
937
|
+
assistantMessage: message,
|
|
938
|
+
context: {
|
|
939
|
+
messages: session.agent.state.messages,
|
|
940
|
+
tools: session.agent.state.tools
|
|
941
|
+
}
|
|
942
|
+
} : void 0;
|
|
943
|
+
},
|
|
931
944
|
authorizeToolCall: params.turnPolicy ? (context, signal) => runWithEmbeddedExecutionSession(conversationId, () => params.turnPolicy.beforeToolCall(context, signal), runId) : void 0
|
|
932
945
|
}, async () => {
|
|
933
946
|
if (runAbortSignal.aborted) return;
|
|
934
|
-
const connectionResume = getConnectionResumeInput(conversationId, runId);
|
|
947
|
+
const connectionResume = getConnectionResumeInput(conversationId, runId) ?? getMcpSetupResumeInput(conversationId, runId);
|
|
935
948
|
const clarificationResume = getClarificationResumeInput(conversationId, runId);
|
|
936
949
|
if (phoneResumeForRun(conversationId, runId)) await session.sendCustomMessage({
|
|
937
950
|
customType: "phone_resume",
|
|
@@ -1005,6 +1018,16 @@ async function runXopcEmbeddedTurnInner(params) {
|
|
|
1005
1018
|
});
|
|
1006
1019
|
};
|
|
1007
1020
|
await recoverSettledTurn();
|
|
1021
|
+
const capabilityCorrection = configurationCapabilityCorrection(session.getAllTools().filter((tool) => tool.exposure !== "hidden").map((tool) => tool.name), userMessageToPromptText(userMessage), lastAssistantPlainText(session), session.agent.state.messages.slice(configurationTurnStart));
|
|
1022
|
+
if (capabilityCorrection && !policyStopped && !connectionStopped && !clarificationStopped && !phoneStopped && !runAbortSignal.aborted && !isAssistantTurnFailed(session.agent) && !isAssistantTurnAborted(session.agent)) {
|
|
1023
|
+
await session.sendCustomMessage({
|
|
1024
|
+
customType: "configuration_capability_current",
|
|
1025
|
+
content: capabilityCorrection,
|
|
1026
|
+
display: false
|
|
1027
|
+
}, { triggerTurn: true });
|
|
1028
|
+
await session.agent.waitForIdle();
|
|
1029
|
+
await recoverSettledTurn();
|
|
1030
|
+
}
|
|
1008
1031
|
if (params.requireVisibleReply && !sentVisibleMessage && !policyStopped && !runAbortSignal.aborted && !isAssistantTurnFailed(session.agent) && !isAssistantTurnAborted(session.agent) && lastAssistantPlainText(session).trim() === "NO_REPLY") {
|
|
1009
1032
|
await session.sendCustomMessage({
|
|
1010
1033
|
customType: "visible_reply_required",
|
|
@@ -3,15 +3,18 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { filterExecutionTools, resolveExecutionToolPolicy } from "./execution-tool-policy.js";
|
|
4
4
|
import { deferredToolContract, getXopcToolMetadata } from "./tool-metadata.js";
|
|
5
5
|
import { isCodemodeCoreRead } from "../tools/codemode-permissions.js";
|
|
6
|
+
import { createEmbeddedModelRuntime, resolveEmbeddedProviderApiKeySync } from "./model-runtime.js";
|
|
7
|
+
import { getNativePiAgentDir } from "../mcp/native-mcp.js";
|
|
8
|
+
import { createXopcMcpTransport } from "../mcp/transport.js";
|
|
9
|
+
import { createAutomationMcpSourceGuard } from "../../automations/mcp-source.js";
|
|
6
10
|
import { createXopcCodemodeExtension } from "./codemode-extension.js";
|
|
7
11
|
import { abortEmbeddedRun } from "./runs.js";
|
|
8
12
|
import { guardSessionManager } from "./session-tool-result-guard.js";
|
|
9
13
|
import { transformUserMessageForPersistence } from "../inbound/attachment-pipeline.js";
|
|
10
|
-
import { createEmbeddedModelRuntime, resolveEmbeddedProviderApiKeySync } from "./model-runtime.js";
|
|
11
14
|
import { wrapStreamFnForXopcExtensions } from "./xopc-stream-bridge.js";
|
|
12
15
|
import { xopcToolsToDefinitions } from "./xopc-tools-bridge.js";
|
|
13
16
|
import { TOOL_DISCOVERY_STATE, createXopcToolSearchExtension } from "./tool-search-extension.js";
|
|
14
|
-
import {
|
|
17
|
+
import { createMcpSetupContinuationGuard } from "../mcp/continuation-guard.js";
|
|
15
18
|
import { AGENT_PROFILE_CONTEXT_STATE, createAgentProfileContextExtension } from "./agent-profile-context.js";
|
|
16
19
|
import { join } from "node:path";
|
|
17
20
|
import { createHash } from "node:crypto";
|
|
@@ -46,7 +49,8 @@ function buildEmbeddedRunnerFingerprint(input) {
|
|
|
46
49
|
JSON.stringify(input.mcp ? {
|
|
47
50
|
servers: input.mcp.servers,
|
|
48
51
|
errors: input.mcp.errors,
|
|
49
|
-
credentialAliases: input.mcp.credentialAliases
|
|
52
|
+
credentialAliases: input.mcp.credentialAliases,
|
|
53
|
+
automationSourceRunId: input.mcp.automationSourceRunId
|
|
50
54
|
} : null),
|
|
51
55
|
JSON.stringify(input.executionToolPolicy ?? null)
|
|
52
56
|
].join("\0")).digest("base64url");
|
|
@@ -284,9 +288,12 @@ var EmbeddedSessionRunnerPool = class {
|
|
|
284
288
|
noContextFiles: true,
|
|
285
289
|
noExtensions: true,
|
|
286
290
|
extensionFactories: [
|
|
291
|
+
createMcpSetupContinuationGuard(runtimeId, tools.some((tool) => tool.name === "mcp_setup")),
|
|
292
|
+
...mcp?.automationSourceRunId ? [createAutomationMcpSourceGuard(mcp.automationSourceRunId)] : [],
|
|
287
293
|
...codemode ? [createXopcCodemodeExtension(codemode, tools, () => boundSession)] : [],
|
|
288
294
|
...discovery ? [createXopcToolSearchExtension(tools)] : [],
|
|
289
295
|
...mcp ? [createMcpExtension({
|
|
296
|
+
createTransport: createXopcMcpTransport(),
|
|
290
297
|
loadConfig: () => mcp,
|
|
291
298
|
credentials: mcp.credentials,
|
|
292
299
|
logPath: join(getNativePiAgentDir(), "mcp.log")
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
|
-
import { imageFileExtensionForMimeType } from "./image-assets.js";
|
|
4
3
|
import { pickTimeoutMsOrFallback } from "../../../media-shared/http/deadline.js";
|
|
5
4
|
import { privateNetworkPolicyToSsrfGuardOptions } from "../../../media-shared/http/private-network.js";
|
|
6
5
|
import { resolveProviderHttpRequestConfig } from "../../../media-shared/http/resolve-provider-http-request-config.js";
|
|
7
6
|
import { postJsonRequest, postMultipartRequest, readJsonResponseLimited } from "../../../media-shared/http/provider-http.js";
|
|
8
7
|
import "../../../media-shared/http/index.js";
|
|
8
|
+
import { imageFileExtensionForMimeType } from "./image-assets.js";
|
|
9
9
|
import { ImageProviderError, validateImageRequest } from "../../../../packages/image-providers/src/validation.js";
|
|
10
10
|
import { decodeBase64, imageFromBytes } from "../../../../packages/image-providers/src/http.js";
|
|
11
11
|
import "../../../../packages/image-providers/src/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
1
|
import { decodeDataUrl } from "./image-helpers.js";
|
|
2
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { promises } from "node:fs";
|
|
@@ -92,7 +92,10 @@ var InboundLoop = class {
|
|
|
92
92
|
type: "channel",
|
|
93
93
|
channel: context.channel
|
|
94
94
|
},
|
|
95
|
-
metadata: {
|
|
95
|
+
metadata: {
|
|
96
|
+
accountId: msg.metadata?.accountId,
|
|
97
|
+
transcribedVoice: msg.metadata?.transcribedVoice === true
|
|
98
|
+
}
|
|
96
99
|
};
|
|
97
100
|
const sessionMetadata = await this.cfg.sessionStore.getMetadata(sessionContext.conversationId).catch(() => null);
|
|
98
101
|
updateAsyncLogContext({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withoutCloudCreditBudget } from "../providers/xopc-cloud-credit-budget.js";
|
|
2
2
|
import { withoutEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
3
|
+
import { withoutDelegationScope } from "./orchestration/delegation-scope.js";
|
|
3
4
|
import { withoutDataToolPermissions } from "./tools/dataBatch.js";
|
|
4
5
|
import { withoutSearchCache } from "./tools/search/cache.js";
|
|
5
|
-
import { withoutDelegationScope } from "./orchestration/delegation-scope.js";
|
|
6
6
|
//#region src/agent/independent-execution.ts
|
|
7
7
|
/** Discard caller-owned execution scopes before resolving the target Agent. */
|
|
8
8
|
function runInIndependentAgentExecution(run) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
2
|
+
import { materializePluginServers } from "../../extensions/agent-plugins/mcp-adapter.js";
|
|
2
3
|
import { normalizeConfiguredMcpServers } from "../../config/mcp-config-normalize.js";
|
|
3
4
|
import { inspectExtensionConnectorDependencies } from "../../extensions/connector-dependencies.js";
|
|
4
|
-
import { materializePluginServers } from "../../extensions/agent-plugins/mcp-adapter.js";
|
|
5
5
|
//#region src/agent/mcp/config.ts
|
|
6
6
|
function loadMergedMcpConfig(params) {
|
|
7
7
|
const configured = Object.fromEntries(Object.entries(normalizeConfiguredMcpServers(params.cfg?.mcp?.servers)).filter(([, server]) => server.xopcConnector?.enabled !== false));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Config } from '../../config/schema.js';
|
|
2
2
|
import { type McpConnectionProbe } from './connection-setup.js';
|
|
3
|
+
import type { McpTransportDiagnostics } from './transport.js';
|
|
3
4
|
export declare function mcpConfigRevision(value: unknown): string;
|
|
4
5
|
export declare class McpDraftError extends Error {
|
|
5
6
|
readonly status: 400 | 404 | 409 | 429 | 500;
|
|
@@ -30,8 +31,10 @@ export declare class McpConnectionDrafts {
|
|
|
30
31
|
serverId: string;
|
|
31
32
|
expiresAt: number;
|
|
32
33
|
}>;
|
|
33
|
-
probe(owner: string, id: string): Promise<McpConnectionProbe>;
|
|
34
|
-
authorize(owner: string, id: string
|
|
34
|
+
probe(owner: string, id: string, diagnostics?: McpTransportDiagnostics): Promise<McpConnectionProbe>;
|
|
35
|
+
authorize(owner: string, id: string, options?: {
|
|
36
|
+
callbackRelayUrl?: string;
|
|
37
|
+
}): import("./connection-setup.js").McpAuthorization;
|
|
35
38
|
authorization(owner: string, id: string): import("./connection-setup.js").McpAuthorization;
|
|
36
39
|
redirect(owner: string, id: string, url: string): void;
|
|
37
40
|
cancelAuthorization(owner: string, id: string): void;
|
|
@@ -84,7 +84,7 @@ var McpConnectionDrafts = class {
|
|
|
84
84
|
expiresAt: draft.expiresAt
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
async probe(owner, id) {
|
|
87
|
+
async probe(owner, id, diagnostics) {
|
|
88
88
|
const draft = this.get(owner, id);
|
|
89
89
|
this.assertIdle(draft);
|
|
90
90
|
draft.authorizationId = void 0;
|
|
@@ -94,7 +94,8 @@ var McpConnectionDrafts = class {
|
|
|
94
94
|
try {
|
|
95
95
|
const result = await probeMcpConnection(draft.config, draft.workspace, draft.serverId, {
|
|
96
96
|
credentials: draft.credentials,
|
|
97
|
-
signal: draft.controller.signal
|
|
97
|
+
signal: draft.controller.signal,
|
|
98
|
+
diagnostics
|
|
98
99
|
});
|
|
99
100
|
this.get(owner, id);
|
|
100
101
|
draft.probe = result;
|
|
@@ -104,14 +105,15 @@ var McpConnectionDrafts = class {
|
|
|
104
105
|
draft.running = false;
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
|
-
authorize(owner, id) {
|
|
108
|
+
authorize(owner, id, options) {
|
|
108
109
|
const draft = this.get(owner, id);
|
|
109
110
|
this.assertIdle(draft);
|
|
110
111
|
if (draft.authorizationId) cancelMcpAuthorization(draft.authorizationId, owner);
|
|
111
112
|
draft.probe = void 0;
|
|
112
113
|
const attempt = startMcpAuthorization(draft.config, draft.workspace, draft.serverId, owner, {
|
|
113
114
|
credentials: draft.credentials,
|
|
114
|
-
authorizationScope: draft.id
|
|
115
|
+
authorizationScope: draft.id,
|
|
116
|
+
...options
|
|
115
117
|
});
|
|
116
118
|
draft.authorizationId = attempt.id;
|
|
117
119
|
return attempt;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import type { Config } from '../../config/schema.js';
|
|
2
2
|
import { type McpConnectionErrorCode } from './connection-errors.js';
|
|
3
3
|
import { type McpSessionOptions } from './tool-catalog.js';
|
|
4
|
+
import { type McpObservation } from './transport.js';
|
|
5
|
+
export type McpMetadataState = 'valid' | 'absent' | 'unreachable' | 'invalid' | 'not_checked';
|
|
6
|
+
export type McpRecovery = {
|
|
7
|
+
kind: 'choose_auth' | 'enter_secret' | 'authorize' | 'verify_documented_endpoint' | 'report_blocker' | 'wait';
|
|
8
|
+
retryAt?: number;
|
|
9
|
+
reason?: string;
|
|
10
|
+
};
|
|
4
11
|
export type McpConnectionProbe = {
|
|
5
|
-
state: 'connected' | 'oauth_required' | 'token_required' | 'error';
|
|
12
|
+
state: 'connected' | 'oauth_required' | 'token_required' | 'auth_unknown' | 'error';
|
|
6
13
|
toolCount?: number;
|
|
7
14
|
error?: string;
|
|
8
15
|
errorCode?: McpConnectionErrorCode;
|
|
16
|
+
auth?: {
|
|
17
|
+
method: 'oauth' | 'unknown' | 'credential';
|
|
18
|
+
metadata: McpMetadataState;
|
|
19
|
+
credential: 'missing' | 'present' | 'rejected' | 'unknown';
|
|
20
|
+
};
|
|
21
|
+
observation?: Omit<McpObservation, 'challenge'>;
|
|
22
|
+
recovery?: McpRecovery;
|
|
9
23
|
};
|
|
10
24
|
export declare function probeMcpConnection(config: Config, workspace: string, serverId: string, options?: McpSessionOptions): Promise<McpConnectionProbe>;
|
|
11
25
|
export type McpAuthorization = {
|