replicas-cli 0.3.202 → 0.3.204

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 +11 -7
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -19320,6 +19320,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
19320
19320
  | "Make an automation that runs when a PR opens on \`acme/web\`" | \`replicas automation create ... --trigger-github pull_request.opened --trigger-github-repos acme/web\` |
19321
19321
  | "Make an automation that runs when an MR opens on \`acme/web\`" | \`replicas automation create ... --trigger-gitlab merge_request.opened --trigger-gitlab-repos acme/web\` |
19322
19322
  | "Ignore Dependabot for this PR automation" | \`replicas automation edit <id> --trigger-github-exclude-users 'dependabot[bot]'\` |
19323
+ | "Also run this PR automation on every push" | \`replicas automation edit <id> --keep-triggers --trigger-github pull_request.synchronize --trigger-github-repos acme/web\` |
19323
19324
  | "What repos are connected?" | \`replicas repos\` |
19324
19325
  | "Set up a \`replicas.json\` in this repo" | \`replicas init\` (\`-y\` for YAML) |
19325
19326
 
@@ -19481,7 +19482,7 @@ replicas automation edit <id> \\
19481
19482
  --trigger-cron "0 4 * * *" # replaces existing triggers
19482
19483
  \`\`\`
19483
19484
 
19484
- \`replicas automation edit <id> --trigger-github-exclude-users "dependabot[bot],renovate[bot]"\` updates existing GitHub triggers without replacing the rest of the trigger list. The GitLab equivalent is \`--trigger-gitlab-exclude-users\`. Passing an empty string (for example, \`--trigger-github-exclude-users ""\`) clears existing exclusions for that code host. Passing \`--trigger-github\` or \`--trigger-gitlab\` still replaces triggers (repeat it to keep several events), and the matching exclude flag is applied to the replacement triggers.
19485
+ \`replicas automation edit <id> --trigger-github-exclude-users "dependabot[bot],renovate[bot]"\` updates existing GitHub triggers without replacing the rest of the trigger list. The GitLab equivalent is \`--trigger-gitlab-exclude-users\`. Passing an empty string (for example, \`--trigger-github-exclude-users ""\`) clears existing exclusions for that code host. Passing \`--trigger-cron\`, \`--trigger-github\` or \`--trigger-gitlab\` replaces all triggers (repeat a flag for several events); add \`--keep-triggers\` to add them to the existing triggers instead. The repo, exclude and reviewer flags apply only to the events you pass.
19485
19486
 
19486
19487
  \`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.
19487
19488
 
@@ -31302,7 +31303,7 @@ var CLI_VERSION;
31302
31303
  var init_cli_version = __esm({
31303
31304
  "../shared/src/cli-version.ts"() {
31304
31305
  "use strict";
31305
- CLI_VERSION = "0.3.202";
31306
+ CLI_VERSION = "0.3.204";
31306
31307
  }
31307
31308
  });
31308
31309
 
@@ -37436,9 +37437,10 @@ async function automationEditCommand(id, options) {
37436
37437
  if (isNaN(minutes) || minutes < 3 || minutes > 1440) throw new Error("--auto-stop-minutes must be between 3 and 1440");
37437
37438
  }
37438
37439
  const replacingTriggers = options.triggerCron.length > 0 || options.triggerGithub.length > 0 || options.triggerGitlab.length > 0;
37439
- if (replacingTriggers && options.triggerGithubExcludeUsers !== void 0 && options.triggerGithub.length === 0) throw new Error("--trigger-github-exclude-users requires --trigger-github when replacing triggers");
37440
+ if (options.keepTriggers && !replacingTriggers && !runAt) throw new Error("--keep-triggers requires --trigger-cron, --trigger-github, --trigger-gitlab, --in or --at");
37441
+ if (replacingTriggers && options.triggerGithubExcludeUsers !== void 0 && options.triggerGithub.length === 0) throw new Error("--trigger-github-exclude-users requires --trigger-github when replacing or adding triggers");
37440
37442
  validateGithubReviewersOption(options);
37441
- if (replacingTriggers && options.triggerGitlabExcludeUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab when replacing triggers");
37443
+ if (replacingTriggers && options.triggerGitlabExcludeUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab when replacing or adding triggers");
37442
37444
  const parsedAgent = {
37443
37445
  agent_provider: parseAgentProviderOption(options.agentProvider),
37444
37446
  model: parseModelOption(options.model),
@@ -37526,8 +37528,10 @@ async function automationEditCommand(id, options) {
37526
37528
  }
37527
37529
  if (runAt || replacingTriggers) {
37528
37530
  const repositories = options.triggerGithubRepos || options.triggerGitlabRepos ? (await orgAuthenticatedFetch("/v1/repositories")).repositories : [];
37529
- const triggers = buildTriggersFromOptions(options, runAt, repositories);
37530
- body.triggers = triggers;
37531
+ body.triggers = [
37532
+ ...options.keepTriggers ? existing.automation.triggers : [],
37533
+ ...buildTriggersFromOptions(options, runAt, repositories)
37534
+ ];
37531
37535
  } else if (options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0) {
37532
37536
  const githubExcludedActors = parseActorListOption(options.triggerGithubExcludeUsers);
37533
37537
  const gitlabExcludedActors = parseActorListOption(options.triggerGitlabExcludeUsers);
@@ -39263,7 +39267,7 @@ var init_src2 = __esm({
39263
39267
  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));
39264
39268
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
39265
39269
  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), 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", "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 })));
39266
- 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)", collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules").option("--trigger-github <event>", "Set GitHub event (repeatable; replaces existing 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)", 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 (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), 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));
39270
+ 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), 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));
39267
39271
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
39268
39272
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
39269
39273
  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.202",
3
+ "version": "0.3.204",
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": {