@hailer/mcp 0.0.5 → 0.1.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 (120) hide show
  1. package/.claude/agents/ada.md +127 -0
  2. package/.claude/agents/agent-builder.md +151 -0
  3. package/.claude/agents/alejandro.md +66 -0
  4. package/.claude/agents/bjorn.md +305 -0
  5. package/.claude/agents/dmitri.md +61 -0
  6. package/.claude/agents/giuseppe.md +66 -0
  7. package/.claude/agents/gunther.md +355 -0
  8. package/.claude/agents/helga.md +68 -0
  9. package/.claude/agents/kenji.md +58 -0
  10. package/.claude/agents/svetlana.md +394 -0
  11. package/.claude/agents/viktor.md +63 -0
  12. package/.claude/agents/yevgeni.md +60 -0
  13. package/.claude/hooks/agent-failure-detector.cjs +286 -0
  14. package/.claude/hooks/app-edit-guard.cjs +462 -0
  15. package/.claude/hooks/interactive-mode.cjs +59 -0
  16. package/.claude/hooks/mcp-server-guard.cjs +92 -0
  17. package/.claude/hooks/post-scaffold-hook.cjs +31 -0
  18. package/.claude/hooks/src-edit-guard.cjs +208 -0
  19. package/.claude/settings.json +47 -2
  20. package/.claude/skills/insight-join-patterns/SKILL.md +209 -0
  21. package/.env.example +13 -1
  22. package/CLAUDE.md +134 -0
  23. package/dist/app.js +4 -3
  24. package/dist/cli.js +0 -0
  25. package/dist/client/adaptive-documentation-bot.d.ts +0 -2
  26. package/dist/client/adaptive-documentation-bot.js +5 -16
  27. package/dist/client/message-processor.js +5 -0
  28. package/dist/client/providers/anthropic-provider.js +21 -7
  29. package/dist/mcp/UserContextCache.d.ts +14 -0
  30. package/dist/mcp/UserContextCache.js +49 -24
  31. package/dist/mcp/auth.d.ts +7 -0
  32. package/dist/mcp/auth.js +13 -5
  33. package/dist/mcp/hailer-clients.d.ts +5 -2
  34. package/dist/mcp/signal-handler.d.ts +28 -2
  35. package/dist/mcp/signal-handler.js +4 -2
  36. package/dist/mcp/tool-registry.d.ts +55 -2
  37. package/dist/mcp/tool-registry.js +197 -2
  38. package/dist/mcp/tools/app-core.d.ts +15 -0
  39. package/dist/mcp/tools/app-core.js +609 -0
  40. package/dist/mcp/tools/app-marketplace.d.ts +21 -0
  41. package/dist/mcp/tools/app-marketplace.js +1284 -0
  42. package/dist/mcp/tools/app-member.d.ts +11 -0
  43. package/dist/mcp/tools/app-member.js +258 -0
  44. package/dist/mcp/tools/app-scaffold.d.ts +11 -0
  45. package/dist/mcp/tools/app-scaffold.js +743 -0
  46. package/dist/mcp/tools/app.d.ts +13 -22
  47. package/dist/mcp/tools/app.js +17 -2466
  48. package/dist/mcp/tools/file.js +6 -6
  49. package/dist/mcp/tools/insight.d.ts +1 -0
  50. package/dist/mcp/tools/insight.js +203 -64
  51. package/dist/mcp/tools/user.js +3 -9
  52. package/dist/mcp/tools/workflow.js +49 -38
  53. package/dist/mcp/utils/hailer-api-client.js +4 -13
  54. package/dist/mcp/utils/tool-helpers.d.ts +102 -0
  55. package/dist/mcp/utils/tool-helpers.js +179 -0
  56. package/dist/mcp/utils/types.d.ts +6 -0
  57. package/dist/mcp/workspace-cache.d.ts +5 -5
  58. package/dist/mcp/workspace-cache.js +4 -3
  59. package/package.json +1 -1
  60. package/.claude/hooks/PreToolUse.sh +0 -52
  61. package/.claude/hooks/prompt-skill-loader.cjs +0 -553
  62. package/.claude/hooks/skill-loader.cjs +0 -142
  63. package/.claude/settings.local.json +0 -49
  64. package/.claude/skills/MCP-add-app-member-skill/SKILL.md +0 -977
  65. package/.claude/skills/MCP-build-data-app-skill/SKILL.md +0 -372
  66. package/.claude/skills/MCP-create-app-skill/SKILL.md +0 -1101
  67. package/.claude/skills/MCP-create-insight-skill/SKILL.md +0 -1317
  68. package/.claude/skills/MCP-get-insight-data-skill/SKILL.md +0 -1053
  69. package/.claude/skills/MCP-insight-api/SKILL.md +0 -185
  70. package/.claude/skills/MCP-insight-api/references/insight-endpoints.md +0 -514
  71. package/.claude/skills/MCP-install-workflow-skill/SKILL.md +0 -1056
  72. package/.claude/skills/MCP-list-apps-skill/SKILL.md +0 -1010
  73. package/.claude/skills/MCP-list-workflows-minimal-skill/SKILL.md +0 -992
  74. package/.claude/skills/MCP-local-first-skill/SKILL.md +0 -570
  75. package/.claude/skills/MCP-populate-workflow-data-skill/SKILL.md +0 -395
  76. package/.claude/skills/MCP-preview-insight-skill/SKILL.md +0 -1290
  77. package/.claude/skills/MCP-publish-hailer-app-skill/SKILL.md +0 -453
  78. package/.claude/skills/MCP-publish-template-skill/SKILL.md +0 -278
  79. package/.claude/skills/MCP-remove-app-member-skill/SKILL.md +0 -671
  80. package/.claude/skills/MCP-remove-app-skill/SKILL.md +0 -985
  81. package/.claude/skills/MCP-remove-insight-skill/SKILL.md +0 -1011
  82. package/.claude/skills/MCP-remove-workflow-skill/SKILL.md +0 -920
  83. package/.claude/skills/MCP-scaffold-hailer-app-skill/SKILL.md +0 -1237
  84. package/.claude/skills/MCP-update-app-skill/SKILL.md +0 -970
  85. package/.claude/skills/MCP-update-workflow-field-skill/SKILL.md +0 -1098
  86. package/.claude/skills/SDK-create-function-field-skill/SKILL.md +0 -313
  87. package/.claude/skills/SDK-generate-skill/SKILL.md +0 -223
  88. package/.claude/skills/SDK-init-skill/SKILL.md +0 -177
  89. package/.claude/skills/SDK-workspace-setup-skill/SKILL.md +0 -605
  90. package/.claude/skills/SDK-ws-config-skill/SKILL.md +0 -435
  91. package/.claude/skills/activity-api/SKILL.md +0 -96
  92. package/.claude/skills/activity-api/references/activity-endpoints.md +0 -845
  93. package/.claude/skills/agent-building/SKILL.md +0 -243
  94. package/.claude/skills/agent-building/references/architecture-patterns.md +0 -446
  95. package/.claude/skills/agent-building/references/code-examples.md +0 -587
  96. package/.claude/skills/agent-building/references/implementation-guide.md +0 -619
  97. package/.claude/skills/app-api/SKILL.md +0 -219
  98. package/.claude/skills/app-api/references/app-endpoints.md +0 -759
  99. package/.claude/skills/building-hailer-apps-skill/SKILL.md +0 -813
  100. package/.claude/skills/hailer-api/SKILL.md +0 -283
  101. package/.claude/skills/hailer-api/references/activities.md +0 -620
  102. package/.claude/skills/hailer-api/references/authentication.md +0 -216
  103. package/.claude/skills/hailer-api/references/datasets.md +0 -437
  104. package/.claude/skills/hailer-api/references/files.md +0 -301
  105. package/.claude/skills/hailer-api/references/insights.md +0 -469
  106. package/.claude/skills/hailer-api/references/workflows.md +0 -720
  107. package/.claude/skills/hailer-api/references/workspaces-users.md +0 -445
  108. package/.claude/skills/hailer-app-builder/SKILL.md +0 -340
  109. package/.claude/skills/mcp-tools/SKILL.md +0 -419
  110. package/.claude/skills/mcp-tools/references/api-endpoints.md +0 -499
  111. package/.claude/skills/mcp-tools/references/data-structures.md +0 -554
  112. package/.claude/skills/mcp-tools/references/implementation-patterns.md +0 -717
  113. package/.claude/skills/skill-testing/README.md +0 -137
  114. package/.claude/skills/skill-testing/SKILL.md +0 -348
  115. package/.claude/skills/skill-testing/references/test-patterns.md +0 -705
  116. package/.claude/skills/skill-testing/references/testing-guide.md +0 -603
  117. package/.claude/skills/skill-testing/references/validation-checklist.md +0 -537
  118. package/.claude/skills/spawn-app-builder/SKILL.md +0 -366
  119. package/.claude/skills/tool-builder/SKILL.md +0 -328
  120. package/tsconfig.json +0 -23
@@ -1,278 +0,0 @@
1
- ---
2
- name: Publish Template Skill
3
- description: Complete guide for publishing Hailer workspace templates to marketplace - use when creating shareable workflow configurations
4
- ---
5
-
6
- # Publish Template Skill
7
-
8
- This skill provides comprehensive documentation for publishing Hailer workspace templates to the marketplace. Templates allow you to share complete workspace configurations (workflows, fields, phases) with other workspaces.
9
-
10
- ## When to Use This Skill
11
-
12
- Invoke this skill when:
13
- - Publishing a workspace as a template
14
- - Creating marketplace templates
15
- - Sharing workflow configurations with others
16
- - Managing template versions
17
-
18
- ## What are Templates?
19
-
20
- **Templates = Shareable workspace configurations**
21
-
22
- Think of them as:
23
- - **Workspace Snapshots**: All workflows, fields, phases packaged together
24
- - **Reusable Blueprints**: Install in other workspaces
25
- - **Version Controlled**: Track changes across versions
26
-
27
- ## Available Template Tools
28
-
29
- | Tool | Purpose |
30
- |------|---------|
31
- | `list_templates` | View templates in marketplace |
32
- | `create_template` | Create template entry |
33
- | `install_template` | Install template to workspace |
34
- | `get_template` | Get template details |
35
- | `publish_template` | Publish workspace as template |
36
- | `get_product` | Get product details (v3 API) |
37
- | `get_product_manifest` | Get product manifest |
38
-
39
- ## Publishing a Template
40
-
41
- ### Required Parameters
42
-
43
- ```javascript
44
- publish_template({
45
- title: "Template Name", // Required: Display name (max 64 chars)
46
- description: "What it does", // Required: Description (max 4096 chars)
47
- version: "1.0.0", // Required: Version string
48
- versionDescription: "Release notes", // Required: Version notes
49
- publisher: "Company Name", // Required: Publisher name
50
- iconFileId: "24-char-file-id" // Required: Icon file ID
51
- })
52
- ```
53
-
54
- ### Optional Parameters
55
-
56
- ```javascript
57
- {
58
- productId: "existing-product-id", // To UPDATE existing template
59
- imageFileIds: ["file-id-1", "file-id-2"], // Preview images
60
- externalUrl: "https://example.com" // External website
61
- }
62
- ```
63
-
64
- ### Updating an Existing Template
65
-
66
- To update an existing template (change icon, description, etc.), include the `productId`:
67
-
68
- ```javascript
69
- publish_template({
70
- productId: "692d46bfca77093f10b0c09c", // Existing product ID from list_templates
71
- title: "Football Club Manager",
72
- description: "Updated description",
73
- version: "1.1.0",
74
- versionDescription: "Updated icon and improved workflows",
75
- publisher: "Community",
76
- iconFileId: "new-icon-file-id"
77
- })
78
- ```
79
-
80
- ### Complete Workflow
81
-
82
- **Step 1: Gather ALL information from user**
83
-
84
- Use `AskUserQuestion` or direct questions to collect:
85
- - Template name (max 64 chars)
86
- - Description (what workflows are included)
87
- - Version (e.g., "1.0.0")
88
- - Version description (release notes)
89
- - Publisher name (company or person)
90
- - Icon source (URL, file path, or existing fileId)
91
-
92
- **Step 2: Upload the icon**
93
-
94
- **CRITICAL: Icons MUST be uploaded with `isPublic: true` or they won't display!**
95
-
96
- ```javascript
97
- upload_files({ files: [{ path: "/path/to/icon.png", isPublic: true }] })
98
- // Returns: { fileId: "692d3e66e98c7bab4af7f0a1" }
99
- ```
100
-
101
- **Step 3: Publish the template**
102
- ```javascript
103
- publish_template({
104
- title: "Football Manager",
105
- description: "Complete football club management workspace",
106
- version: "1.0.0",
107
- versionDescription: "Initial release with Players, Matches, Training workflows",
108
- publisher: "Hailer Oy",
109
- iconFileId: "692d3e66e98c7bab4af7f0a1"
110
- })
111
- ```
112
-
113
- ### Interactive Icon Workflow
114
-
115
- When user asks to publish a template, use `AskUserQuestion` to ask about the icon:
116
-
117
- ```javascript
118
- // Ask about icon
119
- AskUserQuestion({
120
- questions: [{
121
- question: "Template icon is required. How would you like to provide it?",
122
- header: "Icon",
123
- options: [
124
- { label: "Upload from URL", description: "Provide a URL to an image" },
125
- { label: "Upload from file path", description: "Provide a local file path" },
126
- { label: "Use existing fileId", description: "I already have a file ID" }
127
- ],
128
- multiSelect: false
129
- }]
130
- })
131
- ```
132
-
133
- Then:
134
- - If URL: `upload_files({ files: [{ url: "https://...", isPublic: true }] })`
135
- - If path: `upload_files({ files: [{ path: "/path/to/icon.png", isPublic: true }] })`
136
- - If fileId: Use directly in `publish_template`
137
-
138
- **IMPORTANT:** Always use `isPublic: true` when uploading icons or they won't display in the UI!
139
-
140
- ## What Gets Published
141
-
142
- When you publish a template, the **entire current workspace** is included:
143
- - All workflows
144
- - All fields and their configurations
145
- - All phases and their settings
146
- - Field relationships (activitylinks)
147
- - Function fields with formulas
148
-
149
- ## Listing Templates
150
-
151
- ```javascript
152
- // List private/workspace templates (default)
153
- list_templates()
154
-
155
- // List public marketplace templates
156
- list_templates({ publicOnly: true })
157
- ```
158
-
159
- ## Installing Templates
160
-
161
- ```javascript
162
- install_template({
163
- templateId: "692d3eade98c7bab4af7f173"
164
- })
165
- ```
166
-
167
- This creates new workflows in your workspace based on the template.
168
-
169
- ## Getting Template Details
170
-
171
- ```javascript
172
- // Get template info
173
- get_template({ templateId: "692d3eade98c7bab4af7f173" })
174
-
175
- // Get product details (v3 API)
176
- get_product({ productId: "692d3eade98c7bab4af7f173" })
177
-
178
- // Get manifest
179
- get_product_manifest({ productId: "692d3eade98c7bab4af7f173" })
180
- ```
181
-
182
- ## API Flow (Internal)
183
-
184
- The `publish_template` tool performs two API calls:
185
-
186
- 1. **v2.network.product.publishTemplate** - Creates template manifest
187
- - Returns product ID
188
-
189
- 2. **v3.product.create** - Publishes to marketplace
190
- - Requires: `cid`, `targetId`, `name`, `description`, `type`, `publisher`, `icon`, `images`
191
-
192
- ## PreToolUse Hook Protection
193
-
194
- A hook will **BLOCK** `publish_template` if any required field is missing:
195
- - title, description, version, versionDescription, publisher, iconFileId
196
-
197
- This ensures you gather ALL information before calling the tool.
198
-
199
- ## Example: Full Publishing Flow
200
-
201
- ```javascript
202
- // 1. User asks to publish template
203
-
204
- // 2. Gather ALL required information:
205
- // - Ask for template name, description, version, release notes, publisher
206
- // - Ask how to provide icon
207
-
208
- // 3. Upload icon if needed (MUST use isPublic: true!)
209
- const uploadResult = await upload_files({
210
- files: [{ path: "/home/user/icons/football.png", isPublic: true }]
211
- });
212
- const iconFileId = uploadResult.fileIds[0];
213
-
214
- // 4. Publish template with ALL required fields
215
- const result = await publish_template({
216
- title: "Football Manager",
217
- description: "Complete football club management workspace with player tracking, match management, and statistics",
218
- version: "1.0.0",
219
- versionDescription: "Initial release with Players, Matches, Training workflows",
220
- publisher: "Hailer Oy",
221
- iconFileId: iconFileId
222
- });
223
-
224
- // 5. Share the product ID
225
- // Result includes productId for others to install
226
- ```
227
-
228
- ## Version Updates
229
-
230
- To update an existing template, include the `productId` parameter:
231
-
232
- ```javascript
233
- // Get the product ID from list_templates first
234
- const templates = await list_templates();
235
- // Find your template's ID
236
-
237
- // Update with new version
238
- publish_template({
239
- productId: "existing-product-id",
240
- title: "Template Name",
241
- description: "Updated description",
242
- version: "1.1.0", // New version number
243
- versionDescription: "What changed in this version",
244
- publisher: "Publisher Name",
245
- iconFileId: "icon-file-id"
246
- })
247
- ```
248
-
249
- ## Requirements
250
-
251
- - User must be workspace administrator
252
- - Icon file must be uploaded first (24-char fileId required)
253
- - All required parameters must be provided
254
-
255
- ## Common Errors
256
-
257
- | Error | Cause | Solution |
258
- |-------|-------|----------|
259
- | `"fileId" is required` | No icon provided | Upload icon first with `upload_files` |
260
- | `"images" is required` | Icon format wrong | Tool handles this automatically |
261
- | Permission denied | Not admin | User needs admin permissions |
262
- | Icon not displaying | File not public | Upload with `isPublic: true` |
263
- | Product not found | Wrong product ID | Use `list_templates` to get correct ID |
264
-
265
- ## Best Practices
266
-
267
- 1. **Use descriptive titles** - Clear names help users understand purpose
268
- 2. **Write good descriptions** - Explain what workflows are included
269
- 3. **Version semantically** - Use 1.0.0, 1.1.0, 2.0.0 format
270
- 4. **Write release notes** - Document what changed in each version
271
- 5. **Choose good icons** - Visual identity helps recognition
272
-
273
- ## Related Tools
274
-
275
- - `list_workflows` - See workflows before publishing
276
- - `upload_files` - Upload template icon
277
- - `list_templates` - Verify template was published
278
- - `install_template` - Test by installing in another workspace