myaiforone 1.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.
- package/README.md +113 -0
- package/agents/_template/CLAUDE.md +18 -0
- package/agents/_template/agent.json +7 -0
- package/agents/platform/agentcreator/CLAUDE.md +300 -0
- package/agents/platform/appcreator/CLAUDE.md +158 -0
- package/agents/platform/gym/CLAUDE.md +486 -0
- package/agents/platform/gym/agent.json +40 -0
- package/agents/platform/gym/programs/agent-building/program.json +160 -0
- package/agents/platform/gym/programs/automations-mastery/program.json +129 -0
- package/agents/platform/gym/programs/getting-started/program.json +124 -0
- package/agents/platform/gym/programs/mcp-integrations/program.json +116 -0
- package/agents/platform/gym/programs/multi-model-strategy/program.json +115 -0
- package/agents/platform/gym/programs/prompt-engineering/program.json +136 -0
- package/agents/platform/gym/souls/alex.md +12 -0
- package/agents/platform/gym/souls/jordan.md +12 -0
- package/agents/platform/gym/souls/morgan.md +12 -0
- package/agents/platform/gym/souls/riley.md +12 -0
- package/agents/platform/gym/souls/sam.md +12 -0
- package/agents/platform/hub/CLAUDE.md +372 -0
- package/agents/platform/promptcreator/CLAUDE.md +130 -0
- package/agents/platform/skillcreator/CLAUDE.md +163 -0
- package/bin/cli.js +566 -0
- package/config.example.json +310 -0
- package/dist/agent-registry.d.ts +32 -0
- package/dist/agent-registry.d.ts.map +1 -0
- package/dist/agent-registry.js +144 -0
- package/dist/agent-registry.js.map +1 -0
- package/dist/channels/discord.d.ts +17 -0
- package/dist/channels/discord.d.ts.map +1 -0
- package/dist/channels/discord.js +114 -0
- package/dist/channels/discord.js.map +1 -0
- package/dist/channels/imessage.d.ts +23 -0
- package/dist/channels/imessage.d.ts.map +1 -0
- package/dist/channels/imessage.js +214 -0
- package/dist/channels/imessage.js.map +1 -0
- package/dist/channels/slack.d.ts +19 -0
- package/dist/channels/slack.d.ts.map +1 -0
- package/dist/channels/slack.js +167 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/telegram.d.ts +19 -0
- package/dist/channels/telegram.d.ts.map +1 -0
- package/dist/channels/telegram.js +274 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/types.d.ts +44 -0
- package/dist/channels/types.d.ts.map +1 -0
- package/dist/channels/types.js +18 -0
- package/dist/channels/types.js.map +1 -0
- package/dist/channels/whatsapp.d.ts +23 -0
- package/dist/channels/whatsapp.d.ts.map +1 -0
- package/dist/channels/whatsapp.js +189 -0
- package/dist/channels/whatsapp.js.map +1 -0
- package/dist/config.d.ts +134 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +127 -0
- package/dist/config.js.map +1 -0
- package/dist/cron.d.ts +8 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +35 -0
- package/dist/cron.js.map +1 -0
- package/dist/decrypt-keys.d.ts +7 -0
- package/dist/decrypt-keys.d.ts.map +1 -0
- package/dist/decrypt-keys.js +53 -0
- package/dist/decrypt-keys.js.map +1 -0
- package/dist/encrypt-keys.d.ts +8 -0
- package/dist/encrypt-keys.d.ts.map +1 -0
- package/dist/encrypt-keys.js +62 -0
- package/dist/encrypt-keys.js.map +1 -0
- package/dist/executor.d.ts +31 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +2009 -0
- package/dist/executor.js.map +1 -0
- package/dist/gemini-executor.d.ts +27 -0
- package/dist/gemini-executor.d.ts.map +1 -0
- package/dist/gemini-executor.js +160 -0
- package/dist/gemini-executor.js.map +1 -0
- package/dist/goals.d.ts +24 -0
- package/dist/goals.d.ts.map +1 -0
- package/dist/goals.js +189 -0
- package/dist/goals.js.map +1 -0
- package/dist/gym/activity-digest.d.ts +30 -0
- package/dist/gym/activity-digest.d.ts.map +1 -0
- package/dist/gym/activity-digest.js +506 -0
- package/dist/gym/activity-digest.js.map +1 -0
- package/dist/gym/dimension-scorer.d.ts +76 -0
- package/dist/gym/dimension-scorer.d.ts.map +1 -0
- package/dist/gym/dimension-scorer.js +236 -0
- package/dist/gym/dimension-scorer.js.map +1 -0
- package/dist/gym/gym-router.d.ts +7 -0
- package/dist/gym/gym-router.d.ts.map +1 -0
- package/dist/gym/gym-router.js +718 -0
- package/dist/gym/gym-router.js.map +1 -0
- package/dist/gym/index.d.ts +11 -0
- package/dist/gym/index.d.ts.map +1 -0
- package/dist/gym/index.js +11 -0
- package/dist/gym/index.js.map +1 -0
- package/dist/heartbeat.d.ts +21 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +163 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +254 -0
- package/dist/index.js.map +1 -0
- package/dist/keystore.d.ts +22 -0
- package/dist/keystore.d.ts.map +1 -0
- package/dist/keystore.js +178 -0
- package/dist/keystore.js.map +1 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +45 -0
- package/dist/logger.js.map +1 -0
- package/dist/memory/daily.d.ts +22 -0
- package/dist/memory/daily.d.ts.map +1 -0
- package/dist/memory/daily.js +82 -0
- package/dist/memory/daily.js.map +1 -0
- package/dist/memory/embeddings.d.ts +15 -0
- package/dist/memory/embeddings.d.ts.map +1 -0
- package/dist/memory/embeddings.js +154 -0
- package/dist/memory/embeddings.js.map +1 -0
- package/dist/memory/index.d.ts +32 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +159 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/search.d.ts +21 -0
- package/dist/memory/search.d.ts.map +1 -0
- package/dist/memory/search.js +77 -0
- package/dist/memory/search.js.map +1 -0
- package/dist/memory/store.d.ts +23 -0
- package/dist/memory/store.d.ts.map +1 -0
- package/dist/memory/store.js +144 -0
- package/dist/memory/store.js.map +1 -0
- package/dist/ollama-executor.d.ts +17 -0
- package/dist/ollama-executor.d.ts.map +1 -0
- package/dist/ollama-executor.js +112 -0
- package/dist/ollama-executor.js.map +1 -0
- package/dist/openai-executor.d.ts +38 -0
- package/dist/openai-executor.d.ts.map +1 -0
- package/dist/openai-executor.js +197 -0
- package/dist/openai-executor.js.map +1 -0
- package/dist/router.d.ts +11 -0
- package/dist/router.d.ts.map +1 -0
- package/dist/router.js +185 -0
- package/dist/router.js.map +1 -0
- package/dist/test-message.d.ts +2 -0
- package/dist/test-message.d.ts.map +1 -0
- package/dist/test-message.js +60 -0
- package/dist/test-message.js.map +1 -0
- package/dist/utils/imsg-db-reader.d.ts +24 -0
- package/dist/utils/imsg-db-reader.d.ts.map +1 -0
- package/dist/utils/imsg-db-reader.js +92 -0
- package/dist/utils/imsg-db-reader.js.map +1 -0
- package/dist/utils/imsg-rpc.d.ts +25 -0
- package/dist/utils/imsg-rpc.d.ts.map +1 -0
- package/dist/utils/imsg-rpc.js +149 -0
- package/dist/utils/imsg-rpc.js.map +1 -0
- package/dist/utils/message-formatter.d.ts +3 -0
- package/dist/utils/message-formatter.d.ts.map +1 -0
- package/dist/utils/message-formatter.js +69 -0
- package/dist/utils/message-formatter.js.map +1 -0
- package/dist/web-ui.d.ts +12 -0
- package/dist/web-ui.d.ts.map +1 -0
- package/dist/web-ui.js +5784 -0
- package/dist/web-ui.js.map +1 -0
- package/dist/whatsapp-chats.d.ts +2 -0
- package/dist/whatsapp-chats.d.ts.map +1 -0
- package/dist/whatsapp-chats.js +76 -0
- package/dist/whatsapp-chats.js.map +1 -0
- package/dist/whatsapp-login.d.ts +2 -0
- package/dist/whatsapp-login.d.ts.map +1 -0
- package/dist/whatsapp-login.js +90 -0
- package/dist/whatsapp-login.js.map +1 -0
- package/dist/wiki-sync.d.ts +21 -0
- package/dist/wiki-sync.d.ts.map +1 -0
- package/dist/wiki-sync.js +147 -0
- package/dist/wiki-sync.js.map +1 -0
- package/docs/AddNewAgentGuide.md +100 -0
- package/docs/AddNewMcpGuide.md +72 -0
- package/docs/Architecture.md +795 -0
- package/docs/CLAUDE-AI-SETUP.md +166 -0
- package/docs/Setup.md +297 -0
- package/docs/ai-gym-architecture.md +1040 -0
- package/docs/ai-gym-build-plan.md +343 -0
- package/docs/ai-gym-onboarding.md +122 -0
- package/docs/appcreator_plan.md +348 -0
- package/docs/platform-mcp-audit.md +320 -0
- package/docs/server-deployment-plan.md +503 -0
- package/docs/superpowers/plans/2026-03-25-marketplace.md +1281 -0
- package/docs/superpowers/specs/2026-03-25-marketplace-design.md +287 -0
- package/docs/user-guide.md +2016 -0
- package/mcp-catalog.json +628 -0
- package/package.json +63 -0
- package/public/MyAIforOne-logomark-512.svg +16 -0
- package/public/MyAIforOne-logomark-transparent.svg +15 -0
- package/public/activity.html +314 -0
- package/public/admin.html +1674 -0
- package/public/agent-dashboard.html +670 -0
- package/public/api-docs.html +1106 -0
- package/public/automations.html +722 -0
- package/public/canvas.css +223 -0
- package/public/canvas.js +588 -0
- package/public/changelog.html +231 -0
- package/public/gym.html +2766 -0
- package/public/home.html +1930 -0
- package/public/index.html +2809 -0
- package/public/lab.html +1643 -0
- package/public/library.html +1442 -0
- package/public/marketplace.html +1101 -0
- package/public/mcp-docs.html +441 -0
- package/public/mini.html +390 -0
- package/public/monitor.html +584 -0
- package/public/org.html +4304 -0
- package/public/projects.html +734 -0
- package/public/settings.html +645 -0
- package/public/tasks.html +932 -0
- package/public/trainers/alex.svg +12 -0
- package/public/trainers/jordan.svg +12 -0
- package/public/trainers/morgan.svg +12 -0
- package/public/trainers/riley.svg +12 -0
- package/public/trainers/sam.svg +12 -0
- package/public/user-guide.html +218 -0
- package/registry/agents.json +3 -0
- package/registry/apps.json +20 -0
- package/registry/installed-drafts.json +3 -0
- package/registry/mcps.json +1084 -0
- package/registry/prompts/personal/mcp-test-prompt.md +6 -0
- package/registry/prompts/personal/memory-recall.md +6 -0
- package/registry/prompts/platform/brainstorm.md +15 -0
- package/registry/prompts/platform/code-review.md +16 -0
- package/registry/prompts/platform/explain.md +16 -0
- package/registry/prompts.json +58 -0
- package/registry/skills/external/brainstorming.md +5 -0
- package/registry/skills/external/code-review.md +40 -0
- package/registry/skills/external/frontend-patterns.md +642 -0
- package/registry/skills/external/frontend-slides.md +184 -0
- package/registry/skills/external/systematic-debugging.md +5 -0
- package/registry/skills/external/tdd.md +328 -0
- package/registry/skills/external/verification-before-completion.md +5 -0
- package/registry/skills/external/writing-plans.md +5 -0
- package/registry/skills/platform/ai41_app_build.md +930 -0
- package/registry/skills/platform/ai41_app_deploy.md +168 -0
- package/registry/skills/platform/ai41_app_orchestrator.md +239 -0
- package/registry/skills/platform/ai41_app_patterns.md +359 -0
- package/registry/skills/platform/ai41_app_register.md +85 -0
- package/registry/skills/platform/ai41_app_scaffold.md +421 -0
- package/registry/skills/platform/ai41_app_verify.md +107 -0
- package/registry/skills/platform/opProjectCreate.md +239 -0
- package/registry/skills/platform/op_devbrowser.md +136 -0
- package/registry/skills/platform/sop_brandguidelines.md +103 -0
- package/registry/skills/platform/sop_docx.md +117 -0
- package/registry/skills/platform/sop_frontenddesign.md +44 -0
- package/registry/skills/platform/sop_frontenddesign_v2.md +659 -0
- package/registry/skills/platform/sop_mcpbuilder.md +133 -0
- package/registry/skills/platform/sop_pdf.md +172 -0
- package/registry/skills/platform/sop_pptx.md +133 -0
- package/registry/skills/platform/sop_skillcreator.md +104 -0
- package/registry/skills/platform/sop_themefactory.md +128 -0
- package/registry/skills/platform/sop_webapptesting.md +75 -0
- package/registry/skills/platform/sop_webartifactsbuilder.md +97 -0
- package/registry/skills/platform/sop_xlsx.md +134 -0
- package/registry/skills.json +1055 -0
- package/scripts/discover-chats.sh +11 -0
- package/scripts/install-service-windows.ps1 +87 -0
- package/scripts/install-service.sh +52 -0
- package/scripts/seed-registry.ts +195 -0
- package/scripts/test-send.sh +5 -0
- package/scripts/tray-indicator.ps1 +35 -0
- package/scripts/uninstall-service-windows.ps1 +23 -0
- package/scripts/uninstall-service.sh +15 -0
- package/scripts/xbar-myagent.5s.sh +32 -0
- package/server/mcp-server/dist/index.d.ts +11 -0
- package/server/mcp-server/dist/index.js +1332 -0
- package/server/mcp-server/dist/lib/api-client.d.ts +165 -0
- package/server/mcp-server/dist/lib/api-client.js +241 -0
- package/server/mcp-server/index.ts +1545 -0
- package/server/mcp-server/lib/api-client.ts +366 -0
- package/server/mcp-server/tsconfig.json +14 -0
- package/src/agent-registry.ts +180 -0
- package/src/channels/discord.ts +129 -0
- package/src/channels/imessage.ts +261 -0
- package/src/channels/slack.ts +208 -0
- package/src/channels/telegram.ts +307 -0
- package/src/channels/types.ts +62 -0
- package/src/channels/whatsapp.ts +227 -0
- package/src/config.ts +281 -0
- package/src/cron.ts +43 -0
- package/src/decrypt-keys.ts +60 -0
- package/src/encrypt-keys.ts +70 -0
- package/src/executor.ts +2190 -0
- package/src/gemini-executor.ts +212 -0
- package/src/goals.ts +240 -0
- package/src/gym/activity-digest.ts +546 -0
- package/src/gym/dimension-scorer.ts +297 -0
- package/src/gym/gym-router.ts +801 -0
- package/src/gym/index.ts +19 -0
- package/src/heartbeat.ts +220 -0
- package/src/index.ts +275 -0
- package/src/keystore.ts +190 -0
- package/src/logger.ts +51 -0
- package/src/memory/daily.ts +101 -0
- package/src/memory/embeddings.ts +185 -0
- package/src/memory/index.ts +218 -0
- package/src/memory/search.ts +124 -0
- package/src/memory/store.ts +189 -0
- package/src/ollama-executor.ts +126 -0
- package/src/openai-executor.ts +259 -0
- package/src/router.ts +230 -0
- package/src/test-message.ts +72 -0
- package/src/utils/imsg-db-reader.ts +109 -0
- package/src/utils/imsg-rpc.ts +178 -0
- package/src/utils/message-formatter.ts +90 -0
- package/src/web-ui.ts +5778 -0
- package/src/whatsapp-chats.ts +91 -0
- package/src/whatsapp-login.ts +110 -0
- package/src/wiki-sync.ts +199 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# MyAgent — Pre-Setup Guide
|
|
2
|
+
|
|
3
|
+
This document is for Claude.ai to read. If a user shares this with you, walk them through it step by step.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Instructions for Claude
|
|
8
|
+
|
|
9
|
+
The user wants to install MyAgent. Walk them through the steps below exactly as written. Be direct — don't explain what things are unless they ask. Just tell them what to do and confirm it worked before moving on.
|
|
10
|
+
|
|
11
|
+
### Start Here
|
|
12
|
+
|
|
13
|
+
Ask the user: **"Are you on Mac, Windows, or Linux?"**
|
|
14
|
+
|
|
15
|
+
Then show them this:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Here's what we'll do:
|
|
19
|
+
|
|
20
|
+
□ 1. Install Node.js
|
|
21
|
+
□ 2. Install Claude Code
|
|
22
|
+
□ 3. Log into Claude Code
|
|
23
|
+
□ 4. Download MyAgent
|
|
24
|
+
□ 5. Hand off to the setup wizard
|
|
25
|
+
|
|
26
|
+
Let's start with Step 1.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### Step 1: Install Node.js
|
|
32
|
+
|
|
33
|
+
Tell the user:
|
|
34
|
+
|
|
35
|
+
**Mac:**
|
|
36
|
+
```
|
|
37
|
+
Open Terminal (Cmd+Space, type "Terminal", press Enter), then paste this:
|
|
38
|
+
|
|
39
|
+
brew install node
|
|
40
|
+
|
|
41
|
+
If that gives an error about "brew not found", paste this first, then try again:
|
|
42
|
+
|
|
43
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Windows:**
|
|
47
|
+
```
|
|
48
|
+
Open PowerShell (press Win+R, type "powershell", press Enter), then paste this:
|
|
49
|
+
|
|
50
|
+
winget install OpenJS.NodeJS.LTS
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Linux:**
|
|
54
|
+
```
|
|
55
|
+
Open your terminal, then paste this:
|
|
56
|
+
|
|
57
|
+
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Then say: **"Now paste this and tell me what it says:"**
|
|
61
|
+
```
|
|
62
|
+
node --version
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If it shows v22 or higher, move on. If not, troubleshoot.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### Step 2: Install Claude Code
|
|
70
|
+
|
|
71
|
+
Tell the user:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Paste this into your terminal:
|
|
75
|
+
|
|
76
|
+
npm install -g @anthropic-ai/claude-code
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If they get a permissions error on Mac/Linux:
|
|
80
|
+
```
|
|
81
|
+
sudo npm install -g @anthropic-ai/claude-code
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then say: **"Now paste this and tell me what it says:"**
|
|
85
|
+
```
|
|
86
|
+
claude --version
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If it shows a version number, move on.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Step 3: Log into Claude Code
|
|
94
|
+
|
|
95
|
+
Tell the user:
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Paste this:
|
|
99
|
+
|
|
100
|
+
claude auth login
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
A browser window will open. Sign in with your Anthropic account.
|
|
104
|
+
|
|
105
|
+
You need one of these:
|
|
106
|
+
- Claude Pro subscription ($20/mo)
|
|
107
|
+
- Claude Max subscription ($100/mo)
|
|
108
|
+
- Anthropic API key with credits
|
|
109
|
+
|
|
110
|
+
Then say: **"Now paste this and tell me what it says:"**
|
|
111
|
+
```
|
|
112
|
+
claude auth status
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If it says "authenticated" or shows an account, move on.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Step 4: Download MyAgent
|
|
120
|
+
|
|
121
|
+
Tell the user:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Paste these lines one at a time:
|
|
125
|
+
|
|
126
|
+
git clone https://github.com/agenticledgerclient/myAIforOne.git
|
|
127
|
+
|
|
128
|
+
cd myAIforOne
|
|
129
|
+
|
|
130
|
+
npm install
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If they get "git: command not found":
|
|
134
|
+
- **Mac:** `xcode-select --install` — then retry
|
|
135
|
+
- **Windows:** `winget install Git.Git` — close and reopen PowerShell, then retry
|
|
136
|
+
- **Linux:** `sudo apt-get install git` — then retry
|
|
137
|
+
|
|
138
|
+
Once `npm install` finishes, move on.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### Step 5: Hand Off
|
|
143
|
+
|
|
144
|
+
Tell the user:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
You're ready! Now paste this:
|
|
148
|
+
|
|
149
|
+
claude
|
|
150
|
+
|
|
151
|
+
Once Claude Code loads, type:
|
|
152
|
+
|
|
153
|
+
/setup
|
|
154
|
+
|
|
155
|
+
The setup wizard handles everything from here — config, build, and
|
|
156
|
+
launching the app in your browser.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### If Something Goes Wrong
|
|
162
|
+
|
|
163
|
+
- Don't over-explain. Just give them the fix command.
|
|
164
|
+
- If a step fails, troubleshoot that step before moving on.
|
|
165
|
+
- If they're stuck, ask them to paste the exact error message.
|
|
166
|
+
- Keep the running checklist updated with ✅ for completed steps.
|
package/docs/Setup.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# Setup Guide
|
|
2
|
+
|
|
3
|
+
Get your own phone-accessible Claude Code agents running in ~15 minutes.
|
|
4
|
+
|
|
5
|
+
> **First time?** If you don't have Node.js or Claude Code CLI installed yet, see [CLAUDE-AI-SETUP.md](CLAUDE-AI-SETUP.md) — you can paste it into claude.ai and get walked through everything step by step.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- **macOS, Windows, or Linux**
|
|
10
|
+
- **Node.js 22+** — `brew install node` (macOS), `winget install OpenJS.NodeJS.LTS` (Windows), or [nodejs.org](https://nodejs.org)
|
|
11
|
+
- **Claude Code CLI** — `npm install -g @anthropic-ai/claude-code` (requires a Claude Pro/Max subscription or Anthropic API key)
|
|
12
|
+
- At least one messaging channel (Telegram is the easiest to start with)
|
|
13
|
+
|
|
14
|
+
## 1. Clone & Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/YOUR_ORG/channelToAgentToClaude.git
|
|
18
|
+
cd channelToAgentToClaude
|
|
19
|
+
npm install
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. Create Your Config
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cp config.example.json config.json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Edit `config.json` with your preferred editor. You'll fill in channel tokens and agent details in the next steps.
|
|
29
|
+
|
|
30
|
+
## 3. Set Up a Channel
|
|
31
|
+
|
|
32
|
+
Pick one or more channels. **Telegram is the easiest** — no OAuth, no app review, just a bot token.
|
|
33
|
+
|
|
34
|
+
### Telegram (recommended to start)
|
|
35
|
+
|
|
36
|
+
1. Open Telegram, message [@BotFather](https://t.me/BotFather)
|
|
37
|
+
2. Send `/newbot`, follow prompts, copy the bot token
|
|
38
|
+
3. In `config.json`, set:
|
|
39
|
+
```json
|
|
40
|
+
"telegram": {
|
|
41
|
+
"enabled": true,
|
|
42
|
+
"driver": "telegram",
|
|
43
|
+
"config": {
|
|
44
|
+
"botToken": "YOUR_TOKEN_HERE"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
4. If using in a group: message @BotFather → `/mybots` → your bot → **Bot Settings** → **Group Privacy** → **Turn off**
|
|
49
|
+
|
|
50
|
+
### Slack
|
|
51
|
+
|
|
52
|
+
1. Create a Slack App at [api.slack.com/apps](https://api.slack.com/apps)
|
|
53
|
+
2. Enable **Socket Mode** (under Settings)
|
|
54
|
+
3. Add Bot Token Scopes: `chat:write`, `channels:history`, `groups:history`, `im:history`, `files:read`
|
|
55
|
+
4. Install to your workspace
|
|
56
|
+
5. Copy the **Bot Token** (`xoxb-...`) and **App Token** (`xapp-...`)
|
|
57
|
+
6. In `config.json`:
|
|
58
|
+
```json
|
|
59
|
+
"slack": {
|
|
60
|
+
"enabled": true,
|
|
61
|
+
"driver": "slack",
|
|
62
|
+
"config": {
|
|
63
|
+
"botToken": "xoxb-...",
|
|
64
|
+
"appToken": "xapp-...",
|
|
65
|
+
"mode": "socket"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Discord
|
|
71
|
+
|
|
72
|
+
1. Create a bot at [discord.com/developers/applications](https://discord.com/developers/applications)
|
|
73
|
+
2. Under Bot settings, enable **Message Content Intent**
|
|
74
|
+
3. Generate an invite URL with `bot` scope + `Send Messages`, `Read Message History` permissions
|
|
75
|
+
4. Invite the bot to your server
|
|
76
|
+
5. Copy the bot token
|
|
77
|
+
6. In `config.json`:
|
|
78
|
+
```json
|
|
79
|
+
"discord": {
|
|
80
|
+
"enabled": true,
|
|
81
|
+
"driver": "discord",
|
|
82
|
+
"config": {
|
|
83
|
+
"botToken": "YOUR_TOKEN_HERE"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### iMessage (macOS only)
|
|
89
|
+
|
|
90
|
+
Requires the `imsg` CLI tool. Install:
|
|
91
|
+
```bash
|
|
92
|
+
brew install phamson02/imsg/imsg
|
|
93
|
+
```
|
|
94
|
+
Then grant Terminal/iTerm **Full Disk Access** in System Settings → Privacy & Security → Full Disk Access.
|
|
95
|
+
|
|
96
|
+
iMessage is enabled by default in the example config.
|
|
97
|
+
|
|
98
|
+
### WhatsApp
|
|
99
|
+
|
|
100
|
+
1. Enable in config: `"whatsapp": { "enabled": true, ... }`
|
|
101
|
+
2. Run the pairing script: `npx tsx src/whatsapp-login.ts`
|
|
102
|
+
3. Scan the QR code with WhatsApp → Settings → Linked Devices → Link a Device
|
|
103
|
+
4. Once connected, restart the service
|
|
104
|
+
|
|
105
|
+
Note: WhatsApp sessions can expire. If you see "logged out" in logs, re-run the login script.
|
|
106
|
+
|
|
107
|
+
## 4. Create Your First Agent
|
|
108
|
+
|
|
109
|
+
The easiest path: create a general-purpose agent.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Create agent directory
|
|
113
|
+
mkdir -p ~/Desktop/MyAIforOne Drive/PersonalAgents/my-agent/memory
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Write the system prompt:
|
|
117
|
+
```bash
|
|
118
|
+
cat > ~/Desktop/MyAIforOne Drive/PersonalAgents/my-agent/CLAUDE.md << 'EOF'
|
|
119
|
+
# My Agent
|
|
120
|
+
|
|
121
|
+
You are a general-purpose Claude agent accessible via phone. You help with coding, research, file management, and anything else.
|
|
122
|
+
|
|
123
|
+
## Identity
|
|
124
|
+
- Mention alias: @myagent
|
|
125
|
+
- Respond when mentioned with @myagent
|
|
126
|
+
|
|
127
|
+
## Guidelines
|
|
128
|
+
- Keep responses concise — you're replying to phone messages
|
|
129
|
+
- If a task requires multiple steps, summarize what you did
|
|
130
|
+
- If you need clarification, ask
|
|
131
|
+
EOF
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Write initial context:
|
|
135
|
+
```bash
|
|
136
|
+
echo "# My Agent Context\n\nCreated $(date +%Y-%m-%d)." > ~/Desktop/MyAIforOne Drive/PersonalAgents/my-agent/memory/context.md
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The example config already includes this agent. Just update the route with your actual chat ID (see step 5).
|
|
140
|
+
|
|
141
|
+
### Optional: Enable Advanced Memory
|
|
142
|
+
|
|
143
|
+
For agents that benefit from long-term recall across sessions, add `"advancedMemory": true` to the agent config in `config.json`. This gives the agent automatic daily memory journals and semantic search over past conversations — no manual `/opcompact` needed. It works out of the box; if `OPENAI_API_KEY` is set, it uses OpenAI embeddings, otherwise it falls back to local TF-IDF. See [Architecture.md](Architecture.md#advanced-memory) for details.
|
|
144
|
+
|
|
145
|
+
## 5. Discover Your Chat ID
|
|
146
|
+
|
|
147
|
+
You need the chat ID for routing. The easiest way:
|
|
148
|
+
|
|
149
|
+
1. Build and start the service: `npm run build && npm start`
|
|
150
|
+
2. Send a message to your bot (or in the group where the bot is)
|
|
151
|
+
3. Check the logs: `tail -f logs/service.log`
|
|
152
|
+
4. Look for: `Telegram received from YourName (12345) in -67890: Hello`
|
|
153
|
+
5. The number after "in" is your chat ID (negative = group, positive = DM)
|
|
154
|
+
6. Update the `"value"` in your agent's route in `config.json`
|
|
155
|
+
7. Restart: Ctrl+C, then `npm start`
|
|
156
|
+
|
|
157
|
+
For Slack: right-click a channel → **View channel details** → scroll to bottom for Channel ID.
|
|
158
|
+
|
|
159
|
+
For iMessage: run `imsg chats --json` and find your chat ID.
|
|
160
|
+
|
|
161
|
+
## 6. Build & Run
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npm run build
|
|
165
|
+
npm start
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Send a message to your bot. You should see it process and respond.
|
|
169
|
+
|
|
170
|
+
## 7. Install as Auto-Start Service (Optional)
|
|
171
|
+
|
|
172
|
+
Create the launchd plist so the gateway starts on login and auto-restarts on crash:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
cat > ~/Library/LaunchAgents/com.agenticledger.channelToAgentToClaude.plist << EOF
|
|
176
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
177
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
178
|
+
<plist version="1.0">
|
|
179
|
+
<dict>
|
|
180
|
+
<key>Label</key>
|
|
181
|
+
<string>com.agenticledger.channelToAgentToClaude</string>
|
|
182
|
+
<key>ProgramArguments</key>
|
|
183
|
+
<array>
|
|
184
|
+
<string>$(which node)</string>
|
|
185
|
+
<string>$(pwd)/dist/index.js</string>
|
|
186
|
+
</array>
|
|
187
|
+
<key>WorkingDirectory</key>
|
|
188
|
+
<string>$(pwd)</string>
|
|
189
|
+
<key>RunAtLoad</key>
|
|
190
|
+
<true/>
|
|
191
|
+
<key>KeepAlive</key>
|
|
192
|
+
<true/>
|
|
193
|
+
<key>StandardOutPath</key>
|
|
194
|
+
<string>$(pwd)/logs/launchd-stdout.log</string>
|
|
195
|
+
<key>StandardErrorPath</key>
|
|
196
|
+
<string>$(pwd)/logs/launchd-stderr.log</string>
|
|
197
|
+
<key>EnvironmentVariables</key>
|
|
198
|
+
<dict>
|
|
199
|
+
<key>PATH</key>
|
|
200
|
+
<string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin</string>
|
|
201
|
+
<key>HOME</key>
|
|
202
|
+
<string>$HOME</string>
|
|
203
|
+
</dict>
|
|
204
|
+
</dict>
|
|
205
|
+
</plist>
|
|
206
|
+
EOF
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Important:** Replace the `$(...)` placeholders with actual paths before saving. Then:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
launchctl load ~/Library/LaunchAgents/com.agenticledger.channelToAgentToClaude.plist
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Check logs:
|
|
216
|
+
```bash
|
|
217
|
+
tail -f logs/service.log
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## 8. Optional: Voice Transcription
|
|
221
|
+
|
|
222
|
+
To enable voice message transcription (Telegram voice notes → text):
|
|
223
|
+
|
|
224
|
+
1. Get an OpenAI API key from [platform.openai.com](https://platform.openai.com)
|
|
225
|
+
2. Add to your launchd plist's `EnvironmentVariables`:
|
|
226
|
+
```xml
|
|
227
|
+
<key>OPENAI_API_KEY</key>
|
|
228
|
+
<string>sk-proj-YOUR-KEY</string>
|
|
229
|
+
```
|
|
230
|
+
3. Or export it before running: `export OPENAI_API_KEY=sk-proj-... && npm start`
|
|
231
|
+
|
|
232
|
+
If no key is set, voice messages are silently ignored.
|
|
233
|
+
|
|
234
|
+
## 9. Optional: Add MCP Servers
|
|
235
|
+
|
|
236
|
+
MCPs give your agents access to external APIs. Register them in `config.json`:
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
"mcps": {
|
|
240
|
+
"context7": {
|
|
241
|
+
"type": "stdio",
|
|
242
|
+
"command": "npx",
|
|
243
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
244
|
+
},
|
|
245
|
+
"playwright": {
|
|
246
|
+
"type": "stdio",
|
|
247
|
+
"command": "npx",
|
|
248
|
+
"args": ["@playwright/mcp@latest"]
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Then reference them in your agent config:
|
|
254
|
+
```json
|
|
255
|
+
"mcps": ["context7", "playwright"]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
See `docs/AddNewMcpGuide.md` for more details.
|
|
259
|
+
|
|
260
|
+
## 10. Optional: Add Skills
|
|
261
|
+
|
|
262
|
+
Skills are instruction files from `~/.claude/commands/`. List the ones you want available to your agent:
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
"skills": ["opcodereview", "sop_pdf", "my-custom-skill"]
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
The agent gets an index of skill names + descriptions in its system prompt, and can Read the full skill file when needed.
|
|
269
|
+
|
|
270
|
+
## Troubleshooting
|
|
271
|
+
|
|
272
|
+
### "Failed to fetch" or agent not responding
|
|
273
|
+
- Check `logs/service.log` for errors
|
|
274
|
+
- Verify the channel is enabled and tokens are correct
|
|
275
|
+
- Make sure the chat ID in the route matches (run with `logLevel: "debug"` to see incoming messages)
|
|
276
|
+
|
|
277
|
+
### Telegram bot not seeing group messages
|
|
278
|
+
- @BotFather → `/mybots` → your bot → **Bot Settings** → **Group Privacy** → **Turn off**
|
|
279
|
+
|
|
280
|
+
### WhatsApp keeps logging out
|
|
281
|
+
- WhatsApp sessions expire after ~14 days of inactivity
|
|
282
|
+
- Re-run `npx tsx src/whatsapp-login.ts` and scan the QR code
|
|
283
|
+
- If you get "can't link new devices", wait 15-30 minutes (rate limit)
|
|
284
|
+
|
|
285
|
+
### iMessage not working
|
|
286
|
+
- Ensure `imsg` is installed: `brew install phamson02/imsg/imsg`
|
|
287
|
+
- Grant Full Disk Access to Terminal/iTerm in System Settings
|
|
288
|
+
- Check that `imsg chats --json` returns data
|
|
289
|
+
|
|
290
|
+
### Agent responds but session doesn't persist
|
|
291
|
+
- Set `"persistent": true` in the agent config
|
|
292
|
+
- Check that the memory directory exists and is writable
|
|
293
|
+
|
|
294
|
+
### Web UI not accessible
|
|
295
|
+
- Check that `webUI.enabled` is `true` in service config
|
|
296
|
+
- Default port is 8080: http://localhost:8080/
|
|
297
|
+
- Only accessible from localhost (not exposed to the internet)
|