@epilot/cli 0.1.43 → 0.1.45

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/README.md CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.43 — CLI for epilot APIs
32
+ epilot v0.1.45 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -1064,6 +1064,13 @@
1064
1064
  "$ref": "#/components/schemas/ActionSchedule"
1065
1065
  }
1066
1066
  },
1067
+ "loops": {
1068
+ "type": "array",
1069
+ "description": "Loop scope definitions. Each loop has an id and a source_path resolved against the trigger entity at execution time. Actions referencing a loop's id via their loop_id property run once per item in the resolved array. Loop members must be contiguous in the actions array.\n",
1070
+ "items": {
1071
+ "$ref": "#/components/schemas/AutomationLoop"
1072
+ }
1073
+ },
1067
1074
  "actions": {
1068
1075
  "type": "array",
1069
1076
  "description": "The actions (nodes) of the automation flow",
@@ -1354,9 +1361,48 @@
1354
1361
  "schedule_id": {
1355
1362
  "type": "string",
1356
1363
  "description": "Schedule Id which indicates the schedule of the action"
1364
+ },
1365
+ "loop_id": {
1366
+ "type": "string",
1367
+ "description": "Id of a loop scope defined on the parent flow. When set, the action runs once per item resolved from the loop's source_path. All actions sharing the same loop_id must be contiguous in the actions array.\n"
1357
1368
  }
1358
1369
  }
1359
1370
  },
1371
+ "AutomationLoop": {
1372
+ "type": "object",
1373
+ "description": "A loop scope on an automation flow.",
1374
+ "properties": {
1375
+ "id": {
1376
+ "type": "string",
1377
+ "description": "Stable identifier referenced by AutomationActionConfig.loop_id",
1378
+ "example": "loop_contracts"
1379
+ },
1380
+ "source_path": {
1381
+ "type": "string",
1382
+ "description": "Path resolved against the trigger entity to produce the array of iteration items. e.g. submission.steps[0]['Contracts'].\n",
1383
+ "example": "submission.steps[0]['Contracts']"
1384
+ },
1385
+ "source_type": {
1386
+ "type": "string",
1387
+ "description": "How source_path is interpreted. 'journey-multi-select' is the v1 source type (journey card block with multi-select). Future source types (e.g. 'previous-action-outputs', 'entity-relation') will be added here.\n",
1388
+ "enum": [
1389
+ "journey-multi-select",
1390
+ "previous-action-outputs",
1391
+ "entity-relation"
1392
+ ],
1393
+ "default": "journey-multi-select"
1394
+ },
1395
+ "length": {
1396
+ "type": "integer",
1397
+ "description": "Maximum number of iterations. 0 / omitted = iterate the full resolved array.\n",
1398
+ "minimum": 0
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "id",
1403
+ "source_path"
1404
+ ]
1405
+ },
1360
1406
  "AutomationActionExecutionState": {
1361
1407
  "type": "object",
1362
1408
  "properties": {
@@ -1379,9 +1425,49 @@
1379
1425
  },
1380
1426
  "retry_strategy": {
1381
1427
  "$ref": "#/components/schemas/RetryStrategy"
1428
+ },
1429
+ "iterations": {
1430
+ "type": "array",
1431
+ "description": "For looped actions, an archive of completed iterations. The action's own execution_status / outputs / error_output always reflect the current (latest) iteration. The previous iteration's state is pushed here before the action is reset for the next pass.\n",
1432
+ "items": {
1433
+ "$ref": "#/components/schemas/AutomationActionIteration"
1434
+ }
1382
1435
  }
1383
1436
  }
1384
1437
  },
1438
+ "AutomationActionIteration": {
1439
+ "type": "object",
1440
+ "description": "A snapshot of a single completed pass through a looped action.",
1441
+ "properties": {
1442
+ "index": {
1443
+ "type": "integer",
1444
+ "minimum": 0,
1445
+ "description": "Zero-based iteration index within the loop scope."
1446
+ },
1447
+ "execution_status": {
1448
+ "$ref": "#/components/schemas/ExecutionStatus"
1449
+ },
1450
+ "started_at": {
1451
+ "type": "string",
1452
+ "format": "date-time"
1453
+ },
1454
+ "ended_at": {
1455
+ "type": "string",
1456
+ "format": "date-time"
1457
+ },
1458
+ "outputs": {
1459
+ "type": "object",
1460
+ "additionalProperties": true
1461
+ },
1462
+ "error_output": {
1463
+ "$ref": "#/components/schemas/ErrorOutput"
1464
+ }
1465
+ },
1466
+ "required": [
1467
+ "index",
1468
+ "execution_status"
1469
+ ]
1470
+ },
1385
1471
  "RetryStrategy": {
1386
1472
  "type": "string",
1387
1473
  "description": "different behaviors for retrying failed execution actions.",
@@ -3263,6 +3349,9 @@
3263
3349
  "type": "boolean",
3264
3350
  "description": "Result of the condition evaluation"
3265
3351
  },
3352
+ "error_output": {
3353
+ "$ref": "#/components/schemas/ErrorOutput"
3354
+ },
3266
3355
  "statements": {
3267
3356
  "type": "array",
3268
3357
  "items": {
@@ -3433,6 +3522,20 @@
3433
3522
  },
3434
3523
  "workflow_context": {
3435
3524
  "$ref": "#/components/schemas/WorkflowExecutionContext"
3525
+ },
3526
+ "loops": {
3527
+ "type": "array",
3528
+ "description": "Loop scope definitions propagated from the flow onto the execution record. Each loop has an id and a source_path resolved against the trigger entity at execution time. Actions referencing a loop's id via their loop_id property run once per item in the resolved array.\n",
3529
+ "items": {
3530
+ "$ref": "#/components/schemas/AutomationLoop"
3531
+ }
3532
+ },
3533
+ "loop_state": {
3534
+ "type": "object",
3535
+ "description": "Runtime iteration state, keyed by loop_id. Tracks the current_index and total for each active loop scope. Entries are removed once a loop exits.\n",
3536
+ "additionalProperties": {
3537
+ "$ref": "#/components/schemas/AutomationLoopState"
3538
+ }
3436
3539
  }
3437
3540
  },
3438
3541
  "required": [
@@ -3444,6 +3547,23 @@
3444
3547
  "actions"
3445
3548
  ]
3446
3549
  },
3550
+ "AutomationLoopState": {
3551
+ "type": "object",
3552
+ "properties": {
3553
+ "current_index": {
3554
+ "type": "integer",
3555
+ "minimum": 0
3556
+ },
3557
+ "total": {
3558
+ "type": "integer",
3559
+ "minimum": 0
3560
+ }
3561
+ },
3562
+ "required": [
3563
+ "current_index",
3564
+ "total"
3565
+ ]
3566
+ },
3447
3567
  "WorkflowExecutionContext": {
3448
3568
  "type": "object",
3449
3569
  "required": [