@hailer/mcp 1.0.28 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.claude/.session-checked +1 -0
  2. package/.claude/agents/agent-ada-skill-builder.md +10 -2
  3. package/.claude/agents/agent-alejandro-function-fields.md +104 -37
  4. package/.claude/agents/agent-bjorn-config-audit.md +41 -21
  5. package/.claude/agents/agent-builder-agent-creator.md +13 -3
  6. package/.claude/agents/agent-code-simplifier.md +53 -0
  7. package/.claude/agents/agent-dmitri-activity-crud.md +126 -11
  8. package/.claude/agents/agent-giuseppe-app-builder.md +212 -22
  9. package/.claude/agents/agent-gunther-mcp-tools.md +7 -36
  10. package/.claude/agents/agent-helga-workflow-config.md +75 -10
  11. package/.claude/agents/agent-igor-activity-mover-automation.md +125 -0
  12. package/.claude/agents/agent-ingrid-doc-templates.md +164 -36
  13. package/.claude/agents/agent-ivan-monolith.md +154 -0
  14. package/.claude/agents/agent-kenji-data-reader.md +15 -8
  15. package/.claude/agents/agent-lars-code-inspector.md +56 -8
  16. package/.claude/agents/agent-marco-mockup-builder.md +110 -0
  17. package/.claude/agents/agent-marcus-api-documenter.md +323 -0
  18. package/.claude/agents/agent-marketplace-publisher.md +232 -72
  19. package/.claude/agents/agent-marketplace-reviewer.md +255 -79
  20. package/.claude/agents/agent-permissions-handler.md +208 -0
  21. package/.claude/agents/agent-simple-writer.md +48 -0
  22. package/.claude/agents/agent-svetlana-code-review.md +127 -14
  23. package/.claude/agents/agent-tanya-test-runner.md +333 -0
  24. package/.claude/agents/agent-ui-designer.md +100 -0
  25. package/.claude/agents/agent-viktor-sql-insights.md +19 -6
  26. package/.claude/agents/agent-web-search.md +55 -0
  27. package/.claude/agents/agent-yevgeni-discussions.md +7 -1
  28. package/.claude/agents/agent-zara-zapier.md +159 -0
  29. package/.claude/commands/app-squad.md +135 -0
  30. package/.claude/commands/audit-squad.md +158 -0
  31. package/.claude/commands/autoplan.md +563 -0
  32. package/.claude/commands/cleanup-squad.md +98 -0
  33. package/.claude/commands/config-squad.md +106 -0
  34. package/.claude/commands/crud-squad.md +87 -0
  35. package/.claude/commands/data-squad.md +97 -0
  36. package/.claude/commands/debug-squad.md +303 -0
  37. package/.claude/commands/doc-squad.md +65 -0
  38. package/.claude/commands/handoff.md +137 -0
  39. package/.claude/commands/health.md +49 -0
  40. package/.claude/commands/help.md +2 -1
  41. package/.claude/commands/help:agents.md +96 -16
  42. package/.claude/commands/help:commands.md +55 -11
  43. package/.claude/commands/help:faq.md +16 -1
  44. package/.claude/commands/help:skills.md +93 -0
  45. package/.claude/commands/hotfix-squad.md +112 -0
  46. package/.claude/commands/integration-squad.md +82 -0
  47. package/.claude/commands/janitor-squad.md +167 -0
  48. package/.claude/commands/learn-auto.md +120 -0
  49. package/.claude/commands/learn.md +120 -0
  50. package/.claude/commands/mcp-list.md +27 -0
  51. package/.claude/commands/onboard-squad.md +140 -0
  52. package/.claude/commands/plan-workspace.md +732 -0
  53. package/.claude/commands/prd.md +131 -0
  54. package/.claude/commands/project-status.md +82 -0
  55. package/.claude/commands/publish.md +138 -0
  56. package/.claude/commands/recap.md +69 -0
  57. package/.claude/commands/restore.md +64 -0
  58. package/.claude/commands/review-squad.md +152 -0
  59. package/.claude/commands/save.md +24 -0
  60. package/.claude/commands/stats.md +19 -0
  61. package/.claude/commands/swarm.md +210 -0
  62. package/.claude/commands/tool-builder.md +3 -1
  63. package/.claude/commands/ws-pull.md +1 -1
  64. package/.claude/commands/yolo-off.md +17 -0
  65. package/.claude/commands/yolo.md +82 -0
  66. package/.claude/hooks/_shared-memory.cjs +305 -0
  67. package/.claude/hooks/_utils.cjs +134 -0
  68. package/.claude/hooks/agent-failure-detector.cjs +164 -79
  69. package/.claude/hooks/agent-usage-logger.cjs +204 -0
  70. package/.claude/hooks/app-edit-guard.cjs +20 -4
  71. package/.claude/hooks/auto-learn.cjs +316 -0
  72. package/.claude/hooks/bash-guard.cjs +282 -0
  73. package/.claude/hooks/builder-mode-manager.cjs +183 -54
  74. package/.claude/hooks/bulk-activity-guard.cjs +283 -0
  75. package/.claude/hooks/context-watchdog.cjs +292 -0
  76. package/.claude/hooks/delegation-reminder.cjs +478 -0
  77. package/.claude/hooks/design-system-lint.cjs +283 -0
  78. package/.claude/hooks/post-scaffold-hook.cjs +16 -3
  79. package/.claude/hooks/prompt-guard.cjs +366 -0
  80. package/.claude/hooks/publish-template-guard.cjs +16 -0
  81. package/.claude/hooks/session-start.cjs +35 -0
  82. package/.claude/hooks/shared-memory-writer.cjs +147 -0
  83. package/.claude/hooks/skill-injector.cjs +140 -0
  84. package/.claude/hooks/skill-usage-logger.cjs +258 -0
  85. package/.claude/hooks/src-edit-guard.cjs +16 -1
  86. package/.claude/hooks/sync-marketplace-agents.cjs +53 -8
  87. package/.claude/scripts/yolo-toggle.cjs +142 -0
  88. package/.claude/settings.json +141 -14
  89. package/.claude/skills/SDK-activity-patterns/SKILL.md +428 -0
  90. package/.claude/skills/SDK-document-templates/SKILL.md +1033 -0
  91. package/.claude/skills/SDK-function-fields/SKILL.md +542 -0
  92. package/.claude/skills/SDK-generate-skill/SKILL.md +92 -0
  93. package/.claude/skills/SDK-init-skill/SKILL.md +127 -0
  94. package/.claude/skills/SDK-insight-queries/SKILL.md +787 -0
  95. package/.claude/skills/SDK-ws-config-skill/SKILL.md +1139 -0
  96. package/.claude/skills/agent-structure/SKILL.md +98 -0
  97. package/.claude/skills/api-documentation-patterns/SKILL.md +474 -0
  98. package/.claude/skills/chrome-mcp-reference/SKILL.md +370 -0
  99. package/.claude/skills/delegation-routing/SKILL.md +202 -0
  100. package/.claude/skills/frontend-design/SKILL.md +254 -0
  101. package/.claude/skills/hailer-activity-mover/SKILL.md +213 -0
  102. package/.claude/skills/hailer-api-client/SKILL.md +518 -0
  103. package/.claude/skills/hailer-app-builder/SKILL.md +939 -11
  104. package/.claude/skills/hailer-apps-pictures/SKILL.md +269 -0
  105. package/.claude/skills/hailer-design-system/SKILL.md +235 -0
  106. package/.claude/skills/hailer-monolith-automations/SKILL.md +686 -0
  107. package/.claude/skills/hailer-permissions-system/SKILL.md +121 -0
  108. package/.claude/skills/hailer-project-protocol/SKILL.md +488 -0
  109. package/.claude/skills/hailer-rest-api/SKILL.md +61 -0
  110. package/.claude/skills/hailer-rest-api/hailer-activities.md +184 -0
  111. package/.claude/skills/hailer-rest-api/hailer-admin.md +473 -0
  112. package/.claude/skills/hailer-rest-api/hailer-calendar.md +256 -0
  113. package/.claude/skills/hailer-rest-api/hailer-feed.md +249 -0
  114. package/.claude/skills/hailer-rest-api/hailer-insights.md +195 -0
  115. package/.claude/skills/hailer-rest-api/hailer-messaging.md +276 -0
  116. package/.claude/skills/hailer-rest-api/hailer-workflows.md +283 -0
  117. package/.claude/skills/insight-join-patterns/SKILL.md +3 -0
  118. package/.claude/skills/integration-patterns/SKILL.md +421 -0
  119. package/.claude/skills/json-only-output/SKILL.md +52 -12
  120. package/.claude/skills/lsp-setup/SKILL.md +160 -0
  121. package/.claude/skills/mcp-direct-tools/SKILL.md +153 -0
  122. package/.claude/skills/optional-parameters/SKILL.md +32 -23
  123. package/.claude/skills/publish-hailer-app/SKILL.md +76 -12
  124. package/.claude/skills/testing-patterns/SKILL.md +630 -0
  125. package/.claude/skills/tool-builder/SKILL.md +250 -0
  126. package/.claude/skills/tool-parameter-usage/SKILL.md +59 -45
  127. package/.claude/skills/tool-response-verification/SKILL.md +82 -48
  128. package/.claude/skills/zapier-hailer-patterns/SKILL.md +581 -0
  129. package/.env.example +26 -7
  130. package/CLAUDE.md +290 -224
  131. package/dist/CLAUDE.md +370 -0
  132. package/dist/app.d.ts +1 -1
  133. package/dist/app.js +101 -101
  134. package/dist/bot/bot-config.d.ts +26 -0
  135. package/dist/bot/bot-config.js +135 -0
  136. package/dist/bot/bot-manager.d.ts +40 -0
  137. package/dist/bot/bot-manager.js +137 -0
  138. package/dist/bot/bot.d.ts +127 -0
  139. package/dist/bot/bot.js +1328 -0
  140. package/dist/bot/operation-logger.d.ts +28 -0
  141. package/dist/bot/operation-logger.js +132 -0
  142. package/dist/bot/services/conversation-manager.d.ts +60 -0
  143. package/dist/bot/services/conversation-manager.js +246 -0
  144. package/dist/bot/services/index.d.ts +9 -0
  145. package/dist/bot/services/index.js +18 -0
  146. package/dist/bot/services/message-classifier.d.ts +42 -0
  147. package/dist/bot/services/message-classifier.js +228 -0
  148. package/dist/bot/services/message-formatter.d.ts +88 -0
  149. package/dist/bot/services/message-formatter.js +411 -0
  150. package/dist/bot/services/session-logger.d.ts +162 -0
  151. package/dist/bot/services/session-logger.js +724 -0
  152. package/dist/bot/services/token-billing.d.ts +78 -0
  153. package/dist/bot/services/token-billing.js +233 -0
  154. package/dist/bot/services/types.d.ts +169 -0
  155. package/dist/bot/services/types.js +12 -0
  156. package/dist/bot/services/typing-indicator.d.ts +23 -0
  157. package/dist/bot/services/typing-indicator.js +60 -0
  158. package/dist/bot/services/workspace-schema-cache.d.ts +122 -0
  159. package/dist/bot/services/workspace-schema-cache.js +506 -0
  160. package/dist/bot/tool-executor.d.ts +28 -0
  161. package/dist/bot/tool-executor.js +48 -0
  162. package/dist/bot/workspace-overview.d.ts +12 -0
  163. package/dist/bot/workspace-overview.js +94 -0
  164. package/dist/cli.d.ts +1 -8
  165. package/dist/cli.js +1 -249
  166. package/dist/config.d.ts +96 -3
  167. package/dist/config.js +148 -37
  168. package/dist/core.d.ts +5 -0
  169. package/dist/core.js +61 -8
  170. package/dist/lib/discussion-lock.d.ts +42 -0
  171. package/dist/lib/discussion-lock.js +110 -0
  172. package/dist/lib/logger.d.ts +0 -1
  173. package/dist/lib/logger.js +39 -23
  174. package/dist/lib/request-logger.d.ts +77 -0
  175. package/dist/lib/request-logger.js +147 -0
  176. package/dist/mcp/UserContextCache.js +16 -13
  177. package/dist/mcp/hailer-clients.js +18 -17
  178. package/dist/mcp/signal-handler.js +29 -13
  179. package/dist/mcp/tool-registry.d.ts +4 -15
  180. package/dist/mcp/tool-registry.js +94 -32
  181. package/dist/mcp/tools/activity.js +28 -69
  182. package/dist/mcp/tools/app-core.js +9 -4
  183. package/dist/mcp/tools/app-marketplace.js +22 -12
  184. package/dist/mcp/tools/app-member.js +5 -2
  185. package/dist/mcp/tools/app-scaffold.js +32 -18
  186. package/dist/mcp/tools/bot-config/constants.d.ts +23 -0
  187. package/dist/mcp/tools/bot-config/constants.js +94 -0
  188. package/dist/mcp/tools/bot-config/core.d.ts +253 -0
  189. package/dist/mcp/tools/bot-config/core.js +2456 -0
  190. package/dist/mcp/tools/bot-config/index.d.ts +10 -0
  191. package/dist/mcp/tools/bot-config/index.js +59 -0
  192. package/dist/mcp/tools/bot-config/tools.d.ts +7 -0
  193. package/dist/mcp/tools/bot-config/tools.js +15 -0
  194. package/dist/mcp/tools/bot-config/types.d.ts +50 -0
  195. package/dist/mcp/tools/bot-config/types.js +6 -0
  196. package/dist/mcp/tools/discussion.js +107 -77
  197. package/dist/mcp/tools/document.d.ts +11 -0
  198. package/dist/mcp/tools/document.js +741 -0
  199. package/dist/mcp/tools/file.js +5 -2
  200. package/dist/mcp/tools/insight.js +36 -12
  201. package/dist/mcp/tools/investigate.d.ts +9 -0
  202. package/dist/mcp/tools/investigate.js +254 -0
  203. package/dist/mcp/tools/user.d.ts +2 -4
  204. package/dist/mcp/tools/user.js +9 -50
  205. package/dist/mcp/tools/workflow.d.ts +1 -0
  206. package/dist/mcp/tools/workflow.js +164 -52
  207. package/dist/mcp/utils/hailer-api-client.js +26 -17
  208. package/dist/mcp/webhook-handler.d.ts +64 -3
  209. package/dist/mcp/webhook-handler.js +219 -9
  210. package/dist/mcp-server.d.ts +4 -0
  211. package/dist/mcp-server.js +237 -25
  212. package/dist/plugins/bug-fixer/index.d.ts +2 -0
  213. package/dist/plugins/bug-fixer/index.js +18 -0
  214. package/dist/plugins/bug-fixer/tools.d.ts +45 -0
  215. package/dist/plugins/bug-fixer/tools.js +1096 -0
  216. package/package.json +10 -10
  217. package/scripts/test-hal-tools.ts +154 -0
  218. package/.claude/agents/agent-nora-name-functions.md +0 -123
  219. package/.claude/assistant-knowledge.md +0 -23
  220. package/.claude/commands/install-plugin.md +0 -261
  221. package/.claude/commands/list-plugins.md +0 -42
  222. package/.claude/commands/marketplace-setup.md +0 -33
  223. package/.claude/commands/publish-plugin.md +0 -55
  224. package/.claude/commands/uninstall-plugin.md +0 -87
  225. package/.claude/hooks/interactive-mode.cjs +0 -87
  226. package/.claude/hooks/mcp-server-guard.cjs +0 -108
  227. package/.claude/skills/marketplace-publishing.md +0 -155
  228. package/dist/bot/chat-bot.d.ts +0 -31
  229. package/dist/bot/chat-bot.js +0 -357
  230. package/dist/mcp/tools/metrics.d.ts +0 -13
  231. package/dist/mcp/tools/metrics.js +0 -546
  232. package/dist/stdio-server.d.ts +0 -14
  233. package/dist/stdio-server.js +0 -114
@@ -1,33 +0,0 @@
1
- ---
2
- description: Clone or pull the Hailer marketplace repo
3
- ---
4
-
5
- # Marketplace Setup
6
-
7
- Clone if missing, pull if exists. Always uses project root directory.
8
-
9
- ## Execution
10
-
11
- ```bash
12
- # Get project root (where CLAUDE.md is)
13
- PROJECT_ROOT="$(pwd)"
14
-
15
- # Marketplace path is always relative to project root
16
- MARKETPLACE_PATH="$PROJECT_ROOT/hailer-marketplace"
17
-
18
- echo "Project root: $PROJECT_ROOT"
19
- echo "Marketplace path: $MARKETPLACE_PATH"
20
-
21
- if [ -d "$MARKETPLACE_PATH/.git" ]; then
22
- cd "$MARKETPLACE_PATH" && git pull origin main
23
- echo "Pulled latest"
24
- else
25
- git clone git@github.com:Bdolf/Hailer-Marketplace.git "$MARKETPLACE_PATH"
26
- echo "Cloned marketplace to $MARKETPLACE_PATH"
27
- fi
28
- ```
29
-
30
- ## Important
31
-
32
- The marketplace is always cloned to `./hailer-marketplace` in the project root.
33
- Commands should use absolute paths when working with the marketplace.
@@ -1,55 +0,0 @@
1
- ---
2
- description: Publish a plugin to the Hailer marketplace with pre-validation
3
- ---
4
-
5
- # Publish Plugin to Marketplace
6
-
7
- ## Usage
8
-
9
- ```
10
- /publish-plugin <name>
11
- /publish-plugin <source-path>
12
- ```
13
-
14
- ## Execution
15
-
16
- **Spawn the publisher agent** with the plugin info:
17
-
18
- ```
19
- Task(
20
- subagent_type="agent-marketplace-publisher",
21
- prompt={
22
- "task": "publish",
23
- "plugin": {
24
- "name": "<plugin-name>",
25
- "type": "agent|skill|hook",
26
- "source_path": "<path-to-source-file>",
27
- "description": "<description>",
28
- "author": "<author>"
29
- }
30
- }
31
- )
32
- ```
33
-
34
- ## Argument Handling
35
-
36
- If argument is a **path** (contains `/` or `.md`):
37
- - `source_path`: use argument directly
38
- - `name`: extract from filename (e.g., `agent-my-agent.md` → `my-agent`)
39
- - `type`: detect from path (`/agents/` → agent, `/skills/` → skill)
40
-
41
- If argument is a **name**:
42
- - Look for `.claude/agents/agent-{name}.md`
43
- - Or ask user for source path
44
-
45
- ## Flow
46
-
47
- 1. Orchestrator spawns `agent-marketplace-publisher`
48
- 2. Publisher checks if plugin exists, suggests version
49
- 3. Publisher returns `needs_confirmation` with version suggestion
50
- 4. User confirms version
51
- 5. Publisher creates branch, commits, pushes
52
- 6. Publisher returns `trigger_review`
53
- 7. Orchestrator spawns `agent-marketplace-reviewer`
54
- 8. Reviewer validates and merges to main
55
- 9. Done - plugin published
@@ -1,87 +0,0 @@
1
- ---
2
- description: Uninstall a plugin from .claude/ folder
3
- ---
4
-
5
- # Uninstall Plugin
6
-
7
- Removes plugin files from project's `.claude/` folder and updates CLAUDE.md.
8
-
9
- ## Usage
10
-
11
- ```
12
- /uninstall-plugin <plugin-name>
13
- ```
14
-
15
- ## Execution Script
16
-
17
- ```bash
18
- #!/bin/bash
19
-
20
- PLUGIN_NAME="$1"
21
- TARGET_CLAUDE=".claude"
22
-
23
- if [ -z "$PLUGIN_NAME" ]; then
24
- echo "Currently installed plugins:"
25
- ls -1 "$TARGET_CLAUDE/agents/"agent-*.md 2>/dev/null | xargs -I{} basename {} .md | sed 's/^agent-//' | sort -u
26
- exit 0
27
- fi
28
-
29
- # Remove agents matching plugin name
30
- REMOVED=0
31
- for f in "$TARGET_CLAUDE/agents/agent-$PLUGIN_NAME"*.md; do
32
- if [ -f "$f" ]; then
33
- rm -v "$f"
34
- REMOVED=$((REMOVED + 1))
35
- fi
36
- done
37
-
38
- # Remove skills matching plugin name
39
- if [ -d "$TARGET_CLAUDE/skills/$PLUGIN_NAME" ]; then
40
- rm -rv "$TARGET_CLAUDE/skills/$PLUGIN_NAME"
41
- REMOVED=$((REMOVED + 1))
42
- fi
43
-
44
- # Remove hooks matching plugin name
45
- find "$TARGET_CLAUDE/hooks" -name "${PLUGIN_NAME}*.cjs" -exec rm -v {} \; 2>/dev/null && REMOVED=$((REMOVED + 1))
46
-
47
- if [ $REMOVED -eq 0 ]; then
48
- echo "No files found for plugin '$PLUGIN_NAME'"
49
- exit 1
50
- fi
51
-
52
- echo "Files removed. Updating CLAUDE.md..."
53
- ```
54
-
55
- ## Update CLAUDE.md (Node.js)
56
-
57
- Run after file removal to remove agent from the main `<agents>` table:
58
-
59
- ```bash
60
- node << EOF
61
- const fs = require("fs");
62
-
63
- const PLUGIN_NAME = "$PLUGIN_NAME";
64
- const CLAUDE_MD = "CLAUDE.md";
65
-
66
- let content = fs.readFileSync(CLAUDE_MD, "utf-8");
67
-
68
- // Remove lines containing this agent from the <agents> table
69
- // Match: | ... | \`agent-PLUGIN_NAME...\` | ... |
70
- const pattern = new RegExp("^\\\\|.*\\\`agent-" + PLUGIN_NAME + "[^\\\`]*\\\`.*\\\\|$\\\\n?", "gm");
71
- const newContent = content.replace(pattern, "");
72
-
73
- if (newContent !== content) {
74
- fs.writeFileSync(CLAUDE_MD, newContent);
75
- console.log("Removed agent-" + PLUGIN_NAME + " from <agents> table");
76
- } else {
77
- console.log("agent-" + PLUGIN_NAME + " not found in <agents> table");
78
- }
79
- EOF
80
- ```
81
-
82
- ## Full Command
83
-
84
- Run both scripts in sequence, then:
85
- ```
86
- echo "Plugin uninstalled. Restart Claude Code: claude -c"
87
- ```
@@ -1,87 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * <hook-name>interactive-mode</hook-name>
4
- *
5
- * <purpose>
6
- * Encourages Claude to ask clarifying questions before complex tasks.
7
- * Injects context-aware question suggestions based on task type.
8
- * </purpose>
9
- *
10
- * <triggers>
11
- * - UserPromptSubmit (every user message)
12
- * - Only outputs when task patterns are detected
13
- * </triggers>
14
- *
15
- * <task-patterns>
16
- * - app: build/create/make app → UI, layout, actions questions
17
- * - insight: create insight/report → metrics, workflows, filters questions
18
- * - data: import/create activities → workflow, fields, count questions
19
- * - schema: add field/workflow/phase → type, required, defaults questions
20
- * - update: update/change/modify → records, values, confirmation questions
21
- * </task-patterns>
22
- *
23
- * <behavior>
24
- * 1. Matches user prompt against task patterns
25
- * 2. If match, outputs <interactive-mode> block to stderr
26
- * 3. Suggests relevant questions for Claude to ask
27
- * 4. Recommends AskUserQuestion tool usage
28
- * </behavior>
29
- *
30
- * <output-format>
31
- * Outputs to stdout (appears as system reminder to Claude)
32
- * </output-format>
33
- */
34
-
35
- // Read hook input from stdin
36
- let input = '';
37
- process.stdin.setEncoding('utf8');
38
- process.stdin.on('data', chunk => input += chunk);
39
- process.stdin.on('end', () => {
40
- try {
41
- const data = JSON.parse(input);
42
- processHook(data);
43
- } catch {
44
- process.exit(0);
45
- }
46
- });
47
-
48
- function processHook(data) {
49
- const { prompt } = data;
50
-
51
- if (!prompt) {
52
- process.exit(0);
53
- }
54
-
55
- // Detect task types that benefit from questions
56
- // Order matters - more specific patterns first
57
- const taskPatterns = [
58
- { pattern: /publish.*market|market.*publish|update.*market|market.*update|market.*icon|market.*listing/i, type: 'marketplace-publish', questions: ['New listing or update existing? (need productId for update)', 'Metadata only or new version with code?', 'Do you have an icon? (must upload with isPublic: true)'], skill: 'marketplace-publishing' },
59
- { pattern: /publish|deploy|release|update.*app|app.*update|republish/i, type: 'app-publish', questions: ['Workspace only OR marketplace too?', 'Which app? (path or name)', 'Version bump needed?'], skill: 'publish-hailer-app' },
60
- { pattern: /build|create|make.*app/i, type: 'app', questions: ['What data to display?', 'What layout/components?', 'What user actions needed?'] },
61
- { pattern: /create|add.*insight|report/i, type: 'insight', questions: ['What metrics/aggregations?', 'Which workflows to query?', 'Any filters needed?'] },
62
- { pattern: /import|create.*activit|bulk/i, type: 'data', questions: ['Which workflow?', 'What field values?', 'How many records?'] },
63
- { pattern: /add|create.*field|workflow|phase/i, type: 'schema', questions: ['Field type?', 'Required or optional?', 'Default values?'] },
64
- { pattern: /update|change|modify/i, type: 'update', questions: ['Which records affected?', 'What new values?', 'Confirm before applying?'] },
65
- ];
66
-
67
- const matched = taskPatterns.find(p => p.pattern.test(prompt));
68
-
69
- if (matched) {
70
- const skillLine = matched.skill ? `\nLoad skill: ${matched.skill}` : '';
71
- const output = `
72
- <interactive-mode>
73
- BEFORE STARTING: Consider asking clarifying questions.
74
-
75
- Task type detected: ${matched.type}
76
- Suggested questions to ask user:
77
- ${matched.questions.map(q => `- ${q}`).join('\n')}
78
-
79
- Use AskUserQuestion tool if requirements are unclear.
80
- Gather specifics before spawning agents or making changes.${skillLine}
81
- </interactive-mode>
82
- `;
83
- console.log(output);
84
- }
85
-
86
- process.exit(0);
87
- }
@@ -1,108 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * <hook-name>mcp-server-guard</hook-name>
4
- *
5
- * <purpose>
6
- * Prevents Claude from starting the MCP server directly.
7
- * The user must run the MCP server manually before starting Claude Code.
8
- * </purpose>
9
- *
10
- * <triggers>
11
- * - npm run dev, npm start
12
- * - tsx src/app.ts, node src/app.ts
13
- * - Any command that would start the MCP server
14
- * </triggers>
15
- *
16
- * <behavior>
17
- * 1. Blocks server start commands with permissionDecision: "deny"
18
- * 2. Outputs instructions to stderr for user to run manually
19
- * </behavior>
20
- *
21
- * <user-action>
22
- * User runs in separate terminal:
23
- * cd /path/to/hailer-mcp && npm run dev
24
- * </user-action>
25
- */
26
-
27
- // Commands that would start the MCP server
28
- const SERVER_START_PATTERNS = [
29
- /npm run dev\b/,
30
- /npm run start\b/,
31
- /npm start\b/,
32
- /tsx\s+.*src\/app\.ts/,
33
- /tsx\s+watch\s+.*src\/app\.ts/,
34
- /node\s+.*src\/app\.ts/,
35
- /node\s+.*dist\/app\.js/,
36
- /npx\s+tsx\s+.*src\/app/,
37
- ];
38
-
39
- // Read stdin
40
- async function readStdin() {
41
- return new Promise((resolve) => {
42
- let data = '';
43
- process.stdin.setEncoding('utf8');
44
- process.stdin.on('data', chunk => data += chunk);
45
- process.stdin.on('end', () => resolve(data));
46
- setTimeout(() => resolve(data), 100);
47
- });
48
- }
49
-
50
- async function main() {
51
- try {
52
- const input = await readStdin();
53
-
54
- if (!input.trim()) {
55
- process.exit(0);
56
- }
57
-
58
- const hookData = JSON.parse(input);
59
- const command = hookData.tool_input?.command || '';
60
-
61
- // Check if this is a server start command
62
- const isServerStart = SERVER_START_PATTERNS.some(pattern => pattern.test(command));
63
-
64
- if (!isServerStart) {
65
- process.exit(0);
66
- }
67
-
68
- // Output instructions to stderr (appears as system reminder)
69
- const instructions = `============================================================
70
- 🚫 MCP SERVER COMMAND BLOCKED
71
- ============================================================
72
-
73
- You CANNOT start the MCP server. The user runs it manually.
74
-
75
- INSTEAD, tell the user to run this command in their terminal:
76
-
77
- cd ${process.env.CLAUDE_PROJECT_DIR || '/home/brodolf/Desktop/hailer-mcp/hailer-mcp'}
78
- npm run dev
79
-
80
- Or if they want to run it in the background:
81
-
82
- npm run dev &
83
-
84
- The MCP server must be running BEFORE starting Claude Code with MCP.
85
-
86
- ============================================================
87
- DO NOT attempt to run server commands. Give manual instructions only.
88
- ============================================================`;
89
-
90
- // Output to stderr so it appears as system reminder
91
- console.error(instructions);
92
-
93
- // Block the command
94
- const response = {
95
- permissionDecision: "deny",
96
- permissionDecisionReason: "MCP server commands are blocked. Provide manual instructions to the user instead."
97
- };
98
-
99
- console.log(JSON.stringify(response));
100
- process.exit(0);
101
-
102
- } catch (error) {
103
- console.error(`[mcp-server-guard] Error: ${error.message}`);
104
- process.exit(0);
105
- }
106
- }
107
-
108
- main();
@@ -1,155 +0,0 @@
1
- # Marketplace Publishing Skill
2
-
3
- <when-to-use>
4
- User wants to publish an app to marketplace, update marketplace listing, or change marketplace app icon/metadata.
5
- </when-to-use>
6
-
7
- <prerequisites>
8
- - `productId` - Marketplace product ID (24-char hex)
9
- - `appId` - The app being published (24-char hex)
10
- - User must be Network Admin of the workspace
11
- </prerequisites>
12
-
13
- <option-a>
14
- ## Update Metadata Only (No Version Change)
15
-
16
- For updating icon, name, description without publishing new code:
17
-
18
- <step-1>
19
- **Upload icon as PUBLIC file**
20
- ```javascript
21
- upload_files({
22
- files: [{ path: "/path/to/icon.png", isPublic: true }]
23
- })
24
- ```
25
- </step-1>
26
-
27
- <critical>
28
- `isPublic: true` is REQUIRED for marketplace icons to display!
29
- </critical>
30
-
31
- <step-2>
32
- **Update product metadata**
33
- ```javascript
34
- publish_app({
35
- appId: "<appId>",
36
- productId: "<productId>", // REQUIRED for update
37
- title: "App Name",
38
- description: "Description",
39
- version: "1.0.0", // Current version (no bump needed)
40
- versionDescription: "Release notes",
41
- publisher: "Publisher Name",
42
- iconFileId: "<public-file-id>"
43
- })
44
- ```
45
- </step-2>
46
- </option-a>
47
-
48
- <option-b>
49
- ## Publish New Version (Code Changes)
50
-
51
- For publishing new app code with version bump:
52
-
53
- <step-1>
54
- **Upload icon as PUBLIC file (if changing)**
55
- ```javascript
56
- upload_files({
57
- files: [{ path: "/path/to/icon.png", isPublic: true }]
58
- })
59
- ```
60
- </step-1>
61
-
62
- <step-2>
63
- **Update manifest.json**
64
- - Bump version (must be > current, e.g., "1.0.31" → "1.0.32")
65
- - Update versionDescription
66
- </step-2>
67
-
68
- <step-3>
69
- **Publish app bundle**
70
- ```javascript
71
- publish_hailer_app({
72
- projectDirectory: "/path/to/app",
73
- publishToMarket: true
74
- })
75
- ```
76
- </step-3>
77
-
78
- <step-4>
79
- **Update product metadata**
80
- ```javascript
81
- publish_app({
82
- appId: "<appId>",
83
- productId: "<productId>",
84
- title: "App Name",
85
- description: "Description",
86
- version: "1.0.32",
87
- versionDescription: "What's new",
88
- publisher: "Publisher Name",
89
- iconFileId: "<public-file-id>"
90
- })
91
- ```
92
- </step-4>
93
- </option-b>
94
-
95
- <option-c>
96
- ## First-Time Marketplace Listing
97
-
98
- For apps not yet in marketplace:
99
-
100
- <step-1>
101
- **Upload icon as PUBLIC**
102
- ```javascript
103
- upload_files({
104
- files: [{ path: "/path/to/icon.png", isPublic: true }]
105
- })
106
- ```
107
- </step-1>
108
-
109
- <step-2>
110
- **Publish app with marketplace flag**
111
- ```javascript
112
- publish_hailer_app({
113
- projectDirectory: "/path/to/app",
114
- publishToMarket: true
115
- })
116
- ```
117
- Returns a `targetId`.
118
- </step-2>
119
-
120
- <step-3>
121
- **Create marketplace listing**
122
- ```javascript
123
- publish_app({
124
- appId: "<appId>",
125
- versionId: "<targetId>", // From step 2
126
- title: "App Name",
127
- description: "Description",
128
- version: "1.0.0",
129
- versionDescription: "Initial release",
130
- publisher: "Publisher Name",
131
- iconFileId: "<public-file-id>"
132
- })
133
- ```
134
- </step-3>
135
-
136
- <note>
137
- Creating new listings requires admin permissions.
138
- </note>
139
- </option-c>
140
-
141
- <common-errors>
142
- | Error | Cause | Fix |
143
- |-------|-------|-----|
144
- | Icon shows placeholder | File not public | Re-upload with `isPublic: true` |
145
- | "You have to be a network admin" | Missing permissions | Get admin access |
146
- | "Version not greater than previous" | Version too low | Bump version higher |
147
- | POST /app/publish fails | Needs file upload | Use `publish_hailer_app` for code changes |
148
- </common-errors>
149
-
150
- <api-reference>
151
- - `v3.product.update` - Updates metadata (name, description, icon, images)
152
- - `v3.product.create` - Creates new listing (admin only)
153
- - `POST /app/publish` - Uploads app bundle (requires .tgz file)
154
- - `v3.app.product.install` - Installs/updates in workspace
155
- </api-reference>
@@ -1,31 +0,0 @@
1
- /**
2
- * Simple Hailer Chat Bot
3
- *
4
- * Listens to discussions via WebSocket, responds using Anthropic Claude API
5
- * with access to ALL MCP tools via the ToolRegistry.
6
- */
7
- interface BotConfig {
8
- email: string;
9
- password: string;
10
- apiBaseUrl: string;
11
- anthropicApiKey: string;
12
- botName?: string;
13
- model?: string;
14
- }
15
- export declare class HailerChatBot {
16
- private clientManager;
17
- private hailerApi;
18
- private anthropic;
19
- private botUserId;
20
- private apiKey;
21
- private config;
22
- private toolRegistry;
23
- constructor(config: BotConfig);
24
- private registerAllTools;
25
- start(): Promise<void>;
26
- private handleMessage;
27
- private generateResponse;
28
- stop(): Promise<void>;
29
- }
30
- export default HailerChatBot;
31
- //# sourceMappingURL=chat-bot.d.ts.map