@hailer/mcp 1.1.11 → 1.1.13

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 (252) hide show
  1. package/dist/app.js +18 -5
  2. package/dist/bot/bot-config.d.ts +12 -1
  3. package/dist/bot/bot-config.js +98 -14
  4. package/dist/bot/bot-manager.d.ts +13 -3
  5. package/dist/bot/bot-manager.js +80 -25
  6. package/dist/bot/bot.d.ts +46 -0
  7. package/dist/bot/bot.js +542 -166
  8. package/dist/bot/services/message-classifier.js +17 -0
  9. package/dist/bot/services/permission-guard.d.ts +52 -0
  10. package/dist/bot/services/permission-guard.js +149 -0
  11. package/dist/bot/services/types.d.ts +5 -0
  12. package/dist/bot/services/typing-indicator.d.ts +6 -1
  13. package/dist/bot/services/typing-indicator.js +19 -3
  14. package/dist/config.d.ts +6 -1
  15. package/dist/config.js +43 -0
  16. package/dist/core.js +3 -6
  17. package/dist/mcp/UserContextCache.d.ts +5 -0
  18. package/dist/mcp/UserContextCache.js +51 -19
  19. package/dist/mcp/hailer-clients.d.ts +19 -1
  20. package/dist/mcp/hailer-clients.js +157 -20
  21. package/dist/mcp/session-store.d.ts +68 -0
  22. package/dist/mcp/session-store.js +169 -0
  23. package/dist/mcp/signal-handler.js +12 -12
  24. package/dist/mcp/tool-registry.d.ts +17 -4
  25. package/dist/mcp/tool-registry.js +37 -7
  26. package/dist/mcp/tools/activity.js +99 -7
  27. package/dist/mcp/tools/app-scaffold.js +304 -336
  28. package/dist/mcp/tools/company.d.ts +9 -0
  29. package/dist/mcp/tools/company.js +88 -0
  30. package/dist/mcp/tools/discussion.js +68 -0
  31. package/dist/mcp/tools/workflow-permissions.d.ts +15 -0
  32. package/dist/mcp/tools/workflow-permissions.js +204 -0
  33. package/dist/mcp/tools/workflow.js +57 -18
  34. package/dist/mcp/utils/index.d.ts +2 -0
  35. package/dist/mcp/utils/index.js +12 -1
  36. package/dist/mcp/utils/role-utils.d.ts +74 -0
  37. package/dist/mcp/utils/role-utils.js +151 -0
  38. package/dist/mcp/utils/types.d.ts +43 -1
  39. package/dist/mcp/utils/types.js +14 -0
  40. package/dist/mcp/webhook-handler.d.ts +6 -0
  41. package/dist/mcp/webhook-handler.js +11 -0
  42. package/dist/mcp-server.d.ts +23 -2
  43. package/dist/mcp-server.js +639 -111
  44. package/dist/plugins/vipunen/client.d.ts +150 -0
  45. package/dist/plugins/vipunen/client.js +535 -0
  46. package/dist/plugins/vipunen/config/schema-config.json +19 -0
  47. package/dist/plugins/vipunen/config/schema-doc.json +22 -0
  48. package/dist/plugins/vipunen/index.d.ts +41 -0
  49. package/dist/plugins/vipunen/index.js +88 -0
  50. package/dist/plugins/vipunen/tools.d.ts +26 -0
  51. package/dist/plugins/vipunen/tools.js +501 -0
  52. package/package.json +2 -1
  53. package/.claude/.context-watchdog.json +0 -1
  54. package/.claude/.session-checked +0 -1
  55. package/.claude/CLAUDE.md +0 -370
  56. package/.claude/agents/agent-ada-skill-builder.md +0 -94
  57. package/.claude/agents/agent-alejandro-function-fields.md +0 -342
  58. package/.claude/agents/agent-bjorn-config-audit.md +0 -103
  59. package/.claude/agents/agent-builder-agent-creator.md +0 -130
  60. package/.claude/agents/agent-code-simplifier.md +0 -53
  61. package/.claude/agents/agent-dmitri-activity-crud.md +0 -159
  62. package/.claude/agents/agent-giuseppe-app-builder.md +0 -247
  63. package/.claude/agents/agent-gunther-mcp-tools.md +0 -39
  64. package/.claude/agents/agent-helga-workflow-config.md +0 -204
  65. package/.claude/agents/agent-igor-activity-mover-automation.md +0 -125
  66. package/.claude/agents/agent-ingrid-doc-templates.md +0 -261
  67. package/.claude/agents/agent-ivan-monolith.md +0 -154
  68. package/.claude/agents/agent-kenji-data-reader.md +0 -86
  69. package/.claude/agents/agent-lars-code-inspector.md +0 -102
  70. package/.claude/agents/agent-marco-mockup-builder.md +0 -110
  71. package/.claude/agents/agent-marcus-api-documenter.md +0 -323
  72. package/.claude/agents/agent-marketplace-publisher.md +0 -280
  73. package/.claude/agents/agent-marketplace-reviewer.md +0 -309
  74. package/.claude/agents/agent-permissions-handler.md +0 -208
  75. package/.claude/agents/agent-simple-writer.md +0 -48
  76. package/.claude/agents/agent-svetlana-code-review.md +0 -171
  77. package/.claude/agents/agent-tanya-test-runner.md +0 -333
  78. package/.claude/agents/agent-ui-designer.md +0 -100
  79. package/.claude/agents/agent-viktor-sql-insights.md +0 -212
  80. package/.claude/agents/agent-web-search.md +0 -55
  81. package/.claude/agents/agent-yevgeni-discussions.md +0 -45
  82. package/.claude/agents/agent-zara-zapier.md +0 -159
  83. package/.claude/commands/app-squad.md +0 -135
  84. package/.claude/commands/audit-squad.md +0 -158
  85. package/.claude/commands/autoplan.md +0 -563
  86. package/.claude/commands/cleanup-squad.md +0 -98
  87. package/.claude/commands/config-squad.md +0 -106
  88. package/.claude/commands/crud-squad.md +0 -87
  89. package/.claude/commands/data-squad.md +0 -97
  90. package/.claude/commands/debug-squad.md +0 -303
  91. package/.claude/commands/doc-squad.md +0 -65
  92. package/.claude/commands/handoff.md +0 -137
  93. package/.claude/commands/health.md +0 -49
  94. package/.claude/commands/help.md +0 -29
  95. package/.claude/commands/help:agents.md +0 -151
  96. package/.claude/commands/help:commands.md +0 -78
  97. package/.claude/commands/help:faq.md +0 -79
  98. package/.claude/commands/help:plugins.md +0 -50
  99. package/.claude/commands/help:skills.md +0 -93
  100. package/.claude/commands/help:tools.md +0 -75
  101. package/.claude/commands/hotfix-squad.md +0 -112
  102. package/.claude/commands/integration-squad.md +0 -82
  103. package/.claude/commands/janitor-squad.md +0 -167
  104. package/.claude/commands/learn-auto.md +0 -120
  105. package/.claude/commands/learn.md +0 -120
  106. package/.claude/commands/mcp-list.md +0 -27
  107. package/.claude/commands/onboard-squad.md +0 -140
  108. package/.claude/commands/plan-workspace.md +0 -732
  109. package/.claude/commands/prd.md +0 -130
  110. package/.claude/commands/project-status.md +0 -82
  111. package/.claude/commands/publish.md +0 -138
  112. package/.claude/commands/recap.md +0 -69
  113. package/.claude/commands/restore.md +0 -64
  114. package/.claude/commands/review-squad.md +0 -152
  115. package/.claude/commands/save.md +0 -24
  116. package/.claude/commands/stats.md +0 -19
  117. package/.claude/commands/swarm.md +0 -210
  118. package/.claude/commands/tool-builder.md +0 -39
  119. package/.claude/commands/ws-pull.md +0 -44
  120. package/.claude/hooks/_shared-memory.cjs +0 -305
  121. package/.claude/hooks/_utils.cjs +0 -108
  122. package/.claude/hooks/agent-failure-detector.cjs +0 -383
  123. package/.claude/hooks/agent-usage-logger.cjs +0 -204
  124. package/.claude/hooks/app-edit-guard.cjs +0 -494
  125. package/.claude/hooks/auto-learn.cjs +0 -304
  126. package/.claude/hooks/bash-guard.cjs +0 -272
  127. package/.claude/hooks/builder-mode-manager.cjs +0 -354
  128. package/.claude/hooks/bulk-activity-guard.cjs +0 -271
  129. package/.claude/hooks/context-watchdog.cjs +0 -230
  130. package/.claude/hooks/delegation-reminder.cjs +0 -465
  131. package/.claude/hooks/design-system-lint.cjs +0 -271
  132. package/.claude/hooks/post-scaffold-hook.cjs +0 -181
  133. package/.claude/hooks/prompt-guard.cjs +0 -354
  134. package/.claude/hooks/publish-template-guard.cjs +0 -147
  135. package/.claude/hooks/session-start.cjs +0 -35
  136. package/.claude/hooks/shared-memory-writer.cjs +0 -147
  137. package/.claude/hooks/skill-injector.cjs +0 -140
  138. package/.claude/hooks/skill-usage-logger.cjs +0 -258
  139. package/.claude/hooks/src-edit-guard.cjs +0 -240
  140. package/.claude/hooks/sync-marketplace-agents.cjs +0 -346
  141. package/.claude/settings.json +0 -257
  142. package/.claude/skills/SDK-activity-patterns/SKILL.md +0 -428
  143. package/.claude/skills/SDK-document-templates/SKILL.md +0 -1033
  144. package/.claude/skills/SDK-function-fields/SKILL.md +0 -542
  145. package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
  146. package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
  147. package/.claude/skills/SDK-insight-queries/SKILL.md +0 -787
  148. package/.claude/skills/SDK-ws-config-skill/SKILL.md +0 -1139
  149. package/.claude/skills/agent-structure/SKILL.md +0 -98
  150. package/.claude/skills/api-documentation-patterns/SKILL.md +0 -474
  151. package/.claude/skills/chrome-mcp-reference/SKILL.md +0 -370
  152. package/.claude/skills/delegation-routing/SKILL.md +0 -202
  153. package/.claude/skills/frontend-design/SKILL.md +0 -254
  154. package/.claude/skills/hailer-activity-mover/SKILL.md +0 -213
  155. package/.claude/skills/hailer-api-client/SKILL.md +0 -518
  156. package/.claude/skills/hailer-app-builder/SKILL.md +0 -1434
  157. package/.claude/skills/hailer-apps-pictures/SKILL.md +0 -269
  158. package/.claude/skills/hailer-design-system/SKILL.md +0 -235
  159. package/.claude/skills/hailer-monolith-automations/SKILL.md +0 -686
  160. package/.claude/skills/hailer-permissions-system/SKILL.md +0 -121
  161. package/.claude/skills/hailer-project-protocol/SKILL.md +0 -488
  162. package/.claude/skills/hailer-rest-api/SKILL.md +0 -61
  163. package/.claude/skills/hailer-rest-api/hailer-activities.md +0 -184
  164. package/.claude/skills/hailer-rest-api/hailer-admin.md +0 -473
  165. package/.claude/skills/hailer-rest-api/hailer-calendar.md +0 -256
  166. package/.claude/skills/hailer-rest-api/hailer-feed.md +0 -249
  167. package/.claude/skills/hailer-rest-api/hailer-insights.md +0 -195
  168. package/.claude/skills/hailer-rest-api/hailer-messaging.md +0 -276
  169. package/.claude/skills/hailer-rest-api/hailer-workflows.md +0 -283
  170. package/.claude/skills/insight-join-patterns/SKILL.md +0 -174
  171. package/.claude/skills/integration-patterns/SKILL.md +0 -421
  172. package/.claude/skills/json-only-output/SKILL.md +0 -72
  173. package/.claude/skills/lsp-setup/SKILL.md +0 -160
  174. package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
  175. package/.claude/skills/optional-parameters/SKILL.md +0 -72
  176. package/.claude/skills/publish-hailer-app/SKILL.md +0 -244
  177. package/.claude/skills/testing-patterns/SKILL.md +0 -630
  178. package/.claude/skills/tool-builder/SKILL.md +0 -250
  179. package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
  180. package/.claude/skills/tool-response-verification/SKILL.md +0 -92
  181. package/.claude/skills/zapier-hailer-patterns/SKILL.md +0 -581
  182. package/.hailer-mcp-port +0 -1
  183. package/.mcp.json +0 -13
  184. package/.opencode/agent/agent-ada-skill-builder.md +0 -35
  185. package/.opencode/agent/agent-alejandro-function-fields.md +0 -39
  186. package/.opencode/agent/agent-bjorn-config-audit.md +0 -36
  187. package/.opencode/agent/agent-builder-agent-creator.md +0 -39
  188. package/.opencode/agent/agent-code-simplifier.md +0 -31
  189. package/.opencode/agent/agent-dmitri-activity-crud.md +0 -40
  190. package/.opencode/agent/agent-giuseppe-app-builder.md +0 -37
  191. package/.opencode/agent/agent-gunther-mcp-tools.md +0 -39
  192. package/.opencode/agent/agent-helga-workflow-config.md +0 -204
  193. package/.opencode/agent/agent-igor-activity-mover-automation.md +0 -46
  194. package/.opencode/agent/agent-ingrid-doc-templates.md +0 -39
  195. package/.opencode/agent/agent-ivan-monolith.md +0 -46
  196. package/.opencode/agent/agent-kenji-data-reader.md +0 -53
  197. package/.opencode/agent/agent-lars-code-inspector.md +0 -28
  198. package/.opencode/agent/agent-marco-mockup-builder.md +0 -42
  199. package/.opencode/agent/agent-marcus-api-documenter.md +0 -53
  200. package/.opencode/agent/agent-marketplace-publisher.md +0 -44
  201. package/.opencode/agent/agent-marketplace-reviewer.md +0 -42
  202. package/.opencode/agent/agent-permissions-handler.md +0 -50
  203. package/.opencode/agent/agent-simple-writer.md +0 -45
  204. package/.opencode/agent/agent-svetlana-code-review.md +0 -39
  205. package/.opencode/agent/agent-tanya-test-runner.md +0 -57
  206. package/.opencode/agent/agent-ui-designer.md +0 -56
  207. package/.opencode/agent/agent-viktor-sql-insights.md +0 -34
  208. package/.opencode/agent/agent-web-search.md +0 -42
  209. package/.opencode/agent/agent-yevgeni-discussions.md +0 -37
  210. package/.opencode/agent/agent-zara-zapier.md +0 -53
  211. package/.opencode/commands/app-squad.md +0 -135
  212. package/.opencode/commands/audit-squad.md +0 -158
  213. package/.opencode/commands/autoplan.md +0 -563
  214. package/.opencode/commands/cleanup-squad.md +0 -98
  215. package/.opencode/commands/config-squad.md +0 -106
  216. package/.opencode/commands/crud-squad.md +0 -87
  217. package/.opencode/commands/data-squad.md +0 -97
  218. package/.opencode/commands/debug-squad.md +0 -303
  219. package/.opencode/commands/doc-squad.md +0 -65
  220. package/.opencode/commands/handoff.md +0 -137
  221. package/.opencode/commands/health.md +0 -49
  222. package/.opencode/commands/help-agents.md +0 -151
  223. package/.opencode/commands/help-commands.md +0 -32
  224. package/.opencode/commands/help-faq.md +0 -29
  225. package/.opencode/commands/help-plugins.md +0 -28
  226. package/.opencode/commands/help-skills.md +0 -7
  227. package/.opencode/commands/help-tools.md +0 -40
  228. package/.opencode/commands/help.md +0 -28
  229. package/.opencode/commands/hotfix-squad.md +0 -112
  230. package/.opencode/commands/integration-squad.md +0 -82
  231. package/.opencode/commands/janitor-squad.md +0 -167
  232. package/.opencode/commands/learn-auto.md +0 -120
  233. package/.opencode/commands/learn.md +0 -120
  234. package/.opencode/commands/mcp-list.md +0 -27
  235. package/.opencode/commands/onboard-squad.md +0 -140
  236. package/.opencode/commands/plan-workspace.md +0 -732
  237. package/.opencode/commands/prd.md +0 -131
  238. package/.opencode/commands/project-status.md +0 -82
  239. package/.opencode/commands/publish.md +0 -138
  240. package/.opencode/commands/recap.md +0 -69
  241. package/.opencode/commands/restore.md +0 -64
  242. package/.opencode/commands/review-squad.md +0 -152
  243. package/.opencode/commands/save.md +0 -24
  244. package/.opencode/commands/stats.md +0 -19
  245. package/.opencode/commands/swarm.md +0 -210
  246. package/.opencode/commands/tool-builder.md +0 -39
  247. package/.opencode/commands/ws-pull.md +0 -44
  248. package/.opencode/opencode.json +0 -21
  249. package/inbox/failures.log +0 -1
  250. package/inbox/usage.jsonl +0 -4
  251. package/scripts/postinstall.cjs +0 -64
  252. package/scripts/test-hal-tools.ts +0 -154
@@ -1,210 +0,0 @@
1
- ---
2
- description: Orchestrator-driven parallel swarm for large-scale tasks
3
- argument-hint: "description of what to do across many items"
4
- allowed-tools: Task, Bash, Read, Glob
5
- ---
6
-
7
- # Swarm
8
-
9
- Orchestrator-driven parallel execution: analyze the task, discover work items, pick agents, split into chunks, dispatch workers, aggregate results.
10
-
11
- **Goal:** $ARGUMENTS
12
-
13
- ## Protocol
14
-
15
- ### Step 1: Analyze the Task
16
-
17
- Read `$ARGUMENTS` and determine:
18
-
19
- - **What needs to be done?** (review, edit, check, migrate, update, clean up)
20
- - **What are the work items?** (files, activities, workflows, agents, skills, configs)
21
- - **What scope?** (explicit path/glob from user, or infer from task description)
22
-
23
- If the scope is unclear, use Glob or Bash to discover items:
24
-
25
- ```
26
- # Files
27
- Glob("src/**/*.ts")
28
- Glob(".claude/agents/*.md")
29
- Glob("workspace/*/fields.ts")
30
-
31
- # Activities (use Kenji to count/list)
32
- Task(subagent_type="agent-kenji-data-reader", prompt="Count and list activity IDs for [workflow]")
33
- ```
34
-
35
- If fewer than 5 items are discovered, **abort swarm** and suggest running a regular squad or single agent instead. Swarm is for scale.
36
-
37
- ### Step 2: Pick Agent(s)
38
-
39
- Based on the task type, select the right agent(s):
40
-
41
- | Task Type | Agent | Examples |
42
- |-----------|-------|---------|
43
- | Code review, security audit | **Svetlana** | "review for bugs", "security check", "find vulnerabilities" |
44
- | Dead code, unused imports, type errors | **Lars** | "find dead code", "check types", "unused imports" |
45
- | Small edits, string replacements, rule additions | **Simple Writer** | "add header to each file", "replace X with Y", "update rule" |
46
- | Code cleanup, simplification | **Code Simplifier** | "clean up", "simplify", "refactor for clarity" |
47
- | Config audit, structure validation | **Bjorn** | "check config", "validate structure", "audit settings" |
48
- | Data state checks, field validation | **Kenji** | "check all activities", "verify field values", "find missing data" |
49
- | Query patterns, data analysis | **Viktor** | "analyze patterns", "find anomalies across workflows" |
50
- | Activity updates, bulk mutations | **Dmitri** | "update all activities", "move to phase", "set field values" |
51
-
52
- **Multi-agent swarms:** If the task spans multiple domains, assign different agent types to different items. For example, "clean up the project" might use Lars for `.ts` files, Bjorn for config files, and Code Simplifier for app components.
53
-
54
- ### Step 3: Calculate Workers
55
-
56
- ```
57
- items_count = total discovered items
58
- items_per_worker = 10 (default)
59
- max_workers = 5
60
-
61
- worker_count = min(ceil(items_count / items_per_worker), max_workers)
62
- ```
63
-
64
- Split items into `worker_count` chunks. Try to keep chunks roughly equal size.
65
-
66
- For multi-agent swarms, group items by agent type first, then chunk within each type.
67
-
68
- ### Step 4: Dispatch Workers
69
-
70
- Launch all workers in parallel using multiple Task tool calls in a single message. All workers run in background (`run_in_background: true`).
71
-
72
- Each worker gets:
73
-
74
- ```
75
- Task(subagent_type="[selected-agent]",
76
- run_in_background: true,
77
- prompt="SWARM WORKER [N] of [TOTAL]
78
-
79
- TASK: [User's description from $ARGUMENTS]
80
-
81
- YOUR ITEMS ([count]):
82
- - [item 1]
83
- - [item 2]
84
- - [item 3]
85
- ...
86
-
87
- Process each item and report results in this format:
88
-
89
- RESULTS:
90
- - [item]: [status] - [details]
91
- - [item]: [status] - [details]
92
-
93
- SUMMARY:
94
- - Processed: [count]
95
- - Passed: [count]
96
- - Issues found: [count]
97
- - Failed: [count]")
98
- ```
99
-
100
- Tell the user:
101
- ```
102
- Launched [worker_count] workers across [items_count] items.
103
- Running in background - what else do you want to work on?
104
- ```
105
-
106
- ### Step 5: Collect Results
107
-
108
- When workers complete (check via Read on output files or TaskOutput), aggregate all results.
109
-
110
- If any worker failed or timed out:
111
- - Report which items were in the failed worker's batch
112
- - Offer to retry just those items
113
-
114
- ### Step 6: Report
115
-
116
- ```markdown
117
- ## Swarm Report
118
-
119
- ### Task
120
- [User's description]
121
-
122
- ### Execution
123
- - **Items:** [total count]
124
- - **Workers:** [worker count] x [agent type(s)]
125
- - **Duration:** [time from dispatch to last worker completion]
126
-
127
- ---
128
-
129
- ### Results by Worker
130
-
131
- #### Worker 1 ([agent type]) - [X items]
132
- - [item]: [status] - [details]
133
- - [item]: [status] - [details]
134
- ...
135
-
136
- #### Worker 2 ([agent type]) - [X items]
137
- ...
138
-
139
- ---
140
-
141
- ### Aggregate Summary
142
-
143
- | Status | Count |
144
- |--------|-------|
145
- | Passed / Clean | X |
146
- | Issues Found | X |
147
- | Failed / Error | X |
148
-
149
- ### Issues Found
150
- [Grouped and deduplicated list of all issues across all workers]
151
-
152
- 1. **[item]**: [issue description]
153
- 2. **[item]**: [issue description]
154
- ...
155
-
156
- ### Failed Items
157
- [If any workers failed, list their items for retry]
158
-
159
- ### Next Steps
160
- - [Suggested follow-up based on results]
161
- - [If issues found: suggest /hotfix-squad or Simple Writer to fix]
162
- - [If edits made: suggest /review-squad to verify]
163
- ```
164
-
165
- ## Options
166
-
167
- | Flag | Effect |
168
- |------|--------|
169
- | `--workers=N` | Override worker count (default: auto-calculated, max 5) |
170
- | `--dry-run` | Show what would be dispatched without actually running |
171
- | `--no-bg` | Run workers in foreground (wait for all to complete) |
172
-
173
- ## Examples
174
-
175
- ```
176
- # Review all source files for security
177
- /swarm "review all TypeScript files in src/ for security vulnerabilities"
178
- → Discovers 47 .ts files, spawns 5 Svetlana workers
179
-
180
- # Bulk edit agent files
181
- /swarm "add a '## Version History' section to every agent file"
182
- → Discovers 27 agent .md files, spawns 3 Simple Writer workers
183
-
184
- # Validate workspace configs
185
- /swarm "check all workflow field definitions for missing descriptions"
186
- → Discovers 12 fields.ts files, spawns 2 Kenji workers
187
-
188
- # Multi-agent cleanup
189
- /swarm "clean up the entire apps/ directory"
190
- → Discovers 34 files: 20 .tsx → Code Simplifier, 8 .ts → Lars, 6 configs → Bjorn
191
- → Spawns 5 workers across 3 agent types
192
-
193
- # Data validation
194
- /swarm "verify all Customer activities have a valid email field"
195
- → Kenji counts 200 customers, spawns 5 Kenji workers (40 each)
196
-
197
- # Dry run to preview
198
- /swarm "update all skills to use consistent headers" --dry-run
199
- → Shows: "Would dispatch 4 Simple Writer workers across 32 skill files"
200
- ```
201
-
202
- ## Notes
203
-
204
- - Minimum 5 items to trigger swarm (below that, use a regular agent)
205
- - Default max 5 workers to avoid overwhelming the system
206
- - Workers run in background by default so user can keep working
207
- - Multi-agent swarms naturally emerge from the orchestrator's routing logic
208
- - For write operations (Dmitri, Simple Writer), consider running --dry-run first
209
- - Swarm vs Squad: Swarm is raw parallel execution without quality gates. Workers operate independently. Squads have convergence, synthesis, and loops. Use swarm for bulk independent items, squads for coordinated workflows.
210
- - Swarm + squad can combine: `/swarm "review src/"` finds issues, then user can run `/hotfix-squad` on results. This is a manual handoff - user confirms.
@@ -1,39 +0,0 @@
1
- ---
2
- description: Activate tool-builder mode to implement a new MCP tool
3
- ---
4
-
5
- # Tool Builder Mode
6
-
7
- Loading `tool-builder` skill for MCP tool patterns...
8
-
9
- **What tool should I build?**
10
-
11
- Please provide:
12
-
13
- - **Tool Name**: `tool_name` (snake_case)
14
- - **Purpose**: What does it do?
15
- - **API Endpoint**: `v3.endpoint.method`
16
- - **Request Format**: `[arg1, arg2]`
17
- - **Response Format**: What the API returns
18
- - **Target File**: Which file in `src/mcp/tools/`?
19
- - **Tool Group**: READ | WRITE | PLAYGROUND
20
-
21
- ---
22
-
23
- **Example:**
24
- ```
25
- Tool Name: list_insights
26
- Purpose: List all insights in workspace
27
- API Endpoint: v3.insight.list
28
- Request: [workspaceId]
29
- Response: { insights: [{_id, name, query, sources}] }
30
- Target File: insight.ts
31
- Tool Group: PLAYGROUND
32
- ```
33
-
34
- I'll:
35
- 1. Load tool-builder skill
36
- 2. Read existing patterns in target file
37
- 3. Implement the tool
38
- 4. Register in src/app.ts
39
- 5. Report what was created
@@ -1,44 +0,0 @@
1
- ---
2
- description: Pull workspace configuration from Hailer (READ-ONLY)
3
- ---
4
-
5
- Pull the current workspace configuration from Hailer and save it locally.
6
-
7
- **What this does:**
8
- - Downloads workflows, insights, teams, groups, and phases from Hailer workspace
9
- - Saves configuration as JSON files to the `WORKSPACE_CONFIG_PATH` directory
10
- - READ-ONLY operation - does not modify anything on Hailer
11
- - Safe to run anytime
12
-
13
- **Requirements:**
14
- - Must have `WORKSPACE_CONFIG_PATH` set in `.env.local`
15
- - Hailer credentials must be configured
16
-
17
- **Instructions for Claude:**
18
-
19
- 1. Read `.env.local` file to get `WORKSPACE_CONFIG_PATH`
20
- 2. Run: `cd "$WORKSPACE_CONFIG_PATH" && npm run pull`
21
- 3. **AUTOMATICALLY read the generated files to load context:**
22
- - Read `workspace/enums.ts` (complete file - contains ALL field and phase IDs)
23
- - List `workspace/` directory to see all workflow folders
24
- - Read 1-2 example workflow configs (main.ts, fields.ts, phases.ts) to understand structure
25
- 4. Provide summary of what workflows were pulled and confirm context is loaded
26
-
27
- **What gets downloaded:**
28
- - `workspace/enums.ts` - Type-safe field and phase ID enums for ALL workflows
29
- - `workspace/workflows.ts` - Main workflows export
30
- - `workspace/insights.ts` - SQL insight definitions
31
- - `workspace/teams.ts` - Team structures
32
- - `workspace/groups.ts` - User groups
33
- - `workspace/<workflow_name>/` - Individual workflow configs (main.ts, fields.ts, phases.ts)
34
-
35
- **Why automatic reading matters:**
36
- - Loads all field/phase IDs into conversation context immediately
37
- - Enables local-first strategy without manual file reads
38
- - Saves 75% of API calls and hundreds of tokens on subsequent operations
39
- - You'll know the workspace structure instantly
40
-
41
- **Common use cases:**
42
- - Backup current workspace configuration
43
- - Review workflow structures locally
44
- - Prepare for making configuration changes
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "permission": {
4
- "bash": {
5
- "*": "ask",
6
- "rm -rf *": "deny",
7
- "rm -r *": "deny"
8
- },
9
- "doom_loop": "ask",
10
- "read": {
11
- "*": "allow",
12
- "*.env": "deny",
13
- "*.env.*": "deny",
14
- "*.env.example": "allow"
15
- },
16
- "edit": "ask",
17
- "external_directory": "ask",
18
- "webfetch": "ask",
19
- "websearch": "ask"
20
- }
21
- }
@@ -1 +0,0 @@
1
- [2026-02-16T05:32:29.204Z] agent-giuseppe-app-builder | skill | hailer-mcp | \"Field '{fieldLabel}' expects Unix ms timestamp (number), got: '{value}'. Convert the date to milliseconds first.\"\n```\n\n**Important:**\n- Read th
package/inbox/usage.jsonl DELETED
@@ -1,4 +0,0 @@
1
- {"ts":"2026-02-13T08:23:26.264Z","agent":"general-purpose","status":"unknown","project":"hailer-mcp","description":"Convert new agents to OpenCode"}
2
- {"ts":"2026-02-16T05:26:20.980Z","agent":"agent-svetlana-code-review","status":"unknown","project":"hailer-mcp","description":"Check bot date handling code"}
3
- {"ts":"2026-02-16T05:32:29.203Z","agent":"agent-giuseppe-app-builder","status":"error","project":"hailer-mcp","description":"Add date validation to bot+tools"}
4
- {"ts":"2026-02-24T12:50:03.634Z","agent":"agent-gunther-mcp-tools","status":"unknown","project":"hailer-mcp","description":"Find removed MCP tools"}
@@ -1,64 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * postinstall: Copies .claude/ (agents, skills, hooks) to the project root.
4
- * Runs automatically after `npm install @hailer/mcp`.
5
- * Skips when installing in the hailer-mcp repo itself (development).
6
- */
7
- const fs = require('fs');
8
- const path = require('path');
9
-
10
- // Find the project root by walking up from node_modules/@hailer/mcp/
11
- function findProjectRoot() {
12
- let dir = __dirname;
13
- // Walk up until we find a package.json that isn't ours
14
- for (let i = 0; i < 10; i++) {
15
- dir = path.dirname(dir);
16
- const pkgPath = path.join(dir, 'package.json');
17
- if (fs.existsSync(pkgPath)) {
18
- try {
19
- const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
20
- // Skip if this is our own package.json
21
- if (pkg.name === '@hailer/mcp') continue;
22
- return dir;
23
- } catch { continue; }
24
- }
25
- }
26
- return null;
27
- }
28
-
29
- function copyDir(src, dest) {
30
- if (!fs.existsSync(src)) return;
31
- fs.mkdirSync(dest, { recursive: true });
32
-
33
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
34
- const srcPath = path.join(src, entry.name);
35
- const destPath = path.join(dest, entry.name);
36
-
37
- if (entry.isDirectory()) {
38
- copyDir(srcPath, destPath);
39
- } else {
40
- // Don't overwrite user's local settings
41
- if (entry.name === 'settings.local.json' && fs.existsSync(destPath)) continue;
42
- fs.copyFileSync(srcPath, destPath);
43
- }
44
- }
45
- }
46
-
47
- const projectRoot = findProjectRoot();
48
-
49
- // Skip if we can't find a project root or if running in dev (our own repo)
50
- if (!projectRoot) {
51
- console.log('@hailer/mcp: skipping agent install (no project root found)');
52
- process.exit(0);
53
- }
54
-
55
- const src = path.join(__dirname, '..', '.claude');
56
- const dest = path.join(projectRoot, '.claude');
57
-
58
- if (!fs.existsSync(src)) {
59
- console.log('@hailer/mcp: no .claude/ directory in package, skipping');
60
- process.exit(0);
61
- }
62
-
63
- copyDir(src, dest);
64
- console.log(`@hailer/mcp: agents installed to ${dest}`);
@@ -1,154 +0,0 @@
1
- #!/usr/bin/env npx ts-node
2
- /**
3
- * HAL Tools Test - Simple version
4
- * Just calls each tool and shows the result. No magic.
5
- */
6
-
7
- import * as dotenv from 'dotenv';
8
- import * as path from 'path';
9
-
10
- dotenv.config({ path: path.join(__dirname, '..', '.env.local') });
11
-
12
- const MCP_URL = process.env.MCP_SERVER_URL || 'http://localhost:3030/api/mcp';
13
-
14
- async function call(apiKey: string, tool: string, args: Record<string, unknown> = {}) {
15
- console.log(`\n>>> ${tool}`);
16
- console.log(` args: ${JSON.stringify(args)}`);
17
-
18
- const res = await fetch(`${MCP_URL}?apiKey=${apiKey}`, {
19
- method: 'POST',
20
- headers: { 'Content-Type': 'application/json' },
21
- body: JSON.stringify({
22
- jsonrpc: '2.0',
23
- id: '1',
24
- method: 'tools/call',
25
- params: { name: tool, arguments: args },
26
- }),
27
- });
28
-
29
- const text = await res.text();
30
- for (const line of text.split('\n')) {
31
- if (line.startsWith('data: ')) {
32
- const data = JSON.parse(line.substring(6));
33
- if (data.error) {
34
- console.log(`<<< ERROR: ${data.error.message}`);
35
- return { error: true, data: null };
36
- }
37
- const content = data.result?.content?.[0]?.text || '';
38
- // Show first 500 chars
39
- console.log(`<<< ${content.substring(0, 500)}${content.length > 500 ? '...' : ''}`);
40
- return { error: false, content };
41
- }
42
- }
43
- console.log('<<< NO RESPONSE');
44
- return { error: true, data: null };
45
- }
46
-
47
- async function main() {
48
- const apiKey = process.env.MCP_CLIENT_API_KEY;
49
- if (!apiKey) {
50
- console.error('Set MCP_CLIENT_API_KEY in .env.local');
51
- process.exit(1);
52
- }
53
-
54
- console.log('=== HAL TOOLS TEST ===\n');
55
-
56
- // Get a workflow to work with
57
- const wf = await call(apiKey, 'list_workflows_minimal', {});
58
- const wfMatch = wf.content?.match(/`([a-f0-9]{24})`/);
59
- const workflowId = wfMatch?.[1];
60
- console.log(`\n[Using workflowId: ${workflowId}]`);
61
-
62
- if (!workflowId) {
63
- console.log('No workflow found, stopping');
64
- process.exit(1);
65
- }
66
-
67
- // Get phase
68
- const ph = await call(apiKey, 'list_workflow_phases', { workflowId });
69
- const phMatch = ph.content?.match(/`([a-f0-9]{24})`/);
70
- const phaseId = phMatch?.[1];
71
- console.log(`\n[Using phaseId: ${phaseId}]`);
72
-
73
- // Schema
74
- await call(apiKey, 'get_workflow_schema', { workflowId, phaseId });
75
-
76
- // List activities
77
- await call(apiKey, 'list_activities', { workflowId, phaseId, fields: '[]' });
78
-
79
- // Count
80
- await call(apiKey, 'count_activities', { workflowId });
81
-
82
- // Create activity
83
- const created = await call(apiKey, 'create_activity', {
84
- workflowId,
85
- name: `TEST_${Date.now()}`
86
- });
87
- const actMatch = created.content?.match(/\*\*ID\*\*:\s*([a-f0-9]{24})/);
88
- const activityId = actMatch?.[1];
89
- console.log(`\n[Created activityId: ${activityId}]`);
90
-
91
- if (activityId) {
92
- // Show it
93
- await call(apiKey, 'show_activity_by_id', { activityId });
94
-
95
- // Update it
96
- await call(apiKey, 'update_activity', { activityId, name: `UPDATED_${Date.now()}` });
97
-
98
- // Delete it (this tool doesn't exist yet)
99
- await call(apiKey, 'delete_activity', { activityId });
100
- }
101
-
102
- // Insights
103
- await call(apiKey, 'list_insights', {});
104
-
105
- const sources = [{
106
- name: 'src',
107
- workflowId,
108
- fields: [{ meta: 'name', name: 'Name', as: 'name' }]
109
- }];
110
-
111
- await call(apiKey, 'preview_insight', { sources, query: 'SELECT * FROM src LIMIT 3' });
112
-
113
- const ins = await call(apiKey, 'create_insight', {
114
- name: `TEST_${Date.now()}`,
115
- sources,
116
- query: 'SELECT * FROM src LIMIT 3'
117
- });
118
- const insMatch = ins.content?.match(/`([a-f0-9]{24})`/);
119
- const insightId = insMatch?.[1];
120
-
121
- if (insightId) {
122
- await call(apiKey, 'get_insight_data', { insightId });
123
- await call(apiKey, 'remove_insight', { insightId });
124
- }
125
-
126
- // Discussions
127
- await call(apiKey, 'list_my_discussions', {});
128
-
129
- if (activityId) {
130
- await call(apiKey, 'join_discussion', { activityId });
131
- // Get discussion from activity
132
- const act = await call(apiKey, 'show_activity_by_id', { activityId });
133
- const discMatch = act.content?.match(/discussion.*?([a-f0-9]{24})/i);
134
- const discussionId = discMatch?.[1];
135
-
136
- if (discussionId) {
137
- await call(apiKey, 'fetch_discussion_messages', { discussionId });
138
- await call(apiKey, 'add_discussion_message', { discussionId, content: 'TEST' });
139
- await call(apiKey, 'get_activity_from_discussion', { discussionId });
140
- await call(apiKey, 'leave_discussion', { discussionId });
141
- }
142
- }
143
-
144
- // Other
145
- await call(apiKey, 'list_workflows', {});
146
- await call(apiKey, 'list_apps', {});
147
- await call(apiKey, 'list_templates', {});
148
- await call(apiKey, 'get_workspace_balance', {});
149
- await call(apiKey, 'search_workspace_users', { query: 'test' });
150
-
151
- console.log('\n=== DONE ===');
152
- }
153
-
154
- main().catch(console.error);