agor-live 0.12.2 → 0.12.3

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 (372) hide show
  1. package/dist/core/api/index.d.cts +4 -4
  2. package/dist/core/api/index.d.ts +4 -4
  3. package/dist/core/{board-DCNkcsyf.d.cts → board-ByCag4EG.d.cts} +8 -1
  4. package/dist/core/{board-C-PU8jok.d.ts → board-CZuyMRpr.d.ts} +8 -1
  5. package/dist/core/claude/index.cjs +46 -5
  6. package/dist/core/claude/index.js +51 -21
  7. package/dist/core/{client-CGO13BG6.d.ts → client-BoLj-jqT.d.ts} +30 -5
  8. package/dist/core/{client-DKbFqX_X.d.cts → client-gnSCmSyL.d.cts} +30 -5
  9. package/dist/core/config/browser.d.cts +1 -1
  10. package/dist/core/config/browser.d.ts +1 -1
  11. package/dist/core/config/index.cjs +60 -4
  12. package/dist/core/config/index.d.cts +6 -5
  13. package/dist/core/config/index.d.ts +6 -5
  14. package/dist/core/config/index.js +64 -20
  15. package/dist/core/{config-manager-DGBdhxtZ.d.ts → config-manager-BLDGbZHT.d.ts} +16 -2
  16. package/dist/core/{config-manager-sCgziLkz.d.cts → config-manager-CsBk-Rh2.d.cts} +16 -2
  17. package/dist/core/db/index.cjs +332 -60
  18. package/dist/core/db/index.d.cts +33 -7
  19. package/dist/core/db/index.d.ts +33 -7
  20. package/dist/core/db/index.js +338 -77
  21. package/dist/core/drizzle/postgres/meta/_journal.json +1 -1
  22. package/dist/core/drizzle/sqlite/meta/_journal.json +1 -1
  23. package/dist/core/{feathers-B0zjReEk.d.ts → feathers-CYMJeMWB.d.ts} +1 -1
  24. package/dist/core/{feathers-C1uChqXy.d.cts → feathers-Cyk1lpAM.d.cts} +1 -1
  25. package/dist/core/gateway/index.cjs +137 -12
  26. package/dist/core/gateway/index.d.cts +22 -6
  27. package/dist/core/gateway/index.d.ts +22 -6
  28. package/dist/core/gateway/index.js +137 -12
  29. package/dist/core/{gateway-Dy9fVyiS.d.ts → gateway-B4CaePYV.d.ts} +2 -2
  30. package/dist/core/{gateway-DGNtjRnd.d.cts → gateway-C2NOdrxu.d.cts} +2 -2
  31. package/dist/core/git/index.d.cts +2 -2
  32. package/dist/core/git/index.d.ts +2 -2
  33. package/dist/core/index.cjs +226 -48
  34. package/dist/core/index.d.cts +8 -8
  35. package/dist/core/index.d.ts +8 -8
  36. package/dist/core/index.js +230 -64
  37. package/dist/core/mcp/index.cjs +24 -2
  38. package/dist/core/mcp/index.js +26 -4
  39. package/dist/core/seed/index.cjs +83 -13
  40. package/dist/core/seed/index.js +88 -29
  41. package/dist/core/{session-Bt9i9089.d.cts → session-BJbTzw3y.d.cts} +17 -1
  42. package/dist/core/{session-Da9rf6n5.d.ts → session-DLVkt-jY.d.ts} +17 -1
  43. package/dist/core/templates/session-context.d.cts +1 -1
  44. package/dist/core/templates/session-context.d.ts +1 -1
  45. package/dist/core/types/index.d.cts +6 -6
  46. package/dist/core/types/index.d.ts +6 -6
  47. package/dist/core/{types-D_wAaaE3.d.cts → types-Ddri21rw.d.cts} +18 -0
  48. package/dist/core/{types-D_wAaaE3.d.ts → types-Ddri21rw.d.ts} +18 -0
  49. package/dist/core/unix/index.cjs +63 -6
  50. package/dist/core/unix/index.d.cts +4 -3
  51. package/dist/core/unix/index.d.ts +4 -3
  52. package/dist/core/unix/index.js +68 -22
  53. package/dist/core/{user-DT1Qzfep.d.ts → user-B77oCF14.d.ts} +1 -1
  54. package/dist/core/{user-C5id0Zhj.d.cts → user-LBRon9n1.d.cts} +1 -1
  55. package/dist/core/utils/permission-mode-mapper.d.cts +1 -1
  56. package/dist/core/utils/permission-mode-mapper.d.ts +1 -1
  57. package/dist/core/utils/url.cjs +22 -0
  58. package/dist/core/utils/url.d.cts +45 -1
  59. package/dist/core/utils/url.d.ts +45 -1
  60. package/dist/core/utils/url.js +18 -0
  61. package/dist/daemon/index.js +168 -38
  62. package/dist/daemon/mcp/routes.js +5 -5
  63. package/dist/daemon/services/gateway.d.ts +9 -0
  64. package/dist/daemon/services/gateway.js +73 -6
  65. package/dist/daemon/services/repos.js +1 -0
  66. package/dist/daemon/services/thread-session-map.d.ts +6 -0
  67. package/dist/daemon/services/thread-session-map.js +9 -0
  68. package/dist/executor/cli.d.ts +0 -0
  69. package/dist/executor/cli.d.ts.map +0 -0
  70. package/dist/executor/cli.js +0 -0
  71. package/dist/executor/commands/git.d.ts +0 -0
  72. package/dist/executor/commands/git.d.ts.map +1 -1
  73. package/dist/executor/commands/git.js +3 -2
  74. package/dist/executor/commands/index.d.ts +0 -0
  75. package/dist/executor/commands/index.d.ts.map +0 -0
  76. package/dist/executor/commands/index.js +0 -0
  77. package/dist/executor/commands/unix.d.ts +0 -0
  78. package/dist/executor/commands/unix.d.ts.map +0 -0
  79. package/dist/executor/commands/unix.js +0 -0
  80. package/dist/executor/commands/zellij.d.ts +0 -0
  81. package/dist/executor/commands/zellij.d.ts.map +0 -0
  82. package/dist/executor/commands/zellij.js +0 -0
  83. package/dist/executor/config.d.ts +0 -0
  84. package/dist/executor/config.d.ts.map +0 -0
  85. package/dist/executor/config.js +0 -0
  86. package/dist/executor/db/feathers-repositories.d.ts +0 -0
  87. package/dist/executor/db/feathers-repositories.d.ts.map +0 -0
  88. package/dist/executor/db/feathers-repositories.js +0 -0
  89. package/dist/executor/handlers/sdk/base-executor.d.ts +0 -0
  90. package/dist/executor/handlers/sdk/base-executor.d.ts.map +0 -0
  91. package/dist/executor/handlers/sdk/base-executor.js +0 -0
  92. package/dist/executor/handlers/sdk/claude.d.ts +0 -0
  93. package/dist/executor/handlers/sdk/claude.d.ts.map +0 -0
  94. package/dist/executor/handlers/sdk/claude.js +0 -0
  95. package/dist/executor/handlers/sdk/codex.d.ts +0 -0
  96. package/dist/executor/handlers/sdk/codex.d.ts.map +0 -0
  97. package/dist/executor/handlers/sdk/codex.js +0 -0
  98. package/dist/executor/handlers/sdk/gemini.d.ts +0 -0
  99. package/dist/executor/handlers/sdk/gemini.d.ts.map +0 -0
  100. package/dist/executor/handlers/sdk/gemini.js +0 -0
  101. package/dist/executor/handlers/sdk/opencode.d.ts +0 -0
  102. package/dist/executor/handlers/sdk/opencode.d.ts.map +0 -0
  103. package/dist/executor/handlers/sdk/opencode.js +0 -0
  104. package/dist/executor/handlers/sdk/tool-registry.d.ts +0 -0
  105. package/dist/executor/handlers/sdk/tool-registry.d.ts.map +0 -0
  106. package/dist/executor/handlers/sdk/tool-registry.js +0 -0
  107. package/dist/executor/index.d.ts +0 -0
  108. package/dist/executor/index.d.ts.map +0 -0
  109. package/dist/executor/index.js +0 -0
  110. package/dist/executor/payload-types.d.ts +8 -0
  111. package/dist/executor/payload-types.d.ts.map +1 -1
  112. package/dist/executor/payload-types.js +2 -0
  113. package/dist/executor/permissions/permission-manager.d.ts +0 -0
  114. package/dist/executor/permissions/permission-manager.d.ts.map +0 -0
  115. package/dist/executor/permissions/permission-manager.js +0 -0
  116. package/dist/executor/permissions/permission-service.d.ts +0 -0
  117. package/dist/executor/permissions/permission-service.d.ts.map +0 -0
  118. package/dist/executor/permissions/permission-service.js +0 -0
  119. package/dist/executor/sdk-handlers/base/index.d.ts +0 -0
  120. package/dist/executor/sdk-handlers/base/index.d.ts.map +0 -0
  121. package/dist/executor/sdk-handlers/base/index.js +0 -0
  122. package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts +0 -0
  123. package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts.map +0 -0
  124. package/dist/executor/sdk-handlers/base/mcp-scoping.js +0 -0
  125. package/dist/executor/sdk-handlers/base/normalizer.interface.d.ts +0 -0
  126. package/dist/executor/sdk-handlers/base/normalizer.interface.d.ts.map +0 -0
  127. package/dist/executor/sdk-handlers/base/normalizer.interface.js +0 -0
  128. package/dist/executor/sdk-handlers/base/tool.interface.d.ts +0 -0
  129. package/dist/executor/sdk-handlers/base/tool.interface.d.ts.map +0 -0
  130. package/dist/executor/sdk-handlers/base/tool.interface.js +0 -0
  131. package/dist/executor/sdk-handlers/base/types.d.ts +0 -0
  132. package/dist/executor/sdk-handlers/base/types.d.ts.map +0 -0
  133. package/dist/executor/sdk-handlers/base/types.js +0 -0
  134. package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +0 -0
  135. package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +0 -0
  136. package/dist/executor/sdk-handlers/claude/claude-tool.js +0 -0
  137. package/dist/executor/sdk-handlers/claude/import/load-session.d.ts +0 -0
  138. package/dist/executor/sdk-handlers/claude/import/load-session.d.ts.map +0 -0
  139. package/dist/executor/sdk-handlers/claude/import/load-session.js +0 -0
  140. package/dist/executor/sdk-handlers/claude/import/message-converter.d.ts +0 -0
  141. package/dist/executor/sdk-handlers/claude/import/message-converter.d.ts.map +0 -0
  142. package/dist/executor/sdk-handlers/claude/import/message-converter.js +0 -0
  143. package/dist/executor/sdk-handlers/claude/import/task-extractor.d.ts +0 -0
  144. package/dist/executor/sdk-handlers/claude/import/task-extractor.d.ts.map +0 -0
  145. package/dist/executor/sdk-handlers/claude/import/task-extractor.js +0 -0
  146. package/dist/executor/sdk-handlers/claude/import/transcript-parser.d.ts +0 -0
  147. package/dist/executor/sdk-handlers/claude/import/transcript-parser.d.ts.map +0 -0
  148. package/dist/executor/sdk-handlers/claude/import/transcript-parser.js +0 -0
  149. package/dist/executor/sdk-handlers/claude/index.d.ts +0 -0
  150. package/dist/executor/sdk-handlers/claude/index.d.ts.map +0 -0
  151. package/dist/executor/sdk-handlers/claude/index.js +0 -0
  152. package/dist/executor/sdk-handlers/claude/message-builder.d.ts +0 -0
  153. package/dist/executor/sdk-handlers/claude/message-builder.d.ts.map +0 -0
  154. package/dist/executor/sdk-handlers/claude/message-builder.js +0 -0
  155. package/dist/executor/sdk-handlers/claude/message-processor.d.ts +0 -0
  156. package/dist/executor/sdk-handlers/claude/message-processor.d.ts.map +0 -0
  157. package/dist/executor/sdk-handlers/claude/message-processor.js +0 -0
  158. package/dist/executor/sdk-handlers/claude/models.d.ts +0 -0
  159. package/dist/executor/sdk-handlers/claude/models.d.ts.map +0 -0
  160. package/dist/executor/sdk-handlers/claude/models.js +0 -0
  161. package/dist/executor/sdk-handlers/claude/normalizer.d.ts +0 -0
  162. package/dist/executor/sdk-handlers/claude/normalizer.d.ts.map +0 -0
  163. package/dist/executor/sdk-handlers/claude/normalizer.js +0 -0
  164. package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts +0 -0
  165. package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.d.ts.map +0 -0
  166. package/dist/executor/sdk-handlers/claude/permissions/permission-hooks.js +0 -0
  167. package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +0 -0
  168. package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +0 -0
  169. package/dist/executor/sdk-handlers/claude/prompt-service.js +0 -0
  170. package/dist/executor/sdk-handlers/claude/query-builder.d.ts +0 -0
  171. package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +0 -0
  172. package/dist/executor/sdk-handlers/claude/query-builder.js +0 -0
  173. package/dist/executor/sdk-handlers/claude/safe-message-service.d.ts +0 -0
  174. package/dist/executor/sdk-handlers/claude/safe-message-service.d.ts.map +0 -0
  175. package/dist/executor/sdk-handlers/claude/safe-message-service.js +0 -0
  176. package/dist/executor/sdk-handlers/claude/session-context.d.ts +0 -0
  177. package/dist/executor/sdk-handlers/claude/session-context.d.ts.map +0 -0
  178. package/dist/executor/sdk-handlers/claude/session-context.js +0 -0
  179. package/dist/executor/sdk-handlers/claude/thinking-detector.d.ts +0 -0
  180. package/dist/executor/sdk-handlers/claude/thinking-detector.d.ts.map +0 -0
  181. package/dist/executor/sdk-handlers/claude/thinking-detector.js +0 -0
  182. package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +0 -0
  183. package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +0 -0
  184. package/dist/executor/sdk-handlers/codex/codex-tool.js +0 -0
  185. package/dist/executor/sdk-handlers/codex/index.d.ts +0 -0
  186. package/dist/executor/sdk-handlers/codex/index.d.ts.map +0 -0
  187. package/dist/executor/sdk-handlers/codex/index.js +0 -0
  188. package/dist/executor/sdk-handlers/codex/models.d.ts +0 -0
  189. package/dist/executor/sdk-handlers/codex/models.d.ts.map +0 -0
  190. package/dist/executor/sdk-handlers/codex/models.js +0 -0
  191. package/dist/executor/sdk-handlers/codex/normalizer.d.ts +0 -0
  192. package/dist/executor/sdk-handlers/codex/normalizer.d.ts.map +0 -0
  193. package/dist/executor/sdk-handlers/codex/normalizer.js +0 -0
  194. package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +0 -0
  195. package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +0 -0
  196. package/dist/executor/sdk-handlers/codex/prompt-service.js +0 -0
  197. package/dist/executor/sdk-handlers/codex/usage.d.ts +0 -0
  198. package/dist/executor/sdk-handlers/codex/usage.d.ts.map +0 -0
  199. package/dist/executor/sdk-handlers/codex/usage.js +0 -0
  200. package/dist/executor/sdk-handlers/gemini/conversation-converter.d.ts +0 -0
  201. package/dist/executor/sdk-handlers/gemini/conversation-converter.d.ts.map +0 -0
  202. package/dist/executor/sdk-handlers/gemini/conversation-converter.js +0 -0
  203. package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +0 -0
  204. package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +0 -0
  205. package/dist/executor/sdk-handlers/gemini/gemini-tool.js +0 -0
  206. package/dist/executor/sdk-handlers/gemini/index.d.ts +0 -0
  207. package/dist/executor/sdk-handlers/gemini/index.d.ts.map +0 -0
  208. package/dist/executor/sdk-handlers/gemini/index.js +0 -0
  209. package/dist/executor/sdk-handlers/gemini/models.d.ts +0 -0
  210. package/dist/executor/sdk-handlers/gemini/models.d.ts.map +0 -0
  211. package/dist/executor/sdk-handlers/gemini/models.js +0 -0
  212. package/dist/executor/sdk-handlers/gemini/normalizer.d.ts +0 -0
  213. package/dist/executor/sdk-handlers/gemini/normalizer.d.ts.map +0 -0
  214. package/dist/executor/sdk-handlers/gemini/normalizer.js +0 -0
  215. package/dist/executor/sdk-handlers/gemini/permission-mapper.d.ts +0 -0
  216. package/dist/executor/sdk-handlers/gemini/permission-mapper.d.ts.map +0 -0
  217. package/dist/executor/sdk-handlers/gemini/permission-mapper.js +0 -0
  218. package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +0 -0
  219. package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +0 -0
  220. package/dist/executor/sdk-handlers/gemini/prompt-service.js +0 -0
  221. package/dist/executor/sdk-handlers/gemini/usage.d.ts +0 -0
  222. package/dist/executor/sdk-handlers/gemini/usage.d.ts.map +0 -0
  223. package/dist/executor/sdk-handlers/gemini/usage.js +0 -0
  224. package/dist/executor/sdk-handlers/models.d.ts +0 -0
  225. package/dist/executor/sdk-handlers/models.d.ts.map +0 -0
  226. package/dist/executor/sdk-handlers/models.js +0 -0
  227. package/dist/executor/sdk-handlers/normalizer-factory.d.ts +0 -0
  228. package/dist/executor/sdk-handlers/normalizer-factory.d.ts.map +0 -0
  229. package/dist/executor/sdk-handlers/normalizer-factory.js +0 -0
  230. package/dist/executor/sdk-handlers/opencode/index.d.ts +0 -0
  231. package/dist/executor/sdk-handlers/opencode/index.d.ts.map +0 -0
  232. package/dist/executor/sdk-handlers/opencode/index.js +0 -0
  233. package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts +0 -0
  234. package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts.map +0 -0
  235. package/dist/executor/sdk-handlers/opencode/opencode-tool.js +0 -0
  236. package/dist/executor/services/feathers-client.d.ts +0 -0
  237. package/dist/executor/services/feathers-client.d.ts.map +0 -0
  238. package/dist/executor/services/feathers-client.js +0 -0
  239. package/dist/executor/types/sdk-response.d.ts +0 -0
  240. package/dist/executor/types/sdk-response.d.ts.map +0 -0
  241. package/dist/executor/types/sdk-response.js +0 -0
  242. package/dist/executor/types/token-usage.d.ts +0 -0
  243. package/dist/executor/types/token-usage.d.ts.map +0 -0
  244. package/dist/executor/types/token-usage.js +0 -0
  245. package/dist/executor/types.d.ts +0 -0
  246. package/dist/executor/types.d.ts.map +0 -0
  247. package/dist/executor/types.js +0 -0
  248. package/dist/ui/assets/{_basePickBy-a0JoJgXO.js → _basePickBy-DM-YlwQP.js} +1 -1
  249. package/dist/ui/assets/_basePickBy-DM-YlwQP.js.gz +0 -0
  250. package/dist/ui/assets/{_baseUniq-IFulW561.js → _baseUniq-w9wJK0j5.js} +1 -1
  251. package/dist/ui/assets/_baseUniq-w9wJK0j5.js.gz +0 -0
  252. package/dist/ui/assets/{arc-Dj6SyPh6.js → arc-CVXkw1SJ.js} +1 -1
  253. package/dist/ui/assets/arc-CVXkw1SJ.js.gz +0 -0
  254. package/dist/ui/assets/{architectureDiagram-VXUJARFQ-CjXOzrje.js → architectureDiagram-VXUJARFQ-CevjfWlW.js} +1 -1
  255. package/dist/ui/assets/{architectureDiagram-VXUJARFQ-CjXOzrje.js.gz → architectureDiagram-VXUJARFQ-CevjfWlW.js.gz} +0 -0
  256. package/dist/ui/assets/{blockDiagram-VD42YOAC-IFpdwkfg.js → blockDiagram-VD42YOAC-b9JU-Vzx.js} +1 -1
  257. package/dist/ui/assets/{blockDiagram-VD42YOAC-IFpdwkfg.js.gz → blockDiagram-VD42YOAC-b9JU-Vzx.js.gz} +0 -0
  258. package/dist/ui/assets/{c4Diagram-YG6GDRKO-qL4Ujfnz.js → c4Diagram-YG6GDRKO-j7VSccDF.js} +1 -1
  259. package/dist/ui/assets/c4Diagram-YG6GDRKO-j7VSccDF.js.gz +0 -0
  260. package/dist/ui/assets/channel-BNIBtjaQ.js +1 -0
  261. package/dist/ui/assets/{chunk-4BX2VUAB-CH6tu0mB.js → chunk-4BX2VUAB-D_codqcR.js} +1 -1
  262. package/dist/ui/assets/{chunk-55IACEB6-DDAZjWTD.js → chunk-55IACEB6-nQq1kviw.js} +1 -1
  263. package/dist/ui/assets/{chunk-B4BG7PRW-BDSu72O0.js → chunk-B4BG7PRW-DlVxaJL9.js} +1 -1
  264. package/dist/ui/assets/chunk-B4BG7PRW-DlVxaJL9.js.gz +0 -0
  265. package/dist/ui/assets/{chunk-DI55MBZ5-C7merGRo.js → chunk-DI55MBZ5-Dw95m49m.js} +1 -1
  266. package/dist/ui/assets/chunk-DI55MBZ5-Dw95m49m.js.gz +0 -0
  267. package/dist/ui/assets/{chunk-FMBD7UC4-DX20G6ZX.js → chunk-FMBD7UC4-Bnk79OV8.js} +1 -1
  268. package/dist/ui/assets/{chunk-QN33PNHL-BvT3a5aI.js → chunk-QN33PNHL-sqjI-sXo.js} +1 -1
  269. package/dist/ui/assets/{chunk-QZHKN3VN-oo-Lxdo7.js → chunk-QZHKN3VN-T7CEGHh9.js} +1 -1
  270. package/dist/ui/assets/{chunk-TZMSLE5B-BV4XHxKb.js → chunk-TZMSLE5B-ok9YQuUI.js} +1 -1
  271. package/dist/ui/assets/chunk-TZMSLE5B-ok9YQuUI.js.gz +0 -0
  272. package/dist/ui/assets/classDiagram-2ON5EDUG-DeHTLUto.js +1 -0
  273. package/dist/ui/assets/classDiagram-v2-WZHVMYZB-DeHTLUto.js +1 -0
  274. package/dist/ui/assets/clone-BObtDhw7.js +1 -0
  275. package/dist/ui/assets/{cose-bilkent-S5V4N54A-BA6VY55u.js → cose-bilkent-S5V4N54A-BtanJFqC.js} +1 -1
  276. package/dist/ui/assets/cose-bilkent-S5V4N54A-BtanJFqC.js.gz +0 -0
  277. package/dist/ui/assets/{dagre-6UL2VRFP-DiuqdLez.js → dagre-6UL2VRFP-CIJlfoaz.js} +1 -1
  278. package/dist/ui/assets/dagre-6UL2VRFP-CIJlfoaz.js.gz +0 -0
  279. package/dist/ui/assets/{diagram-PSM6KHXK-DU4u6xZN.js → diagram-PSM6KHXK-DhKlHuZN.js} +1 -1
  280. package/dist/ui/assets/diagram-PSM6KHXK-DhKlHuZN.js.gz +0 -0
  281. package/dist/ui/assets/{diagram-QEK2KX5R-CltgMeel.js → diagram-QEK2KX5R-BbwaTbd7.js} +1 -1
  282. package/dist/ui/assets/diagram-QEK2KX5R-BbwaTbd7.js.gz +0 -0
  283. package/dist/ui/assets/{diagram-S2PKOQOG-SkvAVcTN.js → diagram-S2PKOQOG-Dx1rRlHZ.js} +1 -1
  284. package/dist/ui/assets/diagram-S2PKOQOG-Dx1rRlHZ.js.gz +0 -0
  285. package/dist/ui/assets/{erDiagram-Q2GNP2WA-DJTHxEdE.js → erDiagram-Q2GNP2WA-w60Up3Mg.js} +1 -1
  286. package/dist/ui/assets/erDiagram-Q2GNP2WA-w60Up3Mg.js.gz +0 -0
  287. package/dist/ui/assets/{flowDiagram-NV44I4VS-BwrFtsSc.js → flowDiagram-NV44I4VS-yvyTqNEi.js} +1 -1
  288. package/dist/ui/assets/flowDiagram-NV44I4VS-yvyTqNEi.js.gz +0 -0
  289. package/dist/ui/assets/{ganttDiagram-LVOFAZNH-BnGmdiBB.js → ganttDiagram-LVOFAZNH-NBBWMpCB.js} +1 -1
  290. package/dist/ui/assets/ganttDiagram-LVOFAZNH-NBBWMpCB.js.gz +0 -0
  291. package/dist/ui/assets/{gitGraphDiagram-NY62KEGX-V6mHZ2jy.js → gitGraphDiagram-NY62KEGX-Dc0qrZJi.js} +1 -1
  292. package/dist/ui/assets/gitGraphDiagram-NY62KEGX-Dc0qrZJi.js.gz +0 -0
  293. package/dist/ui/assets/{graph-3Ks94Pqc.js → graph-RIZM2qth.js} +1 -1
  294. package/dist/ui/assets/graph-RIZM2qth.js.gz +0 -0
  295. package/dist/ui/assets/{index-Dl_jng3-.js → index-BcHc8U_m.js} +240 -240
  296. package/dist/ui/assets/index-BcHc8U_m.js.gz +0 -0
  297. package/dist/ui/assets/index-BjxbtAmt.css +1 -0
  298. package/dist/ui/assets/index-BjxbtAmt.css.gz +0 -0
  299. package/dist/ui/assets/{infoDiagram-ER5ION4S-DUuNVOek.js → infoDiagram-ER5ION4S-Co1qQ3-G.js} +1 -1
  300. package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-D-N__rLx.js → journeyDiagram-XKPGCS4Q-QaBi_wAx.js} +1 -1
  301. package/dist/ui/assets/journeyDiagram-XKPGCS4Q-QaBi_wAx.js.gz +0 -0
  302. package/dist/ui/assets/{kanban-definition-3W4ZIXB7-DsPDRbRp.js → kanban-definition-3W4ZIXB7-B3k5rpP3.js} +1 -1
  303. package/dist/ui/assets/kanban-definition-3W4ZIXB7-B3k5rpP3.js.gz +0 -0
  304. package/dist/ui/assets/{layout-TuyQIiWI.js → layout-YqNNovOM.js} +1 -1
  305. package/dist/ui/assets/layout-YqNNovOM.js.gz +0 -0
  306. package/dist/ui/assets/{linear-CQUCx9aD.js → linear-DpjTIW7z.js} +1 -1
  307. package/dist/ui/assets/linear-DpjTIW7z.js.gz +0 -0
  308. package/dist/ui/assets/{mermaid.core-HQwFIIbn.js → mermaid.core-D-fYaKXC.js} +5 -5
  309. package/dist/ui/assets/mermaid.core-D-fYaKXC.js.gz +0 -0
  310. package/dist/ui/assets/{mindmap-definition-VGOIOE7T-DlR4HpYx.js → mindmap-definition-VGOIOE7T-CddQalgD.js} +1 -1
  311. package/dist/ui/assets/mindmap-definition-VGOIOE7T-CddQalgD.js.gz +0 -0
  312. package/dist/ui/assets/{pieDiagram-ADFJNKIX-OfCYTJ7S.js → pieDiagram-ADFJNKIX-BCPzhaBq.js} +1 -1
  313. package/dist/ui/assets/pieDiagram-ADFJNKIX-BCPzhaBq.js.gz +0 -0
  314. package/dist/ui/assets/{quadrantDiagram-AYHSOK5B--irB7LvR.js → quadrantDiagram-AYHSOK5B-DrdJW-2E.js} +1 -1
  315. package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DrdJW-2E.js.gz +0 -0
  316. package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-iPensRLV.js → requirementDiagram-UZGBJVZJ-dV0cdx6D.js} +1 -1
  317. package/dist/ui/assets/requirementDiagram-UZGBJVZJ-dV0cdx6D.js.gz +0 -0
  318. package/dist/ui/assets/{sankeyDiagram-TZEHDZUN-BSidESLx.js → sankeyDiagram-TZEHDZUN-SLmqiy7a.js} +1 -1
  319. package/dist/ui/assets/sankeyDiagram-TZEHDZUN-SLmqiy7a.js.gz +0 -0
  320. package/dist/ui/assets/{sequenceDiagram-WL72ISMW-BUE46svP.js → sequenceDiagram-WL72ISMW-CyH5EbRm.js} +1 -1
  321. package/dist/ui/assets/sequenceDiagram-WL72ISMW-CyH5EbRm.js.gz +0 -0
  322. package/dist/ui/assets/{stateDiagram-FKZM4ZOC-BJ2azfLs.js → stateDiagram-FKZM4ZOC-DbtBIYM6.js} +1 -1
  323. package/dist/ui/assets/stateDiagram-FKZM4ZOC-DbtBIYM6.js.gz +0 -0
  324. package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-DOAHUeXQ.js +1 -0
  325. package/dist/ui/assets/{timeline-definition-IT6M3QCI-YfwKc8ip.js → timeline-definition-IT6M3QCI-CzdpjKni.js} +1 -1
  326. package/dist/ui/assets/timeline-definition-IT6M3QCI-CzdpjKni.js.gz +0 -0
  327. package/dist/ui/assets/{treemap-KMMF4GRG-DMpxEEn1.js → treemap-KMMF4GRG-D_MXp3HZ.js} +1 -1
  328. package/dist/ui/assets/treemap-KMMF4GRG-D_MXp3HZ.js.gz +0 -0
  329. package/dist/ui/assets/{xychartDiagram-PRI3JC2R-Bn_I2TeN.js → xychartDiagram-PRI3JC2R-BMwyKz4M.js} +1 -1
  330. package/dist/ui/assets/xychartDiagram-PRI3JC2R-BMwyKz4M.js.gz +0 -0
  331. package/dist/ui/index.html +2 -2
  332. package/package.json +1 -1
  333. package/dist/ui/assets/_basePickBy-a0JoJgXO.js.gz +0 -0
  334. package/dist/ui/assets/_baseUniq-IFulW561.js.gz +0 -0
  335. package/dist/ui/assets/arc-Dj6SyPh6.js.gz +0 -0
  336. package/dist/ui/assets/c4Diagram-YG6GDRKO-qL4Ujfnz.js.gz +0 -0
  337. package/dist/ui/assets/channel-4SJF66Rh.js +0 -1
  338. package/dist/ui/assets/chunk-B4BG7PRW-BDSu72O0.js.gz +0 -0
  339. package/dist/ui/assets/chunk-DI55MBZ5-C7merGRo.js.gz +0 -0
  340. package/dist/ui/assets/chunk-TZMSLE5B-BV4XHxKb.js.gz +0 -0
  341. package/dist/ui/assets/classDiagram-2ON5EDUG-BLjqJ_M9.js +0 -1
  342. package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BLjqJ_M9.js +0 -1
  343. package/dist/ui/assets/clone-DjR0SEZ0.js +0 -1
  344. package/dist/ui/assets/cose-bilkent-S5V4N54A-BA6VY55u.js.gz +0 -0
  345. package/dist/ui/assets/dagre-6UL2VRFP-DiuqdLez.js.gz +0 -0
  346. package/dist/ui/assets/diagram-PSM6KHXK-DU4u6xZN.js.gz +0 -0
  347. package/dist/ui/assets/diagram-QEK2KX5R-CltgMeel.js.gz +0 -0
  348. package/dist/ui/assets/diagram-S2PKOQOG-SkvAVcTN.js.gz +0 -0
  349. package/dist/ui/assets/erDiagram-Q2GNP2WA-DJTHxEdE.js.gz +0 -0
  350. package/dist/ui/assets/flowDiagram-NV44I4VS-BwrFtsSc.js.gz +0 -0
  351. package/dist/ui/assets/ganttDiagram-LVOFAZNH-BnGmdiBB.js.gz +0 -0
  352. package/dist/ui/assets/gitGraphDiagram-NY62KEGX-V6mHZ2jy.js.gz +0 -0
  353. package/dist/ui/assets/graph-3Ks94Pqc.js.gz +0 -0
  354. package/dist/ui/assets/index-CoHRmHKF.css +0 -1
  355. package/dist/ui/assets/index-CoHRmHKF.css.gz +0 -0
  356. package/dist/ui/assets/index-Dl_jng3-.js.gz +0 -0
  357. package/dist/ui/assets/journeyDiagram-XKPGCS4Q-D-N__rLx.js.gz +0 -0
  358. package/dist/ui/assets/kanban-definition-3W4ZIXB7-DsPDRbRp.js.gz +0 -0
  359. package/dist/ui/assets/layout-TuyQIiWI.js.gz +0 -0
  360. package/dist/ui/assets/linear-CQUCx9aD.js.gz +0 -0
  361. package/dist/ui/assets/mermaid.core-HQwFIIbn.js.gz +0 -0
  362. package/dist/ui/assets/mindmap-definition-VGOIOE7T-DlR4HpYx.js.gz +0 -0
  363. package/dist/ui/assets/pieDiagram-ADFJNKIX-OfCYTJ7S.js.gz +0 -0
  364. package/dist/ui/assets/quadrantDiagram-AYHSOK5B--irB7LvR.js.gz +0 -0
  365. package/dist/ui/assets/requirementDiagram-UZGBJVZJ-iPensRLV.js.gz +0 -0
  366. package/dist/ui/assets/sankeyDiagram-TZEHDZUN-BSidESLx.js.gz +0 -0
  367. package/dist/ui/assets/sequenceDiagram-WL72ISMW-BUE46svP.js.gz +0 -0
  368. package/dist/ui/assets/stateDiagram-FKZM4ZOC-BJ2azfLs.js.gz +0 -0
  369. package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-B9Lx1w-S.js +0 -1
  370. package/dist/ui/assets/timeline-definition-IT6M3QCI-YfwKc8ip.js.gz +0 -0
  371. package/dist/ui/assets/treemap-KMMF4GRG-DMpxEEn1.js.gz +0 -0
  372. package/dist/ui/assets/xychartDiagram-PRI3JC2R-Bn_I2TeN.js.gz +0 -0
@@ -117,7 +117,7 @@
117
117
  {
118
118
  "idx": 16,
119
119
  "version": "7",
120
- "when": 1770600000000,
120
+ "when": 1770625490438,
121
121
  "tag": "0016_fix_thread_session_map_fk_cascade",
122
122
  "breakpoints": true
123
123
  }
@@ -173,7 +173,7 @@
173
173
  {
174
174
  "idx": 26,
175
175
  "version": "6",
176
- "when": 1770600000000,
176
+ "when": 1770625490438,
177
177
  "tag": "0026_fix_thread_session_map_fk_cascade",
178
178
  "breakpoints": true
179
179
  }
@@ -1,4 +1,4 @@
1
- import { f as Session } from './session-Da9rf6n5.js';
1
+ import { f as Session } from './session-DLVkt-jY.js';
2
2
  import { d as Worktree } from './worktree-BR7Inm0-.js';
3
3
  import { Params, HookContext as HookContext$1, Paginated } from '@feathersjs/feathers';
4
4
 
@@ -1,4 +1,4 @@
1
- import { f as Session } from './session-Bt9i9089.cjs';
1
+ import { f as Session } from './session-BJbTzw3y.cjs';
2
2
  import { d as Worktree } from './worktree-hZImhblR.cjs';
3
3
  import { Params, HookContext as HookContext$1, Paginated } from '@feathersjs/feathers';
4
4
 
@@ -54,6 +54,7 @@ var SlackConnector = class {
54
54
  web;
55
55
  socketMode = null;
56
56
  config;
57
+ botUserId = null;
57
58
  constructor(config) {
58
59
  this.config = config;
59
60
  if (!this.config.bot_token) {
@@ -74,6 +75,7 @@ var SlackConnector = class {
74
75
  unfurl_media: false
75
76
  });
76
77
  if (!result.ok || !result.ts) {
78
+ console.error(`[slack] Message send failed: ${result.error}`);
77
79
  throw new Error(`Slack API error: ${result.error ?? "unknown error"}`);
78
80
  }
79
81
  return result.ts;
@@ -81,43 +83,164 @@ var SlackConnector = class {
81
83
  /**
82
84
  * Start listening for inbound messages via Socket Mode
83
85
  *
84
- * Requires app_token in config. Filters for messages that
85
- * mention the bot or are direct messages.
86
+ * Requires app_token in config. Filters messages based on config:
87
+ * - Direct messages (always enabled)
88
+ * - Public channels (if enable_channels = true)
89
+ * - Private channels (if enable_groups = true)
90
+ * - Group DMs (if enable_mpim = true)
91
+ * - Mention requirement (if require_mention = true)
92
+ * - Channel whitelist (if allowed_channel_ids is set)
86
93
  */
87
94
  async startListening(callback) {
95
+ console.log("[slack] startListening called");
88
96
  if (!this.config.app_token) {
97
+ console.error("[slack] ERROR: app_token is missing from config");
89
98
  throw new Error("Slack Socket Mode requires app_token in config");
90
99
  }
100
+ console.log("[slack] Creating SocketModeClient...");
91
101
  this.socketMode = new import_socket_mode.SocketModeClient({
92
102
  appToken: this.config.app_token
93
103
  });
104
+ let botMentionPattern = null;
105
+ let botMentionReplacePattern = null;
106
+ try {
107
+ console.log("[slack] Testing bot token with auth.test()...");
108
+ const authTest = await this.web.auth.test();
109
+ this.botUserId = authTest.user_id;
110
+ botMentionPattern = new RegExp(`<@${this.botUserId}>`);
111
+ botMentionReplacePattern = new RegExp(`<@${this.botUserId}>\\s*`, "g");
112
+ console.log(`[slack] Bot user ID: ${this.botUserId}`);
113
+ console.log(
114
+ `[slack] Bot auth test successful - team: ${authTest.team}, user: ${authTest.user}`
115
+ );
116
+ } catch (error) {
117
+ console.error("[slack] Failed to fetch bot user ID:", error);
118
+ console.error("[slack] This usually means the bot_token is invalid or expired");
119
+ console.warn("[slack] Mention detection will be disabled");
120
+ }
121
+ const enableChannels = this.config.enable_channels ?? false;
122
+ const enableGroups = this.config.enable_groups ?? false;
123
+ const enableMpim = this.config.enable_mpim ?? false;
124
+ const requireMention = this.config.require_mention ?? true;
125
+ const allowThreadRepliesWithoutMention = this.config.allow_thread_replies_without_mention ?? true;
126
+ let allowedChannelIds;
127
+ if (this.config.allowed_channel_ids) {
128
+ if (Array.isArray(this.config.allowed_channel_ids)) {
129
+ allowedChannelIds = this.config.allowed_channel_ids.filter(
130
+ (id) => typeof id === "string"
131
+ );
132
+ } else if (typeof this.config.allowed_channel_ids === "string") {
133
+ allowedChannelIds = [this.config.allowed_channel_ids];
134
+ } else {
135
+ console.warn(
136
+ "[slack] Invalid allowed_channel_ids config (not array or string). Ignoring whitelist."
137
+ );
138
+ allowedChannelIds = void 0;
139
+ }
140
+ }
141
+ console.log("[slack] Message source config:", {
142
+ enableChannels,
143
+ enableGroups,
144
+ enableMpim,
145
+ requireMention,
146
+ allowedChannelIds: allowedChannelIds?.length || 0
147
+ });
94
148
  this.socketMode.on("slack_event", async ({ type, body, ack }) => {
95
- console.log(`[slack] Received event type="${type}" subtype="${body?.event?.type}"`);
96
- if (type !== "events_api" || body?.event?.type !== "message") {
149
+ if (type !== "events_api") {
97
150
  await ack();
98
151
  return;
99
152
  }
100
- await ack();
101
- const event = body.event;
102
- if (event.channel_type && event.channel_type !== "im") {
103
- console.log(`[slack] Skipping non-DM message (channel_type=${event.channel_type})`);
153
+ const eventType = body?.event?.type;
154
+ if (eventType !== "message" && eventType !== "app_mention") {
155
+ await ack();
104
156
  return;
105
157
  }
158
+ await ack();
159
+ const event = body.event;
160
+ console.log(
161
+ `[slack] Processing ${eventType} event - channel: ${event.channel}, channel_type: ${event.channel_type}`
162
+ );
106
163
  if (event.bot_id || event.subtype === "bot_message") {
107
164
  console.log("[slack] Skipping bot message");
108
165
  return;
109
166
  }
110
- if (event.subtype) {
111
- console.log(`[slack] Skipping message subtype="${event.subtype}"`);
167
+ if (eventType === "message" && event.subtype) {
168
+ return;
169
+ }
170
+ const isThreadReply = !!event.thread_ts;
171
+ const isChannelMessage = event.channel_type === "channel" || event.channel_type === "group";
172
+ if (isChannelMessage && !botMentionPattern) {
173
+ if (eventType === "message" && requireMention) {
174
+ console.warn(
175
+ "[slack] Bot ID unavailable, require_mention=true - skipping message event (will use app_mention)"
176
+ );
177
+ return;
178
+ }
179
+ if (eventType === "app_mention" && !requireMention) {
180
+ console.warn(
181
+ "[slack] Bot ID unavailable, require_mention=false - skipping app_mention (will use message)"
182
+ );
183
+ return;
184
+ }
185
+ }
186
+ if (eventType === "message" && isChannelMessage && botMentionPattern) {
187
+ const hasMention = botMentionPattern.test(event.text ?? "");
188
+ if (hasMention) {
189
+ return;
190
+ }
191
+ }
192
+ const channelType = event.channel_type;
193
+ if (!channelType) {
194
+ console.warn(
195
+ `[slack] Message event missing channel_type for channel ${event.channel}. Treating as DM (safest default).`
196
+ );
197
+ }
198
+ if (!channelType || channelType === "im") {
199
+ } else if (channelType === "channel" && !enableChannels) {
112
200
  return;
201
+ } else if (channelType === "group" && !enableGroups) {
202
+ return;
203
+ } else if (channelType === "mpim" && !enableMpim) {
204
+ return;
205
+ } else if (channelType !== "im" && channelType !== "channel" && channelType !== "group" && channelType !== "mpim") {
206
+ console.warn(`[slack] Unknown channel_type="${channelType}"`);
207
+ return;
208
+ }
209
+ if (allowedChannelIds && allowedChannelIds.length > 0) {
210
+ if (!allowedChannelIds.includes(event.channel)) {
211
+ return;
212
+ }
213
+ }
214
+ let messageText = event.text ?? "";
215
+ if (requireMention) {
216
+ if (!botMentionPattern || !botMentionReplacePattern) {
217
+ if (eventType === "app_mention") {
218
+ } else {
219
+ console.warn(
220
+ "[slack] Cannot enforce mention requirement (bot user ID not available). Rejecting message event."
221
+ );
222
+ return;
223
+ }
224
+ } else {
225
+ const hasMention = botMentionPattern.test(messageText);
226
+ if (!hasMention) {
227
+ if (isThreadReply && allowThreadRepliesWithoutMention) {
228
+ } else {
229
+ return;
230
+ }
231
+ }
232
+ if (hasMention) {
233
+ messageText = messageText.replace(botMentionReplacePattern, "").trim();
234
+ }
235
+ }
113
236
  }
114
237
  const threadId = event.thread_ts ? `${event.channel}-${event.thread_ts}` : `${event.channel}-${event.ts}`;
115
238
  console.log(
116
- `[slack] Inbound message: thread=${threadId} user=${event.user} text="${event.text?.substring(0, 50)}"`
239
+ `[slack] Inbound message: thread=${threadId} channel_type=${channelType} user=${event.user}`
117
240
  );
118
241
  callback({
119
242
  threadId,
120
- text: event.text ?? "",
243
+ text: messageText,
121
244
  userId: event.user ?? "unknown",
122
245
  timestamp: event.ts ?? (/* @__PURE__ */ new Date()).toISOString(),
123
246
  metadata: {
@@ -126,7 +249,9 @@ var SlackConnector = class {
126
249
  }
127
250
  });
128
251
  });
252
+ console.log("[slack] Starting Socket Mode client...");
129
253
  await this.socketMode.start();
254
+ console.log("[slack] Socket Mode client connected successfully!");
130
255
  }
131
256
  /**
132
257
  * Stop Socket Mode listener
@@ -1,8 +1,8 @@
1
- import { C as ChannelType } from '../gateway-DGNtjRnd.cjs';
2
- import '../session-Bt9i9089.cjs';
1
+ import { C as ChannelType } from '../gateway-C2NOdrxu.cjs';
2
+ import '../session-BJbTzw3y.cjs';
3
3
  import '../id-BwPJtWxW.cjs';
4
4
  import '../context-ByxGjp5l.cjs';
5
- import '../user-C5id0Zhj.cjs';
5
+ import '../user-LBRon9n1.cjs';
6
6
 
7
7
  /**
8
8
  * Gateway Connector Interface
@@ -81,7 +81,17 @@ declare function hasConnector(channelType: ChannelType): boolean;
81
81
  * inbound messages via Socket Mode.
82
82
  *
83
83
  * Config shape (stored encrypted in gateway_channels.config):
84
- * { bot_token: string, app_token?: string, default_channel?: string }
84
+ * {
85
+ * bot_token: string,
86
+ * app_token?: string,
87
+ * default_channel?: string,
88
+ * enable_channels?: boolean, // Listen in public channels
89
+ * enable_groups?: boolean, // Listen in private channels
90
+ * enable_mpim?: boolean, // Listen in group DMs
91
+ * require_mention?: boolean, // Require @mention in channels
92
+ * allow_thread_replies_without_mention?: boolean, // Allow thread replies without @mention (default: true)
93
+ * allowed_channel_ids?: string[] // Channel ID whitelist
94
+ * }
85
95
  *
86
96
  * Thread ID format: "{channel_id}-{thread_ts}"
87
97
  * e.g. "C07ABC123-1707340800.123456"
@@ -92,6 +102,7 @@ declare class SlackConnector implements GatewayConnector {
92
102
  private web;
93
103
  private socketMode;
94
104
  private config;
105
+ private botUserId;
95
106
  constructor(config: Record<string, unknown>);
96
107
  /**
97
108
  * Send a message to a Slack thread
@@ -104,8 +115,13 @@ declare class SlackConnector implements GatewayConnector {
104
115
  /**
105
116
  * Start listening for inbound messages via Socket Mode
106
117
  *
107
- * Requires app_token in config. Filters for messages that
108
- * mention the bot or are direct messages.
118
+ * Requires app_token in config. Filters messages based on config:
119
+ * - Direct messages (always enabled)
120
+ * - Public channels (if enable_channels = true)
121
+ * - Private channels (if enable_groups = true)
122
+ * - Group DMs (if enable_mpim = true)
123
+ * - Mention requirement (if require_mention = true)
124
+ * - Channel whitelist (if allowed_channel_ids is set)
109
125
  */
110
126
  startListening(callback: (msg: InboundMessage) => void): Promise<void>;
111
127
  /**
@@ -1,8 +1,8 @@
1
- import { C as ChannelType } from '../gateway-Dy9fVyiS.js';
2
- import '../session-Da9rf6n5.js';
1
+ import { C as ChannelType } from '../gateway-B4CaePYV.js';
2
+ import '../session-DLVkt-jY.js';
3
3
  import '../id-BwPJtWxW.js';
4
4
  import '../context-ByxGjp5l.js';
5
- import '../user-DT1Qzfep.js';
5
+ import '../user-B77oCF14.js';
6
6
 
7
7
  /**
8
8
  * Gateway Connector Interface
@@ -81,7 +81,17 @@ declare function hasConnector(channelType: ChannelType): boolean;
81
81
  * inbound messages via Socket Mode.
82
82
  *
83
83
  * Config shape (stored encrypted in gateway_channels.config):
84
- * { bot_token: string, app_token?: string, default_channel?: string }
84
+ * {
85
+ * bot_token: string,
86
+ * app_token?: string,
87
+ * default_channel?: string,
88
+ * enable_channels?: boolean, // Listen in public channels
89
+ * enable_groups?: boolean, // Listen in private channels
90
+ * enable_mpim?: boolean, // Listen in group DMs
91
+ * require_mention?: boolean, // Require @mention in channels
92
+ * allow_thread_replies_without_mention?: boolean, // Allow thread replies without @mention (default: true)
93
+ * allowed_channel_ids?: string[] // Channel ID whitelist
94
+ * }
85
95
  *
86
96
  * Thread ID format: "{channel_id}-{thread_ts}"
87
97
  * e.g. "C07ABC123-1707340800.123456"
@@ -92,6 +102,7 @@ declare class SlackConnector implements GatewayConnector {
92
102
  private web;
93
103
  private socketMode;
94
104
  private config;
105
+ private botUserId;
95
106
  constructor(config: Record<string, unknown>);
96
107
  /**
97
108
  * Send a message to a Slack thread
@@ -104,8 +115,13 @@ declare class SlackConnector implements GatewayConnector {
104
115
  /**
105
116
  * Start listening for inbound messages via Socket Mode
106
117
  *
107
- * Requires app_token in config. Filters for messages that
108
- * mention the bot or are direct messages.
118
+ * Requires app_token in config. Filters messages based on config:
119
+ * - Direct messages (always enabled)
120
+ * - Public channels (if enable_channels = true)
121
+ * - Private channels (if enable_groups = true)
122
+ * - Group DMs (if enable_mpim = true)
123
+ * - Mention requirement (if require_mention = true)
124
+ * - Channel whitelist (if allowed_channel_ids is set)
109
125
  */
110
126
  startListening(callback: (msg: InboundMessage) => void): Promise<void>;
111
127
  /**
@@ -25,6 +25,7 @@ var SlackConnector = class {
25
25
  web;
26
26
  socketMode = null;
27
27
  config;
28
+ botUserId = null;
28
29
  constructor(config) {
29
30
  this.config = config;
30
31
  if (!this.config.bot_token) {
@@ -45,6 +46,7 @@ var SlackConnector = class {
45
46
  unfurl_media: false
46
47
  });
47
48
  if (!result.ok || !result.ts) {
49
+ console.error(`[slack] Message send failed: ${result.error}`);
48
50
  throw new Error(`Slack API error: ${result.error ?? "unknown error"}`);
49
51
  }
50
52
  return result.ts;
@@ -52,43 +54,164 @@ var SlackConnector = class {
52
54
  /**
53
55
  * Start listening for inbound messages via Socket Mode
54
56
  *
55
- * Requires app_token in config. Filters for messages that
56
- * mention the bot or are direct messages.
57
+ * Requires app_token in config. Filters messages based on config:
58
+ * - Direct messages (always enabled)
59
+ * - Public channels (if enable_channels = true)
60
+ * - Private channels (if enable_groups = true)
61
+ * - Group DMs (if enable_mpim = true)
62
+ * - Mention requirement (if require_mention = true)
63
+ * - Channel whitelist (if allowed_channel_ids is set)
57
64
  */
58
65
  async startListening(callback) {
66
+ console.log("[slack] startListening called");
59
67
  if (!this.config.app_token) {
68
+ console.error("[slack] ERROR: app_token is missing from config");
60
69
  throw new Error("Slack Socket Mode requires app_token in config");
61
70
  }
71
+ console.log("[slack] Creating SocketModeClient...");
62
72
  this.socketMode = new SocketModeClient({
63
73
  appToken: this.config.app_token
64
74
  });
75
+ let botMentionPattern = null;
76
+ let botMentionReplacePattern = null;
77
+ try {
78
+ console.log("[slack] Testing bot token with auth.test()...");
79
+ const authTest = await this.web.auth.test();
80
+ this.botUserId = authTest.user_id;
81
+ botMentionPattern = new RegExp(`<@${this.botUserId}>`);
82
+ botMentionReplacePattern = new RegExp(`<@${this.botUserId}>\\s*`, "g");
83
+ console.log(`[slack] Bot user ID: ${this.botUserId}`);
84
+ console.log(
85
+ `[slack] Bot auth test successful - team: ${authTest.team}, user: ${authTest.user}`
86
+ );
87
+ } catch (error) {
88
+ console.error("[slack] Failed to fetch bot user ID:", error);
89
+ console.error("[slack] This usually means the bot_token is invalid or expired");
90
+ console.warn("[slack] Mention detection will be disabled");
91
+ }
92
+ const enableChannels = this.config.enable_channels ?? false;
93
+ const enableGroups = this.config.enable_groups ?? false;
94
+ const enableMpim = this.config.enable_mpim ?? false;
95
+ const requireMention = this.config.require_mention ?? true;
96
+ const allowThreadRepliesWithoutMention = this.config.allow_thread_replies_without_mention ?? true;
97
+ let allowedChannelIds;
98
+ if (this.config.allowed_channel_ids) {
99
+ if (Array.isArray(this.config.allowed_channel_ids)) {
100
+ allowedChannelIds = this.config.allowed_channel_ids.filter(
101
+ (id) => typeof id === "string"
102
+ );
103
+ } else if (typeof this.config.allowed_channel_ids === "string") {
104
+ allowedChannelIds = [this.config.allowed_channel_ids];
105
+ } else {
106
+ console.warn(
107
+ "[slack] Invalid allowed_channel_ids config (not array or string). Ignoring whitelist."
108
+ );
109
+ allowedChannelIds = void 0;
110
+ }
111
+ }
112
+ console.log("[slack] Message source config:", {
113
+ enableChannels,
114
+ enableGroups,
115
+ enableMpim,
116
+ requireMention,
117
+ allowedChannelIds: allowedChannelIds?.length || 0
118
+ });
65
119
  this.socketMode.on("slack_event", async ({ type, body, ack }) => {
66
- console.log(`[slack] Received event type="${type}" subtype="${body?.event?.type}"`);
67
- if (type !== "events_api" || body?.event?.type !== "message") {
120
+ if (type !== "events_api") {
68
121
  await ack();
69
122
  return;
70
123
  }
71
- await ack();
72
- const event = body.event;
73
- if (event.channel_type && event.channel_type !== "im") {
74
- console.log(`[slack] Skipping non-DM message (channel_type=${event.channel_type})`);
124
+ const eventType = body?.event?.type;
125
+ if (eventType !== "message" && eventType !== "app_mention") {
126
+ await ack();
75
127
  return;
76
128
  }
129
+ await ack();
130
+ const event = body.event;
131
+ console.log(
132
+ `[slack] Processing ${eventType} event - channel: ${event.channel}, channel_type: ${event.channel_type}`
133
+ );
77
134
  if (event.bot_id || event.subtype === "bot_message") {
78
135
  console.log("[slack] Skipping bot message");
79
136
  return;
80
137
  }
81
- if (event.subtype) {
82
- console.log(`[slack] Skipping message subtype="${event.subtype}"`);
138
+ if (eventType === "message" && event.subtype) {
139
+ return;
140
+ }
141
+ const isThreadReply = !!event.thread_ts;
142
+ const isChannelMessage = event.channel_type === "channel" || event.channel_type === "group";
143
+ if (isChannelMessage && !botMentionPattern) {
144
+ if (eventType === "message" && requireMention) {
145
+ console.warn(
146
+ "[slack] Bot ID unavailable, require_mention=true - skipping message event (will use app_mention)"
147
+ );
148
+ return;
149
+ }
150
+ if (eventType === "app_mention" && !requireMention) {
151
+ console.warn(
152
+ "[slack] Bot ID unavailable, require_mention=false - skipping app_mention (will use message)"
153
+ );
154
+ return;
155
+ }
156
+ }
157
+ if (eventType === "message" && isChannelMessage && botMentionPattern) {
158
+ const hasMention = botMentionPattern.test(event.text ?? "");
159
+ if (hasMention) {
160
+ return;
161
+ }
162
+ }
163
+ const channelType = event.channel_type;
164
+ if (!channelType) {
165
+ console.warn(
166
+ `[slack] Message event missing channel_type for channel ${event.channel}. Treating as DM (safest default).`
167
+ );
168
+ }
169
+ if (!channelType || channelType === "im") {
170
+ } else if (channelType === "channel" && !enableChannels) {
83
171
  return;
172
+ } else if (channelType === "group" && !enableGroups) {
173
+ return;
174
+ } else if (channelType === "mpim" && !enableMpim) {
175
+ return;
176
+ } else if (channelType !== "im" && channelType !== "channel" && channelType !== "group" && channelType !== "mpim") {
177
+ console.warn(`[slack] Unknown channel_type="${channelType}"`);
178
+ return;
179
+ }
180
+ if (allowedChannelIds && allowedChannelIds.length > 0) {
181
+ if (!allowedChannelIds.includes(event.channel)) {
182
+ return;
183
+ }
184
+ }
185
+ let messageText = event.text ?? "";
186
+ if (requireMention) {
187
+ if (!botMentionPattern || !botMentionReplacePattern) {
188
+ if (eventType === "app_mention") {
189
+ } else {
190
+ console.warn(
191
+ "[slack] Cannot enforce mention requirement (bot user ID not available). Rejecting message event."
192
+ );
193
+ return;
194
+ }
195
+ } else {
196
+ const hasMention = botMentionPattern.test(messageText);
197
+ if (!hasMention) {
198
+ if (isThreadReply && allowThreadRepliesWithoutMention) {
199
+ } else {
200
+ return;
201
+ }
202
+ }
203
+ if (hasMention) {
204
+ messageText = messageText.replace(botMentionReplacePattern, "").trim();
205
+ }
206
+ }
84
207
  }
85
208
  const threadId = event.thread_ts ? `${event.channel}-${event.thread_ts}` : `${event.channel}-${event.ts}`;
86
209
  console.log(
87
- `[slack] Inbound message: thread=${threadId} user=${event.user} text="${event.text?.substring(0, 50)}"`
210
+ `[slack] Inbound message: thread=${threadId} channel_type=${channelType} user=${event.user}`
88
211
  );
89
212
  callback({
90
213
  threadId,
91
- text: event.text ?? "",
214
+ text: messageText,
92
215
  userId: event.user ?? "unknown",
93
216
  timestamp: event.ts ?? (/* @__PURE__ */ new Date()).toISOString(),
94
217
  metadata: {
@@ -97,7 +220,9 @@ var SlackConnector = class {
97
220
  }
98
221
  });
99
222
  });
223
+ console.log("[slack] Starting Socket Mode client...");
100
224
  await this.socketMode.start();
225
+ console.log("[slack] Socket Mode client connected successfully!");
101
226
  }
102
227
  /**
103
228
  * Stop Socket Mode listener
@@ -1,6 +1,6 @@
1
- import { A as AgenticToolName, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from './session-Da9rf6n5.js';
1
+ import { A as AgenticToolName, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from './session-DLVkt-jY.js';
2
2
  import { U as UUID, W as WorktreeID, b as UserID, a as SessionID } from './id-BwPJtWxW.js';
3
- import { D as DefaultModelConfig } from './user-DT1Qzfep.js';
3
+ import { D as DefaultModelConfig } from './user-B77oCF14.js';
4
4
 
5
5
  /**
6
6
  * Gateway Service Types
@@ -1,6 +1,6 @@
1
- import { A as AgenticToolName, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from './session-Bt9i9089.cjs';
1
+ import { A as AgenticToolName, P as PermissionMode, c as CodexSandboxMode, d as CodexApprovalPolicy } from './session-BJbTzw3y.cjs';
2
2
  import { U as UUID, W as WorktreeID, b as UserID, a as SessionID } from './id-BwPJtWxW.cjs';
3
- import { D as DefaultModelConfig } from './user-C5id0Zhj.cjs';
3
+ import { D as DefaultModelConfig } from './user-LBRon9n1.cjs';
4
4
 
5
5
  /**
6
6
  * Gateway Service Types
@@ -1,6 +1,6 @@
1
1
  export { simpleGit } from 'simple-git';
2
- export { t as getReposDir, w as getWorktreePath, v as getWorktreesDir } from '../config-manager-sCgziLkz.cjs';
3
- import '../types-D_wAaaE3.cjs';
2
+ export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-CsBk-Rh2.cjs';
3
+ import '../types-Ddri21rw.cjs';
4
4
 
5
5
  /**
6
6
  * Git Utils for Agor
@@ -1,6 +1,6 @@
1
1
  export { simpleGit } from 'simple-git';
2
- export { t as getReposDir, w as getWorktreePath, v as getWorktreesDir } from '../config-manager-DGBdhxtZ.js';
3
- import '../types-D_wAaaE3.js';
2
+ export { v as getReposDir, x as getWorktreePath, w as getWorktreesDir } from '../config-manager-BLDGbZHT.js';
3
+ import '../types-Ddri21rw.js';
4
4
 
5
5
  /**
6
6
  * Git Utils for Agor