replicas-cli 0.3.543 → 0.3.545

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 +10 -14
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -21151,7 +21151,7 @@ function isWorkspaceSizeOption(value) {
21151
21151
  function trimLogTailCommand(file2, maxBytes, keepBytes) {
21152
21152
  return `size=$(stat -c %s ${file2} 2>/dev/null || echo 0); [ "$size" -gt ${maxBytes} ] && { fallocate --collapse-range --offset 0 --length $(( (size - ${keepBytes}) / 4096 * 4096 )) ${file2} 2>/dev/null || truncate -s 0 ${file2}; }`;
21153
21153
  }
21154
- var SANDBOX_LIFECYCLE, SANDBOX_PATHS, WORKSPACE_SIZES, DEFAULT_WORKSPACE_SIZE, AUTO_WORKSPACE_SIZE, WORKSPACE_SIZE_OPTIONS, INVALID_WORKSPACE_SIZE_ERROR;
21154
+ var SANDBOX_LIFECYCLE, SANDBOX_PATHS, WORKSPACE_SIZES, AUTO_WORKSPACE_SIZE, WORKSPACE_SIZE_OPTIONS, DEFAULT_AUTOMATION_WORKSPACE_SIZE, INVALID_WORKSPACE_SIZE_ERROR;
21155
21155
  var init_sandbox = __esm({
21156
21156
  "../shared/src/sandbox.ts"() {
21157
21157
  "use strict";
@@ -21171,9 +21171,9 @@ var init_sandbox = __esm({
21171
21171
  REPLICAS_RUNTIME_ENV_FILE: "/home/user/.replicas/runtime-env.sh"
21172
21172
  };
21173
21173
  WORKSPACE_SIZES = ["small", "large", "ultra"];
21174
- DEFAULT_WORKSPACE_SIZE = "small";
21175
21174
  AUTO_WORKSPACE_SIZE = "auto";
21176
21175
  WORKSPACE_SIZE_OPTIONS = [...WORKSPACE_SIZES, AUTO_WORKSPACE_SIZE];
21176
+ DEFAULT_AUTOMATION_WORKSPACE_SIZE = AUTO_WORKSPACE_SIZE;
21177
21177
  INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
21178
21178
  }
21179
21179
  });
@@ -40267,11 +40267,7 @@ var init_types8 = __esm({
40267
40267
  /** Saved before its tool calls run. */
40268
40268
  external_exports.object({ type: external_exports.literal("assistant_message"), payload: external_exports.looseObject({ message: assistantMessageSchema }) }),
40269
40269
  external_exports.object({ type: external_exports.literal("tool_result"), payload: external_exports.looseObject({ message: toolResultMessageSchema }) }),
40270
- external_exports.object({
40271
- type: external_exports.literal("status"),
40272
- /** `cost`: what calls since the last status that saved no step of their own cost at API prices, in USD. */
40273
- payload: external_exports.looseObject({ status: external_exports.enum(HARNESS_THREAD_STATUSES), cost: external_exports.number().optional() })
40274
- }),
40270
+ external_exports.object({ type: external_exports.literal("status"), payload: external_exports.looseObject({ status: external_exports.enum(HARNESS_THREAD_STATUSES) }) }),
40275
40271
  external_exports.object({ type: external_exports.literal("error"), payload: external_exports.looseObject({ message: external_exports.string() }) }),
40276
40272
  /** The model's context is this summary followed by the events from `firstKeptSeq` on; nothing before it is deleted. */
40277
40273
  external_exports.object({
@@ -40281,11 +40277,11 @@ var init_types8 = __esm({
40281
40277
  firstKeptSeq: external_exports.number(),
40282
40278
  tokensBefore: external_exports.number(),
40283
40279
  readFiles: external_exports.array(external_exports.string()),
40284
- modifiedFiles: external_exports.array(external_exports.string()),
40285
- /** The summary call's cost at API prices, in USD; absent on compactions saved before it was recorded. */
40286
- cost: external_exports.number().optional()
40280
+ modifiedFiles: external_exports.array(external_exports.string())
40287
40281
  })
40288
- })
40282
+ }),
40283
+ /** A model call that saved no step of its own, such as a failed attempt or one cut off mid-stream; its `harness_usage` row says what it cost. */
40284
+ external_exports.object({ type: external_exports.literal("model_call"), payload: external_exports.looseObject({}) })
40289
40285
  ]);
40290
40286
  harnessLiveMessageSchema = external_exports.union([
40291
40287
  external_exports.object({ type: external_exports.literal("delta"), streamId: external_exports.string(), text: external_exports.string() }),
@@ -40401,7 +40397,7 @@ var CLI_VERSION;
40401
40397
  var init_cli_version = __esm({
40402
40398
  "../shared/src/cli-version.ts"() {
40403
40399
  "use strict";
40404
- CLI_VERSION = "0.3.543";
40400
+ CLI_VERSION = "0.3.545";
40405
40401
  }
40406
40402
  });
40407
40403
 
@@ -55896,7 +55892,7 @@ Automation: ${automation2.name}
55896
55892
  console.log(import_chalk27.default.gray(` Workspace: ${formatDestination(automation2)}`));
55897
55893
  console.log(import_chalk27.default.gray(` List: ${automation2.background ? "background" : "main"}`));
55898
55894
  if (automation2.credential_user_id) console.log(import_chalk27.default.gray(` Credentials: member ${automation2.credential_user_id}, then the organization's`));
55899
- console.log(import_chalk27.default.gray(` Size: ${automation2.workspace_size ?? DEFAULT_WORKSPACE_SIZE}${automation2.target_workspace_id ? " (new workspaces only; runs reuse the pinned workspace)" : ""}`));
55895
+ console.log(import_chalk27.default.gray(` Size: ${automation2.workspace_size ?? DEFAULT_AUTOMATION_WORKSPACE_SIZE}${automation2.target_workspace_id ? " (new workspaces only; runs reuse the pinned workspace)" : ""}`));
55900
55896
  if (automation2.workspace_lifecycle_policy) {
55901
55897
  console.log(import_chalk27.default.gray(` Lifecycle Policy: ${automation2.workspace_lifecycle_policy}`));
55902
55898
  }
@@ -58576,7 +58572,7 @@ var init_src2 = __esm({
58576
58572
  automation = program.command("automation").alias("auto").description("Manage automations");
58577
58573
  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, linear, 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));
58578
58574
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
58579
- 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, auto").option("--trigger-cron <schedule>", 'Cron schedule expression, e.g. "0 9 * * 1-5" (repeatable)', collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules (default: UTC)").option("--trigger-github <event>", 'GitHub event, e.g. "pull_request.opened" (repeatable)', collect, []).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" (repeatable)', collect, []).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: delete_when_done (default for new automations except one-time ones), sleep_when_done, archive_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 for every run), current (this workspace), or a workspace ID").option("--background", "Mark this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list").option("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email (organization automations only)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
58575
+ 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, large, ultra, auto (default)").option("--trigger-cron <schedule>", 'Cron schedule expression, e.g. "0 9 * * 1-5" (repeatable)', collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules (default: UTC)").option("--trigger-github <event>", 'GitHub event, e.g. "pull_request.opened" (repeatable)', collect, []).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" (repeatable)', collect, []).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: delete_when_done (default for new automations except one-time ones), sleep_when_done, archive_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 for every run), current (this workspace), or a workspace ID").option("--background", "Mark this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list").option("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email (organization automations only)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
58580
58576
  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, auto").option("--enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (repeatable; replaces existing triggers unless --keep-triggers)", collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules").option("--trigger-github <event>", "Set GitHub event (repeatable; replaces existing triggers unless --keep-triggers)", collect, []).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 (repeatable; replaces existing triggers unless --keep-triggers)", collect, []).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("--keep-triggers", "Add the --trigger-cron, --trigger-github, --trigger-gitlab, --in or --at triggers to the existing ones instead of replacing them").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: delete_when_done (default for new automations except one-time ones), sleep_when_done, archive_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).option("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email, or org to use the organization's").option("--move-to-org", "Move a personal automation to the organization so teammates can see and edit it (cannot be undone)").action(run(automationEditCommand));
58581
58577
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
58582
58578
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.543",
3
+ "version": "0.3.545",
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": {