@xopcai/xopc 0.0.488 → 0.0.489

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 (499) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/dingtalk/src/index.js +54 -10
  3. package/dist/extensions/discord/src/index.js +39 -6
  4. package/dist/extensions/feishu/src/adapters/cli-login.js +1 -1
  5. package/dist/extensions/feishu/src/adapters/gateway-setup.js +1 -1
  6. package/dist/extensions/feishu/src/outbound/media-load.d.ts +1 -0
  7. package/dist/extensions/feishu/src/outbound/media-load.js +2 -2
  8. package/dist/extensions/feishu/src/outbound/outbound-adapter.js +2 -1
  9. package/dist/extensions/feishu/src/pairing/feishu-pairing-prompt.js +1 -1
  10. package/dist/extensions/feishu/src/plugin.js +1 -1
  11. package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -1
  12. package/dist/extensions/feishu/src/transport/client/install-sdk.js +2 -2
  13. package/dist/extensions/feishu/src/transport/reliability/message-ingress.js +3 -3
  14. package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +1 -1
  15. package/dist/extensions/slack/src/index.js +51 -1
  16. package/dist/extensions/slack/src/manifest.js +1 -0
  17. package/dist/extensions/telegram/src/adapters/outbound-adapter.js +6 -1
  18. package/dist/extensions/telegram/src/adapters/streaming-adapter.js +3 -3
  19. package/dist/extensions/telegram/src/doctor.js +2 -2
  20. package/dist/extensions/telegram/src/draft-stream.js +1 -1
  21. package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
  22. package/dist/extensions/telegram/src/focus-handler.js +1 -1
  23. package/dist/extensions/telegram/src/inbound-processor.js +7 -7
  24. package/dist/extensions/telegram/src/outbound-sender.js +6 -5
  25. package/dist/extensions/telegram/src/plugin.js +23 -23
  26. package/dist/extensions/telegram/xopc.extension.json +1 -1
  27. package/dist/extensions/wecom/src/index.js +82 -6
  28. package/dist/extensions/weixin/src/api/api.js +1 -1
  29. package/dist/extensions/weixin/src/auth/accounts.js +2 -2
  30. package/dist/extensions/weixin/src/auth/pairing.js +1 -1
  31. package/dist/extensions/weixin/src/cdn/upload.js +1 -1
  32. package/dist/extensions/weixin/src/cli/gateway-qr-login.js +1 -1
  33. package/dist/extensions/weixin/src/cli/qr-login.js +2 -2
  34. package/dist/extensions/weixin/src/media/data-url.d.ts +1 -0
  35. package/dist/extensions/weixin/src/media/data-url.js +5 -2
  36. package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
  37. package/dist/extensions/weixin/src/messaging/inbound.js +2 -2
  38. package/dist/extensions/weixin/src/messaging/process-message.js +5 -5
  39. package/dist/extensions/weixin/src/messaging/quote-cache.js +1 -1
  40. package/dist/extensions/weixin/src/messaging/send.js +1 -1
  41. package/dist/extensions/weixin/src/monitor/monitor.js +2 -2
  42. package/dist/extensions/weixin/src/outbound-send.js +18 -6
  43. package/dist/extensions/weixin/src/plugin.js +3 -3
  44. package/dist/gateway/server/chunks.bin +1560 -1521
  45. package/dist/gateway/server/chunks.json +1 -1
  46. package/dist/gateway/static/root/assets/{automations-page-DelDZorh.js → automations-page-B3i5x1Lc.js} +1 -1
  47. package/dist/gateway/static/root/assets/{automations-workspace-leY4yCvw.js → automations-workspace-D6-Kk33X.js} +2 -2
  48. package/dist/gateway/static/root/assets/{chat-page-XqG9aYBd.js → chat-page-oy4EGdO1.js} +2 -2
  49. package/dist/gateway/static/root/assets/{home-page-Bxr3V5lc.js → home-page-BmoT_EN4.js} +3 -3
  50. package/dist/gateway/static/root/assets/{home-task-actions-GAO06s1_.js → home-task-actions-Ck0AhcYe.js} +1 -1
  51. package/dist/gateway/static/root/assets/{index-BjU5H5hz.js → index-BiQP7-5r.js} +8 -8
  52. package/dist/gateway/static/root/assets/{note-detail-panel-BTNX68oO.js → note-detail-panel-CYNPJVVE.js} +2 -2
  53. package/dist/gateway/static/root/assets/{notes-page-FocipOyc.js → notes-page-Dpd98vQp.js} +1 -1
  54. package/dist/gateway/static/root/assets/{personal-page-CSc2n5UD.js → personal-page-BfljqOp5.js} +1 -1
  55. package/dist/gateway/static/root/assets/{project-detail-page-CK_EN6Jq.js → project-detail-page-CcnOT_aq.js} +1 -1
  56. package/dist/gateway/static/root/assets/right-workspace-store-DsVm6C0V.js +1 -0
  57. package/dist/gateway/static/root/assets/{route-preload-Ab7Zw-df.js → route-preload-CsBdFJHO.js} +2 -2
  58. package/dist/gateway/static/root/assets/{routine-panel-DzdJGicv.js → routine-panel-pVuJtctD.js} +2 -2
  59. package/dist/gateway/static/root/assets/{settings-page-CzW5GM5r.js → settings-page-BRAijVXZ.js} +1 -1
  60. package/dist/gateway/static/root/assets/{space-page-BCzDsNJd.js → space-page-CUwakPrj.js} +2 -2
  61. package/dist/gateway/static/root/assets/{task-detail-page-B_YXsT9W.js → task-detail-page-Cvx-XtFO.js} +1 -1
  62. package/dist/gateway/static/root/assets/{task-header-title-bZVPIbyR.js → task-header-title-DHb7z-hq.js} +1 -1
  63. package/dist/gateway/static/root/assets/{task-run-issue-notice-BXOES2t9.js → task-run-issue-notice-CqjS8_gi.js} +1 -1
  64. package/dist/gateway/static/root/assets/{use-composer-attachments-DWiIdMIi.js → use-composer-attachments-CQwCTKAp.js} +1 -1
  65. package/dist/gateway/static/root/assets/{use-personal-work-D0tMU1bP.js → use-personal-work-fvvZDK_7.js} +1 -1
  66. package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-DPHnm_7A.js → workspace-file-preview-dialog-DdVyIRKm.js} +1 -1
  67. package/dist/gateway/static/root/index.html +9 -9
  68. package/dist/package.js +1 -1
  69. package/dist/src/activity/emitter.js +1 -1
  70. package/dist/src/agent/agent-manager.js +8 -8
  71. package/dist/src/agent/background-review/prompts.js +1 -1
  72. package/dist/src/agent/background-review/run-background-review.js +3 -3
  73. package/dist/src/agent/coding/repository-instructions.js +1 -1
  74. package/dist/src/agent/coding/workspace-revision.js +1 -1
  75. package/dist/src/agent/commands/command-isolation.js +1 -1
  76. package/dist/src/agent/commands/command-registry.js +1 -1
  77. package/dist/src/agent/context/execution-context.js +2 -2
  78. package/dist/src/agent/context/workspace-seed.js +1 -1
  79. package/dist/src/agent/data-acquisition/git.js +1 -1
  80. package/dist/src/agent/data-acquisition/service.js +1 -1
  81. package/dist/src/agent/embedded/codemode-output.js +2 -2
  82. package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
  83. package/dist/src/agent/embedded/model-runtime.js +1 -1
  84. package/dist/src/agent/embedded/run-for-session.js +6 -6
  85. package/dist/src/agent/embedded/run-turn.js +76 -17
  86. package/dist/src/agent/embedded/runs.js +1 -1
  87. package/dist/src/agent/embedded/session-runner.js +2 -1
  88. package/dist/src/agent/embedded/types.d.ts +1 -1
  89. package/dist/src/agent/embedded/xopc-stream-bridge.js +3 -3
  90. package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
  91. package/dist/src/agent/external-tools/index.js +1 -1
  92. package/dist/src/agent/image/generation/providers/xopc-cloud.js +2 -2
  93. package/dist/src/agent/image/load-image-media.js +2 -2
  94. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  95. package/dist/src/agent/inbound/inbound-loop.js +6 -1
  96. package/dist/src/agent/independent-execution.js +2 -2
  97. package/dist/src/agent/mcp/connection-drafts.js +2 -2
  98. package/dist/src/agent/mcp/connection-setup.js +1 -1
  99. package/dist/src/agent/mcp/conversation-setup.js +1 -1
  100. package/dist/src/agent/mcp/discovery.js +1 -1
  101. package/dist/src/agent/mcp/transport.js +1 -1
  102. package/dist/src/agent/mcp/weixin-setup-scope.js +2 -2
  103. package/dist/src/agent/messaging/command-handler.js +1 -1
  104. package/dist/src/agent/prompt/response-language.js +1 -1
  105. package/dist/src/agent/prompt/sections/tooling.d.ts +1 -0
  106. package/dist/src/agent/prompt/sections/tooling.js +7 -2
  107. package/dist/src/agent/prompt/service-prompt-builder.js +1 -1
  108. package/dist/src/agent/prompt/system-prompt-params.js +1 -1
  109. package/dist/src/agent/prompt/system-prompt.js +1 -0
  110. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  111. package/dist/src/agent/sandbox/native-command.js +1 -1
  112. package/dist/src/agent/sandbox/path-policy.js +1 -1
  113. package/dist/src/agent/service/direct-turn-helpers.js +3 -3
  114. package/dist/src/agent/service/process-direct-streaming.js +2 -2
  115. package/dist/src/agent/service.js +7 -5
  116. package/dist/src/agent/session/session-config-service.js +1 -1
  117. package/dist/src/agent/skills/hub-hash.js +1 -1
  118. package/dist/src/agent/skills/hub-lock.js +1 -1
  119. package/dist/src/agent/skills/hub-pull.js +3 -3
  120. package/dist/src/agent/skills/index.js +1 -1
  121. package/dist/src/agent/skills/managed-store.js +1 -1
  122. package/dist/src/agent/skills/skill-manage-ops.js +1 -1
  123. package/dist/src/agent/skills/skill-sources.js +1 -1
  124. package/dist/src/agent/tools/browser/tool/browser-use-tool.js +48 -2
  125. package/dist/src/agent/tools/browser/tool/schemas.d.ts +2 -1
  126. package/dist/src/agent/tools/browser/tool/schemas.js +6 -0
  127. package/dist/src/agent/tools/communication.d.ts +1 -0
  128. package/dist/src/agent/tools/communication.js +10 -3
  129. package/dist/src/agent/tools/delegate-tool.js +1 -1
  130. package/dist/src/agent/tools/exec-command.js +1 -1
  131. package/dist/src/agent/tools/executor.js +1 -1
  132. package/dist/src/agent/tools/factory.js +13 -4
  133. package/dist/src/agent/tools/fetch-text.js +1 -1
  134. package/dist/src/agent/tools/image-generate-tool.d.ts +7 -0
  135. package/dist/src/agent/tools/image-generate-tool.js +21 -1
  136. package/dist/src/agent/tools/managed-job-tool.js +1 -1
  137. package/dist/src/agent/tools/personal-attention-tool.js +1 -1
  138. package/dist/src/agent/tools/personal-memory-tool.js +3 -3
  139. package/dist/src/agent/tools/publish-artifacts.js +1 -1
  140. package/dist/src/agent/tools/read.js +1 -1
  141. package/dist/src/agent/tools/review-workspace.js +2 -2
  142. package/dist/src/agent/tools/scoped-workspace-tools.js +1 -1
  143. package/dist/src/agent/tools/send-media.d.ts +1 -0
  144. package/dist/src/agent/tools/send-media.js +7 -4
  145. package/dist/src/agent/tools/task-collaboration-tool.js +2 -2
  146. package/dist/src/agent/tools/tool-media.d.ts +1 -0
  147. package/dist/src/agent/tools/tool-media.js +14 -1
  148. package/dist/src/agent/tools/user-context-tool.js +2 -2
  149. package/dist/src/agent/tools/web-extract.js +1 -1
  150. package/dist/src/agent/tools/write.js +1 -1
  151. package/dist/src/agent/tools/xopc-use-tool.js +6 -6
  152. package/dist/src/agent-catalog/repository.js +1 -1
  153. package/dist/src/auth/credentials.js +1 -1
  154. package/dist/src/auth/oauth/openai.js +1 -1
  155. package/dist/src/auth/oauth/xopc-cloud.js +2 -2
  156. package/dist/src/auth/oauth-provider-lock.js +1 -1
  157. package/dist/src/auth/profiles/store.js +1 -1
  158. package/dist/src/automations/delivery/delivery-router.js +1 -1
  159. package/dist/src/automations/service/action-executor.js +1 -1
  160. package/dist/src/automations/service/automation-service.js +1 -1
  161. package/dist/src/backup/archive.js +4 -4
  162. package/dist/src/browser/assistance.d.ts +34 -0
  163. package/dist/src/browser/assistance.js +243 -0
  164. package/dist/src/browser/cache-dir-policy.js +1 -1
  165. package/dist/src/browser/drivers/browser-driver.d.ts +44 -0
  166. package/dist/src/browser/drivers/playwright-driver.d.ts +2 -1
  167. package/dist/src/browser/drivers/playwright-driver.js +161 -0
  168. package/dist/src/browser/managed-live-runtime.d.ts +79 -0
  169. package/dist/src/browser/managed-live-runtime.js +313 -0
  170. package/dist/src/browser/native-messaging-host.js +1 -1
  171. package/dist/src/browser/providers/browser-ext-install.js +4 -4
  172. package/dist/src/browser/runtime/browser-runtime.d.ts +18 -1
  173. package/dist/src/browser/runtime/browser-runtime.js +55 -4
  174. package/dist/src/capabilities/capability-catalog.js +2 -2
  175. package/dist/src/capabilities/readiness/from-config.js +2 -2
  176. package/dist/src/capabilities/store-connector.js +1 -1
  177. package/dist/src/channels/attachments/voice-stt-webchat.js +1 -1
  178. package/dist/src/channels/channel-domain.d.ts +1 -0
  179. package/dist/src/channels/enterprise/media.d.ts +14 -0
  180. package/dist/src/channels/enterprise/media.js +208 -0
  181. package/dist/src/channels/enterprise/plugin.d.ts +4 -0
  182. package/dist/src/channels/enterprise/plugin.js +40 -12
  183. package/dist/src/channels/format.js +1 -1
  184. package/dist/src/channels/index.js +2 -2
  185. package/dist/src/channels/internal-outbound.d.ts +2 -0
  186. package/dist/src/channels/internal-outbound.js +17 -1
  187. package/dist/src/channels/lifecycle-supervisor.js +1 -1
  188. package/dist/src/channels/outbound-sender.js +2 -2
  189. package/dist/src/channels/pairing/pairing-service.js +1 -1
  190. package/dist/src/channels/pairing/pairing-store.js +1 -1
  191. package/dist/src/chat-commands/builtins/config.js +2 -2
  192. package/dist/src/chat-commands/builtins/review.js +1 -1
  193. package/dist/src/chat-commands/builtins/session.js +1 -1
  194. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  195. package/dist/src/chat-commands/builtins/tts.js +1 -1
  196. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  197. package/dist/src/chat-commands/context.js +2 -2
  198. package/dist/src/chat-commands/index.js +1 -1
  199. package/dist/src/cli/commands/agent.js +2 -2
  200. package/dist/src/cli/commands/browser-cli-helpers.js +1 -1
  201. package/dist/src/cli/commands/connectors.js +1 -1
  202. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  203. package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
  204. package/dist/src/cli/commands/doctor/checks/image-providers.js +1 -1
  205. package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
  206. package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
  207. package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
  208. package/dist/src/cli/commands/extension-marketplace.js +3 -3
  209. package/dist/src/cli/commands/extension-pack.js +1 -1
  210. package/dist/src/cli/commands/extension.js +1 -1
  211. package/dist/src/cli/commands/mcp.js +1 -1
  212. package/dist/src/cli/commands/models.js +3 -3
  213. package/dist/src/cli/commands/onboard/model.js +2 -2
  214. package/dist/src/cli/commands/onboard.js +1 -1
  215. package/dist/src/cli/commands/project.js +1 -1
  216. package/dist/src/cli/commands/runtime.js +1 -1
  217. package/dist/src/cli/commands/skills.js +1 -1
  218. package/dist/src/cli/commands/tunnel.js +1 -1
  219. package/dist/src/cli/utils/gateway-client.js +1 -1
  220. package/dist/src/cli/utils/init-workspace-core.js +2 -2
  221. package/dist/src/computer/broker.js +1 -1
  222. package/dist/src/computer/runtime.js +2 -2
  223. package/dist/src/config/index.js +3 -3
  224. package/dist/src/config/loader.js +2 -2
  225. package/dist/src/config/models-json.js +1 -1
  226. package/dist/src/config/paths-state.js +1 -1
  227. package/dist/src/config/schema.js +2 -2
  228. package/dist/src/config/workspace-path.js +1 -1
  229. package/dist/src/connectors/cli/installer.js +1 -1
  230. package/dist/src/connectors/connected-source-ingestion.js +1 -1
  231. package/dist/src/connectors/connected-source-understanding.js +1 -1
  232. package/dist/src/connectors/content-enrichment.js +1 -1
  233. package/dist/src/connectors/health.js +1 -1
  234. package/dist/src/daemon/constants.js +1 -1
  235. package/dist/src/daemon/install-plan.js +1 -1
  236. package/dist/src/daemon/launchd.js +1 -1
  237. package/dist/src/daemon/schtasks.js +1 -1
  238. package/dist/src/daemon/systemd.js +1 -1
  239. package/dist/src/discussions/action-tasks.js +1 -1
  240. package/dist/src/discussions/live-worker.js +2 -2
  241. package/dist/src/discussions/recording.js +2 -2
  242. package/dist/src/discussions/repository.js +1 -1
  243. package/dist/src/discussions/sealer.js +3 -3
  244. package/dist/src/discussions/service.js +1 -1
  245. package/dist/src/endpoint-tools/delegation.js +1 -1
  246. package/dist/src/endpoint-tools/upload-service.js +1 -1
  247. package/dist/src/execution-environments/local-worktree-manager.js +1 -1
  248. package/dist/src/execution-environments/worktree-safety.js +1 -1
  249. package/dist/src/extensions/activation-context.js +2 -2
  250. package/dist/src/extensions/agent-plugins/auth.js +3 -3
  251. package/dist/src/extensions/agent-plugins/branding.js +1 -1
  252. package/dist/src/extensions/agent-plugins/cli-authorization.js +3 -3
  253. package/dist/src/extensions/agent-plugins/credentials.js +1 -1
  254. package/dist/src/extensions/agent-plugins/mcp-adapter.js +2 -2
  255. package/dist/src/extensions/agent-plugins/resources.js +1 -1
  256. package/dist/src/extensions/agent-plugins/setup.js +1 -1
  257. package/dist/src/extensions/agent-plugins/skill-catalog.js +1 -1
  258. package/dist/src/extensions/agent-plugins/source-catalog.js +2 -2
  259. package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
  260. package/dist/src/extensions/agent-plugins/sources.js +1 -1
  261. package/dist/src/extensions/agent-plugins/store.js +2 -2
  262. package/dist/src/extensions/agent-plugins/user-config.js +2 -2
  263. package/dist/src/extensions/agent-plugins/validation.js +3 -3
  264. package/dist/src/extensions/api.js +2 -2
  265. package/dist/src/extensions/install.js +1 -1
  266. package/dist/src/extensions/loader.js +2 -2
  267. package/dist/src/extensions/lockfile.js +1 -1
  268. package/dist/src/extensions/sdk/index.js +1 -1
  269. package/dist/src/extensions/update.js +2 -2
  270. package/dist/src/files/file-service.js +1 -1
  271. package/dist/src/gateway/agent-reactions/reaction.js +1 -1
  272. package/dist/src/gateway/file-path-classifier.js +1 -1
  273. package/dist/src/gateway/hono/lib/config-payload.js +3 -3
  274. package/dist/src/gateway/hono/lib/static-ui.js +1 -1
  275. package/dist/src/gateway/hono/routes/agent-plugins.js +1 -1
  276. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  277. package/dist/src/gateway/hono/routes/browser.js +261 -3
  278. package/dist/src/gateway/hono/routes/channels.js +1 -1
  279. package/dist/src/gateway/hono/routes/commands-skills.js +1 -1
  280. package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
  281. package/dist/src/gateway/hono/routes/connectors.js +1 -1
  282. package/dist/src/gateway/hono/routes/device-connections.js +1 -1
  283. package/dist/src/gateway/hono/routes/files.js +1 -1
  284. package/dist/src/gateway/hono/routes/host-fs.js +1 -1
  285. package/dist/src/gateway/hono/routes/local-apps.js +1 -1
  286. package/dist/src/gateway/hono/routes/memory-learning.js +1 -1
  287. package/dist/src/gateway/hono/routes/mobile-capability-actions.js +3 -3
  288. package/dist/src/gateway/hono/routes/mobile-capability-panels.js +4 -4
  289. package/dist/src/gateway/hono/routes/mobile-model-settings.js +13 -5
  290. package/dist/src/gateway/hono/routes/models.js +6 -6
  291. package/dist/src/gateway/hono/routes/notes.js +1 -1
  292. package/dist/src/gateway/hono/routes/observability.js +1 -1
  293. package/dist/src/gateway/hono/routes/personal-agent.js +1 -1
  294. package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
  295. package/dist/src/gateway/hono/routes/phone.js +1 -1
  296. package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
  297. package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
  298. package/dist/src/gateway/hono/routes/sessions.js +2 -2
  299. package/dist/src/gateway/hono/routes/shares.js +1 -1
  300. package/dist/src/gateway/hono/routes/status.js +1 -1
  301. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  302. package/dist/src/gateway/hono/routes/user-model.js +3 -3
  303. package/dist/src/gateway/hono/routes/video-generation.js +1 -1
  304. package/dist/src/gateway/hono/routes/voice.js +4 -4
  305. package/dist/src/gateway/image-generation-setup.js +2 -2
  306. package/dist/src/gateway/lock.js +2 -2
  307. package/dist/src/gateway/mobile-privacy.js +1 -1
  308. package/dist/src/gateway/next-turn-suggestions/snapshot.js +1 -1
  309. package/dist/src/gateway/ports.js +1 -1
  310. package/dist/src/gateway/provider-model-setup.js +1 -1
  311. package/dist/src/gateway/security/device-request-proof.js +1 -1
  312. package/dist/src/gateway/security/gateway-scopes.js +2 -0
  313. package/dist/src/gateway/service/agent-runner.js +2 -2
  314. package/dist/src/gateway/service/config-coordinator.js +2 -2
  315. package/dist/src/gateway/service/run-gateway-agent.js +5 -3
  316. package/dist/src/gateway/service/session-command-service.js +1 -1
  317. package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -0
  318. package/dist/src/gateway/service/session-input-coordinator.js +13 -3
  319. package/dist/src/gateway/service.d.ts +4 -0
  320. package/dist/src/gateway/service.js +42 -17
  321. package/dist/src/gateway/xopc-cloud-capability-setup.js +2 -2
  322. package/dist/src/home-intelligence/follow-ups.js +1 -1
  323. package/dist/src/home-intelligence/host.js +1 -1
  324. package/dist/src/home-intelligence/repository.js +1 -1
  325. package/dist/src/home-intelligence/routines.js +1 -1
  326. package/dist/src/imports/files.js +1 -1
  327. package/dist/src/imports/importService.js +2 -2
  328. package/dist/src/imports/inventory.js +1 -1
  329. package/dist/src/imports/planner.js +1 -1
  330. package/dist/src/imports/productImport.js +1 -1
  331. package/dist/src/imports/scanner.js +1 -1
  332. package/dist/src/imports/sources.js +1 -1
  333. package/dist/src/infra/brew.js +1 -1
  334. package/dist/src/infra/bus/queue.js +1 -1
  335. package/dist/src/infra/package-runtime-check.js +1 -1
  336. package/dist/src/infra/path-env.js +1 -1
  337. package/dist/src/infra/ports.js +1 -1
  338. package/dist/src/infra/process-diagnostics.js +1 -1
  339. package/dist/src/infra/ssh-tunnel.js +1 -1
  340. package/dist/src/infra/update-startup.js +1 -1
  341. package/dist/src/infra/write-file-atomic.js +1 -1
  342. package/dist/src/knowledge-memory/repository.js +1 -1
  343. package/dist/src/knowledge-memory/usage-policy.js +1 -1
  344. package/dist/src/local-apps/artifact-files.js +1 -1
  345. package/dist/src/local-apps/execution-authority.js +1 -1
  346. package/dist/src/local-apps/p1-services.js +1 -1
  347. package/dist/src/local-apps/preview-sessions.js +1 -1
  348. package/dist/src/local-apps/preview-worker.js +1 -1
  349. package/dist/src/local-apps/public-assets.js +1 -1
  350. package/dist/src/local-apps/service.js +3 -3
  351. package/dist/src/local-apps/store.js +1 -1
  352. package/dist/src/markdown/index.js +1 -1
  353. package/dist/src/mcp/connection-grants.js +1 -1
  354. package/dist/src/mcp/delegation.js +3 -3
  355. package/dist/src/mcp/gateway-http-client.js +1 -1
  356. package/dist/src/media/session-references.js +1 -1
  357. package/dist/src/media-shared/http/provider-http.js +1 -1
  358. package/dist/src/media-understanding/runner.js +1 -1
  359. package/dist/src/memory-learning/choice-observations.js +1 -1
  360. package/dist/src/memory-learning/source-learning.js +2 -2
  361. package/dist/src/music-generation/artifact.js +2 -2
  362. package/dist/src/notes/agent-context.js +1 -1
  363. package/dist/src/notes/service.js +1 -1
  364. package/dist/src/notes/store.js +1 -1
  365. package/dist/src/notifications/store.js +1 -1
  366. package/dist/src/observability/runtime.js +1 -1
  367. package/dist/src/personal-agent/proactivity/repository.js +1 -1
  368. package/dist/src/personal-agent/proactivity/routes.js +1 -1
  369. package/dist/src/personal-agent/proactivity/service.js +3 -3
  370. package/dist/src/personal-agent/prompt-context.js +2 -2
  371. package/dist/src/personal-agent/reply-composer.js +4 -4
  372. package/dist/src/personal-agent/reply-style.d.ts +2 -2
  373. package/dist/src/personal-agent/reply-style.js +8 -7
  374. package/dist/src/personal-agent/request-delivery.js +1 -1
  375. package/dist/src/personal-agent/request-service.js +1 -1
  376. package/dist/src/personal-agent/result-reader.js +3 -3
  377. package/dist/src/personal-agent/service.js +1 -1
  378. package/dist/src/personal-agent/unread.js +1 -1
  379. package/dist/src/phone/adb-driver.js +2 -2
  380. package/dist/src/phone/cloud-adb-connection.js +1 -1
  381. package/dist/src/phone/execution-trace.js +1 -1
  382. package/dist/src/phone/hdc-driver.js +2 -2
  383. package/dist/src/phone/hdc-video-tools.js +1 -1
  384. package/dist/src/phone/model-adapter.js +1 -1
  385. package/dist/src/phone/ui-session.js +1 -1
  386. package/dist/src/platform/index.js +1 -1
  387. package/dist/src/project-trust/trust-store.js +1 -1
  388. package/dist/src/projects/workspace-project.js +1 -1
  389. package/dist/src/providers/extension-stream-bridge.js +2 -2
  390. package/dist/src/providers/index.js +4 -4
  391. package/dist/src/providers/model-call.js +3 -3
  392. package/dist/src/providers/model-catalog-persistence.js +2 -2
  393. package/dist/src/providers/model-registry.js +3 -3
  394. package/dist/src/providers/provider-disconnect-core.js +1 -1
  395. package/dist/src/providers/register-runtime-providers.js +1 -1
  396. package/dist/src/providers/setup/voice.js +1 -1
  397. package/dist/src/providers/xopc-cloud-catalog-coordinator.js +1 -1
  398. package/dist/src/providers/xopc-cloud-credit-budget.js +1 -1
  399. package/dist/src/providers/xopc-cloud-model-source.js +1 -1
  400. package/dist/src/review/review-git.js +1 -1
  401. package/dist/src/runtime-tools/downloader.js +1 -1
  402. package/dist/src/runtime-tools/harmony-dependencies.js +1 -1
  403. package/dist/src/runtime-tools/manager.js +2 -2
  404. package/dist/src/runtime-tools/phone-dependencies.js +1 -1
  405. package/dist/src/session/history-recall-policy.js +1 -1
  406. package/dist/src/session/init-session-turn.js +1 -1
  407. package/dist/src/session/resolve-session.js +1 -1
  408. package/dist/src/share/hosted-note-publication.js +1 -1
  409. package/dist/src/share/hosted-session-share.js +1 -1
  410. package/dist/src/share/hosted-static-site-publication.js +1 -1
  411. package/dist/src/share/session-share-service.js +1 -1
  412. package/dist/src/share/share-auto.js +1 -1
  413. package/dist/src/share/share-zip.js +1 -1
  414. package/dist/src/share/site-proxy.js +1 -1
  415. package/dist/src/space/budget-workbook.js +1 -1
  416. package/dist/src/space/ingest.js +1 -1
  417. package/dist/src/space/repository.js +2 -2
  418. package/dist/src/space/workbook-turn.js +1 -1
  419. package/dist/src/space/worker.js +1 -1
  420. package/dist/src/storage/sqlite/ai-usage-repository.js +1 -1
  421. package/dist/src/storage/sqlite/clarification-wait-repository.js +2 -2
  422. package/dist/src/storage/sqlite/connection.js +2 -2
  423. package/dist/src/storage/sqlite/conversation-repository.js +2 -2
  424. package/dist/src/storage/sqlite/desktop-execution-repository.js +1 -1
  425. package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +1 -1
  426. package/dist/src/storage/sqlite/device-access-repository.js +1 -1
  427. package/dist/src/storage/sqlite/device-pairing-approval.js +1 -1
  428. package/dist/src/storage/sqlite/index.js +1 -1
  429. package/dist/src/storage/sqlite/schema-upgrade.js +3 -3
  430. package/dist/src/storage/sqlite/session-creation-repository.js +1 -1
  431. package/dist/src/storage/sqlite/session-input-control-repository.js +1 -1
  432. package/dist/src/storage/sqlite/session-repository.js +1 -1
  433. package/dist/src/support/collect-support-report.js +1 -1
  434. package/dist/src/tasks/capabilities/management.js +1 -1
  435. package/dist/src/tasks/capabilities/relations.js +1 -1
  436. package/dist/src/tasks/delegated-run-result.js +1 -1
  437. package/dist/src/tasks/task-allocation-service.js +2 -2
  438. package/dist/src/tasks/task-application-service.js +1 -1
  439. package/dist/src/tasks/task-context-assembler.js +2 -2
  440. package/dist/src/tasks/task-criterion-review-repository.js +1 -1
  441. package/dist/src/tasks/task-deliverables.js +1 -1
  442. package/dist/src/tasks/task-delivery-checks.js +1 -1
  443. package/dist/src/tasks/task-handoff-service.js +1 -1
  444. package/dist/src/tasks/task-handoff.js +4 -4
  445. package/dist/src/tasks/task-json-acceptance.js +1 -1
  446. package/dist/src/tasks/task-main-update-decision-service.js +1 -1
  447. package/dist/src/tasks/task-origin-repository.js +1 -1
  448. package/dist/src/tasks/task-read-model-projector.js +1 -1
  449. package/dist/src/tasks/task-research-repair.js +2 -2
  450. package/dist/src/tasks/task-research-result.js +3 -3
  451. package/dist/src/tasks/task-result-delivery-repository.js +1 -1
  452. package/dist/src/tasks/task-result-delivery-service.js +2 -2
  453. package/dist/src/tasks/task-run-coordinator.js +3 -3
  454. package/dist/src/tasks/task-run-repository.js +1 -1
  455. package/dist/src/tasks/task-signal-service.js +1 -1
  456. package/dist/src/tasks/task-workspace-verification.js +2 -2
  457. package/dist/src/tui/backends/embedded-backend.js +5 -5
  458. package/dist/src/tui/backends/embedded-drafts.js +1 -1
  459. package/dist/src/tui/clipboard-image.js +2 -2
  460. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  461. package/dist/src/tui/tui-capabilities.js +1 -1
  462. package/dist/src/tui/tui-commands.js +1 -1
  463. package/dist/src/tui/tui-skills-autocomplete.js +2 -2
  464. package/dist/src/tui/tui-startup-resources.js +1 -1
  465. package/dist/src/tui/tui.js +4 -4
  466. package/dist/src/tunnel/frpc-binary.js +2 -2
  467. package/dist/src/usage/cloud-capability.js +1 -1
  468. package/dist/src/usage/recorder.js +2 -2
  469. package/dist/src/user-context/access-policy.js +2 -2
  470. package/dist/src/user-model/bootstrap.js +1 -1
  471. package/dist/src/user-model/capture/executor.js +1 -1
  472. package/dist/src/user-model/index.js +2 -2
  473. package/dist/src/user-model/usage-policy.js +1 -1
  474. package/dist/src/utils/index.js +1 -1
  475. package/dist/src/utils/logger/index.js +2 -2
  476. package/dist/src/utils/logger.js +1 -1
  477. package/dist/src/video-generation/artifact.js +2 -2
  478. package/dist/src/video-generation/repository.js +1 -1
  479. package/dist/src/voice/audio/normalize.js +1 -1
  480. package/dist/src/voice/platform-settings.js +1 -1
  481. package/dist/src/voice/realtime/conversation-context.js +1 -1
  482. package/dist/src/voice/realtime/memory-context.js +2 -2
  483. package/dist/src/voice/realtime/runtime.js +2 -2
  484. package/dist/src/voice/realtime/user-context.js +1 -1
  485. package/dist/src/voice/stt/factory.js +1 -1
  486. package/dist/src/voice/stt/index.js +2 -2
  487. package/dist/src/voice/stt/preflight.js +2 -2
  488. package/dist/src/voice/stt/providers/bailian-plan-transcription.js +3 -3
  489. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +3 -3
  490. package/dist/src/voice/stt/transcribe-core.js +1 -1
  491. package/dist/src/voice/tts/factory.js +1 -1
  492. package/dist/src/voice/tts/providers/bailian-plan-speech.js +2 -2
  493. package/dist/src/voice/tts/providers/edge-speech.js +1 -1
  494. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +2 -2
  495. package/dist/src/work-discovery/candidate-discovery.js +2 -2
  496. package/dist/src/work-discovery/probe.js +2 -2
  497. package/dist/src/work-discovery/service.js +4 -4
  498. package/package.json +1 -1
  499. package/dist/gateway/static/root/assets/right-workspace-store-CcRApllu.js +0 -1
@@ -4,16 +4,16 @@ const PERSONAL_REPLY_STYLE_RULES = [
4
4
  "Do not invent a new owner lookup, verification, contact or follow-up step to make an update sound helpful. If the supplied team is the relevant responsible party, name that team without creating a missing-person lookup. An unknown detail does not authorize you to investigate it. Promise a later notification only for a requested or already-authorized follow-up with a verified enabled delivery path. If that path is absent or unknown, give the current facts without promising a later update.",
5
5
  "Keep the supplied action and its object specific when rewriting progress: checking an appliance or comparing quantities must not collapse into vaguely handling the matter. Preserve known successes, failures, uncertainty and actual retry state while adopting newer facts. Express each fact once in ordinary language; do not restate not started as waiting to start or add status boilerplate to a simple acknowledgement. Precision must still read like a natural reply, not a checklist.",
6
6
  "Own the user-facing work in the first person: prefer \"I will check\", \"I am checking\" or \"Here is what I found\" to dispatch language such as \"I assigned someone to check\". Internal Agent coordination does not need to become the subject of the reply. Match the verb to verified progress: intent or queue admission is not running, a worker report is not your independent verification, and completion is not delivery. Name an external collaborator only when relevant to the user and supported by evidence. Promise later updates only when a verified follow-up or delivery path supports them.",
7
- "Write the reply as a short message to one person. In the opening sentences, say what they can decide, use, or do now, and name the condition or uncertainty that could change that. For a decision, include the decisive trade-offs once. For a task result, say which parts are usable, what is still missing, and any action the reader needs to take. Use at most one short paragraph plus a few distinct bullets when that covers the request. For ordinary replies, aim for about 120–250 Chinese characters or 60–120 English words, with room for essential facts. Keep the figures, deadlines, and limits needed to act. Leave the background, play-by-play, repeated summary and optional next steps out. Honor a numerical length limit when the user sets one. Requests for detail, exact text, code, tables, reports, or complete lists take precedence.",
8
- "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; group routine newsletters and promotions briefly. Omit expired verification codes and irrelevant historical notices unless requested or material to the question. Do not turn every retrieved item into a finding or append the source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.",
7
+ "Write the reply as a natural message from one real person to another, in plain idiomatic language with comfortable rhythm. In the opening sentence, give the direct answer, core distinction, or clear recommendation, and place any condition that changes it right alongside rather than in a trailing lecture. For everyday chat, casual explanations, light advice, and narrow follow-ups, default to one or two short plain-prose paragraphs: do not scatter **bold** emphasis inside ordinary sentences, and do not force headings, numbered frameworks, or bullet lists when smooth prose reads better. Reserve a few crisp bullets or a compact table only for multi-item summaries, explicit comparisons, or multi-part technical answers where structure genuinely helps scanning. For ordinary replies, aim for about 80–220 Chinese characters or 50–120 English words, with room for essential facts, figures, and deadlines. Leave out background padding, repeated summaries, unrequested lifestyle/safety tips, random trivia, canned slogans, and unnecessary capability disclaimers (such as saying you cannot send a message when the user only asked you to draft it). Honor explicit length limits. Requests for detail, exact text, code, tables, reports, or complete lists take precedence—cover every requested point thoroughly and cleanly, without inflating into a textbook with redundant ASCII diagrams, repeated recap sections, or tangential sub-topics.",
8
+ "For summaries, lead with the conclusion and select findings by relevance to the user’s request. Put items inside the requested timeframe first; if another item right outside that window has an imminent deadline or real penalty (such as tomorrow morning or noon), flag it briefly in a separate closing line so it is not missed, instead of either dropping it or lumping it into today's list. Merge duplicate notices about the same event. Include concrete actions and deadlines when supported; omit expired verification codes, routine ads, and irrelevant historical notices unless requested or material. Do not turn every retrieved item into a finding or append a source inventory after the summary. Place useful source links beside the findings they support. Provide a complete list only when requested.",
9
9
  "Keep routine execution assurances out of the reply: do not list operations you did not perform, announce read-only access, or recite exact query timestamps by default. State coverage briefly when it matters to interpreting the answer, and always disclose incomplete retrieval or a material evidence gap. Do not add a generic disclaimer that you have not independently rechecked a worker report; qualify the particular uncertain claim instead. A newsletter’s claims remain attributed claims, not verified technical advice; do not infer current calendars or subscription consequences from a notification alone.",
10
- "Use short paragraphs and useful structure. When the user accepts a settled plan with no new question, acknowledge briefly and end: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.",
10
+ "Keep paragraphs short and easy to scan. On narrow follow-ups, answer only the newly asked angle without re-explaining previous turns or repeating already-stated consequences. When the user vents or chats casually without asking for advice, respond with brief, genuine human phrasing—skip therapist-style reframing (such as 'X does not mean Y, it is normal to feel Z'), formulaic empathy, or unsolicited coaching. When the user accepts a settled plan or wraps up with no new question, close simply and naturally like a real person: no next-step reminder, new question, benefit statement, or re-teaching. Answer new substantive requests normally.",
11
11
  "Interpret short replies in context; an acknowledgement is not a new task, cancellation, or request for detail. Continue accepted offers and honor stop requests.",
12
12
  "Vary openings naturally; greetings, reassurance, humor, and questions are optional. Continue from the user's last substantive point; a brief agreement can stand on its own. When the user switches topics, let an unsolicited task result name its original subject briefly and keep the current conversation intact. Keep ongoing tone and detail preferences; a single-turn exception does not reset them.",
13
13
  "Keep requested content, limits, and partial failures visible. Separate plans, actions, and verified outcomes; agreement is not proof of trust, fairness, or resolution. Cite sources when requested or necessary.",
14
- "Use supplied facts in drafts and roleplay. Never invent a private disclosure, quote, action or reaction to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."
14
+ "Use supplied facts in drafts and roleplay, and match the real relationship and medium (a WeChat message to a close friend should sound like a real friend, not a formal memo). Distinguish asking how to explain something (answer in your own voice, with sample wording if helpful) from asking for copy-ready text or only the message body (output the plain text directly without quotation marks, framing lead-ins, or explanations). When asked to delete pleasantries or a phrase, remove it completely instead of rewording it. Never invent a private disclosure, quote, action, excuse, or commitment to win agreement. Requested fiction may add details, but not contradict given facts. Speak for yourself; laughter does not prove feelings. Leave unknown motives open, even in questions; one incident is not a lasting pattern. Drop corrected readings immediately. Respond in your current role. Give requested wording or advice. After agreement, close without recapping duties, teaching its value or seeking feedback. Explain only live confusion or risk."
15
15
  ];
16
- const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence.
16
+ const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence and plain human phrasing.
17
17
  <examples>
18
18
  <example>Context: Report export failed, no file created and no retry initiated. User: 说短一点。 Assistant: 导出失败,还没有生成文件。</example>
19
19
  <example>Context: Support team is handling a ticket; no request or capability for follow-up. User: 谁在处理,现在什么进度? Assistant: 客服团队正在处理,目前还没有处理结果。</example>
@@ -24,10 +24,11 @@ const PERSONAL_REPLY_EXAMPLES = `Examples; use evidence.
24
24
  <example>Context: Worker returned leads, not independently verified. User: 有结果了吗? Assistant: 目前查到一些线索,具体原因还没确认。</example>
25
25
  <example>Context: Recipient unclear. User: 发给他。 Assistant: 你指的是刚才提到的哪一位?</example>
26
26
  <example>Context: Mail partly retrieved; auth expired. Assistant: 已经查到的几封邮件在下面。剩下的因为连接过期暂时没查完;重新连接后才能接着看。</example>
27
+ <example>User: 为什么刚洗完澡出来镜子全是雾? Assistant: 热水让浴室里水汽很重,镜子表面温度低,热腾腾的水蒸气碰上去就会凝成一层细密的小水珠,看着就是一片雾。</example>
28
+ <example>User: 帮我写一句发给朋友借伞的微信,只要正文。 Assistant: 你那把伞方便借我用一下吗?</example>
27
29
  <example>User: 写一段骑士在暴风雨前鼓舞同伴的独白。 Assistant: 雨还没有落下,诸位,可我已听见你们盾牌上未来的雷声。今夜守住这座桥,桥后的灯火便不会熄灭。</example>
28
30
  <example>Context: 对亲戚谈刚才的玩笑。 User: 你是觉得我这人不行? Assistant: 不是。我是不喜欢那个玩笑,希望以后别再拿这件事开玩笑。</example>
29
- <example>User: 想约朋友吃饭,但我和对象还没定哪天有空。 Assistant: 可以先看看周三晚上;你们原来的安排再换个时间。</example>
30
- <example>User: One sentence to apologize for interrupting. Assistant: “I cut you off earlier. I'm sorry—I'd like to hear the rest.”</example>
31
+ <example>User: One sentence to apologize for interrupting, body only. Assistant: I cut you off earlier. I'm sorry—I'd like to hear the rest.</example>
31
32
  <example>Context: Plan accepted. User: 好,那我周五把材料发过去。 Assistant: 好。</example>
32
33
  </examples>`;
33
34
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TASK_RESULT_DELIVERY_TYPE, TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { init_task_instruction_sequence, taskInstructionSequence } from "../tasks/task-instruction-sequence.js";
8
8
  import { finalizedTaskResultId, init_task_result_versions } from "../tasks/task-result-versions.js";
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TaskCreateRequestSchema } from "../../packages/gateway-contract/src/tasks.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { getSessionInputById, getSessionInputState, init_session_input_repository } from "../storage/sqlite/session-input-repository.js";
8
8
  import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
@@ -1,20 +1,20 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
3
  import { TaskResultDeliverySchema } from "../../packages/gateway-contract/src/task-result-delivery.js";
5
4
  import { init_src } from "../../packages/gateway-contract/src/index.js";
5
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
6
6
  import { init_session_instance_repository, readCurrentTranscriptId } from "../storage/sqlite/session-instance-repository.js";
7
7
  import { init_request_repository, personalRequestForTask } from "./request-repository.js";
8
8
  import { getConnectorAccount, init_connector_account_repository } from "../storage/sqlite/connector-account-repository.js";
9
9
  import { getConnectorConnection, getConnectorInstallation, init_connector_repository } from "../storage/sqlite/connector-repository.js";
10
10
  import { isPersonalConversation } from "./repository.js";
11
+ import { resolveMediaReference } from "../media/media-reference.js";
11
12
  import { canAccessConnectorAccount } from "../connectors/account-access.js";
12
13
  import { connectorPrincipalForSession } from "../connectors/principal.js";
13
- import { resolveMediaReference } from "../media/media-reference.js";
14
14
  import { createRequire } from "node:module";
15
+ import { createHash, randomUUID } from "node:crypto";
15
16
  import { existsSync } from "node:fs";
16
17
  import { fileURLToPath } from "node:url";
17
- import { createHash, randomUUID } from "node:crypto";
18
18
  import { lstat } from "node:fs/promises";
19
19
  import { Worker } from "node:worker_threads";
20
20
  //#region src/personal-agent/result-reader.ts
@@ -3,8 +3,8 @@ import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js
3
3
  import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
4
4
  import { setSessionConfig } from "../storage/sqlite/config-repository.js";
5
5
  import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
6
- import { getAvailableModels, init_providers } from "../providers/index.js";
7
6
  import { getPersonalAgent, personalAgentId } from "./repository.js";
7
+ import { getAvailableModels, init_providers } from "../providers/index.js";
8
8
  import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
9
9
  import { AgentCatalogService } from "../agent-catalog/service.js";
10
10
  import { personalInstructions } from "./prompts.js";
@@ -1,6 +1,6 @@
1
- import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
2
1
  import { TASK_RESULT_DELIVERY_TYPE } from "../../packages/gateway-contract/src/task-result-delivery.js";
3
2
  import { init_src } from "../../packages/gateway-contract/src/index.js";
3
+ import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
4
4
  //#region src/personal-agent/unread.ts
5
5
  init_src();
6
6
  init_transaction();
@@ -9,10 +9,10 @@ import { managedPhoneAdbPath } from "../runtime-tools/phone-dependency-catalog.j
9
9
  import { parsePhoneApplications, phoneApplicationsCommand } from "./applications.js";
10
10
  import { readScrcpyServer, scrcpyServerPath } from "./scrcpy-assets.js";
11
11
  import { readPhoneForeground } from "./foreground.js";
12
- import { homedir } from "node:os";
13
12
  import { delimiter, join } from "node:path";
14
- import { existsSync } from "node:fs";
15
13
  import { randomUUID } from "node:crypto";
14
+ import { homedir } from "node:os";
15
+ import { existsSync } from "node:fs";
16
16
  import { setTimeout } from "node:timers/promises";
17
17
  //#region src/phone/adb-driver.ts
18
18
  init_contracts();
@@ -8,8 +8,8 @@ import { readScrcpyServer } from "./scrcpy-assets.js";
8
8
  import { protectPhoneCredential } from "./cloud-key-permissions.js";
9
9
  import { join } from "node:path";
10
10
  import { createHash, createPrivateKey, randomUUID } from "node:crypto";
11
- import { lstat, mkdir, readFile, rm, writeFile } from "node:fs/promises";
12
11
  import { connect } from "node:net";
12
+ import { lstat, mkdir, readFile, rm, writeFile } from "node:fs/promises";
13
13
  //#region src/phone/cloud-adb-connection.ts
14
14
  init_paths();
15
15
  init_contracts();
@@ -1,5 +1,5 @@
1
- import { AsyncLocalStorage } from "node:async_hooks";
2
1
  import { randomUUID } from "node:crypto";
2
+ import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { performance } from "node:perf_hooks";
4
4
  //#region src/phone/execution-trace.ts
5
5
  const context = new AsyncLocalStorage();
@@ -1,10 +1,10 @@
1
1
  import { PhoneError, init_contracts } from "./contracts.js";
2
2
  import { runPhoneCommandBuffer } from "../process/phone-process.js";
3
3
  import { managedHdcPath } from "../runtime-tools/harmony-paths.js";
4
- import { homedir, tmpdir } from "node:os";
5
4
  import { join } from "node:path";
6
- import { existsSync } from "node:fs";
7
5
  import { randomUUID } from "node:crypto";
6
+ import { homedir, tmpdir } from "node:os";
7
+ import { existsSync } from "node:fs";
8
8
  import { mkdtemp, readFile, rm } from "node:fs/promises";
9
9
  import { setTimeout } from "node:timers/promises";
10
10
  //#region src/phone/hdc-driver.ts
@@ -3,8 +3,8 @@ import { runPhoneCommandBuffer } from "../process/phone-process.js";
3
3
  import { managedHosJar, managedJavaHome } from "../runtime-tools/harmony-paths.js";
4
4
  import { resolveHdcPath } from "./hdc-driver.js";
5
5
  import { HDC_VIDEO_BRIDGE_SOURCE } from "./hdc-video-bridge.js";
6
- import { tmpdir } from "node:os";
7
6
  import { delimiter, dirname, join } from "node:path";
7
+ import { tmpdir } from "node:os";
8
8
  import { existsSync, readdirSync, realpathSync } from "node:fs";
9
9
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
10
10
  //#region src/phone/hdc-video-tools.ts
@@ -1,7 +1,7 @@
1
1
  import { PhoneDecisionSchema, PhoneError, init_contracts } from "./contracts.js";
2
2
  import { init_model_policy, phoneModelProfile } from "./model-policy.js";
3
- import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
4
3
  import { cloudCreditBudgetHeaders, reportCloudCreditError } from "../providers/xopc-cloud-credit-budget.js";
4
+ import { getApiKey, init_providers, resolveModel } from "../providers/index.js";
5
5
  import { currentPhoneTrace, measurePhonePhase } from "./execution-trace.js";
6
6
  import { phoneAllowsApp } from "./app-access.js";
7
7
  import { predictPhoneToolDecision } from "./structured-model.js";
@@ -3,9 +3,9 @@ import { measurePhonePhase } from "./execution-trace.js";
3
3
  import { spawnPhoneInteractiveCommand } from "../process/phone-process.js";
4
4
  import { runAdb } from "./adb-command.js";
5
5
  import { PHONE_UI_DEX } from "./ui-dump-binary.js";
6
- import { tmpdir } from "node:os";
7
6
  import { join } from "node:path";
8
7
  import { createHash, randomUUID } from "node:crypto";
8
+ import { tmpdir } from "node:os";
9
9
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
10
10
  //#region src/phone/ui-session.ts
11
11
  init_contracts();
@@ -1,5 +1,5 @@
1
- import { AgentManifestSchema, PlatformCapabilitySchema, PlatformConfigSchema, PlatformDiscoverySchema, PlatformEventSchema, init_contracts } from "./contracts.js";
2
1
  import { init_resolution, resolveConnectedPlatformDiscovery, resolveConnectedPlatformEndpoint, setActivePlatformDiscovery } from "./resolution.js";
2
+ import { AgentManifestSchema, PlatformCapabilitySchema, PlatformConfigSchema, PlatformDiscoverySchema, PlatformEventSchema, init_contracts } from "./contracts.js";
3
3
  import { PLATFORM_RUNTIME_PROFILE, PLATFORM_RUNTIME_PROVIDER, PlatformRuntimeClient, RuntimeCommandSchema, discoverPlatform } from "./client.js";
4
4
  import { processRuntimeCommand } from "./worker.js";
5
5
  //#region src/platform/index.ts
@@ -1,7 +1,7 @@
1
1
  import { resolveStateDir } from "../config/paths-state.js";
2
2
  import { init_paths } from "../config/paths.js";
3
- import { homedir } from "node:os";
4
3
  import { dirname, join, resolve } from "node:path";
4
+ import { homedir } from "node:os";
5
5
  import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
6
6
  import lockfile from "proper-lockfile";
7
7
  //#region src/project-trust/trust-store.ts
@@ -1,8 +1,8 @@
1
1
  import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
2
2
  import { init_workspace_path, normalizeWorkspaceDir } from "../config/workspace-path.js";
3
3
  import { init_agent_scope, resolveUserPath } from "../agent/agent-scope.js";
4
- import { homedir, tmpdir } from "node:os";
5
4
  import { basename, dirname, isAbsolute, join, parse, relative, resolve } from "node:path";
5
+ import { homedir, tmpdir } from "node:os";
6
6
  import { existsSync, mkdirSync, realpathSync, statSync } from "node:fs";
7
7
  import { execFileSync } from "node:child_process";
8
8
  //#region src/projects/workspace-project.ts
@@ -1,10 +1,10 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { assertProviderUsage, init_model_usage } from "./model-usage.js";
4
3
  import "./constants.js";
4
+ import { assertProviderUsage, init_model_usage } from "./model-usage.js";
5
+ import { cloudWireUsage } from "../usage/cloud-wire.js";
5
6
  import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
6
7
  import { init_providers } from "./index.js";
7
- import { cloudWireUsage } from "../usage/cloud-wire.js";
8
8
  import { stripPromptCacheBoundary } from "../agent/prompt/cache-boundary.js";
9
9
  import { createAssistantMessageEventStream, getCurrentSystemPrompt, getCurrentTools, streamSimple } from "@earendil-works/pi-ai/compat";
10
10
  //#region src/providers/extension-stream-bridge.ts
@@ -1,16 +1,16 @@
1
1
  import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
- import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
3
2
  import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
4
3
  import { assertCurrentModelProvider, init_provider_policy, isRetiredModelProvider } from "./provider-policy.js";
5
4
  import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
6
- import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
7
- import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
8
5
  import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
9
6
  import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
7
+ import { init_provider_auth_service, resolveProviderApiKey } from "./provider-auth-service.js";
10
8
  import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
9
+ import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
10
+ import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
11
+ import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
11
12
  import { getSupplementalModels, init_model_supplements } from "./model-supplements.js";
12
13
  import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
13
- import { init_provider_auth_service, resolveProviderApiKey } from "./provider-auth-service.js";
14
14
  import { getModel, getModels, getProviders } from "@earendil-works/pi-ai/compat";
15
15
  //#region src/providers/index.ts
16
16
  /**
@@ -1,11 +1,11 @@
1
- import { assertProviderUsage, init_model_usage, modelUsageOriginForCall, withModelUsageOrigin } from "./model-usage.js";
2
1
  import { init_constants } from "./constants.js";
3
- import { getApiKey, init_providers } from "./index.js";
2
+ import { assertProviderUsage, init_model_usage, modelUsageOriginForCall, withModelUsageOrigin } from "./model-usage.js";
4
3
  import { withCloudUsageResponse } from "../usage/cloud-receipts.js";
5
4
  import { cloudWireUsage } from "../usage/cloud-wire.js";
6
- import { createExtensionAwareStreamFn } from "./extension-stream-bridge.js";
7
5
  import { finishAiUsageFromMessage, observeAiUsageStream, startAiUsageCall } from "../usage/recorder.js";
8
6
  import { assertCloudCreditBudgetActive, cloudCreditBudgetHeaders, reportCloudCreditError } from "./xopc-cloud-credit-budget.js";
7
+ import { getApiKey, init_providers } from "./index.js";
8
+ import { createExtensionAwareStreamFn } from "./extension-stream-bridge.js";
9
9
  import { completeSimple, normalizeContext } from "@earendil-works/pi-ai/compat";
10
10
  //#region src/providers/model-call.ts
11
11
  init_model_usage();
@@ -2,11 +2,11 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
3
3
  import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
4
4
  import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
5
- import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
5
+ import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
6
6
  import { PhoneModelMetadataSchema, init_contracts } from "../phone/contracts.js";
7
7
  import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
8
+ import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
8
9
  import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
9
- import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
10
10
  import { readFileSync, rmSync } from "node:fs";
11
11
  import { z } from "zod";
12
12
  import { rm } from "node:fs/promises";
@@ -2,12 +2,12 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { createLogger } from "../utils/logger/index.js";
3
3
  import { init_logger } from "../utils/logger.js";
4
4
  import { resolveModelsJsonPath } from "../config/paths.js";
5
- import { cloudThinkingOverrides, init_cloud_thinking } from "./cloud-thinking.js";
6
- import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
7
5
  import { init_provider_policy, isRetiredModelProvider } from "./provider-policy.js";
8
6
  import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
9
- import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
10
7
  import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
8
+ import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
9
+ import { cloudThinkingOverrides, init_cloud_thinking } from "./cloud-thinking.js";
10
+ import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
11
11
  import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
12
12
  import { existsSync, readFileSync } from "fs";
13
13
  import { getModels, getProviders } from "@earendil-works/pi-ai/compat";
@@ -1,9 +1,9 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { getModelRegistry, init_model_registry } from "./model-registry.js";
4
3
  import { init_oauth_provider_lock, withOAuthProviderLock } from "../auth/oauth-provider-lock.js";
5
4
  import { CredentialResolver, init_credentials } from "../auth/credentials.js";
6
5
  import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
6
+ import { getModelRegistry, init_model_registry } from "./model-registry.js";
7
7
  import { evictAllEmbeddedSessionRunners } from "../agent/embedded/session-runner.js";
8
8
  //#region src/providers/provider-disconnect-core.ts
9
9
  init_credentials();
@@ -1,8 +1,8 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
- import { cloudThinkingOverrides, init_cloud_thinking } from "./cloud-thinking.js";
3
2
  import { init_provider_policy, isRetiredModelProvider } from "./provider-policy.js";
4
3
  import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
5
4
  import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
5
+ import { cloudThinkingOverrides, init_cloud_thinking } from "./cloud-thinking.js";
6
6
  import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
7
7
  //#region src/providers/register-runtime-providers.ts
8
8
  function registerRuntimeProvider(modelRuntime, source) {
@@ -1,9 +1,9 @@
1
1
  import { voiceSupportsMode } from "../../../packages/realtime-protocol/src/voice-catalog.js";
2
2
  import { HIGGS_REALTIME_REF, init_voice } from "../../../packages/realtime-protocol/src/voice.js";
3
- import { ConfigSchema, init_schema } from "../../config/schema.js";
4
3
  import { getModelCatalogStore, init_model_catalog_store } from "../model-catalog-store.js";
5
4
  import { compareCatalogModels } from "../model-catalog-ranking.js";
6
5
  import { BAILIAN_PLAN_HOST, BAILIAN_PLAN_OMNI_MODEL, BAILIAN_PLAN_OMNI_VOICE, BAILIAN_PLAN_PROVIDER, BAILIAN_PLAN_STT_MODEL, BAILIAN_PLAN_TTS_MODEL, BAILIAN_PLAN_TTS_VOICE } from "../../voice/token-plan.js";
6
+ import { ConfigSchema, init_schema } from "../../config/schema.js";
7
7
  import { listSttProvidersForApi } from "../../voice/stt/list-providers.js";
8
8
  import { listTtsProvidersForApi } from "../../voice/tts/list-providers.js";
9
9
  import { selectPlatformVoice } from "../../voice/platform-settings.js";
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { ModelCatalogPersistence, init_model_catalog_persistence } from "./model-catalog-persistence.js";
4
4
  import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
5
- import { getModelRegistry, init_model_registry } from "./model-registry.js";
6
5
  import { init_oauth_provider_lock, withOAuthProviderLock } from "../auth/oauth-provider-lock.js";
6
+ import { getModelRegistry, init_model_registry } from "./model-registry.js";
7
7
  import { reloadImageGenerationProviders } from "../agent/image/generation/provider-registry.js";
8
8
  import { disconnectProviderCore } from "./provider-disconnect-core.js";
9
9
  import { XopcCloudModelSource } from "./xopc-cloud-model-source.js";
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { XopcCloudAccountService } from "./xopc-cloud-account-service.js";
4
- import { AsyncLocalStorage } from "node:async_hooks";
5
4
  import { createHash } from "node:crypto";
5
+ import { AsyncLocalStorage } from "node:async_hooks";
6
6
  //#region src/providers/xopc-cloud-credit-budget.ts
7
7
  init_logger();
8
8
  const log = createLogger("CloudCreditBudget");
@@ -1,9 +1,9 @@
1
1
  import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
2
2
  import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
3
+ import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
3
4
  import { PhoneModelMetadataSchema, init_contracts } from "../phone/contracts.js";
4
5
  import { init_model_policy, isDedicatedComputerProfile } from "../computer/model-policy.js";
5
6
  import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
6
- import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
7
7
  import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
8
8
  import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
9
9
  //#region src/providers/xopc-cloud-model-source.ts
@@ -1,5 +1,5 @@
1
- import { execFile } from "node:child_process";
2
1
  import { promisify } from "node:util";
2
+ import { execFile } from "node:child_process";
3
3
  //#region src/review/review-git.ts
4
4
  const execFileAsync = promisify(execFile);
5
5
  async function git(args, cwd) {
@@ -1,8 +1,8 @@
1
1
  import { RuntimeError } from "./errors.js";
2
2
  import { fetchRuntimeResource, readRuntimeResponseText } from "./network.js";
3
3
  import { dirname } from "node:path";
4
- import { createReadStream, createWriteStream } from "node:fs";
5
4
  import { createHash } from "node:crypto";
5
+ import { createReadStream, createWriteStream } from "node:fs";
6
6
  import { access, mkdir, rename, rm, stat } from "node:fs/promises";
7
7
  import { pipeline } from "node:stream/promises";
8
8
  //#region src/runtime-tools/downloader.ts
@@ -1,7 +1,7 @@
1
1
  import { RuntimeError } from "./errors.js";
2
2
  import { extractRuntimeArchive } from "./archive.js";
3
- import { runRuntimeCommand } from "./command.js";
4
3
  import { downloadVerifiedArchive, sha256File } from "./downloader.js";
4
+ import { runRuntimeCommand } from "./command.js";
5
5
  import { withInstallLock } from "./install-lock.js";
6
6
  import { runtimeDownloadPath } from "./paths.js";
7
7
  import { HDC_VERSION, HOSCRCPY_VERSION, managedHdcDir, managedHdcPath, managedHosDir, managedHosJar, managedJavaDir, managedJavaHome } from "./harmony-paths.js";
@@ -1,11 +1,11 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { applyPathPrepend } from "../infra/path-prepend.js";
4
3
  import { RuntimeError } from "./errors.js";
5
4
  import { atomicInstallRuntime, extractRuntimeArchive } from "./archive.js";
5
+ import { canFallbackRuntimeDownload, downloadVerifiedArchive } from "./downloader.js";
6
+ import { applyPathPrepend } from "../infra/path-prepend.js";
6
7
  import { runRuntimeCommand } from "./command.js";
7
8
  import { DEFAULT_RUNTIME_VERSIONS, RUNTIME_CATALOG_VERSION, detectRuntimePlatform, resolveRuntimeAsset } from "./catalog.js";
8
- import { canFallbackRuntimeDownload, downloadVerifiedArchive } from "./downloader.js";
9
9
  import { canFallbackPythonInstall, resolveRuntimeDownloadSource, runtimeGatewayPythonMirror } from "./download-source.js";
10
10
  import { withInstallLock } from "./install-lock.js";
11
11
  import { runtimeDownloadPath, runtimeLockPath, runtimeStagingDir, runtimeToolsRoot, runtimeVersionDir } from "./paths.js";
@@ -1,7 +1,7 @@
1
1
  import { RuntimeError } from "./errors.js";
2
2
  import { extractRuntimeArchive } from "./archive.js";
3
- import { runRuntimeCommand } from "./command.js";
4
3
  import { downloadVerifiedArchive, sha256File } from "./downloader.js";
4
+ import { runRuntimeCommand } from "./command.js";
5
5
  import { withInstallLock } from "./install-lock.js";
6
6
  import { runtimeDownloadPath } from "./paths.js";
7
7
  import { ADB_VERSION, SCRCPY_VERSION, managedPhoneAdbDir, managedPhoneAdbPath, managedScrcpyServerPath, phoneDependencyAsset } from "./phone-dependency-catalog.js";
@@ -1,8 +1,8 @@
1
1
  import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
2
2
  import { getSessionConfig } from "../storage/sqlite/config-repository.js";
3
- import { isOwnerIdentity } from "../user-context/identity-bindings.js";
4
3
  import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
5
4
  import { init_session_key } from "../routing/session-key.js";
5
+ import { isOwnerIdentity } from "../user-context/identity-bindings.js";
6
6
  import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
7
7
  import { OWNER_LEARNING_SESSION_SQL } from "../memory-learning/transcript-source.js";
8
8
  import { canonicalWorkspacePath } from "../projects/workspace-project.js";
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
3
  import { requireXopcDatabase } from "../storage/sqlite/connection.js";
4
4
  import "../storage/sqlite/index.js";
5
- import { SessionConfigSchema, init_schema } from "../config/schema.js";
6
5
  import { isPersonalConversation } from "../personal-agent/repository.js";
6
+ import { SessionConfigSchema, init_schema } from "../config/schema.js";
7
7
  import { evaluateSessionFreshness, resolveSessionResetPolicy } from "./reset-policy.js";
8
8
  import { resolveChannelResetConfig, resolveSessionResetType } from "./reset-type.js";
9
9
  import { resolveSessionLifecycleTimestamps } from "./lifecycle-timestamps.js";
@@ -5,8 +5,8 @@ import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js
5
5
  import { findConversationIdByTranscriptId } from "../storage/sqlite/session-repository.js";
6
6
  import { getSessionConfig } from "../storage/sqlite/config-repository.js";
7
7
  import "../storage/sqlite/index.js";
8
- import { SessionConfigSchema, init_schema } from "../config/schema.js";
9
8
  import { isPersonalConversation } from "../personal-agent/repository.js";
9
+ import { SessionConfigSchema, init_schema } from "../config/schema.js";
10
10
  import { normalizeThinkLevel, normalizeVerboseLevel } from "../agent/transcript/thinking-types.js";
11
11
  import { evaluateSessionFreshness, resolveSessionResetPolicy } from "./reset-policy.js";
12
12
  import { resolveChannelResetConfig, resolveSessionResetType } from "./reset-type.js";
@@ -1,7 +1,7 @@
1
1
  import { collectReferencedAttachmentIds } from "../notes/note-attachment-sync.js";
2
2
  import { projectPublicNoteMarkdown } from "./note-share-service.js";
3
- import { createReadStream } from "node:fs";
4
3
  import { createHash } from "node:crypto";
4
+ import { createReadStream } from "node:fs";
5
5
  import { stat } from "node:fs/promises";
6
6
  //#region src/share/hosted-note-publication.ts
7
7
  const MAX_ATTACHMENTS = 20;
@@ -7,8 +7,8 @@ import { resolveMediaReference } from "../media/media-reference.js";
7
7
  import { projectSessionShare } from "./session-share-projector.js";
8
8
  import { SessionShareSnapshotConflictError } from "./session-share-service.js";
9
9
  import { basename } from "node:path";
10
- import { createReadStream } from "node:fs";
11
10
  import { createHash, randomBytes, randomUUID } from "node:crypto";
11
+ import { createReadStream } from "node:fs";
12
12
  import { stat } from "node:fs/promises";
13
13
  //#region src/share/hosted-session-share.ts
14
14
  init_credentials();
@@ -1,8 +1,8 @@
1
1
  import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
2
2
  import { resolveMimeType } from "./share-store.js";
3
3
  import { basename, dirname, extname, posix, relative, resolve } from "node:path";
4
- import { createReadStream } from "node:fs";
5
4
  import { createHash } from "node:crypto";
5
+ import { createReadStream } from "node:fs";
6
6
  import { lstat, readdir, realpath, stat } from "node:fs/promises";
7
7
  //#region src/share/hosted-static-site-publication.ts
8
8
  const MAX_FILES = 2e3;
@@ -6,8 +6,8 @@ import { resolveMediaReference } from "../media/media-reference.js";
6
6
  import { projectSessionShare } from "./session-share-projector.js";
7
7
  import { issueShareAssetTicket, verifyShareAssetTicket } from "./share-asset-ticket.js";
8
8
  import { basename, join } from "node:path";
9
- import { createReadStream } from "node:fs";
10
9
  import { createHash, randomUUID } from "node:crypto";
10
+ import { createReadStream } from "node:fs";
11
11
  import { copyFile, mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
12
12
  //#region src/share/session-share-service.ts
13
13
  init_paths();
@@ -1,7 +1,7 @@
1
1
  import { resolveMimeType } from "./share-store.js";
2
2
  import { basename, join, resolve } from "node:path";
3
- import { readdirSync } from "node:fs";
4
3
  import { randomUUID } from "node:crypto";
4
+ import { readdirSync } from "node:fs";
5
5
  import { copyFile, mkdir, rm, stat } from "node:fs/promises";
6
6
  //#region src/share/share-auto.ts
7
7
  /**
@@ -2,8 +2,8 @@ import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
2
2
  import { relative, resolve } from "node:path";
3
3
  import { createReadStream } from "node:fs";
4
4
  import { lstat, readdir, realpath, stat } from "node:fs/promises";
5
- import { pipeline } from "node:stream/promises";
6
5
  import { Readable, Transform } from "node:stream";
6
+ import { pipeline } from "node:stream/promises";
7
7
  import { crc32, createDeflateRaw } from "node:zlib";
8
8
  //#region src/share/share-zip.ts
9
9
  const SIG_LOCAL = 67324752;
@@ -1,8 +1,8 @@
1
1
  import { createLogger } from "../utils/logger/index.js";
2
2
  import { init_logger } from "../utils/logger.js";
3
- import { request } from "undici";
4
3
  import * as ws from "ws";
5
4
  import { Readable } from "node:stream";
5
+ import { request } from "undici";
6
6
  //#region src/share/site-proxy.ts
7
7
  init_logger();
8
8
  const wsAny = ws;
@@ -1,6 +1,6 @@
1
- import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
2
1
  import { SPACE_WORKBOOK_MIME } from "../../packages/gateway-contract/src/space.js";
3
2
  import { init_src } from "../../packages/gateway-contract/src/index.js";
3
+ import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
4
4
  import { createHash, randomUUID } from "node:crypto";
5
5
  import { z } from "zod";
6
6
  //#region src/space/budget-workbook.ts
@@ -2,8 +2,8 @@ import { parseTurnOutcome } from "../../packages/gateway-contract/src/turn-outco
2
2
  import { init_src } from "../../packages/gateway-contract/src/index.js";
3
3
  import { init_uri, tryParseMediaUri } from "../media/uri.js";
4
4
  import { mimeTypeFromMediaPath, resolveMediaBufferPath } from "../media/store.js";
5
- import { lstatSync } from "node:fs";
6
5
  import { createHash, randomUUID } from "node:crypto";
6
+ import { lstatSync } from "node:fs";
7
7
  //#region src/space/ingest.ts
8
8
  init_src();
9
9
  init_uri();