replicas-cli 0.3.367 → 0.3.369

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 +49 -6
  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
  }
@@ -22968,7 +22991,7 @@ var init_environment = __esm({
22968
22991
  });
22969
22992
 
22970
22993
  // ../shared/src/replicas-mcp.ts
22971
- var REPLICAS_MCP_TOOLS, automationToolInputSchema, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema;
22994
+ var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema;
22972
22995
  var init_replicas_mcp = __esm({
22973
22996
  "../shared/src/replicas-mcp.ts"() {
22974
22997
  "use strict";
@@ -23050,10 +23073,12 @@ var init_replicas_mcp = __esm({
23050
23073
  "What happens to a run's workspace when the agent finishes. `delete_when_done` (default, except one-time runs, which default to `default`) when the output lives elsewhere (PR comments, checks, Slack posts); `sleep_when_done` when later runs reuse the workspace, like one per PR across pushes; `default` (keep alive) when people follow up in the workspace."
23051
23074
  )
23052
23075
  });
23076
+ credentialUserIdDescription = `Organization automations only: the user ID (see \`${REPLICAS_MCP_TOOLS.whoami}\`) of the member whose coding agent credentials, such as their Claude subscription, runs use before the organization's. Only your workspace's owner, or whoever's credentials this workspace runs on.`;
23053
23077
  automationBackgroundSchema = external_exports.boolean().optional().describe(
23054
23078
  "Marks 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."
23055
23079
  );
23056
23080
  automationCreateToolInputSchema = automationToolInputSchema.extend({
23081
+ credential_user_id: external_exports.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
23057
23082
  background: automationBackgroundSchema,
23058
23083
  scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
23059
23084
  });
@@ -23064,6 +23089,7 @@ var init_replicas_mcp = __esm({
23064
23089
  model: external_exports.string().nullable().optional(),
23065
23090
  thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
23066
23091
  workspace_size: external_exports.enum(WORKSPACE_SIZES).optional(),
23092
+ credential_user_id: external_exports.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
23067
23093
  background: automationBackgroundSchema,
23068
23094
  scope: external_exports.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
23069
23095
  });
@@ -25644,6 +25670,8 @@ replicas automation edit <id> \\
25644
25670
 
25645
25671
  \`replicas automation edit <id> --move-to-org\` turns a personal automation into a shared one the whole team can see. It can't be undone.
25646
25672
 
25673
+ \`--credentials <me|email|org>\` on \`create\` or \`edit\` runs an organization automation on the user's own coding agent credentials (such as their Claude subscription) before the organization's. Use it when the user asks for an automation to use their own subscription; \`org\` switches back.
25674
+
25647
25675
  \`replicas automation edit <id>\` with no flags drops into interactive mode.
25648
25676
 
25649
25677
  ## Long-running services
@@ -37686,7 +37714,7 @@ var CLI_VERSION;
37686
37714
  var init_cli_version = __esm({
37687
37715
  "../shared/src/cli-version.ts"() {
37688
37716
  "use strict";
37689
- CLI_VERSION = "0.3.367";
37717
+ CLI_VERSION = "0.3.369";
37690
37718
  }
37691
37719
  });
37692
37720
 
@@ -53216,6 +53244,17 @@ function printAutomation(automation2) {
53216
53244
  console.log(import_chalk26.default.gray(` Updated: ${formatDate(automation2.updated_at)}`));
53217
53245
  console.log();
53218
53246
  }
53247
+ async function resolveCredentialsMember(value) {
53248
+ if (value === "me") {
53249
+ const { user } = await orgAuthenticatedFetch("/v1/whoami");
53250
+ if (!user) throw new Error("--credentials me needs a signed-in user; pass a member email instead");
53251
+ return user.id;
53252
+ }
53253
+ const { members: members2 } = await orgAuthenticatedFetch("/v1/organization/members");
53254
+ const member = members2.find((m) => m.user_id === value || m.email.toLowerCase() === value.toLowerCase());
53255
+ if (!member) throw new Error(`No organization member matches "${value}". Use me, org, or a member email`);
53256
+ return member.user_id;
53257
+ }
53219
53258
  async function automationListCommand(options) {
53220
53259
  ensureOrgApiAuthenticated();
53221
53260
  const params = new URLSearchParams();
@@ -53276,6 +53315,7 @@ Automation: ${automation2.name}
53276
53315
  console.log(import_chalk26.default.gray(` Runs: ${formatRuns(automation2)}`));
53277
53316
  console.log(import_chalk26.default.gray(` Workspace: ${formatDestination(automation2)}`));
53278
53317
  console.log(import_chalk26.default.gray(` List: ${automation2.background ? "background" : "main"}`));
53318
+ if (automation2.credential_user_id) console.log(import_chalk26.default.gray(` Credentials: member ${automation2.credential_user_id}, then the organization's`));
53279
53319
  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)" : ""}`));
53280
53320
  if (automation2.workspace_lifecycle_policy) {
53281
53321
  console.log(import_chalk26.default.gray(` Lifecycle Policy: ${automation2.workspace_lifecycle_policy}`));
@@ -53422,6 +53462,7 @@ async function automationCreateCommand(name, options) {
53422
53462
  ensureOrgApiAuthenticated();
53423
53463
  const runAt = resolveRunAt(options);
53424
53464
  if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
53465
+ if (options.credentials && options.personal) throw new Error("Personal automations already run on your credentials");
53425
53466
  const maxRuns = parseMaxRuns(options.maxRuns);
53426
53467
  const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
53427
53468
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
@@ -53527,6 +53568,7 @@ async function automationCreateCommand(name, options) {
53527
53568
  ...maxRuns !== void 0 ? { max_runs: maxRuns } : {},
53528
53569
  ...workspaceTarget,
53529
53570
  ...options.background ? { background: true } : {},
53571
+ ...options.credentials && options.credentials !== "org" ? { credential_user_id: await resolveCredentialsMember(options.credentials) } : {},
53530
53572
  enabled: options.enabled !== false,
53531
53573
  ...options.githubChecks !== void 0 ? { github_check_names: normalizeAutomationGithubCheckNames(options.githubChecks.split(",")) } : {},
53532
53574
  config: workspaceConfigWithPrFollowups(void 0, prFollowups),
@@ -53590,7 +53632,7 @@ async function automationEditCommand(id, options) {
53590
53632
  model: existing.automation.model
53591
53633
  });
53592
53634
  const body = {};
53593
- const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || replacingTriggers || 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 || options.moveToOrg;
53635
+ const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || replacingTriggers || 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 || options.credentials !== void 0 || options.moveToOrg;
53594
53636
  if (!hasOptions) {
53595
53637
  const nameResponse = await ask({
53596
53638
  type: "text",
@@ -53707,6 +53749,7 @@ async function automationEditCommand(id, options) {
53707
53749
  if (options.fastMode !== void 0) body.fast_mode = options.fastMode;
53708
53750
  if (maxRuns !== void 0) body.max_runs = maxRuns;
53709
53751
  if (options.background !== void 0) body.background = options.background;
53752
+ if (options.credentials !== void 0) body.credential_user_id = options.credentials === "org" ? null : await resolveCredentialsMember(options.credentials);
53710
53753
  if (options.moveToOrg) body.scope = "org";
53711
53754
  Object.assign(body, workspaceTarget);
53712
53755
  Object.assign(body, agentSelection);
@@ -55528,8 +55571,8 @@ var init_src2 = __esm({
55528
55571
  automation = program.command("automation").alias("auto").description("Manage automations");
55529
55572
  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));
55530
55573
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
55531
- 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" (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 created on the first 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("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
55532
- 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 (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("--move-to-org", "Move a personal automation to the organization so teammates can see and edit it (cannot be undone)").action(run(automationEditCommand));
55574
+ 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" (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 created on the first 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 })));
55575
+ 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 (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));
55533
55576
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
55534
55577
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
55535
55578
  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.367",
3
+ "version": "0.3.369",
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": {