@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.
- package/dist/app.js +18 -5
- package/dist/bot/bot-config.d.ts +12 -1
- package/dist/bot/bot-config.js +98 -14
- package/dist/bot/bot-manager.d.ts +13 -3
- package/dist/bot/bot-manager.js +80 -25
- package/dist/bot/bot.d.ts +46 -0
- package/dist/bot/bot.js +542 -166
- package/dist/bot/services/message-classifier.js +17 -0
- package/dist/bot/services/permission-guard.d.ts +52 -0
- package/dist/bot/services/permission-guard.js +149 -0
- package/dist/bot/services/types.d.ts +5 -0
- package/dist/bot/services/typing-indicator.d.ts +6 -1
- package/dist/bot/services/typing-indicator.js +19 -3
- package/dist/config.d.ts +6 -1
- package/dist/config.js +43 -0
- package/dist/core.js +3 -6
- package/dist/mcp/UserContextCache.d.ts +5 -0
- package/dist/mcp/UserContextCache.js +51 -19
- package/dist/mcp/hailer-clients.d.ts +19 -1
- package/dist/mcp/hailer-clients.js +157 -20
- package/dist/mcp/session-store.d.ts +68 -0
- package/dist/mcp/session-store.js +169 -0
- package/dist/mcp/signal-handler.js +12 -12
- package/dist/mcp/tool-registry.d.ts +17 -4
- package/dist/mcp/tool-registry.js +37 -7
- package/dist/mcp/tools/activity.js +99 -7
- package/dist/mcp/tools/app-scaffold.js +304 -336
- package/dist/mcp/tools/company.d.ts +9 -0
- package/dist/mcp/tools/company.js +88 -0
- package/dist/mcp/tools/discussion.js +68 -0
- package/dist/mcp/tools/workflow-permissions.d.ts +15 -0
- package/dist/mcp/tools/workflow-permissions.js +204 -0
- package/dist/mcp/tools/workflow.js +57 -18
- package/dist/mcp/utils/index.d.ts +2 -0
- package/dist/mcp/utils/index.js +12 -1
- package/dist/mcp/utils/role-utils.d.ts +74 -0
- package/dist/mcp/utils/role-utils.js +151 -0
- package/dist/mcp/utils/types.d.ts +43 -1
- package/dist/mcp/utils/types.js +14 -0
- package/dist/mcp/webhook-handler.d.ts +6 -0
- package/dist/mcp/webhook-handler.js +11 -0
- package/dist/mcp-server.d.ts +23 -2
- package/dist/mcp-server.js +639 -111
- package/dist/plugins/vipunen/client.d.ts +150 -0
- package/dist/plugins/vipunen/client.js +535 -0
- package/dist/plugins/vipunen/config/schema-config.json +19 -0
- package/dist/plugins/vipunen/config/schema-doc.json +22 -0
- package/dist/plugins/vipunen/index.d.ts +41 -0
- package/dist/plugins/vipunen/index.js +88 -0
- package/dist/plugins/vipunen/tools.d.ts +26 -0
- package/dist/plugins/vipunen/tools.js +501 -0
- package/package.json +2 -1
- package/.claude/.context-watchdog.json +0 -1
- package/.claude/.session-checked +0 -1
- package/.claude/CLAUDE.md +0 -370
- package/.claude/agents/agent-ada-skill-builder.md +0 -94
- package/.claude/agents/agent-alejandro-function-fields.md +0 -342
- package/.claude/agents/agent-bjorn-config-audit.md +0 -103
- package/.claude/agents/agent-builder-agent-creator.md +0 -130
- package/.claude/agents/agent-code-simplifier.md +0 -53
- package/.claude/agents/agent-dmitri-activity-crud.md +0 -159
- package/.claude/agents/agent-giuseppe-app-builder.md +0 -247
- package/.claude/agents/agent-gunther-mcp-tools.md +0 -39
- package/.claude/agents/agent-helga-workflow-config.md +0 -204
- package/.claude/agents/agent-igor-activity-mover-automation.md +0 -125
- package/.claude/agents/agent-ingrid-doc-templates.md +0 -261
- package/.claude/agents/agent-ivan-monolith.md +0 -154
- package/.claude/agents/agent-kenji-data-reader.md +0 -86
- package/.claude/agents/agent-lars-code-inspector.md +0 -102
- package/.claude/agents/agent-marco-mockup-builder.md +0 -110
- package/.claude/agents/agent-marcus-api-documenter.md +0 -323
- package/.claude/agents/agent-marketplace-publisher.md +0 -280
- package/.claude/agents/agent-marketplace-reviewer.md +0 -309
- package/.claude/agents/agent-permissions-handler.md +0 -208
- package/.claude/agents/agent-simple-writer.md +0 -48
- package/.claude/agents/agent-svetlana-code-review.md +0 -171
- package/.claude/agents/agent-tanya-test-runner.md +0 -333
- package/.claude/agents/agent-ui-designer.md +0 -100
- package/.claude/agents/agent-viktor-sql-insights.md +0 -212
- package/.claude/agents/agent-web-search.md +0 -55
- package/.claude/agents/agent-yevgeni-discussions.md +0 -45
- package/.claude/agents/agent-zara-zapier.md +0 -159
- package/.claude/commands/app-squad.md +0 -135
- package/.claude/commands/audit-squad.md +0 -158
- package/.claude/commands/autoplan.md +0 -563
- package/.claude/commands/cleanup-squad.md +0 -98
- package/.claude/commands/config-squad.md +0 -106
- package/.claude/commands/crud-squad.md +0 -87
- package/.claude/commands/data-squad.md +0 -97
- package/.claude/commands/debug-squad.md +0 -303
- package/.claude/commands/doc-squad.md +0 -65
- package/.claude/commands/handoff.md +0 -137
- package/.claude/commands/health.md +0 -49
- package/.claude/commands/help.md +0 -29
- package/.claude/commands/help:agents.md +0 -151
- package/.claude/commands/help:commands.md +0 -78
- package/.claude/commands/help:faq.md +0 -79
- package/.claude/commands/help:plugins.md +0 -50
- package/.claude/commands/help:skills.md +0 -93
- package/.claude/commands/help:tools.md +0 -75
- package/.claude/commands/hotfix-squad.md +0 -112
- package/.claude/commands/integration-squad.md +0 -82
- package/.claude/commands/janitor-squad.md +0 -167
- package/.claude/commands/learn-auto.md +0 -120
- package/.claude/commands/learn.md +0 -120
- package/.claude/commands/mcp-list.md +0 -27
- package/.claude/commands/onboard-squad.md +0 -140
- package/.claude/commands/plan-workspace.md +0 -732
- package/.claude/commands/prd.md +0 -130
- package/.claude/commands/project-status.md +0 -82
- package/.claude/commands/publish.md +0 -138
- package/.claude/commands/recap.md +0 -69
- package/.claude/commands/restore.md +0 -64
- package/.claude/commands/review-squad.md +0 -152
- package/.claude/commands/save.md +0 -24
- package/.claude/commands/stats.md +0 -19
- package/.claude/commands/swarm.md +0 -210
- package/.claude/commands/tool-builder.md +0 -39
- package/.claude/commands/ws-pull.md +0 -44
- package/.claude/hooks/_shared-memory.cjs +0 -305
- package/.claude/hooks/_utils.cjs +0 -108
- package/.claude/hooks/agent-failure-detector.cjs +0 -383
- package/.claude/hooks/agent-usage-logger.cjs +0 -204
- package/.claude/hooks/app-edit-guard.cjs +0 -494
- package/.claude/hooks/auto-learn.cjs +0 -304
- package/.claude/hooks/bash-guard.cjs +0 -272
- package/.claude/hooks/builder-mode-manager.cjs +0 -354
- package/.claude/hooks/bulk-activity-guard.cjs +0 -271
- package/.claude/hooks/context-watchdog.cjs +0 -230
- package/.claude/hooks/delegation-reminder.cjs +0 -465
- package/.claude/hooks/design-system-lint.cjs +0 -271
- package/.claude/hooks/post-scaffold-hook.cjs +0 -181
- package/.claude/hooks/prompt-guard.cjs +0 -354
- package/.claude/hooks/publish-template-guard.cjs +0 -147
- package/.claude/hooks/session-start.cjs +0 -35
- package/.claude/hooks/shared-memory-writer.cjs +0 -147
- package/.claude/hooks/skill-injector.cjs +0 -140
- package/.claude/hooks/skill-usage-logger.cjs +0 -258
- package/.claude/hooks/src-edit-guard.cjs +0 -240
- package/.claude/hooks/sync-marketplace-agents.cjs +0 -346
- package/.claude/settings.json +0 -257
- package/.claude/skills/SDK-activity-patterns/SKILL.md +0 -428
- package/.claude/skills/SDK-document-templates/SKILL.md +0 -1033
- package/.claude/skills/SDK-function-fields/SKILL.md +0 -542
- package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
- package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
- package/.claude/skills/SDK-insight-queries/SKILL.md +0 -787
- package/.claude/skills/SDK-ws-config-skill/SKILL.md +0 -1139
- package/.claude/skills/agent-structure/SKILL.md +0 -98
- package/.claude/skills/api-documentation-patterns/SKILL.md +0 -474
- package/.claude/skills/chrome-mcp-reference/SKILL.md +0 -370
- package/.claude/skills/delegation-routing/SKILL.md +0 -202
- package/.claude/skills/frontend-design/SKILL.md +0 -254
- package/.claude/skills/hailer-activity-mover/SKILL.md +0 -213
- package/.claude/skills/hailer-api-client/SKILL.md +0 -518
- package/.claude/skills/hailer-app-builder/SKILL.md +0 -1434
- package/.claude/skills/hailer-apps-pictures/SKILL.md +0 -269
- package/.claude/skills/hailer-design-system/SKILL.md +0 -235
- package/.claude/skills/hailer-monolith-automations/SKILL.md +0 -686
- package/.claude/skills/hailer-permissions-system/SKILL.md +0 -121
- package/.claude/skills/hailer-project-protocol/SKILL.md +0 -488
- package/.claude/skills/hailer-rest-api/SKILL.md +0 -61
- package/.claude/skills/hailer-rest-api/hailer-activities.md +0 -184
- package/.claude/skills/hailer-rest-api/hailer-admin.md +0 -473
- package/.claude/skills/hailer-rest-api/hailer-calendar.md +0 -256
- package/.claude/skills/hailer-rest-api/hailer-feed.md +0 -249
- package/.claude/skills/hailer-rest-api/hailer-insights.md +0 -195
- package/.claude/skills/hailer-rest-api/hailer-messaging.md +0 -276
- package/.claude/skills/hailer-rest-api/hailer-workflows.md +0 -283
- package/.claude/skills/insight-join-patterns/SKILL.md +0 -174
- package/.claude/skills/integration-patterns/SKILL.md +0 -421
- package/.claude/skills/json-only-output/SKILL.md +0 -72
- package/.claude/skills/lsp-setup/SKILL.md +0 -160
- package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
- package/.claude/skills/optional-parameters/SKILL.md +0 -72
- package/.claude/skills/publish-hailer-app/SKILL.md +0 -244
- package/.claude/skills/testing-patterns/SKILL.md +0 -630
- package/.claude/skills/tool-builder/SKILL.md +0 -250
- package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
- package/.claude/skills/tool-response-verification/SKILL.md +0 -92
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +0 -581
- package/.hailer-mcp-port +0 -1
- package/.mcp.json +0 -13
- package/.opencode/agent/agent-ada-skill-builder.md +0 -35
- package/.opencode/agent/agent-alejandro-function-fields.md +0 -39
- package/.opencode/agent/agent-bjorn-config-audit.md +0 -36
- package/.opencode/agent/agent-builder-agent-creator.md +0 -39
- package/.opencode/agent/agent-code-simplifier.md +0 -31
- package/.opencode/agent/agent-dmitri-activity-crud.md +0 -40
- package/.opencode/agent/agent-giuseppe-app-builder.md +0 -37
- package/.opencode/agent/agent-gunther-mcp-tools.md +0 -39
- package/.opencode/agent/agent-helga-workflow-config.md +0 -204
- package/.opencode/agent/agent-igor-activity-mover-automation.md +0 -46
- package/.opencode/agent/agent-ingrid-doc-templates.md +0 -39
- package/.opencode/agent/agent-ivan-monolith.md +0 -46
- package/.opencode/agent/agent-kenji-data-reader.md +0 -53
- package/.opencode/agent/agent-lars-code-inspector.md +0 -28
- package/.opencode/agent/agent-marco-mockup-builder.md +0 -42
- package/.opencode/agent/agent-marcus-api-documenter.md +0 -53
- package/.opencode/agent/agent-marketplace-publisher.md +0 -44
- package/.opencode/agent/agent-marketplace-reviewer.md +0 -42
- package/.opencode/agent/agent-permissions-handler.md +0 -50
- package/.opencode/agent/agent-simple-writer.md +0 -45
- package/.opencode/agent/agent-svetlana-code-review.md +0 -39
- package/.opencode/agent/agent-tanya-test-runner.md +0 -57
- package/.opencode/agent/agent-ui-designer.md +0 -56
- package/.opencode/agent/agent-viktor-sql-insights.md +0 -34
- package/.opencode/agent/agent-web-search.md +0 -42
- package/.opencode/agent/agent-yevgeni-discussions.md +0 -37
- package/.opencode/agent/agent-zara-zapier.md +0 -53
- package/.opencode/commands/app-squad.md +0 -135
- package/.opencode/commands/audit-squad.md +0 -158
- package/.opencode/commands/autoplan.md +0 -563
- package/.opencode/commands/cleanup-squad.md +0 -98
- package/.opencode/commands/config-squad.md +0 -106
- package/.opencode/commands/crud-squad.md +0 -87
- package/.opencode/commands/data-squad.md +0 -97
- package/.opencode/commands/debug-squad.md +0 -303
- package/.opencode/commands/doc-squad.md +0 -65
- package/.opencode/commands/handoff.md +0 -137
- package/.opencode/commands/health.md +0 -49
- package/.opencode/commands/help-agents.md +0 -151
- package/.opencode/commands/help-commands.md +0 -32
- package/.opencode/commands/help-faq.md +0 -29
- package/.opencode/commands/help-plugins.md +0 -28
- package/.opencode/commands/help-skills.md +0 -7
- package/.opencode/commands/help-tools.md +0 -40
- package/.opencode/commands/help.md +0 -28
- package/.opencode/commands/hotfix-squad.md +0 -112
- package/.opencode/commands/integration-squad.md +0 -82
- package/.opencode/commands/janitor-squad.md +0 -167
- package/.opencode/commands/learn-auto.md +0 -120
- package/.opencode/commands/learn.md +0 -120
- package/.opencode/commands/mcp-list.md +0 -27
- package/.opencode/commands/onboard-squad.md +0 -140
- package/.opencode/commands/plan-workspace.md +0 -732
- package/.opencode/commands/prd.md +0 -131
- package/.opencode/commands/project-status.md +0 -82
- package/.opencode/commands/publish.md +0 -138
- package/.opencode/commands/recap.md +0 -69
- package/.opencode/commands/restore.md +0 -64
- package/.opencode/commands/review-squad.md +0 -152
- package/.opencode/commands/save.md +0 -24
- package/.opencode/commands/stats.md +0 -19
- package/.opencode/commands/swarm.md +0 -210
- package/.opencode/commands/tool-builder.md +0 -39
- package/.opencode/commands/ws-pull.md +0 -44
- package/.opencode/opencode.json +0 -21
- package/inbox/failures.log +0 -1
- package/inbox/usage.jsonl +0 -4
- package/scripts/postinstall.cjs +0 -64
- package/scripts/test-hal-tools.ts +0 -154
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
# Chrome DevTools MCP - Hailer App Testing
|
|
2
|
-
|
|
3
|
-
<purpose>
|
|
4
|
-
How to use Chrome DevTools MCP to navigate Hailer, open apps inside the Hailer iframe, and interact with app content for testing and debugging.
|
|
5
|
-
</purpose>
|
|
6
|
-
|
|
7
|
-
## Prerequisites
|
|
8
|
-
|
|
9
|
-
- Chrome DevTools MCP server enabled (`/mcp-enable chrome-devtools`)
|
|
10
|
-
- Chrome browser open with DevTools protocol enabled
|
|
11
|
-
- Bot credentials in project `.env` file (see Bot Login section)
|
|
12
|
-
|
|
13
|
-
## Quick Reference
|
|
14
|
-
|
|
15
|
-
| Action | Tool | Key Detail |
|
|
16
|
-
|--------|------|------------|
|
|
17
|
-
| List browser tabs | `list_pages` | Find the Hailer tab |
|
|
18
|
-
| Select a tab | `select_page` | Use `pageId` from list |
|
|
19
|
-
| Navigate | `navigate_page` | Direct URL or back/forward |
|
|
20
|
-
| Read page structure | `take_snapshot` | A11y tree with uids |
|
|
21
|
-
| Click element | `click` | Use uid from snapshot |
|
|
22
|
-
| Type text | `fill` | For inputs and selects |
|
|
23
|
-
| Run JavaScript | `evaluate_script` | Custom DOM queries |
|
|
24
|
-
| Take screenshot | `take_screenshot` | Visual verification |
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Bot Login (API + Cookie Injection)
|
|
29
|
-
|
|
30
|
-
Use a bot/service account instead of personal credentials. Each project has its own bot user. Authentication is done via API call, then the session token is injected into Chrome as a cookie.
|
|
31
|
-
|
|
32
|
-
**IMPORTANT:** Always reset the session before switching between projects/bot users.
|
|
33
|
-
|
|
34
|
-
### Environment Variables
|
|
35
|
-
|
|
36
|
-
Store bot credentials in your project's `.env` file:
|
|
37
|
-
```
|
|
38
|
-
HAILER_BOT_EMAIL=bot@yourcompany.com
|
|
39
|
-
HAILER_BOT_PASSWORD=your-bot-password
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Never commit `.env` to git.** Ensure `.gitignore` includes `.env`.
|
|
43
|
-
|
|
44
|
-
### Complete Login Flow
|
|
45
|
-
|
|
46
|
-
#### Step 1: Read credentials from project .env
|
|
47
|
-
```
|
|
48
|
-
Read({project_dir}/.env)
|
|
49
|
-
→ Extract HAILER_BOT_EMAIL and HAILER_BOT_PASSWORD values
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
#### Step 2: Reset existing session (ALWAYS do this)
|
|
53
|
-
```
|
|
54
|
-
evaluate_script(function="() => {
|
|
55
|
-
// Clear cookies
|
|
56
|
-
document.cookie.split(';').forEach(c => {
|
|
57
|
-
const name = c.trim().split('=')[0];
|
|
58
|
-
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';
|
|
59
|
-
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.hailer.com';
|
|
60
|
-
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=app.hailer.com';
|
|
61
|
-
});
|
|
62
|
-
// Clear storage
|
|
63
|
-
localStorage.clear();
|
|
64
|
-
sessionStorage.clear();
|
|
65
|
-
return 'session reset';
|
|
66
|
-
}")
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
#### Step 3: Get hlrkey via API
|
|
70
|
-
```
|
|
71
|
-
evaluate_script(function="async () => {
|
|
72
|
-
const res = await fetch('https://api.hailer.com/api/v3/login', {
|
|
73
|
-
method: 'POST',
|
|
74
|
-
headers: { 'Content-Type': 'application/json' },
|
|
75
|
-
body: JSON.stringify(['{BOT_EMAIL}', '{BOT_PASSWORD}'])
|
|
76
|
-
});
|
|
77
|
-
const data = await res.json();
|
|
78
|
-
return data;
|
|
79
|
-
}")
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The response contains the session token (`hlrkey`). Extract it from the response.
|
|
83
|
-
|
|
84
|
-
#### Step 4: Inject hlrkey into browser
|
|
85
|
-
```
|
|
86
|
-
evaluate_script(function="() => {
|
|
87
|
-
const hlrkey = '{SESSION_TOKEN_FROM_STEP_3}';
|
|
88
|
-
// Set as cookie (what Hailer checks)
|
|
89
|
-
// URL-encode the hlrkey - it contains /, +, = characters
|
|
90
|
-
document.cookie = 'hlrkey=' + encodeURIComponent(hlrkey) + '; path=/; domain=.hailer.com; secure; samesite=lax';
|
|
91
|
-
// Set in localStorage (what the SPA reads)
|
|
92
|
-
localStorage.setItem('session_token', hlrkey);
|
|
93
|
-
return 'hlrkey set';
|
|
94
|
-
}")
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
#### Step 5: Navigate and verify
|
|
98
|
-
```
|
|
99
|
-
navigate_page(type="url", url="https://app.hailer.com")
|
|
100
|
-
wait_for(text="Aktiviteetit") // or "Activities" for English workspaces
|
|
101
|
-
take_snapshot
|
|
102
|
-
→ Should show main Hailer navigation = logged in as bot
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Switching Between Projects
|
|
106
|
-
|
|
107
|
-
Each project has its own bot user. When switching:
|
|
108
|
-
1. **Always run Step 2** (reset session) first
|
|
109
|
-
2. Read the new project's `.env` for credentials
|
|
110
|
-
3. Run Steps 3-5 with new credentials
|
|
111
|
-
|
|
112
|
-
### Session Persistence
|
|
113
|
-
|
|
114
|
-
Once the hlrkey is set, the Chrome session persists across tool calls. Re-login needed when:
|
|
115
|
-
- Browser tab closed or Chrome restarted
|
|
116
|
-
- Session expires (typically several hours)
|
|
117
|
-
- Switching to a different project's bot user
|
|
118
|
-
|
|
119
|
-
To check if still logged in:
|
|
120
|
-
```
|
|
121
|
-
navigate_page(type="url", url="https://app.hailer.com")
|
|
122
|
-
take_snapshot
|
|
123
|
-
→ If "Sign in" heading visible → re-login needed
|
|
124
|
-
→ If navigation bar visible → still authenticated
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Step-by-Step: Open a Hailer App
|
|
130
|
-
|
|
131
|
-
### 1. Find and Select the Hailer Tab
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
list_pages
|
|
135
|
-
→ Find page with url containing "app.hailer.com"
|
|
136
|
-
→ select_page(pageId=N)
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
If no Hailer tab exists:
|
|
140
|
-
```
|
|
141
|
-
new_page(url="https://app.hailer.com")
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### 2. Navigate to an App
|
|
145
|
-
|
|
146
|
-
**Option A: Direct URL (fastest)**
|
|
147
|
-
|
|
148
|
-
Every Hailer app has a URL pattern:
|
|
149
|
-
```
|
|
150
|
-
https://app.hailer.com/#/apps/{appId}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
If you know the app ID:
|
|
154
|
-
```
|
|
155
|
-
navigate_page(type="url", url="https://app.hailer.com/#/apps/{appId}")
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Option B: Via Apps Menu (when you don't know the ID)**
|
|
159
|
-
|
|
160
|
-
1. Take snapshot to find the navigation
|
|
161
|
-
2. Look for the "Appit" (Apps) button in the bottom navigation bar
|
|
162
|
-
3. Click it to open the dropdown menu
|
|
163
|
-
4. Click the desired app name
|
|
164
|
-
|
|
165
|
-
```
|
|
166
|
-
take_snapshot
|
|
167
|
-
→ Find: button "Appit" (typically in bottom navigation)
|
|
168
|
-
→ click(uid="{appit_button_uid}")
|
|
169
|
-
→ take_snapshot (menu now visible with app names as menuitems)
|
|
170
|
-
→ click(uid="{desired_app_uid}")
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### 3. Wait for App to Load
|
|
174
|
-
|
|
175
|
-
After clicking an app, the iframe loads. Wait for it:
|
|
176
|
-
```
|
|
177
|
-
wait_for(text="some text you expect in the app")
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Or take a snapshot and check for the iframe:
|
|
181
|
-
```
|
|
182
|
-
take_snapshot
|
|
183
|
-
→ Look for: Iframe "Hailer App"
|
|
184
|
-
→ Inside it: RootWebArea with the app's content
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Hailer Page Structure
|
|
190
|
-
|
|
191
|
-
The Hailer UI has this consistent structure:
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
RootWebArea "Hailer"
|
|
195
|
-
├── button (notification badge) # Top-left
|
|
196
|
-
├── heading (current section name) # Top bar - "Appit", "Aktiviteetit", etc.
|
|
197
|
-
├── button "Avaa yleinen haku" # Search button
|
|
198
|
-
├── button "Avaa ilmoitukset" # Notifications button
|
|
199
|
-
│
|
|
200
|
-
├── Iframe "Hailer App" # ← APP CONTENT LIVES HERE
|
|
201
|
-
│ └── RootWebArea "{App Title}"
|
|
202
|
-
│ └── (app's own DOM tree)
|
|
203
|
-
│
|
|
204
|
-
└── navigation # Bottom navigation bar
|
|
205
|
-
├── button "Aktiviteetit" # Activities
|
|
206
|
-
├── button "Tiedotteet" # News
|
|
207
|
-
├── button "Keskustelut" # Discussions
|
|
208
|
-
├── button "Kalenteri" # Calendar
|
|
209
|
-
├── button "Appit" # Apps (click to see app list)
|
|
210
|
-
└── button "Käyttäjät" # Users
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**Key insight:** The bottom nav labels are in Finnish in Finnish workspaces. "Appit" = Apps.
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
## Interacting with App Content Inside the Iframe
|
|
218
|
-
|
|
219
|
-
Chrome DevTools MCP **automatically traverses iframes**. Elements inside the app iframe get their own uids and are fully interactive.
|
|
220
|
-
|
|
221
|
-
### Reading App Content
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
take_snapshot
|
|
225
|
-
→ Elements inside "Iframe 'Hailer App'" have normal uids
|
|
226
|
-
→ Click, fill, hover them like any other element
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
With `verbose=true`, you get the full a11y tree including iframe internals:
|
|
230
|
-
```
|
|
231
|
-
take_snapshot(verbose=true)
|
|
232
|
-
→ Shows complete DOM hierarchy including nested iframe elements
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### Clicking App Elements
|
|
236
|
-
|
|
237
|
-
Elements inside the iframe work just like any other:
|
|
238
|
-
```
|
|
239
|
-
click(uid="{element_inside_iframe}")
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Filling Form Fields Inside the App
|
|
243
|
-
|
|
244
|
-
```
|
|
245
|
-
fill(uid="{input_uid}", value="text to enter")
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### Running JavaScript Inside the App Iframe
|
|
249
|
-
|
|
250
|
-
To run JS specifically inside the iframe (not the parent Hailer shell):
|
|
251
|
-
```
|
|
252
|
-
evaluate_script(function="() => {
|
|
253
|
-
const iframe = document.querySelector('iframe');
|
|
254
|
-
return iframe?.contentDocument?.title;
|
|
255
|
-
}")
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
**Note:** Cross-origin iframes block `contentDocument` access. For local dev apps (`localhost:3000`), this works because Hailer allows it via `allow="clipboard-read; clipboard-write"`. For production apps on different domains, use the snapshot/click approach instead.
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Common Patterns
|
|
263
|
-
|
|
264
|
-
### Pattern: Verify App Loaded Correctly
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
navigate_page(type="url", url="https://app.hailer.com/#/apps/{appId}")
|
|
268
|
-
wait_for(text="{expected text in app}")
|
|
269
|
-
take_snapshot
|
|
270
|
-
→ Verify iframe contains expected content
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Pattern: Test App After Code Change
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
# After modifying app code and dev server hot-reloads:
|
|
277
|
-
navigate_page(type="reload")
|
|
278
|
-
wait_for(text="{expected text}")
|
|
279
|
-
take_snapshot
|
|
280
|
-
→ Verify changes are reflected
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Pattern: Check Console for Errors
|
|
284
|
-
|
|
285
|
-
```
|
|
286
|
-
list_console_messages(types=["error", "warn"])
|
|
287
|
-
→ Shows errors from both Hailer shell and iframe app
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Pattern: Monitor Network Requests
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
list_network_requests(resourceTypes=["fetch", "xhr"])
|
|
294
|
-
→ Shows API calls from the app to Hailer backend
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
### Pattern: Screenshot for Visual Verification
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
# Full page
|
|
301
|
-
take_screenshot
|
|
302
|
-
|
|
303
|
-
# Just the iframe app
|
|
304
|
-
take_screenshot(uid="{iframe_uid}")
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
### Pattern: Get App ID from URL
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
evaluate_script(function="() => window.location.hash")
|
|
311
|
-
→ "#/apps/6846bcbd9f213880bdf0f488"
|
|
312
|
-
→ App ID is the part after /apps/
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### Pattern: List All Available Apps
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
# Click the Apps menu button
|
|
319
|
-
click(uid="{appit_button_uid}")
|
|
320
|
-
take_snapshot
|
|
321
|
-
→ Menu items are the available apps with their names
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Local Development Apps
|
|
327
|
-
|
|
328
|
-
Local dev apps point their iframe to `http://localhost:3000`. The Hailer shell wraps them identically to production apps.
|
|
329
|
-
|
|
330
|
-
| Property | Value |
|
|
331
|
-
|----------|-------|
|
|
332
|
-
| Iframe src | `http://localhost:3000/index.html` |
|
|
333
|
-
| Iframe allow | `clipboard-read; clipboard-write` |
|
|
334
|
-
| App SDK communication | `window.postMessage` between iframe and parent |
|
|
335
|
-
| Hot reload | Works - Vite HMR updates inside iframe |
|
|
336
|
-
|
|
337
|
-
To test a local dev app:
|
|
338
|
-
1. Start the app dev server: `npm run dev` (in the app directory)
|
|
339
|
-
2. Navigate to the app in Hailer (via URL or Apps menu)
|
|
340
|
-
3. The iframe loads from localhost
|
|
341
|
-
4. Changes hot-reload automatically
|
|
342
|
-
|
|
343
|
-
---
|
|
344
|
-
|
|
345
|
-
## Troubleshooting
|
|
346
|
-
|
|
347
|
-
| Issue | Fix |
|
|
348
|
-
|-------|-----|
|
|
349
|
-
| No Hailer tab | `new_page(url="https://app.hailer.com")` |
|
|
350
|
-
| App shows blank iframe | Dev server not running - start `npm run dev` |
|
|
351
|
-
| Can't find elements | Use `take_snapshot(verbose=true)` for full tree |
|
|
352
|
-
| Iframe content not in snapshot | Wait for load: `wait_for(text="...")` |
|
|
353
|
-
| Console errors from app | `list_console_messages(types=["error"])` |
|
|
354
|
-
| Network requests failing | `list_network_requests` then `get_network_request(reqid=N)` |
|
|
355
|
-
| Element click not working | Try `evaluate_script` with direct DOM manipulation |
|
|
356
|
-
|
|
357
|
-
---
|
|
358
|
-
|
|
359
|
-
## Navigation Labels (Finnish ↔ English)
|
|
360
|
-
|
|
361
|
-
| Finnish | English | What it does |
|
|
362
|
-
|---------|---------|-------------|
|
|
363
|
-
| Aktiviteetit | Activities | Main activity list |
|
|
364
|
-
| Tiedotteet | News | News feed |
|
|
365
|
-
| Keskustelut | Discussions | Chat/discussions |
|
|
366
|
-
| Kalenteri | Calendar | Calendar view |
|
|
367
|
-
| Appit | Apps | Apps menu (dropdown) |
|
|
368
|
-
| Käyttäjät | Users | User management |
|
|
369
|
-
| Avaa yleinen haku | Open search | Global search |
|
|
370
|
-
| Avaa ilmoitukset | Open notifications | Notification panel |
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: delegation-routing
|
|
3
|
-
description: Full agent routing table, chaining patterns, and delegation protocol
|
|
4
|
-
version: 1.0.1
|
|
5
|
-
triggers: which agent, routing, delegate, agent for, chain agents, multi-agent
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Agent Delegation & Routing
|
|
9
|
-
|
|
10
|
-
Load this skill when:
|
|
11
|
-
- Routing is ambiguous ("is this Viktor or Alejandro?")
|
|
12
|
-
- Planning multi-agent orchestration
|
|
13
|
-
- User asks "which agent for X?"
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Full Agent Routing Table
|
|
18
|
-
|
|
19
|
-
### Data & Config
|
|
20
|
-
| Agent | Purpose | When to Use |
|
|
21
|
-
|-------|---------|-------------|
|
|
22
|
-
| **Kenji** | LOCAL-FIRST data retrieval - reads workspace/ before API | Schema lookups, field lists, workflow metadata, activity counts |
|
|
23
|
-
| **Dmitri** | Creates and updates Hailer activity data (WRITE-ONLY) | Single/bulk activity creation, updates, phase transitions |
|
|
24
|
-
| **Helga** | Manages workspace config as infrastructure-as-code | Create workflows, add fields/phases, teams, groups, permissions. **Auto-spawns Alejandro** for name functions (always) + function fields (if PRD specifies) |
|
|
25
|
-
|
|
26
|
-
### Apps & UI
|
|
27
|
-
| Agent | Purpose | When to Use |
|
|
28
|
-
|-------|---------|-------------|
|
|
29
|
-
| **Giuseppe** | Builds Hailer apps with @hailer/app-sdk and Chakra UI | Full React/TypeScript app development with Hailer Design System |
|
|
30
|
-
| **Marco** | Creates demo apps (non-functional) for validation | Fast prototyping, stakeholder demos before building production |
|
|
31
|
-
| **UI Designer** | Designs app interfaces - layout, components, aesthetic | Design spec creation before Giuseppe builds (tone, signature element) |
|
|
32
|
-
|
|
33
|
-
### Insights & Reports
|
|
34
|
-
| Agent | Purpose | When to Use |
|
|
35
|
-
|-------|---------|-------------|
|
|
36
|
-
| **Viktor** | Creates SQL-like insights over workflow data | Reports, cross-workflow JOINs, aggregations, GROUP BY queries |
|
|
37
|
-
| **Alejandro** | Creates calculated function fields AND workflow nameFunctions | Arithmetic, conditionals, date calculations, backlink aggregation, dynamic activity naming. *(Auto-spawned by Helga)* |
|
|
38
|
-
|
|
39
|
-
### Documents
|
|
40
|
-
| Agent | Purpose | When to Use |
|
|
41
|
-
|-------|---------|-------------|
|
|
42
|
-
| **Ingrid** | Document template specialist (PDF/CSV) | Create/update document templates with field mappings and pdfmake |
|
|
43
|
-
|
|
44
|
-
### Integrations
|
|
45
|
-
| Agent | Purpose | When to Use |
|
|
46
|
-
|-------|---------|-------------|
|
|
47
|
-
| **Igor** | Builds activity mover microservices | Phase cascade bots, trigger-based phase transitions |
|
|
48
|
-
| **Ivan** | Builds automations in hailer-integration monolith | Webhooks, scheduled jobs, Netvisor/Procountor/Severa integrations |
|
|
49
|
-
| **Zara** | Builds Zapier integrations for Hailer | Triggers, actions, Zap configurations (exports JSON for manual upload) |
|
|
50
|
-
|
|
51
|
-
### Code Quality
|
|
52
|
-
| Agent | Purpose | When to Use |
|
|
53
|
-
|-------|---------|-------------|
|
|
54
|
-
| **Svetlana** | Reviews code for bugs, security, best practices (READ-ONLY) | Pre-commit reviews, PR reviews, security audits |
|
|
55
|
-
| **Lars** | LSP-powered code intelligence | Find dead code, unused imports, type errors via LSP only |
|
|
56
|
-
| **Tanya** | Automated testing agent | Run vitest for functions, playwright for apps, verify builds |
|
|
57
|
-
|
|
58
|
-
### Tools & API
|
|
59
|
-
| Agent | Purpose | When to Use |
|
|
60
|
-
|-------|---------|-------------|
|
|
61
|
-
| **Gunther** | Builds MCP tools for Hailer MCP server | Create new MCP tools with Zod schemas in src/mcp/tools/ |
|
|
62
|
-
| **Marcus** | Documents Hailer API endpoints | RPC/REST endpoint docs, Joi schema extraction, @hailer/cli examples |
|
|
63
|
-
|
|
64
|
-
### Plugin System
|
|
65
|
-
| Agent | Purpose | When to Use |
|
|
66
|
-
|-------|---------|-------------|
|
|
67
|
-
| **Ada** | Creates skills from failure patterns | Detect agent failures, create skills, update agent definitions |
|
|
68
|
-
| **Builder** | Creates lean, token-efficient agents | New agents, refactor bloated agents, ensure SDK compatibility |
|
|
69
|
-
| **Bjorn** | Audits codebase configuration | Verify CLAUDE.md accuracy, hook configs, workspace structure |
|
|
70
|
-
| **Marketplace Publisher** | Publishes plugins to marketplace | Version check, publish plugins, create PRs, git workflows |
|
|
71
|
-
| **Marketplace Reviewer** | AI-powered PR reviewer for marketplace | Validate schemas, check versions, auto-merge approved PRs |
|
|
72
|
-
|
|
73
|
-
### Communication
|
|
74
|
-
| Agent | Purpose | When to Use |
|
|
75
|
-
|-------|---------|-------------|
|
|
76
|
-
| **Yevgeni** | Handles Hailer discussions | Read threads, post messages, invite/remove members |
|
|
77
|
-
| **Permissions Handler** | Manages Hailer app permissions | Grant/revoke user and team access to apps |
|
|
78
|
-
|
|
79
|
-
### Utility
|
|
80
|
-
| Agent | Purpose | When to Use |
|
|
81
|
-
|-------|---------|-------------|
|
|
82
|
-
| **Simple Writer** | Lightweight agent for basic code edits | ID replacements, string swaps, small fixes (faster than Giuseppe) |
|
|
83
|
-
| **Code Simplifier** | Simplifies code for clarity and maintainability | After completing features, offer to run |
|
|
84
|
-
| **Web Search** | Web research agent - searches and summarizes | Documentation lookups, current info, how-to questions (saves orchestrator context) |
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Don't Confuse These
|
|
89
|
-
|
|
90
|
-
| Agents | Distinction |
|
|
91
|
-
|--------|-------------|
|
|
92
|
-
| **Marco** vs **Giuseppe** | Marco = demo apps (non-functional mockups), Giuseppe = production apps |
|
|
93
|
-
| **Igor** vs **Ivan** vs **Zara** | Igor = phase cascades (activity mover), Ivan = heavy/third-party integrations, Zara = Zapier only |
|
|
94
|
-
| **Kenji** vs **Dmitri** | Kenji = READ data, Dmitri = WRITE data |
|
|
95
|
-
| **Viktor** vs **Alejandro** | Viktor = SQL insights (read-only reports), Alejandro = function fields (calculated values stored on activities) |
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Agent Chaining Patterns
|
|
100
|
-
|
|
101
|
-
Some tasks require multiple agents in sequence. When agent returns `ready_to_push`, orchestrator runs the command automatically.
|
|
102
|
-
|
|
103
|
-
### Add a New Field
|
|
104
|
-
```
|
|
105
|
-
Kenji → get IDs → Helga → add field (ready_to_push) → run push → Kenji → verify
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Create App with Workflow Data
|
|
109
|
-
```
|
|
110
|
-
Kenji → get structure → Viktor → create insight (if needed) → Giuseppe → build app → Tanya → test
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Add Calculated Field
|
|
114
|
-
```
|
|
115
|
-
Kenji → get field IDs → Alejandro → create function (ready_to_push) → run push → Tanya → test
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Create Activity
|
|
119
|
-
```
|
|
120
|
-
Kenji → get IDs → Dmitri → create activity
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Build Activity Mover
|
|
124
|
-
```
|
|
125
|
-
Kenji → get IDs → Helga → add metaData field (ready_to_push) → run push → Igor → build mover → Tanya → test
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Validate UI First
|
|
129
|
-
```
|
|
130
|
-
Kenji → get structure → Marco → demo app → (user validates) → Giuseppe → production app
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### On Chain Failure
|
|
134
|
-
- Kenji can't find ID → ask user to confirm name, suggest `/ws-pull`
|
|
135
|
-
- Push fails → delegate to Bjorn for config audit
|
|
136
|
-
- Tests fail → delegate to Svetlana for review
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Delegation Protocol
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
Task(subagent_type="agent-name", prompt="JSON task spec", model="haiku|sonnet")
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Input Format
|
|
147
|
-
```json
|
|
148
|
-
{
|
|
149
|
-
"task": "action",
|
|
150
|
-
"context": {
|
|
151
|
-
"workflow_id": "...",
|
|
152
|
-
"field_ids": {}
|
|
153
|
-
},
|
|
154
|
-
"output": []
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Output Format (JSON only, no prose)
|
|
159
|
-
```json
|
|
160
|
-
{
|
|
161
|
-
"status": "success|error|ready_to_push|needs_confirmation",
|
|
162
|
-
"result": {},
|
|
163
|
-
"summary": "max 50 chars"
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Status Values
|
|
168
|
-
| Status | Meaning | Orchestrator Action |
|
|
169
|
-
|--------|---------|---------------------|
|
|
170
|
-
| `success` | Task completed | Report to user |
|
|
171
|
-
| `error` | Task failed | Report error, maybe retry |
|
|
172
|
-
| `ready_to_push` | Files edited, needs push | Run commands in `commands` array |
|
|
173
|
-
| `needs_confirmation` | Destructive action | Ask user, then run `safe_command` |
|
|
174
|
-
|
|
175
|
-
### Flow
|
|
176
|
-
Get IDs first (Kenji) → then pass to execution agents
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Task Usage for Multi-Agent Work
|
|
181
|
-
|
|
182
|
-
Use TaskCreate/TaskUpdate when orchestrating multiple agents:
|
|
183
|
-
|
|
184
|
-
**Use tasks for:**
|
|
185
|
-
- Multi-agent orchestration (Helga spawning Alejandro)
|
|
186
|
-
- Multi-step PRD implementation
|
|
187
|
-
- Work that might span multiple turns
|
|
188
|
-
- Complex chains where tracking progress matters
|
|
189
|
-
|
|
190
|
-
**Skip tasks for:**
|
|
191
|
-
- Single-agent operations (quick field lookup, one activity creation)
|
|
192
|
-
- Simple edits (ID replacements, string swaps)
|
|
193
|
-
- Operations that complete in one turn
|
|
194
|
-
|
|
195
|
-
**Example: Creating a workflow with calculated fields**
|
|
196
|
-
```
|
|
197
|
-
TaskCreate: "Create Employees workflow"
|
|
198
|
-
TaskCreate: "Add name function to Employees" (blockedBy: workflow task)
|
|
199
|
-
TaskCreate: "Add Tenure calculated field" (blockedBy: workflow task)
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Mark tasks `in_progress` before delegating, `completed` after agent returns success.
|