@eventmodelers/cli 1.0.8 → 1.0.9
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,7 +26,7 @@ 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
32
|
| `create_chapter` | `boardId`, `x?`, `y?` | Create a timeline | §2 `POST .../chapters` |
|
|
@@ -34,12 +34,12 @@ Server name: `eventmodelers`. Every tool takes `boardId` explicitly; none need `
|
|
|
34
34
|
| `delete_column` | `boardId`, `timelineId`, `columnId` | Delete a column | §2 `DELETE .../columns/:columnId` |
|
|
35
35
|
| `add_lane` | `boardId`, `timelineId`, `type`, `label?`, `index?` | Add a lane/row | §2 `POST .../timelines/:id/lanes` |
|
|
36
36
|
| `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) |
|
|
37
|
+
| `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
38
|
| `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
39
|
| `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
|
|
40
|
+
| `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` |
|
|
41
|
+
| `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) |
|
|
42
|
+
| `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
43
|
| `create_slice_definition` | `boardId`, `timelineId`, `columnId`, `title`, `data?`, `meta?` | Create a SLICE_BORDER over an existing column | §5 `POST .../slice-definitions` |
|
|
44
44
|
| `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
45
|
| `list_slices` | `boardId` | List slices (id, title, status) | §8 `GET .../slicedata/slices` |
|
|
@@ -254,7 +254,7 @@ Add a lane (row) to a timeline.
|
|
|
254
254
|
---
|
|
255
255
|
|
|
256
256
|
### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/cells/:cellId/drop`
|
|
257
|
-
Drop a node into a timeline cell. Validates placement rules.
|
|
257
|
+
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
258
|
|
|
259
259
|
**Request body**: `{ nodeId: string, nodeType: ElementType }`
|
|
260
260
|
|
|
@@ -283,6 +283,8 @@ Submit node change events.
|
|
|
283
283
|
|
|
284
284
|
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
285
|
|
|
286
|
+
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.
|
|
287
|
+
|
|
286
288
|
**Request body**: `NodeChangeEvent[]`
|
|
287
289
|
|
|
288
290
|
```typescript
|
|
@@ -427,9 +429,9 @@ Create a complete slice (1 column + 3 nodes automatically placed).
|
|
|
427
429
|
type: 'state-change' | 'state-view' | 'automation'
|
|
428
430
|
index?: number
|
|
429
431
|
nodes?: {
|
|
430
|
-
actor?: Partial<NodeData>
|
|
431
|
-
interaction?: Partial<NodeData>
|
|
432
|
-
swimlane?: Partial<NodeData>
|
|
432
|
+
actor?: Partial<NodeData> & { rowId?: string }
|
|
433
|
+
interaction?: Partial<NodeData> & { rowId?: string }
|
|
434
|
+
swimlane?: Partial<NodeData> & { rowId?: string }
|
|
433
435
|
}
|
|
434
436
|
}
|
|
435
437
|
```
|
|
@@ -439,6 +441,8 @@ Create a complete slice (1 column + 3 nodes automatically placed).
|
|
|
439
441
|
- `state-view` → HTML_SCREEN (actor) + READMODEL (interaction) + EVENT (swimlane)
|
|
440
442
|
- `automation` → AUTOMATION (actor) + COMMAND (interaction) + EVENT (swimlane)
|
|
441
443
|
|
|
444
|
+
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.
|
|
445
|
+
|
|
442
446
|
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
447
|
|
|
444
448
|
**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 \
|