replicas-cli 0.3.671 → 0.3.673
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 +121 -60
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20983,7 +20983,7 @@ function isReplicasModel(model2) {
|
|
|
20983
20983
|
function replicasChatModel(model2) {
|
|
20984
20984
|
return model2 && RETIRED_REPLICAS_MODELS[model2] || model2;
|
|
20985
20985
|
}
|
|
20986
|
-
var GPT_6_2_SOL_MODEL, GPT_6_1_SOL_MODEL, GPT_6_1_TERRA_MODEL, GPT_6_2_ASTRA_MODEL, CLAUDE_OPUS_5_5_MODEL, CLAUDE_FABLE_5_2_MODEL, DEEPSEEK_V4_1_FLASH_MODEL, OPEN_DEEPSEEK_V4_1_FLASH_MODEL, OPEN_DEEPSEEK_V4_PRO_MODEL, OPEN_GLM_5_3_MODEL, OPEN_GLM_5_3_FLASH_MODEL, GEMINI_4_NEON_MODEL, REPLICAS_MODEL_PROVIDERS, SERVICE_TIERS, DEEPSEEK_V4_1_FLASH_HOSTS, REPLICAS_MODEL_CATALOG, CATALOG_IDS, OPEN_MODEL_CATALOG, catalogModels, REPLICAS_MODELS, RETIRED_REPLICAS_MODELS;
|
|
20986
|
+
var GPT_6_2_SOL_MODEL, GPT_6_1_SOL_MODEL, GPT_6_1_TERRA_MODEL, GPT_6_2_ASTRA_MODEL, CLAUDE_OPUS_5_5_MODEL, CLAUDE_FABLE_5_2_MODEL, DEEPSEEK_V4_1_FLASH_MODEL, OPEN_DEEPSEEK_V4_1_FLASH_MODEL, OPEN_DEEPSEEK_V4_PRO_MODEL, OPEN_GLM_5_3_MODEL, OPEN_GLM_5_3_FLASH_MODEL, GEMINI_4_NEON_MODEL, FUSION_MODEL, REPLICAS_MODEL_PROVIDERS, SERVICE_TIERS, DEEPSEEK_V4_1_FLASH_HOSTS, REPLICAS_MODEL_CATALOG, CATALOG_IDS, OPEN_MODEL_CATALOG, catalogModels, REPLICAS_MODELS, RETIRED_REPLICAS_MODELS;
|
|
20987
20987
|
var init_models2 = __esm({
|
|
20988
20988
|
"../shared/src/harness/models.ts"() {
|
|
20989
20989
|
"use strict";
|
|
@@ -21000,6 +21000,7 @@ var init_models2 = __esm({
|
|
|
21000
21000
|
OPEN_GLM_5_3_MODEL = "glm-5.3";
|
|
21001
21001
|
OPEN_GLM_5_3_FLASH_MODEL = "glm-5.3-flash";
|
|
21002
21002
|
GEMINI_4_NEON_MODEL = "gemini-4-neon";
|
|
21003
|
+
FUSION_MODEL = "fusion";
|
|
21003
21004
|
REPLICAS_MODEL_PROVIDERS = ["openai", "anthropic", "baseten", "openrouter", "google-vertex", "open"];
|
|
21004
21005
|
SERVICE_TIERS = ["default", "fast", "ultrafast"];
|
|
21005
21006
|
DEEPSEEK_V4_1_FLASH_HOSTS = {
|
|
@@ -21060,6 +21061,13 @@ var init_models2 = __esm({
|
|
|
21060
21061
|
cost: { input: 3, output: 15, cacheRead: 0.15, cacheWrite: 0 },
|
|
21061
21062
|
priceVersion: "2026-11-24",
|
|
21062
21063
|
speeds: { fast: 1.8 }
|
|
21064
|
+
},
|
|
21065
|
+
// Each call is recorded and priced as the model that made it, so this only names the lead's provider and prices.
|
|
21066
|
+
[FUSION_MODEL]: {
|
|
21067
|
+
label: "Fusion",
|
|
21068
|
+
provider: "google-vertex",
|
|
21069
|
+
cost: { input: 3, output: 15, cacheRead: 0.15, cacheWrite: 0 },
|
|
21070
|
+
priceVersion: "2026-11-27"
|
|
21063
21071
|
}
|
|
21064
21072
|
};
|
|
21065
21073
|
CATALOG_IDS = Object.keys(REPLICAS_MODEL_CATALOG).filter(isReplicasModel);
|
|
@@ -21247,6 +21255,48 @@ var init_github = __esm({
|
|
|
21247
21255
|
}
|
|
21248
21256
|
});
|
|
21249
21257
|
|
|
21258
|
+
// ../shared/src/automations/gitlab/index.ts
|
|
21259
|
+
var REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, MENTIONED_USERS_PARAM, GROUP_MR_EVENTS_PARAM, MR_COMMENT_EVENT, GITLAB_TRIGGER;
|
|
21260
|
+
var init_gitlab = __esm({
|
|
21261
|
+
"../shared/src/automations/gitlab/index.ts"() {
|
|
21262
|
+
"use strict";
|
|
21263
|
+
REPO_FILTER_PARAM2 = {
|
|
21264
|
+
id: "repository_ids",
|
|
21265
|
+
label: "Filter by project",
|
|
21266
|
+
type: "repository_ids"
|
|
21267
|
+
};
|
|
21268
|
+
EXCLUDED_ACTORS_PARAM2 = {
|
|
21269
|
+
id: "excluded_actors",
|
|
21270
|
+
label: "Exclude users",
|
|
21271
|
+
type: "excluded_actors"
|
|
21272
|
+
};
|
|
21273
|
+
MENTIONED_USERS_PARAM = {
|
|
21274
|
+
id: "mentioned_users",
|
|
21275
|
+
label: "Mentioned users",
|
|
21276
|
+
type: "mentioned_users"
|
|
21277
|
+
};
|
|
21278
|
+
GROUP_MR_EVENTS_PARAM = {
|
|
21279
|
+
id: "group_pr_events",
|
|
21280
|
+
label: "Group MR events to same workspace",
|
|
21281
|
+
type: "boolean"
|
|
21282
|
+
};
|
|
21283
|
+
MR_COMMENT_EVENT = "merge_request.commented";
|
|
21284
|
+
GITLAB_TRIGGER = {
|
|
21285
|
+
type: "gitlab",
|
|
21286
|
+
label: "GitLab",
|
|
21287
|
+
description: "Trigger on project events",
|
|
21288
|
+
icon: "gitlab",
|
|
21289
|
+
events: [
|
|
21290
|
+
{ id: "merge_request.opened", label: "MR opened", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
|
|
21291
|
+
{ id: "merge_request.updated", label: "MR updated (new commits)", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
|
|
21292
|
+
{ id: MR_COMMENT_EVENT, label: "MR comment", parameters: [MENTIONED_USERS_PARAM, REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2, GROUP_MR_EVENTS_PARAM] },
|
|
21293
|
+
{ id: "merge_request.merged", label: "MR merged", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] },
|
|
21294
|
+
{ id: "merge_request.closed", label: "MR closed", parameters: [REPO_FILTER_PARAM2, EXCLUDED_ACTORS_PARAM2] }
|
|
21295
|
+
]
|
|
21296
|
+
};
|
|
21297
|
+
}
|
|
21298
|
+
});
|
|
21299
|
+
|
|
21250
21300
|
// ../shared/src/routes/linear.ts
|
|
21251
21301
|
var linearSessionMetadataSchema, LINEAR_WORKFLOW_STATE_TYPES;
|
|
21252
21302
|
var init_linear = __esm({
|
|
@@ -21318,6 +21368,12 @@ function getReviewerLoginsError(event, logins) {
|
|
|
21318
21368
|
if (isReviewRequested === !!logins?.some((login) => login.trim().replace(/^@+/, ""))) return null;
|
|
21319
21369
|
return isReviewRequested ? "The PR review requested trigger needs at least one GitHub username" : "Requested reviewers only apply to the PR review requested trigger";
|
|
21320
21370
|
}
|
|
21371
|
+
function getMentionedUsersError(event, users) {
|
|
21372
|
+
if (event !== MR_COMMENT_EVENT && users?.some((user) => user.trim().replace(/^@+/, ""))) {
|
|
21373
|
+
return "Mentioned users only apply to the MR comment trigger";
|
|
21374
|
+
}
|
|
21375
|
+
return null;
|
|
21376
|
+
}
|
|
21321
21377
|
var repositoryTriggerConfigSchema, cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema, linearTriggerConfigSchema, automationTriggerSchema;
|
|
21322
21378
|
var init_trigger_schemas = __esm({
|
|
21323
21379
|
"../shared/src/automations/trigger-schemas.ts"() {
|
|
@@ -21325,23 +21381,33 @@ var init_trigger_schemas = __esm({
|
|
|
21325
21381
|
init_zod();
|
|
21326
21382
|
init_uuid();
|
|
21327
21383
|
init_github();
|
|
21384
|
+
init_gitlab();
|
|
21328
21385
|
init_linear2();
|
|
21329
21386
|
repositoryTriggerConfigSchema = external_exports.object({
|
|
21330
21387
|
event: external_exports.string(),
|
|
21331
21388
|
repository_ids: external_exports.array(external_exports.string().regex(UUID_RE, "must be a repository id")).optional(),
|
|
21332
21389
|
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()
|
|
21390
|
+
excluded_actors: external_exports.array(external_exports.string()).optional()
|
|
21335
21391
|
});
|
|
21336
21392
|
cronTriggerSchema = external_exports.object({ type: external_exports.literal("cron"), config: external_exports.object({ schedule: external_exports.string(), timezone: external_exports.string().optional() }) });
|
|
21337
21393
|
githubTriggerSchema = external_exports.object({
|
|
21338
21394
|
type: external_exports.literal("github"),
|
|
21339
|
-
config: repositoryTriggerConfigSchema.
|
|
21395
|
+
config: repositoryTriggerConfigSchema.extend({
|
|
21396
|
+
reviewer_logins: external_exports.array(external_exports.string()).optional()
|
|
21397
|
+
}).superRefine((config3, ctx) => {
|
|
21340
21398
|
const message2 = getReviewerLoginsError(config3.event, config3.reviewer_logins);
|
|
21341
21399
|
if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["reviewer_logins"] });
|
|
21342
21400
|
})
|
|
21343
21401
|
});
|
|
21344
|
-
gitlabTriggerSchema = external_exports.object({
|
|
21402
|
+
gitlabTriggerSchema = external_exports.object({
|
|
21403
|
+
type: external_exports.literal("gitlab"),
|
|
21404
|
+
config: repositoryTriggerConfigSchema.extend({
|
|
21405
|
+
mentioned_users: external_exports.array(external_exports.string()).optional()
|
|
21406
|
+
}).superRefine((config3, ctx) => {
|
|
21407
|
+
const message2 = getMentionedUsersError(config3.event, config3.mentioned_users);
|
|
21408
|
+
if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["mentioned_users"] });
|
|
21409
|
+
})
|
|
21410
|
+
});
|
|
21345
21411
|
linearTriggerConfigSchema = linearIssueFiltersSchema.extend({
|
|
21346
21412
|
event: external_exports.string(),
|
|
21347
21413
|
team_ids: external_exports.array(external_exports.string()).optional(),
|
|
@@ -26592,7 +26658,7 @@ Media delivery is owned by \`references/MEDIA.md\`. Read it before adding screen
|
|
|
26592
26658
|
|
|
26593
26659
|
// ../shared/src/default-skills/replicas-agent/abilities/gitlab.ts
|
|
26594
26660
|
var SECTION6, REFERENCE5, GITLAB_ABILITY;
|
|
26595
|
-
var
|
|
26661
|
+
var init_gitlab2 = __esm({
|
|
26596
26662
|
"../shared/src/default-skills/replicas-agent/abilities/gitlab.ts"() {
|
|
26597
26663
|
"use strict";
|
|
26598
26664
|
SECTION6 = `### GitLab
|
|
@@ -29195,7 +29261,7 @@ var init_registry = __esm({
|
|
|
29195
29261
|
init_docker();
|
|
29196
29262
|
init_environment_setup();
|
|
29197
29263
|
init_github2();
|
|
29198
|
-
|
|
29264
|
+
init_gitlab2();
|
|
29199
29265
|
init_gpu();
|
|
29200
29266
|
init_issues2();
|
|
29201
29267
|
init_linear3();
|
|
@@ -43456,7 +43522,7 @@ var CLI_VERSION;
|
|
|
43456
43522
|
var init_cli_version = __esm({
|
|
43457
43523
|
"../shared/src/cli-version.ts"() {
|
|
43458
43524
|
"use strict";
|
|
43459
|
-
CLI_VERSION = "0.3.
|
|
43525
|
+
CLI_VERSION = "0.3.673";
|
|
43460
43526
|
}
|
|
43461
43527
|
});
|
|
43462
43528
|
|
|
@@ -43769,7 +43835,7 @@ var init_code_host_issues = __esm({
|
|
|
43769
43835
|
});
|
|
43770
43836
|
|
|
43771
43837
|
// ../shared/src/routes/gitlab.ts
|
|
43772
|
-
var
|
|
43838
|
+
var init_gitlab3 = __esm({
|
|
43773
43839
|
"../shared/src/routes/gitlab.ts"() {
|
|
43774
43840
|
"use strict";
|
|
43775
43841
|
}
|
|
@@ -54027,41 +54093,6 @@ var init_cron = __esm({
|
|
|
54027
54093
|
}
|
|
54028
54094
|
});
|
|
54029
54095
|
|
|
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
54096
|
// ../shared/src/automations/slack/index.ts
|
|
54066
54097
|
var init_slack3 = __esm({
|
|
54067
54098
|
"../shared/src/automations/slack/index.ts"() {
|
|
@@ -54089,7 +54120,7 @@ var init_registry2 = __esm({
|
|
|
54089
54120
|
"use strict";
|
|
54090
54121
|
init_cron();
|
|
54091
54122
|
init_github();
|
|
54092
|
-
|
|
54123
|
+
init_gitlab();
|
|
54093
54124
|
init_slack3();
|
|
54094
54125
|
init_sentry3();
|
|
54095
54126
|
init_linear2();
|
|
@@ -54129,7 +54160,7 @@ var init_automations = __esm({
|
|
|
54129
54160
|
init_agent_validation();
|
|
54130
54161
|
init_registry2();
|
|
54131
54162
|
init_github();
|
|
54132
|
-
|
|
54163
|
+
init_gitlab();
|
|
54133
54164
|
init_cron();
|
|
54134
54165
|
init_slack3();
|
|
54135
54166
|
init_sentry3();
|
|
@@ -54782,7 +54813,7 @@ var init_src = __esm({
|
|
|
54782
54813
|
init_pi();
|
|
54783
54814
|
init_github3();
|
|
54784
54815
|
init_code_host_issues();
|
|
54785
|
-
|
|
54816
|
+
init_gitlab3();
|
|
54786
54817
|
init_integrations();
|
|
54787
54818
|
init_external_accounts();
|
|
54788
54819
|
init_linear();
|
|
@@ -59190,6 +59221,14 @@ function validateGithubReviewersOption(options) {
|
|
|
59190
59221
|
);
|
|
59191
59222
|
if (error62) throw new Error(`${error62} (--trigger-github-reviewers)`);
|
|
59192
59223
|
}
|
|
59224
|
+
function validateGitlabMentionedUsersOption(options) {
|
|
59225
|
+
if (options.triggerGitlabMentionedUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-mentioned-users requires --trigger-gitlab");
|
|
59226
|
+
const error62 = options.triggerGitlab.length > 0 && getMentionedUsersError(
|
|
59227
|
+
options.triggerGitlab.includes(MR_COMMENT_EVENT) ? MR_COMMENT_EVENT : options.triggerGitlab[0],
|
|
59228
|
+
parseActorListOption(options.triggerGitlabMentionedUsers)
|
|
59229
|
+
);
|
|
59230
|
+
if (error62) throw new Error(`${error62} (--trigger-gitlab-mentioned-users)`);
|
|
59231
|
+
}
|
|
59193
59232
|
function parseDuration(value) {
|
|
59194
59233
|
const parts = [...value.trim().toLowerCase().matchAll(/(\d+)\s*([mhdw])/g)];
|
|
59195
59234
|
if (parts.length === 0 || parts.map((p) => p[0]).join("") !== value.trim().toLowerCase().replace(/\s+/g, "")) return null;
|
|
@@ -59282,6 +59321,7 @@ function formatTrigger(trigger) {
|
|
|
59282
59321
|
const config3 = trigger.config;
|
|
59283
59322
|
const details = [
|
|
59284
59323
|
config3.repository_ids?.length ? `${config3.repository_ids.length} project${config3.repository_ids.length > 1 ? "s" : ""} filtered` : null,
|
|
59324
|
+
config3.mentioned_users?.length ? `mentions: ${config3.mentioned_users.join(", ")}` : null,
|
|
59285
59325
|
config3.excluded_actors?.length ? `exclude: ${config3.excluded_actors.join(", ")}` : null
|
|
59286
59326
|
].filter(Boolean);
|
|
59287
59327
|
return `gitlab: ${config3.event}${details.length > 0 ? ` (${details.join(", ")})` : ""}`;
|
|
@@ -59317,16 +59357,29 @@ function buildTriggersFromOptions(options, runAt, repositories) {
|
|
|
59317
59357
|
const repositoryIds = resolveTriggerRepositoryIds(repositories, repoNames, type);
|
|
59318
59358
|
const excludedActors = parseActorListOption(excludeUsers);
|
|
59319
59359
|
for (const event of events) {
|
|
59320
|
-
|
|
59321
|
-
|
|
59322
|
-
|
|
59323
|
-
|
|
59324
|
-
|
|
59325
|
-
|
|
59326
|
-
|
|
59327
|
-
|
|
59328
|
-
|
|
59329
|
-
|
|
59360
|
+
if (type === "github") {
|
|
59361
|
+
const reviewerLogins = event === REVIEW_REQUESTED_EVENT ? parseActorListOption(options.triggerGithubReviewers) : void 0;
|
|
59362
|
+
triggers.push({
|
|
59363
|
+
type,
|
|
59364
|
+
config: {
|
|
59365
|
+
event,
|
|
59366
|
+
...repositoryIds ? { repository_ids: repositoryIds } : {},
|
|
59367
|
+
...excludedActors ? { excluded_actors: excludedActors } : {},
|
|
59368
|
+
...reviewerLogins ? { reviewer_logins: reviewerLogins } : {}
|
|
59369
|
+
}
|
|
59370
|
+
});
|
|
59371
|
+
} else {
|
|
59372
|
+
const mentionedUsers = event === MR_COMMENT_EVENT ? parseActorListOption(options.triggerGitlabMentionedUsers) : void 0;
|
|
59373
|
+
triggers.push({
|
|
59374
|
+
type,
|
|
59375
|
+
config: {
|
|
59376
|
+
event,
|
|
59377
|
+
...repositoryIds ? { repository_ids: repositoryIds } : {},
|
|
59378
|
+
...excludedActors ? { excluded_actors: excludedActors } : {},
|
|
59379
|
+
...mentionedUsers ? { mentioned_users: mentionedUsers } : {}
|
|
59380
|
+
}
|
|
59381
|
+
});
|
|
59382
|
+
}
|
|
59330
59383
|
}
|
|
59331
59384
|
}
|
|
59332
59385
|
return triggers;
|
|
@@ -59591,12 +59644,18 @@ async function promptForTriggers(repositories) {
|
|
|
59591
59644
|
message: "Exclude GitLab users (comma-separated, optional):"
|
|
59592
59645
|
});
|
|
59593
59646
|
const excludedActors = parseActorListOption(excludedActorsResponse.excludedActors);
|
|
59647
|
+
const mentionedUsers = eventResponse.event === MR_COMMENT_EVENT ? parseActorListOption((await ask({
|
|
59648
|
+
type: "text",
|
|
59649
|
+
name: "mentionedUsers",
|
|
59650
|
+
message: "Only fire when these GitLab users are mentioned (comma-separated, optional):"
|
|
59651
|
+
})).mentionedUsers) : void 0;
|
|
59594
59652
|
triggers.push({
|
|
59595
59653
|
type: "gitlab",
|
|
59596
59654
|
config: {
|
|
59597
59655
|
event: eventResponse.event,
|
|
59598
59656
|
...triggerRepoIds ? { repository_ids: triggerRepoIds } : {},
|
|
59599
|
-
...excludedActors ? { excluded_actors: excludedActors } : {}
|
|
59657
|
+
...excludedActors ? { excluded_actors: excludedActors } : {},
|
|
59658
|
+
...mentionedUsers ? { mentioned_users: mentionedUsers } : {}
|
|
59600
59659
|
}
|
|
59601
59660
|
});
|
|
59602
59661
|
}
|
|
@@ -59627,6 +59686,7 @@ async function automationCreateCommand(name, options) {
|
|
|
59627
59686
|
if (options.triggerGithubExcludeUsers !== void 0 && options.triggerGithub.length === 0) throw new Error("--trigger-github-exclude-users requires --trigger-github");
|
|
59628
59687
|
validateGithubReviewersOption(options);
|
|
59629
59688
|
if (options.triggerGitlabExcludeUsers !== void 0 && options.triggerGitlab.length === 0) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab");
|
|
59689
|
+
validateGitlabMentionedUsersOption(options);
|
|
59630
59690
|
const agentSelection = applyAgentSelection(
|
|
59631
59691
|
{
|
|
59632
59692
|
agent_provider: parseAgentProviderOption(options.agentProvider),
|
|
@@ -59770,6 +59830,7 @@ async function automationEditCommand(id, options) {
|
|
|
59770
59830
|
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
59831
|
validateGithubReviewersOption(options);
|
|
59772
59832
|
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");
|
|
59833
|
+
validateGitlabMentionedUsersOption(options);
|
|
59773
59834
|
const parsedAgent = {
|
|
59774
59835
|
agent_provider: parseAgentProviderOption(options.agentProvider),
|
|
59775
59836
|
model: parseModelOption(options.model),
|
|
@@ -62773,8 +62834,8 @@ var init_src2 = __esm({
|
|
|
62773
62834
|
automation = program.command("automation").alias("auto").description("Manage automations");
|
|
62774
62835
|
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
62836
|
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));
|
|
62837
|
+
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 })));
|
|
62838
|
+
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
62839
|
automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
|
|
62779
62840
|
automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
|
|
62780
62841
|
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));
|