hyperclaw 4.0.0 → 4.0.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 (156) hide show
  1. package/README.md +53 -18
  2. package/dist/a2ui-protocol-CT_jDEU9.js +75 -0
  3. package/dist/agents-routing-683Q2JGp.js +129 -0
  4. package/dist/agents-routing-BpZBswBH.js +4 -0
  5. package/dist/api-keys-guide-Bzig1R5W.js +149 -0
  6. package/dist/api-keys-guide-Dq5Obbp4.js +149 -0
  7. package/dist/audit-BYxPlnTQ.js +248 -0
  8. package/dist/bounty-tools-C6LyzxM-.js +211 -0
  9. package/dist/browser-tools-CQBSbIuO.js +5 -0
  10. package/dist/browser-tools-YQmwRLLM.js +179 -0
  11. package/dist/claw-tasks-BRLUvFRD.js +80 -0
  12. package/dist/connector-3HnyH8fn.js +167 -0
  13. package/dist/connector-6PMZo5Ky.js +189 -0
  14. package/dist/connector-B6eoF3DD.js +181 -0
  15. package/dist/connector-B9tLG8UZ.js +196 -0
  16. package/dist/connector-BOlqjXWP.js +182 -0
  17. package/dist/connector-BP8zsbP8.js +189 -0
  18. package/dist/connector-BPoSevxp.js +286 -0
  19. package/dist/connector-BRHj773i.js +163 -0
  20. package/dist/connector-BToxU-jV.js +267 -0
  21. package/dist/connector-BliDVsJQ.js +239 -0
  22. package/dist/connector-Bv6s9oP7.js +88 -0
  23. package/dist/connector-By5wWGTR.js +343 -0
  24. package/dist/connector-C1BaFFgN.js +213 -0
  25. package/dist/connector-CRRWY5Wv.js +167 -0
  26. package/dist/connector-CXPQVGyI.js +85 -0
  27. package/dist/connector-Cdk1CXKi.js +194 -0
  28. package/dist/connector-CwlgFgjx.js +181 -0
  29. package/dist/connector-DFchk6l7.js +178 -0
  30. package/dist/connector-DKw7tRAy.js +192 -0
  31. package/dist/connector-DRv1ahC_.js +343 -0
  32. package/dist/connector-DU63KW94.js +165 -0
  33. package/dist/connector-Dbvb1Cj9.js +280 -0
  34. package/dist/connector-DcZdQcgR.js +173 -0
  35. package/dist/connector-DxKL8VvZ.js +182 -0
  36. package/dist/connector-T_YdZtzv.js +162 -0
  37. package/dist/connector-i4gOS9xL.js +154 -0
  38. package/dist/connector-rHXE1ZD2.js +167 -0
  39. package/dist/connector-wdUXChwa.js +172 -0
  40. package/dist/cost-tracker-pVE15Yq4.js +103 -0
  41. package/dist/credentials-store-BvnMPJwi.js +4 -0
  42. package/dist/credentials-store-sb-TRLwR.js +77 -0
  43. package/dist/cron-tasks-BvDFNyiE.js +82 -0
  44. package/dist/delivery-B-SJqXLn.js +95 -0
  45. package/dist/delivery-D5Z98EVq.js +95 -0
  46. package/dist/delivery-DCOXhXEO.js +5 -0
  47. package/dist/delivery-VgFeuu2J.js +5 -0
  48. package/dist/destructive-gate-m-dWqUFg.js +101 -0
  49. package/dist/developer-keys-JaJK3T27.js +127 -0
  50. package/dist/developer-keys-kyqmtWK3.js +8 -0
  51. package/dist/doctor-3oi89QIc.js +175 -0
  52. package/dist/doctor-Cf1XSfp9.js +4 -0
  53. package/dist/engine-B4eMiTgl.js +7 -0
  54. package/dist/engine-B8M7dYul.js +7 -0
  55. package/dist/engine-BhT-1M9W.js +256 -0
  56. package/dist/engine-D49jnSd_.js +256 -0
  57. package/dist/env-resolve-DWOQ45jG.js +9 -0
  58. package/dist/env-resolve-szSWl0UF.js +94 -0
  59. package/dist/extraction-tools-D3qDFBJ1.js +91 -0
  60. package/dist/extraction-tools-DLr_AEwq.js +5 -0
  61. package/dist/form_data-B_hIUrxU.js +8657 -0
  62. package/dist/gmail-watch-setup-Czt8rXaX.js +40 -0
  63. package/dist/heartbeat-engine-CRqfPcFM.js +83 -0
  64. package/dist/hub-DTsqe5Bt.js +6 -0
  65. package/dist/hub-FrPTA33j.js +515 -0
  66. package/dist/hyperclawbot-D9KCtc4P.js +480 -0
  67. package/dist/hyperclawbot-DfMGowZC.js +480 -0
  68. package/dist/hyperclawbot-Dw27pJo4.js +480 -0
  69. package/dist/inference-CTWJeX9Q.js +922 -0
  70. package/dist/inference-ix607p7k.js +6 -0
  71. package/dist/knowledge-graph-DqA-Fztl.js +131 -0
  72. package/dist/loader-CISCqBto.js +400 -0
  73. package/dist/loader-CYMQ8VOS.js +4 -0
  74. package/dist/logger-8tEtAd3y.js +83 -0
  75. package/dist/manager-CPjeRe-6.js +4 -0
  76. package/dist/manager-Cwzj7w5R.js +105 -0
  77. package/dist/manager-DLmZI-9R.js +6 -0
  78. package/dist/manager-DSGhn5i3.js +117 -0
  79. package/dist/manager-DgyF52mg.js +218 -0
  80. package/dist/manager-Dm8nrMFx.js +40 -0
  81. package/dist/mcp-B_9Ber63.js +139 -0
  82. package/dist/mcp-loader-DSM5UiFG.js +94 -0
  83. package/dist/mcp-loader-j5ZLLw5O.js +94 -0
  84. package/dist/memory-BI1kPkAN.js +4 -0
  85. package/dist/memory-BVFGkxxK.js +270 -0
  86. package/dist/memory-auto-Bc7euou4.js +306 -0
  87. package/dist/memory-auto-DPfbkMVt.js +5 -0
  88. package/dist/memory-integration-DZExqWr4.js +91 -0
  89. package/dist/moltbook-B6ZeGN5_.js +81 -0
  90. package/dist/node-pwL6O_KX.js +222 -0
  91. package/dist/nodes-registry-CsPm_-CJ.js +52 -0
  92. package/dist/oauth-flow-CpWlgvNB.js +150 -0
  93. package/dist/oauth-provider-BZb6qOw5.js +110 -0
  94. package/dist/observability-B43YvNQV.js +89 -0
  95. package/dist/onboard-3q20ZyHj.js +9 -0
  96. package/dist/onboard-Bd_wsYdi.js +4086 -0
  97. package/dist/onboard-CAN7x3me.js +3026 -0
  98. package/dist/onboard-DnegOHMh.js +3026 -0
  99. package/dist/onboard-RYtDlYBw.js +9 -0
  100. package/dist/onboard-aTwlQs-4.js +9 -0
  101. package/dist/orchestrator-BSp2M5EU.js +189 -0
  102. package/dist/orchestrator-C7ko5tWa.js +6 -0
  103. package/dist/orchestrator-DfPkIx2Z.js +6 -0
  104. package/dist/orchestrator-NJQsmiBE.js +189 -0
  105. package/dist/pairing-DU0_J28n.js +87 -0
  106. package/dist/pairing-DWllbSbO.js +4 -0
  107. package/dist/pc-access-Ly-uA8mn.js +8 -0
  108. package/dist/pc-access-NxBvTrRj.js +819 -0
  109. package/dist/pending-approval-DIHvwwWS.js +22 -0
  110. package/dist/puppeteer-2o3QOwAy.js +2 -2
  111. package/dist/puppeteer-BYTMp3BI.js +2 -2
  112. package/dist/puppeteer-DQ45qwWk.js +2 -2
  113. package/dist/reminders-store-D79qdfN0.js +58 -0
  114. package/dist/renderer-pqlDRKbH.js +225 -0
  115. package/dist/rules-BooT_qFP.js +103 -0
  116. package/dist/run-main.js +366 -1109
  117. package/dist/runner-Bu--_RXw.js +810 -0
  118. package/dist/runner-D1rjuMTJ.js +810 -0
  119. package/dist/sdk/index.js +2 -2
  120. package/dist/sdk/index.mjs +2 -2
  121. package/dist/security-C-5URby1.js +73 -0
  122. package/dist/security-_xve79aq.js +4 -0
  123. package/dist/server-0kgyELx4.js +1047 -0
  124. package/dist/server-BIuTobTC.js +4 -0
  125. package/dist/server-BRlCEjyT.js +1047 -0
  126. package/dist/server-CCI1hv45.js +1047 -0
  127. package/dist/server-DU9POoWc.js +4 -0
  128. package/dist/server-RBqwE_GN.js +4 -0
  129. package/dist/session-store-CujxByI6.js +113 -0
  130. package/dist/session-store-qpJUg2M1.js +5 -0
  131. package/dist/sessions-tools-CB2qbwIk.js +5 -0
  132. package/dist/sessions-tools-DHMaTZIs.js +95 -0
  133. package/dist/skill-loader-BkceKkIg.js +7 -0
  134. package/dist/skill-loader-DhgIwK4J.js +159 -0
  135. package/dist/skill-runtime--LqxWrp5.js +102 -0
  136. package/dist/skill-runtime-C5l0Tgt-.js +5 -0
  137. package/dist/skill-runtime-DsXK_HYG.js +102 -0
  138. package/dist/skill-runtime-IVTiqrMR.js +5 -0
  139. package/dist/src-BEVLgaF1.js +63 -0
  140. package/dist/src-Bgu_OxTQ.js +458 -0
  141. package/dist/src-Bq-oKt7Z.js +458 -0
  142. package/dist/src-DWCUhnD4.js +20 -0
  143. package/dist/src-cfRTjFef.js +63 -0
  144. package/dist/sub-agent-tools-BD9DF8_g.js +39 -0
  145. package/dist/sub-agent-tools-V7b3T9_s.js +39 -0
  146. package/dist/tool-policy-DNvNRnve.js +189 -0
  147. package/dist/tts-elevenlabs-BUOGKL-k.js +61 -0
  148. package/dist/update-check-BD4qH7Am.js +81 -0
  149. package/dist/vision-DRq-f-Dj.js +121 -0
  150. package/dist/vision-tools-CFZEpQKm.js +5 -0
  151. package/dist/vision-tools-CQnBI9aa.js +51 -0
  152. package/dist/voice-transcription-CbQBToY0.js +138 -0
  153. package/dist/voice-transcription-CgWq54hn.js +138 -0
  154. package/dist/website-watch-tools-Bk_TnwuE.js +5 -0
  155. package/dist/website-watch-tools-DraMPxdl.js +139 -0
  156. package/package.json +1 -1
package/README.md CHANGED
@@ -6,10 +6,11 @@
6
6
 
7
7
  <p align="center">
8
8
  <img src="https://img.shields.io/badge/build-passing-brightgreen?style=flat-square" alt="build">
9
- <img src="https://img.shields.io/badge/release-v4.0.0-blue?style=flat-square" alt="release">
9
+ <img src="https://img.shields.io/badge/release-v4.0.2-blue?style=flat-square" alt="release">
10
10
  <img src="https://img.shields.io/badge/node-%E2%89%A522-green?style=flat-square" alt="node">
11
11
  <img src="https://img.shields.io/badge/license-MIT-gray?style=flat-square" alt="license">
12
12
  <img src="https://img.shields.io/badge/typescript-5.4-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="typescript">
13
+ <img src="https://img.shields.io/badge/security-ethical%20hacking-red?style=flat-square&logo=hackthebox&logoColor=white" alt="security">
13
14
  </p>
14
15
 
15
16
  <p align="center">
@@ -21,7 +22,8 @@
21
22
  </p>
22
23
 
23
24
  <p align="center">
24
- <em>If you want a personal, single-user assistant that feels local, fast, and always-on, this is it.</em>
25
+ <em>If you want a personal, single-user assistant that feels local, fast, and always-on, this is it.</em><br>
26
+ <em>Built for developers, security researchers, and power users who want full control.</em>
25
27
  </p>
26
28
 
27
29
  <p align="center">
@@ -36,23 +38,41 @@
36
38
 
37
39
  ---
38
40
 
41
+ ## Use cases
42
+
43
+ | Use case | How |
44
+ |----------|-----|
45
+ | **Personal assistant** | Chat via Telegram/Discord, voice on macOS/iOS, always-on daemon |
46
+ | **Bug bounty & OSINT** | HackerOne/Bugcrowd/Synack API keys, web-search skill, clipboard & screenshot tools |
47
+ | **Ethical hacking / pentest** | PC access tools (bash, file read/write), sandboxed execution, MCP tool servers |
48
+ | **Cybersecurity research** | Automate recon, triage findings, draft reports — all from your phone via Telegram |
49
+ | **Developer productivity** | Code review, GitHub integration, local shell access, memory across sessions |
50
+ | **Home automation** | Cron skills, morning briefing, calendar events, device commands (macOS/Android) |
51
+
52
+ > HyperClaw runs **locally on your machine** — your data, your keys, your control.
53
+
54
+ ---
55
+
39
56
  ## Install
40
57
 
41
- Runtime: Node ≥ 22.
58
+ Runtime: Node ≥ 22. Runs **natively on Windows, macOS, and Linux** — no WSL2 required.
42
59
 
43
60
  ```bash
44
- npm install -g github:hyperclaw-ai/hyperclaw
45
- # ή
46
- npm install -g https://github.com/hyperclaw-ai/hyperclaw
47
61
  npm install -g hyperclaw@latest
48
62
  # or: pnpm add -g hyperclaw@latest
49
- hyperclaw onboard --install deamon
50
63
 
64
+ # First-time setup wizard
51
65
  hyperclaw onboard
66
+
67
+ # Or install with daemon (auto-start on boot, full PC access)
68
+ hyperclaw onboard --install-daemon
52
69
  ```
53
70
 
71
+ > **Windows users**: HyperClaw runs natively via Node.js. No WSL2, no admin rights needed.
72
+ > The daemon uses **Task Scheduler** and runs as your user account with full desktop access.
73
+
54
74
  The wizard guides you step by step — provider, model, gateway, channels, and skills.
55
- Works on **macOS, Linux, and Windows** (via WSL2 recommended). Compatible with npm, pnpm, and bun.
75
+ Works on **macOS, Linux, and Windows** (native — no WSL2 required). Compatible with npm, pnpm, and bun.
56
76
 
57
77
  ---
58
78
 
@@ -62,17 +82,20 @@ Works on **macOS, Linux, and Windows** (via WSL2 recommended). Compatible with n
62
82
  # 1. Run the onboarding wizard (first time)
63
83
  hyperclaw onboard
64
84
 
65
- # 2. Start the gateway (stays running in foreground)
85
+ # 2a. Start the gateway in foreground
66
86
  hyperclaw gateway --port 18789 --verbose
67
87
 
68
- # 3. Or install as a background daemon (launchd / systemd)
69
- hyperclaw daemon install && hyperclaw daemon start
88
+ # 2b. Or run as a background daemon (auto-start on boot)
89
+ hyperclaw daemon start
70
90
 
71
- # 4. Talk to your assistant
91
+ # 3. Talk to your assistant
72
92
  hyperclaw agent --message "What can you do?"
73
93
 
74
- # 5. Send a message to a connected channel
75
- hyperclaw message send --to +1234567890 --message "Hello from HyperClaw"
94
+ # 4. Security / bug bounty run recon from your phone
95
+ # Just message your Telegram bot: "search HackerOne for targets on acme.com"
96
+
97
+ # 5. Check status
98
+ hyperclaw doctor
76
99
  ```
77
100
 
78
101
  Upgrading? Run `hyperclaw doctor` to check and migrate.
@@ -213,7 +236,7 @@ Full guide: [docs/security.md](docs/security.md)
213
236
  ## Features
214
237
 
215
238
  - **Local-first Gateway** — single control plane for sessions, channels, tools, and events
216
- - **Multi-channel inbox** — 14+ channels, unified session model
239
+ - **Multi-channel inbox** — 27+ channels, unified session model
217
240
  - **Multi-agent routing** — route channels/accounts to isolated agent workspaces
218
241
  - **Extended thinking** — Claude extended thinking with `/think high` in chat
219
242
  - **Voice** — Talk Mode with ElevenLabs TTS + system TTS fallback
@@ -312,10 +335,19 @@ docker build -f Dockerfile.sandbox -t hyperclaw:sandbox .
312
335
  ```
313
336
  hyperclaw/
314
337
  ├── src/ # Core CLI, gateway, channels, tools
315
- │ ├── cli/ # CLI entry point + commands
338
+ │ ├── cli/ # CLI entry point + onboarding wizard
316
339
  │ ├── gateway/ # Gateway server + manager (re-exports)
317
340
  │ ├── channels/ # Channel connectors + registry
318
- └── services/ # MCP, memory, heartbeat, cron
341
+ ├── services/ # MCP, memory, heartbeat, cron
342
+ │ ├── agent/ # Agent loop, orchestrator, tool dispatch
343
+ │ ├── canvas/ # A2UI Canvas renderer
344
+ │ ├── commands/ # CLI sub-commands (channels, pairing…)
345
+ │ ├── hooks/ # Lifecycle hooks (boot, cron, memory)
346
+ │ ├── infra/ # Tool policy, destructive gate, secrets
347
+ │ ├── media/ # Voice, TTS, STT, audio
348
+ │ ├── routing/ # Session routing + multi-agent dispatch
349
+ │ ├── security/ # Auth, sandboxing, DM policy
350
+ │ └── … # (sdk, types, webhooks, logging, plugins…)
319
351
  ├── packages/
320
352
  │ ├── core/ # Inference engine, agent loop
321
353
  │ ├── gateway/ # Gateway package (standalone)
@@ -324,9 +356,12 @@ hyperclaw/
324
356
  │ ├── ios/ # iOS node app
325
357
  │ ├── android/ # Android node app
326
358
  │ ├── macos/ # macOS menu bar app
327
- └── macos-menubar/ # Tauri macOS menu bar
359
+ ├── macos-menubar/ # Tauri macOS menu bar
360
+ │ └── web/ # Web UI (React + Vite)
328
361
  ├── extensions/ # Channel connectors (Telegram, Discord…)
329
362
  ├── skills/ # Bundled skills (reminders, translator)
363
+ ├── workspace-templates/ # Agent config templates (AGENTS.md, SOUL.md, TOOLS.md…)
364
+ ├── scripts/ # Build + utility scripts
330
365
  ├── tests/ # Vitest — unit / integration / e2e
331
366
  └── docs/ # Full documentation
332
367
  ```
@@ -0,0 +1,75 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+
3
+ //#region src/canvas/a2ui-protocol.ts
4
+ /** Map HyperClaw component type to A2UI-compatible type. */
5
+ function toA2UIType(t) {
6
+ const map = {
7
+ chart: "chart",
8
+ table: "table",
9
+ form: "form",
10
+ markdown: "markdown",
11
+ image: "image",
12
+ custom: "custom",
13
+ script: "script"
14
+ };
15
+ return map[t] || "custom";
16
+ }
17
+ /** Convert a CanvasComponent to A2UI surface. */
18
+ function componentToSurface(c) {
19
+ return {
20
+ id: c.id,
21
+ type: toA2UIType(c.type),
22
+ props: {
23
+ title: c.title,
24
+ width: c.width || "half"
25
+ },
26
+ data: c.data
27
+ };
28
+ }
29
+ /** Generate beginRendering from canvas state (full sync). */
30
+ function toBeginRendering(canvas) {
31
+ const surfaces = canvas.components.map(componentToSurface);
32
+ const dataModel = {};
33
+ for (const c of canvas.components) if (c.data != null) dataModel[c.id] = c.data;
34
+ return {
35
+ type: "beginRendering",
36
+ surfaceId: canvas.id,
37
+ surfaces,
38
+ dataModel: Object.keys(dataModel).length ? dataModel : void 0
39
+ };
40
+ }
41
+ /** Generate surfaceUpdate for newly added component. */
42
+ function toSurfaceUpdate(canvasId, component) {
43
+ return {
44
+ type: "surfaceUpdate",
45
+ surfaceId: canvasId,
46
+ surfaces: [componentToSurface(component)]
47
+ };
48
+ }
49
+ /** Generate dataModelUpdate when component data changes. */
50
+ function toDataModelUpdate(canvasId, componentId, data) {
51
+ return {
52
+ type: "dataModelUpdate",
53
+ surfaceId: canvasId,
54
+ updates: { [componentId]: data }
55
+ };
56
+ }
57
+ /** Generate deleteSurface for removed components. */
58
+ function toDeleteSurface(canvasId, componentIds) {
59
+ return {
60
+ type: "deleteSurface",
61
+ surfaceId: canvasId,
62
+ surfaceIds: componentIds
63
+ };
64
+ }
65
+ /** Serialize A2UI messages to JSONL (one message per line). */
66
+ function toJSONL(messages) {
67
+ return messages.map((m) => JSON.stringify(m)).join("\n");
68
+ }
69
+
70
+ //#endregion
71
+ exports.toBeginRendering = toBeginRendering;
72
+ exports.toDataModelUpdate = toDataModelUpdate;
73
+ exports.toDeleteSurface = toDeleteSurface;
74
+ exports.toJSONL = toJSONL;
75
+ exports.toSurfaceUpdate = toSurfaceUpdate;
@@ -0,0 +1,129 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ const chalk = require_chunk.__toESM(require("chalk"));
3
+ const inquirer = require_chunk.__toESM(require("inquirer"));
4
+ const fs_extra = require_chunk.__toESM(require("fs-extra"));
5
+ const path = require_chunk.__toESM(require("path"));
6
+ const os = require_chunk.__toESM(require("os"));
7
+
8
+ //#region src/routing/agents-routing.ts
9
+ var AgentRouter = class {
10
+ stateFile;
11
+ agents = [];
12
+ constructor() {
13
+ this.stateFile = path.default.join(os.default.homedir(), ".hyperclaw", "agents.json");
14
+ this.load();
15
+ }
16
+ load() {
17
+ try {
18
+ this.agents = fs_extra.default.readJsonSync(this.stateFile);
19
+ } catch {
20
+ this.agents = [{
21
+ workspace: path.default.join(os.default.homedir(), ".hyperclaw", "workspace"),
22
+ name: "default",
23
+ model: void 0,
24
+ bindings: []
25
+ }];
26
+ }
27
+ }
28
+ save() {
29
+ fs_extra.default.ensureDirSync(path.default.dirname(this.stateFile));
30
+ fs_extra.default.writeJsonSync(this.stateFile, this.agents, { spaces: 2 });
31
+ }
32
+ listBindings() {
33
+ console.log(chalk.default.bold.cyan("\n 🦅 AGENT BINDINGS\n"));
34
+ if (this.agents.length === 0) {
35
+ console.log(chalk.default.gray(" No agents configured."));
36
+ return;
37
+ }
38
+ for (const agent of this.agents) {
39
+ console.log(` ${chalk.default.bold(agent.name)} ${chalk.default.gray(agent.workspace)}`);
40
+ if (agent.bindings.length === 0) console.log(` ${chalk.default.gray("No channel bindings — receives from all channels")}`);
41
+ else for (const b of agent.bindings) {
42
+ const acct = b.accountId ? chalk.default.gray(`@${b.accountId}`) : chalk.default.gray("(all accounts)");
43
+ const role = b.role === "primary" ? chalk.default.green("[primary]") : chalk.default.gray("[secondary]");
44
+ console.log(` ${chalk.default.cyan(b.channelId)} ${acct} ${role}`);
45
+ }
46
+ console.log();
47
+ }
48
+ }
49
+ async bind() {
50
+ console.log(chalk.default.cyan("\n Bind a channel to an agent workspace\n"));
51
+ const { channel, workspace, role } = await inquirer.default.prompt([
52
+ {
53
+ type: "input",
54
+ name: "channel",
55
+ message: "Channel ID (e.g. telegram, discord, slack):",
56
+ validate: (v) => v.trim().length > 0 || "Required"
57
+ },
58
+ {
59
+ type: "input",
60
+ name: "workspace",
61
+ message: "Agent workspace (directory or name):",
62
+ default: "default"
63
+ },
64
+ {
65
+ type: "list",
66
+ name: "role",
67
+ message: "Binding role:",
68
+ choices: [{
69
+ name: "primary — routes all traffic from this channel",
70
+ value: "primary"
71
+ }, {
72
+ name: "secondary — fallback if primary is busy",
73
+ value: "secondary"
74
+ }]
75
+ }
76
+ ]);
77
+ let agent = this.agents.find((a) => a.name === workspace || a.workspace === workspace);
78
+ if (!agent) {
79
+ agent = {
80
+ workspace,
81
+ name: workspace,
82
+ bindings: []
83
+ };
84
+ this.agents.push(agent);
85
+ }
86
+ agent.bindings.push({
87
+ channelId: channel,
88
+ agentWorkspace: agent.workspace,
89
+ role,
90
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
91
+ });
92
+ this.save();
93
+ console.log(chalk.default.green(`\n ✔ Bound ${channel} → ${workspace} (${role})\n`));
94
+ }
95
+ async unbind() {
96
+ const allBindings = [];
97
+ for (const agent of this.agents) for (const b of agent.bindings) allBindings.push({
98
+ agent: agent.name,
99
+ channel: b.channelId
100
+ });
101
+ if (allBindings.length === 0) {
102
+ console.log(chalk.default.gray("\n No bindings to remove.\n"));
103
+ return;
104
+ }
105
+ const { toRemove } = await inquirer.default.prompt([{
106
+ type: "checkbox",
107
+ name: "toRemove",
108
+ message: "Select bindings to remove:",
109
+ choices: allBindings.map((b) => ({
110
+ name: `${b.channel} → ${b.agent}`,
111
+ value: b
112
+ }))
113
+ }]);
114
+ for (const { agent: agentName, channel } of toRemove) {
115
+ const agent = this.agents.find((a) => a.name === agentName);
116
+ if (agent) agent.bindings = agent.bindings.filter((b) => b.channelId !== channel);
117
+ }
118
+ this.save();
119
+ console.log(chalk.default.green(`\n ✔ Removed ${toRemove.length} binding(s)\n`));
120
+ }
121
+ };
122
+
123
+ //#endregion
124
+ Object.defineProperty(exports, 'AgentRouter', {
125
+ enumerable: true,
126
+ get: function () {
127
+ return AgentRouter;
128
+ }
129
+ });
@@ -0,0 +1,4 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+ const require_agents_routing = require('./agents-routing-683Q2JGp.js');
3
+
4
+ exports.AgentRouter = require_agents_routing.AgentRouter;
@@ -0,0 +1,149 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+
3
+ //#region src/infra/api-keys-guide.ts
4
+ const API_KEYS_GUIDE = [
5
+ {
6
+ serviceId: "anthropic",
7
+ name: "Anthropic (Claude)",
8
+ envVar: "ANTHROPIC_API_KEY",
9
+ url: "platform.anthropic.com",
10
+ setupSteps: [
11
+ "1. Go to platform.anthropic.com → API Keys.",
12
+ "2. Sign up / sign in with an Anthropic account.",
13
+ "3. Create Key — copy it (starts with sk-ant-). Not shown again!",
14
+ "",
15
+ " 🔗 platform.anthropic.com/settings/keys"
16
+ ]
17
+ },
18
+ {
19
+ serviceId: "openai",
20
+ name: "OpenAI (GPT)",
21
+ envVar: "OPENAI_API_KEY",
22
+ url: "platform.openai.com",
23
+ setupSteps: [
24
+ "1. Go to platform.openai.com → API keys.",
25
+ "2. Create new secret key — copy it (starts with sk-). Not shown again!",
26
+ "3. You need billing enabled for production use.",
27
+ "",
28
+ " 🔗 platform.openai.com/api-keys"
29
+ ]
30
+ },
31
+ {
32
+ serviceId: "openrouter",
33
+ name: "OpenRouter",
34
+ envVar: "OPENROUTER_API_KEY",
35
+ url: "openrouter.ai",
36
+ setupSteps: [
37
+ "1. Go to openrouter.ai → Keys.",
38
+ "2. Sign in (Google/GitHub).",
39
+ "3. Create Key — copy it. OpenRouter provides access to many models (Claude, GPT etc.).",
40
+ "",
41
+ " 🔗 openrouter.ai/keys"
42
+ ]
43
+ },
44
+ {
45
+ serviceId: "tavily",
46
+ name: "Tavily (Web Search)",
47
+ envVar: "TAVILY_API_KEY",
48
+ url: "tavily.com",
49
+ setupSteps: [
50
+ "1. Go to tavily.com → Sign up.",
51
+ "2. Dashboard → API Keys → Create API Key.",
52
+ "3. Copy the key. Used for the web-search skill.",
53
+ "",
54
+ " 🔗 app.tavily.com"
55
+ ]
56
+ },
57
+ {
58
+ serviceId: "elevenlabs",
59
+ name: "ElevenLabs (TTS)",
60
+ envVar: "ELEVENLABS_API_KEY",
61
+ url: "elevenlabs.io",
62
+ setupSteps: [
63
+ "1. Go to elevenlabs.io → Profile → API Key.",
64
+ "2. Copy the API key (or create a new one).",
65
+ "3. Used for talk mode (voice responses).",
66
+ "",
67
+ " 🔗 elevenlabs.io/app/settings/api-keys"
68
+ ]
69
+ },
70
+ {
71
+ serviceId: "deepl",
72
+ name: "DeepL (Translation)",
73
+ envVar: "DEEPL_API_KEY",
74
+ url: "deepl.com",
75
+ setupSteps: [
76
+ "1. Go to deepl.com/pro-api → Get API key.",
77
+ "2. Sign up (free tier available).",
78
+ "3. Account → API keys — copy the Authentication Key.",
79
+ "",
80
+ " 🔗 deepl.com/pro-api"
81
+ ]
82
+ },
83
+ {
84
+ serviceId: "github",
85
+ name: "GitHub (PAT)",
86
+ envVar: "GITHUB_TOKEN",
87
+ url: "github.com",
88
+ setupSteps: [
89
+ "1. GitHub → Settings → Developer settings → Personal access tokens.",
90
+ "2. Generate new token (classic or fine-grained).",
91
+ "3. Select scopes: repo, read:user etc. depending on use case.",
92
+ "",
93
+ " 🔗 github.com/settings/tokens"
94
+ ]
95
+ },
96
+ {
97
+ serviceId: "xai",
98
+ name: "xAI (Grok)",
99
+ envVar: "XAI_API_KEY",
100
+ url: "x.ai",
101
+ setupSteps: [
102
+ "1. Go to console.x.ai → API keys.",
103
+ "2. Sign in and create a new key.",
104
+ "3. Copy the key.",
105
+ "",
106
+ " 🔗 console.x.ai"
107
+ ]
108
+ },
109
+ {
110
+ serviceId: "google",
111
+ name: "Google AI (Gemini)",
112
+ envVar: "GOOGLE_AI_API_KEY",
113
+ url: "ai.google.dev",
114
+ setupSteps: [
115
+ "1. Go to aistudio.google.com/apikey.",
116
+ "2. Get API key or Create API key.",
117
+ "3. Copy the key.",
118
+ "",
119
+ " 🔗 aistudio.google.com/apikey"
120
+ ]
121
+ }
122
+ ];
123
+ const SERVICE_ID_MAP = new Map(API_KEYS_GUIDE.map((g) => [g.serviceId.toLowerCase(), g]));
124
+ /** Known name aliases (e.g. anthropic, claude -> anthropic) */
125
+ const ALIASES = {
126
+ claude: "anthropic",
127
+ gpt: "openai",
128
+ xai: "xai",
129
+ google: "google"
130
+ };
131
+ function getApiKeyGuide(serviceId) {
132
+ const id = serviceId.toLowerCase().replace(/[^a-z0-9-]/g, "");
133
+ return SERVICE_ID_MAP.get(id) ?? SERVICE_ID_MAP.get(ALIASES[id] ?? "") ?? null;
134
+ }
135
+ /** For unknown services — generic API key instructions */
136
+ const GENERIC_API_KEY_STEPS = [
137
+ "For an unknown service:",
138
+ "1. Go to the official service website (e.g. developers.xxx.com).",
139
+ "2. Sign up / sign in. An account is usually required.",
140
+ "3. Look for \"API Keys\", \"Credentials\", \"Developer\" or \"Integrations\" section.",
141
+ "4. Create a new API key or token. Copy it immediately — many services do not show it again.",
142
+ "5. Keep it secret — do not share it or commit it to a repo.",
143
+ "",
144
+ " 💡 Known services: anthropic, openai, openrouter, tavily, elevenlabs, deepl, github, xai, google"
145
+ ];
146
+
147
+ //#endregion
148
+ exports.GENERIC_API_KEY_STEPS = GENERIC_API_KEY_STEPS;
149
+ exports.getApiKeyGuide = getApiKeyGuide;
@@ -0,0 +1,149 @@
1
+ const require_chunk = require('./chunk-jS-bbMI5.js');
2
+
3
+ //#region src/infra/api-keys-guide.ts
4
+ const API_KEYS_GUIDE = [
5
+ {
6
+ serviceId: "anthropic",
7
+ name: "Anthropic (Claude)",
8
+ envVar: "ANTHROPIC_API_KEY",
9
+ url: "platform.anthropic.com",
10
+ setupSteps: [
11
+ "1. Go to platform.anthropic.com → API Keys.",
12
+ "2. Sign up / sign in with an Anthropic account.",
13
+ "3. Create Key — copy it (starts with sk-ant-). Not shown again!",
14
+ "",
15
+ " 🔗 platform.anthropic.com/settings/keys"
16
+ ]
17
+ },
18
+ {
19
+ serviceId: "openai",
20
+ name: "OpenAI (GPT)",
21
+ envVar: "OPENAI_API_KEY",
22
+ url: "platform.openai.com",
23
+ setupSteps: [
24
+ "1. Go to platform.openai.com → API keys.",
25
+ "2. Create new secret key — copy it (starts with sk-). Not shown again!",
26
+ "3. You need billing enabled for production use.",
27
+ "",
28
+ " 🔗 platform.openai.com/api-keys"
29
+ ]
30
+ },
31
+ {
32
+ serviceId: "openrouter",
33
+ name: "OpenRouter",
34
+ envVar: "OPENROUTER_API_KEY",
35
+ url: "openrouter.ai",
36
+ setupSteps: [
37
+ "1. Go to openrouter.ai → Keys.",
38
+ "2. Sign in (Google/GitHub).",
39
+ "3. Create Key — copy it. OpenRouter provides access to many models (Claude, GPT etc.).",
40
+ "",
41
+ " 🔗 openrouter.ai/keys"
42
+ ]
43
+ },
44
+ {
45
+ serviceId: "tavily",
46
+ name: "Tavily (Web Search)",
47
+ envVar: "TAVILY_API_KEY",
48
+ url: "tavily.com",
49
+ setupSteps: [
50
+ "1. Go to tavily.com → Sign up.",
51
+ "2. Dashboard → API Keys → Create API Key.",
52
+ "3. Copy the key. Used for the web-search skill.",
53
+ "",
54
+ " 🔗 app.tavily.com"
55
+ ]
56
+ },
57
+ {
58
+ serviceId: "elevenlabs",
59
+ name: "ElevenLabs (TTS)",
60
+ envVar: "ELEVENLABS_API_KEY",
61
+ url: "elevenlabs.io",
62
+ setupSteps: [
63
+ "1. Go to elevenlabs.io → Profile → API Key.",
64
+ "2. Copy the API key (or create a new one).",
65
+ "3. Used for talk mode (voice responses).",
66
+ "",
67
+ " 🔗 elevenlabs.io/app/settings/api-keys"
68
+ ]
69
+ },
70
+ {
71
+ serviceId: "deepl",
72
+ name: "DeepL (Translation)",
73
+ envVar: "DEEPL_API_KEY",
74
+ url: "deepl.com",
75
+ setupSteps: [
76
+ "1. Go to deepl.com/pro-api → Get API key.",
77
+ "2. Sign up (free tier available).",
78
+ "3. Account → API keys — copy the Authentication Key.",
79
+ "",
80
+ " 🔗 deepl.com/pro-api"
81
+ ]
82
+ },
83
+ {
84
+ serviceId: "github",
85
+ name: "GitHub (PAT)",
86
+ envVar: "GITHUB_TOKEN",
87
+ url: "github.com",
88
+ setupSteps: [
89
+ "1. GitHub → Settings → Developer settings → Personal access tokens.",
90
+ "2. Generate new token (classic or fine-grained).",
91
+ "3. Select scopes: repo, read:user etc. depending on use case.",
92
+ "",
93
+ " 🔗 github.com/settings/tokens"
94
+ ]
95
+ },
96
+ {
97
+ serviceId: "xai",
98
+ name: "xAI (Grok)",
99
+ envVar: "XAI_API_KEY",
100
+ url: "x.ai",
101
+ setupSteps: [
102
+ "1. Go to console.x.ai → API keys.",
103
+ "2. Sign in and create a new key.",
104
+ "3. Copy the key.",
105
+ "",
106
+ " 🔗 console.x.ai"
107
+ ]
108
+ },
109
+ {
110
+ serviceId: "google",
111
+ name: "Google AI (Gemini)",
112
+ envVar: "GOOGLE_AI_API_KEY",
113
+ url: "ai.google.dev",
114
+ setupSteps: [
115
+ "1. Go to aistudio.google.com/apikey.",
116
+ "2. Get API key or Create API key.",
117
+ "3. Copy the key.",
118
+ "",
119
+ " 🔗 aistudio.google.com/apikey"
120
+ ]
121
+ }
122
+ ];
123
+ const SERVICE_ID_MAP = new Map(API_KEYS_GUIDE.map((g) => [g.serviceId.toLowerCase(), g]));
124
+ /** Known name aliases (e.g. anthropic, claude -> anthropic) */
125
+ const ALIASES = {
126
+ claude: "anthropic",
127
+ gpt: "openai",
128
+ xai: "xai",
129
+ google: "google"
130
+ };
131
+ function getApiKeyGuide(serviceId) {
132
+ const id = serviceId.toLowerCase().replace(/[^a-z0-9-]/g, "");
133
+ return SERVICE_ID_MAP.get(id) ?? SERVICE_ID_MAP.get(ALIASES[id] ?? "") ?? null;
134
+ }
135
+ /** For unknown services — generic API key instructions */
136
+ const GENERIC_API_KEY_STEPS = [
137
+ "For an unknown service:",
138
+ "1. Go to the official service website (e.g. developers.xxx.com).",
139
+ "2. Sign up / sign in. An account is usually required.",
140
+ "3. Look for \"API Keys\", \"Credentials\", \"Developer\" or \"Integrations\" section.",
141
+ "4. Create a new API key or token. Copy it immediately — many services do not show it again.",
142
+ "5. Keep it secret — do not share it or commit it to a repo.",
143
+ "",
144
+ " 💡 Known services: anthropic, openai, openrouter, tavily, elevenlabs, deepl, github, xai, google"
145
+ ];
146
+
147
+ //#endregion
148
+ exports.GENERIC_API_KEY_STEPS = GENERIC_API_KEY_STEPS;
149
+ exports.getApiKeyGuide = getApiKeyGuide;