replicas-cli 0.3.368 → 0.3.370

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 +47 -18
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -339,6 +339,18 @@ var init_async = __esm({
339
339
  }
340
340
  });
341
341
 
342
+ // ../shared/src/state-machine.ts
343
+ function defineStateMachine(states, transitions) {
344
+ return {
345
+ sourcesOf: (to) => states.filter((state) => transitions[state].includes(to))
346
+ };
347
+ }
348
+ var init_state_machine = __esm({
349
+ "../shared/src/state-machine.ts"() {
350
+ "use strict";
351
+ }
352
+ });
353
+
342
354
  // ../shared/src/http-range.ts
343
355
  var init_http_range = __esm({
344
356
  "../shared/src/http-range.ts"() {
@@ -21369,12 +21381,20 @@ var init_workspace_credentials = __esm({
21369
21381
  });
21370
21382
 
21371
21383
  // ../shared/src/routes/pull-requests.ts
21372
- var PULL_REQUEST_MERGE_METHODS, DEPLOY_START_WINDOW_MS, mergePullRequestRequestSchema;
21384
+ var PULL_REQUEST_STATUSES, PULL_REQUEST_STATUS_MACHINE, PULL_REQUEST_MERGE_METHODS, DEPLOY_START_WINDOW_MS, mergePullRequestRequestSchema;
21373
21385
  var init_pull_requests = __esm({
21374
21386
  "../shared/src/routes/pull-requests.ts"() {
21375
21387
  "use strict";
21376
21388
  init_zod();
21389
+ init_state_machine();
21377
21390
  init_urls();
21391
+ PULL_REQUEST_STATUSES = ["open", "draft", "closed", "merged"];
21392
+ PULL_REQUEST_STATUS_MACHINE = defineStateMachine(PULL_REQUEST_STATUSES, {
21393
+ open: ["draft", "closed", "merged"],
21394
+ draft: ["open", "closed", "merged"],
21395
+ closed: ["open", "draft", "merged"],
21396
+ merged: []
21397
+ });
21378
21398
  PULL_REQUEST_MERGE_METHODS = ["merge", "squash", "rebase"];
21379
21399
  DEPLOY_START_WINDOW_MS = 30 * 6e4;
21380
21400
  mergePullRequestRequestSchema = external_exports.object({
@@ -22801,18 +22821,6 @@ var init_trigger_schemas = __esm({
22801
22821
  }
22802
22822
  });
22803
22823
 
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
-
22816
22824
  // ../shared/src/automations/types.ts
22817
22825
  function toAutomationLifecyclePolicy(policy) {
22818
22826
  if (!policy) return "default";
@@ -22991,7 +22999,7 @@ var init_environment = __esm({
22991
22999
  });
22992
23000
 
22993
23001
  // ../shared/src/replicas-mcp.ts
22994
- var REPLICAS_MCP_TOOLS, automationToolInputSchema, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema;
23002
+ var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema;
22995
23003
  var init_replicas_mcp = __esm({
22996
23004
  "../shared/src/replicas-mcp.ts"() {
22997
23005
  "use strict";
@@ -23073,10 +23081,12 @@ var init_replicas_mcp = __esm({
23073
23081
  "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."
23074
23082
  )
23075
23083
  });
23084
+ 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.`;
23076
23085
  automationBackgroundSchema = external_exports.boolean().optional().describe(
23077
23086
  "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."
23078
23087
  );
23079
23088
  automationCreateToolInputSchema = automationToolInputSchema.extend({
23089
+ credential_user_id: external_exports.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
23080
23090
  background: automationBackgroundSchema,
23081
23091
  scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
23082
23092
  });
@@ -23087,6 +23097,7 @@ var init_replicas_mcp = __esm({
23087
23097
  model: external_exports.string().nullable().optional(),
23088
23098
  thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
23089
23099
  workspace_size: external_exports.enum(WORKSPACE_SIZES).optional(),
23100
+ credential_user_id: external_exports.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
23090
23101
  background: automationBackgroundSchema,
23091
23102
  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.")
23092
23103
  });
@@ -25667,6 +25678,8 @@ replicas automation edit <id> \\
25667
25678
 
25668
25679
  \`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.
25669
25680
 
25681
+ \`--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.
25682
+
25670
25683
  \`replicas automation edit <id>\` with no flags drops into interactive mode.
25671
25684
 
25672
25685
  ## Long-running services
@@ -37709,7 +37722,7 @@ var CLI_VERSION;
37709
37722
  var init_cli_version = __esm({
37710
37723
  "../shared/src/cli-version.ts"() {
37711
37724
  "use strict";
37712
- CLI_VERSION = "0.3.368";
37725
+ CLI_VERSION = "0.3.370";
37713
37726
  }
37714
37727
  });
37715
37728
 
@@ -48867,6 +48880,7 @@ var init_src = __esm({
48867
48880
  init_json();
48868
48881
  init_api_request();
48869
48882
  init_async();
48883
+ init_state_machine();
48870
48884
  init_http_range();
48871
48885
  init_result();
48872
48886
  init_access();
@@ -53239,6 +53253,17 @@ function printAutomation(automation2) {
53239
53253
  console.log(import_chalk26.default.gray(` Updated: ${formatDate(automation2.updated_at)}`));
53240
53254
  console.log();
53241
53255
  }
53256
+ async function resolveCredentialsMember(value) {
53257
+ if (value === "me") {
53258
+ const { user } = await orgAuthenticatedFetch("/v1/whoami");
53259
+ if (!user) throw new Error("--credentials me needs a signed-in user; pass a member email instead");
53260
+ return user.id;
53261
+ }
53262
+ const { members: members2 } = await orgAuthenticatedFetch("/v1/organization/members");
53263
+ const member = members2.find((m) => m.user_id === value || m.email.toLowerCase() === value.toLowerCase());
53264
+ if (!member) throw new Error(`No organization member matches "${value}". Use me, org, or a member email`);
53265
+ return member.user_id;
53266
+ }
53242
53267
  async function automationListCommand(options) {
53243
53268
  ensureOrgApiAuthenticated();
53244
53269
  const params = new URLSearchParams();
@@ -53299,6 +53324,7 @@ Automation: ${automation2.name}
53299
53324
  console.log(import_chalk26.default.gray(` Runs: ${formatRuns(automation2)}`));
53300
53325
  console.log(import_chalk26.default.gray(` Workspace: ${formatDestination(automation2)}`));
53301
53326
  console.log(import_chalk26.default.gray(` List: ${automation2.background ? "background" : "main"}`));
53327
+ if (automation2.credential_user_id) console.log(import_chalk26.default.gray(` Credentials: member ${automation2.credential_user_id}, then the organization's`));
53302
53328
  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)" : ""}`));
53303
53329
  if (automation2.workspace_lifecycle_policy) {
53304
53330
  console.log(import_chalk26.default.gray(` Lifecycle Policy: ${automation2.workspace_lifecycle_policy}`));
@@ -53445,6 +53471,7 @@ async function automationCreateCommand(name, options) {
53445
53471
  ensureOrgApiAuthenticated();
53446
53472
  const runAt = resolveRunAt(options);
53447
53473
  if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
53474
+ if (options.credentials && options.personal) throw new Error("Personal automations already run on your credentials");
53448
53475
  const maxRuns = parseMaxRuns(options.maxRuns);
53449
53476
  const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
53450
53477
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
@@ -53550,6 +53577,7 @@ async function automationCreateCommand(name, options) {
53550
53577
  ...maxRuns !== void 0 ? { max_runs: maxRuns } : {},
53551
53578
  ...workspaceTarget,
53552
53579
  ...options.background ? { background: true } : {},
53580
+ ...options.credentials && options.credentials !== "org" ? { credential_user_id: await resolveCredentialsMember(options.credentials) } : {},
53553
53581
  enabled: options.enabled !== false,
53554
53582
  ...options.githubChecks !== void 0 ? { github_check_names: normalizeAutomationGithubCheckNames(options.githubChecks.split(",")) } : {},
53555
53583
  config: workspaceConfigWithPrFollowups(void 0, prFollowups),
@@ -53613,7 +53641,7 @@ async function automationEditCommand(id, options) {
53613
53641
  model: existing.automation.model
53614
53642
  });
53615
53643
  const body = {};
53616
- 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;
53644
+ 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;
53617
53645
  if (!hasOptions) {
53618
53646
  const nameResponse = await ask({
53619
53647
  type: "text",
@@ -53730,6 +53758,7 @@ async function automationEditCommand(id, options) {
53730
53758
  if (options.fastMode !== void 0) body.fast_mode = options.fastMode;
53731
53759
  if (maxRuns !== void 0) body.max_runs = maxRuns;
53732
53760
  if (options.background !== void 0) body.background = options.background;
53761
+ if (options.credentials !== void 0) body.credential_user_id = options.credentials === "org" ? null : await resolveCredentialsMember(options.credentials);
53733
53762
  if (options.moveToOrg) body.scope = "org";
53734
53763
  Object.assign(body, workspaceTarget);
53735
53764
  Object.assign(body, agentSelection);
@@ -55551,8 +55580,8 @@ var init_src2 = __esm({
55551
55580
  automation = program.command("automation").alias("auto").description("Manage automations");
55552
55581
  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));
55553
55582
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
55554
- 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 })));
55555
- 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));
55583
+ 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 })));
55584
+ 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));
55556
55585
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
55557
55586
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
55558
55587
  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.368",
3
+ "version": "0.3.370",
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": {