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.
Files changed (315) hide show
  1. package/README.md +113 -0
  2. package/agents/_template/CLAUDE.md +18 -0
  3. package/agents/_template/agent.json +7 -0
  4. package/agents/platform/agentcreator/CLAUDE.md +300 -0
  5. package/agents/platform/appcreator/CLAUDE.md +158 -0
  6. package/agents/platform/gym/CLAUDE.md +486 -0
  7. package/agents/platform/gym/agent.json +40 -0
  8. package/agents/platform/gym/programs/agent-building/program.json +160 -0
  9. package/agents/platform/gym/programs/automations-mastery/program.json +129 -0
  10. package/agents/platform/gym/programs/getting-started/program.json +124 -0
  11. package/agents/platform/gym/programs/mcp-integrations/program.json +116 -0
  12. package/agents/platform/gym/programs/multi-model-strategy/program.json +115 -0
  13. package/agents/platform/gym/programs/prompt-engineering/program.json +136 -0
  14. package/agents/platform/gym/souls/alex.md +12 -0
  15. package/agents/platform/gym/souls/jordan.md +12 -0
  16. package/agents/platform/gym/souls/morgan.md +12 -0
  17. package/agents/platform/gym/souls/riley.md +12 -0
  18. package/agents/platform/gym/souls/sam.md +12 -0
  19. package/agents/platform/hub/CLAUDE.md +372 -0
  20. package/agents/platform/promptcreator/CLAUDE.md +130 -0
  21. package/agents/platform/skillcreator/CLAUDE.md +163 -0
  22. package/bin/cli.js +566 -0
  23. package/config.example.json +310 -0
  24. package/dist/agent-registry.d.ts +32 -0
  25. package/dist/agent-registry.d.ts.map +1 -0
  26. package/dist/agent-registry.js +144 -0
  27. package/dist/agent-registry.js.map +1 -0
  28. package/dist/channels/discord.d.ts +17 -0
  29. package/dist/channels/discord.d.ts.map +1 -0
  30. package/dist/channels/discord.js +114 -0
  31. package/dist/channels/discord.js.map +1 -0
  32. package/dist/channels/imessage.d.ts +23 -0
  33. package/dist/channels/imessage.d.ts.map +1 -0
  34. package/dist/channels/imessage.js +214 -0
  35. package/dist/channels/imessage.js.map +1 -0
  36. package/dist/channels/slack.d.ts +19 -0
  37. package/dist/channels/slack.d.ts.map +1 -0
  38. package/dist/channels/slack.js +167 -0
  39. package/dist/channels/slack.js.map +1 -0
  40. package/dist/channels/telegram.d.ts +19 -0
  41. package/dist/channels/telegram.d.ts.map +1 -0
  42. package/dist/channels/telegram.js +274 -0
  43. package/dist/channels/telegram.js.map +1 -0
  44. package/dist/channels/types.d.ts +44 -0
  45. package/dist/channels/types.d.ts.map +1 -0
  46. package/dist/channels/types.js +18 -0
  47. package/dist/channels/types.js.map +1 -0
  48. package/dist/channels/whatsapp.d.ts +23 -0
  49. package/dist/channels/whatsapp.d.ts.map +1 -0
  50. package/dist/channels/whatsapp.js +189 -0
  51. package/dist/channels/whatsapp.js.map +1 -0
  52. package/dist/config.d.ts +134 -0
  53. package/dist/config.d.ts.map +1 -0
  54. package/dist/config.js +127 -0
  55. package/dist/config.js.map +1 -0
  56. package/dist/cron.d.ts +8 -0
  57. package/dist/cron.d.ts.map +1 -0
  58. package/dist/cron.js +35 -0
  59. package/dist/cron.js.map +1 -0
  60. package/dist/decrypt-keys.d.ts +7 -0
  61. package/dist/decrypt-keys.d.ts.map +1 -0
  62. package/dist/decrypt-keys.js +53 -0
  63. package/dist/decrypt-keys.js.map +1 -0
  64. package/dist/encrypt-keys.d.ts +8 -0
  65. package/dist/encrypt-keys.d.ts.map +1 -0
  66. package/dist/encrypt-keys.js +62 -0
  67. package/dist/encrypt-keys.js.map +1 -0
  68. package/dist/executor.d.ts +31 -0
  69. package/dist/executor.d.ts.map +1 -0
  70. package/dist/executor.js +2009 -0
  71. package/dist/executor.js.map +1 -0
  72. package/dist/gemini-executor.d.ts +27 -0
  73. package/dist/gemini-executor.d.ts.map +1 -0
  74. package/dist/gemini-executor.js +160 -0
  75. package/dist/gemini-executor.js.map +1 -0
  76. package/dist/goals.d.ts +24 -0
  77. package/dist/goals.d.ts.map +1 -0
  78. package/dist/goals.js +189 -0
  79. package/dist/goals.js.map +1 -0
  80. package/dist/gym/activity-digest.d.ts +30 -0
  81. package/dist/gym/activity-digest.d.ts.map +1 -0
  82. package/dist/gym/activity-digest.js +506 -0
  83. package/dist/gym/activity-digest.js.map +1 -0
  84. package/dist/gym/dimension-scorer.d.ts +76 -0
  85. package/dist/gym/dimension-scorer.d.ts.map +1 -0
  86. package/dist/gym/dimension-scorer.js +236 -0
  87. package/dist/gym/dimension-scorer.js.map +1 -0
  88. package/dist/gym/gym-router.d.ts +7 -0
  89. package/dist/gym/gym-router.d.ts.map +1 -0
  90. package/dist/gym/gym-router.js +718 -0
  91. package/dist/gym/gym-router.js.map +1 -0
  92. package/dist/gym/index.d.ts +11 -0
  93. package/dist/gym/index.d.ts.map +1 -0
  94. package/dist/gym/index.js +11 -0
  95. package/dist/gym/index.js.map +1 -0
  96. package/dist/heartbeat.d.ts +21 -0
  97. package/dist/heartbeat.d.ts.map +1 -0
  98. package/dist/heartbeat.js +163 -0
  99. package/dist/heartbeat.js.map +1 -0
  100. package/dist/index.d.ts +2 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +254 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/keystore.d.ts +22 -0
  105. package/dist/keystore.d.ts.map +1 -0
  106. package/dist/keystore.js +178 -0
  107. package/dist/keystore.js.map +1 -0
  108. package/dist/logger.d.ts +9 -0
  109. package/dist/logger.d.ts.map +1 -0
  110. package/dist/logger.js +45 -0
  111. package/dist/logger.js.map +1 -0
  112. package/dist/memory/daily.d.ts +22 -0
  113. package/dist/memory/daily.d.ts.map +1 -0
  114. package/dist/memory/daily.js +82 -0
  115. package/dist/memory/daily.js.map +1 -0
  116. package/dist/memory/embeddings.d.ts +15 -0
  117. package/dist/memory/embeddings.d.ts.map +1 -0
  118. package/dist/memory/embeddings.js +154 -0
  119. package/dist/memory/embeddings.js.map +1 -0
  120. package/dist/memory/index.d.ts +32 -0
  121. package/dist/memory/index.d.ts.map +1 -0
  122. package/dist/memory/index.js +159 -0
  123. package/dist/memory/index.js.map +1 -0
  124. package/dist/memory/search.d.ts +21 -0
  125. package/dist/memory/search.d.ts.map +1 -0
  126. package/dist/memory/search.js +77 -0
  127. package/dist/memory/search.js.map +1 -0
  128. package/dist/memory/store.d.ts +23 -0
  129. package/dist/memory/store.d.ts.map +1 -0
  130. package/dist/memory/store.js +144 -0
  131. package/dist/memory/store.js.map +1 -0
  132. package/dist/ollama-executor.d.ts +17 -0
  133. package/dist/ollama-executor.d.ts.map +1 -0
  134. package/dist/ollama-executor.js +112 -0
  135. package/dist/ollama-executor.js.map +1 -0
  136. package/dist/openai-executor.d.ts +38 -0
  137. package/dist/openai-executor.d.ts.map +1 -0
  138. package/dist/openai-executor.js +197 -0
  139. package/dist/openai-executor.js.map +1 -0
  140. package/dist/router.d.ts +11 -0
  141. package/dist/router.d.ts.map +1 -0
  142. package/dist/router.js +185 -0
  143. package/dist/router.js.map +1 -0
  144. package/dist/test-message.d.ts +2 -0
  145. package/dist/test-message.d.ts.map +1 -0
  146. package/dist/test-message.js +60 -0
  147. package/dist/test-message.js.map +1 -0
  148. package/dist/utils/imsg-db-reader.d.ts +24 -0
  149. package/dist/utils/imsg-db-reader.d.ts.map +1 -0
  150. package/dist/utils/imsg-db-reader.js +92 -0
  151. package/dist/utils/imsg-db-reader.js.map +1 -0
  152. package/dist/utils/imsg-rpc.d.ts +25 -0
  153. package/dist/utils/imsg-rpc.d.ts.map +1 -0
  154. package/dist/utils/imsg-rpc.js +149 -0
  155. package/dist/utils/imsg-rpc.js.map +1 -0
  156. package/dist/utils/message-formatter.d.ts +3 -0
  157. package/dist/utils/message-formatter.d.ts.map +1 -0
  158. package/dist/utils/message-formatter.js +69 -0
  159. package/dist/utils/message-formatter.js.map +1 -0
  160. package/dist/web-ui.d.ts +12 -0
  161. package/dist/web-ui.d.ts.map +1 -0
  162. package/dist/web-ui.js +5784 -0
  163. package/dist/web-ui.js.map +1 -0
  164. package/dist/whatsapp-chats.d.ts +2 -0
  165. package/dist/whatsapp-chats.d.ts.map +1 -0
  166. package/dist/whatsapp-chats.js +76 -0
  167. package/dist/whatsapp-chats.js.map +1 -0
  168. package/dist/whatsapp-login.d.ts +2 -0
  169. package/dist/whatsapp-login.d.ts.map +1 -0
  170. package/dist/whatsapp-login.js +90 -0
  171. package/dist/whatsapp-login.js.map +1 -0
  172. package/dist/wiki-sync.d.ts +21 -0
  173. package/dist/wiki-sync.d.ts.map +1 -0
  174. package/dist/wiki-sync.js +147 -0
  175. package/dist/wiki-sync.js.map +1 -0
  176. package/docs/AddNewAgentGuide.md +100 -0
  177. package/docs/AddNewMcpGuide.md +72 -0
  178. package/docs/Architecture.md +795 -0
  179. package/docs/CLAUDE-AI-SETUP.md +166 -0
  180. package/docs/Setup.md +297 -0
  181. package/docs/ai-gym-architecture.md +1040 -0
  182. package/docs/ai-gym-build-plan.md +343 -0
  183. package/docs/ai-gym-onboarding.md +122 -0
  184. package/docs/appcreator_plan.md +348 -0
  185. package/docs/platform-mcp-audit.md +320 -0
  186. package/docs/server-deployment-plan.md +503 -0
  187. package/docs/superpowers/plans/2026-03-25-marketplace.md +1281 -0
  188. package/docs/superpowers/specs/2026-03-25-marketplace-design.md +287 -0
  189. package/docs/user-guide.md +2016 -0
  190. package/mcp-catalog.json +628 -0
  191. package/package.json +63 -0
  192. package/public/MyAIforOne-logomark-512.svg +16 -0
  193. package/public/MyAIforOne-logomark-transparent.svg +15 -0
  194. package/public/activity.html +314 -0
  195. package/public/admin.html +1674 -0
  196. package/public/agent-dashboard.html +670 -0
  197. package/public/api-docs.html +1106 -0
  198. package/public/automations.html +722 -0
  199. package/public/canvas.css +223 -0
  200. package/public/canvas.js +588 -0
  201. package/public/changelog.html +231 -0
  202. package/public/gym.html +2766 -0
  203. package/public/home.html +1930 -0
  204. package/public/index.html +2809 -0
  205. package/public/lab.html +1643 -0
  206. package/public/library.html +1442 -0
  207. package/public/marketplace.html +1101 -0
  208. package/public/mcp-docs.html +441 -0
  209. package/public/mini.html +390 -0
  210. package/public/monitor.html +584 -0
  211. package/public/org.html +4304 -0
  212. package/public/projects.html +734 -0
  213. package/public/settings.html +645 -0
  214. package/public/tasks.html +932 -0
  215. package/public/trainers/alex.svg +12 -0
  216. package/public/trainers/jordan.svg +12 -0
  217. package/public/trainers/morgan.svg +12 -0
  218. package/public/trainers/riley.svg +12 -0
  219. package/public/trainers/sam.svg +12 -0
  220. package/public/user-guide.html +218 -0
  221. package/registry/agents.json +3 -0
  222. package/registry/apps.json +20 -0
  223. package/registry/installed-drafts.json +3 -0
  224. package/registry/mcps.json +1084 -0
  225. package/registry/prompts/personal/mcp-test-prompt.md +6 -0
  226. package/registry/prompts/personal/memory-recall.md +6 -0
  227. package/registry/prompts/platform/brainstorm.md +15 -0
  228. package/registry/prompts/platform/code-review.md +16 -0
  229. package/registry/prompts/platform/explain.md +16 -0
  230. package/registry/prompts.json +58 -0
  231. package/registry/skills/external/brainstorming.md +5 -0
  232. package/registry/skills/external/code-review.md +40 -0
  233. package/registry/skills/external/frontend-patterns.md +642 -0
  234. package/registry/skills/external/frontend-slides.md +184 -0
  235. package/registry/skills/external/systematic-debugging.md +5 -0
  236. package/registry/skills/external/tdd.md +328 -0
  237. package/registry/skills/external/verification-before-completion.md +5 -0
  238. package/registry/skills/external/writing-plans.md +5 -0
  239. package/registry/skills/platform/ai41_app_build.md +930 -0
  240. package/registry/skills/platform/ai41_app_deploy.md +168 -0
  241. package/registry/skills/platform/ai41_app_orchestrator.md +239 -0
  242. package/registry/skills/platform/ai41_app_patterns.md +359 -0
  243. package/registry/skills/platform/ai41_app_register.md +85 -0
  244. package/registry/skills/platform/ai41_app_scaffold.md +421 -0
  245. package/registry/skills/platform/ai41_app_verify.md +107 -0
  246. package/registry/skills/platform/opProjectCreate.md +239 -0
  247. package/registry/skills/platform/op_devbrowser.md +136 -0
  248. package/registry/skills/platform/sop_brandguidelines.md +103 -0
  249. package/registry/skills/platform/sop_docx.md +117 -0
  250. package/registry/skills/platform/sop_frontenddesign.md +44 -0
  251. package/registry/skills/platform/sop_frontenddesign_v2.md +659 -0
  252. package/registry/skills/platform/sop_mcpbuilder.md +133 -0
  253. package/registry/skills/platform/sop_pdf.md +172 -0
  254. package/registry/skills/platform/sop_pptx.md +133 -0
  255. package/registry/skills/platform/sop_skillcreator.md +104 -0
  256. package/registry/skills/platform/sop_themefactory.md +128 -0
  257. package/registry/skills/platform/sop_webapptesting.md +75 -0
  258. package/registry/skills/platform/sop_webartifactsbuilder.md +97 -0
  259. package/registry/skills/platform/sop_xlsx.md +134 -0
  260. package/registry/skills.json +1055 -0
  261. package/scripts/discover-chats.sh +11 -0
  262. package/scripts/install-service-windows.ps1 +87 -0
  263. package/scripts/install-service.sh +52 -0
  264. package/scripts/seed-registry.ts +195 -0
  265. package/scripts/test-send.sh +5 -0
  266. package/scripts/tray-indicator.ps1 +35 -0
  267. package/scripts/uninstall-service-windows.ps1 +23 -0
  268. package/scripts/uninstall-service.sh +15 -0
  269. package/scripts/xbar-myagent.5s.sh +32 -0
  270. package/server/mcp-server/dist/index.d.ts +11 -0
  271. package/server/mcp-server/dist/index.js +1332 -0
  272. package/server/mcp-server/dist/lib/api-client.d.ts +165 -0
  273. package/server/mcp-server/dist/lib/api-client.js +241 -0
  274. package/server/mcp-server/index.ts +1545 -0
  275. package/server/mcp-server/lib/api-client.ts +366 -0
  276. package/server/mcp-server/tsconfig.json +14 -0
  277. package/src/agent-registry.ts +180 -0
  278. package/src/channels/discord.ts +129 -0
  279. package/src/channels/imessage.ts +261 -0
  280. package/src/channels/slack.ts +208 -0
  281. package/src/channels/telegram.ts +307 -0
  282. package/src/channels/types.ts +62 -0
  283. package/src/channels/whatsapp.ts +227 -0
  284. package/src/config.ts +281 -0
  285. package/src/cron.ts +43 -0
  286. package/src/decrypt-keys.ts +60 -0
  287. package/src/encrypt-keys.ts +70 -0
  288. package/src/executor.ts +2190 -0
  289. package/src/gemini-executor.ts +212 -0
  290. package/src/goals.ts +240 -0
  291. package/src/gym/activity-digest.ts +546 -0
  292. package/src/gym/dimension-scorer.ts +297 -0
  293. package/src/gym/gym-router.ts +801 -0
  294. package/src/gym/index.ts +19 -0
  295. package/src/heartbeat.ts +220 -0
  296. package/src/index.ts +275 -0
  297. package/src/keystore.ts +190 -0
  298. package/src/logger.ts +51 -0
  299. package/src/memory/daily.ts +101 -0
  300. package/src/memory/embeddings.ts +185 -0
  301. package/src/memory/index.ts +218 -0
  302. package/src/memory/search.ts +124 -0
  303. package/src/memory/store.ts +189 -0
  304. package/src/ollama-executor.ts +126 -0
  305. package/src/openai-executor.ts +259 -0
  306. package/src/router.ts +230 -0
  307. package/src/test-message.ts +72 -0
  308. package/src/utils/imsg-db-reader.ts +109 -0
  309. package/src/utils/imsg-rpc.ts +178 -0
  310. package/src/utils/message-formatter.ts +90 -0
  311. package/src/web-ui.ts +5778 -0
  312. package/src/whatsapp-chats.ts +91 -0
  313. package/src/whatsapp-login.ts +110 -0
  314. package/src/wiki-sync.ts +199 -0
  315. package/tsconfig.json +19 -0
@@ -0,0 +1,348 @@
1
+ # App Creator Plan
2
+
3
+ ## Vision
4
+
5
+ The App Creator is a platform agent that takes a user's natural language description and autonomously produces a deployed, production-quality web application — matching the quality bar of apps the platform owner has personally built. The user touches it twice: the initial prompt and the "deploy" button. Everything between is autonomous.
6
+
7
+ ---
8
+
9
+ ## Stack (Opinionated, Non-Negotiable)
10
+
11
+ | Layer | Choice | Why |
12
+ |-------|--------|-----|
13
+ | API Server | Express 5 | Proven, flexible, matches existing apps (P&L Analyzer, EscrowService) |
14
+ | Frontend | React 19 + Vite | Fast dev server, clean build, matches existing apps |
15
+ | Language | TypeScript (strict) | Build-time error catching, enables verify loop |
16
+ | ORM | Prisma | Type-safe, schema-as-code, auto-migrations |
17
+ | Database | PostgreSQL | Production-grade, Railway-native |
18
+ | Styling | Tailwind CSS + shadcn/ui | AI-friendly utility classes + polished pre-built components |
19
+ | Runtime | Node.js 20+ | Standard, Railway-supported |
20
+
21
+ If someone needs Python, mobile, or something outside this stack — the agent says "this isn't what I build" rather than producing mediocre output.
22
+
23
+ ---
24
+
25
+ ## Pipeline: User Prompt → Deployed App
26
+
27
+ ```
28
+ ┌─────────────────────────────────────────────────────────┐
29
+ │ USER: "Build me an expense tracker with auth and │
30
+ │ a dashboard that shows spending by category" │
31
+ └────────────────────────┬────────────────────────────────┘
32
+
33
+
34
+ ┌─────────────────────────────────────────────────────────┐
35
+ │ PHASE 1: SCAFFOLD (deterministic, no AI) │
36
+ │ │
37
+ │ Creates ~/Desktop/APPs/{app-name}/ │
38
+ │ ├── backend/ │
39
+ │ │ ├── package.json (Express 5, Prisma, cors, etc.) │
40
+ │ │ ├── tsconfig.json │
41
+ │ │ ├── prisma/schema.prisma (base config) │
42
+ │ │ └── src/index.ts (Express boilerplate) │
43
+ │ ├── frontend/ │
44
+ │ │ ├── package.json (React 19, Vite, Tailwind) │
45
+ │ │ ├── tsconfig.json │
46
+ │ │ ├── vite.config.ts │
47
+ │ │ ├── tailwind.config.ts │
48
+ │ │ └── src/ (base App.tsx, main.tsx, index.css) │
49
+ │ └── .gitignore │
50
+ │ │
51
+ │ Runs: npm install in both dirs │
52
+ │ Exit: all config files exist, npm install succeeded │
53
+ └────────────────────────┬────────────────────────────────┘
54
+
55
+
56
+ ┌─────────────────────────────────────────────────────────┐
57
+ │ PHASE 2: PLAN (AI, quick) │
58
+ │ │
59
+ │ Claude analyzes the user's request and produces: │
60
+ │ - Database schema (Prisma models) │
61
+ │ - API routes needed │
62
+ │ - Frontend pages/components │
63
+ │ - Auth approach (if needed) │
64
+ │ - 10-point architectural plan │
65
+ │ │
66
+ │ Reports plan to user in chat (transparency) │
67
+ │ Exit: plan produced, user can see it │
68
+ └────────────────────────┬────────────────────────────────┘
69
+
70
+
71
+ ┌─────────────────────────────────────────────────────────┐
72
+ │ PHASE 3: BUILD (AI, iterative) │
73
+ │ │
74
+ │ Claude writes all application code: │
75
+ │ - Prisma schema + seed data │
76
+ │ - Express routes, middleware, controllers │
77
+ │ - React components, pages, hooks │
78
+ │ - shadcn/ui component usage │
79
+ │ - Auth (if needed) │
80
+ │ │
81
+ │ Uses Write/Edit/Bash tools │
82
+ │ Follows app_patterns skill (YOUR conventions) │
83
+ │ Applies relevant sub-skills (auth, multitenant, etc.) │
84
+ │ Exit: all files written │
85
+ └────────────────────────┬────────────────────────────────┘
86
+
87
+
88
+ ┌─────────────────────────────────────────────────────────┐
89
+ │ PHASE 4: VERIFY (autonomous loop) │
90
+ │ │
91
+ │ Loop: │
92
+ │ 1. Run prisma migrate dev │
93
+ │ 2. Run npm run build (backend) │
94
+ │ 3. Run npm run build (frontend) │
95
+ │ 4. If any fails → read error → fix → goto 1 │
96
+ │ 5. Max 5 retries per step │
97
+ │ │
98
+ │ Exit checklist: │
99
+ │ [ ] prisma migrate succeeds │
100
+ │ [ ] backend builds clean (tsc) │
101
+ │ [ ] frontend builds clean (vite build) │
102
+ │ [ ] no TypeScript errors │
103
+ └────────────────────────┬────────────────────────────────┘
104
+
105
+
106
+ ┌─────────────────────────────────────────────────────────┐
107
+ │ PHASE 5: PREVIEW (local, for user) │
108
+ │ │
109
+ │ Start both servers: │
110
+ │ - Backend: npm run dev (port 3001) │
111
+ │ - Frontend: npm run dev (port 5173) │
112
+ │ │
113
+ │ Report to user: │
114
+ │ "Preview ready at http://localhost:5173" │
115
+ │ Canvas shows iframe of the running app │
116
+ │ │
117
+ │ STOP and wait for user response │
118
+ │ User reviews → requests changes or says "deploy" │
119
+ │ │
120
+ │ If changes requested → goto PHASE 3 (modify mode) │
121
+ │ If "deploy" → goto PHASE 6 │
122
+ └────────────────────────┬────────────────────────────────┘
123
+
124
+
125
+ ┌─────────────────────────────────────────────────────────┐
126
+ │ PHASE 6: DEPLOY (autonomous) │
127
+ │ │
128
+ │ 1. git init + git add + git commit │
129
+ │ 2. Create GitHub repo (agenticledger org) │
130
+ │ 3. git push │
131
+ │ 4. railway init + railway up │
132
+ │ 5. Set env vars (DATABASE_URL, etc.) │
133
+ │ 6. Wait for deployment │
134
+ │ 7. Check railway logs for errors │
135
+ │ 8. If errors → read logs → fix code → push → redeploy │
136
+ │ 9. Loop until healthy │
137
+ │ │
138
+ │ Exit checklist: │
139
+ │ [ ] GitHub repo created and code pushed │
140
+ │ [ ] Railway services running (API + frontend) │
141
+ │ [ ] Database provisioned and migrated │
142
+ │ [ ] Health check passes │
143
+ │ [ ] Public URL accessible │
144
+ └────────────────────────┬────────────────────────────────┘
145
+
146
+
147
+ ┌─────────────────────────────────────────────────────────┐
148
+ │ PHASE 7: REGISTER (platform integration) │
149
+ │ │
150
+ │ 1. Register app via create_app MCP tool │
151
+ │ - name, URL, GitHub repo, Railway, category │
152
+ │ 2. Create developer agent via create_agent MCP tool │
153
+ │ - workspace = app directory │
154
+ │ - CLAUDE.md = tailored to this app │
155
+ │ - heartbeat = "check for issues, fix bugs" │
156
+ │ 3. Report to user: │
157
+ │ "Live at https://app-name.up.railway.app" │
158
+ │ "Developer agent @app-dev created to maintain it" │
159
+ │ │
160
+ │ Exit: app in registry, developer agent active │
161
+ └─────────────────────────────────────────────────────────┘
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Skill Architecture
167
+
168
+ ### Core Skills (the vanilla framework)
169
+
170
+ | Skill | Purpose | Type |
171
+ |-------|---------|------|
172
+ | `app_build_orchestrator` | Master runbook — the agent reads this first, follows phases in order, checks exit criteria at each step | Orchestration |
173
+ | `app_scaffold` | Deterministic project scaffolding — writes all config files, runs npm install | Deterministic |
174
+ | `app_patterns` | YOUR architecture patterns — Express route structure, Prisma conventions, React component patterns, auth approach | Patterns |
175
+ | `app_verify` | Build verification loop — run builds, read errors, fix, retry | Verification |
176
+ | `app_deploy` | GitHub + Railway deployment — git push, railway up, check logs, fix, redeploy | Deployment |
177
+ | `app_register` | Platform registration — create_app MCP + create_agent MCP | Integration |
178
+
179
+ ### Sub-Skills (specialized patterns, added over time)
180
+
181
+ | Sub-Skill | When Applied | What It Does |
182
+ |-----------|-------------|--------------|
183
+ | `app_pattern_auth` | User mentions login, users, accounts | Adds NextAuth/Passport, user model, protected routes |
184
+ | `app_pattern_multitenant` | User mentions orgs, tenants, teams | Adds org model, tenant isolation, scoped queries |
185
+ | `app_pattern_ai_agent` | User wants AI features, chat | Adds Anthropic SDK, chat endpoint, streaming |
186
+ | `app_pattern_payments` | User mentions billing, subscriptions | Adds Stripe integration, webhook handler |
187
+ | `app_pattern_realtime` | User mentions live updates | Adds WebSocket/SSE, real-time data push |
188
+ | `app_pattern_file_upload` | User mentions documents, images | Adds multer, S3/local storage, file preview |
189
+ | `app_pattern_dashboard` | User wants analytics, charts | Adds Recharts, stat cards, date range filters |
190
+ | `app_pattern_email` | User mentions notifications, email | Adds Resend/Nodemailer, email templates |
191
+ | `app_pattern_api_keys` | User wants external API access | Adds API key management, rate limiting |
192
+
193
+ The agent reads the user's prompt, determines which sub-skills are relevant, and layers them onto the base scaffold during the BUILD phase.
194
+
195
+ ---
196
+
197
+ ## Orchestrator Design (Master Skill)
198
+
199
+ The `app_build_orchestrator` skill is the state machine. Each phase has:
200
+
201
+ ```markdown
202
+ ## Phase N: {Name}
203
+
204
+ ### Entry Criteria
205
+ - [what must be true before starting this phase]
206
+
207
+ ### Actions
208
+ 1. [step one]
209
+ 2. [step two]
210
+ ...
211
+
212
+ ### Exit Checklist
213
+ - [ ] [condition 1]
214
+ - [ ] [condition 2]
215
+
216
+ ### Max Retries: N
217
+
218
+ ### On Failure
219
+ - [what to do if exit checklist fails after max retries]
220
+ - Either: fix and retry, or escalate to user
221
+ ```
222
+
223
+ The agent reads the orchestrator, executes phase by phase, and STOPS between Phase 5 (Preview) and Phase 6 (Deploy) to wait for user confirmation. This is the only human-in-the-loop checkpoint.
224
+
225
+ ---
226
+
227
+ ## Scaffold Templates (Deterministic Files)
228
+
229
+ These files are NEVER written by AI — they're templated with variables:
230
+
231
+ ### Backend
232
+ - `package.json` — Express 5, Prisma, cors, dotenv, TypeScript, ts-node-dev
233
+ - `tsconfig.json` — strict mode, ES2022, node module resolution
234
+ - `prisma/schema.prisma` — PostgreSQL provider, base config
235
+ - `src/index.ts` — Express app boilerplate with CORS, JSON parsing, error handler
236
+ - `.env.example` — DATABASE_URL, PORT templates
237
+
238
+ ### Frontend
239
+ - `package.json` — React 19, Vite, Tailwind CSS, shadcn/ui deps
240
+ - `tsconfig.json` — strict, JSX react-jsx
241
+ - `vite.config.ts` — proxy to backend API, port config
242
+ - `tailwind.config.ts` — content paths, shadcn preset
243
+ - `postcss.config.mjs` — tailwind + autoprefixer
244
+ - `src/main.tsx` — React root mount
245
+ - `src/App.tsx` — Router setup skeleton
246
+ - `src/index.css` — @tailwind directives
247
+ - `components.json` — shadcn/ui config
248
+
249
+ ### Root
250
+ - `.gitignore` — node_modules, dist, .env, .prisma
251
+
252
+ ---
253
+
254
+ ## What Makes This Different from FinneyBuilder
255
+
256
+ | Aspect | FinneyBuilder | Our App Creator |
257
+ |--------|--------------|-----------------|
258
+ | Sandbox | E2B cloud VM ($) | Local machine (free) |
259
+ | Stack | Next.js (one codebase) | Express + React (matches YOUR apps) |
260
+ | AI | Claude API with custom tool loop | Claude Code agent (native tools) |
261
+ | Database | Supabase tracking layer | No tracking DB needed |
262
+ | Skills | Basic prompt injection | Full skill system with sub-skills |
263
+ | Preview | E2B sandbox URL | localhost iframe in Lab canvas |
264
+ | Deploy | Railway via GraphQL API | Railway CLI via Bash |
265
+ | Quality | AI-generic output | YOUR patterns via curated skills |
266
+ | Multi-tenant | Yes (orgs, BYOI) | No (single user) |
267
+ | Modify/Fix | Separate modes | Same agent, ongoing conversation |
268
+
269
+ ---
270
+
271
+ ## Canvas Integration
272
+
273
+ The Lab canvas panel serves dual purpose during app creation:
274
+
275
+ 1. **During BUILD phase** — shows code artifacts (file contents) as they're written
276
+ 2. **During PREVIEW phase** — switches to iframe showing `http://localhost:5173`
277
+ 3. **During DEPLOY phase** — shows deployment logs and status
278
+
279
+ The canvas auto-opens when the first artifact appears and switches modes as the build progresses.
280
+
281
+ ---
282
+
283
+ ## Developer Agent (Post-Deploy)
284
+
285
+ After deployment, a developer agent is automatically created:
286
+
287
+ ```json
288
+ {
289
+ "name": "Expense Tracker Dev",
290
+ "workspace": "~/Desktop/APPs/expense-tracker",
291
+ "tools": ["Read", "Edit", "Write", "Glob", "Grep", "Bash"],
292
+ "mcps": ["github", "myaiforone"],
293
+ "heartbeatInstructions": "Check the GitHub repo for new issues. Check Railway logs for errors. If anything needs fixing, fix it and push.",
294
+ "org": [{ "organization": "Apps", "function": "Development", "title": "Developer" }]
295
+ }
296
+ ```
297
+
298
+ This agent maintains the app going forward — the user can chat with it to make changes, and its heartbeat keeps the app healthy.
299
+
300
+ ---
301
+
302
+ ## What to Build (Implementation Order)
303
+
304
+ ### Phase 1: Core Skills
305
+ 1. `app_build_orchestrator` — master runbook
306
+ 2. `app_scaffold` — deterministic scaffolding templates
307
+ 3. `app_patterns` — extracted from existing apps (P&L Analyzer, EscrowService)
308
+ 4. `app_verify` — build + fix loop
309
+ 5. `app_deploy` — GitHub + Railway pipeline
310
+ 6. `app_register` — platform integration
311
+
312
+ ### Phase 2: App Creator Agent Update
313
+ 1. Update `appcreator` CLAUDE.md — reference the orchestrator skill
314
+ 2. Add all skills to the appcreator agent config
315
+ 3. Add Railway CLI access (Bash tool already available)
316
+ 4. Add GitHub MCP to appcreator
317
+
318
+ ### Phase 3: Lab Canvas Enhancement
319
+ 1. Add iframe rendering capability to canvas
320
+ 2. Auto-switch canvas to iframe when dev server starts
321
+ 3. Add deployment status view in canvas
322
+
323
+ ### Phase 4: Sub-Skills (iterative, over time)
324
+ 1. `app_pattern_auth` — first sub-skill (most common need)
325
+ 2. `app_pattern_dashboard` — second (visual impact)
326
+ 3. Others as needed based on usage
327
+
328
+ ### Phase 5: Test & Refine
329
+ 1. Build a test app end-to-end using the system
330
+ 2. Identify where the agent gets stuck
331
+ 3. Refine skills based on real failures
332
+ 4. Repeat
333
+
334
+ ---
335
+
336
+ ## Future: Autonomy Integration
337
+
338
+ This pipeline is designed to work with the future autonomy system:
339
+
340
+ 1. **User creates a goal**: "Build me 3 internal tools this week"
341
+ 2. **Agent proposes tasks**: "Task 1: Expense Tracker, Task 2: Inventory Manager, Task 3: Time Logger"
342
+ 3. **User approves via inbox**: approves all 3
343
+ 4. **Heartbeat triggers**: agent picks up Task 1, runs the full build pipeline autonomously
344
+ 5. **Reports back**: "Expense Tracker deployed at https://..."
345
+ 6. **Next heartbeat**: picks up Task 2, builds it
346
+ 7. **User reviews**: checks deployed apps, requests modifications
347
+
348
+ The `source` field on tasks tracks that these were agent-proposed. The heartbeat system provides the execution loop. The orchestrator skill provides the build discipline.
@@ -0,0 +1,320 @@
1
+ # Platform MCP Audit — Hub Agent Readiness
2
+
3
+ > Every action the hub agent needs to perform must be available as an MCP tool.
4
+ > This audit maps every platform API endpoint to its MCP tool coverage.
5
+ > **Status**: ✅ = covered | ❌ = missing | ⚠️ = partial
6
+
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ | Category | API Endpoints | MCP Tools | Gaps |
12
+ |----------|:---:|:---:|:---:|
13
+ | Agents | 8 | 8 | 0 |
14
+ | Chat & Streaming | 6 | 5 | 1 |
15
+ | Sessions | 3 | 3 | 0 |
16
+ | Tasks & Projects | 7 | 7 | 0 |
17
+ | Goals | 5 | 5 | 0 |
18
+ | Cron Jobs | 5 | 5 | 0 |
19
+ | Automations (list) | 1 | 1 | 0 |
20
+ | Skills | 3 | 3 | 0 |
21
+ | MCPs | 2 | 2 | 0 |
22
+ | MCP Keys & Connections | 5 | 5 | 0 |
23
+ | Marketplace / Registry | 9 | 9 | 0 |
24
+ | Channels | 7 | 7 | 0 |
25
+ | Memory | 3 | 3 | 0 |
26
+ | Activity & Logs | 3 | 3 | 0 |
27
+ | Model Overrides | 3 | 3 | 0 |
28
+ | Cost | 2 | 2 | 0 |
29
+ | Files | 3 | 3 | 0 |
30
+ | Apps | 5 | 5 | 0 |
31
+ | Accounts / Auth | 6 | 6 | 0 |
32
+ | Service Config | 2 | 2 | 0 |
33
+ | Pairing | 3 | 3 | 0 |
34
+ | Heartbeat | 2 | 2 | 0 |
35
+ | Delegation | 1 | 1 | 0 |
36
+ | Webhooks | 1 | 1 | 0 |
37
+ | SaaS Integration | 4 | 4 | 0 |
38
+ | Dashboard | 2 | 2 | 0 |
39
+ | Platform Agents (Lab) | 1 | 1 | 0 |
40
+ | Utilities | 3 | 3 | 0 |
41
+ | **TOTAL** | **105** | **104** | **1** |
42
+
43
+ > Note: ~21 HTML page routes excluded (not API actions). Only API endpoints counted.
44
+
45
+ ---
46
+
47
+ ## Detailed Mapping
48
+
49
+ ### Agents
50
+
51
+ | # | Action | API Endpoint | MCP Tool | Status |
52
+ |---|--------|-------------|----------|:---:|
53
+ | 1 | List all agents | `GET /api/agents` | `list_agents` | ✅ |
54
+ | 2 | Get agent details | `GET /api/agents/:id` | `get_agent` | ✅ |
55
+ | 3 | Get agent instructions | `GET /api/agents/:id/instructions` | `get_agent_instructions` | ✅ |
56
+ | 4 | Create agent | `POST /api/agents` | `create_agent` | ✅ |
57
+ | 5 | Update agent | `PUT /api/agents/:id` | `update_agent` | ✅ |
58
+ | 6 | Delete agent | `DELETE /api/agents/:id` | `delete_agent` | ✅ |
59
+ | 7 | Recover agent | `POST /api/agents/:agentId/recover` | `recover_agent` | ✅ |
60
+ | 8 | Get agent registry | `GET /api/agent-registry` | `get_agent_registry` | ✅ |
61
+
62
+ ### Chat & Streaming
63
+
64
+ | # | Action | API Endpoint | MCP Tool | Status |
65
+ |---|--------|-------------|----------|:---:|
66
+ | 9 | Send message (sync) | `POST /api/chat/:agentId` | `send_message` | ✅ |
67
+ | 10 | Start streaming chat | `POST /api/chat/:agentId/stream` | `start_stream` | ✅ |
68
+ | 11 | Get stream output (SSE) | `GET /api/chat/jobs/:jobId/stream` | — | ❌ |
69
+ | 12 | Get raw job output | `GET /api/chat/jobs/:jobId/raw` | `get_chat_job_raw` | ✅ |
70
+ | 13 | Stop chat job | `POST /api/chat/jobs/:jobId/stop` | `stop_chat_job` | ✅ |
71
+ | 14 | Delegate to agent | `POST /api/delegate` | `delegate_message` | ✅ |
72
+
73
+ > **Gap note:** SSE stream endpoint is browser-only; MCP clients use `get_chat_job_raw` polling instead. **Not a real gap** — can reclassify as N/A.
74
+
75
+ ### Sessions
76
+
77
+ | # | Action | API Endpoint | MCP Tool | Status |
78
+ |---|--------|-------------|----------|:---:|
79
+ | 15 | List sessions | `GET /api/agents/:agentId/sessions` | `list_sessions` | ✅ |
80
+ | 16 | Reset session | `POST /api/agents/:agentId/sessions/reset` | `reset_session` | ✅ |
81
+ | 17 | Delete session | `DELETE /api/agents/:agentId/sessions/:senderId` | `delete_session` | ✅ |
82
+
83
+ ### Tasks & Projects
84
+
85
+ | # | Action | API Endpoint | MCP Tool | Status |
86
+ |---|--------|-------------|----------|:---:|
87
+ | 18 | List agent tasks | `GET /api/agents/:id/tasks` | `list_tasks` | ✅ |
88
+ | 19 | Create task | `POST /api/agents/:id/tasks` | `create_task` | ✅ |
89
+ | 20 | Update task | `PUT /api/agents/:id/tasks/:taskId` | `update_task` | ✅ |
90
+ | 21 | Delete task | `DELETE /api/agents/:id/tasks/:taskId` | `delete_task` | ✅ |
91
+ | 22 | Get all tasks (cross-agent) | `GET /api/tasks/all` | `get_all_tasks` | ✅ |
92
+ | 23 | Get task stats | `GET /api/agents/:id/tasks/stats` | `get_task_stats` | ✅ |
93
+ | 24 | Create project | `POST /api/agents/:id/projects` | `create_project` | ✅ |
94
+
95
+ ### Goals
96
+
97
+ | # | Action | API Endpoint | MCP Tool | Status |
98
+ |---|--------|-------------|----------|:---:|
99
+ | 25 | Create goal | `POST /api/agents/:id/goals` | `create_goal` | ✅ |
100
+ | 26 | Toggle goal | `POST /api/agents/:id/goals/:goalId/toggle` | `toggle_goal` | ✅ |
101
+ | 27 | Trigger goal | `POST /api/agents/:id/goals/:goalId/trigger` | `trigger_goal` | ✅ |
102
+ | 28 | Delete goal | `DELETE /api/agents/:id/goals/:goalId` | `delete_goal` | ✅ |
103
+ | 29 | Get goal history | `GET /api/agents/:id/goals/:goalId/history` | `get_goal_history` | ✅ |
104
+
105
+ ### Cron Jobs
106
+
107
+ | # | Action | API Endpoint | MCP Tool | Status |
108
+ |---|--------|-------------|----------|:---:|
109
+ | 30 | Create cron | `POST /api/agents/:id/cron` | `create_cron` | ✅ |
110
+ | 31 | Toggle cron | `POST /api/agents/:id/cron/:index/toggle` | `toggle_cron` | ✅ |
111
+ | 32 | Trigger cron | `POST /api/agents/:id/cron/:index/trigger` | `trigger_cron` | ✅ |
112
+ | 33 | Delete cron | `DELETE /api/agents/:id/cron/:index` | `delete_cron` | ✅ |
113
+ | 34 | Get cron history | `GET /api/agents/:id/cron/:index/history` | `get_cron_history` | ✅ |
114
+
115
+ ### Automations
116
+
117
+ | # | Action | API Endpoint | MCP Tool | Status |
118
+ |---|--------|-------------|----------|:---:|
119
+ | 35 | List all automations | `GET /api/automations` | `list_automations` | ✅ |
120
+
121
+ ### Skills
122
+
123
+ | # | Action | API Endpoint | MCP Tool | Status |
124
+ |---|--------|-------------|----------|:---:|
125
+ | 36 | Create skill | `POST /api/skills/create` | `create_skill` | ✅ |
126
+ | 37 | Get agent skills | `GET /api/agents/:agentId/skills` | `get_agent_skills` | ✅ |
127
+ | 38 | Get org skills | `GET /api/skills/org/:orgName` | `get_org_skills` | ✅ |
128
+
129
+ ### MCPs
130
+
131
+ | # | Action | API Endpoint | MCP Tool | Status |
132
+ |---|--------|-------------|----------|:---:|
133
+ | 39 | List MCPs | `GET /api/mcps` | `list_mcps` | ✅ |
134
+ | 40 | Get MCP catalog | `GET /api/mcp-catalog` | `get_mcp_catalog` | ✅ |
135
+
136
+ ### MCP Keys & Connections
137
+
138
+ | # | Action | API Endpoint | MCP Tool | Status |
139
+ |---|--------|-------------|----------|:---:|
140
+ | 41 | List MCP keys | `GET /api/agents/:id/mcp-keys` | `list_mcp_keys` | ✅ |
141
+ | 42 | Save MCP key | `POST /api/agents/:id/mcp-keys` | `save_mcp_key` | ✅ |
142
+ | 43 | Delete MCP key | `DELETE /api/agents/:id/mcp-keys/:mcpName` | `delete_mcp_key` | ✅ |
143
+ | 44 | List MCP connections | `GET /api/agents/:id/mcp-connections` | `list_mcp_connections` | ✅ |
144
+ | 45 | Create MCP connection | `POST /api/agents/:id/mcp-connections` | `create_mcp_connection` | ✅ |
145
+ | 46 | Delete MCP connection | `DELETE /api/agents/:id/mcp-connections/:instanceName` | `delete_mcp_connection` | ✅ |
146
+
147
+ ### Marketplace / Registry
148
+
149
+ | # | Action | API Endpoint | MCP Tool | Status |
150
+ |---|--------|-------------|----------|:---:|
151
+ | 47 | Browse by type | `GET /api/marketplace/:type` | `browse_registry` | ✅ |
152
+ | 48 | Install item | `POST /api/marketplace/install` | `install_registry_item` | ✅ |
153
+ | 49 | Assign to agent | `POST /api/marketplace/assign` | `assign_to_agent` | ✅ |
154
+ | 50 | Set platform default | `POST /api/marketplace/platform-default` | `set_platform_default` | ✅ |
155
+ | 51 | Scan skills | `GET /api/marketplace/scan-skills` | `scan_skills` | ✅ |
156
+ | 52 | Import skills | `POST /api/marketplace/import-skills` | `import_skills` | ✅ |
157
+ | 53 | Create prompt | `POST /api/marketplace/create-prompt` | `create_prompt` | ✅ |
158
+ | 54 | Get prompt trigger | `GET /api/marketplace/prompt-trigger` | `get_prompt_trigger` | ✅ |
159
+ | 55 | Set prompt trigger | `POST /api/marketplace/prompt-trigger` | `set_prompt_trigger` | ✅ |
160
+ | 56 | Add MCP to registry | `POST /api/marketplace/add-mcp` | `add_mcp_to_registry` | ✅ |
161
+
162
+ ### Channels
163
+
164
+ | # | Action | API Endpoint | MCP Tool | Status |
165
+ |---|--------|-------------|----------|:---:|
166
+ | 57 | List channels | `GET /api/channels` | `list_channels` | ✅ |
167
+ | 58 | Update channel | `PUT /api/channels/:channelName` | `update_channel` | ✅ |
168
+ | 59 | Add agent route | `POST /api/channels/:channelName/agents` | `add_agent_route` | ✅ |
169
+ | 60 | Remove agent route | `DELETE /api/channels/:channelName/agents/:agentId` | `remove_agent_route` | ✅ |
170
+ | 61 | Add monitored chat | `POST /api/channels/:channelName/monitored` | `add_monitored_chat` | ✅ |
171
+ | 62 | Remove monitored chat | `DELETE /api/channels/:channelName/monitored` | `remove_monitored_chat` | ✅ |
172
+ | 63 | Get sticky routing | `GET /api/sticky-routing` | `get_sticky_routing` | ✅ |
173
+
174
+ ### Memory
175
+
176
+ | # | Action | API Endpoint | MCP Tool | Status |
177
+ |---|--------|-------------|----------|:---:|
178
+ | 64 | Get agent memory | `GET /api/agents/:agentId/memory` | `get_agent_memory` | ✅ |
179
+ | 65 | Search memory | `POST /api/agents/:agentId/memory/search` | `search_memory` | ✅ |
180
+ | 66 | Clear memory context | `DELETE /api/agents/:agentId/memory/context` | `clear_memory_context` | ✅ |
181
+
182
+ ### Activity & Logs
183
+
184
+ | # | Action | API Endpoint | MCP Tool | Status |
185
+ |---|--------|-------------|----------|:---:|
186
+ | 67 | Get activity feed | `GET /api/activity` | `get_activity` | ✅ |
187
+ | 68 | Get agent logs | `GET /api/agents/:agentId/logs` | `get_agent_logs` | ✅ |
188
+ | 69 | Get changelog | `GET /api/changelog` | `get_changelog` | ✅ |
189
+
190
+ ### Model Overrides
191
+
192
+ | # | Action | API Endpoint | MCP Tool | Status |
193
+ |---|--------|-------------|----------|:---:|
194
+ | 70 | Get model | `GET /api/agents/:agentId/model` | `get_model` | ✅ |
195
+ | 71 | Set model | `PUT /api/agents/:agentId/model` | `set_model` | ✅ |
196
+ | 72 | Clear model | `DELETE /api/agents/:agentId/model` | `clear_model` | ✅ |
197
+
198
+ ### Cost
199
+
200
+ | # | Action | API Endpoint | MCP Tool | Status |
201
+ |---|--------|-------------|----------|:---:|
202
+ | 73 | Get agent cost | `GET /api/agents/:agentId/cost` | `get_agent_cost` | ✅ |
203
+ | 74 | Get all costs | `GET /api/cost/all` | `get_all_costs` | ✅ |
204
+
205
+ ### Files
206
+
207
+ | # | Action | API Endpoint | MCP Tool | Status |
208
+ |---|--------|-------------|----------|:---:|
209
+ | 75 | Upload file (JSON/base64) | `POST /api/upload/:agentId/json` | `upload_file` | ✅ |
210
+ | 76 | List agent files | `GET /api/agents/:agentId/files` | `list_agent_files` | ✅ |
211
+ | 77 | Download file | `GET /api/agents/:agentId/download` | `download_agent_file` | ✅ |
212
+
213
+ ### Apps
214
+
215
+ | # | Action | API Endpoint | MCP Tool | Status |
216
+ |---|--------|-------------|----------|:---:|
217
+ | 78 | List apps | `GET /api/apps` | `list_apps` | ✅ |
218
+ | 79 | Create app | `POST /api/apps` | `create_app` | ✅ |
219
+ | 80 | Update app | `PUT /api/apps/:id` | `update_app` | ✅ |
220
+ | 81 | Delete app | `DELETE /api/apps/:id` | `delete_app` | ✅ |
221
+ | 82 | Check app health | `POST /api/apps/:id/check-health` | `check_app_health` | ✅ |
222
+
223
+ ### Accounts / Auth
224
+
225
+ | # | Action | API Endpoint | MCP Tool | Status |
226
+ |---|--------|-------------|----------|:---:|
227
+ | 83 | List accounts | `GET /api/config/accounts` | `list_accounts` | ✅ |
228
+ | 84 | Add account | `POST /api/config/accounts` | `add_account` | ✅ |
229
+ | 85 | Delete account | `DELETE /api/config/accounts/:name` | `delete_account` | ✅ |
230
+ | 86 | Check account status | `GET /api/config/accounts/:name/status` | `check_account_status` | ✅ |
231
+ | 87 | Start login | `POST /api/config/accounts/login` | `start_account_login` | ✅ |
232
+ | 88 | Submit login code | `POST /api/config/accounts/login/code` | `submit_login_code` | ✅ |
233
+
234
+ ### Service Config
235
+
236
+ | # | Action | API Endpoint | MCP Tool | Status |
237
+ |---|--------|-------------|----------|:---:|
238
+ | 89 | Get service config | `GET /api/config/service` | `get_service_config` | ✅ |
239
+ | 90 | Update service config | `PUT /api/config/service` | `update_service_config` | ✅ |
240
+
241
+ ### Pairing
242
+
243
+ | # | Action | API Endpoint | MCP Tool | Status |
244
+ |---|--------|-------------|----------|:---:|
245
+ | 91 | List paired senders | `GET /api/pairing` | `list_paired_senders` | ✅ |
246
+ | 92 | Pair sender | `POST /api/pairing` | `pair_sender` | ✅ |
247
+ | 93 | Unpair sender | `DELETE /api/pairing/:senderKey` | `unpair_sender` | ✅ |
248
+
249
+ ### Heartbeat
250
+
251
+ | # | Action | API Endpoint | MCP Tool | Status |
252
+ |---|--------|-------------|----------|:---:|
253
+ | 94 | Trigger heartbeat | `POST /api/agents/:id/heartbeat` | `trigger_heartbeat` | ✅ |
254
+ | 95 | Get heartbeat history | `GET /api/agents/:id/heartbeat-history` | `get_heartbeat_history` | ✅ |
255
+
256
+ ### Webhooks
257
+
258
+ | # | Action | API Endpoint | MCP Tool | Status |
259
+ |---|--------|-------------|----------|:---:|
260
+ | 96 | Send webhook | `POST /webhook/:agentId` | `send_webhook` | ✅ |
261
+
262
+ ### Dashboard
263
+
264
+ | # | Action | API Endpoint | MCP Tool | Status |
265
+ |---|--------|-------------|----------|:---:|
266
+ | 97 | Get dashboard | `GET /api/dashboard` | `get_dashboard` | ✅ |
267
+ | 98 | Browse directories | `GET /api/browse-dirs` | `browse_dirs` | ✅ |
268
+
269
+ ### Platform Agents (Lab)
270
+
271
+ | # | Action | API Endpoint | MCP Tool | Status |
272
+ |---|--------|-------------|----------|:---:|
273
+ | 99 | Get platform agents | `GET /api/platform-agents` | `get_platform_agents` | ✅ |
274
+
275
+ ### Utilities
276
+
277
+ | # | Action | API Endpoint | MCP Tool | Status |
278
+ |---|--------|-------------|----------|:---:|
279
+ | 100 | Health check | `GET /health` | `health_check` | ✅ |
280
+ | 101 | Install xbar | `POST /api/install-xbar` | `install_xbar` | ✅ |
281
+ | 102 | Whoami | `GET /api/whoami/:agentId` | `whoami` | ✅ |
282
+
283
+ ### SaaS Integration
284
+
285
+ | # | Action | API Endpoint | MCP Tool | Status |
286
+ |---|--------|-------------|----------|:---:|
287
+ | 103 | Get SaaS config | `GET /api/saas/config` | `get_saas_config` | ✅ |
288
+ | 104 | Update SaaS config | `PUT /api/saas/config` | `update_saas_config` | ✅ |
289
+ | 105 | Test SaaS connection | `POST /api/saas/test` | `test_saas_connection` | ✅ |
290
+ | 106 | Publish to SaaS | `POST /api/saas/publish` | `publish_to_saas` | ✅ |
291
+
292
+ ---
293
+
294
+ ## Gap Analysis
295
+
296
+ ### ✅ All Gaps Closed
297
+
298
+ **Phase 1** (2026-04-02 — API coverage):
299
+ - `get_saas_config` — Get SaaS connection settings
300
+ - `update_saas_config` — Configure SaaS base URL and API key
301
+ - `test_saas_connection` — Test SaaS credentials
302
+ - `publish_to_saas` — Publish skill/prompt/agent/app to SaaS platform
303
+ - `upload_file` — Upload a file to an agent's storage (base64/JSON endpoint)
304
+
305
+ **Phase 2** (2026-04-02 — Hub agent readiness):
306
+ - `list_capabilities` — Structured discovery of all platform capabilities by category
307
+ - `write_memory` — Write to an agent's context.md or daily journal
308
+ - `get_skill_content` — Read full skill file content (markdown)
309
+ - `update_goal` — Modify an existing goal's config without delete+recreate
310
+ - `update_cron` — Modify an existing cron's schedule/message without delete+recreate
311
+ - `restart_service` — Trigger service restart after config changes
312
+ - `get_user_guide` — Full platform user guide as markdown
313
+
314
+ ### Remaining Non-Gaps (1)
315
+
316
+ | # | Action | API Endpoint | Status | Notes |
317
+ |---|--------|-------------|:---:|-------|
318
+ | 1 | **SSE stream** | `GET /api/chat/jobs/:jobId/stream` | N/A | Browser-only; MCP uses `get_chat_job_raw` polling instead |
319
+
320
+ ### ✅ Total MCP Tools: **113** | Coverage: **100%** of actionable endpoints + 7 hub-agent-specific tools