@eventmodelers/cli 1.0.8 → 1.0.10
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
CHANGED
|
@@ -26,20 +26,21 @@ Server name: `eventmodelers`. Every tool takes `boardId` explicitly; none need `
|
|
|
26
26
|
| `get_board_events` | `boardId` | All board events, in sequence | §1 `GET .../events` |
|
|
27
27
|
| `search_board_events` | `boardId`, `name` | Search events by node name | §1 `GET .../events/search` |
|
|
28
28
|
| `submit_node_events` | `boardId`, `events[]` | Create/update nodes (raw `NodeChangeEvent`/edge events) | §3 `POST .../nodes/events` |
|
|
29
|
-
| `delete_node` | `boardId`, `nodeId` | Delete a node | (via `node:deleted` event, §3) |
|
|
29
|
+
| `delete_node` | `boardId`, `nodeId` | Delete a node. Deleting a chapter (timeline) cascades — every node placed in one of its cells, plus any node parented to it (e.g. SLICE_BORDER), is deleted too, along with all their edges | (via `node:deleted` event, §3) |
|
|
30
30
|
| `create_drawing` | `boardId`, `kind`, `x`, `y`, `width`, `height`, ... | Freehand canvas annotation (path/rect/text) — never placed in a cell | — (no REST equivalent; MCP-only) |
|
|
31
31
|
| `find_nodes_in_drawing` | `boardId`, `drawingId` | Nodes fully contained inside a drawing's bounding box | — (no REST equivalent; MCP-only) |
|
|
32
|
-
| `create_chapter` | `boardId`, `x?`, `y?` | Create a timeline | §2 `POST .../chapters` |
|
|
32
|
+
| `create_chapter` | `boardId`, `x?`, `y?` | Create a timeline. Omitting `x`/`y` auto-stacks it below the lowest existing chapter (by its *actual current* row-height total, not the height it was created with — safe even after `add_lane` growth), plus a fixed margin | §2 `POST .../chapters` |
|
|
33
|
+
| `get_chapter_bounds` | `boardId` | Absolute canvas bounding box `{id, title, x, y, width, height}` of every chapter on the board — width/height derived from each chapter's current row/column layout, not a guessed default. Use before picking explicit `x`/`y` for `create_chapter` (e.g. placing below the chapter with the largest `y + height`) to avoid overlapping one that grew since it was created | §2 `GET .../chapters/bounds` |
|
|
33
34
|
| `add_column` | `boardId`, `timelineId`, `index?` | Add a column | §2 `POST .../timelines/:id/columns` |
|
|
34
35
|
| `delete_column` | `boardId`, `timelineId`, `columnId` | Delete a column | §2 `DELETE .../columns/:columnId` |
|
|
35
36
|
| `add_lane` | `boardId`, `timelineId`, `type`, `label?`, `index?` | Add a lane/row | §2 `POST .../timelines/:id/lanes` |
|
|
36
37
|
| `remove_lane` | `boardId`, `timelineId`, `rowId` | Remove a lane | — (extends §2; no direct REST route) |
|
|
37
|
-
| `move_node_in_timeline` | `boardId`, `timelineId`, `movedNodeId`, `toCellId` | Move a placed node to another cell | — (MCP-only convenience) |
|
|
38
|
+
| `move_node_in_timeline` | `boardId`, `timelineId`, `movedNodeId`, `toCellId` | Move a placed node to another cell — its previous cell is automatically cleared | — (MCP-only convenience) |
|
|
38
39
|
| `move_timeline_structure` | `boardId`, `timelineId`, `kind` (`'column'\|'lane'`), `id`, `toIndex` | Reorder a column or lane (row) — `kind` picks which `id` refers to | — (MCP-only convenience) |
|
|
39
40
|
| `move_timeline_position` | `boardId`, `timelineId`, `x`, `y` | Move a chapter node on canvas | — (MCP-only convenience) |
|
|
40
|
-
| `drop_node_to_cell` | `boardId`, `timelineId`, `cellId`, `nodeId`, `nodeType` | Place an existing node into a cell | §2 `POST .../cells/:cellId/drop` |
|
|
41
|
-
| `clear_cell` | `boardId`, `timelineId`, `cellId` |
|
|
42
|
-
| `create_slice` | `boardId`, `timelineId`, `type`, `index
|
|
41
|
+
| `drop_node_to_cell` | `boardId`, `timelineId`, `cellId`, `nodeId`, `nodeType` | Place an existing node into a cell — if it was already placed elsewhere on this timeline, that cell is automatically cleared | §2 `POST .../cells/:cellId/drop` |
|
|
42
|
+
| `clear_cell` | `boardId`, `timelineId`, `cellId` | Unassign the node from a cell without deleting it — the cell becomes empty and the node survives (unplaced); no-op if already empty. Use `delete_node` to remove the node entirely | — (MCP-only convenience) |
|
|
43
|
+
| `create_slice` | `boardId`, `timelineId`, `type`, `index?`, `nodes?: {actor?, interaction?, swimlane?}` (each `{rowId?, title?}`) | Create a full slice (column + nodes + SLICE_BORDER). `rowId` targets a specific lane when the chapter has more than one lane of that type (e.g. several actor lanes); omit to use the first matching lane | §5 `POST .../slices` |
|
|
43
44
|
| `create_slice_definition` | `boardId`, `timelineId`, `columnId`, `title`, `data?`, `meta?` | Create a SLICE_BORDER over an existing column | §5 `POST .../slice-definitions` |
|
|
44
45
|
| `place_element` | `boardId`, `timelineId`, `elementType`, `title`, `columnIndex?` | Find/create an empty cell in the right lane and place a COMMAND/READMODEL/EVENT | — (MCP-only convenience; composes §2+§3) |
|
|
45
46
|
| `list_slices` | `boardId` | List slices (id, title, status) | §8 `GET .../slicedata/slices` |
|
|
@@ -217,6 +218,15 @@ Create a chapter node.
|
|
|
217
218
|
**Request body**: `{ position?: { x: number, y: number } }`
|
|
218
219
|
**Response**: `200` — chapter data
|
|
219
220
|
|
|
221
|
+
Omitting `position` auto-stacks the new chapter below the lowest existing chapter on the board, using each existing chapter's *actual current* row-height total (not the height it was created with) plus a fixed margin — so a chapter that grew via `add_lane`/`add_column` after another was stacked below it won't get overlapped by yet another auto-stacked chapter.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
### GET `/api/org/:orgId/boards/:boardId/chapters/bounds`
|
|
226
|
+
Get the absolute canvas bounding box of every chapter on the board — the same real-current-size derivation `create_chapter`'s auto-stacking uses internally, exposed for callers who want to compute a placement themselves (e.g. an explicit `x`/`y`, or a position relative to a specific chapter rather than "below everything").
|
|
227
|
+
|
|
228
|
+
**Response**: `200` — `{ chapters: Array<{ id: string, title?: string, x: number, y: number, width: number, height: number }> }`
|
|
229
|
+
|
|
220
230
|
---
|
|
221
231
|
|
|
222
232
|
### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/columns`
|
|
@@ -254,7 +264,7 @@ Add a lane (row) to a timeline.
|
|
|
254
264
|
---
|
|
255
265
|
|
|
256
266
|
### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/cells/:cellId/drop`
|
|
257
|
-
Drop a node into a timeline cell. Validates placement rules.
|
|
267
|
+
Drop a node into a timeline cell. Validates placement rules. If the node was already placed in another cell on this timeline, that cell is automatically cleared as part of the same operation — a node can only ever occupy one cell.
|
|
258
268
|
|
|
259
269
|
**Request body**: `{ nodeId: string, nodeType: ElementType }`
|
|
260
270
|
|
|
@@ -283,6 +293,8 @@ Submit node change events.
|
|
|
283
293
|
|
|
284
294
|
Any `node:created` event carrying a `chapterId` plus `cellId`/`cellName` (i.e. placing a node on a timeline) also triggers a best-effort, fire-and-forget auto-connect to type-compatible neighbors — same rules as the auto-connect endpoint below. Failures there never fail this call.
|
|
285
295
|
|
|
296
|
+
A `node:deleted` event cascades: if the deleted node is a chapter (timeline), every node placed in one of its cells and any node parented to it (e.g. a SLICE_BORDER spanning one of its columns) is deleted too, along with all their edges.
|
|
297
|
+
|
|
286
298
|
**Request body**: `NodeChangeEvent[]`
|
|
287
299
|
|
|
288
300
|
```typescript
|
|
@@ -427,9 +439,9 @@ Create a complete slice (1 column + 3 nodes automatically placed).
|
|
|
427
439
|
type: 'state-change' | 'state-view' | 'automation'
|
|
428
440
|
index?: number
|
|
429
441
|
nodes?: {
|
|
430
|
-
actor?: Partial<NodeData>
|
|
431
|
-
interaction?: Partial<NodeData>
|
|
432
|
-
swimlane?: Partial<NodeData>
|
|
442
|
+
actor?: Partial<NodeData> & { rowId?: string }
|
|
443
|
+
interaction?: Partial<NodeData> & { rowId?: string }
|
|
444
|
+
swimlane?: Partial<NodeData> & { rowId?: string }
|
|
433
445
|
}
|
|
434
446
|
}
|
|
435
447
|
```
|
|
@@ -439,6 +451,8 @@ Create a complete slice (1 column + 3 nodes automatically placed).
|
|
|
439
451
|
- `state-view` → HTML_SCREEN (actor) + READMODEL (interaction) + EVENT (swimlane)
|
|
440
452
|
- `automation` → AUTOMATION (actor) + COMMAND (interaction) + EVENT (swimlane)
|
|
441
453
|
|
|
454
|
+
Each chapter has exactly one actor/interaction/swimlane lane by default, but a chapter can have several lanes of the same type (e.g. multiple actor lanes). Without a `rowId`, the node is always placed in the **first** lane of the matching type — pass `nodes.<actor|interaction|swimlane>.rowId` (a row id from the chapter's `timelineData.rows`) to target a specific lane instead. An invalid `rowId` (not found, or found but the wrong lane type) is a `400 ROW_NOT_FOUND`/`ROW_TYPE_MISMATCH` error.
|
|
455
|
+
|
|
442
456
|
The actor HTML_SCREEN is created as a **stub** — a single visibly-placeholder page ("Untitled screen — design pending") unless `nodes.actor.pages` is passed explicitly. Whoever calls this (the `add-next-slice` skill — the one that creates a brand-new slice from scratch, as opposed to `eventmodeling-slicing-event-models`, which only makes existing elements explicit) is responsible for immediately replacing that stub via the `html-screen` skill — including gathering the board's existing screens first so the new one matches their established style, since `html-screen` itself has no visibility into other screens.
|
|
443
457
|
|
|
444
458
|
**Response**: `200` — slice data
|
|
@@ -63,6 +63,8 @@ mcp__eventmodelers__create_slice { "boardId": "<BOARD_ID>", "timelineId": "<TL>"
|
|
|
63
63
|
|
|
64
64
|
Pick `type` based on what you decided in Step 1 — `state-change` for a new command, `state-view` for a new read model, `automation` for a new automation. Always pass `nodes.interaction.title` as the command/read model/automation name you decided on in Step 1 — per the Core Concept above, the slice is *named after that element*, and the backend only derives the slice title from this field; omitting it produces a useless generic "State Change"/"State View"/"Automation" label instead. This also creates the slice's `SLICE_BORDER` automatically — no separate `create_slice_definition` call needed.
|
|
65
65
|
|
|
66
|
+
If the chapter has more than one lane of the same type (e.g. several actor lanes for different user roles), `create_slice` places each node in the **first** matching lane by default — pass `nodes.<actor|interaction|swimlane>.rowId` (the target row's id, from the chapter's `timelineData.rows`) to target a specific lane instead of the first one.
|
|
67
|
+
|
|
66
68
|
**Fallback (no MCP):**
|
|
67
69
|
```bash
|
|
68
70
|
curl -X POST $BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/timelines/$TL/slices \
|