replicas-cli 0.3.671 → 0.3.672

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 +112 -59
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -21247,6 +21247,48 @@ var init_github = __esm({
21247
21247
  }
21248
21248
  });
21249
21249
 
21250
+ // ../shared/src/automations/gitlab/index.ts
21251
+ var REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, MENTIONED_USERS_PARAM, GROUP_MR_EVENTS_PARAM, MR_COMMENT_EVENT, GITLAB_TRIGGER;
21252
+ var init_gitlab = __esm({
21253
+ "../shared/src/automations/gitlab/index.ts"() {
21254
+ "use strict";
21255
+ REPO_FILTER_PARAM2 = {
21256
+ id: "repository_ids",
21257
+ label: "Filter by project",
21258
+ type: "repository_ids"
21259
+ };
21260
+ EXCLUDED_ACTORS_PARAM2 = {
21261
+ id: "excluded_actors",
21262
+ label: "Exclude users",
21263
+ type: "excluded_actors"
21264
+ };
21265
+ MENTIONED_USERS_PARAM = {
21266
+ id: "mentioned_users",
21267
+ label: "Mentioned users",
21268
+ type: "mentioned_users"
21269
+ };
21270
+ GROUP_MR_EVENTS_PARAM = {
21271
+ id: "group_pr_events",
21272
+ label: "Group MR events to same workspace",
21273
+ type: "boolean"
21274
+ };
21275
+ MR_COMMENT_EVENT = "merge_request.commented";
21276
+ GITLAB_TRIGGER = {
21277
+ type: "gitlab",
21278
+ label: "GitLab",
21279
+ description: "Trigger on project events",
21280
+ icon: "gitlab",
21281
+ events: [
21282
+ { id: "merge_request.opened", label: "MR opened", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
21283
+ { id: "merge_request.updated", label: "MR updated (new commits)", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
21284
+ { id: MR_COMMENT_EVENT, label: "MR comment", parameters: [MENTIONED_USERS_PARAM, REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
21285
+ { id: "merge_request.merged", label: "MR merged", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] },
21286
+ { id: "merge_request.closed", label: "MR closed", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] }
21287
+ ]
21288
+ };
21289
+ }
21290
+ });
21291
+
21250
21292
  // ../shared/src/routes/linear.ts
21251
21293
  var linearSessionMetadataSchema, LINEAR_WORKFLOW_STATE_TYPES;
21252
21294
  var init_linear = __esm({
@@ -21318,6 +21360,12 @@ function getReviewerLoginsError(event, logins) {
21318
21360
  if (isReviewRequested === !!logins?.some((login) => login.trim().replace(/^@+/, ""))) return null;
21319
21361
  return isReviewRequested ? "The PR review requested trigger needs at least one GitHub username" : "Requested reviewers only apply to the PR review requested trigger";
21320
21362
  }
21363
+ function getMentionedUsersError(event, users) {
21364
+ if (event !== MR_COMMENT_EVENT && users?.some((user) => user.trim().replace(/^@+/, ""))) {
21365
+ return "Mentioned users only apply to the MR comment trigger";
21366
+ }
21367
+ return null;
21368
+ }
21321
21369
  var repositoryTriggerConfigSchema, cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema, linearTriggerConfigSchema, automationTriggerSchema;
21322
21370
  var init_trigger_schemas = __esm({
21323
21371
  "../shared/src/automations/trigger-schemas.ts"() {
@@ -21325,23 +21373,33 @@ var init_trigger_schemas = __esm({
21325
21373
  init_zod();
21326
21374
  init_uuid();
21327
21375
  init_github();
21376
+ init_gitlab();
21328
21377
  init_linear2();
21329
21378
  repositoryTriggerConfigSchema = external_exports.object({
21330
21379
  event: external_exports.string(),
21331
21380
  repository_ids: external_exports.array(external_exports.string().regex(UUID_RE, "must be a repository id")).optional(),
21332
21381
  group_pr_events: external_exports.boolean().optional(),
21333
- excluded_actors: external_exports.array(external_exports.string()).optional(),
21334
- reviewer_logins: external_exports.array(external_exports.string()).optional()
21382
+ excluded_actors: external_exports.array(external_exports.string()).optional()
21335
21383
  });
21336
21384
  cronTriggerSchema = external_exports.object({ type: external_exports.literal("cron"), config: external_exports.object({ schedule: external_exports.string(), timezone: external_exports.string().optional() }) });
21337
21385
  githubTriggerSchema = external_exports.object({
21338
21386
  type: external_exports.literal("github"),
21339
- config: repositoryTriggerConfigSchema.superRefine((config3, ctx) => {
21387
+ config: repositoryTriggerConfigSchema.extend({
21388
+ reviewer_logins: external_exports.array(external_exports.string()).optional()
21389
+ }).superRefine((config3, ctx) => {
21340
21390
  const message2 = getReviewerLoginsError(config3.event, config3.reviewer_logins);
21341
21391
  if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["reviewer_logins"] });
21342
21392
  })
21343
21393
  });
21344
- gitlabTriggerSchema = external_exports.object({ type: external_exports.literal("gitlab"), config: repositoryTriggerConfigSchema });
21394
+ gitlabTriggerSchema = external_exports.object({
21395
+ type: external_exports.literal("gitlab"),
21396
+ config: repositoryTriggerConfigSchema.extend({
21397
+ mentioned_users: external_exports.array(external_exports.string()).optional()
21398
+ }).superRefine((config3, ctx) => {
21399
+ const message2 = getMentionedUsersError(config3.event, config3.mentioned_users);
21400
+ if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["mentioned_users"] });
21401
+ })
21402
+ });
21345
21403
  linearTriggerConfigSchema = linearIssueFiltersSchema.extend({
21346
21404
  event: external_exports.string(),
21347
21405
  team_ids: external_exports.array(external_exports.string()).optional(),
@@ -26592,7 +26650,7 @@ Media delivery is owned by \`references/MEDIA.md\`. Read it before adding screen
26592
26650
 
26593
26651
  // ../shared/src/default-skills/replicas-agent/abilities/gitlab.ts
26594
26652
  var SECTION6, REFERENCE5, GITLAB_ABILITY;
26595
- var init_gitlab = __esm({
26653
+ var init_gitlab2 = __esm({
26596
26654
  "../shared/src/default-skills/replicas-agent/abilities/gitlab.ts"() {
26597
26655
  "use strict";
26598
26656
  SECTION6 = `### GitLab
@@ -29195,7 +29253,7 @@ var init_registry = __esm({
29195
29253
  init_docker();
29196
29254
  init_environment_setup();
29197
29255
  init_github2();
29198
- init_gitlab();
29256
+ init_gitlab2();
29199
29257
  init_gpu();
29200
29258
  init_issues2();
29201
29259
  init_linear3();
@@ -43456,7 +43514,7 @@ var CLI_VERSION;
43456
43514
  var init_cli_version = __esm({
43457
43515
  "../shared/src/cli-version.ts"() {
43458
43516
  "use strict";
43459
- CLI_VERSION = "0.3.671";
43517
+ CLI_VERSION = "0.3.672";
43460
43518
  }
43461
43519
  });
43462
43520
 
@@ -43769,7 +43827,7 @@ var init_code_host_issues = __esm({
43769
43827
  });
43770
43828
 
43771
43829
  // ../shared/src/routes/gitlab.ts
43772
- var init_gitlab2 = __esm({
43830
+ var init_gitlab3 = __esm({
43773
43831
  "../shared/src/routes/gitlab.ts"() {
43774
43832
  "use strict";
43775
43833
  }
@@ -54027,41 +54085,6 @@ var init_cron = __esm({
54027
54085
  }
54028
54086
  });
54029
54087
 
54030
- // ../shared/src/automations/gitlab/index.ts
54031
- var REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM, GITLAB_TRIGGER;
54032
- var init_gitlab3 = __esm({
54033
- "../shared/src/automations/gitlab/index.ts"() {
54034
- "use strict";
54035
- REPO_FILTER_PARAM2 = {
54036
- id: "repository_ids",
54037
- label: "Filter by project",
54038
- type: "repository_ids"
54039
- };
54040
- EXCLUDED_ACTORS_PARAM2 = {
54041
- id: "excluded_actors",
54042
- label: "Exclude users",
54043
- type: "excluded_actors"
54044
- };
54045
- GROUP_MR_EVENTS_PARAM = {
54046
- id: "group_pr_events",
54047
- label: "Group MR events to same workspace",
54048
- type: "boolean"
54049
- };
54050
- GITLAB_TRIGGER = {
54051
- type: "gitlab",
54052
- label: "GitLab",
54053
- description: "Trigger on project events",
54054
- icon: "gitlab",
54055
- events: [
54056
- { id: "merge_request.opened", label: "MR opened", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
54057
- { id: "merge_request.updated", label: "MR updated (new commits)", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
54058
- { id: "merge_request.merged", label: "MR merged", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] },
54059
- { id: "merge_request.closed", label: "MR closed", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] }
54060
- ]
54061
- };
54062
- }
54063
- });
54064
-
54065
54088
  // ../shared/src/automations/slack/index.ts
54066
54089
  var init_slack3 = __esm({
54067
54090
  "../shared/src/automations/slack/index.ts"() {
@@ -54089,7 +54112,7 @@ var init_registry2 = __esm({
54089
54112
  "use strict";
54090
54113
  init_cron();
54091
54114
  init_github();
54092
- init_gitlab3();
54115
+ init_gitlab();
54093
54116
  init_slack3();
54094
54117
  init_sentry3();
54095
54118
  init_linear2();
@@ -54129,7 +54152,7 @@ var init_automations = __esm({
54129
54152
  init_agent_validation();
54130
54153
  init_registry2();
54131
54154
  init_github();
54132
- init_gitlab3();
54155
+ init_gitlab();
54133
54156
  init_cron();
54134
54157
  init_slack3();
54135
54158
  init_sentry3();
@@ -54782,7 +54805,7 @@ var init_src = __esm({
54782
54805
  init_pi();
54783
54806
  init_github3();
54784
54807
  init_code_host_issues();
54785
- init_gitlab2();
54808
+ init_gitlab3();
54786
54809
  init_integrations();
54787
54810
  init_external_accounts();
54788
54811
  init_linear();
@@ -59190,6 +59213,14 @@ function validateGithubReviewersOption(options) {
59190
59213
  );
59191
59214
  if (error62) throw new Error(`${error62} (--trigger-github-reviewers)`);
59192
59215
  }
59216
+ function validateGitlabMentionedUsersOption(options) {
59217
+ if (options.triggerGitlabMentionedUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-mentioned-users requires --trigger-gitlab");
59218
+ const error62 = options.triggerGitlab.length > 0 && getMentionedUsersError(
59219
+ options.triggerGitlab.includes(MR_COMMENT_EVENT) ? MR_COMMENT_EVENT : options.triggerGitlab[0],
59220
+ parseActorListOption(options.triggerGitlabMentionedUsers)
59221
+ );
59222
+ if (error62) throw new Error(`${error62} (--trigger-gitlab-mentioned-users)`);
59223
+ }
59193
59224
  function parseDuration(value) {
59194
59225
  const parts = [...value.trim().toLowerCase().matchAll(/(\d+)\s*([mhdw])/g)];
59195
59226
  if (parts.length === 0 || parts.map((p) => p[0]).join("") !== value.trim().toLowerCase().replace(/\s+/g, "")) return null;
@@ -59282,6 +59313,7 @@ function formatTrigger(trigger) {
59282
59313
  const config3 = trigger.config;
59283
59314
  const details = [
59284
59315
  config3.repository_ids?.length ? `${config3.repository_ids.length} project${config3.repository_ids.length > 1 ? "s" : ""} filtered` : null,
59316
+ config3.mentioned_users?.length ? `mentions: ${config3.mentioned_users.join(", ")}` : null,
59285
59317
  config3.excluded_actors?.length ? `exclude: ${config3.excluded_actors.join(", ")}` : null
59286
59318
  ].filter(Boolean);
59287
59319
  return `gitlab: ${config3.event}${details.length > 0 ? ` (${details.join(", ")})` : ""}`;
@@ -59317,16 +59349,29 @@ function buildTriggersFromOptions(options, runAt, repositories) {
59317
59349
  const repositoryIds = resolveTriggerRepositoryIds(repositories, repoNames, type);
59318
59350
  const excludedActors = parseActorListOption(excludeUsers);
59319
59351
  for (const event of events) {
59320
- const reviewerLogins = type === "github" && event === REVIEW_REQUESTED_EVENT ? parseActorListOption(options.triggerGithubReviewers) : void 0;
59321
- triggers.push({
59322
- type,
59323
- config: {
59324
- event,
59325
- ...repositoryIds ? { repository_ids: repositoryIds } : {},
59326
- ...excludedActors ? { excluded_actors: excludedActors } : {},
59327
- ...reviewerLogins ? { reviewer_logins: reviewerLogins } : {}
59328
- }
59329
- });
59352
+ if (type === "github") {
59353
+ const reviewerLogins = event === REVIEW_REQUESTED_EVENT ? parseActorListOption(options.triggerGithubReviewers) : void 0;
59354
+ triggers.push({
59355
+ type,
59356
+ config: {
59357
+ event,
59358
+ ...repositoryIds ? { repository_ids: repositoryIds } : {},
59359
+ ...excludedActors ? { excluded_actors: excludedActors } : {},
59360
+ ...reviewerLogins ? { reviewer_logins: reviewerLogins } : {}
59361
+ }
59362
+ });
59363
+ } else {
59364
+ const mentionedUsers = event === MR_COMMENT_EVENT ? parseActorListOption(options.triggerGitlabMentionedUsers) : void 0;
59365
+ triggers.push({
59366
+ type,
59367
+ config: {
59368
+ event,
59369
+ ...repositoryIds ? { repository_ids: repositoryIds } : {},
59370
+ ...excludedActors ? { excluded_actors: excludedActors } : {},
59371
+ ...mentionedUsers ? { mentioned_users: mentionedUsers } : {}
59372
+ }
59373
+ });
59374
+ }
59330
59375
  }
59331
59376
  }
59332
59377
  return triggers;
@@ -59591,12 +59636,18 @@ async function promptForTriggers(repositories) {
59591
59636
  message: "Exclude GitLab users (comma-separated, optional):"
59592
59637
  });
59593
59638
  const excludedActors = parseActorListOption(excludedActorsResponse.excludedActors);
59639
+ const mentionedUsers = eventResponse.event === MR_COMMENT_EVENT ? parseActorListOption((await ask({
59640
+ type: "text",
59641
+ name: "mentionedUsers",
59642
+ message: "Only fire when these GitLab users are mentioned (comma-separated, optional):"
59643
+ })).mentionedUsers) : void 0;
59594
59644
  triggers.push({
59595
59645
  type: "gitlab",
59596
59646
  config: {
59597
59647
  event: eventResponse.event,
59598
59648
  ...triggerRepoIds ? { repository_ids: triggerRepoIds } : {},
59599
- ...excludedActors ? { excluded_actors: excludedActors } : {}
59649
+ ...excludedActors ? { excluded_actors: excludedActors } : {},
59650
+ ...mentionedUsers ? { mentioned_users: mentionedUsers } : {}
59600
59651
  }
59601
59652
  });
59602
59653
  }
@@ -59627,6 +59678,7 @@ async function automationCreateCommand(name, options) {
59627
59678
  if (options.triggerGithubExcludeUsers !== void 0 && options.triggerGithub.length === 0) throw new Error("--trigger-github-exclude-users requires --trigger-github");
59628
59679
  validateGithubReviewersOption(options);
59629
59680
  if (options.triggerGitlabExcludeUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab");
59681
+ validateGitlabMentionedUsersOption(options);
59630
59682
  const agentSelection = applyAgentSelection(
59631
59683
  {
59632
59684
  agent_provider: parseAgentProviderOption(options.agentProvider),
@@ -59770,6 +59822,7 @@ async function automationEditCommand(id, options) {
59770
59822
  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");
59771
59823
  validateGithubReviewersOption(options);
59772
59824
  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");
59825
+ validateGitlabMentionedUsersOption(options);
59773
59826
  const parsedAgent = {
59774
59827
  agent_provider: parseAgentProviderOption(options.agentProvider),
59775
59828
  model: parseModelOption(options.model),
@@ -62773,8 +62826,8 @@ var init_src2 = __esm({
62773
62826
  automation = program.command("automation").alias("auto").description("Manage automations");
62774
62827
  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));
62775
62828
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
62776
- 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, large, ultra, auto (default)").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("--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 for every run), current (this workspace), or a workspace ID").option("--background", "Mark this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list").option("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email (organization automations only)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
62777
- 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, auto").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("--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("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email, or org to use the organization's").option("--move-to-org", "Move a personal automation to the organization so teammates can see and edit it (cannot be undone)").action(run(automationEditCommand));
62829
+ 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, large, ultra, auto (default)").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("--trigger-gitlab-mentioned-users <users>", "Comma-separated GitLab usernames that must be mentioned in a comment (with merge_request.commented)").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("--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 for every run), current (this workspace), or a workspace ID").option("--background", "Mark this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list").option("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email (organization automations only)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
62830
+ 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, auto").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("--trigger-gitlab-mentioned-users <users>", "Comma-separated GitLab usernames that must be mentioned in a comment (with merge_request.commented)").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("--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("--credentials <who>", "Run on your coding agent credentials before the organization's: me or your email, or org to use the organization's").option("--move-to-org", "Move a personal automation to the organization so teammates can see and edit it (cannot be undone)").action(run(automationEditCommand));
62778
62831
  automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
62779
62832
  automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
62780
62833
  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.671",
3
+ "version": "0.3.672",
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": {