@tryarcanist/cli 0.1.181 → 0.1.183
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 +34 -8
- 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;
|
|
@@ -4349,22 +4354,43 @@ function buildLogsPath(businessId, buildId, options = {}) {
|
|
|
4349
4354
|
buildId
|
|
4350
4355
|
)}/logs${suffix}`;
|
|
4351
4356
|
}
|
|
4357
|
+
async function fetchAndEmitBuildLogs(config, businessId, buildId, options) {
|
|
4358
|
+
const logs = await apiFetch(
|
|
4359
|
+
config,
|
|
4360
|
+
buildLogsPath(businessId, buildId, { afterSequence: options.afterSequence, limit: options.limit })
|
|
4361
|
+
);
|
|
4362
|
+
if (logs.logs.length === 0) return { afterSequence: options.afterSequence, count: 0 };
|
|
4363
|
+
if (options.json) writeJson({ type: "logs", logs: logs.logs });
|
|
4364
|
+
else printLogs(logs.logs);
|
|
4365
|
+
return { afterSequence: logs.logs[logs.logs.length - 1].sequence, count: logs.logs.length };
|
|
4366
|
+
}
|
|
4367
|
+
async function drainTerminalBuildLogs(config, businessId, buildId, options) {
|
|
4368
|
+
let afterSequence = options.afterSequence;
|
|
4369
|
+
for (; ; ) {
|
|
4370
|
+
const result = await fetchAndEmitBuildLogs(config, businessId, buildId, {
|
|
4371
|
+
afterSequence,
|
|
4372
|
+
limit: 500,
|
|
4373
|
+
json: options.json
|
|
4374
|
+
});
|
|
4375
|
+
afterSequence = result.afterSequence;
|
|
4376
|
+
if (result.count === 0) return;
|
|
4377
|
+
}
|
|
4378
|
+
}
|
|
4352
4379
|
async function waitForBuild(config, businessId, buildId, options) {
|
|
4353
4380
|
let afterSequence;
|
|
4354
4381
|
for (; ; ) {
|
|
4355
4382
|
if (options.follow) {
|
|
4356
|
-
const
|
|
4357
|
-
|
|
4358
|
-
if (options.json) writeJson({ type: "logs", logs: logs.logs });
|
|
4359
|
-
else printLogs(logs.logs);
|
|
4360
|
-
afterSequence = logs.logs[logs.logs.length - 1].sequence;
|
|
4361
|
-
}
|
|
4383
|
+
const result = await fetchAndEmitBuildLogs(config, businessId, buildId, { afterSequence, json: options.json });
|
|
4384
|
+
afterSequence = result.afterSequence;
|
|
4362
4385
|
}
|
|
4363
4386
|
const status = await apiFetch(
|
|
4364
4387
|
config,
|
|
4365
4388
|
`/api/businesses/${encodeURIComponent(businessId)}/sandbox-layer/build-requests/${encodeURIComponent(buildId)}`
|
|
4366
4389
|
);
|
|
4367
4390
|
if (TERMINAL_BUILD_STATUSES.has(status.buildRequest.status)) {
|
|
4391
|
+
if (options.follow) {
|
|
4392
|
+
await drainTerminalBuildLogs(config, businessId, buildId, { afterSequence, json: options.json });
|
|
4393
|
+
}
|
|
4368
4394
|
return status.buildRequest;
|
|
4369
4395
|
}
|
|
4370
4396
|
await sleep(options.pollIntervalMs);
|
|
@@ -5119,7 +5145,7 @@ program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
|
5119
5145
|
applyColorEnvironment(getRuntimeOptions(actionCommand));
|
|
5120
5146
|
});
|
|
5121
5147
|
function addCreateOptions(cmd) {
|
|
5122
|
-
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(
|
|
5148
|
+
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(
|
|
5123
5149
|
"--start-branch <branch>",
|
|
5124
5150
|
"Resume an existing branch with its history instead of forking a new one off base"
|
|
5125
5151
|
).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(
|
|
@@ -5142,7 +5168,7 @@ Examples:
|
|
|
5142
5168
|
arcanist sessions create https://github.com/org/repo - --json | jq -r .sessionId | xargs -I{} arcanist sessions events {} --follow --json
|
|
5143
5169
|
|
|
5144
5170
|
JSON:
|
|
5145
|
-
JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}
|
|
5171
|
+
JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, agentRuntimeBackend?, reasoningEffort?, autoVerify?, baseBranch?, startBranch?, continuePrUrl?, continueMode?, onboarding?, promptId?}
|
|
5146
5172
|
--wait --json also includes best-effort result fields when available: prUrl?, publishedBranch?, lastBranch?
|
|
5147
5173
|
Follow async progress with: arcanist sessions events <session-id> --follow --json
|
|
5148
5174
|
`
|