@asteroidai/cli 1.9.30 → 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 +1342 -44
  2. package/dist/core.js +1341 -43
  3. package/package.json +1 -1
package/dist/asteroid.js CHANGED
@@ -140,6 +140,363 @@ var COMMANDS = [
140
140
  readOnly: true,
141
141
  destructive: false
142
142
  },
143
+ {
144
+ command: "custom-environment create",
145
+ tool: "custom_environments_create",
146
+ title: "Create custom environment",
147
+ description: "Create a custom environment: a saved machine a workflow boots on. Set a unique `name` and a `base`: a browser, or a Linux or Windows OS environment. Optionally whitelist `profiles`, override boot `settings`, and keep copies ready with `warmPool` or fresh logins with `warmCache` (not both). Bind it to a workflow with the version's `settings.custom_environment_id`.",
148
+ method: "POST",
149
+ path: "/agents/v2/custom-environments",
150
+ args: [],
151
+ query: [],
152
+ binary: false,
153
+ readOnly: false,
154
+ destructive: false,
155
+ body: {
156
+ required: true,
157
+ contentType: "application/json",
158
+ fields: [
159
+ {
160
+ name: "name",
161
+ flag: "name",
162
+ type: "string",
163
+ required: true,
164
+ description: "Name, unique within the organisation"
165
+ },
166
+ {
167
+ name: "base",
168
+ flag: "base",
169
+ type: "json",
170
+ required: true,
171
+ 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.",
172
+ fields: [
173
+ {
174
+ name: "type",
175
+ flag: "type",
176
+ type: "string",
177
+ required: false,
178
+ description: "Type of execution environment",
179
+ enum: ["browser", "os"]
180
+ },
181
+ {
182
+ name: "config",
183
+ flag: "config",
184
+ type: "json",
185
+ required: false
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ name: "profiles",
191
+ flag: "profiles",
192
+ type: "json",
193
+ required: true,
194
+ description: "Ordered whitelist of the profile sources an execution bound to this environment may run as. Each row gets its own warm copies. With one row, a trigger that names neither a profile nor a pool defaults to that row; with several rows, the trigger must name an allowed profile, a member of an allowed pool, or an allowed pool. Empty means any profile or pool may be named, or none."
195
+ },
196
+ {
197
+ name: "settings",
198
+ flag: "settings",
199
+ type: "json",
200
+ required: false,
201
+ description: "Settings the environment boots with. Must match the base type. Absent inherits from the agent profile. A change applies to environments booted afterwards; warm members already booted keep the settings they booted with."
202
+ },
203
+ {
204
+ name: "warmPool",
205
+ flag: "warm-pool",
206
+ type: "json",
207
+ required: false,
208
+ description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated.",
209
+ fields: [
210
+ {
211
+ name: "targetSize",
212
+ flag: "target-size",
213
+ type: "integer",
214
+ required: false,
215
+ 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"
216
+ },
217
+ {
218
+ name: "schedule",
219
+ flag: "schedule",
220
+ type: "json",
221
+ required: false,
222
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
223
+ fields: [
224
+ {
225
+ name: "timezone",
226
+ flag: "timezone",
227
+ type: "string",
228
+ required: false,
229
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
230
+ },
231
+ {
232
+ name: "windows",
233
+ flag: "windows",
234
+ type: "json",
235
+ required: false
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ name: "maxAgeMins",
241
+ flag: "max-age-mins",
242
+ type: "integer",
243
+ required: false,
244
+ 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."
245
+ },
246
+ {
247
+ name: "reuse",
248
+ flag: "reuse",
249
+ type: "json",
250
+ required: false,
251
+ description: "How long a pooled environment lives: retired on its first claim, or reused until maxAgeMins and its replacement is ready."
252
+ },
253
+ {
254
+ name: "initialization",
255
+ flag: "initialization",
256
+ type: "json",
257
+ required: false,
258
+ description: "Agent that initialises each member. Absent means a member is available as soon as it has booted.",
259
+ fields: [
260
+ {
261
+ name: "workflowId",
262
+ flag: "workflow-id",
263
+ type: "string",
264
+ required: false,
265
+ description: "The initialising workflow"
266
+ },
267
+ {
268
+ name: "inputs",
269
+ flag: "inputs",
270
+ type: "json",
271
+ required: false,
272
+ description: "Fixed inputs for the initialising run",
273
+ record: "json"
274
+ },
275
+ {
276
+ name: "successOutcomes",
277
+ flag: "success-outcomes",
278
+ type: "string[]",
279
+ required: false,
280
+ 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."
281
+ }
282
+ ]
283
+ },
284
+ {
285
+ name: "keepAlive",
286
+ flag: "keep-alive",
287
+ type: "json",
288
+ required: false,
289
+ 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.",
290
+ fields: [
291
+ {
292
+ name: "intervalMins",
293
+ flag: "interval-mins",
294
+ type: "integer",
295
+ required: false,
296
+ 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."
297
+ },
298
+ {
299
+ name: "script",
300
+ flag: "script",
301
+ type: "string",
302
+ required: false,
303
+ 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."
304
+ }
305
+ ]
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ name: "warmCache",
311
+ flag: "warm-cache",
312
+ type: "json",
313
+ required: false,
314
+ description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated.",
315
+ fields: [
316
+ {
317
+ name: "intervalMins",
318
+ flag: "interval-mins",
319
+ type: "integer",
320
+ required: false,
321
+ description: "Minutes between logins of the same profile"
322
+ },
323
+ {
324
+ name: "activeHours",
325
+ flag: "active-hours",
326
+ type: "json",
327
+ required: false,
328
+ description: "Hours during which logins run. Absent means around the clock.",
329
+ fields: [
330
+ {
331
+ name: "timezone",
332
+ flag: "timezone",
333
+ type: "string",
334
+ required: false,
335
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
336
+ },
337
+ {
338
+ name: "windows",
339
+ flag: "windows",
340
+ type: "json",
341
+ required: false
342
+ }
343
+ ]
344
+ },
345
+ {
346
+ name: "initialization",
347
+ flag: "initialization",
348
+ type: "json",
349
+ required: false,
350
+ description: "The login agent, run on each profile's own environment",
351
+ fields: [
352
+ {
353
+ name: "workflowId",
354
+ flag: "workflow-id",
355
+ type: "string",
356
+ required: false,
357
+ description: "The initialising workflow"
358
+ },
359
+ {
360
+ name: "inputs",
361
+ flag: "inputs",
362
+ type: "json",
363
+ required: false,
364
+ description: "Fixed inputs for the initialising run",
365
+ record: "json"
366
+ },
367
+ {
368
+ name: "successOutcomes",
369
+ flag: "success-outcomes",
370
+ type: "string[]",
371
+ required: false,
372
+ 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."
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ name: "executionsWriteBack",
378
+ flag: "executions-write-back",
379
+ type: "boolean",
380
+ required: false,
381
+ 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."
382
+ }
383
+ ]
384
+ },
385
+ {
386
+ name: "dedicated",
387
+ flag: "dedicated",
388
+ type: "json",
389
+ required: false,
390
+ description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache.",
391
+ fields: [
392
+ {
393
+ name: "workflowId",
394
+ flag: "workflow-id",
395
+ type: "string",
396
+ required: false,
397
+ description: "The workflow the workers keep loaded"
398
+ },
399
+ {
400
+ name: "targetSize",
401
+ flag: "target-size",
402
+ type: "integer",
403
+ required: false,
404
+ description: "Baseline number of workers to keep ready outside any scheduled window. 0 drains the environment."
405
+ },
406
+ {
407
+ name: "schedule",
408
+ flag: "schedule",
409
+ type: "json",
410
+ required: false,
411
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
412
+ fields: [
413
+ {
414
+ name: "timezone",
415
+ flag: "timezone",
416
+ type: "string",
417
+ required: false,
418
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
419
+ },
420
+ {
421
+ name: "windows",
422
+ flag: "windows",
423
+ type: "json",
424
+ required: false
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ name: "maxAgeMins",
430
+ flag: "max-age-mins",
431
+ type: "integer",
432
+ required: false,
433
+ description: "Member max age in minutes. As for a warm pool, the replacement boots ahead of it."
434
+ },
435
+ {
436
+ name: "executionsPerWorker",
437
+ flag: "executions-per-worker",
438
+ type: "integer",
439
+ required: false,
440
+ description: "Executions one worker runs at once, each on its own page of the member's browser"
441
+ },
442
+ {
443
+ name: "initialization",
444
+ flag: "initialization",
445
+ type: "json",
446
+ required: false,
447
+ 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.",
448
+ fields: [
449
+ {
450
+ name: "workflowId",
451
+ flag: "workflow-id",
452
+ type: "string",
453
+ required: false,
454
+ description: "The initialising workflow"
455
+ },
456
+ {
457
+ name: "inputs",
458
+ flag: "inputs",
459
+ type: "json",
460
+ required: false,
461
+ description: "Fixed inputs for the initialising run",
462
+ record: "json"
463
+ },
464
+ {
465
+ name: "successOutcomes",
466
+ flag: "success-outcomes",
467
+ type: "string[]",
468
+ required: false,
469
+ 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."
470
+ }
471
+ ]
472
+ }
473
+ ]
474
+ }
475
+ ],
476
+ files: [],
477
+ credentialOrganization: true
478
+ }
479
+ },
480
+ {
481
+ command: "custom-environment delete",
482
+ tool: "custom_environment_delete",
483
+ title: "Delete custom environment",
484
+ description: "Delete a custom environment. Workflows bound to it through `settings.custom_environment_id` can no longer boot. Refused while warm members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
485
+ method: "DELETE",
486
+ path: "/agents/v2/custom-environments/{customEnvironmentId}",
487
+ args: [
488
+ {
489
+ name: "customEnvironmentId",
490
+ flag: "custom-environment-id",
491
+ type: "string",
492
+ required: true
493
+ }
494
+ ],
495
+ query: [],
496
+ binary: false,
497
+ readOnly: false,
498
+ destructive: true
499
+ },
143
500
  {
144
501
  command: "custom-environment get",
145
502
  tool: "custom_environment_get",
@@ -164,7 +521,7 @@ var COMMANDS = [
164
521
  command: "custom-environment list",
165
522
  tool: "custom_environments_list",
166
523
  title: "List custom environments",
167
- description: "List an organization's custom environments: the saved machines a workflow boots on, each with its environment type, snapshot, networking, allowed profiles and warm pool. Use an environment's `id` as a workflow version's `settings.custom_environment_id`. Users create and edit custom environments on the platform's Environments page; no tool changes them.",
524
+ description: "List an organization's custom environments: the saved machines a workflow boots on, each with its environment type, snapshot, networking, allowed profiles and warm pool. Use an environment's `id` as a workflow version's `settings.custom_environment_id`.",
168
525
  method: "GET",
169
526
  path: "/agents/v2/custom-environments",
170
527
  args: [],
@@ -173,6 +530,370 @@ var COMMANDS = [
173
530
  readOnly: true,
174
531
  destructive: false
175
532
  },
533
+ {
534
+ command: "custom-environment member list",
535
+ tool: "custom_environment_members_list",
536
+ title: "List custom environment members",
537
+ description: "List a custom environment's warm pool members: each pre-warmed environment's ID, state (warming, available, retiring), profile, attached executions and keep-alive health. Empty when the environment is not kept warm.",
538
+ method: "GET",
539
+ path: "/agents/v2/custom-environments/{customEnvironmentId}/members",
540
+ args: [
541
+ {
542
+ name: "customEnvironmentId",
543
+ flag: "custom-environment-id",
544
+ type: "string",
545
+ required: true
546
+ }
547
+ ],
548
+ query: [],
549
+ binary: false,
550
+ readOnly: true,
551
+ destructive: false
552
+ },
553
+ {
554
+ command: "custom-environment update",
555
+ tool: "custom_environment_update",
556
+ title: "Update custom environment",
557
+ description: "Replace a custom environment's configuration. Send the full config, as `custom_environment_get` returns it: a field left out is cleared, except proxy passwords and a managed proxy's provider, which keep their stored values. Changes apply to environments booted afterwards. Turning keep-warm off is refused while members exist: set `warmPool.targetSize` to 0 first and wait for them to retire.",
558
+ method: "PATCH",
559
+ path: "/agents/v2/custom-environments/{customEnvironmentId}",
560
+ args: [
561
+ {
562
+ name: "customEnvironmentId",
563
+ flag: "custom-environment-id",
564
+ type: "string",
565
+ required: true
566
+ }
567
+ ],
568
+ query: [],
569
+ binary: false,
570
+ readOnly: false,
571
+ destructive: false,
572
+ body: {
573
+ required: true,
574
+ contentType: "application/json",
575
+ fields: [
576
+ {
577
+ name: "name",
578
+ flag: "name",
579
+ type: "string",
580
+ required: true,
581
+ description: "Name, unique within the organisation"
582
+ },
583
+ {
584
+ name: "base",
585
+ flag: "base",
586
+ type: "json",
587
+ required: true,
588
+ 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.",
589
+ fields: [
590
+ {
591
+ name: "type",
592
+ flag: "type",
593
+ type: "string",
594
+ required: false,
595
+ description: "Type of execution environment",
596
+ enum: ["browser", "os"]
597
+ },
598
+ {
599
+ name: "config",
600
+ flag: "config",
601
+ type: "json",
602
+ required: false
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ name: "profiles",
608
+ flag: "profiles",
609
+ type: "json",
610
+ required: true,
611
+ description: "Ordered whitelist of the profile sources an execution bound to this environment may run as. Each row gets its own warm copies. With one row, a trigger that names neither a profile nor a pool defaults to that row; with several rows, the trigger must name an allowed profile, a member of an allowed pool, or an allowed pool. Empty means any profile or pool may be named, or none."
612
+ },
613
+ {
614
+ name: "settings",
615
+ flag: "settings",
616
+ type: "json",
617
+ required: false,
618
+ description: "Settings the environment boots with. Must match the base type. Absent inherits from the agent profile. A change applies to environments booted afterwards; warm members already booted keep the settings they booted with."
619
+ },
620
+ {
621
+ name: "warmPool",
622
+ flag: "warm-pool",
623
+ type: "json",
624
+ required: false,
625
+ description: "Warm pool configuration. Absent means the environment is not kept warm. Exclusive with warmCache and dedicated.",
626
+ fields: [
627
+ {
628
+ name: "targetSize",
629
+ flag: "target-size",
630
+ type: "integer",
631
+ required: false,
632
+ 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"
633
+ },
634
+ {
635
+ name: "schedule",
636
+ flag: "schedule",
637
+ type: "json",
638
+ required: false,
639
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
640
+ fields: [
641
+ {
642
+ name: "timezone",
643
+ flag: "timezone",
644
+ type: "string",
645
+ required: false,
646
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
647
+ },
648
+ {
649
+ name: "windows",
650
+ flag: "windows",
651
+ type: "json",
652
+ required: false
653
+ }
654
+ ]
655
+ },
656
+ {
657
+ name: "maxAgeMins",
658
+ flag: "max-age-mins",
659
+ type: "integer",
660
+ required: false,
661
+ 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."
662
+ },
663
+ {
664
+ name: "reuse",
665
+ flag: "reuse",
666
+ type: "json",
667
+ required: false,
668
+ description: "How long a pooled environment lives: retired on its first claim, or reused until maxAgeMins and its replacement is ready."
669
+ },
670
+ {
671
+ name: "initialization",
672
+ flag: "initialization",
673
+ type: "json",
674
+ required: false,
675
+ description: "Agent that initialises each member. Absent means a member is available as soon as it has booted.",
676
+ fields: [
677
+ {
678
+ name: "workflowId",
679
+ flag: "workflow-id",
680
+ type: "string",
681
+ required: false,
682
+ description: "The initialising workflow"
683
+ },
684
+ {
685
+ name: "inputs",
686
+ flag: "inputs",
687
+ type: "json",
688
+ required: false,
689
+ description: "Fixed inputs for the initialising run",
690
+ record: "json"
691
+ },
692
+ {
693
+ name: "successOutcomes",
694
+ flag: "success-outcomes",
695
+ type: "string[]",
696
+ required: false,
697
+ 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."
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ name: "keepAlive",
703
+ flag: "keep-alive",
704
+ type: "json",
705
+ required: false,
706
+ 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.",
707
+ fields: [
708
+ {
709
+ name: "intervalMins",
710
+ flag: "interval-mins",
711
+ type: "integer",
712
+ required: false,
713
+ 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."
714
+ },
715
+ {
716
+ name: "script",
717
+ flag: "script",
718
+ type: "string",
719
+ required: false,
720
+ 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."
721
+ }
722
+ ]
723
+ }
724
+ ]
725
+ },
726
+ {
727
+ name: "warmCache",
728
+ flag: "warm-cache",
729
+ type: "json",
730
+ required: false,
731
+ description: "Warm cache configuration. Absent means no login agent keeps the profiles' cookies fresh. Exclusive with warmPool and dedicated.",
732
+ fields: [
733
+ {
734
+ name: "intervalMins",
735
+ flag: "interval-mins",
736
+ type: "integer",
737
+ required: false,
738
+ description: "Minutes between logins of the same profile"
739
+ },
740
+ {
741
+ name: "activeHours",
742
+ flag: "active-hours",
743
+ type: "json",
744
+ required: false,
745
+ description: "Hours during which logins run. Absent means around the clock.",
746
+ fields: [
747
+ {
748
+ name: "timezone",
749
+ flag: "timezone",
750
+ type: "string",
751
+ required: false,
752
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
753
+ },
754
+ {
755
+ name: "windows",
756
+ flag: "windows",
757
+ type: "json",
758
+ required: false
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ name: "initialization",
764
+ flag: "initialization",
765
+ type: "json",
766
+ required: false,
767
+ description: "The login agent, run on each profile's own environment",
768
+ fields: [
769
+ {
770
+ name: "workflowId",
771
+ flag: "workflow-id",
772
+ type: "string",
773
+ required: false,
774
+ description: "The initialising workflow"
775
+ },
776
+ {
777
+ name: "inputs",
778
+ flag: "inputs",
779
+ type: "json",
780
+ required: false,
781
+ description: "Fixed inputs for the initialising run",
782
+ record: "json"
783
+ },
784
+ {
785
+ name: "successOutcomes",
786
+ flag: "success-outcomes",
787
+ type: "string[]",
788
+ required: false,
789
+ 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."
790
+ }
791
+ ]
792
+ },
793
+ {
794
+ name: "executionsWriteBack",
795
+ flag: "executions-write-back",
796
+ type: "boolean",
797
+ required: false,
798
+ 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."
799
+ }
800
+ ]
801
+ },
802
+ {
803
+ name: "dedicated",
804
+ flag: "dedicated",
805
+ type: "json",
806
+ required: false,
807
+ description: "Admin only, and returned to admins only. Dedicated worker configuration. Absent means no workers are kept. Exclusive with warmPool and warmCache.",
808
+ fields: [
809
+ {
810
+ name: "workflowId",
811
+ flag: "workflow-id",
812
+ type: "string",
813
+ required: false,
814
+ description: "The workflow the workers keep loaded"
815
+ },
816
+ {
817
+ name: "targetSize",
818
+ flag: "target-size",
819
+ type: "integer",
820
+ required: false,
821
+ description: "Baseline number of workers to keep ready outside any scheduled window. 0 drains the environment."
822
+ },
823
+ {
824
+ name: "schedule",
825
+ flag: "schedule",
826
+ type: "json",
827
+ required: false,
828
+ description: "Hour windows that override the baseline target size. Absent means the baseline applies around the clock.",
829
+ fields: [
830
+ {
831
+ name: "timezone",
832
+ flag: "timezone",
833
+ type: "string",
834
+ required: false,
835
+ description: "IANA time zone the windows are evaluated in, such as Europe/London"
836
+ },
837
+ {
838
+ name: "windows",
839
+ flag: "windows",
840
+ type: "json",
841
+ required: false
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ name: "maxAgeMins",
847
+ flag: "max-age-mins",
848
+ type: "integer",
849
+ required: false,
850
+ description: "Member max age in minutes. As for a warm pool, the replacement boots ahead of it."
851
+ },
852
+ {
853
+ name: "executionsPerWorker",
854
+ flag: "executions-per-worker",
855
+ type: "integer",
856
+ required: false,
857
+ description: "Executions one worker runs at once, each on its own page of the member's browser"
858
+ },
859
+ {
860
+ name: "initialization",
861
+ flag: "initialization",
862
+ type: "json",
863
+ required: false,
864
+ 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.",
865
+ fields: [
866
+ {
867
+ name: "workflowId",
868
+ flag: "workflow-id",
869
+ type: "string",
870
+ required: false,
871
+ description: "The initialising workflow"
872
+ },
873
+ {
874
+ name: "inputs",
875
+ flag: "inputs",
876
+ type: "json",
877
+ required: false,
878
+ description: "Fixed inputs for the initialising run",
879
+ record: "json"
880
+ },
881
+ {
882
+ name: "successOutcomes",
883
+ flag: "success-outcomes",
884
+ type: "string[]",
885
+ required: false,
886
+ 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."
887
+ }
888
+ ]
889
+ }
890
+ ]
891
+ }
892
+ ],
893
+ files: [],
894
+ credentialOrganization: false
895
+ }
896
+ },
176
897
  {
177
898
  command: "docs search",
178
899
  tool: "search_docs",
@@ -1019,7 +1740,8 @@ var COMMANDS = [
1019
1740
  flag: "inputs",
1020
1741
  type: "json",
1021
1742
  required: false,
1022
- description: "Input variables for the new execution. Replaces the original inputs when set."
1743
+ description: "Input variables for the new execution. Replaces the original inputs when set.",
1744
+ record: "json"
1023
1745
  },
1024
1746
  {
1025
1747
  name: "profileId",
@@ -1882,21 +2604,69 @@ var COMMANDS = [
1882
2604
  name: "inputs",
1883
2605
  flag: "inputs",
1884
2606
  type: "json",
1885
- required: false
2607
+ required: false,
2608
+ record: "json"
1886
2609
  },
1887
2610
  {
1888
2611
  name: "batchSource",
1889
2612
  flag: "batch-source",
1890
2613
  type: "json",
1891
2614
  required: false,
1892
- description: "Set to make each tick create a batch from a spreadsheet instead of one execution"
2615
+ description: "Set to make each tick create a batch from a spreadsheet instead of one execution",
2616
+ fields: [
2617
+ {
2618
+ name: "sheetUrl",
2619
+ flag: "sheet-url",
2620
+ type: "string",
2621
+ required: false,
2622
+ description: "Google Sheets URL. The gid selects the tab; without one the first tab is used."
2623
+ },
2624
+ {
2625
+ name: "columnMappings",
2626
+ flag: "column-mappings",
2627
+ type: "json",
2628
+ required: false,
2629
+ description: "Maps a sheet column header to the workflow input it fills. Unmapped columns are ignored.",
2630
+ record: "string"
2631
+ },
2632
+ {
2633
+ name: "requiredInputs",
2634
+ flag: "required-inputs",
2635
+ type: "string[]",
2636
+ required: false,
2637
+ 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."
2638
+ },
2639
+ {
2640
+ name: "config",
2641
+ flag: "config",
2642
+ type: "json",
2643
+ required: false,
2644
+ description: "How the resulting batch paces its executions"
2645
+ }
2646
+ ]
1893
2647
  },
1894
2648
  {
1895
2649
  name: "executionOptions",
1896
2650
  flag: "execution-options",
1897
2651
  type: "json",
1898
2652
  required: false,
1899
- description: "Per-execution runtime options applied to every run this schedule triggers."
2653
+ description: "Per-execution runtime options applied to every run this schedule triggers.",
2654
+ fields: [
2655
+ {
2656
+ name: "variantKey",
2657
+ flag: "variant-key",
2658
+ type: "string",
2659
+ required: false,
2660
+ 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."
2661
+ },
2662
+ {
2663
+ name: "softTimeoutMins",
2664
+ flag: "soft-timeout-mins",
2665
+ type: "integer",
2666
+ required: false,
2667
+ 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)."
2668
+ }
2669
+ ]
1900
2670
  }
1901
2671
  ],
1902
2672
  files: [],
@@ -2077,14 +2847,46 @@ var COMMANDS = [
2077
2847
  name: "inputs",
2078
2848
  flag: "inputs",
2079
2849
  type: "json",
2080
- required: false
2850
+ required: false,
2851
+ record: "json"
2081
2852
  },
2082
2853
  {
2083
2854
  name: "batchSource",
2084
2855
  flag: "batch-source",
2085
2856
  type: "json",
2086
2857
  required: false,
2087
- description: "Replaces the batch source. Omit to leave it unchanged; use clearBatchSource to remove it."
2858
+ description: "Replaces the batch source. Omit to leave it unchanged; use clearBatchSource to remove it.",
2859
+ fields: [
2860
+ {
2861
+ name: "sheetUrl",
2862
+ flag: "sheet-url",
2863
+ type: "string",
2864
+ required: false,
2865
+ description: "Google Sheets URL. The gid selects the tab; without one the first tab is used."
2866
+ },
2867
+ {
2868
+ name: "columnMappings",
2869
+ flag: "column-mappings",
2870
+ type: "json",
2871
+ required: false,
2872
+ description: "Maps a sheet column header to the workflow input it fills. Unmapped columns are ignored.",
2873
+ record: "string"
2874
+ },
2875
+ {
2876
+ name: "requiredInputs",
2877
+ flag: "required-inputs",
2878
+ type: "string[]",
2879
+ required: false,
2880
+ 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."
2881
+ },
2882
+ {
2883
+ name: "config",
2884
+ flag: "config",
2885
+ type: "json",
2886
+ required: false,
2887
+ description: "How the resulting batch paces its executions"
2888
+ }
2889
+ ]
2088
2890
  },
2089
2891
  {
2090
2892
  name: "clearBatchSource",
@@ -2105,7 +2907,23 @@ var COMMANDS = [
2105
2907
  flag: "execution-options",
2106
2908
  type: "json",
2107
2909
  required: false,
2108
- 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."
2910
+ 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.",
2911
+ fields: [
2912
+ {
2913
+ name: "variantKey",
2914
+ flag: "variant-key",
2915
+ type: "string",
2916
+ required: false,
2917
+ 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."
2918
+ },
2919
+ {
2920
+ name: "softTimeoutMins",
2921
+ flag: "soft-timeout-mins",
2922
+ type: "integer",
2923
+ required: false,
2924
+ 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)."
2925
+ }
2926
+ ]
2109
2927
  }
2110
2928
  ],
2111
2929
  files: [],
@@ -2174,14 +2992,16 @@ var COMMANDS = [
2174
2992
  name: "inputs",
2175
2993
  flag: "inputs",
2176
2994
  type: "json",
2177
- required: false
2995
+ required: false,
2996
+ record: "json"
2178
2997
  },
2179
2998
  {
2180
2999
  name: "metadata",
2181
3000
  flag: "metadata",
2182
3001
  type: "json",
2183
3002
  required: false,
2184
- description: "String key/value pairs to label and filter executions."
3003
+ description: "String key/value pairs to label and filter executions.",
3004
+ record: "string"
2185
3005
  },
2186
3006
  {
2187
3007
  name: "executeAt",
@@ -2195,7 +3015,23 @@ var COMMANDS = [
2195
3015
  flag: "execution-options",
2196
3016
  type: "json",
2197
3017
  required: false,
2198
- description: "Per-execution runtime options applied when this execution is triggered."
3018
+ description: "Per-execution runtime options applied when this execution is triggered.",
3019
+ fields: [
3020
+ {
3021
+ name: "variantKey",
3022
+ flag: "variant-key",
3023
+ type: "string",
3024
+ required: false,
3025
+ 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."
3026
+ },
3027
+ {
3028
+ name: "softTimeoutMins",
3029
+ flag: "soft-timeout-mins",
3030
+ type: "integer",
3031
+ required: false,
3032
+ 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)."
3033
+ }
3034
+ ]
2199
3035
  }
2200
3036
  ],
2201
3037
  files: [],
@@ -2326,7 +3162,8 @@ var COMMANDS = [
2326
3162
  name: "schema",
2327
3163
  flag: "schema",
2328
3164
  type: "json",
2329
- required: true
3165
+ required: true,
3166
+ record: "json"
2330
3167
  }
2331
3168
  ],
2332
3169
  files: [],
@@ -2444,7 +3281,51 @@ var COMMANDS = [
2444
3281
  flag: "field",
2445
3282
  type: "json",
2446
3283
  required: true,
2447
- description: "Write shape for a field. The server derives key from label."
3284
+ description: "Write shape for a field. The server derives key from label.",
3285
+ fields: [
3286
+ {
3287
+ name: "type",
3288
+ flag: "type",
3289
+ type: "string",
3290
+ required: false,
3291
+ 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.",
3292
+ enum: [
3293
+ "username",
3294
+ "email",
3295
+ "url",
3296
+ "phone",
3297
+ "text",
3298
+ "password",
3299
+ "hidden",
3300
+ "totp_seed",
3301
+ "api_key",
3302
+ "card_number",
3303
+ "card_expiry",
3304
+ "card_cvv",
3305
+ "cardholder_name"
3306
+ ]
3307
+ },
3308
+ {
3309
+ name: "label",
3310
+ flag: "label",
3311
+ type: "string",
3312
+ required: false,
3313
+ description: "Human label shown in forms. The field key is UPPER_SNAKE of this label."
3314
+ },
3315
+ {
3316
+ name: "required",
3317
+ flag: "required",
3318
+ type: "boolean",
3319
+ required: false
3320
+ },
3321
+ {
3322
+ name: "hint",
3323
+ flag: "hint",
3324
+ type: "string",
3325
+ required: false,
3326
+ description: "Optional guidance shown next to the field, copied from catalog credentials when generating masters."
3327
+ }
3328
+ ]
2448
3329
  },
2449
3330
  {
2450
3331
  name: "value",
@@ -3292,7 +4173,115 @@ var COMMANDS = [
3292
4173
  flag: "version",
3293
4174
  type: "json",
3294
4175
  required: false,
3295
- description: "The first version of the workflow. Omit it to start from a blank workflow with a single start node."
4176
+ description: "The first version of the workflow. Omit it to start from a blank workflow with a single start node.",
4177
+ fields: [
4178
+ {
4179
+ name: "parentId",
4180
+ flag: "parent-id",
4181
+ type: "string",
4182
+ required: false,
4183
+ description: "Optional parent workflow ID to derive from"
4184
+ },
4185
+ {
4186
+ name: "rules",
4187
+ flag: "rules",
4188
+ type: "string",
4189
+ required: false
4190
+ },
4191
+ {
4192
+ name: "graph",
4193
+ flag: "graph",
4194
+ type: "json",
4195
+ required: false,
4196
+ fields: [
4197
+ {
4198
+ name: "nodes",
4199
+ flag: "nodes",
4200
+ type: "json",
4201
+ required: false
4202
+ },
4203
+ {
4204
+ name: "transitions",
4205
+ flag: "transitions",
4206
+ type: "json",
4207
+ required: false
4208
+ },
4209
+ {
4210
+ name: "sticky_notes",
4211
+ flag: "sticky_notes",
4212
+ type: "json",
4213
+ required: false
4214
+ }
4215
+ ]
4216
+ },
4217
+ {
4218
+ name: "inputs",
4219
+ flag: "inputs",
4220
+ type: "json",
4221
+ required: false,
4222
+ description: "Typed input definitions for this workflow. Names referenced in prompts but omitted here default to optional strings."
4223
+ },
4224
+ {
4225
+ name: "settings",
4226
+ flag: "settings",
4227
+ type: "json",
4228
+ required: false,
4229
+ description: "Configuration settings for workflow execution",
4230
+ fields: [
4231
+ {
4232
+ name: "viewport_width",
4233
+ flag: "viewport_width",
4234
+ type: "integer",
4235
+ required: false,
4236
+ description: "Browser viewport width in pixels"
4237
+ },
4238
+ {
4239
+ name: "viewport_height",
4240
+ flag: "viewport_height",
4241
+ type: "integer",
4242
+ required: false,
4243
+ description: "Browser viewport height in pixels"
4244
+ },
4245
+ {
4246
+ name: "max_timeout_mins",
4247
+ flag: "max_timeout_mins",
4248
+ type: "integer",
4249
+ required: false,
4250
+ description: "Maximum timeout in minutes"
4251
+ },
4252
+ {
4253
+ name: "custom_environment_id",
4254
+ flag: "custom_environment_id",
4255
+ type: "string",
4256
+ required: false,
4257
+ 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."
4258
+ }
4259
+ ]
4260
+ },
4261
+ {
4262
+ name: "environmentTemplate",
4263
+ flag: "environment-template",
4264
+ type: "json",
4265
+ required: false,
4266
+ 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.",
4267
+ fields: [
4268
+ {
4269
+ name: "type",
4270
+ flag: "type",
4271
+ type: "string",
4272
+ required: false,
4273
+ description: "Type of execution environment",
4274
+ enum: ["browser", "os"]
4275
+ },
4276
+ {
4277
+ name: "config",
4278
+ flag: "config",
4279
+ type: "json",
4280
+ required: false
4281
+ }
4282
+ ]
4283
+ }
4284
+ ]
3296
4285
  }
3297
4286
  ],
3298
4287
  files: [],
@@ -3396,7 +4385,8 @@ var COMMANDS = [
3396
4385
  flag: "inputs",
3397
4386
  type: "json",
3398
4387
  required: false,
3399
- description: "Inputs to be merged into the placeholders defined in prompts"
4388
+ description: "Inputs to be merged into the placeholders defined in prompts",
4389
+ record: "json"
3400
4390
  },
3401
4391
  {
3402
4392
  name: "tempFiles",
@@ -3410,7 +4400,8 @@ var COMMANDS = [
3410
4400
  flag: "metadata",
3411
4401
  type: "json",
3412
4402
  required: false,
3413
- description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions"
4403
+ description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions",
4404
+ record: "string"
3414
4405
  },
3415
4406
  {
3416
4407
  name: "version",
@@ -3431,7 +4422,23 @@ var COMMANDS = [
3431
4422
  flag: "execution-options",
3432
4423
  type: "json",
3433
4424
  required: false,
3434
- description: "Per-execution runtime options that override or extend the workflow's default settings."
4425
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
4426
+ fields: [
4427
+ {
4428
+ name: "variantKey",
4429
+ flag: "variant-key",
4430
+ type: "string",
4431
+ required: false,
4432
+ 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."
4433
+ },
4434
+ {
4435
+ name: "softTimeoutMins",
4436
+ flag: "soft-timeout-mins",
4437
+ type: "integer",
4438
+ required: false,
4439
+ 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)."
4440
+ }
4441
+ ]
3435
4442
  },
3436
4443
  {
3437
4444
  name: "onCapacityLimit",
@@ -3489,7 +4496,8 @@ var COMMANDS = [
3489
4496
  flag: "inputs",
3490
4497
  type: "json",
3491
4498
  required: false,
3492
- description: "Inputs to be merged into the placeholders defined in prompts"
4499
+ description: "Inputs to be merged into the placeholders defined in prompts",
4500
+ record: "json"
3493
4501
  },
3494
4502
  {
3495
4503
  name: "tempFiles",
@@ -3503,7 +4511,8 @@ var COMMANDS = [
3503
4511
  flag: "metadata",
3504
4512
  type: "json",
3505
4513
  required: false,
3506
- description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions"
4514
+ description: "Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions",
4515
+ record: "string"
3507
4516
  },
3508
4517
  {
3509
4518
  name: "version",
@@ -3524,7 +4533,23 @@ var COMMANDS = [
3524
4533
  flag: "execution-options",
3525
4534
  type: "json",
3526
4535
  required: false,
3527
- description: "Per-execution runtime options that override or extend the workflow's default settings."
4536
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
4537
+ fields: [
4538
+ {
4539
+ name: "variantKey",
4540
+ flag: "variant-key",
4541
+ type: "string",
4542
+ required: false,
4543
+ 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."
4544
+ },
4545
+ {
4546
+ name: "softTimeoutMins",
4547
+ flag: "soft-timeout-mins",
4548
+ type: "integer",
4549
+ required: false,
4550
+ 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)."
4551
+ }
4552
+ ]
3528
4553
  },
3529
4554
  {
3530
4555
  name: "onCapacityLimit",
@@ -4026,7 +5051,27 @@ var COMMANDS = [
4026
5051
  name: "graph",
4027
5052
  flag: "graph",
4028
5053
  type: "json",
4029
- required: true
5054
+ required: true,
5055
+ fields: [
5056
+ {
5057
+ name: "nodes",
5058
+ flag: "nodes",
5059
+ type: "json",
5060
+ required: false
5061
+ },
5062
+ {
5063
+ name: "transitions",
5064
+ flag: "transitions",
5065
+ type: "json",
5066
+ required: false
5067
+ },
5068
+ {
5069
+ name: "sticky_notes",
5070
+ flag: "sticky_notes",
5071
+ type: "json",
5072
+ required: false
5073
+ }
5074
+ ]
4030
5075
  },
4031
5076
  {
4032
5077
  name: "inputs",
@@ -4040,14 +5085,60 @@ var COMMANDS = [
4040
5085
  flag: "settings",
4041
5086
  type: "json",
4042
5087
  required: true,
4043
- description: "Configuration settings for workflow execution"
5088
+ description: "Configuration settings for workflow execution",
5089
+ fields: [
5090
+ {
5091
+ name: "viewport_width",
5092
+ flag: "viewport_width",
5093
+ type: "integer",
5094
+ required: false,
5095
+ description: "Browser viewport width in pixels"
5096
+ },
5097
+ {
5098
+ name: "viewport_height",
5099
+ flag: "viewport_height",
5100
+ type: "integer",
5101
+ required: false,
5102
+ description: "Browser viewport height in pixels"
5103
+ },
5104
+ {
5105
+ name: "max_timeout_mins",
5106
+ flag: "max_timeout_mins",
5107
+ type: "integer",
5108
+ required: false,
5109
+ description: "Maximum timeout in minutes"
5110
+ },
5111
+ {
5112
+ name: "custom_environment_id",
5113
+ flag: "custom_environment_id",
5114
+ type: "string",
5115
+ required: false,
5116
+ 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."
5117
+ }
5118
+ ]
4044
5119
  },
4045
5120
  {
4046
5121
  name: "environmentTemplate",
4047
5122
  flag: "environment-template",
4048
5123
  type: "json",
4049
5124
  required: false,
4050
- 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."
5125
+ 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.",
5126
+ fields: [
5127
+ {
5128
+ name: "type",
5129
+ flag: "type",
5130
+ type: "string",
5131
+ required: false,
5132
+ description: "Type of execution environment",
5133
+ enum: ["browser", "os"]
5134
+ },
5135
+ {
5136
+ name: "config",
5137
+ flag: "config",
5138
+ type: "json",
5139
+ required: false
5140
+ }
5141
+ ]
4051
5142
  }
4052
5143
  ],
4053
5144
  files: [],
@@ -4094,7 +5185,27 @@ var COMMANDS = [
4094
5185
  name: "graph",
4095
5186
  flag: "graph",
4096
5187
  type: "json",
4097
- required: true
5188
+ required: true,
5189
+ fields: [
5190
+ {
5191
+ name: "nodes",
5192
+ flag: "nodes",
5193
+ type: "json",
5194
+ required: false
5195
+ },
5196
+ {
5197
+ name: "transitions",
5198
+ flag: "transitions",
5199
+ type: "json",
5200
+ required: false
5201
+ },
5202
+ {
5203
+ name: "sticky_notes",
5204
+ flag: "sticky_notes",
5205
+ type: "json",
5206
+ required: false
5207
+ }
5208
+ ]
4098
5209
  },
4099
5210
  {
4100
5211
  name: "inputs",
@@ -4108,14 +5219,60 @@ var COMMANDS = [
4108
5219
  flag: "settings",
4109
5220
  type: "json",
4110
5221
  required: true,
4111
- description: "Configuration settings for workflow execution"
5222
+ description: "Configuration settings for workflow execution",
5223
+ fields: [
5224
+ {
5225
+ name: "viewport_width",
5226
+ flag: "viewport_width",
5227
+ type: "integer",
5228
+ required: false,
5229
+ description: "Browser viewport width in pixels"
5230
+ },
5231
+ {
5232
+ name: "viewport_height",
5233
+ flag: "viewport_height",
5234
+ type: "integer",
5235
+ required: false,
5236
+ description: "Browser viewport height in pixels"
5237
+ },
5238
+ {
5239
+ name: "max_timeout_mins",
5240
+ flag: "max_timeout_mins",
5241
+ type: "integer",
5242
+ required: false,
5243
+ description: "Maximum timeout in minutes"
5244
+ },
5245
+ {
5246
+ name: "custom_environment_id",
5247
+ flag: "custom_environment_id",
5248
+ type: "string",
5249
+ required: false,
5250
+ 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."
5251
+ }
5252
+ ]
4112
5253
  },
4113
5254
  {
4114
5255
  name: "environmentTemplate",
4115
5256
  flag: "environment-template",
4116
5257
  type: "json",
4117
5258
  required: false,
4118
- 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."
5259
+ 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.",
5260
+ fields: [
5261
+ {
5262
+ name: "type",
5263
+ flag: "type",
5264
+ type: "string",
5265
+ required: false,
5266
+ description: "Type of execution environment",
5267
+ enum: ["browser", "os"]
5268
+ },
5269
+ {
5270
+ name: "config",
5271
+ flag: "config",
5272
+ type: "json",
5273
+ required: false
5274
+ }
5275
+ ]
4119
5276
  }
4120
5277
  ],
4121
5278
  files: [],
@@ -4182,14 +5339,16 @@ var COMMANDS = [
4182
5339
  flag: "inputs",
4183
5340
  type: "json",
4184
5341
  required: false,
4185
- description: "Inputs to be merged into the placeholders defined in prompts. Do not set together with inputVariables."
5342
+ description: "Inputs to be merged into the placeholders defined in prompts. Do not set together with inputVariables.",
5343
+ record: "json"
4186
5344
  },
4187
5345
  {
4188
5346
  name: "metadata",
4189
5347
  flag: "metadata",
4190
5348
  type: "json",
4191
5349
  required: false,
4192
- description: "Optional metadata key-value pairs for organizing and filtering executions"
5350
+ description: "Optional metadata key-value pairs for organizing and filtering executions",
5351
+ record: "string"
4193
5352
  },
4194
5353
  {
4195
5354
  name: "profileId",
@@ -4217,7 +5376,23 @@ var COMMANDS = [
4217
5376
  flag: "execution-options",
4218
5377
  type: "json",
4219
5378
  required: false,
4220
- description: "Per-execution runtime options that override or extend the workflow's default settings."
5379
+ description: "Per-execution runtime options that override or extend the workflow's default settings.",
5380
+ fields: [
5381
+ {
5382
+ name: "variantKey",
5383
+ flag: "variant-key",
5384
+ type: "string",
5385
+ required: false,
5386
+ 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."
5387
+ },
5388
+ {
5389
+ name: "softTimeoutMins",
5390
+ flag: "soft-timeout-mins",
5391
+ type: "integer",
5392
+ required: false,
5393
+ 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)."
5394
+ }
5395
+ ]
4221
5396
  },
4222
5397
  {
4223
5398
  name: "parentExecutionId",
@@ -4493,7 +5668,27 @@ var COMMANDS = [
4493
5668
  name: "graph",
4494
5669
  flag: "graph",
4495
5670
  type: "json",
4496
- required: true
5671
+ required: true,
5672
+ fields: [
5673
+ {
5674
+ name: "nodes",
5675
+ flag: "nodes",
5676
+ type: "json",
5677
+ required: false
5678
+ },
5679
+ {
5680
+ name: "transitions",
5681
+ flag: "transitions",
5682
+ type: "json",
5683
+ required: false
5684
+ },
5685
+ {
5686
+ name: "sticky_notes",
5687
+ flag: "sticky_notes",
5688
+ type: "json",
5689
+ required: false
5690
+ }
5691
+ ]
4497
5692
  },
4498
5693
  {
4499
5694
  name: "inputs",
@@ -4507,14 +5702,60 @@ var COMMANDS = [
4507
5702
  flag: "settings",
4508
5703
  type: "json",
4509
5704
  required: true,
4510
- description: "Configuration settings for workflow execution"
5705
+ description: "Configuration settings for workflow execution",
5706
+ fields: [
5707
+ {
5708
+ name: "viewport_width",
5709
+ flag: "viewport_width",
5710
+ type: "integer",
5711
+ required: false,
5712
+ description: "Browser viewport width in pixels"
5713
+ },
5714
+ {
5715
+ name: "viewport_height",
5716
+ flag: "viewport_height",
5717
+ type: "integer",
5718
+ required: false,
5719
+ description: "Browser viewport height in pixels"
5720
+ },
5721
+ {
5722
+ name: "max_timeout_mins",
5723
+ flag: "max_timeout_mins",
5724
+ type: "integer",
5725
+ required: false,
5726
+ description: "Maximum timeout in minutes"
5727
+ },
5728
+ {
5729
+ name: "custom_environment_id",
5730
+ flag: "custom_environment_id",
5731
+ type: "string",
5732
+ required: false,
5733
+ 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."
5734
+ }
5735
+ ]
4511
5736
  },
4512
5737
  {
4513
5738
  name: "environmentTemplate",
4514
5739
  flag: "environment-template",
4515
5740
  type: "json",
4516
5741
  required: false,
4517
- 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."
5742
+ 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.",
5743
+ fields: [
5744
+ {
5745
+ name: "type",
5746
+ flag: "type",
5747
+ type: "string",
5748
+ required: false,
5749
+ description: "Type of execution environment",
5750
+ enum: ["browser", "os"]
5751
+ },
5752
+ {
5753
+ name: "config",
5754
+ flag: "config",
5755
+ type: "json",
5756
+ required: false
5757
+ }
5758
+ ]
4518
5759
  }
4519
5760
  ],
4520
5761
  files: [],
@@ -4878,6 +6119,23 @@ var GLOBAL_FLAGS = [
4878
6119
  ["--output <file>", "Write a downloaded file here, not to stdout."],
4879
6120
  ["-h, --help", "Show help."]
4880
6121
  ];
6122
+ function childFlags(option2, prefix = option2.flag) {
6123
+ if (option2.record) {
6124
+ return [
6125
+ {
6126
+ name: option2.name,
6127
+ flag: `${prefix}.<key>`,
6128
+ type: option2.record,
6129
+ required: false,
6130
+ description: "One entry. The key is sent as written."
6131
+ }
6132
+ ];
6133
+ }
6134
+ return (option2.fields ?? []).flatMap((child) => {
6135
+ const flag2 = `${prefix}.${child.flag}`;
6136
+ return [{ ...child, flag: flag2 }, ...childFlags(child, flag2)];
6137
+ });
6138
+ }
4881
6139
 
4882
6140
  // src/program.ts
4883
6141
  var DOTTED = /^--([a-z0-9-]+\.[a-z0-9.-]+)(?:=(.*))?$/;
@@ -4894,7 +6152,7 @@ function optionText(option2) {
4894
6152
  }
4895
6153
  function splitDotted(argv2) {
4896
6154
  const rest = [];
4897
- const dotted = /* @__PURE__ */ new Map();
6155
+ const dotted2 = /* @__PURE__ */ new Map();
4898
6156
  for (let i = 0; i < argv2.length; i++) {
4899
6157
  const match = DOTTED.exec(argv2[i]);
4900
6158
  if (!match) {
@@ -4904,9 +6162,9 @@ function splitDotted(argv2) {
4904
6162
  const value2 = match[2] ?? argv2[++i];
4905
6163
  if (value2 === void 0)
4906
6164
  throw new UsageError(`--${match[1]} needs a value`);
4907
- dotted.set(match[1], [...dotted.get(match[1]) ?? [], value2]);
6165
+ dotted2.set(match[1], [...dotted2.get(match[1]) ?? [], value2]);
4908
6166
  }
4909
- return { argv: rest, dotted };
6167
+ return { argv: rest, dotted: dotted2 };
4910
6168
  }
4911
6169
  function group(parent, name, groups, path) {
4912
6170
  const existing = groups.get(path);
@@ -4930,6 +6188,10 @@ function leafOptions(leaf, command) {
4930
6188
  );
4931
6189
  if (option2.negatable)
4932
6190
  leaf.option(`--no-${option2.flag}`, `Skip ${option2.flag}.`);
6191
+ for (const child of childFlags(option2)) {
6192
+ const placeholder2 = child.enum ? child.enum.join("|") : child.type.replace("[]", "");
6193
+ leaf.option(`--${child.flag} <${placeholder2}>`, optionText(child));
6194
+ }
4933
6195
  }
4934
6196
  for (const file of command.body?.files ?? []) {
4935
6197
  leaf.option(`--${file} <path>`, "File to upload. Repeatable.", collect);
@@ -4945,10 +6207,10 @@ function leafOptions(leaf, command) {
4945
6207
  "The pulled head folder to push. Defaults to the current folder."
4946
6208
  );
4947
6209
  }
4948
- function toParsed(leaf, positionals, dotted) {
6210
+ function toParsed(leaf, positionals, dotted2) {
4949
6211
  const globals = leaf.optsWithGlobals();
4950
6212
  const own = leaf.opts();
4951
- const flags = new Map(dotted);
6213
+ const flags = new Map(dotted2);
4952
6214
  for (const option2 of leaf.options) {
4953
6215
  const flag2 = option2.long?.replace(/^--(no-)?/, "");
4954
6216
  const value2 = own[option2.attributeName()];
@@ -4964,7 +6226,7 @@ function toParsed(leaf, positionals, dotted) {
4964
6226
  output: globals.output
4965
6227
  };
4966
6228
  }
4967
- function defineCommands(root, options, dotted = /* @__PURE__ */ new Map(), onInvocation = () => void 0) {
6229
+ function defineCommands(root, options, dotted2 = /* @__PURE__ */ new Map(), onInvocation = () => void 0) {
4968
6230
  if (options.description) root.description(options.description);
4969
6231
  if (options.version)
4970
6232
  root.addHelpText(
@@ -5033,7 +6295,7 @@ ${notes.join("\n")}`);
5033
6295
  `expected ${expected}, got ${cmd.args.length} argument(s)`
5034
6296
  );
5035
6297
  }
5036
- const unknownDotted = [...dotted.keys()].filter(
6298
+ const unknownDotted = [...dotted2.keys()].filter(
5037
6299
  (flag2) => !(command.body?.fields ?? []).some(
5038
6300
  (f) => flag2.startsWith(`${f.flag}.`)
5039
6301
  )
@@ -5046,7 +6308,7 @@ ${notes.join("\n")}`);
5046
6308
  onInvocation({
5047
6309
  kind: "command",
5048
6310
  command,
5049
- parsed: toParsed(cmd, positionals, dotted)
6311
+ parsed: toParsed(cmd, positionals, dotted2)
5050
6312
  });
5051
6313
  });
5052
6314
  }
@@ -5065,12 +6327,12 @@ async function parseInvocation(argv2, options) {
5065
6327
  stderr: ""
5066
6328
  };
5067
6329
  }
5068
- const { argv: rest, dotted } = splitDotted(argv2);
6330
+ const { argv: rest, dotted: dotted2 } = splitDotted(argv2);
5069
6331
  const root = new Command("asteroid").exitOverride().helpCommand(false).configureOutput({
5070
6332
  writeOut: (text3) => stdout += text3,
5071
6333
  writeErr: (text3) => stderr += text3
5072
6334
  });
5073
- defineCommands(root, options, dotted, (invocation) => {
6335
+ defineCommands(root, options, dotted2, (invocation) => {
5074
6336
  result = invocation;
5075
6337
  });
5076
6338
  try {
@@ -5550,7 +6812,7 @@ var ApiError = class extends Error {
5550
6812
  status;
5551
6813
  body;
5552
6814
  };
5553
- var VERSION = "1.9.30";
6815
+ var VERSION = "1.9.36";
5554
6816
  function problem(status, body, fallback) {
5555
6817
  if (body && typeof body === "object") {
5556
6818
  const record2 = body;
@@ -6110,6 +7372,41 @@ function setPath(target, path, value2) {
6110
7372
  }
6111
7373
  node[path.at(-1)] = value2;
6112
7374
  }
7375
+ async function dotted(field, segments, flag2, raws, io) {
7376
+ const path = [];
7377
+ let option2 = field;
7378
+ for (const [i, segment] of segments.entries()) {
7379
+ if (option2?.record) {
7380
+ const key = segments.slice(i).join(".");
7381
+ const entry = { ...option2, flag: flag2, type: option2.record };
7382
+ delete entry.enum;
7383
+ return [
7384
+ [...path, key],
7385
+ entry.type === "json" ? loose(raws.at(-1)) : value(entry, raws)
7386
+ ];
7387
+ }
7388
+ if (option2?.fields) {
7389
+ const child = option2.fields.find(
7390
+ (f) => f.flag === segment
7391
+ );
7392
+ if (!child) throw new UsageError(`unknown flag: --${flag2}`);
7393
+ path.push(child.name);
7394
+ option2 = child;
7395
+ continue;
7396
+ }
7397
+ if (option2 && option2.type !== "json") {
7398
+ throw new UsageError(`unknown flag: --${flag2}`);
7399
+ }
7400
+ path.push(camel(segment));
7401
+ option2 = void 0;
7402
+ }
7403
+ if (!option2) return [path, loose(raws.at(-1))];
7404
+ if (option2.fields || option2.record) {
7405
+ throw new UsageError(`--${flag2} needs a field, as --${flag2}.<name>`);
7406
+ }
7407
+ const inputs = option2.type === "json" ? await Promise.all(raws.map((raw) => readInput(raw, io))) : raws;
7408
+ return [path, value({ ...option2, flag: flag2 }, inputs)];
7409
+ }
6113
7410
  async function buildRequest(command, input, context = {}) {
6114
7411
  const io = context.io ?? nodeReader;
6115
7412
  const parsed = await resolveInputs(command, input, io);
@@ -6196,7 +7493,8 @@ async function buildRequest(command, input, context = {}) {
6196
7493
  flags.delete(flag2);
6197
7494
  const current = json[field.name];
6198
7495
  json[field.name] = typeof current === "object" && current !== null ? current : {};
6199
- setPath(json, [field.name, ...rest.map(camel)], loose(raws.at(-1)));
7496
+ const [path2, value2] = await dotted(field, rest, flag2, raws, io);
7497
+ setPath(json, [field.name, ...path2], value2);
6200
7498
  }
6201
7499
  rejectUnknown(flags);
6202
7500
  delete json.organizationId;