@xopcai/xopc 0.0.278 → 0.0.283

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 (468) hide show
  1. package/dist/browser-ext/_locales/en/messages.json +34 -4
  2. package/dist/browser-ext/_locales/zh_CN/messages.json +34 -4
  3. package/dist/browser-ext/dist/assets/{auth-ClQTK565.js → auth-DB30ywek.js} +18 -53
  4. package/dist/browser-ext/dist/assets/pcm-capture-worklet-CGN9Mlhg.js +39 -0
  5. package/dist/browser-ext/dist/assets/{sidepanel-CeGqObOa.css → sidepanel-BbSQr-6P.css} +40 -6
  6. package/dist/browser-ext/dist/background.js +1 -1
  7. package/dist/browser-ext/dist/sidepanel.html +2 -2
  8. package/dist/browser-ext/dist/sidepanel.js +1219 -191
  9. package/dist/browser-ext/manifest.json +2 -1
  10. package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
  11. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  12. package/dist/extensions/telegram/src/inbound-processor.js +2 -2
  13. package/dist/extensions/telegram/src/outbound-sender.js +1 -1
  14. package/dist/extensions/telegram/src/plugin.js +2 -2
  15. package/dist/extensions/telegram/xopc.extension.json +1 -1
  16. package/dist/extensions/weixin/src/api/api.js +2 -2
  17. package/dist/extensions/weixin/src/auth/accounts.js +12 -12
  18. package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
  19. package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
  20. package/dist/gateway/static/root/assets/{activity-store-SJZ5fS17.js → activity-store-iPtG94qr.js} +1 -1
  21. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-lRVOwbrK.js → agent-avatar-dicebear-DQ74xqLi.js} +1 -1
  22. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-SElFkQd6.js +1 -0
  23. package/dist/gateway/static/root/assets/{agents-DNQNTDkU.js → agents-DYazUaZ6.js} +1 -1
  24. package/dist/gateway/static/root/assets/{api-CnJAVHBu.js → api-KMJzMqvZ.js} +1 -1
  25. package/dist/gateway/static/root/assets/{app-management-settings-panel-oHTY5PDs.js → app-management-settings-panel-B42TpqIb.js} +1 -1
  26. package/dist/gateway/static/root/assets/{appearance-settings-B0YnZ3ig.js → appearance-settings-D9Lfe7Sk.js} +1 -1
  27. package/dist/gateway/static/root/assets/apps-page-BzrodN8C.js +1 -0
  28. package/dist/gateway/static/root/assets/{archive-plugin-D4x142le.js → archive-plugin-BdmQwj4x.js} +1 -1
  29. package/dist/gateway/static/root/assets/{attachment-load-zibD2Hod.js → attachment-load-B4S0_nji.js} +1 -1
  30. package/dist/gateway/static/root/assets/{attachment-preview-renderer-CfEDFYPE.js → attachment-preview-renderer-wzIchDSv.js} +4 -4
  31. package/dist/gateway/static/root/assets/attachment-process-heavy-Db4nTY5N.js +5 -0
  32. package/dist/gateway/static/root/assets/{automations-page-Dkp7gp_S.js → automations-page-B3TmHNjQ.js} +1 -1
  33. package/dist/gateway/static/root/assets/automations-workspace--A4I0jMu.js +6 -0
  34. package/dist/gateway/static/root/assets/binary-plugins-B3cXF_DP.js +2 -0
  35. package/dist/gateway/static/root/assets/{block-editor-r5nCBBan.js → block-editor-05zyBXBe.js} +3 -3
  36. package/dist/gateway/static/root/assets/{browser-automation-inputs-DcVLoIzc.js → browser-automation-inputs-BTIufVbM.js} +1 -1
  37. package/dist/gateway/static/root/assets/{browser-automations-page-BnL4JnTM.js → browser-automations-page-DRBA9nwe.js} +2 -2
  38. package/dist/gateway/static/root/assets/browser-settings-page-DDTXUNWK.js +8 -0
  39. package/dist/gateway/static/root/assets/capabilities-settings-panel-Ll5UeXq5.js +8 -0
  40. package/dist/gateway/static/root/assets/channels-settings-BzL15bkU.js +1 -0
  41. package/dist/gateway/static/root/assets/{channels-status-swr-BTT2sIGg.js → channels-status-swr-DMYQNs-J.js} +1 -1
  42. package/dist/gateway/static/root/assets/{chat-terminal-dock-CWVnJtBp.js → chat-terminal-dock-Dx5KQyo5.js} +2 -2
  43. package/dist/gateway/static/root/assets/connectors-page-RPw1AOMb.js +2 -0
  44. package/dist/gateway/static/root/assets/{date-picker-XjPSlgq_.js → date-picker-CkDROZoe.js} +1 -1
  45. package/dist/gateway/static/root/assets/{dependency-picker-CkyfEP88.js → dependency-picker-Bl8HcvzL.js} +1 -1
  46. package/dist/gateway/static/root/assets/{desktop-pet-BAE_NVx5.js → desktop-pet-BcknAjbW.js} +1 -1
  47. package/dist/gateway/static/root/assets/{desktop-pet-settings-BUw6V2R9.js → desktop-pet-settings-BuCpXQPm.js} +1 -1
  48. package/dist/gateway/static/root/assets/device-pairing-wizard-D0_tCX49.js +1 -0
  49. package/dist/gateway/static/root/assets/{extension-debug-page-giBeIVUT.js → extension-debug-page-qRpb2FFa.js} +1 -1
  50. package/dist/gateway/static/root/assets/{extension-page-Bqo9bNtx.js → extension-page-C7gs9wu4.js} +1 -1
  51. package/dist/gateway/static/root/assets/{extension-settings-page-BX-6AA3k.js → extension-settings-page-CyJP1CMZ.js} +1 -1
  52. package/dist/gateway/static/root/assets/gateway-config-swr-Cpmyrr6j.js +1 -0
  53. package/dist/gateway/static/root/assets/gateway-settings-DOeeTdWE.js +1 -0
  54. package/dist/gateway/static/root/assets/{gateway-startup-retry-CVTa5HSS.js → gateway-startup-retry-DoiPeb65.js} +1 -1
  55. package/dist/gateway/static/root/assets/{heartbeat-settings-DWFAopk_.js → heartbeat-settings-CV6Dolcn.js} +1 -1
  56. package/dist/gateway/static/root/assets/home-page-Djw1H_Go.js +1 -0
  57. package/dist/gateway/static/root/assets/{image-generation-api-DtMRG1oF.js → image-generation-api-CqjHWl2T.js} +1 -1
  58. package/dist/gateway/static/root/assets/index-B_Sg5BKz.css +2 -0
  59. package/dist/gateway/static/root/assets/index-CHgOG1aR.js +74 -0
  60. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BKGPpBnV.js → keyboard-shortcuts-settings-B3XqA41D.js} +1 -1
  61. package/dist/gateway/static/root/assets/local-app-workbench-page-BPqgyYJq.js +2 -0
  62. package/dist/gateway/static/root/assets/{local-apps-page-B06ToOxB.js → local-apps-page-BcIVYp0J.js} +1 -1
  63. package/dist/gateway/static/root/assets/{locale-store-BkJ7g35d.js → locale-store-1urrBBCQ.js} +1 -1
  64. package/dist/gateway/static/root/assets/{logs-page-DibI1GsP.js → logs-page-BHax3XlS.js} +2 -2
  65. package/dist/gateway/static/root/assets/{management-settings-DJ6yMZCd.js → management-settings-DNFCdgzR.js} +1 -1
  66. package/dist/gateway/static/root/assets/{markdown-view-DF3aJP_5.js → markdown-view-BZmcFIWa.js} +1 -1
  67. package/dist/gateway/static/root/assets/{media-plugins-CdrLNAks.js → media-plugins-BDxNhoBC.js} +1 -1
  68. package/dist/gateway/static/root/assets/messages-DYFcjtmG.js +3 -0
  69. package/dist/gateway/static/root/assets/note-detail-panel-Cs46LFXO.js +5 -0
  70. package/dist/gateway/static/root/assets/notes-page-BUkcn_0t.js +8 -0
  71. package/dist/gateway/static/root/assets/{page-tabs-B7LA4z-x.js → page-tabs-agH3a2PI.js} +1 -1
  72. package/dist/gateway/static/root/assets/pdf-runtime-DU_sMPjG.js +2 -0
  73. package/dist/gateway/static/root/assets/pdf.worker.min-B4E34YdZ.js +48 -0
  74. package/dist/gateway/static/root/assets/{preview-open-alternatives-DTQRN7WR.js → preview-open-alternatives-XEZ7zDOP.js} +1 -1
  75. package/dist/gateway/static/root/assets/proactive-page-Bn484J9v.js +1 -0
  76. package/dist/gateway/static/root/assets/{product-open-page-BazdmFYo.js → product-open-page-lXAbj85Z.js} +1 -1
  77. package/dist/gateway/static/root/assets/project-detail-page-LcH21ixD.js +1 -0
  78. package/dist/gateway/static/root/assets/projects-page-DelBiwyB.js +1 -0
  79. package/dist/gateway/static/root/assets/{registry-api-CTq8EECj.js → registry-api-CxQstD00.js} +1 -1
  80. package/dist/gateway/static/root/assets/remote-access-hub-3BjFYXCf.js +1 -0
  81. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-DZf4I1.js → runtime-tools-settings-panel-DErKZlVJ.js} +2 -2
  82. package/dist/gateway/static/root/assets/{schema-form-B-Yj9DVW.js → schema-form-DhCmJQVJ.js} +1 -1
  83. package/dist/gateway/static/root/assets/sessions-page-CVFirgVd.js +1 -0
  84. package/dist/gateway/static/root/assets/settings-advanced-gate-DyfBpqkY.js +1 -0
  85. package/dist/gateway/static/root/assets/{settings-form-section-BxPUqwY6.js → settings-form-section-Dg6chotg.js} +1 -1
  86. package/dist/gateway/static/root/assets/{settings-page-zLn8lIrs.js → settings-page-LyuN5N3M.js} +1 -1
  87. package/dist/gateway/static/root/assets/setup-status-panel-CrXhTzHr.js +1 -0
  88. package/dist/gateway/static/root/assets/share-preview-page-CZvmf4Ob.js +2 -0
  89. package/dist/gateway/static/root/assets/shares-settings-DyM_D8hM.js +1 -0
  90. package/dist/gateway/static/root/assets/skill-reload-api-Bys58-15.js +1 -0
  91. package/dist/gateway/static/root/assets/skills-page-sWNvFo6D.js +2 -0
  92. package/dist/gateway/static/root/assets/{skills-page.utils-BR5bk2vT.js → skills-page.utils-Eu0WVHTS.js} +1 -1
  93. package/dist/gateway/static/root/assets/{system-settings-panel-C0ptJutB.js → system-settings-panel-DQKkM7B2.js} +1 -1
  94. package/dist/gateway/static/root/assets/task-detail-page-B18NcZQJ.js +1 -0
  95. package/dist/gateway/static/root/assets/{theme-store-mV6Cm2vj.js → theme-store-Dc5s20V3.js} +1 -1
  96. package/dist/gateway/static/root/assets/tunnel-api-TKQpPVd6.js +1 -0
  97. package/dist/gateway/static/root/assets/{use-autosave-Dc5aN2px.js → use-autosave-CkVlrFk1.js} +1 -1
  98. package/dist/gateway/static/root/assets/user-model-page-ul-zr58b.js +2 -0
  99. package/dist/gateway/static/root/assets/{voice-api-key-field-CY0DpJui.js → voice-api-key-field-B12fFN-L.js} +1 -1
  100. package/dist/gateway/static/root/assets/{voice-config-api-D3DdcH4H.js → voice-config-api-Mk78BrpP.js} +1 -1
  101. package/dist/gateway/static/root/assets/{work-discovery-overlay-Brg9yJBr.js → work-discovery-overlay-CT9Zy36i.js} +1 -1
  102. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-D3fq7boB.js → workflow-run-setup-panel-BwefQliE.js} +2 -2
  103. package/dist/gateway/static/root/assets/workflows-page-BY_AWs7S.js +6 -0
  104. package/dist/gateway/static/root/index.html +10 -11
  105. package/dist/package.js +1 -1
  106. package/dist/packages/gateway-contract/src/discussions.js +17 -0
  107. package/dist/packages/gateway-contract/src/proactive.js +4 -2
  108. package/dist/src/agent/agent-manager.js +17 -17
  109. package/dist/src/agent/agent-scope.js +2 -2
  110. package/dist/src/agent/background-review/run-background-review.js +4 -4
  111. package/dist/src/agent/context/coordinator.js +3 -3
  112. package/dist/src/agent/context/execution-context.js +4 -4
  113. package/dist/src/agent/context/execution-scope.js +2 -2
  114. package/dist/src/agent/context/project-context.d.ts +1 -0
  115. package/dist/src/agent/context/project-context.js +16 -8
  116. package/dist/src/agent/embedded/index.js +2 -2
  117. package/dist/src/agent/embedded/model-runtime.js +1 -1
  118. package/dist/src/agent/embedded/run-for-session.js +5 -5
  119. package/dist/src/agent/embedded/run-turn.js +2 -2
  120. package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
  121. package/dist/src/agent/external-tools/composio-provider.js +1 -1
  122. package/dist/src/agent/external-tools/gateway-tools.js +1 -1
  123. package/dist/src/agent/external-tools/mcp-provider.js +2 -2
  124. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  125. package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
  126. package/dist/src/agent/image/generation/providers/fal.js +1 -1
  127. package/dist/src/agent/image/generation/providers/google.js +1 -1
  128. package/dist/src/agent/image/generation/runtime.js +1 -1
  129. package/dist/src/agent/image/index.js +1 -1
  130. package/dist/src/agent/image/load-image-media.js +1 -1
  131. package/dist/src/agent/image/tool-model-config.js +1 -1
  132. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  133. package/dist/src/agent/inbound/inbound-loop.js +2 -2
  134. package/dist/src/agent/index.js +1 -1
  135. package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
  136. package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
  137. package/dist/src/agent/mcp/index.js +2 -2
  138. package/dist/src/agent/mcp/mcp-transport.js +1 -1
  139. package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
  140. package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
  141. package/dist/src/agent/memory/index.js +2 -2
  142. package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
  143. package/dist/src/agent/orchestration/agent-orchestrator.js +5 -5
  144. package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
  145. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  146. package/dist/src/agent/service/direct-turn-helpers.js +6 -6
  147. package/dist/src/agent/service/process-direct-one-shot.js +1 -1
  148. package/dist/src/agent/service/process-direct-streaming.js +5 -5
  149. package/dist/src/agent/service/webchat-tts.js +2 -2
  150. package/dist/src/agent/service.js +19 -19
  151. package/dist/src/agent/session/session-inspector.js +1 -1
  152. package/dist/src/agent/skills/filesystem-watcher.js +1 -1
  153. package/dist/src/agent/skills/hub-lock.js +1 -1
  154. package/dist/src/agent/skills/hub-pull.js +3 -3
  155. package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
  156. package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
  157. package/dist/src/agent/source-context/task-context.d.ts +3 -0
  158. package/dist/src/agent/source-context/task-context.js +24 -0
  159. package/dist/src/agent/source-context/types.d.ts +2 -2
  160. package/dist/src/agent/source-context/types.js +1 -1
  161. package/dist/src/agent/tasks/task-judge-service.js +5 -5
  162. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  163. package/dist/src/agent/tool-manuals/xopc-use.js +1 -0
  164. package/dist/src/agent/tools/create-share-tool.js +3 -3
  165. package/dist/src/agent/tools/delegate-tool.js +3 -3
  166. package/dist/src/agent/tools/executor.js +1 -1
  167. package/dist/src/agent/tools/factory.js +13 -13
  168. package/dist/src/agent/tools/image-generate-tool.js +3 -3
  169. package/dist/src/agent/tools/index.js +5 -5
  170. package/dist/src/agent/tools/list-dir.js +1 -1
  171. package/dist/src/agent/tools/publish-artifacts.js +2 -2
  172. package/dist/src/agent/tools/read.js +1 -1
  173. package/dist/src/agent/tools/review-workspace.js +1 -1
  174. package/dist/src/agent/tools/send-media.js +2 -2
  175. package/dist/src/agent/tools/skills-tools.js +1 -1
  176. package/dist/src/agent/tools/tts-tool.js +1 -1
  177. package/dist/src/agent/tools/user-context-tool.js +1 -1
  178. package/dist/src/agent/tools/write.js +2 -2
  179. package/dist/src/agent/tools/xopc-use-tool.js +6 -6
  180. package/dist/src/agent/workflow/subagent-runner.js +1 -1
  181. package/dist/src/ai-assist/text-assist.js +1 -1
  182. package/dist/src/auth/credentials.js +2 -2
  183. package/dist/src/auth/oauth/xopc-cloud.js +1 -1
  184. package/dist/src/auth/profiles/store.js +1 -1
  185. package/dist/src/auth/sync-provider-auth.js +2 -2
  186. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  187. package/dist/src/capabilities/store-connector.js +1 -1
  188. package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
  189. package/dist/src/channels/index.js +2 -2
  190. package/dist/src/channels/outbound-sender.js +1 -1
  191. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  192. package/dist/src/channels/pairing/pairing-store.js +6 -6
  193. package/dist/src/chat-commands/builtins/config.js +2 -2
  194. package/dist/src/chat-commands/builtins/review.js +1 -1
  195. package/dist/src/chat-commands/builtins/session.js +1 -1
  196. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  197. package/dist/src/chat-commands/builtins/tts.js +1 -1
  198. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  199. package/dist/src/chat-commands/builtins/workflow.js +2 -2
  200. package/dist/src/chat-commands/context.js +2 -2
  201. package/dist/src/chat-commands/index.js +3 -3
  202. package/dist/src/cli/commands/agent.js +6 -6
  203. package/dist/src/cli/commands/agents.js +1 -1
  204. package/dist/src/cli/commands/config.js +1 -1
  205. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  206. package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
  207. package/dist/src/cli/commands/extension-dev.js +1 -1
  208. package/dist/src/cli/commands/extension.js +1 -1
  209. package/dist/src/cli/commands/gateway/shared.js +1 -1
  210. package/dist/src/cli/commands/gateway/token.js +1 -1
  211. package/dist/src/cli/commands/image.js +1 -1
  212. package/dist/src/cli/commands/init.js +1 -1
  213. package/dist/src/cli/commands/models.js +1 -1
  214. package/dist/src/cli/commands/onboard.js +1 -1
  215. package/dist/src/cli/commands/project.js +2 -2
  216. package/dist/src/cli/commands/runtime.js +1 -1
  217. package/dist/src/cli/commands/skills.js +2 -2
  218. package/dist/src/cli/commands/tui.js +1 -1
  219. package/dist/src/cli/commands/tunnel.js +3 -3
  220. package/dist/src/cli/extension-cli-register.js +4 -4
  221. package/dist/src/cli/utils/gateway-client.js +1 -1
  222. package/dist/src/config/index.js +5 -5
  223. package/dist/src/config/loader.js +2 -2
  224. package/dist/src/config/models-json.js +1 -1
  225. package/dist/src/connectors/connected-source-understanding.js +2 -2
  226. package/dist/src/connectors/connection-recovery-service.js +3 -3
  227. package/dist/src/discussions/action-tasks.d.ts +21 -0
  228. package/dist/src/discussions/action-tasks.js +93 -0
  229. package/dist/src/discussions/analyzer.d.ts +21 -1
  230. package/dist/src/discussions/analyzer.js +229 -62
  231. package/dist/src/discussions/audio-repair.d.ts +8 -0
  232. package/dist/src/discussions/audio-repair.js +41 -0
  233. package/dist/src/discussions/edits.d.ts +22 -0
  234. package/dist/src/discussions/edits.js +81 -0
  235. package/dist/src/discussions/errors.d.ts +4 -0
  236. package/dist/src/discussions/errors.js +10 -0
  237. package/dist/src/discussions/export.d.ts +2 -0
  238. package/dist/src/discussions/export.js +23 -0
  239. package/dist/src/discussions/index.js +3 -2
  240. package/dist/src/discussions/live-worker.js +2 -2
  241. package/dist/src/discussions/organizer-worker.js +14 -5
  242. package/dist/src/discussions/organizer.d.ts +1 -1
  243. package/dist/src/discussions/organizer.js +60 -24
  244. package/dist/src/discussions/reconcile.d.ts +22 -0
  245. package/dist/src/discussions/reconcile.js +55 -0
  246. package/dist/src/discussions/recording.d.ts +9 -0
  247. package/dist/src/discussions/recording.js +219 -0
  248. package/dist/src/discussions/recordingJobs.d.ts +14 -0
  249. package/dist/src/discussions/recordingJobs.js +69 -0
  250. package/dist/src/discussions/repository.d.ts +4 -2
  251. package/dist/src/discussions/repository.js +15 -10
  252. package/dist/src/discussions/revisions.d.ts +12 -0
  253. package/dist/src/discussions/revisions.js +36 -0
  254. package/dist/src/discussions/sealer.d.ts +1 -0
  255. package/dist/src/discussions/sealer.js +62 -12
  256. package/dist/src/discussions/service.d.ts +16 -15
  257. package/dist/src/discussions/service.js +177 -91
  258. package/dist/src/discussions/types.d.ts +4 -139
  259. package/dist/src/discussions/types.js +1 -11
  260. package/dist/src/extensions/api.js +3 -3
  261. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  262. package/dist/src/extensions/index.js +1 -1
  263. package/dist/src/extensions/loader.js +1 -1
  264. package/dist/src/extensions/lockfile.js +1 -1
  265. package/dist/src/extensions/sdk/index.js +1 -1
  266. package/dist/src/files/file-service.d.ts +1 -0
  267. package/dist/src/files/file-service.js +77 -0
  268. package/dist/src/gateway/agents-admin.js +4 -4
  269. package/dist/src/gateway/chat-stream/mapper.js +2 -2
  270. package/dist/src/gateway/device-routes.js +2 -2
  271. package/dist/src/gateway/file-path-classifier.js +2 -2
  272. package/dist/src/gateway/hono/app.js +6 -5
  273. package/dist/src/gateway/hono/lib/config-payload.js +3 -3
  274. package/dist/src/gateway/hono/lib/static-ui.js +1 -0
  275. package/dist/src/gateway/hono/routes/agents.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 +1 -1
  278. package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
  279. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  280. package/dist/src/gateway/hono/routes/context-sources.js +1 -2
  281. package/dist/src/gateway/hono/routes/discussions.js +126 -19
  282. package/dist/src/gateway/hono/routes/files.js +1 -22
  283. package/dist/src/gateway/hono/routes/index.js +0 -2
  284. package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
  285. package/dist/src/gateway/hono/routes/mcp.js +2 -2
  286. package/dist/src/gateway/hono/routes/media.js +1 -1
  287. package/dist/src/gateway/hono/routes/models.js +5 -5
  288. package/dist/src/gateway/hono/routes/notes.js +1 -1
  289. package/dist/src/gateway/hono/routes/proactive-control.js +4 -38
  290. package/dist/src/gateway/hono/routes/project-understanding.d.ts +3 -0
  291. package/dist/src/gateway/hono/routes/project-understanding.js +65 -0
  292. package/dist/src/gateway/hono/routes/projects.js +22 -6
  293. package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
  294. package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
  295. package/dist/src/gateway/hono/routes/sessions.js +1 -1
  296. package/dist/src/gateway/hono/routes/shares.js +3 -3
  297. package/dist/src/gateway/hono/routes/site-shares.js +1 -1
  298. package/dist/src/gateway/hono/routes/status.js +1 -1
  299. package/dist/src/gateway/hono/routes/tasks.js +4 -3
  300. package/dist/src/gateway/hono/routes/user-model.js +4 -4
  301. package/dist/src/gateway/hono/routes/voice.js +3 -3
  302. package/dist/src/gateway/hono/routes/work-discovery.d.ts +0 -2
  303. package/dist/src/gateway/hono/routes/work-discovery.js +2 -16
  304. package/dist/src/gateway/hono/routes/workflows.js +2 -2
  305. package/dist/src/gateway/image-generation-setup.js +1 -1
  306. package/dist/src/gateway/lock.js +10 -10
  307. package/dist/src/gateway/media-access.js +2 -2
  308. package/dist/src/gateway/ports.js +6 -6
  309. package/dist/src/gateway/security/gateway-scopes.js +1 -2
  310. package/dist/src/gateway/server.js +1 -1
  311. package/dist/src/gateway/service/agent-runner.js +2 -2
  312. package/dist/src/gateway/service/config-coordinator.js +4 -4
  313. package/dist/src/gateway/service/marketplace-service.js +3 -3
  314. package/dist/src/gateway/service/run-gateway-agent.js +3 -3
  315. package/dist/src/gateway/service.d.ts +3 -0
  316. package/dist/src/gateway/service.js +45 -30
  317. package/dist/src/gateway/session-context-summary.js +2 -2
  318. package/dist/src/gateway/workspace-editor-path.js +2 -2
  319. package/dist/src/infra/gateway-processes.js +2 -2
  320. package/dist/src/infra/path-env.js +3 -3
  321. package/dist/src/infra/update-global.js +10 -10
  322. package/dist/src/knowledge-memory/repository.d.ts +2 -0
  323. package/dist/src/knowledge-memory/repository.js +3 -1
  324. package/dist/src/local-apps/service.js +1 -1
  325. package/dist/src/media-shared/http/ssrf-guard.js +1 -1
  326. package/dist/src/media-understanding/audio-transcription-runner.d.ts +1 -0
  327. package/dist/src/media-understanding/audio-transcription-runner.js +1 -0
  328. package/dist/src/media-understanding/runner.js +1 -0
  329. package/dist/src/media-understanding/types.d.ts +8 -0
  330. package/dist/src/notes/agent-context.js +3 -3
  331. package/dist/src/notes/service.d.ts +3 -1
  332. package/dist/src/notes/store.d.ts +3 -1
  333. package/dist/src/notes/store.js +5 -3
  334. package/dist/src/proactive/actions/service.js +1 -1
  335. package/dist/src/proactive/execution/agent-executor.js +1 -1
  336. package/dist/src/proactive/execution/context.js +1 -1
  337. package/dist/src/proactive/execution/worker.js +1 -1
  338. package/dist/src/proactive/experience.d.ts +38 -21
  339. package/dist/src/proactive/experience.js +109 -13
  340. package/dist/src/proactive/follow-ups.js +1 -1
  341. package/dist/src/proactive/inbox/cards.js +9 -3
  342. package/dist/src/proactive/inbox/delivery.js +2 -2
  343. package/dist/src/proactive/inbox/digest.js +2 -2
  344. package/dist/src/proactive/inbox/notification-policy.js +1 -1
  345. package/dist/src/proactive/inbox/repository.js +1 -1
  346. package/dist/src/proactive/inbox/service.js +1 -1
  347. package/dist/src/proactive/index.js +1 -1
  348. package/dist/src/proactive/maintenance.js +0 -1
  349. package/dist/src/proactive/scenarios/control.d.ts +0 -35
  350. package/dist/src/proactive/scenarios/control.js +7 -53
  351. package/dist/src/proactive/temporal/worker.js +1 -1
  352. package/dist/src/projects/project-skill-service.js +2 -2
  353. package/dist/src/projects/project-store.js +6 -4
  354. package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
  355. package/dist/src/providers/index.js +2 -2
  356. package/dist/src/providers/model-reference-auditor.js +1 -1
  357. package/dist/src/providers/model-registry.js +1 -1
  358. package/dist/src/providers/register-runtime-providers.js +1 -1
  359. package/dist/src/remote-access/exposure-manager.js +1 -1
  360. package/dist/src/session/client-history.d.ts +1 -1
  361. package/dist/src/session/client-history.js +1 -1
  362. package/dist/src/session/index.js +2 -2
  363. package/dist/src/session/session-title.js +1 -1
  364. package/dist/src/session/store.js +3 -3
  365. package/dist/src/session/thinking-resolve.js +1 -1
  366. package/dist/src/share/share-store.js +1 -1
  367. package/dist/src/share/share-thumbnail.js +1 -1
  368. package/dist/src/share/site-share-store.js +1 -1
  369. package/dist/src/storage/sqlite/connection.js +9 -9
  370. package/dist/src/storage/sqlite/migrations/166_remove_proactive_previews.sql +1 -0
  371. package/dist/src/storage/sqlite/migrations/167_discussion_recording_chunks.sql +7 -0
  372. package/dist/src/storage/sqlite/migrations/168_discussion_evidence.sql +16 -0
  373. package/dist/src/storage/sqlite/migrations/169_discussion_action_tasks.sql +8 -0
  374. package/dist/src/storage/sqlite/migrations/170_discussion_edits.sql +8 -0
  375. package/dist/src/storage/sqlite/migrations/171_discussion_recording_jobs.sql +14 -0
  376. package/dist/src/storage/sqlite/migrations/172_project_understanding.sql +3 -0
  377. package/dist/src/storage/sqlite/migrations/173_mobile_discussion_source.sql +5 -0
  378. package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +20 -0
  379. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  380. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  381. package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
  382. package/dist/src/storage/sqlite/schema.js +1 -1
  383. package/dist/src/tasks/execution-context.js +1 -1
  384. package/dist/src/tasks/home-query-service.js +3 -3
  385. package/dist/src/tasks/index.js +3 -3
  386. package/dist/src/tasks/task-application-service.js +1 -1
  387. package/dist/src/tasks/task-context-assembler.js +1 -1
  388. package/dist/src/tasks/task-handoff-service.js +1 -1
  389. package/dist/src/tasks/task-repository.d.ts +1 -0
  390. package/dist/src/tasks/task-repository.js +4 -0
  391. package/dist/src/tasks/task-run-coordinator.js +1 -1
  392. package/dist/src/tui/backends/embedded-backend.js +9 -9
  393. package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
  394. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  395. package/dist/src/tui/tui-command-formatters.js +1 -1
  396. package/dist/src/tui/tui-commands.js +5 -5
  397. package/dist/src/tui/tui-picker-overlay.js +1 -1
  398. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  399. package/dist/src/tui/tui-startup-resources.js +5 -5
  400. package/dist/src/tui/tui.js +3 -3
  401. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  402. package/dist/src/voice/audio/normalize.js +28 -5
  403. package/dist/src/voice/local/runtime-worker.js +1 -1
  404. package/dist/src/voice/realtime/memory-context.js +3 -3
  405. package/dist/src/voice/stt/index.js +2 -2
  406. package/dist/src/voice/stt/preflight.js +1 -1
  407. package/dist/src/voice/stt/providers/local-transcription.js +1 -1
  408. package/dist/src/voice/stt/transcribe-core.js +2 -1
  409. package/dist/src/voice/stt/types.d.ts +1 -0
  410. package/dist/src/voice/tts/index.js +3 -3
  411. package/dist/src/voice/tts/merge-config.js +1 -1
  412. package/dist/src/voice/tts/payload.js +1 -1
  413. package/dist/src/voice/tts/speak-core.js +1 -1
  414. package/dist/src/work-discovery/analyzer.d.ts +1 -0
  415. package/dist/src/work-discovery/analyzer.js +28 -22
  416. package/dist/src/work-discovery/index.js +3 -3
  417. package/dist/src/work-discovery/investigator.js +1 -1
  418. package/dist/src/work-discovery/project-understanding.d.ts +7 -0
  419. package/dist/src/work-discovery/project-understanding.js +38 -0
  420. package/dist/src/work-discovery/repository.d.ts +3 -1
  421. package/dist/src/work-discovery/repository.js +18 -5
  422. package/dist/src/work-discovery/service.d.ts +8 -0
  423. package/dist/src/work-discovery/service.js +165 -17
  424. package/dist/src/work-discovery/types.d.ts +2 -0
  425. package/dist/src/workflows/context/workflow-context.js +1 -1
  426. package/dist/src/workflows/service/workflow-run-service.js +6 -6
  427. package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
  428. package/package.json +4 -4
  429. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DAqn5DdL.js +0 -1
  430. package/dist/gateway/static/root/assets/apps-page-Bh0etSmL.js +0 -1
  431. package/dist/gateway/static/root/assets/attachment-process-heavy-C5CqLCsX.js +0 -5
  432. package/dist/gateway/static/root/assets/automations-workspace-w4McwueN.js +0 -6
  433. package/dist/gateway/static/root/assets/binary-plugins-CfUzu1Hc.js +0 -2
  434. package/dist/gateway/static/root/assets/browser-settings-page-DxX-t0EJ.js +0 -8
  435. package/dist/gateway/static/root/assets/capabilities-settings-panel-CvacBQAI.js +0 -8
  436. package/dist/gateway/static/root/assets/channels-settings-CJzSNo-L.js +0 -1
  437. package/dist/gateway/static/root/assets/config-reload-event-Bjh2zoKp.js +0 -1
  438. package/dist/gateway/static/root/assets/connectors-page-DNBhBT0b.js +0 -2
  439. package/dist/gateway/static/root/assets/device-pairing-wizard-DsR5NQEC.js +0 -1
  440. package/dist/gateway/static/root/assets/excel-worksheet-utils-DpdB-DjU.js +0 -1
  441. package/dist/gateway/static/root/assets/gateway-config-swr-cd8owslz.js +0 -1
  442. package/dist/gateway/static/root/assets/gateway-settings-Dil7vuyU.js +0 -1
  443. package/dist/gateway/static/root/assets/home-page-Dpeuvazg.js +0 -1
  444. package/dist/gateway/static/root/assets/index-B03HGpzt.js +0 -74
  445. package/dist/gateway/static/root/assets/index-CXF9-BpI.css +0 -2
  446. package/dist/gateway/static/root/assets/local-app-workbench-page-CBtemxFc.js +0 -2
  447. package/dist/gateway/static/root/assets/messages-BGc-OJWg.js +0 -3
  448. package/dist/gateway/static/root/assets/note-detail-panel-GOxomxOK.js +0 -5
  449. package/dist/gateway/static/root/assets/notes-page-CQBgk3_x.js +0 -8
  450. package/dist/gateway/static/root/assets/pdf.worker.min-CHFwMXne.mjs +0 -29
  451. package/dist/gateway/static/root/assets/proactive-card-BF3741px.js +0 -1
  452. package/dist/gateway/static/root/assets/proactive-page-1EM217v0.js +0 -1
  453. package/dist/gateway/static/root/assets/project-detail-page-B1Pm-fQd.js +0 -1
  454. package/dist/gateway/static/root/assets/projects-page-DUrxyNR9.js +0 -1
  455. package/dist/gateway/static/root/assets/remote-access-hub-C6VzHUwx.js +0 -1
  456. package/dist/gateway/static/root/assets/sessions-page-DtemHfkv.js +0 -1
  457. package/dist/gateway/static/root/assets/settings-advanced-gate-ByEVQe0c.js +0 -1
  458. package/dist/gateway/static/root/assets/setup-status-panel-BwIrk3Jx.js +0 -1
  459. package/dist/gateway/static/root/assets/share-preview-page-DAc_FkVc.js +0 -2
  460. package/dist/gateway/static/root/assets/shares-settings-Dwdv6QyS.js +0 -1
  461. package/dist/gateway/static/root/assets/skill-reload-api-CDzQWN60.js +0 -1
  462. package/dist/gateway/static/root/assets/skills-page-CO5XVkbY.js +0 -2
  463. package/dist/gateway/static/root/assets/task-detail-page-DOjcKOzQ.js +0 -1
  464. package/dist/gateway/static/root/assets/tunnel-api-BABuQvGD.js +0 -1
  465. package/dist/gateway/static/root/assets/user-model-page-UhsSP_pC.js +0 -2
  466. package/dist/gateway/static/root/assets/workflows-page-S7XXNBWa.js +0 -6
  467. package/dist/src/proactive/scenarios/preview.d.ts +0 -13
  468. package/dist/src/proactive/scenarios/preview.js +0 -81
@@ -1,9 +1,9 @@
1
1
  import { getSqliteDatabase } from "../../storage/sqlite/transaction.js";
2
2
  import { getAssertionSlot, listUserAssertions } from "../../user-model/repository.js";
3
3
  import "../../user-model/index.js";
4
- import { getDiscussionCapture, getLatestDiscussionOrganization } from "../../discussions/repository.js";
5
4
  import { authorizedConnectedSource } from "./authorization.js";
6
5
  import { authorizedMailThread, requireMailFollowUp } from "../follow-ups.js";
6
+ import { getDiscussionCapture, getLatestDiscussionOrganization } from "../../discussions/repository.js";
7
7
  import { wrapExternalContent } from "../../gateway/security/external-content.js";
8
8
  //#region src/proactive/execution/context.ts
9
9
  const MAX_EVENT_COUNT = 50;
@@ -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 { getSqliteDatabase } from "../../storage/sqlite/transaction.js";
4
- import { effectiveProactivePolicy } from "../policy/service.js";
5
4
  import { authorizedConnectedSource } from "./authorization.js";
5
+ import { effectiveProactivePolicy } from "../policy/service.js";
6
6
  import { getPromptRevision, getScenario } from "../scenarios/repository.js";
7
7
  import { composeScenarioPrompt } from "../scenarios/prompt-composer.js";
8
8
  import { markReadyBatches } from "../routing/batch-repository.js";
@@ -1,6 +1,25 @@
1
+ import { getCard } from './inbox/cards.js';
2
+ type SceneKind = 'project_momentum' | 'meeting_preparation' | 'communication_follow_up';
3
+ type SceneStatus = 'needs_decision' | 'prepared' | 'changed' | 'following';
4
+ interface SceneMoment {
5
+ id: string;
6
+ kind: SceneKind;
7
+ status: SceneStatus;
8
+ title: string;
9
+ promise: string;
10
+ moment: string;
11
+ relevance: string;
12
+ help: string;
13
+ arrangementId: string;
14
+ manageRoute: string;
15
+ object: {
16
+ label: string;
17
+ route: string;
18
+ } | null;
19
+ card: ReturnType<typeof getCard> | null;
20
+ updatedAt: string;
21
+ }
1
22
  export declare function startDelegation(workspace: string, value: unknown): {
2
- effectiveLevel: "off" | "active" | "quiet" | "balanced";
3
- schedule: Record<string, import("node:sqlite").SQLOutputValue>;
4
23
  revision: number;
5
24
  level: "off" | "active" | "quiet" | "balanced";
6
25
  delivery: "digest" | "inbox" | "important";
@@ -22,6 +41,7 @@ export declare function checkDelegation(workspace: string, id: string): {
22
41
  status: "queued";
23
42
  };
24
43
  export declare function delegationOverview(workspace: string): {
44
+ scenes: SceneMoment[];
25
45
  followUps: {
26
46
  id: string;
27
47
  subscriptionId: string;
@@ -39,31 +59,28 @@ export declare function delegationOverview(workspace: string): {
39
59
  lastSyncedAt: string;
40
60
  syncFailed: boolean;
41
61
  }[];
42
- needsDecision: import("@xopcai/gateway-contract/src/proactive.js").ProactiveCard[];
43
- prepared: import("@xopcai/gateway-contract/src/proactive.js").ProactiveCard[];
44
- updates: import("@xopcai/gateway-contract/src/proactive.js").ProactiveCard[];
45
62
  delegations: {
46
- effectiveEnabled: boolean;
47
- project: Record<string, import("node:sqlite").SQLOutputValue>;
48
- latestRun: Record<string, import("node:sqlite").SQLOutputValue>;
49
- pending: boolean;
50
- effectiveLevel: "off" | "active" | "quiet" | "balanced";
51
- schedule: Record<string, import("node:sqlite").SQLOutputValue>;
52
- revision: number;
53
- level: "off" | "active" | "quiet" | "balanced";
54
- delivery: "digest" | "inbox" | "important";
55
- completedAt: string;
56
- scanIntervalMinutes: number;
57
- userInstructions: string;
58
63
  id: string;
59
64
  scenarioKey: string;
60
- workspaceId: string;
61
- scopeKind: "workspace" | "project";
65
+ scopeKind: "project" | "workspace";
62
66
  scopeId: string;
63
67
  enabled: boolean;
64
- activePromptRevisionId?: string;
65
- createdAt: string;
68
+ revision: number;
69
+ delivery: "digest" | "inbox" | "important";
70
+ completedAt: string;
71
+ userInstructions: string;
66
72
  updatedAt: string;
73
+ effectiveEnabled: boolean;
74
+ project: {
75
+ name: string;
76
+ status: string;
77
+ };
78
+ projectMonitoring: {
79
+ mode: "observe" | "ask_before_action" | "auto_low_risk";
80
+ allowedActions: string[];
81
+ };
82
+ checking: boolean;
67
83
  }[];
68
84
  };
69
85
  export declare function completeDeliveredProjects(now?: Date): void;
86
+ export {};
@@ -2,9 +2,9 @@ import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/
2
2
  import { ProactiveConflict, effectiveProactivePolicy } from "./policy/service.js";
3
3
  import { controlledSubscriptions, createControlledSubscription, requireSubscription, updateControlledSubscription } from "./scenarios/control.js";
4
4
  import { ProactiveScenarioService } from "./scenarios/service.js";
5
- import { getCard } from "./inbox/cards.js";
6
5
  import { ProactiveEventService } from "./service.js";
7
6
  import { listMailFollowUps } from "./follow-ups.js";
7
+ import { getCard } from "./inbox/cards.js";
8
8
  import { scanDueProjects } from "./temporal/schedule.js";
9
9
  import { z } from "zod";
10
10
  //#region src/proactive/experience.ts
@@ -60,20 +60,116 @@ function delegationOverview(workspace) {
60
60
  AND (i.expires_at IS NULL OR i.expires_at > ?)
61
61
  ORDER BY CASE WHEN x.action_status = 'approval_required' THEN 0 WHEN x.artifact_json IS NOT NULL THEN 1 ELSE 2 END,
62
62
  x.value_score DESC, i.updated_at DESC LIMIT 100`).all(workspace, now).map((row) => getCard(row.inbox_item_id, workspace)).filter((card) => !["withdrawn", "expired"].includes(card.status));
63
+ const followUps = listMailFollowUps(workspace);
64
+ const delegations = controlledSubscriptions(workspace).map((sub) => ({
65
+ id: sub.id,
66
+ scenarioKey: sub.scenarioKey,
67
+ scopeKind: sub.scopeKind,
68
+ scopeId: sub.scopeId,
69
+ enabled: sub.enabled,
70
+ revision: sub.revision,
71
+ delivery: sub.delivery,
72
+ completedAt: sub.completedAt,
73
+ userInstructions: sub.userInstructions,
74
+ updatedAt: sub.updatedAt,
75
+ effectiveEnabled: effectiveProactivePolicy(sub.id).enabled,
76
+ project: sub.scopeKind === "project" ? db.prepare("SELECT name, status FROM projects WHERE project_id = ?").get(sub.scopeId) ?? null : null,
77
+ projectMonitoring: sub.scopeKind === "project" ? projectMonitoring(sub.scopeId) : null,
78
+ checking: Boolean(db.prepare("SELECT 1 FROM proactive_signal_batches WHERE subscription_id = ? AND status IN ('collecting', 'ready', 'processing')").get(sub.id))
79
+ }));
63
80
  return {
64
- followUps: listMailFollowUps(workspace),
65
- needsDecision: cards.filter((card) => card.decision && card.actionStatus !== "completed"),
66
- prepared: cards.filter((card) => card.artifact && !card.decision),
67
- updates: cards.filter((card) => !card.artifact && !card.decision),
68
- delegations: controlledSubscriptions(workspace).map((sub) => ({
69
- ...sub,
70
- effectiveEnabled: effectiveProactivePolicy(sub.id).enabled,
71
- project: sub.scopeKind === "project" ? db.prepare("SELECT name, status FROM projects WHERE project_id = ?").get(sub.scopeId) ?? null : null,
72
- latestRun: db.prepare(`SELECT status, outcome_reason AS reason, completed_at AS completedAt, started_at AS startedAt, error_message AS error, attempt, next_attempt_at AS nextAttemptAt
73
- FROM proactive_runs WHERE subscription_id = ? ORDER BY started_at DESC LIMIT 1`).get(sub.id) ?? null,
74
- pending: Boolean(db.prepare("SELECT 1 FROM proactive_signal_batches WHERE subscription_id = ? AND status IN ('collecting', 'ready', 'processing')").get(sub.id))
75
- }))
81
+ scenes: projectSceneMoments(cards, delegations, followUps),
82
+ followUps,
83
+ delegations
84
+ };
85
+ }
86
+ function projectMonitoring(projectId) {
87
+ const row = getSqliteDatabase().prepare("SELECT mode, allowed_actions_json FROM project_monitoring_policies WHERE project_id = ?").get(projectId);
88
+ return row ? {
89
+ mode: row.mode,
90
+ allowedActions: JSON.parse(row.allowed_actions_json)
91
+ } : {
92
+ mode: "observe",
93
+ allowedActions: []
94
+ };
95
+ }
96
+ function projectSceneMoments(cards, delegations, followUps) {
97
+ const latestCardBySubscription = /* @__PURE__ */ new Map();
98
+ for (const card of cards) {
99
+ const previous = latestCardBySubscription.get(card.subscriptionId);
100
+ if (!previous || previous.updatedAt < card.updatedAt) latestCardBySubscription.set(card.subscriptionId, card);
101
+ }
102
+ const moments = [];
103
+ for (const sub of delegations) {
104
+ if (!sub.effectiveEnabled || sub.completedAt || ![
105
+ "project_delivery_risk",
106
+ "meeting_preparation",
107
+ "discussion_follow_up"
108
+ ].includes(sub.scenarioKey)) continue;
109
+ const card = latestCardBySubscription.get(sub.id) ?? null;
110
+ const project = sub.project;
111
+ const kind = sub.scenarioKey === "meeting_preparation" ? "meeting_preparation" : sub.scenarioKey === "discussion_follow_up" ? "communication_follow_up" : "project_momentum";
112
+ const object = project ? {
113
+ label: project.name,
114
+ route: `/projects/${encodeURIComponent(sub.scopeId)}`
115
+ } : card?.evidence.find((item) => item.route) ? (() => {
116
+ const item = card.evidence.find((value) => value.route);
117
+ return {
118
+ label: item.label,
119
+ route: item.route
120
+ };
121
+ })() : null;
122
+ moments.push({
123
+ id: `scene:${sub.id}`,
124
+ kind,
125
+ status: sceneStatus(card),
126
+ title: project?.name ?? card?.title ?? (kind === "meeting_preparation" ? "Meeting preparation" : kind === "communication_follow_up" ? "Conversation follow-up" : "Project follow-through"),
127
+ promise: sub.userInstructions,
128
+ moment: card?.whyNow ?? (kind === "meeting_preparation" ? "Waiting for the next relevant meeting" : kind === "communication_follow_up" ? "Watching for a meaningful follow-up" : "Watching the project for a meaningful change"),
129
+ relevance: card?.summary ?? sub.userInstructions,
130
+ help: card?.workDone || card?.recommendation || (kind === "meeting_preparation" ? "I will bring back a brief before the meeting." : kind === "communication_follow_up" ? "I will return when the discussion needs a next step." : "I will return when the goal, commitment, or delivery risk changes."),
131
+ arrangementId: sub.id,
132
+ manageRoute: `/assistant-work?delegation=${encodeURIComponent(sub.id)}`,
133
+ object,
134
+ card,
135
+ updatedAt: card?.updatedAt ?? sub.updatedAt
136
+ });
137
+ }
138
+ for (const follow of followUps) {
139
+ if (!follow.enabled || follow.status !== "watching") continue;
140
+ const card = cards.find((item) => item.communication?.id === follow.id) ?? null;
141
+ moments.push({
142
+ id: `scene:${follow.id}`,
143
+ kind: "communication_follow_up",
144
+ status: sceneStatus(card),
145
+ title: follow.subject ?? "Communication follow-up",
146
+ promise: follow.instructions,
147
+ moment: card?.whyNow ?? (follow.latestDirection === "received" ? "A reply arrived" : `Waiting until ${follow.dueAt}`),
148
+ relevance: card?.summary ?? follow.instructions,
149
+ help: card?.workDone || card?.recommendation || "I will watch the thread and prepare the next step when it matters.",
150
+ arrangementId: follow.subscriptionId,
151
+ manageRoute: `/assistant-work?follow-up=${encodeURIComponent(follow.id)}`,
152
+ object: follow.sessionKey ? {
153
+ label: follow.subject ?? "Open conversation",
154
+ route: `/chat/${encodeURIComponent(follow.sessionKey)}`
155
+ } : null,
156
+ card,
157
+ updatedAt: card?.updatedAt ?? follow.lastCheckedAt ?? follow.dueAt
158
+ });
159
+ }
160
+ const priority = {
161
+ needs_decision: 0,
162
+ prepared: 1,
163
+ changed: 2,
164
+ following: 3
76
165
  };
166
+ return moments.sort((a, b) => priority[a.status] - priority[b.status] || b.updatedAt.localeCompare(a.updatedAt));
167
+ }
168
+ function sceneStatus(card) {
169
+ if (!card) return "following";
170
+ if (card.decision && card.actionStatus !== "completed") return "needs_decision";
171
+ if (card.artifact) return "prepared";
172
+ return "changed";
77
173
  }
78
174
  function completeDeliveredProjects(now = /* @__PURE__ */ new Date()) {
79
175
  const db = getSqliteDatabase();
@@ -1,9 +1,9 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
2
2
  import { listKnowledgeSourceItems } from "../storage/sqlite/knowledge-repository.js";
3
3
  import { getConnectorConnection } from "../storage/sqlite/connector-repository.js";
4
- import { ProactiveConflict, effectiveProactivePolicy } from "./policy/service.js";
5
4
  import { emailFields, readMailThread } from "./mail-thread.js";
6
5
  import { authorizedConnectedSource } from "./execution/authorization.js";
6
+ import { ProactiveConflict, effectiveProactivePolicy } from "./policy/service.js";
7
7
  import { listSubscriptions } from "./scenarios/repository.js";
8
8
  import { createControlledSubscription } from "./scenarios/control.js";
9
9
  import { ProactiveScenarioService } from "./scenarios/service.js";
@@ -1,11 +1,11 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
2
  import { ProactiveCardActionSchema } from "../../../packages/gateway-contract/src/proactive.js";
3
3
  import { getKnowledgeSourceItem } from "../../storage/sqlite/knowledge-repository.js";
4
- import { ProactiveConflict, effectiveProactivePolicy, subscriptionSettings } from "../policy/service.js";
5
4
  import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
5
+ import { ProactiveConflict, effectiveProactivePolicy, subscriptionSettings } from "../policy/service.js";
6
+ import { updateControlledSubscription } from "../scenarios/control.js";
6
7
  import { withdrawCard } from "./lifecycle.js";
7
8
  import { executePendingProactiveActions } from "../actions/service.js";
8
- import { updateControlledSubscription } from "../scenarios/control.js";
9
9
  import { getInboxItem } from "./repository.js";
10
10
  import { ProactiveInboxService } from "./service.js";
11
11
  //#region src/proactive/inbox/cards.ts
@@ -150,7 +150,8 @@ function performCardAction(id, workspaceId, value) {
150
150
  if (card.status === "withdrawn" || card.status === "expired" || card.status === "resolved" && ![
151
151
  "useful",
152
152
  "not_useful",
153
- "retry"
153
+ "retry",
154
+ "refine"
154
155
  ].includes(input.actionId)) throw new ProactiveConflict("Card is no longer actionable");
155
156
  applyCardAction(card, workspaceId, input);
156
157
  const result = getCard(id, workspaceId);
@@ -162,6 +163,7 @@ function applyCardAction(card, workspaceId, input) {
162
163
  const service = new ProactiveInboxService();
163
164
  if (input.taskDraft && (input.actionId !== "decide" || input.choice !== "approve" || !card.taskDraft)) throw new Error("Task draft requires a pending approval");
164
165
  if (input.artifact && input.actionId !== "edit_artifact") throw new Error("Artifact requires an edit action");
166
+ if (input.instruction && input.actionId !== "refine") throw new Error("Instruction requires a refine action");
165
167
  switch (input.actionId) {
166
168
  case "edit_artifact":
167
169
  if (!input.artifact || !card.artifact || input.artifact.kind !== card.artifact.kind) throw new Error("An existing artifact is required");
@@ -177,6 +179,10 @@ function applyCardAction(card, workspaceId, input) {
177
179
  case "not_useful":
178
180
  service.feedback(card.id, input.actionId);
179
181
  break;
182
+ case "refine":
183
+ if (!input.instruction) throw new Error("Refinement instruction required");
184
+ service.instruct(card.id, input.instruction);
185
+ break;
180
186
  case "read":
181
187
  service.transition(card.id, { status: "read" });
182
188
  break;
@@ -1,9 +1,9 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
- import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, quietHoursEnd, reserveProactiveNotification } from "../policy/service.js";
3
- import { viewingProactiveCards } from "../policy/presence.js";
4
2
  import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
3
+ import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, quietHoursEnd, reserveProactiveNotification } from "../policy/service.js";
5
4
  import { insightCorrelation } from "./lifecycle.js";
6
5
  import { getInboxItem } from "./repository.js";
6
+ import { viewingProactiveCards } from "../policy/presence.js";
7
7
  import { queueDigest } from "./digest.js";
8
8
  import { notificationPlanFromGatewayEvent } from "../../notifications/planner.js";
9
9
  import { createHash } from "node:crypto";
@@ -1,9 +1,9 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
- import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, proactivePreferences, quietHoursEnd } from "../policy/service.js";
3
- import { viewingProactiveCards } from "../policy/presence.js";
4
2
  import { insightSourcesAuthorized } from "../execution/authorization.js";
3
+ import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, proactivePreferences, quietHoursEnd } from "../policy/service.js";
5
4
  import { getInboxItem } from "./repository.js";
6
5
  import { getCard } from "./cards.js";
6
+ import { viewingProactiveCards } from "../policy/presence.js";
7
7
  import { randomUUID } from "node:crypto";
8
8
  //#region src/proactive/inbox/digest.ts
9
9
  function queueDigest(item, mode, dueAt) {
@@ -1,5 +1,5 @@
1
- import { effectiveProactivePolicy, quietHoursEnd } from "../policy/service.js";
2
1
  import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
2
+ import { effectiveProactivePolicy, quietHoursEnd } from "../policy/service.js";
3
3
  import { getInboxItem } from "./repository.js";
4
4
  //#region src/proactive/inbox/notification-policy.ts
5
5
  function recheckProactiveNotification(itemId, now = /* @__PURE__ */ new Date(), notificationRevision) {
@@ -1,6 +1,6 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
- import { effectiveProactivePolicy } from "../policy/service.js";
3
2
  import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
3
+ import { effectiveProactivePolicy } from "../policy/service.js";
4
4
  import { decideProactiveDisposition, nextQuietHoursEnd, proactiveDispositionReason } from "../../tasks/project-monitoring-service.js";
5
5
  import { randomUUID } from "node:crypto";
6
6
  //#region src/proactive/inbox/repository.ts
@@ -1,5 +1,5 @@
1
- import { executePendingProactiveActions } from "../actions/service.js";
2
1
  import { publishInstructionFeedback } from "../scenarios/repository.js";
2
+ import { executePendingProactiveActions } from "../actions/service.js";
3
3
  import { getInboxItem, getInboxSubscriptionId, listInbox, projectInsightsToInbox, recordDecision, recordFeedback, transitionInboxItem, wakeSnoozedItems } from "./repository.js";
4
4
  //#region src/proactive/inbox/service.ts
5
5
  var ProactiveInboxService = class {
@@ -1,8 +1,8 @@
1
1
  import { ProactiveScenarioService } from "./scenarios/service.js";
2
- import { ProactiveInboxService } from "./inbox/service.js";
3
2
  import { normalizeEventEnvelope } from "./events/envelope.js";
4
3
  import { matchScenario, matchesCondition } from "./routing/matcher.js";
5
4
  import { ProactiveEventService } from "./service.js";
5
+ import { ProactiveInboxService } from "./inbox/service.js";
6
6
  import { mapProductEventToProactive } from "./events/product-event-bridge.js";
7
7
  import { pruneProactiveHistory } from "./maintenance.js";
8
8
  import { AutomationStateContextProvider, ConnectedSourceContextProvider, ContextProviderRegistry, EventBatchContextProvider, InternalObjectContextProvider, MeetingWorkspaceContextProvider, ProjectStateContextProvider, UserModelContextProvider } from "./execution/context.js";
@@ -14,7 +14,6 @@ function pruneProactiveHistory(now = /* @__PURE__ */ new Date()) {
14
14
  db.prepare("DELETE FROM proactive_notification_budget WHERE created_at < ?").run(cutoff);
15
15
  db.prepare("DELETE FROM proactive_presence WHERE expires_at <= ?").run(now.getTime());
16
16
  db.prepare("DELETE FROM proactive_delivery_decisions WHERE created_at < ?").run(cutoff);
17
- db.prepare("DELETE FROM proactive_preview_runs WHERE created_at < ?").run(cutoff);
18
17
  db.prepare("DELETE FROM proactive_push_probes WHERE created_at < ?").run(Date.parse(cutoff));
19
18
  db.prepare("DELETE FROM proactive_digest_queue WHERE consumed_at < ?").run(cutoff);
20
19
  db.prepare("DELETE FROM proactive_digests WHERE created_at < ?").run(cutoff);
@@ -1,36 +1,5 @@
1
1
  export declare function requireSubscription(id: string, workspaceId: string): import("./types.js").ScenarioSubscription;
2
- export declare function templateCatalog(workspaceId?: string): {
3
- parameterSchema: {
4
- type: string;
5
- properties: {
6
- scanIntervalMinutes: {
7
- type: string;
8
- minimum: number;
9
- maximum: number;
10
- };
11
- userInstructions: {
12
- type: string;
13
- maxLength: number;
14
- };
15
- };
16
- };
17
- calendarSource?: {
18
- status: string;
19
- lastSourceUpdatedAt: string;
20
- };
21
- key: string;
22
- version: number;
23
- title: string;
24
- description: string;
25
- scopeKind: "project" | "workspace";
26
- eventTypes: string[];
27
- contextProviderIds: string[];
28
- scheduled: boolean;
29
- requiresCalendar: boolean;
30
- }[];
31
2
  export declare function controlledSubscriptions(workspaceId: string): {
32
- effectiveLevel: "off" | "active" | "quiet" | "balanced";
33
- schedule: Record<string, import("node:sqlite").SQLOutputValue>;
34
3
  revision: number;
35
4
  level: "off" | "active" | "quiet" | "balanced";
36
5
  delivery: "digest" | "inbox" | "important";
@@ -48,8 +17,6 @@ export declare function controlledSubscriptions(workspaceId: string): {
48
17
  updatedAt: string;
49
18
  }[];
50
19
  export declare function createControlledSubscription(workspaceId: string, value: unknown): {
51
- effectiveLevel: "off" | "active" | "quiet" | "balanced";
52
- schedule: Record<string, import("node:sqlite").SQLOutputValue>;
53
20
  revision: number;
54
21
  level: "off" | "active" | "quiet" | "balanced";
55
22
  delivery: "digest" | "inbox" | "important";
@@ -67,8 +34,6 @@ export declare function createControlledSubscription(workspaceId: string, value:
67
34
  updatedAt: string;
68
35
  };
69
36
  export declare function updateControlledSubscription(workspaceId: string, id: string, value: unknown): {
70
- effectiveLevel: "off" | "active" | "quiet" | "balanced";
71
- schedule: Record<string, import("node:sqlite").SQLOutputValue>;
72
37
  revision: number;
73
38
  level: "off" | "active" | "quiet" | "balanced";
74
39
  delivery: "digest" | "inbox" | "important";
@@ -1,51 +1,17 @@
1
1
  import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
2
2
  import { ProactiveSubscriptionCreateSchema, ProactiveSubscriptionSettingsSchema, ProactiveSubscriptionUpdateSchema } from "../../../packages/gateway-contract/src/proactive.js";
3
- import { ProactiveConflict, effectiveProactivePolicy, subscriptionSettings } from "../policy/service.js";
4
- import { createPromptDraft, getScenario, getSubscription, listScenarios, listSubscriptions, publishPromptRevision, upsertSubscription } from "./repository.js";
3
+ import { ProactiveConflict, subscriptionSettings } from "../policy/service.js";
4
+ import { createPromptDraft, getScenario, getSubscription, listSubscriptions, publishPromptRevision, upsertSubscription } from "./repository.js";
5
5
  //#region src/proactive/scenarios/control.ts
6
6
  function requireSubscription(id, workspaceId) {
7
7
  const sub = getSubscription(id);
8
8
  if (!sub || sub.workspaceId !== workspaceId) throw new Error("Subscription not found");
9
9
  return sub;
10
10
  }
11
- function templateCatalog(workspaceId) {
12
- return listScenarios().map((scenario) => ({
13
- key: scenario.key,
14
- version: scenario.version,
15
- title: scenario.title,
16
- description: scenario.description,
17
- scopeKind: ["project_delivery_risk", "blocked_work"].includes(scenario.key) ? "project" : "workspace",
18
- eventTypes: scenario.eventTypes,
19
- contextProviderIds: scenario.contextProviderIds,
20
- scheduled: [
21
- "project_delivery_risk",
22
- "blocked_work",
23
- "meeting_preparation"
24
- ].includes(scenario.key),
25
- requiresCalendar: scenario.key === "meeting_preparation",
26
- ...workspaceId && scenario.key === "meeting_preparation" ? { calendarSource: calendarSourceStatus(workspaceId) } : {},
27
- parameterSchema: {
28
- type: "object",
29
- properties: {
30
- scanIntervalMinutes: {
31
- type: "integer",
32
- minimum: 15,
33
- maximum: 10080
34
- },
35
- userInstructions: {
36
- type: "string",
37
- maxLength: 12e3
38
- }
39
- }
40
- }
41
- }));
42
- }
43
11
  function controlledSubscriptions(workspaceId) {
44
12
  return listSubscriptions().filter((sub) => sub.workspaceId === workspaceId).map((sub) => ({
45
13
  ...sub,
46
- ...subscriptionSettings(sub.id),
47
- effectiveLevel: effectiveProactivePolicy(sub.id).level,
48
- schedule: getSqliteDatabase().prepare("SELECT next_due_at AS nextDueAt, last_checked_at AS lastCheckedAt FROM proactive_schedule_state WHERE subscription_id = ?").get(sub.id) ?? null
14
+ ...subscriptionSettings(sub.id)
49
15
  }));
50
16
  }
51
17
  function saveSettings(id, value, revision) {
@@ -57,9 +23,9 @@ function saveSettings(id, value, revision) {
57
23
  }
58
24
  function createControlledSubscription(workspaceId, value) {
59
25
  const input = ProactiveSubscriptionCreateSchema.parse(value);
60
- const template = templateCatalog().find((item) => item.key === input.scenarioKey);
61
- if (!template || !getScenario(input.scenarioKey)) throw new Error("Template not found");
62
- if (input.scopeKind !== template.scopeKind) throw new Error("Invalid template scope");
26
+ if (!getScenario(input.scenarioKey)) throw new Error("Scenario not found");
27
+ const scopeKind = ["project_delivery_risk", "blocked_work"].includes(input.scenarioKey) ? "project" : "workspace";
28
+ if (input.scopeKind !== scopeKind) throw new Error("Invalid scenario scope");
63
29
  if (input.scopeKind === "project" && !getSqliteDatabase().prepare("SELECT 1 FROM projects WHERE project_id = ?").get(input.scopeId)) throw new Error("Project not found");
64
30
  const scopeId = input.scopeKind === "workspace" ? workspaceId : input.scopeId;
65
31
  return runSqliteWriteTransaction(() => {
@@ -92,17 +58,5 @@ function updateControlledSubscription(workspaceId, id, value) {
92
58
  return controlledSubscriptions(workspaceId).find((item) => item.id === id);
93
59
  });
94
60
  }
95
- function calendarSourceStatus(workspaceId) {
96
- const row = getSqliteDatabase().prepare(`SELECT COUNT(*) AS count, MAX(k.updated_at) AS lastSourceUpdatedAt FROM knowledge_source_items k
97
- JOIN connector_connections c ON c.id = json_extract(k.metadata_json, '$.connectionId')
98
- JOIN connector_sync_policies p ON p.account_id = c.account_id
99
- WHERE k.item_type = 'calendar_event' AND k.deleted_at IS NULL AND k.sensitivity NOT IN ('secret', 'regulated')
100
- AND json_extract(k.metadata_json, '$.workspaceId') = ? AND c.status = 'active' AND p.scan_enabled = 1 AND p.proactive_enabled = 1
101
- AND (json_array_length(p.allowed_scenario_keys_json) = 0 OR EXISTS (SELECT 1 FROM json_each(p.allowed_scenario_keys_json) WHERE value = 'meeting_preparation'))`).get(workspaceId);
102
- return {
103
- status: row.count ? "available" : "waiting_for_authorized_data",
104
- lastSourceUpdatedAt: row.lastSourceUpdatedAt ? new Date(row.lastSourceUpdatedAt).toISOString() : null
105
- };
106
- }
107
61
  //#endregion
108
- export { controlledSubscriptions, createControlledSubscription, requireSubscription, templateCatalog, updateControlledSubscription };
62
+ export { controlledSubscriptions, createControlledSubscription, requireSubscription, updateControlledSubscription };
@@ -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 { listKnowledgeSourceItems } from "../../storage/sqlite/knowledge-repository.js";
4
- import { effectiveProactivePolicy } from "../policy/service.js";
5
4
  import { authorizedConnectedSource } from "../execution/authorization.js";
5
+ import { effectiveProactivePolicy } from "../policy/service.js";
6
6
  import { listSubscriptions } from "../scenarios/repository.js";
7
7
  import { scanMailFollowUps } from "../follow-ups.js";
8
8
  import { scanDueProjects } from "./schedule.js";
@@ -1,8 +1,8 @@
1
1
  import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
2
- import { removeSkillsLockEntry } from "../agent/skills/hub-lock.js";
3
- import { deleteManagedSkill, installSkillFromZip, isValidSkillId } from "../agent/skills/managed-store.js";
4
2
  import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../agent/skills/workspace-skills-dir.js";
5
3
  import { loadSkills, loadWorkspaceSkillInventory } from "../agent/skills/index.js";
4
+ import { removeSkillsLockEntry } from "../agent/skills/hub-lock.js";
5
+ import { deleteManagedSkill, installSkillFromZip, isValidSkillId } from "../agent/skills/managed-store.js";
6
6
  import { pullSkillFromSource } from "../agent/skills/hub-pull.js";
7
7
  import { downloadFromMarketplace } from "../agent/skills/skills-marketplace.js";
8
8
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
@@ -223,7 +223,7 @@ var ProjectStore = class {
223
223
  }
224
224
  listWithSidebarSessions(query = {}) {
225
225
  const projectConditions = [];
226
- const sessionConditions = [`s.hidden_from_session_list = 0`, `s.session_type = 'chat'`];
226
+ const sessionConditions = [];
227
227
  const params = [];
228
228
  if (query.status) {
229
229
  const statuses = Array.isArray(query.status) ? query.status : [query.status];
@@ -241,19 +241,21 @@ var ProjectStore = class {
241
241
  }
242
242
  sessionConditions.push(`(${clauses.join(" OR ")})`);
243
243
  }
244
- const whereParts = [...projectConditions, ...sessionConditions];
244
+ const whereParts = [...projectConditions, ...sessionConditions.length ? [`(s.session_key IS NULL OR (${sessionConditions.join(" AND ")}))`] : []];
245
245
  const where = whereParts.length ? `WHERE ${whereParts.join(" AND ")}` : "";
246
246
  const limit = clampLimit(query.limit, 50);
247
247
  const offset = Math.max(0, Math.floor(query.offset ?? 0));
248
248
  const db = getSqliteDatabase();
249
249
  const total = db.prepare(`SELECT COUNT(DISTINCT p.project_id) AS total
250
250
  FROM projects p
251
- JOIN sessions s ON s.project_id = p.project_id
251
+ LEFT JOIN sessions s ON s.project_id = p.project_id
252
+ AND s.hidden_from_session_list = 0 AND s.session_type = 'chat'
252
253
  ${where}`).get(...params).total;
253
254
  return {
254
255
  items: db.prepare(`SELECT p.*
255
256
  FROM projects p
256
- JOIN sessions s ON s.project_id = p.project_id
257
+ LEFT JOIN sessions s ON s.project_id = p.project_id
258
+ AND s.hidden_from_session_list = 0 AND s.session_type = 'chat'
257
259
  ${where}
258
260
  GROUP BY p.project_id
259
261
  ORDER BY
@@ -1,5 +1,5 @@
1
- import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
2
1
  import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
2
+ import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
3
3
  import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
4
4
  //#region src/providers/auth-runtime/resolve-auth.ts
5
5
  init_env_keys();
@@ -1,11 +1,11 @@
1
1
  import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
2
2
  import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
3
+ import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
4
+ import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
3
5
  import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
4
6
  import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
5
7
  import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
6
- import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
7
8
  import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
8
- import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
9
9
  import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
10
10
  import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
11
11
  import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
@@ -1,7 +1,7 @@
1
1
  import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
2
2
  import { getModelRegistry, init_model_registry } from "./model-registry.js";
3
- import { getImageGenerationProvider } from "../agent/image/generation/provider-registry.js";
4
3
  import { parseImageGenerationModelRef } from "../agent/image/generation/model-ref.js";
4
+ import { getImageGenerationProvider } from "../agent/image/generation/provider-registry.js";
5
5
  //#region src/providers/model-reference-auditor.ts
6
6
  init_model_catalog_store();
7
7
  init_model_registry();
@@ -1,8 +1,8 @@
1
1
  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
- import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
5
4
  import { resolveModelsJsonPath } from "../config/paths.js";
5
+ import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
6
6
  import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
7
7
  import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
8
8
  import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
@@ -1,6 +1,6 @@
1
1
  import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
2
- import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
3
2
  import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
3
+ import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
4
4
  import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
5
5
  //#region src/providers/register-runtime-providers.ts
6
6
  function registerRuntimeProvider(modelRuntime, source) {