@hailer/mcp 1.1.16 → 1.1.17-beta.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.
- package/.claude/CLAUDE.md +117 -320
- package/.claude/commands/app-squad.md +86 -90
- package/.claude/commands/audit-squad.md +19 -19
- package/.claude/commands/autoplan.md +3 -3
- package/.claude/commands/cleanup-squad.md +16 -16
- package/.claude/commands/config-squad.md +30 -30
- package/.claude/commands/crud-squad.md +23 -23
- package/.claude/commands/data-squad.md +21 -21
- package/.claude/commands/debug-squad.md +44 -44
- package/.claude/commands/doc-squad.md +16 -16
- package/.claude/commands/help:agents.md +130 -99
- package/.claude/commands/help:commands.md +15 -15
- package/.claude/commands/help:faq.md +17 -17
- package/.claude/commands/help:plugins.md +1 -1
- package/.claude/commands/help:skills.md +18 -24
- package/.claude/commands/hotfix-squad.md +22 -22
- package/.claude/commands/integration-squad.md +22 -22
- package/.claude/commands/janitor-squad.md +31 -31
- package/.claude/commands/learn-auto.md +5 -5
- package/.claude/commands/learn.md +12 -20
- package/.claude/commands/onboard-squad.md +39 -49
- package/.claude/commands/plan-workspace.md +2 -2
- package/.claude/commands/publish.md +32 -37
- package/.claude/commands/review-squad.md +27 -27
- package/.claude/commands/stats.md +26 -12
- package/.claude/commands/swarm.md +25 -25
- package/.claude/skills/chrome-mcp-reference/SKILL.md +5 -0
- package/.claude/skills/hailer-api-client/SKILL.md +55 -16
- package/.claude/skills/hailer-app-builder/SKILL.md +4 -270
- package/.claude/skills/hailer-apps-pictures/SKILL.md +3 -3
- package/.claude/skills/hailer-design-system/SKILL.md +96 -4
- package/.claude/skills/hailer-monolith-automations/SKILL.md +138 -116
- package/.claude/skills/hailer-permissions-system/SKILL.md +6 -9
- package/.claude/skills/hailer-project-protocol/SKILL.md +20 -110
- package/.claude/skills/integration-patterns/SKILL.md +6 -6
- package/.claude/skills/lsp-setup/SKILL.md +8 -9
- package/.claude/skills/sdk-activity-patterns/SKILL.md +238 -0
- package/.claude/skills/{SDK-document-templates → sdk-document-templates}/SKILL.md +13 -340
- package/.claude/skills/{SDK-function-fields → sdk-function-fields}/SKILL.md +8 -40
- package/.claude/skills/{SDK-insight-queries → sdk-insight-queries}/SKILL.md +114 -392
- package/.claude/skills/{SDK-ws-config-skill → sdk-ws-config-skill}/SKILL.md +79 -310
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +84 -361
- package/.opencode/package-lock.json +117 -0
- package/CLAUDE.md +5 -358
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +10 -127
- package/dist/app.js.map +1 -1
- package/dist/bot/bot-manager.d.ts +3 -14
- package/dist/bot/bot-manager.d.ts.map +1 -1
- package/dist/bot/bot-manager.js +13 -4
- package/dist/bot/bot-manager.js.map +1 -1
- package/dist/bot/bot.d.ts +23 -102
- package/dist/bot/bot.d.ts.map +1 -1
- package/dist/bot/bot.js +356 -1212
- package/dist/bot/bot.js.map +1 -1
- package/dist/bot/services/bot-permissions.d.ts +50 -0
- package/dist/bot/services/bot-permissions.d.ts.map +1 -0
- package/dist/bot/services/bot-permissions.js +198 -0
- package/dist/bot/services/bot-permissions.js.map +1 -0
- package/dist/bot/services/index.d.ts +4 -2
- package/dist/bot/services/index.d.ts.map +1 -1
- package/dist/bot/services/index.js +10 -5
- package/dist/bot/services/index.js.map +1 -1
- package/dist/bot/services/message-classifier.d.ts +1 -1
- package/dist/bot/services/message-classifier.d.ts.map +1 -1
- package/dist/bot/services/message-classifier.js.map +1 -1
- package/dist/bot/services/signal-router.d.ts +32 -0
- package/dist/bot/services/signal-router.d.ts.map +1 -0
- package/dist/bot/services/signal-router.js +132 -0
- package/dist/bot/services/signal-router.js.map +1 -0
- package/dist/bot/services/system-prompt.d.ts +12 -0
- package/dist/bot/services/system-prompt.d.ts.map +1 -0
- package/dist/bot/services/system-prompt.js +93 -0
- package/dist/bot/services/system-prompt.js.map +1 -0
- package/dist/bot/services/types.d.ts +7 -34
- package/dist/bot/services/types.d.ts.map +1 -1
- package/dist/bot/services/types.js +0 -3
- package/dist/bot/services/types.js.map +1 -1
- package/dist/bot/services/workspace-refresh.d.ts +47 -0
- package/dist/bot/services/workspace-refresh.d.ts.map +1 -0
- package/dist/bot/services/workspace-refresh.js +154 -0
- package/dist/bot/services/workspace-refresh.js.map +1 -0
- package/dist/bot-config/constants.d.ts +0 -36
- package/dist/bot-config/constants.d.ts.map +1 -1
- package/dist/bot-config/constants.js +1 -76
- package/dist/bot-config/constants.js.map +1 -1
- package/dist/bot-config/context.d.ts +2 -42
- package/dist/bot-config/context.d.ts.map +1 -1
- package/dist/bot-config/context.js +13 -134
- package/dist/bot-config/context.js.map +1 -1
- package/dist/bot-config/index.d.ts +6 -15
- package/dist/bot-config/index.d.ts.map +1 -1
- package/dist/bot-config/index.js +5 -80
- package/dist/bot-config/index.js.map +1 -1
- package/dist/bot-config/loader.d.ts +16 -4
- package/dist/bot-config/loader.d.ts.map +1 -1
- package/dist/bot-config/loader.js +187 -96
- package/dist/bot-config/loader.js.map +1 -1
- package/dist/bot-config/persistence.d.ts +1 -52
- package/dist/bot-config/persistence.d.ts.map +1 -1
- package/dist/bot-config/persistence.js +3 -213
- package/dist/bot-config/persistence.js.map +1 -1
- package/dist/bot-config/state.d.ts +0 -41
- package/dist/bot-config/state.d.ts.map +1 -1
- package/dist/bot-config/state.js +0 -151
- package/dist/bot-config/state.js.map +1 -1
- package/dist/bot-config/tools.d.ts +1 -1
- package/dist/bot-config/tools.js +27 -27
- package/dist/bot-config/tools.js.map +1 -1
- package/dist/bot-config/types.d.ts +39 -32
- package/dist/bot-config/types.d.ts.map +1 -1
- package/dist/bot-config/types.js +0 -3
- package/dist/bot-config/types.js.map +1 -1
- package/dist/bot-config/webhooks.d.ts +0 -4
- package/dist/bot-config/webhooks.d.ts.map +1 -1
- package/dist/bot-config/webhooks.js +0 -13
- package/dist/bot-config/webhooks.js.map +1 -1
- package/dist/commands/seed-config.js +16 -31
- package/dist/commands/seed-config.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -15
- package/dist/config.js.map +1 -1
- package/dist/mcp/hailer-clients.js +2 -2
- package/dist/mcp/hailer-clients.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts +10 -115
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +39 -363
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/activity.d.ts +3 -0
- package/dist/mcp/tools/activity.d.ts.map +1 -1
- package/dist/mcp/tools/activity.js +8 -1
- package/dist/mcp/tools/activity.js.map +1 -1
- package/dist/mcp/tools/app-core.d.ts +3 -0
- package/dist/mcp/tools/app-core.d.ts.map +1 -1
- package/dist/mcp/tools/app-core.js +9 -2
- package/dist/mcp/tools/app-core.js.map +1 -1
- package/dist/mcp/tools/app-marketplace.d.ts +3 -0
- package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
- package/dist/mcp/tools/app-marketplace.js +13 -1
- package/dist/mcp/tools/app-marketplace.js.map +1 -1
- package/dist/mcp/tools/app-member.d.ts +3 -0
- package/dist/mcp/tools/app-member.d.ts.map +1 -1
- package/dist/mcp/tools/app-member.js +6 -1
- package/dist/mcp/tools/app-member.js.map +1 -1
- package/dist/mcp/tools/app-scaffold.d.ts +3 -0
- package/dist/mcp/tools/app-scaffold.d.ts.map +1 -1
- package/dist/mcp/tools/app-scaffold.js +15 -11
- package/dist/mcp/tools/app-scaffold.js.map +1 -1
- package/dist/mcp/tools/company.d.ts +3 -0
- package/dist/mcp/tools/company.d.ts.map +1 -1
- package/dist/mcp/tools/company.js +5 -1
- package/dist/mcp/tools/company.js.map +1 -1
- package/dist/mcp/tools/discussion.d.ts +3 -0
- package/dist/mcp/tools/discussion.d.ts.map +1 -1
- package/dist/mcp/tools/discussion.js +13 -2
- package/dist/mcp/tools/discussion.js.map +1 -1
- package/dist/mcp/tools/file.d.ts +3 -0
- package/dist/mcp/tools/file.d.ts.map +1 -1
- package/dist/mcp/tools/file.js +6 -1
- package/dist/mcp/tools/file.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +7 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +34 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/insight.d.ts +3 -0
- package/dist/mcp/tools/insight.d.ts.map +1 -1
- package/dist/mcp/tools/insight.js +18 -8
- package/dist/mcp/tools/insight.js.map +1 -1
- package/dist/mcp/tools/user.d.ts +3 -0
- package/dist/mcp/tools/user.d.ts.map +1 -1
- package/dist/mcp/tools/user.js +6 -1
- package/dist/mcp/tools/user.js.map +1 -1
- package/dist/mcp/tools/workflow-permissions.d.ts +3 -0
- package/dist/mcp/tools/workflow-permissions.d.ts.map +1 -1
- package/dist/mcp/tools/workflow-permissions.js +8 -1
- package/dist/mcp/tools/workflow-permissions.js.map +1 -1
- package/dist/mcp/tools/workflow.d.ts +3 -0
- package/dist/mcp/tools/workflow.d.ts.map +1 -1
- package/dist/mcp/tools/workflow.js +29 -28
- package/dist/mcp/tools/workflow.js.map +1 -1
- package/dist/mcp/utils/index.d.ts +4 -11
- package/dist/mcp/utils/index.d.ts.map +1 -1
- package/dist/mcp/utils/index.js +5 -36
- package/dist/mcp/utils/index.js.map +1 -1
- package/dist/mcp/utils/role-utils.d.ts +0 -32
- package/dist/mcp/utils/role-utils.d.ts.map +1 -1
- package/dist/mcp/utils/role-utils.js +0 -73
- package/dist/mcp/utils/role-utils.js.map +1 -1
- package/dist/mcp/utils/tool-helpers.d.ts +0 -25
- package/dist/mcp/utils/tool-helpers.d.ts.map +1 -1
- package/dist/mcp/utils/tool-helpers.js +0 -34
- package/dist/mcp/utils/tool-helpers.js.map +1 -1
- package/dist/mcp/webhook-handler.d.ts +4 -34
- package/dist/mcp/webhook-handler.d.ts.map +1 -1
- package/dist/mcp/webhook-handler.js +57 -74
- package/dist/mcp/webhook-handler.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +3 -78
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -2
- 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 -208
- 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/skills/SDK-activity-patterns/SKILL.md +0 -428
- package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
- package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
- package/.claude/skills/agent-structure/SKILL.md +0 -98
- 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-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/json-only-output/SKILL.md +0 -72
- package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
- package/.claude/skills/optional-parameters/SKILL.md +0 -72
- package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
- package/.claude/skills/tool-response-verification/SKILL.md +0 -92
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hailer-monolith-automations
|
|
3
|
-
description: Understanding and building automations in the Hailer project-monolith
|
|
4
|
-
version: 1.
|
|
5
|
-
triggers: monolith, automation, scheduled task, webhook automation, invoicing, data sync
|
|
3
|
+
description: Understanding and building automations in the Hailer project-monolith, including activity mover phase cascade bots
|
|
4
|
+
version: 1.4.0
|
|
5
|
+
triggers: monolith, automation, scheduled task, webhook automation, invoicing, data sync, activity mover, phase cascade, linked activities
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Hailer Monolith Automations
|
|
@@ -175,27 +175,6 @@ Sync data between Hailer and external systems.
|
|
|
175
175
|
|
|
176
176
|
## Common Patterns
|
|
177
177
|
|
|
178
|
-
### Config from AWS Secrets Manager
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { fetchConfig } from './fetch-secrets';
|
|
182
|
-
|
|
183
|
-
// Config name matches AWS secret: "monolith-{name}"
|
|
184
|
-
const config = await fetchConfig('monolith-my-automation');
|
|
185
|
-
|
|
186
|
-
// Config structure example
|
|
187
|
-
interface AutomationConfig {
|
|
188
|
-
credentials: {
|
|
189
|
-
email: string;
|
|
190
|
-
password: string;
|
|
191
|
-
};
|
|
192
|
-
triggerProcessId: string;
|
|
193
|
-
targetProcessId: string;
|
|
194
|
-
fieldMappings: Record<string, string>;
|
|
195
|
-
// ... custom config
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
178
|
### Hailer Client Connection
|
|
200
179
|
|
|
201
180
|
```typescript
|
|
@@ -215,26 +194,6 @@ const client = await Client.create({
|
|
|
215
194
|
client.disconnect();
|
|
216
195
|
```
|
|
217
196
|
|
|
218
|
-
### Activity Operations
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
// List activities
|
|
222
|
-
const { activities } = await client.request('v3.activity.list', [
|
|
223
|
-
{ processId: workflowId, phaseId: phaseId },
|
|
224
|
-
{ limit: 1000, filters: { status: { equalTo: 'Active' } }, returnFlat: true }
|
|
225
|
-
]);
|
|
226
|
-
|
|
227
|
-
// Create activities
|
|
228
|
-
const created = await client.request('v3.activity.createMany', [
|
|
229
|
-
{ processId: workflowId, phaseId: phaseId, name: 'New Activity', fields: { fieldId: value } }
|
|
230
|
-
]);
|
|
231
|
-
|
|
232
|
-
// Update activities
|
|
233
|
-
const updated = await client.request('v3.activity.updateMany', [
|
|
234
|
-
{ _id: activityId, fields: { fieldId: newValue }, phaseId: newPhaseId }
|
|
235
|
-
]);
|
|
236
|
-
```
|
|
237
|
-
|
|
238
197
|
### Structured Logging
|
|
239
198
|
|
|
240
199
|
```typescript
|
|
@@ -281,29 +240,6 @@ router.post('/my-automation', jsonParser, async (req, res) => {
|
|
|
281
240
|
|
|
282
241
|
---
|
|
283
242
|
|
|
284
|
-
## File Structure
|
|
285
|
-
|
|
286
|
-
```
|
|
287
|
-
project-monolith/
|
|
288
|
-
├── src/
|
|
289
|
-
│ ├── run.ts # Express server, all endpoints
|
|
290
|
-
│ ├── schedules.ts # All scheduled jobs
|
|
291
|
-
│ ├── fetch-secrets.ts # AWS Secrets Manager
|
|
292
|
-
│ ├── logger.ts # Winston logger
|
|
293
|
-
│ ├── types.ts # Common types
|
|
294
|
-
│ ├── utils/
|
|
295
|
-
│ │ └── hailer-utils.ts # Helper functions
|
|
296
|
-
│ └── automations/
|
|
297
|
-
│ ├── generic-handle-activities.ts # Reusable CRUD
|
|
298
|
-
│ ├── netvisor/ # Netvisor integrations
|
|
299
|
-
│ ├── procountor/ # Procountor integrations
|
|
300
|
-
│ ├── hailer/ # Hailer-internal automations
|
|
301
|
-
│ └── {customer}/ # Customer-specific automations
|
|
302
|
-
└── package.json
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
243
|
## When to Use Monolith vs Other Options
|
|
308
244
|
|
|
309
245
|
| Scenario | Solution |
|
|
@@ -311,7 +247,7 @@ project-monolith/
|
|
|
311
247
|
| Simple webhook trigger → Hailer CRUD | **Monolith** |
|
|
312
248
|
| Scheduled data sync | **Monolith** |
|
|
313
249
|
| Accounting integration (Netvisor, Procountor) | **Monolith** (existing code) |
|
|
314
|
-
|
|
|
250
|
+
| Phase cascade (move linked activities) | **Monolith activity-mover** (see Activity Mover Service section) |
|
|
315
251
|
| SCIM user provisioning | **microsoft-entra** |
|
|
316
252
|
| Kafka event processing | **digione-integration** |
|
|
317
253
|
| Complex stateful integration | **Dedicated microservice** |
|
|
@@ -448,38 +384,6 @@ In Hailer admin:
|
|
|
448
384
|
|
|
449
385
|
---
|
|
450
386
|
|
|
451
|
-
## Existing Automation Categories
|
|
452
|
-
|
|
453
|
-
### Invoicing Automations
|
|
454
|
-
- `hailer-invoicing-subscription-v2` - Scheduled subscription billing
|
|
455
|
-
- `hailer-invoicing-billable-work` - Bill tracked time/expenses
|
|
456
|
-
- `hailer-invoicing-project-won` - Invoice on project completion
|
|
457
|
-
- `3pl-invoicing-v2` - 3PL storage billing
|
|
458
|
-
- `kspt-invoicing-v2-webhook` - KSPT rental invoicing
|
|
459
|
-
|
|
460
|
-
### Data Sync Automations
|
|
461
|
-
- `netvisor-integration` - Netvisor ↔ Hailer sync
|
|
462
|
-
- `procountor-integration-main` - Procountor invoicing
|
|
463
|
-
- `severa-integration` - Severa project sync
|
|
464
|
-
- `fin-forelia-*` - Forelia logistics/forestry
|
|
465
|
-
|
|
466
|
-
### Activity Management
|
|
467
|
-
- `generic-handle-activities` - Reusable create/update
|
|
468
|
-
- `activity-archiver` - Archive old activities
|
|
469
|
-
- `porvoo-archive` - City-specific archiving
|
|
470
|
-
|
|
471
|
-
### Notifications & Alarms
|
|
472
|
-
- `porvoo-alarms` - Status checks and alerts
|
|
473
|
-
- `porvoo-notifications` - Send notification messages
|
|
474
|
-
- `3pl-saldo-alarms` - Inventory level alerts
|
|
475
|
-
|
|
476
|
-
### HR/Employee Automations
|
|
477
|
-
- `siskon-siivous-intu-*` - INTU HR sync
|
|
478
|
-
- `pohjaset-employee-task-automation` - Onboarding tasks
|
|
479
|
-
- `siskon-siivous-synttarionnittelut` - Birthday greetings
|
|
480
|
-
|
|
481
|
-
---
|
|
482
|
-
|
|
483
387
|
## Built-in Automation Reference
|
|
484
388
|
|
|
485
389
|
These are reusable, config-driven automations already in the monolith.
|
|
@@ -597,22 +501,6 @@ Webhook-based endpoints for bulk creating/updating activities via function field
|
|
|
597
501
|
}
|
|
598
502
|
```
|
|
599
503
|
|
|
600
|
-
**Field Payload Format:**
|
|
601
|
-
|
|
602
|
-
For `/create-activities`:
|
|
603
|
-
```json
|
|
604
|
-
[
|
|
605
|
-
{ "name": "New Activity", "fields": { "amount": 100 } }
|
|
606
|
-
]
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
For `/update-activities`:
|
|
610
|
-
```json
|
|
611
|
-
[
|
|
612
|
-
{ "_id": "activity-id", "fields": { "status": "completed" } }
|
|
613
|
-
]
|
|
614
|
-
```
|
|
615
|
-
|
|
616
504
|
**CRITICAL: Double-Wrapped Array for Updates**
|
|
617
505
|
|
|
618
506
|
The monolith generic handler spreads parsed JSON as arguments to `client.request()`. Function fields must output **double-wrapped array** `[[{_id, phaseId}, ...]]` so the first argument to `updateMany` is the array of updates.
|
|
@@ -672,6 +560,140 @@ return JSON.stringify([
|
|
|
672
560
|
|
|
673
561
|
---
|
|
674
562
|
|
|
563
|
+
## Activity Mover Service
|
|
564
|
+
|
|
565
|
+
Configure automated phase cascade bots. When an activity moves to a trigger phase, the bot automatically moves linked activities to target phases.
|
|
566
|
+
|
|
567
|
+
**Example:** Invoice → "Invoiced" automatically moves Invoice Rows → "Archived"
|
|
568
|
+
|
|
569
|
+
**AWS Secret:** `activity-mover-{project}`
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
### Config Schema
|
|
574
|
+
|
|
575
|
+
```typescript
|
|
576
|
+
interface Config {
|
|
577
|
+
project: string; // Hailer project identifier
|
|
578
|
+
email: string; // Integration user email
|
|
579
|
+
password: string; // Integration user password
|
|
580
|
+
logDiscussionId: string; // Discussion ID (not activity ID)
|
|
581
|
+
triggers: Trigger[];
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
interface Trigger {
|
|
585
|
+
processId: string; // Workflow that triggers automation
|
|
586
|
+
phaseId: string; // Phase that fires the trigger
|
|
587
|
+
metaDataId: string; // "Seen/Not seen" field ID
|
|
588
|
+
linkedProcesses: Process[];
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
interface Process {
|
|
592
|
+
processId: string; // Target workflow ID
|
|
593
|
+
fromPhaseIds: string[]; // Only move activities in these phases
|
|
594
|
+
toPhaseId: string; // Move to this phase
|
|
595
|
+
}
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
One config supports multiple triggers and one trigger can cascade to multiple target workflows:
|
|
599
|
+
|
|
600
|
+
```json
|
|
601
|
+
{
|
|
602
|
+
"project": "project-name",
|
|
603
|
+
"email": "activity-mover+project@hailer.com",
|
|
604
|
+
"password": "USER_PROVIDES_PASSWORD",
|
|
605
|
+
"logDiscussionId": "discussion-id",
|
|
606
|
+
"triggers": [
|
|
607
|
+
{
|
|
608
|
+
"processId": "trigger-workflow-id",
|
|
609
|
+
"phaseId": "trigger-phase-id",
|
|
610
|
+
"metaDataId": "seen-field-id",
|
|
611
|
+
"linkedProcesses": [
|
|
612
|
+
{
|
|
613
|
+
"processId": "target-workflow-id",
|
|
614
|
+
"fromPhaseIds": ["phase-1", "phase-2"],
|
|
615
|
+
"toPhaseId": "destination-phase"
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
---
|
|
624
|
+
|
|
625
|
+
### Setup Steps
|
|
626
|
+
|
|
627
|
+
**Prerequisites:**
|
|
628
|
+
- Link field must exist connecting trigger → target workflows
|
|
629
|
+
- Integration user exists with edit permissions on all workflows
|
|
630
|
+
- Activity mover service running for the project
|
|
631
|
+
|
|
632
|
+
**Step 1: Gather IDs**
|
|
633
|
+
|
|
634
|
+
Get workflow, phase, and field IDs from `workspace/`.
|
|
635
|
+
|
|
636
|
+
**Step 2: Create MetaData Field**
|
|
637
|
+
|
|
638
|
+
Add a hidden "Activity Mover Status" field to the trigger workflow:
|
|
639
|
+
|
|
640
|
+
```json
|
|
641
|
+
{
|
|
642
|
+
"id": "activityMoverStatus",
|
|
643
|
+
"label": "Activity Mover Status",
|
|
644
|
+
"type": "text",
|
|
645
|
+
"hidden": true,
|
|
646
|
+
"defaultValue": "Not seen"
|
|
647
|
+
}
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
Push the workspace config after adding the field.
|
|
651
|
+
|
|
652
|
+
**Step 3: Create Logging Activity**
|
|
653
|
+
|
|
654
|
+
Create an activity in a suitable workflow for bot logging. Note the **discussion ID** from the response (not the activity ID) — this is `logDiscussionId`.
|
|
655
|
+
|
|
656
|
+
**Step 4: Generate Config JSON**
|
|
657
|
+
|
|
658
|
+
Output the complete config (schema above) for the user to deploy.
|
|
659
|
+
|
|
660
|
+
**Step 5: User Deploys**
|
|
661
|
+
|
|
662
|
+
User manually:
|
|
663
|
+
1. Fills in the integration user password
|
|
664
|
+
2. Uploads to AWS Secrets Manager as `activity-mover-{project}`
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
### Agent Output Format
|
|
669
|
+
|
|
670
|
+
```json
|
|
671
|
+
{
|
|
672
|
+
"status": "success",
|
|
673
|
+
"result": {
|
|
674
|
+
"fields_created": ["activityMoverStatus"],
|
|
675
|
+
"logging_activity": "activity-id",
|
|
676
|
+
"logging_discussion": "discussion-id",
|
|
677
|
+
"config": { "...": "..." }
|
|
678
|
+
},
|
|
679
|
+
"summary": "Config ready - deploy to AWS",
|
|
680
|
+
"user_action": "Upload config to AWS Secrets Manager as activity-mover-{project}"
|
|
681
|
+
}
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
### Troubleshooting
|
|
687
|
+
|
|
688
|
+
| Issue | Cause | Fix |
|
|
689
|
+
|-------|-------|-----|
|
|
690
|
+
| Activities not moving | Wrong phase IDs | Verify IDs from workspace/ |
|
|
691
|
+
| "Not seen" not updating | Wrong metaDataId | Check field ID |
|
|
692
|
+
| No log messages | Wrong discussionId | Use discussion ID, not activity ID |
|
|
693
|
+
| Permission denied | Integration user lacks access | Add to workflow permissions |
|
|
694
|
+
|
|
695
|
+
---
|
|
696
|
+
|
|
675
697
|
## Reference
|
|
676
698
|
|
|
677
699
|
**Location:** `~/hailer-integration/packages/project-monolith/`
|
|
@@ -13,9 +13,9 @@ Managing access to Hailer **apps** for users and teams.
|
|
|
13
13
|
**This skill covers APP permissions only.**
|
|
14
14
|
|
|
15
15
|
For other permission types, see:
|
|
16
|
-
- **Workflow permissions** (who can access a workflow) →
|
|
17
|
-
- **Phase permissions** (field visibility, transitions) →
|
|
18
|
-
- **Team management** (create/edit teams) →
|
|
16
|
+
- **Workflow permissions** (who can access a workflow) → sdk-ws-config-skill, main.ts `members[]`
|
|
17
|
+
- **Phase permissions** (field visibility, transitions) → sdk-ws-config-skill, phases.ts
|
|
18
|
+
- **Team management** (create/edit teams) → sdk-ws-config-skill, teams.ts
|
|
19
19
|
|
|
20
20
|
App permissions = who can see/use an app in Hailer UI.
|
|
21
21
|
Workflow permissions = who can see/edit activities in a workflow.
|
|
@@ -60,8 +60,7 @@ mcp__hailer__list_apps({})
|
|
|
60
60
|
```
|
|
61
61
|
mcp__hailer__add_app_member({
|
|
62
62
|
appId: "64a1b2c3d4e5f6a7b8c9d0e1",
|
|
63
|
-
|
|
64
|
-
memberType: "user"
|
|
63
|
+
member: "user_64a1b2c3d4e5f6a7b8c9d0e2"
|
|
65
64
|
})
|
|
66
65
|
```
|
|
67
66
|
|
|
@@ -77,8 +76,7 @@ import { TeamIds } from './workspace/enums';
|
|
|
77
76
|
```
|
|
78
77
|
mcp__hailer__add_app_member({
|
|
79
78
|
appId: "64a1b2c3d4e5f6a7b8c9d0e1",
|
|
80
|
-
|
|
81
|
-
memberType: "team"
|
|
79
|
+
member: `team_${TeamIds.sales_team}`
|
|
82
80
|
})
|
|
83
81
|
```
|
|
84
82
|
|
|
@@ -87,8 +85,7 @@ mcp__hailer__add_app_member({
|
|
|
87
85
|
```
|
|
88
86
|
mcp__hailer__remove_app_member({
|
|
89
87
|
appId: "64a1b2c3d4e5f6a7b8c9d0e1",
|
|
90
|
-
|
|
91
|
-
memberType: "user"
|
|
88
|
+
member: "user_64a1b2c3d4e5f6a7b8c9d0e2"
|
|
92
89
|
})
|
|
93
90
|
```
|
|
94
91
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hailer-project-protocol
|
|
3
3
|
description: Complete Hailer project management workflow schemas, field definitions, and protocols for SDK projects
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Hailer Project Management Protocol
|
|
@@ -57,13 +57,9 @@ Every Hailer workspace uses project management workflows. Claude installs and ma
|
|
|
57
57
|
| Technical Constraints | Long text | PRD: Performance, security, compatibility |
|
|
58
58
|
| Out of Scope | Long text | PRD: What this feature does NOT include |
|
|
59
59
|
|
|
60
|
-
### Field Explanations
|
|
61
60
|
- **Project**: Features use this to link UP to their parent Project
|
|
62
61
|
- **Child Features**: Automatically shows Features that link to this Project
|
|
63
62
|
- **Dev Tasks**: Automatically shows Tasks/Bugs that link to this Feature
|
|
64
|
-
- **Documentation**: How it works, usage instructions, user-facing docs
|
|
65
|
-
- **Technical Notes**: Architecture decisions, implementation details
|
|
66
|
-
- **User Stories/Acceptance Criteria/Technical Constraints/Out of Scope**: PRD fields for requirements
|
|
67
63
|
|
|
68
64
|
---
|
|
69
65
|
|
|
@@ -94,43 +90,10 @@ Every Hailer workspace uses project management workflows. Claude installs and ma
|
|
|
94
90
|
| Files Modified | Text | - |
|
|
95
91
|
| Commits | Text | - |
|
|
96
92
|
|
|
97
|
-
### Field Explanations
|
|
98
93
|
- **Feature**: Links UP to parent Feature in Project Planning
|
|
99
94
|
- **Blocked By**: Links to other Dev Tasks that block this one
|
|
100
95
|
- **Blocks**: Automatically shows Dev Tasks that this task blocks
|
|
101
96
|
- **Related Items**: Links to related Tasks/Bugs (e.g., Bug → Task that caused it)
|
|
102
|
-
- **Related From**: Automatically shows items that link to this one
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Link Relationship Summary
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
Project Planning Dev Tasks
|
|
110
|
-
┌─────────────────────┐ ┌─────────────────────┐
|
|
111
|
-
│ Project │ │ Task/Bug/Tech Debt │
|
|
112
|
-
│ │ │ │
|
|
113
|
-
│ Child Features ◄────┼── Project ───────┼── (not used) │
|
|
114
|
-
│ (linked from) │ │ │
|
|
115
|
-
└─────────────────────┘ │ │
|
|
116
|
-
▲ │ │
|
|
117
|
-
│ │ │
|
|
118
|
-
┌────────┴────────────┐ │ │
|
|
119
|
-
│ Feature / PRD │ │ │
|
|
120
|
-
│ │ │ │
|
|
121
|
-
│ Project ────────────┼─► Project │ │
|
|
122
|
-
│ (activity link) │ │ │
|
|
123
|
-
│ │ │ │
|
|
124
|
-
│ Dev Tasks ◄─────────┼──────────────────┼── Feature │
|
|
125
|
-
│ (linked from) │ │ (activity link) │
|
|
126
|
-
└─────────────────────┘ │ │
|
|
127
|
-
│ Blocked By ─────────┼─► Dev Tasks
|
|
128
|
-
│ (activity link) │
|
|
129
|
-
│ │
|
|
130
|
-
│ Blocks ◄────────────┼── Blocked By
|
|
131
|
-
│ (linked from) │ (from other)
|
|
132
|
-
└─────────────────────┘
|
|
133
|
-
```
|
|
134
97
|
|
|
135
98
|
---
|
|
136
99
|
|
|
@@ -153,24 +116,22 @@ Notify user: "Setting up project management workflows for this workspace..."
|
|
|
153
116
|
#### Create Project Planning Workflow
|
|
154
117
|
|
|
155
118
|
```typescript
|
|
156
|
-
// Using Hailer MCP or SDK
|
|
157
119
|
{
|
|
158
120
|
name: "Project Planning",
|
|
159
121
|
phases: ["Planning", "In Progress", "On Hold", "Completed"],
|
|
160
122
|
fields: [
|
|
161
123
|
{ name: "Title", type: "text" },
|
|
162
|
-
{ name: "Description", type: "
|
|
163
|
-
{ name: "Type", type: "
|
|
164
|
-
{ name: "Project", type: "
|
|
165
|
-
{ name: "Goal", type: "
|
|
166
|
-
{ name: "Documentation", type: "
|
|
167
|
-
{ name: "Technical Notes", type: "
|
|
168
|
-
{ name: "Blockers", type: "
|
|
169
|
-
|
|
170
|
-
{ name: "
|
|
171
|
-
{ name: "
|
|
172
|
-
{ name: "
|
|
173
|
-
{ name: "Out of Scope", type: "longtext" }
|
|
124
|
+
{ name: "Description", type: "textarea" },
|
|
125
|
+
{ name: "Type", type: "textpredefinedoptions", options: ["Project", "Feature", "Session Handoff", "PRD"] },
|
|
126
|
+
{ name: "Project", type: "activitylink", linkedWorkflow: "Project Planning" },
|
|
127
|
+
{ name: "Goal", type: "textarea" },
|
|
128
|
+
{ name: "Documentation", type: "textarea" },
|
|
129
|
+
{ name: "Technical Notes", type: "textarea" },
|
|
130
|
+
{ name: "Blockers", type: "textarea" },
|
|
131
|
+
{ name: "User Stories", type: "textarea" },
|
|
132
|
+
{ name: "Acceptance Criteria", type: "textarea" },
|
|
133
|
+
{ name: "Technical Constraints", type: "textarea" },
|
|
134
|
+
{ name: "Out of Scope", type: "textarea" }
|
|
174
135
|
]
|
|
175
136
|
}
|
|
176
137
|
```
|
|
@@ -183,12 +144,12 @@ Notify user: "Setting up project management workflows for this workspace..."
|
|
|
183
144
|
phases: ["Backlog", "Todo", "In Progress", "Review", "Done"],
|
|
184
145
|
fields: [
|
|
185
146
|
{ name: "Title", type: "text" },
|
|
186
|
-
{ name: "Description", type: "
|
|
187
|
-
{ name: "Type", type: "
|
|
188
|
-
{ name: "Priority", type: "
|
|
189
|
-
{ name: "Feature", type: "
|
|
190
|
-
{ name: "Blocked By", type: "
|
|
191
|
-
{ name: "Related Items", type: "
|
|
147
|
+
{ name: "Description", type: "textarea" },
|
|
148
|
+
{ name: "Type", type: "textpredefinedoptions", options: ["Task", "Bug", "Tech Debt"] },
|
|
149
|
+
{ name: "Priority", type: "textpredefinedoptions", options: ["HIGH", "MEDIUM", "LOW"] },
|
|
150
|
+
{ name: "Feature", type: "activitylink", linkedWorkflow: "Project Planning" },
|
|
151
|
+
{ name: "Blocked By", type: "activitylink", linkedWorkflow: "Dev Tasks" },
|
|
152
|
+
{ name: "Related Items", type: "activitylink", linkedWorkflow: "Dev Tasks" },
|
|
192
153
|
{ name: "Files Modified", type: "text" },
|
|
193
154
|
{ name: "Commits", type: "text" }
|
|
194
155
|
]
|
|
@@ -330,7 +291,7 @@ Also create/update `SESSION-HANDOFF.md` in project root:
|
|
|
330
291
|
### New Feature
|
|
331
292
|
| Field | Value |
|
|
332
293
|
|-------|-------|
|
|
333
|
-
| Title | Feature name (use
|
|
294
|
+
| Title | Feature name (use arrow prefix for related features: `Sales Orders → Automations`) |
|
|
334
295
|
| Type | `Feature` |
|
|
335
296
|
| Project | Link to parent Project |
|
|
336
297
|
| Phase | `Planning` or `In Progress` |
|
|
@@ -339,7 +300,7 @@ Also create/update `SESSION-HANDOFF.md` in project root:
|
|
|
339
300
|
| Documentation | How it works (fill when complete) |
|
|
340
301
|
| Technical Notes | Architecture decisions |
|
|
341
302
|
|
|
342
|
-
### New PRD
|
|
303
|
+
### New PRD
|
|
343
304
|
| Field | Value |
|
|
344
305
|
|-------|-------|
|
|
345
306
|
| Title | `PRD: [Feature Name]` |
|
|
@@ -435,54 +396,3 @@ When user requests sync (`/project-status`):
|
|
|
435
396
|
## Session Notes
|
|
436
397
|
[Local notes not synced to Hailer]
|
|
437
398
|
```
|
|
438
|
-
|
|
439
|
-
---
|
|
440
|
-
|
|
441
|
-
## Naming Conventions
|
|
442
|
-
|
|
443
|
-
### Features
|
|
444
|
-
Use arrow prefix for related features:
|
|
445
|
-
- `Sales Orders` (main workflow)
|
|
446
|
-
- `Sales Orders → Automations`
|
|
447
|
-
- `Sales Orders → ERP Integration`
|
|
448
|
-
|
|
449
|
-
### Tasks
|
|
450
|
-
Specific and actionable:
|
|
451
|
-
- `Add customer reference field to orders`
|
|
452
|
-
- `Work on orders`
|
|
453
|
-
|
|
454
|
-
### Bugs
|
|
455
|
-
Include context:
|
|
456
|
-
- `Order total wrong when discount applied`
|
|
457
|
-
- `Calculation bug`
|
|
458
|
-
|
|
459
|
-
### PRDs
|
|
460
|
-
Always prefix with "PRD:":
|
|
461
|
-
- `PRD: User Authentication`
|
|
462
|
-
- `PRD: Sales Order Automations`
|
|
463
|
-
|
|
464
|
-
---
|
|
465
|
-
|
|
466
|
-
## Hailer Project Structure
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
workspace/ # Local config (check FIRST)
|
|
470
|
-
apps/ # Frontend apps (if monorepo)
|
|
471
|
-
integrations/ # Backend services (if monorepo)
|
|
472
|
-
.claude/
|
|
473
|
-
agents/ # Agent definitions
|
|
474
|
-
hooks/ # Safety hooks
|
|
475
|
-
skills/ # On-demand documentation
|
|
476
|
-
commands/ # Slash commands
|
|
477
|
-
settings.json # Permissions
|
|
478
|
-
CLAUDE.md # Project instructions
|
|
479
|
-
DEVELOPMENT.md # Project state (synced with Hailer)
|
|
480
|
-
SESSION-HANDOFF.md # Previous session context
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
### Key Principles
|
|
484
|
-
- **Local-first**: Check `workspace/` before making API calls
|
|
485
|
-
- **Skills before actions**: Load relevant skill before SDK/MCP commands
|
|
486
|
-
- **Hooks protect you**: Push commands require confirmation via hooks
|
|
487
|
-
- **Check scripts**: Run `npm run` to see available commands
|
|
488
|
-
- **Session continuity**: Read SESSION-HANDOFF.md when resuming work
|
|
@@ -49,8 +49,8 @@ interface Trigger {
|
|
|
49
49
|
|
|
50
50
|
interface LinkedProcess {
|
|
51
51
|
processId: string; // Target workflow ID
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
fromPhaseIds: string[]; // Move FROM these phases
|
|
53
|
+
toPhaseId: string; // Move TO this phase
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -70,8 +70,8 @@ interface LinkedProcess {
|
|
|
70
70
|
"linkedProcesses": [
|
|
71
71
|
{
|
|
72
72
|
"processId": "67dc1b7d3d2c9f6cf9a54690",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
73
|
+
"fromPhaseIds": ["67dc1b7d3d2c9f6cf9a54691", "67dc1b7d3d2c9f6cf9a54692"],
|
|
74
|
+
"toPhaseId": "67dc1b7d3d2c9f6cf9a54695"
|
|
75
75
|
}
|
|
76
76
|
]
|
|
77
77
|
}
|
|
@@ -121,13 +121,13 @@ async function processTrigger(activityId: string, trigger: Trigger) {
|
|
|
121
121
|
for (const process of trigger.linkedProcesses) {
|
|
122
122
|
const toMove = linked.filter(a =>
|
|
123
123
|
a.processId === process.processId &&
|
|
124
|
-
process.
|
|
124
|
+
process.fromPhaseIds.includes(a.phaseId)
|
|
125
125
|
);
|
|
126
126
|
|
|
127
127
|
if (toMove.length > 0) {
|
|
128
128
|
await client.request('v3.activity.updateMany', [
|
|
129
129
|
toMove.map(a => a._id),
|
|
130
|
-
{ phaseId: process.
|
|
130
|
+
{ phaseId: process.toPhaseId }
|
|
131
131
|
]);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lsp-setup
|
|
3
|
-
description: How to set up LSP (Language Server Protocol) for Claude Code - enables code intelligence for
|
|
3
|
+
description: How to set up LSP (Language Server Protocol) for Claude Code - enables code intelligence for sub-agents doing code inspection
|
|
4
4
|
version: 1.0.0
|
|
5
5
|
triggers:
|
|
6
6
|
- LSP not available
|
|
@@ -15,7 +15,7 @@ LSP (Language Server Protocol) enables code intelligence features like go-to-def
|
|
|
15
15
|
|
|
16
16
|
## Why LSP?
|
|
17
17
|
|
|
18
|
-
Without LSP, agents
|
|
18
|
+
Without LSP, sub-agents must guess about code usage via grep/file reads. With LSP:
|
|
19
19
|
- **Accurate dead code detection** - knows if exports are used elsewhere
|
|
20
20
|
- **Type error detection** - without running compiler
|
|
21
21
|
- **Find all references** - across entire codebase
|
|
@@ -78,7 +78,7 @@ claude -c
|
|
|
78
78
|
|
|
79
79
|
### Step 5: Test
|
|
80
80
|
|
|
81
|
-
Ask
|
|
81
|
+
Ask a sub-agent to find unused code in a TypeScript file:
|
|
82
82
|
```
|
|
83
83
|
Find unused code in src/App.tsx
|
|
84
84
|
```
|
|
@@ -109,13 +109,12 @@ The `typescript-lsp` plugin supports:
|
|
|
109
109
|
| `outgoingCalls` | What this function calls |
|
|
110
110
|
| `prepareCallHierarchy` | Get call hierarchy at position |
|
|
111
111
|
|
|
112
|
-
## Agents That Use LSP
|
|
112
|
+
## Sub-Agents That Use LSP
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
| **Giuseppe** | Verify code compiles before build (optional) |
|
|
114
|
+
LSP is most useful for sub-agents doing code inspection:
|
|
115
|
+
- Dead code detection, unused imports, type errors
|
|
116
|
+
- Type checking during code review
|
|
117
|
+
- Verifying code compiles before build
|
|
119
118
|
|
|
120
119
|
## Troubleshooting
|
|
121
120
|
|