@xopcai/xopc 0.0.451 → 0.0.455
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/eventEmitter2.js +40 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/index.js +56 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/shared/conout.js +16 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/terminal.js +190 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/unixTerminal.js +287 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/utils.js +49 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsConoutConnection.js +190 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsPtyAgent.js +265 -0
- package/dist/.pnpm/node-pty@1.1.0/node_modules/node-pty/lib/windowsTerminal.js +178 -0
- package/dist/_virtual/_rolldown/runtime.js +10 -2
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-OMq1GnqB.js → activity-store-DYwR1u3f.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CIoE-FJR.js → agent-avatar-dicebear-CsRBprL-.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-kPb6idGG.js → agent-avatar-display-DqFYHXCS.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-vKUDGEU6.js → agent-defaults-settings-panel-DOAJrMLe.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-x7guoCvz.js → agent-plugin-dialog-vqlN3ORH.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BbwFcl87.js → agents-BgHlOVRV.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-tXB8Aj5K.js → agents-admin-api-CKscfdvA.js} +1 -1
- package/dist/gateway/static/root/assets/api-CHM2c_Ah.js +1 -0
- package/dist/gateway/static/root/assets/{api-ixudT_21.js → api-DPNeNCmR.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-CdD448kS.js → app-link-DImAfVs5.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-nuDfyfZ5.js → app-management-settings-panel-Bhz6bj1C.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-D4oON26V.js → appearance-settings-BX32aogA.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BM1BfXzo.js → apps-page-0Yo3jBsQ.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-mKjfC6Sk.js → archive-plugin-Bha8obMe.js} +1 -1
- package/dist/gateway/static/root/assets/arrow-up-right-T72JbQ1Q.js +1 -0
- package/dist/gateway/static/root/assets/{automation-api-C9pjryrT.js → automation-api-mn8ihWJ_.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-uvg7Bi2x.js → automation-result-state-COzakzak.js} +1 -1
- package/dist/gateway/static/root/assets/automation-run-list-BhtaMpTb.js +1 -0
- package/dist/gateway/static/root/assets/{automation-task-card-CXGC8afU.js → automation-task-card-BY_k6iWp.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CwQg9dfM.js → automations-page-Dt_Z1UTT.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DhLgFY2T.js → automations-workspace-BhHgruhH.js} +2 -2
- package/dist/gateway/static/root/assets/{binary-plugins-BNPDM14i.js → binary-plugins-DUbrJFLU.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-De9UqmMT.js → block-editor-DW--pXAc.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-B0VB5umC.js → browser-settings-page-CDh6nxs9.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-Cp-rmFMM.js → capabilities-DKbXv8Ck.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BtJB4u5C.js → capabilities-kG175Q-7.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-D1wQ2sPI.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BW5jQz5R.js +8 -0
- package/dist/gateway/static/root/assets/capability-navigation-QtHJxxW2.js +1 -0
- package/dist/gateway/static/root/assets/{channels-ZJORx-he.js → channels-BzZp42yO.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-CtuEaDG8.js → chat-agents-api-UOdNWZ0_.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-ShPQBlNE.js → chat-chart-block-NSy-B0NS.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-dY6aCCRx.js +71 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CvDRfHAZ.js → chat-terminal-dock-CAaHWS7F.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-NJTvEF2b.js → command-palette-api-Dkn9bbYd.js} +1 -1
- package/dist/gateway/static/root/assets/composer-model-config-control-BrK8-SNz.js +1 -0
- package/dist/gateway/static/root/assets/{composer-notifications-BkezOy9Q.js → composer-notifications-B-kL3qAA.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-CEjJusbJ.js → composer-payload-handoff-DBE1mvOS.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DG8bcw_s.js → computer-settings-page-C9KdEecx.js} +1 -1
- package/dist/gateway/static/root/assets/{confirm-dialog-D7dQJytv.js → confirm-dialog-DrA5mTQp.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-f55PDAbb.js → connection-usage-guide-CiVpcbds.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Ca09FIBW.js → connector-service-page-B919cKSm.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-dai-YAdK.js → connectors-api-CgsSm-Av.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CEpfDCLA.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-C70ICT7u.js → date-picker-dx284jQI.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-Czj5fnsJ.js → date-time-picker-Dj-bhLNP.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Dq3OLpPg.js → desktop-pet-DlTuGzZ2.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-narrative-B7I1II0Z.js → desktop-pet-narrative-cBFIPXzR.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-q4mec6zt.js → desktop-pet-settings-CsmrvoxU.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-lXnKsRew.js → dev-view-store-BOxbj1ie.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CbUX0iit.js → device-pairing-wizard-CAqFIFRC.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BRnwhemd.js → directory-picker-path-field-BxEw5OrT.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-BnK6Ua7v.js → discussion-annotation-sync-CyntTwIa.js} +1 -1
- package/dist/gateway/static/root/assets/dist-CY7CS_D3.js +1 -0
- package/dist/gateway/static/root/assets/extension-authoritative-grants-C0ReZguU.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-Bp2BrJbB.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-tk93vJL_.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-CLZtAtqm.js +1 -0
- package/dist/gateway/static/root/assets/extension-provider-CbVokTvd.js +1 -0
- package/dist/gateway/static/root/assets/{extension-settings-page-BGcZIeHP.js → extension-settings-page-BM79cwUy.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-BK2_4mWy.js → file-preview-surface-z7_HV0WN.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DsXilOaJ.js → gateway-config-swr-OGhON-s6.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DopPmAMl.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-eozrXTm7.js → gateway-restart-DKAweWmg.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DddUli-p.js → gateway-settings-Dc7qUbG-.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DMQI0ATo.js → gateway-startup-retry-BaaoKBoB.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-D7hk1zTj.js → global-defaults-api-BIr3ApRj.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-C8oVgxQg.js → home-page-i_PIrDCU.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-BCbvDDH_.js → image-generation-api-C7D2IetZ.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-B9LF_2fO.js → imports-page-BjEdZJxZ.js} +1 -1
- package/dist/gateway/static/root/assets/index-Bj5exyow.css +1 -0
- package/dist/gateway/static/root/assets/index-CZI3VGGW.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-DT32t-66.js → install-connector-dialog-BsiyYQhx.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DDwoBK8g.js → keyboard-shortcuts-settings-CIthQ1lp.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CSCIHvZV.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-DeqzkJiF.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-qzxr3c8Y.js → local-apps-page-EntiM0tz.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-BU3FXj_X.js → local-session-drafts-XurtjR58.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DTUQ0JiK.js → locale-store-cg9cm2EL.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-rmS9VSem.js +2 -0
- package/dist/gateway/static/root/assets/{management-api-C6mCD0mZ.js → management-api-B6jVuJ6W.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-C4BKD-_b.js → management-settings-DdI9gs51.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DHjn1-ML.js → markdown-view-D1zBWkfB.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-ClgMvru5.js → mcp-conversation-setup-page-Bn49Ph1n.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-8E2KZQym.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-CJY9LRsl.js → model-selector-CL6WT-jw.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-BTs8jhgq.js → models-hub-cache-s0FMNhq9.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-DiCfpcZd.js → note-detail-panel-anM38aV6.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-DfK2KSgu.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-BnaeXy22.js → notes-api-CR75RHd0.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-B_vTBmyx.js → notes-page-BsZmT7Zw.js} +2 -2
- package/dist/gateway/static/root/assets/{oauth-api-BZ67vxsq.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-TpjRHhUt.js → page-context-capture-button-BPtX67hZ.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-BbUpxlgV.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-CZSnrSfc.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-BSCNuRMT.js +1 -0
- package/dist/gateway/static/root/assets/personal-profile-settings-DJRDcK2c.js +1 -0
- package/dist/gateway/static/root/assets/personal-settings-panel-C6p25Noq.js +1 -0
- package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +1 -0
- package/dist/gateway/static/root/assets/{phone-dependencies-card-ChRrViSc.js → phone-dependencies-card-DKkFFpqi.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-DmswEWqx.js → phone-model-connection-CRRHq4PQ.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-CvuOhQpk.js → phone-model-picker-CN_I0-46.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-2hZ68I47.js → phone-settings-page-CkdSOA7D.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-BMvxfZ3g.js → phone-workspace-store-CC61pIuJ.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-qvdi41L2.js → plugin-details-dialog-Bqz4jT53.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-RDatqlhG.js → preference-select-fields-DHeNbAvn.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-Bj9ZsasT.js → product-automation-feedback-BN2HTA9T.js} +1 -1
- package/dist/gateway/static/root/assets/{product-delivery-DRyD9_Xq.js → product-delivery-BFfqdKLe.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CzXmn2MX.js → product-open-page-B-j4gpLD.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-Beg0t4GW.js → product-preview-content-EqrTk7kU.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-5ulFfVzf.js → product-preview-modal-aurFBFq4.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-8bnYqXLJ.js → project-detail-page-ibZZ_w51.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-CXf7wjwt.js → project-understanding-HNK9lFVy.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CyA6fCPg.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-BZvpuPZT.js → recording-upload-DIwP541B.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-C_8-f85U.js → registry-api-BTd_OgbD.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Daxdjqs9.js → remote-access-hub-f5mIfsBF.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-khPb8zb8.js → resource-unavailable-DtQ2rfu_.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-anuckzRl.js +2 -0
- package/dist/gateway/static/root/assets/runtime-health-zDkHcOZO.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-2YumRxOJ.js → runtime-tools-api-C1iI8EPo.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DH00p-rI.js → runtime-tools-settings-panel-0tdI1z0g.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-wXf_ZlHq.js → service-recommendation-list-DSIe-NRe.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Dt7vRa-E.js → session-api-CQlEq0MB.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-C7RfUfqI.js +25 -0
- package/dist/gateway/static/root/assets/{sessions-page-CCcpMHIH.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-DRlQdj_w.js → settings-advanced-section-C6dPu5i1.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-BE6t--iO.js → settings-mode-store-BSiiowQa.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-_F2d9-GZ.js → settings-page-DAc5n-mM.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-DG3MQwSF.js → settings-page-header-BSMu5Zq3.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-SuMAUhMb.js → settings-page-layout-B_vMffB1.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-DyDiHKjZ.js → setup-interaction-page-DKXfFdNt.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CPNFWhrr.js → setup-status-panel-BbAZ9w77.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-wu-minYF.js → share-link-dialog-ztX1WPXG.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BqbfuQBU.js → share-preview-page-Ds2Ydfg6.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DwsEzRc6.js → shares-api-CSZqeNL4.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BxutiB6Y.js → shares-settings-CX3TNAmI.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-C7wPB73H.js → skill-api-CGzAQ-MX.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-C4AjzhlY.js → skill-list-api-DfUsku-x.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-CqfS9zlG.js → skill-reload-api-Y9qSMnBd.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-8VYadExR.js → skills-page-DnMN50Ot.js} +1 -1
- package/dist/gateway/static/root/assets/sliding-segmented-CgQ3BFdb.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-BV4GHnns.js → system-settings-panel-DWNkQmme.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-C9IyuxdS.js → task-detail-page-BJok6V1K.js} +3 -3
- package/dist/gateway/static/root/assets/{task-input-card-NtzzVc0e.js → task-input-card-lCMSy6YY.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-DWdJOGMn.js → terminal-panel-store-D8eZPvql.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-FNf-kdMR.js → theme-store-GZQ3pTgy.js} +1 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-DC8_9-Lo.js +2 -0
- package/dist/gateway/static/root/assets/{tracing-settings-page-BRPJuRpc.js → tracing-settings-page-DM3-7Hlw.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-B7NHNrQJ.js → tunnel-api-DOGAIXRR.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-bgCeO8bb.js → understanding-activity-store-CuPfe0eQ.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-CEhWIvsQ.js → understanding-refresh-store-Ihz2p9Vg.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-35YfpfVW.js → usage-page-BA9Yrvqu.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-D8Qtt_Tn.js → use-autosave-CO0IPCVg.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-H-tD4Db6.js → use-composer-attachments-CLIrD0mm.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-P-0xmST2.js → use-file-preview-expanded-dhNMHf5b.js} +3 -3
- package/dist/gateway/static/root/assets/{use-personal-profile-Bk2rGWSy.js → use-personal-profile-CVqDWBDS.js} +1 -1
- package/dist/gateway/static/root/assets/use-realtime-voice-DDVVlX1R.js +1 -0
- package/dist/gateway/static/root/assets/{use-workspace-tree-D0_812KH.js → use-workspace-tree-CZej8mhf.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-BxHnOljT.js → user-model-page-1eYattnk.js} +1 -1
- package/dist/gateway/static/root/assets/voice-CDlC6XMH.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BL56KGeq.js → voice-api-key-field-DpwUDAvu.js} +1 -1
- package/dist/gateway/static/root/assets/voice-call-context-BM2A4bLz.js +1 -0
- package/dist/gateway/static/root/assets/voice-config-api-GIuXoHXw.js +1 -0
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-BK-IvchL.js → voice-input-shortcut-events-Cc30ZcFy.js} +1 -1
- package/dist/gateway/static/root/assets/voice-settings-DA3m5MT0.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DDXae8Yc.js → work-discovery-overlay-yGUkk1NV.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CxN0abrd.js → work-discovery-page-RN6iuY-0.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-D3BUBFa0.js → working-directory-picker-modal-CeXl9w6z.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-B1Uirhxf.js +2 -0
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Nos5ebMv.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BKmtih6_.js → workspace-file-preview-dialog-D0h2yJ3v.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BdfKT4O4.js → workspace-open-location-menu-DWGNOIE2.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-BS_lsURY.js → xopc-cloud-account-card-x-XT4bKF.js} +1 -1
- package/dist/gateway/static/root/index.html +104 -100
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/extension-capabilities.js +91 -4
- package/dist/packages/gateway-contract/src/index.js +3 -1
- package/dist/packages/gateway-contract/src/local-app-delegation.js +25 -0
- package/dist/packages/gateway-contract/src/local-apps.js +35 -4
- package/dist/packages/realtime-protocol/src/voice.js +5 -0
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +12 -3
- package/dist/src/agent/background-review/prompts.js +2 -0
- package/dist/src/agent/background-review/run-background-review.js +13 -7
- 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/execution-context.js +1 -1
- package/dist/src/agent/context/project-context.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +1 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +17 -6
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +66 -9
- package/dist/src/agent/embedded/run-turn.js +109 -15
- package/dist/src/agent/embedded/runs.d.ts +3 -0
- package/dist/src/agent/embedded/runs.js +21 -1
- package/dist/src/agent/embedded/session-runner.js +2 -2
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
- 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/prompt/system-prompt.js +7 -6
- package/dist/src/agent/prompt/types.d.ts +2 -1
- package/dist/src/agent/prompt/voice-history.d.ts +9 -0
- package/dist/src/agent/prompt/voice-history.js +35 -0
- package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
- package/dist/src/agent/prompt/voice-presentation.js +1 -0
- package/dist/src/agent/sandbox/native-command.d.ts +15 -0
- package/dist/src/agent/sandbox/native-command.js +65 -0
- package/dist/src/agent/service/btw-query.d.ts +1 -0
- package/dist/src/agent/service/btw-query.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -2
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.js +3 -3
- 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/tasks/task-judge-service.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 +2 -2
- package/dist/src/agent/tools/image-generate-tool.js +5 -1
- package/dist/src/agent/tools/index.js +1 -1
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +16 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +3 -1
- package/dist/src/agent/tools/publish-artifacts.js +1 -1
- package/dist/src/agent/tools/read.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/agent/tools/task-evidence.js +6 -15
- package/dist/src/agent/tools/task-result-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +9 -8
- package/dist/src/agent-config/schema.d.ts +15 -0
- package/dist/src/automations/capabilities/drafts.js +5 -1
- package/dist/src/automations/capabilities/read.js +58 -8
- package/dist/src/automations/capabilities/write.js +53 -0
- package/dist/src/automations/delivery/delivery-router.js +3 -1
- package/dist/src/automations/run-changes.d.ts +2 -0
- package/dist/src/automations/run-changes.js +18 -0
- package/dist/src/automations/service/automation-service.d.ts +2 -9
- package/dist/src/automations/service/automation-service.js +3 -2
- package/dist/src/automations/storage/automation-run-repository.d.ts +5 -0
- package/dist/src/automations/storage/automation-run-repository.js +15 -1
- package/dist/src/capabilities/runtime/dispatcher.d.ts +12 -0
- package/dist/src/capabilities/runtime/dispatcher.js +22 -6
- package/dist/src/capabilities/runtime/product.d.ts +2 -0
- package/dist/src/capabilities/runtime/product.js +28 -6
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
- package/dist/src/chat-commands/types.d.ts +2 -0
- package/dist/src/cli/commands/tui-runner.d.ts +1 -1
- package/dist/src/cli/commands/tui-runner.js +1 -0
- package/dist/src/cli/commands/tui.js +1 -1
- package/dist/src/computer/evaluation-comparison.d.ts +4 -0
- package/dist/src/computer/evaluation-comparison.js +16 -1
- package/dist/src/computer/keyboard.js +1 -1
- package/dist/src/computer/model-adapter.js +18 -14
- package/dist/src/config/schema.d.ts +37 -3
- package/dist/src/config/schema.js +23 -5
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/safe-voice-config.js +4 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +204 -12
- package/dist/src/gateway/hono/routes/lazy-bundles.js +18 -2
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +27 -6
- package/dist/src/gateway/hono/routes/local-app-development.d.ts +3 -0
- package/dist/src/gateway/hono/routes/local-app-development.js +13 -0
- package/dist/src/gateway/hono/routes/local-app-previews.d.ts +3 -0
- package/dist/src/gateway/hono/routes/local-app-previews.js +86 -0
- 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/local-apps.js +3 -2
- package/dist/src/gateway/hono/routes/projects.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 +2 -2
- package/dist/src/gateway/hono/routes/voice.js +4 -3
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +1 -1
- package/dist/src/gateway/security/local-app-delegation-access.d.ts +5 -0
- package/dist/src/gateway/security/local-app-delegation-access.js +22 -0
- package/dist/src/gateway/service/agent-runner.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -3
- package/dist/src/gateway/service/run-gateway-agent.js +7 -6
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/session-input-coordinator.js +6 -2
- 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 +50 -17
- package/dist/src/gateway/session-reset-service.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.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/local-apps/access-audit.d.ts +17 -0
- package/dist/src/local-apps/access-audit.js +42 -0
- package/dist/src/local-apps/automation-proposals.d.ts +754 -0
- package/dist/src/local-apps/automation-proposals.js +185 -0
- package/dist/src/local-apps/capabilities/automation-policy.d.ts +7 -0
- package/dist/src/local-apps/capabilities/automation-policy.js +46 -0
- package/dist/src/local-apps/capabilities/contracts.js +25 -0
- package/dist/src/local-apps/capabilities/delegate.d.ts +3 -0
- package/dist/src/local-apps/capabilities/delegate.js +183 -0
- package/dist/src/local-apps/capabilities/projections.d.ts +853 -0
- package/dist/src/local-apps/capabilities/projections.js +186 -0
- package/dist/src/local-apps/capabilities/resource-policy.d.ts +3 -0
- package/dist/src/local-apps/capabilities/resource-policy.js +119 -0
- package/dist/src/local-apps/capabilities/runtime.d.ts +2 -1
- package/dist/src/local-apps/capabilities/runtime.js +109 -39
- 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/fix-guidance.js +4 -1
- 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-fixtures.d.ts +20 -0
- package/dist/src/local-apps/preview-fixtures.js +52 -0
- package/dist/src/local-apps/preview-runtime-bridge.d.ts +1 -1
- package/dist/src/local-apps/preview-runtime-bridge.js +41 -18
- package/dist/src/local-apps/preview-sessions.d.ts +52 -0
- package/dist/src/local-apps/preview-sessions.js +316 -0
- package/dist/src/local-apps/preview-worker.d.ts +1 -0
- package/dist/src/local-apps/preview-worker.js +117 -0
- package/dist/src/local-apps/public-assets.d.ts +2 -0
- package/dist/src/local-apps/public-assets.js +42 -0
- package/dist/src/local-apps/scaffold.js +1 -1
- package/dist/src/local-apps/service.d.ts +128 -5
- package/dist/src/local-apps/service.js +153 -15
- package/dist/src/local-apps/store.d.ts +3 -0
- package/dist/src/local-apps/store.js +42 -16
- package/dist/src/local-apps/types.d.ts +2 -0
- package/dist/src/memory-learning/repository.js +3 -2
- package/dist/src/memory-learning/service.js +4 -13
- package/dist/src/memory-learning/transcript-source.d.ts +9 -0
- package/dist/src/memory-learning/transcript-source.js +31 -0
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/capabilities/read.js +11 -2
- package/dist/src/notes/capabilities/write.js +10 -1
- package/dist/src/notes/types.d.ts +2 -0
- package/dist/src/personal-agent/communication.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +3 -1
- package/dist/src/personal-agent/prompt-context.js +15 -23
- package/dist/src/personal-agent/prompts.js +3 -2
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/request-access.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-service.js +2 -2
- package/dist/src/personal-agent/service.js +1 -0
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/phone/contracts.d.ts +1 -1
- package/dist/src/phone/model-adapter.d.ts +1 -1
- package/dist/src/phone/runtime.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +3 -3
- package/dist/src/process/fork-worker.d.ts +2 -0
- package/dist/src/process/fork-worker.js +7 -0
- 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/realtime/broker.js +1 -1
- package/dist/src/review/review-git.js +14 -1
- package/dist/src/session/client-history.js +12 -1
- package/dist/src/session/session-context-for-llm.js +10 -3
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/session/store.js +2 -1
- package/dist/src/session/stored-rows-to-file-entries.js +1 -1
- package/dist/src/session/transcript-outline.js +9 -0
- package/dist/src/session/voice-transcript.d.ts +14 -0
- package/dist/src/session/voice-transcript.js +19 -2
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/notes-repository.js +7 -0
- package/dist/src/storage/sqlite/resource-scope.d.ts +10 -0
- package/dist/src/storage/sqlite/resource-scope.js +31 -0
- package/dist/src/storage/sqlite/transcript-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/transcript-repository.js +43 -7
- package/dist/src/tasks/capabilities/management.js +3 -0
- package/dist/src/tasks/capabilities/read.js +21 -3
- package/dist/src/tasks/capabilities/write.js +11 -2
- package/dist/src/tasks/index.js +1 -1
- package/dist/src/tasks/task-allocation-service.js +1 -1
- package/dist/src/tasks/task-application-service.js +3 -3
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-evidence-tools.d.ts +2 -0
- package/dist/src/tasks/task-evidence-tools.js +22 -0
- package/dist/src/tasks/task-main-update-delivery.js +2 -0
- package/dist/src/tasks/task-repository.d.ts +2 -0
- package/dist/src/tasks/task-repository.js +7 -0
- package/dist/src/tasks/task-research-result.js +8 -21
- package/dist/src/tasks/task-result-delivery-repository.d.ts +6 -0
- package/dist/src/tasks/task-result-delivery-repository.js +26 -0
- package/dist/src/tasks/task-result-delivery-service.js +3 -3
- package/dist/src/tasks/task-run-coordinator.js +1 -1
- package/dist/src/tui/backend-services.d.ts +14 -0
- package/dist/src/tui/backend-services.js +67 -0
- package/dist/src/tui/backends/embedded-backend.d.ts +48 -4
- package/dist/src/tui/backends/embedded-backend.js +248 -42
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +46 -2
- package/dist/src/tui/backends/gateway-realtime-backend.js +205 -62
- package/dist/src/tui/components/chat-log.d.ts +1 -0
- package/dist/src/tui/components/chat-log.js +11 -5
- package/dist/src/tui/components/scoped-models-selector.js +1 -1
- package/dist/src/tui/components/session-selector.js +1 -1
- package/dist/src/tui/components/text-viewer.d.ts +32 -0
- package/dist/src/tui/components/text-viewer.js +132 -0
- package/dist/src/tui/components/tui-bottom-bar.js +3 -0
- package/dist/src/tui/extension-host/autocomplete.js +9 -1
- package/dist/src/tui/extension-host/runtime.d.ts +1 -0
- package/dist/src/tui/extension-host/runtime.js +1 -0
- package/dist/src/tui/tui-backend.d.ts +36 -3
- package/dist/src/tui/tui-capabilities.d.ts +15 -0
- package/dist/src/tui/tui-capabilities.js +46 -0
- package/dist/src/tui/tui-capability-controls.d.ts +9 -0
- package/dist/src/tui/tui-capability-controls.js +250 -0
- package/dist/src/tui/tui-clarification.d.ts +15 -0
- package/dist/src/tui/tui-clarification.js +91 -0
- package/dist/src/tui/tui-command-formatters.d.ts +0 -4
- package/dist/src/tui/tui-command-formatters.js +3 -43
- package/dist/src/tui/tui-commands.d.ts +4 -4
- package/dist/src/tui/tui-commands.js +219 -127
- package/dist/src/tui/tui-control-commands.d.ts +12 -0
- package/dist/src/tui/tui-control-commands.js +127 -0
- package/dist/src/tui/tui-image-files.d.ts +2 -0
- package/dist/src/tui/tui-image-files.js +47 -0
- package/dist/src/tui/tui-local-shell.d.ts +6 -0
- package/dist/src/tui/tui-local-shell.js +36 -2
- package/dist/src/tui/tui-management.d.ts +114 -0
- package/dist/src/tui/tui-management.js +233 -0
- package/dist/src/tui/tui-picker-overlay.d.ts +1 -6
- package/dist/src/tui/tui-picker-overlay.js +1 -62
- package/dist/src/tui/tui-session-actions.d.ts +1 -0
- package/dist/src/tui/tui-session-actions.js +97 -29
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui-side-chat.d.ts +10 -0
- package/dist/src/tui/tui-side-chat.js +56 -0
- package/dist/src/tui/tui-terminal.d.ts +3 -0
- package/dist/src/tui/tui-terminal.js +52 -0
- package/dist/src/tui/tui-types.d.ts +4 -1
- package/dist/src/tui/tui.js +422 -211
- package/dist/src/tui/xopc-tui-keybindings.d.ts +29 -9
- package/dist/src/tui/xopc-tui-keybindings.js +27 -7
- package/dist/src/usage/recorder.js +2 -0
- package/dist/src/usage/scenario-registry.js +5 -0
- package/dist/src/user-model/index.js +3 -3
- package/dist/src/user-model/profile.d.ts +8 -0
- package/dist/src/user-model/profile.js +19 -1
- package/dist/src/voice/platform-settings.d.ts +5 -0
- package/dist/src/voice/platform-settings.js +15 -2
- package/dist/src/voice/platform-streams.d.ts +7 -3
- package/dist/src/voice/platform-streams.js +90 -18
- package/dist/src/voice/realtime/agentBroker.d.ts +12 -1
- package/dist/src/voice/realtime/agentBroker.js +22 -5
- package/dist/src/voice/realtime/agentEngine.js +104 -12
- package/dist/src/voice/realtime/chat-publication.d.ts +24 -0
- package/dist/src/voice/realtime/chat-publication.js +61 -0
- package/dist/src/voice/realtime/conversation-context.d.ts +7 -1
- package/dist/src/voice/realtime/conversation-context.js +54 -16
- package/dist/src/voice/realtime/engine.d.ts +2 -0
- package/dist/src/voice/realtime/identity-grounding.d.ts +8 -0
- package/dist/src/voice/realtime/identity-grounding.js +34 -0
- package/dist/src/voice/realtime/memory-context.js +48 -14
- package/dist/src/voice/realtime/naturalAgentTools.d.ts +90 -0
- package/dist/src/voice/realtime/naturalAgentTools.js +275 -0
- package/dist/src/voice/realtime/omniEngine.d.ts +8 -0
- package/dist/src/voice/realtime/omniEngine.js +239 -13
- package/dist/src/voice/realtime/omniRoute.d.ts +1 -0
- package/dist/src/voice/realtime/omniRoute.js +23 -4
- package/dist/src/voice/realtime/runtime.d.ts +1 -0
- package/dist/src/voice/realtime/runtime.js +116 -22
- package/dist/src/voice/realtime/runtime.types.d.ts +3 -1
- package/dist/src/voice/realtime/speakable-segmenter.d.ts +2 -1
- package/dist/src/voice/realtime/speakable-segmenter.js +7 -2
- package/dist/src/voice/realtime/turnPolicy.d.ts +1 -2
- package/dist/src/voice/realtime/turnPolicy.js +4 -6
- package/dist/src/voice/realtime/user-context.d.ts +14 -0
- package/dist/src/voice/realtime/user-context.js +63 -0
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +29 -23
- package/dist/src/voice/tts/speak-core.js +1 -0
- package/dist/src/voice/tts/speech-provider-types.d.ts +2 -0
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +3 -1
- package/skills/engineering/build-xopc-local-app/SKILL.md +5 -1
- package/skills/engineering/build-xopc-local-app/references/app-contract.md +43 -2
- package/dist/gateway/static/root/assets/api-DIKAjDAK.js +0 -1
- package/dist/gateway/static/root/assets/automation-run-list-J-R4-hVm.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-KRaK8LKT.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-aJy-1o5H.js +0 -8
- package/dist/gateway/static/root/assets/chat-page-QmBfel_Z.js +0 -71
- package/dist/gateway/static/root/assets/clipboard-copy-DuJk5WD6.js +0 -1
- package/dist/gateway/static/root/assets/connected-providers-grid-BWVieU6P.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-C8M01Zxs.js +0 -1
- package/dist/gateway/static/root/assets/dist-BGTk37IG.js +0 -1
- package/dist/gateway/static/root/assets/extension-iframe-host-DjXDDmUd.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-CGgneUDY.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-BktGTwH_.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-ZxMFPH4n.js +0 -1
- package/dist/gateway/static/root/assets/index-CPXKrqLj.js +0 -11
- package/dist/gateway/static/root/assets/index-Dc-3QQaz.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CnckB-RA.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-Ck6kACsY.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-_nIEwZn4.js +0 -2
- package/dist/gateway/static/root/assets/messages-C7ruaWtK.js +0 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-kccIXJo_.js +0 -1
- package/dist/gateway/static/root/assets/oauth-provider-connect-CZP15znW.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-CFntbsPj.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-CVocefDp.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-BjnSgU89.js +0 -1
- package/dist/gateway/static/root/assets/personal-proactivity-DaRnbB1f.js +0 -1
- package/dist/gateway/static/root/assets/personal-settings-panel-CdMHSPCH.js +0 -1
- package/dist/gateway/static/root/assets/providers-api-DE7kdeXc.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-DGMUu3pm.js +0 -2
- package/dist/gateway/static/root/assets/runtime-health-D2TDFLLq.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-5qokJQ6W.js +0 -25
- package/dist/gateway/static/root/assets/settings-advanced-gate-B7-XQiJh.js +0 -1
- package/dist/gateway/static/root/assets/sliding-segmented-D346J92k.js +0 -1
- package/dist/gateway/static/root/assets/tool-friendly-title-YQmN1S2k.js +0 -2
- package/dist/gateway/static/root/assets/use-realtime-voice-BcokfdI0.js +0 -1
- package/dist/gateway/static/root/assets/voice-C607F0pB.js +0 -1
- package/dist/gateway/static/root/assets/voice-call-context-CJ1ZiJWR.js +0 -1
- package/dist/gateway/static/root/assets/voice-config-api-DVFTuHwH.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-ymncGc6j.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-BQrMvAkL.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { closeXopcDatabase, openXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
|
+
import { ExtensionCapabilityBindingsSchema, LocalAppResourceScopesSchema } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
3
|
+
import { CapabilityCallSchema } from "../../packages/gateway-contract/src/capabilities.js";
|
|
4
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
+
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
6
|
+
import { upsertNoteRecord } from "../storage/sqlite/notes-repository.js";
|
|
7
|
+
import "../storage/sqlite/index.js";
|
|
8
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
9
|
+
import "../capabilities/runtime/dispatcher.js";
|
|
10
|
+
import { NotesService } from "../notes/service.js";
|
|
11
|
+
import { localAppResourceAllowed } from "./capabilities/resource-policy.js";
|
|
12
|
+
import { ProjectService } from "../projects/project-service.js";
|
|
13
|
+
import { PreviewFixturesSchema } from "./preview-fixtures.js";
|
|
14
|
+
import { createProductDispatcher } from "../capabilities/runtime/product.js";
|
|
15
|
+
import { basename, dirname, join } from "node:path";
|
|
16
|
+
import { rmSync } from "node:fs";
|
|
17
|
+
//#region src/local-apps/preview-worker.ts
|
|
18
|
+
/** Host-owned worker. Generated application code is never loaded into this process. */
|
|
19
|
+
init_task_repository();
|
|
20
|
+
init_src();
|
|
21
|
+
var PreviewNotesService = class extends NotesService {
|
|
22
|
+
flushCommittedEffects() {}
|
|
23
|
+
};
|
|
24
|
+
var PreviewProjectService = class extends ProjectService {
|
|
25
|
+
flushCommittedEffects() {}
|
|
26
|
+
};
|
|
27
|
+
if (process.send && process.env.XOPC_LOCAL_APP_PREVIEW_WORKER === "1") {
|
|
28
|
+
const directory = process.env.XOPC_STATE_DIR;
|
|
29
|
+
if (!directory || !/^run-[A-Za-z0-9_-]+$/.test(basename(directory)) || basename(dirname(directory)) !== "preview-runs" || basename(dirname(dirname(directory))) !== "local-apps") throw new Error("Invalid isolated preview directory");
|
|
30
|
+
let dispatcher;
|
|
31
|
+
let context;
|
|
32
|
+
let busy = false;
|
|
33
|
+
let initialized = false;
|
|
34
|
+
const close = () => {
|
|
35
|
+
closeXopcDatabase();
|
|
36
|
+
rmSync(directory, {
|
|
37
|
+
recursive: true,
|
|
38
|
+
force: true
|
|
39
|
+
});
|
|
40
|
+
process.exit(0);
|
|
41
|
+
};
|
|
42
|
+
process.on("disconnect", close);
|
|
43
|
+
process.on("SIGTERM", close);
|
|
44
|
+
process.on("message", async (message) => {
|
|
45
|
+
try {
|
|
46
|
+
if (busy) throw new CapabilityError("UNAVAILABLE", "Preview worker is busy");
|
|
47
|
+
busy = true;
|
|
48
|
+
if (message.type === "init" && !initialized) {
|
|
49
|
+
const fixtures = PreviewFixturesSchema.parse(message.fixtures);
|
|
50
|
+
const bindings = ExtensionCapabilityBindingsSchema.parse(message.bindings);
|
|
51
|
+
openXopcDatabase({ path: join(directory, "xopc.db") });
|
|
52
|
+
const now = Date.now();
|
|
53
|
+
for (const note of fixtures.notes) upsertNoteRecord({
|
|
54
|
+
...note,
|
|
55
|
+
kind: "thought",
|
|
56
|
+
status: "inbox",
|
|
57
|
+
createdAt: now,
|
|
58
|
+
updatedAt: now,
|
|
59
|
+
localVersion: 1,
|
|
60
|
+
remoteVersion: 1,
|
|
61
|
+
capturedVia: { channel: "web" }
|
|
62
|
+
});
|
|
63
|
+
for (const task of fixtures.tasks) new TaskRepository().create({
|
|
64
|
+
...task,
|
|
65
|
+
objective: task.title
|
|
66
|
+
});
|
|
67
|
+
const notes = new PreviewNotesService();
|
|
68
|
+
const projects = new PreviewProjectService();
|
|
69
|
+
projects.create({ name: "Example project" });
|
|
70
|
+
dispatcher = createProductDispatcher(() => notes, { getProjects: () => projects });
|
|
71
|
+
context = {
|
|
72
|
+
principalId: "isolated-preview",
|
|
73
|
+
surface: "extension",
|
|
74
|
+
scopes: ["gateway.admin"],
|
|
75
|
+
allowedCapabilities: bindings.map((binding) => binding.id),
|
|
76
|
+
authorize: (id, input) => localAppResourceAllowed("isolated-preview", context.localApp.resourceScopes, id, input),
|
|
77
|
+
localApp: {
|
|
78
|
+
extensionId: "isolated-preview",
|
|
79
|
+
resourceScopes: LocalAppResourceScopesSchema.parse({
|
|
80
|
+
notesRead: { mode: "workspace" },
|
|
81
|
+
notesWrite: { mode: "workspace" },
|
|
82
|
+
tasksRead: { mode: "workspace" },
|
|
83
|
+
tasksWrite: { mode: "workspace" },
|
|
84
|
+
projectsRead: { mode: "workspace" },
|
|
85
|
+
projectsWrite: { mode: "workspace" }
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
initialized = true;
|
|
90
|
+
process.send?.({
|
|
91
|
+
requestId: message.requestId,
|
|
92
|
+
data: { ready: true }
|
|
93
|
+
});
|
|
94
|
+
} else if (message.type === "call" && initialized) {
|
|
95
|
+
const call = CapabilityCallSchema.parse(message.call);
|
|
96
|
+
const data = await dispatcher.call(message.id, call.input, context, call);
|
|
97
|
+
process.send?.({
|
|
98
|
+
requestId: message.requestId,
|
|
99
|
+
data
|
|
100
|
+
});
|
|
101
|
+
} else throw new CapabilityError("INVALID_INPUT", "Invalid preview worker request");
|
|
102
|
+
} catch (error) {
|
|
103
|
+
process.send?.({
|
|
104
|
+
requestId: message.requestId,
|
|
105
|
+
error: {
|
|
106
|
+
code: error instanceof CapabilityError ? error.code : "INTERNAL",
|
|
107
|
+
message: error instanceof CapabilityError ? error.message : "Isolated preview operation failed",
|
|
108
|
+
diagnostic: error instanceof CapabilityError ? void 0 : error instanceof Error ? error.stack?.slice(0, 2e3) : String(error).slice(0, 500)
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
} finally {
|
|
112
|
+
busy = false;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
2
|
+
import { localAppFileHashes } from "./artifact-files.js";
|
|
3
|
+
import { extname, posix, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
//#region src/local-apps/public-assets.ts
|
|
7
|
+
const PUBLIC_TYPES = new Set([
|
|
8
|
+
".html",
|
|
9
|
+
".js",
|
|
10
|
+
".mjs",
|
|
11
|
+
".css",
|
|
12
|
+
".json",
|
|
13
|
+
".svg",
|
|
14
|
+
".png",
|
|
15
|
+
".jpg",
|
|
16
|
+
".jpeg",
|
|
17
|
+
".gif",
|
|
18
|
+
".webp",
|
|
19
|
+
".ico",
|
|
20
|
+
".woff",
|
|
21
|
+
".woff2",
|
|
22
|
+
".ttf"
|
|
23
|
+
]);
|
|
24
|
+
function recordPublicAssets(appId, sourceHash, root, entrypoint) {
|
|
25
|
+
const uiDir = posix.dirname(entrypoint.replaceAll("\\", "/"));
|
|
26
|
+
if (uiDir === "." || uiDir.split(/[\\/]/).some((part) => part.startsWith("."))) throw new Error("Local app UI must use a dedicated public directory");
|
|
27
|
+
const assets = Object.fromEntries([...localAppFileHashes(root)].map(([path, hash]) => [path.split(sep).join("/"), hash]).filter(([path]) => path.startsWith(`${uiDir}/`) && !path.split("/").some((part) => part.startsWith(".")) && PUBLIC_TYPES.has(extname(path).toLowerCase())));
|
|
28
|
+
new DurableState("local-app-public-assets", appId).set(sourceHash, assets);
|
|
29
|
+
}
|
|
30
|
+
function resolvePublicAsset(appId, sourceHash, root, path) {
|
|
31
|
+
const assets = new DurableState("local-app-public-assets", appId).get(sourceHash);
|
|
32
|
+
if (!assets || !Object.hasOwn(assets, path)) return null;
|
|
33
|
+
const target = resolve(root, path);
|
|
34
|
+
if (!existsSync(target)) return null;
|
|
35
|
+
const real = realpathSync(target);
|
|
36
|
+
const rel = relative(realpathSync(root), real);
|
|
37
|
+
if (rel.startsWith("..") || rel === "" || !statSync(real).isFile()) return null;
|
|
38
|
+
if (createHash("sha256").update(readFileSync(real)).digest("hex") !== assets[path]) return null;
|
|
39
|
+
return real;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { recordPublicAssets, resolvePublicAsset };
|
|
@@ -51,7 +51,7 @@ function scaffoldLocalApp(input) {
|
|
|
51
51
|
type: "module"
|
|
52
52
|
}, null, 2)}\n`);
|
|
53
53
|
writeText(workspaceRoot, LOCAL_APP_RUNTIME_ENTRY, LOCAL_APP_RUNTIME_SOURCE);
|
|
54
|
-
writeText(workspaceRoot, "APP_BRIEF.md", `# ${name}\n\n${idea}\n\n## Product constraints\n\n- Keep the app local to this XOPC installation.\n- Preserve the extension id: \`${extensionId}\`.\n- Phase 1 is UI-only. Use only the
|
|
54
|
+
writeText(workspaceRoot, "APP_BRIEF.md", `# ${name}\n\n${idea}\n\n## Product constraints\n\n- Keep the app local to this XOPC installation.\n- Preserve the extension id: \`${extensionId}\`.\n- Phase 1 is UI-only. Use declared UI permissions and explicitly approved host capability bindings only. Data access defaults to none; the user reviews resource scopes in the host.\n- Do not edit the manifest \`main\` field or \`${LOCAL_APP_RUNTIME_ENTRY}\`; xopc owns the trusted runtime entry.\n- Use the bundled extension UI SDK client.storage for app data; browser localStorage/sessionStorage are unavailable in the opaque-origin sandbox.\n- Native form submission is blocked: use type="button" actions and explicit Enter handlers.\n- Keep critical user journeys in \`.xopc/acceptance.json\`. Target only elements marked with \`data-xopc-test-id\`.\n- Run the local-app validation script before asking the user to install an update.\n`);
|
|
55
55
|
writeText(workspaceRoot, ".xopc/app.json", `${JSON.stringify({
|
|
56
56
|
schemaVersion: 1,
|
|
57
57
|
extensionId,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type LocalAppPreviewSnapshot } from '@xopcai/gateway-contract';
|
|
1
|
+
import { type LocalAppResourceScopes, type LocalAppPreviewSnapshot } from '@xopcai/gateway-contract';
|
|
2
|
+
import { LocalAppPreviewSessions } from './preview-sessions.js';
|
|
2
3
|
import type { Config } from '../config/schema.js';
|
|
3
4
|
import type { ExtensionLoader } from '../extensions/index.js';
|
|
4
5
|
import type { ProjectService } from '../projects/index.js';
|
|
@@ -24,6 +25,7 @@ export declare class LocalAppService {
|
|
|
24
25
|
private readonly options;
|
|
25
26
|
private readonly store;
|
|
26
27
|
private readonly snapshots;
|
|
28
|
+
readonly previews: LocalAppPreviewSessions;
|
|
27
29
|
constructor(options: LocalAppServiceOptions, store?: LocalAppStore, snapshots?: LocalAppSnapshotStore);
|
|
28
30
|
private recoveryRoot;
|
|
29
31
|
private recoveryMarker;
|
|
@@ -32,18 +34,139 @@ export declare class LocalAppService {
|
|
|
32
34
|
private recoverReleases;
|
|
33
35
|
private mutateRelease;
|
|
34
36
|
list(): LocalApp[];
|
|
37
|
+
private previewSource;
|
|
38
|
+
isLocalApp(extensionId: string): boolean;
|
|
39
|
+
resolveUiAsset(extensionId: string, assetPath: string): string | null | undefined;
|
|
35
40
|
get(id: string): LocalAppDetail | null;
|
|
36
41
|
getUiGrant(extensionId: string): LocalAppUiGrant;
|
|
37
|
-
getCapabilityAccess(extensionId: string, expectedManifestDigest: string): {
|
|
42
|
+
getCapabilityAccess(extensionId: string, expectedManifestDigest: string, expectedGrantRevision?: string): {
|
|
38
43
|
releaseId: string;
|
|
44
|
+
grantRevision: string;
|
|
45
|
+
resourceScopes: {
|
|
46
|
+
notesRead: {
|
|
47
|
+
mode: "none";
|
|
48
|
+
} | {
|
|
49
|
+
mode: "workspace";
|
|
50
|
+
} | {
|
|
51
|
+
mode: "selected";
|
|
52
|
+
ids: string[];
|
|
53
|
+
projectIds: string[];
|
|
54
|
+
includeCreated: boolean;
|
|
55
|
+
};
|
|
56
|
+
notesWrite: {
|
|
57
|
+
mode: "none";
|
|
58
|
+
} | {
|
|
59
|
+
mode: "workspace";
|
|
60
|
+
} | {
|
|
61
|
+
mode: "selected";
|
|
62
|
+
ids: string[];
|
|
63
|
+
projectIds: string[];
|
|
64
|
+
includeCreated: boolean;
|
|
65
|
+
};
|
|
66
|
+
tasksRead: {
|
|
67
|
+
mode: "none";
|
|
68
|
+
} | {
|
|
69
|
+
mode: "workspace";
|
|
70
|
+
} | {
|
|
71
|
+
mode: "selected";
|
|
72
|
+
ids: string[];
|
|
73
|
+
projectIds: string[];
|
|
74
|
+
includeCreated: boolean;
|
|
75
|
+
};
|
|
76
|
+
tasksWrite: {
|
|
77
|
+
mode: "none";
|
|
78
|
+
} | {
|
|
79
|
+
mode: "workspace";
|
|
80
|
+
} | {
|
|
81
|
+
mode: "selected";
|
|
82
|
+
ids: string[];
|
|
83
|
+
projectIds: string[];
|
|
84
|
+
includeCreated: boolean;
|
|
85
|
+
};
|
|
86
|
+
projectsRead: {
|
|
87
|
+
mode: "none";
|
|
88
|
+
} | {
|
|
89
|
+
mode: "workspace";
|
|
90
|
+
} | {
|
|
91
|
+
mode: "selected";
|
|
92
|
+
ids: string[];
|
|
93
|
+
projectIds: string[];
|
|
94
|
+
includeCreated: boolean;
|
|
95
|
+
};
|
|
96
|
+
projectsWrite: {
|
|
97
|
+
mode: "none";
|
|
98
|
+
} | {
|
|
99
|
+
mode: "workspace";
|
|
100
|
+
} | {
|
|
101
|
+
mode: "selected";
|
|
102
|
+
ids: string[];
|
|
103
|
+
projectIds: string[];
|
|
104
|
+
includeCreated: boolean;
|
|
105
|
+
};
|
|
106
|
+
filesRead: {
|
|
107
|
+
mode: "none";
|
|
108
|
+
} | {
|
|
109
|
+
mode: "selected";
|
|
110
|
+
ids: string[];
|
|
111
|
+
};
|
|
112
|
+
filesExport: boolean;
|
|
113
|
+
filesImport: boolean;
|
|
114
|
+
connectors: {
|
|
115
|
+
mode: "none";
|
|
116
|
+
} | {
|
|
117
|
+
mode: "selected";
|
|
118
|
+
bindings: {
|
|
119
|
+
toolRef: string;
|
|
120
|
+
connectorId: string;
|
|
121
|
+
accountId: string;
|
|
122
|
+
connectionId: string;
|
|
123
|
+
revision: string;
|
|
124
|
+
scope: "read" | "write";
|
|
125
|
+
}[];
|
|
126
|
+
};
|
|
127
|
+
automationsRead: {
|
|
128
|
+
mode: "none";
|
|
129
|
+
} | {
|
|
130
|
+
mode: "workspace";
|
|
131
|
+
} | {
|
|
132
|
+
mode: "selected";
|
|
133
|
+
ids: string[];
|
|
134
|
+
projectIds: string[];
|
|
135
|
+
includeCreated: boolean;
|
|
136
|
+
};
|
|
137
|
+
automationProposals: boolean;
|
|
138
|
+
automationsRun: {
|
|
139
|
+
mode: "none";
|
|
140
|
+
} | {
|
|
141
|
+
mode: "selected";
|
|
142
|
+
approvals: {
|
|
143
|
+
id: string;
|
|
144
|
+
configurationDigest: string;
|
|
145
|
+
authority: {
|
|
146
|
+
model: boolean;
|
|
147
|
+
tools: boolean;
|
|
148
|
+
dataWrite: boolean;
|
|
149
|
+
externalSend: boolean;
|
|
150
|
+
expiresAt: number;
|
|
151
|
+
maxRuns: number;
|
|
152
|
+
maxCostMicrousd: number;
|
|
153
|
+
};
|
|
154
|
+
}[];
|
|
155
|
+
};
|
|
156
|
+
agentDelegate: boolean;
|
|
157
|
+
};
|
|
39
158
|
bindings: {
|
|
40
|
-
id: "xopc.notes.get" | "xopc.notes.list" | "xopc.tasks.get" | "xopc.tasks.list" | "xopc.notes.create" | "xopc.notes.update" | "xopc.notes.append";
|
|
159
|
+
id: "xopc.notes.get" | "xopc.notes.list" | "xopc.tasks.get" | "xopc.tasks.list" | "xopc.notes.create" | "xopc.notes.update" | "xopc.notes.append" | "xopc.agent.delegate" | "xopc.automations.list" | "xopc.automations.get" | "xopc.automations.run" | "xopc.automations.get_run" | "xopc.automations.cancel" | "xopc.automations.simulate" | "xopc.automations.propose" | "xopc.automations.get_proposal" | "xopc.automations.history" | "xopc.automations.run_events" | "xopc.projects.get" | "xopc.projects.list" | "xopc.projects.list_milestones" | "xopc.projects.list_updates" | "xopc.projects.update" | "xopc.projects.create_milestone" | "xopc.projects.update_milestone" | "xopc.projects.create_update" | "xopc.tasks.create" | "xopc.tasks.update" | "xopc.files.read" | "xopc.files.propose_export" | "xopc.connectors.describe" | "xopc.connectors.read" | "xopc.connectors.propose_write" | "xopc.apps.get_request";
|
|
41
160
|
majorVersion: number;
|
|
42
161
|
descriptorDigest: string;
|
|
43
162
|
}[];
|
|
44
163
|
};
|
|
45
|
-
grantUiPermissions(extensionId: string, expectedManifestDigest: string): LocalAppUiGrant;
|
|
46
|
-
|
|
164
|
+
grantUiPermissions(extensionId: string, expectedManifestDigest: string, resourceScopes?: LocalAppResourceScopes): LocalAppUiGrant;
|
|
165
|
+
revokeUiPermissions(extensionId: string, expectedManifestDigest: string): LocalAppUiGrant;
|
|
166
|
+
assertUiPermission(extensionId: string, manifestDigest: string | undefined, grantRevision: string | undefined, permission: string): void;
|
|
167
|
+
create(input: CreateLocalAppInput, conversationId?: string): LocalAppDetail;
|
|
168
|
+
private findDevelopmentConversation;
|
|
169
|
+
resolveDevelopmentConversation(id: string): string;
|
|
47
170
|
createFromPreview(input: CreateLocalAppInput & {
|
|
48
171
|
markup: string;
|
|
49
172
|
styles: string;
|
|
@@ -2,18 +2,30 @@ import { resolveStateDir } from "../config/paths-state.js";
|
|
|
2
2
|
import { currentOperationId, init_operation_context } from "../infra/operation-context.js";
|
|
3
3
|
import { createLogger } from "../utils/logger/index.js";
|
|
4
4
|
import { init_logger } from "../utils/logger.js";
|
|
5
|
-
import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
|
-
import { ExtensionCapabilityBindingsSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
5
|
+
import { afterSqliteCommit, getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
|
+
import { ExtensionCapabilityBindingsSchema, LocalAppResourceScopesSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
7
7
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
8
|
+
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
9
|
+
import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
|
|
10
|
+
import { getConnectorConnection, init_connector_repository } from "../storage/sqlite/connector-repository.js";
|
|
11
|
+
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
12
|
+
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
8
13
|
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
14
|
+
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
9
15
|
import { slugifyProjectName } from "../projects/project-store.js";
|
|
10
16
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
17
|
+
import { getAutomation } from "../automations/storage/automation-repository.js";
|
|
11
18
|
import { LocalAppStore } from "./store.js";
|
|
19
|
+
import "../automations/storage/index.js";
|
|
20
|
+
import { automationRunApproved } from "./capabilities/automation-policy.js";
|
|
12
21
|
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
13
22
|
import { validateLocalAppCapabilityContracts } from "./capabilities/contracts.js";
|
|
14
|
-
import { buildLocalAppFixGuidance } from "./fix-guidance.js";
|
|
15
|
-
import { readLocalAppAcceptanceConfig } from "./acceptance.js";
|
|
16
23
|
import { hashLocalAppDirectory, localAppFileHashes, shouldCopyLocalAppPath } from "./artifact-files.js";
|
|
24
|
+
import { recordPublicAssets, resolvePublicAsset } from "./public-assets.js";
|
|
25
|
+
import { readPreviewFixtures } from "./preview-fixtures.js";
|
|
26
|
+
import { readLocalAppAcceptanceConfig } from "./acceptance.js";
|
|
27
|
+
import { LocalAppPreviewSessions } from "./preview-sessions.js";
|
|
28
|
+
import { buildLocalAppFixGuidance } from "./fix-guidance.js";
|
|
17
29
|
import { LOCAL_APP_RUNTIME_ENTRY, LOCAL_APP_RUNTIME_SOURCE } from "./runtime-entry.js";
|
|
18
30
|
import { readLocalAppPermissions, scaffoldLocalApp } from "./scaffold.js";
|
|
19
31
|
import { LocalAppSnapshotStore } from "./snapshot-store.js";
|
|
@@ -23,10 +35,14 @@ import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, re
|
|
|
23
35
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
24
36
|
//#region src/local-apps/service.ts
|
|
25
37
|
init_src();
|
|
38
|
+
init_connector_account_repository();
|
|
39
|
+
init_connector_repository();
|
|
26
40
|
init_paths();
|
|
27
41
|
init_logger();
|
|
28
42
|
init_transaction();
|
|
29
43
|
init_operation_context();
|
|
44
|
+
init_conversation_repository();
|
|
45
|
+
init_session_repository();
|
|
30
46
|
const log = createLogger("LocalApps");
|
|
31
47
|
const UI_ONLY_PERMISSIONS = new Set([
|
|
32
48
|
"theme",
|
|
@@ -134,6 +150,7 @@ function validateLocalAppPackage(root, extensionId) {
|
|
|
134
150
|
const unsupported = (Array.isArray(manifest.ui.permissions) ? manifest.ui.permissions.filter((value) => typeof value === "string") : []).filter((permission) => !UI_ONLY_PERMISSIONS.has(permission));
|
|
135
151
|
if (unsupported.length) throw new Error(`Phase 1 local apps cannot request: ${unsupported.join(", ")}`);
|
|
136
152
|
validateLocalAppCapabilityContracts(manifest.ui.capabilities);
|
|
153
|
+
readPreviewFixtures(root);
|
|
137
154
|
const html = readFileSync(join(root, manifest.ui.main), "utf8");
|
|
138
155
|
if (/<script\b(?![^>]*\bsrc=)[^>]*>/i.test(html)) throw new Error("Inline scripts are blocked in local app previews");
|
|
139
156
|
if (/(?:src|href)\s*=\s*["']https?:\/\//i.test(html)) throw new Error("Remote scripts, styles, and frames are blocked in Phase 1 local apps");
|
|
@@ -149,6 +166,9 @@ function validateLocalAppPackage(root, extensionId) {
|
|
|
149
166
|
};
|
|
150
167
|
}
|
|
151
168
|
var LocalAppService = class {
|
|
169
|
+
previews = new LocalAppPreviewSessions(() => resolveStateDir(), (appId, hash) => this.previewSource(appId, hash), (appId, hash) => {
|
|
170
|
+
if (this.validate(appId).sourceHash !== hash) throw new CapabilityError("CONTRACT_CHANGED", "Draft changed; refresh the preview");
|
|
171
|
+
});
|
|
152
172
|
constructor(options, store = new LocalAppStore(), snapshots = new LocalAppSnapshotStore()) {
|
|
153
173
|
this.options = options;
|
|
154
174
|
this.store = store;
|
|
@@ -231,12 +251,48 @@ var LocalAppService = class {
|
|
|
231
251
|
list() {
|
|
232
252
|
return this.store.list();
|
|
233
253
|
}
|
|
254
|
+
previewSource(appId, hash) {
|
|
255
|
+
const app = this.store.get(appId);
|
|
256
|
+
if (!app) throw new CapabilityError("NOT_FOUND", "Local app not found");
|
|
257
|
+
const snapshot = this.getSnapshot(appId, hash) ?? this.materializeSnapshot(appId);
|
|
258
|
+
if (snapshot.sourceHash !== hash || snapshot.status !== "ready" || !snapshot.previewUrl) throw new CapabilityError("CONTRACT_CHANGED", "A validated current snapshot is required");
|
|
259
|
+
const root = this.snapshots.packageRoot(appId, hash);
|
|
260
|
+
const manifest = JSON.parse(readFileSync(join(root, "xopc.extension.json"), "utf8"));
|
|
261
|
+
return {
|
|
262
|
+
appId,
|
|
263
|
+
extensionId: app.extensionId,
|
|
264
|
+
sourceHash: hash,
|
|
265
|
+
previewUrl: snapshot.previewUrl,
|
|
266
|
+
root,
|
|
267
|
+
bindings: ExtensionCapabilityBindingsSchema.parse(manifest.ui?.capabilities ?? []),
|
|
268
|
+
permissions: readLocalAppPermissions(root),
|
|
269
|
+
scenarioIds: readLocalAppAcceptanceConfig(root).scenarios.map((scenario) => scenario.id)
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
isLocalApp(extensionId) {
|
|
273
|
+
return Boolean(this.store.findByExtensionId(extensionId));
|
|
274
|
+
}
|
|
275
|
+
resolveUiAsset(extensionId, assetPath) {
|
|
276
|
+
const app = this.store.findByExtensionId(extensionId);
|
|
277
|
+
if (!app) return void 0;
|
|
278
|
+
if (!app.enabled || !app.activeReleaseId || app.installationState !== "installed" || existsSync(this.recoveryMarker(app.id))) return null;
|
|
279
|
+
const release = this.store.getRelease(app.id, app.activeReleaseId);
|
|
280
|
+
if (!release) return null;
|
|
281
|
+
const manifest = JSON.parse(release.manifestJson);
|
|
282
|
+
if (!new DurableState("local-app-public-assets", app.id).get(release.sourceHash)) {
|
|
283
|
+
validateLocalAppPackage(release.artifactPath, extensionId);
|
|
284
|
+
if (hashLocalAppDirectory(release.artifactPath) !== release.sourceHash) return null;
|
|
285
|
+
recordPublicAssets(app.id, release.sourceHash, release.artifactPath, manifest.ui.main);
|
|
286
|
+
}
|
|
287
|
+
return resolvePublicAsset(app.id, release.sourceHash, release.artifactPath, assetPath);
|
|
288
|
+
}
|
|
234
289
|
get(id) {
|
|
235
290
|
const app = this.store.get(id);
|
|
236
291
|
const token = app ? this.store.getPreviewToken(id) : null;
|
|
237
292
|
if (!app || !token) return null;
|
|
238
293
|
return {
|
|
239
294
|
...app,
|
|
295
|
+
developmentConversationId: this.findDevelopmentConversation(app),
|
|
240
296
|
draftPreviewUrl: `/api/local-apps/preview/${token}/draft/ui/index.html`,
|
|
241
297
|
permissions: readLocalAppPermissions(app.workspaceRoot),
|
|
242
298
|
releases: this.store.listReleases(id).map(({ artifactPath: _artifactPath, manifestJson: _manifestJson, ...release }) => release),
|
|
@@ -262,10 +318,12 @@ var LocalAppService = class {
|
|
|
262
318
|
appId: app?.id,
|
|
263
319
|
manifestDigest,
|
|
264
320
|
permissions,
|
|
265
|
-
grantedAt: granted ? grant?.grantedAt : void 0
|
|
321
|
+
grantedAt: granted ? grant?.grantedAt : void 0,
|
|
322
|
+
grantRevision: granted ? grant?.grantRevision : void 0,
|
|
323
|
+
resourceScopes: grant?.resourceScopes ?? LocalAppResourceScopesSchema.parse({})
|
|
266
324
|
};
|
|
267
325
|
}
|
|
268
|
-
getCapabilityAccess(extensionId, expectedManifestDigest) {
|
|
326
|
+
getCapabilityAccess(extensionId, expectedManifestDigest, expectedGrantRevision) {
|
|
269
327
|
const app = this.store.findByExtensionId(extensionId);
|
|
270
328
|
const config = extensionConfigRecord(this.options.getConfig());
|
|
271
329
|
if (app && existsSync(this.recoveryMarker(app.id))) throw new CapabilityError("FORBIDDEN", "Local app release mutation or recovery is pending");
|
|
@@ -273,27 +331,98 @@ var LocalAppService = class {
|
|
|
273
331
|
const grant = this.getUiGrant(extensionId);
|
|
274
332
|
if (!grant.granted) throw new CapabilityError("FORBIDDEN", "Local app permissions have not been granted");
|
|
275
333
|
if (grant.manifestDigest !== expectedManifestDigest) throw new CapabilityError("CONTRACT_CHANGED", "Local app release changed");
|
|
334
|
+
if (expectedGrantRevision && grant.grantRevision !== expectedGrantRevision) throw new CapabilityError("FORBIDDEN", "Local app authorization changed; review permissions again");
|
|
276
335
|
const release = this.store.getRelease(app.id, app.activeReleaseId);
|
|
277
336
|
if (!release) throw new CapabilityError("FORBIDDEN", "Local app release is unavailable");
|
|
278
337
|
const manifest = JSON.parse(release.manifestJson);
|
|
279
338
|
return {
|
|
280
339
|
releaseId: release.id,
|
|
340
|
+
grantRevision: grant.grantRevision,
|
|
341
|
+
resourceScopes: grant.resourceScopes,
|
|
281
342
|
bindings: ExtensionCapabilityBindingsSchema.parse(manifest.ui?.capabilities ?? [])
|
|
282
343
|
};
|
|
283
344
|
}
|
|
284
|
-
grantUiPermissions(extensionId, expectedManifestDigest) {
|
|
345
|
+
grantUiPermissions(extensionId, expectedManifestDigest, resourceScopes) {
|
|
285
346
|
const current = this.getUiGrant(extensionId);
|
|
286
347
|
if (!current.manifestDigest) throw new Error("Extension UI manifest not found");
|
|
287
348
|
if (current.manifestDigest !== expectedManifestDigest) throw new Error("Extension release changed; review permissions again");
|
|
349
|
+
const scopes = LocalAppResourceScopesSchema.parse(resourceScopes ?? {});
|
|
350
|
+
if (scopes.connectors.mode === "selected") for (const binding of scopes.connectors.bindings) {
|
|
351
|
+
const account = getConnectorAccount(binding.accountId), connection = getConnectorConnection(binding.connectionId);
|
|
352
|
+
if (!account || account.currentConnectionId !== binding.connectionId || !connection || connection.status !== "active" || connection.connectorId !== binding.connectorId || connection.accountId !== binding.accountId || connection.principalId !== "local-owner") throw new CapabilityError("CONTRACT_CHANGED", "Connector account changed; review its current connection again");
|
|
353
|
+
}
|
|
354
|
+
if (scopes.automationsRun.mode === "selected") for (const approval of scopes.automationsRun.approvals) {
|
|
355
|
+
if (approval.authority.expiresAt > Date.now() + 30 * 864e5) throw new CapabilityError("INVALID_INPUT", "Execution approvals last at most 30 days");
|
|
356
|
+
const automation = getAutomation(approval.id);
|
|
357
|
+
if (!automation || !automationRunApproved(scopes, automation)) throw new CapabilityError("CONTRACT_CHANGED", "Automation changed or cannot run; review its current configuration again");
|
|
358
|
+
}
|
|
288
359
|
return this.store.saveUiGrant({
|
|
289
360
|
extensionId,
|
|
290
361
|
appId: current.appId,
|
|
291
362
|
manifestDigest: current.manifestDigest,
|
|
292
|
-
permissions: current.permissions
|
|
363
|
+
permissions: current.permissions,
|
|
364
|
+
resourceScopes: scopes
|
|
293
365
|
});
|
|
294
366
|
}
|
|
295
|
-
|
|
296
|
-
|
|
367
|
+
revokeUiPermissions(extensionId, expectedManifestDigest) {
|
|
368
|
+
const current = this.getUiGrant(extensionId);
|
|
369
|
+
if (current.manifestDigest !== expectedManifestDigest) throw new CapabilityError("CONTRACT_CHANGED", "Local app release changed");
|
|
370
|
+
this.store.revokeUiGrant(extensionId);
|
|
371
|
+
if (current.appId) this.previews.revokeApp(current.appId);
|
|
372
|
+
this.options.emit("local_app.permissions_changed", { extensionId });
|
|
373
|
+
return this.getUiGrant(extensionId);
|
|
374
|
+
}
|
|
375
|
+
assertUiPermission(extensionId, manifestDigest, grantRevision, permission) {
|
|
376
|
+
if (!this.store.findByExtensionId(extensionId)) return;
|
|
377
|
+
if (!manifestDigest || !grantRevision) throw new CapabilityError("FORBIDDEN", "Current Local App authorization is required");
|
|
378
|
+
this.getCapabilityAccess(extensionId, manifestDigest, grantRevision);
|
|
379
|
+
if (!this.getUiGrant(extensionId).permissions.includes(permission)) throw new CapabilityError("FORBIDDEN", "Local app permission denied");
|
|
380
|
+
}
|
|
381
|
+
create(input, conversationId) {
|
|
382
|
+
const app = this.createInternal(input);
|
|
383
|
+
const origin = conversationId ? getSessionMetadata(conversationId) : void 0;
|
|
384
|
+
if (conversationId && origin?.agentId === "coder" && (!origin.projectId || origin.projectId === app.projectId)) {
|
|
385
|
+
this.options.projects.attachSession(conversationId, app.projectId);
|
|
386
|
+
new DurableState("local-app-development").set(app.id, conversationId);
|
|
387
|
+
}
|
|
388
|
+
return this.get(app.id);
|
|
389
|
+
}
|
|
390
|
+
findDevelopmentConversation(app) {
|
|
391
|
+
const bound = new DurableState("local-app-development").get(app.id);
|
|
392
|
+
const origin = getSqliteDatabase().prepare(`SELECT p.conversation_id FROM chat_previews p
|
|
393
|
+
JOIN chat_preview_revisions r ON r.preview_id = p.preview_id WHERE r.promoted_app_id = ?`).get(app.id);
|
|
394
|
+
for (const candidate of [bound, origin?.conversation_id]) {
|
|
395
|
+
const metadata = candidate ? getSessionMetadata(candidate) : void 0;
|
|
396
|
+
if (metadata?.agentId === "coder" && metadata.projectId === app.projectId) return metadata.key;
|
|
397
|
+
}
|
|
398
|
+
const legacy = getSqliteDatabase().prepare(`SELECT DISTINCT s.conversation_id FROM sessions s
|
|
399
|
+
JOIN transcripts t ON t.conversation_id = s.conversation_id
|
|
400
|
+
JOIN transcript_entries e ON e.transcript_id = t.transcript_id
|
|
401
|
+
WHERE s.project_id = ? AND s.agent_id = 'coder' AND e.role = 'user'
|
|
402
|
+
AND e.seq = (SELECT MIN(first.seq) FROM transcript_entries first WHERE first.transcript_id = t.transcript_id AND first.role = 'user')
|
|
403
|
+
AND (instr(e.payload_json, ?) > 0 OR instr(e.payload_json, ?) > 0) LIMIT 2`).all(app.projectId, "请基于 APP_BRIEF.md 完成这个本地应用的首版。先检查现有草稿,再实现最小可用版本并运行校验;完成后告诉我可以如何预览。", "Build the first usable version of this local app from APP_BRIEF.md. Inspect the existing draft, implement the smallest useful version, run validation, and tell me how to preview it.");
|
|
404
|
+
return legacy.length === 1 ? legacy[0].conversation_id : void 0;
|
|
405
|
+
}
|
|
406
|
+
resolveDevelopmentConversation(id) {
|
|
407
|
+
const app = this.store.get(id);
|
|
408
|
+
if (!app) throw new CapabilityError("NOT_FOUND", "Local app not found");
|
|
409
|
+
return runSqliteWriteTransaction(() => {
|
|
410
|
+
const bindings = new DurableState("local-app-development");
|
|
411
|
+
const existing = this.findDevelopmentConversation(app);
|
|
412
|
+
if (existing) {
|
|
413
|
+
bindings.set(id, existing);
|
|
414
|
+
return existing;
|
|
415
|
+
}
|
|
416
|
+
const session = createConversation({
|
|
417
|
+
agentId: "coder",
|
|
418
|
+
projectId: app.projectId,
|
|
419
|
+
sourceChannel: "webchat",
|
|
420
|
+
name: app.name,
|
|
421
|
+
customData: { localAppId: id }
|
|
422
|
+
}, app.workspaceRoot);
|
|
423
|
+
bindings.set(id, session.key);
|
|
424
|
+
return session.key;
|
|
425
|
+
});
|
|
297
426
|
}
|
|
298
427
|
createFromPreview(input) {
|
|
299
428
|
return this.createInternal(input, {
|
|
@@ -563,7 +692,10 @@ var LocalAppService = class {
|
|
|
563
692
|
configSaved = true;
|
|
564
693
|
this.refreshExtensions(input.source);
|
|
565
694
|
this.assertInstalledRuntime(input.app, target);
|
|
566
|
-
|
|
695
|
+
runSqliteWriteTransaction(() => {
|
|
696
|
+
input.commit();
|
|
697
|
+
this.store.revokeUiGrant(input.app.extensionId);
|
|
698
|
+
});
|
|
567
699
|
canCleanup = true;
|
|
568
700
|
} catch (error) {
|
|
569
701
|
if (targetInstalled && existsSync(target)) rmSync(target, {
|
|
@@ -603,9 +735,8 @@ var LocalAppService = class {
|
|
|
603
735
|
recursive: true,
|
|
604
736
|
filter: shouldCopyLocalAppPath
|
|
605
737
|
});
|
|
606
|
-
const { manifestJson } = validateLocalAppPackage(stagedArtifact, app.extensionId);
|
|
738
|
+
const { manifestJson, entryPath } = validateLocalAppPackage(stagedArtifact, app.extensionId);
|
|
607
739
|
const sourceHash = hashLocalAppDirectory(stagedArtifact);
|
|
608
|
-
if (this.store.getLatestAcceptanceForSource(app.id, sourceHash)?.status !== "passed") throw new Error("The current draft has not passed automatic acceptance");
|
|
609
740
|
renameSync(stagedArtifact, artifactPath);
|
|
610
741
|
artifactCreated = true;
|
|
611
742
|
await this.activateArtifact({
|
|
@@ -614,6 +745,7 @@ var LocalAppService = class {
|
|
|
614
745
|
nextConfig: setExtensionActivation(this.options.getConfig(), app.extensionId, true),
|
|
615
746
|
source: "local-app-install",
|
|
616
747
|
commit: () => {
|
|
748
|
+
recordPublicAssets(app.id, sourceHash, artifactPath, entryPath);
|
|
617
749
|
this.store.markInstalled({
|
|
618
750
|
id: app.id,
|
|
619
751
|
version: app.draftVersion,
|
|
@@ -682,7 +814,10 @@ var LocalAppService = class {
|
|
|
682
814
|
const saved = await this.options.saveConfig(setExtensionActivation(previousConfig, app.extensionId, enabled));
|
|
683
815
|
if (!saved.saved) throw new Error(saved.error ?? "Failed to update local app state");
|
|
684
816
|
try {
|
|
685
|
-
|
|
817
|
+
runSqliteWriteTransaction(() => {
|
|
818
|
+
this.store.setEnabled(id, enabled);
|
|
819
|
+
if (!enabled) this.store.revokeUiGrant(app.extensionId);
|
|
820
|
+
});
|
|
686
821
|
} catch (error) {
|
|
687
822
|
await this.options.saveConfig(previousConfig);
|
|
688
823
|
throw error;
|
|
@@ -714,7 +849,10 @@ var LocalAppService = class {
|
|
|
714
849
|
const saved = await this.options.saveConfig(removeExtensionActivation(previousConfig, app.extensionId));
|
|
715
850
|
if (!saved.saved) throw new Error(saved.error ?? "Failed to uninstall local app");
|
|
716
851
|
configSaved = true;
|
|
717
|
-
|
|
852
|
+
runSqliteWriteTransaction(() => {
|
|
853
|
+
this.store.markUninstalled(id);
|
|
854
|
+
this.store.revokeUiGrant(app.extensionId);
|
|
855
|
+
});
|
|
718
856
|
canCleanup = true;
|
|
719
857
|
} catch (error) {
|
|
720
858
|
if (moved && existsSync(backup)) renameSync(backup, target);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LocalAppResourceScopes } from '@xopcai/gateway-contract';
|
|
1
2
|
import type { LocalApp, LocalAppAcceptanceRun, LocalAppRelease, LocalAppUiGrant, RecordLocalAppAcceptanceInput } from './types.js';
|
|
2
3
|
export interface StoredLocalAppRelease extends LocalAppRelease {
|
|
3
4
|
artifactPath: string;
|
|
@@ -29,7 +30,9 @@ export declare class LocalAppStore {
|
|
|
29
30
|
appId?: string;
|
|
30
31
|
manifestDigest: string;
|
|
31
32
|
permissions: string[];
|
|
33
|
+
resourceScopes?: LocalAppResourceScopes;
|
|
32
34
|
}): LocalAppUiGrant;
|
|
35
|
+
revokeUiGrant(extensionId: string): void;
|
|
33
36
|
recordAcceptance(appId: string, input: RecordLocalAppAcceptanceInput): LocalAppAcceptanceRun;
|
|
34
37
|
markInstalled(input: {
|
|
35
38
|
id: string;
|