@xopcai/xopc 0.0.451 → 0.0.454

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.
Files changed (407) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{activity-store-OMq1GnqB.js → activity-store-BKH-qNPt.js} +1 -1
  4. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CIoE-FJR.js → agent-avatar-dicebear-DY6IWy0_.js} +1 -1
  5. package/dist/gateway/static/root/assets/{agent-avatar-display-kPb6idGG.js → agent-avatar-display-tnAtQOAZ.js} +2 -2
  6. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-vKUDGEU6.js → agent-defaults-settings-panel-BLQ2N_dY.js} +1 -1
  7. package/dist/gateway/static/root/assets/{agent-plugin-dialog-x7guoCvz.js → agent-plugin-dialog-Bfsm4GOs.js} +1 -1
  8. package/dist/gateway/static/root/assets/{agents-BbwFcl87.js → agents-CDNiLv0W.js} +3 -3
  9. package/dist/gateway/static/root/assets/{agents-admin-api-tXB8Aj5K.js → agents-admin-api-DGZsm8U4.js} +1 -1
  10. package/dist/gateway/static/root/assets/{api-ixudT_21.js → api-Bbj5k-7e.js} +1 -1
  11. package/dist/gateway/static/root/assets/api-BhipC15e.js +1 -0
  12. package/dist/gateway/static/root/assets/{app-link-CdD448kS.js → app-link-CCZ-LmVT.js} +1 -1
  13. package/dist/gateway/static/root/assets/{app-management-settings-panel-nuDfyfZ5.js → app-management-settings-panel-fwhXHKxt.js} +1 -1
  14. package/dist/gateway/static/root/assets/{appearance-settings-D4oON26V.js → appearance-settings-BHkl-vFO.js} +1 -1
  15. package/dist/gateway/static/root/assets/{apps-page-BM1BfXzo.js → apps-page-DtCWwdsK.js} +1 -1
  16. package/dist/gateway/static/root/assets/{archive-plugin-mKjfC6Sk.js → archive-plugin-B9xaxa7V.js} +1 -1
  17. package/dist/gateway/static/root/assets/arrow-up-right-T72JbQ1Q.js +1 -0
  18. package/dist/gateway/static/root/assets/{automation-api-C9pjryrT.js → automation-api-BHMjSwcy.js} +1 -1
  19. package/dist/gateway/static/root/assets/{automation-result-state-uvg7Bi2x.js → automation-result-state-BgAjEoNV.js} +1 -1
  20. package/dist/gateway/static/root/assets/automation-run-list-D3Eon5C0.js +1 -0
  21. package/dist/gateway/static/root/assets/{automation-task-card-CXGC8afU.js → automation-task-card-DJRg72t-.js} +1 -1
  22. package/dist/gateway/static/root/assets/{automations-page-CwQg9dfM.js → automations-page-DdAzXb7s.js} +1 -1
  23. package/dist/gateway/static/root/assets/{automations-workspace-DhLgFY2T.js → automations-workspace-D0nNat6N.js} +2 -2
  24. package/dist/gateway/static/root/assets/{binary-plugins-BNPDM14i.js → binary-plugins-CgsjdprR.js} +1 -1
  25. package/dist/gateway/static/root/assets/{block-editor-De9UqmMT.js → block-editor-r6vj6dZO.js} +1 -1
  26. package/dist/gateway/static/root/assets/{browser-settings-page-B0VB5umC.js → browser-settings-page-APCGT8Yr.js} +1 -1
  27. package/dist/gateway/static/root/assets/{capabilities-Cp-rmFMM.js → capabilities-0gYkjdax.js} +1 -1
  28. package/dist/gateway/static/root/assets/{capabilities-BtJB4u5C.js → capabilities-BgBwcqvY.js} +1 -1
  29. package/dist/gateway/static/root/assets/capabilities-page-B1x3TwdV.js +2 -0
  30. package/dist/gateway/static/root/assets/capabilities-settings-panel-CZ78ckHR.js +8 -0
  31. package/dist/gateway/static/root/assets/capability-navigation-QtHJxxW2.js +1 -0
  32. package/dist/gateway/static/root/assets/{channels-ZJORx-he.js → channels-8Y08v4Q2.js} +1 -1
  33. package/dist/gateway/static/root/assets/{chat-agents-api-CtuEaDG8.js → chat-agents-api-BRQDNNI5.js} +1 -1
  34. package/dist/gateway/static/root/assets/{chat-chart-block-ShPQBlNE.js → chat-chart-block-qMGhfeQZ.js} +1 -1
  35. package/dist/gateway/static/root/assets/chat-page-CSTyfO9c.js +71 -0
  36. package/dist/gateway/static/root/assets/{chat-terminal-dock-CvDRfHAZ.js → chat-terminal-dock-0PJ9dURQ.js} +1 -1
  37. package/dist/gateway/static/root/assets/{command-palette-api-NJTvEF2b.js → command-palette-api-C4U_-rDo.js} +1 -1
  38. package/dist/gateway/static/root/assets/composer-model-config-control-B9Q40ptH.js +1 -0
  39. package/dist/gateway/static/root/assets/{composer-notifications-BkezOy9Q.js → composer-notifications-ByuA8h5Z.js} +1 -1
  40. package/dist/gateway/static/root/assets/{composer-payload-handoff-CEjJusbJ.js → composer-payload-handoff-zr1JDn3p.js} +1 -1
  41. package/dist/gateway/static/root/assets/{computer-settings-page-DG8bcw_s.js → computer-settings-page-D2F1quZR.js} +1 -1
  42. package/dist/gateway/static/root/assets/{confirm-dialog-D7dQJytv.js → confirm-dialog-DrA5mTQp.js} +1 -1
  43. package/dist/gateway/static/root/assets/connected-providers-grid-CgULhOBZ.js +1 -0
  44. package/dist/gateway/static/root/assets/{connection-usage-guide-f55PDAbb.js → connection-usage-guide-DkDsHm_l.js} +1 -1
  45. package/dist/gateway/static/root/assets/{connector-service-page-Ca09FIBW.js → connector-service-page-1AcvESmp.js} +1 -1
  46. package/dist/gateway/static/root/assets/{connectors-api-dai-YAdK.js → connectors-api-C1OML7OO.js} +1 -1
  47. package/dist/gateway/static/root/assets/connectors-page-CMIY0Zj_.js +1 -0
  48. package/dist/gateway/static/root/assets/{date-picker-C70ICT7u.js → date-picker-D1eFhoMI.js} +1 -1
  49. package/dist/gateway/static/root/assets/{date-time-picker-Czj5fnsJ.js → date-time-picker-CqplKVk6.js} +1 -1
  50. package/dist/gateway/static/root/assets/{desktop-pet-Dq3OLpPg.js → desktop-pet-UmrjWSq-.js} +1 -1
  51. package/dist/gateway/static/root/assets/{desktop-pet-settings-q4mec6zt.js → desktop-pet-settings-DRRDJMu6.js} +1 -1
  52. package/dist/gateway/static/root/assets/{dev-view-store-lXnKsRew.js → dev-view-store-CtKJMK52.js} +1 -1
  53. package/dist/gateway/static/root/assets/{device-pairing-wizard-CbUX0iit.js → device-pairing-wizard-C4aSCbqo.js} +1 -1
  54. package/dist/gateway/static/root/assets/{directory-picker-path-field-BRnwhemd.js → directory-picker-path-field-D9U9yfnb.js} +1 -1
  55. package/dist/gateway/static/root/assets/{discussion-annotation-sync-BnK6Ua7v.js → discussion-annotation-sync-D-eGt1_L.js} +1 -1
  56. package/dist/gateway/static/root/assets/dist-CY7CS_D3.js +1 -0
  57. package/dist/gateway/static/root/assets/extension-authoritative-grants-8ONVOjPW.js +1 -0
  58. package/dist/gateway/static/root/assets/{extension-debug-page-Bp2BrJbB.js → extension-debug-page-BTLcC8-r.js} +1 -1
  59. package/dist/gateway/static/root/assets/extension-iframe-host-D0-OvFV2.js +1 -0
  60. package/dist/gateway/static/root/assets/{extension-marketplace-api-tk93vJL_.js → extension-marketplace-api-DLRCNlej.js} +1 -1
  61. package/dist/gateway/static/root/assets/extension-message-router-DboLTCVp.js +1 -0
  62. package/dist/gateway/static/root/assets/extension-page-CdpI-Plq.js +1 -0
  63. package/dist/gateway/static/root/assets/extension-provider-DUDaMvQg.js +1 -0
  64. package/dist/gateway/static/root/assets/{extension-settings-page-BGcZIeHP.js → extension-settings-page-biWCnMGr.js} +1 -1
  65. package/dist/gateway/static/root/assets/{file-preview-surface-BK2_4mWy.js → file-preview-surface-CnBRiQo8.js} +1 -1
  66. package/dist/gateway/static/root/assets/{gateway-config-swr-DsXilOaJ.js → gateway-config-swr-BV5fpBSK.js} +1 -1
  67. package/dist/gateway/static/root/assets/{gateway-realtime-DopPmAMl.js → gateway-realtime-CIqLQXlm.js} +1 -1
  68. package/dist/gateway/static/root/assets/gateway-realtime-store-B6T1Xzag.js +1 -0
  69. package/dist/gateway/static/root/assets/{gateway-restart-eozrXTm7.js → gateway-restart-DBkfCzT5.js} +1 -1
  70. package/dist/gateway/static/root/assets/{gateway-settings-DddUli-p.js → gateway-settings-DTzXUm9f.js} +1 -1
  71. package/dist/gateway/static/root/assets/{gateway-startup-retry-DMQI0ATo.js → gateway-startup-retry-B49N_Ngm.js} +1 -1
  72. package/dist/gateway/static/root/assets/{global-defaults-api-D7hk1zTj.js → global-defaults-api-DVpxe45P.js} +1 -1
  73. package/dist/gateway/static/root/assets/{home-page-C8oVgxQg.js → home-page-DvaxBrjG.js} +2 -2
  74. package/dist/gateway/static/root/assets/{image-generation-api-BCbvDDH_.js → image-generation-api-CAKYslID.js} +1 -1
  75. package/dist/gateway/static/root/assets/{imports-page-B9LF_2fO.js → imports-page-C2KmQJ2H.js} +1 -1
  76. package/dist/gateway/static/root/assets/index-B49yIcMR.css +1 -0
  77. package/dist/gateway/static/root/assets/index-BpzvsoS1.js +11 -0
  78. package/dist/gateway/static/root/assets/{install-connector-dialog-DT32t-66.js → install-connector-dialog-CmNvZt8M.js} +1 -1
  79. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DDwoBK8g.js → keyboard-shortcuts-settings-syG2KRr2.js} +1 -1
  80. package/dist/gateway/static/root/assets/local-app-workbench-page-DGA4EHGm.js +1 -0
  81. package/dist/gateway/static/root/assets/local-apps-CB-MZAaL.js +1 -0
  82. package/dist/gateway/static/root/assets/{local-apps-page-qzxr3c8Y.js → local-apps-page-I0O2ybpp.js} +1 -1
  83. package/dist/gateway/static/root/assets/{local-session-drafts-BU3FXj_X.js → local-session-drafts-DsPDloiq.js} +1 -1
  84. package/dist/gateway/static/root/assets/{locale-store-DTUQ0JiK.js → locale-store-D3c8DIm-.js} +1 -1
  85. package/dist/gateway/static/root/assets/logs-page-u9FTZaTh.js +2 -0
  86. package/dist/gateway/static/root/assets/{management-api-C6mCD0mZ.js → management-api-uxRxRX-6.js} +1 -1
  87. package/dist/gateway/static/root/assets/{management-settings-C4BKD-_b.js → management-settings-BCbDfM7f.js} +1 -1
  88. package/dist/gateway/static/root/assets/{markdown-view-DHjn1-ML.js → markdown-view-ohhExTMC.js} +1 -1
  89. package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-ClgMvru5.js → mcp-conversation-setup-page-382BGqQC.js} +1 -1
  90. package/dist/gateway/static/root/assets/{media-plugins-8E2KZQym.js → media-plugins-B5wtLz3Z.js} +1 -1
  91. package/dist/gateway/static/root/assets/messages-DPLud9GK.js +3 -0
  92. package/dist/gateway/static/root/assets/{model-selector-CJY9LRsl.js → model-selector-CoKcq0AZ.js} +1 -1
  93. package/dist/gateway/static/root/assets/{models-hub-cache-BTs8jhgq.js → models-hub-cache-CtooMAQW.js} +1 -1
  94. package/dist/gateway/static/root/assets/{note-detail-panel-DiCfpcZd.js → note-detail-panel-DiGQtSD0.js} +3 -3
  95. package/dist/gateway/static/root/assets/note-image-lightbox-Ds4M9fJJ.js +1 -0
  96. package/dist/gateway/static/root/assets/{notes-api-BnaeXy22.js → notes-api-Cvet94d8.js} +1 -1
  97. package/dist/gateway/static/root/assets/{notes-page-B_vTBmyx.js → notes-page-DwlmKweX.js} +2 -2
  98. package/dist/gateway/static/root/assets/{oauth-api-BZ67vxsq.js → oauth-api-BHp5dVNh.js} +1 -1
  99. package/dist/gateway/static/root/assets/{oauth-provider-connect-CZP15znW.js → oauth-provider-connect-cvxtmf3C.js} +1 -1
  100. package/dist/gateway/static/root/assets/{page-context-capture-button-TpjRHhUt.js → page-context-capture-button-BwsK2uDe.js} +1 -1
  101. package/dist/gateway/static/root/assets/{page-context-draft-BbUpxlgV.js → page-context-draft-ieK9IN3R.js} +1 -1
  102. package/dist/gateway/static/root/assets/page-header-store-Xe8CP_4a.js +1 -0
  103. package/dist/gateway/static/root/assets/personal-avatar-BZSC0BLP.js +1 -0
  104. package/dist/gateway/static/root/assets/personal-page-CbiD8Wn7.js +1 -0
  105. package/dist/gateway/static/root/assets/personal-profile-settings-KvdNnaNv.js +1 -0
  106. package/dist/gateway/static/root/assets/personal-settings-panel-_cxSzWsN.js +1 -0
  107. package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +1 -0
  108. package/dist/gateway/static/root/assets/{phone-dependencies-card-ChRrViSc.js → phone-dependencies-card-C2OWtG2B.js} +1 -1
  109. package/dist/gateway/static/root/assets/{phone-model-connection-DmswEWqx.js → phone-model-connection-CqmafRhr.js} +1 -1
  110. package/dist/gateway/static/root/assets/{phone-model-picker-CvuOhQpk.js → phone-model-picker-BwYQtl_5.js} +1 -1
  111. package/dist/gateway/static/root/assets/{phone-settings-page-2hZ68I47.js → phone-settings-page-CPteZZWu.js} +1 -1
  112. package/dist/gateway/static/root/assets/{phone-workspace-store-BMvxfZ3g.js → phone-workspace-store-ReUEjG9m.js} +1 -1
  113. package/dist/gateway/static/root/assets/{plugin-details-dialog-qvdi41L2.js → plugin-details-dialog-BlNVtbEU.js} +1 -1
  114. package/dist/gateway/static/root/assets/{preference-select-fields-RDatqlhG.js → preference-select-fields-BbA-g7Zq.js} +1 -1
  115. package/dist/gateway/static/root/assets/{product-automation-feedback-Bj9ZsasT.js → product-automation-feedback-DcPY76PG.js} +1 -1
  116. package/dist/gateway/static/root/assets/{product-delivery-DRyD9_Xq.js → product-delivery-2Ks17_OH.js} +1 -1
  117. package/dist/gateway/static/root/assets/{product-open-page-CzXmn2MX.js → product-open-page-BBJ7glAm.js} +1 -1
  118. package/dist/gateway/static/root/assets/{product-preview-content-Beg0t4GW.js → product-preview-content-UTOSc_ii.js} +1 -1
  119. package/dist/gateway/static/root/assets/{product-preview-modal-5ulFfVzf.js → product-preview-modal-Q1RZqeMo.js} +2 -2
  120. package/dist/gateway/static/root/assets/{project-detail-page-8bnYqXLJ.js → project-detail-page-BlrtsEZK.js} +2 -2
  121. package/dist/gateway/static/root/assets/{project-understanding-CXf7wjwt.js → project-understanding-B35f5MkG.js} +1 -1
  122. package/dist/gateway/static/root/assets/{projects-page-CyA6fCPg.js → projects-page-CBH-sHOU.js} +1 -1
  123. package/dist/gateway/static/root/assets/{providers-api-DE7kdeXc.js → providers-api-BSmKlQ8K.js} +1 -1
  124. package/dist/gateway/static/root/assets/{recording-upload-BZvpuPZT.js → recording-upload-P1WcsdEY.js} +1 -1
  125. package/dist/gateway/static/root/assets/{registry-api-C_8-f85U.js → registry-api-DnVlwJ6M.js} +1 -1
  126. package/dist/gateway/static/root/assets/{remote-access-hub-Daxdjqs9.js → remote-access-hub-CVEj3p0J.js} +1 -1
  127. package/dist/gateway/static/root/assets/{resource-unavailable-khPb8zb8.js → resource-unavailable-B_S1dFze.js} +1 -1
  128. package/dist/gateway/static/root/assets/route-preload-DGmrxJSb.js +2 -0
  129. package/dist/gateway/static/root/assets/runtime-health-zDkHcOZO.js +1 -0
  130. package/dist/gateway/static/root/assets/{runtime-tools-api-2YumRxOJ.js → runtime-tools-api-970sp5zI.js} +1 -1
  131. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DH00p-rI.js → runtime-tools-settings-panel-au6vZ0sL.js} +1 -1
  132. package/dist/gateway/static/root/assets/{service-recommendation-list-wXf_ZlHq.js → service-recommendation-list-XeRFtJ-Z.js} +1 -1
  133. package/dist/gateway/static/root/assets/{session-api-Dt7vRa-E.js → session-api-CuT7EPI0.js} +1 -1
  134. package/dist/gateway/static/root/assets/session-manager-CyZHiuWY.js +25 -0
  135. package/dist/gateway/static/root/assets/{sessions-page-CCcpMHIH.js → sessions-page-BIxDwAIX.js} +1 -1
  136. package/dist/gateway/static/root/assets/settings-advanced-gate-Cy7xeKmH.js +1 -0
  137. package/dist/gateway/static/root/assets/{settings-advanced-section-DRlQdj_w.js → settings-advanced-section-nbkGHQ_4.js} +1 -1
  138. package/dist/gateway/static/root/assets/{settings-mode-store-BE6t--iO.js → settings-mode-store-EQHfksdV.js} +1 -1
  139. package/dist/gateway/static/root/assets/{settings-page-_F2d9-GZ.js → settings-page-D6RNHRHq.js} +1 -1
  140. package/dist/gateway/static/root/assets/{settings-page-header-DG3MQwSF.js → settings-page-header-19GJ_a45.js} +1 -1
  141. package/dist/gateway/static/root/assets/{settings-page-layout-SuMAUhMb.js → settings-page-layout-B2WCzSel.js} +1 -1
  142. package/dist/gateway/static/root/assets/{setup-interaction-page-DyDiHKjZ.js → setup-interaction-page-C5i7y_pM.js} +1 -1
  143. package/dist/gateway/static/root/assets/{setup-status-panel-CPNFWhrr.js → setup-status-panel-Cwp8YKdT.js} +1 -1
  144. package/dist/gateway/static/root/assets/{share-link-dialog-wu-minYF.js → share-link-dialog-DDsVTMZ-.js} +1 -1
  145. package/dist/gateway/static/root/assets/{share-preview-page-BqbfuQBU.js → share-preview-page-C1S_gWGf.js} +1 -1
  146. package/dist/gateway/static/root/assets/{shares-api-DwsEzRc6.js → shares-api-CepTFl1f.js} +1 -1
  147. package/dist/gateway/static/root/assets/{shares-settings-BxutiB6Y.js → shares-settings-Cv-tdcAN.js} +1 -1
  148. package/dist/gateway/static/root/assets/{skill-api-C7wPB73H.js → skill-api-CsT-iHnl.js} +1 -1
  149. package/dist/gateway/static/root/assets/{skill-list-api-C4AjzhlY.js → skill-list-api-CMJTjvSo.js} +1 -1
  150. package/dist/gateway/static/root/assets/{skill-reload-api-CqfS9zlG.js → skill-reload-api-S6B7P9ur.js} +1 -1
  151. package/dist/gateway/static/root/assets/{skills-page-8VYadExR.js → skills-page-BKcsJtYx.js} +1 -1
  152. package/dist/gateway/static/root/assets/sliding-segmented-CgQ3BFdb.js +1 -0
  153. package/dist/gateway/static/root/assets/{system-settings-panel-BV4GHnns.js → system-settings-panel-DhHPM5qU.js} +1 -1
  154. package/dist/gateway/static/root/assets/{task-detail-page-C9IyuxdS.js → task-detail-page-BHH2_Z9_.js} +3 -3
  155. package/dist/gateway/static/root/assets/{task-input-card-NtzzVc0e.js → task-input-card-D_2rNF31.js} +1 -1
  156. package/dist/gateway/static/root/assets/{terminal-panel-store-DWdJOGMn.js → terminal-panel-store-CcUWpqvC.js} +1 -1
  157. package/dist/gateway/static/root/assets/{theme-store-FNf-kdMR.js → theme-store-D9pquJiM.js} +1 -1
  158. package/dist/gateway/static/root/assets/{tracing-settings-page-BRPJuRpc.js → tracing-settings-page-CjNrKILr.js} +1 -1
  159. package/dist/gateway/static/root/assets/{tunnel-api-B7NHNrQJ.js → tunnel-api-GtLO40pc.js} +1 -1
  160. package/dist/gateway/static/root/assets/{understanding-activity-store-bgCeO8bb.js → understanding-activity-store-BhB5wAbq.js} +1 -1
  161. package/dist/gateway/static/root/assets/{understanding-refresh-store-CEhWIvsQ.js → understanding-refresh-store-BxtpXRfV.js} +1 -1
  162. package/dist/gateway/static/root/assets/{usage-page-35YfpfVW.js → usage-page-CZa_a6_7.js} +1 -1
  163. package/dist/gateway/static/root/assets/{use-autosave-D8Qtt_Tn.js → use-autosave-BtOp6W9H.js} +1 -1
  164. package/dist/gateway/static/root/assets/{use-composer-attachments-H-tD4Db6.js → use-composer-attachments-BTQZx8Nj.js} +1 -1
  165. package/dist/gateway/static/root/assets/{use-file-preview-expanded-P-0xmST2.js → use-file-preview-expanded-B7nscYS4.js} +3 -3
  166. package/dist/gateway/static/root/assets/{use-personal-profile-Bk2rGWSy.js → use-personal-profile-Cj7WGOfv.js} +1 -1
  167. package/dist/gateway/static/root/assets/use-realtime-voice-BS1rygyV.js +1 -0
  168. package/dist/gateway/static/root/assets/{use-workspace-tree-D0_812KH.js → use-workspace-tree-DYosm4Gz.js} +1 -1
  169. package/dist/gateway/static/root/assets/{user-model-page-BxHnOljT.js → user-model-page-DmmJODQ4.js} +1 -1
  170. package/dist/gateway/static/root/assets/voice-CDlC6XMH.js +1 -0
  171. package/dist/gateway/static/root/assets/{voice-api-key-field-BL56KGeq.js → voice-api-key-field-8voN8dQG.js} +1 -1
  172. package/dist/gateway/static/root/assets/voice-call-context-BM2A4bLz.js +1 -0
  173. package/dist/gateway/static/root/assets/voice-config-api-CrZd2aqw.js +1 -0
  174. package/dist/gateway/static/root/assets/{voice-input-shortcut-events-BK-IvchL.js → voice-input-shortcut-events-DcFp_fy4.js} +1 -1
  175. package/dist/gateway/static/root/assets/voice-settings-AckvhNnP.js +1 -0
  176. package/dist/gateway/static/root/assets/{work-discovery-overlay-DDXae8Yc.js → work-discovery-overlay-DAIk5csp.js} +1 -1
  177. package/dist/gateway/static/root/assets/{work-discovery-page-CxN0abrd.js → work-discovery-page-CJeixeWQ.js} +1 -1
  178. package/dist/gateway/static/root/assets/{working-directory-picker-modal-D3BUBFa0.js → working-directory-picker-modal-BW76VaD5.js} +1 -1
  179. package/dist/gateway/static/root/assets/workspace-api-Cu2gzmVn.js +2 -0
  180. package/dist/gateway/static/root/assets/workspace-editor-agent-store-pVOYuH7u.js +1 -0
  181. package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-BKmtih6_.js → workspace-file-preview-dialog-DyqI793w.js} +1 -1
  182. package/dist/gateway/static/root/assets/{workspace-open-location-menu-BdfKT4O4.js → workspace-open-location-menu-DTYkApy8.js} +1 -1
  183. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-BS_lsURY.js → xopc-cloud-account-card-Rytp_NWV.js} +1 -1
  184. package/dist/gateway/static/root/index.html +102 -98
  185. package/dist/package.js +1 -1
  186. package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -4
  187. package/dist/packages/gateway-contract/src/index.js +3 -1
  188. package/dist/packages/gateway-contract/src/local-app-delegation.js +22 -0
  189. package/dist/packages/gateway-contract/src/local-apps.js +35 -4
  190. package/dist/packages/realtime-protocol/src/voice.js +5 -0
  191. package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
  192. package/dist/src/agent/agent-manager.d.ts +1 -0
  193. package/dist/src/agent/agent-manager.js +11 -2
  194. package/dist/src/agent/background-review/prompts.js +2 -0
  195. package/dist/src/agent/background-review/run-background-review.js +13 -7
  196. package/dist/src/agent/context/execution-context.js +1 -1
  197. package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
  198. package/dist/src/agent/embedded/run-for-session.js +66 -9
  199. package/dist/src/agent/embedded/run-turn.js +35 -1
  200. package/dist/src/agent/embedded/runs.d.ts +1 -0
  201. package/dist/src/agent/embedded/runs.js +13 -0
  202. package/dist/src/agent/embedded/types.d.ts +2 -0
  203. package/dist/src/agent/inbound/turn-dispatcher.d.ts +1 -0
  204. package/dist/src/agent/inbound/turn-dispatcher.js +1 -0
  205. package/dist/src/agent/prompt/system-prompt.js +7 -6
  206. package/dist/src/agent/prompt/types.d.ts +2 -1
  207. package/dist/src/agent/prompt/voice-history.d.ts +9 -0
  208. package/dist/src/agent/prompt/voice-history.js +35 -0
  209. package/dist/src/agent/prompt/voice-presentation.d.ts +1 -1
  210. package/dist/src/agent/prompt/voice-presentation.js +1 -0
  211. package/dist/src/agent/service.js +1 -1
  212. package/dist/src/agent/tasks/task-judge-service.js +1 -1
  213. package/dist/src/agent/tools/factory.js +1 -1
  214. package/dist/src/agent/tools/image-generate-tool.js +5 -1
  215. package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
  216. package/dist/src/agent/tools/personal-task-tool.js +3 -1
  217. package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
  218. package/dist/src/agent/tools/task-evidence.js +6 -15
  219. package/dist/src/agent/tools/task-result-tool.js +1 -1
  220. package/dist/src/agent/tools/user-context-tool.js +1 -1
  221. package/dist/src/agent/tools/xopc-use-tool.js +6 -5
  222. package/dist/src/agent-config/schema.d.ts +15 -0
  223. package/dist/src/capabilities/runtime/dispatcher.d.ts +11 -0
  224. package/dist/src/capabilities/runtime/dispatcher.js +22 -6
  225. package/dist/src/capabilities/runtime/product.js +2 -0
  226. package/dist/src/computer/evaluation-comparison.d.ts +4 -0
  227. package/dist/src/computer/evaluation-comparison.js +16 -1
  228. package/dist/src/computer/keyboard.js +1 -1
  229. package/dist/src/computer/model-adapter.js +18 -14
  230. package/dist/src/config/schema.d.ts +36 -2
  231. package/dist/src/config/schema.js +23 -5
  232. package/dist/src/gateway/hono/lib/safe-voice-config.js +4 -1
  233. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +107 -12
  234. package/dist/src/gateway/hono/routes/imports.js +1 -1
  235. package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
  236. package/dist/src/gateway/hono/routes/local-app-capabilities.js +16 -5
  237. package/dist/src/gateway/hono/routes/local-app-development.d.ts +3 -0
  238. package/dist/src/gateway/hono/routes/local-app-development.js +13 -0
  239. package/dist/src/gateway/hono/routes/local-app-previews.d.ts +3 -0
  240. package/dist/src/gateway/hono/routes/local-app-previews.js +86 -0
  241. package/dist/src/gateway/hono/routes/local-apps.js +3 -2
  242. package/dist/src/gateway/hono/routes/projects.js +1 -1
  243. package/dist/src/gateway/hono/routes/tasks.js +2 -2
  244. package/dist/src/gateway/hono/routes/user-model.js +2 -2
  245. package/dist/src/gateway/hono/routes/voice.js +4 -3
  246. package/dist/src/gateway/security/local-app-delegation-access.d.ts +5 -0
  247. package/dist/src/gateway/security/local-app-delegation-access.js +22 -0
  248. package/dist/src/gateway/service/config-coordinator.d.ts +7 -2
  249. package/dist/src/gateway/service/run-gateway-agent.js +7 -6
  250. package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
  251. package/dist/src/gateway/service/session-input-coordinator.js +6 -2
  252. package/dist/src/gateway/service.js +50 -17
  253. package/dist/src/home-intelligence/host.js +2 -2
  254. package/dist/src/local-apps/access-audit.d.ts +17 -0
  255. package/dist/src/local-apps/access-audit.js +42 -0
  256. package/dist/src/local-apps/capabilities/contracts.js +2 -0
  257. package/dist/src/local-apps/capabilities/delegate.d.ts +3 -0
  258. package/dist/src/local-apps/capabilities/delegate.js +166 -0
  259. package/dist/src/local-apps/capabilities/projections.d.ts +265 -0
  260. package/dist/src/local-apps/capabilities/projections.js +53 -0
  261. package/dist/src/local-apps/capabilities/resource-policy.d.ts +3 -0
  262. package/dist/src/local-apps/capabilities/resource-policy.js +43 -0
  263. package/dist/src/local-apps/capabilities/runtime.d.ts +2 -1
  264. package/dist/src/local-apps/capabilities/runtime.js +108 -39
  265. package/dist/src/local-apps/fix-guidance.js +4 -1
  266. package/dist/src/local-apps/preview-fixtures.d.ts +20 -0
  267. package/dist/src/local-apps/preview-fixtures.js +52 -0
  268. package/dist/src/local-apps/preview-runtime-bridge.d.ts +1 -1
  269. package/dist/src/local-apps/preview-runtime-bridge.js +41 -18
  270. package/dist/src/local-apps/preview-sessions.d.ts +52 -0
  271. package/dist/src/local-apps/preview-sessions.js +316 -0
  272. package/dist/src/local-apps/preview-worker.d.ts +1 -0
  273. package/dist/src/local-apps/preview-worker.js +108 -0
  274. package/dist/src/local-apps/public-assets.d.ts +2 -0
  275. package/dist/src/local-apps/public-assets.js +42 -0
  276. package/dist/src/local-apps/scaffold.js +1 -1
  277. package/dist/src/local-apps/service.d.ts +48 -5
  278. package/dist/src/local-apps/service.js +136 -15
  279. package/dist/src/local-apps/store.d.ts +3 -0
  280. package/dist/src/local-apps/store.js +42 -16
  281. package/dist/src/local-apps/types.d.ts +2 -0
  282. package/dist/src/memory-learning/repository.js +3 -2
  283. package/dist/src/memory-learning/service.js +4 -13
  284. package/dist/src/memory-learning/transcript-source.d.ts +9 -0
  285. package/dist/src/memory-learning/transcript-source.js +31 -0
  286. package/dist/src/notes/capabilities/read.js +11 -2
  287. package/dist/src/notes/capabilities/write.js +10 -1
  288. package/dist/src/notes/types.d.ts +2 -0
  289. package/dist/src/personal-agent/communication.d.ts +2 -1
  290. package/dist/src/personal-agent/communication.js +3 -1
  291. package/dist/src/personal-agent/prompt-context.js +15 -23
  292. package/dist/src/personal-agent/prompts.js +3 -2
  293. package/dist/src/personal-agent/reply-composer.js +2 -2
  294. package/dist/src/personal-agent/request-access.js +1 -1
  295. package/dist/src/personal-agent/request-delivery.js +1 -1
  296. package/dist/src/personal-agent/request-service.js +1 -1
  297. package/dist/src/personal-agent/service.js +1 -0
  298. package/dist/src/phone/contracts.d.ts +1 -1
  299. package/dist/src/phone/model-adapter.d.ts +1 -1
  300. package/dist/src/phone/runtime.d.ts +1 -1
  301. package/dist/src/process/fork-worker.d.ts +2 -0
  302. package/dist/src/process/fork-worker.js +7 -0
  303. package/dist/src/realtime/broker.js +1 -1
  304. package/dist/src/session/client-history.js +12 -1
  305. package/dist/src/session/session-context-for-llm.js +10 -3
  306. package/dist/src/session/store.d.ts +1 -0
  307. package/dist/src/session/store.js +2 -1
  308. package/dist/src/session/stored-rows-to-file-entries.js +1 -1
  309. package/dist/src/session/transcript-outline.js +9 -0
  310. package/dist/src/session/voice-transcript.d.ts +14 -0
  311. package/dist/src/session/voice-transcript.js +19 -2
  312. package/dist/src/storage/sqlite/notes-repository.js +7 -0
  313. package/dist/src/storage/sqlite/resource-scope.d.ts +10 -0
  314. package/dist/src/storage/sqlite/resource-scope.js +31 -0
  315. package/dist/src/storage/sqlite/transcript-repository.d.ts +3 -0
  316. package/dist/src/storage/sqlite/transcript-repository.js +43 -7
  317. package/dist/src/tasks/capabilities/read.js +21 -3
  318. package/dist/src/tasks/task-allocation-service.js +1 -1
  319. package/dist/src/tasks/task-application-service.js +3 -3
  320. package/dist/src/tasks/task-context-assembler.js +1 -1
  321. package/dist/src/tasks/task-evidence-tools.d.ts +2 -0
  322. package/dist/src/tasks/task-evidence-tools.js +22 -0
  323. package/dist/src/tasks/task-main-update-delivery.js +2 -0
  324. package/dist/src/tasks/task-repository.d.ts +2 -0
  325. package/dist/src/tasks/task-repository.js +7 -0
  326. package/dist/src/tasks/task-research-result.js +8 -21
  327. package/dist/src/tasks/task-result-delivery-repository.d.ts +6 -0
  328. package/dist/src/tasks/task-result-delivery-repository.js +26 -0
  329. package/dist/src/tasks/task-result-delivery-service.js +3 -3
  330. package/dist/src/tasks/task-run-coordinator.js +1 -1
  331. package/dist/src/usage/scenario-registry.js +5 -0
  332. package/dist/src/user-model/index.js +3 -3
  333. package/dist/src/user-model/profile.d.ts +8 -0
  334. package/dist/src/user-model/profile.js +19 -1
  335. package/dist/src/voice/platform-settings.d.ts +5 -0
  336. package/dist/src/voice/platform-settings.js +15 -2
  337. package/dist/src/voice/platform-streams.d.ts +7 -3
  338. package/dist/src/voice/platform-streams.js +90 -18
  339. package/dist/src/voice/realtime/agentBroker.d.ts +12 -1
  340. package/dist/src/voice/realtime/agentBroker.js +22 -5
  341. package/dist/src/voice/realtime/agentEngine.js +104 -12
  342. package/dist/src/voice/realtime/chat-publication.d.ts +24 -0
  343. package/dist/src/voice/realtime/chat-publication.js +61 -0
  344. package/dist/src/voice/realtime/conversation-context.d.ts +7 -1
  345. package/dist/src/voice/realtime/conversation-context.js +54 -16
  346. package/dist/src/voice/realtime/engine.d.ts +2 -0
  347. package/dist/src/voice/realtime/identity-grounding.d.ts +8 -0
  348. package/dist/src/voice/realtime/identity-grounding.js +34 -0
  349. package/dist/src/voice/realtime/memory-context.js +48 -14
  350. package/dist/src/voice/realtime/naturalAgentTools.d.ts +90 -0
  351. package/dist/src/voice/realtime/naturalAgentTools.js +275 -0
  352. package/dist/src/voice/realtime/omniEngine.d.ts +8 -0
  353. package/dist/src/voice/realtime/omniEngine.js +239 -13
  354. package/dist/src/voice/realtime/omniRoute.d.ts +1 -0
  355. package/dist/src/voice/realtime/omniRoute.js +23 -4
  356. package/dist/src/voice/realtime/runtime.d.ts +1 -0
  357. package/dist/src/voice/realtime/runtime.js +116 -22
  358. package/dist/src/voice/realtime/runtime.types.d.ts +3 -1
  359. package/dist/src/voice/realtime/speakable-segmenter.d.ts +2 -1
  360. package/dist/src/voice/realtime/speakable-segmenter.js +7 -2
  361. package/dist/src/voice/realtime/turnPolicy.d.ts +1 -2
  362. package/dist/src/voice/realtime/turnPolicy.js +4 -6
  363. package/dist/src/voice/realtime/user-context.d.ts +14 -0
  364. package/dist/src/voice/realtime/user-context.js +63 -0
  365. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +29 -23
  366. package/dist/src/voice/tts/speak-core.js +1 -0
  367. package/dist/src/voice/tts/speech-provider-types.d.ts +2 -0
  368. package/dist/src/work-discovery/service.js +1 -1
  369. package/package.json +2 -1
  370. package/skills/engineering/build-xopc-local-app/SKILL.md +5 -1
  371. package/skills/engineering/build-xopc-local-app/references/app-contract.md +43 -2
  372. package/dist/gateway/static/root/assets/api-DIKAjDAK.js +0 -1
  373. package/dist/gateway/static/root/assets/automation-run-list-J-R4-hVm.js +0 -1
  374. package/dist/gateway/static/root/assets/capabilities-page-KRaK8LKT.js +0 -2
  375. package/dist/gateway/static/root/assets/capabilities-settings-panel-aJy-1o5H.js +0 -8
  376. package/dist/gateway/static/root/assets/chat-page-QmBfel_Z.js +0 -71
  377. package/dist/gateway/static/root/assets/clipboard-copy-DuJk5WD6.js +0 -1
  378. package/dist/gateway/static/root/assets/connected-providers-grid-BWVieU6P.js +0 -1
  379. package/dist/gateway/static/root/assets/connectors-page-C8M01Zxs.js +0 -1
  380. package/dist/gateway/static/root/assets/dist-BGTk37IG.js +0 -1
  381. package/dist/gateway/static/root/assets/extension-iframe-host-DjXDDmUd.js +0 -1
  382. package/dist/gateway/static/root/assets/extension-page-CGgneUDY.js +0 -1
  383. package/dist/gateway/static/root/assets/extension-provider-BktGTwH_.js +0 -1
  384. package/dist/gateway/static/root/assets/gateway-realtime-store-ZxMFPH4n.js +0 -1
  385. package/dist/gateway/static/root/assets/index-CPXKrqLj.js +0 -11
  386. package/dist/gateway/static/root/assets/index-Dc-3QQaz.css +0 -1
  387. package/dist/gateway/static/root/assets/local-app-workbench-page-CnckB-RA.js +0 -1
  388. package/dist/gateway/static/root/assets/local-apps-Ck6kACsY.js +0 -1
  389. package/dist/gateway/static/root/assets/logs-page-_nIEwZn4.js +0 -2
  390. package/dist/gateway/static/root/assets/messages-C7ruaWtK.js +0 -3
  391. package/dist/gateway/static/root/assets/note-image-lightbox-kccIXJo_.js +0 -1
  392. package/dist/gateway/static/root/assets/page-header-store-CFntbsPj.js +0 -1
  393. package/dist/gateway/static/root/assets/personal-avatar-CVocefDp.js +0 -1
  394. package/dist/gateway/static/root/assets/personal-page-BjnSgU89.js +0 -1
  395. package/dist/gateway/static/root/assets/personal-proactivity-DaRnbB1f.js +0 -1
  396. package/dist/gateway/static/root/assets/personal-settings-panel-CdMHSPCH.js +0 -1
  397. package/dist/gateway/static/root/assets/route-preload-DGMUu3pm.js +0 -2
  398. package/dist/gateway/static/root/assets/runtime-health-D2TDFLLq.js +0 -1
  399. package/dist/gateway/static/root/assets/session-manager-5qokJQ6W.js +0 -25
  400. package/dist/gateway/static/root/assets/settings-advanced-gate-B7-XQiJh.js +0 -1
  401. package/dist/gateway/static/root/assets/sliding-segmented-D346J92k.js +0 -1
  402. package/dist/gateway/static/root/assets/use-realtime-voice-BcokfdI0.js +0 -1
  403. package/dist/gateway/static/root/assets/voice-C607F0pB.js +0 -1
  404. package/dist/gateway/static/root/assets/voice-call-context-CJ1ZiJWR.js +0 -1
  405. package/dist/gateway/static/root/assets/voice-config-api-DVFTuHwH.js +0 -1
  406. package/dist/gateway/static/root/assets/workspace-api-ymncGc6j.js +0 -2
  407. package/dist/gateway/static/root/assets/workspace-editor-agent-store-BQrMvAkL.js +0 -1
@@ -437,7 +437,7 @@ var AgentManager = class {
437
437
  replaceAgentSystemPrompt(inst.agent, originalSystemPrompt);
438
438
  }
439
439
  }
440
- buildSystemPromptForInstance(instance, registeredToolNames = instance.registeredToolNames, activeCapabilityNames = this.activeCapabilityNames(instance)) {
440
+ buildSystemPromptForInstance(instance, registeredToolNames = instance.registeredToolNames, activeCapabilityNames = this.activeCapabilityNames(instance), overrides) {
441
441
  const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.conversationId);
442
442
  const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
443
443
  const contextFiles = this.resolveContextFilesForSession(instance.conversationId, instance.effectiveProfile);
@@ -455,9 +455,18 @@ var AgentManager = class {
455
455
  modelRef,
456
456
  agentId: instance.effectiveProfile.agentId,
457
457
  thinkingLevel,
458
- activeProjectContext: this.composeDynamicProjectContext(instance.activeProjectContext, this.buildActiveCapabilityContext(instance, activeCapabilityNames, registeredToolNames))
458
+ activeProjectContext: this.composeDynamicProjectContext(instance.activeProjectContext, this.buildActiveCapabilityContext(instance, activeCapabilityNames, registeredToolNames)),
459
+ ...overrides
459
460
  });
460
461
  }
462
+ buildVoiceSystemPrompt(conversationId, modelRef, thinkingLevel) {
463
+ const instance = this.agents.get(conversationId);
464
+ return instance ? this.buildSystemPromptForInstance(instance, void 0, void 0, {
465
+ promptMode: "voice",
466
+ modelRef,
467
+ thinkingLevel
468
+ }) : void 0;
469
+ }
461
470
  /** Structured SKILL.md preview for the gateway console. */
462
471
  getSkillMarkdownSource(skillName) {
463
472
  const skill = this.getCurrentWorkspaceRuntime().skillManager.findSkill(skillName);
@@ -1,5 +1,6 @@
1
1
  import { USER_UNDERSTANDING_MAINTENANCE_POLICY } from "../../user-model/maintenance-policy.js";
2
2
  import { USER_FACING_UNDERSTANDING_WRITING_GUIDANCE } from "../../user-context/understanding-writing.js";
3
+ import { USER_PROFILE_IDENTITY_RULE } from "../../user-model/profile.js";
3
4
  //#region src/agent/background-review/prompts.ts
4
5
  const USER_MODEL_MAINTAINER_SYSTEM_PROMPT = `You are xopc's user-understanding maintainer. You do not chat with the user and cannot write storage. Distinguish explicit memory commands, corrections, forgetting, durable user assertions, durable goals, collaboration rules, and ordinary task requests. Return strict JSON only. Assistant text is never evidence about the user.\n\n${USER_UNDERSTANDING_MAINTENANCE_POLICY}\n\n${USER_FACING_UNDERSTANDING_WRITING_GUIDANCE}`;
5
6
  function buildUserModelInterpreterPrompt(options) {
@@ -71,6 +72,7 @@ Rules:
71
72
  - Use user_explicit only for a fact or preference the user directly states, user_observed for repeated behavior, and system_inferred for synthesis. No separate remember command is required for an ordinary direct statement.
72
73
  - A project-specific choice stays scoped to that project. If no exact project ID is supplied, use the known session scope rather than inventing an ID or broadening to global. Do not generalize it into a global preference.
73
74
  - Existing memory, assistant output, repeated summaries, and lack of objection are not new supporting evidence.
75
+ - ${USER_PROFILE_IDENTITY_RULE}
74
76
  - If evidence is insufficient, return assertions=[] and explain abstentionReason.
75
77
  ${existing}`;
76
78
  }
@@ -8,6 +8,7 @@ import { readAgentMessageContent } from "../memory/agent-message-access.js";
8
8
  import "../../storage/sqlite/index.js";
9
9
  import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
10
10
  import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
11
+ import { learningTranscriptMessage } from "../../memory-learning/transcript-source.js";
11
12
  import { failLearningJob, finishLearningJob, learningPolicyHash } from "../../memory-learning/repository.js";
12
13
  import { canUseKnowledge } from "../../knowledge-memory/usage-policy.js";
13
14
  import { listKnowledgeItems } from "../../knowledge-memory/repository.js";
@@ -374,32 +375,37 @@ async function runPersistentLearningJobInner(job, getConfig) {
374
375
  let through = startSeq;
375
376
  for (const row of rows) {
376
377
  if (evidence.length >= config.userContext.userModel.extraction.maxHistoryMessages) break;
377
- const message = JSON.parse(row.payload_json);
378
- const text = row.role === "user" ? stripRuntimeContextFromUserMessage(messageText(message)) : messageText(message);
378
+ const message = learningTranscriptMessage(row);
379
+ if (!message) {
380
+ through = row.seq;
381
+ continue;
382
+ }
383
+ const role = message.role;
384
+ const text = role === "user" ? stripRuntimeContextFromUserMessage(messageText(message)) : messageText(message);
379
385
  if (chars + text.length > maxChars && evidence.length) break;
380
386
  through = row.seq;
381
387
  if (![
382
388
  "user",
383
389
  "assistant",
384
390
  "toolResult"
385
- ].includes(row.role)) continue;
391
+ ].includes(role)) continue;
386
392
  const sourceContexts = message.metadata?.sourceContexts;
387
393
  if (Array.isArray(sourceContexts) && sourceContexts.length > 0) {
388
394
  const raw = messageText(message);
389
395
  const wrapped = /<source_contexts>[\s\S]*<\/source_contexts>\s*<user_message>\r?\n[\s\S]*\r?\n<\/user_message>\s*$/u.test(raw);
390
- if (row.role !== "user" || !wrapped || raw === text || /<source_contexts>|<\/?user_message>/u.test(text)) continue;
396
+ if (role !== "user" || !wrapped || raw === text || /<source_contexts>|<\/?user_message>/u.test(text)) continue;
391
397
  }
392
- if (row.role === "toolResult" && /(?:memory|user_context|knowledge|session|history|recall)/i.test(message.toolName ?? "")) continue;
398
+ if (role === "toolResult" && /(?:memory|user_context|knowledge|session|history|recall)/i.test(message.toolName ?? "")) continue;
393
399
  if (text.length > maxChars || /<xopc_user_context>|<xopc_task_execution>|<user-context>/.test(text)) continue;
394
400
  chars += text.length;
395
401
  evidence.push({
396
402
  ref: row.entry_id,
397
- role: row.role,
403
+ role,
398
404
  text,
399
405
  createdAt: row.created_at,
400
406
  message: {
401
407
  role: "user",
402
- content: `[source_role:${row.role}]\n${text}`,
408
+ content: `[source_role:${role}]\n${text}`,
403
409
  timestamp: row.created_at
404
410
  }
405
411
  });
@@ -4,8 +4,8 @@ import { canUseKnowledge } from "../../knowledge-memory/usage-policy.js";
4
4
  import { listKnowledgeItems, searchKnowledgeItems } from "../../knowledge-memory/repository.js";
5
5
  import "../../knowledge-memory/index.js";
6
6
  import { listUserAssertions } from "../../user-model/repository.js";
7
- import { calculateExecutionValue } from "../../user-model/importance.js";
8
7
  import { canUseAssertion } from "../../user-model/usage-policy.js";
8
+ import { calculateExecutionValue } from "../../user-model/importance.js";
9
9
  import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
10
10
  import { getExecutionContextFeedbackScores } from "./audit.js";
11
11
  import { buildUserContextBlock } from "../memory/context-fence.js";
@@ -3,8 +3,8 @@ import { init_request_repository, personalRequestForExecution } from "../../pers
3
3
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
4
4
  import { init_session_repository } from "../../storage/sqlite/session-repository.js";
5
5
  import { isPersonalConversation } from "../../personal-agent/repository.js";
6
- import { PERSONAL_MAIN_TOOL_IDS } from "../../personal-agent/policy.js";
7
6
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
7
+ import { PERSONAL_MAIN_TOOL_IDS } from "../../personal-agent/policy.js";
8
8
  //#region src/agent/embedded/execution-tool-policy.ts
9
9
  init_request_repository();
10
10
  init_connection();
@@ -1,8 +1,13 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
+ import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
3
4
  import { parseTurnOutcome } from "../../../packages/gateway-contract/src/turn-outcome.js";
4
5
  import { init_src } from "../../../packages/gateway-contract/src/index.js";
6
+ import { findSessionInputByRunId, init_session_input_repository } from "../../storage/sqlite/session-input-repository.js";
7
+ import { init_voice_transcript, isNaturalVoiceDelegation } from "../../session/voice-transcript.js";
8
+ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
5
9
  import { evaluateContextBudget } from "../memory/context-budget.js";
10
+ import "../../storage/sqlite/index.js";
6
11
  import { assertProviderUsage, getModelUsageOrigin, init_model_usage, isProviderUsageScopeError } from "../../providers/model-usage.js";
7
12
  import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
8
13
  import { init_providers, resolveModel } from "../../providers/index.js";
@@ -17,6 +22,7 @@ import { prepareNativeMcpConfig } from "../mcp/native-mcp.js";
17
22
  import { boundAutomationMcpSource, restrictAutomationMcpConfig } from "../../automations/mcp-source.js";
18
23
  import { resolvePromptCachePolicy } from "../../providers/prompt-cache-plan.js";
19
24
  import { materializeNativeExternalTools } from "./external-tool-discovery.js";
25
+ import { projectVoiceHistory } from "../prompt/voice-history.js";
20
26
  import { assessContext, recoverContext as recoverContext$1 } from "../memory/context-recovery.js";
21
27
  import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
22
28
  import { runXopcEmbeddedTurn } from "./run-turn.js";
@@ -24,12 +30,15 @@ import { projectTurnOutcome } from "../../session/turn-outcome-projector.js";
24
30
  import { assertPluginMcpCallAccess, schedulePluginRuntimeAccessRefresh } from "../../extensions/agent-plugins/refresh-runtime-access.js";
25
31
  import { connectionObjectiveContext } from "../context/connection-objective-context.js";
26
32
  import { voicePresentationPrompt } from "../prompt/voice-presentation.js";
33
+ import { createVoiceChatPublicationTool, publishVoiceChatMessage, voiceChatPublicationInstructions } from "../../voice/realtime/chat-publication.js";
27
34
  import { applyStartupContextToUserMessage } from "../reply/apply-turn-user-enrichment.js";
28
35
  import { AgentRunSupervisor } from "../orchestration/agent-run-supervisor.js";
29
36
  import { getTaskContinuation, getTaskExecutionDeadline } from "../../tasks/task-continuation.js";
30
37
  import crypto from "node:crypto";
31
38
  //#region src/agent/embedded/run-for-session.ts
32
39
  init_model_usage();
40
+ init_voice_transcript();
41
+ init_session_input_repository();
33
42
  init_src();
34
43
  init_logger();
35
44
  init_providers();
@@ -52,6 +61,9 @@ async function runEmbeddedTurnForSessionInner(params) {
52
61
  let idleJob;
53
62
  let turnCompleted = false;
54
63
  const runId = params.runId ?? crypto.randomUUID();
64
+ const voiceTranscriptId = params.presentation === "voice" && isXopcDatabaseOpen() ? getSessionMetadata(conversationId)?.transcriptId : void 0;
65
+ let voiceToolExecuted = false;
66
+ let voiceContentPublished = false;
55
67
  const taskContinuation = getTaskContinuation(conversationId, runId);
56
68
  const config = params.getConfig?.();
57
69
  if (config) setTraceIdentity({ agentId: resolveEffectiveAgentProfileForSession(conversationId).agentId });
@@ -83,6 +95,23 @@ async function runEmbeddedTurnForSessionInner(params) {
83
95
  deadlineAtMs: supervisor.deadlineAtMs
84
96
  }, result.ok ? "Agent run completed" : `Agent run ended: ${result.errorMessage ?? "unknown failure"}`);
85
97
  turnCompleted = result.ok && result.stopReason !== "connection_required" && result.stopReason !== "clarification_required" && result.stopReason !== "phone_assistance_required";
98
+ if (voiceTranscriptId && (isNaturalVoiceDelegation(findSessionInputByRunId(conversationId, runId)) || voiceToolExecuted && !voiceContentPublished)) {
99
+ const text = result.ok ? result.lastAssistantText : result.terminationReason === "user_cancelled" || result.terminationReason === "parent_cancelled" ? config?.voice?.language === "en" ? "The task was cancelled. Actions already completed remain in effect." : "刚才的任务已取消,已完成的操作不会撤销。" : config?.voice?.language === "en" ? "The task could not be completed. We can review the issue here." : "刚才的任务未能完成,可以在这里继续处理。";
100
+ if (text?.trim() && text.trim() !== "NO_REPLY") try {
101
+ await publishVoiceChatMessage(sessionStore, conversationId, voiceTranscriptId, {
102
+ text: text.length <= 16e3 ? text : `${text.slice(0, 15900)}\n\n${config?.voice?.language === "en" ? "[Long result excerpted.]" : "(结果较长,此处为节选。)"}`,
103
+ publicationId: `voice-result:${runId}`,
104
+ source: "agent_result",
105
+ turnId: runId
106
+ });
107
+ } catch (err) {
108
+ log.warn({
109
+ err,
110
+ conversationId,
111
+ runId
112
+ }, "Voice task result could not be shared in Chat");
113
+ }
114
+ }
86
115
  if (result.stopReason === "connection_required" || result.stopReason === "clarification_required" || result.stopReason === "phone_assistance_required") return result;
87
116
  try {
88
117
  const rows = await sessionStore.loadTranscriptRows(conversationId);
@@ -132,22 +161,25 @@ async function runEmbeddedTurnForSessionInner(params) {
132
161
  if (config) schedulePluginRuntimeAccessRefresh(config, agentManager.getResolvedWorkspaceForSession(conversationId), resolveEffectiveAgentProfileForSession(conversationId).agentId);
133
162
  const agent = agentManager.getOrCreateAgent(conversationId);
134
163
  const mm = modelManager;
164
+ const voiceOptions = params.presentation === "voice" ? config?.voice?.realtime?.assistant : void 0;
165
+ const voiceModelRef = voiceOptions?.model;
166
+ const voiceHistoryTokens = params.presentation === "voice" ? voiceOptions?.historyTokens ?? 4e3 : void 0;
135
167
  const configuredModelRef = String(mm.getModelForSession(conversationId));
136
168
  const candidates = typeof mm.getFallbackCandidatesForSession === "function" ? mm.getFallbackCandidatesForSession(conversationId) : [];
137
169
  const effective = config ? resolveEffectiveAgentProfileForSession(conversationId).config : void 0;
138
- const background = getModelUsageOrigin() === "background" && !mm.hasSessionModelOverride?.(conversationId) && configuredModelRef === effective?.models.chat.primary ? effective.models.background : void 0;
139
- const candidateModelRefs = background ? [background.primary, ...background.fallbacks] : candidates.length > 0 ? candidates.map((candidate) => `${candidate.provider}/${candidate.model}`) : [configuredModelRef];
140
- const selectedRef = background?.primary ?? configuredModelRef;
170
+ const background = !voiceModelRef && getModelUsageOrigin() === "background" && !mm.hasSessionModelOverride?.(conversationId) && configuredModelRef === effective?.models.chat.primary ? effective.models.background : void 0;
171
+ const candidateModelRefs = voiceModelRef ? [voiceModelRef] : background ? [background.primary, ...background.fallbacks] : candidates.length > 0 ? candidates.map((candidate) => `${candidate.provider}/${candidate.model}`) : [configuredModelRef];
172
+ const selectedRef = voiceModelRef ?? background?.primary ?? configuredModelRef;
141
173
  assertProviderUsage(selectedRef.split("/")[0]);
142
174
  try {
143
- const selected = !background && typeof mm.getResolvedModelForSession === "function" ? mm.getResolvedModelForSession(conversationId) : resolveModel(selectedRef);
175
+ const selected = !voiceModelRef && !background && typeof mm.getResolvedModelForSession === "function" ? mm.getResolvedModelForSession(conversationId) : resolveModel(selectedRef);
144
176
  assertProviderUsage(selected.provider, selected.baseUrl);
145
177
  } catch (error) {
146
178
  if (isProviderUsageScopeError(error)) throw error;
147
179
  }
148
180
  const resolvedCandidates = [];
149
181
  for (const [index, ref] of candidateModelRefs.entries()) try {
150
- const resolved = !background && index === 0 && typeof mm.getResolvedModelForSession === "function" ? mm.getResolvedModelForSession(conversationId) : resolveModel(ref);
182
+ const resolved = !voiceModelRef && !background && index === 0 && typeof mm.getResolvedModelForSession === "function" ? mm.getResolvedModelForSession(conversationId) : resolveModel(ref);
151
183
  resolvedCandidates.push({
152
184
  ref,
153
185
  model: resolved
@@ -179,8 +211,18 @@ async function runEmbeddedTurnForSessionInner(params) {
179
211
  revision: `${baseToolPolicy.revision}:${source.id}`
180
212
  } : baseToolPolicy;
181
213
  const tools = source ? [] : filterExecutionTools(executionToolPolicy, agent.state.tools);
214
+ if (voiceTranscriptId && !isNaturalVoiceDelegation(findSessionInputByRunId(conversationId, runId))) tools.push(createVoiceChatPublicationTool({
215
+ store: sessionStore,
216
+ conversationId,
217
+ transcriptId: voiceTranscriptId,
218
+ runId,
219
+ onPublished: () => {
220
+ voiceContentPublished = true;
221
+ }
222
+ }));
182
223
  const turnPolicy = agentManager.createAgentTurnPolicy(conversationId);
183
- const systemPrompt = appendDynamicPromptSection([agent.state.systemPrompt ?? "", params.presentation === "voice" ? voicePresentationPrompt : ""].filter(Boolean).join("\n\n"), [
224
+ const thinkingLevel = voiceOptions?.thinkingLevel ?? params.thinkingOverride ?? agent.state.thinkingLevel;
225
+ const systemPrompt = appendDynamicPromptSection([(params.presentation === "voice" && personal ? agentManager.buildVoiceSystemPrompt?.(conversationId, modelRef, thinkingLevel) : void 0) ?? agent.state.systemPrompt ?? "", params.presentation === "voice" ? `${voicePresentationPrompt}\n\n${voiceChatPublicationInstructions}` : ""].filter(Boolean).join("\n\n"), [
184
226
  params.dynamicSystemContext,
185
227
  connectionObjectiveContext(conversationId),
186
228
  source ? `The host pinned this automation to MCP server ${source.serverId} and tools ${JSON.stringify(source.tools.map((tool) => tool.name))}. Use these exact tools for the requested read. No other external source, configuration change or local file/shell fallback is permitted. An answer without a successful pinned tool call will fail verification.` : ""
@@ -220,7 +262,6 @@ async function runEmbeddedTurnForSessionInner(params) {
220
262
  if (committed && isCurrent()) agentManager.removeAgent(conversationId);
221
263
  return committed ? "committed" : "stale";
222
264
  };
223
- const thinkingLevel = params.thinkingOverride ?? agent.state.thinkingLevel;
224
265
  const workspaceDir = agentManager.getResolvedWorkspaceForSession(conversationId);
225
266
  if (executionToolPolicy.externalMaterialization) tools.push(...await materializeNativeExternalTools({
226
267
  conversationId,
@@ -249,6 +290,7 @@ async function runEmbeddedTurnForSessionInner(params) {
249
290
  }
250
291
  try {
251
292
  await maybeAutoCompactBeforeTurn({
293
+ voiceHistoryTokens,
252
294
  conversationId,
253
295
  sessionStore,
254
296
  agentManager,
@@ -299,8 +341,10 @@ async function runEmbeddedTurnForSessionInner(params) {
299
341
  break;
300
342
  }
301
343
  const rowsBeforeAttempt = hasNextCandidate ? await sessionStore.loadTranscriptRows(conversationId) : void 0;
302
- if (typeof mm.applyResolvedModel === "function") mm.applyResolvedModel(agent, candidateModel, candidateModelRef);
303
- agentManager.setModelForSession(conversationId, candidateModelRef);
344
+ if (isFallbackAttempt) {
345
+ if (typeof mm.applyResolvedModel === "function") mm.applyResolvedModel(agent, candidateModel, candidateModelRef);
346
+ agentManager.setModelForSession(conversationId, candidateModelRef);
347
+ }
304
348
  if (isFallbackAttempt) log.info({
305
349
  conversationId,
306
350
  runId,
@@ -329,6 +373,7 @@ async function runEmbeddedTurnForSessionInner(params) {
329
373
  tools,
330
374
  systemPrompt,
331
375
  thinkingLevel,
376
+ voiceHistoryTokens,
332
377
  codemode: config && executionToolPolicy.codemode ? resolveEffectiveAgentProfileForSession(conversationId).config.runtime.codemode : void 0,
333
378
  mcp,
334
379
  promptCachePolicy,
@@ -340,6 +385,7 @@ async function runEmbeddedTurnForSessionInner(params) {
340
385
  turnPolicy,
341
386
  abortSignal: supervisor.signal,
342
387
  onEvent: (event) => {
388
+ if (event.type === "tool_execution_end" && event.toolName !== "chat_publish") voiceToolExecuted = true;
343
389
  if (event.type === "error") {
344
390
  log.warn({
345
391
  conversationId,
@@ -447,6 +493,17 @@ async function runEmbeddedTurnForSessionInner(params) {
447
493
  async function maybeAutoCompactBeforeTurn(opts) {
448
494
  const { conversationId, sessionStore, agentManager, model, config, systemPrompt, userMessage, tools, imageCount, fallbackModels, abortSignal, onEvent } = opts;
449
495
  const policy = resolveCompactionPolicy(config);
496
+ if (opts.voiceHistoryTokens) {
497
+ if (assessContext({
498
+ messages: projectVoiceHistory([...await sessionStore.load(conversationId), userMessage], opts.voiceHistoryTokens, userMessage.timestamp).messages,
499
+ contextWindow: model.contextWindow ?? 128e3,
500
+ systemPrompt,
501
+ tools,
502
+ imageCount,
503
+ reserveTokens: policy.reserveTokens,
504
+ minToolResultKeepChars: policy.minToolResultKeepChars
505
+ }, policy.maxActiveTranscriptBytes).fits) return;
506
+ }
450
507
  if (policy.enabled && policy.personalIdle.enabled && isPersonalConversation(conversationId)) {
451
508
  if (assessContext({
452
509
  messages: await sessionStore.load(conversationId),
@@ -1,7 +1,9 @@
1
1
  import { createLogger } from "../../utils/logger/index.js";
2
2
  import { init_logger } from "../../utils/logger.js";
3
3
  import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
4
+ import { findSessionInputByRunId, init_session_input_repository } from "../../storage/sqlite/session-input-repository.js";
4
5
  import { init_source_context_projection, projectSourceContextsForLlm } from "../source-context/source-context-projection.js";
6
+ import { VOICE_AGENT_INSTRUCTION_TYPE, init_voice_transcript, isNaturalVoiceDelegation } from "../../session/voice-transcript.js";
5
7
  import { getConnectionResumeInput, init_connection_wait_repository, isConnectionSuspended } from "../../storage/sqlite/connection-wait-repository.js";
6
8
  import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
7
9
  import { init_session_repository } from "../../storage/sqlite/session-repository.js";
@@ -40,6 +42,7 @@ import { wrapStreamFnForXopcExtensions } from "./xopc-stream-bridge.js";
40
42
  import { acquireEmbeddedSessionRunner, evictEmbeddedSessionRunner } from "./session-runner.js";
41
43
  import { configurationCapabilityCorrection } from "./configuration-capability-correction.js";
42
44
  import { createSqliteTranscriptRuntime } from "./transcript-runtime.js";
45
+ import { projectVoiceHistory, voiceHistoryNotice } from "../prompt/voice-history.js";
43
46
  import { assessContext, recoverContext as recoverContext$1 } from "../memory/context-recovery.js";
44
47
  import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
45
48
  import { buildPromptCacheSnapshot, observePromptCacheSnapshot } from "../../providers/prompt-cache-observability.js";
@@ -57,6 +60,8 @@ init_connection_wait_repository();
57
60
  init_logger();
58
61
  init_source_context_projection();
59
62
  init_session_repository();
63
+ init_session_input_repository();
64
+ init_voice_transcript();
60
65
  const log = createLogger("EmbeddedRun");
61
66
  const LOG_PREVIEW_MAX_CHARS = 300;
62
67
  const RECOVERY_READ_TOOLS = new Set([
@@ -490,6 +495,7 @@ async function runXopcEmbeddedTurnInner(params) {
490
495
  };
491
496
  const streamFnWithXopcExtensions = wrapStreamFnForXopcExtensions(session.agent.streamFunction, params.promptCachePolicy);
492
497
  let evidenceProjection;
498
+ let voiceTurnUserTimestamp;
493
499
  const baseTransformContext = session.agent.transformContext;
494
500
  const transformWorkEvidence = async (messages, signal) => {
495
501
  const transformed = await baseTransformContext?.(messages, signal) ?? messages;
@@ -529,6 +535,29 @@ async function runXopcEmbeddedTurnInner(params) {
529
535
  ...context,
530
536
  messages: hygienicMessages
531
537
  };
538
+ if (params.voiceHistoryTokens) {
539
+ voiceTurnUserTimestamp ??= effectiveContext.messages.findLast((message) => message.role === "user")?.timestamp;
540
+ const voiceHistory = projectVoiceHistory(effectiveContext.messages, params.voiceHistoryTokens, voiceTurnUserTimestamp);
541
+ if (voiceHistory.omittedMessages > 0) {
542
+ effectiveContext = {
543
+ ...effectiveContext,
544
+ messages: [...voiceHistory.messages, {
545
+ role: "system",
546
+ content: "",
547
+ sections: { "xopc.voice-history": voiceHistoryNotice },
548
+ timestamp: 0
549
+ }]
550
+ };
551
+ if (firstModelRequestAt === void 0) log.info({
552
+ conversationId,
553
+ runId,
554
+ phase: "voice_history_projection",
555
+ omittedMessages: voiceHistory.omittedMessages,
556
+ retainedMessages: voiceHistory.messages.length,
557
+ historyTokens: params.voiceHistoryTokens
558
+ }, "Projected recent voice history without changing stored transcript");
559
+ }
560
+ }
532
561
  const readAuthorization = originalReadAuthorizationNotice(historyContext, getActiveTranscriptUserText(conversationId) ?? (typeof userMessage === "string" ? userMessage : ""));
533
562
  if (readAuthorization) effectiveContext = {
534
563
  ...effectiveContext,
@@ -1005,7 +1034,12 @@ async function runXopcEmbeddedTurnInner(params) {
1005
1034
  else {
1006
1035
  const text = userMessageToPromptText(userMessage);
1007
1036
  const images = params.images ?? [];
1008
- await session.prompt(text, images.length > 0 ? { images } : void 0);
1037
+ if (isNaturalVoiceDelegation(params.voiceHistoryTokens && isXopcDatabaseOpen() ? findSessionInputByRunId(conversationId, runId) : void 0)) await session.sendCustomMessage({
1038
+ customType: VOICE_AGENT_INSTRUCTION_TYPE,
1039
+ content: text,
1040
+ display: false
1041
+ }, { triggerTurn: true });
1042
+ else await session.prompt(text, images.length > 0 ? { images } : void 0);
1009
1043
  }
1010
1044
  await session.agent.waitForIdle();
1011
1045
  clarificationStopped ||= isClarificationSuspended(conversationId, runId);
@@ -5,6 +5,7 @@ import { type TranscriptUserMessage } from '../inbound/attachment-pipeline.js';
5
5
  export type EmbeddedSteerOptions = {
6
6
  images?: ImageContent[];
7
7
  transcriptMessage?: TranscriptUserMessage;
8
+ voiceAgentInstruction?: boolean;
8
9
  };
9
10
  export type EmbeddedRunIdentity = {
10
11
  conversationId: string;
@@ -1,6 +1,8 @@
1
+ import { VOICE_AGENT_INSTRUCTION_TYPE, init_voice_transcript } from "../../session/voice-transcript.js";
1
2
  import { AgentRunCancelledError } from "../orchestration/run-termination.js";
2
3
  import { registerSteeringTranscript } from "../inbound/attachment-pipeline.js";
3
4
  //#region src/agent/embedded/runs.ts
5
+ init_voice_transcript();
4
6
  var EmbeddedRunConflictError = class extends Error {
5
7
  constructor(conversationId, activeRunId) {
6
8
  super(`Session '${conversationId}' already has active embedded run '${activeRunId}'`);
@@ -73,6 +75,17 @@ var EmbeddedRunRegistry = class {
73
75
  const handle = this.getByConversationId(conversationId);
74
76
  if (!handle || expectedRunId !== void 0 && handle.runId !== expectedRunId || this.byConversationId.get(conversationId)?.abortController.signal.aborted) return false;
75
77
  const entry = this.byConversationId.get(conversationId);
78
+ if (options?.voiceAgentInstruction) {
79
+ await handle.session.sendCustomMessage({
80
+ customType: VOICE_AGENT_INSTRUCTION_TYPE,
81
+ content: text,
82
+ display: false
83
+ }, {
84
+ deliverAs: "steer",
85
+ triggerTurn: true
86
+ });
87
+ return true;
88
+ }
76
89
  const transcript = options?.transcriptMessage;
77
90
  const unregister = transcript ? registerSteeringTranscript(conversationId, transcript) : void 0;
78
91
  if (transcript && options?.images?.length) entry.steeringImages.set(transcript, options.images);
@@ -80,6 +80,8 @@ export type RunXopcEmbeddedTurnParams = {
80
80
  tools: import('@earendil-works/pi-agent-core').AgentTool[];
81
81
  systemPrompt: string;
82
82
  thinkingLevel?: ThinkingLevel;
83
+ /** Ephemeral voice history budget; current execution and system instructions are never dropped. */
84
+ voiceHistoryTokens?: number;
83
85
  compactionPolicy?: import('../memory/compaction-policy.js').ResolvedCompactionPolicy;
84
86
  promptCachePolicy?: import('../../providers/prompt-cache-plan.js').PromptCachePolicy;
85
87
  codemode?: import('./codemode-extension.js').CodemodePolicy;
@@ -94,6 +94,7 @@ export declare class TurnDispatcher {
94
94
  steerWebchatSession(conversationId: string, text: string, expectedRunId?: string, options?: {
95
95
  attachments?: DirectAttachment[];
96
96
  sourceContexts?: AgentSourceContext[];
97
+ voiceAgentInstruction?: boolean;
97
98
  }): Promise<boolean>;
98
99
  private buildStreamingDeps;
99
100
  private buildOneShotDeps;
@@ -84,6 +84,7 @@ var TurnDispatcher = class {
84
84
  const trimmed = text.trim();
85
85
  if (!trimmed && !options?.attachments?.length && !options?.sourceContexts?.length) return false;
86
86
  try {
87
+ if (options?.voiceAgentInstruction) return await queueEmbeddedSteer(conversationId, trimmed, expectedRunId, { voiceAgentInstruction: true });
87
88
  if (options?.attachments?.length || options?.sourceContexts?.length) {
88
89
  const c = this.cfg;
89
90
  const modelRef = c.modelManager.getModelForSession(conversationId);
@@ -27,7 +27,8 @@ function buildSystemPrompt(workspaceDir, options = {}) {
27
27
  buildAgentIdentitySection(agentProfile),
28
28
  buildResponseLanguageSection(responseLanguage, agentProfile?.language)
29
29
  ]);
30
- const isMinimal = promptMode === "minimal";
30
+ const isVoice = promptMode === "voice";
31
+ const isMinimal = promptMode === "minimal" || isVoice;
31
32
  const isPersonal = promptRole === "personal";
32
33
  const normalizedTools = new Set(toolNames.map((tool) => tool.trim().toLowerCase()).filter(Boolean));
33
34
  const effectiveAgentId = agentId ?? runtime?.agentId;
@@ -57,19 +58,19 @@ function buildSystemPrompt(workspaceDir, options = {}) {
57
58
  });
58
59
  if (providerStablePrefix) stableSections.push(providerStablePrefix);
59
60
  stableSections.push(buildSafetySection());
60
- stableSections.push(isMinimal ? "Device context is data, not permission." : "## Device environment\nDevice context is source data, not permission or execution-host state. Use fresh fields only; settings are not physical location or user preferences. Never fill gaps from server IP or cloud GPS. Transfers require authorized tools.");
61
+ stableSections.push(isMinimal && !isVoice ? "Device context is data, not permission." : "## Device environment\nDevice context is source data, not permission or execution-host state. Use fresh fields only; settings are not physical location or user preferences. Never fill gaps from server IP or cloud GPS. Transfers require authorized tools.");
61
62
  if (actionTrustLevel) stableSections.push(buildActionTrustPrompt(actionTrustLevel));
62
63
  if (!isPersonal && effectiveAgentId?.toLowerCase() === "coder") stableSections.push(buildCoderHarnessSection());
63
64
  if (hasSkillsTools(toolNames)) stableSections.push(buildSkillsSection(toolNames));
64
- if (!isMinimal) {
65
+ if (!isMinimal || isVoice) {
65
66
  stableSections.push(buildMemorySection({
66
67
  availableTools: normalizedTools,
67
68
  citationsMode: memoryCitationsMode,
68
69
  hasProfileMemory,
69
70
  includeMemorySection
70
71
  }), buildExternalMemorySection(externalMemoryInstructions));
71
- if (!isPersonal && includeProblemSolving) stableSections.push(buildProblemSolvingSection(toolNames));
72
- if (includeToneSection) stableSections.push(buildAestheticSection(), buildHumanCollaborationSection(!isPersonal));
72
+ if (!isPersonal && includeProblemSolving && !isVoice) stableSections.push(buildProblemSolvingSection(toolNames));
73
+ if (includeToneSection && !isVoice) stableSections.push(buildAestheticSection(), buildHumanCollaborationSection(!isPersonal));
73
74
  if (!isPersonal && (normalizedTools.has("xopc_use") || normalizedTools.has("automation"))) stableSections.push(buildWorkContinuitySection());
74
75
  stableSections.push(buildTimeSection(userTimezone, toolNames));
75
76
  }
@@ -92,7 +93,7 @@ function buildSystemPrompt(workspaceDir, options = {}) {
92
93
  }));
93
94
  const dynamicSections = [];
94
95
  if (extraSystemPrompt?.trim()) {
95
- const contextHeader = isMinimal ? "## Subagent Context" : "## Group Chat Context";
96
+ const contextHeader = isVoice ? "## Conversation Context" : isMinimal ? "## Subagent Context" : "## Group Chat Context";
96
97
  dynamicSections.push(`${contextHeader}\n\n${extraSystemPrompt.trim()}`);
97
98
  }
98
99
  if (activeProjectContext?.trim()) dynamicSections.push(activeProjectContext.trim());
@@ -3,9 +3,10 @@
3
3
  *
4
4
  * - "full": All sections (default, for main agent)
5
5
  * - "minimal": Reduced sections (subagents, automations)
6
+ * - "voice": Spoken interaction with identity, trust, memory and coordination retained
6
7
  * - "none": Just basic identity line, no sections
7
8
  */
8
- export type PromptMode = 'full' | 'minimal' | 'none';
9
+ export type PromptMode = 'full' | 'minimal' | 'voice' | 'none';
9
10
  /** Runtime responsibility, independent of prompt verbosity or the Agent's name. */
10
11
  export type PromptRole = 'personal' | 'executor';
11
12
  /** Controls the generic silent-reply section. Channel-aware callers can set "none". */
@@ -0,0 +1,9 @@
1
+ /** Ephemeral request projection; complete user turns and current tool execution stay intact. */
2
+ export declare function projectVoiceHistory<T extends {
3
+ role: string;
4
+ timestamp?: number;
5
+ }>(messages: readonly T[], historyTokens: number, currentUserTimestamp?: number): {
6
+ messages: T[];
7
+ omittedMessages: number;
8
+ };
9
+ export declare const voiceHistoryNotice = "This live voice request includes recent complete turns and the entire current execution. Earlier conversation is still stored, but is not all in this request. Use the available conversation recall/search tools for missing past details. Do not guess earlier facts or treat omitted history as deleted.";
@@ -0,0 +1,35 @@
1
+ import { estimateMessageTokens, estimateTextTokens } from "../memory/context-budget.js";
2
+ //#region src/agent/prompt/voice-history.ts
3
+ /** Ephemeral request projection; complete user turns and current tool execution stay intact. */
4
+ function projectVoiceHistory(messages, historyTokens, currentUserTimestamp) {
5
+ const userIndexes = messages.flatMap((message, index) => message.role === "user" ? [index] : []);
6
+ if (!userIndexes.length) return {
7
+ messages: [...messages],
8
+ omittedMessages: 0
9
+ };
10
+ const protectedFrom = (currentUserTimestamp === void 0 ? void 0 : userIndexes.find((index) => messages[index].timestamp === currentUserTimestamp)) ?? userIndexes.at(-1);
11
+ let start = protectedFrom;
12
+ const cost = (message) => message.role === "system" ? 0 : message.role === "compactionSummary" || message.role === "branchSummary" ? estimateTextTokens(JSON.stringify(message)) + 12 : estimateMessageTokens(message);
13
+ let used = messages.slice(start).reduce((sum, message) => sum + cost(message), 0);
14
+ for (let i = userIndexes.indexOf(protectedFrom) - 1; i >= 0; i--) {
15
+ const candidate = userIndexes[i];
16
+ const tokens = messages.slice(candidate, start).reduce((sum, message) => sum + cost(message), 0);
17
+ if (used + tokens > historyTokens) break;
18
+ start = candidate;
19
+ used += tokens;
20
+ }
21
+ if (used + messages.slice(0, start).reduce((sum, message) => sum + cost(message), 0) <= historyTokens) return {
22
+ messages: [...messages],
23
+ omittedMessages: 0
24
+ };
25
+ const summary = messages.slice(0, start).findLast((message) => message.role === "compactionSummary" || message.role === "branchSummary");
26
+ const retainSummary = summary && used + cost(summary) <= historyTokens;
27
+ const projected = messages.filter((message, index) => index >= start || message.role === "system" || retainSummary && message === summary);
28
+ return {
29
+ messages: projected,
30
+ omittedMessages: messages.length - projected.length
31
+ };
32
+ }
33
+ const voiceHistoryNotice = "This live voice request includes recent complete turns and the entire current execution. Earlier conversation is still stored, but is not all in this request. Use the available conversation recall/search tools for missing past details. Do not guess earlier facts or treat omitted history as deleted.";
34
+ //#endregion
35
+ export { projectVoiceHistory, voiceHistoryNotice };
@@ -1,2 +1,2 @@
1
1
  /** Per-turn presentation only; never persisted as a user message or Agent identity. */
2
- export declare const voicePresentationPrompt = "This turn is a live voice conversation in the same Chat.\nLead with the useful answer. Prefer one to three natural spoken sentences unless the user asks for detail.\nAllow silence. Do not repeatedly greet, recap unrelated old tasks, or end every reply with a question.\nFor work, briefly say what you are doing, use the available tools, then report the actual result.\nKeep code, long URLs, tables and detailed reference material in Chat; introduce them with a short spoken explanation.\nDo not imply a task continues in the background unless an existing task actually started it.\nAsk ordinary follow-up questions directly in speech, then let the user answer in the next turn; do not use a blocking clarification form. Keep formal action approvals in the existing approval mechanism. A background sound or ambiguous interjection is not permission for an action.\nStopping speech does not undo a completed tool action. State consequential results accurately.";
2
+ export declare const voicePresentationPrompt = "This turn is a live voice conversation in the same Chat.\nLead with the useful answer. Prefer one to three natural spoken sentences unless the user asks for detail.\nMake the first clause short and meaningful, with an early natural pause. Start with the answer or the specific action, not a generic acknowledgement. Do not expose hidden reasoning in speech.\nAllow silence. Do not repeatedly greet, recap unrelated old tasks, or end every reply with a question.\nFor work, briefly say what you are doing, use the available tools, then report the actual result.\nKeep code, long URLs, tables and detailed reference material in Chat; introduce them with a short spoken explanation.\nDo not imply a task continues in the background unless an existing task actually started it.\nAsk ordinary follow-up questions directly in speech, then let the user answer in the next turn; do not use a blocking clarification form. Keep formal action approvals in the existing approval mechanism. A background sound or ambiguous interjection is not permission for an action.\nStopping speech does not undo a completed tool action. State consequential results accurately.";
@@ -2,6 +2,7 @@
2
2
  /** Per-turn presentation only; never persisted as a user message or Agent identity. */
3
3
  const voicePresentationPrompt = `This turn is a live voice conversation in the same Chat.
4
4
  Lead with the useful answer. Prefer one to three natural spoken sentences unless the user asks for detail.
5
+ Make the first clause short and meaningful, with an early natural pause. Start with the answer or the specific action, not a generic acknowledgement. Do not expose hidden reasoning in speech.
5
6
  Allow silence. Do not repeatedly greet, recap unrelated old tasks, or end every reply with a question.
6
7
  For work, briefly say what you are doing, use the available tools, then report the actual result.
7
8
  Keep code, long URLs, tables and detailed reference material in Chat; introduce them with a short spoken explanation.
@@ -13,11 +13,11 @@ import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-t
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
- import "../user-model/index.js";
17
16
  import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
18
17
  import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
19
18
  import { removeSkillsLockEntry } from "./skills/hub-lock.js";
20
19
  import { installSkillFromZip } from "./skills/managed-store.js";
20
+ import "../user-model/index.js";
21
21
  import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
22
22
  import { pullSkillFromSource } from "./skills/hub-pull.js";
23
23
  import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
@@ -10,8 +10,8 @@ import { extractAssistantText, getAssistantMessageErrorReason, isTransientProvid
10
10
  import { canResumeAfterModelFailure } from "../orchestration/turn-recovery.js";
11
11
  import { resolveTaskLocale } from "../../tasks/task-language.js";
12
12
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
13
- import { readWorkspaceRevision } from "../coding/workspace-revision.js";
14
13
  import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
14
+ import { readWorkspaceRevision } from "../coding/workspace-revision.js";
15
15
  import { TaskApplicationService } from "../../tasks/task-application-service.js";
16
16
  import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
17
17
  import { currentTaskResearchResult } from "../../tasks/task-research-result.js";
@@ -13,8 +13,8 @@ import { getConversationRouting } from "../../storage/sqlite/conversation-reposi
13
13
  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
- import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
17
16
  import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
17
+ import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
18
18
  import { PERSONAL_REQUEST_TOOL_IDS, TASK_EXECUTION_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
19
19
  import { getPhoneRuntime, phoneExecutionContext } from "../../phone/runtime.js";
20
20
  import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
@@ -291,7 +291,11 @@ function createImageGenerateTool(options) {
291
291
  return {
292
292
  content: [{
293
293
  type: "text",
294
- text: [`Generated and attached ${paths.length} image(s) with ${result.provider}/${result.model}.`, ...paths.map((p) => `Saved: ${p}`)].join("\n")
294
+ text: [
295
+ `Generated and published ${paths.length} image(s) with ${result.provider}/${result.model}.`,
296
+ "In a Task, select the returned artifact IDs in publish_task_result.finalArtifactIds for final delivery. Publication alone does not confirm delivery to the originating chat.",
297
+ ...paths.map((p) => `Saved: ${p}`)
298
+ ].join("\n")
295
299
  }],
296
300
  details: {
297
301
  provider: result.provider,