@asteroidai/cli 1.9.33 → 1.9.36

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.
Files changed (3) hide show
  1. package/dist/asteroid.js +1162 -51
  2. package/dist/core.js +1161 -50
  3. package/package.json +1 -1
package/dist/core.js CHANGED
@@ -189,7 +189,23 @@ var COMMANDS = [
189
189
  flag: "base",
190
190
  type: "json",
191
191
  required: true,
192
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-admins, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; admins may name any snapshot. Omit it for the default image."
192
+ description: "The base machine: a browser, or a Linux / Windows OS environment. For non-admins, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; admins may name any snapshot. Omit it for the default image.",
193
+ fields: [
194
+ {
195
+ name: "type",
196
+ flag: "type",
197
+ type: "string",
198
+ required: false,
199
+ description: "Type of execution environment",
200
+ enum: ["browser", "os"]
201
+ },
202
+ {
203
+ name: "config",
204
+ flag: "config",
205
+ type: "json",
206
+ required: false
207
+ }
208
+ ]
193
209
  },
194
210
  {
195
211
  name: "profiles",
@@ -210,21 +226,272 @@ var COMMANDS = [
210
226
  flag: "warm-pool",
211
227
  type: "json",
212
228
  required: false,
213
- description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated."
229
+ description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated.",
230
+ fields: [
231
+ {
232
+ name: "targetSize",
233
+ flag: "target-size",
234
+ type: "integer",
235
+ required: false,
236
+ description: "Baseline number of warm environments to keep ready per profile row outside any scheduled window. An environment with no rows keeps this many in total. 0 drains the pool while no window is open; with no schedule, 0 drains it fully so keep-warm can be turned off or the environment deleted"
237
+ },
238
+ {
239
+ name: "schedule",
240
+ flag: "schedule",
241
+ type: "json",
242
+ required: false,
243
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
244
+ fields: [
245
+ {
246
+ name: "timezone",
247
+ flag: "timezone",
248
+ type: "string",
249
+ required: false,
250
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
251
+ },
252
+ {
253
+ name: "windows",
254
+ flag: "windows",
255
+ type: "json",
256
+ required: false
257
+ }
258
+ ]
259
+ },
260
+ {
261
+ name: "maxAgeMins",
262
+ flag: "max-age-mins",
263
+ type: "integer",
264
+ required: false,
265
+ description: "Member max age in minutes, not a hard retirement time. The replacement boots ahead of it, by the pool's recent warmup time; the member stays claimable past it until the replacement is ready, for a grace of at most half the max age or 15 minutes."
266
+ },
267
+ {
268
+ name: "reuse",
269
+ flag: "reuse",
270
+ type: "json",
271
+ required: false,
272
+ description: "How long a pooled environment lives: retired on its first claim, or reused until maxAgeMins and its replacement is ready."
273
+ },
274
+ {
275
+ name: "initialization",
276
+ flag: "initialization",
277
+ type: "json",
278
+ required: false,
279
+ description: "Agent that initialises each member. Absent means a member is available as soon as it has booted.",
280
+ fields: [
281
+ {
282
+ name: "workflowId",
283
+ flag: "workflow-id",
284
+ type: "string",
285
+ required: false,
286
+ description: "The initialising workflow"
287
+ },
288
+ {
289
+ name: "inputs",
290
+ flag: "inputs",
291
+ type: "json",
292
+ required: false,
293
+ description: "Fixed inputs for the initialising run",
294
+ record: "json"
295
+ },
296
+ {
297
+ name: "successOutcomes",
298
+ flag: "success-outcomes",
299
+ type: "string[]",
300
+ required: false,
301
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ name: "keepAlive",
307
+ flag: "keep-alive",
308
+ type: "json",
309
+ required: false,
310
+ description: "Periodic probe that keeps an idle member's session alive and retires a member whose session is dead. Needs an Anchor browser base or a Daytona desktop base. Absent means members are never touched between warmup and retirement.",
311
+ fields: [
312
+ {
313
+ name: "intervalMins",
314
+ flag: "interval-mins",
315
+ type: "integer",
316
+ required: false,
317
+ description: "Minutes between probes of the same member, whether the last one passed or failed. The sweep runs once a minute, so 1 is the shortest effective interval. Must be below the pool's maxAgeMins."
318
+ },
319
+ {
320
+ name: "script",
321
+ flag: "script",
322
+ type: "string",
323
+ required: false,
324
+ description: "On a browser base: a JavaScript expression evaluated in the member's open page. `await` is allowed. It must evaluate, or resolve, to true while the session is live and to false once it is not. Example: `fetch('/api/session', {credentials: 'include'}).then(r => r.ok)`. It runs with no attached execution, so it must not navigate. On a Linux base: a bash script. On a Windows base: a PowerShell script. Exit code 0 means the session is live; any other exit code means it is dead."
325
+ }
326
+ ]
327
+ }
328
+ ]
214
329
  },
215
330
  {
216
331
  name: "warmCache",
217
332
  flag: "warm-cache",
218
333
  type: "json",
219
334
  required: false,
220
- description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated."
335
+ description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated.",
336
+ fields: [
337
+ {
338
+ name: "intervalMins",
339
+ flag: "interval-mins",
340
+ type: "integer",
341
+ required: false,
342
+ description: "Minutes between logins of the same profile"
343
+ },
344
+ {
345
+ name: "activeHours",
346
+ flag: "active-hours",
347
+ type: "json",
348
+ required: false,
349
+ description: "Hours during which logins run. Absent means around the clock.",
350
+ fields: [
351
+ {
352
+ name: "timezone",
353
+ flag: "timezone",
354
+ type: "string",
355
+ required: false,
356
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
357
+ },
358
+ {
359
+ name: "windows",
360
+ flag: "windows",
361
+ type: "json",
362
+ required: false
363
+ }
364
+ ]
365
+ },
366
+ {
367
+ name: "initialization",
368
+ flag: "initialization",
369
+ type: "json",
370
+ required: false,
371
+ description: "The login agent, run on each profile's own environment",
372
+ fields: [
373
+ {
374
+ name: "workflowId",
375
+ flag: "workflow-id",
376
+ type: "string",
377
+ required: false,
378
+ description: "The initialising workflow"
379
+ },
380
+ {
381
+ name: "inputs",
382
+ flag: "inputs",
383
+ type: "json",
384
+ required: false,
385
+ description: "Fixed inputs for the initialising run",
386
+ record: "json"
387
+ },
388
+ {
389
+ name: "successOutcomes",
390
+ flag: "success-outcomes",
391
+ type: "string[]",
392
+ required: false,
393
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
394
+ }
395
+ ]
396
+ },
397
+ {
398
+ name: "executionsWriteBack",
399
+ flag: "executions-write-back",
400
+ type: "boolean",
401
+ required: false,
402
+ description: "Whether executions on the environment save the browser profile when they stop. Off by default: only the login agent saves it, so a run that ends logged out cannot overwrite the session for later runs. Must be on with an Anchor sticky IP, which saves every session."
403
+ }
404
+ ]
221
405
  },
222
406
  {
223
407
  name: "dedicated",
224
408
  flag: "dedicated",
225
409
  type: "json",
226
410
  required: false,
227
- description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache."
411
+ description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache.",
412
+ fields: [
413
+ {
414
+ name: "workflowId",
415
+ flag: "workflow-id",
416
+ type: "string",
417
+ required: false,
418
+ description: "The workflow the workers keep loaded"
419
+ },
420
+ {
421
+ name: "targetSize",
422
+ flag: "target-size",
423
+ type: "integer",
424
+ required: false,
425
+ description: "Baseline number of workers to keep ready outside any scheduled window. 0 drains the environment."
426
+ },
427
+ {
428
+ name: "schedule",
429
+ flag: "schedule",
430
+ type: "json",
431
+ required: false,
432
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
433
+ fields: [
434
+ {
435
+ name: "timezone",
436
+ flag: "timezone",
437
+ type: "string",
438
+ required: false,
439
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
440
+ },
441
+ {
442
+ name: "windows",
443
+ flag: "windows",
444
+ type: "json",
445
+ required: false
446
+ }
447
+ ]
448
+ },
449
+ {
450
+ name: "maxAgeMins",
451
+ flag: "max-age-mins",
452
+ type: "integer",
453
+ required: false,
454
+ description: "Member max age in minutes. As for a warm pool, the replacement boots ahead of it."
455
+ },
456
+ {
457
+ name: "executionsPerWorker",
458
+ flag: "executions-per-worker",
459
+ type: "integer",
460
+ required: false,
461
+ description: "Executions one worker runs at once, each on its own page of the member's browser"
462
+ },
463
+ {
464
+ name: "initialization",
465
+ flag: "initialization",
466
+ type: "json",
467
+ required: false,
468
+ description: "Workflow that initialises each member before its worker loads, such as a sign-in. Absent means the worker loads as soon as the browser has booted.",
469
+ fields: [
470
+ {
471
+ name: "workflowId",
472
+ flag: "workflow-id",
473
+ type: "string",
474
+ required: false,
475
+ description: "The initialising workflow"
476
+ },
477
+ {
478
+ name: "inputs",
479
+ flag: "inputs",
480
+ type: "json",
481
+ required: false,
482
+ description: "Fixed inputs for the initialising run",
483
+ record: "json"
484
+ },
485
+ {
486
+ name: "successOutcomes",
487
+ flag: "success-outcomes",
488
+ type: "string[]",
489
+ required: false,
490
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
491
+ }
492
+ ]
493
+ }
494
+ ]
228
495
  }
229
496
  ],
230
497
  files: [],
@@ -339,7 +606,23 @@ var COMMANDS = [
339
606
  flag: "base",
340
607
  type: "json",
341
608
  required: true,
342
- description: "The base machine: a browser, or a Linux / Windows OS environment. For non-admins, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; admins may name any snapshot. Omit it for the default image."
609
+ description: "The base machine: a browser, or a Linux / Windows OS environment. For non-admins, an OS base's `snapshotName` must be one of the organisation's snapshots or a public one; admins may name any snapshot. Omit it for the default image.",
610
+ fields: [
611
+ {
612
+ name: "type",
613
+ flag: "type",
614
+ type: "string",
615
+ required: false,
616
+ description: "Type of execution environment",
617
+ enum: ["browser", "os"]
618
+ },
619
+ {
620
+ name: "config",
621
+ flag: "config",
622
+ type: "json",
623
+ required: false
624
+ }
625
+ ]
343
626
  },
344
627
  {
345
628
  name: "profiles",
@@ -360,21 +643,272 @@ var COMMANDS = [
360
643
  flag: "warm-pool",
361
644
  type: "json",
362
645
  required: false,
363
- description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated."
646
+ description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated.",
647
+ fields: [
648
+ {
649
+ name: "targetSize",
650
+ flag: "target-size",
651
+ type: "integer",
652
+ required: false,
653
+ description: "Baseline number of warm environments to keep ready per profile row outside any scheduled window. An environment with no rows keeps this many in total. 0 drains the pool while no window is open; with no schedule, 0 drains it fully so keep-warm can be turned off or the environment deleted"
654
+ },
655
+ {
656
+ name: "schedule",
657
+ flag: "schedule",
658
+ type: "json",
659
+ required: false,
660
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
661
+ fields: [
662
+ {
663
+ name: "timezone",
664
+ flag: "timezone",
665
+ type: "string",
666
+ required: false,
667
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
668
+ },
669
+ {
670
+ name: "windows",
671
+ flag: "windows",
672
+ type: "json",
673
+ required: false
674
+ }
675
+ ]
676
+ },
677
+ {
678
+ name: "maxAgeMins",
679
+ flag: "max-age-mins",
680
+ type: "integer",
681
+ required: false,
682
+ description: "Member max age in minutes, not a hard retirement time. The replacement boots ahead of it, by the pool's recent warmup time; the member stays claimable past it until the replacement is ready, for a grace of at most half the max age or 15 minutes."
683
+ },
684
+ {
685
+ name: "reuse",
686
+ flag: "reuse",
687
+ type: "json",
688
+ required: false,
689
+ description: "How long a pooled environment lives: retired on its first claim, or reused until maxAgeMins and its replacement is ready."
690
+ },
691
+ {
692
+ name: "initialization",
693
+ flag: "initialization",
694
+ type: "json",
695
+ required: false,
696
+ description: "Agent that initialises each member. Absent means a member is available as soon as it has booted.",
697
+ fields: [
698
+ {
699
+ name: "workflowId",
700
+ flag: "workflow-id",
701
+ type: "string",
702
+ required: false,
703
+ description: "The initialising workflow"
704
+ },
705
+ {
706
+ name: "inputs",
707
+ flag: "inputs",
708
+ type: "json",
709
+ required: false,
710
+ description: "Fixed inputs for the initialising run",
711
+ record: "json"
712
+ },
713
+ {
714
+ name: "successOutcomes",
715
+ flag: "success-outcomes",
716
+ type: "string[]",
717
+ required: false,
718
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
719
+ }
720
+ ]
721
+ },
722
+ {
723
+ name: "keepAlive",
724
+ flag: "keep-alive",
725
+ type: "json",
726
+ required: false,
727
+ description: "Periodic probe that keeps an idle member's session alive and retires a member whose session is dead. Needs an Anchor browser base or a Daytona desktop base. Absent means members are never touched between warmup and retirement.",
728
+ fields: [
729
+ {
730
+ name: "intervalMins",
731
+ flag: "interval-mins",
732
+ type: "integer",
733
+ required: false,
734
+ description: "Minutes between probes of the same member, whether the last one passed or failed. The sweep runs once a minute, so 1 is the shortest effective interval. Must be below the pool's maxAgeMins."
735
+ },
736
+ {
737
+ name: "script",
738
+ flag: "script",
739
+ type: "string",
740
+ required: false,
741
+ description: "On a browser base: a JavaScript expression evaluated in the member's open page. `await` is allowed. It must evaluate, or resolve, to true while the session is live and to false once it is not. Example: `fetch('/api/session', {credentials: 'include'}).then(r => r.ok)`. It runs with no attached execution, so it must not navigate. On a Linux base: a bash script. On a Windows base: a PowerShell script. Exit code 0 means the session is live; any other exit code means it is dead."
742
+ }
743
+ ]
744
+ }
745
+ ]
364
746
  },
365
747
  {
366
748
  name: "warmCache",
367
749
  flag: "warm-cache",
368
750
  type: "json",
369
751
  required: false,
370
- description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated."
752
+ description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated.",
753
+ fields: [
754
+ {
755
+ name: "intervalMins",
756
+ flag: "interval-mins",
757
+ type: "integer",
758
+ required: false,
759
+ description: "Minutes between logins of the same profile"
760
+ },
761
+ {
762
+ name: "activeHours",
763
+ flag: "active-hours",
764
+ type: "json",
765
+ required: false,
766
+ description: "Hours during which logins run. Absent means around the clock.",
767
+ fields: [
768
+ {
769
+ name: "timezone",
770
+ flag: "timezone",
771
+ type: "string",
772
+ required: false,
773
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
774
+ },
775
+ {
776
+ name: "windows",
777
+ flag: "windows",
778
+ type: "json",
779
+ required: false
780
+ }
781
+ ]
782
+ },
783
+ {
784
+ name: "initialization",
785
+ flag: "initialization",
786
+ type: "json",
787
+ required: false,
788
+ description: "The login agent, run on each profile's own environment",
789
+ fields: [
790
+ {
791
+ name: "workflowId",
792
+ flag: "workflow-id",
793
+ type: "string",
794
+ required: false,
795
+ description: "The initialising workflow"
796
+ },
797
+ {
798
+ name: "inputs",
799
+ flag: "inputs",
800
+ type: "json",
801
+ required: false,
802
+ description: "Fixed inputs for the initialising run",
803
+ record: "json"
804
+ },
805
+ {
806
+ name: "successOutcomes",
807
+ flag: "success-outcomes",
808
+ type: "string[]",
809
+ required: false,
810
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
811
+ }
812
+ ]
813
+ },
814
+ {
815
+ name: "executionsWriteBack",
816
+ flag: "executions-write-back",
817
+ type: "boolean",
818
+ required: false,
819
+ description: "Whether executions on the environment save the browser profile when they stop. Off by default: only the login agent saves it, so a run that ends logged out cannot overwrite the session for later runs. Must be on with an Anchor sticky IP, which saves every session."
820
+ }
821
+ ]
371
822
  },
372
823
  {
373
824
  name: "dedicated",
374
825
  flag: "dedicated",
375
826
  type: "json",
376
827
  required: false,
377
- description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache."
828
+ description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache.",
829
+ fields: [
830
+ {
831
+ name: "workflowId",
832
+ flag: "workflow-id",
833
+ type: "string",
834
+ required: false,
835
+ description: "The workflow the workers keep loaded"
836
+ },
837
+ {
838
+ name: "targetSize",
839
+ flag: "target-size",
840
+ type: "integer",
841
+ required: false,
842
+ description: "Baseline number of workers to keep ready outside any scheduled window. 0 drains the environment."
843
+ },
844
+ {
845
+ name: "schedule",
846
+ flag: "schedule",
847
+ type: "json",
848
+ required: false,
849
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
850
+ fields: [
851
+ {
852
+ name: "timezone",
853
+ flag: "timezone",
854
+ type: "string",
855
+ required: false,
856
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
857
+ },
858
+ {
859
+ name: "windows",
860
+ flag: "windows",
861
+ type: "json",
862
+ required: false
863
+ }
864
+ ]
865
+ },
866
+ {
867
+ name: "maxAgeMins",
868
+ flag: "max-age-mins",
869
+ type: "integer",
870
+ required: false,
871
+ description: "Member max age in minutes. As for a warm pool, the replacement boots ahead of it."
872
+ },
873
+ {
874
+ name: "executionsPerWorker",
875
+ flag: "executions-per-worker",
876
+ type: "integer",
877
+ required: false,
878
+ description: "Executions one worker runs at once, each on its own page of the member's browser"
879
+ },
880
+ {
881
+ name: "initialization",
882
+ flag: "initialization",
883
+ type: "json",
884
+ required: false,
885
+ description: "Workflow that initialises each member before its worker loads, such as a sign-in. Absent means the worker loads as soon as the browser has booted.",
886
+ fields: [
887
+ {
888
+ name: "workflowId",
889
+ flag: "workflow-id",
890
+ type: "string",
891
+ required: false,
892
+ description: "The initialising workflow"
893
+ },
894
+ {
895
+ name: "inputs",
896
+ flag: "inputs",
897
+ type: "json",
898
+ required: false,
899
+ description: "Fixed inputs for the initialising run",
900
+ record: "json"
901
+ },
902
+ {
903
+ name: "successOutcomes",
904
+ flag: "success-outcomes",
905
+ type: "string[]",
906
+ required: false,
907
+ description: "Outcomes of the initialising run that count as a success. A run that completes with any other outcome is treated as a failed run: a warm pool tears the member down, a warm cache records a failed login. Each must be an outcome of the agent's published version. Absent or empty means any completed run counts."
908
+ }
909
+ ]
910
+ }
911
+ ]
378
912
  }
379
913
  ],
380
914
  files: [],
@@ -1227,7 +1761,8 @@ var COMMANDS = [
1227
1761
  flag: "inputs",
1228
1762
  type: "json",
1229
1763
  required: false,
1230
- description: "Input variables for the new execution. Replaces the original inputs when set."
1764
+ description: "Input variables for the new execution. Replaces the original inputs when set.",
1765
+ record: "json"
1231
1766
  },
1232
1767
  {
1233
1768
  name: "profileId",
@@ -2090,21 +2625,69 @@ var COMMANDS = [
2090
2625
  name: "inputs",
2091
2626
  flag: "inputs",
2092
2627
  type: "json",
2093
- required: false
2628
+ required: false,
2629
+ record: "json"
2094
2630
  },
2095
2631
  {
2096
2632
  name: "batchSource",
2097
2633
  flag: "batch-source",
2098
2634
  type: "json",
2099
2635
  required: false,
2100
- description: "Set to make each tick create a batch from a spreadsheet instead of one execution"
2636
+ description: "Set to make each tick create a batch from a spreadsheet instead of one execution",
2637
+ fields: [
2638
+ {
2639
+ name: "sheetUrl",
2640
+ flag: "sheet-url",
2641
+ type: "string",
2642
+ required: false,
2643
+ description: "Google Sheets URL. The gid selects the tab; without one the first tab is used."
2644
+ },
2645
+ {
2646
+ name: "columnMappings",
2647
+ flag: "column-mappings",
2648
+ type: "json",
2649
+ required: false,
2650
+ description: "Maps a sheet column header to the workflow input it fills. Unmapped columns are ignored.",
2651
+ record: "string"
2652
+ },
2653
+ {
2654
+ name: "requiredInputs",
2655
+ flag: "required-inputs",
2656
+ type: "string[]",
2657
+ required: false,
2658
+ description: "Inputs a row must supply non-empty to count as valid. Rows missing any of them\nare skipped for that tick rather than failing the whole run."
2659
+ },
2660
+ {
2661
+ name: "config",
2662
+ flag: "config",
2663
+ type: "json",
2664
+ required: false,
2665
+ description: "How the resulting batch paces its executions"
2666
+ }
2667
+ ]
2101
2668
  },
2102
2669
  {
2103
2670
  name: "executionOptions",
2104
2671
  flag: "execution-options",
2105
2672
  type: "json",
2106
2673
  required: false,
2107
- description: "Per-execution runtime options applied to every run this schedule triggers."
2674
+ description: "Per-execution runtime options applied to every run this schedule triggers.",
2675
+ fields: [
2676
+ {
2677
+ name: "variantKey",
2678
+ flag: "variant-key",
2679
+ type: "string",
2680
+ required: false,
2681
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
2682
+ },
2683
+ {
2684
+ name: "softTimeoutMins",
2685
+ flag: "soft-timeout-mins",
2686
+ type: "integer",
2687
+ required: false,
2688
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
2689
+ }
2690
+ ]
2108
2691
  }
2109
2692
  ],
2110
2693
  files: [],
@@ -2285,14 +2868,46 @@ var COMMANDS = [
2285
2868
  name: "inputs",
2286
2869
  flag: "inputs",
2287
2870
  type: "json",
2288
- required: false
2871
+ required: false,
2872
+ record: "json"
2289
2873
  },
2290
2874
  {
2291
2875
  name: "batchSource",
2292
2876
  flag: "batch-source",
2293
2877
  type: "json",
2294
2878
  required: false,
2295
- description: "Replaces the batch source. Omit to leave it unchanged; use clearBatchSource to remove it."
2879
+ description: "Replaces the batch source. Omit to leave it unchanged; use clearBatchSource to remove it.",
2880
+ fields: [
2881
+ {
2882
+ name: "sheetUrl",
2883
+ flag: "sheet-url",
2884
+ type: "string",
2885
+ required: false,
2886
+ description: "Google Sheets URL. The gid selects the tab; without one the first tab is used."
2887
+ },
2888
+ {
2889
+ name: "columnMappings",
2890
+ flag: "column-mappings",
2891
+ type: "json",
2892
+ required: false,
2893
+ description: "Maps a sheet column header to the workflow input it fills. Unmapped columns are ignored.",
2894
+ record: "string"
2895
+ },
2896
+ {
2897
+ name: "requiredInputs",
2898
+ flag: "required-inputs",
2899
+ type: "string[]",
2900
+ required: false,
2901
+ description: "Inputs a row must supply non-empty to count as valid. Rows missing any of them\nare skipped for that tick rather than failing the whole run."
2902
+ },
2903
+ {
2904
+ name: "config",
2905
+ flag: "config",
2906
+ type: "json",
2907
+ required: false,
2908
+ description: "How the resulting batch paces its executions"
2909
+ }
2910
+ ]
2296
2911
  },
2297
2912
  {
2298
2913
  name: "clearBatchSource",
@@ -2313,7 +2928,23 @@ var COMMANDS = [
2313
2928
  flag: "execution-options",
2314
2929
  type: "json",
2315
2930
  required: false,
2316
- description: "Per-execution runtime options applied to every run this schedule triggers. Replaces the stored options in full, so send every field you want to keep."
2931
+ description: "Per-execution runtime options applied to every run this schedule triggers. Replaces the stored options in full, so send every field you want to keep.",
2932
+ fields: [
2933
+ {
2934
+ name: "variantKey",
2935
+ flag: "variant-key",
2936
+ type: "string",
2937
+ required: false,
2938
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
2939
+ },
2940
+ {
2941
+ name: "softTimeoutMins",
2942
+ flag: "soft-timeout-mins",
2943
+ type: "integer",
2944
+ required: false,
2945
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
2946
+ }
2947
+ ]
2317
2948
  }
2318
2949
  ],
2319
2950
  files: [],
@@ -2382,14 +3013,16 @@ var COMMANDS = [
2382
3013
  name: "inputs",
2383
3014
  flag: "inputs",
2384
3015
  type: "json",
2385
- required: false
3016
+ required: false,
3017
+ record: "json"
2386
3018
  },
2387
3019
  {
2388
3020
  name: "metadata",
2389
3021
  flag: "metadata",
2390
3022
  type: "json",
2391
3023
  required: false,
2392
- description: "String key/value pairs to label and filter executions."
3024
+ description: "String key/value pairs to label and filter executions.",
3025
+ record: "string"
2393
3026
  },
2394
3027
  {
2395
3028
  name: "executeAt",
@@ -2403,7 +3036,23 @@ var COMMANDS = [
2403
3036
  flag: "execution-options",
2404
3037
  type: "json",
2405
3038
  required: false,
2406
- description: "Per-execution runtime options applied when this execution is triggered."
3039
+ description: "Per-execution runtime options applied when this execution is triggered.",
3040
+ fields: [
3041
+ {
3042
+ name: "variantKey",
3043
+ flag: "variant-key",
3044
+ type: "string",
3045
+ required: false,
3046
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
3047
+ },
3048
+ {
3049
+ name: "softTimeoutMins",
3050
+ flag: "soft-timeout-mins",
3051
+ type: "integer",
3052
+ required: false,
3053
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
3054
+ }
3055
+ ]
2407
3056
  }
2408
3057
  ],
2409
3058
  files: [],
@@ -2534,7 +3183,8 @@ var COMMANDS = [
2534
3183
  name: "schema",
2535
3184
  flag: "schema",
2536
3185
  type: "json",
2537
- required: true
3186
+ required: true,
3187
+ record: "json"
2538
3188
  }
2539
3189
  ],
2540
3190
  files: [],
@@ -2652,7 +3302,51 @@ var COMMANDS = [
2652
3302
  flag: "field",
2653
3303
  type: "json",
2654
3304
  required: true,
2655
- description: "Write shape for a field. The server derives key from label."
3305
+ description: "Write shape for a field. The server derives key from label.",
3306
+ fields: [
3307
+ {
3308
+ name: "type",
3309
+ flag: "type",
3310
+ type: "string",
3311
+ required: false,
3312
+ description: "Type of a vault field. Sensitivity is derived from the type: username, email, url, phone, text, card_expiry, and cardholder_name are readable; password, hidden, totp_seed, api_key, card_number, and card_cvv are write-only. There is no separate hidden flag.",
3313
+ enum: [
3314
+ "username",
3315
+ "email",
3316
+ "url",
3317
+ "phone",
3318
+ "text",
3319
+ "password",
3320
+ "hidden",
3321
+ "totp_seed",
3322
+ "api_key",
3323
+ "card_number",
3324
+ "card_expiry",
3325
+ "card_cvv",
3326
+ "cardholder_name"
3327
+ ]
3328
+ },
3329
+ {
3330
+ name: "label",
3331
+ flag: "label",
3332
+ type: "string",
3333
+ required: false,
3334
+ description: "Human label shown in forms. The field key is UPPER_SNAKE of this label."
3335
+ },
3336
+ {
3337
+ name: "required",
3338
+ flag: "required",
3339
+ type: "boolean",
3340
+ required: false
3341
+ },
3342
+ {
3343
+ name: "hint",
3344
+ flag: "hint",
3345
+ type: "string",
3346
+ required: false,
3347
+ description: "Optional guidance shown next to the field, copied from catalog credentials when generating masters."
3348
+ }
3349
+ ]
2656
3350
  },
2657
3351
  {
2658
3352
  name: "value",
@@ -3500,7 +4194,115 @@ var COMMANDS = [
3500
4194
  flag: "version",
3501
4195
  type: "json",
3502
4196
  required: false,
3503
- description: "The first version of the workflow. Omit it to start from a blank workflow with a single start node."
4197
+ description: "The first version of the workflow. Omit it to start from a blank workflow with a single start node.",
4198
+ fields: [
4199
+ {
4200
+ name: "parentId",
4201
+ flag: "parent-id",
4202
+ type: "string",
4203
+ required: false,
4204
+ description: "Optional parent workflow ID to derive from"
4205
+ },
4206
+ {
4207
+ name: "rules",
4208
+ flag: "rules",
4209
+ type: "string",
4210
+ required: false
4211
+ },
4212
+ {
4213
+ name: "graph",
4214
+ flag: "graph",
4215
+ type: "json",
4216
+ required: false,
4217
+ fields: [
4218
+ {
4219
+ name: "nodes",
4220
+ flag: "nodes",
4221
+ type: "json",
4222
+ required: false
4223
+ },
4224
+ {
4225
+ name: "transitions",
4226
+ flag: "transitions",
4227
+ type: "json",
4228
+ required: false
4229
+ },
4230
+ {
4231
+ name: "sticky_notes",
4232
+ flag: "sticky_notes",
4233
+ type: "json",
4234
+ required: false
4235
+ }
4236
+ ]
4237
+ },
4238
+ {
4239
+ name: "inputs",
4240
+ flag: "inputs",
4241
+ type: "json",
4242
+ required: false,
4243
+ description: "Typed input definitions for this workflow. Names referenced in prompts but omitted here default to optional strings."
4244
+ },
4245
+ {
4246
+ name: "settings",
4247
+ flag: "settings",
4248
+ type: "json",
4249
+ required: false,
4250
+ description: "Configuration settings for workflow execution",
4251
+ fields: [
4252
+ {
4253
+ name: "viewport_width",
4254
+ flag: "viewport_width",
4255
+ type: "integer",
4256
+ required: false,
4257
+ description: "Browser viewport width in pixels"
4258
+ },
4259
+ {
4260
+ name: "viewport_height",
4261
+ flag: "viewport_height",
4262
+ type: "integer",
4263
+ required: false,
4264
+ description: "Browser viewport height in pixels"
4265
+ },
4266
+ {
4267
+ name: "max_timeout_mins",
4268
+ flag: "max_timeout_mins",
4269
+ type: "integer",
4270
+ required: false,
4271
+ description: "Maximum timeout in minutes"
4272
+ },
4273
+ {
4274
+ name: "custom_environment_id",
4275
+ flag: "custom_environment_id",
4276
+ type: "string",
4277
+ required: false,
4278
+ description: "Custom environment executions of this workflow boot on: its environment type and snapshot replace the workflow's own environment, its profile rows restrict which profile an execution may use, and a kept-warm environment hands out a pre-warmed copy. On a new version, omit it to keep the environment of the workflow's latest version (its editable head, which can be newer than the published one), or send null to boot the workflow's own environment. On a new workflow, there is nothing to keep: omit it or send null for no custom environment."
4279
+ }
4280
+ ]
4281
+ },
4282
+ {
4283
+ name: "environmentTemplate",
4284
+ flag: "environment-template",
4285
+ type: "json",
4286
+ required: false,
4287
+ description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields.",
4288
+ fields: [
4289
+ {
4290
+ name: "type",
4291
+ flag: "type",
4292
+ type: "string",
4293
+ required: false,
4294
+ description: "Type of execution environment",
4295
+ enum: ["browser", "os"]
4296
+ },
4297
+ {
4298
+ name: "config",
4299
+ flag: "config",
4300
+ type: "json",
4301
+ required: false
4302
+ }
4303
+ ]
4304
+ }
4305
+ ]
3504
4306
  }
3505
4307
  ],
3506
4308
  files: [],
@@ -3604,7 +4406,8 @@ var COMMANDS = [
3604
4406
  flag: "inputs",
3605
4407
  type: "json",
3606
4408
  required: false,
3607
- description: "Inputs to be merged into the placeholders defined in prompts"
4409
+ description: "Inputs to be merged into the placeholders defined in prompts",
4410
+ record: "json"
3608
4411
  },
3609
4412
  {
3610
4413
  name: "tempFiles",
@@ -3618,7 +4421,8 @@ var COMMANDS = [
3618
4421
  flag: "metadata",
3619
4422
  type: "json",
3620
4423
  required: false,
3621
- description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions"
4424
+ description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions",
4425
+ record: "string"
3622
4426
  },
3623
4427
  {
3624
4428
  name: "version",
@@ -3639,7 +4443,23 @@ var COMMANDS = [
3639
4443
  flag: "execution-options",
3640
4444
  type: "json",
3641
4445
  required: false,
3642
- description: "Per-execution runtime options that override or extend the workflow's default settings."
4446
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
4447
+ fields: [
4448
+ {
4449
+ name: "variantKey",
4450
+ flag: "variant-key",
4451
+ type: "string",
4452
+ required: false,
4453
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
4454
+ },
4455
+ {
4456
+ name: "softTimeoutMins",
4457
+ flag: "soft-timeout-mins",
4458
+ type: "integer",
4459
+ required: false,
4460
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
4461
+ }
4462
+ ]
3643
4463
  },
3644
4464
  {
3645
4465
  name: "onCapacityLimit",
@@ -3697,7 +4517,8 @@ var COMMANDS = [
3697
4517
  flag: "inputs",
3698
4518
  type: "json",
3699
4519
  required: false,
3700
- description: "Inputs to be merged into the placeholders defined in prompts"
4520
+ description: "Inputs to be merged into the placeholders defined in prompts",
4521
+ record: "json"
3701
4522
  },
3702
4523
  {
3703
4524
  name: "tempFiles",
@@ -3711,7 +4532,8 @@ var COMMANDS = [
3711
4532
  flag: "metadata",
3712
4533
  type: "json",
3713
4534
  required: false,
3714
- description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions"
4535
+ description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions",
4536
+ record: "string"
3715
4537
  },
3716
4538
  {
3717
4539
  name: "version",
@@ -3732,7 +4554,23 @@ var COMMANDS = [
3732
4554
  flag: "execution-options",
3733
4555
  type: "json",
3734
4556
  required: false,
3735
- description: "Per-execution runtime options that override or extend the workflow's default settings."
4557
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
4558
+ fields: [
4559
+ {
4560
+ name: "variantKey",
4561
+ flag: "variant-key",
4562
+ type: "string",
4563
+ required: false,
4564
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
4565
+ },
4566
+ {
4567
+ name: "softTimeoutMins",
4568
+ flag: "soft-timeout-mins",
4569
+ type: "integer",
4570
+ required: false,
4571
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
4572
+ }
4573
+ ]
3736
4574
  },
3737
4575
  {
3738
4576
  name: "onCapacityLimit",
@@ -4234,7 +5072,27 @@ var COMMANDS = [
4234
5072
  name: "graph",
4235
5073
  flag: "graph",
4236
5074
  type: "json",
4237
- required: true
5075
+ required: true,
5076
+ fields: [
5077
+ {
5078
+ name: "nodes",
5079
+ flag: "nodes",
5080
+ type: "json",
5081
+ required: false
5082
+ },
5083
+ {
5084
+ name: "transitions",
5085
+ flag: "transitions",
5086
+ type: "json",
5087
+ required: false
5088
+ },
5089
+ {
5090
+ name: "sticky_notes",
5091
+ flag: "sticky_notes",
5092
+ type: "json",
5093
+ required: false
5094
+ }
5095
+ ]
4238
5096
  },
4239
5097
  {
4240
5098
  name: "inputs",
@@ -4248,14 +5106,60 @@ var COMMANDS = [
4248
5106
  flag: "settings",
4249
5107
  type: "json",
4250
5108
  required: true,
4251
- description: "Configuration settings for workflow execution"
5109
+ description: "Configuration settings for workflow execution",
5110
+ fields: [
5111
+ {
5112
+ name: "viewport_width",
5113
+ flag: "viewport_width",
5114
+ type: "integer",
5115
+ required: false,
5116
+ description: "Browser viewport width in pixels"
5117
+ },
5118
+ {
5119
+ name: "viewport_height",
5120
+ flag: "viewport_height",
5121
+ type: "integer",
5122
+ required: false,
5123
+ description: "Browser viewport height in pixels"
5124
+ },
5125
+ {
5126
+ name: "max_timeout_mins",
5127
+ flag: "max_timeout_mins",
5128
+ type: "integer",
5129
+ required: false,
5130
+ description: "Maximum timeout in minutes"
5131
+ },
5132
+ {
5133
+ name: "custom_environment_id",
5134
+ flag: "custom_environment_id",
5135
+ type: "string",
5136
+ required: false,
5137
+ description: "Custom environment executions of this workflow boot on: its environment type and snapshot replace the workflow's own environment, its profile rows restrict which profile an execution may use, and a kept-warm environment hands out a pre-warmed copy. On a new version, omit it to keep the environment of the workflow's latest version (its editable head, which can be newer than the published one), or send null to boot the workflow's own environment. On a new workflow, there is nothing to keep: omit it or send null for no custom environment."
5138
+ }
5139
+ ]
4252
5140
  },
4253
5141
  {
4254
5142
  name: "environmentTemplate",
4255
5143
  flag: "environment-template",
4256
5144
  type: "json",
4257
5145
  required: false,
4258
- description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields."
5146
+ description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields.",
5147
+ fields: [
5148
+ {
5149
+ name: "type",
5150
+ flag: "type",
5151
+ type: "string",
5152
+ required: false,
5153
+ description: "Type of execution environment",
5154
+ enum: ["browser", "os"]
5155
+ },
5156
+ {
5157
+ name: "config",
5158
+ flag: "config",
5159
+ type: "json",
5160
+ required: false
5161
+ }
5162
+ ]
4259
5163
  }
4260
5164
  ],
4261
5165
  files: [],
@@ -4302,7 +5206,27 @@ var COMMANDS = [
4302
5206
  name: "graph",
4303
5207
  flag: "graph",
4304
5208
  type: "json",
4305
- required: true
5209
+ required: true,
5210
+ fields: [
5211
+ {
5212
+ name: "nodes",
5213
+ flag: "nodes",
5214
+ type: "json",
5215
+ required: false
5216
+ },
5217
+ {
5218
+ name: "transitions",
5219
+ flag: "transitions",
5220
+ type: "json",
5221
+ required: false
5222
+ },
5223
+ {
5224
+ name: "sticky_notes",
5225
+ flag: "sticky_notes",
5226
+ type: "json",
5227
+ required: false
5228
+ }
5229
+ ]
4306
5230
  },
4307
5231
  {
4308
5232
  name: "inputs",
@@ -4316,14 +5240,60 @@ var COMMANDS = [
4316
5240
  flag: "settings",
4317
5241
  type: "json",
4318
5242
  required: true,
4319
- description: "Configuration settings for workflow execution"
5243
+ description: "Configuration settings for workflow execution",
5244
+ fields: [
5245
+ {
5246
+ name: "viewport_width",
5247
+ flag: "viewport_width",
5248
+ type: "integer",
5249
+ required: false,
5250
+ description: "Browser viewport width in pixels"
5251
+ },
5252
+ {
5253
+ name: "viewport_height",
5254
+ flag: "viewport_height",
5255
+ type: "integer",
5256
+ required: false,
5257
+ description: "Browser viewport height in pixels"
5258
+ },
5259
+ {
5260
+ name: "max_timeout_mins",
5261
+ flag: "max_timeout_mins",
5262
+ type: "integer",
5263
+ required: false,
5264
+ description: "Maximum timeout in minutes"
5265
+ },
5266
+ {
5267
+ name: "custom_environment_id",
5268
+ flag: "custom_environment_id",
5269
+ type: "string",
5270
+ required: false,
5271
+ description: "Custom environment executions of this workflow boot on: its environment type and snapshot replace the workflow's own environment, its profile rows restrict which profile an execution may use, and a kept-warm environment hands out a pre-warmed copy. On a new version, omit it to keep the environment of the workflow's latest version (its editable head, which can be newer than the published one), or send null to boot the workflow's own environment. On a new workflow, there is nothing to keep: omit it or send null for no custom environment."
5272
+ }
5273
+ ]
4320
5274
  },
4321
5275
  {
4322
5276
  name: "environmentTemplate",
4323
5277
  flag: "environment-template",
4324
5278
  type: "json",
4325
5279
  required: false,
4326
- description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields."
5280
+ description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields.",
5281
+ fields: [
5282
+ {
5283
+ name: "type",
5284
+ flag: "type",
5285
+ type: "string",
5286
+ required: false,
5287
+ description: "Type of execution environment",
5288
+ enum: ["browser", "os"]
5289
+ },
5290
+ {
5291
+ name: "config",
5292
+ flag: "config",
5293
+ type: "json",
5294
+ required: false
5295
+ }
5296
+ ]
4327
5297
  }
4328
5298
  ],
4329
5299
  files: [],
@@ -4390,14 +5360,16 @@ var COMMANDS = [
4390
5360
  flag: "inputs",
4391
5361
  type: "json",
4392
5362
  required: false,
4393
- description: "Inputs to be merged into the placeholders defined in prompts. Do not set together with inputVariables."
5363
+ description: "Inputs to be merged into the placeholders defined in prompts. Do not set together with inputVariables.",
5364
+ record: "json"
4394
5365
  },
4395
5366
  {
4396
5367
  name: "metadata",
4397
5368
  flag: "metadata",
4398
5369
  type: "json",
4399
5370
  required: false,
4400
- description: "Optional metadata key-value pairs for organizing and filtering executions"
5371
+ description: "Optional metadata key-value pairs for organizing and filtering executions",
5372
+ record: "string"
4401
5373
  },
4402
5374
  {
4403
5375
  name: "profileId",
@@ -4425,7 +5397,23 @@ var COMMANDS = [
4425
5397
  flag: "execution-options",
4426
5398
  type: "json",
4427
5399
  required: false,
4428
- description: "Per-execution runtime options that override or extend the workflow's default settings."
5400
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
5401
+ fields: [
5402
+ {
5403
+ name: "variantKey",
5404
+ flag: "variant-key",
5405
+ type: "string",
5406
+ required: false,
5407
+ description: "Identifies which variant this execution is for, scoping its shared files and scripts to a per-variant subdirectory under each node's shared folder. It does not change which workflow or version runs. Normalised to a filesystem-safe slug by the server. Requires the workflow to have `variant_mode` enabled, and a variant-mode workflow requires it on every execution."
5408
+ },
5409
+ {
5410
+ name: "softTimeoutMins",
5411
+ flag: "soft-timeout-mins",
5412
+ type: "integer",
5413
+ required: false,
5414
+ description: "Soft timeout in minutes. When the execution has been running longer than this value, a message is injected on every subsequent step urging the agent to wrap up and produce output. Must be greater than 0 and less than the agent's hard timeout (max_timeout_mins)."
5415
+ }
5416
+ ]
4429
5417
  },
4430
5418
  {
4431
5419
  name: "parentExecutionId",
@@ -4701,7 +5689,27 @@ var COMMANDS = [
4701
5689
  name: "graph",
4702
5690
  flag: "graph",
4703
5691
  type: "json",
4704
- required: true
5692
+ required: true,
5693
+ fields: [
5694
+ {
5695
+ name: "nodes",
5696
+ flag: "nodes",
5697
+ type: "json",
5698
+ required: false
5699
+ },
5700
+ {
5701
+ name: "transitions",
5702
+ flag: "transitions",
5703
+ type: "json",
5704
+ required: false
5705
+ },
5706
+ {
5707
+ name: "sticky_notes",
5708
+ flag: "sticky_notes",
5709
+ type: "json",
5710
+ required: false
5711
+ }
5712
+ ]
4705
5713
  },
4706
5714
  {
4707
5715
  name: "inputs",
@@ -4715,14 +5723,60 @@ var COMMANDS = [
4715
5723
  flag: "settings",
4716
5724
  type: "json",
4717
5725
  required: true,
4718
- description: "Configuration settings for workflow execution"
5726
+ description: "Configuration settings for workflow execution",
5727
+ fields: [
5728
+ {
5729
+ name: "viewport_width",
5730
+ flag: "viewport_width",
5731
+ type: "integer",
5732
+ required: false,
5733
+ description: "Browser viewport width in pixels"
5734
+ },
5735
+ {
5736
+ name: "viewport_height",
5737
+ flag: "viewport_height",
5738
+ type: "integer",
5739
+ required: false,
5740
+ description: "Browser viewport height in pixels"
5741
+ },
5742
+ {
5743
+ name: "max_timeout_mins",
5744
+ flag: "max_timeout_mins",
5745
+ type: "integer",
5746
+ required: false,
5747
+ description: "Maximum timeout in minutes"
5748
+ },
5749
+ {
5750
+ name: "custom_environment_id",
5751
+ flag: "custom_environment_id",
5752
+ type: "string",
5753
+ required: false,
5754
+ description: "Custom environment executions of this workflow boot on: its environment type and snapshot replace the workflow's own environment, its profile rows restrict which profile an execution may use, and a kept-warm environment hands out a pre-warmed copy. On a new version, omit it to keep the environment of the workflow's latest version (its editable head, which can be newer than the published one), or send null to boot the workflow's own environment. On a new workflow, there is nothing to keep: omit it or send null for no custom environment."
5755
+ }
5756
+ ]
4719
5757
  },
4720
5758
  {
4721
5759
  name: "environmentTemplate",
4722
5760
  flag: "environment-template",
4723
5761
  type: "json",
4724
5762
  required: false,
4725
- description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields."
5763
+ description: "Optional environment template. On a new version, omit it to keep the template of the workflow's latest version (its editable head); on a new workflow, omitting it means a browser. Omits admin-only OS fields.",
5764
+ fields: [
5765
+ {
5766
+ name: "type",
5767
+ flag: "type",
5768
+ type: "string",
5769
+ required: false,
5770
+ description: "Type of execution environment",
5771
+ enum: ["browser", "os"]
5772
+ },
5773
+ {
5774
+ name: "config",
5775
+ flag: "config",
5776
+ type: "json",
5777
+ required: false
5778
+ }
5779
+ ]
4726
5780
  }
4727
5781
  ],
4728
5782
  files: [],
@@ -4935,6 +5989,23 @@ var GLOBAL_FLAGS = [
4935
5989
  ["--output <file>", "Write a downloaded file here, not to stdout."],
4936
5990
  ["-h, --help", "Show help."]
4937
5991
  ];
5992
+ function childFlags(option2, prefix = option2.flag) {
5993
+ if (option2.record) {
5994
+ return [
5995
+ {
5996
+ name: option2.name,
5997
+ flag: `${prefix}.<key>`,
5998
+ type: option2.record,
5999
+ required: false,
6000
+ description: "One entry. The key is sent as written."
6001
+ }
6002
+ ];
6003
+ }
6004
+ return (option2.fields ?? []).flatMap((child) => {
6005
+ const flag2 = `${prefix}.${child.flag}`;
6006
+ return [{ ...child, flag: flag2 }, ...childFlags(child, flag2)];
6007
+ });
6008
+ }
4938
6009
 
4939
6010
  // src/program.ts
4940
6011
  var DOTTED = /^--([a-z0-9-]+\.[a-z0-9.-]+)(?:=(.*))?$/;
@@ -4951,7 +6022,7 @@ function optionText(option2) {
4951
6022
  }
4952
6023
  function splitDotted(argv) {
4953
6024
  const rest = [];
4954
- const dotted = /* @__PURE__ */ new Map();
6025
+ const dotted2 = /* @__PURE__ */ new Map();
4955
6026
  for (let i = 0; i < argv.length; i++) {
4956
6027
  const match = DOTTED.exec(argv[i]);
4957
6028
  if (!match) {
@@ -4961,9 +6032,9 @@ function splitDotted(argv) {
4961
6032
  const value2 = match[2] ?? argv[++i];
4962
6033
  if (value2 === void 0)
4963
6034
  throw new UsageError(`--${match[1]} needs a value`);
4964
- dotted.set(match[1], [...dotted.get(match[1]) ?? [], value2]);
6035
+ dotted2.set(match[1], [...dotted2.get(match[1]) ?? [], value2]);
4965
6036
  }
4966
- return { argv: rest, dotted };
6037
+ return { argv: rest, dotted: dotted2 };
4967
6038
  }
4968
6039
  function group(parent, name, groups, path) {
4969
6040
  const existing = groups.get(path);
@@ -4987,6 +6058,10 @@ function leafOptions(leaf, command) {
4987
6058
  );
4988
6059
  if (option2.negatable)
4989
6060
  leaf.option(`--no-${option2.flag}`, `Skip ${option2.flag}.`);
6061
+ for (const child of childFlags(option2)) {
6062
+ const placeholder2 = child.enum ? child.enum.join("|") : child.type.replace("[]", "");
6063
+ leaf.option(`--${child.flag} <${placeholder2}>`, optionText(child));
6064
+ }
4990
6065
  }
4991
6066
  for (const file of command.body?.files ?? []) {
4992
6067
  leaf.option(`--${file} <path>`, "File to upload. Repeatable.", collect);
@@ -5002,10 +6077,10 @@ function leafOptions(leaf, command) {
5002
6077
  "The pulled head folder to push. Defaults to the current folder."
5003
6078
  );
5004
6079
  }
5005
- function toParsed(leaf, positionals, dotted) {
6080
+ function toParsed(leaf, positionals, dotted2) {
5006
6081
  const globals = leaf.optsWithGlobals();
5007
6082
  const own = leaf.opts();
5008
- const flags = new Map(dotted);
6083
+ const flags = new Map(dotted2);
5009
6084
  for (const option2 of leaf.options) {
5010
6085
  const flag2 = option2.long?.replace(/^--(no-)?/, "");
5011
6086
  const value2 = own[option2.attributeName()];
@@ -5021,7 +6096,7 @@ function toParsed(leaf, positionals, dotted) {
5021
6096
  output: globals.output
5022
6097
  };
5023
6098
  }
5024
- function defineCommands(root, options, dotted = /* @__PURE__ */ new Map(), onInvocation = () => void 0) {
6099
+ function defineCommands(root, options, dotted2 = /* @__PURE__ */ new Map(), onInvocation = () => void 0) {
5025
6100
  if (options.description) root.description(options.description);
5026
6101
  if (options.version)
5027
6102
  root.addHelpText(
@@ -5090,7 +6165,7 @@ ${notes.join("\n")}`);
5090
6165
  `expected ${expected}, got ${cmd.args.length} argument(s)`
5091
6166
  );
5092
6167
  }
5093
- const unknownDotted = [...dotted.keys()].filter(
6168
+ const unknownDotted = [...dotted2.keys()].filter(
5094
6169
  (flag2) => !(command.body?.fields ?? []).some(
5095
6170
  (f) => flag2.startsWith(`${f.flag}.`)
5096
6171
  )
@@ -5103,7 +6178,7 @@ ${notes.join("\n")}`);
5103
6178
  onInvocation({
5104
6179
  kind: "command",
5105
6180
  command,
5106
- parsed: toParsed(cmd, positionals, dotted)
6181
+ parsed: toParsed(cmd, positionals, dotted2)
5107
6182
  });
5108
6183
  });
5109
6184
  }
@@ -5122,12 +6197,12 @@ async function parseInvocation(argv, options) {
5122
6197
  stderr: ""
5123
6198
  };
5124
6199
  }
5125
- const { argv: rest, dotted } = splitDotted(argv);
6200
+ const { argv: rest, dotted: dotted2 } = splitDotted(argv);
5126
6201
  const root = new Command("asteroid").exitOverride().helpCommand(false).configureOutput({
5127
6202
  writeOut: (text2) => stdout += text2,
5128
6203
  writeErr: (text2) => stderr += text2
5129
6204
  });
5130
- defineCommands(root, options, dotted, (invocation) => {
6205
+ defineCommands(root, options, dotted2, (invocation) => {
5131
6206
  result = invocation;
5132
6207
  });
5133
6208
  try {
@@ -5232,6 +6307,41 @@ function setPath(target, path, value2) {
5232
6307
  }
5233
6308
  node[path.at(-1)] = value2;
5234
6309
  }
6310
+ async function dotted(field, segments, flag2, raws, io) {
6311
+ const path = [];
6312
+ let option2 = field;
6313
+ for (const [i, segment] of segments.entries()) {
6314
+ if (option2?.record) {
6315
+ const key = segments.slice(i).join(".");
6316
+ const entry = { ...option2, flag: flag2, type: option2.record };
6317
+ delete entry.enum;
6318
+ return [
6319
+ [...path, key],
6320
+ entry.type === "json" ? loose(raws.at(-1)) : value(entry, raws)
6321
+ ];
6322
+ }
6323
+ if (option2?.fields) {
6324
+ const child = option2.fields.find(
6325
+ (f) => f.flag === segment
6326
+ );
6327
+ if (!child) throw new UsageError(`unknown flag: --${flag2}`);
6328
+ path.push(child.name);
6329
+ option2 = child;
6330
+ continue;
6331
+ }
6332
+ if (option2 && option2.type !== "json") {
6333
+ throw new UsageError(`unknown flag: --${flag2}`);
6334
+ }
6335
+ path.push(camel(segment));
6336
+ option2 = void 0;
6337
+ }
6338
+ if (!option2) return [path, loose(raws.at(-1))];
6339
+ if (option2.fields || option2.record) {
6340
+ throw new UsageError(`--${flag2} needs a field, as --${flag2}.<name>`);
6341
+ }
6342
+ const inputs = option2.type === "json" ? await Promise.all(raws.map((raw) => readInput(raw, io))) : raws;
6343
+ return [path, value({ ...option2, flag: flag2 }, inputs)];
6344
+ }
5235
6345
  async function buildRequest(command, input, context = {}) {
5236
6346
  const io = context.io ?? nodeReader;
5237
6347
  const parsed = await resolveInputs(command, input, io);
@@ -5318,7 +6428,8 @@ async function buildRequest(command, input, context = {}) {
5318
6428
  flags.delete(flag2);
5319
6429
  const current = json[field.name];
5320
6430
  json[field.name] = typeof current === "object" && current !== null ? current : {};
5321
- setPath(json, [field.name, ...rest.map(camel)], loose(raws.at(-1)));
6431
+ const [path2, value2] = await dotted(field, rest, flag2, raws, io);
6432
+ setPath(json, [field.name, ...path2], value2);
5322
6433
  }
5323
6434
  rejectUnknown(flags);
5324
6435
  delete json.organizationId;