@eventmodelers/cli 0.0.11 → 0.0.13

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/cli.js CHANGED
@@ -670,7 +670,7 @@ async function configureCredentials({ config, configPath, targetDir, requiredFie
670
670
  { label: 'Enter values one by one', value: 'manual' },
671
671
  { label: 'Get instructions for configuring later', value: 'instructions' },
672
672
  { label: 'Skip for now', value: 'skip' },
673
- ], 1);
673
+ ], 0);
674
674
 
675
675
  if (choice === 'paste') {
676
676
  console.log('\n Copy your credentials from https://app.eventmodelers.ai/account,');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/cli",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, Cratis, or modeling-only)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -198,6 +198,8 @@ All node endpoints require header: `x-user-id`
198
198
  ### POST `/api/org/:orgId/boards/:boardId/nodes/events`
199
199
  Submit node change events.
200
200
 
201
+ 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.
202
+
201
203
  **Request body**: `NodeChangeEvent[]`
202
204
 
203
205
  ```typescript
@@ -237,7 +239,7 @@ interface NodeChangeEvent {
237
239
  targetHandle?: string
238
240
  }>
239
241
  chapterId?: string // for cell placement
240
- cellName?: string // spreadsheet-style e.g. "B2"
242
+ cellName?: string // spreadsheet-style, always <letter(s)><number> e.g. "B2", "AA10" — pass through as-is, never decompose or interpret it
241
243
  }
242
244
  ```
243
245
 
@@ -260,6 +262,17 @@ Get a single node.
260
262
 
261
263
  ---
262
264
 
265
+ ### POST `/api/org/:orgId/boards/:boardId/nodes/:nodeId/auto-connect`
266
+ Auto-connect a node to its timeline neighbors — mirrors the frontend's auto-connect-on-place behavior. Looks only at the node's own timeline column and the previous column (never ahead), and creates `edge:added` events to every type-compatible neighbor found there, using the same pairing rules as connections created via node events (COMMAND→EVENT, SCREEN→COMMAND, EVENT→READMODEL, READMODEL→SCREEN, READMODEL→AUTOMATION, AUTOMATION→COMMAND). A COMMAND is not wired to the previous column's SCREEN if its own column already has one.
267
+
268
+ Incompatible or already-connected neighbors are reported in `skipped`, not an error. Returns an empty result for nodes not placed on any timeline, or not a connectable element type (e.g. SCENARIO/spec nodes are never auto-connected).
269
+
270
+ **Response**:
271
+ - `200` — `{ connected: [{edgeId, source, target, created}], skipped: [{nodeId, reason}] }`
272
+ - `404` — node not found
273
+
274
+ ---
275
+
263
276
  ## 4. Images
264
277
 
265
278
  **File**: `src/slices/change/api-images/routes.ts`
@@ -614,6 +627,7 @@ All events support optional metadata: `user_id`, `correlation_id`, `causation_id
614
627
  | `src/slices/change/api-boards/routes.ts` | Board CRUD + event persistence |
615
628
  | `src/slices/change/api-chapters/routes.ts` | Chapters, columns, lanes, cell drops |
616
629
  | `src/slices/change/api-nodes/routes.ts` | Node event sourcing |
630
+ | `src/slices/extensions/supabase/nodes/AutoConnectNode.ts` | Auto-connect logic (timeline neighbor wiring) |
617
631
  | `src/slices/change/api-images/routes.ts` | Image upload + sketch rendering |
618
632
  | `src/slices/change/api-.slices/routes.ts` | Slice creation + slice definitions (SLICE_BORDER) |
619
633
  | `src/slices/extensions/supabase/slices/CreateSliceDefinition.ts` | Slice definition (SLICE_BORDER) creation logic |
@@ -21,12 +21,17 @@ From `$ARGUMENTS`, extract:
21
21
  | `boardId` | a board UUID | from `connect` skill (`BOARD_ID`) |
22
22
  | `timelineId` | the chapter/timeline UUID | auto-detect (see Step 2) |
23
23
  | `position` | column index (0-based number), `"after <title>"`, or omitted | append at end |
24
+ | `cellName` | spreadsheet-style cell reference given directly in the prompt — always `<letter(s)><number>`, e.g. `"A2"`, `"AA10"` | none |
24
25
  | `baseUrl` | explicit URL override | from `connect` skill (`BASE_URL`) |
25
26
 
26
27
  Normalise `elementType` to uppercase: `event` → `EVENT`, `command` → `COMMAND`, `readmodel` → `READMODEL`, `screen` → `SCREEN`, `automation` → `AUTOMATION`.
27
28
 
28
29
  Use `BOARD_ID` and `BASE_URL` from the `connect` skill. If a `boardId` argument is explicitly passed, it overrides `BOARD_ID`.
29
30
 
31
+ **Fast path — spreadsheet-style cell reference given directly (e.g. "place a COMMAND in A2"):** don't try to interpret what "A2" means yourself. The `node:created` event accepts a `cellName` field (see `learn-eventmodelers-api`) and the backend resolves it to the actual row/column — the same shortcut `html-screen` already uses. Skip Steps 3–6 entirely: resolve only `timelineId` (Step 2, needed for `chapterId`), then go straight to Step 7 and pass `cellName` instead of `cellId` on the `node:created` payload. Do not fetch columns, do not compute a row/column index, and do not construct `cellId` yourself for this case.
32
+
33
+ **This still applies when several cell references are given together for one slice** (e.g. "put the screen in C1, the command in C2, the event in C3"). Do not reason about the grid at all — not which column "C" is, not whether C1/C2/C3 land in the same column, not which row is which. That is exactly the interpretation this fast path exists to skip. Treat each cell reference as an opaque string tied to its own element: call Step 7 once per element, passing that element's `cellName` untouched. The backend resolves each independently; the placements only need to be internally consistent with each other insofar as the prompt already told you so — you never need to understand *why*.
34
+
30
35
  ---
31
36
 
32
37
  ## Step 2 — Resolve the timeline
@@ -203,7 +208,9 @@ If no matching row is found, stop and report the error — the timeline may be m
203
208
 
204
209
  > **SCREEN nodes always require a sketch.** The server auto-generates a title-only placeholder when a SCREEN is created without one, but it will look empty. Always follow up a SCREEN node creation with a call to `POST /images/:nodeId/sketch` (or use `POST /image-nodes/:nodeId/sketch` to create and render in one call — see `learn-eventmodelers-api` for the sketch format).
205
210
 
206
- Include `x-token`, `x-board-id`, and `x-user-id: agent` on every call to `/nodes/events`:
211
+ Include `x-token`, `x-board-id`, and `x-user-id: agent` on every call to `/nodes/events`.
212
+
213
+ **Normal path** (position/lane resolved manually in Steps 3–6) — use `cellId`:
207
214
 
208
215
  ```bash
209
216
  curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
@@ -226,9 +233,32 @@ curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
226
233
  }]'
227
234
  ```
228
235
 
236
+ **Fast path** (`cellName` given directly, e.g. `"A2"` — see the Step 1 shortcut) — pass `cellName` instead of `cellId` and let the backend resolve it; nothing else in the payload changes:
237
+
238
+ ```bash
239
+ curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
240
+ -H "x-token: $TOKEN" \
241
+ -H "x-board-id: $BOARD_ID" \
242
+ -H "x-user-id: agent" \
243
+ -H "Content-Type: application/json" \
244
+ -d '[{
245
+ "eventType": "node:created",
246
+ "nodeId": "<node-uuid>",
247
+ "boardId": "<BOARD_ID>",
248
+ "timestamp": <Date.now()>,
249
+ "chapterId": "<TIMELINE_ID>",
250
+ "cellName": "<CELL_NAME>",
251
+ "meta": {
252
+ "type": "<ELEMENT_TYPE>",
253
+ "title": "<title>"
254
+ },
255
+ "node": { "data": { "title": "<title>" } }
256
+ }]'
257
+ ```
258
+
229
259
  Response: `{ "hashes": { "<event-uuid>": "<hash>" } }`
230
260
 
231
- > **`node:created` with `cellId` IS the placement** — do NOT also call the `drop` endpoint afterwards. The `drop` endpoint adds a second cell reference without removing the first, causing the node to appear in two columns simultaneously. Use `node:created + cellId` for all initial placements.
261
+ > **`node:created` with `cellId`/`cellName` IS the placement** — do NOT also call the `drop` endpoint afterwards. The `drop` endpoint adds a second cell reference without removing the first, causing the node to appear in two columns simultaneously. Use `node:created` with `cellId` or `cellName` for all initial placements.
232
262
 
233
263
  ---
234
264