replicas-cli 0.3.115 → 0.3.116
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 +11 -16
- 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.116";
|
|
28728
28729
|
|
|
28729
28730
|
// ../shared/src/version.ts
|
|
28730
28731
|
function compareVersions(v1, v2) {
|
|
@@ -33135,8 +33136,8 @@ function resolveTriggerRepositoryIds(repositories, repoNamesInput, provider2) {
|
|
|
33135
33136
|
function buildTriggersFromOptions(options, runAt, repositories) {
|
|
33136
33137
|
const triggers = [];
|
|
33137
33138
|
if (runAt) triggers.push({ type: "cron", config: { run_at: runAt, timezone: localTimezone() } });
|
|
33138
|
-
|
|
33139
|
-
triggers.push({ type: "cron", config: { schedule
|
|
33139
|
+
for (const schedule of options.triggerCron) {
|
|
33140
|
+
triggers.push({ type: "cron", config: { schedule, timezone: options.triggerCronTimezone || "UTC" } });
|
|
33140
33141
|
}
|
|
33141
33142
|
const providerTriggers = [
|
|
33142
33143
|
["github", options.triggerGithub, options.triggerGithubRepos, options.triggerGithubExcludeUsers],
|
|
@@ -33275,12 +33276,6 @@ Automation: ${automation2.name}
|
|
|
33275
33276
|
}
|
|
33276
33277
|
console.log(import_chalk26.default.gray(` Prompt: ${automation2.prompt}`));
|
|
33277
33278
|
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
33279
|
if (automation2.cron_next_fire_at) {
|
|
33285
33280
|
console.log(import_chalk26.default.gray(` Next Run: ${formatDate(automation2.cron_next_fire_at)}`));
|
|
33286
33281
|
}
|
|
@@ -33432,7 +33427,7 @@ async function promptForTriggers(repositories) {
|
|
|
33432
33427
|
async function automationCreateCommand(name, options) {
|
|
33433
33428
|
ensureOrgApiAuthenticated();
|
|
33434
33429
|
const runAt = resolveRunAt(options);
|
|
33435
|
-
if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33430
|
+
if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33436
33431
|
const maxRuns = parseMaxRuns(options.maxRuns);
|
|
33437
33432
|
const workspaceTarget = parseWorkspaceTarget(options.workspace ?? (runAt && readAgentConfig() ? "current" : void 0));
|
|
33438
33433
|
const lifecyclePolicy = parseAutomationLifecycleOptions(options);
|
|
@@ -33574,7 +33569,7 @@ Created automation: ${automation2.name}`));
|
|
|
33574
33569
|
async function automationEditCommand(id, options) {
|
|
33575
33570
|
ensureOrgApiAuthenticated();
|
|
33576
33571
|
const runAt = resolveRunAt(options);
|
|
33577
|
-
if (runAt && options.triggerCron) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33572
|
+
if (runAt && options.triggerCron.length > 0) throw new Error("--in/--at cannot be combined with --trigger-cron");
|
|
33578
33573
|
const maxRuns = parseMaxRuns(options.maxRuns);
|
|
33579
33574
|
const workspaceTarget = parseWorkspaceTarget(options.workspace);
|
|
33580
33575
|
const lifecyclePolicy = parseAutomationLifecycleOptions(options);
|
|
@@ -33583,7 +33578,7 @@ async function automationEditCommand(id, options) {
|
|
|
33583
33578
|
const minutes = parseInt(options.autoStopMinutes, 10);
|
|
33584
33579
|
if (isNaN(minutes) || minutes < 3 || minutes > 1440) throw new Error("--auto-stop-minutes must be between 3 and 1440");
|
|
33585
33580
|
}
|
|
33586
|
-
const replacingTriggers = Boolean(options.triggerCron || options.triggerGithub || options.triggerGitlab);
|
|
33581
|
+
const replacingTriggers = Boolean(options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab);
|
|
33587
33582
|
if (replacingTriggers && options.triggerGithubExcludeUsers !== void 0 && !options.triggerGithub) throw new Error("--trigger-github-exclude-users requires --trigger-github when replacing triggers");
|
|
33588
33583
|
validateGithubReviewersOption(options);
|
|
33589
33584
|
if (replacingTriggers && options.triggerGitlabExcludeUsers !== void 0 && !options.triggerGitlab) throw new Error("--trigger-gitlab-exclude-users requires --trigger-gitlab when replacing triggers");
|
|
@@ -33600,7 +33595,7 @@ async function automationEditCommand(id, options) {
|
|
|
33600
33595
|
model: existing.automation.model
|
|
33601
33596
|
});
|
|
33602
33597
|
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;
|
|
33598
|
+
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
33599
|
if (!hasOptions) {
|
|
33605
33600
|
const nameResponse = await ask({
|
|
33606
33601
|
type: "text",
|
|
@@ -33672,7 +33667,7 @@ async function automationEditCommand(id, options) {
|
|
|
33672
33667
|
...normalizeAutomationGithubCheckNames(options.addGithubChecks.split(","))
|
|
33673
33668
|
])];
|
|
33674
33669
|
}
|
|
33675
|
-
if (runAt || options.triggerCron || options.triggerGithub || options.triggerGitlab) {
|
|
33670
|
+
if (runAt || options.triggerCron.length > 0 || options.triggerGithub || options.triggerGitlab) {
|
|
33676
33671
|
const repositories = options.triggerGithubRepos || options.triggerGitlabRepos ? (await orgAuthenticatedFetch("/v1/repositories")).repositories : [];
|
|
33677
33672
|
const triggers = buildTriggersFromOptions(options, runAt, repositories);
|
|
33678
33673
|
body.triggers = triggers;
|
|
@@ -34865,8 +34860,8 @@ credentials.command("usage").description("Show how much of each connected Claude
|
|
|
34865
34860
|
var automation = program.command("automation").alias("auto").description("Manage automations");
|
|
34866
34861
|
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
34862
|
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
|
|
34863
|
+
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 })));
|
|
34864
|
+
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
34865
|
automation.command("run <id>").description("Manually trigger an automation (cron-triggered automations only)").action(run(automationRunCommand));
|
|
34871
34866
|
automation.command("delete <id>").description("Delete an automation").option("-f, --force", "Skip confirmation prompt").action(run(automationDeleteCommand));
|
|
34872
34867
|
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));
|