@tryarcanist/cli 0.1.182 → 0.1.184
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/README.md +4 -1
- package/dist/index.js +26 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,6 +150,7 @@ printf "add tests" | arcanist sessions create your-org/your-repo --prompt-stdin
|
|
|
150
150
|
arcanist sessions create your-org/your-repo - --model gpt-5.5
|
|
151
151
|
arcanist sessions create your-org/your-repo "port to claude" --backend claude_code --model claude-opus-4-8
|
|
152
152
|
arcanist sessions create your-org/your-repo "refactor auth" --reasoning-effort xhigh
|
|
153
|
+
arcanist sessions create your-org/your-repo "verify this automatically" --auto-verify
|
|
153
154
|
arcanist sessions create your-org/your-repo "fix release branch" --base-branch release/2026-06
|
|
154
155
|
arcanist sessions create your-org/your-repo "review the trace" --uploaded-file trace.txt
|
|
155
156
|
arcanist sessions create your-org/your-repo "verify the deployed change" --cold
|
|
@@ -160,6 +161,8 @@ arcanist sessions create your-org/your-repo "retry-safe create" --idempotency-ke
|
|
|
160
161
|
|
|
161
162
|
`--wait` blocks until the created prompt finishes, prints the resulting PR/branch line in human-readable mode when it is already available, and exits non-zero if the prompt finishes with `status: failed`, making it suitable for cron or other schedulers that alert on command failure. JSON mode waits quietly and prints the create payload after the prompt completes successfully. `--poll-interval <ms>` tunes the completion check frequency.
|
|
162
163
|
|
|
164
|
+
Use `--auto-verify` to opt the created session into automatic QA verification after PR creation. Auto verification is default-off at session create unless another surface explicitly enables it.
|
|
165
|
+
|
|
163
166
|
Use `--base-branch <branch>` to target a non-default base branch. The CLI only validates that the branch value is non-empty; branch existence is checked later by the session runtime.
|
|
164
167
|
|
|
165
168
|
Use `--start-branch <branch>` to resume an existing branch with its history instead of forking a fresh branch off base; the control plane verifies the branch exists on the remote and fails closed if it does not.
|
|
@@ -175,7 +178,7 @@ The CLI derives separate session and prompt idempotency keys from the provided v
|
|
|
175
178
|
|
|
176
179
|
`--onboarding` creates an onboarding session: the agent authors the repo's `.arcanist.json`, `.arcanist/` runtime files, `ARCANIST.md`, and conditionally `.arcanist/sandbox.yaml` + `.arcanist/sandbox.layer.Dockerfile` (when the base sandbox lacks a needed toolchain), proves what it can inside its sandbox, and opens the setup PR ready for review. The onboarding behavior is driven by the bridge's canonical onboarding playbook, not the prompt, so `--onboarding` needs no prompt: `arcanist sessions create <repo> --onboarding --wait`. Any prompt supplied alongside `--onboarding` is ignored. Team use; not part of the external API surface.
|
|
177
180
|
|
|
178
|
-
JSON mode returns `{sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}`. `sessionUrl` is emitted only when the server returns it; `agentRuntimeBackend` only when `--backend` is passed. With `--wait`, JSON mode also includes best-effort result fields when available: `prUrl?`, `publishedBranch?`, and `lastBranch?`.
|
|
181
|
+
JSON mode returns `{sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, autoVerify?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}`. `sessionUrl` is emitted only when the server returns it; `agentRuntimeBackend` only when `--backend` is passed. With `--wait`, JSON mode also includes best-effort result fields when available: `prUrl?`, `publishedBranch?`, and `lastBranch?`.
|
|
179
182
|
|
|
180
183
|
### `arcanist sessions qa <pr-url>`
|
|
181
184
|
|
package/dist/index.js
CHANGED
|
@@ -1212,6 +1212,9 @@ var TERMINAL_FOR_FALLBACK_POLLING_PHASES = new Set(
|
|
|
1212
1212
|
var CHILD_SLOT_RELEASE_PHASES = new Set(
|
|
1213
1213
|
TERMINAL_PHASES_ARRAY.filter((phase) => phase !== "stopped")
|
|
1214
1214
|
);
|
|
1215
|
+
var ARCHIVABLE_STALE_TERMINAL_PHASES_ARRAY = TERMINAL_PHASES_ARRAY.filter(
|
|
1216
|
+
(phase) => phase !== "archived" && phase !== "blocked" && phase !== "stopped"
|
|
1217
|
+
);
|
|
1215
1218
|
function isTerminalPhase(phase, _sessionKind) {
|
|
1216
1219
|
return TERMINAL_PHASES.has(phase);
|
|
1217
1220
|
}
|
|
@@ -3084,6 +3087,7 @@ async function createCommand(repoUrl, promptArg, options, command) {
|
|
|
3084
3087
|
if (options.model) body.model = options.model;
|
|
3085
3088
|
if (options.backend) body.agentRuntimeBackend = agentRuntimeBackend;
|
|
3086
3089
|
if (options.reasoningEffort) body.reasoningEffort = options.reasoningEffort;
|
|
3090
|
+
if (options.autoVerify) body.autoVerify = true;
|
|
3087
3091
|
const promptPreview = buildSessionCreatePromptPreview(prompt);
|
|
3088
3092
|
if (promptPreview) body.prompt = promptPreview;
|
|
3089
3093
|
if (baseBranch) body.baseBranch = baseBranch;
|
|
@@ -3156,6 +3160,7 @@ async function createCommand(repoUrl, promptArg, options, command) {
|
|
|
3156
3160
|
if (options.model) output.model = options.model;
|
|
3157
3161
|
if (options.backend) output.agentRuntimeBackend = agentRuntimeBackend;
|
|
3158
3162
|
if (options.reasoningEffort) output.reasoningEffort = options.reasoningEffort;
|
|
3163
|
+
if (options.autoVerify) output.autoVerify = true;
|
|
3159
3164
|
if (baseBranch) output.baseBranch = baseBranch;
|
|
3160
3165
|
if (startBranch) output.startBranch = startBranch;
|
|
3161
3166
|
if (continuePr) output.continuePrUrl = continuePr;
|
|
@@ -3500,23 +3505,25 @@ async function qaCommand(prUrl, options, command) {
|
|
|
3500
3505
|
}
|
|
3501
3506
|
const sessionId = sessionData.sessionId;
|
|
3502
3507
|
let promptId;
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3508
|
+
if (!sessionData.promptAlreadyEnqueued) {
|
|
3509
|
+
try {
|
|
3510
|
+
const promptData = await apiFetch(config, `/api/sessions/${sessionId}/prompts`, {
|
|
3511
|
+
method: "POST",
|
|
3512
|
+
headers: { "Idempotency-Key": promptIdempotencyKey },
|
|
3513
|
+
body: JSON.stringify({ prompt: QA_PROMPT })
|
|
3514
|
+
});
|
|
3515
|
+
promptId = promptData.prompt?.promptId ?? promptData.prompt?.id;
|
|
3516
|
+
} catch (err) {
|
|
3517
|
+
throw new CliError(
|
|
3518
|
+
err instanceof CliError ? err.code : "server",
|
|
3519
|
+
`QA session created (${sessionId}) but prompt enqueue failed: ${stringifyError(err)}`,
|
|
3520
|
+
{
|
|
3521
|
+
exitCode: err instanceof CliError ? err.exitCode : void 0,
|
|
3522
|
+
hint: `Retry with: arcanist sessions qa ${targetPrUrl} --idempotency-key ${idempotencyKey}`,
|
|
3523
|
+
requestId: err instanceof CliError ? err.requestId : void 0
|
|
3524
|
+
}
|
|
3525
|
+
);
|
|
3526
|
+
}
|
|
3520
3527
|
}
|
|
3521
3528
|
if (options.wait) {
|
|
3522
3529
|
const waitPollIntervalMs = parsePollInterval(options.pollInterval);
|
|
@@ -5140,7 +5147,7 @@ program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
|
5140
5147
|
applyColorEnvironment(getRuntimeOptions(actionCommand));
|
|
5141
5148
|
});
|
|
5142
5149
|
function addCreateOptions(cmd) {
|
|
5143
|
-
return cmd.argument("<repo-url>", "Repository URL").argument("[prompt]", "Prompt to send, or '-' to read stdin").option("--model <model>", "Model to use").option("--backend <backend>", "Agent runtime backend: codex (default), claude_code, or opencode").option("--reasoning-effort <effort>", "Reasoning effort to use for models that support it").option("--base-branch <branch>", "Base branch to create the session against (defaults to the repo default branch)").option(
|
|
5150
|
+
return cmd.argument("<repo-url>", "Repository URL").argument("[prompt]", "Prompt to send, or '-' to read stdin").option("--model <model>", "Model to use").option("--backend <backend>", "Agent runtime backend: codex (default), claude_code, or opencode").option("--reasoning-effort <effort>", "Reasoning effort to use for models that support it").option("--auto-verify", "Opt this session into automatic QA verification after PR creation").option("--base-branch <branch>", "Base branch to create the session against (defaults to the repo default branch)").option(
|
|
5144
5151
|
"--start-branch <branch>",
|
|
5145
5152
|
"Resume an existing branch with its history instead of forking a new one off base"
|
|
5146
5153
|
).option("--continue-pr <url>", "Continue from an existing same-repo pull request").option("--continue-mode <mode>", "Continuation mode: auto (default), update-pr, or new-pr").option("--prompt-stdin", "Read prompt from stdin").option(
|
|
@@ -5163,7 +5170,7 @@ Examples:
|
|
|
5163
5170
|
arcanist sessions create https://github.com/org/repo - --json | jq -r .sessionId | xargs -I{} arcanist sessions events {} --follow --json
|
|
5164
5171
|
|
|
5165
5172
|
JSON:
|
|
5166
|
-
JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}
|
|
5173
|
+
JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, autoVerify?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}
|
|
5167
5174
|
--wait --json also includes best-effort result fields when available: prUrl?, publishedBranch?, lastBranch?
|
|
5168
5175
|
Follow async progress with: arcanist sessions events <session-id> --follow --json
|
|
5169
5176
|
`
|