@eventmodelers/cli 1.0.36 → 1.0.37
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/package.json +1 -1
- package/shared/skills/learn-eventmodelers-api/SKILL.md +12 -10
- package/stacks/modeling-kit/templates/.claude/skills/add-next-slice/SKILL.md +2 -23
- package/stacks/modeling-kit/templates/.claude/skills/add-next-slice/references/api-fallback.md +11 -0
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/SKILL.md +6 -57
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/references/api-fallback.md +68 -0
- package/stacks/modeling-kit/templates/.claude/skills/attributes/SKILL.md +4 -61
- package/stacks/modeling-kit/templates/.claude/skills/attributes/references/api-fallback.md +39 -0
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/SKILL.md +9 -53
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/references/api-fallback.md +63 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md +9 -319
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/references/examples.md +329 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/SKILL.md +23 -199
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/api-fallback.md +97 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/examples.md +35 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/SKILL.md +13 -410
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/references/api-fallback.md +22 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/references/examples.md +397 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-automation-chains/SKILL.md +132 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-automation-chains/references/api-fallback.md +21 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/SKILL.md +9 -236
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/references/examples.md +257 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +28 -302
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/references/api-fallback.md +31 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/references/examples.md +216 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/SKILL.md +30 -343
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/references/api-fallback.md +79 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/references/examples.md +282 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md +51 -400
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/references/api-fallback.md +67 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/references/examples.md +273 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/SKILL.md +45 -152
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +49 -90
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +64 -137
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +74 -65
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/references/api-fallback.md +51 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/SKILL.md +1 -5
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/references/api-fallback.md +10 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md +19 -36
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/api-fallback.md +41 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/examples.md +12 -9
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/patterns.md +1 -10
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md +26 -332
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/references/api-fallback.md +77 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/references/examples.md +271 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/SKILL.md +9 -294
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/references/examples.md +306 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md +12 -11
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/SKILL.md +6 -36
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/examples/SKILL.md +3 -110
- package/stacks/modeling-kit/templates/.claude/skills/examples/references/api-fallback.md +118 -0
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/SKILL.md +5 -25
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/references/api-fallback.md +35 -0
- package/stacks/modeling-kit/templates/.claude/skills/html-screen/SKILL.md +9 -44
- package/stacks/modeling-kit/templates/.claude/skills/html-screen/references/api-fallback.md +51 -0
- package/stacks/modeling-kit/templates/.claude/skills/place-element/SKILL.md +23 -183
- package/stacks/modeling-kit/templates/.claude/skills/place-element/references/api-fallback.md +193 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/SKILL.md +14 -81
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/references/api-fallback.md +74 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/SKILL.md +4 -45
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/references/api-fallback.md +44 -0
- package/stacks/modeling-kit/templates/.claude/skills/timeline/SKILL.md +19 -88
- package/stacks/modeling-kit/templates/.claude/skills/timeline/references/api-fallback.md +91 -0
- package/stacks/modeling-kit/templates/.claude/skills/update-prompt-status/SKILL.md +1 -9
- package/stacks/modeling-kit/templates/.claude/skills/update-prompt-status/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-integrating-legacy-systems/SKILL.md +0 -674
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/snapshotting.md +0 -204
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Examples — curl Fallback Calls
|
|
2
|
+
|
|
3
|
+
Only needed when MCP is not connected. Every call below has an MCP equivalent in the main SKILL.md — always prefer that.
|
|
4
|
+
|
|
5
|
+
## Step 2 — Resolve the element
|
|
6
|
+
|
|
7
|
+
Try the resolution strategies in order until one succeeds.
|
|
8
|
+
|
|
9
|
+
### 2a — UUID
|
|
10
|
+
If `target` looks like a UUID (pattern `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`), fetch it directly:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$target" \
|
|
14
|
+
-H "x-user-id: examples-skill"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 2b — Name search
|
|
18
|
+
If `target` is not a UUID, search by name:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/events/search?name=$(python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))' "$target")" \
|
|
22
|
+
-H "x-user-id: examples-skill"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Pick the best match (exact title match preferred; case-insensitive). If multiple matches exist, list them and ask the user to pick one.
|
|
26
|
+
|
|
27
|
+
### 2c — Cell name (spreadsheet-style, e.g. "B3")
|
|
28
|
+
If `target` matches the pattern `[A-Z]+[0-9]+`:
|
|
29
|
+
|
|
30
|
+
1. Fetch all chapters on the board to find the relevant timeline:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?type=CHAPTER" \
|
|
34
|
+
-H "x-user-id: examples-skill"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If multiple chapters exist, ask the user which one to use.
|
|
38
|
+
|
|
39
|
+
2. Fetch the chapter **fresh** to decode the grid — never use cached chapter data, as cells are updated frequently:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$CHAPTER_ID" \
|
|
43
|
+
-H "x-user-id: examples-skill"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
From `meta.timelineData`, decode the cell name into a `cellId`:
|
|
47
|
+
- Column letter(s) → 0-based column index (A=0, B=1, … Z=25, AA=26, …)
|
|
48
|
+
- Row digit → 0-based row index (1→0, 2→1, …)
|
|
49
|
+
- Find the matching column in `columns` and the matching row in `rows`.
|
|
50
|
+
- Compute: **`CELL_ID = row.id + "-" + column.id`** (cell IDs are always `<rowId>-<columnId>`).
|
|
51
|
+
|
|
52
|
+
3. **Always fetch the cell live** to get the current node list — do not rely on the `nodeId` in the chapter's cell data, as it may be stale. No MCP equivalent: `get_nodes` only filters by `type`, not `cellId`:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?cellId=$CELL_ID" \
|
|
56
|
+
-H "x-user-id: examples-skill"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use the first non-CHAPTER result (filter out CHAPTER type).
|
|
60
|
+
|
|
61
|
+
If no element is found after all strategies, stop and tell the user what was tried.
|
|
62
|
+
|
|
63
|
+
Save the resolved node as `TARGET_NODE` (full JSON including `id`, `meta`, `edges`).
|
|
64
|
+
|
|
65
|
+
## Step 3 — Load linked elements for context
|
|
66
|
+
|
|
67
|
+
Collect nearby elements to understand the domain context and generate consistent examples. **Never fetch all board nodes.** Only fetch specific nodes you already have IDs for.
|
|
68
|
+
|
|
69
|
+
### 3a — Nodes from edges
|
|
70
|
+
If `TARGET_NODE.edges` is non-empty, fetch each connected node individually by its ID:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/<EDGE_NODE_ID>" \
|
|
74
|
+
-H "x-user-id: examples-skill"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Fetch all edge-connected nodes in parallel (one request per node ID).
|
|
78
|
+
|
|
79
|
+
### 3b — Nodes from the same column (cell-based resolution only)
|
|
80
|
+
If you resolved `TARGET_NODE` via a cell name (Step 2c), you already have the full chapter `cells` array in memory. Use it — **no extra API call needed**:
|
|
81
|
+
|
|
82
|
+
- Find all cells that share the same `colId` as `TARGET_NODE`'s cell.
|
|
83
|
+
- Collect their `nodeId` values (skip the target itself and any cell without a `nodeId`).
|
|
84
|
+
- Fetch each of those nodes individually by ID (in parallel):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/<NODE_ID>" \
|
|
88
|
+
-H "x-user-id: examples-skill"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Step 5 — Write the update
|
|
92
|
+
|
|
93
|
+
Build the payload with Python to avoid shell JSON-escaping issues, then POST it:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python3 - <<EOF > /tmp/examples_payload.json
|
|
97
|
+
import json, time, uuid
|
|
98
|
+
payload = [{
|
|
99
|
+
"id": str(uuid.uuid4()),
|
|
100
|
+
"eventType": "node:changed",
|
|
101
|
+
"nodeId": "<TARGET_NODE.id>",
|
|
102
|
+
"boardId": "<BOARD_ID>",
|
|
103
|
+
"timestamp": int(time.time() * 1000),
|
|
104
|
+
"changedAttributes": ["meta.fields"],
|
|
105
|
+
"meta": {
|
|
106
|
+
"fields": <updated-fields-array as Python list>
|
|
107
|
+
}
|
|
108
|
+
}]
|
|
109
|
+
print(json.dumps(payload))
|
|
110
|
+
EOF
|
|
111
|
+
|
|
112
|
+
curl -s -w "\n%{http_code}" -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
113
|
+
-H "Content-Type: application/json" \
|
|
114
|
+
-H "x-token: $TOKEN" \
|
|
115
|
+
-H "x-board-id: $BOARD_ID" \
|
|
116
|
+
-H "x-user-id: examples-skill" \
|
|
117
|
+
--data-binary @/tmp/examples_payload.json
|
|
118
|
+
```
|
|
@@ -5,7 +5,7 @@ description: Place, resolve, or delete a comment on an eventmodelers board node.
|
|
|
5
5
|
|
|
6
6
|
# Handle Comment
|
|
7
7
|
|
|
8
|
-
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, and `BASE_URL`. Do not proceed until the connect skill has completed.
|
|
8
|
+
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until the connect skill has completed.
|
|
9
9
|
|
|
10
10
|
Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
11
11
|
|
|
@@ -37,15 +37,7 @@ Route to the matching section below based on `action`.
|
|
|
37
37
|
mcp__eventmodelers__add_comment { "boardId": "$BOARD_ID", "nodeId": "$NODE_ID", "text": "<text>", "type": "<COMMENT|TASK|QUESTION>", "author": "<author>" }
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
**Fallback (no MCP):**
|
|
41
|
-
```bash
|
|
42
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments" \
|
|
43
|
-
-H "Authorization: Bearer $TOKEN" \
|
|
44
|
-
-H "Content-Type: application/json" \
|
|
45
|
-
-d '{"text":"<text>","type":"<type>","author":"<author>"}'
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Response: `201 {"id":"<commentId>"}`
|
|
40
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Action: place".
|
|
49
41
|
|
|
50
42
|
**Batching (when called in bulk, e.g. from `wdyt`):** send one request per comment — there is no batch endpoint for comments. Fire them sequentially, not in a single payload.
|
|
51
43
|
|
|
@@ -67,11 +59,7 @@ Type: <type> | Author: <author>
|
|
|
67
59
|
mcp__eventmodelers__get_node_comments { "boardId": "$BOARD_ID", "nodeId": "$NODE_ID" }
|
|
68
60
|
```
|
|
69
61
|
|
|
70
|
-
**Fallback (no MCP):**
|
|
71
|
-
```bash
|
|
72
|
-
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments" \
|
|
73
|
-
-H "Authorization: Bearer $TOKEN"
|
|
74
|
-
```
|
|
62
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Action: resolve — Step A (resolve comment ID)".
|
|
75
63
|
|
|
76
64
|
Find the comment whose `text` contains the `text` argument (case-insensitive). If multiple match, list them and ask the user to confirm. If none match, stop: "No comment found matching '<text>' on node `<nodeId>`."
|
|
77
65
|
|
|
@@ -82,11 +70,7 @@ Find the comment whose `text` contains the `text` argument (case-insensitive). I
|
|
|
82
70
|
mcp__eventmodelers__update_comment { "boardId": "$BOARD_ID", "nodeId": "$NODE_ID", "commentId": "$COMMENT_ID", "action": "resolve" }
|
|
83
71
|
```
|
|
84
72
|
|
|
85
|
-
**Fallback (no MCP):**
|
|
86
|
-
```bash
|
|
87
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments/$COMMENT_ID/resolve" \
|
|
88
|
-
-H "Authorization: Bearer $TOKEN"
|
|
89
|
-
```
|
|
73
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Action: resolve — Step B (resolve)".
|
|
90
74
|
|
|
91
75
|
**Report:** `Resolved comment <commentId> on node <nodeId>`
|
|
92
76
|
|
|
@@ -112,10 +96,6 @@ Wait for an explicit "yes". On any other response, stop: "Deletion cancelled."
|
|
|
112
96
|
mcp__eventmodelers__update_comment { "boardId": "$BOARD_ID", "nodeId": "$NODE_ID", "commentId": "$COMMENT_ID", "action": "delete" }
|
|
113
97
|
```
|
|
114
98
|
|
|
115
|
-
**Fallback (no MCP):**
|
|
116
|
-
```bash
|
|
117
|
-
curl -s -X DELETE "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments/$COMMENT_ID" \
|
|
118
|
-
-H "Authorization: Bearer $TOKEN"
|
|
119
|
-
```
|
|
99
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Action: delete — Step C (delete)".
|
|
120
100
|
|
|
121
101
|
**Report:** `Deleted comment <commentId> from node <nodeId>`
|
package/stacks/modeling-kit/templates/.claude/skills/handle-comment/references/api-fallback.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Handle Comment — curl Fallback Calls
|
|
2
|
+
|
|
3
|
+
Only needed when MCP is not connected. Every call below has an MCP equivalent in the main SKILL.md — always prefer that.
|
|
4
|
+
|
|
5
|
+
## Action: place
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments" \
|
|
9
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
10
|
+
-H "Content-Type: application/json" \
|
|
11
|
+
-d '{"text":"<text>","type":"<type>","author":"<author>"}'
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Response: `201 {"id":"<commentId>"}`
|
|
15
|
+
|
|
16
|
+
## Action: resolve — Step A (resolve comment ID)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments" \
|
|
20
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Action: resolve — Step B (resolve)
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments/$COMMENT_ID/resolve" \
|
|
27
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Action: delete — Step C (delete)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s -X DELETE "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID/comments/$COMMENT_ID" \
|
|
34
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID"
|
|
35
|
+
```
|
|
@@ -40,14 +40,7 @@ If `nodeId` refers to a screen that already has pages (i.e. this is an adjustmen
|
|
|
40
40
|
mcp__eventmodelers__get_node { "boardId": "<BOARD_ID>", "nodeId": "<NODE_ID>" }
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
**Fallback (no MCP):**
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID" \
|
|
47
|
-
-H "x-token: $TOKEN" \
|
|
48
|
-
-H "x-board-id: $BOARD_ID" \
|
|
49
|
-
-H "x-user-id: agent"
|
|
50
|
-
```
|
|
43
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Step 2 — Load existing pages".
|
|
51
44
|
|
|
52
45
|
- If `meta.pages` is a non-empty array, use it as the base. For an edit to an existing page, change only that entry and keep the rest of the array untouched. For "add a page", append a new entry to the end of the array — never merge new content into an existing page.
|
|
53
46
|
- If it's empty or the node doesn't exist yet, design from scratch in Step 3.
|
|
@@ -59,6 +52,7 @@ Skip this step entirely when creating a brand-new node (no `nodeId` given) — g
|
|
|
59
52
|
Write normal, full-size HTML/CSS for each page — as if designing a real webpage, not a tiny thumbnail. The canvas node renders this at a real page width and visually scales it down to fit, so there is no need to shrink font sizes or padding to fit a small box; design at a realistic scale (e.g. 16px body text, generous padding) and let the node handle the shrink.
|
|
60
53
|
|
|
61
54
|
Guidelines:
|
|
55
|
+
- **Keep it simple — this is a view-only mockup, not a working app.** No JavaScript, no interactivity beyond what a static page can show (enforced server-side, see below). Keep the CSS compact: inline styles or a handful of Bulma classes are enough — don't write a large embedded `<style>` block or reinvent what Bulma already gives you for free.
|
|
62
56
|
- Each page is one complete, standalone HTML fragment — not a `data-step` div nested inside a shared blob. A multi-step flow (e.g. cart → payment → confirmation) is three separate pages in the array, each fully self-contained.
|
|
63
57
|
- Inline styles (`style="..."`) are the simplest way to keep each page self-contained.
|
|
64
58
|
- No `<script>` tags, no inline event handlers (`onclick`, `onload`, ...), no `javascript:` URIs — these are stripped server-side from every page before persisting regardless of what's sent. This is a static visual mockup, not an interactive prototype.
|
|
@@ -133,16 +127,7 @@ mcp__eventmodelers__render_screen {
|
|
|
133
127
|
}
|
|
134
128
|
```
|
|
135
129
|
|
|
136
|
-
**Fallback (no MCP):**
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/html-screens/$NODE_ID" \
|
|
140
|
-
-H "x-token: $TOKEN" \
|
|
141
|
-
-H "x-board-id: $BOARD_ID" \
|
|
142
|
-
-H "x-user-id: agent" \
|
|
143
|
-
-H "Content-Type: application/json" \
|
|
144
|
-
-d '{"pages": ["<div>...</div>", "<div>...</div>"]}'
|
|
145
|
-
```
|
|
130
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Step 4 — Updating an existing node".
|
|
146
131
|
|
|
147
132
|
**Creating a new node** (no `nodeId` — one is generated and placed into `chapterId`/`cellName`):
|
|
148
133
|
|
|
@@ -155,21 +140,12 @@ mcp__eventmodelers__create_screen {
|
|
|
155
140
|
"nodeId": "<generated-uuid>",
|
|
156
141
|
"chapterId": "<CHAPTER_ID>",
|
|
157
142
|
"cellName": "<CELL_NAME>",
|
|
158
|
-
"pages": ["<div>...</div>"]
|
|
143
|
+
"pages": ["<div>...</div>"],
|
|
144
|
+
"fields": [ /* optional — set meta.fields here too (see Step 5) instead of a separate call */ ]
|
|
159
145
|
}
|
|
160
146
|
```
|
|
161
147
|
|
|
162
|
-
**Fallback (no MCP):**
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
NODE_ID=$(uuidgen)
|
|
166
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/html-screen-nodes/$NODE_ID" \
|
|
167
|
-
-H "x-token: $TOKEN" \
|
|
168
|
-
-H "x-board-id: $BOARD_ID" \
|
|
169
|
-
-H "x-user-id: agent" \
|
|
170
|
-
-H "Content-Type: application/json" \
|
|
171
|
-
-d '{"chapterId": "'"$CHAPTER_ID"'", "cellName": "'"$CELL_NAME"'", "pages": ["<div>...</div>"]}'
|
|
172
|
-
```
|
|
148
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Step 4 — Creating a new node".
|
|
173
149
|
|
|
174
150
|
Expect `204 No Content` on success from either curl call.
|
|
175
151
|
|
|
@@ -177,6 +153,8 @@ Expect `204 No Content` on success from either curl call.
|
|
|
177
153
|
|
|
178
154
|
Every screen — new or updated — needs `meta.fields`: one entry per piece of data the screen displays or captures, each with a `mapping` naming where that data comes from. A screen with only a title and no fields is an empty placeholder from a data-lineage standpoint, even if the mockup itself looks complete.
|
|
179
155
|
|
|
156
|
+
**For a brand-new screen** (Step 4's `create_screen` call), pass `fields` directly on that call instead of a separate `node:changed` here — one round trip instead of two. This step's separate `submit_node_events` call is still how you set/update fields on an **existing** screen (`render_screen` doesn't take `fields` either).
|
|
157
|
+
|
|
180
158
|
| Field type | `mapping` | Example |
|
|
181
159
|
|---|---|---|
|
|
182
160
|
| User types a value, sent as a command | `"<CommandTitle>.<fieldName>"` | `"ReserveBike.bikeId"` |
|
|
@@ -205,20 +183,7 @@ mcp__eventmodelers__submit_node_events {
|
|
|
205
183
|
}
|
|
206
184
|
```
|
|
207
185
|
|
|
208
|
-
**Fallback (no MCP):**
|
|
209
|
-
```bash
|
|
210
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
211
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: agent" \
|
|
212
|
-
-H "Content-Type: application/json" \
|
|
213
|
-
-d '[{
|
|
214
|
-
"id": "<event-uuid>", "eventType": "node:changed", "nodeId": "<NODE_ID>",
|
|
215
|
-
"boardId": "<BOARD_ID>", "timestamp": <NOW_MS>,
|
|
216
|
-
"changedAttributes": ["meta.fields"],
|
|
217
|
-
"meta": { "type": "HTML_SCREEN", "fields": [
|
|
218
|
-
{"name": "status", "type": "String", "example": "confirmed", "mapping": "ActiveReservationView.status", "cardinality": "Single"}
|
|
219
|
-
] }
|
|
220
|
-
}]'
|
|
221
|
-
```
|
|
186
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Step 5 — Define field data lineage".
|
|
222
187
|
|
|
223
188
|
## Step 6 — Report back
|
|
224
189
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# HTML Screen Designer — curl Fallback Calls
|
|
2
|
+
|
|
3
|
+
Only needed when MCP is not connected. Every call below has an MCP equivalent in the main SKILL.md — always prefer that.
|
|
4
|
+
|
|
5
|
+
## Step 2 — Load existing pages
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$NODE_ID" \
|
|
9
|
+
-H "x-token: $TOKEN" \
|
|
10
|
+
-H "x-board-id: $BOARD_ID" \
|
|
11
|
+
-H "x-user-id: agent"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Step 4 — Updating an existing node
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/html-screens/$NODE_ID" \
|
|
18
|
+
-H "x-token: $TOKEN" \
|
|
19
|
+
-H "x-board-id: $BOARD_ID" \
|
|
20
|
+
-H "x-user-id: agent" \
|
|
21
|
+
-H "Content-Type: application/json" \
|
|
22
|
+
-d '{"pages": ["<div>...</div>", "<div>...</div>"]}'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 4 — Creating a new node
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
NODE_ID=$(uuidgen)
|
|
29
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/html-screen-nodes/$NODE_ID" \
|
|
30
|
+
-H "x-token: $TOKEN" \
|
|
31
|
+
-H "x-board-id: $BOARD_ID" \
|
|
32
|
+
-H "x-user-id: agent" \
|
|
33
|
+
-H "Content-Type: application/json" \
|
|
34
|
+
-d '{"chapterId": "'"$CHAPTER_ID"'", "cellName": "'"$CELL_NAME"'", "pages": ["<div>...</div>"]}'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Step 5 — Define field data lineage
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
41
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: agent" \
|
|
42
|
+
-H "Content-Type: application/json" \
|
|
43
|
+
-d '[{
|
|
44
|
+
"id": "<event-uuid>", "eventType": "node:changed", "nodeId": "<NODE_ID>",
|
|
45
|
+
"boardId": "<BOARD_ID>", "timestamp": <NOW_MS>,
|
|
46
|
+
"changedAttributes": ["meta.fields"],
|
|
47
|
+
"meta": { "type": "HTML_SCREEN", "fields": [
|
|
48
|
+
{"name": "status", "type": "String", "example": "confirmed", "mapping": "ActiveReservationView.status", "cardinality": "Single"}
|
|
49
|
+
] }
|
|
50
|
+
}]'
|
|
51
|
+
```
|