replicas-cli 0.3.69 → 0.3.71

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 +32 -21
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -23856,6 +23856,18 @@ var automationTriggerSchema = external_exports.discriminatedUnion("type", [
23856
23856
  external_exports.object({ type: external_exports.literal("custom"), config: external_exports.object({}) })
23857
23857
  ]);
23858
23858
 
23859
+ // ../shared/src/automations/types.ts
23860
+ var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
23861
+ var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_when_done"];
23862
+ function toAutomationLifecyclePolicy(policy) {
23863
+ if (!policy) return "default";
23864
+ if (policy === "delete_after_inactivity") return "archive_when_done";
23865
+ return policy;
23866
+ }
23867
+ function lifecyclePolicySupportsAutoStop(policy) {
23868
+ return policy === "default";
23869
+ }
23870
+
23859
23871
  // ../shared/src/workspace-identity.ts
23860
23872
  var AWS_SOURCE_IDENTITY_CLAIM = "https://aws.amazon.com/source_identity";
23861
23873
  var WORKSPACE_TOKEN_TTL_SECONDS = 15 * 60;
@@ -23937,7 +23949,6 @@ var STALE_PREPARING_MS = 10 * 6e4;
23937
23949
  function isWorkspaceSuspendedStatus(status) {
23938
23950
  return status === "sleeping" || status === "archived";
23939
23951
  }
23940
- var VALID_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_after_inactivity"];
23941
23952
  function workspaceConfigWithCapabilities(config3, capabilities = {}) {
23942
23953
  const mergedCapabilities = {
23943
23954
  ...config3?.capabilities,
@@ -23979,6 +23990,7 @@ var REPLICAS_MCP_TOOLS = {
23979
23990
  listEnvironments: "list_environments",
23980
23991
  createAutomation: "create_automation",
23981
23992
  spawn: "spawn_workspace",
23993
+ spawnInNewThread: "spawn_workspace_in_new_thread",
23982
23994
  relay: "relay_to_workspace",
23983
23995
  listWorkspaces: "list_workspaces",
23984
23996
  linearStart: "start_linear_session",
@@ -24004,7 +24016,10 @@ var automationToolInputSchema = external_exports.object({
24004
24016
  description: external_exports.string().optional().describe("One-line summary shown in the dashboard."),
24005
24017
  plan_mode: external_exports.boolean().optional(),
24006
24018
  goal_mode: external_exports.boolean().optional(),
24007
- fast_mode: external_exports.boolean().optional()
24019
+ fast_mode: external_exports.boolean().optional(),
24020
+ workspace_lifecycle_policy: external_exports.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
24021
+ "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."
24022
+ )
24008
24023
  });
24009
24024
  var automationCreateToolInputSchema = automationToolInputSchema.extend({
24010
24025
  scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
@@ -24015,7 +24030,6 @@ var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend
24015
24030
  agent_provider: external_exports.enum(AGENT).nullable().optional(),
24016
24031
  model: external_exports.string().nullable().optional(),
24017
24032
  thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
24018
- workspace_lifecycle_policy: external_exports.enum(VALID_LIFECYCLE_POLICIES).optional(),
24019
24033
  workspace_size: external_exports.enum(WORKSPACE_SIZES).optional()
24020
24034
  });
24021
24035
  var chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
@@ -25895,12 +25909,16 @@ replicas automation create ... --disabled
25895
25909
  # Description and workspace size (small is the default; large, ultra)
25896
25910
  replicas automation create ... --description "..." --size large
25897
25911
 
25898
- # Workspace lifecycle
25899
- replicas automation create ... --lifecycle archive_when_done
25912
+ # Workspace lifecycle (delete_when_done is the default)
25900
25913
  replicas automation create ... --lifecycle sleep_when_done
25901
25914
  replicas automation create ... --lifecycle default --auto-stop-minutes 30
25902
25915
  \`\`\`
25903
25916
 
25917
+ Pick the lifecycle by what happens after a run:
25918
+ - \`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.
25919
+ - \`sleep_when_done\`: later runs reuse the workspace, e.g. one workspace per PR across pushes.
25920
+ - \`default\`: people read or follow up in the workspace, e.g. a weekly changelog the team replies to.
25921
+
25904
25922
  When the user says "make me an automation that...", default to **picking the environment for them by listing the available envs** and asking only when the user hasn't already pinned one. Same for repos in GitHub triggers. Don't pepper the user with questions you can answer by reading the existing config.
25905
25923
 
25906
25924
  ### Follow-ups and reminders
@@ -28575,7 +28593,7 @@ var headlessAgentRequestSchema = external_exports.object({
28575
28593
  });
28576
28594
 
28577
28595
  // ../shared/src/cli-version.ts
28578
- var CLI_VERSION = "0.3.69";
28596
+ var CLI_VERSION = "0.3.71";
28579
28597
 
28580
28598
  // ../shared/src/version.ts
28581
28599
  function compareVersions(v1, v2) {
@@ -28671,6 +28689,10 @@ var scoutSlackSpawnRequestSchema = external_exports.object({
28671
28689
  prompt: external_exports.string().describe("Complete task for the new workspace, written so it stands on its own."),
28672
28690
  environment_id: external_exports.string().optional().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`. Pass it only when clearly confident it fits; omit it to let routing choose. If routing cannot choose, the call fails and nothing is posted, so pick one or ask the person.`)
28673
28691
  });
28692
+ var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
28693
+ title: external_exports.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
28694
+ prompt: external_exports.string().describe("Complete task for the new workspace, written so it stands on its own: the request plus the parts of the source thread it needs. The full source thread is attached as background.")
28695
+ });
28674
28696
  var scoutSlackRelayRequestSchema = external_exports.object({
28675
28697
  channel_id: slackChannelIdSchema,
28676
28698
  thread_ts: slackThreadTsSchema,
@@ -29163,18 +29185,6 @@ var AUDIT_LOG_ACTION = {
29163
29185
  };
29164
29186
  var AUDIT_LOG_ACTIONS = Object.values(AUDIT_LOG_ACTION);
29165
29187
 
29166
- // ../shared/src/automations/types.ts
29167
- var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
29168
- var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done"];
29169
- function toAutomationLifecyclePolicy(policy) {
29170
- if (!policy) return "default";
29171
- if (policy === "default" || policy === "archive_when_done" || policy === "sleep_when_done") return policy;
29172
- return "archive_when_done";
29173
- }
29174
- function lifecyclePolicySupportsAutoStop(policy) {
29175
- return policy === "default";
29176
- }
29177
-
29178
29188
  // ../shared/src/automations/github-checks.ts
29179
29189
  var AUTOMATION_CHECK_CONCLUSIONS = ["success", "failure"];
29180
29190
  function isAutomationCheckConclusion(value) {
@@ -32120,7 +32130,8 @@ async function replicaCreateCommand(name, options) {
32120
32130
  name: replicaName,
32121
32131
  message: message2,
32122
32132
  environment_id: selectedEnvironmentId,
32123
- coding_agent: codingAgent
32133
+ coding_agent: codingAgent,
32134
+ lifecycle_policy: "default"
32124
32135
  };
32125
32136
  console.log(import_chalk20.default.gray("\nCreating replica..."));
32126
32137
  const response = await orgAuthenticatedFetch("/v1/replica", {
@@ -34433,8 +34444,8 @@ credentials.command("usage").description("Show how much of each connected Claude
34433
34444
  var automation = program.command("automation").alias("auto").description("Manage automations");
34434
34445
  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));
34435
34446
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
34436
- 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: archive_when_done, sleep_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 })));
34437
- 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: archive_when_done, sleep_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));
34447
+ 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 })));
34448
+ 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));
34438
34449
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
34439
34450
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
34440
34451
  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.69",
3
+ "version": "0.3.71",
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": {