replicas-cli 0.3.41 → 0.3.42

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 +25 -4
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22339,6 +22339,10 @@ var SANDBOX_PATHS = {
22339
22339
  REPLICAS_RUNTIME_ENV_FILE: "/home/user/.replicas/runtime-env.sh"
22340
22340
  };
22341
22341
  var WORKSPACE_SIZES = ["small", "large", "ultra"];
22342
+ var DEFAULT_WORKSPACE_SIZE = "small";
22343
+ function isWorkspaceSize(value) {
22344
+ return WORKSPACE_SIZES.some((size) => size === value);
22345
+ }
22342
22346
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
22343
22347
 
22344
22348
  // ../shared/src/pricing.ts
@@ -25655,6 +25659,9 @@ replicas automation create "Review my MRs" \\
25655
25659
  # Disable on creation
25656
25660
  replicas automation create ... --disabled
25657
25661
 
25662
+ # Description and workspace size (small is the default; large, ultra)
25663
+ replicas automation create ... --description "..." --size large
25664
+
25658
25665
  # Workspace lifecycle
25659
25666
  replicas automation create ... --lifecycle archive_when_done
25660
25667
  replicas automation create ... --lifecycle sleep_when_done
@@ -25688,7 +25695,9 @@ replicas automation create "Re-check PR #142 CI" \\
25688
25695
  \`\`\`bash
25689
25696
  replicas automation edit <id> \\
25690
25697
  --name "..." \\
25698
+ --description "..." \\
25691
25699
  --prompt "..." \\
25700
+ --size small|large|ultra \\
25692
25701
  --enabled true|false \\
25693
25702
  --environment <env-name-or-id> \\
25694
25703
  --trigger-cron "0 4 * * *" # replaces existing triggers
@@ -28440,7 +28449,7 @@ var headlessAgentRequestSchema = external_exports.object({
28440
28449
  });
28441
28450
 
28442
28451
  // ../shared/src/cli-version.ts
28443
- var CLI_VERSION = "0.3.41";
28452
+ var CLI_VERSION = "0.3.42";
28444
28453
 
28445
28454
  // ../shared/src/version.ts
28446
28455
  function compareVersions(v1, v2) {
@@ -32699,6 +32708,11 @@ function parseWorkspaceLifecyclePolicyOption(value) {
32699
32708
  if (isAutomationLifecyclePolicy(value)) return value;
32700
32709
  throw new Error(`Invalid lifecycle policy: ${value}. Valid options: ${AUTOMATION_LIFECYCLE_POLICIES.join(", ")}`);
32701
32710
  }
32711
+ function parseWorkspaceSizeOption(value) {
32712
+ if (value === void 0) return void 0;
32713
+ if (isWorkspaceSize(value)) return value;
32714
+ throw new Error(`Invalid --size: ${value}. Valid options: ${WORKSPACE_SIZES.join(", ")}`);
32715
+ }
32702
32716
  function parseActorListOption(value) {
32703
32717
  if (value === void 0) return void 0;
32704
32718
  const actors = value.split(",").map((actor) => actor.trim()).filter(Boolean);
@@ -32977,6 +32991,7 @@ Automation: ${automation2.name}
32977
32991
  console.log(import_chalk26.default.gray(` Runs: ${formatRuns(automation2)}`));
32978
32992
  console.log(import_chalk26.default.gray(` Workspace: ${formatDestination(automation2)}`));
32979
32993
  console.log(import_chalk26.default.gray(` List: ${automation2.background ? "background" : "main"}`));
32994
+ console.log(import_chalk26.default.gray(` Size: ${automation2.workspace_size ?? DEFAULT_WORKSPACE_SIZE}${automation2.target_workspace_id ? " (new workspaces only; runs reuse the pinned workspace)" : ""}`));
32980
32995
  if (automation2.workspace_lifecycle_policy) {
32981
32996
  console.log(import_chalk26.default.gray(` Lifecycle Policy: ${automation2.workspace_lifecycle_policy}`));
32982
32997
  }
@@ -33125,6 +33140,7 @@ async function automationCreateCommand(name, options) {
33125
33140
  const maxRuns = parseMaxRuns(options.maxRuns);
33126
33141
  const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
33127
33142
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
33143
+ const workspaceSize = parseWorkspaceSizeOption(options.size);
33128
33144
  if (options.autoStopMinutes && !lifecyclePolicySupportsAutoStop(lifecyclePolicy ?? "default")) throw new Error("--auto-stop-minutes requires --lifecycle default");
33129
33145
  if (options.autoStopMinutes) {
33130
33146
  const minutes = parseInt(options.autoStopMinutes, 10);
@@ -33219,6 +33235,7 @@ async function automationCreateCommand(name, options) {
33219
33235
  const body = {
33220
33236
  scope: options.personal ? "user" : "org",
33221
33237
  name: automationName,
33238
+ ...options.description ? { description: options.description } : {},
33222
33239
  prompt: automationPrompt,
33223
33240
  ...selectedEnvironmentId ? { environment_id: selectedEnvironmentId } : {},
33224
33241
  triggers,
@@ -33229,6 +33246,7 @@ async function automationCreateCommand(name, options) {
33229
33246
  ...options.githubChecks !== void 0 ? { github_check_names: normalizeAutomationGithubCheckNames(options.githubChecks.split(",")) } : {},
33230
33247
  config: workspaceConfigWithPrFollowups(void 0, prFollowups),
33231
33248
  ...lifecyclePolicy ? { workspace_lifecycle_policy: lifecyclePolicy } : {},
33249
+ ...workspaceSize ? { workspace_size: workspaceSize } : {},
33232
33250
  ...options.autoStopMinutes ? { workspace_auto_stop_minutes: parseInt(options.autoStopMinutes, 10) } : {},
33233
33251
  ...options.planMode ? { plan_mode: true } : {},
33234
33252
  ...options.goalMode ? { goal_mode: true } : {},
@@ -33264,6 +33282,7 @@ async function automationEditCommand(id, options) {
33264
33282
  const maxRuns = parseMaxRuns(options.maxRuns);
33265
33283
  const workspaceTarget = parseWorkspaceTarget(options.workspace);
33266
33284
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
33285
+ const workspaceSize = parseWorkspaceSizeOption(options.size);
33267
33286
  if (options.autoStopMinutes) {
33268
33287
  const minutes = parseInt(options.autoStopMinutes, 10);
33269
33288
  if (isNaN(minutes) || minutes < 3 || minutes > 1440) throw new Error("--auto-stop-minutes must be between 3 and 1440");
@@ -33285,7 +33304,7 @@ async function automationEditCommand(id, options) {
33285
33304
  model: existing.automation.model
33286
33305
  });
33287
33306
  const body = {};
33288
- const hasOptions = options.name || options.prompt || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
33307
+ const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
33289
33308
  if (!hasOptions) {
33290
33309
  const nameResponse = await ask({
33291
33310
  type: "text",
@@ -33339,6 +33358,8 @@ async function automationEditCommand(id, options) {
33339
33358
  } else {
33340
33359
  if (options.name) body.name = options.name;
33341
33360
  if (options.prompt) body.prompt = options.prompt;
33361
+ if (options.description !== void 0) body.description = options.description;
33362
+ if (workspaceSize) body.workspace_size = workspaceSize;
33342
33363
  if (options.enabled !== void 0) {
33343
33364
  if (options.enabled !== "true" && options.enabled !== "false") throw new Error("--enabled must be true or false");
33344
33365
  body.enabled = options.enabled === "true";
@@ -34238,8 +34259,8 @@ credentials.command("usage").description("Show how much of each connected Claude
34238
34259
  var automation = program.command("automation").alias("auto").description("Manage automations");
34239
34260
  automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").option("--trigger-type <type>", "Only automations with a trigger of this type (cron, github, gitlab, slack, sentry, custom)").option("--enabled <enabled>", "Only enabled or disabled automations (true/false)").option("--search <search>", "Case-insensitive substring match on the name").option("--background <background>", "Only background (true) or main-list (false) automations").action(run(automationListCommand));
34240
34261
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
34241
- 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-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").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("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").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 (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 goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--in <duration>", "Run once after this long, e.g. 30m, 2h, 3d, 1w (inside a workspace, defaults --workspace to current)").option("--at <datetime>", "Run once at this ISO-8601 time with timezone, e.g. 2026-10-08T09:00:00-07:00").option("--max-runs <n>", 'Delete the automation after this many runs ("none" for unlimited)').option("--workspace <target>", "Where runs go: new (default, new workspace each run), reuse (one workspace created on the first run), current (this workspace), or a workspace ID").option("--background", "Keep it out of the main automations list (for offhand follow-ups)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
34242
- automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("--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-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").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("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").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 (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 goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).option("--in <duration>", "Replace triggers with a one-time run after this long, e.g. 30m, 2h, 3d, 1w").option("--at <datetime>", "Replace triggers with a one-time run at this ISO-8601 time with timezone").option("--max-runs <n>", 'Delete the automation after this many runs in total ("none" for unlimited)').option("--workspace <target>", "Where runs go: new, reuse, current, or a workspace ID").option("--background <enabled>", "Keep it out of the main automations list (true/false)", parseBooleanOption).action(run(automationEditCommand));
34262
+ automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-d, --description <description>", "Description shown with the automation").option("-e, --environment <environment>", "Environment name or ID").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small (default), large, ultra").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-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").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("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").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 (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 goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--in <duration>", "Run once after this long, e.g. 30m, 2h, 3d, 1w (inside a workspace, defaults --workspace to current)").option("--at <datetime>", "Run once at this ISO-8601 time with timezone, e.g. 2026-10-08T09:00:00-07:00").option("--max-runs <n>", 'Delete the automation after this many runs ("none" for unlimited)').option("--workspace <target>", "Where runs go: new (default, new workspace each run), reuse (one workspace created on the first run), current (this workspace), or a workspace ID").option("--background", "Keep it out of the main automations list (for offhand follow-ups)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
34263
+ automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-d, --description <description>", "New description (pass empty string to clear)").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small, large, ultra").option("--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-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").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("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").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 (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 goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).option("--in <duration>", "Replace triggers with a one-time run after this long, e.g. 30m, 2h, 3d, 1w").option("--at <datetime>", "Replace triggers with a one-time run at this ISO-8601 time with timezone").option("--max-runs <n>", 'Delete the automation after this many runs in total ("none" for unlimited)').option("--workspace <target>", "Where runs go: new, reuse, current, or a workspace ID").option("--background <enabled>", "Keep it out of the main automations list (true/false)", parseBooleanOption).action(run(automationEditCommand));
34243
34264
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
34244
34265
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
34245
34266
  automation.command("check <checkRunId>").description("Report this automation run's verdict on one of its GitHub checks").requiredOption("--token <token>", "Ownership token for this check, exactly as given in the prompt").requiredOption("--conclusion <conclusion>", "success or failure").requiredOption("--title <title>", "One-line verdict shown on the check").option("--summary <summary>", "What was checked and why it passed or failed").action(run(automationCheckCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.41",
3
+ "version": "0.3.42",
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": {