replicas-cli 0.3.362 → 0.3.364

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 +85 -59
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -23102,7 +23102,7 @@ var init_replicas_mcp = __esm({
23102
23102
  goal_mode: external_exports.boolean().optional(),
23103
23103
  fast_mode: external_exports.boolean().optional(),
23104
23104
  workspace_lifecycle_policy: external_exports.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
23105
- "What happens to a run's workspace when the agent finishes. `delete_when_done` (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."
23105
+ "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."
23106
23106
  )
23107
23107
  });
23108
23108
  automationCreateToolInputSchema = automationToolInputSchema.extend({
@@ -25440,6 +25440,7 @@ Take action *with* Replicas itself \u2014 manage automations, environments (vari
25440
25440
  **Reference:** \`references/REPLICAS.md\`
25441
25441
 
25442
25442
  Use this when:
25443
+ - The user asks you to start a new workspace or thread for a task \u2014 use \`replicas create\`, not an automation
25443
25444
  - The user asks you to create, edit, run, or delete an automation
25444
25445
  - The user asks you to come back to something later ("check back on this in a week", "remind me tomorrow", "tell me when CI is green") \u2014 schedule a follow-up (see *Follow-ups and reminders*)
25445
25446
  - The user asks you to manage environments, environment variables, or environment files
@@ -25470,11 +25471,13 @@ Workspace identity:
25470
25471
 
25471
25472
  If you get "Not logged in", the workspace is misconfigured \u2014 surface this to the user instead of trying to work around it.
25472
25473
 
25473
- In agent mode the CLI hides commands that don't make sense for in-workspace agents (\`login\`, \`logout\`, \`codex-auth\`, \`claude-auth\`, \`org switch\`, \`config\`, \`interact\`, \`code\`, replica/workspace top-level CRUD). What you have is:
25474
+ In agent mode the CLI hides commands that don't make sense for in-workspace agents (\`login\`, \`logout\`, \`codex-auth\`, \`claude-auth\`, \`org switch\`, \`config\`, \`interact\`, \`code\`). What you have includes:
25474
25475
 
25475
25476
  | Command | What it does |
25476
25477
  | --- | --- |
25477
25478
  | \`replicas whoami\` | Print the workspace + org identity |
25479
+ | \`replicas create <name> -e <env> -a <agent> -m "<prompt>"\` | Start a new workspace with its own agent (see *Starting a new workspace*) |
25480
+ | \`replicas get <id>\` / \`replicas list\` | Check a workspace's status, or find workspaces |
25478
25481
  | \`replicas identity token [--audience <aud>]\` | Print the current short-lived workspace identity token for an audience |
25479
25482
  | \`replicas identity token --format gcp --audience <aud>\` | Supply a current token to Google's executable credential source |
25480
25483
  | \`replicas identity aws-credentials --role-arn <arn> [--region <region>] [--source-identity]\` | Exchange the current token for AWS credential_process JSON (requires AWS CLI); \`--source-identity\` records the workspace ID in CloudTrail and needs \`sts:SetSourceIdentity\` in the role trust policy |
@@ -25498,6 +25501,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
25498
25501
 
25499
25502
  | User says... | Run |
25500
25503
  | --- | --- |
25504
+ | "Spin up a new workspace / thread to work on X" | \`replicas create <name> -e <env> -a <agent> -m "<prompt>"\` |
25501
25505
  | "What environments do I have?" | \`replicas environment list\` |
25502
25506
  | "Add API key X to my staging env" | \`replicas environment vars set <env> <KEY> <VALUE>\` |
25503
25507
  | You need a secret or API key you don't have | \`replicas environment vars request <KEY>... --reason "..."\` (see "Asking the user for variables") |
@@ -25579,6 +25583,19 @@ Constraints:
25579
25583
  - \`set\` is upsert (matched by destination path).
25580
25584
  - The display \`--name\` defaults to the basename of the destination path; override only if it would be unclear in the dashboard list.
25581
25585
 
25586
+ ## Starting a new workspace
25587
+
25588
+ When the user asks you to start a task in a new workspace or thread, create it now with \`replicas create\`. Don't use a one-time automation for this; those are for work that should start later.
25589
+
25590
+ \`\`\`bash
25591
+ replicas create fix-login-redirect -e <env-name-or-id> -a claude -m "Fix the login redirect loop on /settings. Open a PR when done."
25592
+ \`\`\`
25593
+
25594
+ - The name can't contain spaces. Pick the environment with \`replicas environment list\`; use this workspace's environment when the task is in the same repos. Use \`-a\` with this conversation's agent unless the user asked for another.
25595
+ - Write \`-m\` as the full task: the new agent can't see this conversation.
25596
+ - On success it prints the workspace ID and a **Link**. Run \`replicas get <id>\` to confirm the workspace exists and is starting, then give the user the link.
25597
+ - If the command fails (it exits non-zero and prints the reason), tell the user the exact error. Never say a workspace was created unless \`replicas get\` found it.
25598
+
25582
25599
  ## Automations
25583
25600
 
25584
25601
  Automations are saved prompts with one or more triggers (cron schedules and/or GitHub or GitLab events). When fired, they create a workspace using the configured environment and run the prompt with the user's coding agent.
@@ -25632,7 +25649,7 @@ replicas automation create ... --lifecycle default --auto-stop-minutes 30
25632
25649
  \`\`\`
25633
25650
 
25634
25651
  Pick the lifecycle by what happens after a run:
25635
- - \`delete_when_done\` (default): the output lives elsewhere and nobody opens the workspace, e.g. a PR "DRY code check" that posts a comment or check.
25652
+ - \`delete_when_done\` (default, except one-time \`--in\`/\`--at\` runs, which default to \`default\`): the output lives elsewhere and nobody opens the workspace, e.g. a PR "DRY code check" that posts a comment or check.
25636
25653
  - \`sleep_when_done\`: later runs reuse the workspace, e.g. one workspace per PR across pushes.
25637
25654
  - \`default\`: people read or follow up in the workspace, e.g. a weekly changelog the team replies to.
25638
25655
 
@@ -35784,6 +35801,11 @@ function assistantError(info) {
35784
35801
  function parseOpencodeEvents(events) {
35785
35802
  const messages = [];
35786
35803
  const inputState = { requests: /* @__PURE__ */ new Map(), resolutions: /* @__PURE__ */ new Map(), requestedAt: /* @__PURE__ */ new Map() };
35804
+ const streamedParts = /* @__PURE__ */ new Map();
35805
+ const upsertStreamedPart = ({ id, type, text: text4, completed, timestamp }) => {
35806
+ if (!text4.trim()) return;
35807
+ upsertDisplayMessage(messages, type === "text" ? { id, type: "agent", content: text4, timestamp } : { id, type: "reasoning", content: text4, status: completed ? "completed" : "in_progress", timestamp });
35808
+ };
35787
35809
  for (const event of events) {
35788
35810
  if (event.type === "event_msg" && event.payload.type === "user_message") {
35789
35811
  const message2 = event.payload.message;
@@ -35799,10 +35821,11 @@ function parseOpencodeEvents(events) {
35799
35821
  continue;
35800
35822
  }
35801
35823
  if (event.type === "opencode-message.updated") {
35802
- const error62 = assistantError(event.payload.info);
35824
+ const { info } = event.payload;
35825
+ const error62 = assistantError(info);
35803
35826
  if (error62) {
35804
- messages.push({
35805
- id: `opencode-${event.type}-${event.timestamp}`,
35827
+ upsertDisplayMessage(messages, {
35828
+ id: isRecord(info) && typeof info.id === "string" ? `opencode-error-${info.id}` : `opencode-${event.type}-${event.timestamp}`,
35806
35829
  type: "error",
35807
35830
  message: error62,
35808
35831
  timestamp: event.timestamp
@@ -35810,6 +35833,15 @@ function parseOpencodeEvents(events) {
35810
35833
  }
35811
35834
  continue;
35812
35835
  }
35836
+ if (event.type === "opencode-message.part.delta") {
35837
+ const { partID, field: field2, delta } = event.payload;
35838
+ const streamed = typeof partID === "string" ? streamedParts.get(partID) : void 0;
35839
+ if (streamed && field2 === "text" && typeof delta === "string") {
35840
+ streamed.text += delta;
35841
+ upsertStreamedPart(streamed);
35842
+ }
35843
+ continue;
35844
+ }
35813
35845
  if (event.type === "opencode-error") {
35814
35846
  const message2 = typeof event.payload.message === "string" ? event.payload.message : "Opencode run failed";
35815
35847
  messages.push({
@@ -35846,29 +35878,16 @@ function parseOpencodeEvents(events) {
35846
35878
  else if (typeof part.id === "string") id = `opencode-${part.id}`;
35847
35879
  const time3 = isRecord(part.time) ? part.time : null;
35848
35880
  const timestamp = timestampFromMs(time3?.start, event.timestamp);
35849
- if (part.type === "text") {
35850
- const text4 = typeof part.text === "string" ? part.text : "";
35851
- if (text4.trim()) {
35852
- upsertDisplayMessage(messages, {
35853
- id,
35854
- type: "agent",
35855
- content: text4,
35856
- timestamp
35857
- });
35858
- }
35859
- continue;
35860
- }
35861
- if (part.type === "reasoning") {
35862
- const text4 = typeof part.text === "string" ? part.text : "";
35863
- if (text4.trim()) {
35864
- upsertDisplayMessage(messages, {
35865
- id,
35866
- type: "reasoning",
35867
- content: text4,
35868
- status: time3?.end ? "completed" : "in_progress",
35869
- timestamp
35870
- });
35871
- }
35881
+ if ((part.type === "text" || part.type === "reasoning") && typeof part.id === "string") {
35882
+ const streamed = {
35883
+ id,
35884
+ type: part.type,
35885
+ text: typeof part.text === "string" ? part.text : "",
35886
+ completed: Boolean(time3?.end),
35887
+ timestamp
35888
+ };
35889
+ streamedParts.set(part.id, streamed);
35890
+ upsertStreamedPart(streamed);
35872
35891
  continue;
35873
35892
  }
35874
35893
  if (part.type === "tool" && isRecord(part.state)) {
@@ -37766,7 +37785,7 @@ var CLI_VERSION;
37766
37785
  var init_cli_version = __esm({
37767
37786
  "../shared/src/cli-version.ts"() {
37768
37787
  "use strict";
37769
- CLI_VERSION = "0.3.362";
37788
+ CLI_VERSION = "0.3.364";
37770
37789
  }
37771
37790
  });
37772
37791
 
@@ -38583,14 +38602,38 @@ var init_client_state = __esm({
38583
38602
  }
38584
38603
  });
38585
38604
 
38605
+ // ../shared/src/routes/presence.ts
38606
+ var presenceStatusSchema, presenceLocationSchema, presenceEntrySchema, updatePresenceRequestSchema;
38607
+ var init_presence = __esm({
38608
+ "../shared/src/routes/presence.ts"() {
38609
+ "use strict";
38610
+ init_zod();
38611
+ presenceStatusSchema = external_exports.enum(["online", "typing"]);
38612
+ presenceLocationSchema = external_exports.object({
38613
+ workspaceId: external_exports.string().optional()
38614
+ });
38615
+ presenceEntrySchema = external_exports.object({
38616
+ userId: external_exports.string(),
38617
+ status: presenceStatusSchema,
38618
+ location: presenceLocationSchema,
38619
+ ts: external_exports.string()
38620
+ });
38621
+ updatePresenceRequestSchema = external_exports.object({
38622
+ status: presenceStatusSchema,
38623
+ location: presenceLocationSchema.optional()
38624
+ });
38625
+ }
38626
+ });
38627
+
38586
38628
  // ../shared/src/routes/workspace-events.ts
38587
- var workspaceTurnCompletionSchema, workspaceChangedEventSchema;
38629
+ var workspaceTurnCompletionSchema, workspaceEventSchemaByType, workspaceChangedEventSchema;
38588
38630
  var init_workspace_events = __esm({
38589
38631
  "../shared/src/routes/workspace-events.ts"() {
38590
38632
  "use strict";
38591
38633
  init_zod();
38592
38634
  init_workspace_attention();
38593
38635
  init_workspaces();
38636
+ init_presence();
38594
38637
  workspaceTurnCompletionSchema = external_exports.object({
38595
38638
  workspaceName: external_exports.string(),
38596
38639
  completedAt: external_exports.string(),
@@ -38598,10 +38641,11 @@ var init_workspace_events = __esm({
38598
38641
  pullRequestFeedback: external_exports.boolean().optional(),
38599
38642
  attention: external_exports.object({ reason: external_exports.enum(CHAT_ATTENTION_REASONS), userId: external_exports.string() }).optional()
38600
38643
  });
38601
- workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
38644
+ workspaceEventSchemaByType = external_exports.discriminatedUnion("type", [
38602
38645
  external_exports.object({
38603
38646
  type: external_exports.literal("workspace.changed"),
38604
38647
  workspaceId: external_exports.string(),
38648
+ accessChangedFor: external_exports.string().optional(),
38605
38649
  workspace: external_exports.object({ status: external_exports.enum(WORKSPACE_STATUSES), last_activity_at: external_exports.string().nullable() }).optional(),
38606
38650
  name: external_exports.string().optional(),
38607
38651
  completion: workspaceTurnCompletionSchema.optional(),
@@ -38621,7 +38665,6 @@ var init_workspace_events = __esm({
38621
38665
  processing: external_exports.boolean(),
38622
38666
  ts: external_exports.string()
38623
38667
  }),
38624
- external_exports.object({ type: external_exports.literal("presence.changed"), ts: external_exports.string() }),
38625
38668
  external_exports.object({
38626
38669
  type: external_exports.literal("mobile-testing.changed"),
38627
38670
  workspaceId: external_exports.string(),
@@ -38643,7 +38686,7 @@ var init_workspace_events = __esm({
38643
38686
  subagent: external_exports.object({ id: external_exports.string(), name: external_exports.string(), prUrl: external_exports.string().nullable() }),
38644
38687
  ts: external_exports.string()
38645
38688
  }),
38646
- external_exports.object({ type: external_exports.literal("needs-you.changed"), workspaceId: external_exports.string().nullable(), ts: external_exports.string() }),
38689
+ external_exports.object({ type: external_exports.literal("needs-you.changed"), workspaceId: external_exports.string().nullable(), userId: external_exports.string().optional(), ts: external_exports.string() }),
38647
38690
  external_exports.object({
38648
38691
  type: external_exports.literal("workspace.shared"),
38649
38692
  workspaceId: external_exports.string(),
@@ -38653,29 +38696,11 @@ var init_workspace_events = __esm({
38653
38696
  ts: external_exports.string()
38654
38697
  })
38655
38698
  ]);
38656
- }
38657
- });
38658
-
38659
- // ../shared/src/routes/presence.ts
38660
- var presenceStatusSchema, presenceLocationSchema, presenceEntrySchema, updatePresenceRequestSchema;
38661
- var init_presence = __esm({
38662
- "../shared/src/routes/presence.ts"() {
38663
- "use strict";
38664
- init_zod();
38665
- presenceStatusSchema = external_exports.enum(["online", "typing"]);
38666
- presenceLocationSchema = external_exports.object({
38667
- workspaceId: external_exports.string().optional()
38668
- });
38669
- presenceEntrySchema = external_exports.object({
38670
- userId: external_exports.string(),
38671
- status: presenceStatusSchema,
38672
- location: presenceLocationSchema,
38673
- ts: external_exports.string()
38674
- });
38675
- updatePresenceRequestSchema = external_exports.object({
38676
- status: presenceStatusSchema,
38677
- location: presenceLocationSchema.optional()
38678
- });
38699
+ workspaceChangedEventSchema = external_exports.union([
38700
+ workspaceEventSchemaByType,
38701
+ external_exports.object({ type: external_exports.literal("presence.changed"), userId: external_exports.string(), entry: presenceEntrySchema.nullable(), ts: external_exports.string() }),
38702
+ external_exports.object({ type: external_exports.literal("presence.changed"), ts: external_exports.string() })
38703
+ ]);
38679
38704
  }
38680
38705
  });
38681
38706
 
@@ -52452,6 +52477,7 @@ Created replica: ${replica.name}`));
52452
52477
  if (replica.repositories.length > 0) {
52453
52478
  console.log(import_chalk21.default.gray(` Repositories: ${replica.repositories.map((repository) => repository.name).join(", ")}`));
52454
52479
  }
52480
+ console.log(import_chalk21.default.cyan(` Link: ${getWorkspaceDashboardUrl(replica.id, { webAppUrl: process.env.REPLICAS_WEB_URL || DEFAULT_WEB_APP_URL })}`));
52455
52481
  console.log();
52456
52482
  });
52457
52483
  }
@@ -55600,8 +55626,8 @@ var init_src2 = __esm({
55600
55626
  automation = program.command("automation").alias("auto").description("Manage automations");
55601
55627
  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));
55602
55628
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
55603
- 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 })));
55604
- 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));
55629
+ 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", "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 })));
55630
+ 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));
55605
55631
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
55606
55632
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
55607
55633
  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.362",
3
+ "version": "0.3.364",
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": {