@xopcai/xopc 0.0.426 → 0.0.428
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/adapters/security-adapter.js +1 -1
- package/dist/extensions/telegram/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +1 -1
- package/dist/extensions/weixin/src/auth/accounts.js +2 -2
- package/dist/extensions/weixin/src/auth/pairing.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
- package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +2 -2
- package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
- package/dist/extensions/weixin/src/messaging/send.js +12 -3
- package/dist/extensions/weixin/src/monitor/monitor.js +1 -1
- package/dist/extensions/weixin/src/outbound-send.js +12 -3
- package/dist/extensions/weixin/src/pairing-config-resolver.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/gateway/static/root/assets/{activity-store-D_DXNHba.js → activity-store-WqnVruhY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CjaQxFQt.js → agent-avatar-dicebear-CSiO9c2F.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-6Z4m31Fz.js → agent-avatar-display-D-yds6wG.js} +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-_UT9C7bg.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DVzYXsAy.js +1 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-u5c3GREg.js → agents-admin-api-Bgv4lJ9Y.js} +1 -1
- package/dist/gateway/static/root/assets/agents-yTsbcxRi.js +77 -0
- package/dist/gateway/static/root/assets/{api-C3Tp9MkF.js → api-C-9J9ghT.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CRT9ZyH0.js → api-Dv6Cn-Rs.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-DRy3-k7j.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C8yc3yHG.js → app-management-settings-panel-BXJrrjH5.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BELgtR3O.js → appearance-settings-oYjAVulT.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-D95yzj-f.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BCQnOkV8.js → archive-plugin-DBPu3xCJ.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-load-DrVGNxJm.js +1 -0
- package/dist/gateway/static/root/assets/automation-api-DAou8Kji.js +1 -0
- package/dist/gateway/static/root/assets/{automation-result-state-CMfVTv_i.js → automation-result-state-CA7LV098.js} +1 -1
- package/dist/gateway/static/root/assets/automation-task-card-w6cKxfaP.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-CdIPdwF0.js → automations-page-D4LyOLzY.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BGyvZZj5.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CIB5cbvQ.js → binary-plugins-D25P9ZxQ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BQtTLe6Q.js → block-editor-BI105p1U.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DeraGZ1y.js → browser-automation-inputs-DhDRvWQE.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-SpPzRNqU.js → browser-automations-page-CCPi1Bvy.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-control-api-CbbPvhHR.js → browser-control-api-BN4F-bM1.js} +1 -1
- package/dist/gateway/static/root/assets/browser-settings-page-BZXUZpjp.js +3 -0
- package/dist/gateway/static/root/assets/{button-CnRSIP6m.js → button-Cc4hUNTt.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DLMuj21P.js → capabilities-LC-yEQYo.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-DHJLl4RD.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-FJ3Vo7Wa.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-u2z_KFRt.js +1 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-CTUCuBlW.js → capability-header-actions-BxMYfQ8y.js} +1 -1
- package/dist/gateway/static/root/assets/channels-9Uaa-IN0.js +1 -0
- package/dist/gateway/static/root/assets/{chat-agents-api-D8YS5amE.js → chat-agents-api-Cffxfzi1.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DCzUECct.js → chat-chart-block-Bbk0b3TV.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page--dKUIg5W.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dl-OTkJI.js → chat-terminal-dock-CQMuG-Bz.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-Dijix7V6.js → command-palette-api-BRxfFgGA.js} +1 -1
- package/dist/gateway/static/root/assets/composer-payload-handoff-_9L2A5AZ.js +1 -0
- package/dist/gateway/static/root/assets/{computer-settings-page-B-lGMimW.js → computer-settings-page-Bm70SIjD.js} +1 -1
- package/dist/gateway/static/root/assets/confirm-dialog-D7dQJytv.js +1 -0
- package/dist/gateway/static/root/assets/connected-providers-grid-B7ktDgqt.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-C8InhrMt.js → connector-service-page-BVMEg8n-.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DEJU8mgn.js → connectors-api-B07yoCzk.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-hPKaJUWY.js +1 -0
- package/dist/gateway/static/root/assets/{copy-text-row-CYIv7RfP.js → copy-text-row-CpiRzq4G.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-kqic8j73.js → date-picker-BvEnSGZK.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-XjPB8FJS.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-DFNehTtd.js → desktop-pet-C1z9YDEg.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BDS7_tQ_.js → desktop-pet-settings-CbbVb8GY.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-CeZZLOc6.js → dev-view-store-38EmUIEC.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-Wb1EKiXA.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Di0h3ws4.js → directory-picker-path-field-BvKDrKc4.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-ClKEyXmN.js → discussion-annotation-sync-BfVzIwe2.js} +1 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +1 -0
- package/dist/gateway/static/root/assets/dist-BuHnPloF.js +1 -0
- package/dist/gateway/static/root/assets/dist-GJ8-1PAx.js +1 -0
- package/dist/gateway/static/root/assets/dist-ZrL34Ps4.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DwB5KMGk.js → extension-debug-page-CB9Lu3Sq.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-Cqg1K70e.js → extension-iframe-host-BzjrVAUR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DRBszrCR.js → extension-marketplace-api-DigziAgd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DyrQtG82.js → extension-page-DUa9MeaZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-C_uKqJxP.js → extension-provider-301x0rh-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BAMQHzkX.js → extension-settings-page-CP9ciZUI.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-DfkXvFnc.js → file-preview-surface-BaMGmCbw.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BOCt_zOo.js → gateway-config-swr-BD4Bf8uu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BL_Cf0OQ.js → gateway-realtime-CSd9VB7Z.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Bxkv62qs.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-CHf8qY7H.js → gateway-restart-CIUCTKYR.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-uAboiElC.js → gateway-settings-CCqF1uZv.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CvkJYurV.js → gateway-startup-retry-BsU5k8oi.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-BWMbKu72.js → global-defaults-api-asOZQeM8.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-Bb_RC1O9.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CQxZSTWA.js → image-generation-api-BbEnKsK1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C90644id.js → imports-page-CVnoGUyp.js} +1 -1
- package/dist/gateway/static/root/assets/index-ClPeYgQk.js +11 -0
- package/dist/gateway/static/root/assets/index-Cz-VjTNd.css +1 -0
- package/dist/gateway/static/root/assets/install-connector-dialog-DXVOHMhS.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CbeubKe1.js → keyboard-shortcuts-settings-BCl90SrD.js} +1 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcJc9xLJ.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-C6zFgwkr.js → local-apps-page-CdAKoWfg.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-BJ1B1dQ7.js → local-session-drafts-nRGeybku.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Br7IfbXK.js → locale-store-B7y-RVe8.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-CpVCvAWE.js → logs-page-McbSQwJI.js} +2 -2
- package/dist/gateway/static/root/assets/management-settings-BIR0BwNV.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DrVAMlwc.js → markdown-view-DFHa8rUg.js} +2 -2
- package/dist/gateway/static/root/assets/mcp-conversation-setup-page-Dwx4TuIr.js +1 -0
- package/dist/gateway/static/root/assets/{media-plugins-Ba6vUE4J.js → media-plugins-BzzLV7wW.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DYDkJvXj.js +3 -0
- package/dist/gateway/static/root/assets/model-selector-DJSVr3LM.js +1 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-Bd-fYUrV.js → models-hub-cache-BUapaPTN.js} +1 -1
- package/dist/gateway/static/root/assets/new-chat-navigation-B6NPQ4h4.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-CJ-dPovd.js +5 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-ClPkeHe5.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-CUlhTRv0.js → notes-api-ulup1oFS.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-eoKX85K5.js → notes-page-BaFNplIr.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-DMMdeaNd.js → oauth-api-DINa08-z.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-C8BXow79.js → oauth-provider-connect-C0PVEHC2.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CBFK41OS.js → page-context-capture-button-CGfR0dsc.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-LF33STHC.js → page-context-draft-DhRNxc0v.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-CoKMiYoi.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-D6CzIIfo.js → personal-avatar-DiVFO2Aw.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CiKdXLeR.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-DnYapLo7.js → personal-settings-panel-Ds4ntiqu.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DBiKtzwz.js → phone-dependencies-card-B3R6L5Qu.js} +1 -1
- package/dist/gateway/static/root/assets/phone-model-connection-ucX3Tvl8.js +1 -0
- package/dist/gateway/static/root/assets/{phone-model-picker-BmSxEr7M.js → phone-model-picker-CU37sziM.js} +1 -1
- package/dist/gateway/static/root/assets/phone-settings-page-BSdB2pnW.js +1 -0
- package/dist/gateway/static/root/assets/{phone-workspace-store-SN7hfddU.js → phone-workspace-store-Cmes9gQ4.js} +1 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-DblFhnuC.js +1 -0
- package/dist/gateway/static/root/assets/{popover-select-DD8fmrxH.js → popover-select-CEMWIrtY.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-Cu_ZC9Up.js → preference-select-fields-D2-QfMN5.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-Tn2dUJWM.js → product-automation-feedback-BzY3z8zu.js} +2 -2
- package/dist/gateway/static/root/assets/{product-open-page-Nf-Oqf1h.js → product-open-page-BKw6H0Mn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-D6NwUm3A.js → product-preview-content-CNaJb6Bj.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-BfNcGgXA.js → product-preview-modal-DgwrrpqJ.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-FReFYUv0.js +7 -0
- package/dist/gateway/static/root/assets/{project-understanding-B1BK7Ixi.js → project-understanding-CrSkrJnM.js} +1 -1
- package/dist/gateway/static/root/assets/projects-page-Cp91_KzA.js +1 -0
- package/dist/gateway/static/root/assets/{providers-api-DOnNfkwQ.js → providers-api-CBSC3jdu.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-RAhaLUcQ.js → recording-upload-DBHAGKZj.js} +1 -1
- package/dist/gateway/static/root/assets/{refresh-button-bU_0NarN.js → refresh-button-DiWdGAaX.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DFDvOTg4.js → registry-api-QZEjziDq.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DWsOWetc.js → remote-access-hub-BdXxFQfH.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-TQcRCpAg.js → resource-unavailable-BTNhcOHF.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-DS4fVFbc.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-9o3Wfji1.js → runtime-tools-api-BDTUD8Rj.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BGiXeHF5.js → runtime-tools-settings-panel-CYEzIrDf.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BKeP5G7b.js → schema-form-C-jw6Hid.js} +1 -1
- package/dist/gateway/static/root/assets/{secret-input-BQvFXqzz.js → secret-input-Dryrns2s.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-BEnNx0u7.js → service-recommendation-list-CfeYH6lK.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bs3r_d2_.js → session-api-DVXLCZX2.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DjRWxXJG.js +23 -0
- package/dist/gateway/static/root/assets/sessions-page-C8gwrFHR.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BMHe9uwy.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-CURRjsLK.js → settings-advanced-section-BmrbHgQa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-CiRpsdTJ.js → settings-mode-store-Bk_hzwPK.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-GtsbT6as.js → settings-page-DCQnHCNN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-DBL0_u0Z.js → settings-page-header-BLKI3_9N.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-IAvpbz4A.js → settings-page-layout-BqBVrkC9.js} +1 -1
- package/dist/gateway/static/root/assets/setup-interaction-page-B9ACeAvO.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-DEefuWo3.js +1 -0
- package/dist/gateway/static/root/assets/share-link-dialog-C2LyeNzj.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-L9KYu8M7.js → share-preview-page-BFwEr7Ws.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-D8Q-m46d.js → shares-api-CTFkLQxq.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-CpK3yhtc.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-uKU4sRiv.js → skill-api-DpicfA6o.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-BzKzG-xG.js → skill-list-api-B8fegRLZ.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-DkUXekcd.js → skill-reload-api-VmC8ySUy.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-BIWXS6Ki.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CsvcFoaJ.js → system-settings-panel-BmoA92oX.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-L5RIelv0.js +3 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-B8xUiwW3.js → task-result-evidence-BV-6hBVU.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DJVC7HqA.js → terminal-panel-store-BGdKE9hU.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-Dlnmgryi.js → theme-store-Dvv79Wb2.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-B4uA4Pnz.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-BB7u79ID.js → tunnel-api-BurZtvqx.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-C4bblRnQ.js → understanding-activity-store-C1cLL8zq.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BvCj9-Ue.js → understanding-refresh-store-C3Lr_pjY.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Cv4Je5XJ.js → usage-page-C91ZzLm9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-YHxQ-UZg.js → use-autosave-zkzRuUtx.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-CoiQAgjo.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DFzy6iVy.js +2 -0
- package/dist/gateway/static/root/assets/{use-personal-profile-D2Un8G1L.js → use-personal-profile-BB10h9ED.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-BQEiJzK7.js → use-workspace-tree-sF5DcONt.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-WFnD5utO.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DCM69u8Y.js → voice-api-key-field-Bqa4PeZx.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CrULrSKC.js → voice-config-api-LNO2xXHk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-DFMNIyy4.js → voice-input-shortcut-events-AzfhxBX7.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cb8i6dLb.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CVe9UmFl.js → work-discovery-overlay-CdQUiV-a.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CtqkRMN5.js → work-discovery-page-HcUloXxf.js} +1 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-Dv1HUipe.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-api-tbifz2zY.js → workspace-api-Am2ee4R6.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CqHcVFhS.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BubQwQwU.js → workspace-file-preview-dialog-z5Q00v92.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-DZk3MBSa.js → workspace-open-location-menu-4ONYaGy0.js} +1 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-DimGN59n.js +1 -0
- package/dist/gateway/static/root/index.html +99 -97
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +8 -0
- package/dist/packages/gateway-contract/src/capabilities.js +7 -3
- package/dist/packages/gateway-contract/src/home.js +12 -2
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +1 -0
- package/dist/src/agent/background-review/prompts.js +11 -6
- package/dist/src/agent/background-review/run-background-review.js +12 -3
- package/dist/src/agent/child-agent-factory.js +1 -1
- package/dist/src/agent/context/execution-context.js +3 -1
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/configuration-capability-correction.d.ts +3 -0
- package/dist/src/agent/embedded/configuration-capability-correction.js +14 -0
- package/dist/src/agent/embedded/run-for-session.js +20 -5
- package/dist/src/agent/embedded/run-turn.js +25 -2
- package/dist/src/agent/embedded/session-runner.js +10 -3
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +4 -1
- package/dist/src/agent/independent-execution.js +1 -1
- package/dist/src/agent/mcp/config.js +1 -1
- package/dist/src/agent/mcp/connection-drafts.d.ts +5 -2
- package/dist/src/agent/mcp/connection-drafts.js +6 -4
- package/dist/src/agent/mcp/connection-setup.d.ts +15 -1
- package/dist/src/agent/mcp/connection-setup.js +223 -78
- package/dist/src/agent/mcp/continuation-guard.d.ts +3 -0
- package/dist/src/agent/mcp/continuation-guard.js +54 -0
- package/dist/src/agent/mcp/continuation-input.d.ts +4 -0
- package/dist/src/agent/mcp/continuation-input.js +13 -0
- package/dist/src/agent/mcp/conversation-setup.d.ts +282 -0
- package/dist/src/agent/mcp/conversation-setup.js +856 -0
- package/dist/src/agent/mcp/discovery.d.ts +102 -0
- package/dist/src/agent/mcp/discovery.js +219 -0
- package/dist/src/agent/mcp/native-mcp.d.ts +1 -0
- package/dist/src/agent/mcp/native-mcp.js +8 -1
- package/dist/src/agent/mcp/setup-plan.d.ts +76 -0
- package/dist/src/agent/mcp/setup-plan.js +93 -0
- package/dist/src/agent/mcp/tool-catalog.d.ts +7 -0
- package/dist/src/agent/mcp/tool-catalog.js +26 -3
- package/dist/src/agent/mcp/transport.d.ts +20 -0
- package/dist/src/agent/mcp/transport.js +188 -0
- package/dist/src/agent/mcp/weixin-setup-scope.d.ts +12 -0
- package/dist/src/agent/mcp/weixin-setup-scope.js +43 -0
- package/dist/src/agent/orchestration/delegation-scope.d.ts +2 -1
- package/dist/src/agent/prompt/conversational-configuration-guide.js +2 -1
- package/dist/src/agent/prompt/sections/tooling.js +3 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +3 -2
- package/dist/src/agent/service/process-direct-streaming.js +4 -3
- package/dist/src/agent/service.d.ts +2 -0
- package/dist/src/agent/service.js +15 -1
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-configuration.d.ts +6 -4
- package/dist/src/agent/tool-manuals/xopc-configuration.js +125 -8
- package/dist/src/agent/tools/automation-tool.d.ts +9 -1
- package/dist/src/agent/tools/automation-tool.js +34 -5
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -0
- package/dist/src/agent/tools/factory.js +35 -24
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +5 -4
- package/dist/src/agent/tools/mcp-setup-tool.d.ts +9 -0
- package/dist/src/agent/tools/mcp-setup-tool.js +36 -0
- package/dist/src/agent/tools/personal-task-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/skill-install-tool.js +56 -1
- package/dist/src/agent/tools/skill-manage-tool.d.ts +4 -0
- package/dist/src/agent/tools/skill-manage-tool.js +74 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/tool-manual-tool.d.ts +1 -1
- package/dist/src/agent/tools/tool-manual-tool.js +3 -1
- package/dist/src/agent/tools/toolExposure.js +2 -0
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +5 -2
- package/dist/src/agent/tools/xopc-use-tool.js +81 -10
- package/dist/src/agent-catalog/service.d.ts +1 -1
- package/dist/src/agent-catalog/service.js +2 -1
- package/dist/src/automations/api/routes.js +13 -5
- package/dist/src/automations/capabilities/drafts.js +5 -2
- package/dist/src/automations/capabilities/read.js +49 -10
- package/dist/src/automations/capabilities/write.d.ts +111 -52
- package/dist/src/automations/capabilities/write.js +44 -10
- package/dist/src/automations/delivery/delivery-router.d.ts +1 -0
- package/dist/src/automations/delivery/delivery-router.js +7 -1
- package/dist/src/automations/domain/types.d.ts +10 -0
- package/dist/src/automations/domain/validation.d.ts +24 -0
- package/dist/src/automations/domain/validation.js +7 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +6 -0
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/mcp-source.d.ts +60 -0
- package/dist/src/automations/mcp-source.js +173 -0
- package/dist/src/automations/service/action-executor.js +15 -1
- package/dist/src/automations/service/automation-service.d.ts +12 -0
- package/dist/src/automations/service/automation-service.js +61 -4
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-run-repository.d.ts +11 -2
- package/dist/src/automations/storage/automation-run-repository.js +28 -24
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/browser/setup/repository.d.ts +1 -0
- package/dist/src/browser/setup/repository.js +7 -1
- package/dist/src/browser/setup/service.d.ts +3 -0
- package/dist/src/browser/setup/service.js +41 -18
- package/dist/src/browser/setup/types.d.ts +1 -0
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.d.ts +1 -0
- package/dist/src/channels/outbound-sender.d.ts +1 -0
- package/dist/src/channels/outbound-sender.js +3 -0
- package/dist/src/channels/pairing/pairing-service.js +1 -1
- package/dist/src/channels/weixin/account-identity.d.ts +2 -0
- package/dist/src/channels/weixin/account-identity.js +15 -0
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/cli/commands/channels.js +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/config/schema.d.ts +3 -0
- package/dist/src/config/schema.js +3 -2
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/setup.d.ts +2 -1
- package/dist/src/extensions/agent-plugins/setup.js +4 -3
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/hono/app.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/channels.js +1 -1
- package/dist/src/gateway/hono/routes/config.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +39 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +33 -9
- package/dist/src/gateway/hono/routes/projects.js +1 -1
- package/dist/src/gateway/hono/routes/provider-setup.js +1 -1
- package/dist/src/gateway/hono/routes/public-gateway.js +22 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -5
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +1 -0
- package/dist/src/gateway/service/agent-runner.js +3 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +2 -1
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/sessions-api.js +2 -1
- package/dist/src/gateway/service.d.ts +5 -1
- package/dist/src/gateway/service.js +97 -22
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/session-reset-service.d.ts +1 -0
- package/dist/src/gateway/session-reset-service.js +15 -2
- package/dist/src/home-intelligence/evidence-presentation.d.ts +3 -0
- package/dist/src/home-intelligence/evidence-presentation.js +30 -0
- package/dist/src/home-intelligence/generator.d.ts +8 -0
- package/dist/src/home-intelligence/generator.js +15 -4
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/home-intelligence/policy.js +3 -0
- package/dist/src/memory-learning/repository.d.ts +6 -1
- package/dist/src/memory-learning/repository.js +10 -5
- package/dist/src/memory-learning/service.js +23 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/request-service.js +3 -3
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/setup/service.d.ts +14 -4
- package/dist/src/phone/setup/service.js +106 -28
- package/dist/src/process/mcp-stdio-supervisor.d.ts +1 -0
- package/dist/src/process/mcp-stdio-supervisor.js +14 -0
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.d.ts +2 -0
- package/dist/src/runtime-tools/phone-dependencies.js +10 -0
- package/dist/src/share/note-share-service.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +3 -3
- package/dist/src/tasks/task-application-service.js +2 -2
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-contract-planner.js +1 -1
- package/dist/src/tasks/task-criterion-review-repository.js +1 -1
- package/dist/src/tasks/task-handoff.js +1 -1
- package/dist/src/tasks/task-research-result.js +1 -1
- package/dist/src/tasks/task-run-coordinator.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/extraction/registry.js +2 -2
- package/dist/src/user-model/capture/executor.d.ts +1 -0
- package/dist/src/user-model/capture/executor.js +6 -6
- package/dist/src/user-model/capture/semantic.d.ts +3 -0
- package/dist/src/user-model/capture/semantic.js +14 -4
- package/package.json +3 -1
- package/skills/tools/configure-xopc/SKILL.md +10 -3
- package/skills/tools/configure-xopc/references/browser/chrome-extension.md +4 -1
- package/skills/tools/configure-xopc/references/browser/overview.md +2 -2
- package/skills/tools/configure-xopc/references/phone/aliyun.md +3 -2
- package/skills/tools/configure-xopc/references/phone/overview.md +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Dne9A10p.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BoHL-b1o.js +0 -1
- package/dist/gateway/static/root/assets/agents-CIiIlVBp.js +0 -77
- package/dist/gateway/static/root/assets/app-link-1j40sJ-z.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-vgS1CHDj.js +0 -1
- package/dist/gateway/static/root/assets/attachment-load-qjPpQzYY.js +0 -1
- package/dist/gateway/static/root/assets/automation-api-hRsGx-qe.js +0 -1
- package/dist/gateway/static/root/assets/automation-task-card-MnzgyTVA.js +0 -3
- package/dist/gateway/static/root/assets/automations-workspace-C3xZLafX.js +0 -9
- package/dist/gateway/static/root/assets/browser-settings-page-BD1uF_Nb.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-BGE6hiUE.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-Bda4mSdf.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B2B7no22.js +0 -8
- package/dist/gateway/static/root/assets/channels-NtsjZThx.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-BnOCCAXG.js +0 -72
- package/dist/gateway/static/root/assets/composer-payload-handoff-CQc-VTaL.js +0 -1
- package/dist/gateway/static/root/assets/confirm-dialog-XGclfBqe.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-CcXe9kz5.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Ci0L2How.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-cbC6-2Ya.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-_3BJFWVQ.js +0 -1
- package/dist/gateway/static/root/assets/dist-CaUuvp8-.js +0 -1
- package/dist/gateway/static/root/assets/dist-D3lWNSe7.js +0 -1
- package/dist/gateway/static/root/assets/dist-DfWfZ9iu.js +0 -1
- package/dist/gateway/static/root/assets/dist-DusecO_p.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BHBOPF_q.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D6pCBY1V.js +0 -2
- package/dist/gateway/static/root/assets/index-Cc41XQid.css +0 -1
- package/dist/gateway/static/root/assets/index-CnOYR6jq.js +0 -11
- package/dist/gateway/static/root/assets/install-connector-dialog-BuNXON0P.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CP-BkbB6.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-I-pXv4ML.js +0 -1
- package/dist/gateway/static/root/assets/messages-ByFlEbsu.js +0 -3
- package/dist/gateway/static/root/assets/model-selector-CXcxc30J.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CbpLXAVh.js +0 -5
- package/dist/gateway/static/root/assets/note-image-lightbox-cLGiF8oU.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-Du44NIEJ.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CXR1Gy0x.js +0 -1
- package/dist/gateway/static/root/assets/phone-settings-page-vg65qilc.js +0 -1
- package/dist/gateway/static/root/assets/plugin-details-dialog-B3Hn2cbx.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-Ch-ZMyTu.js +0 -7
- package/dist/gateway/static/root/assets/projects-page-B7cetxao.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-Zc5Z3fNv.js +0 -2
- package/dist/gateway/static/root/assets/send-1f1Ntw6E.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-ChUtTAoG.js +0 -23
- package/dist/gateway/static/root/assets/sessions-page-Bt52kBvJ.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BI4DMz4_.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-A6uMpGRy.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-D1otGSXD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bmfadz8A.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BZklXTX9.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-SjZGW1Dx.js +0 -2
- package/dist/gateway/static/root/assets/tracing-settings-page-MvG4SH64.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-vDdxHtUb.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-Ce2mgYme.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DRSsn4EV.js +0 -2
- package/dist/gateway/static/root/assets/voice-transcribe-api-Bbyj0yGR.js +0 -1
- package/dist/gateway/static/root/assets/working-directory-picker-modal-CDZ1xh3o.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-4cZ26iaD.js +0 -1
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-CIavPUr3.js +0 -1
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { init_connection, isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
1
3
|
import { isSkillInstallTarget } from "../skills/install-target.js";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
2
5
|
import { Type } from "@sinclair/typebox";
|
|
3
6
|
//#region src/agent/tools/skill-install-tool.ts
|
|
7
|
+
init_connection();
|
|
4
8
|
const SkillInstallSchema = Type.Object({
|
|
9
|
+
idempotencyKey: Type.Optional(Type.String({
|
|
10
|
+
minLength: 1,
|
|
11
|
+
maxLength: 200,
|
|
12
|
+
description: "Stable installation intent key. Keep the same key after a timeout; use a new key for a new install/update request."
|
|
13
|
+
})),
|
|
5
14
|
source: Type.Optional(Type.String({ description: "Explicit source install: Git URL, GitHub repository URL, https .zip/.tar.gz URL, file:// URL, or local archive/path." })),
|
|
6
15
|
provider: Type.Optional(Type.Union([
|
|
7
16
|
Type.Literal("store"),
|
|
@@ -21,7 +30,7 @@ function clean(value) {
|
|
|
21
30
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
22
31
|
}
|
|
23
32
|
function createSkillInstallTool(deps) {
|
|
24
|
-
|
|
33
|
+
const tool = {
|
|
25
34
|
name: "skill_install",
|
|
26
35
|
label: "Install skill",
|
|
27
36
|
description: "Install an xopc skill from a Store/SkillHub/ClawHub marketplace result or an explicit source. Use only when the user clearly asks to install or update a skill; never treat search or a pasted URL as installation consent.",
|
|
@@ -146,6 +155,52 @@ function createSkillInstallTool(deps) {
|
|
|
146
155
|
idempotent: false,
|
|
147
156
|
finalGuardRelevant: true
|
|
148
157
|
};
|
|
158
|
+
const execute = tool.execute.bind(tool);
|
|
159
|
+
tool.execute = async (callId, params, signal, update) => {
|
|
160
|
+
if (!isXopcDatabaseOpen() || !deps.getConversationId?.()) return execute(callId, params, signal, update);
|
|
161
|
+
const key = clean(params.idempotencyKey) ?? callId;
|
|
162
|
+
const input = {
|
|
163
|
+
source: clean(params.source),
|
|
164
|
+
provider: clean(params.provider),
|
|
165
|
+
name: clean(params.name),
|
|
166
|
+
version: clean(params.version),
|
|
167
|
+
ref: clean(params.ref),
|
|
168
|
+
path: clean(params.path),
|
|
169
|
+
skillId: clean(params.skillId),
|
|
170
|
+
target: isSkillInstallTarget(params.target) ? params.target : "global",
|
|
171
|
+
force: params.force === true,
|
|
172
|
+
strictScan: params.strictScan === true
|
|
173
|
+
};
|
|
174
|
+
const fingerprint = createHash("sha256").update(JSON.stringify(input)).digest("hex");
|
|
175
|
+
const receipts = new DurableState("skills.install", deps.getConversationId());
|
|
176
|
+
const previous = receipts.update(key, (value) => ({
|
|
177
|
+
value: value ?? { fingerprint },
|
|
178
|
+
result: value
|
|
179
|
+
}));
|
|
180
|
+
if (previous) {
|
|
181
|
+
if (previous.fingerprint !== fingerprint) return {
|
|
182
|
+
content: [{
|
|
183
|
+
type: "text",
|
|
184
|
+
text: "Installation intent key was already used with different parameters."
|
|
185
|
+
}],
|
|
186
|
+
details: { errorCode: "intent_conflict" }
|
|
187
|
+
};
|
|
188
|
+
return previous.result ?? {
|
|
189
|
+
content: [{
|
|
190
|
+
type: "text",
|
|
191
|
+
text: "Installation result is not yet known. Inspect skill_manage status before taking further action; do not blindly reinstall or overwrite."
|
|
192
|
+
}],
|
|
193
|
+
details: { errorCode: "install_unknown" }
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const result = await execute(callId, params, signal, update);
|
|
197
|
+
receipts.set(key, {
|
|
198
|
+
fingerprint,
|
|
199
|
+
result
|
|
200
|
+
});
|
|
201
|
+
return result;
|
|
202
|
+
};
|
|
203
|
+
return tool;
|
|
149
204
|
}
|
|
150
205
|
//#endregion
|
|
151
206
|
export { createSkillInstallTool };
|
|
@@ -4,5 +4,9 @@ export interface SkillManageToolDeps {
|
|
|
4
4
|
getSkillManager: () => SkillManager | undefined;
|
|
5
5
|
getWorkspace: () => string;
|
|
6
6
|
onSkillsFilesystemMutate?: () => void;
|
|
7
|
+
getSkillIndexingContext?: () => {
|
|
8
|
+
registeredToolNames: string[];
|
|
9
|
+
skillAllowlist?: string[];
|
|
10
|
+
} | undefined;
|
|
7
11
|
}
|
|
8
12
|
export declare function createSkillManageTool(deps: SkillManageToolDeps): AgentTool;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
|
-
import {
|
|
3
|
+
import { removeSkillsLockEntry } from "../skills/hub-lock.js";
|
|
4
|
+
import { hasBinary } from "../skills/installer.js";
|
|
5
|
+
import { createSkillConfigManager, getSkillEnvironment, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
6
|
+
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../skills/workspace-skills-dir.js";
|
|
4
7
|
import { applyPatchToContent, atomicWriteUtf8, effectiveAgentWritePolicy, ensureCategorySegment, isPathInsideDir, maxSkillMdChars, maxSupportFileBytes, mutatableSkillOrNull, resolveCreateSkillDir, scanSkillDirOrError, validateSkillMdContent, validateSkillNameSegment, validateSupportingRelativePath } from "../skills/skill-manage-ops.js";
|
|
5
8
|
import { join } from "path";
|
|
6
9
|
import { existsSync, rmSync } from "fs";
|
|
@@ -10,6 +13,9 @@ import { Type } from "@sinclair/typebox";
|
|
|
10
13
|
init_paths();
|
|
11
14
|
const SkillManageSchema = Type.Object({
|
|
12
15
|
action: Type.Union([
|
|
16
|
+
Type.Literal("status"),
|
|
17
|
+
Type.Literal("enable"),
|
|
18
|
+
Type.Literal("disable"),
|
|
13
19
|
Type.Literal("create"),
|
|
14
20
|
Type.Literal("edit"),
|
|
15
21
|
Type.Literal("patch"),
|
|
@@ -40,7 +46,7 @@ function createSkillManageTool(deps) {
|
|
|
40
46
|
return {
|
|
41
47
|
name: "skill_manage",
|
|
42
48
|
label: "🛠️ Skill",
|
|
43
|
-
description: "Create, edit, patch, or delete user skills under ~/.xopc/skills and/or workspace .xopc/skills/ (see skills.agentWritePolicy). Also write_file / remove_file under references/, templates/, scripts/, assets/. Bundled and extra-dir skills cannot be modified. Runs a security scan after writes.",
|
|
49
|
+
description: "Inspect installed skills with status (including disabled skills and current Agent availability); enable or disable by name. Create, edit, patch, or delete/uninstall user skills under ~/.xopc/skills and/or workspace .xopc/skills/ (see skills.agentWritePolicy). Also write_file / remove_file under references/, templates/, scripts/, assets/. Bundled and extra-dir skills cannot be modified. Runs a security scan after writes.",
|
|
44
50
|
parameters: SkillManageSchema,
|
|
45
51
|
async execute(_toolCallId, params) {
|
|
46
52
|
const mgr = deps.getSkillManager();
|
|
@@ -56,6 +62,71 @@ function createSkillManageTool(deps) {
|
|
|
56
62
|
const notify = () => deps.onSkillsFilesystemMutate?.();
|
|
57
63
|
try {
|
|
58
64
|
switch (params.action) {
|
|
65
|
+
case "status":
|
|
66
|
+
case "enable":
|
|
67
|
+
case "disable": {
|
|
68
|
+
const requested = params.name?.trim();
|
|
69
|
+
if (params.action !== "status" && !requested) return jsonResult({
|
|
70
|
+
success: false,
|
|
71
|
+
error: "name is required."
|
|
72
|
+
});
|
|
73
|
+
const skill = requested ? mgr.findSkill(requested) : void 0;
|
|
74
|
+
if (requested && !skill) return jsonResult({
|
|
75
|
+
success: false,
|
|
76
|
+
error: "Skill is not installed.",
|
|
77
|
+
errorCode: "skill_not_found"
|
|
78
|
+
});
|
|
79
|
+
if (params.action !== "status") {
|
|
80
|
+
const enabled = params.action === "enable";
|
|
81
|
+
const manager = createSkillConfigManager(resolveStateDir());
|
|
82
|
+
manager.setSkillEnabled(requested, enabled);
|
|
83
|
+
if (manager.load().entries?.[requested]?.enabled !== enabled) return jsonResult({
|
|
84
|
+
success: false,
|
|
85
|
+
error: "Skill enabled state could not be saved."
|
|
86
|
+
});
|
|
87
|
+
mgr.refreshPromptFromConfig();
|
|
88
|
+
notify();
|
|
89
|
+
}
|
|
90
|
+
const config = createSkillConfigManager(resolveStateDir()).load();
|
|
91
|
+
const indexing = deps.getSkillIndexingContext?.();
|
|
92
|
+
const canLoad = !indexing || indexing.registeredToolNames.includes("skill_view");
|
|
93
|
+
const visible = new Set(canLoad ? mgr.getEnabledSkillsForAgentSession(indexing).map((item) => item.name) : []);
|
|
94
|
+
return jsonResult({
|
|
95
|
+
success: true,
|
|
96
|
+
skills: (skill ? [skill] : mgr.getSkills()).map((item) => {
|
|
97
|
+
const enabled = resolveSkillConfig(item, config).enabled !== false;
|
|
98
|
+
const requires = item.metadata.xopc?.requires ?? item.metadata.requires;
|
|
99
|
+
const environment = getSkillEnvironment(item, config);
|
|
100
|
+
const missingEnv = requires?.env?.filter((name) => !environment[name]) ?? [];
|
|
101
|
+
const anyBinsMissing = Boolean(requires?.anyBins?.length && !requires.anyBins.some(hasBinary));
|
|
102
|
+
const requirementsMet = !missingEnv.length && !anyBinsMissing && isSkillEnabled(item, {
|
|
103
|
+
...config,
|
|
104
|
+
entries: {
|
|
105
|
+
...config.entries,
|
|
106
|
+
[item.name]: {
|
|
107
|
+
...config.entries?.[item.name],
|
|
108
|
+
enabled: true
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
name: item.name,
|
|
114
|
+
description: item.description,
|
|
115
|
+
source: item.source,
|
|
116
|
+
managed: item.origin?.managed === true,
|
|
117
|
+
writable: Boolean(mutatableSkillOrNull(item, workspace, policy)),
|
|
118
|
+
enabled,
|
|
119
|
+
requirementsMet,
|
|
120
|
+
missingEnv,
|
|
121
|
+
availableToCurrentAgent: requirementsMet && visible.has(item.name),
|
|
122
|
+
state: !enabled ? "disabled" : !requirementsMet ? "requirements_unmet" : !visible.has(item.name) ? "agent_unavailable" : "ready",
|
|
123
|
+
verified: false
|
|
124
|
+
};
|
|
125
|
+
}),
|
|
126
|
+
managementPath: "/capabilities/skills?tab=installed",
|
|
127
|
+
guidance: "Ready means the current Agent can load the skill, not that a task has been tested. After installation, load skill_view and complete the requested task; explain relevant examples and any remaining requirements. Enabling is shared by skill name."
|
|
128
|
+
});
|
|
129
|
+
}
|
|
59
130
|
case "create": {
|
|
60
131
|
const nameErr = validateSkillNameSegment(params.name ?? "", "name");
|
|
61
132
|
if (nameErr) return jsonResult({
|
|
@@ -246,6 +317,7 @@ function createSkillManageTool(deps) {
|
|
|
246
317
|
recursive: true,
|
|
247
318
|
force: true
|
|
248
319
|
});
|
|
320
|
+
removeSkillsLockEntry(name, isPathInsideDir(resolveWorkspaceSkillsDir(workspace), sk.baseDir) ? resolveWorkspaceSkillsLockPath(workspace) : void 0);
|
|
249
321
|
notify();
|
|
250
322
|
return jsonResult({
|
|
251
323
|
success: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
|
-
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
4
3
|
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
4
|
+
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
5
5
|
import { resolveSkillReadablePath } from "../skills/skill-view-path.js";
|
|
6
6
|
import { readFileSync, statSync } from "fs";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
@@ -8,9 +8,9 @@ import { init_session_repository } from "../../storage/sqlite/session-repository
|
|
|
8
8
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
9
9
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
10
10
|
import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
11
|
+
import { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, getTaskHandoff, materializeTaskHandoffFile, readTaskHandoffSource } from "../../tasks/task-handoff.js";
|
|
11
12
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
12
13
|
import { taskResearchEvidence } from "../../tasks/task-research-result.js";
|
|
13
|
-
import { assertTaskHandoffAccess, assertTaskHandoffExecutorAccess, getTaskHandoff, materializeTaskHandoffFile, readTaskHandoffSource } from "../../tasks/task-handoff.js";
|
|
14
14
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
15
15
|
import { Type } from "@sinclair/typebox";
|
|
16
16
|
//#region src/agent/tools/task-collaboration-tool.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
2
|
declare const ToolManualSchema: import("@sinclair/typebox").TObject<{
|
|
3
3
|
tool: import("@sinclair/typebox").TString;
|
|
4
|
-
topic: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"agent">, import("@sinclair/typebox").TLiteral<"settings">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"connections">, import("@sinclair/typebox").TLiteral<"browser_setup">, import("@sinclair/typebox").TLiteral<"phone_setup">]>>;
|
|
4
|
+
topic: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"mcp">, import("@sinclair/typebox").TLiteral<"skills">, import("@sinclair/typebox").TLiteral<"agent">, import("@sinclair/typebox").TLiteral<"settings">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"connections">, import("@sinclair/typebox").TLiteral<"browser_setup">, import("@sinclair/typebox").TLiteral<"phone_setup">]>>;
|
|
5
5
|
}>;
|
|
6
6
|
export declare function createToolManualTool(): AgentTool<typeof ToolManualSchema, {}>;
|
|
7
7
|
export {};
|
|
@@ -5,13 +5,15 @@ import { Type } from "@sinclair/typebox";
|
|
|
5
5
|
const ToolManualSchema = Type.Object({
|
|
6
6
|
tool: Type.String({ description: "Built-in tool name, e.g. browser_use" }),
|
|
7
7
|
topic: Type.Optional(Type.Union([
|
|
8
|
+
Type.Literal("mcp"),
|
|
9
|
+
Type.Literal("skills"),
|
|
8
10
|
Type.Literal("agent"),
|
|
9
11
|
Type.Literal("settings"),
|
|
10
12
|
Type.Literal("automation"),
|
|
11
13
|
Type.Literal("connections"),
|
|
12
14
|
Type.Literal("browser_setup"),
|
|
13
15
|
Type.Literal("phone_setup")
|
|
14
|
-
], { description: "Focused
|
|
16
|
+
], { description: "Focused product workflow; omit for the full parameter manual." }))
|
|
15
17
|
});
|
|
16
18
|
function createToolManualTool() {
|
|
17
19
|
return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
3
4
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
4
5
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
6
|
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { basename, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -9,12 +9,12 @@ import type { LocalAppService } from '../../local-apps/index.js';
|
|
|
9
9
|
import type { ChatPreviewService } from '../../chat-previews/index.js';
|
|
10
10
|
import { TaskApplicationService } from '../../tasks/task-application-service.js';
|
|
11
11
|
declare const XopcUseToolSchema: import("@sinclair/typebox").TObject<{
|
|
12
|
-
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"context">, import("@sinclair/typebox").TLiteral<"project">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"note">, import("@sinclair/typebox").TLiteral<"task">, import("@sinclair/typebox").TLiteral<"task_run">, import("@sinclair/typebox").TLiteral<"local_app">, import("@sinclair/typebox").TLiteral<"chat_preview">, import("@sinclair/typebox").TLiteral<"agent">, import("@sinclair/typebox").TLiteral<"settings">, import("@sinclair/typebox").TLiteral<"browser_setup">, import("@sinclair/typebox").TLiteral<"phone_setup">]>;
|
|
12
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"context">, import("@sinclair/typebox").TLiteral<"project">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"note">, import("@sinclair/typebox").TLiteral<"task">, import("@sinclair/typebox").TLiteral<"task_run">, import("@sinclair/typebox").TLiteral<"local_app">, import("@sinclair/typebox").TLiteral<"chat_preview">, import("@sinclair/typebox").TLiteral<"agent">, import("@sinclair/typebox").TLiteral<"settings">, import("@sinclair/typebox").TLiteral<"browser_setup">, import("@sinclair/typebox").TLiteral<"phone_setup">, import("@sinclair/typebox").TLiteral<"mcp_setup">]>;
|
|
13
13
|
command: import("@sinclair/typebox").TString;
|
|
14
14
|
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>>;
|
|
15
15
|
dryRun: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
16
16
|
}>;
|
|
17
|
-
export type XopcUseMode = 'context' | 'project' | 'automation' | 'note' | 'task' | 'task_run' | 'chat_preview' | 'local_app' | 'agent' | 'settings' | 'browser_setup' | 'phone_setup';
|
|
17
|
+
export type XopcUseMode = 'context' | 'project' | 'automation' | 'note' | 'task' | 'task_run' | 'chat_preview' | 'local_app' | 'agent' | 'settings' | 'browser_setup' | 'phone_setup' | 'mcp_setup';
|
|
18
18
|
export interface XopcUseToolInput {
|
|
19
19
|
mode: XopcUseMode;
|
|
20
20
|
command: string;
|
|
@@ -22,9 +22,12 @@ export interface XopcUseToolInput {
|
|
|
22
22
|
dryRun?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface XopcUseToolDeps {
|
|
25
|
+
getAgentToolAvailability?: (agentId: string, tool: string) => import('../../agent-matching/service.js').AvailabilityCheck;
|
|
25
26
|
canConfigureFromConversation?: () => boolean;
|
|
27
|
+
canRequestWeixinMcpSetup?: () => boolean;
|
|
26
28
|
getPhoneSetupService?: () => import('../../phone/setup/service.js').PhoneSetupService | undefined;
|
|
27
29
|
getBrowserSetupService?: () => import('../../browser/setup/service.js').BrowserSetupService | undefined;
|
|
30
|
+
getMcpSetupService?: () => import('../mcp/conversation-setup.js').McpConversationSetup | undefined;
|
|
28
31
|
authorizeCapability?: CapabilityContext['authorize'];
|
|
29
32
|
getWorkspace?: () => string;
|
|
30
33
|
getConfig?: () => Config | undefined;
|
|
@@ -20,19 +20,21 @@ import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
|
20
20
|
import { getAutomationSetup } from "../../automations/configuration-conversation.js";
|
|
21
21
|
import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
|
|
22
22
|
import "../../capabilities/runtime/dispatcher.js";
|
|
23
|
+
import { AutomationMcpSourceInput, prepareAutomationMcpSource } from "../../automations/mcp-source.js";
|
|
23
24
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
24
|
-
import "../../projects/index.js";
|
|
25
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
26
|
-
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
27
|
-
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
28
25
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
29
26
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
27
|
+
import "../../projects/index.js";
|
|
30
28
|
import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
29
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
31
30
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
32
31
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
32
|
+
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
33
33
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
34
34
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
35
35
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
36
|
+
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
37
|
+
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
36
38
|
import "../../tasks/index.js";
|
|
37
39
|
import { randomUUID } from "node:crypto";
|
|
38
40
|
import { Type } from "@sinclair/typebox";
|
|
@@ -53,9 +55,10 @@ const XopcUseToolSchema = Type.Object({
|
|
|
53
55
|
Type.Literal("agent"),
|
|
54
56
|
Type.Literal("settings"),
|
|
55
57
|
Type.Literal("browser_setup"),
|
|
56
|
-
Type.Literal("phone_setup")
|
|
58
|
+
Type.Literal("phone_setup"),
|
|
59
|
+
Type.Literal("mcp_setup")
|
|
57
60
|
]),
|
|
58
|
-
command: Type.String({ description: "Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Agent profile-only changes: patch_profile {id, expectedRevision, patch:{name?,description?,style?,language?,...}, idempotencyKey?} preserves omitted fields. Agent commands: list, get {id}, create {id, profile, workspace?, models?, skills?, tools?, runtime?, idempotencyKey?}, update {id, expectedRevision, patch, idempotencyKey?}, set_default {id, expectedRevision, idempotencyKey?}, disable/delete/purge {id, expectedRevision, idempotencyKey?}. Purge also removes on-disk data. Project create accepts idempotencyKey; update/pin/unpin/delete accepts {projectId, expectedVersion?, idempotencyKey?}; stable retries require the original expectedVersion. Delete preserves workspace files and does not confirm external execution stopped. Project milestone writes support idempotencyKey; update_milestone/delete_milestone require original expectedRevision for stable retries, and create_update requires original expectedVersion. TaskRun cancel accepts idempotencyKey and expectedVersion, and does not confirm external execution stopped. Automation diagnostics: get_run/run_events {runId}, metrics {}, events {eventType?, source?, limit?}, deliveries {runId?, limit?}, product_events {eventType, source?, payloadKey?, payloadValue?, limit?}; payload filters require both key and value. Recovery commands: replay_event {eventId, reason, idempotencyKey}, retry_delivery {runId, destinationKey, reason, idempotencyKey}. Automation also supports cancel/read {runId, idempotencyKey?} and read_all {projectId?, idempotencyKey?}; omitted projectId means all projects. Cancel acceptance is not confirmation of stopping. Object command. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/rerun/pause/resume/history (rerun takes runId; run/rerun accept idempotencyKey), note list/get/project_summaries/history {noteId}/snapshot {noteId, timestamp}/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, chat_preview create/revise/get, local_app list/get/create/validate, and settings open." }),
|
|
61
|
+
command: Type.String({ description: "HTTP MCP configuration: mode mcp_setup inspect/start/get/advance/cancel/set_enabled/remove; load tool_manual topic mcp. Never pass credentials or OAuth callbacks as tool arguments. Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Agent profile-only changes: patch_profile {id, expectedRevision, patch:{name?,description?,style?,language?,...}, idempotencyKey?} preserves omitted fields. Agent commands: list, get {id}, create {id, profile, workspace?, models?, skills?, tools?, runtime?, idempotencyKey?}, update {id, expectedRevision, patch, idempotencyKey?}, set_default {id, expectedRevision, idempotencyKey?}, disable/delete/purge {id, expectedRevision, idempotencyKey?}. Purge also removes on-disk data. Project create accepts idempotencyKey; update/pin/unpin/delete accepts {projectId, expectedVersion?, idempotencyKey?}; stable retries require the original expectedVersion. Delete preserves workspace files and does not confirm external execution stopped. Project milestone writes support idempotencyKey; update_milestone/delete_milestone require original expectedRevision for stable retries, and create_update requires original expectedVersion. TaskRun cancel accepts idempotencyKey and expectedVersion, and does not confirm external execution stopped. Automation diagnostics: get_run/run_events {runId}, metrics {}, events {eventType?, source?, limit?}, deliveries {runId?, limit?}, product_events {eventType, source?, payloadKey?, payloadValue?, limit?}; payload filters require both key and value. Recovery commands: replay_event {eventId, reason, idempotencyKey}, retry_delivery {runId, destinationKey, reason, idempotencyKey}. Automation also supports cancel/read {runId, idempotencyKey?} and read_all {projectId?, idempotencyKey?}; omitted projectId means all projects. Cancel acceptance is not confirmation of stopping. Object command. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/rerun/pause/resume/history (rerun takes runId; run/rerun accept idempotencyKey), note list/get/project_summaries/history {noteId}/snapshot {noteId, timestamp}/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, chat_preview create/revise/get, local_app list/get/create/validate, and settings open." }),
|
|
59
62
|
args: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
60
63
|
dryRun: Type.Optional(Type.Boolean({ description: "Validate and preview the action without mutating xopc state." }))
|
|
61
64
|
});
|
|
@@ -743,7 +746,7 @@ async function handleProject(command, args, deps, dryRun, capabilities) {
|
|
|
743
746
|
error: `Unsupported project command: ${command}`
|
|
744
747
|
};
|
|
745
748
|
}
|
|
746
|
-
async function handleAutomation(command, args, deps, dryRun, capabilities) {
|
|
749
|
+
async function handleAutomation(command, args, deps, dryRun, capabilities, toolCallId) {
|
|
747
750
|
const automations = deps.getAutomationService?.();
|
|
748
751
|
if (!automations) return {
|
|
749
752
|
ok: false,
|
|
@@ -760,7 +763,7 @@ async function handleAutomation(command, args, deps, dryRun, capabilities) {
|
|
|
760
763
|
try {
|
|
761
764
|
return (operation === "xopc.automations.delete" ? AutomationDeleteOutputSchema : operation === "xopc.automations.cancel" ? AutomationCancelOutputSchema : operation === "xopc.automations.read" ? AutomationReadOutputSchema : operation === "xopc.automations.read_all" ? AutomationReadAllOutputSchema : operation === "xopc.automations.replay_event" || operation === "xopc.automations.retry_delivery" ? AutomationRecoveryOutputSchema : operation === "xopc.automations.run" || operation === "xopc.automations.rerun" ? AutomationRunMutationOutputSchema : AutomationMutationOutputSchema).parse(await capabilities.call(operation, input, caller, {
|
|
762
765
|
...capabilities.describe(operation, caller),
|
|
763
|
-
idempotencyKey: trimString(args.idempotencyKey) ??
|
|
766
|
+
idempotencyKey: trimString(args.idempotencyKey) ?? toolCallId
|
|
764
767
|
}));
|
|
765
768
|
} catch (error) {
|
|
766
769
|
if (error instanceof CapabilityError) return {
|
|
@@ -1937,6 +1940,70 @@ function createXopcUseTool(deps) {
|
|
|
1937
1940
|
dryRun
|
|
1938
1941
|
};
|
|
1939
1942
|
if (!command) return errorText("command is required", details);
|
|
1943
|
+
if (mode === "mcp_setup") {
|
|
1944
|
+
const service = deps.getMcpSetupService?.();
|
|
1945
|
+
const conversationId = deps.getCurrentConversationId?.();
|
|
1946
|
+
const agentId = deps.getCurrentAgentId?.();
|
|
1947
|
+
if (!service || !conversationId || !agentId) return errorText("MCP setup requires a Gateway conversation.", details);
|
|
1948
|
+
if (deps.authorizeCapability && !await deps.authorizeCapability(`xopc.mcp_setup.${command}`, args)) return errorText("MCP setup access denied", details);
|
|
1949
|
+
try {
|
|
1950
|
+
return okText({
|
|
1951
|
+
...details,
|
|
1952
|
+
result: await service.command(command, args, {
|
|
1953
|
+
conversationId,
|
|
1954
|
+
agentId,
|
|
1955
|
+
signal,
|
|
1956
|
+
authorizeResearch: async (tool, params) => {
|
|
1957
|
+
if (deps.getAgentToolAvailability?.(agentId, tool).state !== "verified") return false;
|
|
1958
|
+
const scope = getDelegationScope(), current = scope?.getToolContext?.();
|
|
1959
|
+
if (scope && !scope.tools.some((item) => item.name === tool)) return false;
|
|
1960
|
+
if (scope?.authorizeToolCall) {
|
|
1961
|
+
if (!current) return false;
|
|
1962
|
+
if ((await scope.authorizeToolCall({
|
|
1963
|
+
...current,
|
|
1964
|
+
toolCall: {
|
|
1965
|
+
type: "toolCall",
|
|
1966
|
+
id: `${toolCallId}/research/${crypto.randomUUID()}`,
|
|
1967
|
+
name: tool,
|
|
1968
|
+
arguments: params
|
|
1969
|
+
},
|
|
1970
|
+
args: params
|
|
1971
|
+
}, signal))?.block) return false;
|
|
1972
|
+
}
|
|
1973
|
+
return !deps.authorizeCapability || await deps.authorizeCapability(tool, params);
|
|
1974
|
+
},
|
|
1975
|
+
canConfigure: deps.canConfigureFromConversation?.() === true,
|
|
1976
|
+
canRequestWeixinSetup: deps.canRequestWeixinMcpSetup?.() === true
|
|
1977
|
+
}, dryRun)
|
|
1978
|
+
});
|
|
1979
|
+
} catch (error) {
|
|
1980
|
+
return errorText(error instanceof Error ? error.message : String(error), details);
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
if (mode === "automation" && command === "prepare_source") {
|
|
1984
|
+
const config = deps.getConfig?.();
|
|
1985
|
+
if (!config || !deps.getWorkspace) return errorText("MCP source preparation is unavailable in this runtime.", details);
|
|
1986
|
+
if (deps.authorizeCapability && !await deps.authorizeCapability("xopc.automations.prepare_source", args)) return errorText("Source preparation denied", details);
|
|
1987
|
+
const input = AutomationMcpSourceInput.parse(args);
|
|
1988
|
+
if (dryRun) return okText({
|
|
1989
|
+
...details,
|
|
1990
|
+
result: {
|
|
1991
|
+
dryRun: true,
|
|
1992
|
+
...input
|
|
1993
|
+
}
|
|
1994
|
+
});
|
|
1995
|
+
return okText({
|
|
1996
|
+
...details,
|
|
1997
|
+
result: await prepareAutomationMcpSource(input, {
|
|
1998
|
+
conversationId: deps.getCurrentConversationId?.(),
|
|
1999
|
+
agentId: deps.getCurrentAgentId?.(),
|
|
2000
|
+
canConfigure: deps.canConfigureFromConversation?.() === true,
|
|
2001
|
+
workspaceDir: deps.getWorkspace(),
|
|
2002
|
+
readConfig: () => deps.getConfig?.() ?? config,
|
|
2003
|
+
signal
|
|
2004
|
+
})
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
1940
2007
|
if (mode === "phone_setup") {
|
|
1941
2008
|
const service = deps.getPhoneSetupService?.();
|
|
1942
2009
|
const conversationId = deps.getCurrentConversationId?.();
|
|
@@ -1950,6 +2017,7 @@ function createXopcUseTool(deps) {
|
|
|
1950
2017
|
conversationId,
|
|
1951
2018
|
agentId,
|
|
1952
2019
|
canConfigure: deps.canConfigureFromConversation?.() === true,
|
|
2020
|
+
isAuthorized: deps.canConfigureFromConversation,
|
|
1953
2021
|
runId: getEmbeddedExecutionRunId()
|
|
1954
2022
|
}, dryRun)
|
|
1955
2023
|
});
|
|
@@ -2155,7 +2223,10 @@ function createXopcUseTool(deps) {
|
|
|
2155
2223
|
payloadKey: args.payloadKey,
|
|
2156
2224
|
payloadValue: args.payloadValue,
|
|
2157
2225
|
limit: args.limit
|
|
2158
|
-
} : {
|
|
2226
|
+
} : {
|
|
2227
|
+
id: args.runId ?? args.id,
|
|
2228
|
+
...command === "get_run" && args.waitMs !== void 0 ? { waitMs: args.waitMs } : {}
|
|
2229
|
+
};
|
|
2159
2230
|
const caller = {
|
|
2160
2231
|
principalId: `agent:${deps.getCurrentAgentId?.() ?? "main"}`,
|
|
2161
2232
|
surface: "agent",
|
|
@@ -2315,7 +2386,7 @@ function createXopcUseTool(deps) {
|
|
|
2315
2386
|
kind: "xopc_use",
|
|
2316
2387
|
toolCallId
|
|
2317
2388
|
}
|
|
2318
|
-
}, async () => mode === "agent" ? await handleAgent(command, args, dryRun, capabilities, deps, toolCallId, signal) : mode === "project" ? await handleProject(command, args, deps, dryRun, capabilities) : mode === "automation" ? await handleAutomation(command, args, deps, dryRun, capabilities) : mode === "note" ? await handleNote(command, args, deps, dryRun, capabilities) : mode === "task" ? await handleTask(command, args, deps, dryRun, capabilities) : mode === "task_run" ? await handleTaskRun(command, args, dryRun, deps, capabilities) : mode === "local_app" ? await handleLocalApp(command, args, deps, dryRun) : mode === "chat_preview" ? await handleChatPreview(command, args, deps, dryRun) : {
|
|
2389
|
+
}, async () => mode === "agent" ? await handleAgent(command, args, dryRun, capabilities, deps, toolCallId, signal) : mode === "project" ? await handleProject(command, args, deps, dryRun, capabilities) : mode === "automation" ? await handleAutomation(command, args, deps, dryRun, capabilities, toolCallId) : mode === "note" ? await handleNote(command, args, deps, dryRun, capabilities) : mode === "task" ? await handleTask(command, args, deps, dryRun, capabilities) : mode === "task_run" ? await handleTaskRun(command, args, dryRun, deps, capabilities) : mode === "local_app" ? await handleLocalApp(command, args, deps, dryRun) : mode === "chat_preview" ? await handleChatPreview(command, args, deps, dryRun) : {
|
|
2319
2390
|
ok: false,
|
|
2320
2391
|
error: `Unsupported mode: ${String(mode)}`
|
|
2321
2392
|
});
|
|
@@ -9,7 +9,7 @@ export declare class AgentCatalogService {
|
|
|
9
9
|
resumePendingProvisioning(): Promise<void>;
|
|
10
10
|
/** Startup recovery for catalog rows committed before their directories were provisioned. */
|
|
11
11
|
resumePendingProvisioningSync(): void;
|
|
12
|
-
update(agentIdRaw: string, patch: Partial<Omit<AgentEntry, 'id'>>, expectedRevision?: number): Promise<StoredAgent>;
|
|
12
|
+
update(agentIdRaw: string, patch: Partial<Omit<AgentEntry, 'id'>>, expectedRevision?: number, beforeCommit?: () => void): Promise<StoredAgent>;
|
|
13
13
|
/** Remove data for an Agent that has already been deleted from the catalog. */
|
|
14
14
|
purgeEntryData(entry: AgentEntry, defaultAgentId: string): Promise<void>;
|
|
15
15
|
validatePurgeEntry(entry: AgentEntry, defaultAgentId: string): void;
|
|
@@ -59,7 +59,7 @@ var AgentCatalogService = class {
|
|
|
59
59
|
}
|
|
60
60
|
this.resumePendingPurgeSync();
|
|
61
61
|
}
|
|
62
|
-
async update(agentIdRaw, patch, expectedRevision) {
|
|
62
|
+
async update(agentIdRaw, patch, expectedRevision, beforeCommit) {
|
|
63
63
|
const agentId = normalizeAgentId(agentIdRaw);
|
|
64
64
|
const current = this.repository.get(agentId);
|
|
65
65
|
if (!current) throw new Error(`Agent "${agentId}" not found`);
|
|
@@ -71,6 +71,7 @@ var AgentCatalogService = class {
|
|
|
71
71
|
id: agentId
|
|
72
72
|
};
|
|
73
73
|
await this.provision(next);
|
|
74
|
+
beforeCommit?.();
|
|
74
75
|
return this.repository.update(agentId, revision, next);
|
|
75
76
|
}
|
|
76
77
|
/** Remove data for an Agent that has already been deleted from the catalog. */
|
|
@@ -70,8 +70,11 @@ function registerAutomationRoutes(authenticated, deps) {
|
|
|
70
70
|
});
|
|
71
71
|
authenticated.get("/api/automations", async (c) => {
|
|
72
72
|
try {
|
|
73
|
-
const { items } = ProductReadContracts["xopc.automations.list"].output.parse(await capabilities.call("xopc.automations.list", { projectId: parseProjectId(c.req.query("projectId")) }, capabilityHttpContext(c)));
|
|
74
|
-
return c.json({
|
|
73
|
+
const { items, executionSummaries } = ProductReadContracts["xopc.automations.list"].output.parse(await capabilities.call("xopc.automations.list", { projectId: parseProjectId(c.req.query("projectId")) }, capabilityHttpContext(c)));
|
|
74
|
+
return c.json({
|
|
75
|
+
automations: items,
|
|
76
|
+
executionSummaries
|
|
77
|
+
});
|
|
75
78
|
} catch (error) {
|
|
76
79
|
return capabilityHttpError(c, error);
|
|
77
80
|
}
|
|
@@ -129,12 +132,17 @@ function registerAutomationRoutes(authenticated, deps) {
|
|
|
129
132
|
const automationId = c.req.query("automationId")?.trim();
|
|
130
133
|
const projectId = parseProjectId(c.req.query("projectId"));
|
|
131
134
|
try {
|
|
132
|
-
const { items } = ProductReadContracts["xopc.automations.history"].output.parse(await capabilities.call("xopc.automations.history", {
|
|
135
|
+
const { items, nextCursor, hasMore } = ProductReadContracts["xopc.automations.history"].output.parse(await capabilities.call("xopc.automations.history", {
|
|
133
136
|
automationId: automationId || void 0,
|
|
134
|
-
projectId
|
|
137
|
+
projectId,
|
|
138
|
+
cursor: c.req.query("cursor"),
|
|
135
139
|
limit: c.req.query("limit") === void 0 ? void 0 : Number(c.req.query("limit"))
|
|
136
140
|
}, capabilityHttpContext(c)));
|
|
137
|
-
return c.json({
|
|
141
|
+
return c.json({
|
|
142
|
+
runs: items,
|
|
143
|
+
nextCursor,
|
|
144
|
+
hasMore
|
|
145
|
+
});
|
|
138
146
|
} catch (error) {
|
|
139
147
|
return capabilityHttpError(c, error);
|
|
140
148
|
}
|
|
@@ -7,7 +7,7 @@ import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope
|
|
|
7
7
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
8
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
9
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
10
|
-
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
10
|
+
import { AutomationCreateCapabilityInputSchema, materializeAutomationTrigger } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
13
13
|
import "../draft/index.js";
|
|
@@ -39,7 +39,10 @@ function registerAutomationDraftCapabilities(dispatcher, service, getConfig) {
|
|
|
39
39
|
output: z.object({ simulation: AutomationSimulationSchema }),
|
|
40
40
|
execute(input) {
|
|
41
41
|
try {
|
|
42
|
-
return { simulation: simulateAutomation(
|
|
42
|
+
return { simulation: simulateAutomation({
|
|
43
|
+
...input,
|
|
44
|
+
trigger: materializeAutomationTrigger(input.trigger)
|
|
45
|
+
}) };
|
|
43
46
|
} catch (error) {
|
|
44
47
|
throw new CapabilityError("INVALID_INPUT", error instanceof Error ? error.message : "Invalid automation");
|
|
45
48
|
}
|