@hailer/mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/tool-builder.md +37 -0
- package/.claude/commands/ws-pull.md +44 -0
- package/.claude/settings.json +8 -0
- package/.claude/settings.local.json +49 -0
- package/.claude/skills/activity-api/SKILL.md +96 -0
- package/.claude/skills/activity-api/references/activity-endpoints.md +845 -0
- package/.claude/skills/add-app-member-skill/SKILL.md +977 -0
- package/.claude/skills/agent-building/SKILL.md +243 -0
- package/.claude/skills/agent-building/references/architecture-patterns.md +446 -0
- package/.claude/skills/agent-building/references/code-examples.md +587 -0
- package/.claude/skills/agent-building/references/implementation-guide.md +619 -0
- package/.claude/skills/app-api/SKILL.md +219 -0
- package/.claude/skills/app-api/references/app-endpoints.md +759 -0
- package/.claude/skills/building-hailer-apps-skill/SKILL.md +548 -0
- package/.claude/skills/create-app-skill/SKILL.md +1101 -0
- package/.claude/skills/create-insight-skill/SKILL.md +1317 -0
- package/.claude/skills/get-insight-data-skill/SKILL.md +1053 -0
- package/.claude/skills/hailer-api/SKILL.md +283 -0
- package/.claude/skills/hailer-api/references/activities.md +620 -0
- package/.claude/skills/hailer-api/references/authentication.md +216 -0
- package/.claude/skills/hailer-api/references/datasets.md +437 -0
- package/.claude/skills/hailer-api/references/files.md +301 -0
- package/.claude/skills/hailer-api/references/insights.md +469 -0
- package/.claude/skills/hailer-api/references/workflows.md +720 -0
- package/.claude/skills/hailer-api/references/workspaces-users.md +445 -0
- package/.claude/skills/insight-api/SKILL.md +185 -0
- package/.claude/skills/insight-api/references/insight-endpoints.md +514 -0
- package/.claude/skills/install-workflow-skill/SKILL.md +1056 -0
- package/.claude/skills/list-apps-skill/SKILL.md +1010 -0
- package/.claude/skills/list-workflows-minimal-skill/SKILL.md +992 -0
- package/.claude/skills/local-first-skill/SKILL.md +570 -0
- package/.claude/skills/mcp-tools/SKILL.md +419 -0
- package/.claude/skills/mcp-tools/references/api-endpoints.md +499 -0
- package/.claude/skills/mcp-tools/references/data-structures.md +554 -0
- package/.claude/skills/mcp-tools/references/implementation-patterns.md +717 -0
- package/.claude/skills/preview-insight-skill/SKILL.md +1290 -0
- package/.claude/skills/publish-hailer-app-skill/SKILL.md +453 -0
- package/.claude/skills/remove-app-member-skill/SKILL.md +671 -0
- package/.claude/skills/remove-app-skill/SKILL.md +985 -0
- package/.claude/skills/remove-insight-skill/SKILL.md +1011 -0
- package/.claude/skills/remove-workflow-skill/SKILL.md +920 -0
- package/.claude/skills/scaffold-hailer-app-skill/SKILL.md +1034 -0
- package/.claude/skills/skill-testing/README.md +137 -0
- package/.claude/skills/skill-testing/SKILL.md +348 -0
- package/.claude/skills/skill-testing/references/test-patterns.md +705 -0
- package/.claude/skills/skill-testing/references/testing-guide.md +603 -0
- package/.claude/skills/skill-testing/references/validation-checklist.md +537 -0
- package/.claude/skills/tool-builder/SKILL.md +328 -0
- package/.claude/skills/update-app-skill/SKILL.md +970 -0
- package/.claude/skills/update-workflow-field-skill/SKILL.md +1098 -0
- package/.env.example +81 -0
- package/.mcp.json +13 -0
- package/README.md +297 -0
- package/dist/app.d.ts +4 -0
- package/dist/app.js +74 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +5 -0
- package/dist/client/adaptive-documentation-bot.d.ts +108 -0
- package/dist/client/adaptive-documentation-bot.js +475 -0
- package/dist/client/adaptive-documentation-types.d.ts +66 -0
- package/dist/client/adaptive-documentation-types.js +9 -0
- package/dist/client/agent-activity-bot.d.ts +51 -0
- package/dist/client/agent-activity-bot.js +166 -0
- package/dist/client/agent-tracker.d.ts +499 -0
- package/dist/client/agent-tracker.js +659 -0
- package/dist/client/description-updater.d.ts +56 -0
- package/dist/client/description-updater.js +259 -0
- package/dist/client/log-parser.d.ts +72 -0
- package/dist/client/log-parser.js +387 -0
- package/dist/client/mcp-client.d.ts +50 -0
- package/dist/client/mcp-client.js +532 -0
- package/dist/client/message-processor.d.ts +35 -0
- package/dist/client/message-processor.js +352 -0
- package/dist/client/multi-bot-manager.d.ts +24 -0
- package/dist/client/multi-bot-manager.js +74 -0
- package/dist/client/providers/anthropic-provider.d.ts +19 -0
- package/dist/client/providers/anthropic-provider.js +631 -0
- package/dist/client/providers/llm-provider.d.ts +47 -0
- package/dist/client/providers/llm-provider.js +367 -0
- package/dist/client/providers/openai-provider.d.ts +23 -0
- package/dist/client/providers/openai-provider.js +621 -0
- package/dist/client/simple-llm-caller.d.ts +19 -0
- package/dist/client/simple-llm-caller.js +100 -0
- package/dist/client/skill-generator.d.ts +81 -0
- package/dist/client/skill-generator.js +386 -0
- package/dist/client/test-adaptive-bot.d.ts +9 -0
- package/dist/client/test-adaptive-bot.js +82 -0
- package/dist/client/token-pricing.d.ts +38 -0
- package/dist/client/token-pricing.js +127 -0
- package/dist/client/token-tracker.d.ts +232 -0
- package/dist/client/token-tracker.js +457 -0
- package/dist/client/token-usage-bot.d.ts +53 -0
- package/dist/client/token-usage-bot.js +153 -0
- package/dist/client/tool-executor.d.ts +69 -0
- package/dist/client/tool-executor.js +159 -0
- package/dist/client/tool-schema-loader.d.ts +60 -0
- package/dist/client/tool-schema-loader.js +178 -0
- package/dist/client/types.d.ts +69 -0
- package/dist/client/types.js +7 -0
- package/dist/config.d.ts +162 -0
- package/dist/config.js +296 -0
- package/dist/core.d.ts +26 -0
- package/dist/core.js +147 -0
- package/dist/lib/context-manager.d.ts +111 -0
- package/dist/lib/context-manager.js +431 -0
- package/dist/lib/logger.d.ts +74 -0
- package/dist/lib/logger.js +277 -0
- package/dist/lib/materialize.d.ts +3 -0
- package/dist/lib/materialize.js +101 -0
- package/dist/lib/normalizedName.d.ts +7 -0
- package/dist/lib/normalizedName.js +48 -0
- package/dist/lib/prompt-length-manager.d.ts +81 -0
- package/dist/lib/prompt-length-manager.js +457 -0
- package/dist/lib/terminal-prompt.d.ts +9 -0
- package/dist/lib/terminal-prompt.js +108 -0
- package/dist/mcp/UserContextCache.d.ts +56 -0
- package/dist/mcp/UserContextCache.js +163 -0
- package/dist/mcp/auth.d.ts +2 -0
- package/dist/mcp/auth.js +29 -0
- package/dist/mcp/hailer-clients.d.ts +42 -0
- package/dist/mcp/hailer-clients.js +246 -0
- package/dist/mcp/signal-handler.d.ts +45 -0
- package/dist/mcp/signal-handler.js +317 -0
- package/dist/mcp/tool-registry.d.ts +100 -0
- package/dist/mcp/tool-registry.js +306 -0
- package/dist/mcp/tools/activity.d.ts +15 -0
- package/dist/mcp/tools/activity.js +955 -0
- package/dist/mcp/tools/app.d.ts +20 -0
- package/dist/mcp/tools/app.js +1488 -0
- package/dist/mcp/tools/discussion.d.ts +19 -0
- package/dist/mcp/tools/discussion.js +950 -0
- package/dist/mcp/tools/file.d.ts +15 -0
- package/dist/mcp/tools/file.js +119 -0
- package/dist/mcp/tools/insight.d.ts +17 -0
- package/dist/mcp/tools/insight.js +806 -0
- package/dist/mcp/tools/skill.d.ts +10 -0
- package/dist/mcp/tools/skill.js +279 -0
- package/dist/mcp/tools/user.d.ts +10 -0
- package/dist/mcp/tools/user.js +108 -0
- package/dist/mcp/tools/workflow-template.d.ts +19 -0
- package/dist/mcp/tools/workflow-template.js +822 -0
- package/dist/mcp/tools/workflow.d.ts +18 -0
- package/dist/mcp/tools/workflow.js +1362 -0
- package/dist/mcp/utils/api-errors.d.ts +45 -0
- package/dist/mcp/utils/api-errors.js +160 -0
- package/dist/mcp/utils/data-transformers.d.ts +102 -0
- package/dist/mcp/utils/data-transformers.js +194 -0
- package/dist/mcp/utils/file-upload.d.ts +33 -0
- package/dist/mcp/utils/file-upload.js +148 -0
- package/dist/mcp/utils/hailer-api-client.d.ts +120 -0
- package/dist/mcp/utils/hailer-api-client.js +323 -0
- package/dist/mcp/utils/index.d.ts +13 -0
- package/dist/mcp/utils/index.js +39 -0
- package/dist/mcp/utils/logger.d.ts +42 -0
- package/dist/mcp/utils/logger.js +103 -0
- package/dist/mcp/utils/types.d.ts +286 -0
- package/dist/mcp/utils/types.js +7 -0
- package/dist/mcp/workspace-cache.d.ts +42 -0
- package/dist/mcp/workspace-cache.js +97 -0
- package/dist/mcp-server.d.ts +42 -0
- package/dist/mcp-server.js +280 -0
- package/package.json +56 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Activate tool-builder mode to implement a new MCP tool
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Load the `tool-builder` skill and enter tool-building mode.
|
|
6
|
+
|
|
7
|
+
**What tool should I build?**
|
|
8
|
+
|
|
9
|
+
Please provide:
|
|
10
|
+
|
|
11
|
+
- **Tool Name**: `tool_name` (snake_case)
|
|
12
|
+
- **Purpose**: What does it do?
|
|
13
|
+
- **API Endpoint**: `v3.endpoint.method`
|
|
14
|
+
- **Request Format**: `[arg1, arg2]`
|
|
15
|
+
- **Response Format**: What the API returns
|
|
16
|
+
- **Target File**: Which file in `src/mcp/tools/`?
|
|
17
|
+
- **Tool Group**: READ | WRITE | PLAYGROUND
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
**Example:**
|
|
22
|
+
```
|
|
23
|
+
Tool Name: list_insights
|
|
24
|
+
Purpose: List all insights in workspace
|
|
25
|
+
API Endpoint: v3.insight.list
|
|
26
|
+
Request: [workspaceId]
|
|
27
|
+
Response: { insights: [{_id, name, query, sources}] }
|
|
28
|
+
Target File: insight.ts
|
|
29
|
+
Tool Group: PLAYGROUND
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
I'll:
|
|
33
|
+
1. Load tool-builder skill
|
|
34
|
+
2. Read existing patterns in target file
|
|
35
|
+
3. Implement the tool
|
|
36
|
+
4. Register in src/app.ts
|
|
37
|
+
5. Report what was created
|
|
@@ -0,0 +1,44 @@
|
|
|
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 ws-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
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"mcp__hailer__create_activity",
|
|
5
|
+
"mcp__hailer__list_workflow_phases",
|
|
6
|
+
"mcp__hailer__list_workflows",
|
|
7
|
+
"mcp__hailer__show_activity_by_id",
|
|
8
|
+
"mcp__hailer__get_workflow_schema",
|
|
9
|
+
"mcp__ide__getDiagnostics",
|
|
10
|
+
"mcp__hailer__remove_workflow",
|
|
11
|
+
"Read(//tmp/**)",
|
|
12
|
+
"mcp__hailer__install_workflow",
|
|
13
|
+
"mcp__hailer__update_workflow_field",
|
|
14
|
+
"mcp__hailer__update_activity",
|
|
15
|
+
"Skill(agent-building)",
|
|
16
|
+
"mcp__hailer__search_workspace_users",
|
|
17
|
+
"mcp__hailer__add_discussion_message",
|
|
18
|
+
"mcp__hailer__join_discussion",
|
|
19
|
+
"mcp__hailer__fetch_discussion_messages",
|
|
20
|
+
"mcp__hailer__list_activities",
|
|
21
|
+
"mcp__hailer__get_insight_data",
|
|
22
|
+
"mcp__hailer__create_insight",
|
|
23
|
+
"mcp__hailer__preview_insight",
|
|
24
|
+
"mcp__hailer__remove_insight",
|
|
25
|
+
"mcp__hailer__create_app",
|
|
26
|
+
"mcp__hailer__scaffold_hailer_app",
|
|
27
|
+
"mcp__hailer__update_app",
|
|
28
|
+
"mcp__hailer__publish_hailer_app",
|
|
29
|
+
"Bash(npm run build:*)",
|
|
30
|
+
"Bash(npm pack)",
|
|
31
|
+
"Bash(yes:*)",
|
|
32
|
+
"Bash(printf:*)",
|
|
33
|
+
"Bash(script -qec:*)",
|
|
34
|
+
"mcp__hailer__list_workflows_minimal",
|
|
35
|
+
"Skill(hailer-api)",
|
|
36
|
+
"Skill(publish-hailer-app-skill)",
|
|
37
|
+
"Bash(find:*)",
|
|
38
|
+
"mcp__hailer__list_templates",
|
|
39
|
+
"Skill(insight-api)",
|
|
40
|
+
"Bash(node -e:*)",
|
|
41
|
+
"mcp__hailer__create_template",
|
|
42
|
+
"mcp__hailer__update_workflow_phase"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"enableAllProjectMcpServers": true,
|
|
46
|
+
"enabledMcpjsonServers": [
|
|
47
|
+
"hailer"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Activity API Reference
|
|
3
|
+
description: Complete reference for Hailer Activity API endpoints (v2 and v3) - use when building activity-related MCP tools
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Activity API Reference Skill
|
|
7
|
+
|
|
8
|
+
This skill provides comprehensive documentation for all Hailer Activity API endpoints. Use this as a reference when building MCP tools that interact with activities.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Invoke this skill when:
|
|
13
|
+
- Building new activity-related MCP tools
|
|
14
|
+
- Understanding available activity operations
|
|
15
|
+
- Implementing activity creation, updates, or queries
|
|
16
|
+
- Working with activity links, templates, or bulk operations
|
|
17
|
+
- Exploring timeline, kanban, or calendar views
|
|
18
|
+
|
|
19
|
+
## Quick Navigation
|
|
20
|
+
|
|
21
|
+
### Core Activity Operations
|
|
22
|
+
- **v3.activity.list** - List activities with advanced filtering and pagination
|
|
23
|
+
- **v3.activity.create** - Create a single activity
|
|
24
|
+
- **v3.activity.createMany** - Batch create multiple activities
|
|
25
|
+
- **v3.activity.updateMany** - Batch update multiple activities
|
|
26
|
+
- **v3.activity.template.create** - Get activity template with field definitions
|
|
27
|
+
|
|
28
|
+
### Activity Relationships
|
|
29
|
+
- **v3.activity.linkedFrom.overview** - View activities linked to a target activity
|
|
30
|
+
- **v3.activity.linkedFrom.search** - Search linked activities
|
|
31
|
+
- **v2.activities.copy** - Copy activities with optional renaming
|
|
32
|
+
|
|
33
|
+
### Views & Visualization
|
|
34
|
+
- **v3.activity.kanban.list** - Kanban board view
|
|
35
|
+
- **v3.activity.timeline** - Timeline/calendar view with grouping
|
|
36
|
+
- **v3.activity.events** - Calendar events from date fields
|
|
37
|
+
|
|
38
|
+
### Advanced Operations
|
|
39
|
+
- **v3.activity.evaluateMany** - Dry-run function field evaluations
|
|
40
|
+
- **v3.activity.permissions** - Check user permissions
|
|
41
|
+
- **v3.activity.removed.overview** - List deleted activities
|
|
42
|
+
- **v3.activity.removed.recover** - Restore deleted activities
|
|
43
|
+
|
|
44
|
+
## Documentation
|
|
45
|
+
|
|
46
|
+
See [Activity API Endpoints](references/activity-endpoints.md) for complete endpoint documentation with request/response schemas.
|
|
47
|
+
|
|
48
|
+
## Key Concepts
|
|
49
|
+
|
|
50
|
+
### Activity Creation Pattern
|
|
51
|
+
```typescript
|
|
52
|
+
// 1. Get template to understand required fields
|
|
53
|
+
const template = await getActivityTemplate(workflowId, phaseId);
|
|
54
|
+
|
|
55
|
+
// 2. Create activity with proper field structure
|
|
56
|
+
const result = await createActivity(workflowId, {
|
|
57
|
+
name: "Activity Name",
|
|
58
|
+
fields: {
|
|
59
|
+
[fieldId]: value, // Use fieldIds from template
|
|
60
|
+
},
|
|
61
|
+
phaseId: phaseId,
|
|
62
|
+
teamId: teamId // Required if no default owner
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Filtering Activities
|
|
67
|
+
```typescript
|
|
68
|
+
// Use filters object for complex queries
|
|
69
|
+
const activities = await listActivities(workflowId, {
|
|
70
|
+
filters: {
|
|
71
|
+
and: [
|
|
72
|
+
{ [fieldId]: { equalTo: "value" } },
|
|
73
|
+
{ [dateFieldId]: { between: [startMs, endMs] } }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
returnFlat: true // Use flat structure for easier field access
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### returnFlat Mode
|
|
81
|
+
- **returnFlat: false** - Fields nested in `fields` object with complex structure
|
|
82
|
+
- **returnFlat: true** - Fields flattened to root level, accessible by field key
|
|
83
|
+
|
|
84
|
+
## Common Use Cases
|
|
85
|
+
|
|
86
|
+
1. **List activities in a workflow/phase**: Use `v3.activity.list`
|
|
87
|
+
2. **Create multiple activities**: Use `v3.activity.createMany` with template
|
|
88
|
+
3. **Update activity fields**: Use `v3.activity.updateMany`
|
|
89
|
+
4. **View activity relationships**: Use `v3.activity.linkedFrom.overview`
|
|
90
|
+
5. **Get field definitions**: Use `v3.activity.template.create`
|
|
91
|
+
6. **Timeline/calendar view**: Use `v3.activity.timeline` or `v3.activity.events`
|
|
92
|
+
|
|
93
|
+
## Next Steps
|
|
94
|
+
|
|
95
|
+
For complete endpoint documentation with request/response schemas, see:
|
|
96
|
+
- [Activity API Endpoints](references/activity-endpoints.md) - All v2 and v3 endpoints
|