comisai 1.0.27 → 1.0.30

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 (246) hide show
  1. package/node_modules/@comis/agent/dist/bootstrap/sections/tool-descriptions.js +62 -8
  2. package/node_modules/@comis/agent/dist/bootstrap/sections/tooling-sections.js +3 -1
  3. package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.d.ts +7 -0
  4. package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +26 -0
  5. package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.d.ts +21 -0
  6. package/node_modules/@comis/agent/dist/context-engine/signature-replay-scrubber.js +29 -9
  7. package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.d.ts +10 -2
  8. package/node_modules/@comis/agent/dist/context-engine/signature-surrogate-guard.js +15 -9
  9. package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.d.ts +17 -2
  10. package/node_modules/@comis/agent/dist/context-engine/thinking-block-cleaner.js +19 -8
  11. package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +28 -0
  12. package/node_modules/@comis/agent/dist/executor/executor-response-filter.js +3 -0
  13. package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +3 -1
  14. package/node_modules/@comis/agent/dist/executor/phase-filter.d.ts +20 -4
  15. package/node_modules/@comis/agent/dist/executor/phase-filter.js +62 -19
  16. package/node_modules/@comis/agent/dist/executor/pi-executor.js +6 -0
  17. package/node_modules/@comis/agent/dist/executor/stream-wrappers/config-resolver.js +2 -3
  18. package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +2 -3
  19. package/node_modules/@comis/agent/dist/executor/ttl-guard.js +2 -3
  20. package/node_modules/@comis/agent/dist/index.d.ts +4 -2
  21. package/node_modules/@comis/agent/dist/index.js +3 -2
  22. package/node_modules/@comis/agent/dist/model/compaction-model-resolver.d.ts +41 -0
  23. package/node_modules/@comis/agent/dist/model/compaction-model-resolver.js +51 -0
  24. package/node_modules/@comis/agent/dist/model/model-registry-adapter.js +113 -26
  25. package/node_modules/@comis/agent/dist/model/model-scanner.d.ts +27 -0
  26. package/node_modules/@comis/agent/dist/model/model-scanner.js +64 -23
  27. package/node_modules/@comis/agent/dist/model/operation-model-defaults.d.ts +37 -15
  28. package/node_modules/@comis/agent/dist/model/operation-model-defaults.js +70 -25
  29. package/node_modules/@comis/agent/dist/model/operation-model-resolver.d.ts +2 -2
  30. package/node_modules/@comis/agent/dist/model/operation-model-resolver.js +12 -8
  31. package/node_modules/@comis/agent/dist/provider/capabilities.d.ts +21 -0
  32. package/node_modules/@comis/agent/dist/provider/capabilities.js +28 -0
  33. package/node_modules/@comis/agent/dist/session/orphaned-message-repair.js +61 -1
  34. package/node_modules/@comis/agent/dist/workspace/templates.js +1 -1
  35. package/node_modules/@comis/agent/package.json +1 -1
  36. package/node_modules/@comis/channels/dist/shared/channel-manager.d.ts +19 -1
  37. package/node_modules/@comis/channels/dist/shared/channel-manager.js +59 -3
  38. package/node_modules/@comis/channels/dist/shared/deliver-to-channel.d.ts +10 -0
  39. package/node_modules/@comis/channels/dist/shared/deliver-to-channel.js +25 -10
  40. package/node_modules/@comis/channels/dist/shared/execution-deliver.d.ts +1 -1
  41. package/node_modules/@comis/channels/dist/shared/execution-deliver.js +1 -1
  42. package/node_modules/@comis/channels/dist/shared/execution-pipeline.d.ts +8 -0
  43. package/node_modules/@comis/channels/dist/shared/inbound-gate.js +21 -3
  44. package/node_modules/@comis/channels/dist/shared/inbound-pipeline.d.ts +8 -0
  45. package/node_modules/@comis/channels/dist/shared/inbound-route.d.ts +1 -1
  46. package/node_modules/@comis/channels/dist/shared/inbound-route.js +1 -0
  47. package/node_modules/@comis/channels/dist/telegram/message-mapper.d.ts +18 -1
  48. package/node_modules/@comis/channels/dist/telegram/message-mapper.js +95 -1
  49. package/node_modules/@comis/channels/dist/telegram/telegram-adapter.js +7 -1
  50. package/node_modules/@comis/channels/package.json +1 -1
  51. package/node_modules/@comis/cli/package.json +1 -1
  52. package/node_modules/@comis/core/dist/config/schema-agent.d.ts +15 -3
  53. package/node_modules/@comis/core/dist/config/schema-agent.js +6 -2
  54. package/node_modules/@comis/core/dist/config/schema-integrations.d.ts +4 -4
  55. package/node_modules/@comis/core/dist/config/schema-integrations.js +3 -3
  56. package/node_modules/@comis/core/dist/config/schema-models.d.ts +4 -2
  57. package/node_modules/@comis/core/dist/config/schema-models.js +4 -2
  58. package/node_modules/@comis/core/package.json +1 -1
  59. package/node_modules/@comis/daemon/dist/daemon.js +74 -9
  60. package/node_modules/@comis/daemon/dist/rpc/agent-handlers.js +40 -9
  61. package/node_modules/@comis/daemon/dist/rpc/builtin-provider-guard.d.ts +16 -0
  62. package/node_modules/@comis/daemon/dist/rpc/builtin-provider-guard.js +60 -0
  63. package/node_modules/@comis/daemon/dist/rpc/config-handlers.js +59 -0
  64. package/node_modules/@comis/daemon/dist/rpc/credential-resolver.d.ts +17 -0
  65. package/node_modules/@comis/daemon/dist/rpc/credential-resolver.js +99 -0
  66. package/node_modules/@comis/daemon/dist/rpc/message-handlers.d.ts +5 -0
  67. package/node_modules/@comis/daemon/dist/rpc/message-handlers.js +25 -4
  68. package/node_modules/@comis/daemon/dist/rpc/model-handlers.d.ts +4 -3
  69. package/node_modules/@comis/daemon/dist/rpc/model-handlers.js +21 -3
  70. package/node_modules/@comis/daemon/dist/rpc/provider-handlers.js +82 -6
  71. package/node_modules/@comis/daemon/dist/rpc/rpc-dispatch.d.ts +4 -0
  72. package/node_modules/@comis/daemon/dist/wiring/inbound-message-id-resolver.d.ts +48 -0
  73. package/node_modules/@comis/daemon/dist/wiring/inbound-message-id-resolver.js +58 -0
  74. package/node_modules/@comis/daemon/dist/wiring/restart-continuation.d.ts +10 -0
  75. package/node_modules/@comis/daemon/dist/wiring/setup-agents.d.ts +18 -6
  76. package/node_modules/@comis/daemon/dist/wiring/setup-agents.js +98 -46
  77. package/node_modules/@comis/daemon/dist/wiring/setup-channels.d.ts +13 -1
  78. package/node_modules/@comis/daemon/dist/wiring/setup-channels.js +2 -1
  79. package/node_modules/@comis/daemon/dist/wiring/setup-gateway-rpc.js +1 -1
  80. package/node_modules/@comis/daemon/package.json +2 -2
  81. package/node_modules/@comis/gateway/package.json +1 -1
  82. package/node_modules/@comis/infra/package.json +1 -1
  83. package/node_modules/@comis/memory/package.json +1 -1
  84. package/node_modules/@comis/scheduler/package.json +1 -1
  85. package/node_modules/@comis/shared/package.json +1 -1
  86. package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.d.ts +1 -1
  87. package/node_modules/@comis/skills/dist/bridge/mcp-tool-bridge.js +1 -1
  88. package/node_modules/@comis/skills/dist/bridge/tool-audit.js +1 -1
  89. package/node_modules/@comis/skills/dist/builtin/exec-tool.d.ts +12 -11
  90. package/node_modules/@comis/skills/dist/builtin/exec-tool.js +1 -1
  91. package/node_modules/@comis/skills/dist/builtin/file/apply-patch-tool.d.ts +3 -2
  92. package/node_modules/@comis/skills/dist/builtin/file/apply-patch-tool.js +1 -1
  93. package/node_modules/@comis/skills/dist/builtin/file-tools/edit-tool.d.ts +7 -6
  94. package/node_modules/@comis/skills/dist/builtin/file-tools/edit-tool.js +1 -1
  95. package/node_modules/@comis/skills/dist/builtin/file-tools/find-tool.d.ts +6 -5
  96. package/node_modules/@comis/skills/dist/builtin/file-tools/find-tool.js +1 -1
  97. package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.d.ts +16 -15
  98. package/node_modules/@comis/skills/dist/builtin/file-tools/grep-tool.js +1 -1
  99. package/node_modules/@comis/skills/dist/builtin/file-tools/ls-tool.d.ts +4 -3
  100. package/node_modules/@comis/skills/dist/builtin/file-tools/ls-tool.js +1 -1
  101. package/node_modules/@comis/skills/dist/builtin/file-tools/notebook-edit-tool.d.ts +7 -6
  102. package/node_modules/@comis/skills/dist/builtin/file-tools/notebook-edit-tool.js +1 -1
  103. package/node_modules/@comis/skills/dist/builtin/file-tools/read-tool.d.ts +6 -5
  104. package/node_modules/@comis/skills/dist/builtin/file-tools/read-tool.js +1 -1
  105. package/node_modules/@comis/skills/dist/builtin/file-tools/write-tool.d.ts +5 -4
  106. package/node_modules/@comis/skills/dist/builtin/file-tools/write-tool.js +1 -1
  107. package/node_modules/@comis/skills/dist/builtin/platform/admin-manage-factory.d.ts +1 -1
  108. package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.d.ts +28 -27
  109. package/node_modules/@comis/skills/dist/builtin/platform/agents-manage-tool.js +1 -1
  110. package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.d.ts +4 -3
  111. package/node_modules/@comis/skills/dist/builtin/platform/background-tasks-tool.js +1 -1
  112. package/node_modules/@comis/skills/dist/builtin/platform/browser-tool-schema.d.ts +67 -66
  113. package/node_modules/@comis/skills/dist/builtin/platform/browser-tool-schema.js +1 -1
  114. package/node_modules/@comis/skills/dist/builtin/platform/channels-manage-tool.d.ts +6 -5
  115. package/node_modules/@comis/skills/dist/builtin/platform/channels-manage-tool.js +1 -1
  116. package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.d.ts +20 -19
  117. package/node_modules/@comis/skills/dist/builtin/platform/cron-tool.js +1 -1
  118. package/node_modules/@comis/skills/dist/builtin/platform/ctx-expand-tool.d.ts +4 -3
  119. package/node_modules/@comis/skills/dist/builtin/platform/ctx-expand-tool.js +1 -1
  120. package/node_modules/@comis/skills/dist/builtin/platform/ctx-inspect-tool.d.ts +3 -2
  121. package/node_modules/@comis/skills/dist/builtin/platform/ctx-inspect-tool.js +1 -1
  122. package/node_modules/@comis/skills/dist/builtin/platform/ctx-recall-tool.d.ts +6 -5
  123. package/node_modules/@comis/skills/dist/builtin/platform/ctx-recall-tool.js +1 -1
  124. package/node_modules/@comis/skills/dist/builtin/platform/ctx-search-tool.d.ts +6 -5
  125. package/node_modules/@comis/skills/dist/builtin/platform/ctx-search-tool.js +1 -1
  126. package/node_modules/@comis/skills/dist/builtin/platform/describe-video-tool.d.ts +4 -3
  127. package/node_modules/@comis/skills/dist/builtin/platform/describe-video-tool.js +1 -1
  128. package/node_modules/@comis/skills/dist/builtin/platform/discord-action-tool.d.ts +2 -1
  129. package/node_modules/@comis/skills/dist/builtin/platform/discord-action-tool.js +1 -1
  130. package/node_modules/@comis/skills/dist/builtin/platform/extract-document-tool.d.ts +4 -3
  131. package/node_modules/@comis/skills/dist/builtin/platform/extract-document-tool.js +1 -1
  132. package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +12 -11
  133. package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.js +1 -1
  134. package/node_modules/@comis/skills/dist/builtin/platform/heartbeat-manage-tool.d.ts +23 -22
  135. package/node_modules/@comis/skills/dist/builtin/platform/heartbeat-manage-tool.js +1 -1
  136. package/node_modules/@comis/skills/dist/builtin/platform/image-generate-tool.d.ts +4 -3
  137. package/node_modules/@comis/skills/dist/builtin/platform/image-generate-tool.js +1 -1
  138. package/node_modules/@comis/skills/dist/builtin/platform/image-tool.d.ts +8 -7
  139. package/node_modules/@comis/skills/dist/builtin/platform/image-tool.js +1 -1
  140. package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.d.ts +9 -8
  141. package/node_modules/@comis/skills/dist/builtin/platform/mcp-manage-tool.js +1 -1
  142. package/node_modules/@comis/skills/dist/builtin/platform/memory-get-tool.d.ts +5 -4
  143. package/node_modules/@comis/skills/dist/builtin/platform/memory-get-tool.js +1 -1
  144. package/node_modules/@comis/skills/dist/builtin/platform/memory-manage-tool.d.ts +12 -11
  145. package/node_modules/@comis/skills/dist/builtin/platform/memory-manage-tool.js +1 -1
  146. package/node_modules/@comis/skills/dist/builtin/platform/memory-search-tool.d.ts +4 -3
  147. package/node_modules/@comis/skills/dist/builtin/platform/memory-search-tool.js +1 -1
  148. package/node_modules/@comis/skills/dist/builtin/platform/memory-store-tool.d.ts +4 -3
  149. package/node_modules/@comis/skills/dist/builtin/platform/memory-store-tool.js +1 -1
  150. package/node_modules/@comis/skills/dist/builtin/platform/message-tool.d.ts +32 -31
  151. package/node_modules/@comis/skills/dist/builtin/platform/message-tool.js +1 -1
  152. package/node_modules/@comis/skills/dist/builtin/platform/messaging-factory.d.ts +1 -1
  153. package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.d.ts +4 -3
  154. package/node_modules/@comis/skills/dist/builtin/platform/models-manage-tool.js +11 -4
  155. package/node_modules/@comis/skills/dist/builtin/platform/notify-tool.d.ts +6 -5
  156. package/node_modules/@comis/skills/dist/builtin/platform/notify-tool.js +1 -1
  157. package/node_modules/@comis/skills/dist/builtin/platform/obs-query-tool.d.ts +11 -10
  158. package/node_modules/@comis/skills/dist/builtin/platform/obs-query-tool.js +1 -1
  159. package/node_modules/@comis/skills/dist/builtin/platform/pipeline-tool.d.ts +37 -36
  160. package/node_modules/@comis/skills/dist/builtin/platform/pipeline-tool.js +1 -1
  161. package/node_modules/@comis/skills/dist/builtin/platform/platform-action-tool.d.ts +1 -1
  162. package/node_modules/@comis/skills/dist/builtin/platform/providers-manage-tool.d.ts +21 -20
  163. package/node_modules/@comis/skills/dist/builtin/platform/providers-manage-tool.js +1 -1
  164. package/node_modules/@comis/skills/dist/builtin/platform/session-search-tool.d.ts +6 -5
  165. package/node_modules/@comis/skills/dist/builtin/platform/session-search-tool.js +1 -1
  166. package/node_modules/@comis/skills/dist/builtin/platform/session-status-tool.d.ts +3 -2
  167. package/node_modules/@comis/skills/dist/builtin/platform/session-status-tool.js +1 -1
  168. package/node_modules/@comis/skills/dist/builtin/platform/sessions-history-tool.d.ts +5 -4
  169. package/node_modules/@comis/skills/dist/builtin/platform/sessions-history-tool.js +1 -1
  170. package/node_modules/@comis/skills/dist/builtin/platform/sessions-list-tool.d.ts +4 -3
  171. package/node_modules/@comis/skills/dist/builtin/platform/sessions-list-tool.js +1 -1
  172. package/node_modules/@comis/skills/dist/builtin/platform/sessions-manage-tool.d.ts +5 -4
  173. package/node_modules/@comis/skills/dist/builtin/platform/sessions-manage-tool.js +1 -1
  174. package/node_modules/@comis/skills/dist/builtin/platform/sessions-send-tool.d.ts +7 -6
  175. package/node_modules/@comis/skills/dist/builtin/platform/sessions-send-tool.js +1 -1
  176. package/node_modules/@comis/skills/dist/builtin/platform/sessions-spawn-tool.d.ts +15 -14
  177. package/node_modules/@comis/skills/dist/builtin/platform/sessions-spawn-tool.js +1 -1
  178. package/node_modules/@comis/skills/dist/builtin/platform/skills-manage-tool.d.ts +8 -7
  179. package/node_modules/@comis/skills/dist/builtin/platform/skills-manage-tool.js +1 -1
  180. package/node_modules/@comis/skills/dist/builtin/platform/slack-action-tool.d.ts +2 -1
  181. package/node_modules/@comis/skills/dist/builtin/platform/slack-action-tool.js +1 -1
  182. package/node_modules/@comis/skills/dist/builtin/platform/subagents-tool.d.ts +7 -6
  183. package/node_modules/@comis/skills/dist/builtin/platform/subagents-tool.js +1 -1
  184. package/node_modules/@comis/skills/dist/builtin/platform/telegram-action-tool.d.ts +2 -1
  185. package/node_modules/@comis/skills/dist/builtin/platform/telegram-action-tool.js +1 -1
  186. package/node_modules/@comis/skills/dist/builtin/platform/tokens-manage-tool.d.ts +5 -4
  187. package/node_modules/@comis/skills/dist/builtin/platform/tokens-manage-tool.js +1 -1
  188. package/node_modules/@comis/skills/dist/builtin/platform/transcribe-audio-tool.d.ts +4 -3
  189. package/node_modules/@comis/skills/dist/builtin/platform/transcribe-audio-tool.js +1 -1
  190. package/node_modules/@comis/skills/dist/builtin/platform/tts-tool.d.ts +6 -5
  191. package/node_modules/@comis/skills/dist/builtin/platform/tts-tool.js +1 -1
  192. package/node_modules/@comis/skills/dist/builtin/platform/unified-context-tool.d.ts +13 -12
  193. package/node_modules/@comis/skills/dist/builtin/platform/unified-context-tool.js +1 -1
  194. package/node_modules/@comis/skills/dist/builtin/platform/unified-memory-tool.d.ts +18 -17
  195. package/node_modules/@comis/skills/dist/builtin/platform/unified-memory-tool.js +1 -1
  196. package/node_modules/@comis/skills/dist/builtin/platform/unified-session-tool.d.ts +11 -10
  197. package/node_modules/@comis/skills/dist/builtin/platform/unified-session-tool.js +1 -1
  198. package/node_modules/@comis/skills/dist/builtin/platform/whatsapp-action-tool.d.ts +2 -1
  199. package/node_modules/@comis/skills/dist/builtin/platform/whatsapp-action-tool.js +1 -1
  200. package/node_modules/@comis/skills/dist/builtin/process-tool.d.ts +6 -5
  201. package/node_modules/@comis/skills/dist/builtin/process-tool.js +1 -1
  202. package/node_modules/@comis/skills/dist/builtin/web-fetch-tool.d.ts +5 -4
  203. package/node_modules/@comis/skills/dist/builtin/web-fetch-tool.js +1 -1
  204. package/node_modules/@comis/skills/dist/builtin/web-search-tool.d.ts +9 -8
  205. package/node_modules/@comis/skills/dist/builtin/web-search-tool.js +1 -1
  206. package/node_modules/@comis/skills/package.json +1 -1
  207. package/node_modules/@comis/web/dist/assets/{agent-detail-DqL6Artv.js → agent-detail-71BSbSfD.js} +1 -1
  208. package/node_modules/@comis/web/dist/assets/{agent-editor-CNM_h94Y.js → agent-editor-CTSDZhwT.js} +1 -1
  209. package/node_modules/@comis/web/dist/assets/{agent-list-Dbh-xD_F.js → agent-list-BEhni2ea.js} +1 -1
  210. package/node_modules/@comis/web/dist/assets/{billing-view-C1DmtyzK.js → billing-view-DVP1IvVs.js} +1 -1
  211. package/node_modules/@comis/web/dist/assets/{channel-detail-CtCH22N1.js → channel-detail-N_YK74xC.js} +1 -1
  212. package/node_modules/@comis/web/dist/assets/{channel-list-C7xXn-60.js → channel-list-DRk6ZJaF.js} +1 -1
  213. package/node_modules/@comis/web/dist/assets/{chat-console-C51pjFwk.js → chat-console-Dm-GtSf9.js} +1 -1
  214. package/node_modules/@comis/web/dist/assets/{config-editor-BLArYRB7.js → config-editor-CIferYX6.js} +1 -1
  215. package/node_modules/@comis/web/dist/assets/{context-dag-browser-fuyMinNI.js → context-dag-browser-CL84rXXM.js} +1 -1
  216. package/node_modules/@comis/web/dist/assets/{context-engine-Bngf2bH0.js → context-engine-B1HOTEZv.js} +1 -1
  217. package/node_modules/@comis/web/dist/assets/{delivery-view-C80hucxX.js → delivery-view-Y6JKYVFw.js} +1 -1
  218. package/node_modules/@comis/web/dist/assets/{diagnostics-view-Cl4VbHZ6.js → diagnostics-view-DWV1UQjz.js} +1 -1
  219. package/node_modules/@comis/web/dist/assets/{ic-chat-message-ByFUoMm6.js → ic-chat-message-DfSERzzg.js} +1 -1
  220. package/node_modules/@comis/web/dist/assets/{ic-connection-dot-C4nDHgY2.js → ic-connection-dot-CXyhlJup.js} +1 -1
  221. package/node_modules/@comis/web/dist/assets/{ic-tool-call-Bh5kq-yY.js → ic-tool-call-DNmwTjek.js} +1 -1
  222. package/node_modules/@comis/web/dist/assets/{index-BBkuC-EU.js → index-CBr0Tm9_.js} +2 -2
  223. package/node_modules/@comis/web/dist/assets/{mcp-management-DB-phOo7.js → mcp-management-BaH2-vox.js} +1 -1
  224. package/node_modules/@comis/web/dist/assets/{media-config-CRqZ1ZUH.js → media-config-CZLshJoN.js} +1 -1
  225. package/node_modules/@comis/web/dist/assets/{media-test-C9vE20Oy.js → media-test-C9NUWgo_.js} +1 -1
  226. package/node_modules/@comis/web/dist/assets/{memory-inspector-CeqfnxMZ.js → memory-inspector-D_fmTcRN.js} +1 -1
  227. package/node_modules/@comis/web/dist/assets/{message-center-Daup7Mof.js → message-center-BBFlNCZn.js} +1 -1
  228. package/node_modules/@comis/web/dist/assets/{models-DLYnEU8E.js → models-BytGLm99.js} +1 -1
  229. package/node_modules/@comis/web/dist/assets/{observe-view-BTSt_PO5.js → observe-view-VXtHqaqq.js} +1 -1
  230. package/node_modules/@comis/web/dist/assets/{pipeline-builder-DknfzyLt.js → pipeline-builder-CfXczlfJ.js} +1 -1
  231. package/node_modules/@comis/web/dist/assets/{pipeline-history-JnHZdeU_.js → pipeline-history-CPmXFnbe.js} +1 -1
  232. package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-Dg4knsEb.js → pipeline-history-detail-DcueTMs9.js} +1 -1
  233. package/node_modules/@comis/web/dist/assets/{pipeline-list-AEnibjsp.js → pipeline-list-B-xG5WZh.js} +1 -1
  234. package/node_modules/@comis/web/dist/assets/{pipeline-monitor-DG7RbIOO.js → pipeline-monitor-pnIOYaSY.js} +1 -1
  235. package/node_modules/@comis/web/dist/assets/{scheduler-uL1fYKAT.js → scheduler-BtUIFHhA.js} +1 -1
  236. package/node_modules/@comis/web/dist/assets/{security-C3DywRLH.js → security-C8mWRq2y.js} +1 -1
  237. package/node_modules/@comis/web/dist/assets/{session-detail-BtqCNWXV.js → session-detail-DgdkO5ka.js} +1 -1
  238. package/node_modules/@comis/web/dist/assets/{session-list-CJXWa2XT.js → session-list-DcylcfTn.js} +1 -1
  239. package/node_modules/@comis/web/dist/assets/{setup-wizard-ywn7oJvu.js → setup-wizard-BP5yjsuL.js} +75 -39
  240. package/node_modules/@comis/web/dist/assets/{skills-DX0KYnWD.js → skills-DXt1bX8Z.js} +1 -1
  241. package/node_modules/@comis/web/dist/assets/{subagents-B8p5YJEB.js → subagents-C7YbUHXY.js} +1 -1
  242. package/node_modules/@comis/web/dist/assets/{workspace-manager-CgzNIrw1.js → workspace-manager-DP6pW4wa.js} +1 -1
  243. package/node_modules/@comis/web/dist/index.html +1 -1
  244. package/node_modules/@comis/web/package.json +1 -1
  245. package/npm-shrinkwrap.json +6126 -0
  246. package/package.json +74 -74
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chat-console-C51pjFwk.js","assets/decorate-BvWYovGE.js","assets/ic-chat-message-ByFUoMm6.js","assets/directive-BOYXJ-K-.js","assets/ic-icon-BGNCCPpZ.js","assets/ic-budget-segment-bar-zLsMzjDO.js","assets/ic-relative-time-B3UAnTqg.js","assets/ic-tag-CvMVQFRR.js","assets/ic-tool-call-Bh5kq-yY.js","assets/ic-empty-state-CM3Wbj2f.js","assets/ic-search-input-B02AGw1i.js","assets/session-key-parser-Dkqcj2Ss.js","assets/memory-inspector-CeqfnxMZ.js","assets/ic-data-table-CKIvr-ag.js","assets/ic-confirm-dialog-DGlPbV1T.js","assets/ic-detail-panel-DiCe4hLr.js","assets/agent-list-Dbh-xD_F.js","assets/agent-detail-DqL6Artv.js","assets/ic-breadcrumb-DqN6G3gc.js","assets/agent-editor-CNM_h94Y.js","assets/ic-array-editor-BLoEyeLS.js","assets/workspace-manager-CgzNIrw1.js","assets/skills-DX0KYnWD.js","assets/ic-tabs-yBjkWKJH.js","assets/mcp-management-DB-phOo7.js","assets/models-DLYnEU8E.js","assets/ic-connection-dot-C4nDHgY2.js","assets/channel-list-C7xXn-60.js","assets/channel-detail-CtCH22N1.js","assets/message-center-Daup7Mof.js","assets/scheduler-uL1fYKAT.js","assets/session-list-CJXWa2XT.js","assets/session-detail-BtqCNWXV.js","assets/ic-layer-waterfall-WkaFyu-l.js","assets/observe-view-BTSt_PO5.js","assets/observability-types-D0tkwElU.js","assets/ic-delivery-row-B3YwjjuM.js","assets/context-engine-Bngf2bH0.js","assets/billing-view-C1DmtyzK.js","assets/ic-time-range-picker-DXbYeBmY.js","assets/delivery-view-C80hucxX.js","assets/diagnostics-view-Cl4VbHZ6.js","assets/subagents-B8p5YJEB.js","assets/security-C3DywRLH.js","assets/ic-select-BqfZISjw.js","assets/approvals-C-K6hN2U.js","assets/config-editor-BLArYRB7.js","assets/setup-wizard-ywn7oJvu.js","assets/pipeline-list-AEnibjsp.js","assets/extract-variables-B7-Doo7l.js","assets/pipeline-builder-DknfzyLt.js","assets/ic-graph-canvas-ByRjij68.js","assets/pipeline-monitor-DG7RbIOO.js","assets/pipeline-history-JnHZdeU_.js","assets/pipeline-history-detail-Dg4knsEb.js","assets/context-dag-browser-fuyMinNI.js","assets/media-test-C9vE20Oy.js","assets/media-config-CRqZ1ZUH.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chat-console-Dm-GtSf9.js","assets/decorate-BvWYovGE.js","assets/ic-chat-message-DfSERzzg.js","assets/directive-BOYXJ-K-.js","assets/ic-icon-BGNCCPpZ.js","assets/ic-budget-segment-bar-zLsMzjDO.js","assets/ic-relative-time-B3UAnTqg.js","assets/ic-tag-CvMVQFRR.js","assets/ic-tool-call-DNmwTjek.js","assets/ic-empty-state-CM3Wbj2f.js","assets/ic-search-input-B02AGw1i.js","assets/session-key-parser-Dkqcj2Ss.js","assets/memory-inspector-D_fmTcRN.js","assets/ic-data-table-CKIvr-ag.js","assets/ic-confirm-dialog-DGlPbV1T.js","assets/ic-detail-panel-DiCe4hLr.js","assets/agent-list-BEhni2ea.js","assets/agent-detail-71BSbSfD.js","assets/ic-breadcrumb-DqN6G3gc.js","assets/agent-editor-CTSDZhwT.js","assets/ic-array-editor-BLoEyeLS.js","assets/workspace-manager-DP6pW4wa.js","assets/skills-DXt1bX8Z.js","assets/ic-tabs-yBjkWKJH.js","assets/mcp-management-BaH2-vox.js","assets/models-BytGLm99.js","assets/ic-connection-dot-CXyhlJup.js","assets/channel-list-DRk6ZJaF.js","assets/channel-detail-N_YK74xC.js","assets/message-center-BBFlNCZn.js","assets/scheduler-BtUIFHhA.js","assets/session-list-DcylcfTn.js","assets/session-detail-DgdkO5ka.js","assets/ic-layer-waterfall-WkaFyu-l.js","assets/observe-view-VXtHqaqq.js","assets/observability-types-D0tkwElU.js","assets/ic-delivery-row-B3YwjjuM.js","assets/context-engine-B1HOTEZv.js","assets/billing-view-DVP1IvVs.js","assets/ic-time-range-picker-DXbYeBmY.js","assets/delivery-view-Y6JKYVFw.js","assets/diagnostics-view-DWV1UQjz.js","assets/subagents-C7YbUHXY.js","assets/security-C8mWRq2y.js","assets/ic-select-BqfZISjw.js","assets/approvals-C-K6hN2U.js","assets/config-editor-CIferYX6.js","assets/setup-wizard-BP5yjsuL.js","assets/pipeline-list-B-xG5WZh.js","assets/extract-variables-B7-Doo7l.js","assets/pipeline-builder-CfXczlfJ.js","assets/ic-graph-canvas-ByRjij68.js","assets/pipeline-monitor-pnIOYaSY.js","assets/pipeline-history-CPmXFnbe.js","assets/pipeline-history-detail-DcueTMs9.js","assets/context-dag-browser-CL84rXXM.js","assets/media-test-C9NUWgo_.js","assets/media-config-CZLshJoN.js"])))=>i.map(i=>d[i]);
2
2
  import{c as e,f as t,h as n,i as r,l as i,m as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./decorate-BvWYovGE.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function f(e,t,n){let r={Authorization:`Bearer ${t}`,"Content-Type":`application/json`};async function i(t,n){let i=`${e}${t}`,a=await fetch(i,{...n,headers:{...r,...n?.headers}});if(!a.ok){let e=await a.text(),t=(e.length>200?e.slice(0,200)+`...`:e).replace(/https?:\/\/[^\s"')]+/g,`[URL]`).replace(/[A-Za-z0-9_-]{20,}/g,`[REDACTED]`);throw Error(`Request failed (${a.status}): ${t}`)}return a.json()}async function a(t,n){let i=`${e}${t}`,a=await fetch(i,{...n,headers:{...r,...n?.headers}});if(!a.ok){let e=await a.text(),t=(e.length>200?e.slice(0,200)+`...`:e).replace(/https?:\/\/[^\s"')]+/g,`[URL]`).replace(/[A-Za-z0-9_-]{20,}/g,`[REDACTED]`);throw Error(`Request failed (${a.status}): ${t}`)}return a.text()}return{async getAgents(){let e=await i(`/api/agents`),t=e.agents??e.routing?.agents??[];return Array.isArray(t)?t:Object.entries(e).map(([e,t])=>({id:e,provider:t.provider??`unknown`,model:t.model??`unknown`,status:`active`}))},async getChannels(){let e=await i(`/api/channels`),t=e.channels??[];return Array.isArray(t)?t:Object.entries(e).map(([e,t])=>({type:t.type??e,name:e,enabled:t.enabled??!1,status:t.enabled?`healthy`:`disconnected`}))},async getActivity(e=50){return(await i(`/api/activity?limit=${e}`)).entries??[]},async searchMemory(e,t=10){return(await i(`/api/memory/search?q=${encodeURIComponent(e)}&limit=${t}`)).results??[]},async getMemoryStats(){return i(`/api/memory/stats`)},async chat(e,t,n){return i(`/api/chat`,{method:`POST`,body:JSON.stringify({message:e,agentId:t,sessionKey:n})})},async getChatHistory(){return(await i(`/api/chat/history`)).messages??[]},async health(){return(await fetch(`${e}/api/health`)).json()},subscribeEvents(n){let r=`${e}/api/events?token=${encodeURIComponent(t)}`,i=new EventSource(r);i.onmessage=e=>{try{n(`message`,JSON.parse(e.data))}catch{n(`message`,e.data)}};for(let e of[`message:received`,`message:sent`,`message:streaming`,`session:created`,`session:expired`,`audit:event`,`skill:executed`,`scheduler:job_completed`,`scheduler:heartbeat_check`,`system:error`,`ping`])i.addEventListener(e,(t=>{try{n(e,t.data?JSON.parse(t.data):{})}catch{n(e,t.data)}}));return i.onerror=()=>{n(`error`,{message:`SSE connection error`})},()=>{i.close()}},async browseMemory(e){if(n)return n(`memory.browse`,e);let t=new URLSearchParams;e.offset!==void 0&&t.set(`offset`,String(e.offset)),e.limit!==void 0&&t.set(`limit`,String(e.limit)),e.type&&t.set(`type`,e.type),e.trust&&t.set(`trust`,e.trust),e.agentId&&t.set(`agentId`,e.agentId),e.from!==void 0&&t.set(`from`,String(e.from)),e.to!==void 0&&t.set(`to`,String(e.to));let r=t.toString();return i(`/api/memory/browse${r?`?${r}`:``}`)},async deleteMemory(e){if(n){await n(`memory.delete`,{id:e});return}await i(`/api/memory/${encodeURIComponent(e)}`,{method:`DELETE`})},async deleteMemoryBulk(e){return n?n(`memory.delete`,{ids:e}):i(`/api/memory/bulk-delete`,{method:`POST`,body:JSON.stringify({ids:e})})},async exportMemory(e){return n?n(`memory.export`,e?{ids:e}:{}):a(`/api/memory/export`,{method:`POST`,body:JSON.stringify({ids:e})})},async listSessions(e){if(n)return((await n(`session.list`,e??{})).sessions??[]).map(e=>{let t=String(e.sessionKey??e.key??``),n=`unknown`,r=t.split(`:`);return r[0]===`agent`&&r.length>=3&&(n=r[1]??`unknown`),{key:t,agentId:String(e.agentId??n),channelType:String(e.kind??e.channelType??`unknown`),messageCount:Number(e.messageCount??0),totalTokens:Number(e.totalTokens??0),inputTokens:Number(e.inputTokens??0),outputTokens:Number(e.outputTokens??0),toolCalls:Number(e.toolCalls??0),compactions:Number(e.compactions??0),resetCount:Number(e.resetCount??0),createdAt:Number(e.createdAt??Date.now()),lastActiveAt:Number(e.updatedAt??e.lastActiveAt??Date.now())}});let t=new URLSearchParams;e?.agentId&&t.set(`agentId`,e.agentId),e?.channelType&&t.set(`channelType`,e.channelType),e?.search&&t.set(`search`,e.search);let r=t.toString();return i(`/api/sessions${r?`?${r}`:``}`)},async getSessionDetail(e){return n?n(`session.history`,{session_key:e}):i(`/api/sessions/${encodeURIComponent(e)}`)},async resetSession(e){if(n){await n(`session.reset`,{session_key:e});return}await i(`/api/sessions/${encodeURIComponent(e)}/reset`,{method:`POST`})},async compactSession(e){if(n){await n(`session.compact`,{session_key:e});return}await i(`/api/sessions/${encodeURIComponent(e)}/compact`,{method:`POST`})},async deleteSession(e){if(n){await n(`session.delete`,{session_key:e});return}await i(`/api/sessions/${encodeURIComponent(e)}`,{method:`DELETE`})},async exportSession(e){return n?n(`session.export`,{session_key:e}):a(`/api/sessions/${encodeURIComponent(e)}/export`)},async resetSessionsBulk(e){return n?n(`session.reset`,{keys:e}):i(`/api/sessions/bulk-reset`,{method:`POST`,body:JSON.stringify({keys:e})})},async exportSessionsBulk(e){return n?n(`session.export`,{keys:e}):a(`/api/sessions/bulk-export`,{method:`POST`,body:JSON.stringify({keys:e})})},async deleteSessionsBulk(e){return n?n(`session.delete`,{keys:e}):i(`/api/sessions/bulk-delete`,{method:`POST`,body:JSON.stringify({keys:e})})}}}var p=[{pattern:`dashboard`,view:`ic-dashboard`},{pattern:`agents`,view:`ic-agent-list`},{pattern:`agents/:id`,view:`ic-agent-detail`},{pattern:`agents/:id/edit`,view:`ic-agent-editor`},{pattern:`agents/:id/workspace`,view:`ic-workspace-manager`},{pattern:`channels`,view:`ic-channel-list`},{pattern:`channels/:type`,view:`ic-channel-detail`},{pattern:`messages`,view:`ic-message-center`},{pattern:`messages/:type`,view:`ic-message-center`},{pattern:`skills`,view:`ic-skills-view`},{pattern:`mcp`,view:`ic-mcp-management`},{pattern:`chat`,view:`ic-chat-console`},{pattern:`chat/:sessionKey`,view:`ic-chat-console`},{pattern:`memory`,view:`ic-memory-inspector`},{pattern:`sessions`,view:`ic-session-list-view`},{pattern:`sessions/:key`,view:`ic-session-detail`},{pattern:`scheduler`,view:`ic-scheduler-view`},{pattern:`scheduler/:jobId`,view:`ic-scheduler-view`},{pattern:`models`,view:`ic-models-view`},{pattern:`observe/overview`,view:`ic-observe-dashboard`},{pattern:`observe/context`,view:`ic-context-engine-view`},{pattern:`observe/billing`,view:`ic-billing-view`},{pattern:`observe/delivery`,view:`ic-delivery-view`},{pattern:`observe/diagnostics`,view:`ic-diagnostics-view`},{pattern:`context`,view:`ic-context-dag-browser`},{pattern:`subagents`,view:`ic-subagents-view`},{pattern:`media`,view:`ic-media-test-view`},{pattern:`media/config`,view:`ic-media-config-view`},{pattern:`security`,view:`ic-security-view`},{pattern:`approvals`,view:`ic-approvals-view`},{pattern:`config`,view:`ic-config-editor`},{pattern:`setup`,view:`ic-setup-wizard`},{pattern:`pipelines`,view:`ic-pipeline-list`},{pattern:`pipelines/new`,view:`ic-pipeline-builder`},{pattern:`pipelines/history`,view:`ic-pipeline-history`},{pattern:`pipelines/history/:graphId`,view:`ic-pipeline-history-detail`},{pattern:`pipelines/:graphId`,view:`ic-pipeline-monitor`},{pattern:`pipelines/:graphId/edit`,view:`ic-pipeline-builder`}];function m(){return p.map(e=>{let t=e.pattern.split(`/`);return{pattern:e.pattern,view:e.view,segments:t,segmentCount:t.length}}).sort((e,t)=>t.segmentCount-e.segmentCount)}var h={view:`ic-dashboard`,route:`dashboard`,params:{},query:{}};function g(e,t){let n=e.split(`/`);for(let e of t){if(n.length!==e.segmentCount)continue;let t={},r=!0;for(let i=0;i<e.segments.length;i++){let a=e.segments[i],o=n[i];if(a.startsWith(`:`))t[a.slice(1)]=o;else if(a!==o){r=!1;break}}if(r)return{view:e.view,route:e.pattern,params:t,query:{}}}return null}var _=[{from:`observe`,to:`observe/overview`}];function v(e,t=`dashboard`){let n=m();function r(){let e=window.location.hash.replace(/^#\/?/,``);if(!e)return{...h};let t=e.indexOf(`?`),r=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):``,a={};if(i)for(let e of i.split(`&`)){let t=e.indexOf(`=`);if(t>=0){let n=decodeURIComponent(e.slice(0,t)),r=decodeURIComponent(e.slice(t+1));n&&(a[n]=r)}else e&&(a[decodeURIComponent(e)]=``)}for(let e of _)if(r===e.from){let t=i?`#/${e.to}?${i}`:`#/${e.to}`;history.replaceState(null,``,t);let r=g(e.to,n);return r?{...r,query:a}:{...h,query:a}}let o=g(r,n);return o?{...o,query:a}:{...h,query:a}}function i(){e(r())}return{navigate(e){window.location.hash=`#/${e}`},current(){return r()},start(){window.addEventListener(`hashchange`,i),i()},stop(){window.removeEventListener(`hashchange`,i)},setQuery(e){let t=r(),n={...t.query,...e},i=Object.entries(n).filter(([,e])=>e!==``).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`),a=i?`#/${t.route}?${i}`:`#/${t.route}`;history.replaceState(null,``,a)}}}var y=3e4,ee=3e4,te=1e4,ne=1e3,re=3e4,ie=10;function b(){let e=null,t=`disconnected`,n=1,r=0,i=null,a=null,o=null,s=``,c=``,l=!1,u=new Map,d=new Set,f=new Set;function p(e){if(t!==e){t=e;for(let t of d)t(e)}}function m(){a!==null&&(clearInterval(a),a=null),o!==null&&(clearTimeout(o),o=null)}function h(){i!==null&&(clearTimeout(i),i=null)}function g(e){for(let[t,n]of u)clearTimeout(n.timer),n.reject(Error(e)),u.delete(t)}function _(){m(),a=setInterval(()=>{if(e===null||e.readyState!==globalThis.WebSocket.OPEN)return;let t=n++;e.send(JSON.stringify({jsonrpc:`2.0`,method:`system.ping`,id:t})),o=setTimeout(()=>{u.delete(t),e!==null&&e.close()},te),u.set(t,{resolve:()=>{o!==null&&(clearTimeout(o),o=null)},reject:()=>{o!==null&&(clearTimeout(o),o=null)},timer:setTimeout(()=>{u.delete(t)},y)})},ee)}function v(){if(l)return;if(r>=ie){p(`disconnected`);return}p(`reconnecting`);let e=Math.min(ne*2**r,re);r++,i=setTimeout(()=>{b(s,c)},e)}function b(t,n){let i=`${t}?token=${encodeURIComponent(n)}`;e=new globalThis.WebSocket(i),e.onopen=()=>{r=0,p(`connected`),_()},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if(!(t.method===`heartbeat`&&t.id==null)){if(t.method&&t.id==null){console.debug(`[rpc] notification received:`,t.method);for(let e of f)try{e(t.method,t.params)}catch(e){console.warn(`[rpc] notification handler error:`,e)}return}if(t.id!=null){let e=u.get(t.id);e&&(clearTimeout(e.timer),u.delete(t.id),t.error?e.reject(Error(`RPC error (${t.error.code}): ${t.error.message}`)):e.resolve(t.result))}}},e.onclose=t=>{if(m(),e=null,t.code>=4e3&&t.code<5e3){g(`Connection rejected: `+(t.reason||`auth error`)),p(`disconnected`);return}l||v()},e.onerror=()=>{}}return{get status(){return t},connect(e,t){l=!1,s=e,c=t,r=0,b(e,t)},disconnect(){l=!0,h(),m(),g(`Client disconnected`),p(`disconnected`),e!==null&&(e.close(),e=null)},call(t,r){return new Promise((i,a)=>{if(e===null||e.readyState!==globalThis.WebSocket.OPEN){a(Error(`Not connected`));return}let o=n++,s=setTimeout(()=>{u.delete(o),a(Error(`RPC request timed out after ${y}ms`))},y);u.set(o,{resolve:i,reject:a,timer:s});let c=JSON.stringify({jsonrpc:`2.0`,method:t,...r===void 0?{}:{params:r},id:o});try{e.send(c)}catch(e){clearTimeout(s),u.delete(o),a(Error(`Send failed: `+(e instanceof Error?e.message:String(e))))}})},onStatusChange(e){return d.add(e),()=>{d.delete(e)}},onNotification(e){return f.add(e),()=>{f.delete(e)}}}}function ae(){let e={connectionStatus:`disconnected`,pendingApprovals:0,errorCount:0,agentCount:0,channelCount:0,sessionCount:0,systemHealth:null,activeAgents:[],activeChannels:[]},t=new Set;function n(){for(let e of t)e()}return{get connectionStatus(){return e.connectionStatus},get pendingApprovals(){return e.pendingApprovals},get errorCount(){return e.errorCount},get agentCount(){return e.agentCount},get channelCount(){return e.channelCount},get sessionCount(){return e.sessionCount},get systemHealth(){return e.systemHealth},get activeAgents(){return e.activeAgents},get activeChannels(){return e.activeChannels},subscribe(e){return t.add(e),()=>{t.delete(e)}},getSnapshot(){return Object.freeze({...e})},update(t){e={...e,...t},n()}}}var oe=`message:received.message:sent.message:streaming.session:created.session:expired.audit:event.skill:executed.skill:rejected.observability:metrics.observability:token_usage.scheduler:job_started.scheduler:job_completed.scheduler:heartbeat_check.scheduler:heartbeat_alert.scheduler:heartbeat_delivered.scheduler:task_extracted.system:error.approval:requested.approval:resolved.graph:started.graph:node_updated.graph:completed.config:patched.diagnostic:channel_health.diagnostic:billing_snapshot.skill:loaded.skill:registry_reset.model:catalog_loaded.observability:reset.channel:registered.channel:deregistered.agent:hot_added.agent:hot_removed.security:injection_detected.security:injection_rate_exceeded.security:memory_tainted.security:warn.secret:accessed.secret:modified.model:fallback_attempt.model:fallback_exhausted.model:auth_cooldown.provider:degraded.provider:recovered.session:sub_agent_spawned.session:sub_agent_completed.session:sub_agent_archived.session:sub_agent_spawn_rejected.session:sub_agent_spawn_started.session:sub_agent_spawn_queued.session:sub_agent_lifecycle_ended.ping`.split(`.`);function se(){let e=null,t=!1,n=new Map;function r(e){if(!e)return{};try{return JSON.parse(e)}catch{return e}}function i(e,t){let r=n.get(e);if(r)for(let e of r)e(t);document.dispatchEvent(new CustomEvent(e,{detail:t}))}return{get connected(){return t},start(n,a){e!==null&&e.close();let o=`${n}/api/events?token=${encodeURIComponent(a)}`;e=new EventSource(o),e.onopen=()=>{t=!0},e.onerror=()=>{t=!1};for(let t of oe)e.addEventListener(t,(e=>{i(t,r(e.data))}));e.onmessage=e=>{i(`message`,r(e.data))}},stop(){e!==null&&(e.close(),e=null),t=!1,n.clear()},addEventListener(e,t){return n.has(e)||n.set(e,new Set),n.get(e).add(t),()=>{let r=n.get(e);r&&(r.delete(t),r.size===0&&n.delete(e))}}}}var ce=class{constructor(e,t,n,r=3e4){this._timer=null,this._host=e,this._rpcClient=t,this._onData=n,this._intervalMs=r,this._host.addController(this)}hostConnected(){this._poll(),this._timer=setInterval(()=>this._poll(),this._intervalMs)}hostDisconnected(){this._timer!==null&&(clearInterval(this._timer),this._timer=null)}async _poll(){try{let[e,t,n]=await Promise.all([this._rpcClient.call(`agent.list`),this._rpcClient.call(`channel.list`),this._rpcClient.call(`session.list`,{})]);this._onData({agents:e.agents.length,channels:t.channels.length,sessions:n.total,agentIds:e.agents,sessionEntries:n.sessions?.slice(0,20)??[]}),this._host.requestUpdate()}catch{}}},x=[{id:`home`,label:`Home`,items:[{route:`dashboard`,label:`Dashboard`,icon:`▣`}]},{id:`operate`,label:`Operate`,items:[{route:`agents`,label:`Agents`,icon:`⬤`,badge:`agentCount`},{route:`channels`,label:`Channels`,icon:`◎`,badge:`channelCount`},{route:`messages`,label:`Messages`,icon:`○`},{route:`chat`,label:`Chat`,icon:`▬`},{route:`sessions`,label:`Sessions`,icon:`◷`,badge:`sessionCount`},{route:`subagents`,label:`Sub-Agents`,icon:`◔`},{route:`pipelines`,label:`Pipelines`,icon:`◈`}]},{id:`observe`,label:`Observe`,items:[{route:`observe`,label:`Overview`,icon:`△`,badge:`errorCount`},{route:`observe/context`,label:`Context Engine`,icon:`◥`},{route:`context`,label:`Context DAG`,icon:`◖`},{route:`observe/billing`,label:`Billing`,icon:`◇`},{route:`observe/delivery`,label:`Delivery`,icon:`▷`},{route:`observe/diagnostics`,label:`Diagnostics`,icon:`□`}]},{id:`configure`,label:`Configure`,items:[{route:`skills`,label:`Skills`,icon:`⚒`},{route:`mcp`,label:`MCP Servers`,icon:`⚖`},{route:`models`,label:`Models`,icon:`⌸`},{route:`memory`,label:`Memory`,icon:`◉`},{route:`scheduler`,label:`Scheduler`,icon:`▨`},{route:`security`,label:`Security`,icon:`☖`},{route:`media`,label:`Media`,icon:`▶`},{route:`approvals`,label:`Approvals`,icon:`✓`,badge:`pendingApprovals`},{route:`config`,label:`Config`,icon:`⚙`}]}],le={route:`setup`,label:`Setup`,icon:`▶`},S=`ic_sidebar_collapsed`,C=class extends i{constructor(...e){super(...e),this.currentRoute=`dashboard`,this.pendingApprovals=0,this.errorCount=0,this.agentCount=0,this.channelCount=0,this.sessionCount=0,this.open=!1,this._collapsed=!1}static{this.styles=[c,o,n`
3
3
  :host {
4
4
  display: block;
@@ -2507,7 +2507,7 @@ import{c as e,f as t,h as n,i as r,l as i,m as a,n as o,o as s,r as c,s as l,t a
2507
2507
  ></ic-activity-feed>
2508
2508
  </div>
2509
2509
  </div>
2510
- `}};u([l({attribute:!1})],Y.prototype,`apiClient`,void 0),u([l({attribute:!1})],Y.prototype,`rpcClient`,void 0),u([l({attribute:!1})],Y.prototype,`eventDispatcher`,void 0),u([s()],Y.prototype,`_loadState`,void 0),u([s()],Y.prototype,`_error`,void 0),u([s()],Y.prototype,`_agents`,void 0),u([s()],Y.prototype,`_channels`,void 0),u([s()],Y.prototype,`_activity`,void 0),u([s()],Y.prototype,`_systemHealth`,void 0),u([s()],Y.prototype,`_deliveryStats`,void 0),u([s()],Y.prototype,`_messagesToday`,void 0),u([s()],Y.prototype,`_tokenUsageToday`,void 0),u([s()],Y.prototype,`_sessionCount`,void 0),u([s()],Y.prototype,`_errorCount`,void 0),u([s()],Y.prototype,`_totalCost`,void 0),u([s()],Y.prototype,`_prevMessages`,void 0),u([s()],Y.prototype,`_prevTokens`,void 0),u([s()],Y.prototype,`_prevCost`,void 0),u([s()],Y.prototype,`_mcpStatus`,void 0),u([s()],Y.prototype,`_contextSummary`,void 0),u([s()],Y.prototype,`_tokenSparklineData`,void 0),u([s()],Y.prototype,`_costSparklineData`,void 0),u([s()],Y.prototype,`_agentBilling`,void 0),Y=u([e(`ic-dashboard`)],Y);var Me=`modulepreload`,Ne=function(e){return`/app/`+e},X={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ne(t,n),t in X)return;X[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Me,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Pe={"ic-chat-console":()=>Z(()=>import(`./chat-console-C51pjFwk.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),"ic-memory-inspector":()=>Z(()=>import(`./memory-inspector-CeqfnxMZ.js`),__vite__mapDeps([12,1,13,6,7,14,10,15])),"ic-agent-list":()=>Z(()=>import(`./agent-list-Dbh-xD_F.js`),__vite__mapDeps([16,1,13,7,4,14,9,10])),"ic-agent-detail":()=>Z(()=>import(`./agent-detail-DqL6Artv.js`),__vite__mapDeps([17,1,6,7,14,18])),"ic-agent-editor":()=>Z(()=>import(`./agent-editor-CNM_h94Y.js`),__vite__mapDeps([19,1,7,20,18])),"ic-workspace-manager":()=>Z(()=>import(`./workspace-manager-CgzNIrw1.js`),__vite__mapDeps([21,1,6,7,14,9,4,18])),"ic-skills-view":()=>Z(()=>import(`./skills-DX0KYnWD.js`),__vite__mapDeps([22,1,7,14,9,4,10,23])),"ic-mcp-management":()=>Z(()=>import(`./mcp-management-DB-phOo7.js`),__vite__mapDeps([24,1,6,7,14,9,4])),"ic-models-view":()=>Z(()=>import(`./models-DLYnEU8E.js`),__vite__mapDeps([25,1,7,26,4,9,10,23])),"ic-channel-list":()=>Z(()=>import(`./channel-list-C7xXn-60.js`),__vite__mapDeps([27,1,14,9,4])),"ic-channel-detail":()=>Z(()=>import(`./channel-detail-CtCH22N1.js`),__vite__mapDeps([28,1,6,7,26,4,9,18,23])),"ic-message-center":()=>Z(()=>import(`./message-center-Daup7Mof.js`),__vite__mapDeps([29,1,6,14,9,4,18])),"ic-scheduler-view":()=>Z(()=>import(`./scheduler-uL1fYKAT.js`),__vite__mapDeps([30,1,6,7,4,9,23])),"ic-session-list-view":()=>Z(()=>import(`./session-list-CJXWa2XT.js`),__vite__mapDeps([31,1,13,6,7,14,9,4,10,11])),"ic-session-detail":()=>Z(()=>import(`./session-detail-BtqCNWXV.js`),__vite__mapDeps([32,1,2,3,4,5,33,6,7,8,14,9,18,11])),"ic-observe-dashboard":()=>Z(()=>import(`./observe-view-BTSt_PO5.js`),__vite__mapDeps([34,1,35,6,7,36,9,4,23])),"ic-context-engine-view":()=>Z(()=>import(`./context-engine-Bngf2bH0.js`),__vite__mapDeps([37,1,5,33,6,9,4])),"ic-billing-view":()=>Z(()=>import(`./billing-view-C1DmtyzK.js`),__vite__mapDeps([38,1,39,9,4])),"ic-delivery-view":()=>Z(()=>import(`./delivery-view-C80hucxX.js`),__vite__mapDeps([40,1,6,39,36,7,9,4,15])),"ic-diagnostics-view":()=>Z(()=>import(`./diagnostics-view-Cl4VbHZ6.js`),__vite__mapDeps([41,1,35,6,7,39,9,4])),"ic-subagents-view":()=>Z(()=>import(`./subagents-B8p5YJEB.js`),__vite__mapDeps([42,1,6,7,14,9,4])),"ic-security-view":()=>Z(()=>import(`./security-C3DywRLH.js`),__vite__mapDeps([43,1,6,7,26,4,9,20,44,23])),"ic-approvals-view":()=>Z(()=>import(`./approvals-C-K6hN2U.js`),__vite__mapDeps([45,1])),"ic-config-editor":()=>Z(()=>import(`./config-editor-BLArYRB7.js`),__vite__mapDeps([46,1,6,7,14,9,4,20,44,23])),"ic-setup-wizard":()=>Z(()=>import(`./setup-wizard-ywn7oJvu.js`),__vite__mapDeps([47,1,4])),"ic-pipeline-list":()=>Z(()=>import(`./pipeline-list-AEnibjsp.js`),__vite__mapDeps([48,1,4,14,9,49,18])),"ic-pipeline-builder":()=>Z(()=>import(`./pipeline-builder-DknfzyLt.js`),__vite__mapDeps([50,1,51,3,14,49,18])),"ic-pipeline-monitor":()=>Z(()=>import(`./pipeline-monitor-DG7RbIOO.js`),__vite__mapDeps([52,1,51,3,14,18])),"ic-pipeline-history":()=>Z(()=>import(`./pipeline-history-JnHZdeU_.js`),__vite__mapDeps([53,1,4,14,9,18])),"ic-pipeline-history-detail":()=>Z(()=>import(`./pipeline-history-detail-Dg4knsEb.js`),__vite__mapDeps([54,1,2,3,4,14,18])),"ic-context-dag-browser":()=>Z(()=>import(`./context-dag-browser-fuyMinNI.js`),__vite__mapDeps([55,1,6,7,9,4,10,15])),"ic-media-test-view":()=>Z(()=>import(`./media-test-C9vE20Oy.js`),__vite__mapDeps([56,1,9,4,23])),"ic-media-config-view":()=>Z(()=>import(`./media-config-CRqZ1ZUH.js`),__vite__mapDeps([57,1]))},Q=`comis_token`,$=class extends i{constructor(...e){super(...e),this._authenticated=!1,this._authError=``,this._currentView=`ic-dashboard`,this._currentRoute=`dashboard`,this._routeParams={},this._connectionStatus=`disconnected`,this._pendingApprovals=0,this._errorCount=0,this._agentCount=0,this._channelCount=0,this._sessionCount=0,this._sidebarOpen=!1,this._viewLoading=!1,this._commandPaletteOpen=!1,this._shortcutsHelpOpen=!1,this._agentList=[],this._sessionList=[],this._loadedViews=new Set,this._pendingGotoKey=null,this._apiClient=null,this._router=null,this._rpcClient=null,this._globalState=null,this._eventDispatcher=null,this._stateUnsubscribe=null,this._approvalUnsub=null,this._approvalResolvedUnsub=null,this._errorUnsub=null,this._pollingController=null,this._token=``,this._boundKeyHandler=this._handleGlobalKeydown.bind(this),this._gotoWaiting=!1}static{this.styles=n`
2510
+ `}};u([l({attribute:!1})],Y.prototype,`apiClient`,void 0),u([l({attribute:!1})],Y.prototype,`rpcClient`,void 0),u([l({attribute:!1})],Y.prototype,`eventDispatcher`,void 0),u([s()],Y.prototype,`_loadState`,void 0),u([s()],Y.prototype,`_error`,void 0),u([s()],Y.prototype,`_agents`,void 0),u([s()],Y.prototype,`_channels`,void 0),u([s()],Y.prototype,`_activity`,void 0),u([s()],Y.prototype,`_systemHealth`,void 0),u([s()],Y.prototype,`_deliveryStats`,void 0),u([s()],Y.prototype,`_messagesToday`,void 0),u([s()],Y.prototype,`_tokenUsageToday`,void 0),u([s()],Y.prototype,`_sessionCount`,void 0),u([s()],Y.prototype,`_errorCount`,void 0),u([s()],Y.prototype,`_totalCost`,void 0),u([s()],Y.prototype,`_prevMessages`,void 0),u([s()],Y.prototype,`_prevTokens`,void 0),u([s()],Y.prototype,`_prevCost`,void 0),u([s()],Y.prototype,`_mcpStatus`,void 0),u([s()],Y.prototype,`_contextSummary`,void 0),u([s()],Y.prototype,`_tokenSparklineData`,void 0),u([s()],Y.prototype,`_costSparklineData`,void 0),u([s()],Y.prototype,`_agentBilling`,void 0),Y=u([e(`ic-dashboard`)],Y);var Me=`modulepreload`,Ne=function(e){return`/app/`+e},X={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ne(t,n),t in X)return;X[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Me,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Pe={"ic-chat-console":()=>Z(()=>import(`./chat-console-Dm-GtSf9.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),"ic-memory-inspector":()=>Z(()=>import(`./memory-inspector-D_fmTcRN.js`),__vite__mapDeps([12,1,13,6,7,14,10,15])),"ic-agent-list":()=>Z(()=>import(`./agent-list-BEhni2ea.js`),__vite__mapDeps([16,1,13,7,4,14,9,10])),"ic-agent-detail":()=>Z(()=>import(`./agent-detail-71BSbSfD.js`),__vite__mapDeps([17,1,6,7,14,18])),"ic-agent-editor":()=>Z(()=>import(`./agent-editor-CTSDZhwT.js`),__vite__mapDeps([19,1,7,20,18])),"ic-workspace-manager":()=>Z(()=>import(`./workspace-manager-DP6pW4wa.js`),__vite__mapDeps([21,1,6,7,14,9,4,18])),"ic-skills-view":()=>Z(()=>import(`./skills-DXt1bX8Z.js`),__vite__mapDeps([22,1,7,14,9,4,10,23])),"ic-mcp-management":()=>Z(()=>import(`./mcp-management-BaH2-vox.js`),__vite__mapDeps([24,1,6,7,14,9,4])),"ic-models-view":()=>Z(()=>import(`./models-BytGLm99.js`),__vite__mapDeps([25,1,7,26,4,9,10,23])),"ic-channel-list":()=>Z(()=>import(`./channel-list-DRk6ZJaF.js`),__vite__mapDeps([27,1,14,9,4])),"ic-channel-detail":()=>Z(()=>import(`./channel-detail-N_YK74xC.js`),__vite__mapDeps([28,1,6,7,26,4,9,18,23])),"ic-message-center":()=>Z(()=>import(`./message-center-BBFlNCZn.js`),__vite__mapDeps([29,1,6,14,9,4,18])),"ic-scheduler-view":()=>Z(()=>import(`./scheduler-BtUIFHhA.js`),__vite__mapDeps([30,1,6,7,4,9,23])),"ic-session-list-view":()=>Z(()=>import(`./session-list-DcylcfTn.js`),__vite__mapDeps([31,1,13,6,7,14,9,4,10,11])),"ic-session-detail":()=>Z(()=>import(`./session-detail-DgdkO5ka.js`),__vite__mapDeps([32,1,2,3,4,5,33,6,7,8,14,9,18,11])),"ic-observe-dashboard":()=>Z(()=>import(`./observe-view-VXtHqaqq.js`),__vite__mapDeps([34,1,35,6,7,36,9,4,23])),"ic-context-engine-view":()=>Z(()=>import(`./context-engine-B1HOTEZv.js`),__vite__mapDeps([37,1,5,33,6,9,4])),"ic-billing-view":()=>Z(()=>import(`./billing-view-DVP1IvVs.js`),__vite__mapDeps([38,1,39,9,4])),"ic-delivery-view":()=>Z(()=>import(`./delivery-view-Y6JKYVFw.js`),__vite__mapDeps([40,1,6,39,36,7,9,4,15])),"ic-diagnostics-view":()=>Z(()=>import(`./diagnostics-view-DWV1UQjz.js`),__vite__mapDeps([41,1,35,6,7,39,9,4])),"ic-subagents-view":()=>Z(()=>import(`./subagents-C7YbUHXY.js`),__vite__mapDeps([42,1,6,7,14,9,4])),"ic-security-view":()=>Z(()=>import(`./security-C8mWRq2y.js`),__vite__mapDeps([43,1,6,7,26,4,9,20,44,23])),"ic-approvals-view":()=>Z(()=>import(`./approvals-C-K6hN2U.js`),__vite__mapDeps([45,1])),"ic-config-editor":()=>Z(()=>import(`./config-editor-CIferYX6.js`),__vite__mapDeps([46,1,6,7,14,9,4,20,44,23])),"ic-setup-wizard":()=>Z(()=>import(`./setup-wizard-BP5yjsuL.js`),__vite__mapDeps([47,1,4])),"ic-pipeline-list":()=>Z(()=>import(`./pipeline-list-B-xG5WZh.js`),__vite__mapDeps([48,1,4,14,9,49,18])),"ic-pipeline-builder":()=>Z(()=>import(`./pipeline-builder-CfXczlfJ.js`),__vite__mapDeps([50,1,51,3,14,49,18])),"ic-pipeline-monitor":()=>Z(()=>import(`./pipeline-monitor-pnIOYaSY.js`),__vite__mapDeps([52,1,51,3,14,18])),"ic-pipeline-history":()=>Z(()=>import(`./pipeline-history-CPmXFnbe.js`),__vite__mapDeps([53,1,4,14,9,18])),"ic-pipeline-history-detail":()=>Z(()=>import(`./pipeline-history-detail-DcueTMs9.js`),__vite__mapDeps([54,1,2,3,4,14,18])),"ic-context-dag-browser":()=>Z(()=>import(`./context-dag-browser-CL84rXXM.js`),__vite__mapDeps([55,1,6,7,9,4,10,15])),"ic-media-test-view":()=>Z(()=>import(`./media-test-C9NUWgo_.js`),__vite__mapDeps([56,1,9,4,23])),"ic-media-config-view":()=>Z(()=>import(`./media-config-CZLshJoN.js`),__vite__mapDeps([57,1]))},Q=`comis_token`,$=class extends i{constructor(...e){super(...e),this._authenticated=!1,this._authError=``,this._currentView=`ic-dashboard`,this._currentRoute=`dashboard`,this._routeParams={},this._connectionStatus=`disconnected`,this._pendingApprovals=0,this._errorCount=0,this._agentCount=0,this._channelCount=0,this._sessionCount=0,this._sidebarOpen=!1,this._viewLoading=!1,this._commandPaletteOpen=!1,this._shortcutsHelpOpen=!1,this._agentList=[],this._sessionList=[],this._loadedViews=new Set,this._pendingGotoKey=null,this._apiClient=null,this._router=null,this._rpcClient=null,this._globalState=null,this._eventDispatcher=null,this._stateUnsubscribe=null,this._approvalUnsub=null,this._approvalResolvedUnsub=null,this._errorUnsub=null,this._pollingController=null,this._token=``,this._boundKeyHandler=this._handleGlobalKeydown.bind(this),this._gotoWaiting=!1}static{this.styles=n`
2511
2511
  :host {
2512
2512
  display: block;
2513
2513
  min-height: 100vh;
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._servers=[],this._mcpConfig=[],this._expandedServer=null,this._serverDetail=null,this._showAddForm=!1,this._disconnectTarget=null,this._deleteTarget=null,this._detailLoading=!1,this._showInstructions=!1,this._testingServer=null,this._testResult=null,this._newServerName=``,this._newServerTransport=`stdio`,this._newServerCommand=``,this._newServerUrl=``,this._newServerHeaders=``,this._newServerEnv=``,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._servers=[],this._mcpConfig=[],this._expandedServer=null,this._serverDetail=null,this._showAddForm=!1,this._disconnectTarget=null,this._deleteTarget=null,this._detailLoading=!1,this._showInstructions=!1,this._testingServer=null,this._testResult=null,this._newServerName=``,this._newServerTransport=`stdio`,this._newServerCommand=``,this._newServerUrl=``,this._newServerHeaders=``,this._newServerEnv=``,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import"./index-BBkuC-EU.js";var u=class extends r{constructor(...e){super(...e),this._loadState=`loading`,this._providers=null,this._mediaConfig=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import"./index-CBr0Tm9_.js";var u=class extends r{constructor(...e){super(...e),this._loadState=`loading`,this._providers=null,this._mediaConfig=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";var d=[{id:`stt`,label:`STT`},{id:`tts`,label:`TTS`},{id:`vision`,label:`Vision`},{id:`document`,label:`Document`},{id:`video`,label:`Video`},{id:`link`,label:`Link`}],f=25*1024*1024,p=20*1024*1024,m=50*1024*1024;function h(e){let t=new Uint8Array(e),n=32768,r=[];for(let e=0;e<t.length;e+=n)r.push(String.fromCharCode(...t.subarray(e,e+n)));return btoa(r.join(``))}var g=class extends r{constructor(...e){super(...e),this._activeTab=`stt`,this._processing=!1,this._sttResult=null,this._ttsResult=null,this._audioUrl=null,this._ttsText=``,this._ttsVoice=``,this._visionResult=null,this._documentResult=null,this._videoResult=null,this._visionPrompt=``,this._videoPrompt=``,this._linkUrl=``,this._linkResult=null,this._loadState=`loaded`,this._providers=null,this._imagePreviewUrl=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";var d=[{id:`stt`,label:`STT`},{id:`tts`,label:`TTS`},{id:`vision`,label:`Vision`},{id:`document`,label:`Document`},{id:`video`,label:`Video`},{id:`link`,label:`Link`}],f=25*1024*1024,p=20*1024*1024,m=50*1024*1024;function h(e){let t=new Uint8Array(e),n=32768,r=[];for(let e=0;e<t.length;e+=n)r.push(String.fromCharCode(...t.subarray(e,e+n)));return btoa(r.join(``))}var g=class extends r{constructor(...e){super(...e),this._activeTab=`stt`,this._processing=!1,this._sttResult=null,this._ttsResult=null,this._audioUrl=null,this._ttsText=``,this._ttsVoice=``,this._visionResult=null,this._documentResult=null,this._videoResult=null,this._visionPrompt=``,this._videoPrompt=``,this._linkUrl=``,this._linkResult=null,this._loadState=`loaded`,this._providers=null,this._imagePreviewUrl=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-data-table-CKIvr-ag.js";import"./ic-search-input-B02AGw1i.js";import"./ic-detail-panel-DiCe4hLr.js";var u=class extends r{constructor(...e){super(...e),this.entries=[],this.selectable=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-data-table-CKIvr-ag.js";import"./ic-search-input-B02AGw1i.js";import"./ic-detail-panel-DiCe4hLr.js";var u=class extends r{constructor(...e){super(...e),this.entries=[],this.selectable=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=[`👍`,`👎`,`❤️`,`😂`,`😢`,`🤔`,`🔥`,`💯`,`👏`,`🚀`,`👀`,`👋`,`✅`,`❌`,`⭐`,`🎉`,`🙏`,`💪`,`🧠`,`💡`,`👑`,`💎`,`✨`,`🌈`],f={discord:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_slowmode`,label:`Set Slowmode`,needsInput:`seconds`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Threads`,actions:[{action:`threadCreate`,label:`Create Thread`,needsInput:`name`},{action:`threadList`,label:`List Threads`}]},{group:`Info`,actions:[{action:`guild_info`,label:`Guild Info`},{action:`channel_info`,label:`Channel Info`}]}],telegram:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`},{action:`restrict`,label:`Restrict User`,needsInput:`userId`},{action:`promote`,label:`Promote User`,needsInput:`userId`},{action:`demote`,label:`Demote User`,needsInput:`userId`}]},{group:`Chat`,actions:[{action:`set_title`,label:`Set Chat Title`,needsInput:`title`},{action:`set_description`,label:`Set Description`,needsInput:`description`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Info`,actions:[{action:`chat_info`,label:`Chat Info`},{action:`member_count`,label:`Member Count`},{action:`get_admins`,label:`Get Admins`}]}],slack:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_purpose`,label:`Set Purpose`,needsInput:`purpose`},{action:`archive`,label:`Archive Channel`},{action:`unarchive`,label:`Unarchive Channel`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Members`,actions:[{action:`invite`,label:`Invite User`,needsInput:`userId`},{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`members_list`,label:`List Members`}]},{group:`Info`,actions:[{action:`channel_info`,label:`Channel Info`},{action:`bookmark_add`,label:`Add Bookmark`,needsInput:`url`}]}],whatsapp:[{group:`Group`,actions:[{action:`group_info`,label:`Group Info`},{action:`group_update_subject`,label:`Update Subject`,needsInput:`subject`},{action:`group_update_description`,label:`Update Description`,needsInput:`description`},{action:`group_invite_code`,label:`Get Invite Code`}]},{group:`Members`,actions:[{action:`group_participants_add`,label:`Add Participant`,needsInput:`participant`},{action:`group_participants_remove`,label:`Remove Participant`,needsInput:`participant`},{action:`group_promote`,label:`Promote to Admin`,needsInput:`participant`},{action:`group_demote`,label:`Demote from Admin`,needsInput:`participant`}]},{group:`Settings`,actions:[{action:`group_settings`,label:`Group Settings`}]}]},p={discord:`discord.action`,telegram:`telegram.action`,slack:`slack.action`,whatsapp:`whatsapp.action`},m=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.channelType=``,this._loadState=`idle`,this._error=``,this._messages=[],this._effectiveChannel=``,this._capabilities=null,this._channelList=[],this._sendText=``,this._showSendConfirm=!1,this._actionPending=!1,this._botName=``,this._replyToId=``,this._replyText=``,this._showReplyConfirm=!1,this._editingId=``,this._editText=``,this._deleteTargetId=``,this._showDeleteConfirm=!1,this._reactTargetId=``,this._showEmojiPicker=!1,this._attachUrl=``,this._attachType=`file`,this._attachCaption=``,this._showAttachForm=!1,this._chatList=[],this._selectedChatId=``,this._platformActionPending=!1,this._selectedMessageId=``,this._actionResult=``,this._actionInputs={},this._hasLoaded=!1,this._previousChannelType=``,this._boundEmojiOutsideClick=null,this._autoSelectAttempted=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=[`👍`,`👎`,`❤️`,`😂`,`😢`,`🤔`,`🔥`,`💯`,`👏`,`🚀`,`👀`,`👋`,`✅`,`❌`,`⭐`,`🎉`,`🙏`,`💪`,`🧠`,`💡`,`👑`,`💎`,`✨`,`🌈`],f={discord:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_slowmode`,label:`Set Slowmode`,needsInput:`seconds`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Threads`,actions:[{action:`threadCreate`,label:`Create Thread`,needsInput:`name`},{action:`threadList`,label:`List Threads`}]},{group:`Info`,actions:[{action:`guild_info`,label:`Guild Info`},{action:`channel_info`,label:`Channel Info`}]}],telegram:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`},{action:`restrict`,label:`Restrict User`,needsInput:`userId`},{action:`promote`,label:`Promote User`,needsInput:`userId`},{action:`demote`,label:`Demote User`,needsInput:`userId`}]},{group:`Chat`,actions:[{action:`set_title`,label:`Set Chat Title`,needsInput:`title`},{action:`set_description`,label:`Set Description`,needsInput:`description`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Info`,actions:[{action:`chat_info`,label:`Chat Info`},{action:`member_count`,label:`Member Count`},{action:`get_admins`,label:`Get Admins`}]}],slack:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_purpose`,label:`Set Purpose`,needsInput:`purpose`},{action:`archive`,label:`Archive Channel`},{action:`unarchive`,label:`Unarchive Channel`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Members`,actions:[{action:`invite`,label:`Invite User`,needsInput:`userId`},{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`members_list`,label:`List Members`}]},{group:`Info`,actions:[{action:`channel_info`,label:`Channel Info`},{action:`bookmark_add`,label:`Add Bookmark`,needsInput:`url`}]}],whatsapp:[{group:`Group`,actions:[{action:`group_info`,label:`Group Info`},{action:`group_update_subject`,label:`Update Subject`,needsInput:`subject`},{action:`group_update_description`,label:`Update Description`,needsInput:`description`},{action:`group_invite_code`,label:`Get Invite Code`}]},{group:`Members`,actions:[{action:`group_participants_add`,label:`Add Participant`,needsInput:`participant`},{action:`group_participants_remove`,label:`Remove Participant`,needsInput:`participant`},{action:`group_promote`,label:`Promote to Admin`,needsInput:`participant`},{action:`group_demote`,label:`Demote from Admin`,needsInput:`participant`}]},{group:`Settings`,actions:[{action:`group_settings`,label:`Group Settings`}]}]},p={discord:`discord.action`,telegram:`telegram.action`,slack:`slack.action`,whatsapp:`whatsapp.action`},m=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.channelType=``,this._loadState=`idle`,this._error=``,this._messages=[],this._effectiveChannel=``,this._capabilities=null,this._channelList=[],this._sendText=``,this._showSendConfirm=!1,this._actionPending=!1,this._botName=``,this._replyToId=``,this._replyText=``,this._showReplyConfirm=!1,this._editingId=``,this._editText=``,this._deleteTargetId=``,this._showDeleteConfirm=!1,this._reactTargetId=``,this._showEmojiPicker=!1,this._attachUrl=``,this._attachType=`file`,this._attachCaption=``,this._showAttachForm=!1,this._chatList=[],this._selectedChatId=``,this._platformActionPending=!1,this._selectedMessageId=``,this._actionResult=``,this._actionInputs={},this._hasLoaded=!1,this._previousChannelType=``,this._boundEmojiOutsideClick=null,this._autoSelectAttempted=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-search-input-B02AGw1i.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-connection-dot-C4nDHgY2.js";var f=class extends r{constructor(...e){super(...e),this.name=``,this.type=``,this.baseUrl=``,this.enabled=!1,this.testResult=null,this.testing=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-search-input-B02AGw1i.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-connection-dot-CXyhlJup.js";var f=class extends r{constructor(...e){super(...e),this.name=``,this.type=``,this.baseUrl=``,this.enabled=!1,this.testResult=null,this.testing=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{n as u,t as d}from"./observability-types-D0tkwElU.js";import{i as f,t as p}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-delivery-row-B3YwjjuM.js";var m=3e4,h=[{id:`overview`,label:`Overview`},{id:`billing`,label:`Billing`},{id:`delivery`,label:`Delivery`},{id:`channels`,label:`Channels`},{id:`diagnostics`,label:`Diagnostics`}],g=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.initialTab=`overview`,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._activeTab=`overview`,this._error=``,this._requestsToday=0,this._tokensToday=0,this._costToday=0,this._errorsToday=0,this._tokenUsage24h=[],this._billingByProvider=[],this._billingByAgent=[],this._billingTotal=null,this._diagnosticsEvents=[],this._deliveryTraces=[],this._deliveryStats=null,this._channelActivity=[],this._agentHealth=[],this._channelHealth=[],this._resetConfirming=!1,this._resetInput=``,this._deliveryChannelFilter=`all`,this._deliveryStatusFilter=`all`,this._deliveryTimeRange=`1h`,this._expandedTraceId=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{n as u,t as d}from"./observability-types-D0tkwElU.js";import{i as f,t as p}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-delivery-row-B3YwjjuM.js";var m=3e4,h=[{id:`overview`,label:`Overview`},{id:`billing`,label:`Billing`},{id:`delivery`,label:`Delivery`},{id:`channels`,label:`Channels`},{id:`diagnostics`,label:`Diagnostics`}],g=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.initialTab=`overview`,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._activeTab=`overview`,this._error=``,this._requestsToday=0,this._tokensToday=0,this._costToday=0,this._errorsToday=0,this._tokenUsage24h=[],this._billingByProvider=[],this._billingByAgent=[],this._billingTotal=null,this._diagnosticsEvents=[],this._deliveryTraces=[],this._deliveryStats=null,this._channelActivity=[],this._agentHealth=[],this._channelHealth=[],this._resetConfirming=!1,this._resetInput=``,this._deliveryChannelFilter=`all`,this._deliveryStatusFilter=`all`,this._deliveryTimeRange=`1h`,this._expandedTraceId=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import{a as d,i as f,n as p,o as m,r as h,t as g}from"./ic-graph-canvas-ByRjij68.js";import{n as _,t as v}from"./extract-variables-B7-Doo7l.js";var y=50,b={label:`Untitled Pipeline`,onFailure:`fail-fast`};function x(){let e=[],t=[],n={...b},r=new Set,i=null,a={...h},o=null,s=!1,c=[],l=[],u=new Set;function d(){for(let e of u)e()}function f(){return structuredClone({nodes:e,edges:t,settings:n})}function p(){c.push(f()),c.length>y&&c.shift(),l=[]}function m(r){e=structuredClone(r.nodes),t=structuredClone(r.edges),n=structuredClone(r.settings)}return{subscribe(e){return u.add(e),()=>{u.delete(e)}},getSnapshot(){return Object.freeze({nodes:[...e],edges:[...t],settings:{...n},selectedNodeIds:new Set(r),selectedEdgeId:i,viewport:{...a},validationResult:o,isDirty:s,canUndo:c.length>0,canRedo:l.length>0})},addNode(t){p(),e.push(t),s=!0,d()},updateNode(t,n){p(),e=e.map(e=>e.id===t?{...e,...n,id:e.id}:e),s=!0,d()},removeNode(n){p(),e=e.filter(e=>e.id!==n),t=t.filter(e=>e.source!==n&&e.target!==n),s=!0,d()},addEdge(e,n){p();let r={id:`${e}->${n}`,source:e,target:n};t.push(r),s=!0,d()},removeEdge(e){p(),t=t.filter(t=>t.id!==e),s=!0,d()},updateSettings(e){p(),n={...n,...e},s=!0,d()},moveNodes(t){p();for(let{nodeId:n,position:r}of t)e=e.map(e=>e.id===n?{...e,position:r}:e);s=!0,d()},selectNode(e,t=!1){i=null,t?(r=new Set(r),r.add(e)):r=new Set([e]),d()},selectAll(){r=new Set(e.map(e=>e.id)),d()},clearSelection(){r=new Set,i=null,d()},selectEdge(e){i=e,r=new Set,d()},clearEdgeSelection(){i=null,d()},setViewport(e){a={...e},d()},setValidation(e){o=e,d()},undo(){c.length!==0&&(l.push(f()),m(c.pop()),s=!0,d())},redo(){l.length!==0&&(c.push(f()),m(l.pop()),s=!0,d())},markClean(){s=!1,d()},reset(){e=[],t=[],n={...b},r=new Set,i=null,a={...h},o=null,s=!1,c=[],l=[],d()}}}function S(e,t,n){if(t===n)return!0;let r=new Map;for(let t of e){let e=r.get(t.source);e||(e=[],r.set(t.source,e)),e.push(t.target)}let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n);let a=new Set,o=[n];for(;o.length>0;){let e=o.pop();if(e===t)return!0;if(a.has(e))continue;a.add(e);let n=r.get(e);if(n)for(let e of n)a.has(e)||o.push(e)}return!1}var C=class extends r{constructor(...e){super(...e),this.settings={label:`Untitled Pipeline`,onFailure:`fail-fast`},this.hasErrors=!1,this.isDirty=!1,this.validateResult=``,this._validating=!1}static{this.styles=[o,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import{a as d,i as f,n as p,o as m,r as h,t as g}from"./ic-graph-canvas-ByRjij68.js";import{n as _,t as v}from"./extract-variables-B7-Doo7l.js";var y=50,b={label:`Untitled Pipeline`,onFailure:`fail-fast`};function x(){let e=[],t=[],n={...b},r=new Set,i=null,a={...h},o=null,s=!1,c=[],l=[],u=new Set;function d(){for(let e of u)e()}function f(){return structuredClone({nodes:e,edges:t,settings:n})}function p(){c.push(f()),c.length>y&&c.shift(),l=[]}function m(r){e=structuredClone(r.nodes),t=structuredClone(r.edges),n=structuredClone(r.settings)}return{subscribe(e){return u.add(e),()=>{u.delete(e)}},getSnapshot(){return Object.freeze({nodes:[...e],edges:[...t],settings:{...n},selectedNodeIds:new Set(r),selectedEdgeId:i,viewport:{...a},validationResult:o,isDirty:s,canUndo:c.length>0,canRedo:l.length>0})},addNode(t){p(),e.push(t),s=!0,d()},updateNode(t,n){p(),e=e.map(e=>e.id===t?{...e,...n,id:e.id}:e),s=!0,d()},removeNode(n){p(),e=e.filter(e=>e.id!==n),t=t.filter(e=>e.source!==n&&e.target!==n),s=!0,d()},addEdge(e,n){p();let r={id:`${e}->${n}`,source:e,target:n};t.push(r),s=!0,d()},removeEdge(e){p(),t=t.filter(t=>t.id!==e),s=!0,d()},updateSettings(e){p(),n={...n,...e},s=!0,d()},moveNodes(t){p();for(let{nodeId:n,position:r}of t)e=e.map(e=>e.id===n?{...e,position:r}:e);s=!0,d()},selectNode(e,t=!1){i=null,t?(r=new Set(r),r.add(e)):r=new Set([e]),d()},selectAll(){r=new Set(e.map(e=>e.id)),d()},clearSelection(){r=new Set,i=null,d()},selectEdge(e){i=e,r=new Set,d()},clearEdgeSelection(){i=null,d()},setViewport(e){a={...e},d()},setValidation(e){o=e,d()},undo(){c.length!==0&&(l.push(f()),m(c.pop()),s=!0,d())},redo(){l.length!==0&&(c.push(f()),m(l.pop()),s=!0,d())},markClean(){s=!1,d()},reset(){e=[],t=[],n={...b},r=new Set,i=null,a={...h},o=null,s=!1,c=[],l=[],d()}}}function S(e,t,n){if(t===n)return!0;let r=new Map;for(let t of e){let e=r.get(t.source);e||(e=[],r.set(t.source,e)),e.push(t.target)}let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n);let a=new Set,o=[n];for(;o.length>0;){let e=o.pop();if(e===t)return!0;if(a.has(e))continue;a.add(e);let n=r.get(e);if(n)for(let e of n)a.has(e)||o.push(e)}return!1}var C=class extends r{constructor(...e){super(...e),this.settings={label:`Untitled Pipeline`,onFailure:`fail-fast`},this.hasErrors=!1,this.isDirty=!1,this.validateResult=``,this._validating=!1}static{this.styles=[o,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";var d={completed:`#22c55e`,failed:`#ef4444`};function f(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}var p=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._runs=[],this._loading=!0,this._sortField=`date`,this._sortDir=`desc`,this._deleteTarget=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";var d={completed:`#22c55e`,failed:`#ef4444`};function f(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}var p=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._runs=[],this._loading=!0,this._sortField=`date`,this._sortDir=`desc`,this._deleteTarget=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import{n as d,t as f}from"./ic-chat-message-ByFUoMm6.js";var p={completed:`#22c55e`,failed:`#ef4444`};function m(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}function h(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}var g=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.graphId=``,this._rpcStatusUnsub=null,this._detail=null,this._loading=!0,this._error=!1,this._showDeleteConfirm=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import{n as d,t as f}from"./ic-chat-message-DfSERzzg.js";var p={completed:`#22c55e`,failed:`#ef4444`};function m(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}function h(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}var g=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.graphId=``,this._rpcStatusUnsub=null,this._detail=null,this._loading=!0,this._error=!1,this._showDeleteConfirm=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as d,t as f}from"./extract-variables-B7-Doo7l.js";var p={draft:`#6b7280`,running:`#06b6d4`,completed:`#22c55e`,failed:`#ef4444`,cancelled:`#f97316`};function m(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}var h=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._pipelines=[],this._searchQuery=``,this._loading=!0,this._deleteTarget=null,this._sortKey=`savedAt`,this._sortAsc=!1,this._showVariablePrompt=!1,this._variableNames=[],this._pendingExecuteData=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as d,t as f}from"./extract-variables-B7-Doo7l.js";var p={draft:`#6b7280`,running:`#06b6d4`,completed:`#22c55e`,failed:`#ef4444`,cancelled:`#f97316`};function m(e){if(!e)return`Never`;let t=Date.now()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);if(i<24)return`${i}h ago`;let a=Math.floor(i/24);return a<30?`${a}d ago`:new Date(e).toISOString().slice(0,10)}var h=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._pipelines=[],this._searchQuery=``,this._loading=!0,this._deleteTarget=null,this._sortKey=`savedAt`,this._sortAsc=!1,this._showVariablePrompt=!1,this._variableNames=[],this._pendingExecuteData=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,m as i,n as a,o,r as s,s as c,t as l,u}from"./decorate-BvWYovGE.js";import{a as d}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import{n as f,t as p}from"./ic-graph-canvas-ByRjij68.js";var m=2e3,h=1e3;function g(){let e=``,t=`running`,n=!1,r=[],i=[],a=[],o={total:0,completed:0,failed:0,skipped:0,running:0,pending:0},s=0,c=null,l=!0,u=null,d=null,f=null,p=null,g=[],_=null,v=new Set;function y(){for(let e of v)e()}function b(e,t){return e.map(e=>{let n=t[e.id];return{id:e.id,task:e.task,agentId:e.agentId,modelId:e.modelId,status:n?.status??`pending`,runId:n?.runId,output:n?.output,error:n?.error,startedAt:n?.startedAt,completedAt:n?.completedAt,durationMs:n?.durationMs,retryAttempt:n?.retryAttempt,retriesRemaining:n?.retriesRemaining,dependsOn:e.dependsOn,position:{x:e.position.x,y:e.position.y}}})}function x(i){e=i.graphId,t=i.status,n=i.isTerminal,a=i.executionOrder,o=i.stats,r=b(g,i.nodes),l=!1,u=null,p===null&&i.status===`running`&&(p=Date.now(),s=0,E()),n&&(w(),T()),y()}function S(e){u=e instanceof Error?e.message:String(e),l=!1,y()}async function C(e,t){try{x(await e.call(`graph.status`,{graphId:t}))}catch(e){S(e)}}function w(){d!==null&&(clearInterval(d),d=null)}function T(){f!==null&&(clearInterval(f),f=null)}function E(){T(),f=setInterval(()=>{p!==null&&(s=Date.now()-p,y())},h)}function D(){let e=0,t=0,n=0,i=0,a=0;for(let o of r)switch(o.status){case`completed`:e++;break;case`failed`:t++;break;case`skipped`:n++;break;case`running`:i++;break;default:a++;break}o={total:r.length,completed:e,failed:t,skipped:n,running:i,pending:a}}return{subscribe(e){return v.add(e),()=>{v.delete(e)}},getSnapshot(){return Object.freeze({graphId:e,graphStatus:t,isTerminal:n,nodes:[...r],edges:[...i],executionOrder:[...a],stats:{...o},elapsedMs:s,selectedNodeId:c,loading:l,error:u})},selectNode(e){c=e,y()},startPolling(t,r,a,o){w(),T(),_=t,e=r,g=a,i=o,p=null,n=!1,C(t,r),d=setInterval(()=>{C(t,r)},m)},stopPolling(){w(),T()},destroy(){w(),T(),v.clear()},applyEvent(i,a){if(i===`graph:node_updated`){let t=a;if(t.graphId!==e)return;let n=r.findIndex(e=>e.id===t.nodeId);if(n>=0){let e=r[n];r[n]={...e,status:t.status,durationMs:t.durationMs??e.durationMs,error:t.error??e.error,startedAt:t.status===`running`&&e.startedAt==null?t.timestamp:e.startedAt,completedAt:t.status===`completed`||t.status===`failed`?t.timestamp:e.completedAt},D(),y()}}else if(i===`graph:completed`){let r=a;if(r.graphId!==e)return;t=r.status,n=!0,o={total:r.nodeCount,completed:r.nodesCompleted,failed:r.nodesFailed,skipped:r.nodesSkipped,running:0,pending:0},w(),T(),l=!1,u=null,y()}else if(i===`graph:started`){if(a.graphId!==e)return;p===null&&(p=Date.now(),s=0,E()),y()}},suspendPolling(){w()},resumePolling(){n||_&&(C(_,e),w(),d=setInterval(()=>{C(_,e)},m))}}}var _=class extends r{constructor(...e){super(...e),this.graphStatus=`running`,this.isTerminal=!1,this.elapsedMs=0,this.stats={total:0,completed:0,failed:0,skipped:0,running:0,pending:0}}static{this.styles=[s,n`
1
+ import{c as e,f as t,h as n,l as r,m as i,n as a,o,r as s,s as c,t as l,u}from"./decorate-BvWYovGE.js";import{a as d}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-confirm-dialog-DGlPbV1T.js";import{n as f,t as p}from"./ic-graph-canvas-ByRjij68.js";var m=2e3,h=1e3;function g(){let e=``,t=`running`,n=!1,r=[],i=[],a=[],o={total:0,completed:0,failed:0,skipped:0,running:0,pending:0},s=0,c=null,l=!0,u=null,d=null,f=null,p=null,g=[],_=null,v=new Set;function y(){for(let e of v)e()}function b(e,t){return e.map(e=>{let n=t[e.id];return{id:e.id,task:e.task,agentId:e.agentId,modelId:e.modelId,status:n?.status??`pending`,runId:n?.runId,output:n?.output,error:n?.error,startedAt:n?.startedAt,completedAt:n?.completedAt,durationMs:n?.durationMs,retryAttempt:n?.retryAttempt,retriesRemaining:n?.retriesRemaining,dependsOn:e.dependsOn,position:{x:e.position.x,y:e.position.y}}})}function x(i){e=i.graphId,t=i.status,n=i.isTerminal,a=i.executionOrder,o=i.stats,r=b(g,i.nodes),l=!1,u=null,p===null&&i.status===`running`&&(p=Date.now(),s=0,E()),n&&(w(),T()),y()}function S(e){u=e instanceof Error?e.message:String(e),l=!1,y()}async function C(e,t){try{x(await e.call(`graph.status`,{graphId:t}))}catch(e){S(e)}}function w(){d!==null&&(clearInterval(d),d=null)}function T(){f!==null&&(clearInterval(f),f=null)}function E(){T(),f=setInterval(()=>{p!==null&&(s=Date.now()-p,y())},h)}function D(){let e=0,t=0,n=0,i=0,a=0;for(let o of r)switch(o.status){case`completed`:e++;break;case`failed`:t++;break;case`skipped`:n++;break;case`running`:i++;break;default:a++;break}o={total:r.length,completed:e,failed:t,skipped:n,running:i,pending:a}}return{subscribe(e){return v.add(e),()=>{v.delete(e)}},getSnapshot(){return Object.freeze({graphId:e,graphStatus:t,isTerminal:n,nodes:[...r],edges:[...i],executionOrder:[...a],stats:{...o},elapsedMs:s,selectedNodeId:c,loading:l,error:u})},selectNode(e){c=e,y()},startPolling(t,r,a,o){w(),T(),_=t,e=r,g=a,i=o,p=null,n=!1,C(t,r),d=setInterval(()=>{C(t,r)},m)},stopPolling(){w(),T()},destroy(){w(),T(),v.clear()},applyEvent(i,a){if(i===`graph:node_updated`){let t=a;if(t.graphId!==e)return;let n=r.findIndex(e=>e.id===t.nodeId);if(n>=0){let e=r[n];r[n]={...e,status:t.status,durationMs:t.durationMs??e.durationMs,error:t.error??e.error,startedAt:t.status===`running`&&e.startedAt==null?t.timestamp:e.startedAt,completedAt:t.status===`completed`||t.status===`failed`?t.timestamp:e.completedAt},D(),y()}}else if(i===`graph:completed`){let r=a;if(r.graphId!==e)return;t=r.status,n=!0,o={total:r.nodeCount,completed:r.nodesCompleted,failed:r.nodesFailed,skipped:r.nodesSkipped,running:0,pending:0},w(),T(),l=!1,u=null,y()}else if(i===`graph:started`){if(a.graphId!==e)return;p===null&&(p=Date.now(),s=0,E()),y()}},suspendPolling(){w()},resumePolling(){n||_&&(C(_,e),w(),d=setInterval(()=>{C(_,e)},m))}}}var _=class extends r{constructor(...e){super(...e),this.graphStatus=`running`,this.isTerminal=!1,this.elapsedMs=0,this.stats={total:0,completed:0,failed:0,skipped:0,running:0,pending:0}}static{this.styles=[s,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";function f(e,t,n){let r=new Set;for(let i of e.split(`,`)){let e=i.trim(),a=e.match(/^(\*|(\d+)-(\d+))\/(\d+)$/);if(a){let e=parseInt(a[4],10);if(e<=0)return null;let i=t,o=n;if(a[2]!==void 0&&a[3]!==void 0&&(i=parseInt(a[2],10),o=parseInt(a[3],10)),i<t||o>n||i>o)return null;for(let t=i;t<=o;t+=e)r.add(t);continue}if(e===`*`){for(let e=t;e<=n;e++)r.add(e);continue}let o=e.match(/^(\d+)-(\d+)$/);if(o){let e=parseInt(o[1],10),i=parseInt(o[2],10);if(e<t||i>n||e>i)return null;for(let t=e;t<=i;t++)r.add(t);continue}if(/^\d+$/.test(e)){let i=parseInt(e,10);if(i<t||i>n)return null;r.add(i);continue}return null}return r.size>0?Array.from(r).sort((e,t)=>e-t):null}function p(e,t,n,r){let i=e.trim().split(/\s+/);if(i.length!==5)return[];let a=f(i[0],0,59),o=f(i[1],0,23),s=f(i[2],1,31),c=f(i[3],1,12),l=f(i[4],0,6);if(!a||!o||!s||!c||!l)return[];let u=new Set(a),d=new Set(o),p=new Set(s),m=new Set(c),h=new Set(l),g=[],_=r.getTime()+366*24*60*60*1e3,v=new Date(r);for(v.setSeconds(0,0),v.setTime(v.getTime()+6e4);v.getTime()<=_&&g.length<n;){let e=v.getMinutes(),t=v.getHours(),n=v.getDate(),r=v.getMonth()+1,i=v.getDay();u.has(e)&&d.has(t)&&p.has(n)&&m.has(r)&&h.has(i)&&g.push(new Date(v)),v.setTime(v.getTime()+6e4)}return g}function m(e,t,n){if(e<=0||!Number.isFinite(e))return[];let r=[],i=n.getTime();for(let n=0;n<t;n++)i+=e,r.push(new Date(i));return r}function h(e,t){let n=new Date(e);if(isNaN(n.getTime()))return[];let r=t??new Date;return n.getTime()>r.getTime()?[n]:[]}function g(e,t){try{return new Intl.DateTimeFormat(`en-US`,{weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,timeZone:t||void 0,timeZoneName:`short`,hour12:!1}).format(e)}catch{return e.toISOString()}}var _=[`UTC`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`,`Asia/Shanghai`,`Australia/Sydney`],v=class extends r{constructor(...e){super(...e),this.job=null,this.mode=`create`,this.agents=[],this._id=``,this._name=``,this._scheduleKind=`cron`,this._cronExpr=``,this._timezone=`UTC`,this._everyMs=6e4,this._atDateTime=``,this._enabled=!0,this._agentId=``,this._message=``,this._maxConcurrent=1,this._sessionTarget=`main`,this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``,this._nextRuns=[],this._previewTimer=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-icon-BGNCCPpZ.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";function f(e,t,n){let r=new Set;for(let i of e.split(`,`)){let e=i.trim(),a=e.match(/^(\*|(\d+)-(\d+))\/(\d+)$/);if(a){let e=parseInt(a[4],10);if(e<=0)return null;let i=t,o=n;if(a[2]!==void 0&&a[3]!==void 0&&(i=parseInt(a[2],10),o=parseInt(a[3],10)),i<t||o>n||i>o)return null;for(let t=i;t<=o;t+=e)r.add(t);continue}if(e===`*`){for(let e=t;e<=n;e++)r.add(e);continue}let o=e.match(/^(\d+)-(\d+)$/);if(o){let e=parseInt(o[1],10),i=parseInt(o[2],10);if(e<t||i>n||e>i)return null;for(let t=e;t<=i;t++)r.add(t);continue}if(/^\d+$/.test(e)){let i=parseInt(e,10);if(i<t||i>n)return null;r.add(i);continue}return null}return r.size>0?Array.from(r).sort((e,t)=>e-t):null}function p(e,t,n,r){let i=e.trim().split(/\s+/);if(i.length!==5)return[];let a=f(i[0],0,59),o=f(i[1],0,23),s=f(i[2],1,31),c=f(i[3],1,12),l=f(i[4],0,6);if(!a||!o||!s||!c||!l)return[];let u=new Set(a),d=new Set(o),p=new Set(s),m=new Set(c),h=new Set(l),g=[],_=r.getTime()+366*24*60*60*1e3,v=new Date(r);for(v.setSeconds(0,0),v.setTime(v.getTime()+6e4);v.getTime()<=_&&g.length<n;){let e=v.getMinutes(),t=v.getHours(),n=v.getDate(),r=v.getMonth()+1,i=v.getDay();u.has(e)&&d.has(t)&&p.has(n)&&m.has(r)&&h.has(i)&&g.push(new Date(v)),v.setTime(v.getTime()+6e4)}return g}function m(e,t,n){if(e<=0||!Number.isFinite(e))return[];let r=[],i=n.getTime();for(let n=0;n<t;n++)i+=e,r.push(new Date(i));return r}function h(e,t){let n=new Date(e);if(isNaN(n.getTime()))return[];let r=t??new Date;return n.getTime()>r.getTime()?[n]:[]}function g(e,t){try{return new Intl.DateTimeFormat(`en-US`,{weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,timeZone:t||void 0,timeZoneName:`short`,hour12:!1}).format(e)}catch{return e.toISOString()}}var _=[`UTC`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`,`Asia/Shanghai`,`Australia/Sydney`],v=class extends r{constructor(...e){super(...e),this.job=null,this.mode=`create`,this.agents=[],this._id=``,this._name=``,this._scheduleKind=`cron`,this._cronExpr=``,this._timezone=`UTC`,this._everyMs=6e4,this._atDateTime=``,this._enabled=!0,this._agentId=``,this._message=``,this._maxConcurrent=1,this._sessionTarget=`main`,this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``,this._nextRuns=[],this._previewTimer=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-array-editor-BLoEyeLS.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-connection-dot-C4nDHgY2.js";import"./ic-select-BqfZISjw.js";var f=class extends r{constructor(...e){super(...e),this.label=``,this.value=``,this.placeholder=`env:SECRET_NAME or file:/path`,this.disabled=!1,this._visible=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-array-editor-BLoEyeLS.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";import"./ic-connection-dot-CXyhlJup.js";import"./ic-select-BqfZISjw.js";var f=class extends r{constructor(...e){super(...e),this.label=``,this.value=``,this.placeholder=`env:SECRET_NAME or file:/path`,this.disabled=!1,this._visible=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as d,r as f,t as p}from"./session-key-parser-Dkqcj2Ss.js";import{t as m}from"./ic-tool-call-Bh5kq-yY.js";import"./ic-chat-message-ByFUoMm6.js";import"./ic-budget-segment-bar-zLsMzjDO.js";import"./ic-layer-waterfall-WkaFyu-l.js";function h(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}function g(e){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e)}var _=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.sessionKey=``,this._session=null,this._messages=[],this._loading=!1,this._error=``,this._showConfirm=!1,this._confirmAction=``,this._activeTab=`conversation`,this._contextLoaded=!1,this._metricsLoaded=!1,this._pipelineSnapshots=[],this._dagCompactions=[],this._selectedSnapshot=null,this._sessionBilling=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as d,r as f,t as p}from"./session-key-parser-Dkqcj2Ss.js";import{t as m}from"./ic-tool-call-DNmwTjek.js";import"./ic-chat-message-DfSERzzg.js";import"./ic-budget-segment-bar-zLsMzjDO.js";import"./ic-layer-waterfall-WkaFyu-l.js";function h(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}function g(e){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e)}var _=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.sessionKey=``,this._session=null,this._messages=[],this._loading=!1,this._error=``,this._showConfirm=!1,this._confirmAction=``,this._activeTab=`conversation`,this._contextLoaded=!1,this._metricsLoaded=!1,this._pipelineSnapshots=[],this._dagCompactions=[],this._selectedSnapshot=null,this._sessionBilling=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-data-table-CKIvr-ag.js";import"./ic-search-input-B02AGw1i.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as f,r as p,t as m}from"./session-key-parser-Dkqcj2Ss.js";function h(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}var g={active:`#22c55e`,idle:`#eab308`,expired:`#6b7280`},_=[{key:`key`,label:`Session`,sortable:!0,render:(e,n)=>{let r=String(e??``),i=p(r);return t`<span title=${r}>
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-data-table-CKIvr-ag.js";import"./ic-search-input-B02AGw1i.js";import"./ic-empty-state-CM3Wbj2f.js";import{n as f,r as p,t as m}from"./session-key-parser-Dkqcj2Ss.js";function h(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}var g={active:`#22c55e`,idle:`#eab308`,expired:`#6b7280`},_=[{key:`key`,label:`Session`,sortable:!0,render:(e,n)=>{let r=String(e??``),i=p(r);return t`<span title=${r}>
2
2
  <strong style="font-size: var(--ic-text-sm);">${i?f(i):r.length>15?r.slice(0,12)+`...`:r}</strong>
3
3
  <span style="font-size: var(--ic-text-xs); color: var(--ic-text-dim); margin-left: 4px;">${i?.channelId??n.channelType}</span>
4
4
  </span>`}},{key:`createdAt`,label:`Status`,sortable:!1,render:(e,n)=>{let r=m(n.lastActiveAt);return t`<span style="display: inline-flex; align-items: center; gap: 6px;">
@@ -1,7 +1,7 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-icon-BGNCCPpZ.js";var d=[{label:`Basics`,icon:`settings`},{label:`Provider`,icon:`server`},{label:`Agent`,icon:`agent`},{label:`Channels`,icon:`channel`},{label:`Review`,icon:`check`}],f=[{key:`anthropic`,type:`anthropic`,name:`Anthropic`,description:`Claude models, recommended for agents`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`claude-sonnet-4-5-20250929`},{key:`openai`,type:`openai`,name:`OpenAI`,description:`GPT-4o, o1, o3 models`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`gpt-4o`},{key:`google`,type:`google`,name:`Google`,description:`Gemini models`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`gemini-2.0-flash`},{key:`groq`,type:`groq`,name:`Groq`,description:`Fast inference (Llama, Mixtral)`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`llama-3.3-70b-versatile`},{key:`mistral`,type:`mistral`,name:`Mistral`,description:`Mistral models`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`mistral-large-latest`},{key:`deepseek`,type:`deepseek`,name:`DeepSeek`,description:`DeepSeek models`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`deepseek-chat`},{key:`xai`,type:`xai`,name:`xAI`,description:`Grok models`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`grok-2`},{key:`together`,type:`together`,name:`Together AI`,description:`Open-source model hosting`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo`},{key:`cerebras`,type:`cerebras`,name:`Cerebras`,description:`Fast inference`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`llama-3.3-70b`},{key:`openrouter`,type:`openrouter`,name:`OpenRouter`,description:`Multi-provider routing`,needsApiKey:!0,needsBaseUrl:!1,defaultBaseUrl:``,defaultModel:`anthropic/claude-sonnet-4-5-20250929`},{key:`ollama`,type:`ollama`,name:`Ollama`,description:`Local open-source models, no API key needed`,needsApiKey:!1,needsBaseUrl:!0,defaultBaseUrl:`http://localhost:11434`,defaultModel:`llama3`},{key:`custom`,type:`openai`,name:`Custom`,description:`Any OpenAI-compatible API endpoint`,needsApiKey:!1,needsBaseUrl:!0,defaultBaseUrl:``,defaultModel:``}],p=[{key:`telegram`,label:`Telegram`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`allowedChatIds`,label:`Allowed Chat IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`discord`,label:`Discord`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`guildIds`,label:`Guild IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`slack`,label:`Slack`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`appToken`,label:`App Token`,type:`password`},{key:`signingSecret`,label:`Signing Secret`,type:`password`}]},{key:`whatsapp`,label:`WhatsApp`,fields:[{key:`phoneNumberId`,label:`Phone Number ID`,type:`text`},{key:`accessToken`,label:`Access Token`,type:`password`},{key:`verifyToken`,label:`Verify Token`,type:`text`}]},{key:`line`,label:`LINE`,fields:[{key:`channelAccessToken`,label:`Channel Access Token`,type:`password`},{key:`channelSecret`,label:`Channel Secret`,type:`password`}]},{key:`signal`,label:`Signal`,fields:[{key:`phone`,label:`Phone Number`,type:`text`},{key:`signalCliPath`,label:`Signal CLI Path`,type:`text`}]},{key:`irc`,label:`IRC`,fields:[{key:`server`,label:`Server`,type:`text`},{key:`port`,label:`Port`,type:`number`,defaultValue:`6667`},{key:`nick`,label:`Nickname`,type:`text`},{key:`channels`,label:`Channels`,type:`text`,placeholder:`Comma-separated, e.g. #general,#dev`}]},{key:`imessage`,label:`iMessage`,fields:[{key:`applescriptPath`,label:`AppleScript Path`,type:`text`,placeholder:`Requires macOS with Messages app`}]}],m=[`trace`,`debug`,`info`,`warn`,`error`];function h(e,t=0){let n=` `.repeat(t);if(e==null)return`${n}~\n`;if(typeof e==`string`)return e===``||/[:#[\]{},&*!|>'"@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(Array.isArray(e))return e.length===0?`[]
2
- `:e.map(e=>{if(typeof e==`object`&&e){let r=h(e,t+1),i=r.split(`
3
- `).filter(Boolean);if(i.length>0){let e=` `.repeat(t+1);return`${n}- ${i[0].substring(e.length)}\n${i.slice(1).map(t=>`${n} ${t.substring(e.length)}\n`).join(``)}`}return`${n}- ${r.trim()}\n`}return`${n}- ${h(e,0)}\n`}).join(``);if(typeof e==`object`){let r=Object.entries(e).filter(([,e])=>e!=null&&e!==``);return r.length===0?`{}
4
- `:r.map(([e,r])=>typeof r==`object`&&!Array.isArray(r)||Array.isArray(r)?`${n}${e}:\n${h(r,t+1)}`:`${n}${e}: ${h(r,0)}\n`).join(``)}return String(e)}function g(){let e={};for(let t of p)e[t.key]={enabled:!1,credentials:{}};return{tenantId:`default`,dataDir:`~/.comis`,logLevel:`info`,gatewayHost:`127.0.0.1`,gatewayPort:4766,providerName:``,providerType:``,apiKey:``,baseUrl:``,defaultModel:``,agentId:`default`,agentName:`Comis`,agentModel:``,agentProvider:``,maxSteps:50,budgetPerDay:1e8,budgetPerHour:1e7,channels:e}}var _=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._currentStep=0,this._wizardData=g(),this._testResult={status:`idle`},this._expandedChannels=new Set,this._yamlPreview=``,this._applying=!1,this._applyStatus=``,this._applyDone=!1,this._validationErrors={}}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-icon-BGNCCPpZ.js";var d=[{label:`Basics`,icon:`settings`},{label:`Provider`,icon:`server`},{label:`Agent`,icon:`agent`},{label:`Channels`,icon:`channel`},{label:`Review`,icon:`check`}],f={anthropic:{displayName:`Anthropic`,description:`Claude models, recommended for agents`,signupUrl:`https://console.anthropic.com/settings/keys`,needsApiKey:!0,needsBaseUrl:!1},openai:{displayName:`OpenAI`,description:`GPT-4o, o1, o3 models`,signupUrl:`https://platform.openai.com/api-keys`,needsApiKey:!0,needsBaseUrl:!1},google:{displayName:`Google`,description:`Gemini models`,signupUrl:`https://aistudio.google.com/app/apikey`,needsApiKey:!0,needsBaseUrl:!1},groq:{displayName:`Groq`,description:`Fast inference`,signupUrl:`https://console.groq.com/keys`,needsApiKey:!0,needsBaseUrl:!1},mistral:{displayName:`Mistral`,description:`Mistral models`,signupUrl:`https://console.mistral.ai/api-keys/`,needsApiKey:!0,needsBaseUrl:!1},cerebras:{displayName:`Cerebras`,description:`Fast inference`,signupUrl:`https://cloud.cerebras.ai/`,needsApiKey:!0,needsBaseUrl:!1},xai:{displayName:`xAI`,description:`Grok models`,signupUrl:`https://console.x.ai/`,needsApiKey:!0,needsBaseUrl:!1},openrouter:{displayName:`OpenRouter`,description:`Multi-provider routing`,signupUrl:`https://openrouter.ai/keys`,needsApiKey:!0,needsBaseUrl:!1}},p=`__custom__`,m={displayName:`Custom`,description:`Any OpenAI-compatible API endpoint`,needsApiKey:!1,needsBaseUrl:!0};function h(e){return Object.hasOwn(f,e)?f[e]:{displayName:e.charAt(0).toUpperCase()+e.slice(1),description:``,needsApiKey:!0,needsBaseUrl:!1}}var g=[{key:`telegram`,label:`Telegram`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`allowedChatIds`,label:`Allowed Chat IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`discord`,label:`Discord`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`guildIds`,label:`Guild IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`slack`,label:`Slack`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`appToken`,label:`App Token`,type:`password`},{key:`signingSecret`,label:`Signing Secret`,type:`password`}]},{key:`whatsapp`,label:`WhatsApp`,fields:[{key:`phoneNumberId`,label:`Phone Number ID`,type:`text`},{key:`accessToken`,label:`Access Token`,type:`password`},{key:`verifyToken`,label:`Verify Token`,type:`text`}]},{key:`line`,label:`LINE`,fields:[{key:`channelAccessToken`,label:`Channel Access Token`,type:`password`},{key:`channelSecret`,label:`Channel Secret`,type:`password`}]},{key:`signal`,label:`Signal`,fields:[{key:`phone`,label:`Phone Number`,type:`text`},{key:`signalCliPath`,label:`Signal CLI Path`,type:`text`}]},{key:`irc`,label:`IRC`,fields:[{key:`server`,label:`Server`,type:`text`},{key:`port`,label:`Port`,type:`number`,defaultValue:`6667`},{key:`nick`,label:`Nickname`,type:`text`},{key:`channels`,label:`Channels`,type:`text`,placeholder:`Comma-separated, e.g. #general,#dev`}]},{key:`imessage`,label:`iMessage`,fields:[{key:`applescriptPath`,label:`AppleScript Path`,type:`text`,placeholder:`Requires macOS with Messages app`}]}],_=[`trace`,`debug`,`info`,`warn`,`error`];function v(e,t=0){let n=` `.repeat(t);if(e==null)return`${n}~\n`;if(typeof e==`string`)return e===``||/[:#[\]{},&*!|>'"@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(Array.isArray(e))return e.length===0?`[]
2
+ `:e.map(e=>{if(typeof e==`object`&&e){let r=v(e,t+1),i=r.split(`
3
+ `).filter(Boolean);if(i.length>0){let e=` `.repeat(t+1);return`${n}- ${i[0].substring(e.length)}\n${i.slice(1).map(t=>`${n} ${t.substring(e.length)}\n`).join(``)}`}return`${n}- ${r.trim()}\n`}return`${n}- ${v(e,0)}\n`}).join(``);if(typeof e==`object`){let r=Object.entries(e).filter(([,e])=>e!=null&&e!==``);return r.length===0?`{}
4
+ `:r.map(([e,r])=>typeof r==`object`&&!Array.isArray(r)||Array.isArray(r)?`${n}${e}:\n${v(r,t+1)}`:`${n}${e}: ${v(r,0)}\n`).join(``)}return String(e)}function y(){let e={};for(let t of g)e[t.key]={enabled:!1,credentials:{}};return{tenantId:`default`,dataDir:`~/.comis`,logLevel:`info`,gatewayHost:`127.0.0.1`,gatewayPort:4766,providerName:``,providerType:``,apiKey:``,baseUrl:``,defaultModel:``,agentId:`default`,agentName:`Comis`,agentModel:``,agentProvider:``,maxSteps:50,budgetPerDay:1e8,budgetPerHour:1e7,channels:e}}var b=class extends r{constructor(...e){super(...e),this.rpcClient=null,this._currentStep=0,this._wizardData=y(),this._testResult={status:`idle`},this._expandedChannels=new Set,this._yamlPreview=``,this._applying=!1,this._applyStatus=``,this._applyDone=!1,this._validationErrors={},this._catalogProviders=[],this._catalogProvidersLoading=!1,this._modelOptions=[],this._modelOptionsLoading=!1}static{this.styles=[o,i,n`
5
5
  :host {
6
6
  display: block;
7
7
  }
@@ -444,7 +444,7 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
444
444
  .nav-spacer {
445
445
  flex: 1;
446
446
  }
447
- `]}_validateStep(e){let t={};switch(e){case 0:this._wizardData.tenantId.trim()||(t.tenantId=`Tenant ID is required`);break;case 1:{this._wizardData.providerType||(t.providerType=`Please select a provider`);let e=f.find(e=>e.key===this._wizardData.providerName);e?.needsApiKey&&!this._wizardData.apiKey.trim()&&(t.apiKey=`API key is required for this provider`),e?.needsBaseUrl&&!this._wizardData.baseUrl.trim()&&(t.baseUrl=`Base URL is required for this provider`);break}case 2:this._wizardData.agentId.trim()||(t.agentId=`Agent ID is required`);break;case 3:break}return this._validationErrors=t,Object.keys(t).length===0}_goNext(){this._validateStep(this._currentStep)&&(this._currentStep===3&&this._generateYaml(),this._currentStep===1&&(this._wizardData.agentModel||(this._wizardData={...this._wizardData,agentModel:this._wizardData.defaultModel,agentProvider:this._wizardData.providerName})),this._currentStep=Math.min(this._currentStep+1,d.length-1),this._validationErrors={})}_goBack(){this._currentStep=Math.max(this._currentStep-1,0),this._validationErrors={}}_selectProvider(e){this._wizardData={...this._wizardData,providerName:e.key,providerType:e.type,baseUrl:e.defaultBaseUrl,defaultModel:e.defaultModel},this._testResult={status:`idle`},this._validationErrors={}}async _testConnection(){if(this.rpcClient){this._testResult={status:`testing`};try{await this.rpcClient.call(`models.test`,{provider:this._wizardData.providerType}),this._testResult={status:`success`,message:`Connected`}}catch(e){let t=e instanceof Error?e.message:`Connection failed`;this._testResult={status:`error`,message:t}}}}_toggleChannel(e){let t=this._wizardData.channels[e],n={...this._wizardData.channels,[e]:{...t,enabled:!t.enabled}};if(this._wizardData={...this._wizardData,channels:n},!t.enabled){let t=new Set(this._expandedChannels);t.add(e),this._expandedChannels=t}}_toggleExpand(e){let t=new Set(this._expandedChannels);t.has(e)?t.delete(e):t.add(e),this._expandedChannels=t}_updateChannelCredential(e,t,n){let r=this._wizardData.channels[e],i={...r.credentials,[t]:n},a={...this._wizardData.channels,[e]:{...r,credentials:i}};this._wizardData={...this._wizardData,channels:a}}_generateYaml(){let e=this._wizardData,t={};if(e.tenantId&&e.tenantId!==`default`&&(t.tenantId=e.tenantId),t.logLevel=e.logLevel,t.dataDir=e.dataDir,t.gateway={enabled:!0,host:e.gatewayHost,port:e.gatewayPort},e.providerName){let n={};e.apiKey&&(n.apiKeyName=`env:`+e.providerName.toUpperCase()+`_API_KEY`),e.baseUrl&&(n.baseUrl=e.baseUrl),t.providers={[e.providerName]:n},e.defaultModel&&(t.models={defaultProvider:e.providerName,defaultModel:e.defaultModel})}let n={name:e.agentName,model:e.agentModel||e.defaultModel,provider:e.agentProvider||e.providerName,maxSteps:e.maxSteps,budgets:{perExecution:2e6,perHour:e.budgetPerHour,perDay:e.budgetPerDay}};t.agents={[e.agentId]:n};let r={};for(let[t,n]of Object.entries(e.channels)){if(!n.enabled)continue;let e={enabled:!0};for(let[t,r]of Object.entries(n.credentials))r&&(t===`allowedChatIds`?e.allowFrom=r.split(`,`).map(e=>e.trim()).filter(Boolean):e[t]=r);r[t]=e}Object.keys(r).length>0&&(t.channels=r),this._yamlPreview=h(t)}async _copyYaml(){try{await navigator.clipboard.writeText(this._yamlPreview),u.show(`Copied to clipboard`,`success`)}catch{u.show(`Failed to copy`,`error`)}}_downloadYaml(){let e=new Blob([this._yamlPreview],{type:`text/yaml`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`comis-config.yaml`,n.click(),URL.revokeObjectURL(t)}async _applyConfig(){if(!this.rpcClient||this._applying)return;this._applying=!0,this._applyDone=!1;let e=this._wizardData,t=[];e.providerName&&e.defaultModel&&t.push({label:`models`,section:`models`,value:{defaultProvider:e.providerName,defaultModel:e.defaultModel}});let n=[];n.push(`agents`),n.push(`gateway`),e.providerName&&n.push(`providers`),Object.values(e.channels).some(e=>e.enabled)&&n.push(`channels`);let r=0;for(let e of t){this._applyStatus=`Applying ${e.label}...`;try{await this.rpcClient.call(`config.apply`,{section:e.section,value:e.value}),r++}catch(t){let n=t instanceof Error?t.message:`Failed to apply configuration`;u.show(`${e.label}: ${n}`,`error`)}}this._applying=!1,this._applyStatus=``,this._applyDone=!0,n.length>0?u.show(`Applied ${r} section(s). ${n.join(`, `)} require saving the config file and restarting the daemon. Use Copy or Download to get the full config.`,`info`):u.show(`Configuration applied! Restart the daemon to activate.`,`success`)}_goToDashboard(){this.dispatchEvent(new CustomEvent(`navigate`,{detail:`dashboard`,bubbles:!0,composed:!0}))}_renderStep1(){let e=this._wizardData,n=this._validationErrors;return t`
447
+ `]}connectedCallback(){super.connectedCallback(),this._loadCatalogProviders()}async _loadCatalogProviders(){if(!this.rpcClient){this._catalogProviders=[],this._catalogProvidersError=`RPC client not connected`;return}this._catalogProvidersLoading=!0,this._catalogProvidersError=void 0;try{let e=await this.rpcClient.call(`models.list_providers`,{});this._catalogProviders=e.providers??[]}catch(e){this._catalogProvidersError=e instanceof Error?e.message:String(e),this._catalogProviders=[]}finally{this._catalogProvidersLoading=!1}}async _loadModelOptions(e){if(!this.rpcClient){this._modelOptions=[],this._modelOptionsError=`RPC client not connected`;return}this._modelOptionsLoading=!0,this._modelOptionsError=void 0,this._modelOptions=[];try{let t=((await this.rpcClient.call(`models.list`,{provider:e})).models??[]).map(e=>({id:(e.modelId??e.id??``).trim(),cost:(e.cost?.input??0)+(e.cost?.output??0)})).filter(e=>e.id.length>0);t.sort((e,t)=>e.cost-t.cost),this._modelOptions=t}catch(e){this._modelOptionsError=e instanceof Error?e.message:String(e)}finally{this._modelOptionsLoading=!1}}_validateStep(e){let t={};switch(e){case 0:this._wizardData.tenantId.trim()||(t.tenantId=`Tenant ID is required`);break;case 1:{this._wizardData.providerName||(t.providerType=`Please select a provider`);let e=this._wizardData.providerName===p,n=e?m:h(this._wizardData.providerName);n.needsApiKey&&!this._wizardData.apiKey.trim()&&(t.apiKey=`API key is required for this provider`),n.needsBaseUrl&&!this._wizardData.baseUrl.trim()&&(t.baseUrl=`Base URL is required for this provider`),!e&&this._wizardData.providerName&&!this._wizardData.defaultModel.trim()&&(t.defaultModel=`Please select a model for this provider`);break}case 2:this._wizardData.agentId.trim()||(t.agentId=`Agent ID is required`);break;case 3:break}return this._validationErrors=t,Object.keys(t).length===0}_goNext(){this._validateStep(this._currentStep)&&(this._currentStep===3&&this._generateYaml(),this._currentStep===1&&(this._wizardData.agentModel||(this._wizardData={...this._wizardData,agentModel:this._wizardData.defaultModel,agentProvider:this._wizardData.providerName})),this._currentStep=Math.min(this._currentStep+1,d.length-1),this._validationErrors={})}_goBack(){this._currentStep=Math.max(this._currentStep-1,0),this._validationErrors={}}_selectProvider(e){let t=e===p,n=t?m:h(e);this._wizardData={...this._wizardData,providerName:e,providerType:t?`openai`:e,apiKey:``,baseUrl:n.defaultBaseUrl??``,defaultModel:``},this._testResult={status:`idle`},this._validationErrors={},this._modelOptions=[],this._modelOptionsError=void 0,t||this._loadModelOptions(e)}async _testConnection(){if(this.rpcClient){this._testResult={status:`testing`};try{await this.rpcClient.call(`models.test`,{provider:this._wizardData.providerType}),this._testResult={status:`success`,message:`Connected`}}catch(e){let t=e instanceof Error?e.message:`Connection failed`;this._testResult={status:`error`,message:t}}}}_toggleChannel(e){let t=this._wizardData.channels[e],n={...this._wizardData.channels,[e]:{...t,enabled:!t.enabled}};if(this._wizardData={...this._wizardData,channels:n},!t.enabled){let t=new Set(this._expandedChannels);t.add(e),this._expandedChannels=t}}_toggleExpand(e){let t=new Set(this._expandedChannels);t.has(e)?t.delete(e):t.add(e),this._expandedChannels=t}_updateChannelCredential(e,t,n){let r=this._wizardData.channels[e],i={...r.credentials,[t]:n},a={...this._wizardData.channels,[e]:{...r,credentials:i}};this._wizardData={...this._wizardData,channels:a}}_generateYaml(){let e=this._wizardData,t={};if(e.tenantId&&e.tenantId!==`default`&&(t.tenantId=e.tenantId),t.logLevel=e.logLevel,t.dataDir=e.dataDir,t.gateway={enabled:!0,host:e.gatewayHost,port:e.gatewayPort},e.providerName){let n={};e.apiKey&&(n.apiKeyName=`env:`+e.providerName.toUpperCase()+`_API_KEY`),e.baseUrl&&(n.baseUrl=e.baseUrl),t.providers={[e.providerName]:n},e.defaultModel&&(t.models={defaultProvider:e.providerName,defaultModel:e.defaultModel})}let n={name:e.agentName,model:e.agentModel||e.defaultModel,provider:e.agentProvider||e.providerName,maxSteps:e.maxSteps,budgets:{perExecution:2e6,perHour:e.budgetPerHour,perDay:e.budgetPerDay}};t.agents={[e.agentId]:n};let r={};for(let[t,n]of Object.entries(e.channels)){if(!n.enabled)continue;let e={enabled:!0};for(let[t,r]of Object.entries(n.credentials))r&&(t===`allowedChatIds`?e.allowFrom=r.split(`,`).map(e=>e.trim()).filter(Boolean):e[t]=r);r[t]=e}Object.keys(r).length>0&&(t.channels=r),this._yamlPreview=v(t)}async _copyYaml(){try{await navigator.clipboard.writeText(this._yamlPreview),u.show(`Copied to clipboard`,`success`)}catch{u.show(`Failed to copy`,`error`)}}_downloadYaml(){let e=new Blob([this._yamlPreview],{type:`text/yaml`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`comis-config.yaml`,n.click(),URL.revokeObjectURL(t)}async _applyConfig(){if(!this.rpcClient||this._applying)return;this._applying=!0,this._applyDone=!1;let e=this._wizardData,t=[];e.providerName&&e.defaultModel&&t.push({label:`models`,section:`models`,value:{defaultProvider:e.providerName,defaultModel:e.defaultModel}});let n=[];n.push(`agents`),n.push(`gateway`),e.providerName&&n.push(`providers`),Object.values(e.channels).some(e=>e.enabled)&&n.push(`channels`);let r=0;for(let e of t){this._applyStatus=`Applying ${e.label}...`;try{await this.rpcClient.call(`config.apply`,{section:e.section,value:e.value}),r++}catch(t){let n=t instanceof Error?t.message:`Failed to apply configuration`;u.show(`${e.label}: ${n}`,`error`)}}this._applying=!1,this._applyStatus=``,this._applyDone=!0,n.length>0?u.show(`Applied ${r} section(s). ${n.join(`, `)} require saving the config file and restarting the daemon. Use Copy or Download to get the full config.`,`info`):u.show(`Configuration applied! Restart the daemon to activate.`,`success`)}_goToDashboard(){this.dispatchEvent(new CustomEvent(`navigate`,{detail:`dashboard`,bubbles:!0,composed:!0}))}_renderStep1(){let e=this._wizardData,n=this._validationErrors;return t`
448
448
  <div class="form-container">
449
449
  <div class="form-field">
450
450
  <label class="form-label">Tenant ID</label>
@@ -501,30 +501,37 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
501
501
  class="form-select"
502
502
  @change=${e=>{this._wizardData={...this._wizardData,logLevel:e.target.value}}}
503
503
  >
504
- ${m.map(e=>t`<option value=${e} ?selected=${e===this._wizardData.logLevel}>${e}</option>`)}
504
+ ${_.map(e=>t`<option value=${e} ?selected=${e===this._wizardData.logLevel}>${e}</option>`)}
505
505
  </select>
506
- `}_renderStep2(){let e=this._wizardData,n=this._validationErrors,r=f.find(t=>t.key===e.providerName);return t`
507
- <div class="provider-grid">
508
- ${f.map(n=>t`
509
- <div
510
- class="provider-card ${e.providerName===n.key?`active`:``}"
511
- role="button"
512
- tabindex="0"
513
- aria-pressed=${e.providerName===n.key?`true`:`false`}
514
- @click=${()=>this._selectProvider(n)}
515
- @keydown=${e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._selectProvider(n))}}
516
- >
517
- <div class="provider-card-name">${n.name}</div>
518
- <div class="provider-card-desc">${n.description}</div>
519
- </div>
520
- `)}
521
- </div>
506
+ `}_renderStep2(){let e=this._wizardData,n=this._validationErrors,r;return r=this._catalogProvidersLoading?t`<div class="provider-grid-loading">Loading providers from catalog...</div>`:this._catalogProvidersError?t`
507
+ <div class="provider-grid-error">
508
+ <span class="form-error">Failed to load provider catalog: ${this._catalogProvidersError}</span>
509
+ <button class="test-btn" @click=${()=>{this._loadCatalogProviders()}}>Retry</button>
510
+ </div>
511
+ `:t`
512
+ <div class="provider-grid">
513
+ ${[...this._catalogProviders,p].map(n=>{let r=n===p?m:h(n);return t`
514
+ <div
515
+ class="provider-card ${e.providerName===n?`active`:``}"
516
+ role="button"
517
+ tabindex="0"
518
+ aria-pressed=${e.providerName===n?`true`:`false`}
519
+ @click=${()=>this._selectProvider(n)}
520
+ @keydown=${e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this._selectProvider(n))}}
521
+ >
522
+ <div class="provider-card-name">${r.displayName}</div>
523
+ <div class="provider-card-desc">${r.description}</div>
524
+ </div>
525
+ `})}
526
+ </div>
527
+ `,t`
528
+ ${r}
522
529
  ${n.providerType?t`<span class="form-error">${n.providerType}</span>`:l}
523
530
 
524
- ${r?this._renderProviderConfig(r):l}
525
- `}_renderProviderConfig(e){let n=this._wizardData,r=this._validationErrors;return t`
531
+ ${e.providerName?this._renderProviderConfig(e.providerName):l}
532
+ `}_renderProviderConfig(e){let n=this._wizardData,r=this._validationErrors,i=e===p,a=i?m:h(e);return t`
526
533
  <div class="provider-config">
527
- ${e.needsApiKey?t`
534
+ ${a.needsApiKey?t`
528
535
  <div class="form-field">
529
536
  <label class="form-label">API Key</label>
530
537
  <input
@@ -538,30 +545,21 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
538
545
  </div>
539
546
  `:l}
540
547
 
541
- ${e.needsBaseUrl?t`
548
+ ${a.needsBaseUrl?t`
542
549
  <div class="form-field">
543
550
  <label class="form-label">Base URL</label>
544
551
  <input
545
552
  class="form-input"
546
553
  type="text"
547
554
  .value=${n.baseUrl}
548
- placeholder=${e.defaultBaseUrl||`https://api.example.com`}
555
+ placeholder=${a.defaultBaseUrl||`https://api.example.com`}
549
556
  @input=${e=>{this._wizardData={...this._wizardData,baseUrl:e.target.value}}}
550
557
  />
551
558
  ${r.baseUrl?t`<span class="form-error">${r.baseUrl}</span>`:l}
552
559
  </div>
553
560
  `:l}
554
561
 
555
- <div class="form-field">
556
- <label class="form-label">Default Model</label>
557
- <input
558
- class="form-input"
559
- type="text"
560
- .value=${n.defaultModel}
561
- placeholder=${e.defaultModel||`Model ID`}
562
- @input=${e=>{this._wizardData={...this._wizardData,defaultModel:e.target.value}}}
563
- />
564
- </div>
562
+ ${this._renderModelField(i)}
565
563
 
566
564
  <div class="test-row">
567
565
  <button
@@ -576,6 +574,44 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
576
574
  ${this._testResult.status===`testing`?t`<span class="test-spinner">Connecting...</span>`:l}
577
575
  </div>
578
576
  </div>
577
+ `}_renderModelField(e){let n=this._wizardData,r=this._validationErrors;return e?t`
578
+ <div class="form-field">
579
+ <label class="form-label">Model ID</label>
580
+ <input
581
+ class="form-input"
582
+ type="text"
583
+ .value=${n.defaultModel}
584
+ placeholder="e.g., qwen/qwen3-coder"
585
+ @input=${e=>{this._wizardData={...this._wizardData,defaultModel:e.target.value}}}
586
+ />
587
+ </div>
588
+ `:this._modelOptionsLoading?t`
589
+ <div class="form-field">
590
+ <label class="form-label">Model</label>
591
+ <span class="test-spinner">Loading models from ${n.providerName}...</span>
592
+ </div>
593
+ `:this._modelOptionsError?t`
594
+ <div class="form-field">
595
+ <label class="form-label">Model</label>
596
+ <span class="form-error">Failed to load models: ${this._modelOptionsError}</span>
597
+ <button class="test-btn" @click=${()=>{this._loadModelOptions(n.providerName)}}>Retry</button>
598
+ </div>
599
+ `:t`
600
+ <div class="form-field">
601
+ <label class="form-label">Model</label>
602
+ <select
603
+ class="form-select"
604
+ @change=${e=>{this._wizardData={...this._wizardData,defaultModel:e.target.value}}}
605
+ >
606
+ <option value="" ?selected=${!n.defaultModel}>— select a model —</option>
607
+ ${this._modelOptions.map(e=>t`
608
+ <option value=${e.id} ?selected=${e.id===n.defaultModel}>
609
+ ${e.id}${e.cost>0?` ($${e.cost.toFixed(2)}/1M)`:` (free)`}
610
+ </option>
611
+ `)}
612
+ </select>
613
+ ${r.defaultModel?t`<span class="form-error">${r.defaultModel}</span>`:l}
614
+ </div>
579
615
  `}_renderStep3(){let e=this._wizardData,n=this._validationErrors;return t`
580
616
  <div class="form-container">
581
617
  <div class="info-box">
@@ -667,7 +703,7 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
667
703
  Enable the channels you want to connect. You can configure more channels later.
668
704
  </div>
669
705
  <div class="channel-cards">
670
- ${p.map(e=>this._renderChannelCard(e))}
706
+ ${g.map(e=>this._renderChannelCard(e))}
671
707
  </div>
672
708
  `}_renderChannelCard(e){let n=this._wizardData.channels[e.key],r=this._expandedChannels.has(e.key);return t`
673
709
  <div class="channel-card">
@@ -842,4 +878,4 @@ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./d
842
878
  ${this._currentStep===3?`Review`:`Next`}
843
879
  </button>`:t`<div class="nav-spacer"></div>`}
844
880
  </div>
845
- `}};c([s({attribute:!1})],_.prototype,`rpcClient`,void 0),c([a()],_.prototype,`_currentStep`,void 0),c([a()],_.prototype,`_wizardData`,void 0),c([a()],_.prototype,`_testResult`,void 0),c([a()],_.prototype,`_expandedChannels`,void 0),c([a()],_.prototype,`_yamlPreview`,void 0),c([a()],_.prototype,`_applying`,void 0),c([a()],_.prototype,`_applyStatus`,void 0),c([a()],_.prototype,`_applyDone`,void 0),c([a()],_.prototype,`_validationErrors`,void 0),_=c([e(`ic-setup-wizard`)],_);export{_ as IcSetupWizard};
881
+ `}};c([s({attribute:!1})],b.prototype,`rpcClient`,void 0),c([a()],b.prototype,`_currentStep`,void 0),c([a()],b.prototype,`_wizardData`,void 0),c([a()],b.prototype,`_testResult`,void 0),c([a()],b.prototype,`_expandedChannels`,void 0),c([a()],b.prototype,`_yamlPreview`,void 0),c([a()],b.prototype,`_applying`,void 0),c([a()],b.prototype,`_applyStatus`,void 0),c([a()],b.prototype,`_applyDone`,void 0),c([a()],b.prototype,`_validationErrors`,void 0),c([a()],b.prototype,`_catalogProviders`,void 0),c([a()],b.prototype,`_catalogProvidersLoading`,void 0),c([a()],b.prototype,`_catalogProvidersError`,void 0),c([a()],b.prototype,`_modelOptions`,void 0),c([a()],b.prototype,`_modelOptionsLoading`,void 0),c([a()],b.prototype,`_modelOptionsError`,void 0),b=c([e(`ic-setup-wizard`)],b);export{b as IcSetupWizard};
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-search-input-B02AGw1i.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";var f={read:`Read file contents with line numbers and pagination`,write:`Write or overwrite files; auto-creates parent directories`,edit:`Surgical search-and-replace on files (exact text match)`,grep:`Regex search across files (ripgrep-based)`,find:`Find files by glob pattern (fd-based)`,ls:`List directory contents alphabetically`,exec:`Shell command execution with foreground/background modes`,process:`Background process management (list, kill, status, log)`,webSearch:`Multi-provider web search (Brave, DuckDuckGo, Perplexity, Grok, Tavily, Exa, Jina, SearXNG)`,webFetch:`Fetch and extract content from URLs (markdown, text, readability modes)`,browser:`Headless browser control (requires Playwright/Chromium)`},p={webSearch:[`freshness: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD`,`deepFetch: 0-5 - auto-fetch full page content for top N results`,`provider: override search provider per call`]},m=[{label:`File Operations`,tools:[`read`,`write`,`edit`,`find`,`ls`]},{label:`Execution`,tools:[`exec`,`process`]},{label:`Search`,tools:[`grep`]},{label:`Web`,tools:[`webSearch`,`webFetch`,`browser`]}],h={minimal:[`exec`],coding:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`],messaging:[`exec`,`webSearch`,`webFetch`],supervisor:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`,`webSearch`,`webFetch`],full:[...m.flatMap(e=>e.tools)]};function g(e){let t=e.match(/\/workspace-([^/]+)\/skills\//);return t?t[1]:/\/workspace\/skills\//.test(e)?`default`:``}var _={memory_search:`Semantic hybrid search across memory and session transcripts`,memory_get:`Read specific memory file sections by path with line ranges`,memory_store:`Store facts, preferences, or context in long-term memory`,memory_manage:`Stats, browse, delete, flush, and export memory entries`,session_status:`View current session model, token usage, and duration`,sessions_list:`List active sessions filtered by kind and recency`,sessions_history:`View conversation history for a session with pagination`,sessions_send:`Send a message into another session (fire-and-forget, wait, or ping-pong)`,sessions_spawn:`Spawn a sub-agent session for background work (sync or async)`,sessions_manage:`Delete, reset, export, or compact session lifecycles`,agents_manage:`List, create, inspect, update, suspend/resume, and delete agents`,subagents:`List, kill, or steer running sub-agents`,message:`Send, reply, react, edit, delete, and fetch messages across all channels`,discord_action:`Pin/unpin, kick/ban, roles, threads, channels, bot presence`,telegram_action:`Pin/unpin, polls, stickers, chat info, ban/promote members`,slack_action:`Pin/unpin, topics, archive, create channels, invite/kick, bookmarks`,whatsapp_action:`Group info, participants, settings, invite codes, profile status`,image_analyze:`Analyze images using vision AI from files, URLs, or base64`,tts_synthesize:`Generate speech audio from text via configured TTS provider`,transcribe_audio:`Transcribe audio/voice attachments to text with language hints`,describe_video:`Generate text descriptions of video attachments`,extract_document:`Extract text from PDF, CSV, TXT, and other document formats`,cron:`Create, list, update, remove, and trigger scheduled jobs`,gateway:`Read/patch config, set secrets, restart, rollback, and status`,browser:`Headless browser: navigate, snapshot, screenshot, click, type, tabs`,obs_query:`Query diagnostics, billing, delivery traces, and channel activity`,models_manage:`List available models and test provider availability`,tokens_manage:`List, create, revoke, and rotate gateway auth tokens`,channels_manage:`List, enable, disable, and restart channel adapters`,skills_manage:`List, import from GitHub, and delete prompt skills`},v=[{label:`MEMORY`,tools:[`memory_search`,`memory_get`,`memory_store`,`memory_manage`]},{label:`SESSIONS`,tools:[`session_status`,`sessions_list`,`sessions_history`,`sessions_send`,`sessions_spawn`,`sessions_manage`]},{label:`AGENTS`,tools:[`agents_manage`,`subagents`]},{label:`MESSAGING`,tools:[`message`,`discord_action`,`telegram_action`,`slack_action`,`whatsapp_action`]},{label:`MEDIA`,tools:[`image_analyze`,`tts_synthesize`,`transcribe_audio`,`describe_video`,`extract_document`]},{label:`INFRASTRUCTURE`,tools:[`cron`,`gateway`,`browser`,`obs_query`]},{label:`FLEET MANAGEMENT`,tools:[`models_manage`,`tokens_manage`,`channels_manage`,`skills_manage`]}],y=[{id:`tools`,label:`Built-in Tools`},{id:`skills`,label:`Prompt Skills`}],b=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._recentSkillEvents=[],this._error=``,this._activeTab=`tools`,this._skillsConfig=null,this._discoveredSkills=[],this._targetAgentId=``,this._agentIds=[],this._skillScope=`all`,this._defaultAgentId=`default`,this._searchQuery=``,this._importUrl=``,this._isImportingSkill=!1,this._isUploadingSkill=!1,this._deletingSkill=null,this._installAgent=``,this._installScope=`shared`,this._newAllowedSkill=``,this._newDeniedSkill=``,this._newPolicyAllow=``,this._newPolicyDeny=``,this._rpcStatusUnsub=null,this._dataLoaded=!1}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-search-input-B02AGw1i.js";import"./ic-empty-state-CM3Wbj2f.js";import"./ic-tabs-yBjkWKJH.js";var f={read:`Read file contents with line numbers and pagination`,write:`Write or overwrite files; auto-creates parent directories`,edit:`Surgical search-and-replace on files (exact text match)`,grep:`Regex search across files (ripgrep-based)`,find:`Find files by glob pattern (fd-based)`,ls:`List directory contents alphabetically`,exec:`Shell command execution with foreground/background modes`,process:`Background process management (list, kill, status, log)`,webSearch:`Multi-provider web search (Brave, DuckDuckGo, Perplexity, Grok, Tavily, Exa, Jina, SearXNG)`,webFetch:`Fetch and extract content from URLs (markdown, text, readability modes)`,browser:`Headless browser control (requires Playwright/Chromium)`},p={webSearch:[`freshness: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD`,`deepFetch: 0-5 - auto-fetch full page content for top N results`,`provider: override search provider per call`]},m=[{label:`File Operations`,tools:[`read`,`write`,`edit`,`find`,`ls`]},{label:`Execution`,tools:[`exec`,`process`]},{label:`Search`,tools:[`grep`]},{label:`Web`,tools:[`webSearch`,`webFetch`,`browser`]}],h={minimal:[`exec`],coding:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`],messaging:[`exec`,`webSearch`,`webFetch`],supervisor:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`,`webSearch`,`webFetch`],full:[...m.flatMap(e=>e.tools)]};function g(e){let t=e.match(/\/workspace-([^/]+)\/skills\//);return t?t[1]:/\/workspace\/skills\//.test(e)?`default`:``}var _={memory_search:`Semantic hybrid search across memory and session transcripts`,memory_get:`Read specific memory file sections by path with line ranges`,memory_store:`Store facts, preferences, or context in long-term memory`,memory_manage:`Stats, browse, delete, flush, and export memory entries`,session_status:`View current session model, token usage, and duration`,sessions_list:`List active sessions filtered by kind and recency`,sessions_history:`View conversation history for a session with pagination`,sessions_send:`Send a message into another session (fire-and-forget, wait, or ping-pong)`,sessions_spawn:`Spawn a sub-agent session for background work (sync or async)`,sessions_manage:`Delete, reset, export, or compact session lifecycles`,agents_manage:`List, create, inspect, update, suspend/resume, and delete agents`,subagents:`List, kill, or steer running sub-agents`,message:`Send, reply, react, edit, delete, and fetch messages across all channels`,discord_action:`Pin/unpin, kick/ban, roles, threads, channels, bot presence`,telegram_action:`Pin/unpin, polls, stickers, chat info, ban/promote members`,slack_action:`Pin/unpin, topics, archive, create channels, invite/kick, bookmarks`,whatsapp_action:`Group info, participants, settings, invite codes, profile status`,image_analyze:`Analyze images using vision AI from files, URLs, or base64`,tts_synthesize:`Generate speech audio from text via configured TTS provider`,transcribe_audio:`Transcribe audio/voice attachments to text with language hints`,describe_video:`Generate text descriptions of video attachments`,extract_document:`Extract text from PDF, CSV, TXT, and other document formats`,cron:`Create, list, update, remove, and trigger scheduled jobs`,gateway:`Read/patch config, set secrets, restart, rollback, and status`,browser:`Headless browser: navigate, snapshot, screenshot, click, type, tabs`,obs_query:`Query diagnostics, billing, delivery traces, and channel activity`,models_manage:`List available models and test provider availability`,tokens_manage:`List, create, revoke, and rotate gateway auth tokens`,channels_manage:`List, enable, disable, and restart channel adapters`,skills_manage:`List, import from GitHub, and delete prompt skills`},v=[{label:`MEMORY`,tools:[`memory_search`,`memory_get`,`memory_store`,`memory_manage`]},{label:`SESSIONS`,tools:[`session_status`,`sessions_list`,`sessions_history`,`sessions_send`,`sessions_spawn`,`sessions_manage`]},{label:`AGENTS`,tools:[`agents_manage`,`subagents`]},{label:`MESSAGING`,tools:[`message`,`discord_action`,`telegram_action`,`slack_action`,`whatsapp_action`]},{label:`MEDIA`,tools:[`image_analyze`,`tts_synthesize`,`transcribe_audio`,`describe_video`,`extract_document`]},{label:`INFRASTRUCTURE`,tools:[`cron`,`gateway`,`browser`,`obs_query`]},{label:`FLEET MANAGEMENT`,tools:[`models_manage`,`tokens_manage`,`channels_manage`,`skills_manage`]}],y=[{id:`tools`,label:`Built-in Tools`},{id:`skills`,label:`Prompt Skills`}],b=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._recentSkillEvents=[],this._error=``,this._activeTab=`tools`,this._skillsConfig=null,this._discoveredSkills=[],this._targetAgentId=``,this._agentIds=[],this._skillScope=`all`,this._defaultAgentId=`default`,this._searchQuery=``,this._importUrl=``,this._isImportingSkill=!1,this._isUploadingSkill=!1,this._deletingSkill=null,this._installAgent=``,this._installScope=`shared`,this._newAllowedSkill=``,this._newDeniedSkill=``,this._newPolicyAllow=``,this._newPolicyDeny=``,this._rpcStatusUnsub=null,this._dataLoaded=!1}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-BBkuC-EU.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var f=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._runs=[],this._confirmKillRunId=null,this._sse=null,this._reloadDebounce=null,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u,i as d}from"./index-CBr0Tm9_.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var f=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._runs=[],this._confirmKillRunId=null,this._sse=null,this._reloadDebounce=null,this._rpcStatusUnsub=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-BBkuC-EU.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=[`projects`,`scripts`,`documents`,`media`,`data`,`output`];function f(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var p=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.agentId=``,this._status=null,this._loadState=`loading`,this._error=``,this._activeTab=`files`,this._selectedFile=null,this._selectedSubdir=null,this._fileContent=``,this._editedContent=``,this._dirEntries=[],this._saving=!1,this._dirty=!1,this._confirmAction=null,this._actionPending=!1,this._gitStatus=null,this._gitLog=[],this._gitDiff=``,this._gitDiffFile=null,this._commitMessage=``,this._committing=!1,this._restoreTarget=null}static{this.styles=[o,i,n`
1
+ import{c as e,f as t,h as n,l as r,n as i,o as a,r as o,s,t as c,u as l}from"./decorate-BvWYovGE.js";import{a as u}from"./index-CBr0Tm9_.js";import"./ic-breadcrumb-DqN6G3gc.js";import"./ic-tag-CvMVQFRR.js";import"./ic-confirm-dialog-DGlPbV1T.js";import"./ic-relative-time-B3UAnTqg.js";import"./ic-empty-state-CM3Wbj2f.js";var d=[`projects`,`scripts`,`documents`,`media`,`data`,`output`];function f(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var p=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.agentId=``,this._status=null,this._loadState=`loading`,this._error=``,this._activeTab=`files`,this._selectedFile=null,this._selectedSubdir=null,this._fileContent=``,this._editedContent=``,this._dirEntries=[],this._saving=!1,this._dirty=!1,this._confirmAction=null,this._actionPending=!1,this._gitStatus=null,this._gitLog=[],this._gitDiff=``,this._gitDiffFile=null,this._commitMessage=``,this._committing=!1,this._restoreTarget=null}static{this.styles=[o,i,n`
2
2
  :host {
3
3
  display: block;
4
4
  }