replicas-cli 0.3.114 → 0.3.116

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 +12 -16
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -26062,6 +26062,7 @@ replicas automation create "Re-check PR #142 CI" \\
26062
26062
  - \`--background\` keeps follow-ups out of the user's main automations list (they are still visible under **Background**). Use it for every one-time follow-up that reports back into this conversation, even one that leads to a big decision. Omit it only for recurring automations the user wants to see and manage, such as ongoing monitoring.
26063
26063
  - \`--personal\` makes the automation the user's own. Omit it only when the follow-up belongs to the organization.
26064
26064
  - Recurring with an end: \`--trigger-cron "0 9 * * *" --max-runs 5 --workspace current\` runs daily five times, then deletes itself. \`--workspace reuse\` creates one new workspace on the first run and sends every later run to it; \`--workspace new\` (the default for non-one-time automations) creates a fresh workspace per run.
26065
+ - Repeat \`--trigger-cron\` for different times on different days: \`--trigger-cron "0 9 * * 1" --trigger-cron "0 17 * * 5"\` runs Monday at 9 and Friday at 5.
26065
26066
  - Only schedule when the user asked for a follow-up or clearly agreed to one; not for "maybe I'll look at this later".
26066
26067
  - Confirm using the **Next Run** time the CLI prints, not your own arithmetic. Cancel with \`replicas automation delete <id> --force\`; find them with \`replicas automation list --background true\`.
26067
26068
 
@@ -26372,6 +26373,7 @@ var DEFAULT_USER_PREFERENCES = {
26372
26373
  open_prs_in_graphite: false,
26373
26374
  open_links_in_desktop_app: false,
26374
26375
  port_forwarding: false,
26376
+ follow_up_mode: "steer",
26375
26377
  memory_enabled: null,
26376
26378
  subagent_mcp_enabled: null,
26377
26379
  default_fast_mode: false,
@@ -28723,7 +28725,7 @@ var headlessAgentRequestSchema = external_exports.object({
28723
28725
  });
28724
28726
 
28725
28727
  // ../shared/src/cli-version.ts
28726
- var CLI_VERSION = "0.3.114";
28728
+ var CLI_VERSION = "0.3.116";
28727
28729
 
28728
28730
  // ../shared/src/version.ts
28729
28731
  function compareVersions(v1, v2) {
@@ -33134,8 +33136,8 @@ function resolveTriggerRepositoryIds(repositories, repoNamesInput, provider2) {
33134
33136
  function buildTriggersFromOptions(options, runAt, repositories) {
33135
33137
  const triggers = [];
33136
33138
  if (runAt) triggers.push({ type: "cron", config: { run_at: runAt, timezone: localTimezone() } });
33137
- if (options.triggerCron) {
33138
- triggers.push({ type: "cron", config: { schedule: options.triggerCron, timezone: options.triggerCronTimezone || "UTC" } });
33139
+ for (const schedule of options.triggerCron) {
33140
+ triggers.push({ type: "cron", config: { schedule, timezone: options.triggerCronTimezone || "UTC" } });
33139
33141
  }
33140
33142
  const providerTriggers = [
33141
33143
  ["github", options.triggerGithub, options.triggerGithubRepos, options.triggerGithubExcludeUsers],
@@ -33274,12 +33276,6 @@ Automation: ${automation2.name}
33274
33276
  }
33275
33277
  console.log(import_chalk26.default.gray(` Prompt: ${automation2.prompt}`));
33276
33278
  console.log(import_chalk26.default.gray(` Environment: ${automation2.environment_id}`));
33277
- if (automation2.cron_expression) {
33278
- console.log(import_chalk26.default.gray(` Cron: ${automation2.cron_expression}`));
33279
- }
33280
- if (automation2.cron_timezone) {
33281
- console.log(import_chalk26.default.gray(` Timezone: ${automation2.cron_timezone}`));
33282
- }
33283
33279
  if (automation2.cron_next_fire_at) {
33284
33280
  console.log(import_chalk26.default.gray(` Next Run: ${formatDate(automation2.cron_next_fire_at)}`));
33285
33281
  }
@@ -33431,7 +33427,7 @@ async function promptForTriggers(repositories) {
33431
33427
  async function automationCreateCommand(name, options) {
33432
33428
  ensureOrgApiAuthenticated();
33433
33429
  const runAt = resolveRunAt(options);
33434
- if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
33430
+ if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
33435
33431
  const maxRuns = parseMaxRuns(options.maxRuns);
33436
33432
  const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
33437
33433
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
@@ -33573,7 +33569,7 @@ Created automation: ${automation2.name}`));
33573
33569
  async function automationEditCommand(id, options) {
33574
33570
  ensureOrgApiAuthenticated();
33575
33571
  const runAt = resolveRunAt(options);
33576
- if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
33572
+ if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
33577
33573
  const maxRuns = parseMaxRuns(options.maxRuns);
33578
33574
  const workspaceTarget = parseWorkspaceTarget(options.workspace);
33579
33575
  const lifecyclePolicy = parseAutomationLifecycleOptions(options);
@@ -33582,7 +33578,7 @@ async function automationEditCommand(id, options) {
33582
33578
  const minutes = parseInt(options.autoStopMinutes, 10);
33583
33579
  if (isNaN(minutes) || minutes < 3 || minutes > 1440) throw new Error("--auto-stop-minutes must be between 3 and 1440");
33584
33580
  }
33585
- const replacingTriggers = Boolean(options.triggerCron || options.triggerGithub || options.triggerGitlab);
33581
+ const replacingTriggers = Boolean(options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab);
33586
33582
  if (replacingTriggers && options.triggerGithubExcludeUsers !== void 0 && !options.triggerGithub) throw new Error("--trigger-github-exclude-users requires --trigger-github when replacing triggers");
33587
33583
  validateGithubReviewersOption(options);
33588
33584
  if (replacingTriggers && options.triggerGitlabExcludeUsers !== void 0 && !options.triggerGitlab) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab when replacing triggers");
@@ -33599,7 +33595,7 @@ async function automationEditCommand(id, options) {
33599
33595
  model: existing.automation.model
33600
33596
  });
33601
33597
  const body = {};
33602
- const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
33598
+ const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
33603
33599
  if (!hasOptions) {
33604
33600
  const nameResponse = await ask({
33605
33601
  type: "text",
@@ -33671,7 +33667,7 @@ async function automationEditCommand(id, options) {
33671
33667
  ...normalizeAutomationGithubCheckNames(options.addGithubChecks.split(","))
33672
33668
  ])];
33673
33669
  }
33674
- if (runAt || options.triggerCron || options.triggerGithub || options.triggerGitlab) {
33670
+ if (runAt || options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab) {
33675
33671
  const repositories = options.triggerGithubRepos || options.triggerGitlabRepos ? (await orgAuthenticatedFetch("/v1/repositories")).repositories : [];
33676
33672
  const triggers = buildTriggersFromOptions(options, runAt, repositories);
33677
33673
  body.triggers = triggers;
@@ -34864,8 +34860,8 @@ credentials.command("usage").description("Show how much of each connected Claude
34864
34860
  var automation = program.command("automation").alias("auto").description("Manage automations");
34865
34861
  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));
34866
34862
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
34867
- automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-d, --description <description>", "Description shown with the automation").option("-e, --environment <environment>", "Environment name or ID").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small (default), large, ultra").option("--trigger-cron <schedule>", 'Cron schedule expression (e.g. "0 9 * * 1-5")').option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").option("--lifecycle <policy>", "Workspace lifecycle: 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 })));
34868
- automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-d, --description <description>", "New description (pass empty string to clear)").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small, large, ultra").option("--enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron trigger").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: 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).action(run(automationEditCommand));
34863
+ 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")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").option("--lifecycle <policy>", "Workspace lifecycle: 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 })));
34864
+ 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 (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: 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).action(run(automationEditCommand));
34869
34865
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
34870
34866
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
34871
34867
  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.114",
3
+ "version": "0.3.116",
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": {