@xopcai/xopc 0.0.454 → 0.0.455
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/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/eventEmitter2.js +40 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/index.js +56 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/shared/conout.js +16 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/terminal.js +190 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/unixTerminal.js +287 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/utils.js +49 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsConoutConnection.js +190 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsPtyAgent.js +265 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsTerminal.js +178 -0
- package/dist/_virtual/_rolldown/runtime.js +10 -2
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-BKH-qNPt.js → activity-store-DYwR1u3f.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DY6IWy0_.js → agent-avatar-dicebear-CsRBprL-.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-tnAtQOAZ.js → agent-avatar-display-DqFYHXCS.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-BLQ2N_dY.js → agent-defaults-settings-panel-DOAJrMLe.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-Bfsm4GOs.js → agent-plugin-dialog-vqlN3ORH.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CDNiLv0W.js → agents-BgHlOVRV.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DGZsm8U4.js → agents-admin-api-CKscfdvA.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BhipC15e.js → api-CHM2c_Ah.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Bbj5k-7e.js → api-DPNeNCmR.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-CCZ-LmVT.js → app-link-DImAfVs5.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-fwhXHKxt.js → app-management-settings-panel-Bhz6bj1C.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BHkl-vFO.js → appearance-settings-BX32aogA.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DtCWwdsK.js → apps-page-0Yo3jBsQ.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-B9xaxa7V.js → archive-plugin-Bha8obMe.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-BHMjSwcy.js → automation-api-mn8ihWJ_.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-BgAjEoNV.js → automation-result-state-COzakzak.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-D3Eon5C0.js → automation-run-list-BhtaMpTb.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-DJRg72t-.js → automation-task-card-BY_k6iWp.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DdAzXb7s.js → automations-page-Dt_Z1UTT.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-D0nNat6N.js → automations-workspace-BhHgruhH.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-CgsjdprR.js → binary-plugins-DUbrJFLU.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-r6vj6dZO.js → block-editor-DW--pXAc.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-APCGT8Yr.js → browser-settings-page-CDh6nxs9.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-0gYkjdax.js → capabilities-DKbXv8Ck.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BgBwcqvY.js → capabilities-kG175Q-7.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-B1x3TwdV.js → capabilities-page-D1wQ2sPI.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BW5jQz5R.js +8 -0
- package/dist/gateway/static/root/assets/{channels-8Y08v4Q2.js → channels-BzZp42yO.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BRQDNNI5.js → chat-agents-api-UOdNWZ0_.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-qMGhfeQZ.js → chat-chart-block-NSy-B0NS.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-page-CSTyfO9c.js → chat-page-dY6aCCRx.js} +4 -4
- package/dist/gateway/static/root/assets/{chat-terminal-dock-0PJ9dURQ.js → chat-terminal-dock-CAaHWS7F.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-C4U_-rDo.js → command-palette-api-Dkn9bbYd.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-B9Q40ptH.js → composer-model-config-control-BrK8-SNz.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-ByuA8h5Z.js → composer-notifications-B-kL3qAA.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-zr1JDn3p.js → composer-payload-handoff-DBE1mvOS.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-D2F1quZR.js → computer-settings-page-C9KdEecx.js} +1 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-D_8v6Qex.js +1 -0
- package/dist/gateway/static/root/assets/{connection-usage-guide-DkDsHm_l.js → connection-usage-guide-CiVpcbds.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-1AcvESmp.js → connector-service-page-B919cKSm.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-C1OML7OO.js → connectors-api-CgsSm-Av.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-CMIY0Zj_.js → connectors-page-CEpfDCLA.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-D1eFhoMI.js → date-picker-dx284jQI.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-CqplKVk6.js → date-time-picker-Dj-bhLNP.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-UmrjWSq-.js → desktop-pet-DlTuGzZ2.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-B7I1II0Z.js → desktop-pet-narrative-cBFIPXzR.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DRRDJMu6.js → desktop-pet-settings-CsmrvoxU.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-CtKJMK52.js → dev-view-store-BOxbj1ie.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-C4aSCbqo.js → device-pairing-wizard-CAqFIFRC.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-D9U9yfnb.js → directory-picker-path-field-BxEw5OrT.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-D-eGt1_L.js → discussion-annotation-sync-CyntTwIa.js} +1 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-C0ReZguU.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BTLcC8-r.js → extension-debug-page-Cd3HMUbi.js} +1 -1
- package/dist/gateway/static/root/assets/extension-iframe-host-DiIqM2JO.js +1 -0
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DLRCNlej.js → extension-marketplace-api-CK5CMKTs.js} +1 -1
- package/dist/gateway/static/root/assets/extension-message-router-Dn8JzOdR.js +8 -0
- package/dist/gateway/static/root/assets/{extension-page-CdpI-Plq.js → extension-page-CLZtAtqm.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DUDaMvQg.js → extension-provider-CbVokTvd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-biWCnMGr.js → extension-settings-page-BM79cwUy.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-CnBRiQo8.js → file-preview-surface-z7_HV0WN.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BV5fpBSK.js → gateway-config-swr-OGhON-s6.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-CIqLQXlm.js → gateway-realtime-B9u4uSXW.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-xB7Bq4Zs.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-DBkfCzT5.js → gateway-restart-DKAweWmg.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DTzXUm9f.js → gateway-settings-Dc7qUbG-.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B49N_Ngm.js → gateway-startup-retry-BaaoKBoB.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-DVpxe45P.js → global-defaults-api-BIr3ApRj.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-DvaxBrjG.js → home-page-i_PIrDCU.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-CAKYslID.js → image-generation-api-C7D2IetZ.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-C2KmQJ2H.js → imports-page-BjEdZJxZ.js} +1 -1
- package/dist/gateway/static/root/assets/index-Bj5exyow.css +1 -0
- package/dist/gateway/static/root/assets/{index-BpzvsoS1.js → index-CZI3VGGW.js} +5 -5
- package/dist/gateway/static/root/assets/{install-connector-dialog-CmNvZt8M.js → install-connector-dialog-BsiyYQhx.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-syG2KRr2.js → keyboard-shortcuts-settings-CIthQ1lp.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DGA4EHGm.js → local-app-workbench-page-CSCIHvZV.js} +1 -1
- package/dist/gateway/static/root/assets/local-apps-DeqzkJiF.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-I0O2ybpp.js → local-apps-page-EntiM0tz.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DsPDloiq.js → local-session-drafts-XurtjR58.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-D3c8DIm-.js → locale-store-cg9cm2EL.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-u9FTZaTh.js → logs-page-rmS9VSem.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-uxRxRX-6.js → management-api-B6jVuJ6W.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BCbDfM7f.js → management-settings-DdI9gs51.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-ohhExTMC.js → markdown-view-D1zBWkfB.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-382BGqQC.js → mcp-conversation-setup-page-Bn49Ph1n.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B5wtLz3Z.js → media-plugins-Cd6hAGDp.js} +1 -1
- package/dist/gateway/static/root/assets/messages-eQ2CYlpG.js +3 -0
- package/dist/gateway/static/root/assets/{model-selector-CoKcq0AZ.js → model-selector-CL6WT-jw.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-CtooMAQW.js → models-hub-cache-s0FMNhq9.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-DiGQtSD0.js → note-detail-panel-anM38aV6.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DfK2KSgu.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-Cvet94d8.js → notes-api-CR75RHd0.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DwlmKweX.js → notes-page-BsZmT7Zw.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-BHp5dVNh.js → oauth-api-CvPnQTlH.js} +1 -1
- package/dist/gateway/static/root/assets/oauth-provider-connect-Dk1NeeqD.js +1 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-BwsK2uDe.js → page-context-capture-button-BPtX67hZ.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-ieK9IN3R.js → page-context-draft-Ckb8baxj.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-DU4NnGap.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-BZSC0BLP.js → personal-avatar-CZSnrSfc.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-CbiD8Wn7.js → personal-page-BSCNuRMT.js} +1 -1
- package/dist/gateway/static/root/assets/personal-profile-settings-DJRDcK2c.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-_cxSzWsN.js → personal-settings-panel-C6p25Noq.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-C2OWtG2B.js → phone-dependencies-card-DKkFFpqi.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-CqmafRhr.js → phone-model-connection-CRRHq4PQ.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-BwYQtl_5.js → phone-model-picker-CN_I0-46.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-CPteZZWu.js → phone-settings-page-CkdSOA7D.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-ReUEjG9m.js → phone-workspace-store-CC61pIuJ.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BlNVtbEU.js → plugin-details-dialog-Bqz4jT53.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-BbA-g7Zq.js → preference-select-fields-DHeNbAvn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-DcPY76PG.js → product-automation-feedback-BN2HTA9T.js} +1 -1
- package/dist/gateway/static/root/assets/{product-delivery-2Ks17_OH.js → product-delivery-BFfqdKLe.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BBJ7glAm.js → product-open-page-B-j4gpLD.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-UTOSc_ii.js → product-preview-content-EqrTk7kU.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-Q1RZqeMo.js → product-preview-modal-aurFBFq4.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-BlrtsEZK.js → project-detail-page-ibZZ_w51.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-B35f5MkG.js → project-understanding-HNK9lFVy.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CBH-sHOU.js → projects-page-CugSyKl5.js} +1 -1
- package/dist/gateway/static/root/assets/providers-api-DUntOOqr.js +1 -0
- package/dist/gateway/static/root/assets/{recording-upload-P1WcsdEY.js → recording-upload-DIwP541B.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DnVlwJ6M.js → registry-api-BTd_OgbD.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CVEj3p0J.js → remote-access-hub-f5mIfsBF.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-B_S1dFze.js → resource-unavailable-DtQ2rfu_.js} +1 -1
- package/dist/gateway/static/root/assets/{route-preload-DGmrxJSb.js → route-preload-anuckzRl.js} +2 -2
- package/dist/gateway/static/root/assets/{runtime-tools-api-970sp5zI.js → runtime-tools-api-C1iI8EPo.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-au6vZ0sL.js → runtime-tools-settings-panel-0tdI1z0g.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-XeRFtJ-Z.js → service-recommendation-list-DSIe-NRe.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CuT7EPI0.js → session-api-CQlEq0MB.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-CyZHiuWY.js → session-manager-C7RfUfqI.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BIxDwAIX.js → sessions-page-DdS8U0RV.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DnfH22f_.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-nbkGHQ_4.js → settings-advanced-section-C6dPu5i1.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-EQHfksdV.js → settings-mode-store-BSiiowQa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-D6RNHRHq.js → settings-page-DAc5n-mM.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-19GJ_a45.js → settings-page-header-BSMu5Zq3.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B2WCzSel.js → settings-page-layout-B_vMffB1.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-C5i7y_pM.js → setup-interaction-page-DKXfFdNt.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-Cwp8YKdT.js → setup-status-panel-BbAZ9w77.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-DDsVTMZ-.js → share-link-dialog-ztX1WPXG.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C1S_gWGf.js → share-preview-page-Ds2Ydfg6.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-CepTFl1f.js → shares-api-CSZqeNL4.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-Cv-tdcAN.js → shares-settings-CX3TNAmI.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-CsT-iHnl.js → skill-api-CGzAQ-MX.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-CMJTjvSo.js → skill-list-api-DfUsku-x.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-S6B7P9ur.js → skill-reload-api-Y9qSMnBd.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-BKcsJtYx.js → skills-page-DnMN50Ot.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DhHPM5qU.js → system-settings-panel-DWNkQmme.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BHH2_Z9_.js → task-detail-page-BJok6V1K.js} +1 -1
- package/dist/gateway/static/root/assets/{task-input-card-D_2rNF31.js → task-input-card-lCMSy6YY.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-CcUWpqvC.js → terminal-panel-store-D8eZPvql.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-D9pquJiM.js → theme-store-GZQ3pTgy.js} +1 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-DC8_9-Lo.js +2 -0
- package/dist/gateway/static/root/assets/{tracing-settings-page-CjNrKILr.js → tracing-settings-page-DM3-7Hlw.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-GtLO40pc.js → tunnel-api-DOGAIXRR.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-BhB5wAbq.js → understanding-activity-store-CuPfe0eQ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-BxtpXRfV.js → understanding-refresh-store-Ihz2p9Vg.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-CZa_a6_7.js → usage-page-BA9Yrvqu.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BtOp6W9H.js → use-autosave-CO0IPCVg.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-BTQZx8Nj.js → use-composer-attachments-CLIrD0mm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-B7nscYS4.js → use-file-preview-expanded-dhNMHf5b.js} +3 -3
- package/dist/gateway/static/root/assets/{use-personal-profile-Cj7WGOfv.js → use-personal-profile-CVqDWBDS.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-BS1rygyV.js → use-realtime-voice-DDVVlX1R.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-DYosm4Gz.js → use-workspace-tree-CZej8mhf.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DmmJODQ4.js → user-model-page-1eYattnk.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-8voN8dQG.js → voice-api-key-field-DpwUDAvu.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CrZd2aqw.js → voice-config-api-GIuXoHXw.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-DcFp_fy4.js → voice-input-shortcut-events-Cc30ZcFy.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-AckvhNnP.js → voice-settings-DA3m5MT0.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DAIk5csp.js → work-discovery-overlay-yGUkk1NV.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CJeixeWQ.js → work-discovery-page-RN6iuY-0.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-BW76VaD5.js → working-directory-picker-modal-CeXl9w6z.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-Cu2gzmVn.js → workspace-api-B1Uirhxf.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Nos5ebMv.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-DyqI793w.js → workspace-file-preview-dialog-D0h2yJ3v.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-DTYkApy8.js → workspace-open-location-menu-DWGNOIE2.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-Rytp_NWV.js → xopc-cloud-account-card-x-XT4bKF.js} +1 -1
- package/dist/gateway/static/root/index.html +91 -91
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/extension-capabilities.js +69 -4
- package/dist/packages/gateway-contract/src/local-app-delegation.js +4 -1
- package/dist/src/agent/agent-manager.js +1 -1
- package/dist/src/agent/child-agent-factory.js +24 -1
- package/dist/src/agent/commands/command-registry.d.ts +10 -0
- package/dist/src/agent/commands/command-registry.js +37 -16
- package/dist/src/agent/commands/command-transport.d.ts +19 -0
- package/dist/src/agent/commands/command-transport.js +92 -0
- package/dist/src/agent/context/project-context.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +16 -5
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-turn.js +74 -14
- package/dist/src/agent/embedded/runs.d.ts +2 -0
- package/dist/src/agent/embedded/runs.js +8 -1
- package/dist/src/agent/embedded/session-runner.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/orchestration/child-run-monitor.d.ts +35 -0
- package/dist/src/agent/orchestration/child-run-monitor.js +104 -0
- package/dist/src/agent/orchestration/child-run-resume.d.ts +3 -0
- package/dist/src/agent/orchestration/child-run-resume.js +67 -0
- package/dist/src/agent/sandbox/native-command.d.ts +15 -0
- package/dist/src/agent/sandbox/native-command.js +65 -0
- package/dist/src/agent/service/btw-query.d.ts +1 -0
- package/dist/src/agent/service/btw-query.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -2
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/interaction-policy.d.ts +21 -0
- package/dist/src/agent/session/interaction-policy.js +58 -0
- package/dist/src/agent/session/session-inspector.js +3 -2
- package/dist/src/agent/tools/create-share-tool.js +1 -1
- package/dist/src/agent/tools/exec-command.js +5 -0
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/index.js +1 -1
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +16 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +4 -4
- package/dist/src/automations/capabilities/drafts.js +5 -1
- package/dist/src/automations/capabilities/read.js +58 -8
- package/dist/src/automations/capabilities/write.js +53 -0
- package/dist/src/automations/delivery/delivery-router.js +3 -1
- package/dist/src/automations/run-changes.d.ts +2 -0
- package/dist/src/automations/run-changes.js +18 -0
- package/dist/src/automations/service/automation-service.d.ts +2 -9
- package/dist/src/automations/service/automation-service.js +3 -2
- package/dist/src/automations/storage/automation-run-repository.d.ts +5 -0
- package/dist/src/automations/storage/automation-run-repository.js +15 -1
- package/dist/src/capabilities/runtime/dispatcher.d.ts +1 -0
- package/dist/src/capabilities/runtime/product.d.ts +2 -0
- package/dist/src/capabilities/runtime/product.js +26 -6
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/chat-commands/types.d.ts +2 -0
- package/dist/src/cli/commands/tui-runner.d.ts +1 -1
- package/dist/src/cli/commands/tui-runner.js +1 -0
- package/dist/src/cli/commands/tui.js +1 -1
- package/dist/src/config/schema.d.ts +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/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +107 -10
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +2 -2
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +12 -2
- package/dist/src/gateway/hono/routes/local-app-run-streams.d.ts +4 -0
- package/dist/src/gateway/hono/routes/local-app-run-streams.js +105 -0
- package/dist/src/gateway/hono/routes/sessions.js +2 -2
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -2
- package/dist/src/gateway/hono/routes/tui.js +308 -0
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/sessions-api.d.ts +1 -1
- package/dist/src/gateway/service/sessions-api.js +3 -3
- package/dist/src/gateway/service.js +8 -8
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/infra/execution-authority.d.ts +12 -0
- package/dist/src/infra/execution-authority.js +27 -0
- package/dist/src/local-apps/automation-proposals.d.ts +754 -0
- package/dist/src/local-apps/automation-proposals.js +185 -0
- package/dist/src/local-apps/capabilities/automation-policy.d.ts +7 -0
- package/dist/src/local-apps/capabilities/automation-policy.js +46 -0
- package/dist/src/local-apps/capabilities/contracts.js +23 -0
- package/dist/src/local-apps/capabilities/delegate.js +21 -4
- package/dist/src/local-apps/capabilities/projections.d.ts +588 -0
- package/dist/src/local-apps/capabilities/projections.js +135 -2
- package/dist/src/local-apps/capabilities/resource-policy.js +76 -0
- package/dist/src/local-apps/capabilities/runtime.js +2 -1
- package/dist/src/local-apps/execution-authority.d.ts +13 -0
- package/dist/src/local-apps/execution-authority.js +104 -0
- package/dist/src/local-apps/p1-services.d.ts +189 -0
- package/dist/src/local-apps/p1-services.js +620 -0
- package/dist/src/local-apps/preview-sessions.d.ts +1 -1
- package/dist/src/local-apps/preview-sessions.js +2 -2
- package/dist/src/local-apps/preview-worker.js +11 -2
- package/dist/src/local-apps/service.d.ts +81 -1
- package/dist/src/local-apps/service.js +18 -1
- package/dist/src/local-apps/store.js +1 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/personal-agent/request-service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/platform/contracts.d.ts +3 -3
- package/dist/src/projects/capabilities/read.js +43 -2
- package/dist/src/projects/capabilities/write.js +25 -0
- package/dist/src/projects/project-store.js +12 -1
- package/dist/src/projects/types.d.ts +1 -0
- package/dist/src/review/review-git.js +14 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/resource-scope.js +2 -2
- package/dist/src/tasks/capabilities/management.js +3 -0
- package/dist/src/tasks/capabilities/write.js +11 -2
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tui/backend-services.d.ts +14 -0
- package/dist/src/tui/backend-services.js +67 -0
- package/dist/src/tui/backends/embedded-backend.d.ts +48 -4
- package/dist/src/tui/backends/embedded-backend.js +248 -42
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +46 -2
- package/dist/src/tui/backends/gateway-realtime-backend.js +205 -62
- package/dist/src/tui/components/chat-log.d.ts +1 -0
- package/dist/src/tui/components/chat-log.js +11 -5
- package/dist/src/tui/components/scoped-models-selector.js +1 -1
- package/dist/src/tui/components/session-selector.js +1 -1
- package/dist/src/tui/components/text-viewer.d.ts +32 -0
- package/dist/src/tui/components/text-viewer.js +132 -0
- package/dist/src/tui/components/tui-bottom-bar.js +3 -0
- package/dist/src/tui/extension-host/autocomplete.js +9 -1
- package/dist/src/tui/extension-host/runtime.d.ts +1 -0
- package/dist/src/tui/extension-host/runtime.js +1 -0
- package/dist/src/tui/tui-backend.d.ts +36 -3
- package/dist/src/tui/tui-capabilities.d.ts +15 -0
- package/dist/src/tui/tui-capabilities.js +46 -0
- package/dist/src/tui/tui-capability-controls.d.ts +9 -0
- package/dist/src/tui/tui-capability-controls.js +250 -0
- package/dist/src/tui/tui-clarification.d.ts +15 -0
- package/dist/src/tui/tui-clarification.js +91 -0
- package/dist/src/tui/tui-command-formatters.d.ts +0 -4
- package/dist/src/tui/tui-command-formatters.js +3 -43
- package/dist/src/tui/tui-commands.d.ts +4 -4
- package/dist/src/tui/tui-commands.js +219 -127
- package/dist/src/tui/tui-control-commands.d.ts +12 -0
- package/dist/src/tui/tui-control-commands.js +127 -0
- package/dist/src/tui/tui-image-files.d.ts +2 -0
- package/dist/src/tui/tui-image-files.js +47 -0
- package/dist/src/tui/tui-local-shell.d.ts +6 -0
- package/dist/src/tui/tui-local-shell.js +36 -2
- package/dist/src/tui/tui-management.d.ts +114 -0
- package/dist/src/tui/tui-management.js +233 -0
- package/dist/src/tui/tui-picker-overlay.d.ts +1 -6
- package/dist/src/tui/tui-picker-overlay.js +1 -62
- package/dist/src/tui/tui-session-actions.d.ts +1 -0
- package/dist/src/tui/tui-session-actions.js +97 -29
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui-side-chat.d.ts +10 -0
- package/dist/src/tui/tui-side-chat.js +56 -0
- package/dist/src/tui/tui-terminal.d.ts +3 -0
- package/dist/src/tui/tui-terminal.js +52 -0
- package/dist/src/tui/tui-types.d.ts +4 -1
- package/dist/src/tui/tui.js +422 -211
- package/dist/src/tui/xopc-tui-keybindings.d.ts +29 -9
- package/dist/src/tui/xopc-tui-keybindings.js +27 -7
- package/dist/src/usage/recorder.js +2 -0
- package/package.json +2 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CZ78ckHR.js +0 -8
- package/dist/gateway/static/root/assets/connected-providers-grid-CgULhOBZ.js +0 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-8ONVOjPW.js +0 -1
- package/dist/gateway/static/root/assets/extension-iframe-host-D0-OvFV2.js +0 -1
- package/dist/gateway/static/root/assets/extension-message-router-DboLTCVp.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-B6T1Xzag.js +0 -1
- package/dist/gateway/static/root/assets/index-B49yIcMR.css +0 -1
- package/dist/gateway/static/root/assets/local-apps-CB-MZAaL.js +0 -1
- package/dist/gateway/static/root/assets/messages-DPLud9GK.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-Ds4M9fJJ.js +0 -1
- package/dist/gateway/static/root/assets/oauth-provider-connect-cvxtmf3C.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-Xe8CP_4a.js +0 -1
- package/dist/gateway/static/root/assets/personal-profile-settings-KvdNnaNv.js +0 -1
- package/dist/gateway/static/root/assets/providers-api-BSmKlQ8K.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cy7xeKmH.js +0 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-YQmN1S2k.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-pVOYuH7u.js +0 -1
|
@@ -9,6 +9,7 @@ import { AutomationDeliveryPolicySchema, AutomationSchema, CreateAutomationSchem
|
|
|
9
9
|
import { deleteAutomation, getAutomation, getDeletedAutomationRevision, listAutomations, saveAutomation, saveAutomations } from "../storage/automation-repository.js";
|
|
10
10
|
import { appendAutomationRunEvent, getAutomationExecutionSummaries, getAutomationRun, getAutomationRunRequest, isAutomationConversationShared, listAutomationRunEvents, listAutomationRuns, listAutomationRunsForProductEvent, listUnfinishedAutomationRuns, markAllAutomationRunsRead, markAutomationRunRead, pruneAutomationHistory, saveAutomationRun, saveAutomationRunRequest, touchAutomationRunLease } from "../storage/automation-run-repository.js";
|
|
11
11
|
import "../storage/index.js";
|
|
12
|
+
import { withLocalAppRunAuthority } from "../../local-apps/execution-authority.js";
|
|
12
13
|
import { getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, markAutomationEventDeliveryQueued, replayAutomationEvent } from "../events/event-repository.js";
|
|
13
14
|
import { AutomationEventDispatcher } from "../events/event-dispatcher.js";
|
|
14
15
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "../delivery/delivery-router.js";
|
|
@@ -664,7 +665,7 @@ var AutomationService = class {
|
|
|
664
665
|
attempt,
|
|
665
666
|
maxAttempts
|
|
666
667
|
});
|
|
667
|
-
task = await this.executor.execute(automation, run,
|
|
668
|
+
task = await withLocalAppRunAuthority(run.id, controller.signal, (executionSignal) => this.executor.execute(automation, run, executionSignal, { onRunPatch: (patch) => {
|
|
668
669
|
const previousDeadline = run.deadlineAtMs;
|
|
669
670
|
run = {
|
|
670
671
|
...run,
|
|
@@ -675,7 +676,7 @@ var AutomationService = class {
|
|
|
675
676
|
deadlineAtMs: patch.deadlineAtMs,
|
|
676
677
|
timeoutMs: patch.deadlineAtMs - startedAtMs
|
|
677
678
|
});
|
|
678
|
-
} }, { triggerEvent });
|
|
679
|
+
} }, { triggerEvent }));
|
|
679
680
|
if (!(task.status === "failed" && this.executor.canRetry(automation.action.kind, task.error)) || attempt >= maxAttempts || controller.signal.aborted) break;
|
|
680
681
|
const delayMs = Math.min(RETRY_BASE_DELAY_MS * 2 ** (attempt - 1), 3e4);
|
|
681
682
|
this.appendRunEvent(run, "action.retry_scheduled", "Automation action retry scheduled", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Automation, AutomationProductEventRun, AutomationRun, AutomationRunEvent } from '../domain/types.js';
|
|
2
|
+
import type { LocalAppResourceScope } from '@xopcai/gateway-contract';
|
|
2
3
|
export declare function saveAutomationRunRequest(runId: string, automation: Automation): void;
|
|
3
4
|
export declare function getAutomationRunRequest(runId: string): Automation | null;
|
|
4
5
|
export declare function listUnfinishedAutomationRuns(): AutomationRun[];
|
|
@@ -8,6 +9,10 @@ export declare function touchAutomationRunLease(runId: string, leaseOwner: strin
|
|
|
8
9
|
export declare function listAutomationRunEvents(runId: string): AutomationRunEvent[];
|
|
9
10
|
export declare function getAutomationRun(runId: string): AutomationRun | null;
|
|
10
11
|
export interface AutomationRunListOptions {
|
|
12
|
+
localAppRestriction?: {
|
|
13
|
+
extensionId: string;
|
|
14
|
+
scope: LocalAppResourceScope;
|
|
15
|
+
};
|
|
11
16
|
automationId?: string;
|
|
12
17
|
projectId?: string;
|
|
13
18
|
limit?: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { afterSqliteCommit, getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { AutomationSchema } from "../domain/validation.js";
|
|
3
|
+
import { notifyAutomationRun } from "../run-changes.js";
|
|
3
4
|
//#region src/automations/storage/automation-run-repository.ts
|
|
4
5
|
init_transaction();
|
|
5
6
|
const MAX_RUNS_PER_AUTOMATION = 2e3;
|
|
@@ -75,6 +76,7 @@ function listUnfinishedAutomationRuns() {
|
|
|
75
76
|
}
|
|
76
77
|
function appendAutomationRunEvent(event) {
|
|
77
78
|
runSqliteWriteTransaction((db) => {
|
|
79
|
+
afterSqliteCommit(() => notifyAutomationRun(event.runId));
|
|
78
80
|
db.prepare(`INSERT INTO automation_run_events (
|
|
79
81
|
event_id, run_id, automation_id, type, message, data_json, created_at_ms
|
|
80
82
|
) VALUES (?, ?, ?, ?, ?, ?, ?)`).run(event.id, event.runId, event.automationId, event.type, event.message, event.data === void 0 ? null : JSON.stringify(event.data), event.createdAtMs);
|
|
@@ -82,6 +84,7 @@ function appendAutomationRunEvent(event) {
|
|
|
82
84
|
}
|
|
83
85
|
function saveAutomationRun(run) {
|
|
84
86
|
runSqliteWriteTransaction((db) => {
|
|
87
|
+
afterSqliteCommit(() => notifyAutomationRun(run.id));
|
|
85
88
|
db.prepare(`INSERT OR REPLACE INTO automation_runs (
|
|
86
89
|
run_id, automation_id, automation_name, status, trigger_snapshot_json,
|
|
87
90
|
action_snapshot_json, manual, created_at_ms, started_at_ms, ended_at_ms,
|
|
@@ -119,6 +122,17 @@ function listAutomationRuns(options) {
|
|
|
119
122
|
const limit = Math.min(Math.max(options?.limit ?? 50, 1), 500);
|
|
120
123
|
const clauses = [];
|
|
121
124
|
const params = [];
|
|
125
|
+
if (options?.localAppRestriction) {
|
|
126
|
+
const { extensionId, scope } = options.localAppRestriction;
|
|
127
|
+
clauses.push("EXISTS (SELECT 1 FROM durable_state d WHERE d.namespace = 'local-app-automation-runs' AND d.scope = ? AND d.key = automation_runs.run_id)");
|
|
128
|
+
params.push(extensionId);
|
|
129
|
+
if (scope.mode === "none") clauses.push("0");
|
|
130
|
+
if (scope.mode === "selected") {
|
|
131
|
+
clauses.push(`EXISTS (SELECT 1 FROM automations a WHERE a.automation_id = automation_runs.automation_id
|
|
132
|
+
AND (a.automation_id IN (SELECT value FROM json_each(?)) OR a.project_id IN (SELECT value FROM json_each(?))))`);
|
|
133
|
+
params.push(JSON.stringify(scope.ids), JSON.stringify(scope.projectIds));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
122
136
|
if (options?.automationId) {
|
|
123
137
|
clauses.push("automation_id = ?");
|
|
124
138
|
params.push(options.automationId);
|
|
@@ -4,7 +4,9 @@ import { type ProjectWriteCapabilityDeps } from '../../projects/capabilities/wri
|
|
|
4
4
|
import type { AutomationService } from '../../automations/service/automation-service.js';
|
|
5
5
|
import { type TaskWriteCapabilityDeps } from '../../tasks/capabilities/write.js';
|
|
6
6
|
import { CapabilityDispatcher } from './dispatcher.js';
|
|
7
|
+
import { type LocalAppP1Deps } from '../../local-apps/p1-services.js';
|
|
7
8
|
export declare function createProductDispatcher(getNotes?: () => NotesService | undefined, taskWrites?: TaskWriteCapabilityDeps & ProjectWriteCapabilityDeps & {
|
|
8
9
|
getAutomations?: () => AutomationService | undefined;
|
|
9
10
|
getLocalApps?: () => LocalAppService | undefined;
|
|
11
|
+
localAppP1?: LocalAppP1Deps;
|
|
10
12
|
}): CapabilityDispatcher;
|
|
@@ -5,16 +5,19 @@ import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
|
5
5
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
6
6
|
import { registerTaskReadCapabilities } from "../../tasks/capabilities/read.js";
|
|
7
7
|
import { registerLocalAppDelegation } from "../../local-apps/capabilities/delegate.js";
|
|
8
|
-
import { registerLocalAppWriteCapabilities } from "../../local-apps/capabilities/write.js";
|
|
9
|
-
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
10
|
-
import { registerProjectWriteCapabilities } from "../../projects/capabilities/write.js";
|
|
11
|
-
import { registerTaskRelationCapabilities } from "../../tasks/capabilities/relations.js";
|
|
12
|
-
import { registerTaskManagementCapabilities } from "../../tasks/capabilities/management.js";
|
|
13
|
-
import { registerTaskRunWriteCapabilities } from "../../tasks/capabilities/runs.js";
|
|
14
8
|
import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
|
|
15
9
|
import { registerAutomationWriteCapabilities } from "../../automations/capabilities/write.js";
|
|
10
|
+
import { registerAutomationProposalCapabilities } from "../../local-apps/automation-proposals.js";
|
|
16
11
|
import { registerAutomationDraftCapabilities } from "../../automations/capabilities/drafts.js";
|
|
12
|
+
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
13
|
+
import { registerProjectWriteCapabilities } from "../../projects/capabilities/write.js";
|
|
14
|
+
import { FileSpaceService } from "../../files/file-service.js";
|
|
17
15
|
import { registerTaskWriteCapabilities } from "../../tasks/capabilities/write.js";
|
|
16
|
+
import { registerTaskManagementCapabilities } from "../../tasks/capabilities/management.js";
|
|
17
|
+
import { registerLocalAppP1Capabilities } from "../../local-apps/p1-services.js";
|
|
18
|
+
import { registerLocalAppWriteCapabilities } from "../../local-apps/capabilities/write.js";
|
|
19
|
+
import { registerTaskRelationCapabilities } from "../../tasks/capabilities/relations.js";
|
|
20
|
+
import { registerTaskRunWriteCapabilities } from "../../tasks/capabilities/runs.js";
|
|
18
21
|
import { registerSettingsCapability } from "./settings.js";
|
|
19
22
|
import { registerAppContextCapability } from "./app-context.js";
|
|
20
23
|
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
@@ -25,6 +28,23 @@ function createProductDispatcher(getNotes, taskWrites) {
|
|
|
25
28
|
registerAppContextCapability(dispatcher);
|
|
26
29
|
registerAgentCapabilities(dispatcher);
|
|
27
30
|
registerLocalAppDelegation(dispatcher);
|
|
31
|
+
registerAutomationProposalCapabilities(dispatcher);
|
|
32
|
+
const p1Config = () => {
|
|
33
|
+
const config = taskWrites?.getConfig?.();
|
|
34
|
+
if (!config) throw new CapabilityError("UNAVAILABLE", "Host configuration is unavailable");
|
|
35
|
+
return config;
|
|
36
|
+
};
|
|
37
|
+
let files;
|
|
38
|
+
registerLocalAppP1Capabilities(dispatcher, taskWrites?.localAppP1 ?? {
|
|
39
|
+
getConfig: p1Config,
|
|
40
|
+
getFiles: () => {
|
|
41
|
+
const projects = taskWrites?.getProjects?.();
|
|
42
|
+
if (!projects) throw new CapabilityError("UNAVAILABLE", "Host files are unavailable");
|
|
43
|
+
return files ??= new FileSpaceService(p1Config, projects, async () => {
|
|
44
|
+
throw new CapabilityError("UNAVAILABLE", "Session files are unavailable");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
28
48
|
const localApps = taskWrites?.getLocalApps?.();
|
|
29
49
|
if (localApps) {
|
|
30
50
|
registerLocalAppReadCapabilities(dispatcher, localApps);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
3
4
|
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
4
5
|
import { isSTTAvailable } from "../../voice/stt/availability.js";
|
|
5
6
|
import "../../voice/stt/index.js";
|
|
6
|
-
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
7
7
|
//#region src/channels/attachments/voice-stt-webchat.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const STT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TuiOptions } from '../../tui/tui-types.js';
|
|
2
|
-
export type TuiCliOptions = Record<string, string | boolean | undefined>;
|
|
2
|
+
export type TuiCliOptions = Record<string, string | string[] | boolean | undefined>;
|
|
3
3
|
export interface TuiLaunchOverrides {
|
|
4
4
|
session?: string;
|
|
5
5
|
openSessionPickerOnStart?: boolean;
|
|
@@ -22,6 +22,7 @@ function resolveTuiOptions(options, overrides = {}) {
|
|
|
22
22
|
credential,
|
|
23
23
|
session: overrides.session ?? (typeof options.session === "string" ? options.session : void 0),
|
|
24
24
|
agentId: typeof options.agent === "string" ? options.agent : void 0,
|
|
25
|
+
images: Array.isArray(options.image) ? options.image : void 0,
|
|
25
26
|
message: typeof options.message === "string" ? options.message : void 0,
|
|
26
27
|
workdir: typeof options.workdir === "string" ? options.workdir : void 0,
|
|
27
28
|
useStartupCwd: options.cwd !== false,
|
|
@@ -14,7 +14,7 @@ function createTuiCommand(ctx) {
|
|
|
14
14
|
"xopc tui --agent coder # Start with a specific agent",
|
|
15
15
|
"xopc tui --set-default-agent coder # Persist default agent for new TUI sessions",
|
|
16
16
|
"xopc tui -m \"Summarize my inbox\" # Send a message on launch"
|
|
17
|
-
])).option("--url <url>", "Gateway URL (default: http://localhost:3120)").option("--token <token>", "Gateway bearer token").option("--password-env <name>", "Environment variable holding the gateway password").option("-s, --session <key>", "Session key to resume (omitted: start a fresh TUI session)").option("--agent <id>", "Agent id for a fresh TUI session").option("--set-default-agent <id>", "Persist default agent for new TUI sessions and exit").option("-m, --message <text>", "Send a message on launch").option("--workdir <dir>", "Workspace directory for the new TUI session").option("--no-cwd", "Do not use the launch directory as the new TUI session workspace").option("--local", "Run in embedded mode (no gateway required)").option("--gateway", "Force gateway mode even without an explicit URL or credential").option("--theme <name>", "Theme: auto, dark, light, or custom name from ~/.xopc/themes/").option("--thinking <level>", "Thinking level override").action(async (options) => {
|
|
17
|
+
])).option("--url <url>", "Gateway URL (default: http://localhost:3120)").option("--token <token>", "Gateway bearer token").option("--password-env <name>", "Environment variable holding the gateway password").option("-s, --session <key>", "Session key to resume (omitted: start a fresh TUI session)").option("--agent <id>", "Agent id for a fresh TUI session").option("--set-default-agent <id>", "Persist default agent for new TUI sessions and exit").option("-i, --image <files...>", "Attach local images to the first message").option("-m, --message <text>", "Send a message on launch").option("--workdir <dir>", "Workspace directory for the new TUI session").option("--no-cwd", "Do not use the launch directory as the new TUI session workspace").option("--local", "Run in embedded mode (no gateway required)").option("--gateway", "Force gateway mode even without an explicit URL or credential").option("--theme <name>", "Theme: auto, dark, light, or custom name from ~/.xopc/themes/").option("--thinking <level>", "Thinking level override").action(async (options) => {
|
|
18
18
|
prepareTuiStartup(ctx.configPath);
|
|
19
19
|
if (typeof options.setDefaultAgent === "string") {
|
|
20
20
|
try {
|
|
@@ -2118,9 +2118,9 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2118
2118
|
realtime: z.ZodOptional<z.ZodString>;
|
|
2119
2119
|
}, z.core.$strict>;
|
|
2120
2120
|
capabilities: z.ZodRecord<z.ZodEnum<{
|
|
2121
|
+
connectors: "connectors";
|
|
2121
2122
|
shares: "shares";
|
|
2122
2123
|
models: "models";
|
|
2123
|
-
connectors: "connectors";
|
|
2124
2124
|
tunnels: "tunnels";
|
|
2125
2125
|
managedRuntime: "managedRuntime";
|
|
2126
2126
|
runtimeFleet: "runtimeFleet";
|
|
@@ -277,4 +277,4 @@ export declare const GATEWAY_BUILTIN_TOOLS: readonly [{
|
|
|
277
277
|
readonly zh: "使用已验证的参数执行选定的外部工具。";
|
|
278
278
|
};
|
|
279
279
|
}];
|
|
280
|
-
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "xopc_tool_search" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "
|
|
280
|
+
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "find" | "image" | "xopc_tool_search" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "web_extract" | "clarify" | "xopc_tool_execute" | "tool_manual" | "session_status" | "read_media" | "skills_list" | "skill_view" | "xopc_tool_describe" | "phone_use" | "image_generate" | "skill_manage" | "skills_marketplace_search" | "computer_use" | "send_message" | "text_to_speech" | "execute_code" | "send_media" | "create_share" | "memory_maintenance" | "skill_install" | "delegate_task" | "create_desktop_pet")[];
|
|
@@ -3,8 +3,8 @@ import { AgentCatalogRepository, init_repository } from "../agent-catalog/reposi
|
|
|
3
3
|
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath } from "../agent/agent-scope.js";
|
|
4
4
|
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
5
5
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
6
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
7
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
8
8
|
import { GATEWAY_BUILTIN_TOOL_IDS } from "./agent-builtin-tools.js";
|
|
9
9
|
import { resolve } from "node:path";
|
|
10
10
|
import { mkdir, readFile, realpath, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -2,8 +2,8 @@ import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
3
|
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
4
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
5
|
-
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
5
|
import { isPathUnderWorkspace } from "./workspace-editor-path.js";
|
|
6
|
+
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
9
9
|
import { stat } from "node:fs/promises";
|
|
@@ -3,19 +3,29 @@ import { ExtensionUiGrantInputSchema } from "../../../../packages/gateway-contra
|
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { getAllModels, getAvailableModels, init_providers } from "../../../providers/index.js";
|
|
5
5
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
|
+
import { listAutomations } from "../../../automations/storage/automation-repository.js";
|
|
7
|
+
import "../../../automations/storage/index.js";
|
|
8
|
+
import { automationConfigurationDigest } from "../../../local-apps/capabilities/automation-policy.js";
|
|
9
|
+
import { assertProposalCurrent, automationProposalReview, readAutomationProposal, resolveAutomationProposal } from "../../../local-apps/automation-proposals.js";
|
|
10
|
+
import { assertResourceRequest, localAppConnectorOptions, readAppResourceRequest, resolveAppResourceRequest } from "../../../local-apps/p1-services.js";
|
|
6
11
|
import { listLocalAppAccess, recordLocalAppAccess } from "../../../local-apps/access-audit.js";
|
|
12
|
+
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
7
13
|
import { ActivationPlanner } from "../../../extensions/activation-planner.js";
|
|
8
14
|
import { mergeActivationContext } from "../../../extensions/activation-context.js";
|
|
9
15
|
import { validateExtensionConfig } from "../../../extensions/config-validation.js";
|
|
10
16
|
import { fetchRegistry, listExtensions, searchExtensions } from "../../../extensions/marketplace.js";
|
|
17
|
+
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
11
18
|
import { listAgentPluginInventory } from "../../../extensions/agent-plugins/inventory.js";
|
|
19
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
12
20
|
import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
13
21
|
import { createOAuthHandler } from "../oauth.js";
|
|
14
22
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
15
23
|
import { loadExtensionStore, saveExtensionStore } from "../lib/extension-store.js";
|
|
16
24
|
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
25
|
+
import { localAppDelegationCaller } from "../../security/local-app-delegation-access.js";
|
|
17
26
|
import { relative, resolve } from "node:path";
|
|
18
27
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
28
|
+
import { z } from "zod";
|
|
19
29
|
import { bodyLimit } from "hono/body-limit";
|
|
20
30
|
//#region src/gateway/hono/routes/auth-registry-extensions.ts
|
|
21
31
|
init_providers();
|
|
@@ -248,14 +258,97 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
248
258
|
authenticated.get("/api/extensions/:id/ui-grant", (c) => {
|
|
249
259
|
return c.json({ grant: service.localApps.getUiGrant(c.req.param("id")) });
|
|
250
260
|
});
|
|
251
|
-
authenticated.get("/api/extensions/:id/
|
|
261
|
+
authenticated.get("/api/extensions/:id/automation-proposals/:proposalId", (c) => {
|
|
262
|
+
try {
|
|
263
|
+
const proposal = readAutomationProposal(c.req.param("id"), c.req.param("proposalId"));
|
|
264
|
+
if (proposal.status !== "pending" || proposal.decision) return c.json({ proposal });
|
|
265
|
+
assertProposalCurrent(service.localApps, proposal);
|
|
266
|
+
return c.json(automationProposalReview(proposal));
|
|
267
|
+
} catch (error) {
|
|
268
|
+
return capabilityHttpError(c, error);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
authenticated.post("/api/extensions/:id/automation-proposals/:proposalId/review", async (c) => {
|
|
272
|
+
try {
|
|
273
|
+
const decision = z.strictObject({
|
|
274
|
+
digest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
275
|
+
approve: z.boolean(),
|
|
276
|
+
enable: z.boolean()
|
|
277
|
+
}).parse(await c.req.json());
|
|
278
|
+
const dispatcher = createProductDispatcher(() => service.notesServiceInstance, {
|
|
279
|
+
getAutomations: () => service.automationServiceInstance,
|
|
280
|
+
getProjects: () => service.projects
|
|
281
|
+
});
|
|
282
|
+
const caller = localAppDelegationCaller(capabilityHttpContext(c), getGatewayPrincipal(c), () => service.getResolvedAuth());
|
|
283
|
+
return c.json(await resolveAutomationProposal(service.localApps, dispatcher, c.req.param("id"), c.req.param("proposalId"), decision, caller));
|
|
284
|
+
} catch (error) {
|
|
285
|
+
return capabilityHttpError(c, error);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
authenticated.get("/api/extensions/:id/resource-requests/:requestId", (c) => {
|
|
289
|
+
try {
|
|
290
|
+
const request = readAppResourceRequest(c.req.param("id"), c.req.param("requestId"));
|
|
291
|
+
if (request.status === "pending") assertResourceRequest(service.localApps, request);
|
|
292
|
+
return c.json({ request });
|
|
293
|
+
} catch (error) {
|
|
294
|
+
return capabilityHttpError(c, error);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
authenticated.post("/api/extensions/:id/resource-requests/:requestId/review", async (c) => {
|
|
298
|
+
try {
|
|
299
|
+
const decision = z.strictObject({
|
|
300
|
+
digest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
301
|
+
approve: z.boolean()
|
|
302
|
+
}).parse(await c.req.json());
|
|
303
|
+
const caller = localAppDelegationCaller(capabilityHttpContext(c), getGatewayPrincipal(c), () => service.getResolvedAuth());
|
|
304
|
+
return c.json(await resolveAppResourceRequest({
|
|
305
|
+
getConfig: () => service.currentConfig,
|
|
306
|
+
getFiles: () => getGatewayFileSpaceService(service)
|
|
307
|
+
}, service.localApps, c.req.param("id"), c.req.param("requestId"), decision.digest, decision.approve, caller));
|
|
308
|
+
} catch (error) {
|
|
309
|
+
return capabilityHttpError(c, error);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
authenticated.get("/api/extensions/:id/resource-options", async (c) => {
|
|
252
313
|
const kind = c.req.query("kind");
|
|
253
314
|
if (![
|
|
254
315
|
"notes",
|
|
255
316
|
"tasks",
|
|
256
|
-
"projects"
|
|
317
|
+
"projects",
|
|
318
|
+
"automations",
|
|
319
|
+
"files",
|
|
320
|
+
"connectors"
|
|
257
321
|
].includes(kind ?? "")) return c.json({ error: "Invalid resource kind" }, 400);
|
|
258
322
|
const search = (c.req.query("search") ?? "").slice(0, 200);
|
|
323
|
+
if (kind === "files") {
|
|
324
|
+
const items = (await getGatewayFileSpaceService(service).recent(100)).filter((file) => file.kind === "file" && file.size <= 512 * 1024 && !file.relativePath.split("/").some((part) => part.startsWith(".")) && `${file.name} ${file.relativePath}`.toLowerCase().includes(search.toLowerCase())).map((file) => ({
|
|
325
|
+
id: file.id,
|
|
326
|
+
title: `${file.name} · ${file.relativePath}`
|
|
327
|
+
}));
|
|
328
|
+
return c.json({ items });
|
|
329
|
+
}
|
|
330
|
+
if (kind === "connectors") return c.json({ items: (await localAppConnectorOptions({
|
|
331
|
+
getConfig: () => service.currentConfig,
|
|
332
|
+
getFiles: () => getGatewayFileSpaceService(service)
|
|
333
|
+
})).filter((item) => item.title.toLowerCase().includes(search.toLowerCase())) });
|
|
334
|
+
if (kind === "automations") {
|
|
335
|
+
const items = listAutomations().filter((item) => item.name.toLowerCase().includes(search.toLowerCase())).slice(0, 100).map((item) => ({
|
|
336
|
+
id: item.id,
|
|
337
|
+
title: item.name,
|
|
338
|
+
configurationDigest: automationConfigurationDigest(item),
|
|
339
|
+
runnable: item.enabled && item.action.kind === "agent" && (!item.management || item.management.runnable),
|
|
340
|
+
review: {
|
|
341
|
+
action: item.action,
|
|
342
|
+
safety: item.safety,
|
|
343
|
+
delivery: item.delivery,
|
|
344
|
+
conversationMode: item.conversationMode,
|
|
345
|
+
reliability: item.reliability,
|
|
346
|
+
projectId: item.projectId,
|
|
347
|
+
enabled: item.enabled
|
|
348
|
+
}
|
|
349
|
+
}));
|
|
350
|
+
return c.json({ items });
|
|
351
|
+
}
|
|
259
352
|
const table = kind === "notes" ? "notes" : kind === "tasks" ? "tasks" : "projects";
|
|
260
353
|
const column = kind === "notes" ? "note_id" : kind === "tasks" ? "task_id" : "project_id";
|
|
261
354
|
const title = kind === "projects" ? "name" : "title";
|
|
@@ -269,14 +362,18 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
269
362
|
if (!parsed.success) return c.json({ error: "A valid reviewed manifest and resource policy are required" }, 400);
|
|
270
363
|
const body = parsed.data;
|
|
271
364
|
if (service.localApps.getUiGrant(c.req.param("id")).manifestDigest !== body.manifestDigest) return c.json({ error: "Extension release changed; review permissions again" }, 409);
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
365
|
+
try {
|
|
366
|
+
const grant = service.localApps.grantUiPermissions(c.req.param("id"), body.manifestDigest, body.resourceScopes);
|
|
367
|
+
recordLocalAppAccess(c.req.param("id"), {
|
|
368
|
+
principalId: capabilityHttpContext(c).principalId,
|
|
369
|
+
action: "grant",
|
|
370
|
+
status: "succeeded",
|
|
371
|
+
grantRevision: grant.grantRevision
|
|
372
|
+
});
|
|
373
|
+
return c.json({ grant });
|
|
374
|
+
} catch (error) {
|
|
375
|
+
return capabilityHttpError(c, error);
|
|
376
|
+
}
|
|
280
377
|
});
|
|
281
378
|
authenticated.delete("/api/extensions/:id/ui-grant", async (c) => {
|
|
282
379
|
const parsed = ExtensionUiGrantInputSchema.safeParse(await c.req.json().catch(() => null));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
1
2
|
import { ImportError } from "../../../imports/types.js";
|
|
2
3
|
import { isImportSource } from "../../../imports/sources.js";
|
|
3
4
|
import { ImportSelectionRepository } from "../../../storage/sqlite/import-selection-repository.js";
|
|
4
5
|
import { getLiveInventory, previewInventoryItem, publicInventory, scanProduct } from "../../../imports/inventory.js";
|
|
5
6
|
import { importSelection, listImportSources } from "../../../imports/productImport.js";
|
|
6
7
|
import { createRuntimeImportService } from "../../../imports/runtime.js";
|
|
7
|
-
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
//#region src/gateway/hono/routes/imports.ts
|
|
10
10
|
const selectionSchema = z.object({
|
|
@@ -69,7 +69,7 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
id: "local-app-capabilities",
|
|
72
|
-
match: (path) => /^\/api\/local-app-capabilities\/[^/]+(?:\/[^/]+\/invocations)?$/.test(path),
|
|
72
|
+
match: (path) => /^\/api\/local-app-capabilities\/[^/]+(?:\/[^/]+\/invocations|\/runs\/[^/]+\/events)?$/.test(path),
|
|
73
73
|
load: async () => {
|
|
74
74
|
const { registerLocalAppCapabilityRoutes } = await import("./local-app-capabilities.js");
|
|
75
75
|
return { register: registerLocalAppCapabilityRoutes };
|
|
@@ -502,7 +502,7 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
id: "tui",
|
|
505
|
-
match: (path) =>
|
|
505
|
+
match: (path) => path === "/api/tui/startup-resources" || path === "/api/tui/diff" || path === "/api/tui/manage" || path === "/api/tui/side" || /^\/api\/tui\/capabilities\/(?:skills|mcp|plugins)$/.test(path) || /^\/api\/tui\/sessions\/[^/]+\/(?:policy|search|jobs(?:\/[^/]+(?:\/(?:stop|stdin|resize))?)?|subagents(?:\/[^/]+(?:\/(?:stop|steer|resume|transcript))?)?)$/.test(path),
|
|
506
506
|
load: async () => {
|
|
507
507
|
const { registerTuiRoutes } = await import("./tui.js");
|
|
508
508
|
return { register: registerTuiRoutes };
|
|
@@ -3,9 +3,11 @@ import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
4
4
|
import { localAppCapabilities } from "../../../local-apps/capabilities/runtime.js";
|
|
5
5
|
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
6
|
+
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
6
7
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
8
|
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
8
9
|
import { localAppDelegationCaller } from "../../security/local-app-delegation-access.js";
|
|
10
|
+
import { registerLocalAppRunStreams } from "./local-app-run-streams.js";
|
|
9
11
|
import { z } from "zod";
|
|
10
12
|
import { bodyLimit } from "hono/body-limit";
|
|
11
13
|
//#region src/gateway/hono/routes/local-app-capabilities.ts
|
|
@@ -18,8 +20,16 @@ const Invocation = z.strictObject({
|
|
|
18
20
|
});
|
|
19
21
|
/** Authenticated host API. Iframes must not receive Gateway credentials. */
|
|
20
22
|
function registerLocalAppCapabilityRoutes(app, deps) {
|
|
21
|
-
const dispatcher = createProductDispatcher(() => deps.service.notesServiceInstance, {
|
|
23
|
+
const dispatcher = createProductDispatcher(() => deps.service.notesServiceInstance, {
|
|
24
|
+
getProjects: () => deps.service.projects,
|
|
25
|
+
getAutomations: () => deps.service.automationServiceInstance,
|
|
26
|
+
localAppP1: {
|
|
27
|
+
getConfig: () => deps.service.currentConfig,
|
|
28
|
+
getFiles: () => getGatewayFileSpaceService(deps.service)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
22
31
|
const path = "/api/local-app-capabilities/:extensionId";
|
|
32
|
+
registerLocalAppRunStreams(app, deps, dispatcher);
|
|
23
33
|
app.get("/api/local-app-capabilities/catalog", (c) => c.json({ capabilities: dispatcher.list({
|
|
24
34
|
...capabilityHttpContext(c),
|
|
25
35
|
surface: "extension"
|
|
@@ -41,7 +51,7 @@ function registerLocalAppCapabilityRoutes(app, deps) {
|
|
|
41
51
|
const extensionId = c.req.param("extensionId");
|
|
42
52
|
const id = c.req.param("id");
|
|
43
53
|
const caller = capabilityHttpContext(c);
|
|
44
|
-
const guarded = id === "xopc.agent.delegate" ? localAppDelegationCaller(caller, getGatewayPrincipal(c), () => deps.service.getResolvedAuth()) : caller;
|
|
54
|
+
const guarded = id === "xopc.agent.delegate" || /^xopc\.(automations|connectors|files|apps)\./.test(id) ? localAppDelegationCaller(caller, getGatewayPrincipal(c), () => deps.service.getResolvedAuth()) : caller;
|
|
45
55
|
return c.json(await localAppCapabilities(deps.service.localApps, dispatcher, extensionId, manifestDigest, guarded, grantRevision).call(id, call));
|
|
46
56
|
} catch (error) {
|
|
47
57
|
return capabilityHttpError(c, error);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Hono } from 'hono';
|
|
2
|
+
import { type CapabilityDispatcher } from '../../../capabilities/runtime/dispatcher.js';
|
|
3
|
+
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
4
|
+
export declare function registerLocalAppRunStreams(app: Hono, deps: AuthenticatedRouteDeps, dispatcher: CapabilityDispatcher): void;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
2
|
+
import { onAutomationRunChange } from "../../../automations/run-changes.js";
|
|
3
|
+
import "../../../capabilities/runtime/dispatcher.js";
|
|
4
|
+
import { localAppResourceAllowed } from "../../../local-apps/capabilities/resource-policy.js";
|
|
5
|
+
import { localAppCapabilities } from "../../../local-apps/capabilities/runtime.js";
|
|
6
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
7
|
+
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
8
|
+
import { localAppDelegationCaller } from "../../security/local-app-delegation-access.js";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { streamSSE } from "hono/streaming";
|
|
11
|
+
//#region src/gateway/hono/routes/local-app-run-streams.ts
|
|
12
|
+
const subscriptions = /* @__PURE__ */ new Map();
|
|
13
|
+
function registerLocalAppRunStreams(app, deps, dispatcher) {
|
|
14
|
+
app.get("/api/local-app-capabilities/:extensionId/runs/:runId/events", async (c) => {
|
|
15
|
+
try {
|
|
16
|
+
const extensionId = c.req.param("extensionId"), runId = z.uuid().parse(c.req.param("runId"));
|
|
17
|
+
const manifestDigest = z.string().regex(/^[a-f0-9]{64}$/).parse(c.req.query("manifestDigest"));
|
|
18
|
+
const grantRevision = z.uuid().parse(c.req.query("grantRevision"));
|
|
19
|
+
const caller = localAppDelegationCaller(capabilityHttpContext(c), getGatewayPrincipal(c), () => deps.service.getResolvedAuth());
|
|
20
|
+
const runtime = () => localAppCapabilities(deps.service.localApps, dispatcher, extensionId, manifestDigest, caller, grantRevision);
|
|
21
|
+
const snapshot = async () => {
|
|
22
|
+
const access = runtime();
|
|
23
|
+
const contracts = access.list().capabilities;
|
|
24
|
+
const invoke = (id) => {
|
|
25
|
+
const contract = contracts.find((item) => item.id === id);
|
|
26
|
+
if (!contract) throw new CapabilityError("FORBIDDEN", "Run subscription requires declared run and event read capabilities");
|
|
27
|
+
return access.call(id, {
|
|
28
|
+
...contract,
|
|
29
|
+
input: { id: runId }
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const run = await invoke("xopc.automations.get_run");
|
|
33
|
+
const events = await invoke("xopc.automations.run_events");
|
|
34
|
+
return {
|
|
35
|
+
...run.data,
|
|
36
|
+
...events.data
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
await snapshot();
|
|
40
|
+
if ((subscriptions.get(extensionId) ?? 0) >= 4 || [...subscriptions.values()].reduce((a, b) => a + b, 0) >= 32) throw new CapabilityError("UNAVAILABLE", "Run subscription capacity reached");
|
|
41
|
+
subscriptions.set(extensionId, (subscriptions.get(extensionId) ?? 0) + 1);
|
|
42
|
+
return streamSSE(c, async (stream) => {
|
|
43
|
+
let changed = false, wake;
|
|
44
|
+
let sequence = 0;
|
|
45
|
+
const notify = () => {
|
|
46
|
+
changed = true;
|
|
47
|
+
wake?.();
|
|
48
|
+
};
|
|
49
|
+
const stop = onAutomationRunChange(runId, notify);
|
|
50
|
+
let timer;
|
|
51
|
+
const abort = () => wake?.();
|
|
52
|
+
stream.onAbort(abort);
|
|
53
|
+
try {
|
|
54
|
+
const deadline = Date.now() + 15 * 6e4;
|
|
55
|
+
for (;;) {
|
|
56
|
+
caller.assertCurrent?.();
|
|
57
|
+
if (!localAppResourceAllowed(extensionId, deps.service.localApps.getCapabilityAccess(extensionId, manifestDigest, grantRevision).resourceScopes, "xopc.automations.get_run", { id: runId })) throw new CapabilityError("FORBIDDEN", "Run access changed");
|
|
58
|
+
if (sequence === 0 || changed) {
|
|
59
|
+
changed = false;
|
|
60
|
+
const value = await snapshot();
|
|
61
|
+
caller.assertCurrent?.();
|
|
62
|
+
runtime().list();
|
|
63
|
+
await stream.writeSSE({
|
|
64
|
+
event: "snapshot",
|
|
65
|
+
id: String(++sequence),
|
|
66
|
+
data: JSON.stringify(value)
|
|
67
|
+
});
|
|
68
|
+
const status = value.run?.status;
|
|
69
|
+
if (status && ![
|
|
70
|
+
"queued",
|
|
71
|
+
"running",
|
|
72
|
+
"cancelling"
|
|
73
|
+
].includes(status)) break;
|
|
74
|
+
}
|
|
75
|
+
if (changed) continue;
|
|
76
|
+
if (stream.aborted || Date.now() >= deadline) break;
|
|
77
|
+
await new Promise((resolve) => {
|
|
78
|
+
wake = resolve;
|
|
79
|
+
timer = setTimeout(resolve, 1e3);
|
|
80
|
+
});
|
|
81
|
+
clearTimeout(timer);
|
|
82
|
+
wake = void 0;
|
|
83
|
+
if (stream.aborted) break;
|
|
84
|
+
}
|
|
85
|
+
} catch {
|
|
86
|
+
if (!stream.aborted) await stream.writeSSE({
|
|
87
|
+
event: "ended",
|
|
88
|
+
data: JSON.stringify({ reason: "Run access ended; review authorization before reconnecting" })
|
|
89
|
+
}).catch(() => {});
|
|
90
|
+
} finally {
|
|
91
|
+
stop();
|
|
92
|
+
clearTimeout(timer);
|
|
93
|
+
wake = void 0;
|
|
94
|
+
const count = (subscriptions.get(extensionId) ?? 1) - 1;
|
|
95
|
+
if (count) subscriptions.set(extensionId, count);
|
|
96
|
+
else subscriptions.delete(extensionId);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
} catch (error) {
|
|
100
|
+
return capabilityHttpError(c, error);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { registerLocalAppRunStreams };
|
|
@@ -504,8 +504,8 @@ function registerSessionsRoutes(authenticated, deps) {
|
|
|
504
504
|
ok: false,
|
|
505
505
|
error: "rowNumber must be a positive integer"
|
|
506
506
|
}, 400);
|
|
507
|
-
const before = parsePositiveInt(c.req.query("before"), 80,
|
|
508
|
-
const after = parsePositiveInt(c.req.query("after"), 120,
|
|
507
|
+
const before = parsePositiveInt(c.req.query("before"), 80, 2e3);
|
|
508
|
+
const after = parsePositiveInt(c.req.query("after"), 120, 2e3);
|
|
509
509
|
const window = await service.sessions.getTranscriptWindow(key, {
|
|
510
510
|
rowNumber,
|
|
511
511
|
before,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getClientIpFromHeaders } from "../../security/loopback.js";
|
|
2
2
|
import { loadCompactionSourceSnapshot } from "../../../storage/sqlite/transcript-repository.js";
|
|
3
3
|
import "../../../storage/sqlite/index.js";
|
|
4
|
-
import { FileServiceError } from "../../../files/file-service.js";
|
|
5
4
|
import { resolveReverseProxyPublicUrl } from "../../public-url.js";
|
|
5
|
+
import { FileServiceError } from "../../../files/file-service.js";
|
|
6
6
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
7
7
|
import { SHARE_CONFIG_DEFAULTS } from "../../../share/share-types.js";
|
|
8
8
|
import { resolveSiteShareConfig } from "../../../share/site-share-config.js";
|