replicas-cli 0.2.263 → 0.2.264

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.mjs +14 -3
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -9236,7 +9236,7 @@ var HOOK_EXEC_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
9236
9236
  var REPLICAS_CONFIG_FILENAMES = ["replicas.json", "replicas.yaml", "replicas.yml"];
9237
9237
 
9238
9238
  // ../shared/src/cli-version.ts
9239
- var CLI_VERSION = "0.2.263";
9239
+ var CLI_VERSION = "0.2.264";
9240
9240
 
9241
9241
  // ../shared/src/engine/environment.ts
9242
9242
  var DESKTOP_NOVNC_PORT = 6080;
@@ -12785,6 +12785,13 @@ Repositories (${response.repositories.length}):
12785
12785
  // src/commands/automation.ts
12786
12786
  import chalk18 from "chalk";
12787
12787
  import prompts4 from "prompts";
12788
+ function parseScopeFilter(value) {
12789
+ if (!value) return void 0;
12790
+ if (value === "org" || value === "user" || value === "all") return value;
12791
+ console.log(chalk18.red(`Invalid --owner: ${value}`));
12792
+ console.log(chalk18.gray("Valid options: org, user, all"));
12793
+ process.exit(1);
12794
+ }
12788
12795
  function parseAgentProviderOption(value) {
12789
12796
  if (value === void 0) return void 0;
12790
12797
  const trimmed = value.trim();
@@ -12868,6 +12875,7 @@ function resolveSelectableEnvironmentId(envInput, selectableEnvs) {
12868
12875
  function printAutomation(automation2) {
12869
12876
  console.log(chalk18.white(` ${automation2.name}`));
12870
12877
  console.log(chalk18.gray(` ID: ${automation2.id}`));
12878
+ console.log(chalk18.gray(` Owner: ${automation2.user_id ? "personal" : "organization"}`));
12871
12879
  if (automation2.description) {
12872
12880
  console.log(chalk18.gray(` Description: ${automation2.description}`));
12873
12881
  }
@@ -12897,6 +12905,8 @@ async function automationListCommand(options) {
12897
12905
  const params = new URLSearchParams();
12898
12906
  if (options.page) params.set("page", options.page);
12899
12907
  if (options.limit) params.set("limit", options.limit);
12908
+ const scope = parseScopeFilter(options.owner);
12909
+ if (scope) params.set("scope", scope);
12900
12910
  const query = params.toString();
12901
12911
  const response = await orgAuthenticatedFetch(
12902
12912
  `/v1/automations${query ? "?" + query : ""}`
@@ -13173,6 +13183,7 @@ async function automationCreateCommand(name, options) {
13173
13183
  prFollowups = prFollowupsResponse.prFollowups === true;
13174
13184
  }
13175
13185
  const body = {
13186
+ scope: options.personal ? "user" : "org",
13176
13187
  name: automationName,
13177
13188
  prompt: automationPrompt,
13178
13189
  environment_id: selectedEnvironmentId,
@@ -17866,7 +17877,7 @@ program.command("read <id>").description("Read conversation history of a replica
17866
17877
  }
17867
17878
  });
17868
17879
  var automation = program.command("automation").alias("auto").description("Manage automations");
17869
- automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").action(async (options) => {
17880
+ 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").action(async (options) => {
17870
17881
  try {
17871
17882
  await automationListCommand(options);
17872
17883
  } catch (error) {
@@ -17890,7 +17901,7 @@ automation.command("get <id>").description("Get automation details by ID").actio
17890
17901
  process.exit(1);
17891
17902
  }
17892
17903
  });
17893
- automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").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("--lifecycle <policy>", "Workspace lifecycle: delete_when_done, delete_after_inactivity, default").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle delete_after_inactivity)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, relay (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, max (or "none" to clear)').option("--disabled", "Create in disabled state").action(async (name, options) => {
17904
+ automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-e, --environment <environment>", "Environment name or ID").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("--lifecycle <policy>", "Workspace lifecycle: delete_when_done, delete_after_inactivity, default").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle delete_after_inactivity)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, relay (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, max (or "none" to clear)').option("--personal", "Create a personal automation owned by the authenticated user").option("--disabled", "Create in disabled state").action(async (name, options) => {
17894
17905
  try {
17895
17906
  await automationCreateCommand(name, {
17896
17907
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.263",
3
+ "version": "0.2.264",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {