replicas-cli 0.3.670 → 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.
- package/dist/index.cjs +114 -60
- 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.
|
|
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({
|
|
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(),
|
|
@@ -24966,7 +25024,8 @@ var init_chat_fork = __esm({
|
|
|
24966
25024
|
provider: external_exports.enum(VALID_AGENT_PROVIDERS),
|
|
24967
25025
|
reason: fallbackReasonSchema,
|
|
24968
25026
|
detail: external_exports.string().optional(),
|
|
24969
|
-
forkTo: fallbackHarnessStepSchema.optional()
|
|
25027
|
+
forkTo: fallbackHarnessStepSchema.optional(),
|
|
25028
|
+
resumesAt: external_exports.string().optional()
|
|
24970
25029
|
});
|
|
24971
25030
|
}
|
|
24972
25031
|
});
|
|
@@ -26591,7 +26650,7 @@ Media delivery is owned by \`references/MEDIA.md\`. Read it before adding screen
|
|
|
26591
26650
|
|
|
26592
26651
|
// ../shared/src/default-skills/replicas-agent/abilities/gitlab.ts
|
|
26593
26652
|
var SECTION6, REFERENCE5, GITLAB_ABILITY;
|
|
26594
|
-
var
|
|
26653
|
+
var init_gitlab2 = __esm({
|
|
26595
26654
|
"../shared/src/default-skills/replicas-agent/abilities/gitlab.ts"() {
|
|
26596
26655
|
"use strict";
|
|
26597
26656
|
SECTION6 = `### GitLab
|
|
@@ -29194,7 +29253,7 @@ var init_registry = __esm({
|
|
|
29194
29253
|
init_docker();
|
|
29195
29254
|
init_environment_setup();
|
|
29196
29255
|
init_github2();
|
|
29197
|
-
|
|
29256
|
+
init_gitlab2();
|
|
29198
29257
|
init_gpu();
|
|
29199
29258
|
init_issues2();
|
|
29200
29259
|
init_linear3();
|
|
@@ -43455,7 +43514,7 @@ var CLI_VERSION;
|
|
|
43455
43514
|
var init_cli_version = __esm({
|
|
43456
43515
|
"../shared/src/cli-version.ts"() {
|
|
43457
43516
|
"use strict";
|
|
43458
|
-
CLI_VERSION = "0.3.
|
|
43517
|
+
CLI_VERSION = "0.3.672";
|
|
43459
43518
|
}
|
|
43460
43519
|
});
|
|
43461
43520
|
|
|
@@ -43768,7 +43827,7 @@ var init_code_host_issues = __esm({
|
|
|
43768
43827
|
});
|
|
43769
43828
|
|
|
43770
43829
|
// ../shared/src/routes/gitlab.ts
|
|
43771
|
-
var
|
|
43830
|
+
var init_gitlab3 = __esm({
|
|
43772
43831
|
"../shared/src/routes/gitlab.ts"() {
|
|
43773
43832
|
"use strict";
|
|
43774
43833
|
}
|
|
@@ -54026,41 +54085,6 @@ var init_cron = __esm({
|
|
|
54026
54085
|
}
|
|
54027
54086
|
});
|
|
54028
54087
|
|
|
54029
|
-
// ../shared/src/automations/gitlab/index.ts
|
|
54030
|
-
var REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM, GITLAB_TRIGGER;
|
|
54031
|
-
var init_gitlab3 = __esm({
|
|
54032
|
-
"../shared/src/automations/gitlab/index.ts"() {
|
|
54033
|
-
"use strict";
|
|
54034
|
-
REPO_FILTER_PARAM2 = {
|
|
54035
|
-
id: "repository_ids",
|
|
54036
|
-
label: "Filter by project",
|
|
54037
|
-
type: "repository_ids"
|
|
54038
|
-
};
|
|
54039
|
-
EXCLUDED_ACTORS_PARAM2 = {
|
|
54040
|
-
id: "excluded_actors",
|
|
54041
|
-
label: "Exclude users",
|
|
54042
|
-
type: "excluded_actors"
|
|
54043
|
-
};
|
|
54044
|
-
GROUP_MR_EVENTS_PARAM = {
|
|
54045
|
-
id: "group_pr_events",
|
|
54046
|
-
label: "Group MR events to same workspace",
|
|
54047
|
-
type: "boolean"
|
|
54048
|
-
};
|
|
54049
|
-
GITLAB_TRIGGER = {
|
|
54050
|
-
type: "gitlab",
|
|
54051
|
-
label: "GitLab",
|
|
54052
|
-
description: "Trigger on project events",
|
|
54053
|
-
icon: "gitlab",
|
|
54054
|
-
events: [
|
|
54055
|
-
{ id: "merge_request.opened", label: "MR opened", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
|
|
54056
|
-
{ id: "merge_request.updated", label: "MR updated (new commits)", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
|
|
54057
|
-
{ id: "merge_request.merged", label: "MR merged", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] },
|
|
54058
|
-
{ id: "merge_request.closed", label: "MR closed", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] }
|
|
54059
|
-
]
|
|
54060
|
-
};
|
|
54061
|
-
}
|
|
54062
|
-
});
|
|
54063
|
-
|
|
54064
54088
|
// ../shared/src/automations/slack/index.ts
|
|
54065
54089
|
var init_slack3 = __esm({
|
|
54066
54090
|
"../shared/src/automations/slack/index.ts"() {
|
|
@@ -54088,7 +54112,7 @@ var init_registry2 = __esm({
|
|
|
54088
54112
|
"use strict";
|
|
54089
54113
|
init_cron();
|
|
54090
54114
|
init_github();
|
|
54091
|
-
|
|
54115
|
+
init_gitlab();
|
|
54092
54116
|
init_slack3();
|
|
54093
54117
|
init_sentry3();
|
|
54094
54118
|
init_linear2();
|
|
@@ -54128,7 +54152,7 @@ var init_automations = __esm({
|
|
|
54128
54152
|
init_agent_validation();
|
|
54129
54153
|
init_registry2();
|
|
54130
54154
|
init_github();
|
|
54131
|
-
|
|
54155
|
+
init_gitlab();
|
|
54132
54156
|
init_cron();
|
|
54133
54157
|
init_slack3();
|
|
54134
54158
|
init_sentry3();
|
|
@@ -54781,7 +54805,7 @@ var init_src = __esm({
|
|
|
54781
54805
|
init_pi();
|
|
54782
54806
|
init_github3();
|
|
54783
54807
|
init_code_host_issues();
|
|
54784
|
-
|
|
54808
|
+
init_gitlab3();
|
|
54785
54809
|
init_integrations();
|
|
54786
54810
|
init_external_accounts();
|
|
54787
54811
|
init_linear();
|
|
@@ -59189,6 +59213,14 @@ function validateGithubReviewersOption(options) {
|
|
|
59189
59213
|
);
|
|
59190
59214
|
if (error62) throw new Error(`${error62} (--trigger-github-reviewers)`);
|
|
59191
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
|
+
}
|
|
59192
59224
|
function parseDuration(value) {
|
|
59193
59225
|
const parts = [...value.trim().toLowerCase().matchAll(/(\d+)\s*([mhdw])/g)];
|
|
59194
59226
|
if (parts.length === 0 || parts.map((p) => p[0]).join("") !== value.trim().toLowerCase().replace(/\s+/g, "")) return null;
|
|
@@ -59281,6 +59313,7 @@ function formatTrigger(trigger) {
|
|
|
59281
59313
|
const config3 = trigger.config;
|
|
59282
59314
|
const details = [
|
|
59283
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,
|
|
59284
59317
|
config3.excluded_actors?.length ? `exclude: ${config3.excluded_actors.join(", ")}` : null
|
|
59285
59318
|
].filter(Boolean);
|
|
59286
59319
|
return `gitlab: ${config3.event}${details.length > 0 ? ` (${details.join(", ")})` : ""}`;
|
|
@@ -59316,16 +59349,29 @@ function buildTriggersFromOptions(options, runAt, repositories) {
|
|
|
59316
59349
|
const repositoryIds = resolveTriggerRepositoryIds(repositories, repoNames, type);
|
|
59317
59350
|
const excludedActors = parseActorListOption(excludeUsers);
|
|
59318
59351
|
for (const event of events) {
|
|
59319
|
-
|
|
59320
|
-
|
|
59321
|
-
|
|
59322
|
-
|
|
59323
|
-
|
|
59324
|
-
|
|
59325
|
-
|
|
59326
|
-
|
|
59327
|
-
|
|
59328
|
-
|
|
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
|
+
}
|
|
59329
59375
|
}
|
|
59330
59376
|
}
|
|
59331
59377
|
return triggers;
|
|
@@ -59590,12 +59636,18 @@ async function promptForTriggers(repositories) {
|
|
|
59590
59636
|
message: "Exclude GitLab users (comma-separated, optional):"
|
|
59591
59637
|
});
|
|
59592
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;
|
|
59593
59644
|
triggers.push({
|
|
59594
59645
|
type: "gitlab",
|
|
59595
59646
|
config: {
|
|
59596
59647
|
event: eventResponse.event,
|
|
59597
59648
|
...triggerRepoIds ? { repository_ids: triggerRepoIds } : {},
|
|
59598
|
-
...excludedActors ? { excluded_actors: excludedActors } : {}
|
|
59649
|
+
...excludedActors ? { excluded_actors: excludedActors } : {},
|
|
59650
|
+
...mentionedUsers ? { mentioned_users: mentionedUsers } : {}
|
|
59599
59651
|
}
|
|
59600
59652
|
});
|
|
59601
59653
|
}
|
|
@@ -59626,6 +59678,7 @@ async function automationCreateCommand(name, options) {
|
|
|
59626
59678
|
if (options.triggerGithubExcludeUsers !== void 0 && options.triggerGithub.length === 0) throw new Error("--trigger-github-exclude-users requires --trigger-github");
|
|
59627
59679
|
validateGithubReviewersOption(options);
|
|
59628
59680
|
if (options.triggerGitlabExcludeUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab");
|
|
59681
|
+
validateGitlabMentionedUsersOption(options);
|
|
59629
59682
|
const agentSelection = applyAgentSelection(
|
|
59630
59683
|
{
|
|
59631
59684
|
agent_provider: parseAgentProviderOption(options.agentProvider),
|
|
@@ -59769,6 +59822,7 @@ async function automationEditCommand(id, options) {
|
|
|
59769
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");
|
|
59770
59823
|
validateGithubReviewersOption(options);
|
|
59771
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);
|
|
59772
59826
|
const parsedAgent = {
|
|
59773
59827
|
agent_provider: parseAgentProviderOption(options.agentProvider),
|
|
59774
59828
|
model: parseModelOption(options.model),
|
|
@@ -62772,8 +62826,8 @@ var init_src2 = __esm({
|
|
|
62772
62826
|
automation = program.command("automation").alias("auto").description("Manage automations");
|
|
62773
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));
|
|
62774
62828
|
automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
|
|
62775
|
-
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 })));
|
|
62776
|
-
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));
|
|
62777
62831
|
automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
|
|
62778
62832
|
automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
|
|
62779
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));
|