beecork 1.7.0 → 2.0.0

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 (223) hide show
  1. package/README.md +52 -111
  2. package/dist/index.js +1394 -581
  3. package/package.json +26 -54
  4. package/dist/capabilities/index.d.ts +0 -3
  5. package/dist/capabilities/index.js +0 -2
  6. package/dist/capabilities/manager.d.ts +0 -13
  7. package/dist/capabilities/manager.js +0 -115
  8. package/dist/capabilities/packs.d.ts +0 -2
  9. package/dist/capabilities/packs.js +0 -54
  10. package/dist/capabilities/types.d.ts +0 -21
  11. package/dist/capabilities/types.js +0 -1
  12. package/dist/channels/admin.d.ts +0 -10
  13. package/dist/channels/admin.js +0 -20
  14. package/dist/channels/command-handler.d.ts +0 -19
  15. package/dist/channels/command-handler.js +0 -235
  16. package/dist/channels/discord.d.ts +0 -17
  17. package/dist/channels/discord.js +0 -266
  18. package/dist/channels/index.d.ts +0 -7
  19. package/dist/channels/index.js +0 -6
  20. package/dist/channels/loader.d.ts +0 -7
  21. package/dist/channels/loader.js +0 -87
  22. package/dist/channels/pipeline.d.ts +0 -50
  23. package/dist/channels/pipeline.js +0 -92
  24. package/dist/channels/registry.d.ts +0 -36
  25. package/dist/channels/registry.js +0 -80
  26. package/dist/channels/send-helpers.d.ts +0 -19
  27. package/dist/channels/send-helpers.js +0 -21
  28. package/dist/channels/telegram.d.ts +0 -47
  29. package/dist/channels/telegram.js +0 -649
  30. package/dist/channels/types.d.ts +0 -41
  31. package/dist/channels/types.js +0 -1
  32. package/dist/channels/voice-state.d.ts +0 -29
  33. package/dist/channels/voice-state.js +0 -45
  34. package/dist/channels/webhook.d.ts +0 -16
  35. package/dist/channels/webhook.js +0 -222
  36. package/dist/channels/whatsapp.d.ts +0 -28
  37. package/dist/channels/whatsapp.js +0 -323
  38. package/dist/cli/capabilities.d.ts +0 -3
  39. package/dist/cli/capabilities.js +0 -72
  40. package/dist/cli/channel.d.ts +0 -3
  41. package/dist/cli/channel.js +0 -202
  42. package/dist/cli/commands.d.ts +0 -15
  43. package/dist/cli/commands.js +0 -279
  44. package/dist/cli/doctor.d.ts +0 -1
  45. package/dist/cli/doctor.js +0 -208
  46. package/dist/cli/handoff.d.ts +0 -8
  47. package/dist/cli/handoff.js +0 -33
  48. package/dist/cli/helpers.d.ts +0 -2
  49. package/dist/cli/helpers.js +0 -21
  50. package/dist/cli/mcp.d.ts +0 -3
  51. package/dist/cli/mcp.js +0 -47
  52. package/dist/cli/media.d.ts +0 -2
  53. package/dist/cli/media.js +0 -125
  54. package/dist/cli/setup.d.ts +0 -1
  55. package/dist/cli/setup.js +0 -239
  56. package/dist/cli/store.d.ts +0 -3
  57. package/dist/cli/store.js +0 -108
  58. package/dist/config.d.ts +0 -11
  59. package/dist/config.js +0 -115
  60. package/dist/daemon.d.ts +0 -1
  61. package/dist/daemon.js +0 -345
  62. package/dist/dashboard/html.d.ts +0 -1
  63. package/dist/dashboard/html.js +0 -849
  64. package/dist/dashboard/routes.d.ts +0 -17
  65. package/dist/dashboard/routes.js +0 -623
  66. package/dist/dashboard/server.d.ts +0 -1
  67. package/dist/dashboard/server.js +0 -104
  68. package/dist/db/connection.d.ts +0 -29
  69. package/dist/db/connection.js +0 -37
  70. package/dist/db/index.d.ts +0 -14
  71. package/dist/db/index.js +0 -127
  72. package/dist/db/migrations.d.ts +0 -2
  73. package/dist/db/migrations.js +0 -384
  74. package/dist/delegation/manager.d.ts +0 -18
  75. package/dist/delegation/manager.js +0 -89
  76. package/dist/index.d.ts +0 -2
  77. package/dist/knowledge/index.d.ts +0 -2
  78. package/dist/knowledge/index.js +0 -1
  79. package/dist/knowledge/manager.d.ts +0 -17
  80. package/dist/knowledge/manager.js +0 -160
  81. package/dist/knowledge/types.d.ts +0 -7
  82. package/dist/knowledge/types.js +0 -1
  83. package/dist/mcp/handlers.d.ts +0 -37
  84. package/dist/mcp/handlers.js +0 -520
  85. package/dist/mcp/server.d.ts +0 -2
  86. package/dist/mcp/server.js +0 -86
  87. package/dist/mcp/tool-definitions.d.ts +0 -1225
  88. package/dist/mcp/tool-definitions.js +0 -412
  89. package/dist/mcp/validate.d.ts +0 -23
  90. package/dist/mcp/validate.js +0 -65
  91. package/dist/media/factory.d.ts +0 -6
  92. package/dist/media/factory.js +0 -36
  93. package/dist/media/generators/dall-e.d.ts +0 -10
  94. package/dist/media/generators/dall-e.js +0 -41
  95. package/dist/media/generators/elevenlabs-music.d.ts +0 -9
  96. package/dist/media/generators/elevenlabs-music.js +0 -34
  97. package/dist/media/generators/elevenlabs-sfx.d.ts +0 -9
  98. package/dist/media/generators/elevenlabs-sfx.js +0 -33
  99. package/dist/media/generators/kling.d.ts +0 -9
  100. package/dist/media/generators/kling.js +0 -47
  101. package/dist/media/generators/lyria.d.ts +0 -10
  102. package/dist/media/generators/lyria.js +0 -41
  103. package/dist/media/generators/nano-banana.d.ts +0 -10
  104. package/dist/media/generators/nano-banana.js +0 -45
  105. package/dist/media/generators/poll-util.d.ts +0 -12
  106. package/dist/media/generators/poll-util.js +0 -22
  107. package/dist/media/generators/recraft.d.ts +0 -9
  108. package/dist/media/generators/recraft.js +0 -52
  109. package/dist/media/generators/runway.d.ts +0 -9
  110. package/dist/media/generators/runway.js +0 -49
  111. package/dist/media/generators/stable-diffusion.d.ts +0 -9
  112. package/dist/media/generators/stable-diffusion.js +0 -35
  113. package/dist/media/generators/veo.d.ts +0 -9
  114. package/dist/media/generators/veo.js +0 -32
  115. package/dist/media/index.d.ts +0 -6
  116. package/dist/media/index.js +0 -8
  117. package/dist/media/store.d.ts +0 -17
  118. package/dist/media/store.js +0 -69
  119. package/dist/media/types.d.ts +0 -43
  120. package/dist/media/types.js +0 -1
  121. package/dist/notifications/index.d.ts +0 -4
  122. package/dist/notifications/index.js +0 -21
  123. package/dist/notifications/ntfy.d.ts +0 -9
  124. package/dist/notifications/ntfy.js +0 -25
  125. package/dist/notifications/pushover.d.ts +0 -9
  126. package/dist/notifications/pushover.js +0 -26
  127. package/dist/notifications/types.d.ts +0 -5
  128. package/dist/notifications/types.js +0 -1
  129. package/dist/notifications/webhook-provider.d.ts +0 -9
  130. package/dist/notifications/webhook-provider.js +0 -24
  131. package/dist/observability/analytics.d.ts +0 -30
  132. package/dist/observability/analytics.js +0 -118
  133. package/dist/projects/index.d.ts +0 -4
  134. package/dist/projects/index.js +0 -2
  135. package/dist/projects/manager.d.ts +0 -13
  136. package/dist/projects/manager.js +0 -166
  137. package/dist/projects/router.d.ts +0 -17
  138. package/dist/projects/router.js +0 -246
  139. package/dist/projects/types.d.ts +0 -19
  140. package/dist/projects/types.js +0 -1
  141. package/dist/service/install.d.ts +0 -4
  142. package/dist/service/install.js +0 -146
  143. package/dist/service/templates.d.ts +0 -4
  144. package/dist/service/templates.js +0 -52
  145. package/dist/service/windows.d.ts +0 -8
  146. package/dist/service/windows.js +0 -59
  147. package/dist/session/budget-guard.d.ts +0 -20
  148. package/dist/session/budget-guard.js +0 -31
  149. package/dist/session/circuit-breaker.d.ts +0 -19
  150. package/dist/session/circuit-breaker.js +0 -91
  151. package/dist/session/context-compactor.d.ts +0 -32
  152. package/dist/session/context-compactor.js +0 -45
  153. package/dist/session/context-monitor.d.ts +0 -15
  154. package/dist/session/context-monitor.js +0 -44
  155. package/dist/session/handoff.d.ts +0 -21
  156. package/dist/session/handoff.js +0 -50
  157. package/dist/session/manager.d.ts +0 -60
  158. package/dist/session/manager.js +0 -379
  159. package/dist/session/memory-store.d.ts +0 -29
  160. package/dist/session/memory-store.js +0 -45
  161. package/dist/session/message-queue.d.ts +0 -28
  162. package/dist/session/message-queue.js +0 -52
  163. package/dist/session/pending-dispatcher.d.ts +0 -31
  164. package/dist/session/pending-dispatcher.js +0 -120
  165. package/dist/session/pending-store.d.ts +0 -60
  166. package/dist/session/pending-store.js +0 -118
  167. package/dist/session/stale-session.d.ts +0 -31
  168. package/dist/session/stale-session.js +0 -45
  169. package/dist/session/subprocess.d.ts +0 -25
  170. package/dist/session/subprocess.js +0 -189
  171. package/dist/session/tab-store.d.ts +0 -28
  172. package/dist/session/tab-store.js +0 -78
  173. package/dist/tasks/scheduler.d.ts +0 -45
  174. package/dist/tasks/scheduler.js +0 -329
  175. package/dist/tasks/store.d.ts +0 -11
  176. package/dist/tasks/store.js +0 -103
  177. package/dist/timeline/index.d.ts +0 -3
  178. package/dist/timeline/index.js +0 -2
  179. package/dist/timeline/logger.d.ts +0 -8
  180. package/dist/timeline/logger.js +0 -11
  181. package/dist/timeline/query.d.ts +0 -11
  182. package/dist/timeline/query.js +0 -67
  183. package/dist/timeline/types.d.ts +0 -12
  184. package/dist/timeline/types.js +0 -1
  185. package/dist/types.d.ts +0 -216
  186. package/dist/types.js +0 -3
  187. package/dist/util/auto-heal.d.ts +0 -43
  188. package/dist/util/auto-heal.js +0 -107
  189. package/dist/util/install-info.d.ts +0 -37
  190. package/dist/util/install-info.js +0 -80
  191. package/dist/util/logger.d.ts +0 -18
  192. package/dist/util/logger.js +0 -118
  193. package/dist/util/paths.d.ts +0 -13
  194. package/dist/util/paths.js +0 -55
  195. package/dist/util/platform.d.ts +0 -2
  196. package/dist/util/platform.js +0 -11
  197. package/dist/util/progress.d.ts +0 -34
  198. package/dist/util/progress.js +0 -133
  199. package/dist/util/rate-limiter.d.ts +0 -14
  200. package/dist/util/rate-limiter.js +0 -50
  201. package/dist/util/retry.d.ts +0 -2
  202. package/dist/util/retry.js +0 -18
  203. package/dist/util/text.d.ts +0 -32
  204. package/dist/util/text.js +0 -101
  205. package/dist/version.d.ts +0 -1
  206. package/dist/version.js +0 -4
  207. package/dist/voice/index.d.ts +0 -17
  208. package/dist/voice/index.js +0 -42
  209. package/dist/voice/stt.d.ts +0 -16
  210. package/dist/voice/stt.js +0 -57
  211. package/dist/voice/tts.d.ts +0 -23
  212. package/dist/voice/tts.js +0 -84
  213. package/dist/watchers/evaluator.d.ts +0 -5
  214. package/dist/watchers/evaluator.js +0 -45
  215. package/dist/watchers/index.d.ts +0 -4
  216. package/dist/watchers/index.js +0 -3
  217. package/dist/watchers/scheduler.d.ts +0 -20
  218. package/dist/watchers/scheduler.js +0 -183
  219. package/dist/watchers/store.d.ts +0 -10
  220. package/dist/watchers/store.js +0 -56
  221. package/dist/watchers/types.d.ts +0 -15
  222. package/dist/watchers/types.js +0 -1
  223. package/scripts/postinstall.mjs +0 -50
package/README.md CHANGED
@@ -1,152 +1,93 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/beecork/beecork/main/logos/horizontal.svg" alt="Beecork" width="400">
2
+ <strong>🐝 beecork</strong>
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <strong>Claude Code, always on. Reachable from anywhere.</strong>
6
+ <strong>A from-scratch CLI coding agent multi-model, BYOK, path-confined.</strong>
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
10
  <a href="https://www.npmjs.com/package/beecork"><img src="https://img.shields.io/npm/v/beecork" alt="npm version"></a>
11
- <a href="https://github.com/beecork/beecork/actions"><img src="https://github.com/beecork/beecork/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
12
11
  <a href="LICENSE"><img src="https://img.shields.io/npm/l/beecork" alt="License"></a>
13
12
  </p>
14
13
 
15
14
  ---
16
15
 
17
- Beecork is infrastructure for Claude Code. It gives Claude Code a phone number, a memory, and an alarm clock.
16
+ beecork is a small, transparent coding agent you run in your terminal. It talks to
17
+ any model on [OpenRouter](https://openrouter.ai) (bring your own key), works inside
18
+ the directory you launch it from, and asks before doing anything outside that root.
18
19
 
19
- Message Claude Code from Telegram at 2am it wakes up, does the work, messages you back. Or schedule it to wake itself up every Monday, check something, act on it, and go back to sleep. All without sitting at a terminal.
20
+ > **Two products, one brand.** This is `beecork`, the coding agent. The always-on
21
+ > Claude Code infrastructure (channels, memory, cron) is now
22
+ > [`beecork-pipe`](https://www.npmjs.com/package/beecork-pipe).
20
23
 
21
- ## What It Does
22
-
23
- - **Messaging channels** — Telegram, WhatsApp, Discord. Send a message, get a response.
24
- - **Virtual tabs** — Persistent Claude Code sessions with context that survives restarts.
25
- - **Task scheduling** — Tell Claude Code to set up recurring tasks via MCP tools — it wakes up, runs the task, reports back.
26
- - **Memory** — Cross-session memory so Claude Code never loses context.
27
- - **MCP server** — 38 tools Claude Code can call to manage tabs, memory, cron jobs, watchers, media, folders, and more.
28
- - **Smart routing** — Messages are automatically routed to the right project folder and tab using project-name detection, sticky conversation context, and learned patterns. No API key required.
29
- - **Background service** — Runs as a launchd (macOS), systemd (Linux), or Task Scheduler (Windows) service. Starts on login, runs silently.
30
-
31
- ## Quick Start
24
+ ## Install
32
25
 
33
26
  ```bash
34
- # Install
35
27
  npm install -g beecork
36
-
37
- # Interactive setup (Telegram token, Claude Code path, background service)
38
- beecork setup
39
-
40
- # Start
41
- beecork start
42
28
  ```
43
29
 
44
- Then message your Telegram bot. Claude Code handles the rest.
30
+ Requires Node.js >= 20.12.
45
31
 
46
- See [Getting Started](https://github.com/beecork/beecork/blob/main/docs/getting-started.md) for the full walkthrough.
32
+ ## Setup (BYOK)
47
33
 
48
- ## CLI
34
+ beecork reads its config from the environment, a local `.env`, or
35
+ `~/.beecork/config.json`.
49
36
 
50
37
  ```bash
51
- # Core
52
- beecork start # Start the daemon
53
- beecork stop # Stop the daemon
54
- beecork status # Check if running
55
- beecork setup # Set up Beecork (Telegram + system service)
56
- beecork doctor # Diagnose common issues
57
- beecork update # Update to latest version
58
- beecork quickstart # Print getting-started checklist
59
-
60
- # Tabs & Messages
61
- beecork tabs # List active tabs
62
- beecork send <msg> # Send a message to the default tab
63
- beecork logs # Tail daemon logs
64
- beecork export <tab> # Export tab for terminal handoff
65
- beecork attach <tab> # Attach to a running tab
66
-
67
- # Scheduling & Watchers
68
- beecork tasks list # List scheduled tasks
69
- beecork tasks delete <id> # Delete a task
70
- beecork watches # List active watchers
71
- beecork watch delete <id> # Delete a watcher
72
-
73
- # Memory & Knowledge
74
- beecork memory list # List stored memories
75
- beecork memory delete <id> # Delete a memory
76
- beecork knowledge # View stored knowledge
77
-
78
- # Channels & Integrations
79
- beecork discord # Set up Discord bot
80
- beecork whatsapp # Set up WhatsApp
81
- beecork webhook # Set up webhook endpoint
82
- beecork enable <cap> # Enable a capability (github, notion, database)
83
- beecork disable <cap> # Disable a capability
84
- beecork capabilities # List available capabilities
85
-
86
- # Tools
87
- beecork dashboard # Open the web dashboard
88
- beecork mcp list # List MCP server configs
89
- beecork media setup # Configure media generators
90
- beecork activity # View activity summary
91
- beecork history # Show activity timeline
92
- beecork folders # List discovered folders
93
- beecork templates # List tab templates
94
- beecork store search <q> # Search community extensions
95
- beecork store install <p> # Install a community package
38
+ export OPENROUTER_API_KEY=sk-or-... # required
39
+ export OPENROUTER_MODEL=... # optional (default: deepseek/deepseek-v4-flash)
40
+ export BRAVE_API_KEY=... # optional only web_search needs it
96
41
  ```
97
42
 
98
- Tasks, watchers, and memories are created by Claude Code itself via MCP tools — just tell it what you need in natural language. The CLI is for viewing and managing them.
43
+ On first run, if no key is found, beecork prompts for one (entry is masked and stored
44
+ chmod-600 in `~/.beecork/config.json`).
99
45
 
100
- Run `beecork --help` for the full list of commands.
46
+ ## Usage
101
47
 
102
- ## Deploy Anywhere
48
+ ```bash
49
+ cd your-project
50
+ beecork
51
+ ```
103
52
 
104
- | Setup | Best For |
105
- |-------|----------|
106
- | **Local machine** | Tasks that need local files, Xcode projects, local apps |
107
- | **VPS** | Always-on — web scraping, monitoring, API calls, server management. Requires a full OS environment (Node.js, Claude Code CLI, system service). |
108
- | **[Beecork Cloud](https://beecork.com/cloud)** | Zero setup — a full cloud computer with everything pre-configured. No terminal, no installation. |
53
+ Then just talk to it. Each message becomes one agentic turn. The project root is the
54
+ directory you launched in — file tools are confined to it, and anything that reaches
55
+ outside (or any shell command) goes through a permission gate.
109
56
 
110
- Local install is `npm install -g beecork`. VPS requires the same plus a properly configured server environment. Beecork Cloud handles all of that for you.
57
+ ### Tools
111
58
 
112
- ## Architecture
59
+ `read_file` · `write_file` · `edit_file` · `list_dir` · `search` · `run_bash` ·
60
+ `web_fetch` · `web_search` · `update_todos` · `remember`
113
61
 
114
- ```
115
- Telegram/WhatsApp/Discord/Webhook
116
- |
117
- Shared pipeline (deterministic router)
118
- |
119
- Daemon (always-on)
120
- |
121
- TabManager
122
- |
123
- Claude Code subprocess (persistent sessions)
124
- |
125
- MCP Server <-> SQLite (memory, state)
126
- ```
62
+ ### Slash commands
63
+
64
+ `/model` · `/models` · `/key` · `/context` · `/resume` · `/good` · `/bad` · `/help` · `exit`
127
65
 
128
- ## Community
66
+ ### Memory
129
67
 
130
- - [Discord](https://discord.gg/wEM9avTzb) Chat, ask questions, share what you've built
131
- - [Twitter/X](https://x.com/BeecorkAI) Updates, demos, announcements
132
- - [GitHub Discussions](https://github.com/beecork/beecork/discussions) Feature ideas, Q&A
68
+ beecork reads `cork.md` and `.beecork/memory.md` from `~/.beecork/` (your global,
69
+ authoritative memory) and from the project tree (project context). Sessions are saved
70
+ under `.beecork/sessions/` for `/resume`.
133
71
 
134
- ## Documentation
72
+ ## Configuration reference
135
73
 
136
- - [Getting Started](https://github.com/beecork/beecork/blob/main/docs/getting-started.md) Full setup walkthrough
137
- - [Use Cases](https://github.com/beecork/beecork/blob/main/docs/use-cases.md) — What you can build with Beecork
138
- - [Troubleshooting](https://github.com/beecork/beecork/blob/main/docs/troubleshooting.md) — Common issues and fixes
139
- - [Comparison](https://github.com/beecork/beecork/blob/main/docs/comparison.md) How Beecork compares to alternatives
140
- - [Contributing](https://github.com/beecork/beecork/blob/main/CONTRIBUTING.md) — How to contribute
141
- - [Security](https://github.com/beecork/beecork/blob/main/SECURITY.md) — Reporting vulnerabilities
74
+ | Env var | Purpose | Default |
75
+ |---|---|---|
76
+ | `OPENROUTER_API_KEY` | OpenRouter API key (required) | |
77
+ | `OPENROUTER_MODEL` | Model id | `deepseek/deepseek-v4-flash` |
78
+ | `BRAVE_API_KEY` | Brave Search key (for `web_search`) | |
79
+ | `VERIFY_COMMAND` | Command auto-run after edits (e.g. `npm run typecheck`) | |
142
80
 
143
- ## Requirements
81
+ ## Development
144
82
 
145
- - Node.js 18+
146
- - Claude Code CLI (`npm install -g @anthropic-ai/claude-code`)
147
- - Claude Pro or Max subscription
148
- - Telegram account (for the bot)
83
+ ```bash
84
+ npm run dev # run from source (tsx)
85
+ npm run typecheck # tsc --noEmit
86
+ npm test # unit tests
87
+ npm run build # bundle to dist/index.js (esbuild)
88
+ npm run eval # run the eval harness
89
+ ```
149
90
 
150
91
  ## License
151
92
 
152
- [MIT](https://github.com/beecork/beecork/blob/main/LICENSE)
93
+ [MIT](LICENSE) © Beecork