@xopcai/xopc 0.0.454 → 0.0.456
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-CgQDpSpK.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-D0nNat6N.js → automations-workspace-CWEDraTP.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-BjYumhaI.js} +20 -20
- 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-Cn1TfGz4.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-B7I1II0Z.js → desktop-pet-narrative-JqMsz4rn.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-BpzvsoS1.js → index-DBlVVXOA.js} +5 -5
- package/dist/gateway/static/root/assets/index-DpkEeFEQ.css +1 -0
- 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-C6s0WlNL.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-CR7dNVDi.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-C89kLOIL.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-sHcdluTm.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-DrfQJkmW.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-C4CYw21O.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-DBnkT1Nj.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-CP35P4VA.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-CIpGYSl0.js +1 -0
- 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-Bbi2MpIS.js +2 -0
- 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 +8 -3
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +8 -1
- package/dist/src/agent/background-review/run-background-review.js +48 -4
- 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/audit.js +18 -0
- package/dist/src/agent/context/coordinator.d.ts +4 -0
- package/dist/src/agent/context/coordinator.js +33 -7
- package/dist/src/agent/context/deep-recall.d.ts +33 -0
- package/dist/src/agent/context/deep-recall.js +190 -0
- package/dist/src/agent/context/execution-context.js +29 -5
- package/dist/src/agent/context/execution-context.types.d.ts +2 -0
- package/dist/src/agent/context/memory-claim-grounding.d.ts +2 -0
- package/dist/src/agent/context/memory-claim-grounding.js +20 -0
- package/dist/src/agent/context/project-context.js +1 -1
- package/dist/src/agent/context/recall-grounding.d.ts +3 -0
- package/dist/src/agent/context/recall-grounding.js +31 -0
- 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 +120 -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/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/memory/context-recovery.d.ts +1 -1
- package/dist/src/agent/memory/index.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 +3 -3
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +8 -5
- 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/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- 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 +23 -1
- package/dist/src/agent/tools/index.js +1 -1
- package/dist/src/agent/tools/knowledge-memory-tool.js +7 -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-memory-tool.d.ts +11 -0
- package/dist/src/agent/tools/personal-memory-tool.js +387 -0
- package/dist/src/agent/tools/personal-read-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/session-search-tool.d.ts +2 -0
- package/dist/src/agent/tools/session-search-tool.js +21 -7
- package/dist/src/agent/tools/user-context-tool.js +11 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +6 -6
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/automations/api/routes.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +6 -2
- package/dist/src/automations/capabilities/read.js +58 -8
- package/dist/src/automations/capabilities/write.js +54 -1
- package/dist/src/automations/configuration-conversation.js +1 -1
- 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/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.d.ts +1 -0
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.d.ts +2 -0
- package/dist/src/capabilities/runtime/product.js +27 -7
- 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/agents.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- 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/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/endpoint-transport.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/schema.d.ts +7 -1
- package/dist/src/config/schema.js +6 -0
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +6 -0
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +108 -11
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- 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/notes.js +2 -2
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- 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 +4 -4
- package/dist/src/gateway/hono/routes/tui.js +308 -0
- package/dist/src/gateway/hono/routes/user-model.js +47 -7
- package/dist/src/gateway/image-generation-setup.js +1 -1
- 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 +7 -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 +4 -4
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/infra/execution-authority.d.ts +12 -0
- package/dist/src/infra/execution-authority.js +27 -0
- package/dist/src/knowledge-memory/index.js +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +6 -0
- package/dist/src/knowledge-memory/repository.js +49 -1
- package/dist/src/knowledge-memory/usage-policy.js +7 -7
- 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 +24 -7
- 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 +19 -2
- package/dist/src/local-apps/store.js +1 -1
- package/dist/src/memory-learning/work-capture.js +3 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +2 -1
- package/dist/src/personal-agent/prompts.js +7 -1
- package/dist/src/personal-agent/request-service.js +1 -1
- package/dist/src/personal-agent/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/providers/model-catalog-persistence.js +1 -1
- package/dist/src/review/review-git.js +14 -1
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/session/history-recall-policy.d.ts +6 -0
- package/dist/src/session/history-recall-policy.js +48 -0
- 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/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +12 -3
- 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 +249 -43
- 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/dist/src/user-context/config.d.ts +12 -0
- package/dist/src/user-context/config.js +14 -1
- package/dist/src/user-context/memory-version.d.ts +2 -0
- package/dist/src/user-context/memory-version.js +12 -0
- package/dist/src/user-model/capture/evidence-policy.d.ts +45 -0
- package/dist/src/user-model/capture/evidence-policy.js +143 -0
- package/dist/src/user-model/capture/executor.d.ts +1 -0
- package/dist/src/user-model/capture/executor.js +68 -8
- package/dist/src/user-model/capture/semantic.d.ts +16 -0
- package/dist/src/user-model/capture/semantic.js +66 -12
- package/dist/src/user-model/repository.js +11 -0
- package/dist/src/user-model/usage-policy.js +5 -5
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/work-discovery/service.js +1 -1
- 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/understanding-refresh-store-BxtpXRfV.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DmmJODQ4.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-pVOYuH7u.js +0 -1
|
@@ -3,10 +3,10 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
5
|
import "../../storage/sqlite/index.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema, materializeAutomationTrigger } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -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,6 +1,8 @@
|
|
|
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";
|
|
5
|
+
import { defineAtomicCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
4
6
|
import { AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "../domain/validation.js";
|
|
5
7
|
import { getAutomation } from "../storage/automation-repository.js";
|
|
6
8
|
import { getAutomationRun, markAllAutomationRunsRead, markAutomationRunRead } from "../storage/automation-run-repository.js";
|
|
@@ -8,7 +10,7 @@ import "../storage/index.js";
|
|
|
8
10
|
import { getAutomationEventForRun } from "../events/event-repository.js";
|
|
9
11
|
import "../events/index.js";
|
|
10
12
|
import { assertAutomationSetupTarget, bindAutomationSetup } from "../configuration-conversation.js";
|
|
11
|
-
import {
|
|
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 },
|
|
@@ -3,9 +3,9 @@ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "
|
|
|
3
3
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
4
4
|
import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
5
5
|
import "../storage/sqlite/index.js";
|
|
6
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
6
7
|
import { init_agent_scope, listAgentEntries } from "../agent/agent-scope.js";
|
|
7
8
|
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
8
|
-
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
9
9
|
import { getAutomation } from "./storage/automation-repository.js";
|
|
10
10
|
import { getAutomationRun, listAutomationRuns } from "./storage/automation-run-repository.js";
|
|
11
11
|
import { listAutomationResultDeliveries } from "./delivery/delivery-router.js";
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -13,8 +13,8 @@ import { accessSync, chmodSync, constants, existsSync, mkdirSync, readFileSync,
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import { execFileSync, spawn } from "node:child_process";
|
|
16
|
-
import AdmZip from "adm-zip";
|
|
17
16
|
import { readFile, readdir, rm } from "node:fs/promises";
|
|
17
|
+
import AdmZip from "adm-zip";
|
|
18
18
|
//#region src/browser/providers/browser-ext-install.ts
|
|
19
19
|
/**
|
|
20
20
|
* Install bundled Chrome extension artifacts into {resolveBinDir()}/browser-ext/.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -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;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
6
7
|
import { registerTaskReadCapabilities } from "../../tasks/capabilities/read.js";
|
|
7
8
|
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
9
|
import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
|
|
15
10
|
import { registerAutomationWriteCapabilities } from "../../automations/capabilities/write.js";
|
|
11
|
+
import { registerAutomationProposalCapabilities } from "../../local-apps/automation-proposals.js";
|
|
16
12
|
import { registerAutomationDraftCapabilities } from "../../automations/capabilities/drafts.js";
|
|
13
|
+
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
14
|
+
import { registerProjectWriteCapabilities } from "../../projects/capabilities/write.js";
|
|
15
|
+
import { FileSpaceService } from "../../files/file-service.js";
|
|
17
16
|
import { registerTaskWriteCapabilities } from "../../tasks/capabilities/write.js";
|
|
17
|
+
import { registerTaskManagementCapabilities } from "../../tasks/capabilities/management.js";
|
|
18
|
+
import { registerLocalAppP1Capabilities } from "../../local-apps/p1-services.js";
|
|
19
|
+
import { registerLocalAppWriteCapabilities } from "../../local-apps/capabilities/write.js";
|
|
20
|
+
import { registerTaskRelationCapabilities } from "../../tasks/capabilities/relations.js";
|
|
21
|
+
import { registerTaskRunWriteCapabilities } from "../../tasks/capabilities/runs.js";
|
|
18
22
|
import { registerSettingsCapability } from "./settings.js";
|
|
19
23
|
import { registerAppContextCapability } from "./app-context.js";
|
|
20
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
21
24
|
//#region src/capabilities/runtime/product.ts
|
|
22
25
|
function createProductDispatcher(getNotes, taskWrites) {
|
|
23
26
|
const dispatcher = new CapabilityDispatcher();
|
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
4
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { creditDecimal } from "../../../packages/gateway-contract/src/cloud-credits.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
5
6
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
6
7
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
7
8
|
import { XopcCloudAccountService } from "../../providers/xopc-cloud-account-service.js";
|
|
8
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
10
10
|
import "../../../packages/image-providers/src/index.js";
|
|
11
11
|
import { loadConfig } from "../../config/loader.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
2
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
4
|
import { ConfigSchema, getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
4
5
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
@@ -6,7 +7,6 @@ import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
|
6
7
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
7
8
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
8
9
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
9
|
-
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
@@ -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 {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
2
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { readConfigFileSnapshot } from "../../config/config-file.js";
|
|
5
5
|
import { saveConfig } from "../../config/loader.js";
|
|
6
6
|
import { ensureStarterAgentsInitialized } from "../../agent/starter-agents.js";
|