replicas-cli 0.3.115 → 0.3.117
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 +16 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26062,6 +26062,7 @@ replicas automation create "Re-check PR #142 CI" \\
|
|
|
26062
26062
|
- \`--background\` keeps follow-ups out of the user's main automations list (they are still visible under **Background**). Use it for every one-time follow-up that reports back into this conversation, even one that leads to a big decision. Omit it only for recurring automations the user wants to see and manage, such as ongoing monitoring.
|
|
26063
26063
|
- \`--personal\` makes the automation the user's own. Omit it only when the follow-up belongs to the organization.
|
|
26064
26064
|
- Recurring with an end: \`--trigger-cron "0 9 * * *" --max-runs 5 --workspace current\` runs daily five times, then deletes itself. \`--workspace reuse\` creates one new workspace on the first run and sends every later run to it; \`--workspace new\` (the default for non-one-time automations) creates a fresh workspace per run.
|
|
26065
|
+
- Repeat \`--trigger-cron\` for different times on different days: \`--trigger-cron "0 9 * * 1" --trigger-cron "0 17 * * 5"\` runs Monday at 9 and Friday at 5.
|
|
26065
26066
|
- Only schedule when the user asked for a follow-up or clearly agreed to one; not for "maybe I'll look at this later".
|
|
26066
26067
|
- Confirm using the **Next Run** time the CLI prints, not your own arithmetic. Cancel with \`replicas automation delete <id> --force\`; find them with \`replicas automation list --background true\`.
|
|
26067
26068
|
|
|
@@ -28724,7 +28725,7 @@ var headlessAgentRequestSchema = external_exports.object({
|
|
|
28724
28725
|
});
|
|
28725
28726
|
|
|
28726
28727
|
// ../shared/src/cli-version.ts
|
|
28727
|
-
var CLI_VERSION = "0.3.
|
|
28728
|
+
var CLI_VERSION = "0.3.117";
|
|
28728
28729
|
|
|
28729
28730
|
// ../shared/src/version.ts
|
|
28730
28731
|
function compareVersions(v1, v2) {
|
|
@@ -29238,6 +29239,9 @@ var WORKSPACE_LIST_SECTION_LABELS = {
|
|
|
29238
29239
|
...WORKSPACE_STAGE_LABELS
|
|
29239
29240
|
};
|
|
29240
29241
|
|
|
29242
|
+
// ../shared/src/workspace-attention.ts
|
|
29243
|
+
var WORKSPACE_ATTENTION_REASONS = ["question", "blocked"];
|
|
29244
|
+
|
|
29241
29245
|
// ../shared/src/routes/workspace-events.ts
|
|
29242
29246
|
var workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
|
|
29243
29247
|
external_exports.object({
|
|
@@ -29247,7 +29251,8 @@ var workspaceChangedEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
29247
29251
|
completion: external_exports.object({
|
|
29248
29252
|
workspaceName: external_exports.string(),
|
|
29249
29253
|
completedAt: external_exports.string(),
|
|
29250
|
-
processing: external_exports.boolean().optional()
|
|
29254
|
+
processing: external_exports.boolean().optional(),
|
|
29255
|
+
attention: external_exports.object({ reason: external_exports.enum(WORKSPACE_ATTENTION_REASONS), userId: external_exports.string() }).optional()
|
|
29251
29256
|
}).optional(),
|
|
29252
29257
|
ts: external_exports.string()
|
|
29253
29258
|
}),
|
|
@@ -33135,8 +33140,8 @@ function resolveTriggerRepositoryIds(repositories, repoNamesInput, provider2) {
|
|
|
33135
33140
|
function buildTriggersFromOptions(options, runAt, repositories) {
|
|
33136
33141
|
const triggers = [];
|
|
33137
33142
|
if (runAt) triggers.push({ type: "cron", config: { run_at: runAt, timezone: localTimezone() } });
|
|
33138
|
-
|
|
33139
|
-
triggers.push({ type: "cron", config: { schedule
|
|
33143
|
+
for (const schedule of options.triggerCron) {
|
|
33144
|
+
triggers.push({ type: "cron", config: { schedule, timezone: options.triggerCronTimezone || "UTC" } });
|
|
33140
33145
|
}
|
|
33141
33146
|
const providerTriggers = [
|
|
33142
33147
|
["github", options.triggerGithub, options.triggerGithubRepos, options.triggerGithubExcludeUsers],
|
|
@@ -33275,12 +33280,6 @@ Automation: ${automation2.name}
|
|
|
33275
33280
|
}
|
|
33276
33281
|
console.log(import_chalk26.default.gray(` Prompt: ${automation2.prompt}`));
|
|
33277
33282
|
console.log(import_chalk26.default.gray(` Environment: ${automation2.environment_id}`));
|
|
33278
|
-
if (automation2.cron_expression) {
|
|
33279
|
-
console.log(import_chalk26.default.gray(` Cron: ${automation2.cron_expression}`));
|
|
33280
|
-
}
|
|
33281
|
-
if (automation2.cron_timezone) {
|
|
33282
|
-
console.log(import_chalk26.default.gray(` Timezone: ${automation2.cron_timezone}`));
|
|
33283
|
-
}
|
|
33284
33283
|
if (automation2.cron_next_fire_at) {
|
|
33285
33284
|
console.log(import_chalk26.default.gray(` Next Run: ${formatDate(automation2.cron_next_fire_at)}`));
|
|
33286
33285
|
}
|
|
@@ -33432,7 +33431,7 @@ async function promptForTriggers(repositories) {
|
|
|
33432
33431
|
async function automationCreateCommand(name, options) {
|
|
33433
33432
|
ensureOrgApiAuthenticated();
|
|
33434
33433
|
const runAt = resolveRunAt(options);
|
|
33435
|
-
if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33434
|
+
if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33436
33435
|
const maxRuns = parseMaxRuns(options.maxRuns);
|
|
33437
33436
|
const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
|
|
33438
33437
|
const lifecyclePolicy = parseAutomationLifecycleOptions(options);
|
|
@@ -33574,7 +33573,7 @@ Created automation: ${automation2.name}`));
|
|
|
33574
33573
|
async function automationEditCommand(id, options) {
|
|
33575
33574
|
ensureOrgApiAuthenticated();
|
|
33576
33575
|
const runAt = resolveRunAt(options);
|
|
33577
|
-
if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33576
|
+
if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33578
33577
|
const maxRuns = parseMaxRuns(options.maxRuns);
|
|
33579
33578
|
const workspaceTarget = parseWorkspaceTarget(options.workspace);
|
|
33580
33579
|
const lifecyclePolicy = parseAutomationLifecycleOptions(options);
|
|
@@ -33583,7 +33582,7 @@ async function automationEditCommand(id, options) {
|
|
|
33583
33582
|
const minutes = parseInt(options.autoStopMinutes, 10);
|
|
33584
33583
|
if (isNaN(minutes) || minutes < 3 || minutes > 1440) throw new Error("--auto-stop-minutes must be between 3 and 1440");
|
|
33585
33584
|
}
|
|
33586
|
-
const replacingTriggers = Boolean(options.triggerCron || options.triggerGithub || options.triggerGitlab);
|
|
33585
|
+
const replacingTriggers = Boolean(options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab);
|
|
33587
33586
|
if (replacingTriggers && options.triggerGithubExcludeUsers !== void 0 && !options.triggerGithub) throw new Error("--trigger-github-exclude-users requires --trigger-github when replacing triggers");
|
|
33588
33587
|
validateGithubReviewersOption(options);
|
|
33589
33588
|
if (replacingTriggers && options.triggerGitlabExcludeUsers !== void 0 && !options.triggerGitlab) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab when replacing triggers");
|
|
@@ -33600,7 +33599,7 @@ async function automationEditCommand(id, options) {
|
|
|
33600
33599
|
model: existing.automation.model
|
|
33601
33600
|
});
|
|
33602
33601
|
const body = {};
|
|
33603
|
-
const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
|
|
33602
|
+
const hasOptions = options.name || options.prompt || options.description !== void 0 || workspaceSize || options.enabled !== void 0 || options.prFollowups !== void 0 || options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab || options.environment || options.triggerGithubExcludeUsers !== void 0 || options.triggerGitlabExcludeUsers !== void 0 || options.githubChecks !== void 0 || options.addGithubChecks !== void 0 || options.lifecycle || options.sleepWhenDone || options.autoStopMinutes || options.agentProvider !== void 0 || options.model !== void 0 || options.thinkingLevel !== void 0 || options.planMode !== void 0 || options.goalMode !== void 0 || options.fastMode !== void 0 || runAt !== void 0 || maxRuns !== void 0 || workspaceTarget !== void 0 || options.background !== void 0;
|
|
33604
33603
|
if (!hasOptions) {
|
|
33605
33604
|
const nameResponse = await ask({
|
|
33606
33605
|
type: "text",
|
|
@@ -33672,7 +33671,7 @@ async function automationEditCommand(id, options) {
|
|
|
33672
33671
|
...normalizeAutomationGithubCheckNames(options.addGithubChecks.split(","))
|
|
33673
33672
|
])];
|
|
33674
33673
|
}
|
|
33675
|
-
if (runAt || options.triggerCron || options.triggerGithub || options.triggerGitlab) {
|
|
33674
|
+
if (runAt || options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab) {
|
|
33676
33675
|
const repositories = options.triggerGithubRepos || options.triggerGitlabRepos ? (await orgAuthenticatedFetch("/v1/repositories")).repositories : [];
|
|
33677
33676
|
const triggers = buildTriggersFromOptions(options, runAt, repositories);
|
|
33678
33677
|
body.triggers = triggers;
|
|
@@ -34865,8 +34864,8 @@ credentials.command("usage").description("Show how much of each connected Claude
|
|
|
34865
34864
|
var automation = program.command("automation").alias("auto").description("Manage automations");
|
|
34866
34865
|
automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").option("--trigger-type <type>", "Only automations with a trigger of this type (cron, github, gitlab, slack, sentry, custom)").option("--enabled <enabled>", "Only enabled or disabled automations (true/false)").option("--search <search>", "Case-insensitive substring match on the name").option("--background <background>", "Only background (true) or main-list (false) automations").action(run(automationListCommand));
|
|
34867
34866
|
automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
|
|
34868
|
-
automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-d, --description <description>", "Description shown with the automation").option("-e, --environment <environment>", "Environment name or ID").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small (default), large, ultra").option("--trigger-cron <schedule>", 'Cron schedule expression
|
|
34869
|
-
automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-d, --description <description>", "New description (pass empty string to clear)").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small, large, ultra").option("--enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (replaces existing triggers)").option("--trigger-cron-timezone <timezone>", "Timezone for cron
|
|
34867
|
+
automation.command("create [name]").description("Create a new automation").option("-p, --prompt <prompt>", "Prompt for the automation").option("-d, --description <description>", "Description shown with the automation").option("-e, --environment <environment>", "Environment name or ID").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small (default), large, ultra").option("--trigger-cron <schedule>", 'Cron schedule expression, e.g. "0 9 * * 1-5" (repeatable)', collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules (default: UTC)").option("--trigger-github <event>", 'GitHub event (e.g. "pull_request.opened")').option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", 'GitLab event (e.g. "merge_request.opened")').option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (requires a PR opened/updated trigger)").option("--lifecycle <policy>", "Workspace lifecycle: delete_when_done (default for new automations), sleep_when_done, archive_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups", "Allow follow-up actions on matching PRs").option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode", "Run automation messages in plan mode").option("--goal-mode", "Set automation messages as goals").option("--fast-mode", "Run automation messages in fast mode").option("--personal", "Create a personal automation owned by the authenticated user").option("--in <duration>", "Run once after this long, e.g. 30m, 2h, 3d, 1w (inside a workspace, defaults --workspace to current)").option("--at <datetime>", "Run once at this ISO-8601 time with timezone, e.g. 2026-10-08T09:00:00-07:00").option("--max-runs <n>", 'Delete the automation after this many runs ("none" for unlimited)').option("--workspace <target>", "Where runs go: new (default, new workspace each run), reuse (one workspace created on the first run), current (this workspace), or a workspace ID").option("--background", "Keep it out of the main automations list (for offhand follow-ups)").option("--disabled", "Create in disabled state").action(run((name, options) => automationCreateCommand(name, { ...options, enabled: !options.disabled })));
|
|
34868
|
+
automation.command("edit <id>").description("Edit an existing automation").option("-n, --name <name>", "New name").option("-p, --prompt <prompt>", "New prompt").option("-d, --description <description>", "New description (pass empty string to clear)").option("--size <size>", "Size of workspaces runs create (not a reused existing one): small, large, ultra").option("--enabled <enabled>", "Enable or disable (true/false)").option("--trigger-cron <schedule>", "Set cron schedule (repeatable; replaces existing triggers)", collect, []).option("--trigger-cron-timezone <timezone>", "Timezone for cron schedules").option("--trigger-github <event>", "Set GitHub event (replaces existing triggers)").option("--trigger-github-repos <repos>", "Comma-separated repo names to filter GitHub trigger").option("--trigger-github-exclude-users <users>", "Comma-separated GitHub usernames to exclude from triggering (pass empty string to clear the list)").option("--trigger-github-reviewers <users>", "Comma-separated GitHub usernames to fire for (required with pull_request.review_requested)").option("--trigger-gitlab <event>", "Set GitLab event (replaces existing triggers)").option("--trigger-gitlab-repos <repos>", "Comma-separated repo names to filter GitLab trigger").option("--trigger-gitlab-exclude-users <users>", "Comma-separated GitLab usernames to exclude from triggering (pass empty string to clear the list)").option("--github-checks <names>", "Comma-separated GitHub check names to create on matching PRs (replaces the current list; pass empty string to remove them)").option("--add-github-checks <names>", "Comma-separated GitHub check names to add, keeping the ones already configured").option("--environment <environment>", "Environment name or ID").option("--lifecycle <policy>", "Workspace lifecycle: delete_when_done (default for new automations), sleep_when_done, archive_when_done, default").option("--sleep-when-done", "Sleep automation workspaces as soon as the agent finishes").option("--auto-stop-minutes <minutes>", "Inactivity timeout in minutes (3-1440, requires --lifecycle default)").option("--pr-followups <enabled>", "Allow follow-up actions on matching PRs (true/false)", parseBooleanOption).option("--agent-provider <provider>", 'Coding agent to use: claude, codex, cursor (or "none" to inherit org default)').option("--model <model>", 'Model identifier (must be valid for --agent-provider; pass "none" to clear)').option("--thinking-level <level>", 'Thinking/reasoning level: low, medium, high, xhigh, max (or "none" to clear)').option("--plan-mode <enabled>", "Run automation messages in plan mode (true/false)", parseBooleanOption).option("--goal-mode <enabled>", "Set automation messages as goals (true/false)", parseBooleanOption).option("--fast-mode <enabled>", "Run automation messages in fast mode (true/false)", parseBooleanOption).option("--in <duration>", "Replace triggers with a one-time run after this long, e.g. 30m, 2h, 3d, 1w").option("--at <datetime>", "Replace triggers with a one-time run at this ISO-8601 time with timezone").option("--max-runs <n>", 'Delete the automation after this many runs in total ("none" for unlimited)').option("--workspace <target>", "Where runs go: new, reuse, current, or a workspace ID").option("--background <enabled>", "Keep it out of the main automations list (true/false)", parseBooleanOption).action(run(automationEditCommand));
|
|
34870
34869
|
automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
|
|
34871
34870
|
automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
|
|
34872
34871
|
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));
|