hyperclaw 5.0.0 → 5.0.1

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 (65) hide show
  1. package/README.md +204 -69
  2. package/dist/api-keys-guide-CGn5BSF7.js +149 -0
  3. package/dist/audit-BJohI_vC.js +441 -0
  4. package/dist/bounty-tools-CY_i91DU.js +211 -0
  5. package/dist/claw-tasks-Cyzdbhz_.js +80 -0
  6. package/dist/cost-tracker-Ca1UPZ33.js +103 -0
  7. package/dist/credentials-store-CA8UtK0T.js +77 -0
  8. package/dist/credentials-store-Cm7DH-kh.js +4 -0
  9. package/dist/cron-tasks-_pqQCmxc.js +82 -0
  10. package/dist/daemon-7ViroziB.js +5 -0
  11. package/dist/daemon-BfyKmZhr.js +318 -0
  12. package/dist/delivery-DVHmv1IR.js +4 -0
  13. package/dist/delivery-DpMX0Yyc.js +95 -0
  14. package/dist/destructive-gate-DZt71UZR.js +101 -0
  15. package/dist/engine-B0kLfRL0.js +256 -0
  16. package/dist/engine-BJUpRUOv.js +7 -0
  17. package/dist/env-resolve-17ekEU6p.js +10 -0
  18. package/dist/env-resolve-Z2XF6leB.js +115 -0
  19. package/dist/heartbeat-engine-Ut6pXBD6.js +83 -0
  20. package/dist/hub-9LaKnLjY.js +6 -0
  21. package/dist/hub-CfwUz9YW.js +515 -0
  22. package/dist/hyperclawbot-CBiDSKsa.js +505 -0
  23. package/dist/inference-0mlFQqIm.js +922 -0
  24. package/dist/inference-SzqFe_nk.js +6 -0
  25. package/dist/knowledge-graph-DE5lSF02.js +131 -0
  26. package/dist/loader-BkDi8MD9.js +400 -0
  27. package/dist/loader-DI2qDRPC.js +4 -0
  28. package/dist/logger-Cp8wC7F8.js +83 -0
  29. package/dist/manager-B2Gls5RG.js +218 -0
  30. package/dist/manager-CWNSML5D.js +117 -0
  31. package/dist/manager-SJe9gt-q.js +4 -0
  32. package/dist/mcp-loader-CvxRDtPC.js +94 -0
  33. package/dist/memory-auto-CpQHZlEJ.js +306 -0
  34. package/dist/memory-auto-Z6LCf-iK.js +5 -0
  35. package/dist/memory-integration-g2vxwgoE.js +91 -0
  36. package/dist/moltbook-Cl8cQfxJ.js +81 -0
  37. package/dist/nodes-registry-C9dCFwjh.js +52 -0
  38. package/dist/oauth-flow-CeaaGAz0.js +150 -0
  39. package/dist/oauth-provider-B4dzn56l.js +110 -0
  40. package/dist/observability-nZ3CBIxG.js +89 -0
  41. package/dist/onboard-BBBWcfhp.js +10 -0
  42. package/dist/onboard-Bw28IRQ3.js +4070 -0
  43. package/dist/orchestrator-BovkM63z.js +6 -0
  44. package/dist/orchestrator-DSbpkP1X.js +189 -0
  45. package/dist/osint-B4_m3VHQ.js +277 -0
  46. package/dist/pending-approval-BgNjjuI2.js +22 -0
  47. package/dist/run-main.js +82 -67
  48. package/dist/runner-CJFJUtPm.js +1271 -0
  49. package/dist/sdk/index.js +2 -2
  50. package/dist/sdk/index.mjs +2 -2
  51. package/dist/server-Brl_HQUB.js +1255 -0
  52. package/dist/server-DhfipkwN.js +4 -0
  53. package/dist/skill-runtime-BXWd-Ktf.js +102 -0
  54. package/dist/skill-runtime-jgklm02e.js +5 -0
  55. package/dist/src-Bhybpk1J.js +63 -0
  56. package/dist/src-DMJ4-uqk.js +458 -0
  57. package/dist/sub-agent-tools-DHY-4WWM.js +39 -0
  58. package/dist/tool-policy-DZvF8xlQ.js +189 -0
  59. package/dist/tts-elevenlabs-C06nUxMK.js +61 -0
  60. package/dist/update-check-w4XuxVl7.js +81 -0
  61. package/dist/vision-JOtOS1Br.js +121 -0
  62. package/dist/vision-tools-CB28ZCO_.js +5 -0
  63. package/dist/vision-tools-vPPwQ-0N.js +51 -0
  64. package/dist/voice-transcription-DBo5hXmu.js +138 -0
  65. package/package.json +1 -1
package/README.md CHANGED
@@ -1,40 +1,55 @@
1
- <p align="center">
2
- <img src="assets/icon.png" width="120" alt="HyperClaw">
3
- <br>
4
- <h1 align="center">🦅 HyperClawPersonal AI Assistant</h1>
5
- </p>
1
+ <div align="center">
2
+ <img src="assets/icon.png" width="140" alt="HyperClaw">
3
+ <h1>🦅 HyperClaw</h1>
4
+ <p><strong>Your personal AI assistant running on your hardware, talking on your channels.</strong></p>
5
+ <p><em>One command to install. Works on Telegram, Discord, WhatsApp, Signal, iMessage and 25+ more.</em></p>
6
+ </div>
6
7
 
7
8
  <p align="center">
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-v5.0.0-blue?style=flat-square" alt="release">
10
- <img src="https://img.shields.io/badge/node-%E2%89%A522-green?style=flat-square" alt="node">
11
- <img src="https://img.shields.io/badge/license-MIT-gray?style=flat-square" alt="license">
9
+ <a href="https://github.com/mylo-2001/hyperclaw/stargazers"><img src="https://img.shields.io/github/stars/mylo-2001/hyperclaw?style=flat-square&logo=github&color=yellow" alt="GitHub Stars"></a>
10
+ <a href="https://github.com/mylo-2001/hyperclaw/network/members"><img src="https://img.shields.io/github/forks/mylo-2001/hyperclaw?style=flat-square&logo=github" alt="GitHub Forks"></a>
11
+ <a href="https://www.npmjs.com/package/hyperclaw"><img src="https://img.shields.io/npm/dw/hyperclaw?style=flat-square&logo=npm&color=red" alt="npm downloads"></a>
12
+ <a href="https://www.npmjs.com/package/hyperclaw"><img src="https://img.shields.io/npm/v/hyperclaw?style=flat-square&logo=npm&label=npm" alt="npm version"></a>
13
+ <a href="https://github.com/mylo-2001/hyperclaw/actions"><img src="https://img.shields.io/github/actions/workflow/status/mylo-2001/hyperclaw/secrets-scan.yml?branch=main&style=flat-square&label=CI" alt="CI"></a>
14
+ <img src="https://img.shields.io/badge/node-%E2%89%A522-green?style=flat-square&logo=node.js" alt="node">
12
15
  <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">
16
+ <img src="https://img.shields.io/badge/license-MIT-gray?style=flat-square" alt="license">
17
+ <img src="https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-blue?style=flat-square" alt="platforms">
14
18
  </p>
15
19
 
16
20
  <p align="center">
17
- <strong>HyperClaw</strong> is a personal AI assistant you run on your own devices.<br>
18
- It answers you on the channels you already use — Telegram, Discord, WhatsApp, Slack, Signal, iMessage,<br>
19
- Matrix, IRC, Mattermost, Google Chat, Microsoft Teams, Nostr, and more.<br>
20
- It can speak and listen on macOS/iOS/Android, and render a live Canvas you control.<br>
21
- The Gateway is just the control plane — the product is the assistant.
21
+ <a href="docs/README.md">📚 Docs</a> ·
22
+ <a href="docs/architecture.md">🏗 Architecture</a> ·
23
+ <a href="docs/configuration.md">⚙️ Config</a> ·
24
+ <a href="docs/security.md">🔒 Security</a> ·
25
+ <a href="docs/sandboxing.md">🐳 Sandboxing</a> ·
26
+ <a href="docs/tlon.md">🌊 Tlon</a> ·
27
+ <a href="docs/google-chat.md">💬 Google Chat</a> ·
28
+ <a href="CONTRIBUTING.md">🤝 Contributing</a>
22
29
  </p>
23
30
 
24
- <p align="center">
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>
27
- </p>
31
+ ---
28
32
 
29
- <p align="center">
30
- <a href="docs/README.md">Docs</a> ·
31
- <a href="docs/architecture.md">Architecture</a> ·
32
- <a href="docs/configuration.md">Configuration</a> ·
33
- <a href="docs/security.md">Security</a> ·
34
- <a href="docs/deployment.md">Docker</a> ·
35
- <a href="docs/tailscale.md">Tailscale</a> ·
36
- <a href="CONTRIBUTING.md">Contributing</a>
37
- </p>
33
+ > **"One `npm install -g hyperclaw` and your AI is live on Telegram."**
34
+
35
+ ---
36
+
37
+ ## Why HyperClaw?
38
+
39
+ | Feature | HyperClaw | Cloud assistants | Self-hosted alternatives |
40
+ |---------|:---------:|:----------------:|:------------------------:|
41
+ | Runs on your own hardware | ✅ | ❌ | ✅ |
42
+ | No subscription / pay-per-token only | ✅ | ❌ | ✅ |
43
+ | 28+ messaging channels built-in | ✅ | ❌ | ⚠️ few |
44
+ | Windows native (no WSL) | ✅ | — | ❌ |
45
+ | Config hot-reload (no restart) | ✅ | — | ❌ |
46
+ | Built-in security audit (`--fix`) | ✅ | — | ❌ |
47
+ | DM pairing / allowlist by default | ✅ | — | ⚠️ manual |
48
+ | Voice (TTS + STT) | ✅ | ✅ | ⚠️ |
49
+ | Docker sandbox for agent tools | ✅ | — | ⚠️ |
50
+ | MCP (Model Context Protocol) | ✅ | ⚠️ | ⚠️ |
51
+ | One-command wizard (`hyperclaw onboard`) | ✅ | — | ❌ |
52
+ | OSINT / Ethical hacking mode (`hyperclaw osint`) | ✅ | ❌ | ❌ |
38
53
 
39
54
  ---
40
55
 
@@ -53,65 +68,52 @@
53
68
 
54
69
  ---
55
70
 
56
- ## Install
71
+ ## 🚀 Get started in 60 seconds
57
72
 
58
- Runtime: Node ≥ 22. Runs **natively on Windows, macOS, and Linux** — no WSL2 required.
73
+ **Requires Node ≥ 22.** Runs natively on Windows, macOS, and Linux — no WSL2 required.
59
74
 
60
75
  ```bash
76
+ # Install
61
77
  npm install -g hyperclaw@latest
62
- # or: pnpm add -g hyperclaw@latest
63
78
 
64
- # First-time setup wizard
79
+ # Run the interactive setup wizard
65
80
  hyperclaw onboard
66
-
67
- # Or install with daemon (auto-start on boot, full PC access)
81
+ # Run the interactive setup wizard with deamon
68
82
  hyperclaw onboard --install-daemon
69
83
  ```
70
84
 
71
- ## Uninstall
85
+ The wizard walks you through: AI provider → model → channels → skills. Done.
72
86
 
73
87
  ```bash
74
- # Stop and remove daemon (if running)
75
- hyperclaw daemon uninstall
88
+ # After setup, start your assistant
89
+ hyperclaw daemon start
76
90
 
77
- # Remove the package
78
- npm uninstall -g hyperclaw
91
+ # Send a test message
92
+ hyperclaw agent --message "What can you do?"
79
93
 
80
- # Remove config and data (optional)
81
- rm -rf ~/.hyperclaw
94
+ # Health check
95
+ hyperclaw doctor
82
96
  ```
83
97
 
84
- > **Windows users**: HyperClaw runs natively via Node.js. No WSL2, no admin rights needed.
85
- > The daemon uses **Task Scheduler** and runs as your user account with full desktop access.
86
-
87
- The wizard guides you step by step — provider, model, gateway, channels, and skills.
88
- Works on **macOS, Linux, and Windows** (native — no WSL2 required). Compatible with npm, pnpm, and bun.
89
-
90
- ---
98
+ > **Windows**: No WSL2, no admin rights needed. The daemon uses Task Scheduler and runs as your account.
91
99
 
92
- ## Quick start
100
+ <details>
101
+ <summary>More install options</summary>
93
102
 
94
103
  ```bash
95
- # 1. Run the onboarding wizard (first time)
96
- hyperclaw onboard
97
-
98
- # 2a. Start the gateway in foreground
99
- hyperclaw gateway --port 18789 --verbose
100
-
101
- # 2b. Or run as a background daemon (auto-start on boot)
102
- hyperclaw daemon start
103
-
104
- # 3. Talk to your assistant
105
- hyperclaw agent --message "What can you do?"
104
+ # pnpm
105
+ pnpm add -g hyperclaw@latest
106
106
 
107
- # 4. Security / bug bounty run recon from your phone
108
- # Just message your Telegram bot: "search HackerOne for targets on acme.com"
107
+ # Install with daemon (auto-start on boot + full PC access)
108
+ hyperclaw onboard --install-daemon
109
109
 
110
- # 5. Check status
111
- hyperclaw doctor
110
+ # Uninstall
111
+ hyperclaw daemon uninstall
112
+ npm uninstall -g hyperclaw
113
+ rm -rf ~/.hyperclaw # optional — removes config and data
112
114
  ```
113
115
 
114
- Upgrading? Run `hyperclaw doctor` to check and migrate.
116
+ </details>
115
117
 
116
118
  ---
117
119
 
@@ -148,6 +150,7 @@ HyperClaw connects to the channels you already use (28+ channels):
148
150
  | 📧 Email | ✅ Available | SMTP + IMAP |
149
151
  | 🎙️ Voice Call | ✅ Available | Terminal voice session |
150
152
  | 🌐 Chrome Extension | ✅ Available | Browser sidebar |
153
+ | 🌊 Tlon (Urbit Groups) | ✅ Available | Decentralized — see [docs/tlon.md](docs/tlon.md) |
151
154
 
152
155
  Twitch is also available via IRC over WebSocket.
153
156
 
@@ -229,6 +232,47 @@ Or use OpenRouter (access to all models with one key):
229
232
 
230
233
  Full reference: [docs/configuration.md](docs/configuration.md)
231
234
 
235
+ ### Config hot reload
236
+
237
+ The gateway watches `~/.hyperclaw/hyperclaw.json` and applies changes automatically — no restart needed for most settings:
238
+
239
+ ```json
240
+ {
241
+ "gateway": {
242
+ "reload": { "mode": "hybrid", "debounceMs": 300 }
243
+ }
244
+ }
245
+ ```
246
+
247
+ | Mode | Behavior |
248
+ |------|----------|
249
+ | `hybrid` _(default)_ | Hot-applies safe changes, auto-restarts for critical ones |
250
+ | `hot` | Hot-applies only — warns when a restart is needed |
251
+ | `restart` | Restarts on any change |
252
+ | `off` | Disables file watching |
253
+
254
+ ### Reverse proxy / trustedProxies
255
+
256
+ If you run behind Nginx, Caddy, or Cloudflare Tunnel, set `trustedProxies` so the gateway resolves the real client IP from `X-Forwarded-For`:
257
+
258
+ ```json
259
+ {
260
+ "gateway": {
261
+ "trustedProxies": ["127.0.0.1", "10.0.0.0/8"]
262
+ }
263
+ }
264
+ ```
265
+
266
+ ### DM scope isolation
267
+
268
+ Isolate DM sessions per channel/peer (useful when multiple people share one gateway):
269
+
270
+ ```json
271
+ {
272
+ "session": { "dmScope": "per-channel-peer" }
273
+ }
274
+ ```
275
+
232
276
  ---
233
277
 
234
278
  ## Security defaults
@@ -242,7 +286,14 @@ HyperClaw connects to real messaging surfaces. Inbound DMs are treated as untrus
242
286
  - Set `dmPolicy: "open"` only if you want anyone to reach your assistant.
243
287
  - Non-main sessions (groups/channels) can run in Docker sandboxes: `agents.defaults.sandbox.mode: "non-main"`
244
288
 
245
- Run `hyperclaw doctor` to surface risky/misconfigured policies.
289
+ Run the security audit regularly:
290
+
291
+ ```bash
292
+ hyperclaw security audit # standard scan
293
+ hyperclaw security audit --deep # live gateway probe
294
+ hyperclaw security audit --fix # auto-fix safe issues
295
+ hyperclaw security audit --json # machine-readable output
296
+ ```
246
297
 
247
298
  Full guide: [docs/security.md](docs/security.md)
248
299
 
@@ -251,7 +302,8 @@ Full guide: [docs/security.md](docs/security.md)
251
302
  ## Features
252
303
 
253
304
  - **Local-first Gateway** — single control plane for sessions, channels, tools, and events
254
- - **Multi-channel inbox** — 27+ channels, unified session model
305
+ - **Config hot reload** — gateway watches `~/.hyperclaw/hyperclaw.json`, hot-applies changes (hybrid/hot/restart/off)
306
+ - **Multi-channel inbox** — 28+ channels, unified session model
255
307
  - **Multi-agent routing** — route channels/accounts to isolated agent workspaces
256
308
  - **Extended thinking** — Claude extended thinking with `/think high` in chat
257
309
  - **Voice** — Talk Mode with ElevenLabs TTS + system TTS fallback
@@ -379,6 +431,18 @@ Sandbox image (no PC access, restricted tools):
379
431
  docker build -f Dockerfile.sandbox -t hyperclaw:sandbox .
380
432
  ```
381
433
 
434
+ Or use **Docker Compose** for the full stack (gateway + browser sandbox):
435
+
436
+ ```bash
437
+ # Copy and fill in your API keys
438
+ cp env.example .env
439
+
440
+ # Start gateway + sandbox
441
+ docker compose --profile full up -d
442
+ ```
443
+
444
+ See [`docker-compose.yml`](docker-compose.yml) and [`env.example`](env.example) for all options.
445
+
382
446
  ---
383
447
 
384
448
  ## Monorepo structure
@@ -398,7 +462,7 @@ hyperclaw/
398
462
  │ ├── media/ # Voice, TTS, STT, audio
399
463
  │ ├── routing/ # Session routing + multi-agent dispatch
400
464
  │ ├── security/ # Auth, sandboxing, DM policy
401
- │ └── … # (sdk, types, webhooks, logging, plugins…)
465
+ │ └── … # (sdk, types, webhooks, logging, plugins…)
402
466
  ├── packages/
403
467
  │ ├── core/ # Inference engine, agent loop
404
468
  │ ├── gateway/ # Gateway package (standalone)
@@ -419,9 +483,80 @@ hyperclaw/
419
483
 
420
484
  ---
421
485
 
486
+ ## Documentation
487
+
488
+ | Topic | File |
489
+ |-------|------|
490
+ | **Getting started** | [docs/README.md](docs/README.md) |
491
+ | Architecture overview | [docs/architecture.md](docs/architecture.md) |
492
+ | Configuration reference | [docs/configuration.md](docs/configuration.md) |
493
+ | Environment variables | [docs/environment.md](docs/environment.md) |
494
+ | API keys guide | [docs/API-KEYS-README.md](docs/API-KEYS-README.md) |
495
+ | OAuth providers | [docs/oauth-providers.md](docs/oauth-providers.md) |
496
+ | **Security** | [docs/security.md](docs/security.md) · [SECURITY.md](SECURITY.md) |
497
+ | Deployment / Docker | [docs/deployment.md](docs/deployment.md) |
498
+ | Tailscale remote access | [docs/tailscale.md](docs/tailscale.md) |
499
+ | Remote gateway setup | [docs/remote-gateway-setup.md](docs/remote-gateway-setup.md) |
500
+ | Multi-agent routing | [docs/multi-agent.md](docs/multi-agent.md) |
501
+ | Session management | [docs/session-management.md](docs/session-management.md) |
502
+ | Sandboxing (Docker isolation) | [docs/sandboxing.md](docs/sandboxing.md) |
503
+ | MCP (Model Context Protocol) | [docs/mcp.md](docs/mcp.md) |
504
+ | OSINT / Ethical Hacking mode | [docs/osint.md](docs/osint.md) |
505
+ | Voice / Talk Mode | [docs/voice.md](docs/voice.md) |
506
+ | Canvas (A2UI) | [docs/canvas-a2ui.md](docs/canvas-a2ui.md) |
507
+ | Browser control | [docs/browser.md](docs/browser.md) |
508
+ | **Channel guides** | |
509
+ | Telegram | [docs/telegram.md](docs/telegram.md) |
510
+ | Discord | [docs/discord-setup.md](docs/discord-setup.md) |
511
+ | WhatsApp | [docs/whatsapp.md](docs/whatsapp.md) |
512
+ | Slack | [docs/slack.md](docs/slack.md) |
513
+ | Google Chat | [docs/google-chat.md](docs/google-chat.md) |
514
+ | Tlon (Urbit Groups) | [docs/tlon.md](docs/tlon.md) |
515
+ | Matrix | [docs/matrix.md](docs/matrix.md) |
516
+ | Zalo / Zalo Personal | [docs/zalo.md](docs/zalo.md) · [docs/zalo-personal.md](docs/zalo-personal.md) |
517
+ | LINE | [docs/line.md](docs/line.md) |
518
+ | Nostr | [docs/nostr.md](docs/nostr.md) |
519
+ | Nextcloud Talk | [docs/nextcloud-talk.md](docs/nextcloud-talk.md) |
520
+ | Microsoft Teams | [docs/msteams.md](docs/msteams.md) |
521
+ | Twitch | [docs/twitch.md](docs/twitch.md) |
522
+ | iMessage (BlueBubbles) | [docs/imessage-native.md](docs/imessage-native.md) |
523
+ | **Apps** | |
524
+ | Mobile & Desktop apps | [docs/mobile-desktop-apps.md](docs/mobile-desktop-apps.md) |
525
+ | Mobile nodes (iOS/Android) | [docs/mobile-nodes.md](docs/mobile-nodes.md) |
526
+ | macOS remote control | [docs/macos-remote-control.md](docs/macos-remote-control.md) |
527
+ | **Help** | |
528
+ | FAQ | [docs/faq.md](docs/faq.md) |
529
+ | Troubleshooting | [docs/troubleshooting.md](docs/troubleshooting.md) |
530
+ | Contributing | [docs/contributing.md](docs/contributing.md) |
531
+
532
+ ---
533
+
422
534
  ## Contributing
423
535
 
424
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. AI/vibe-coded PRs welcome! 🤖
536
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. AI/vibe-coded PRs welcome!
537
+
538
+ Found a bug? [Open an issue](https://github.com/mylo-2001/hyperclaw/issues/new/choose).
539
+ Found a vulnerability? Email [securityhyperclaw.ai@gmail.com](mailto:securityhyperclaw.ai@gmail.com) — we respond within 48 h.
540
+
541
+ ---
542
+
543
+ ## Community
544
+
545
+ | | |
546
+ |--|--|
547
+ | 💬 **Discussions** | [GitHub Discussions](https://github.com/mylo-2001/hyperclaw/discussions) — questions, ideas, show & tell |
548
+ | 🐛 **Bug reports** | [GitHub Issues](https://github.com/mylo-2001/hyperclaw/issues) — templates for bugs & features |
549
+ | 🔒 **Security** | [SECURITY.md](SECURITY.md) — responsible disclosure |
550
+
551
+ ---
552
+
553
+ <div align="center">
554
+
555
+ **If HyperClaw is useful to you, a ⭐ helps others find it.**
556
+
557
+ [![Star on GitHub](https://img.shields.io/github/stars/mylo-2001/hyperclaw?style=social)](https://github.com/mylo-2001/hyperclaw)
558
+
559
+ </div>
425
560
 
426
561
  ---
427
562
 
@@ -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;