beecork 1.3.0 → 1.3.2

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 (415) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +154 -0
  3. package/dist/capabilities/index.d.ts +0 -1
  4. package/dist/capabilities/index.js +0 -1
  5. package/dist/capabilities/manager.d.ts +0 -1
  6. package/dist/capabilities/manager.js +0 -1
  7. package/dist/capabilities/packs.d.ts +0 -1
  8. package/dist/capabilities/packs.js +7 -8
  9. package/dist/capabilities/types.d.ts +0 -1
  10. package/dist/capabilities/types.js +0 -1
  11. package/dist/channels/command-handler.d.ts +0 -1
  12. package/dist/channels/command-handler.js +0 -1
  13. package/dist/channels/discord.d.ts +0 -1
  14. package/dist/channels/discord.js +30 -47
  15. package/dist/channels/index.d.ts +0 -1
  16. package/dist/channels/index.js +0 -1
  17. package/dist/channels/loader.d.ts +0 -1
  18. package/dist/channels/loader.js +6 -1
  19. package/dist/channels/pipeline.d.ts +50 -0
  20. package/dist/channels/pipeline.js +83 -0
  21. package/dist/channels/registry.d.ts +0 -1
  22. package/dist/channels/registry.js +0 -1
  23. package/dist/channels/telegram.d.ts +0 -1
  24. package/dist/channels/telegram.js +65 -67
  25. package/dist/channels/types.d.ts +0 -1
  26. package/dist/channels/types.js +0 -1
  27. package/dist/channels/webhook.d.ts +0 -1
  28. package/dist/channels/webhook.js +0 -1
  29. package/dist/channels/whatsapp.d.ts +0 -1
  30. package/dist/channels/whatsapp.js +25 -59
  31. package/dist/cli/capabilities.d.ts +0 -1
  32. package/dist/cli/capabilities.js +0 -1
  33. package/dist/cli/channel.d.ts +0 -1
  34. package/dist/cli/channel.js +1 -2
  35. package/dist/cli/commands.d.ts +0 -1
  36. package/dist/cli/commands.js +9 -3
  37. package/dist/cli/doctor.d.ts +0 -1
  38. package/dist/cli/doctor.js +2 -2
  39. package/dist/cli/handoff.d.ts +0 -1
  40. package/dist/cli/handoff.js +0 -1
  41. package/dist/cli/helpers.d.ts +0 -1
  42. package/dist/cli/helpers.js +0 -1
  43. package/dist/cli/mcp.d.ts +0 -1
  44. package/dist/cli/mcp.js +0 -1
  45. package/dist/cli/media.d.ts +0 -1
  46. package/dist/cli/media.js +0 -1
  47. package/dist/cli/setup.d.ts +0 -1
  48. package/dist/cli/setup.js +11 -11
  49. package/dist/cli/store.d.ts +0 -1
  50. package/dist/cli/store.js +0 -1
  51. package/dist/config.d.ts +0 -1
  52. package/dist/config.js +0 -1
  53. package/dist/daemon.d.ts +0 -1
  54. package/dist/daemon.js +1 -2
  55. package/dist/dashboard/html.d.ts +0 -1
  56. package/dist/dashboard/html.js +45 -38
  57. package/dist/dashboard/server.d.ts +0 -1
  58. package/dist/dashboard/server.js +60 -25
  59. package/dist/db/index.d.ts +11 -1
  60. package/dist/db/index.js +12 -1
  61. package/dist/db/migrations.d.ts +0 -1
  62. package/dist/db/migrations.js +5 -1
  63. package/dist/delegation/manager.d.ts +0 -3
  64. package/dist/delegation/manager.js +0 -5
  65. package/dist/index.d.ts +0 -1
  66. package/dist/index.js +21 -6
  67. package/dist/knowledge/index.d.ts +0 -1
  68. package/dist/knowledge/index.js +0 -1
  69. package/dist/knowledge/manager.d.ts +0 -1
  70. package/dist/knowledge/manager.js +19 -10
  71. package/dist/knowledge/types.d.ts +0 -1
  72. package/dist/knowledge/types.js +0 -1
  73. package/dist/machines/index.d.ts +1 -3
  74. package/dist/machines/index.js +1 -3
  75. package/dist/machines/registry.d.ts +0 -7
  76. package/dist/machines/registry.js +0 -25
  77. package/dist/mcp/server.d.ts +0 -1
  78. package/dist/mcp/server.js +28 -52
  79. package/dist/media/factory.d.ts +0 -1
  80. package/dist/media/factory.js +0 -1
  81. package/dist/media/generators/dall-e.d.ts +0 -1
  82. package/dist/media/generators/dall-e.js +0 -1
  83. package/dist/media/generators/elevenlabs-music.d.ts +0 -1
  84. package/dist/media/generators/elevenlabs-music.js +0 -1
  85. package/dist/media/generators/elevenlabs-sfx.d.ts +0 -1
  86. package/dist/media/generators/elevenlabs-sfx.js +0 -1
  87. package/dist/media/generators/kling.d.ts +0 -1
  88. package/dist/media/generators/kling.js +14 -20
  89. package/dist/media/generators/lyria.d.ts +0 -1
  90. package/dist/media/generators/lyria.js +0 -1
  91. package/dist/media/generators/nano-banana.d.ts +0 -1
  92. package/dist/media/generators/nano-banana.js +0 -1
  93. package/dist/media/generators/poll-util.d.ts +12 -0
  94. package/dist/media/generators/poll-util.js +22 -0
  95. package/dist/media/generators/recraft.d.ts +0 -1
  96. package/dist/media/generators/recraft.js +0 -1
  97. package/dist/media/generators/runway.d.ts +0 -1
  98. package/dist/media/generators/runway.js +14 -23
  99. package/dist/media/generators/stable-diffusion.d.ts +0 -1
  100. package/dist/media/generators/stable-diffusion.js +0 -1
  101. package/dist/media/generators/veo.d.ts +0 -1
  102. package/dist/media/generators/veo.js +0 -1
  103. package/dist/media/index.d.ts +0 -2
  104. package/dist/media/index.js +0 -2
  105. package/dist/media/store.d.ts +0 -1
  106. package/dist/media/store.js +0 -1
  107. package/dist/media/types.d.ts +0 -1
  108. package/dist/media/types.js +0 -1
  109. package/dist/memory/extractor.d.ts +0 -1
  110. package/dist/memory/extractor.js +8 -3
  111. package/dist/notifications/index.d.ts +0 -1
  112. package/dist/notifications/index.js +0 -1
  113. package/dist/notifications/ntfy.d.ts +0 -1
  114. package/dist/notifications/ntfy.js +0 -1
  115. package/dist/notifications/pushover.d.ts +0 -1
  116. package/dist/notifications/pushover.js +0 -1
  117. package/dist/notifications/types.d.ts +0 -1
  118. package/dist/notifications/types.js +0 -1
  119. package/dist/notifications/webhook-provider.d.ts +0 -1
  120. package/dist/notifications/webhook-provider.js +0 -1
  121. package/dist/observability/analytics.d.ts +0 -1
  122. package/dist/observability/analytics.js +0 -1
  123. package/dist/pipe/anthropic-client.d.ts +0 -1
  124. package/dist/pipe/anthropic-client.js +5 -3
  125. package/dist/pipe/brain.d.ts +0 -1
  126. package/dist/pipe/brain.js +0 -1
  127. package/dist/pipe/memory-store.d.ts +0 -1
  128. package/dist/pipe/memory-store.js +0 -1
  129. package/dist/pipe/project-scanner.d.ts +5 -3
  130. package/dist/pipe/project-scanner.js +21 -90
  131. package/dist/pipe/types.d.ts +0 -11
  132. package/dist/pipe/types.js +0 -1
  133. package/dist/projects/index.d.ts +0 -1
  134. package/dist/projects/index.js +0 -1
  135. package/dist/projects/manager.d.ts +0 -1
  136. package/dist/projects/manager.js +0 -1
  137. package/dist/projects/router.d.ts +0 -1
  138. package/dist/projects/router.js +1 -2
  139. package/dist/projects/types.d.ts +0 -7
  140. package/dist/projects/types.js +0 -1
  141. package/dist/service/install.d.ts +0 -1
  142. package/dist/service/install.js +0 -1
  143. package/dist/service/templates.d.ts +0 -1
  144. package/dist/service/templates.js +0 -1
  145. package/dist/service/windows.d.ts +0 -3
  146. package/dist/service/windows.js +0 -11
  147. package/dist/session/circuit-breaker.d.ts +0 -1
  148. package/dist/session/circuit-breaker.js +0 -1
  149. package/dist/session/context-monitor.d.ts +0 -1
  150. package/dist/session/context-monitor.js +0 -1
  151. package/dist/session/manager.d.ts +0 -1
  152. package/dist/session/manager.js +3 -4
  153. package/dist/session/subprocess.d.ts +0 -1
  154. package/dist/session/subprocess.js +0 -1
  155. package/dist/session/tool-classifier.d.ts +0 -1
  156. package/dist/session/tool-classifier.js +0 -1
  157. package/dist/tasks/scheduler.d.ts +0 -3
  158. package/dist/tasks/scheduler.js +4 -7
  159. package/dist/tasks/store.d.ts +0 -3
  160. package/dist/tasks/store.js +0 -3
  161. package/dist/timeline/index.d.ts +0 -1
  162. package/dist/timeline/index.js +0 -1
  163. package/dist/timeline/logger.d.ts +0 -1
  164. package/dist/timeline/logger.js +0 -1
  165. package/dist/timeline/query.d.ts +0 -1
  166. package/dist/timeline/query.js +2 -2
  167. package/dist/timeline/types.d.ts +0 -1
  168. package/dist/timeline/types.js +0 -1
  169. package/dist/types.d.ts +1 -7
  170. package/dist/types.js +0 -1
  171. package/dist/users/index.d.ts +1 -2
  172. package/dist/users/index.js +1 -2
  173. package/dist/users/service.d.ts +0 -8
  174. package/dist/users/service.js +0 -19
  175. package/dist/util/logger.d.ts +0 -1
  176. package/dist/util/logger.js +0 -1
  177. package/dist/util/paths.d.ts +0 -1
  178. package/dist/util/paths.js +0 -1
  179. package/dist/util/platform.d.ts +0 -1
  180. package/dist/util/platform.js +0 -1
  181. package/dist/util/progress.d.ts +0 -1
  182. package/dist/util/progress.js +0 -1
  183. package/dist/util/rate-limiter.d.ts +0 -1
  184. package/dist/util/rate-limiter.js +0 -1
  185. package/dist/util/retry.d.ts +0 -1
  186. package/dist/util/retry.js +1 -2
  187. package/dist/util/text.d.ts +0 -1
  188. package/dist/util/text.js +0 -1
  189. package/dist/version.d.ts +0 -1
  190. package/dist/version.js +0 -1
  191. package/dist/voice/index.d.ts +8 -1
  192. package/dist/voice/index.js +23 -1
  193. package/dist/voice/stt.d.ts +0 -1
  194. package/dist/voice/stt.js +0 -1
  195. package/dist/voice/tts.d.ts +0 -1
  196. package/dist/voice/tts.js +0 -1
  197. package/dist/watchers/evaluator.d.ts +0 -1
  198. package/dist/watchers/evaluator.js +25 -10
  199. package/dist/watchers/index.d.ts +0 -1
  200. package/dist/watchers/index.js +0 -1
  201. package/dist/watchers/scheduler.d.ts +0 -1
  202. package/dist/watchers/scheduler.js +3 -4
  203. package/dist/watchers/store.d.ts +0 -1
  204. package/dist/watchers/store.js +0 -1
  205. package/dist/watchers/types.d.ts +0 -1
  206. package/dist/watchers/types.js +0 -1
  207. package/package.json +26 -3
  208. package/dist/capabilities/index.d.ts.map +0 -1
  209. package/dist/capabilities/index.js.map +0 -1
  210. package/dist/capabilities/manager.d.ts.map +0 -1
  211. package/dist/capabilities/manager.js.map +0 -1
  212. package/dist/capabilities/packs.d.ts.map +0 -1
  213. package/dist/capabilities/packs.js.map +0 -1
  214. package/dist/capabilities/types.d.ts.map +0 -1
  215. package/dist/capabilities/types.js.map +0 -1
  216. package/dist/channels/command-handler.d.ts.map +0 -1
  217. package/dist/channels/command-handler.js.map +0 -1
  218. package/dist/channels/discord.d.ts.map +0 -1
  219. package/dist/channels/discord.js.map +0 -1
  220. package/dist/channels/index.d.ts.map +0 -1
  221. package/dist/channels/index.js.map +0 -1
  222. package/dist/channels/loader.d.ts.map +0 -1
  223. package/dist/channels/loader.js.map +0 -1
  224. package/dist/channels/registry.d.ts.map +0 -1
  225. package/dist/channels/registry.js.map +0 -1
  226. package/dist/channels/telegram.d.ts.map +0 -1
  227. package/dist/channels/telegram.js.map +0 -1
  228. package/dist/channels/types.d.ts.map +0 -1
  229. package/dist/channels/types.js.map +0 -1
  230. package/dist/channels/webhook.d.ts.map +0 -1
  231. package/dist/channels/webhook.js.map +0 -1
  232. package/dist/channels/whatsapp.d.ts.map +0 -1
  233. package/dist/channels/whatsapp.js.map +0 -1
  234. package/dist/cli/capabilities.d.ts.map +0 -1
  235. package/dist/cli/capabilities.js.map +0 -1
  236. package/dist/cli/channel.d.ts.map +0 -1
  237. package/dist/cli/channel.js.map +0 -1
  238. package/dist/cli/commands.d.ts.map +0 -1
  239. package/dist/cli/commands.js.map +0 -1
  240. package/dist/cli/doctor.d.ts.map +0 -1
  241. package/dist/cli/doctor.js.map +0 -1
  242. package/dist/cli/handoff.d.ts.map +0 -1
  243. package/dist/cli/handoff.js.map +0 -1
  244. package/dist/cli/helpers.d.ts.map +0 -1
  245. package/dist/cli/helpers.js.map +0 -1
  246. package/dist/cli/mcp.d.ts.map +0 -1
  247. package/dist/cli/mcp.js.map +0 -1
  248. package/dist/cli/media.d.ts.map +0 -1
  249. package/dist/cli/media.js.map +0 -1
  250. package/dist/cli/setup.d.ts.map +0 -1
  251. package/dist/cli/setup.js.map +0 -1
  252. package/dist/cli/store.d.ts.map +0 -1
  253. package/dist/cli/store.js.map +0 -1
  254. package/dist/config.d.ts.map +0 -1
  255. package/dist/config.js.map +0 -1
  256. package/dist/daemon.d.ts.map +0 -1
  257. package/dist/daemon.js.map +0 -1
  258. package/dist/dashboard/html.d.ts.map +0 -1
  259. package/dist/dashboard/html.js.map +0 -1
  260. package/dist/dashboard/server.d.ts.map +0 -1
  261. package/dist/dashboard/server.js.map +0 -1
  262. package/dist/db/index.d.ts.map +0 -1
  263. package/dist/db/index.js.map +0 -1
  264. package/dist/db/migrations.d.ts.map +0 -1
  265. package/dist/db/migrations.js.map +0 -1
  266. package/dist/delegation/manager.d.ts.map +0 -1
  267. package/dist/delegation/manager.js.map +0 -1
  268. package/dist/index.d.ts.map +0 -1
  269. package/dist/index.js.map +0 -1
  270. package/dist/knowledge/index.d.ts.map +0 -1
  271. package/dist/knowledge/index.js.map +0 -1
  272. package/dist/knowledge/manager.d.ts.map +0 -1
  273. package/dist/knowledge/manager.js.map +0 -1
  274. package/dist/knowledge/types.d.ts.map +0 -1
  275. package/dist/knowledge/types.js.map +0 -1
  276. package/dist/machines/forwarder.d.ts +0 -7
  277. package/dist/machines/forwarder.d.ts.map +0 -1
  278. package/dist/machines/forwarder.js +0 -35
  279. package/dist/machines/forwarder.js.map +0 -1
  280. package/dist/machines/index.d.ts.map +0 -1
  281. package/dist/machines/index.js.map +0 -1
  282. package/dist/machines/registry.d.ts.map +0 -1
  283. package/dist/machines/registry.js.map +0 -1
  284. package/dist/mcp/server.d.ts.map +0 -1
  285. package/dist/mcp/server.js.map +0 -1
  286. package/dist/media/factory.d.ts.map +0 -1
  287. package/dist/media/factory.js.map +0 -1
  288. package/dist/media/generators/dall-e.d.ts.map +0 -1
  289. package/dist/media/generators/dall-e.js.map +0 -1
  290. package/dist/media/generators/elevenlabs-music.d.ts.map +0 -1
  291. package/dist/media/generators/elevenlabs-music.js.map +0 -1
  292. package/dist/media/generators/elevenlabs-sfx.d.ts.map +0 -1
  293. package/dist/media/generators/elevenlabs-sfx.js.map +0 -1
  294. package/dist/media/generators/kling.d.ts.map +0 -1
  295. package/dist/media/generators/kling.js.map +0 -1
  296. package/dist/media/generators/lyria.d.ts.map +0 -1
  297. package/dist/media/generators/lyria.js.map +0 -1
  298. package/dist/media/generators/nano-banana.d.ts.map +0 -1
  299. package/dist/media/generators/nano-banana.js.map +0 -1
  300. package/dist/media/generators/recraft.d.ts.map +0 -1
  301. package/dist/media/generators/recraft.js.map +0 -1
  302. package/dist/media/generators/runway.d.ts.map +0 -1
  303. package/dist/media/generators/runway.js.map +0 -1
  304. package/dist/media/generators/stable-diffusion.d.ts.map +0 -1
  305. package/dist/media/generators/stable-diffusion.js.map +0 -1
  306. package/dist/media/generators/veo.d.ts.map +0 -1
  307. package/dist/media/generators/veo.js.map +0 -1
  308. package/dist/media/index.d.ts.map +0 -1
  309. package/dist/media/index.js.map +0 -1
  310. package/dist/media/loader.d.ts +0 -8
  311. package/dist/media/loader.d.ts.map +0 -1
  312. package/dist/media/loader.js +0 -46
  313. package/dist/media/loader.js.map +0 -1
  314. package/dist/media/store.d.ts.map +0 -1
  315. package/dist/media/store.js.map +0 -1
  316. package/dist/media/types.d.ts.map +0 -1
  317. package/dist/media/types.js.map +0 -1
  318. package/dist/memory/extractor.d.ts.map +0 -1
  319. package/dist/memory/extractor.js.map +0 -1
  320. package/dist/notifications/index.d.ts.map +0 -1
  321. package/dist/notifications/index.js.map +0 -1
  322. package/dist/notifications/ntfy.d.ts.map +0 -1
  323. package/dist/notifications/ntfy.js.map +0 -1
  324. package/dist/notifications/pushover.d.ts.map +0 -1
  325. package/dist/notifications/pushover.js.map +0 -1
  326. package/dist/notifications/types.d.ts.map +0 -1
  327. package/dist/notifications/types.js.map +0 -1
  328. package/dist/notifications/webhook-provider.d.ts.map +0 -1
  329. package/dist/notifications/webhook-provider.js.map +0 -1
  330. package/dist/observability/analytics.d.ts.map +0 -1
  331. package/dist/observability/analytics.js.map +0 -1
  332. package/dist/pipe/anthropic-client.d.ts.map +0 -1
  333. package/dist/pipe/anthropic-client.js.map +0 -1
  334. package/dist/pipe/brain.d.ts.map +0 -1
  335. package/dist/pipe/brain.js.map +0 -1
  336. package/dist/pipe/memory-store.d.ts.map +0 -1
  337. package/dist/pipe/memory-store.js.map +0 -1
  338. package/dist/pipe/project-scanner.d.ts.map +0 -1
  339. package/dist/pipe/project-scanner.js.map +0 -1
  340. package/dist/pipe/types.d.ts.map +0 -1
  341. package/dist/pipe/types.js.map +0 -1
  342. package/dist/projects/index.d.ts.map +0 -1
  343. package/dist/projects/index.js.map +0 -1
  344. package/dist/projects/manager.d.ts.map +0 -1
  345. package/dist/projects/manager.js.map +0 -1
  346. package/dist/projects/router.d.ts.map +0 -1
  347. package/dist/projects/router.js.map +0 -1
  348. package/dist/projects/types.d.ts.map +0 -1
  349. package/dist/projects/types.js.map +0 -1
  350. package/dist/service/install.d.ts.map +0 -1
  351. package/dist/service/install.js.map +0 -1
  352. package/dist/service/templates.d.ts.map +0 -1
  353. package/dist/service/templates.js.map +0 -1
  354. package/dist/service/windows.d.ts.map +0 -1
  355. package/dist/service/windows.js.map +0 -1
  356. package/dist/session/circuit-breaker.d.ts.map +0 -1
  357. package/dist/session/circuit-breaker.js.map +0 -1
  358. package/dist/session/context-monitor.d.ts.map +0 -1
  359. package/dist/session/context-monitor.js.map +0 -1
  360. package/dist/session/manager.d.ts.map +0 -1
  361. package/dist/session/manager.js.map +0 -1
  362. package/dist/session/subprocess.d.ts.map +0 -1
  363. package/dist/session/subprocess.js.map +0 -1
  364. package/dist/session/tool-classifier.d.ts.map +0 -1
  365. package/dist/session/tool-classifier.js.map +0 -1
  366. package/dist/tasks/scheduler.d.ts.map +0 -1
  367. package/dist/tasks/scheduler.js.map +0 -1
  368. package/dist/tasks/store.d.ts.map +0 -1
  369. package/dist/tasks/store.js.map +0 -1
  370. package/dist/timeline/index.d.ts.map +0 -1
  371. package/dist/timeline/index.js.map +0 -1
  372. package/dist/timeline/logger.d.ts.map +0 -1
  373. package/dist/timeline/logger.js.map +0 -1
  374. package/dist/timeline/query.d.ts.map +0 -1
  375. package/dist/timeline/query.js.map +0 -1
  376. package/dist/timeline/types.d.ts.map +0 -1
  377. package/dist/timeline/types.js.map +0 -1
  378. package/dist/types.d.ts.map +0 -1
  379. package/dist/types.js.map +0 -1
  380. package/dist/users/index.d.ts.map +0 -1
  381. package/dist/users/index.js.map +0 -1
  382. package/dist/users/service.d.ts.map +0 -1
  383. package/dist/users/service.js.map +0 -1
  384. package/dist/util/logger.d.ts.map +0 -1
  385. package/dist/util/logger.js.map +0 -1
  386. package/dist/util/paths.d.ts.map +0 -1
  387. package/dist/util/paths.js.map +0 -1
  388. package/dist/util/platform.d.ts.map +0 -1
  389. package/dist/util/platform.js.map +0 -1
  390. package/dist/util/progress.d.ts.map +0 -1
  391. package/dist/util/progress.js.map +0 -1
  392. package/dist/util/rate-limiter.d.ts.map +0 -1
  393. package/dist/util/rate-limiter.js.map +0 -1
  394. package/dist/util/retry.d.ts.map +0 -1
  395. package/dist/util/retry.js.map +0 -1
  396. package/dist/util/text.d.ts.map +0 -1
  397. package/dist/util/text.js.map +0 -1
  398. package/dist/version.d.ts.map +0 -1
  399. package/dist/version.js.map +0 -1
  400. package/dist/voice/index.d.ts.map +0 -1
  401. package/dist/voice/index.js.map +0 -1
  402. package/dist/voice/stt.d.ts.map +0 -1
  403. package/dist/voice/stt.js.map +0 -1
  404. package/dist/voice/tts.d.ts.map +0 -1
  405. package/dist/voice/tts.js.map +0 -1
  406. package/dist/watchers/evaluator.d.ts.map +0 -1
  407. package/dist/watchers/evaluator.js.map +0 -1
  408. package/dist/watchers/index.d.ts.map +0 -1
  409. package/dist/watchers/index.js.map +0 -1
  410. package/dist/watchers/scheduler.d.ts.map +0 -1
  411. package/dist/watchers/scheduler.js.map +0 -1
  412. package/dist/watchers/store.d.ts.map +0 -1
  413. package/dist/watchers/store.js.map +0 -1
  414. package/dist/watchers/types.d.ts.map +0 -1
  415. package/dist/watchers/types.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import TelegramBot from 'node-telegram-bot-api';
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
- import { chunkText, timeAgo, parseTabMessage, buildMediaPrompt } from '../util/text.js';
4
+ import { chunkText, timeAgo, parseTabMessage } from '../util/text.js';
5
5
  import { logger } from '../util/logger.js';
6
6
  import { retryWithBackoff } from '../util/retry.js';
7
7
  import { getAdminUserId } from '../config.js';
8
8
  import { getLogsDir } from '../util/paths.js';
9
9
  import { saveMedia, isOversized } from '../media/store.js';
10
10
  import { inboundLimiter, groupLimiter } from '../util/rate-limiter.js';
11
- import { ProgressTracker } from '../util/progress.js';
11
+ import { processInboundMessage } from './pipeline.js';
12
12
  import { initVoiceProviders } from '../voice/index.js';
13
13
  const DEFAULT_GROUP_CONFIG = { activationMode: 'mention', maxResponsesPerMinute: 3, tabPerGroup: true };
14
14
  /** Format tab status for Telegram display */
@@ -229,26 +229,10 @@ export class TelegramChannel {
229
229
  const media = downloadResults
230
230
  .filter((r) => r.status === 'fulfilled' && r.value !== null)
231
231
  .map(r => r.value);
232
- // Warm up STT connection on first voice message
233
- if (this.sttProvider && !this.sttWarmedUp) {
234
- this.sttProvider.warmup?.();
235
- this.sttWarmedUp = true;
236
- }
237
232
  // Transcribe voice messages if STT is configured
238
233
  if (this.sttProvider) {
239
- for (const m of media) {
240
- if (m.type === 'voice' && m.filePath) {
241
- const voiceStartTime = Date.now();
242
- try {
243
- const transcription = await this.sttProvider.transcribe(m.filePath);
244
- m.caption = `[Transcribed from voice message]: ${transcription}`;
245
- logger.info(`[telegram] Voice transcription: ${Date.now() - voiceStartTime}ms`);
246
- }
247
- catch (err) {
248
- logger.warn('Voice transcription failed, passing file path instead:', err);
249
- }
250
- }
251
- }
234
+ const { transcribeVoiceMessages } = await import('../voice/index.js');
235
+ this.sttWarmedUp = await transcribeVoiceMessages(media, this.sttProvider, 'telegram', this.sttWarmedUp);
252
236
  }
253
237
  // Skip if no text AND no media
254
238
  if (!text && media.length === 0)
@@ -337,28 +321,17 @@ export class TelegramChannel {
337
321
  await this.handleMessage(chatId, text, messageId);
338
322
  }
339
323
  async handleMessage(chatId, text, messageId, media = [], isGroup = false) {
340
- let { tabName, prompt: rawPrompt } = parseTabMessage(text);
341
- if (!rawPrompt && media.length === 0)
324
+ const { tabName } = parseTabMessage(text);
325
+ if (!tabName && !text && media.length === 0)
342
326
  return;
343
- // Group tab routing: use a dedicated tab per group unless /tab is explicit
327
+ // Telegram-specific: group tab routing
328
+ let overrideTabName;
344
329
  if (isGroup) {
345
330
  const groupConfig = this.ctx.config.groups || DEFAULT_GROUP_CONFIG;
346
331
  if (groupConfig.tabPerGroup && !text.startsWith('/tab ')) {
347
- tabName = `group-tg-${Math.abs(chatId)}`;
332
+ overrideTabName = `group-tg-${Math.abs(chatId)}`;
348
333
  }
349
334
  }
350
- // Smart project routing (shared across all channels)
351
- const { resolveProjectRoute } = await import('./command-handler.js');
352
- const route = await resolveProjectRoute(rawPrompt, tabName, text, String(chatId));
353
- if (route.confirmationMessage) {
354
- await this.bot.sendMessage(chatId, route.confirmationMessage);
355
- return;
356
- }
357
- let effectiveTabName = route.effectiveTabName;
358
- let projectPath = route.projectPath;
359
- // Build prompt with media references
360
- const prompt = buildMediaPrompt(media, rawPrompt);
361
- logger.info(`[telegram] Handling message for tab "${effectiveTabName}" (chat: ${chatId}, msg: ${messageId})`);
362
335
  // React with ⏳
363
336
  await this.setReaction(chatId, messageId, '⏳');
364
337
  // Typing indicator — keep refreshing every 4s
@@ -369,13 +342,14 @@ export class TelegramChannel {
369
342
  const typingInterval = setInterval(sendTyping, 4000);
370
343
  // "Still working" timeout
371
344
  const stillWorkingTimeout = setTimeout(() => {
372
- this.bot.sendMessage(chatId, `Still working on your request in tab "${effectiveTabName}"...`).catch(() => { });
345
+ this.bot.sendMessage(chatId, `Still working on your request...`).catch(() => { });
373
346
  }, 120000);
374
347
  try {
375
348
  let responseText;
376
349
  let responseError;
377
- let responseTab = effectiveTabName;
350
+ let responseTab;
378
351
  if (this.ctx.pipeBrain) {
352
+ // PipeBrain path is Telegram-specific (not shared in pipeline)
379
353
  const pipeResult = await this.ctx.pipeBrain.process(text, { chatId, userId: 0, messageId });
380
354
  responseText = pipeResult.response.text || '(empty response)';
381
355
  responseError = pipeResult.response.error;
@@ -386,9 +360,13 @@ export class TelegramChannel {
386
360
  }
387
361
  }
388
362
  else {
363
+ // Telegram-specific: streaming message edits
389
364
  let streamMsgId = null;
390
365
  let streamBuffer = '';
391
366
  let lastEditTime = 0;
367
+ // We need the effective tab name for the stream prefix, but it's determined
368
+ // inside the pipeline. Use a mutable ref that the pipeline result will fill.
369
+ let effectiveTabForStream = overrideTabName || tabName;
392
370
  const onTextChunk = async (chunk) => {
393
371
  streamBuffer += chunk;
394
372
  const now = Date.now();
@@ -396,7 +374,7 @@ export class TelegramChannel {
396
374
  return;
397
375
  lastEditTime = now;
398
376
  try {
399
- const prefix = effectiveTabName !== 'default' ? `[${effectiveTabName}] ` : '';
377
+ const prefix = effectiveTabForStream !== 'default' ? `[${effectiveTabForStream}] ` : '';
400
378
  const preview = prefix + streamBuffer.slice(0, 4000) + (streamBuffer.length > 4000 ? '...' : '');
401
379
  if (!streamMsgId) {
402
380
  const sent = await this.bot.sendMessage(chatId, preview);
@@ -408,59 +386,80 @@ export class TelegramChannel {
408
386
  }
409
387
  catch { /* edit failures are non-critical */ }
410
388
  };
411
- // Progress updates for long tasks (every 30 seconds)
412
- const progressTracker = new ProgressTracker(effectiveTabName, (msg) => {
413
- this.bot.sendMessage(chatId, msg).catch(() => { });
414
- });
415
- const result = await this.ctx.tabManager.sendMessage(effectiveTabName, prompt, {
389
+ // Shared pipeline handles: routing, media prompt, progress, sendMessage, TTS
390
+ const pipelineResult = await processInboundMessage({
391
+ text,
392
+ media,
393
+ channelId: 'telegram',
394
+ tabManager: this.ctx.tabManager,
395
+ voiceReplyMode: this.ctx.config.voice?.replyMode,
396
+ ttsProvider: this.ttsProvider,
397
+ userId: String(chatId),
398
+ sendProgress: (msg) => {
399
+ this.bot.sendMessage(chatId, msg).catch(() => { });
400
+ },
401
+ overrideTabName,
416
402
  onTextChunk,
417
- onToolUse: (name, input) => progressTracker.record(name, input),
418
- projectPath,
419
403
  });
420
- progressTracker.stop();
421
- responseText = result.text || '(empty response)';
422
- responseError = result.error;
404
+ // Empty result means no prompt and no media
405
+ if (!pipelineResult.responseText) {
406
+ clearInterval(typingInterval);
407
+ clearTimeout(stillWorkingTimeout);
408
+ return;
409
+ }
410
+ // Update the effective tab for stream prefix (now known)
411
+ effectiveTabForStream = pipelineResult.tabName;
412
+ responseText = pipelineResult.responseText;
413
+ responseError = pipelineResult.isError;
414
+ responseTab = pipelineResult.tabName;
415
+ // Telegram-specific: if streaming was active and no error, edit the final message
423
416
  if (streamMsgId && !responseError) {
424
417
  clearInterval(typingInterval);
425
418
  clearTimeout(stillWorkingTimeout);
426
419
  await this.setReaction(chatId, messageId, '✅');
420
+ // Send voice if available (even with streaming)
421
+ if (pipelineResult.audioPath) {
422
+ await this.bot.sendVoice(chatId, pipelineResult.audioPath);
423
+ if (pipelineResult.voiceOnly)
424
+ return;
425
+ }
427
426
  try {
428
- const prefix = effectiveTabName !== 'default' ? `[${effectiveTabName}] ` : '';
427
+ const prefix = responseTab !== 'default' ? `[${responseTab}] ` : '';
429
428
  const finalText = prefix + responseText;
430
429
  if (finalText.length <= 4096) {
431
430
  await this.bot.editMessageText(finalText, { chat_id: chatId, message_id: streamMsgId });
432
431
  }
433
432
  else {
434
- await this.sendResponse(chatId, responseText, effectiveTabName);
433
+ await this.sendResponse(chatId, responseText, responseTab);
435
434
  }
436
435
  }
437
436
  catch {
438
- await this.sendResponse(chatId, responseText, effectiveTabName);
437
+ await this.sendResponse(chatId, responseText, responseTab);
439
438
  }
440
439
  return;
441
440
  }
441
+ // Send voice reply if TTS generated audio (non-streaming path)
442
+ if (pipelineResult.audioPath) {
443
+ clearInterval(typingInterval);
444
+ clearTimeout(stillWorkingTimeout);
445
+ await this.setReaction(chatId, messageId, responseError ? '❌' : '✅');
446
+ await this.bot.sendVoice(chatId, pipelineResult.audioPath);
447
+ if (pipelineResult.voiceOnly)
448
+ return;
449
+ if (!responseError) {
450
+ await this.sendResponse(chatId, responseText, responseTab);
451
+ return;
452
+ }
453
+ }
442
454
  }
443
455
  clearInterval(typingInterval);
444
456
  clearTimeout(stillWorkingTimeout);
445
457
  if (responseError) {
446
458
  await this.setReaction(chatId, messageId, '❌');
447
- await this.sendResponse(chatId, `Error: ${responseText}`, responseTab);
459
+ await this.sendResponse(chatId, responseText, responseTab);
448
460
  return;
449
461
  }
450
462
  await this.setReaction(chatId, messageId, '✅');
451
- // TTS: send voice reply if configured
452
- const voiceReplyMode = this.ctx.config.voice?.replyMode;
453
- if (this.ttsProvider && (voiceReplyMode === 'voice' || voiceReplyMode === 'both')) {
454
- try {
455
- const audioPath = await this.ttsProvider.synthesize(responseText);
456
- await this.bot.sendVoice(chatId, audioPath);
457
- if (voiceReplyMode === 'voice')
458
- return; // Don't send text
459
- }
460
- catch (err) {
461
- logger.warn('TTS failed, sending text reply:', err);
462
- }
463
- }
464
463
  await this.sendResponse(chatId, responseText, responseTab);
465
464
  }
466
465
  catch (err) {
@@ -551,4 +550,3 @@ export class TelegramChannel {
551
550
  }
552
551
  }
553
552
  }
554
- //# sourceMappingURL=telegram.js.map
@@ -66,4 +66,3 @@ export interface ChannelContext {
66
66
  /** Broadcast notification to all channels + notification providers */
67
67
  notifyCallback?: (message: string) => Promise<void>;
68
68
  }
69
- //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -17,4 +17,3 @@ export declare class WebhookChannel implements Channel {
17
17
  private authenticate;
18
18
  private getConfig;
19
19
  }
20
- //# sourceMappingURL=webhook.d.ts.map
@@ -161,4 +161,3 @@ export class WebhookChannel {
161
161
  return this.ctx.config.webhook;
162
162
  }
163
163
  }
164
- //# sourceMappingURL=webhook.js.map
@@ -24,4 +24,3 @@ export declare class WhatsAppChannel implements Channel {
24
24
  private sendResponse;
25
25
  private isAllowed;
26
26
  }
27
- //# sourceMappingURL=whatsapp.d.ts.map
@@ -2,9 +2,9 @@ import fs from 'node:fs';
2
2
  import { logger } from '../util/logger.js';
3
3
  import { saveMedia, isOversized } from '../media/store.js';
4
4
  import { retryWithBackoff } from '../util/retry.js';
5
- import { chunkText, parseTabMessage, buildMediaPrompt } from '../util/text.js';
5
+ import { chunkText } from '../util/text.js';
6
6
  import { inboundLimiter } from '../util/rate-limiter.js';
7
- import { ProgressTracker } from '../util/progress.js';
7
+ import { processInboundMessage } from './pipeline.js';
8
8
  import { initVoiceProviders } from '../voice/index.js';
9
9
  const WHATSAPP_MAX_LENGTH = 8192;
10
10
  export class WhatsAppChannel {
@@ -145,26 +145,10 @@ export class WhatsAppChannel {
145
145
  const media = waResults
146
146
  .filter((r) => r.status === 'fulfilled' && r.value !== null)
147
147
  .map(r => r.value);
148
- // Warm up STT connection on first voice message
149
- if (this.sttProvider && !this.sttWarmedUp) {
150
- this.sttProvider.warmup?.();
151
- this.sttWarmedUp = true;
152
- }
153
148
  // Transcribe voice messages if STT is configured
154
149
  if (this.sttProvider) {
155
- for (const att of media) {
156
- if (att.type === 'voice' && att.filePath) {
157
- const voiceStartTime = Date.now();
158
- try {
159
- const transcription = await this.sttProvider.transcribe(att.filePath);
160
- att.caption = `[Transcribed from voice message]: ${transcription}`;
161
- logger.info(`[whatsapp] Voice transcription: ${Date.now() - voiceStartTime}ms`);
162
- }
163
- catch (err) {
164
- logger.warn('Voice transcription failed, passing file path instead:', err);
165
- }
166
- }
167
- }
150
+ const { transcribeVoiceMessages } = await import('../voice/index.js');
151
+ this.sttWarmedUp = await transcribeVoiceMessages(media, this.sttProvider, 'whatsapp', this.sttWarmedUp);
168
152
  }
169
153
  if (!text && media.length === 0)
170
154
  return;
@@ -185,48 +169,31 @@ export class WhatsAppChannel {
185
169
  return;
186
170
  }
187
171
  }
188
- const { tabName, prompt: rawPrompt } = parseTabMessage(text);
189
- if (!rawPrompt && media.length === 0)
190
- return;
191
- // Build prompt with media references
192
- const prompt = buildMediaPrompt(media, rawPrompt);
193
- // Smart project routing (shared across all channels)
194
- const { resolveProjectRoute } = await import('./command-handler.js');
195
- const route = await resolveProjectRoute(rawPrompt, tabName, text, waUserId);
196
- if (route.confirmationMessage) {
197
- await sock.sendMessage(sender, { text: route.confirmationMessage });
198
- return;
199
- }
200
- let effectiveTabName = route.effectiveTabName;
201
- let projectPath = route.projectPath;
202
172
  await sock.sendPresenceUpdate('composing', sender).catch(() => { });
203
- // Progress updates for long tasks (every 30 seconds)
204
- const progressTracker = new ProgressTracker(effectiveTabName, (msg) => {
205
- sock.sendMessage(sender, { text: msg }).catch(() => { });
173
+ // Shared message pipeline
174
+ const pipelineResult = await processInboundMessage({
175
+ text,
176
+ media,
177
+ channelId: 'whatsapp',
178
+ tabManager: this.ctx.tabManager,
179
+ voiceReplyMode: this.ctx.config.voice?.replyMode,
180
+ ttsProvider: this.ttsProvider,
181
+ userId: waUserId,
182
+ sendProgress: (msg) => {
183
+ sock.sendMessage(sender, { text: msg }).catch(() => { });
184
+ },
206
185
  });
207
- const result = await this.ctx.tabManager.sendMessage(effectiveTabName, prompt, {
208
- onToolUse: (name, input) => progressTracker.record(name, input),
209
- projectPath,
210
- });
211
- progressTracker.stop();
212
- const responseText = result.error
213
- ? `Error: ${result.text}`
214
- : result.text || '(empty response)';
215
186
  await sock.sendPresenceUpdate('paused', sender).catch(() => { });
216
- // TTS: send voice reply if configured
217
- const voiceReplyMode = this.ctx.config.voice?.replyMode;
218
- if (this.ttsProvider && (voiceReplyMode === 'voice' || voiceReplyMode === 'both')) {
219
- try {
220
- const audioPath = await this.ttsProvider.synthesize(responseText);
221
- await sock.sendMessage(sender, { audio: { url: audioPath }, mimetype: 'audio/ogg; codecs=opus', ptt: true });
222
- if (voiceReplyMode === 'voice')
223
- return; // Don't send text
224
- }
225
- catch (err) {
226
- logger.warn('TTS failed, sending text reply:', err);
227
- }
187
+ // Empty result means no prompt and no media
188
+ if (!pipelineResult.responseText)
189
+ return;
190
+ // Send voice reply if TTS generated audio
191
+ if (pipelineResult.audioPath) {
192
+ await sock.sendMessage(sender, { audio: { url: pipelineResult.audioPath }, mimetype: 'audio/ogg; codecs=opus', ptt: true });
193
+ if (pipelineResult.voiceOnly)
194
+ return;
228
195
  }
229
- await this.sendResponse(sender, responseText, effectiveTabName);
196
+ await this.sendResponse(sender, pipelineResult.responseText, pipelineResult.tabName);
230
197
  }
231
198
  catch (err) {
232
199
  logger.error('WhatsApp message handler error:', err);
@@ -300,4 +267,3 @@ export class WhatsAppChannel {
300
267
  return this.allowedNumbers.has(number);
301
268
  }
302
269
  }
303
- //# sourceMappingURL=whatsapp.js.map
@@ -1,4 +1,3 @@
1
1
  export declare function enableCapability(packId: string): Promise<void>;
2
2
  export declare function listCapabilities(): Promise<void>;
3
3
  export declare function disableCapability(packId: string): Promise<void>;
4
- //# sourceMappingURL=capabilities.d.ts.map
@@ -70,4 +70,3 @@ export async function disableCapability(packId) {
70
70
  console.log(`\n✓ ${packId} disabled.`);
71
71
  console.log(' Restart daemon to apply: beecork stop && beecork start\n');
72
72
  }
73
- //# sourceMappingURL=capabilities.js.map
@@ -1,4 +1,3 @@
1
1
  export declare function channelInstall(packageName: string): void;
2
2
  export declare function channelCreate(name: string): void;
3
3
  export declare function channelList(): void;
4
- //# sourceMappingURL=channel.d.ts.map
@@ -174,7 +174,7 @@ npm publish
174
174
  }
175
175
  export function channelList() {
176
176
  try {
177
- const output = execSync('npm list -g --depth=0 2>/dev/null', { encoding: 'utf-8' });
177
+ const output = execSync('npm list -g --depth=0', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
178
178
  const lines = output.split('\n').filter(line => line.includes(CHANNEL_PREFIX));
179
179
  if (lines.length === 0) {
180
180
  console.log('No community channels installed.');
@@ -191,4 +191,3 @@ export function channelList() {
191
191
  console.log('No community channels installed.');
192
192
  }
193
193
  }
194
- //# sourceMappingURL=channel.js.map
@@ -13,4 +13,3 @@ export declare function updateBeecork(options: {
13
13
  check?: boolean;
14
14
  }): Promise<void>;
15
15
  export declare function sendMessage(message: string): Promise<void>;
16
- //# sourceMappingURL=commands.d.ts.map
@@ -119,8 +119,15 @@ export async function tailLogs(tabName) {
119
119
  console.log(`No log file found: ${logFile}`);
120
120
  return;
121
121
  }
122
- const child = spawn('tail', ['-f', '-n', '50', logFile], { stdio: 'inherit' });
123
- process.on('SIGINT', () => child.kill());
122
+ if (process.platform === 'win32') {
123
+ // Windows: use PowerShell Get-Content -Wait
124
+ const child = spawn('powershell', ['-Command', `Get-Content -Path '${logFile}' -Tail 50 -Wait`], { stdio: 'inherit' });
125
+ process.on('SIGINT', () => child.kill());
126
+ }
127
+ else {
128
+ const child = spawn('tail', ['-f', '-n', '50', logFile], { stdio: 'inherit' });
129
+ process.on('SIGINT', () => child.kill());
130
+ }
124
131
  }
125
132
  export async function listCrons() {
126
133
  requireDb();
@@ -260,4 +267,3 @@ export async function sendMessage(message) {
260
267
  }
261
268
  closeDb();
262
269
  }
263
- //# sourceMappingURL=commands.js.map
@@ -1,2 +1 @@
1
1
  export declare function runDoctor(): Promise<void>;
2
- //# sourceMappingURL=doctor.d.ts.map
@@ -8,7 +8,8 @@ export async function runDoctor() {
8
8
  try {
9
9
  const config = getConfig();
10
10
  const bin = config.claudeCode?.bin || 'claude';
11
- execSync(`which ${bin}`, { encoding: 'utf-8' });
11
+ const whichCmd = process.platform === 'win32' ? 'where' : 'which';
12
+ execSync(`${whichCmd} ${bin}`, { encoding: 'utf-8' });
12
13
  try {
13
14
  const version = execSync(`${bin} --version 2>&1`, { encoding: 'utf-8' }).trim();
14
15
  checks.push({ name: 'Claude Code', status: 'pass', message: `Found: ${version}` });
@@ -147,4 +148,3 @@ export async function runDoctor() {
147
148
  if (fails > 0)
148
149
  process.exit(1);
149
150
  }
150
- //# sourceMappingURL=doctor.js.map
@@ -13,4 +13,3 @@ export declare function exportTab(tabName: string): TabInfo | null;
13
13
  export declare function attachTab(tabName: string): void;
14
14
  export declare function formatHandoffInfo(info: TabInfo): string;
15
15
  export {};
16
- //# sourceMappingURL=handoff.d.ts.map
@@ -66,4 +66,3 @@ export function formatHandoffInfo(info) {
66
66
  }
67
67
  return lines.join('\n');
68
68
  }
69
- //# sourceMappingURL=handoff.js.map
@@ -1,3 +1,2 @@
1
1
  export { timeAgo } from '../util/text.js';
2
2
  export declare function getDaemonPid(): number | null;
3
- //# sourceMappingURL=helpers.d.ts.map
@@ -19,4 +19,3 @@ export function getDaemonPid() {
19
19
  return null;
20
20
  }
21
21
  }
22
- //# sourceMappingURL=helpers.js.map
package/dist/cli/mcp.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export declare function mcpAdd(name: string, command: string, args: string[]): void;
2
2
  export declare function mcpRemove(name: string): void;
3
3
  export declare function mcpList(): void;
4
- //# sourceMappingURL=mcp.d.ts.map
package/dist/cli/mcp.js CHANGED
@@ -45,4 +45,3 @@ export function mcpList() {
45
45
  }
46
46
  console.log('');
47
47
  }
48
- //# sourceMappingURL=mcp.js.map
@@ -1,3 +1,2 @@
1
1
  export declare function mediaSetup(): Promise<void>;
2
2
  export declare function mediaList(): Promise<void>;
3
- //# sourceMappingURL=media.d.ts.map
package/dist/cli/media.js CHANGED
@@ -110,4 +110,3 @@ export async function mediaList() {
110
110
  }
111
111
  console.log('');
112
112
  }
113
- //# sourceMappingURL=media.js.map
@@ -1,2 +1 @@
1
1
  export declare function setupWizard(mode?: 'quick' | 'full'): Promise<void>;
2
- //# sourceMappingURL=setup.d.ts.map
package/dist/cli/setup.js CHANGED
@@ -19,7 +19,8 @@ function ask(rl, question, defaultValue) {
19
19
  }
20
20
  function findClaudeBin() {
21
21
  try {
22
- return execSync('which claude', { encoding: 'utf-8' }).trim();
22
+ const cmd = process.platform === 'win32' ? 'where claude' : 'which claude';
23
+ return execSync(cmd, { encoding: 'utf-8' }).trim().split('\n')[0];
23
24
  }
24
25
  catch {
25
26
  return 'claude';
@@ -48,7 +49,7 @@ export async function setupWizard(mode = 'quick') {
48
49
  console.log(' You can continue setup now and install Claude Code afterwards.');
49
50
  console.log(' Beecork will remind you at the end.');
50
51
  console.log('');
51
- console.log(' Guide: https://support.beecork.com/claude-code-setup');
52
+ console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md#prerequisites');
52
53
  }
53
54
  console.log('');
54
55
  // 1. Telegram token with step-by-step instructions
@@ -65,7 +66,7 @@ export async function setupWizard(mode = 'quick') {
65
66
  console.log(' 5. Choose a username ending in "bot" (e.g., "mybeecork_bot")');
66
67
  console.log(' 6. BotFather will reply with a token — copy it');
67
68
  console.log('');
68
- console.log(' Detailed guide: https://support.beecork.com/telegram-setup\n');
69
+ console.log(' Detailed guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
69
70
  let token = '';
70
71
  while (!token) {
71
72
  token = await ask(rl, 'Paste your Telegram Bot token');
@@ -100,7 +101,7 @@ export async function setupWizard(mode = 'quick') {
100
101
  console.log(' 2. Tap "Start" and send it any message');
101
102
  console.log(' 3. It replies with your user ID (a number like 123456789)');
102
103
  console.log('');
103
- console.log(' Detailed guide: https://support.beecork.com/telegram-setup\n');
104
+ console.log(' Detailed guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
104
105
  const userIdStr = await ask(rl, 'Your Telegram user ID');
105
106
  const userId = parseInt(userIdStr, 10);
106
107
  if (isNaN(userId)) {
@@ -126,7 +127,7 @@ export async function setupWizard(mode = 'quick') {
126
127
  console.log(' and screen. This lets Beecork use any app on your computer — browsers,');
127
128
  console.log(' spreadsheets, design tools, internal dashboards. Powerful but requires');
128
129
  console.log(' granting screen recording and accessibility permissions.');
129
- console.log(' Guide: https://support.beecork.com/computer-use\n');
130
+ console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/troubleshooting.md\n');
130
131
  enableComputerUse = await ask(rl, 'Enable computer use? (y/n)', 'n');
131
132
  // 6. Anthropic API key (optional - enables intelligent pipe)
132
133
  console.log('\n Intelligent routing (optional): Beecork can route messages to the right');
@@ -191,7 +192,7 @@ export async function setupWizard(mode = 'quick') {
191
192
  console.log(' 5. Under Bot → enable "Message Content Intent"');
192
193
  console.log(' 6. Use OAuth2 URL Generator to invite bot to your server');
193
194
  console.log('');
194
- console.log(' Detailed guide: https://support.beecork.com/discord-setup\n');
195
+ console.log(' Detailed guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
195
196
  const discordToken = await ask(rl, 'Discord bot token (or press Enter to skip)');
196
197
  if (discordToken) {
197
198
  const discordUserId = await ask(rl, 'Your Discord user ID (right-click your name → Copy User ID)');
@@ -212,7 +213,7 @@ export async function setupWizard(mode = 'quick') {
212
213
  console.log(' Note: This uses reverse-engineered WhatsApp Web protocol.');
213
214
  console.log(' For personal use only — not officially supported by WhatsApp.');
214
215
  console.log('');
215
- console.log(' Guide: https://support.beecork.com/whatsapp-setup\n');
216
+ console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
216
217
  const waNumber = await ask(rl, 'Your WhatsApp phone number (e.g., 14155551234)');
217
218
  if (waNumber) {
218
219
  config.whatsapp = {
@@ -363,7 +364,7 @@ export async function setupWizard(mode = 'quick') {
363
364
  console.log(`✓ ${cap.packId} enabled`);
364
365
  }
365
366
  catch (err) {
366
- console.log(`⚠ Failed to enable ${cap.packId}: ${err.message}`);
367
+ console.log(`⚠ Failed to enable ${cap.packId}: ${err instanceof Error ? err.message : String(err)}`);
367
368
  }
368
369
  }
369
370
  }
@@ -398,7 +399,7 @@ export async function setupWizard(mode = 'quick') {
398
399
  console.log('');
399
400
  console.log(' You also need a Claude Pro or Max subscription ($20/month).');
400
401
  console.log(' Sign up at: https://claude.ai');
401
- console.log(' Guide: https://support.beecork.com/claude-code-setup');
402
+ console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md#prerequisites');
402
403
  console.log('');
403
404
  }
404
405
  console.log(' Next steps:');
@@ -420,7 +421,7 @@ export async function setupWizard(mode = 'quick') {
420
421
  console.log(' beecork setup --full — full guided setup');
421
422
  console.log('');
422
423
  }
423
- console.log(' Need help? https://support.beecork.com\n');
424
+ console.log(' Need help? https://github.com/beecork/beecork/blob/main/docs/troubleshooting.md\n');
424
425
  }
425
426
  finally {
426
427
  rl.close();
@@ -515,4 +516,3 @@ function injectClaudeMd() {
515
516
  content = content + '\n\n' + BEECORK_CLAUDE_MD + '\n';
516
517
  fs.writeFileSync(claudeMdPath, content);
517
518
  }
518
- //# sourceMappingURL=setup.js.map
@@ -1,4 +1,3 @@
1
1
  export declare function storeSearch(query: string): Promise<void>;
2
2
  export declare function storeInstall(packageName: string): void;
3
3
  export declare function storeInfo(packageName: string): Promise<void>;
4
- //# sourceMappingURL=store.d.ts.map
package/dist/cli/store.js CHANGED
@@ -89,4 +89,3 @@ export async function storeInfo(packageName) {
89
89
  console.error('Failed to fetch package info:', err);
90
90
  }
91
91
  }
92
- //# sourceMappingURL=store.js.map
package/dist/config.d.ts CHANGED
@@ -5,4 +5,3 @@ export declare function getTabConfig(tabName: string): TabConfig;
5
5
  export declare function resolveWorkingDir(tabName: string): string;
6
6
  export declare function getAdminUserId(): number;
7
7
  export declare function validateTabName(name: string): string | null;
8
- //# sourceMappingURL=config.d.ts.map
package/dist/config.js CHANGED
@@ -131,4 +131,3 @@ function mergeWithDefaults(raw) {
131
131
  mediaGenerators: raw.mediaGenerators,
132
132
  };
133
133
  }
134
- //# sourceMappingURL=config.js.map
package/dist/daemon.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=daemon.d.ts.map