replicas-cli 0.3.365 → 0.3.368

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 (2) hide show
  1. package/dist/index.cjs +26 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22801,6 +22801,18 @@ var init_trigger_schemas = __esm({
22801
22801
  }
22802
22802
  });
22803
22803
 
22804
+ // ../shared/src/state-machine.ts
22805
+ function defineStateMachine(states, transitions) {
22806
+ return {
22807
+ sourcesOf: (to) => states.filter((state) => transitions[state].includes(to))
22808
+ };
22809
+ }
22810
+ var init_state_machine = __esm({
22811
+ "../shared/src/state-machine.ts"() {
22812
+ "use strict";
22813
+ }
22814
+ });
22815
+
22804
22816
  // ../shared/src/automations/types.ts
22805
22817
  function toAutomationLifecyclePolicy(policy) {
22806
22818
  if (!policy) return "default";
@@ -22813,14 +22825,25 @@ function lifecyclePolicySupportsAutoStop(policy) {
22813
22825
  function hasCronTrigger(triggers) {
22814
22826
  return triggers.some((trigger) => trigger.type === "cron");
22815
22827
  }
22816
- var AUTOMATION_DEBOUNCE_MAX_SECONDS, AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MIN, AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MAX, AUTOMATION_LIFECYCLE_POLICIES, AUTOMATION_AUTO_PAUSE_DAYS, AUTOMATION_AUTO_PAUSE_LABEL;
22828
+ var AUTOMATION_DEBOUNCE_MAX_SECONDS, AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MIN, AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MAX, AUTOMATION_LIFECYCLE_POLICIES, AUTOMATION_EXECUTION_STATUSES, AUTOMATION_EXECUTION_MACHINE, AUTOMATION_AUTO_PAUSE_DAYS, AUTOMATION_AUTO_PAUSE_LABEL;
22817
22829
  var init_types5 = __esm({
22818
22830
  "../shared/src/automations/types.ts"() {
22819
22831
  "use strict";
22832
+ init_state_machine();
22820
22833
  AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
22821
22834
  AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MIN = 3;
22822
22835
  AUTOMATION_WORKSPACE_AUTO_STOP_MINUTES_MAX = 1440;
22823
22836
  AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_when_done"];
22837
+ AUTOMATION_EXECUTION_STATUSES = ["pending", "creating", "running", "completed", "failed"];
22838
+ AUTOMATION_EXECUTION_MACHINE = defineStateMachine(AUTOMATION_EXECUTION_STATUSES, {
22839
+ pending: ["creating", "running", "failed"],
22840
+ creating: ["running", "failed"],
22841
+ // A redelivered message records its new chat on a run that is already running.
22842
+ running: ["running", "completed", "failed"],
22843
+ // An agent can report an error after its turn ended.
22844
+ completed: ["failed"],
22845
+ failed: []
22846
+ });
22824
22847
  AUTOMATION_AUTO_PAUSE_DAYS = 7;
22825
22848
  AUTOMATION_AUTO_PAUSE_LABEL = `Paused after failing every run for ${AUTOMATION_AUTO_PAUSE_DAYS} days`;
22826
22849
  }
@@ -23664,7 +23687,7 @@ var init_environment_setups = __esm({
23664
23687
  { key: "propose", label: "Propose the configuration for review" }
23665
23688
  ];
23666
23689
  ENVIRONMENT_SETUP_STEP_STATUSES = ["pending", "in_progress", "completed", "skipped"];
23667
- ENVIRONMENT_SETUP_RUN_STATUSES = ["running", "proposed", "applied", "failed", "cancelled"];
23690
+ ENVIRONMENT_SETUP_RUN_STATUSES = ["running", "proposed", "applied", "failed", "cancelled", "expired"];
23668
23691
  ENVIRONMENT_SETUP_AUTOMATION_ACTIONS = ["create", "update", "keep", "disable"];
23669
23692
  ENVIRONMENT_SETUP_VERIFICATION_STATUSES = ["passed", "failed", "skipped"];
23670
23693
  ENVIRONMENT_SETUP_LIMITS = {
@@ -37686,7 +37709,7 @@ var CLI_VERSION;
37686
37709
  var init_cli_version = __esm({
37687
37710
  "../shared/src/cli-version.ts"() {
37688
37711
  "use strict";
37689
- CLI_VERSION = "0.3.365";
37712
+ CLI_VERSION = "0.3.368";
37690
37713
  }
37691
37714
  });
37692
37715
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.365",
3
+ "version": "0.3.368",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {