@xopcai/xopc 0.0.302 → 0.0.306

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 (364) hide show
  1. package/README.md +4 -4
  2. package/README.zh-CN.md +4 -4
  3. package/dist/browser-ext/dist/assets/{auth-B_9ZuGDx.js → auth-C3yV1y_l.js} +67 -22
  4. package/dist/browser-ext/dist/background.js +4 -4
  5. package/dist/browser-ext/dist/sidepanel.html +1 -1
  6. package/dist/browser-ext/dist/sidepanel.js +3 -3
  7. package/dist/browser-ext/manifest.json +1 -1
  8. package/dist/extensions/feishu/xopc.extension.json +0 -3
  9. package/dist/extensions/telegram/xopc.extension.json +1 -4
  10. package/dist/extensions/weixin/xopc.extension.json +0 -3
  11. package/dist/gateway/static/root/assets/{activity-store-DCi5rh4e.js → activity-store-DLtim-_I.js} +1 -1
  12. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C0zP6W2B.js → agent-avatar-dicebear-iQXtiilH.js} +1 -1
  13. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CxOv4ivK.js +1 -0
  14. package/dist/gateway/static/root/assets/agents-DzKx7z3k.js +1 -0
  15. package/dist/gateway/static/root/assets/{api-CAV9PN9i.js → api-DfSU0-lD.js} +1 -1
  16. package/dist/gateway/static/root/assets/api-gpHh07OL.js +1 -0
  17. package/dist/gateway/static/root/assets/app-management-settings-panel-BpYFKz7B.js +1 -0
  18. package/dist/gateway/static/root/assets/{appearance-settings-ZFjV_opr.js → appearance-settings-BQfR5vrq.js} +1 -1
  19. package/dist/gateway/static/root/assets/apps-page-BceB7JHZ.js +1 -0
  20. package/dist/gateway/static/root/assets/{archive-plugin-MaKWrpgC.js → archive-plugin-BxOvZ-ZX.js} +1 -1
  21. package/dist/gateway/static/root/assets/{attachment-load-IfqbP2BN.js → attachment-load-B0FzTMAJ.js} +1 -1
  22. package/dist/gateway/static/root/assets/{automations-page-CeI2NGSO.js → automations-page-BpXuPaPg.js} +1 -1
  23. package/dist/gateway/static/root/assets/automations-workspace-Cn_p8zY_.js +6 -0
  24. package/dist/gateway/static/root/assets/{binary-plugins-jvQ6FaBZ.js → binary-plugins-BP7wfpqy.js} +1 -1
  25. package/dist/gateway/static/root/assets/{block-editor-D4ZIVQbk.css → block-editor-BdOTO0Yo.css} +1 -1
  26. package/dist/gateway/static/root/assets/{block-editor-B7U3qlB3.js → block-editor-oMLvdnOQ.js} +3 -3
  27. package/dist/gateway/static/root/assets/{browser-automation-inputs-BGT0xoTv.js → browser-automation-inputs-DTxSZ00u.js} +1 -1
  28. package/dist/gateway/static/root/assets/{browser-automations-page-DvLAwoiQ.js → browser-automations-page-IbJnwEY4.js} +2 -2
  29. package/dist/gateway/static/root/assets/browser-settings-page-CCUO3G23.js +3 -0
  30. package/dist/gateway/static/root/assets/button-CS04eWY9.js +1 -0
  31. package/dist/gateway/static/root/assets/capabilities-settings-panel-BjMb5H2_.js +8 -0
  32. package/dist/gateway/static/root/assets/channels-settings-P22-_i13.js +1 -0
  33. package/dist/gateway/static/root/assets/{channels-status-swr-C_icwbWj.js → channels-status-swr-D2AmAoty.js} +1 -1
  34. package/dist/gateway/static/root/assets/{chat-terminal-dock-BtL71IOs.js → chat-terminal-dock-B-yI3Mi1.js} +2 -2
  35. package/dist/gateway/static/root/assets/{computer-settings-page-Bu6ZJtmS.js → computer-settings-page-CWx_jnng.js} +1 -1
  36. package/dist/gateway/static/root/assets/connectors-page-BLgPORmH.js +2 -0
  37. package/dist/gateway/static/root/assets/cron-expression-DMRRL4Zg.js +2 -0
  38. package/dist/gateway/static/root/assets/date-picker-BSwL0e6E.js +1 -0
  39. package/dist/gateway/static/root/assets/{dependency-picker-BNugauiZ.js → dependency-picker-BQTspLzC.js} +1 -1
  40. package/dist/gateway/static/root/assets/{desktop-pet-DTy_3-OY.js → desktop-pet-C3lFxDF6.js} +1 -1
  41. package/dist/gateway/static/root/assets/desktop-pet-settings-Y8pjpXFE.js +1 -0
  42. package/dist/gateway/static/root/assets/device-pairing-wizard-DM4_GMzo.js +1 -0
  43. package/dist/gateway/static/root/assets/{extension-debug-page-C3F7RiGW.js → extension-debug-page-CVGiGVcR.js} +1 -1
  44. package/dist/gateway/static/root/assets/{extension-page-C0jhcCT_.js → extension-page-g3JtCP_y.js} +1 -1
  45. package/dist/gateway/static/root/assets/{extension-settings-page-CNvJQkrr.js → extension-settings-page-CjpoKV1f.js} +1 -1
  46. package/dist/gateway/static/root/assets/{gateway-config-swr-D5AM8cyQ.js → gateway-config-swr-BSvXXpKM.js} +1 -1
  47. package/dist/gateway/static/root/assets/gateway-realtime-BDCpS7U1.js +1 -0
  48. package/dist/gateway/static/root/assets/gateway-realtime-store-BGmP1obI.js +1 -0
  49. package/dist/gateway/static/root/assets/gateway-settings-CYG9WCZn.js +1 -0
  50. package/dist/gateway/static/root/assets/{gateway-startup-retry-CSJWdnFs.js → gateway-startup-retry-Caf8g3sC.js} +1 -1
  51. package/dist/gateway/static/root/assets/{heartbeat-settings-Cd1VJsHe.js → heartbeat-settings-Cl834-SS.js} +1 -1
  52. package/dist/gateway/static/root/assets/home-page-CB_XVtIM.js +1 -0
  53. package/dist/gateway/static/root/assets/{image-generation-api-BNh604hw.js → image-generation-api-BwEWBUVC.js} +1 -1
  54. package/dist/gateway/static/root/assets/imports-page-CoMlgSIA.js +1 -0
  55. package/dist/gateway/static/root/assets/index-CI37dTAn.css +1 -0
  56. package/dist/gateway/static/root/assets/index-Do9MltC4.js +79 -0
  57. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-CNq5D4pe.js +1 -0
  58. package/dist/gateway/static/root/assets/local-app-workbench-page-BxQlEje6.js +2 -0
  59. package/dist/gateway/static/root/assets/{local-apps-page-DyrFxW3G.js → local-apps-page-DQnRA598.js} +1 -1
  60. package/dist/gateway/static/root/assets/{locale-store-DLK05Y1a.js → locale-store-D16nmbaN.js} +1 -1
  61. package/dist/gateway/static/root/assets/logs-page-CT5GrcMs.js +2 -0
  62. package/dist/gateway/static/root/assets/management-settings-DKcO5fQ-.js +1 -0
  63. package/dist/gateway/static/root/assets/{markdown-view-B8maDRWh.js → markdown-view-DCp4BlZP.js} +2 -2
  64. package/dist/gateway/static/root/assets/{media-plugins-5DakFba_.js → media-plugins-Cy64sn_C.js} +1 -1
  65. package/dist/gateway/static/root/assets/messages-C-9oo69N.js +3 -0
  66. package/dist/gateway/static/root/assets/note-detail-panel-5dc3LKTL.js +5 -0
  67. package/dist/gateway/static/root/assets/notes-page-AbwxgXuG.js +8 -0
  68. package/dist/gateway/static/root/assets/{page-tabs-DzJpglJJ.js → page-tabs-CgEoHSVT.js} +1 -1
  69. package/dist/gateway/static/root/assets/{popover-select-DldSX8GX.js → popover-select-9i-ZtHXL.js} +1 -1
  70. package/dist/gateway/static/root/assets/{preview-open-alternatives-Dj6LJsuQ.js → preview-open-alternatives-Ck2uKTbf.js} +1 -1
  71. package/dist/gateway/static/root/assets/{proactive-page-CwudBdrQ.js → proactive-page-Dr1mCJhZ.js} +1 -1
  72. package/dist/gateway/static/root/assets/{product-open-page-CujZXOea.js → product-open-page-DbZvJ5GE.js} +1 -1
  73. package/dist/gateway/static/root/assets/project-detail-page-DnE1zI1c.js +1 -0
  74. package/dist/gateway/static/root/assets/projects-page-BD0nLYxk.js +1 -0
  75. package/dist/gateway/static/root/assets/{registry-api-BMFL4vis.js → registry-api-DcQdwpPu.js} +1 -1
  76. package/dist/gateway/static/root/assets/remote-access-hub-TYuE6A3S.js +1 -0
  77. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DV554qyN.js → runtime-tools-settings-panel-CPwdgWKo.js} +2 -2
  78. package/dist/gateway/static/root/assets/{schema-form-Bh2Er67B.js → schema-form-8psK4cFO.js} +1 -1
  79. package/dist/gateway/static/root/assets/sessions-page-BcWDQQFX.js +1 -0
  80. package/dist/gateway/static/root/assets/settings-advanced-gate-DzGQX6Hq.js +1 -0
  81. package/dist/gateway/static/root/assets/{settings-form-section-BsdM7P1d.js → settings-form-section-D_Gsz5rl.js} +1 -1
  82. package/dist/gateway/static/root/assets/{settings-page-3yEAqoME.js → settings-page-C_Tj_mkZ.js} +1 -1
  83. package/dist/gateway/static/root/assets/setup-status-panel-CE2X89qN.js +1 -0
  84. package/dist/gateway/static/root/assets/share-preview-page-B_M_oPsT.js +2 -0
  85. package/dist/gateway/static/root/assets/shares-settings-BL4H9Iym.js +1 -0
  86. package/dist/gateway/static/root/assets/skill-reload-api-WMKIgUOp.js +1 -0
  87. package/dist/gateway/static/root/assets/skills-page-DYgwzl5B.js +2 -0
  88. package/dist/gateway/static/root/assets/{skills-page.utils-dHBD7YqU.js → skills-page.utils-Cuh6s2HM.js} +1 -1
  89. package/dist/gateway/static/root/assets/{system-settings-panel-lItR5Kah.js → system-settings-panel-aassGyNb.js} +1 -1
  90. package/dist/gateway/static/root/assets/task-detail-page-BjeRslap.js +1 -0
  91. package/dist/gateway/static/root/assets/theme-store-RUBQBsFP.js +1 -0
  92. package/dist/gateway/static/root/assets/tunnel-api-DJYcPWIV.js +1 -0
  93. package/dist/gateway/static/root/assets/{use-autosave-DO50_g_S.js → use-autosave-QGYG7oMZ.js} +1 -1
  94. package/dist/gateway/static/root/assets/user-model-page-PrRsd4go.js +2 -0
  95. package/dist/gateway/static/root/assets/{voice-api-key-field-k7tWLXzM.js → voice-api-key-field-D1s0gIRW.js} +1 -1
  96. package/dist/gateway/static/root/assets/{voice-config-api-bZqN8-UF.js → voice-config-api-D2goEn5e.js} +1 -1
  97. package/dist/gateway/static/root/assets/{work-discovery-overlay-BHI6gO_u.js → work-discovery-overlay-DkFW9aJ6.js} +1 -1
  98. package/dist/gateway/static/root/assets/workflow-run-setup-panel-BYToUPUY.js +3 -0
  99. package/dist/gateway/static/root/assets/workflows-page-Z8iZe9YP.js +6 -0
  100. package/dist/gateway/static/root/index.html +14 -12
  101. package/dist/package.js +1 -1
  102. package/dist/packages/gateway-contract/src/device-pairing.js +100 -7
  103. package/dist/packages/gateway-contract/src/gateway-scopes.js +53 -0
  104. package/dist/packages/gateway-contract/src/index.js +2 -0
  105. package/dist/packages/realtime-client/src/index.js +14 -2
  106. package/dist/packages/realtime-protocol/src/index.js +18 -14
  107. package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
  108. package/dist/src/agent/agent-manager.d.ts +2 -0
  109. package/dist/src/agent/agent-manager.js +40 -12
  110. package/dist/src/agent/agent-scope.d.ts +4 -1
  111. package/dist/src/agent/agent-scope.js +19 -3
  112. package/dist/src/agent/commands/command-isolation.js +11 -9
  113. package/dist/src/agent/commands/command-registry.js +18 -33
  114. package/dist/src/agent/context/audit.js +12 -2
  115. package/dist/src/agent/context/coordinator.d.ts +13 -3
  116. package/dist/src/agent/context/coordinator.js +27 -11
  117. package/dist/src/agent/context/execution-context.js +42 -22
  118. package/dist/src/agent/context/execution-context.types.d.ts +4 -2
  119. package/dist/src/agent/context/execution-scope.d.ts +2 -2
  120. package/dist/src/agent/context/execution-scope.js +1 -1
  121. package/dist/src/agent/context/project-context.d.ts +2 -2
  122. package/dist/src/agent/context/project-context.js +3 -3
  123. package/dist/src/agent/embedded/run-for-session.d.ts +1 -0
  124. package/dist/src/agent/embedded/run-for-session.js +7 -1
  125. package/dist/src/agent/inbound/attachment-pipeline.d.ts +2 -0
  126. package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
  127. package/dist/src/agent/inbound/inbound-loop.js +1 -0
  128. package/dist/src/agent/inbound/turn-dispatcher.js +3 -3
  129. package/dist/src/agent/mcp/mcp-stdio-transport.js +5 -2
  130. package/dist/src/agent/memory/compaction-promotion.js +7 -2
  131. package/dist/src/agent/memory/create-memory-manager.js +1 -0
  132. package/dist/src/agent/memory/manager.d.ts +6 -0
  133. package/dist/src/agent/memory/manager.js +74 -39
  134. package/dist/src/agent/memory/runtime.d.ts +3 -3
  135. package/dist/src/agent/memory/runtime.js +11 -4
  136. package/dist/src/agent/orchestration/agent-orchestrator.js +4 -1
  137. package/dist/src/agent/prompt/cache-boundary.d.ts +2 -0
  138. package/dist/src/agent/prompt/cache-boundary.js +10 -1
  139. package/dist/src/agent/service/build-direct-message-content.d.ts +1 -0
  140. package/dist/src/agent/service/build-direct-message-content.js +2 -1
  141. package/dist/src/agent/service/direct-turn-helpers.js +3 -2
  142. package/dist/src/agent/service/process-direct-streaming.d.ts +3 -1
  143. package/dist/src/agent/service/process-direct-streaming.js +3 -2
  144. package/dist/src/agent/service/webchat-tts.d.ts +0 -4
  145. package/dist/src/agent/service/webchat-tts.js +20 -19
  146. package/dist/src/agent/tools/factory.js +3 -3
  147. package/dist/src/agent/tools/knowledge-memory-tool.d.ts +2 -2
  148. package/dist/src/agent/tools/knowledge-memory-tool.js +7 -7
  149. package/dist/src/browser/native-messaging-host.js +2 -2
  150. package/dist/src/channels/attachments/voice-stt-webchat.d.ts +3 -0
  151. package/dist/src/channels/attachments/voice-stt-webchat.js +22 -9
  152. package/dist/src/cli/commands/agent.js +2 -0
  153. package/dist/src/cli/commands/config.js +8 -9
  154. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  155. package/dist/src/cli/commands/extension-marketplace.js +69 -44
  156. package/dist/src/cli/commands/extension-pack.js +0 -2
  157. package/dist/src/cli/commands/extension.js +4 -25
  158. package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
  159. package/dist/src/cli/commands/onboard/gateway.js +2 -1
  160. package/dist/src/cli/commands/update.js +1 -1
  161. package/dist/src/cli/utils/init-workspace-core.js +5 -2
  162. package/dist/src/config/index.js +2 -2
  163. package/dist/src/config/loader.d.ts +1 -0
  164. package/dist/src/config/loader.js +14 -1
  165. package/dist/src/config/schema.d.ts +10 -3
  166. package/dist/src/config/schema.js +10 -2
  167. package/dist/src/execution-environments/local-worktree-manager.js +17 -15
  168. package/dist/src/execution-environments/store.js +4 -2
  169. package/dist/src/execution-environments/types.d.ts +3 -0
  170. package/dist/src/execution-environments/types.js +2 -1
  171. package/dist/src/execution-environments/worktree-safety.d.ts +8 -0
  172. package/dist/src/execution-environments/worktree-safety.js +43 -0
  173. package/dist/src/extensions/activation-planner.d.ts +1 -1
  174. package/dist/src/extensions/activation-planner.js +1 -1
  175. package/dist/src/extensions/api-version.d.ts +4 -0
  176. package/dist/src/extensions/api-version.js +15 -0
  177. package/dist/src/extensions/api.d.ts +3 -9
  178. package/dist/src/extensions/api.js +26 -32
  179. package/dist/src/extensions/config-validation.d.ts +8 -0
  180. package/dist/src/extensions/config-validation.js +25 -0
  181. package/dist/src/extensions/extension-registry-impl.d.ts +20 -9
  182. package/dist/src/extensions/extension-registry-impl.js +79 -11
  183. package/dist/src/extensions/hooks.d.ts +1 -1
  184. package/dist/src/extensions/index.d.ts +2 -1
  185. package/dist/src/extensions/install-transaction.d.ts +2 -0
  186. package/dist/src/extensions/install-transaction.js +32 -21
  187. package/dist/src/extensions/install.js +18 -1
  188. package/dist/src/extensions/loader.d.ts +5 -5
  189. package/dist/src/extensions/loader.js +109 -47
  190. package/dist/src/extensions/lockfile.d.ts +3 -5
  191. package/dist/src/extensions/lockfile.js +41 -14
  192. package/dist/src/extensions/normalize-manifest.js +6 -60
  193. package/dist/src/extensions/sdk/index.d.ts +3 -2
  194. package/dist/src/extensions/sdk/index.js +2 -2
  195. package/dist/src/extensions/sdk/testing.js +0 -4
  196. package/dist/src/extensions/security.js +5 -7
  197. package/dist/src/extensions/types/core.d.ts +0 -5
  198. package/dist/src/extensions/types/index.d.ts +1 -1
  199. package/dist/src/extensions/types/manifest.d.ts +1 -25
  200. package/dist/src/extensions/types/providers.d.ts +1 -1
  201. package/dist/src/extensions/types/registration.d.ts +0 -12
  202. package/dist/src/extensions/update.js +71 -30
  203. package/dist/src/gateway/heartbeat/service.js +2 -2
  204. package/dist/src/gateway/hono/lib/config-payload.d.ts +3 -1
  205. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +47 -10
  206. package/dist/src/gateway/hono/routes/devices.js +10 -7
  207. package/dist/src/gateway/hono/routes/endpoint-compatibility.js +6 -0
  208. package/dist/src/gateway/hono/routes/extension-gateway.js +0 -33
  209. package/dist/src/gateway/hono/routes/imports.js +1 -1
  210. package/dist/src/gateway/hono/routes/lazy-bundles.js +0 -1
  211. package/dist/src/gateway/hono/routes/local-apps.js +1 -1
  212. package/dist/src/gateway/hono/routes/realtime.js +30 -8
  213. package/dist/src/gateway/hono/routes/update.js +2 -2
  214. package/dist/src/gateway/hono/routes/user-model.js +25 -6
  215. package/dist/src/gateway/index.js +5 -2
  216. package/dist/src/gateway/lock.d.ts +2 -0
  217. package/dist/src/gateway/lock.js +31 -14
  218. package/dist/src/gateway/run-loop.js +3 -2
  219. package/dist/src/gateway/security/gateway-scopes.d.ts +2 -5
  220. package/dist/src/gateway/security/gateway-scopes.js +3 -45
  221. package/dist/src/gateway/security/index.js +2 -1
  222. package/dist/src/gateway/service/config-coordinator.js +1 -1
  223. package/dist/src/gateway/service.js +11 -7
  224. package/dist/src/heartbeat/index.js +1 -1
  225. package/dist/src/imports/importService.d.ts +1 -1
  226. package/dist/src/imports/inventory.js +16 -2
  227. package/dist/src/imports/productImport.js +5 -5
  228. package/dist/src/imports/types.d.ts +3 -3
  229. package/dist/src/infra/exec.d.ts +2 -2
  230. package/dist/src/infra/exec.js +32 -27
  231. package/dist/src/infra/gateway-processes.js +1 -1
  232. package/dist/src/infra/run-command.js +15 -50
  233. package/dist/src/infra/update-restart.js +1 -1
  234. package/dist/src/infra/update-runner.js +2 -2
  235. package/dist/src/infra/update-startup.js +1 -1
  236. package/dist/src/knowledge/connected-knowledge-pipeline.js +13 -3
  237. package/dist/src/knowledge-memory/domain.d.ts +17 -1
  238. package/dist/src/knowledge-memory/index.js +2 -2
  239. package/dist/src/knowledge-memory/repository.d.ts +26 -4
  240. package/dist/src/knowledge-memory/repository.js +171 -36
  241. package/dist/src/mcp/channel-bridge.js +7 -3
  242. package/dist/src/media-understanding/registry.js +6 -1
  243. package/dist/src/migrations/knowledge-memory-read-policy-config.d.ts +2 -0
  244. package/dist/src/migrations/knowledge-memory-read-policy-config.js +48 -0
  245. package/dist/src/migrations/runner.js +2 -1
  246. package/dist/src/process/bounded-output.d.ts +10 -0
  247. package/dist/src/process/bounded-output.js +41 -0
  248. package/dist/src/process/kill-tree.d.ts +6 -17
  249. package/dist/src/process/kill-tree.js +43 -75
  250. package/dist/src/process/process-spec.d.ts +39 -0
  251. package/dist/src/process/process-spec.js +13 -0
  252. package/dist/src/process/run-process.d.ts +4 -0
  253. package/dist/src/process/run-process.js +97 -0
  254. package/dist/src/providers/plugin-registry.d.ts +1 -1
  255. package/dist/src/providers/plugin-registry.js +6 -0
  256. package/dist/src/realtime/runtime.js +3 -1
  257. package/dist/src/session/store.js +1 -1
  258. package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
  259. package/dist/src/storage/sqlite/index.d.ts +1 -1
  260. package/dist/src/storage/sqlite/index.js +2 -2
  261. package/dist/src/storage/sqlite/migrations/180_execution_environment_ownership.sql +7 -0
  262. package/dist/src/storage/sqlite/migrations/181_knowledge_item_status_events.sql +12 -0
  263. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  264. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  265. package/dist/src/storage/sqlite/schema.js +1 -1
  266. package/dist/src/storage/sqlite/schema.sql +13 -0
  267. package/dist/src/storage/sqlite/transcript-repository.d.ts +4 -0
  268. package/dist/src/storage/sqlite/transcript-repository.js +36 -1
  269. package/dist/src/tui/backends/embedded-backend.d.ts +24 -8
  270. package/dist/src/tui/backends/embedded-backend.js +114 -10
  271. package/dist/src/tui/backends/gateway-realtime-backend.d.ts +18 -0
  272. package/dist/src/tui/backends/gateway-realtime-backend.js +32 -5
  273. package/dist/src/tui/components/assistant-message.d.ts +4 -1
  274. package/dist/src/tui/components/assistant-message.js +10 -2
  275. package/dist/src/tui/components/cell-render-mode.d.ts +4 -0
  276. package/dist/src/tui/components/cell-render-mode.js +1 -0
  277. package/dist/src/tui/components/chat-log.d.ts +17 -4
  278. package/dist/src/tui/components/chat-log.js +68 -50
  279. package/dist/src/tui/components/custom-editor.d.ts +2 -2
  280. package/dist/src/tui/components/custom-editor.js +5 -1
  281. package/dist/src/tui/components/pending-input-preview.d.ts +9 -0
  282. package/dist/src/tui/components/pending-input-preview.js +33 -0
  283. package/dist/src/tui/components/semantic-cell.d.ts +17 -0
  284. package/dist/src/tui/components/semantic-cell.js +29 -0
  285. package/dist/src/tui/components/tool-execution.d.ts +5 -1
  286. package/dist/src/tui/components/tool-execution.js +33 -10
  287. package/dist/src/tui/components/transcript-overlay.d.ts +29 -0
  288. package/dist/src/tui/components/transcript-overlay.js +114 -0
  289. package/dist/src/tui/components/tui-bottom-bar.js +3 -1
  290. package/dist/src/tui/components/user-message.d.ts +5 -1
  291. package/dist/src/tui/components/user-message.js +12 -1
  292. package/dist/src/tui/extension-host/load-extensions.d.ts +1 -1
  293. package/dist/src/tui/extension-host/runtime-context.js +2 -1
  294. package/dist/src/tui/extension-host/runtime.d.ts +1 -1
  295. package/dist/src/tui/format-tui-hotkeys.js +8 -1
  296. package/dist/src/tui/tui-agent-events.js +31 -0
  297. package/dist/src/tui/tui-backend.d.ts +23 -11
  298. package/dist/src/tui/tui-backend.js +1 -9
  299. package/dist/src/tui/tui-chat-input-state.d.ts +25 -0
  300. package/dist/src/tui/tui-chat-input-state.js +36 -0
  301. package/dist/src/tui/tui-command-formatters.js +2 -1
  302. package/dist/src/tui/tui-commands.js +1 -1
  303. package/dist/src/tui/tui-types.d.ts +2 -1
  304. package/dist/src/tui/tui-types.js +2 -1
  305. package/dist/src/tui/tui.js +122 -30
  306. package/dist/src/tui/xopc-tui-keybindings.d.ts +23 -3
  307. package/dist/src/tui/xopc-tui-keybindings.js +22 -2
  308. package/dist/src/user-context/access-policy.d.ts +2 -2
  309. package/dist/src/user-context/access-policy.js +10 -2
  310. package/dist/src/user-context/config.d.ts +23 -6
  311. package/dist/src/user-context/config.js +54 -7
  312. package/dist/src/voice/platform-streams.js +11 -1
  313. package/dist/src/voice/realtime/omniEngine.js +13 -1
  314. package/dist/src/voice/realtime/runtime.js +2 -1
  315. package/dist/src/voice/tts/audio.js +1 -1
  316. package/dist/src/voice/tts/speech-registry.js +6 -1
  317. package/package.json +9 -7
  318. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D0ITeUFb.js +0 -1
  319. package/dist/gateway/static/root/assets/agents-DcfWhk2S.js +0 -1
  320. package/dist/gateway/static/root/assets/api-fPapljyb.js +0 -1
  321. package/dist/gateway/static/root/assets/app-management-settings-panel-U3yDRzKF.js +0 -1
  322. package/dist/gateway/static/root/assets/apps-page-FgMHY1Pr.js +0 -1
  323. package/dist/gateway/static/root/assets/automations-workspace-DxaiBwrD.js +0 -6
  324. package/dist/gateway/static/root/assets/browser-settings-page-CHrfg3BX.js +0 -3
  325. package/dist/gateway/static/root/assets/button-CGlRPNzi.js +0 -1
  326. package/dist/gateway/static/root/assets/capabilities-settings-panel-DpYDPk_o.js +0 -8
  327. package/dist/gateway/static/root/assets/channels-settings-DMq-NBUQ.js +0 -1
  328. package/dist/gateway/static/root/assets/connectors-page-LsEiI9L5.js +0 -2
  329. package/dist/gateway/static/root/assets/cron-expression-B25FHn4w.js +0 -2
  330. package/dist/gateway/static/root/assets/date-picker-CzVHO7z9.js +0 -1
  331. package/dist/gateway/static/root/assets/desktop-pet-settings-CXfnejTb.js +0 -1
  332. package/dist/gateway/static/root/assets/device-pairing-wizard-CxKwfncn.js +0 -1
  333. package/dist/gateway/static/root/assets/gateway-settings-CQTcIvlZ.js +0 -1
  334. package/dist/gateway/static/root/assets/home-page-B_uyfCGq.js +0 -1
  335. package/dist/gateway/static/root/assets/imports-page-DXNfRmk9.js +0 -1
  336. package/dist/gateway/static/root/assets/index-BAqVpc1H.css +0 -1
  337. package/dist/gateway/static/root/assets/index-hlU8MUEz.js +0 -79
  338. package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-CgW5_XVP.js +0 -1
  339. package/dist/gateway/static/root/assets/local-app-workbench-page-C4h3qDRL.js +0 -2
  340. package/dist/gateway/static/root/assets/logs-page-Goy_QHfL.js +0 -2
  341. package/dist/gateway/static/root/assets/management-settings-DgQyGEpR.js +0 -1
  342. package/dist/gateway/static/root/assets/messages-C9h8SImu.js +0 -3
  343. package/dist/gateway/static/root/assets/note-detail-panel-lcZby9NY.js +0 -5
  344. package/dist/gateway/static/root/assets/notes-page-CDGPPI-W.js +0 -8
  345. package/dist/gateway/static/root/assets/project-detail-page-CyAf_sK-.js +0 -1
  346. package/dist/gateway/static/root/assets/projects-page-BW5m_HhZ.js +0 -1
  347. package/dist/gateway/static/root/assets/remote-access-hub-B4JgwB0s.js +0 -1
  348. package/dist/gateway/static/root/assets/sessions-page-D5SmvlQ1.js +0 -1
  349. package/dist/gateway/static/root/assets/settings-advanced-gate-DDALROy_.js +0 -1
  350. package/dist/gateway/static/root/assets/setup-status-panel-BOHNZ-S3.js +0 -1
  351. package/dist/gateway/static/root/assets/share-preview-page-wV056nz2.js +0 -2
  352. package/dist/gateway/static/root/assets/shares-settings-io4NzfJL.js +0 -1
  353. package/dist/gateway/static/root/assets/skill-reload-api-CERFaxLj.js +0 -1
  354. package/dist/gateway/static/root/assets/skills-page-CtwUqvsE.js +0 -2
  355. package/dist/gateway/static/root/assets/task-detail-page-CCKc67a-.js +0 -1
  356. package/dist/gateway/static/root/assets/theme-store-KfFEGMlp.js +0 -1
  357. package/dist/gateway/static/root/assets/tunnel-api-DPyLgmWw.js +0 -1
  358. package/dist/gateway/static/root/assets/user-model-page-CcnGgH1n.js +0 -2
  359. package/dist/gateway/static/root/assets/workflow-run-setup-panel-jEMtNIG8.js +0 -3
  360. package/dist/gateway/static/root/assets/workflows-page-CX4bcAD-.js +0 -6
  361. package/dist/src/extensions/when-context.d.ts +0 -6
  362. package/dist/src/extensions/when-context.js +0 -26
  363. package/dist/src/extensions/when-expression.d.ts +0 -11
  364. package/dist/src/extensions/when-expression.js +0 -213
package/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
  <h1 align="center"><a href="https://xopc.ai">xopc</a></h1>
7
7
 
8
8
  <p align="center">
9
- <strong>Keep what matters moving.</strong><br />
10
- A personal AI on your computer that remembers your goals and context—<br />
11
- and picks up where you left off.
9
+ <strong>Personal AI for the one-person company.</strong><br />
10
+ Remember your goals and context, take action across your tools,<br />
11
+ and pick up where you left off.
12
12
  </p>
13
13
 
14
14
  <p align="center">
@@ -61,7 +61,7 @@
61
61
  - **Reduce the burden, not your agency.** Let xopc carry repeatable execution while you keep intent, judgment, creativity, and final decisions.
62
62
  - **Stay in control.** It is local-first, sources are authorized separately, and high-impact actions such as sending or deleting require confirmation.
63
63
 
64
- **Keep what matters moving.** xopc keeps context, the next action, evidence, and follow-up together, so important work does not disappear when a chat ends.
64
+ **Your context, carried forward.** xopc keeps context, the next action, evidence, and follow-up together, so important work does not disappear when a chat ends. Built for one, it helps you operate with more continuity and capability without giving up control.
65
65
 
66
66
  xopc works from desktop, web, terminal, mobile, Telegram, WeChat, and Feishu/Lark, with your choice of cloud or local models.
67
67
 
package/README.zh-CN.md CHANGED
@@ -6,9 +6,9 @@
6
6
  <h1 align="center"><a href="https://xopc.ai">xopc</a></h1>
7
7
 
8
8
  <p align="center">
9
- <strong>让重要的事持续向前。</strong><br />
10
- 一个运行在你电脑上的个人 AI,记得你的目标和上下文,<br />
11
- 随时从你停下的地方继续。
9
+ <strong>为超级个体打造的个人 AI。</strong><br />
10
+ 记住你的目标与上下文,连接工具采取行动,<br />
11
+ 并随时从上次停下的地方继续。
12
12
  </p>
13
13
 
14
14
  <p align="center">
@@ -61,7 +61,7 @@
61
61
  - **减轻负担,而不是削弱你的主体性。** 让 xopc 接住重复执行,把意图、判断、创造和最终决定留给你。
62
62
  - **始终由你控制。** 本地优先,数据源单独授权,发送、删除等高影响操作需要确认。
63
63
 
64
- **让重要的事持续向前。** xopc 把背景、下一步、结果证据和后续跟进留在一起,让重要的事情不会随着一次对话结束而消失。
64
+ **让你的上下文持续积累。** xopc 把背景、下一步、结果证据和后续跟进留在一起,让重要的事情不会随着一次对话结束而消失。为一个人而生,帮你在保留掌控的同时,获得更持续、更强大的工作能力。
65
65
 
66
66
  xopc 可以在桌面、网页、终端、手机、Telegram、微信和飞书中使用;你也可以选择自己的云端模型或本地模型。
67
67
 
@@ -4782,6 +4782,14 @@ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
4782
4782
  },
4783
4783
  });
4784
4784
  });
4785
+ function object(shape, params) {
4786
+ const def = {
4787
+ type: "object",
4788
+ shape: shape ?? {},
4789
+ ...normalizeParams(params),
4790
+ };
4791
+ return new ZodObject(def);
4792
+ }
4785
4793
  // strictObject
4786
4794
  function strictObject(shape, params) {
4787
4795
  return new ZodObject({
@@ -5295,6 +5303,7 @@ function endpointHelloSigningPayload(payload) {
5295
5303
  const REALTIME_PROTOCOL_VERSION = 2;
5296
5304
  const REALTIME_HEARTBEAT_INTERVAL_MS = 15e3;
5297
5305
  const REALTIME_HEARTBEAT_TIMEOUT_MS = 45e3;
5306
+ const REALTIME_CAPABILITIES = ["realtime.capability-negotiation.v1"];
5298
5307
  const realtimeClientKindSchema = _enum([
5299
5308
  "web",
5300
5309
  "desktop",
@@ -5308,63 +5317,66 @@ const realtimeEventNameSchema = string().regex(/^[a-z][a-z0-9_.-]*$/).max(160);
5308
5317
  const messageIdSchema = uuid();
5309
5318
  const timestampSchema = number().int().nonnegative();
5310
5319
  const sequenceSchema = number().int().positive();
5311
- const envelope = (kind, payload) => strictObject({
5320
+ const capabilitySchema = string().min(1).max(160);
5321
+ const envelope = (kind, payload) => object({
5312
5322
  protocolVersion: literal(REALTIME_PROTOCOL_VERSION),
5313
5323
  messageId: messageIdSchema,
5314
5324
  kind: literal(kind),
5315
5325
  sentAt: timestampSchema,
5316
5326
  payload
5317
5327
  });
5318
- const realtimeSubscriptionSchema = strictObject({
5328
+ const realtimeSubscriptionSchema = object({
5319
5329
  topic: realtimeTopicSchema,
5320
5330
  afterSeq: number().int().nonnegative().optional()
5321
5331
  });
5322
5332
  discriminatedUnion("kind", [
5323
- envelope("realtime.hello", strictObject({
5333
+ envelope("realtime.hello", object({
5324
5334
  ticket: string().min(32).max(512),
5325
5335
  clientId: string().min(1).max(160),
5326
5336
  clientKind: realtimeClientKindSchema,
5327
5337
  subscriptions: array(realtimeSubscriptionSchema).max(100).default([]),
5338
+ capabilities: array(capabilitySchema).max(64).optional(),
5328
5339
  endpoint: endpointHelloPayloadSchema.optional()
5329
5340
  })),
5330
- envelope("realtime.subscribe", strictObject({
5341
+ envelope("realtime.subscribe", object({
5331
5342
  subscriptions: array(realtimeSubscriptionSchema).min(1).max(100)
5332
5343
  })),
5333
- envelope("realtime.unsubscribe", strictObject({
5344
+ envelope("realtime.unsubscribe", object({
5334
5345
  topics: array(realtimeTopicSchema).min(1).max(100)
5335
5346
  })),
5336
- envelope("realtime.ping", strictObject({})),
5347
+ envelope("realtime.ping", object({})),
5337
5348
  envelope("endpoint.message", clientEndpointMessageSchema)
5338
5349
  ]);
5339
- const realtimeEventPayloadSchema = strictObject({
5350
+ const realtimeEventPayloadSchema = object({
5340
5351
  topic: realtimeTopicSchema,
5341
5352
  seq: sequenceSchema,
5342
5353
  event: realtimeEventNameSchema,
5343
5354
  data: unknown()
5344
5355
  });
5345
5356
  const serverRealtimeMessageSchema = discriminatedUnion("kind", [
5346
- envelope("realtime.ready", strictObject({
5357
+ envelope("realtime.ready", object({
5347
5358
  connectionId: uuid(),
5348
5359
  heartbeatIntervalMs: literal(REALTIME_HEARTBEAT_INTERVAL_MS),
5349
5360
  heartbeatTimeoutMs: literal(REALTIME_HEARTBEAT_TIMEOUT_MS),
5350
- endpoint: strictObject({
5361
+ negotiatedCapabilities: array(capabilitySchema).max(64).optional(),
5362
+ endpoint: object({
5351
5363
  endpointId: string().min(1).max(160),
5352
5364
  turnToken: string().min(32).max(160)
5353
5365
  }).optional()
5354
5366
  })),
5355
5367
  envelope("realtime.event", realtimeEventPayloadSchema),
5356
- envelope("realtime.subscribed", strictObject({
5368
+ envelope("realtime.subscribed", object({
5357
5369
  topic: realtimeTopicSchema,
5358
5370
  cursor: number().int().nonnegative()
5359
5371
  })),
5360
- envelope("realtime.gap", strictObject({
5372
+ envelope("realtime.gap", object({
5361
5373
  topic: realtimeTopicSchema,
5362
5374
  requestedSeq: number().int().nonnegative(),
5363
5375
  earliestSeq: sequenceSchema,
5364
5376
  recoverable: boolean()
5365
5377
  })),
5366
- envelope("realtime.pong", strictObject({})),
5367
- envelope("realtime.error", strictObject({
5378
+ envelope("realtime.pong", object({})),
5379
+ envelope("realtime.error", object({
5368
5380
  code: string().min(1).max(80),
5369
5381
  message: string().min(1).max(500)
5370
5382
  })),
@@ -5413,6 +5425,7 @@ class RealtimeClient {
5413
5425
  lastServerMessageAt = 0;
5414
5426
  endpointBinding;
5415
5427
  reconnectWhenSocketOpens = false;
5428
+ offeredCapabilities = /* @__PURE__ */ new Set();
5416
5429
  connect() {
5417
5430
  if (this.shouldReconnect) return;
5418
5431
  this.shouldReconnect = true;
@@ -5424,6 +5437,7 @@ class RealtimeClient {
5424
5437
  this.generation += 1;
5425
5438
  this.clearTimers();
5426
5439
  this.ready = false;
5440
+ this.offeredCapabilities.clear();
5427
5441
  this.endpointBinding?.onDisconnected?.();
5428
5442
  this.socket?.close(1e3, "Client disconnected");
5429
5443
  this.socket = void 0;
@@ -5491,6 +5505,7 @@ class RealtimeClient {
5491
5505
  ticketAbort.abort();
5492
5506
  if (this.ticketAbort === ticketAbort) this.ticketAbort = void 0;
5493
5507
  this.ready = false;
5508
+ this.offeredCapabilities.clear();
5494
5509
  this.endpointBinding?.onDisconnected?.();
5495
5510
  this.clearHeartbeat();
5496
5511
  if (this.socket === socket) this.socket = void 0;
@@ -5510,11 +5525,20 @@ class RealtimeClient {
5510
5525
  this.connectionTimer = setTimeout(() => failAttempt("Realtime connection timed out"), timeoutMs);
5511
5526
  this.options.onStateChange?.(reconnecting ? "reconnecting" : "connecting");
5512
5527
  try {
5513
- const [ticket, endpoint] = await Promise.all([
5528
+ const [issuedTicket, endpoint] = await Promise.all([
5514
5529
  this.options.issueTicket(ticketAbort.signal),
5515
5530
  this.endpointBinding?.createHello()
5516
5531
  ]);
5532
+ const ticket = issuedTicket.ticket;
5533
+ if (REALTIME_PROTOCOL_VERSION < issuedTicket.realtime.minVersion) {
5534
+ throw new RealtimeConnectionError("CLIENT_UPDATE_REQUIRED", false);
5535
+ }
5536
+ if (REALTIME_PROTOCOL_VERSION > issuedTicket.realtime.maxVersion) {
5537
+ throw new RealtimeConnectionError("GATEWAY_UPDATE_REQUIRED", false);
5538
+ }
5539
+ const capabilities = REALTIME_CAPABILITIES.filter((capability) => issuedTicket.realtime.capabilities.includes(capability));
5517
5540
  if (closed || !this.shouldReconnect || generation !== this.generation) return;
5541
+ this.offeredCapabilities = new Set(capabilities ?? []);
5518
5542
  socket = this.options.createWebSocket(this.options.getWebSocketUrl());
5519
5543
  this.socket = socket;
5520
5544
  socket.onopen = () => {
@@ -5532,6 +5556,7 @@ class RealtimeClient {
5532
5556
  clientId: this.options.clientId,
5533
5557
  clientKind: this.options.clientKind,
5534
5558
  subscriptions,
5559
+ ...capabilities?.length ? { capabilities } : {},
5535
5560
  ...endpoint ? { endpoint } : {}
5536
5561
  }));
5537
5562
  };
@@ -5580,11 +5605,16 @@ class RealtimeClient {
5580
5605
  const message = parseServerRealtimeMessage(JSON.parse(text));
5581
5606
  this.lastServerMessageAt = Date.now();
5582
5607
  if (message.kind === "realtime.ready") {
5608
+ const negotiated = message.payload.negotiatedCapabilities ?? [];
5609
+ if (negotiated.some((capability) => !this.offeredCapabilities.has(capability))) {
5610
+ throw new Error("Realtime server negotiated a capability the client did not offer");
5611
+ }
5583
5612
  this.ready = true;
5584
5613
  this.reconnectAttempts = 0;
5585
5614
  this.clearConnectionTimer();
5586
5615
  this.ticketAbort = void 0;
5587
5616
  this.options.onStateChange?.("connected");
5617
+ this.options.onCapabilities?.(negotiated);
5588
5618
  if (message.payload.endpoint) this.endpointBinding?.onReady(message.payload.endpoint);
5589
5619
  this.clearHeartbeat();
5590
5620
  this.heartbeatTimer = setInterval(() => {
@@ -5667,9 +5697,10 @@ class RealtimeClient {
5667
5697
  }
5668
5698
 
5669
5699
  const DEVICE_PAIRING_VERSION = 3;
5700
+ const MOBILE_PAIRING_INVITATION_VERSION = 4;
5670
5701
  const BROWSER_PAIRING_INVITATION_VERSION = 1;
5671
5702
  const BROWSER_PAIRING_INVITATION_PREFIX = `XOPC-BROWSER-INVITE-V${BROWSER_PAIRING_INVITATION_VERSION}:`;
5672
- const devicePairingTargetKindSchema = _enum(["mobile", "browser"]);
5703
+ _enum(["mobile", "browser"]);
5673
5704
  const devicePlatformSchema = _enum(["ios", "android", "harmonyos", "chrome"]);
5674
5705
  const devicePairingRouteSchema = strictObject({
5675
5706
  id: string().trim().min(1).max(80),
@@ -5681,18 +5712,32 @@ const devicePairingRouteSchema = strictObject({
5681
5712
  const valid = route.kind === "local-browser" ? url.protocol === "http:" && url.hostname === "127.0.0.1" && isOrigin : url.protocol === "https:" && isOrigin;
5682
5713
  if (!valid) context.addIssue({ code: "custom", path: ["url"], message: "Pairing route must be a secure origin" });
5683
5714
  });
5684
- const devicePairingInvitationPayloadSchema = strictObject({
5715
+ const browserPairingInvitationPayloadSchema = strictObject({
5685
5716
  version: literal(DEVICE_PAIRING_VERSION),
5686
- targetKind: devicePairingTargetKindSchema,
5717
+ targetKind: literal("browser"),
5687
5718
  pairingToken: string().regex(/^xopc_pair_[0-9a-f-]{36}_[A-Za-z0-9_-]{43}$/i),
5688
5719
  gatewayId: string().uuid(),
5689
5720
  gatewayName: string().trim().min(1).max(120),
5690
5721
  gatewayPublicKey: string().regex(/^[A-Za-z0-9_-]{43}$/),
5691
5722
  routes: array(devicePairingRouteSchema).min(1).max(8),
5692
5723
  expiresAt: number().int().positive()
5724
+ });
5725
+ const secureMobileOriginSchema = string().url().superRefine((origin, context) => {
5726
+ const url = new URL(origin);
5727
+ if (url.protocol !== "https:" || url.username || url.password || origin !== url.origin) {
5728
+ context.addIssue({ code: "custom", message: "Mobile pairing origins must be canonical HTTPS origins" });
5729
+ }
5730
+ });
5731
+ strictObject({
5732
+ version: literal(MOBILE_PAIRING_INVITATION_VERSION),
5733
+ pairingToken: string().regex(/^xopc_pair_[0-9a-f-]{36}_[A-Za-z0-9_-]{43}$/i),
5734
+ gatewayId: string().uuid(),
5735
+ gatewayPublicKey: string().regex(/^[A-Za-z0-9_-]{43}$/),
5736
+ origins: array(secureMobileOriginSchema).min(1).max(8),
5737
+ expiresAt: number().int().positive()
5693
5738
  }).superRefine((payload, context) => {
5694
- if (payload.targetKind === "mobile" && payload.routes.some((route) => route.kind === "local-browser")) {
5695
- context.addIssue({ code: "custom", path: ["routes"], message: "Mobile invitations require remote routes" });
5739
+ if (new Set(payload.origins).size !== payload.origins.length) {
5740
+ context.addIssue({ code: "custom", path: ["origins"], message: "Mobile pairing origins must be unique" });
5696
5741
  }
5697
5742
  });
5698
5743
  const devicePairingKeySchema = strictObject({
@@ -6128,8 +6173,8 @@ function createRefreshToken() {
6128
6173
  }
6129
6174
  function parseBrowserPairingInvitation(value, allowExpired = false) {
6130
6175
  const encoded = readBrowserPairingInvitation(value);
6131
- const parsed = devicePairingInvitationPayloadSchema.safeParse(decodeJson(encoded));
6132
- if (!parsed.success || parsed.data.targetKind !== "browser") throw new Error("Pairing invitation version is not supported");
6176
+ const parsed = browserPairingInvitationPayloadSchema.safeParse(decodeJson(encoded));
6177
+ if (!parsed.success) throw new Error("Pairing invitation version is not supported");
6133
6178
  const payload = parsed.data;
6134
6179
  if (!allowExpired && payload.expiresAt <= Date.now()) throw new Error("Pairing invitation has expired");
6135
6180
  return payload;
@@ -6605,4 +6650,4 @@ async function revokeAndForgetProfile() {
6605
6650
  }
6606
6651
  }
6607
6652
 
6608
- export { ENDPOINT_PROTOCOL_VERSION as E, MAX_BROWSER_CONTEXTS_PER_TURN as M, PENDING_CONTEXT_KEY as P, RealtimeClient as R, TAB_BINDING_PREFIX as T, activeTabId as a, browserPageContextsInputSchema as b, cancelPendingBrowserPairing as c, canonicalJson as d, captureTabWithPermission as e, createBrowserEndpointHello as f, currentTabDescriptor as g, discoverLocalGateway as h, endpointToolContentSchema as i, extensionLocale as j, gatewayFetch as k, getAccessProfile as l, loadExtensionLocalePreference as m, readProfile as n, openDatabase as o, pairGateway as p, registerBrowserEndpoint as q, readPendingBrowserPairing as r, revokeAndForgetProfile as s, runWithTabSiteAccess as t, saveExtensionLocalePreference as u, setAutoConnectEnabled as v, t as w };
6653
+ export { ENDPOINT_PROTOCOL_VERSION as E, MAX_BROWSER_CONTEXTS_PER_TURN as M, PENDING_CONTEXT_KEY as P, REALTIME_PROTOCOL_VERSION as R, TAB_BINDING_PREFIX as T, RealtimeClient as a, activeTabId as b, browserPageContextsInputSchema as c, cancelPendingBrowserPairing as d, canonicalJson as e, captureTabWithPermission as f, createBrowserEndpointHello as g, currentTabDescriptor as h, discoverLocalGateway as i, endpointToolContentSchema as j, extensionLocale as k, gatewayFetch as l, getAccessProfile as m, loadExtensionLocalePreference as n, openDatabase as o, pairGateway as p, readProfile as q, readPendingBrowserPairing as r, registerBrowserEndpoint as s, revokeAndForgetProfile as t, runWithTabSiteAccess as u, saveExtensionLocalePreference as v, setAutoConnectEnabled as w, t as x };
@@ -1,4 +1,4 @@
1
- import { i as endpointToolContentSchema, E as ENDPOINT_PROTOCOL_VERSION, d as canonicalJson, T as TAB_BINDING_PREFIX, e as captureTabWithPermission, P as PENDING_CONTEXT_KEY, w as t, n as readProfile, q as registerBrowserEndpoint, l as getAccessProfile, R as RealtimeClient, f as createBrowserEndpointHello, k as gatewayFetch } from './assets/auth-B_9ZuGDx.js';
1
+ import { j as endpointToolContentSchema, E as ENDPOINT_PROTOCOL_VERSION, e as canonicalJson, T as TAB_BINDING_PREFIX, f as captureTabWithPermission, P as PENDING_CONTEXT_KEY, x as t, q as readProfile, s as registerBrowserEndpoint, m as getAccessProfile, a as RealtimeClient, g as createBrowserEndpointHello, l as gatewayFetch, R as REALTIME_PROTOCOL_VERSION } from './assets/auth-C3yV1y_l.js';
2
2
 
3
3
  const BROWSER_EXTENSION_PROTOCOL_VERSION = 5;
4
4
  const BROWSER_CONTROL_ENDPOINT_TOOL_NAME = "browser.control";
@@ -1212,12 +1212,12 @@ async function connect(generation) {
1212
1212
  const response = await gatewayFetch("/api/realtime/tickets", {
1213
1213
  method: "POST",
1214
1214
  headers: { "Content-Type": "application/json" },
1215
- body: JSON.stringify({ clientId: id, clientKind: "browser_extension" }),
1215
+ body: JSON.stringify({ clientId: id, clientKind: "browser_extension", protocolVersion: REALTIME_PROTOCOL_VERSION }),
1216
1216
  signal
1217
1217
  });
1218
1218
  const body = await response.json();
1219
- if (!response.ok || !body.payload?.ticket) throw new Error(`Realtime ticket failed (${response.status})`);
1220
- return body.payload.ticket;
1219
+ if (!response.ok || !body.payload?.ticket || !body.payload.realtime) throw new Error(`Realtime ticket failed (${response.status})`);
1220
+ return { ticket: body.payload.ticket, realtime: body.payload.realtime };
1221
1221
  },
1222
1222
  createWebSocket: (url) => new WebSocket(url),
1223
1223
  onStateChange: (state, error) => {
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>xopc</title>
7
7
  <script type="module" crossorigin src="./sidepanel.js"></script>
8
- <link rel="modulepreload" crossorigin href="./assets/auth-B_9ZuGDx.js">
8
+ <link rel="modulepreload" crossorigin href="./assets/auth-C3yV1y_l.js">
9
9
  <link rel="stylesheet" crossorigin href="./assets/sidepanel-BbSQr-6P.css">
10
10
  </head>
11
11
  <body>
@@ -1,4 +1,4 @@
1
- import { w as t, M as MAX_BROWSER_CONTEXTS_PER_TURN, b as browserPageContextsInputSchema, k as gatewayFetch, j as extensionLocale, o as openDatabase, R as RealtimeClient, a as activeTabId, g as currentTabDescriptor, T as TAB_BINDING_PREFIX, l as getAccessProfile, t as runWithTabSiteAccess, P as PENDING_CONTEXT_KEY, e as captureTabWithPermission, p as pairGateway, v as setAutoConnectEnabled, r as readPendingBrowserPairing, n as readProfile, h as discoverLocalGateway, u as saveExtensionLocalePreference, s as revokeAndForgetProfile, c as cancelPendingBrowserPairing, m as loadExtensionLocalePreference } from './assets/auth-B_9ZuGDx.js';
1
+ import { x as t, M as MAX_BROWSER_CONTEXTS_PER_TURN, c as browserPageContextsInputSchema, l as gatewayFetch, k as extensionLocale, o as openDatabase, a as RealtimeClient, R as REALTIME_PROTOCOL_VERSION, b as activeTabId, h as currentTabDescriptor, T as TAB_BINDING_PREFIX, m as getAccessProfile, u as runWithTabSiteAccess, P as PENDING_CONTEXT_KEY, f as captureTabWithPermission, p as pairGateway, w as setAutoConnectEnabled, r as readPendingBrowserPairing, q as readProfile, i as discoverLocalGateway, v as saveExtensionLocalePreference, t as revokeAndForgetProfile, d as cancelPendingBrowserPairing, n as loadExtensionLocalePreference } from './assets/auth-C3yV1y_l.js';
2
2
 
3
3
  true &&(function polyfill() {
4
4
  const relList = document.createElement("link").relList;
@@ -18246,11 +18246,11 @@ class BrowserChatClient {
18246
18246
  const response = await gatewayFetch("/api/realtime/tickets", {
18247
18247
  method: "POST",
18248
18248
  headers: { "Content-Type": "application/json" },
18249
- body: JSON.stringify({ clientId: id, clientKind: "browser_extension" }),
18249
+ body: JSON.stringify({ clientId: id, clientKind: "browser_extension", protocolVersion: REALTIME_PROTOCOL_VERSION }),
18250
18250
  signal
18251
18251
  });
18252
18252
  const body = await json(response);
18253
- return body.payload.ticket;
18253
+ return body.payload;
18254
18254
  },
18255
18255
  createWebSocket: (url) => new WebSocket(url),
18256
18256
  onStateChange: (connection, error) => this.update({
@@ -3,7 +3,7 @@
3
3
  "minimum_chrome_version": "120",
4
4
  "default_locale": "en",
5
5
  "name": "__MSG_appName__",
6
- "version": "0.0.302",
6
+ "version": "0.0.306",
7
7
  "description": "__MSG_appDescription__",
8
8
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqnpr4vpLC/nmvy+wiOWk3SWlp2nEZkFijfk8ivGw7StNZgCK90nOMvwhdEtlkk3GOWDvdVnq8HxCsM3UNQ8FnGUyerpH1FJXqXuradxeHf8ZxFjiQU/mIWfnKbUuONWQORon3/pigyoXoK/VUXgg0Wbm/rbVwsS0bv+25R6m+mZgBspOLeKuoH7ivhL+48WV6POtMBsFPZweY26477EM7ukh+56Ff5ENevB8ymxBBn7qK5ZoeZd2a23U8ioX5TsHfe6fnrjitPWjIxD8G0NoKQxcaa/Mo+xs+T6UiLKxP0wjz5bm7jB5H+CXtkRJqzBWUB0h+RSLJckzZfA8BAJrRwIDAQAB",
9
9
  "permissions": [
@@ -494,9 +494,6 @@
494
494
  "onChannels": [
495
495
  "feishu",
496
496
  "lark"
497
- ],
498
- "onCapabilities": [
499
- "tool"
500
497
  ]
501
498
  },
502
499
  "setup": {
@@ -2,7 +2,7 @@
2
2
  "id": "telegram",
3
3
  "name": "Telegram Channel",
4
4
  "description": "Bundled Telegram Bot channel (private workspace sources; ships inside @xopcai/xopc dist/)",
5
- "version": "0.0.302",
5
+ "version": "0.0.306",
6
6
  "kind": "channel",
7
7
  "main": "src/index.js",
8
8
  "channels": [
@@ -449,9 +449,6 @@
449
449
  "activation": {
450
450
  "onChannels": [
451
451
  "telegram"
452
- ],
453
- "onCapabilities": [
454
- "channel"
455
452
  ]
456
453
  },
457
454
  "setup": {
@@ -92,9 +92,6 @@
92
92
  "activation": {
93
93
  "onChannels": [
94
94
  "weixin"
95
- ],
96
- "onCapabilities": [
97
- "channel"
98
95
  ]
99
96
  },
100
97
  "setup": {
@@ -1 +1 @@
1
- import{p as e}from"./locale-store-DLK05Y1a.js";var t=`xopc.activity-center.v2`,n=80,r=720*60*60*1e3;function i(e){return e===`error`?`failed`:e===`warning`?`attention`:`done`}function a(){if(!(typeof window>`u`))return window.location.hash.replace(/^#/,``)||`${window.location.pathname}${window.location.search}`||void 0}function o(){try{let e=globalThis.localStorage?.getItem(t);if(!e)return[];let i=JSON.parse(e);if(!Array.isArray(i.items))return[];let a=Date.now()-r,o=i.items.filter(e=>e&&typeof e.id==`string`&&typeof e.title==`string`).filter(e=>Number.isFinite(e.updatedAt)&&e.updatedAt>=a).slice(0,n);return o.length!==i.items.length&&s(o),o}catch{return[]}}function s(e){try{globalThis.localStorage?.setItem(t,JSON.stringify({items:e}))}catch{}}function c(e){return`${e.toString(36)}-${Math.random().toString(36).slice(2,8)}`}var l=e(e=>({items:o(),add:t=>e(e=>{let r=t.title.trim();if(!r)return e;let o=Date.now(),l=t.tone??`info`,u=t.dedupeKey?e.items.findIndex(e=>e.dedupeKey===t.dedupeKey):-1,d=[{id:u>=0?e.items[u].id:c(o),tone:l,status:t.status??i(l),title:r,message:t.message?.trim()||void 0,source:t.source?.trim()||void 0,href:t.href??a(),dedupeKey:t.dedupeKey,createdAt:u>=0?e.items[u].createdAt:o,updatedAt:o,read:t.read??!1,occurrences:u>=0?e.items[u].occurrences+1:1},...u>=0?e.items.filter((e,t)=>t!==u):e.items].slice(0,n);return s(d),{items:d}}),markAllRead:()=>e(e=>{let t=e.items.map(e=>({...e,read:!0}));return s(t),{items:t}}),remove:t=>e(e=>{let n=e.items.filter(e=>e.id!==t);return s(n),{items:n}}),clearFinished:()=>e(e=>{let t=e.items.filter(e=>e.status!==`done`);return s(t),{items:t}}),clear:()=>{s([]),e({items:[]})}}));function u(e){l.getState().add(e)}export{u as t};
1
+ import{p as e}from"./locale-store-D16nmbaN.js";var t=`xopc.activity-center.v2`,n=80,r=720*60*60*1e3;function i(e){return e===`error`?`failed`:e===`warning`?`attention`:`done`}function a(){if(!(typeof window>`u`))return window.location.hash.replace(/^#/,``)||`${window.location.pathname}${window.location.search}`||void 0}function o(){try{let e=globalThis.localStorage?.getItem(t);if(!e)return[];let i=JSON.parse(e);if(!Array.isArray(i.items))return[];let a=Date.now()-r,o=i.items.filter(e=>e&&typeof e.id==`string`&&typeof e.title==`string`).filter(e=>Number.isFinite(e.updatedAt)&&e.updatedAt>=a).slice(0,n);return o.length!==i.items.length&&s(o),o}catch{return[]}}function s(e){try{globalThis.localStorage?.setItem(t,JSON.stringify({items:e}))}catch{}}function c(e){return`${e.toString(36)}-${Math.random().toString(36).slice(2,8)}`}var l=e(e=>({items:o(),add:t=>e(e=>{let r=t.title.trim();if(!r)return e;let o=Date.now(),l=t.tone??`info`,u=t.dedupeKey?e.items.findIndex(e=>e.dedupeKey===t.dedupeKey):-1,d=[{id:u>=0?e.items[u].id:c(o),tone:l,status:t.status??i(l),title:r,message:t.message?.trim()||void 0,source:t.source?.trim()||void 0,href:t.href??a(),dedupeKey:t.dedupeKey,createdAt:u>=0?e.items[u].createdAt:o,updatedAt:o,read:t.read??!1,occurrences:u>=0?e.items[u].occurrences+1:1},...u>=0?e.items.filter((e,t)=>t!==u):e.items].slice(0,n);return s(d),{items:d}}),markAllRead:()=>e(e=>{let t=e.items.map(e=>({...e,read:!0}));return s(t),{items:t}}),remove:t=>e(e=>{let n=e.items.filter(e=>e.id!==t);return s(n),{items:n}}),clearFinished:()=>e(e=>{let t=e.items.filter(e=>e.status!==`done`);return s(t),{items:t}}),clear:()=>{s([]),e({items:[]})}}));function u(e){l.getState().add(e)}export{u as t};