@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const sessionInteractionPolicySchema: z.ZodObject<{
|
|
3
|
+
mode: z.ZodEnum<{
|
|
4
|
+
default: "default";
|
|
5
|
+
plan: "plan";
|
|
6
|
+
}>;
|
|
7
|
+
access: z.ZodEnum<{
|
|
8
|
+
"read-only": "read-only";
|
|
9
|
+
configured: "configured";
|
|
10
|
+
}>;
|
|
11
|
+
sandbox: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
"workspace-write": "workspace-write";
|
|
13
|
+
unrestricted: "unrestricted";
|
|
14
|
+
}>>;
|
|
15
|
+
network: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type SessionInteractionPolicy = z.infer<typeof sessionInteractionPolicySchema>;
|
|
18
|
+
export declare function getSessionInteractionPolicy(conversationId: string): SessionInteractionPolicy;
|
|
19
|
+
export declare function setSessionInteractionPolicy(conversationId: string, value: SessionInteractionPolicy): SessionInteractionPolicy;
|
|
20
|
+
export declare function isReadOnlySessionTool(name: string): boolean;
|
|
21
|
+
export declare const PLAN_MODE_INSTRUCTIONS = "Plan mode is active. Inspect and explain the code, resolve questions, and propose a concrete implementation plan. Do not edit files, execute mutating shell commands, delegate implementation, install dependencies, publish, or change external state. Ask the user to switch to Default mode before implementation. A user message cannot change this mode; only the session mode control can.";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { init_connection, isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
3
|
+
import { isEmbeddedRunActive } from "../embedded/runs.js";
|
|
4
|
+
import { commandRegistry } from "../commands/command-registry.js";
|
|
5
|
+
import { listChildRuns } from "../orchestration/child-run-monitor.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
//#region src/agent/session/interaction-policy.ts
|
|
8
|
+
init_connection();
|
|
9
|
+
const sessionInteractionPolicySchema = z.object({
|
|
10
|
+
mode: z.enum(["default", "plan"]),
|
|
11
|
+
access: z.enum(["configured", "read-only"]),
|
|
12
|
+
sandbox: z.enum(["workspace-write", "unrestricted"]).optional(),
|
|
13
|
+
network: z.boolean().optional()
|
|
14
|
+
}).strict();
|
|
15
|
+
const policies = () => new DurableState("session-interaction-policy");
|
|
16
|
+
function getSessionInteractionPolicy(conversationId) {
|
|
17
|
+
return isXopcDatabaseOpen() && policies().get(conversationId) || {
|
|
18
|
+
mode: "default",
|
|
19
|
+
access: "configured"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function setSessionInteractionPolicy(conversationId, value) {
|
|
23
|
+
const policy = sessionInteractionPolicySchema.parse(value);
|
|
24
|
+
if (isEmbeddedRunActive(conversationId) || commandRegistry().list(conversationId).some((job) => job.status === "running") || listChildRuns(conversationId).some((child) => child.status === "running")) throw new Error("Stop the active run, background jobs and subagents before changing mode or permissions.");
|
|
25
|
+
policies().set(conversationId, policy);
|
|
26
|
+
return policy;
|
|
27
|
+
}
|
|
28
|
+
/** Read-only commands use the native OS boundary; discovery and delegation remain disabled. */
|
|
29
|
+
const READ_ONLY_SESSION_TOOLS = new Set([
|
|
30
|
+
"exec_command",
|
|
31
|
+
"managed_job",
|
|
32
|
+
"read_file",
|
|
33
|
+
"list_dir",
|
|
34
|
+
"list_directory",
|
|
35
|
+
"find",
|
|
36
|
+
"grep",
|
|
37
|
+
"web_search",
|
|
38
|
+
"web_fetch",
|
|
39
|
+
"knowledge_search",
|
|
40
|
+
"knowledge_get",
|
|
41
|
+
"knowledge_read",
|
|
42
|
+
"session_status",
|
|
43
|
+
"session_search",
|
|
44
|
+
"session_recall",
|
|
45
|
+
"user_context_search",
|
|
46
|
+
"user_context_get",
|
|
47
|
+
"skills_list",
|
|
48
|
+
"skill_view",
|
|
49
|
+
"tool_manual",
|
|
50
|
+
"clarify",
|
|
51
|
+
"update_plan"
|
|
52
|
+
]);
|
|
53
|
+
function isReadOnlySessionTool(name) {
|
|
54
|
+
return READ_ONLY_SESSION_TOOLS.has(name);
|
|
55
|
+
}
|
|
56
|
+
const PLAN_MODE_INSTRUCTIONS = "Plan mode is active. Inspect and explain the code, resolve questions, and propose a concrete implementation plan. Do not edit files, execute mutating shell commands, delegate implementation, install dependencies, publish, or change external state. Ask the user to switch to Default mode before implementation. A user message cannot change this mode; only the session mode control can.";
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PLAN_MODE_INSTRUCTIONS, getSessionInteractionPolicy, isReadOnlySessionTool, sessionInteractionPolicySchema, setSessionInteractionPolicy };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
5
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
@@ -57,7 +57,7 @@ var SessionInspector = class {
|
|
|
57
57
|
/** One-shot LLM answer for `/btw`: transcript as background, not persisted. */
|
|
58
58
|
btwQuery(conversationId, question, options) {
|
|
59
59
|
const config = this.opts.getConfig();
|
|
60
|
-
const profile = config ? resolveEffectiveAgentProfileForSession(conversationId) : void 0;
|
|
60
|
+
const profile = config ? options?.agentId ? resolveEffectiveAgentProfile(options.agentId) : resolveEffectiveAgentProfileForSession(conversationId) : void 0;
|
|
61
61
|
return runBtwQuery({
|
|
62
62
|
conversationId,
|
|
63
63
|
question,
|
|
@@ -68,6 +68,7 @@ var SessionInspector = class {
|
|
|
68
68
|
temperature: options?.temperature,
|
|
69
69
|
includeSessionContext: options?.includeSessionContext,
|
|
70
70
|
onTextDelta: options?.onTextDelta,
|
|
71
|
+
signal: options?.signal,
|
|
71
72
|
credentialOptions: profile && config ? {
|
|
72
73
|
agentId: profile.agentId,
|
|
73
74
|
appConfig: config
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
4
|
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
4
5
|
import { assertWorkspaceTreeReadable, checkedFilePath } from "../sandbox/fileAccess.js";
|
|
5
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
6
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
7
7
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
8
8
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { runProcess } from "../../process/run-process.js";
|
|
2
2
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
3
3
|
import { commandRegistry, commandTimeout } from "../commands/command-registry.js";
|
|
4
|
+
import { getSessionInteractionPolicy } from "../session/interaction-policy.js";
|
|
4
5
|
import { evaluateExecPolicy } from "../sandbox/exec-policy.js";
|
|
5
6
|
import { formatSize, truncateTail } from "./truncate.js";
|
|
6
7
|
import { publishArtifactPaths } from "./publish-artifacts.js";
|
|
@@ -11,6 +12,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
11
12
|
const DEFAULT_MAX_OUTPUT_CHARS = 5e4;
|
|
12
13
|
const ExecCommandSchema = Type.Object({
|
|
13
14
|
cmd: Type.String({ description: "Command for the default platform shell: /bin/sh on Unix and in Docker; cmd.exe on Windows hosts. Commands start in the workspace; use cwd instead of cd. For verification, invoke the existing test runner directly without shell chains, pipes, or output filters so its exit status and evidence remain unambiguous. Use maxOutputChars to limit output." }),
|
|
15
|
+
tty: Type.Optional(Type.Boolean({ description: "Allocate a terminal for interactive programs. Use managed_job stdin/resize and TUI /terminal to interact." })),
|
|
14
16
|
cwd: Type.Optional(Type.String({ description: "Working directory. Relative paths are resolved under the agent workspace." })),
|
|
15
17
|
timeoutMs: Type.Optional(Type.Number({ description: "Command timeout in milliseconds. Defaults to 1800000 (30m) and is capped at 14400000 (4h)." })),
|
|
16
18
|
maxOutputChars: Type.Optional(Type.Number({ description: "Maximum characters returned to the model. UI streaming still receives output deltas." })),
|
|
@@ -73,6 +75,8 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
73
75
|
idempotent: false,
|
|
74
76
|
finalGuardRelevant: true,
|
|
75
77
|
async execute(toolCallId, params, signal, onUpdate) {
|
|
78
|
+
const interaction = getSessionInteractionPolicy(options?.getConversationId?.() ?? workspaceCwd);
|
|
79
|
+
if ((interaction.mode === "plan" || interaction.access === "read-only") && (params.outputs?.length || params.reuseVerification)) throw new Error("Artifact publishing is disabled in Plan and read-only modes.");
|
|
76
80
|
const command = (params.cmd ?? "").trim();
|
|
77
81
|
if (params.yieldTimeMs !== void 0 && params.outputs?.length) throw new Error("yieldTimeMs cannot be combined with outputs; publish files after the job completes.");
|
|
78
82
|
if (!command) return {
|
|
@@ -212,6 +216,7 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
212
216
|
let commandResult = await registry.start({
|
|
213
217
|
workspace: workspaceCwd,
|
|
214
218
|
isolation,
|
|
219
|
+
tty: params.tty,
|
|
215
220
|
owner,
|
|
216
221
|
command,
|
|
217
222
|
cwd: policy.effectiveCwd,
|
|
@@ -14,6 +14,7 @@ import { init_session_key } from "../../routing/session-key.js";
|
|
|
14
14
|
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
15
15
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
16
16
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
17
|
+
import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
17
18
|
import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
|
|
18
19
|
import { PERSONAL_REQUEST_TOOL_IDS, TASK_EXECUTION_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
|
|
19
20
|
import { getPhoneRuntime, phoneExecutionContext } from "../../phone/runtime.js";
|
|
@@ -59,7 +60,6 @@ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
|
59
60
|
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
60
61
|
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
61
62
|
import "../../browser/index.js";
|
|
62
|
-
import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
63
63
|
import { createDelegateTool } from "./delegate-tool.js";
|
|
64
64
|
import { createAutomationTool } from "./automation-tool.js";
|
|
65
65
|
import { createSkillViewTool, createSkillsListTool } from "./skills-tools.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
1
2
|
import { DEFAULT_TOOL_METADATA, getToolMetadata } from "./metadata.js";
|
|
2
3
|
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
3
|
-
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
4
4
|
import { createDataBatchTool } from "./dataBatch.js";
|
|
5
5
|
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
6
6
|
import { createMcpSetupTool } from "./mcp-setup-tool.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { checkedFilePath } from "../sandbox/fileAccess.js";
|
|
2
1
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
2
|
+
import { checkedFilePath } from "../sandbox/fileAccess.js";
|
|
3
3
|
import { readdir } from "fs/promises";
|
|
4
4
|
import { Type } from "@sinclair/typebox";
|
|
5
5
|
//#region src/agent/tools/list-dir.ts
|
|
@@ -8,6 +8,7 @@ const ManagedJobSchema = Type.Union([
|
|
|
8
8
|
action: Type.Literal("start"),
|
|
9
9
|
command: Type.String({ minLength: 1 }),
|
|
10
10
|
cwd: Type.Optional(Type.String()),
|
|
11
|
+
tty: Type.Optional(Type.Boolean()),
|
|
11
12
|
maxRuntimeMs: Type.Optional(Type.Number())
|
|
12
13
|
}),
|
|
13
14
|
Type.Object({
|
|
@@ -28,6 +29,18 @@ const ManagedJobSchema = Type.Union([
|
|
|
28
29
|
chars: Type.String({ maxLength: 65536 }),
|
|
29
30
|
end: Type.Optional(Type.Boolean())
|
|
30
31
|
}),
|
|
32
|
+
Type.Object({
|
|
33
|
+
action: Type.Literal("resize"),
|
|
34
|
+
jobId: Type.String(),
|
|
35
|
+
cols: Type.Integer({
|
|
36
|
+
minimum: 2,
|
|
37
|
+
maximum: 1e3
|
|
38
|
+
}),
|
|
39
|
+
rows: Type.Integer({
|
|
40
|
+
minimum: 2,
|
|
41
|
+
maximum: 1e3
|
|
42
|
+
})
|
|
43
|
+
}),
|
|
31
44
|
Type.Object({ action: Type.Literal("list") }),
|
|
32
45
|
Type.Object({
|
|
33
46
|
action: Type.Literal("cancel"),
|
|
@@ -47,7 +60,7 @@ function createManagedJobTool(workspace, getConversationId, getSkillPassthroughE
|
|
|
47
60
|
return {
|
|
48
61
|
name: "managed_job",
|
|
49
62
|
label: "Managed Job",
|
|
50
|
-
description: "Manage shell jobs, including jobs yielded by exec_command. Start returns an id; wait returns on completion or after at most 60s; stdin writes
|
|
63
|
+
description: "Manage shell jobs, including jobs yielded by exec_command. Start returns an id; wait returns on completion or after at most 60s; stdin writes input; tty:true allocates a terminal and resize changes its dimensions; status/list/cancel inspect or stop jobs. Completed output and logs survive restart. Interrupted jobs require inspection before restart.",
|
|
51
64
|
parameters: ManagedJobSchema,
|
|
52
65
|
supportsParallel: true,
|
|
53
66
|
idempotent: false,
|
|
@@ -56,6 +69,7 @@ function createManagedJobTool(workspace, getConversationId, getSkillPassthroughE
|
|
|
56
69
|
const registry = commandRegistry();
|
|
57
70
|
if (input.action === "list") return result(registry.list(owner));
|
|
58
71
|
if (input.action !== "start") {
|
|
72
|
+
if (input.action === "resize" && !registry.resize(owner, input.jobId, input.cols, input.rows)) throw new Error("Terminal job not found");
|
|
59
73
|
if (input.action === "stdin" && !registry.write(owner, input.jobId, input.chars, input.end)) return result({
|
|
60
74
|
status: "failed",
|
|
61
75
|
error: "Job is unavailable or stdin is closed"
|
|
@@ -89,6 +103,7 @@ function createManagedJobTool(workspace, getConversationId, getSkillPassthroughE
|
|
|
89
103
|
...env,
|
|
90
104
|
COLUMNS: "200"
|
|
91
105
|
},
|
|
106
|
+
tty: input.tty,
|
|
92
107
|
workspace,
|
|
93
108
|
isolation: getCommandIsolation?.(),
|
|
94
109
|
timeoutMs: commandTimeout(input.maxRuntimeMs, policy.timeoutMs),
|
|
@@ -3,8 +3,8 @@ import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
|
3
3
|
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
4
4
|
import { CapabilityDispatcher } from "../../capabilities/runtime/dispatcher.js";
|
|
5
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
6
|
-
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
7
6
|
import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
|
|
7
|
+
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/personal-read-tool.ts
|
|
10
10
|
const schema = Type.Object({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
4
|
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
5
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
5
6
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename, isAbsolute, relative, sep } from "node:path";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
1
2
|
import { checkedFilePath, readWorkspaceFileAsync } from "../sandbox/fileAccess.js";
|
|
2
3
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
3
4
|
import { dataScheduler } from "../data-acquisition/scheduler.js";
|
|
4
5
|
import { formatSize, truncateHead } from "./truncate.js";
|
|
5
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
6
|
import { stat } from "fs/promises";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/agent/tools/read.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
4
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
4
5
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
6
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
6
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename } from "node:path";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -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 { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
3
4
|
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
5
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
6
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
6
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
7
7
|
import { basename, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -22,16 +22,16 @@ import { getAutomationSetup } from "../../automations/configuration-conversation
|
|
|
22
22
|
import { getEmbeddedExecutionRunId } from "../embedded/execution-context.js";
|
|
23
23
|
import "../../capabilities/runtime/dispatcher.js";
|
|
24
24
|
import { AutomationMcpSourceInput, prepareAutomationMcpSource } from "../../automations/mcp-source.js";
|
|
25
|
-
import {
|
|
25
|
+
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
26
26
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
27
|
-
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
28
|
-
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
29
27
|
import "../../projects/index.js";
|
|
30
28
|
import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
31
29
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
32
|
-
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
33
30
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
34
31
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
32
|
+
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
33
|
+
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
34
|
+
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
35
35
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
36
36
|
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
37
37
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
@@ -32,7 +32,11 @@ function registerAutomationDraftCapabilities(dispatcher, service, getConfig) {
|
|
|
32
32
|
id: "xopc.automations.simulate",
|
|
33
33
|
majorVersion: 1,
|
|
34
34
|
effect: "read",
|
|
35
|
-
surfaces: [
|
|
35
|
+
surfaces: [
|
|
36
|
+
"http",
|
|
37
|
+
"agent",
|
|
38
|
+
"extension"
|
|
39
|
+
],
|
|
36
40
|
scopes: ["automations.read"],
|
|
37
41
|
description: "Validate and explain an automation without running it or calling a model.",
|
|
38
42
|
input: AutomationCreateCapabilityInputSchema,
|
|
@@ -2,6 +2,8 @@ import { ProductReadContracts } from "../../../packages/gateway-contract/src/cap
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
4
4
|
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
5
|
+
import { automationReadable } from "../../local-apps/capabilities/automation-policy.js";
|
|
6
|
+
import { LocalAppAutomationHistorySchema, LocalAppAutomationListSchema, LocalAppAutomationOutputSchema, LocalAppAutomationRunOutputSchema, LocalAppRunEventsSchema, projectLocalAppRun } from "../../local-apps/capabilities/projections.js";
|
|
5
7
|
import { setTimeout } from "node:timers/promises";
|
|
6
8
|
//#region src/automations/capabilities/read.ts
|
|
7
9
|
init_src();
|
|
@@ -23,10 +25,18 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
23
25
|
...policy,
|
|
24
26
|
id: "xopc.automations.get_run",
|
|
25
27
|
description: "Read current run state rather than the historical submission receipt.",
|
|
28
|
+
surfaces: [
|
|
29
|
+
"http",
|
|
30
|
+
"agent",
|
|
31
|
+
"cli",
|
|
32
|
+
"extension"
|
|
33
|
+
],
|
|
34
|
+
extensionOutput: LocalAppAutomationRunOutputSchema,
|
|
26
35
|
...ProductReadContracts["xopc.automations.get_run"],
|
|
27
36
|
async execute({ id, waitMs }, context) {
|
|
28
|
-
const deadline = Date.now() + (waitMs ?? 0);
|
|
37
|
+
const deadline = Date.now() + (context.localApp ? Math.min(waitMs ?? 0, 5e3) : waitMs ?? 0);
|
|
29
38
|
for (;;) {
|
|
39
|
+
context.assertCurrent?.();
|
|
30
40
|
context.signal?.throwIfAborted();
|
|
31
41
|
const run = await service.getRun(id);
|
|
32
42
|
if (!run) throw new CapabilityError("NOT_FOUND", "Run not found");
|
|
@@ -37,7 +47,7 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
37
47
|
"cancelling"
|
|
38
48
|
].includes(run.status) || remaining <= 0) return {
|
|
39
49
|
ok: true,
|
|
40
|
-
run: { ...run }
|
|
50
|
+
run: { ...context.localApp ? projectLocalAppRun(run) : run }
|
|
41
51
|
};
|
|
42
52
|
await setTimeout(Math.min(250, remaining), void 0, { signal: context.signal });
|
|
43
53
|
}
|
|
@@ -47,12 +57,21 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
47
57
|
...policy,
|
|
48
58
|
id: "xopc.automations.run_events",
|
|
49
59
|
description: "Read ordered diagnostic events for an existing run.",
|
|
60
|
+
surfaces: [
|
|
61
|
+
"http",
|
|
62
|
+
"agent",
|
|
63
|
+
"cli",
|
|
64
|
+
"extension"
|
|
65
|
+
],
|
|
66
|
+
extensionOutput: LocalAppRunEventsSchema,
|
|
50
67
|
...ProductReadContracts["xopc.automations.run_events"],
|
|
51
|
-
async execute({ id }) {
|
|
68
|
+
async execute({ id }, context) {
|
|
52
69
|
if (!await service.getRun(id)) throw new CapabilityError("NOT_FOUND", "Run not found");
|
|
70
|
+
const events = await service.listRunEvents(id);
|
|
53
71
|
return {
|
|
54
72
|
ok: true,
|
|
55
|
-
events: (
|
|
73
|
+
events: (context.localApp ? events.slice(-100) : events).map((event) => ({ ...event })),
|
|
74
|
+
truncated: context.localApp ? events.length > 100 : false
|
|
56
75
|
};
|
|
57
76
|
}
|
|
58
77
|
}));
|
|
@@ -111,7 +130,20 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
111
130
|
...policy,
|
|
112
131
|
id: "xopc.automations.list",
|
|
113
132
|
description: "List automations, optionally scoped to a project.",
|
|
133
|
+
surfaces: [
|
|
134
|
+
"http",
|
|
135
|
+
"agent",
|
|
136
|
+
"cli",
|
|
137
|
+
"extension"
|
|
138
|
+
],
|
|
139
|
+
extensionOutput: LocalAppAutomationListSchema,
|
|
114
140
|
...ProductReadContracts["xopc.automations.list"],
|
|
141
|
+
async extensionExecute(input, context) {
|
|
142
|
+
return {
|
|
143
|
+
ok: true,
|
|
144
|
+
items: (await service.list(input)).filter((item) => context.localApp && automationReadable(context.localApp.resourceScopes, item))
|
|
145
|
+
};
|
|
146
|
+
},
|
|
115
147
|
async execute(input) {
|
|
116
148
|
requireProject(input.projectId);
|
|
117
149
|
return {
|
|
@@ -126,6 +158,13 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
126
158
|
...policy,
|
|
127
159
|
id: "xopc.automations.get",
|
|
128
160
|
description: "Read an automation.",
|
|
161
|
+
surfaces: [
|
|
162
|
+
"http",
|
|
163
|
+
"agent",
|
|
164
|
+
"cli",
|
|
165
|
+
"extension"
|
|
166
|
+
],
|
|
167
|
+
extensionOutput: LocalAppAutomationOutputSchema,
|
|
129
168
|
...ProductReadContracts["xopc.automations.get"],
|
|
130
169
|
async execute({ id }) {
|
|
131
170
|
const automation = await service.get(id);
|
|
@@ -140,9 +179,16 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
140
179
|
...policy,
|
|
141
180
|
id: "xopc.automations.history",
|
|
142
181
|
description: "Read automation execution history.",
|
|
182
|
+
surfaces: [
|
|
183
|
+
"http",
|
|
184
|
+
"agent",
|
|
185
|
+
"cli",
|
|
186
|
+
"extension"
|
|
187
|
+
],
|
|
188
|
+
extensionOutput: LocalAppAutomationHistorySchema,
|
|
143
189
|
...ProductReadContracts["xopc.automations.history"],
|
|
144
|
-
async execute(input) {
|
|
145
|
-
requireProject(input.projectId);
|
|
190
|
+
async execute(input, context) {
|
|
191
|
+
if (!context.localApp) requireProject(input.projectId);
|
|
146
192
|
let before;
|
|
147
193
|
if (input.cursor) try {
|
|
148
194
|
const parsed = JSON.parse(Buffer.from(input.cursor, "base64url").toString("utf8"));
|
|
@@ -157,10 +203,14 @@ function registerAutomationReadCapabilities(dispatcher, service, projects) {
|
|
|
157
203
|
const rows = await service.listRuns({
|
|
158
204
|
...input,
|
|
159
205
|
before,
|
|
160
|
-
limit: input.limit + 1
|
|
206
|
+
limit: input.limit + 1,
|
|
207
|
+
...context.localApp ? { localAppRestriction: {
|
|
208
|
+
extensionId: context.localApp.extensionId,
|
|
209
|
+
scope: context.localApp.resourceScopes.automationsRead
|
|
210
|
+
} } : {}
|
|
161
211
|
});
|
|
162
212
|
const hasMore = rows.length > input.limit;
|
|
163
|
-
const items = rows.slice(0, input.limit).map((item) => ({ ...item }));
|
|
213
|
+
const items = rows.slice(0, input.limit).map((item) => ({ ...context.localApp ? projectLocalAppRun(item) : item }));
|
|
164
214
|
const last = items.at(-1);
|
|
165
215
|
const nextCursor = hasMore && last ? Buffer.from(JSON.stringify({
|
|
166
216
|
createdAtMs: last.createdAtMs,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AutomationCancelOutputSchema, AutomationDeleteInputSchema, AutomationDeleteOutputSchema, AutomationMutationOutputSchema, AutomationReadAllInputSchema, AutomationReadAllOutputSchema, AutomationReadOutputSchema, AutomationRecoveryOutputSchema, AutomationReplayEventInputSchema, AutomationRetryDeliveryInputSchema, AutomationRunMutationOutputSchema, AutomationSetEnabledInputSchema, CapabilityResourceInputSchema } from "../../../packages/gateway-contract/src/capabilities.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { DurableState } from "../../storage/sqlite/durable-state.js";
|
|
3
4
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
4
5
|
import { AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "../domain/validation.js";
|
|
5
6
|
import { getAutomation } from "../storage/automation-repository.js";
|
|
@@ -9,6 +10,7 @@ import { getAutomationEventForRun } from "../events/event-repository.js";
|
|
|
9
10
|
import "../events/index.js";
|
|
10
11
|
import { assertAutomationSetupTarget, bindAutomationSetup } from "../configuration-conversation.js";
|
|
11
12
|
import { defineAtomicCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
13
|
+
import { LocalAppAutomationSubmitSchema } from "../../local-apps/capabilities/projections.js";
|
|
12
14
|
import { AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationInvalidAgentError, AutomationInvalidScheduleError, AutomationInvalidSourceError } from "../service/automation-service.js";
|
|
13
15
|
import { z } from "zod";
|
|
14
16
|
//#region src/automations/capabilities/write.ts
|
|
@@ -113,6 +115,11 @@ function registerAutomationWriteCapabilities(dispatcher, service, projects) {
|
|
|
113
115
|
dispatcher.register(defineAtomicCapability({
|
|
114
116
|
...policy,
|
|
115
117
|
id: "xopc.automations.cancel",
|
|
118
|
+
surfaces: [
|
|
119
|
+
"http",
|
|
120
|
+
"agent",
|
|
121
|
+
"extension"
|
|
122
|
+
],
|
|
116
123
|
description: "Persist cancellation intent for a run. Only queued work is confirmed stopped immediately; receipts describe acceptance time.",
|
|
117
124
|
input: CapabilityResourceInputSchema,
|
|
118
125
|
output: AutomationCancelOutputSchema,
|
|
@@ -154,6 +161,12 @@ function registerAutomationWriteCapabilities(dispatcher, service, projects) {
|
|
|
154
161
|
for (const command of ["run", "rerun"]) dispatcher.register(defineAtomicCapability({
|
|
155
162
|
...policy,
|
|
156
163
|
id: `xopc.automations.${command}`,
|
|
164
|
+
surfaces: command === "run" ? [
|
|
165
|
+
"http",
|
|
166
|
+
"agent",
|
|
167
|
+
"extension"
|
|
168
|
+
] : ["http", "agent"],
|
|
169
|
+
extensionOutput: LocalAppAutomationSubmitSchema,
|
|
157
170
|
description: command === "run" ? "Queue a manual run with the currently accepted execution configuration." : "Queue a rerun with current configuration and the original trigger event.",
|
|
158
171
|
input: CapabilityResourceInputSchema,
|
|
159
172
|
output: AutomationRunMutationOutputSchema,
|
|
@@ -162,6 +175,23 @@ function registerAutomationWriteCapabilities(dispatcher, service, projects) {
|
|
|
162
175
|
const automation = automationId ? getAutomation(automationId) : null;
|
|
163
176
|
if (!automation) throw new CapabilityError("NOT_FOUND", "Automation or source run not found");
|
|
164
177
|
assertManagedOperation(automation, "run");
|
|
178
|
+
if (context.localApp) {
|
|
179
|
+
context.assertCurrent?.();
|
|
180
|
+
new DurableState("local-app-automation-budget", context.localApp.extensionId).update("hour", (previous) => {
|
|
181
|
+
const budget = previous && Date.now() - previous.start < 36e5 ? previous : {
|
|
182
|
+
start: Date.now(),
|
|
183
|
+
count: 0
|
|
184
|
+
};
|
|
185
|
+
if (budget.count >= 20) throw new CapabilityError("UNAVAILABLE", "This app has reached its hourly automation budget");
|
|
186
|
+
return {
|
|
187
|
+
value: {
|
|
188
|
+
...budget,
|
|
189
|
+
count: budget.count + 1
|
|
190
|
+
},
|
|
191
|
+
result: void 0
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}
|
|
165
195
|
try {
|
|
166
196
|
const request = {
|
|
167
197
|
id: `${command}:${context.operationId}`,
|
|
@@ -181,6 +211,29 @@ function registerAutomationWriteCapabilities(dispatcher, service, projects) {
|
|
|
181
211
|
};
|
|
182
212
|
const executionEvent = command === "rerun" ? getAutomationEventForRun(id) ?? request : request;
|
|
183
213
|
const run = service.queueTriggerAtomically(automation.id, request, executionEvent);
|
|
214
|
+
if (context.localApp) new DurableState("local-app-automation-runs", context.localApp.extensionId).set(run.id, { automationId: automation.id });
|
|
215
|
+
if (context.localApp) {
|
|
216
|
+
const app = context.localApp;
|
|
217
|
+
const approval = app.resourceScopes.automationsRun.mode === "selected" ? app.resourceScopes.automationsRun.approvals.find((item) => item.id === automation.id) : void 0;
|
|
218
|
+
if (!approval || !app.releaseId || !app.grantRevision) throw new CapabilityError("FORBIDDEN", "Bounded execution approval is required");
|
|
219
|
+
if (!app.manifestDigest) throw new CapabilityError("FORBIDDEN", "Release identity is required");
|
|
220
|
+
new DurableState("local-app-execution-runs", app.extensionId).update(`${app.grantRevision}:${automation.id}`, (previous) => {
|
|
221
|
+
if ((previous ?? 0) >= approval.authority.maxRuns) throw new CapabilityError("FORBIDDEN", "Execution count exhausted");
|
|
222
|
+
return {
|
|
223
|
+
value: (previous ?? 0) + 1,
|
|
224
|
+
result: void 0
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
new DurableState("local-app-run-authority").set(run.id, {
|
|
228
|
+
extensionId: app.extensionId,
|
|
229
|
+
automationId: automation.id,
|
|
230
|
+
manifestDigest: app.manifestDigest,
|
|
231
|
+
releaseId: app.releaseId,
|
|
232
|
+
grantRevision: app.grantRevision,
|
|
233
|
+
configurationDigest: approval.configurationDigest,
|
|
234
|
+
authority: approval.authority
|
|
235
|
+
});
|
|
236
|
+
}
|
|
184
237
|
return {
|
|
185
238
|
ok: true,
|
|
186
239
|
automation: { ...automation },
|
|
@@ -2,8 +2,9 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
4
4
|
import { getAutomationRun } from "../storage/automation-run-repository.js";
|
|
5
|
-
import { assertUrlSafe } from "../../agent/tools/url-safety.js";
|
|
6
5
|
import "../storage/index.js";
|
|
6
|
+
import { assertLocalAppDelivery } from "../../local-apps/execution-authority.js";
|
|
7
|
+
import { assertUrlSafe } from "../../agent/tools/url-safety.js";
|
|
7
8
|
import { getAutomationEventForRun } from "../events/event-repository.js";
|
|
8
9
|
import "../events/index.js";
|
|
9
10
|
import { resolveAutomationWebhookSecret } from "../webhook-secrets.js";
|
|
@@ -260,6 +261,7 @@ var AutomationDeliveryRouter = class {
|
|
|
260
261
|
try {
|
|
261
262
|
const handler = this.handlers.get(row.kind);
|
|
262
263
|
if (!handler) throw new Error(`Automation delivery handler is unavailable: ${row.kind}`);
|
|
264
|
+
assertLocalAppDelivery(row.run_id, row.kind);
|
|
263
265
|
await handler({
|
|
264
266
|
deliveryId: row.delivery_id,
|
|
265
267
|
attempt: row.attempts + 1,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/automations/run-changes.ts
|
|
2
|
+
const listeners = /* @__PURE__ */ new Map();
|
|
3
|
+
function notifyAutomationRun(runId) {
|
|
4
|
+
for (const listener of listeners.get(runId) ?? []) try {
|
|
5
|
+
listener();
|
|
6
|
+
} catch {}
|
|
7
|
+
}
|
|
8
|
+
function onAutomationRunChange(runId, listener) {
|
|
9
|
+
const group = listeners.get(runId) ?? /* @__PURE__ */ new Set();
|
|
10
|
+
group.add(listener);
|
|
11
|
+
listeners.set(runId, group);
|
|
12
|
+
return () => {
|
|
13
|
+
group.delete(listener);
|
|
14
|
+
if (!group.size) listeners.delete(runId);
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { notifyAutomationRun, onAutomationRunChange };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AutomationDeliveryPolicy } from '../domain/types.js';
|
|
2
2
|
import type { Automation, AutomationDeps, AutomationEvent, AutomationMetrics, AutomationProductEventRun, AutomationRun, AutomationRunEvent } from '../domain/types.js';
|
|
3
3
|
import { type CreateAutomationInput, type UpdateAutomationInput } from '../domain/validation.js';
|
|
4
|
+
import { listAutomationRuns } from '../storage/index.js';
|
|
4
5
|
export declare class AutomationInvalidScheduleError extends Error {
|
|
5
6
|
}
|
|
6
7
|
export declare class AutomationInvalidAgentError extends Error {
|
|
@@ -90,15 +91,7 @@ export declare class AutomationService {
|
|
|
90
91
|
/** Claim before invoking external work; replays never restart running or completed runs. */
|
|
91
92
|
dispatchQueuedRun(runId: string): void;
|
|
92
93
|
availableRunSlots(): number;
|
|
93
|
-
listRuns(options?:
|
|
94
|
-
automationId?: string;
|
|
95
|
-
projectId?: string;
|
|
96
|
-
limit?: number;
|
|
97
|
-
before?: {
|
|
98
|
-
createdAtMs: number;
|
|
99
|
-
id: string;
|
|
100
|
-
};
|
|
101
|
-
}): Promise<AutomationRun[]>;
|
|
94
|
+
listRuns(options?: Parameters<typeof listAutomationRuns>[0]): Promise<AutomationRun[]>;
|
|
102
95
|
listRunsForProductEvent(options: {
|
|
103
96
|
eventType: string;
|
|
104
97
|
source?: string;
|