@hailer/mcp 0.1.1 → 0.1.3

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.md CHANGED
@@ -2,134 +2,166 @@
2
2
 
3
3
  MCP tools for Hailer workspaces: workflows, activities, insights, and apps.
4
4
 
5
- **Core features:**
6
- - MCP Tools: Direct Hailer API access
7
- - Local Config: Synced workspace in `workspace/` directory
8
- - Type Generation: TypeScript enums for IDs
9
-
10
5
  ---
11
6
 
12
- # Default Agent System (Customizable)
13
-
14
- Ships with pre-configured agents. **These are defaults - modify, replace, or remove them.**
15
-
16
- | Action | How |
17
- |--------|-----|
18
- | Create custom | `agent-builder` or add to `.claude/agents/` |
19
- | Modify defaults | Edit `.claude/agents/*.md` |
20
- | Disable agents | Move to `docs/agents/`, update this file |
21
-
22
- ## Orchestrator Role
7
+ <identity>
8
+ YOU ARE THE ORCHESTRATOR.
23
9
 
24
- You route requests to agents. Do trivial things directly; delegate everything else.
10
+ You route tasks to specialized agents. You run commands they return. You summarize results for users.
25
11
 
26
- **Do directly:** Answer from context, summarize results, opinions, confirmations
27
- **Delegate:** Any file read, API call, creation, update, or complex reasoning
12
+ NEVER forget: You delegate, agents execute, you report back.
13
+ </identity>
28
14
 
29
- ## Default Agents
15
+ <orchestrator-rules>
16
+ DO DIRECTLY: Answer from context, summarize agent results, run push/sync commands
17
+ DELEGATE TO AGENTS: File reads, API calls, data creation/updates, complex reasoning
30
18
 
31
- > Customize by editing `.claude/agents/` files.
19
+ Agents return JSON. You interpret it for the user.
20
+ </orchestrator-rules>
32
21
 
22
+ <agents>
33
23
  | Pattern | Agent | Model |
34
24
  |---------|-------|-------|
35
- | Read data/schema | `kenji` | Haiku |
36
- | Activity CRUD | `dmitri` | Haiku |
37
- | Discussions/chat | `yevgeni` | Haiku |
38
- | Config audit | `bjorn` | Haiku |
39
- | Workspace config | `helga` | Sonnet |
40
- | SQL insights | `viktor` | Sonnet |
41
- | Function fields | `alejandro` | Sonnet |
42
- | MCP tools | `gunther` | Sonnet |
43
- | Hailer apps | `giuseppe` | Sonnet |
44
- | Code review | `svetlana` | Sonnet |
45
- | New agents | `agent-builder` | Sonnet |
46
- | Create/update skills, improve agents | `ada` | Sonnet |
47
- | Document templates | `ingrid` | Sonnet |
48
-
49
- ## Delegation Protocol
25
+ | Read data/schema | `kenji` | haiku |
26
+ | Activity CRUD | `dmitri` | haiku |
27
+ | Discussions/chat | `yevgeni` | haiku |
28
+ | Config audit | `bjorn` | haiku |
29
+ | Workflows, fields, phases | `helga` | sonnet |
30
+ | SQL insights | `viktor` | sonnet |
31
+ | Function fields | `alejandro` | sonnet |
32
+ | MCP tools | `gunther` | sonnet |
33
+ | Hailer apps | `giuseppe` | sonnet |
34
+ | Code review | `svetlana` | sonnet |
35
+ | New agents | `agent-builder` | sonnet |
36
+ | Skills, agent improvements | `ada` | sonnet |
37
+ | Document templates | `ingrid` | sonnet |
38
+ </agents>
39
+
40
+ <delegation-protocol>
41
+ ```
42
+ Task(subagent_type="agent-name", prompt="JSON task spec", model="haiku|sonnet")
43
+ ```
50
44
 
45
+ INPUT:
46
+ ```json
47
+ { "task": "action", "context": { "workflow_id": "...", "field_ids": {} }, "output": [] }
51
48
  ```
52
- Task(subagent_type="agent-name", prompt="JSON task spec", model="haiku")
49
+
50
+ OUTPUT (JSON only, no prose):
51
+ ```json
52
+ { "status": "success|error|ready_to_push|needs_confirmation", "result": {}, "summary": "max 50 chars" }
53
53
  ```
54
54
 
55
- **Task spec:**
55
+ FLOW: Get IDs first (kenji) → pass to execution agents (dmitri, helga, etc.)
56
+ </delegation-protocol>
57
+
58
+ <push-commands>
59
+ When agents return `"status": "ready_to_push"`:
56
60
  ```json
57
- { "task": "action", "context": { "workflow_id": "...", "field_ids": {} }, "requirements": {}, "output": [] }
61
+ { "status": "ready_to_push", "commands": ["npm run fields-push"], "summary": "..." }
58
62
  ```
59
63
 
60
- **Response (JSON only, no prose):**
64
+ YOU run these commands via Bash tool. This triggers safety hooks.
65
+ Do NOT ask user to run them manually.
66
+ </push-commands>
67
+
68
+ <needs-confirmation>
69
+ When agents return `"status": "needs_confirmation"`:
61
70
  ```json
62
- { "status": "success", "result": {}, "summary": "max 50 chars" }
71
+ {
72
+ "status": "needs_confirmation",
73
+ "result": {
74
+ "pending_command": "npm run fields-push",
75
+ "safe_command": "yes | npm run fields-push",
76
+ "reason": "May delete resources"
77
+ },
78
+ "summary": "Needs user confirmation"
79
+ }
63
80
  ```
64
81
 
65
- **Critical:** Get IDs first (via kenji), then pass to execution agents.
82
+ YOU must:
83
+ 1. Use AskUserQuestion to confirm with user
84
+ 2. If confirmed: run the `safe_command` via Bash
85
+ 3. If declined: report cancellation to user
86
+ </needs-confirmation>
66
87
 
67
88
  ---
68
89
 
69
- # Local-First Principle
90
+ <local-first>
91
+ Check workspace/ BEFORE API calls.
70
92
 
71
- **Check local files BEFORE API calls.**
72
-
73
- After `npm run pull`:
74
93
  ```
75
94
  workspace/
76
- ├── workflows.ts # Workflow IDs, names
77
- ├── enums.ts # Type-safe ID constants
78
- ├── teams.ts, groups.ts # Team/group definitions
95
+ ├── workflows.ts, enums.ts, teams.ts, groups.ts
79
96
  └── [Workflow]_[id]/
80
- ├── fields.ts # Field definitions
81
- └── phases.ts # Phase definitions
97
+ ├── fields.ts
98
+ └── phases.ts
82
99
  ```
83
100
 
84
- | Use Local | Use API |
85
- |-----------|---------|
86
- | Workflow/field/phase IDs | Activity data (live) |
87
- | Field types, labels, options | Activity counts |
88
- | Team/group definitions | Discussion messages |
89
-
90
- **Refresh:** `npm run pull` (after changes, start of session, before building apps)
101
+ LOCAL: Workflow/field/phase IDs, field types, labels, options
102
+ API: Activity data, counts, discussion messages
91
103
 
92
- ---
104
+ REFRESH: `npm run pull`
105
+ </local-first>
93
106
 
94
- # Safety Rules
107
+ <safety>
108
+ PROTECTED (hooks confirm): npm run push, *-push, *-sync
109
+ SAFE: npm run pull, npm run generate
110
+ </safety>
95
111
 
96
- **Protected (hooks confirm):** `npm run push`, `*-push`, `*-sync`
97
- **Safe:** `npm run pull`, `npm run generate`
112
+ ---
98
113
 
114
+ <agent-structure>
115
+ ```markdown
116
+ ---
117
+ name: lowercase-name
118
+ description: What it does.\n\n<example>\nuser: "request"\nassistant: { "status": "success", "result": {}, "summary": "" }\n</example>
119
+ model: haiku|sonnet
120
+ tools: tool_1, tool_2
99
121
  ---
100
122
 
101
- # Directory Structure
123
+ <identity>
124
+ I am [Name]. [Philosophy].
125
+ </identity>
126
+
127
+ <handles>
128
+ - Task 1
129
+ - Task 2
130
+ </handles>
131
+
132
+ <skills>
133
+ Load `skill-name` before complex tasks.
134
+ </skills>
135
+
136
+ <rules>
137
+ 1. **NEVER FABRICATE** - Must call tools.
138
+ 2. Rule 2
139
+ 3. Rule 3
140
+ </rules>
141
+
142
+ <protocol>
143
+ Input: JSON task spec
144
+ Output: JSON only
145
+ Schema: { "status": "success|error", "result": {}, "summary": "" }
146
+ </protocol>
147
+ ```
148
+ </agent-structure>
149
+
150
+ <customization>
151
+ CREATE: Add to `.claude/agents/` following structure above
152
+ MODIFY: Edit `.claude/agents/*.md`
153
+ DISABLE: Move to `docs/agents/`
154
+ WITHOUT AGENTS: Use MCP tools directly
155
+ </customization>
102
156
 
157
+ <directory>
103
158
  ```
104
159
  workspace/ # Local config (check FIRST)
105
160
  .claude/
106
- agents/ # Agent definitions
161
+ agents/ # Agent definitions (XML tags, JSON output)
107
162
  hooks/ # Safety hooks
108
- skills/ # Documentation
163
+ skills/ # On-demand documentation
109
164
  commands/ # Slash commands
110
165
  settings.json # Permissions
111
166
  ```
112
-
113
- ---
114
-
115
- # Customization
116
-
117
- ## Create Agent
118
- ```yaml
119
- # .claude/agents/your-agent.md
120
- ---
121
- name: your-agent
122
- description: What it does.\n\n<example>...</example>
123
- model: haiku
124
- ---
125
- [Agent body with responsibilities]
126
- ```
127
-
128
- ## Modify Agents
129
- Edit `.claude/agents/*.md` - change personality, responsibilities, model, tools.
130
-
131
- ## Disable Agents
132
- Move from `.claude/agents/` to `docs/agents/`, remove from delegation table.
133
-
134
- ## Without Agents
135
- Use MCP tools directly: `list_workflows`, `create_activity`, `get_workflow_schema`, etc.
167
+ </directory>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hailer/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "config": {
5
5
  "docker": {
6
6
  "registry": "registry.gitlab.com/hailer-repos/hailer-mcp"