@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
2
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
3
|
+
import { getChildRun, getChildRunMessages, monitorChildRun } from "./child-run-monitor.js";
|
|
4
|
+
import { getSessionInteractionPolicy } from "../session/interaction-policy.js";
|
|
5
|
+
import { MessageBus } from "../../infra/bus/queue.js";
|
|
6
|
+
import "../../infra/bus/index.js";
|
|
7
|
+
//#region src/agent/orchestration/child-run-resume.ts
|
|
8
|
+
init_providers();
|
|
9
|
+
/** Reconstruct tools from current configuration, intersected with the original delegation grant. */
|
|
10
|
+
async function resumeChildRun(parentConversationId, id, text, config) {
|
|
11
|
+
const view = getChildRun(parentConversationId, id);
|
|
12
|
+
if (view.status === "running") throw new Error("Child is already running; use steer.");
|
|
13
|
+
if (!view.workspace || !view.modelRef || !view.allowedTools || !text.trim() || text.length > 32e3) throw new Error("Child has no resumable context or invalid input.");
|
|
14
|
+
const policy = getSessionInteractionPolicy(parentConversationId);
|
|
15
|
+
if (policy.mode === "plan" || policy.access === "read-only") throw new Error("Switch out of Plan and read-only modes before resuming delegated work.");
|
|
16
|
+
const [{ createDelegateChildHandle }, { AgentToolsFactory }, { InMemoryTranscriptRuntime }, { protectDelegatedTool }] = await Promise.all([
|
|
17
|
+
import("../child-agent-factory.js"),
|
|
18
|
+
import("../tools/factory.js"),
|
|
19
|
+
import("../embedded/transcript-runtime.js"),
|
|
20
|
+
import("../tools/delegation-policy.js")
|
|
21
|
+
]);
|
|
22
|
+
if (getChildRun(parentConversationId, id).status === "running") throw new Error("Child is already running.");
|
|
23
|
+
const model = resolveModel(view.modelRef);
|
|
24
|
+
const bus = new MessageBus();
|
|
25
|
+
const profile = view.agentId ? resolveEffectiveAgentProfile(view.agentId) : resolveEffectiveAgentProfileForSession(parentConversationId);
|
|
26
|
+
const runtime = new InMemoryTranscriptRuntime({
|
|
27
|
+
runtimeId: id,
|
|
28
|
+
cwd: view.workspace,
|
|
29
|
+
initialMessages: getChildRunMessages(parentConversationId, id)
|
|
30
|
+
});
|
|
31
|
+
const child = createDelegateChildHandle({
|
|
32
|
+
workspace: view.workspace,
|
|
33
|
+
goal: text,
|
|
34
|
+
context: view.task,
|
|
35
|
+
requesterConversationId: parentConversationId,
|
|
36
|
+
conversationId: id,
|
|
37
|
+
transcriptRuntime: runtime,
|
|
38
|
+
allowedToolNames: view.allowedTools,
|
|
39
|
+
maxIterations: view.maxIterations ?? 30,
|
|
40
|
+
model,
|
|
41
|
+
bus,
|
|
42
|
+
agentId: profile.agentId,
|
|
43
|
+
getConfig: () => config,
|
|
44
|
+
buildChildTools: (options) => new AgentToolsFactory({
|
|
45
|
+
workspace: options.workspace,
|
|
46
|
+
bus,
|
|
47
|
+
getConfig: () => config,
|
|
48
|
+
getCurrentContext: () => null,
|
|
49
|
+
getPrimaryModel: () => model
|
|
50
|
+
}).createAllTools({
|
|
51
|
+
workspace: options.workspace,
|
|
52
|
+
agentId: profile.agentId,
|
|
53
|
+
conversationId: id,
|
|
54
|
+
toolAllowlist: profile.config.toolAllowlist,
|
|
55
|
+
disabledTools: profile.tools.denied
|
|
56
|
+
}).map(protectDelegatedTool)
|
|
57
|
+
});
|
|
58
|
+
child.run().catch((error) => {
|
|
59
|
+
monitorChildRun({
|
|
60
|
+
...view,
|
|
61
|
+
parentConversationId,
|
|
62
|
+
abort: () => child.abort("user_cancelled")
|
|
63
|
+
}).finish("failed", error instanceof Error ? error.message : String(error));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { resumeChildRun };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type NativeCommandSandbox = {
|
|
2
|
+
access: 'read-only' | 'workspace-write';
|
|
3
|
+
network: boolean;
|
|
4
|
+
workspace: string;
|
|
5
|
+
};
|
|
6
|
+
/** The selected OS boundary must be available; execution never falls back to an unrestricted host. */
|
|
7
|
+
export declare function sandboxCommand(launch: {
|
|
8
|
+
executable: string;
|
|
9
|
+
args: string[];
|
|
10
|
+
shell: boolean;
|
|
11
|
+
}, sandbox: NativeCommandSandbox): Promise<{
|
|
12
|
+
executable: string;
|
|
13
|
+
args: string[];
|
|
14
|
+
shell: boolean;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { tmpdir } from "node:os";
|
|
2
|
+
import { delimiter } from "node:path";
|
|
3
|
+
import { access, realpath } from "node:fs/promises";
|
|
4
|
+
//#region src/agent/sandbox/native-command.ts
|
|
5
|
+
/** The selected OS boundary must be available; execution never falls back to an unrestricted host. */
|
|
6
|
+
async function sandboxCommand(launch, sandbox) {
|
|
7
|
+
const workspace = await realpath(sandbox.workspace);
|
|
8
|
+
const program = launch.shell ? "/bin/sh" : launch.executable;
|
|
9
|
+
const args = launch.shell ? ["-c", launch.executable] : launch.args;
|
|
10
|
+
if (process.platform === "darwin") {
|
|
11
|
+
await access("/usr/bin/sandbox-exec");
|
|
12
|
+
return {
|
|
13
|
+
executable: "/usr/bin/sandbox-exec",
|
|
14
|
+
args: [
|
|
15
|
+
"-p",
|
|
16
|
+
`(version 1) (allow default) (deny file-write*) ${(sandbox.access === "workspace-write" ? [workspace, await realpath(tmpdir())] : []).map((path) => `(allow file-write* (subpath ${JSON.stringify(path)}))`).join(" ")} ${sandbox.network ? "" : "(deny network*)"}`,
|
|
17
|
+
program,
|
|
18
|
+
...args
|
|
19
|
+
],
|
|
20
|
+
shell: false
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (process.platform === "linux") {
|
|
24
|
+
const candidates = (process.env.PATH ?? "/usr/bin:/bin").split(delimiter).map((path) => `${path}/bwrap`);
|
|
25
|
+
let bwrap;
|
|
26
|
+
for (const path of candidates) try {
|
|
27
|
+
await access(path);
|
|
28
|
+
bwrap = path;
|
|
29
|
+
break;
|
|
30
|
+
} catch {}
|
|
31
|
+
if (!bwrap) throw new Error("OS sandbox requires bubblewrap (bwrap) on Linux. Install it before selecting sandboxed execution.");
|
|
32
|
+
return {
|
|
33
|
+
executable: bwrap,
|
|
34
|
+
shell: false,
|
|
35
|
+
args: [
|
|
36
|
+
"--die-with-parent",
|
|
37
|
+
"--new-session",
|
|
38
|
+
"--unshare-pid",
|
|
39
|
+
"--unshare-uts",
|
|
40
|
+
"--unshare-ipc",
|
|
41
|
+
...sandbox.network ? [] : ["--unshare-net"],
|
|
42
|
+
"--ro-bind",
|
|
43
|
+
"/",
|
|
44
|
+
"/",
|
|
45
|
+
"--dev",
|
|
46
|
+
"/dev",
|
|
47
|
+
"--proc",
|
|
48
|
+
"/proc",
|
|
49
|
+
...sandbox.access === "workspace-write" ? [
|
|
50
|
+
"--bind",
|
|
51
|
+
workspace,
|
|
52
|
+
workspace,
|
|
53
|
+
"--tmpfs",
|
|
54
|
+
"/tmp"
|
|
55
|
+
] : [],
|
|
56
|
+
"--",
|
|
57
|
+
program,
|
|
58
|
+
...args
|
|
59
|
+
]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
throw new Error(`Native OS sandbox is unavailable on ${process.platform}. Choose an available execution environment explicitly.`);
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { sandboxCommand };
|
|
@@ -13,6 +13,7 @@ export declare function runBtwQuery(opts: {
|
|
|
13
13
|
maxTokens?: number;
|
|
14
14
|
temperature?: number;
|
|
15
15
|
includeSessionContext?: boolean;
|
|
16
|
+
signal?: AbortSignal;
|
|
16
17
|
onTextDelta?: (delta: string) => void | Promise<void>;
|
|
17
18
|
credentialOptions?: CredentialResolverOptions;
|
|
18
19
|
}): Promise<{
|
|
@@ -102,7 +102,7 @@ async function runBtwQuery(opts) {
|
|
|
102
102
|
const modelMaxTokens = typeof model.maxTokens === "number" && Number.isFinite(model.maxTokens) ? Math.max(1, Math.trunc(model.maxTokens)) : void 0;
|
|
103
103
|
const modelCallOptions = {
|
|
104
104
|
maxTokens: modelMaxTokens ? Math.min(requestedMaxTokens, modelMaxTokens) : requestedMaxTokens,
|
|
105
|
-
signal: controller.signal,
|
|
105
|
+
signal: opts.signal ? AbortSignal.any([controller.signal, opts.signal]) : controller.signal,
|
|
106
106
|
apiKey,
|
|
107
107
|
...opts.temperature !== void 0 ? { temperature: opts.temperature } : {}
|
|
108
108
|
};
|
|
@@ -2,11 +2,11 @@ import { init_injector, injectSourceContextsIntoUserMessage } from "../source-co
|
|
|
2
2
|
import { getConnectionResumeInput, init_connection_wait_repository } from "../../storage/sqlite/connection-wait-repository.js";
|
|
3
3
|
import { getClarificationResumeInput } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
4
4
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
5
|
+
import { resolveImageHandlingStrategy } from "../image/vision-detection.js";
|
|
6
|
+
import { hydrateUserTurnForLlm } from "../inbound/attachment-pipeline.js";
|
|
5
7
|
import { phoneResumeForRun } from "../../phone/assistance.js";
|
|
6
8
|
import { buildDelegatedTaskDirective, buildTaskExecutionDirective } from "../../tasks/task-context-assembler.js";
|
|
7
9
|
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
8
|
-
import { resolveImageHandlingStrategy } from "../image/vision-detection.js";
|
|
9
|
-
import { hydrateUserTurnForLlm } from "../inbound/attachment-pipeline.js";
|
|
10
10
|
import { shouldSkipResetOverlapCommand } from "../../session/reset-triggers.js";
|
|
11
11
|
import { parseSlashCommand } from "../../chat-commands/command-parse.js";
|
|
12
12
|
import { personalCommandRejection } from "../../chat-commands/personal-command-policy.js";
|
|
@@ -9,12 +9,12 @@ import { getClarificationResumeInput } from "../../storage/sqlite/clarification-
|
|
|
9
9
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
10
10
|
import { init_model_usage, modelUsageOriginFromTurn, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
11
11
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
12
|
+
import { clearPendingTranscriptUserMessage, setPendingTranscriptUserMessage } from "../inbound/attachment-pipeline.js";
|
|
13
|
+
import { abortEmbeddedRun } from "../embedded/runs.js";
|
|
12
14
|
import { phoneResumeForRun } from "../../phone/assistance.js";
|
|
13
15
|
import { mergeSttConfigFromAppConfig } from "../../voice/stt/config.js";
|
|
14
16
|
import "../../voice/stt/index.js";
|
|
15
17
|
import { getMcpSetupResumeInput } from "../mcp/continuation-input.js";
|
|
16
|
-
import { clearPendingTranscriptUserMessage, setPendingTranscriptUserMessage } from "../inbound/attachment-pipeline.js";
|
|
17
|
-
import { abortEmbeddedRun } from "../embedded/runs.js";
|
|
18
18
|
import { formatAgentRunErrorForClient } from "../client-error-format.js";
|
|
19
19
|
import { resolveConfiguredActivityDetailDefault, resolveEffectiveReasoningLevel } from "../../session/thinking-resolve.js";
|
|
20
20
|
import { initSessionTurn } from "../../session/init-session-turn.js";
|
|
@@ -344,7 +344,7 @@ async function* runProcessDirectStreamingInner(deps, input) {
|
|
|
344
344
|
abortSignal: signal,
|
|
345
345
|
sourceContexts,
|
|
346
346
|
presentation: input.presentation,
|
|
347
|
-
requireVisibleReply: input.origin.type === "endpoint",
|
|
347
|
+
requireVisibleReply: input.origin.type === "endpoint" || input.origin.type === "system" && input.origin.source === "cli",
|
|
348
348
|
runId: input.runId,
|
|
349
349
|
onEvent: (embeddedEvent) => {
|
|
350
350
|
const event = { ...embeddedEvent };
|
|
@@ -91,6 +91,7 @@ export declare class AgentService {
|
|
|
91
91
|
/** Gateway: notify UI after direct `SessionStore.updateMetadata` (no SessionManager emit). */
|
|
92
92
|
private onSessionMetadataUpdated?;
|
|
93
93
|
private onSessionTranscriptUpdated?;
|
|
94
|
+
private stopSessionTranscriptUpdates?;
|
|
94
95
|
private effectiveAppConfig;
|
|
95
96
|
constructor(bus: MessageBus, config: AgentServiceConfig);
|
|
96
97
|
private createSessionStore;
|
|
@@ -2,27 +2,27 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
5
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
5
6
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
6
7
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
7
8
|
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
8
9
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
9
10
|
import { configureTracing, flushTracing } from "../observability/runtime.js";
|
|
10
11
|
import { getUserTimezone } from "../user-model/repository.js";
|
|
11
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
12
12
|
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
13
13
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
14
14
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
15
15
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
16
16
|
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
17
|
+
import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
|
|
18
|
+
import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
|
|
17
19
|
import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
20
|
+
import "../user-model/index.js";
|
|
18
21
|
import { removeSkillsLockEntry } from "./skills/hub-lock.js";
|
|
19
22
|
import { installSkillFromZip } from "./skills/managed-store.js";
|
|
20
|
-
import "../user-model/index.js";
|
|
21
23
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
22
24
|
import { pullSkillFromSource } from "./skills/hub-pull.js";
|
|
23
25
|
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
24
|
-
import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
|
|
25
|
-
import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
|
|
26
26
|
import { drainEmbeddedSessionRunnerShutdowns } from "./embedded/session-runner.js";
|
|
27
27
|
import { resolveCompactionPolicy } from "./memory/compaction-policy.js";
|
|
28
28
|
import { getModelThinking } from "../providers/model-thinking.js";
|
|
@@ -165,6 +165,7 @@ var AgentService = class {
|
|
|
165
165
|
/** Gateway: notify UI after direct `SessionStore.updateMetadata` (no SessionManager emit). */
|
|
166
166
|
onSessionMetadataUpdated;
|
|
167
167
|
onSessionTranscriptUpdated;
|
|
168
|
+
stopSessionTranscriptUpdates;
|
|
168
169
|
effectiveAppConfig() {
|
|
169
170
|
const base = this.config.config;
|
|
170
171
|
return base ? applyConfigOverrides(base) : void 0;
|
|
@@ -183,7 +184,7 @@ var AgentService = class {
|
|
|
183
184
|
initializeCommands();
|
|
184
185
|
log.debug("Command system initialized");
|
|
185
186
|
this.sessionStore = config.sessionStore ?? this.createSessionStore();
|
|
186
|
-
onSessionTranscriptUpdate((update) => {
|
|
187
|
+
this.stopSessionTranscriptUpdates = onSessionTranscriptUpdate((update) => {
|
|
187
188
|
this.sessionStore.syncEmbeddedTranscriptUpdate(update).catch((err) => {
|
|
188
189
|
log.warn({
|
|
189
190
|
err,
|
|
@@ -890,6 +891,8 @@ var AgentService = class {
|
|
|
890
891
|
}
|
|
891
892
|
}
|
|
892
893
|
dispose() {
|
|
894
|
+
this.stopSessionTranscriptUpdates?.();
|
|
895
|
+
this.stopSessionTranscriptUpdates = void 0;
|
|
893
896
|
this.sessionStore.idleCompaction.dispose();
|
|
894
897
|
this.sessionTracker.dispose();
|
|
895
898
|
this.sessionState.disposeAll();
|
|
@@ -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 { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { init_paths } from "../../config/paths.js";
|
|
5
4
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
5
|
+
import { init_paths } from "../../config/paths.js";
|
|
6
6
|
import { findInstallSpec, hasBinary, installSkill } from "./installer.js";
|
|
7
7
|
import { applySkillEnvOverrides, createSkillConfigManager, getSkillEnvironment, isSkillEnabled, resolveSkillConfig, validateSkillConfig } from "./config.js";
|
|
8
8
|
import { parseSkillToolConditions } from "./skill-tool-gating.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
1
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
|
+
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
3
3
|
import { loadSkillsLock } from "./hub-lock.js";
|
|
4
4
|
import { dirname, join, resolve, sep } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
2
1
|
import { parseFrontmatter } from "../../markdown/frontmatter.js";
|
|
2
|
+
import { init_paths, resolveSkillsDir } from "../../config/paths.js";
|
|
3
3
|
import { resolveWorkspaceSkillsDir } from "./workspace-skills-dir.js";
|
|
4
4
|
import { formatScanSummary, scanSkillDirectory } from "./scanner.js";
|
|
5
5
|
import { fuzzyFindText, normalizeForFuzzyMatch, normalizeToLF, restoreLineEndings } from "../tools/edit-diff.js";
|
|
@@ -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";
|
|
@@ -21,6 +22,7 @@ import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embed
|
|
|
21
22
|
import { createPhoneUseTool } from "./phone-use-tool.js";
|
|
22
23
|
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
23
24
|
import { createPersonalAttentionTool } from "./personal-attention-tool.js";
|
|
25
|
+
import { createPersonalMemoryTool } from "./personal-memory-tool.js";
|
|
24
26
|
import { withCoreToolExposure } from "./toolExposure.js";
|
|
25
27
|
import { markCodemodeCoreRead } from "./codemode-permissions.js";
|
|
26
28
|
import "../../../packages/browser-control-contract/src/index.js";
|
|
@@ -59,7 +61,6 @@ import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
|
59
61
|
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
60
62
|
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
61
63
|
import "../../browser/index.js";
|
|
62
|
-
import { getActiveTranscriptUserText, getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
63
64
|
import { createDelegateTool } from "./delegate-tool.js";
|
|
64
65
|
import { createAutomationTool } from "./automation-tool.js";
|
|
65
66
|
import { createSkillViewTool, createSkillsListTool } from "./skills-tools.js";
|
|
@@ -74,6 +75,7 @@ import { createImageGenerateTool } from "./image-generate-tool.js";
|
|
|
74
75
|
import { createPersonalReadTool } from "./personal-read-tool.js";
|
|
75
76
|
import { createTaskCollaborationTool } from "./task-collaboration-tool.js";
|
|
76
77
|
import "./index.js";
|
|
78
|
+
import { canRecallConversation, canRecallHistoryEntry } from "../../session/history-recall-policy.js";
|
|
77
79
|
import { createPersonalResultTool } from "./personal-result-tool.js";
|
|
78
80
|
import { createPersonalTaskTool } from "./personal-task-tool.js";
|
|
79
81
|
import { withTaskEvidenceIdentity } from "./task-evidence.js";
|
|
@@ -566,6 +568,14 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
566
568
|
workspace,
|
|
567
569
|
getConfig: () => this.deps.getConfig?.()
|
|
568
570
|
})] : [],
|
|
571
|
+
...personalToolsConfigured ? [createPersonalMemoryTool({
|
|
572
|
+
getConversationId: currentConversationId,
|
|
573
|
+
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
574
|
+
getConfig: () => this.deps.getConfig?.(),
|
|
575
|
+
agentId: resolvedAgentId,
|
|
576
|
+
workspaceId: workspace,
|
|
577
|
+
getProjectId: currentProjectId
|
|
578
|
+
})] : [],
|
|
569
579
|
...personalToolsConfigured || allowed?.has("user_context_read") ? [createUserContextReadTool({
|
|
570
580
|
getCurrentUserText: () => currentConversationId() ? getActiveTranscriptUserText(currentConversationId()) : void 0,
|
|
571
581
|
agentId: resolvedAgentId,
|
|
@@ -659,6 +669,18 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
659
669
|
})] : [],
|
|
660
670
|
...this.deps.getSessionStore && getPrimary ? [createSessionSearchTool({
|
|
661
671
|
localOnly: personalToolsConfigured,
|
|
672
|
+
canRecallConversation: (id) => canRecallConversation(this.deps.getConfig?.(), {
|
|
673
|
+
agentId: resolvedAgentId,
|
|
674
|
+
workspaceId: workspace,
|
|
675
|
+
conversationId: currentConversationId() ?? "",
|
|
676
|
+
projectId: currentProjectId()
|
|
677
|
+
}, id),
|
|
678
|
+
canRecallEntry: (id, entryId, text) => canRecallHistoryEntry({
|
|
679
|
+
agentId: resolvedAgentId,
|
|
680
|
+
workspaceId: workspace,
|
|
681
|
+
conversationId: currentConversationId() ?? "",
|
|
682
|
+
projectId: currentProjectId()
|
|
683
|
+
}, id, entryId, text),
|
|
662
684
|
getHistoryContext: () => ({
|
|
663
685
|
agentId: resolvedAgentId,
|
|
664
686
|
workspaceId: workspace,
|
|
@@ -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";
|
|
@@ -4,6 +4,7 @@ import { getKnowledgeItem, searchKnowledgeItems, writeKnowledgeItem } from "../.
|
|
|
4
4
|
import "../../knowledge-memory/index.js";
|
|
5
5
|
import { projectForgottenEvidence } from "../../memory-learning/forgotten-history.js";
|
|
6
6
|
import "./local-read-budget.js";
|
|
7
|
+
import { memoryVersion } from "../../user-context/memory-version.js";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
9
|
//#region src/agent/tools/knowledge-memory-tool.ts
|
|
9
10
|
const SearchSchema = Type.Object({
|
|
@@ -70,6 +71,7 @@ function createKnowledgeSearchTool(options) {
|
|
|
70
71
|
limit: input.maxResults ?? 12
|
|
71
72
|
}).map((item) => ({
|
|
72
73
|
...item,
|
|
74
|
+
version: memoryVersion(item),
|
|
73
75
|
source: projectForgottenEvidence(item.source, visibility(options), options.getCurrentUserText?.(), [item.sourceConversationId, item.sourceTurnId].filter((ref) => !!ref))
|
|
74
76
|
}));
|
|
75
77
|
return {
|
|
@@ -107,10 +109,14 @@ function createKnowledgeGetTool(options) {
|
|
|
107
109
|
return visible ? {
|
|
108
110
|
content: [{
|
|
109
111
|
type: "text",
|
|
110
|
-
text: JSON.stringify(
|
|
112
|
+
text: JSON.stringify({
|
|
113
|
+
...projected,
|
|
114
|
+
version: memoryVersion(item)
|
|
115
|
+
}, null, 2)
|
|
111
116
|
}],
|
|
112
117
|
details: {
|
|
113
118
|
item: projected,
|
|
119
|
+
version: memoryVersion(item),
|
|
114
120
|
complete: true
|
|
115
121
|
}
|
|
116
122
|
} : {
|
|
@@ -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),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
|
+
import type { Config } from '../../config/schema.js';
|
|
3
|
+
/** Explicit owner mutations use the existing domain transactions and atomic operation receipts. */
|
|
4
|
+
export declare function createPersonalMemoryTool(deps: {
|
|
5
|
+
getConversationId: () => string | undefined;
|
|
6
|
+
getCurrentUserText: () => string | undefined;
|
|
7
|
+
getConfig: () => Config | undefined;
|
|
8
|
+
agentId: string;
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
getProjectId: () => string | undefined;
|
|
11
|
+
}): AgentTool;
|