@xopcai/xopc 0.0.352 → 0.0.353

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 (444) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
  3. package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
  4. package/dist/extensions/telegram/src/inbound-processor.js +2 -2
  5. package/dist/extensions/telegram/src/outbound-sender.js +1 -1
  6. package/dist/extensions/telegram/src/plugin.js +2 -2
  7. package/dist/extensions/telegram/xopc.extension.json +1 -1
  8. package/dist/extensions/weixin/src/api/api.js +2 -2
  9. package/dist/extensions/weixin/src/auth/accounts.js +12 -12
  10. package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
  11. package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
  12. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-ChlaFmiD.js → agent-avatar-dicebear-BVIuZcCP.js} +1 -1
  13. package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-CgNagNMG.js → agent-defaults-settings-panel-CcTnphqy.js} +1 -1
  14. package/dist/gateway/static/root/assets/{agent-plugin-dialog-CDhtsMpV.js → agent-plugin-dialog-CdCzMPhC.js} +1 -1
  15. package/dist/gateway/static/root/assets/agents-BiNKpndr.js +66 -0
  16. package/dist/gateway/static/root/assets/{agents-admin-api-C_3ucZGI.js → agents-admin-api-Ck2x78jq.js} +1 -1
  17. package/dist/gateway/static/root/assets/{app-management-settings-panel-DqC-oj5_.js → app-management-settings-panel-BvGDN5J6.js} +1 -1
  18. package/dist/gateway/static/root/assets/{appearance-settings-Cfhepf6U.js → appearance-settings-BhQYkuQj.js} +1 -1
  19. package/dist/gateway/static/root/assets/{apps-page-C6n5r8AP.js → apps-page-BQZJuM-C.js} +1 -1
  20. package/dist/gateway/static/root/assets/{archive-plugin-D4EiLLyl.js → archive-plugin-BZXXJvpX.js} +1 -1
  21. package/dist/gateway/static/root/assets/{automations-page-CMxBpT5v.js → automations-page-C7VKkDb5.js} +1 -1
  22. package/dist/gateway/static/root/assets/{automations-workspace-DJ_-_kGh.js → automations-workspace-y4qcvlg8.js} +1 -1
  23. package/dist/gateway/static/root/assets/{binary-plugins-DQc_BlYP.js → binary-plugins-DoT3g5SP.js} +1 -1
  24. package/dist/gateway/static/root/assets/{block-editor-C3S6gqnS.js → block-editor-sqqrCafh.js} +1 -1
  25. package/dist/gateway/static/root/assets/{browser-automation-inputs-D2SwaQ2F.js → browser-automation-inputs-CZOKsAaa.js} +1 -1
  26. package/dist/gateway/static/root/assets/{browser-automations-page-CGG1740U.js → browser-automations-page-TEeTmkGP.js} +1 -1
  27. package/dist/gateway/static/root/assets/{browser-settings-page-COTo7btH.js → browser-settings-page--N4P7V0l.js} +1 -1
  28. package/dist/gateway/static/root/assets/{capabilities-D4qdO980.js → capabilities-BOrLei_L.js} +1 -1
  29. package/dist/gateway/static/root/assets/{capabilities-page-BsC346Ym.js → capabilities-page-F7OAv-iz.js} +2 -2
  30. package/dist/gateway/static/root/assets/{capabilities-settings-panel-CRL4gfk5.js → capabilities-settings-panel-CaiIo1S1.js} +1 -1
  31. package/dist/gateway/static/root/assets/{capability-header-actions-B_60-buR.js → capability-header-actions-CR_O9_Vr.js} +1 -1
  32. package/dist/gateway/static/root/assets/{channels-DNxr72oD.js → channels-Bb-8c4wl.js} +1 -1
  33. package/dist/gateway/static/root/assets/{chat-terminal-dock-DfTUgrey.js → chat-terminal-dock-Q99iKyiO.js} +1 -1
  34. package/dist/gateway/static/root/assets/{computer-settings-page-Bk84TKyF.js → computer-settings-page-QuXZBfky.js} +1 -1
  35. package/dist/gateway/static/root/assets/{connector-service-page-B2pC--2X.js → connector-service-page-BIqzVqCO.js} +1 -1
  36. package/dist/gateway/static/root/assets/{connectors-page-Bu15_14O.js → connectors-page-CZ24DSBJ.js} +1 -1
  37. package/dist/gateway/static/root/assets/{date-picker-CCN30yiy.js → date-picker-Ck-FmYEL.js} +1 -1
  38. package/dist/gateway/static/root/assets/{dependency-picker-CV2ybJJd.js → dependency-picker-BjH8XrKb.js} +1 -1
  39. package/dist/gateway/static/root/assets/{desktop-pet-DipFHe4X.js → desktop-pet-DyGxNAVW.js} +1 -1
  40. package/dist/gateway/static/root/assets/{desktop-pet-settings-Dg3RM_vY.js → desktop-pet-settings-C1rKgB-S.js} +1 -1
  41. package/dist/gateway/static/root/assets/{device-pairing-wizard-DUy1HymM.js → device-pairing-wizard-UrPcOU6Q.js} +1 -1
  42. package/dist/gateway/static/root/assets/{directory-picker-path-field-BTuFpGIK.js → directory-picker-path-field-BYxUgMZb.js} +1 -1
  43. package/dist/gateway/static/root/assets/{extension-debug-page-xM8vfbRZ.js → extension-debug-page-CGL0jpQA.js} +1 -1
  44. package/dist/gateway/static/root/assets/{extension-page-Cl8zlion.js → extension-page-DPWf-tYg.js} +1 -1
  45. package/dist/gateway/static/root/assets/{extension-settings-page-DODk0nOi.js → extension-settings-page-DZWBY39d.js} +1 -1
  46. package/dist/gateway/static/root/assets/{gateway-config-swr-DZWFlfJr.js → gateway-config-swr-B31I6Gbq.js} +1 -1
  47. package/dist/gateway/static/root/assets/{gateway-realtime-HO9tL9xo.js → gateway-realtime-D6ffOiPe.js} +1 -1
  48. package/dist/gateway/static/root/assets/gateway-realtime-store-DQuFWNjA.js +1 -0
  49. package/dist/gateway/static/root/assets/{gateway-settings-BL3C7Q9w.js → gateway-settings-D5w5aYXK.js} +1 -1
  50. package/dist/gateway/static/root/assets/{gateway-startup-retry-Cg1nbxJR.js → gateway-startup-retry-DVol958v.js} +1 -1
  51. package/dist/gateway/static/root/assets/{home-page-CjJVq_Ff.js → home-page-DPQwxBGy.js} +1 -1
  52. package/dist/gateway/static/root/assets/{image-generation-api-DSnPfr_U.js → image-generation-api-TVgJfz9r.js} +1 -1
  53. package/dist/gateway/static/root/assets/{imports-page-By9oc8sD.js → imports-page-CnRWDtGz.js} +1 -1
  54. package/dist/gateway/static/root/assets/{index-S4z-eKe-.js → index-DU5Eb1V8.js} +20 -20
  55. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-ixQ8_6ad.js → keyboard-shortcuts-settings-CoYdyBRh.js} +1 -1
  56. package/dist/gateway/static/root/assets/{local-app-workbench-page-Bnz5YOks.js → local-app-workbench-page-hjFeYlIq.js} +1 -1
  57. package/dist/gateway/static/root/assets/{local-apps-page-BV3NFUJQ.js → local-apps-page-CeBhXeoX.js} +1 -1
  58. package/dist/gateway/static/root/assets/{local-session-drafts-CuyTzbfW.js → local-session-drafts-wiq_12oN.js} +1 -1
  59. package/dist/gateway/static/root/assets/{locale-store-qcYD05PF.js → locale-store-Y1aBayM_.js} +1 -1
  60. package/dist/gateway/static/root/assets/{logs-page-DVqwybaT.js → logs-page-CzpZDjkA.js} +1 -1
  61. package/dist/gateway/static/root/assets/{management-settings-CUoDWFg7.js → management-settings-Beu_R_Rc.js} +1 -1
  62. package/dist/gateway/static/root/assets/{markdown-view-BhFHoVtG.js → markdown-view-BlzX7Ze5.js} +1 -1
  63. package/dist/gateway/static/root/assets/{media-plugins-cpalRgVI.js → media-plugins-C9ya5rUH.js} +1 -1
  64. package/dist/gateway/static/root/assets/messages-DPw2X06D.js +3 -0
  65. package/dist/gateway/static/root/assets/{note-detail-panel-CxbZWvj1.js → note-detail-panel-D8bpTGwP.js} +3 -3
  66. package/dist/gateway/static/root/assets/{notes-page-DkEOEza6.js → notes-page-OmgXowUG.js} +1 -1
  67. package/dist/gateway/static/root/assets/{page-context-capture-button-CjCYNkVb.js → page-context-capture-button-BjjjuLkz.js} +1 -1
  68. package/dist/gateway/static/root/assets/{page-tabs-Dnzie6QW.js → page-tabs-_DiuzxyD.js} +1 -1
  69. package/dist/gateway/static/root/assets/{preview-open-alternatives-D1H4_Nfl.js → preview-open-alternatives-BKvUadws.js} +1 -1
  70. package/dist/gateway/static/root/assets/{product-open-page-BJwEshPw.js → product-open-page-DUPsiVP9.js} +1 -1
  71. package/dist/gateway/static/root/assets/{project-detail-page-BWC89e7l.js → project-detail-page-CWlCg2x5.js} +1 -1
  72. package/dist/gateway/static/root/assets/{projects-page-BYmHC91B.js → projects-page-NbVNo0tP.js} +1 -1
  73. package/dist/gateway/static/root/assets/{registry-api-C0j3sKT4.js → registry-api-DqDOrPQ0.js} +1 -1
  74. package/dist/gateway/static/root/assets/{remote-access-hub-DuVzpZ9R.js → remote-access-hub-CD8HrqGC.js} +1 -1
  75. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-SbIgL9Ya.js → runtime-tools-settings-panel-C25xEYTK.js} +1 -1
  76. package/dist/gateway/static/root/assets/{scenes-page-BBl_4U1U.js → scenes-page-DbWaemwR.js} +1 -1
  77. package/dist/gateway/static/root/assets/{schema-form-Rj-wi9sm.js → schema-form-_3LQ4hyB.js} +1 -1
  78. package/dist/gateway/static/root/assets/{session-api-iR1SFNHe.js → session-api-CTN4qwiN.js} +1 -1
  79. package/dist/gateway/static/root/assets/{session-manager-3YOU74jt.js → session-manager-DsH1DZI_.js} +1 -1
  80. package/dist/gateway/static/root/assets/{sessions-page-BnipzwJ6.js → sessions-page-B7ZUdXlb.js} +1 -1
  81. package/dist/gateway/static/root/assets/settings-advanced-gate-CpKzZMft.js +1 -0
  82. package/dist/gateway/static/root/assets/{settings-form-section-6gOr-ype.js → settings-form-section-DS80hVSY.js} +1 -1
  83. package/dist/gateway/static/root/assets/settings-page-DqCJHcdG.js +1 -0
  84. package/dist/gateway/static/root/assets/{setup-status-panel-CR0VBBw3.js → setup-status-panel-De-kC3yJ.js} +1 -1
  85. package/dist/gateway/static/root/assets/{share-preview-page-CK0Bg_-o.js → share-preview-page-T-0g_rwr.js} +1 -1
  86. package/dist/gateway/static/root/assets/{shares-settings-B3Ghvh3c.js → shares-settings-Dz33T3du.js} +1 -1
  87. package/dist/gateway/static/root/assets/{skill-api-CoIsCPbI.js → skill-api-Cx6GGpSY.js} +1 -1
  88. package/dist/gateway/static/root/assets/skill-reload-api-DyJ-Duem.js +1 -0
  89. package/dist/gateway/static/root/assets/{skills-page-CDkm7yig.js → skills-page-B2iyN-kP.js} +1 -1
  90. package/dist/gateway/static/root/assets/{system-settings-panel-Cfv-jDmY.js → system-settings-panel-By3SZQR_.js} +1 -1
  91. package/dist/gateway/static/root/assets/{task-detail-page-eYs6qgcW.js → task-detail-page-4yHUTs4_.js} +1 -1
  92. package/dist/gateway/static/root/assets/{tunnel-api-CpOQaCFN.js → tunnel-api-BoH0LBkw.js} +1 -1
  93. package/dist/gateway/static/root/assets/{usage-page-Cye-2eKA.js → usage-page-dKU5X9zT.js} +1 -1
  94. package/dist/gateway/static/root/assets/{use-autosave-o6YLrkpO.js → use-autosave-YKCwQvqT.js} +1 -1
  95. package/dist/gateway/static/root/assets/{user-model-page-Bg-jeU7W.js → user-model-page-Uht32LPP.js} +1 -1
  96. package/dist/gateway/static/root/assets/{voice-api-key-field-FMNwQIho.js → voice-api-key-field-DiqHIA8l.js} +1 -1
  97. package/dist/gateway/static/root/assets/{voice-config-api-CylVelIb.js → voice-config-api-BM75K3mR.js} +1 -1
  98. package/dist/gateway/static/root/assets/{work-discovery-overlay-9bULjfGk.js → work-discovery-overlay-BnfD6w0k.js} +1 -1
  99. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-VYQHBiz3.js → workflow-run-setup-panel-DSy57rBr.js} +1 -1
  100. package/dist/gateway/static/root/assets/{workflows-page-KnoMMEDN.js → workflows-page-Cq3vRUbc.js} +1 -1
  101. package/dist/gateway/static/root/index.html +14 -14
  102. package/dist/package.js +1 -1
  103. package/dist/src/agent/agent-manager.js +22 -17
  104. package/dist/src/agent/agent-scope.js +2 -2
  105. package/dist/src/agent/background-review/prompts.js +1 -1
  106. package/dist/src/agent/background-review/run-background-review.js +3 -3
  107. package/dist/src/agent/bootstrap/bootstrap-files.d.ts +0 -4
  108. package/dist/src/agent/bootstrap/bootstrap-files.js +3 -9
  109. package/dist/src/agent/bootstrap/load-bootstrap-files.js +2 -4
  110. package/dist/src/agent/coding/repository-instructions.js +1 -1
  111. package/dist/src/agent/context/coordinator.js +2 -2
  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.js +3 -3
  115. package/dist/src/agent/context/workspace-seed.d.ts +1 -7
  116. package/dist/src/agent/context/workspace-seed.js +4 -13
  117. package/dist/src/agent/context/workspace-templates/AGENTS.md +1 -1
  118. package/dist/src/agent/context/workspace.d.ts +1 -3
  119. package/dist/src/agent/context/workspace.js +3 -7
  120. package/dist/src/agent/data-acquisition/service.js +1 -1
  121. package/dist/src/agent/embedded/index.js +2 -2
  122. package/dist/src/agent/embedded/model-runtime.js +1 -1
  123. package/dist/src/agent/embedded/run-for-session.js +4 -4
  124. package/dist/src/agent/embedded/run-turn.js +4 -4
  125. package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
  126. package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
  127. package/dist/src/agent/external-tools/cliProvider.js +3 -3
  128. package/dist/src/agent/external-tools/composio-provider.js +3 -3
  129. package/dist/src/agent/external-tools/gateway-tools.js +1 -1
  130. package/dist/src/agent/external-tools/mcp-provider.js +3 -3
  131. package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
  132. package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
  133. package/dist/src/agent/image/generation/providers/fal.js +1 -1
  134. package/dist/src/agent/image/generation/providers/google.js +1 -1
  135. package/dist/src/agent/image/generation/runtime.js +1 -1
  136. package/dist/src/agent/image/index.js +1 -1
  137. package/dist/src/agent/image/load-image-media.js +1 -1
  138. package/dist/src/agent/image/tool-model-config.js +1 -1
  139. package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
  140. package/dist/src/agent/inbound/inbound-loop.js +2 -2
  141. package/dist/src/agent/index.js +1 -1
  142. package/dist/src/agent/mcp/bundle-mcp-config.js +1 -1
  143. package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
  144. package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
  145. package/dist/src/agent/mcp/index.js +2 -2
  146. package/dist/src/agent/mcp/mcp-stdio-transport.js +1 -1
  147. package/dist/src/agent/mcp/mcp-transport.js +1 -1
  148. package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +1 -1
  149. package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
  150. package/dist/src/agent/mcp/plugin-http-fetch.js +1 -1
  151. package/dist/src/agent/memory/context-recovery.js +1 -1
  152. package/dist/src/agent/memory/index.js +1 -1
  153. package/dist/src/agent/messaging/no-reply.d.ts +1 -0
  154. package/dist/src/agent/messaging/no-reply.js +4 -0
  155. package/dist/src/agent/messaging/outbound-coordinator.d.ts +0 -4
  156. package/dist/src/agent/messaging/outbound-coordinator.js +2 -4
  157. package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
  158. package/dist/src/agent/prompt/sections/agent-identity.d.ts +3 -0
  159. package/dist/src/agent/prompt/sections/agent-identity.js +13 -0
  160. package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +0 -5
  161. package/dist/src/agent/prompt/sections/messaging-runtime.js +2 -16
  162. package/dist/src/agent/prompt/sections/project-context.d.ts +0 -3
  163. package/dist/src/agent/prompt/sections/project-context.js +2 -9
  164. package/dist/src/agent/prompt/sections/tooling.js +1 -1
  165. package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -0
  166. package/dist/src/agent/prompt/service-prompt-builder.js +5 -10
  167. package/dist/src/agent/prompt/subagent-context.js +1 -1
  168. package/dist/src/agent/prompt/system-prompt-params.d.ts +0 -4
  169. package/dist/src/agent/prompt/system-prompt-params.js +0 -2
  170. package/dist/src/agent/prompt/system-prompt.d.ts +2 -2
  171. package/dist/src/agent/prompt/system-prompt.js +8 -9
  172. package/dist/src/agent/sandbox/exec-policy.js +1 -1
  173. package/dist/src/agent/service/direct-turn-helpers.js +4 -4
  174. package/dist/src/agent/service/process-direct-one-shot.js +1 -1
  175. package/dist/src/agent/service/process-direct-streaming.js +5 -5
  176. package/dist/src/agent/service/webchat-tts.js +2 -2
  177. package/dist/src/agent/service.js +19 -20
  178. package/dist/src/agent/session/session-inspector.js +1 -1
  179. package/dist/src/agent/skills/hub-lock.js +1 -1
  180. package/dist/src/agent/skills/index.js +1 -1
  181. package/dist/src/agent/skills/managed-store.js +1 -1
  182. package/dist/src/agent/skills/skill-manage-ops.js +1 -1
  183. package/dist/src/agent/source-context/index.js +2 -2
  184. package/dist/src/agent/starter-agents.d.ts +0 -4
  185. package/dist/src/agent/starter-agents.js +57 -98
  186. package/dist/src/agent/tasks/task-judge-service.js +4 -4
  187. package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
  188. package/dist/src/agent/tool-manuals/xopc-use.js +7 -4
  189. package/dist/src/agent/tools/create-share-tool.js +3 -3
  190. package/dist/src/agent/tools/dataBatch.js +1 -1
  191. package/dist/src/agent/tools/delegate-tool.js +3 -3
  192. package/dist/src/agent/tools/delegation-parent-policy.js +1 -1
  193. package/dist/src/agent/tools/executor.js +1 -1
  194. package/dist/src/agent/tools/factory.d.ts +1 -1
  195. package/dist/src/agent/tools/factory.js +16 -16
  196. package/dist/src/agent/tools/fetch-text.js +1 -1
  197. package/dist/src/agent/tools/image-generate-tool.js +3 -3
  198. package/dist/src/agent/tools/index.js +6 -6
  199. package/dist/src/agent/tools/list-dir.js +1 -1
  200. package/dist/src/agent/tools/publish-artifacts.js +2 -2
  201. package/dist/src/agent/tools/read.js +2 -2
  202. package/dist/src/agent/tools/review-workspace.js +1 -1
  203. package/dist/src/agent/tools/send-media.js +2 -2
  204. package/dist/src/agent/tools/skills-tools.js +1 -1
  205. package/dist/src/agent/tools/tts-tool.js +1 -1
  206. package/dist/src/agent/tools/user-context-tool.js +1 -1
  207. package/dist/src/agent/tools/write.js +2 -2
  208. package/dist/src/agent/tools/xopc-use-tool.js +3 -3
  209. package/dist/src/agent/workflow/subagent-runner.js +1 -1
  210. package/dist/src/agent-catalog/migrations/identity-markdown-cutover.d.ts +5 -0
  211. package/dist/src/agent-catalog/migrations/identity-markdown-cutover.js +94 -0
  212. package/dist/src/agent-catalog/repository.js +7 -1
  213. package/dist/src/agent-catalog/service.js +2 -2
  214. package/dist/src/agent-config/schema.d.ts +19 -0
  215. package/dist/src/agent-config/schema.js +7 -4
  216. package/dist/src/ai-assist/text-assist.js +1 -1
  217. package/dist/src/auth/credentials.js +2 -2
  218. package/dist/src/auth/profiles/store.js +1 -1
  219. package/dist/src/auth/sync-provider-auth.js +1 -1
  220. package/dist/src/automations/domain/index.js +2 -2
  221. package/dist/src/automations/index.js +4 -4
  222. package/dist/src/automations/service/automation-service.js +2 -2
  223. package/dist/src/backup/archive.js +1 -1
  224. package/dist/src/bootstrap/application-state.js +2 -0
  225. package/dist/src/browser/native-messaging-host.js +1 -1
  226. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  227. package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
  228. package/dist/src/channels/index.js +2 -2
  229. package/dist/src/channels/outbound-sender.js +1 -1
  230. package/dist/src/channels/pairing/allow-from-file.js +9 -9
  231. package/dist/src/channels/pairing/pairing-store.js +6 -6
  232. package/dist/src/chat-commands/agent-edit.js +4 -7
  233. package/dist/src/chat-commands/builtins/config.js +4 -4
  234. package/dist/src/chat-commands/builtins/review.js +1 -1
  235. package/dist/src/chat-commands/builtins/session.js +1 -1
  236. package/dist/src/chat-commands/builtins/thinking.js +1 -1
  237. package/dist/src/chat-commands/builtins/tts.js +1 -1
  238. package/dist/src/chat-commands/builtins/understanding.js +1 -1
  239. package/dist/src/chat-commands/builtins/workflow.js +2 -2
  240. package/dist/src/chat-commands/context.js +3 -3
  241. package/dist/src/chat-commands/index.js +3 -3
  242. package/dist/src/cli/commands/agent.js +6 -6
  243. package/dist/src/cli/commands/auth.js +1 -1
  244. package/dist/src/cli/commands/config.js +1 -1
  245. package/dist/src/cli/commands/connectors.js +1 -1
  246. package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
  247. package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
  248. package/dist/src/cli/commands/doctor/checks/provider-auth.js +2 -2
  249. package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
  250. package/dist/src/cli/commands/doctor/checks/workspace-status.js +0 -1
  251. package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
  252. package/dist/src/cli/commands/extension-dev.js +1 -1
  253. package/dist/src/cli/commands/extension-marketplace.js +2 -2
  254. package/dist/src/cli/commands/extension.js +4 -4
  255. package/dist/src/cli/commands/gateway/shared.js +1 -1
  256. package/dist/src/cli/commands/gateway/token.js +1 -1
  257. package/dist/src/cli/commands/image.js +1 -1
  258. package/dist/src/cli/commands/init.js +1 -34
  259. package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
  260. package/dist/src/cli/commands/onboard/model.js +2 -2
  261. package/dist/src/cli/commands/onboard.js +1 -1
  262. package/dist/src/cli/commands/project.js +2 -2
  263. package/dist/src/cli/commands/providers.js +1 -1
  264. package/dist/src/cli/commands/runtime.js +1 -1
  265. package/dist/src/cli/commands/skills.js +2 -2
  266. package/dist/src/cli/commands/tunnel.js +4 -4
  267. package/dist/src/cli/extension-cli-register.js +5 -5
  268. package/dist/src/cli/templates.d.ts +1 -1
  269. package/dist/src/cli/templates.js +1 -23
  270. package/dist/src/cli/utils/gateway-client.js +1 -1
  271. package/dist/src/cli/utils/init-workspace-core.js +1 -1
  272. package/dist/src/cli/utils/session.js +1 -1
  273. package/dist/src/computer/runtime.js +2 -2
  274. package/dist/src/config/index.js +7 -7
  275. package/dist/src/config/loader.js +2 -2
  276. package/dist/src/config/models-json.js +1 -1
  277. package/dist/src/config/paths.d.ts +0 -2
  278. package/dist/src/config/paths.js +1 -3
  279. package/dist/src/config/reload.d.ts +0 -1
  280. package/dist/src/config/reload.js +0 -4
  281. package/dist/src/config/rules.js +0 -5
  282. package/dist/src/config/schema.d.ts +0 -45
  283. package/dist/src/config/schema.js +2 -23
  284. package/dist/src/connectors/cli/authorization.js +1 -1
  285. package/dist/src/connectors/cli/runtime.js +1 -1
  286. package/dist/src/connectors/composio-sessions.js +1 -1
  287. package/dist/src/connectors/composio.js +1 -1
  288. package/dist/src/connectors/connected-source-understanding.js +3 -3
  289. package/dist/src/connectors/connection-recovery-service.js +5 -5
  290. package/dist/src/connectors/health.js +1 -1
  291. package/dist/src/connectors/plugin-mcp-recovery.js +1 -1
  292. package/dist/src/discussions/live-worker.js +1 -1
  293. package/dist/src/discussions/recording.js +1 -1
  294. package/dist/src/discussions/sealer.js +1 -1
  295. package/dist/src/extensions/activation-context.js +3 -3
  296. package/dist/src/extensions/api.js +4 -4
  297. package/dist/src/extensions/bundled-extension-activation.js +1 -1
  298. package/dist/src/extensions/index.js +3 -3
  299. package/dist/src/extensions/install.js +1 -1
  300. package/dist/src/extensions/loader.js +2 -2
  301. package/dist/src/extensions/lockfile.js +1 -1
  302. package/dist/src/extensions/sdk/index.js +1 -1
  303. package/dist/src/extensions/sdk/media.js +1 -1
  304. package/dist/src/extensions/update.js +1 -1
  305. package/dist/src/gateway/agents-admin.d.ts +1 -9
  306. package/dist/src/gateway/agents-admin.js +8 -33
  307. package/dist/src/gateway/device-routes.js +2 -2
  308. package/dist/src/gateway/file-path-classifier.js +2 -2
  309. package/dist/src/gateway/global-defaults-admin.js +1 -1
  310. package/dist/src/gateway/hono/app.js +3 -3
  311. package/dist/src/gateway/hono/lib/config-payload.js +4 -4
  312. package/dist/src/gateway/hono/routes/agents.js +1 -1
  313. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  314. package/dist/src/gateway/hono/routes/browser.js +1 -1
  315. package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
  316. package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
  317. package/dist/src/gateway/hono/routes/home.js +1 -1
  318. package/dist/src/gateway/hono/routes/mcp.js +2 -2
  319. package/dist/src/gateway/hono/routes/media.js +1 -1
  320. package/dist/src/gateway/hono/routes/models.js +5 -5
  321. package/dist/src/gateway/hono/routes/notes.js +1 -1
  322. package/dist/src/gateway/hono/routes/projects.js +2 -2
  323. package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
  324. package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
  325. package/dist/src/gateway/hono/routes/sessions.js +1 -1
  326. package/dist/src/gateway/hono/routes/shares.js +3 -3
  327. package/dist/src/gateway/hono/routes/site-shares.js +1 -1
  328. package/dist/src/gateway/hono/routes/tasks.js +1 -1
  329. package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
  330. package/dist/src/gateway/hono/routes/user-model.js +5 -5
  331. package/dist/src/gateway/hono/routes/voice.js +6 -6
  332. package/dist/src/gateway/hono/routes/workflows.js +2 -2
  333. package/dist/src/gateway/image-generation-setup.js +1 -1
  334. package/dist/src/gateway/index.js +1 -1
  335. package/dist/src/gateway/lock.js +11 -11
  336. package/dist/src/gateway/media-access.js +1 -1
  337. package/dist/src/gateway/mobile-privacy.js +2 -2
  338. package/dist/src/gateway/ports.js +6 -6
  339. package/dist/src/gateway/run-loop.js +1 -1
  340. package/dist/src/gateway/scenes/mailContext.js +1 -1
  341. package/dist/src/gateway/scenes/slackThreadSource.js +1 -1
  342. package/dist/src/gateway/server.js +1 -1
  343. package/dist/src/gateway/service/config-coordinator.js +3 -3
  344. package/dist/src/gateway/service/run-gateway-agent.js +3 -3
  345. package/dist/src/gateway/service/sessions-api.js +1 -1
  346. package/dist/src/gateway/service.js +46 -46
  347. package/dist/src/gateway/session-context-summary.js +2 -2
  348. package/dist/src/gateway/workspace-editor-path.js +2 -2
  349. package/dist/src/home-intelligence/generator.js +1 -1
  350. package/dist/src/home-intelligence/host.js +2 -2
  351. package/dist/src/infra/gateway-processes.js +2 -2
  352. package/dist/src/infra/path-env.js +3 -3
  353. package/dist/src/infra/update-global.js +10 -10
  354. package/dist/src/local-apps/service.js +1 -1
  355. package/dist/src/mcp/gateway-http-client.js +1 -1
  356. package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
  357. package/dist/src/notes/agent-context.js +4 -4
  358. package/dist/src/notes/index.js +1 -1
  359. package/dist/src/notes/service.js +1 -1
  360. package/dist/src/notes/store.js +1 -1
  361. package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
  362. package/dist/src/providers/index.js +2 -2
  363. package/dist/src/providers/model-reference-auditor.js +1 -1
  364. package/dist/src/providers/register-runtime-providers.js +1 -1
  365. package/dist/src/remote-access/exposure-manager.js +1 -1
  366. package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
  367. package/dist/src/scenes/taskFollowUp/resources.js +1 -1
  368. package/dist/src/scenes/taskFollowUp/service.js +4 -4
  369. package/dist/src/session/index.js +2 -2
  370. package/dist/src/session/session-title.js +1 -1
  371. package/dist/src/session/store.js +4 -4
  372. package/dist/src/session/thinking-resolve.js +1 -1
  373. package/dist/src/share/share-store.js +1 -1
  374. package/dist/src/share/share-thumbnail.js +1 -1
  375. package/dist/src/share/share-zip.js +1 -1
  376. package/dist/src/share/site-proxy.js +1 -1
  377. package/dist/src/share/site-share-store.js +1 -1
  378. package/dist/src/storage/sqlite/connection.js +9 -9
  379. package/dist/src/tasks/capabilities/read.js +2 -2
  380. package/dist/src/tasks/capabilities/write.js +1 -1
  381. package/dist/src/tasks/execution-context.js +1 -1
  382. package/dist/src/tasks/home-query-service.js +3 -3
  383. package/dist/src/tasks/index.js +4 -4
  384. package/dist/src/tasks/task-application-service.js +2 -2
  385. package/dist/src/tasks/task-collaboration-delivery.js +1 -1
  386. package/dist/src/tasks/task-context-assembler.js +1 -1
  387. package/dist/src/tasks/task-handoff-service.js +1 -1
  388. package/dist/src/tasks/task-main-update-decision-service.js +1 -1
  389. package/dist/src/tui/backends/embedded-backend.js +10 -10
  390. package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
  391. package/dist/src/tui/extension-host/load-extensions.js +1 -1
  392. package/dist/src/tui/tui-command-formatters.js +1 -1
  393. package/dist/src/tui/tui-commands.js +6 -6
  394. package/dist/src/tui/tui-picker-overlay.js +1 -1
  395. package/dist/src/tui/tui-skills-autocomplete.js +1 -1
  396. package/dist/src/tui/tui-startup-resources.js +4 -4
  397. package/dist/src/tui/tui.js +7 -7
  398. package/dist/src/tunnel/frpc-binary.js +1 -1
  399. package/dist/src/tunnel/gateway-lifecycle.js +1 -1
  400. package/dist/src/voice/realtime/memory-context.js +3 -3
  401. package/dist/src/voice/realtime/persona-context.d.ts +2 -2
  402. package/dist/src/voice/realtime/persona-context.js +19 -33
  403. package/dist/src/voice/realtime/runtime.js +3 -3
  404. package/dist/src/voice/stt/index.js +2 -2
  405. package/dist/src/voice/stt/preflight.js +1 -1
  406. package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
  407. package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
  408. package/dist/src/voice/stt/transcribe-core.js +1 -1
  409. package/dist/src/voice/tts/index.js +3 -3
  410. package/dist/src/voice/tts/merge-config.js +1 -1
  411. package/dist/src/voice/tts/payload.js +1 -1
  412. package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
  413. package/dist/src/voice/tts/speak-core.js +1 -1
  414. package/dist/src/work-discovery/incremental-repository.js +1 -1
  415. package/dist/src/work-discovery/index.js +1 -1
  416. package/dist/src/work-discovery/service.js +5 -5
  417. package/dist/src/workflows/engine/workflow-engine.js +1 -1
  418. package/dist/src/workflows/service/workflow-run-service.js +8 -8
  419. package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
  420. package/package.json +2 -2
  421. package/dist/gateway/static/root/assets/agents-BLP0zRru.js +0 -70
  422. package/dist/gateway/static/root/assets/gateway-realtime-store-B01fiKrV.js +0 -1
  423. package/dist/gateway/static/root/assets/messages-vL3EpIrL.js +0 -3
  424. package/dist/gateway/static/root/assets/settings-advanced-gate-C7oNKVxC.js +0 -1
  425. package/dist/gateway/static/root/assets/settings-page-D1tVcmlR.js +0 -1
  426. package/dist/gateway/static/root/assets/skill-reload-api-DMIwfISw.js +0 -1
  427. package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +0 -3
  428. package/dist/src/agent/bootstrap/filter-bootstrap-files.js +0 -18
  429. package/dist/src/agent/context/workspace-templates/HEARTBEAT.md +0 -26
  430. package/dist/src/agent/context/workspace-templates/IDENTITY.md +0 -30
  431. package/dist/src/agent/service/parse-outbound-session-key.d.ts +0 -8
  432. package/dist/src/agent/service/parse-outbound-session-key.js +0 -44
  433. package/dist/src/heartbeat/active-hours.d.ts +0 -11
  434. package/dist/src/heartbeat/active-hours.js +0 -40
  435. package/dist/src/heartbeat/content-check.d.ts +0 -4
  436. package/dist/src/heartbeat/content-check.js +0 -17
  437. package/dist/src/heartbeat/event-prompt.d.ts +0 -4
  438. package/dist/src/heartbeat/event-prompt.js +0 -11
  439. package/dist/src/heartbeat/index.d.ts +0 -5
  440. package/dist/src/heartbeat/index.js +0 -6
  441. package/dist/src/heartbeat/tokens.d.ts +0 -15
  442. package/dist/src/heartbeat/tokens.js +0 -25
  443. package/dist/src/heartbeat/wake.d.ts +0 -13
  444. package/dist/src/heartbeat/wake.js +0 -46
@@ -1 +0,0 @@
1
- import{Dn as e}from"./index-S4z-eKe-.js";function t(t){let{children:n,fallback:r}=t,i=r===void 0?null:r;return e()?n:i}export{t};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{m as i,r as a}from"./chunk-KS7C4IRE-BMYIfy9x.js";import{t as o}from"./messages-vL3EpIrL.js";import{n as s}from"./locale-store-qcYD05PF.js";import{ao as c,co as l,do as u,fo as d,io as f,lo as p,mo as m,oo as h,po as g,ro as _,so as v,uo as y}from"./index-S4z-eKe-.js";var b=n(),x=e(t(),1),S=r(),C=[`overview`,`appearance`,`keyboard-shortcuts`,`system`,`desktop-pet`,`desktop-app`,`agent-defaults`,`gateway`,`runtimes`,`devices`,`heartbeat`,`remote-access`,`shares`],w=(0,x.lazy)(()=>d().then(e=>({default:e.SetupStatusPanel}))),T=(0,x.lazy)(()=>c().then(e=>({default:e.AppearanceSettingsPanel}))),E=(0,x.lazy)(()=>p().then(e=>({default:e.KeyboardShortcutsSettingsPanel}))),D=(0,x.lazy)(()=>m().then(e=>({default:e.SystemSettingsPanel}))),O=(0,x.lazy)(()=>h().then(e=>({default:e.DesktopPetSettings}))),k=(0,x.lazy)(()=>f().then(e=>({default:e.AppManagementSettingsPanel}))),A=(0,x.lazy)(()=>l().then(e=>({default:e.GatewaySettingsPanel}))),j=(0,x.lazy)(()=>u().then(e=>({default:e.RuntimeToolsSettingsPanel}))),M=(0,x.lazy)(()=>y().then(e=>({default:e.RemoteAccessHub}))),N=(0,x.lazy)(()=>g().then(e=>({default:e.SharesSettingsPanel}))),P=(0,x.lazy)(()=>_().then(e=>({default:e.AgentDefaultsSettingsPanel}))),F=(0,x.lazy)(()=>v().then(e=>({default:e.EndpointToolsManagementSettings})));function I(){let e=(0,b.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,S.jsxs)(`div`,{className:`w-full flex-1 px-3 py-8 sm:px-5 xl:px-6`,"aria-busy":!0,children:[(0,S.jsx)(`div`,{className:`h-8 w-48 max-w-full animate-pulse rounded-md bg-surface-hover`}),(0,S.jsx)(`div`,{className:`mt-6 h-36 animate-pulse rounded-xl bg-surface-hover`}),(0,S.jsx)(`div`,{className:`mt-4 h-24 animate-pulse rounded-xl bg-surface-hover`})]}),e[0]=t):t=e[0],t}function L(e){return(0,S.jsx)(x.Suspense,{fallback:(0,S.jsx)(I,{}),children:(0,S.jsx)(e,{})})}function R(){let e=(0,b.c)(27),{section:t}=i(),n=s(z),r,c,l,u,d;if(e[0]!==n||e[1]!==t){d=Symbol.for(`react.early_return_sentinel`);bb0:{let i=o(n);if(!t||!C.includes(t)){let t;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,S.jsx)(a,{to:`/settings/overview`,replace:!0}),e[7]=t):t=e[7],d=t;break bb0}let s=t;if(s===`overview`){let t;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(w),e[8]=t):t=e[8],d=t;break bb0}let f=i.settingsSections[s];if(s===`appearance`){let t;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(T),e[9]=t):t=e[9],d=t;break bb0}if(s===`keyboard-shortcuts`){let t;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(E),e[10]=t):t=e[10],d=t;break bb0}if(s===`system`){let t;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(D),e[11]=t):t=e[11],d=t;break bb0}if(s===`desktop-pet`){let t;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(O),e[12]=t):t=e[12],d=t;break bb0}if(s===`desktop-app`){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(k),e[13]=t):t=e[13],d=t;break bb0}if(s===`agent-defaults`){let t;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(P),e[14]=t):t=e[14],d=t;break bb0}if(s===`gateway`){let t;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(A),e[15]=t):t=e[15],d=t;break bb0}if(s===`runtimes`){let t;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(j),e[16]=t):t=e[16],d=t;break bb0}if(s===`devices`){let t;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(F),e[17]=t):t=e[17],d=t;break bb0}if(s===`remote-access`){let t;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(M),e[18]=t):t=e[18],d=t;break bb0}if(s===`shares`){let t;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=L(N),e[19]=t):t=e[19],d=t;break bb0}l=`flex w-full flex-col gap-3 px-3 py-8 sm:px-5 xl:px-6`,u=(0,S.jsx)(`h1`,{className:`text-lg font-semibold text-fg`,children:f}),r=`text-sm text-fg-muted`,c=i.settingsPage.comingSoon.replace(`{{title}}`,f)}e[0]=n,e[1]=t,e[2]=r,e[3]=c,e[4]=l,e[5]=u,e[6]=d}else r=e[2],c=e[3],l=e[4],u=e[5],d=e[6];if(d!==Symbol.for(`react.early_return_sentinel`))return d;let f;e[20]!==r||e[21]!==c?(f=(0,S.jsx)(`p`,{className:r,children:c}),e[20]=r,e[21]=c,e[22]=f):f=e[22];let p;return e[23]!==l||e[24]!==u||e[25]!==f?(p=(0,S.jsxs)(`div`,{className:l,children:[u,f]}),e[23]=l,e[24]=u,e[25]=f,e[26]=p):p=e[26],p}function z(e){return e.language}export{R as SettingsPage};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{i as t,r as n}from"./locale-store-qcYD05PF.js";import{zi as r}from"./index-S4z-eKe-.js";var i=e({reloadSkills:()=>a});async function a(){let e=await t(n(`/api/skills/reload`),{method:`POST`});if(!e.ok)throw Error(await r(e))}export{i as n,a as t};
@@ -1,3 +0,0 @@
1
- import type { WorkspaceBootstrapFile } from './types.js';
2
- /** Subagent and cron sessions load only the minimal identity and instruction profile. */
3
- export declare function filterBootstrapFilesForSession(files: WorkspaceBootstrapFile[], conversationId?: string): WorkspaceBootstrapFile[];
@@ -1,18 +0,0 @@
1
- import { DEFAULT_AGENTS_FILENAME, DEFAULT_IDENTITY_FILENAME, DEFAULT_SOUL_FILENAME, DEFAULT_TOOLS_FILENAME } from "../context/workspace.js";
2
- import { isCronConversationId, isSubagentConversationId } from "../../routing/agent-session-key.js";
3
- import { init_session_key } from "../../routing/session-key.js";
4
- //#region src/agent/bootstrap/filter-bootstrap-files.ts
5
- init_session_key();
6
- const MINIMAL_BOOTSTRAP_ALLOWLIST = new Set([
7
- DEFAULT_AGENTS_FILENAME,
8
- DEFAULT_TOOLS_FILENAME,
9
- DEFAULT_SOUL_FILENAME,
10
- DEFAULT_IDENTITY_FILENAME
11
- ]);
12
- /** Subagent and cron sessions load only the minimal identity and instruction profile. */
13
- function filterBootstrapFilesForSession(files, conversationId) {
14
- if (!conversationId || !isSubagentConversationId(conversationId) && !isCronConversationId(conversationId)) return files;
15
- return files.filter((file) => MINIMAL_BOOTSTRAP_ALLOWLIST.has(file.name));
16
- }
17
- //#endregion
18
- export { filterBootstrapFilesForSession };
@@ -1,26 +0,0 @@
1
- ---
2
- title: "HEARTBEAT.md Template"
3
- summary: "Periodic checks template for agents"
4
- read_when:
5
- - Configuring heartbeat behavior
6
- ---
7
-
8
- # HEARTBEAT.md - Periodic Checks
9
-
10
- Edit this file to define what you check during heartbeat polls.
11
-
12
- Keep it small to limit token burn.
13
-
14
- ## Example Checklist
15
-
16
- - [ ] Check email for urgent messages
17
- - [ ] Check calendar for upcoming events (< 2h)
18
- - [ ] Check any notifications/mentions
19
-
20
- ## Current Focus
21
-
22
- _(What should you be tracking right now?)_
23
-
24
- ---
25
-
26
- **Remember:** If nothing needs attention, just reply `HEARTBEAT_OK`.
@@ -1,30 +0,0 @@
1
- ---
2
- title: "IDENTITY.md Template"
3
- summary: "Agent identity record"
4
- read_when:
5
- - Setting up a workspace manually
6
- ---
7
-
8
- # IDENTITY.md - Who Am I?
9
-
10
- _Fill this in during your first conversation. Make it yours._
11
-
12
- - **Name:**
13
- _(pick something you like)_
14
- - **Creature:**
15
- _(AI? robot? familiar? ghost in the machine? something weirder?)_
16
- - **Vibe:**
17
- _(how do you come across? sharp? warm? chaotic? calm?)_
18
- - **Emoji:**
19
- _(your signature — pick one that feels right)_
20
- - **Avatar:**
21
- _(workspace-relative path, http(s) URL, or data URI)_
22
-
23
- ---
24
-
25
- This isn't just metadata. It's the start of figuring out who you are.
26
-
27
- Notes:
28
-
29
- - Save this file at the workspace root as `IDENTITY.md`.
30
- - For avatars, use a workspace-relative path like `avatars/xopc.png`.
@@ -1,8 +0,0 @@
1
- import type { Config } from '../../config/schema.js';
2
- /**
3
- * Map a session key to outbound channel routing (heartbeat/cron/virtual keys included).
4
- */
5
- export declare function parseOutboundConversationId(conversationId: string, config: Config | undefined): {
6
- channel: string;
7
- chatId: string;
8
- };
@@ -1,44 +0,0 @@
1
- import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
2
- import { init_sqlite } from "../../storage/sqlite/index.js";
3
- import { INTERNAL_OUTBOUND_DROP_CHANNEL } from "../../channels/internal-outbound.js";
4
- //#region src/agent/service/parse-outbound-session-key.ts
5
- init_sqlite();
6
- /**
7
- * Map a session key to outbound channel routing (heartbeat/cron/virtual keys included).
8
- */
9
- function parseOutboundConversationId(conversationId, config) {
10
- const metadata = getSessionMetadata(conversationId);
11
- if (!metadata) throw new Error(`Conversation not found: ${conversationId}`);
12
- if (metadata.sessionType === "heartbeat") {
13
- const hb = config?.gateway?.heartbeat;
14
- const target = hb?.target?.trim();
15
- const targetChatId = hb?.targetChatId?.trim();
16
- if (target && targetChatId) return {
17
- channel: target,
18
- chatId: targetChatId
19
- };
20
- return {
21
- channel: INTERNAL_OUTBOUND_DROP_CHANNEL,
22
- chatId: conversationId
23
- };
24
- }
25
- const routing = metadata?.routing;
26
- if (routing?.source && routing.peerId) return {
27
- channel: routing.source,
28
- chatId: routing.peerId
29
- };
30
- if (metadata?.sourceChannel && metadata.sourceChatId) return {
31
- channel: metadata.sourceChannel,
32
- chatId: metadata.sourceChatId
33
- };
34
- if (metadata.sessionType === "cron") return {
35
- channel: INTERNAL_OUTBOUND_DROP_CHANNEL,
36
- chatId: conversationId
37
- };
38
- return {
39
- channel: "cli",
40
- chatId: "main"
41
- };
42
- }
43
- //#endregion
44
- export { parseOutboundConversationId };
@@ -1,11 +0,0 @@
1
- export interface ActiveHoursWindow {
2
- start: string;
3
- end: string;
4
- /** IANA zone (e.g. Asia/Shanghai) or omit / `local` for host local time */
5
- timezone?: string;
6
- }
7
- /**
8
- * Whether `now` falls inside [start, end) in the configured timezone (or local).
9
- * Supports windows that cross midnight when end <= start in clock terms.
10
- */
11
- export declare function isWithinActiveHours(activeHours: ActiveHoursWindow, now?: Date): boolean;
@@ -1,40 +0,0 @@
1
- //#region src/heartbeat/active-hours.ts
2
- function parseHm(s) {
3
- const m = /^(\d{1,2}):(\d{2})$/.exec(s.trim());
4
- if (!m) return null;
5
- const h = Number(m[1]);
6
- const min = Number(m[2]);
7
- if (h < 0 || h > 23 || min < 0 || min > 59) return null;
8
- return {
9
- h,
10
- m: min
11
- };
12
- }
13
- function currentMinuteInZone(now, timezone) {
14
- if (!timezone || timezone === "local") return now.getHours() * 60 + now.getMinutes();
15
- const parts = new Intl.DateTimeFormat("en-GB", {
16
- timeZone: timezone,
17
- hour: "2-digit",
18
- minute: "2-digit",
19
- hour12: false
20
- }).formatToParts(now);
21
- const hour = Number(parts.find((p) => p.type === "hour")?.value ?? "0");
22
- const minute = Number(parts.find((p) => p.type === "minute")?.value ?? "0");
23
- return hour * 60 + minute;
24
- }
25
- /**
26
- * Whether `now` falls inside [start, end) in the configured timezone (or local).
27
- * Supports windows that cross midnight when end <= start in clock terms.
28
- */
29
- function isWithinActiveHours(activeHours, now = /* @__PURE__ */ new Date()) {
30
- const startP = parseHm(activeHours.start);
31
- const endP = parseHm(activeHours.end);
32
- if (!startP || !endP) return true;
33
- const currentMin = currentMinuteInZone(now, activeHours.timezone);
34
- const startMin = startP.h * 60 + startP.m;
35
- const endMin = endP.h * 60 + endP.m;
36
- if (endMin > startMin) return currentMin >= startMin && currentMin < endMin;
37
- return currentMin >= startMin || currentMin < endMin;
38
- }
39
- //#endregion
40
- export { isWithinActiveHours };
@@ -1,4 +0,0 @@
1
- /**
2
- * True when HEARTBEAT.md has no actionable content (only headings, blanks, empty list items).
3
- */
4
- export declare function isHeartbeatContentEmpty(content: string): boolean;
@@ -1,17 +0,0 @@
1
- //#region src/heartbeat/content-check.ts
2
- /**
3
- * True when HEARTBEAT.md has no actionable content (only headings, blanks, empty list items).
4
- */
5
- function isHeartbeatContentEmpty(content) {
6
- const lines = content.split("\n");
7
- for (const line of lines) {
8
- const trimmed = line.trim();
9
- if (!trimmed) continue;
10
- if (/^#+(\s|$)/.test(trimmed)) continue;
11
- if (/^[-*+]\s*(\[[\sXx]?\]\s*)?$/.test(trimmed)) continue;
12
- return false;
13
- }
14
- return true;
15
- }
16
- //#endregion
17
- export { isHeartbeatContentEmpty };
@@ -1,4 +0,0 @@
1
- /**
2
- * Append cron-style trigger lines to the heartbeat user prompt.
3
- */
4
- export declare function appendCronEventLines(basePrompt: string, reasons: string[]): string;
@@ -1,11 +0,0 @@
1
- //#region src/heartbeat/event-prompt.ts
2
- /**
3
- * Append cron-style trigger lines to the heartbeat user prompt.
4
- */
5
- function appendCronEventLines(basePrompt, reasons) {
6
- const cronReasons = reasons.filter((r) => r.startsWith("cron:"));
7
- if (cronReasons.length === 0) return basePrompt;
8
- return `${basePrompt}\n\nTriggered cron events:\n${cronReasons.join("\n")}`;
9
- }
10
- //#endregion
11
- export { appendCronEventLines };
@@ -1,5 +0,0 @@
1
- export * from './tokens.js';
2
- export * from './wake.js';
3
- export * from './content-check.js';
4
- export * from './active-hours.js';
5
- export * from './event-prompt.js';
@@ -1,6 +0,0 @@
1
- import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
2
- import { isWithinActiveHours } from "./active-hours.js";
3
- import { isHeartbeatContentEmpty } from "./content-check.js";
4
- import { appendCronEventLines } from "./event-prompt.js";
5
- import { createHeartbeatWake } from "./wake.js";
6
- export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
@@ -1,15 +0,0 @@
1
- export declare const HEARTBEAT_OK = "HEARTBEAT_OK";
2
- export declare const NO_REPLY = "NO_REPLY";
3
- export declare const DEFAULT_ACK_MAX_CHARS = 300;
4
- /**
5
- * Strip HEARTBEAT_OK token from model text.
6
- * Supports plain text, Markdown bold, inline code, trailing punctuation.
7
- */
8
- export declare function stripHeartbeatToken(text: string): {
9
- stripped: string;
10
- hadToken: boolean;
11
- };
12
- /**
13
- * Whether the reply should not be sent to the user: HEARTBEAT_OK present and little else.
14
- */
15
- export declare function shouldSilence(text: string, ackMaxChars?: number): boolean;
@@ -1,25 +0,0 @@
1
- //#region src/heartbeat/tokens.ts
2
- const HEARTBEAT_OK = "HEARTBEAT_OK";
3
- const NO_REPLY = "NO_REPLY";
4
- const DEFAULT_ACK_MAX_CHARS = 300;
5
- /**
6
- * Strip HEARTBEAT_OK token from model text.
7
- * Supports plain text, Markdown bold, inline code, trailing punctuation.
8
- */
9
- function stripHeartbeatToken(text) {
10
- const hadToken = text.includes(HEARTBEAT_OK);
11
- return {
12
- stripped: text.replace(/<[^>]*>/g, " ").replace(/\*\*HEARTBEAT_OK\*\*/g, "").replace(/`HEARTBEAT_OK`/g, "").replace(/HEARTBEAT_OK\.?/g, "").trim(),
13
- hadToken
14
- };
15
- }
16
- /**
17
- * Whether the reply should not be sent to the user: HEARTBEAT_OK present and little else.
18
- */
19
- function shouldSilence(text, ackMaxChars = 300) {
20
- const { stripped, hadToken } = stripHeartbeatToken(text);
21
- if (!hadToken) return false;
22
- return stripped.length <= ackMaxChars;
23
- }
24
- //#endregion
25
- export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken };
@@ -1,13 +0,0 @@
1
- export interface WakeRequest {
2
- reason?: string;
3
- agentId?: string;
4
- conversationId?: string;
5
- coalesceMs?: number;
6
- }
7
- /**
8
- * Coalesces wake requests within coalesceMs and serializes handler execution.
9
- */
10
- export declare function createHeartbeatWake(handler: (reasons: string[]) => Promise<void>): {
11
- request(opts?: WakeRequest): void;
12
- stop(): void;
13
- };
@@ -1,46 +0,0 @@
1
- //#region src/heartbeat/wake.ts
2
- const DEFAULT_COALESCE_MS = 250;
3
- const RETRY_MS = 1e3;
4
- /**
5
- * Coalesces wake requests within coalesceMs and serializes handler execution.
6
- */
7
- function createHeartbeatWake(handler) {
8
- let running = false;
9
- let timer;
10
- let pendingReasons = [];
11
- function schedule(delayMs) {
12
- if (timer) clearTimeout(timer);
13
- timer = setTimeout(async () => {
14
- timer = void 0;
15
- if (running) {
16
- schedule(RETRY_MS);
17
- return;
18
- }
19
- running = true;
20
- const reasons = [...pendingReasons];
21
- pendingReasons = [];
22
- try {
23
- await handler(reasons);
24
- } finally {
25
- running = false;
26
- if (pendingReasons.length > 0) schedule(DEFAULT_COALESCE_MS);
27
- }
28
- }, delayMs);
29
- timer.unref?.();
30
- }
31
- return {
32
- request(opts) {
33
- pendingReasons.push(opts?.reason ?? "interval");
34
- schedule(opts?.coalesceMs ?? DEFAULT_COALESCE_MS);
35
- },
36
- stop() {
37
- if (timer) {
38
- clearTimeout(timer);
39
- timer = void 0;
40
- }
41
- pendingReasons = [];
42
- }
43
- };
44
- }
45
- //#endregion
46
- export { createHeartbeatWake };