@hailer/mcp 1.1.16 → 1.1.17-beta.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/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 +19 -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,52 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: sdk-ws-config-skill
|
|
3
3
|
description: Comprehensive workspace configuration - workflows, fields, phases
|
|
4
|
-
version: 1.
|
|
5
|
-
triggers: Create workflow, add field, configure phase, field visibility, phase transitions
|
|
4
|
+
version: 1.8.0
|
|
5
|
+
triggers: Create workflow, add field, configure phase, field visibility, phase transitions, new project, init workspace, setup SDK, create workspace
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# New Project Setup
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
mkdir my-hailer-project && cd my-hailer-project
|
|
12
|
+
npm init -y
|
|
13
|
+
npm install @hailer/sdk typescript vitest --save-dev
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Create `.env`:
|
|
17
|
+
```
|
|
18
|
+
HAILER_API_KEY=your_api_key
|
|
19
|
+
HAILER_WORKSPACE_ID=your_workspace_id
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Create `config.json`:
|
|
23
|
+
```json
|
|
24
|
+
{ "workspaceId": "your_workspace_id", "apiUrl": "https://api.hailer.com" }
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run pull # Download workspace config into workspace/
|
|
29
|
+
git init
|
|
30
|
+
echo ".env" >> .gitignore
|
|
31
|
+
echo "node_modules" >> .gitignore
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Project structure after pull:**
|
|
35
|
+
```
|
|
36
|
+
workspace/
|
|
37
|
+
├── workflows.ts, enums.ts (AUTO-GENERATED), teams.ts, groups.ts
|
|
38
|
+
├── hailer.d.ts ← AUTO-GENERATED (never edit)
|
|
39
|
+
└── [Workflow]_[id]/
|
|
40
|
+
├── main.ts, fields.ts, phases.ts
|
|
41
|
+
└── functions/*.ts
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**`npm run pull` vs `npm run generate`:**
|
|
45
|
+
- `npm run pull` — Downloads workspace config into `workspace/` (editable TypeScript files: fields, phases, workflows, enums, etc.)
|
|
46
|
+
- `npm run generate` — Generates `hailer-types.ts` (a single file with workflow/phase/field enums for use in app code). These are separate commands serving different purposes.
|
|
47
|
+
|
|
48
|
+
**After setup:** Always set a default team on each workflow (see CRITICAL rule below).
|
|
49
|
+
|
|
6
50
|
---
|
|
7
51
|
|
|
8
52
|
# Workspace Configuration
|
|
@@ -13,6 +57,7 @@ triggers: Create workflow, add field, configure phase, field visibility, phase t
|
|
|
13
57
|
workspace/
|
|
14
58
|
├── workflows.ts ← Workflow registry
|
|
15
59
|
├── enums.ts ← AUTO-GENERATED (never edit)
|
|
60
|
+
├── hailer.d.ts ← AUTO-GENERATED (never edit)
|
|
16
61
|
├── teams.ts, groups.ts ← Access control
|
|
17
62
|
├── insights.ts ← SQL-like reports
|
|
18
63
|
└── [Workflow]_[id]/
|
|
@@ -379,312 +424,51 @@ The `key` property is an optional URL-safe identifier for the field. If omitted,
|
|
|
379
424
|
- Always for fields referenced in insights or functions
|
|
380
425
|
- Optional for internal-only fields (auto-generated is fine)
|
|
381
426
|
|
|
382
|
-
### Field
|
|
383
|
-
|
|
384
|
-
The `description` property adds help text below the field input in Hailer forms.
|
|
385
|
-
|
|
386
|
-
**When to use:**
|
|
387
|
-
- Fields with non-obvious formats ("Enter date as DD.MM.YYYY")
|
|
388
|
-
- Fields requiring specific values ("Must be 8-digit code")
|
|
389
|
-
- Fields with business rules ("Leave empty to use default pricing")
|
|
390
|
-
- Fields that differ from similar-named fields in other workflows
|
|
391
|
-
|
|
392
|
-
**Examples:**
|
|
393
|
-
```typescript
|
|
394
|
-
{
|
|
395
|
-
label: "Project Code",
|
|
396
|
-
type: "text",
|
|
397
|
-
key: "project_code",
|
|
398
|
-
description: "8-character code from the ERP system (e.g., PRJ-12345)"
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
{
|
|
402
|
-
label: "Discount %",
|
|
403
|
-
type: "numeric",
|
|
404
|
-
key: "discount_pct",
|
|
405
|
-
description: "Enter 0-100. Applied to subtotal before VAT."
|
|
406
|
-
}
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
### Field Types Reference
|
|
410
|
-
|
|
411
|
-
Complete reference of all Hailer field types. Source: `hailer.d.ts` HailerFieldType.
|
|
412
|
-
|
|
413
|
-
#### Quick Reference Table
|
|
414
|
-
|
|
415
|
-
| Type | Use For | Value Format (CRUD) | Notes |
|
|
416
|
-
|------|---------|---------------------|-------|
|
|
417
|
-
| `text` | Short text (single line) | `"string"` | |
|
|
418
|
-
| `textarea` | Long text (multi-line) | `"string"` | Plain text |
|
|
419
|
-
| `textunit` | Text with unit suffix | `"string"` | Display unit |
|
|
420
|
-
| `numeric` | Numbers | `123` or `45.67` | |
|
|
421
|
-
| `numericunit` | Numbers with unit | `123` | Unit in display |
|
|
422
|
-
| `date` | Single date | `1730937600000` (ms) | Unix timestamp |
|
|
423
|
-
| `datetime` | Date + time | `1730937600000` (ms) | Unix timestamp |
|
|
424
|
-
| `daterange` | Date span | `{start, end}` | Both timestamps |
|
|
425
|
-
| `datetimerange` | Date+time span | `{start, end}` | Both timestamps |
|
|
426
|
-
| `time` | Time only | `1765863000000` (ms) | Timestamp, but only time shown (e.g., "17:00") |
|
|
427
|
-
| `timerange` | Time span | `{start, end}` | Timestamps, shown as "17:00 - 18:00" |
|
|
428
|
-
| `textpredefinedoptions` | Dropdown select | `"Option"` | **STRING not array!** See section below. |
|
|
429
|
-
| `users` | Single user | `"userId"` | STRING not array! |
|
|
430
|
-
| `teams` | Team | `"teamId"` | Team selector |
|
|
431
|
-
| `activitylink` | Link to activity | `"activityId"` | STRING not array! |
|
|
432
|
-
| `linkedfrom` | Backlink (read-only) | N/A | Auto-populated |
|
|
433
|
-
| `country` | Country picker | `"FI"` | ISO country code |
|
|
434
|
-
| `subheader` | Section divider | N/A | UI only, no data |
|
|
435
|
-
| `numeric` + `modifier.checkbox` | Checkbox/boolean | `1` or `0` | See Modified Fields |
|
|
436
|
-
| `text` + `modifier.file` | File/picture upload | Object | See Modified Fields |
|
|
437
|
-
|
|
438
|
-
**Note:** No multi-select types exist. For multiple values, use multiple fields or comma-separated text.
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
#### Text Fields
|
|
443
|
-
|
|
444
|
-
```typescript
|
|
445
|
-
// Short text (single line)
|
|
446
|
-
{ type: "text", label: "Title" }
|
|
447
|
-
|
|
448
|
-
// Long text (multi-line, plain)
|
|
449
|
-
{ type: "textarea", label: "Description" }
|
|
450
|
-
|
|
451
|
-
// Text with unit suffix (e.g., "100 pcs")
|
|
452
|
-
{ type: "textunit", label: "Quantity Text", unit: "pcs" }
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
**When to use:**
|
|
456
|
-
- `text` - Names, titles, short answers
|
|
457
|
-
- `textarea` - Descriptions, comments, notes
|
|
458
|
-
- `textunit` - Text that needs a unit suffix displayed
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
#### Number Fields
|
|
463
|
-
|
|
464
|
-
```typescript
|
|
465
|
-
// Plain number
|
|
466
|
-
{ type: "numeric", label: "Quantity" }
|
|
467
|
-
|
|
468
|
-
// Number with display unit
|
|
469
|
-
{ type: "numericunit", label: "Price", unit: "€" }
|
|
470
|
-
{ type: "numericunit", label: "Weight", unit: "kg" }
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
**CRITICAL:** Type is `numeric`, NOT `number`!
|
|
474
|
-
|
|
475
|
-
**When to use:**
|
|
476
|
-
- `numeric` - Quantities, counts, raw numbers
|
|
477
|
-
- `numericunit` - Prices, measurements, amounts with units
|
|
478
|
-
|
|
479
|
-
---
|
|
480
|
-
|
|
481
|
-
#### Date/Time Fields
|
|
482
|
-
|
|
483
|
-
```typescript
|
|
484
|
-
// Single date (no time)
|
|
485
|
-
{ type: "date", label: "Due Date" }
|
|
486
|
-
|
|
487
|
-
// Date with time
|
|
488
|
-
{ type: "datetime", label: "Meeting Start" }
|
|
489
|
-
|
|
490
|
-
// Date range (start + end dates)
|
|
491
|
-
{ type: "daterange", label: "Project Period" }
|
|
492
|
-
|
|
493
|
-
// Date+time range
|
|
494
|
-
{ type: "datetimerange", label: "Event" }
|
|
495
|
-
|
|
496
|
-
// Time only (no date)
|
|
497
|
-
{ type: "time", label: "Start Time" }
|
|
498
|
-
|
|
499
|
-
// Time range
|
|
500
|
-
{ type: "timerange", label: "Working Hours" }
|
|
501
|
-
```
|
|
502
|
-
|
|
503
|
-
**Value format (CRUD):**
|
|
504
|
-
- `date`, `datetime`: Unix timestamp in milliseconds → `1730937600000`
|
|
505
|
-
- `daterange`, `datetimerange`: `{ start: 1730937600000, end: 1731024000000 }`
|
|
506
|
-
- `time`: Unix timestamp (ms) → `1765863000000` (date arbitrary, only time displayed as "09:30")
|
|
507
|
-
- `timerange`: `{ start: 1765863000000, end: 1765892400000 }` (shown as "09:30 - 17:30")
|
|
508
|
-
|
|
509
|
-
**Time field note:** Stored as full timestamp but UI only shows time. Extract time portion when displaying:
|
|
510
|
-
```javascript
|
|
511
|
-
const date = new Date(timeValue);
|
|
512
|
-
const hours = date.getUTCHours();
|
|
513
|
-
const minutes = date.getUTCMinutes();
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
**When to use:**
|
|
517
|
-
- `date` - Due dates, deadlines, birthdays
|
|
518
|
-
- `datetime` - Meetings, appointments with specific time
|
|
519
|
-
- `daterange` - Projects, events, bookings with duration
|
|
520
|
-
- `datetimerange` - Events with specific start/end times
|
|
521
|
-
- `time` - Daily schedules, opening hours
|
|
522
|
-
- `timerange` - Shifts, time slots
|
|
523
|
-
|
|
524
|
-
---
|
|
525
|
-
|
|
526
|
-
#### Selection Fields
|
|
527
|
-
|
|
528
|
-
```typescript
|
|
529
|
-
// Dropdown - MUST use "textpredefinedoptions"
|
|
530
|
-
{
|
|
531
|
-
type: "textpredefinedoptions",
|
|
532
|
-
label: "Priority",
|
|
533
|
-
data: ["High", "Medium", "Low"] // String array only!
|
|
534
|
-
}
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
**CRITICAL FORMAT RULES:**
|
|
538
|
-
- Type: `textpredefinedoptions` (NOT `dropdown`, `predefinedoptions`, `select`)
|
|
539
|
-
- Property: `data` (NOT `options`)
|
|
540
|
-
- Format: `["A", "B"]` (NOT `[{label: "A", value: "a"}]`)
|
|
541
|
-
- **No multi-select exists** - use multiple fields if needed
|
|
427
|
+
### Non-Obvious Field Type Notes
|
|
542
428
|
|
|
543
|
-
**
|
|
429
|
+
**Checkbox** — not a distinct type. Use `numeric` + `modifier.checkbox: true` (stores `1`/`0`).
|
|
544
430
|
|
|
545
|
-
|
|
546
|
-
// ✅ CORRECT
|
|
547
|
-
{ type: "textpredefinedoptions", data: ["High", "Medium", "Low"] }
|
|
548
|
-
|
|
549
|
-
// ❌ WRONG
|
|
550
|
-
{ type: "dropdown", ... } // Wrong type name
|
|
551
|
-
{ type: "predefinedoptions", ... } // Missing "text" prefix
|
|
552
|
-
{ options: ["A", "B"] } // Use data, not options
|
|
553
|
-
{ data: [{label: "A", value: "a"}] } // Use strings only
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
---
|
|
557
|
-
|
|
558
|
-
#### User & Team Fields
|
|
431
|
+
**File upload** — use `text` + `modifier.file: true`.
|
|
559
432
|
|
|
560
433
|
```typescript
|
|
561
|
-
//
|
|
562
|
-
{
|
|
563
|
-
type: "users",
|
|
564
|
-
label: "Assignee",
|
|
565
|
-
inviteToDiscussionOnChange: true // Auto-invite when assigned
|
|
566
|
-
}
|
|
434
|
+
// Checkbox
|
|
435
|
+
{ label: "Is Active", type: "numeric", modifier: { checkbox: true, file: false } }
|
|
567
436
|
|
|
568
|
-
//
|
|
569
|
-
{
|
|
570
|
-
type: "teams",
|
|
571
|
-
label: "Responsible Team"
|
|
572
|
-
}
|
|
437
|
+
// File upload
|
|
438
|
+
{ label: "Attachments", type: "text", modifier: { checkbox: false, file: true } }
|
|
573
439
|
```
|
|
574
440
|
|
|
575
|
-
|
|
576
|
-
- `users`: `"5f8a1b2c3d4e5f6a7b8c9d0e"` (STRING user ID)
|
|
577
|
-
- `teams`: `"teamId"` (STRING team ID)
|
|
578
|
-
|
|
579
|
-
**Note:** No multi-select for users/teams. Use multiple fields if needed.
|
|
580
|
-
|
|
581
|
-
---
|
|
582
|
-
|
|
583
|
-
#### Link Fields
|
|
441
|
+
**`linkedfrom`** (backlink) — read-only, auto-populated. Supports `modifier.quickAdd` to create related activities inline:
|
|
584
442
|
|
|
585
443
|
```typescript
|
|
586
|
-
// Activity link (THIS → other activity)
|
|
587
|
-
{
|
|
588
|
-
type: "activitylink",
|
|
589
|
-
label: "Customer",
|
|
590
|
-
data: [WorkflowIds.customers_abc] // Plain string array!
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
// Multiple workflow link (can link to different workflow types)
|
|
594
|
-
{
|
|
595
|
-
type: "activitylink",
|
|
596
|
-
label: "Related Item",
|
|
597
|
-
data: [WorkflowIds.customers, WorkflowIds.projects]
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
// Linked from (backlink - others → THIS) - READ ONLY
|
|
601
444
|
{
|
|
602
445
|
type: "linkedfrom",
|
|
603
446
|
label: "Orders",
|
|
604
447
|
data: [WorkflowIds.orders_def],
|
|
605
448
|
modifier: {
|
|
606
449
|
quickAdd: {
|
|
607
|
-
fieldIds: [], // Fields in quick-add form
|
|
450
|
+
fieldIds: [], // Fields shown in quick-add form
|
|
608
451
|
targetFieldId: Orders_FieldIds.customer_link
|
|
609
452
|
}
|
|
610
453
|
}
|
|
611
454
|
}
|
|
612
455
|
```
|
|
613
456
|
|
|
614
|
-
|
|
457
|
+
**`activitylink`** — `data` must be a plain string array of workflow IDs (not objects):
|
|
615
458
|
```typescript
|
|
616
|
-
// ✅
|
|
617
|
-
data: ["
|
|
618
|
-
data: [WorkflowIds.customers_abc]
|
|
619
|
-
|
|
620
|
-
// ❌ WRONG - objects (causes API error)
|
|
621
|
-
data: [{ workflowId: "697b9b54477b7e412ee08b9d" }]
|
|
459
|
+
data: [WorkflowIds.customers_abc] // ✅
|
|
460
|
+
data: [{ workflowId: "697b9b54..." }] // ❌ causes API error
|
|
622
461
|
```
|
|
623
462
|
|
|
624
|
-
|
|
625
|
-
- `activitylink`: `"692abc123def456"` (STRING activity ID, not array!)
|
|
626
|
-
|
|
627
|
-
**When to use:**
|
|
628
|
-
- `activitylink` - Customer on order, project on task, parent-child relations
|
|
629
|
-
- `linkedfrom` - Show related items (read-only, auto-populated from links)
|
|
630
|
-
|
|
631
|
-
---
|
|
632
|
-
|
|
633
|
-
#### Modified Fields (Checkbox & File Upload)
|
|
634
|
-
|
|
635
|
-
Fields can have a `modifier` object that changes their behavior:
|
|
636
|
-
|
|
463
|
+
**`textpredefinedoptions`** — `data` is a string array (not `options`, not objects):
|
|
637
464
|
```typescript
|
|
638
|
-
|
|
639
|
-
{
|
|
640
|
-
label: "Is Active",
|
|
641
|
-
type: "numeric",
|
|
642
|
-
modifier: {
|
|
643
|
-
checkbox: true,
|
|
644
|
-
file: false
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
// File/Picture upload = text + modifier.file: true
|
|
649
|
-
{
|
|
650
|
-
label: "Attachments",
|
|
651
|
-
type: "text",
|
|
652
|
-
modifier: {
|
|
653
|
-
checkbox: false,
|
|
654
|
-
file: true
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
```
|
|
658
|
-
|
|
659
|
-
**Value format (CRUD):**
|
|
660
|
-
- Checkbox: `1` (true) or `0` (false) - stored as number
|
|
661
|
-
- File: File reference object (handled by Hailer UI)
|
|
662
|
-
|
|
663
|
-
**When to use:**
|
|
664
|
-
- `modifier.checkbox: true` - Boolean yes/no, toggles
|
|
665
|
-
- `modifier.file: true` - File uploads, images, attachments
|
|
666
|
-
|
|
667
|
-
---
|
|
668
|
-
|
|
669
|
-
#### Other Fields
|
|
670
|
-
|
|
671
|
-
```typescript
|
|
672
|
-
// Country picker
|
|
673
|
-
{ type: "country", label: "Country" }
|
|
674
|
-
|
|
675
|
-
// UI organization (section divider)
|
|
676
|
-
{ type: "subheader", label: "Financial Details", collapsedByDefault: true }
|
|
465
|
+
{ type: "textpredefinedoptions", data: ["High", "Medium", "Low"] } // ✅
|
|
466
|
+
{ type: "dropdown", options: [...] } // ❌
|
|
677
467
|
```
|
|
678
468
|
|
|
679
|
-
**
|
|
680
|
-
- `country`: ISO country code → `"FI"`, `"SE"`, `"US"`
|
|
681
|
-
- `subheader`: No data (UI only)
|
|
682
|
-
|
|
683
|
-
**When to use:**
|
|
684
|
-
- `country` - Address country, nationality
|
|
685
|
-
- `subheader` - Group related fields visually
|
|
469
|
+
**No multi-select types exist.** Use multiple fields if needed.
|
|
686
470
|
|
|
687
|
-
|
|
471
|
+
**`time` / `timerange`** — stored as full Unix timestamp (ms) but UI shows only the time portion. Extract with `new Date(val).getUTCHours()`.
|
|
688
472
|
|
|
689
473
|
---
|
|
690
474
|
|
|
@@ -711,7 +495,7 @@ Fields can have a `modifier` object that changes their behavior:
|
|
|
711
495
|
}
|
|
712
496
|
```
|
|
713
497
|
|
|
714
|
-
**See `
|
|
498
|
+
**See `sdk-function-fields` skill for complete function field guide.**
|
|
715
499
|
|
|
716
500
|
---
|
|
717
501
|
|
|
@@ -724,31 +508,6 @@ Fields can have a `modifier` object that changes their behavior:
|
|
|
724
508
|
| **richtext size** | Large HTML can slow down activity loading |
|
|
725
509
|
| **attachment storage** | Files stored in Hailer, count toward workspace storage |
|
|
726
510
|
|
|
727
|
-
### Calculated Function Fields
|
|
728
|
-
|
|
729
|
-
```typescript
|
|
730
|
-
{
|
|
731
|
-
_id: Tasks_FieldIds.total_abc,
|
|
732
|
-
label: "Total",
|
|
733
|
-
type: "numericunit",
|
|
734
|
-
unit: "€",
|
|
735
|
-
functionEnabled: true,
|
|
736
|
-
function: "@function:total_abc",
|
|
737
|
-
functionVariables: {
|
|
738
|
-
quantity: {
|
|
739
|
-
type: "=",
|
|
740
|
-
data: [Tasks_FieldIds.quantity_def]
|
|
741
|
-
},
|
|
742
|
-
price: {
|
|
743
|
-
type: "=",
|
|
744
|
-
data: [Tasks_FieldIds.unit_price_ghi]
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
```
|
|
749
|
-
|
|
750
|
-
See `SDK-function-field-variables` skill for variable types (=, >, <, ?).
|
|
751
|
-
|
|
752
511
|
---
|
|
753
512
|
|
|
754
513
|
## Phases
|
|
@@ -920,6 +679,18 @@ Each phase has a `fields` array that controls which fields are visible when an a
|
|
|
920
679
|
**:force variants** may delete resources not in local files.
|
|
921
680
|
**Non-force variants** only update, never delete.
|
|
922
681
|
|
|
682
|
+
### Push vs Sync — What Each Command Does
|
|
683
|
+
|
|
684
|
+
| Command | Creates | Updates | Deletes |
|
|
685
|
+
|---------|---------|---------|---------|
|
|
686
|
+
| `workflows push` | No | Yes | No |
|
|
687
|
+
| `workflows sync` | Yes | No | Yes |
|
|
688
|
+
| `fields push` | Yes | Yes | Yes (with confirmation) |
|
|
689
|
+
| `templates push` | No | Yes | No |
|
|
690
|
+
| `templates sync` | Yes | No | Yes |
|
|
691
|
+
|
|
692
|
+
**Key rule:** Use `sync` to create or delete; use `push` to update existing config. For fields, `push` handles all three operations.
|
|
693
|
+
|
|
923
694
|
### CRITICAL: Push/Pull Order
|
|
924
695
|
|
|
925
696
|
**Push FIRST, then pull.** Running pull before push overwrites local changes.
|
|
@@ -1096,11 +867,9 @@ const allPhases = [
|
|
|
1096
867
|
| Forgetting to add field to phases | New fields need to be in `phase.fields` |
|
|
1097
868
|
| Changing field type via API | Field types CANNOT be changed - see below |
|
|
1098
869
|
| Including `key` on existing phases | `key` only for NEW phases - push fails on existing |
|
|
1099
|
-
| Using `predefinedoptions` or `dropdown` | Use `textpredefinedoptions` (with "text" prefix) |
|
|
1100
|
-
| Using `options: [...]` for dropdowns | Use `data: [...]` (not options) |
|
|
1101
|
-
| `data: [{workflowId: "..."}]` for links | Use `data: ["workflowId"]` (plain string array) |
|
|
1102
870
|
| Forgetting `possibleNextPhase` | Activities stuck without phase transition links |
|
|
1103
871
|
| Missing `primaryDateField` | Activities won't show on calendar |
|
|
872
|
+
| Two fields with same name/label | One will be removed during push — deduplicate labels! |
|
|
1104
873
|
|
|
1105
874
|
---
|
|
1106
875
|
|