replicas-cli 0.2.422 → 0.2.423

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.mjs +18 -13
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -24171,7 +24171,7 @@ replicas automation create ... --disabled
24171
24171
  # Workspace lifecycle
24172
24172
  replicas automation create ... --lifecycle archive_when_done
24173
24173
  replicas automation create ... --lifecycle sleep_when_done
24174
- replicas automation create ... --lifecycle delete_after_inactivity --auto-stop-minutes 30
24174
+ replicas automation create ... --lifecycle default --auto-stop-minutes 30
24175
24175
  \`\`\`
24176
24176
 
24177
24177
  When the user says "make me an automation that...", default to **picking the environment for them by listing the available envs** and asking only when the user hasn't already pinned one. Same for repos in GitHub triggers. Don't pepper the user with questions you can answer by reading the existing config.
@@ -24492,7 +24492,7 @@ function formatTurnElapsed(ms) {
24492
24492
  }
24493
24493
 
24494
24494
  // ../shared/src/cli-version.ts
24495
- var CLI_VERSION = "0.2.422";
24495
+ var CLI_VERSION = "0.2.423";
24496
24496
 
24497
24497
  // ../shared/src/version.ts
24498
24498
  function compareVersions(v1, v2) {
@@ -24579,7 +24579,6 @@ var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"
24579
24579
  function isWorkspaceSuspendedStatus(status) {
24580
24580
  return status === "sleeping" || status === "archived";
24581
24581
  }
24582
- var VALID_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_after_inactivity"];
24583
24582
  function workspaceConfigWithCapabilities(config3, capabilities = {}) {
24584
24583
  const mergedCapabilities = {
24585
24584
  ...config3?.capabilities,
@@ -24662,8 +24661,14 @@ var AUDIT_LOG_ACTIONS = Object.values(AUDIT_LOG_ACTION);
24662
24661
 
24663
24662
  // ../shared/src/automations/types.ts
24664
24663
  var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
24664
+ var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done"];
24665
+ function toAutomationLifecyclePolicy(policy) {
24666
+ if (!policy) return "default";
24667
+ if (policy === "default" || policy === "archive_when_done" || policy === "sleep_when_done") return policy;
24668
+ return "archive_when_done";
24669
+ }
24665
24670
  function lifecyclePolicySupportsAutoStop(policy) {
24666
- return policy === "default" || policy === "delete_after_inactivity";
24671
+ return policy === "default";
24667
24672
  }
24668
24673
 
24669
24674
  // ../shared/src/automations/agent-validation.ts
@@ -29020,14 +29025,14 @@ function parseModelOption(value) {
29020
29025
  if (trimmed === "" || trimmed.toLowerCase() === "none") return null;
29021
29026
  return normalizeClaudeModel(trimmed) ?? trimmed;
29022
29027
  }
29023
- function isWorkspaceLifecyclePolicy(value) {
29024
- return VALID_LIFECYCLE_POLICIES.some((policy) => policy === value);
29028
+ function isAutomationLifecyclePolicy(value) {
29029
+ return AUTOMATION_LIFECYCLE_POLICIES.some((policy) => policy === value);
29025
29030
  }
29026
29031
  function parseWorkspaceLifecyclePolicyOption(value) {
29027
29032
  if (!value) return void 0;
29028
- if (isWorkspaceLifecyclePolicy(value)) return value;
29033
+ if (isAutomationLifecyclePolicy(value)) return value;
29029
29034
  console.log(chalk17.red(`Invalid lifecycle policy: ${value}`));
29030
- console.log(chalk17.gray(`Valid options: ${VALID_LIFECYCLE_POLICIES.join(", ")}`));
29035
+ console.log(chalk17.gray(`Valid options: ${AUTOMATION_LIFECYCLE_POLICIES.join(", ")}`));
29031
29036
  process.exit(1);
29032
29037
  }
29033
29038
  function parseExcludedActorsOption(value) {
@@ -29363,7 +29368,7 @@ async function automationCreateCommand(name, options) {
29363
29368
  ensureOrgApiAuthenticated();
29364
29369
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
29365
29370
  if (options.autoStopMinutes && !lifecyclePolicySupportsAutoStop(lifecyclePolicy ?? "default")) {
29366
- console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default or delete_after_inactivity"));
29371
+ console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default"));
29367
29372
  process.exit(1);
29368
29373
  }
29369
29374
  if (options.autoStopMinutes) {
@@ -29561,9 +29566,9 @@ async function automationEditCommand(id, options) {
29561
29566
  };
29562
29567
  try {
29563
29568
  const existing = await orgAuthenticatedFetch(`/v1/automations/${id}`);
29564
- const autoStopLifecyclePolicy = lifecyclePolicy ?? existing.automation.workspace_lifecycle_policy ?? "default";
29569
+ const autoStopLifecyclePolicy = lifecyclePolicy ?? toAutomationLifecyclePolicy(existing.automation.workspace_lifecycle_policy);
29565
29570
  if (options.autoStopMinutes && !lifecyclePolicySupportsAutoStop(autoStopLifecyclePolicy)) {
29566
- console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default or delete_after_inactivity"));
29571
+ console.log(chalk17.red("--auto-stop-minutes requires --lifecycle default"));
29567
29572
  process.exit(1);
29568
29573
  }
29569
29574
  const agentSelection = applyAgentSelection(parsedAgent, {
@@ -37146,7 +37151,7 @@ automation.command("get <id>").description("Get automation details by ID").actio
37146
37151
  process.exit(1);
37147
37152
  }
37148
37153
  });
37149
- automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").option("--trigger-cron <schedule>", 'Cron schedule expression (e.g. "0 9 * * 1-5")').option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, delete_after_inactivity, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default or delete_after_inactivity)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode", "Run automation messages in plan mode").option("--goal-mode", "Set automation messages as Codex goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--disabled", "Create in disabled state").action(async (name, options) => {
37154
+ automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").option("--trigger-cron <schedule>", 'Cron schedule expression (e.g. "0 9 * * 1-5")').option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode", "Run automation messages in plan mode").option("--goal-mode", "Set automation messages as Codex goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--disabled", "Create in disabled state").action(async (name, options) => {
37150
37155
  try {
37151
37156
  await automationCreateCommand(name, {
37152
37157
  ...options,
@@ -37161,7 +37166,7 @@ automation.command("create [name]").description("Create a new automation").optio
37161
37166
  process.exit(1);
37162
37167
  }
37163
37168
  });
37164
- automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-e, --enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, delete_after_inactivity, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default or delete_after_inactivity)").option("--pr-followups <enabled>", "Allow follow-up actions on matching PRs (true/false)", parseBooleanOption).option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode <enabled>", "Run automation messages in plan mode (true/false)", parseBooleanOption).option("--goal-mode <enabled>", "Set automation messages as Codex goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).action(async (id, options) => {
37169
+ automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-e, --enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: archive_when_done, sleep_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups <enabled>", "Allow follow-up actions on matching PRs (true/false)", parseBooleanOption).option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor, relay (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode <enabled>", "Run automation messages in plan mode (true/false)", parseBooleanOption).option("--goal-mode <enabled>", "Set automation messages as Codex goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).action(async (id, options) => {
37165
37170
  try {
37166
37171
  await automationEditCommand(id, options);
37167
37172
  } catch (error51) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.422",
3
+ "version": "0.2.423",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {