@tryarcanist/cli 0.1.264 → 0.1.265

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.
Files changed (3) hide show
  1. package/README.md +1 -16
  2. package/dist/index.js +2 -71
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -199,8 +199,6 @@ arcanist sessions create your-org/your-repo "retry-safe create" --idempotency-ke
199
199
 
200
200
  `--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.
201
201
 
202
- `--auto-verify` is a deprecated no-op. The verifier child is no longer spawned at publish. The flag is accepted for backward compatibility and no longer starts a verifier.
203
-
204
202
  Use `--browser-identity <id|none>` to attach a business browser identity to the session, or pass `none` to explicitly start without one. Access is authorized by the control plane when the session is created.
205
203
 
206
204
  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.
@@ -214,7 +212,7 @@ Sessions always start from a fresh sandbox (the warm sandbox pool was removed).
214
212
  `--idempotency-key <uuid>` is for manually retrying a create request that may have reached the server.
215
213
  The CLI derives separate session and prompt idempotency keys from the provided value.
216
214
 
217
- JSON mode returns `{sessionId, sessionUrl?, repoUrl, model?, reasoningEffort?, autoVerify?, baseBranch?, startBranch?, promptId?}`. With `--wait`, JSON mode also includes best-effort result fields when available: `prUrl?`, `publishedBranch?`, and `lastBranch?`.
215
+ JSON mode returns `{sessionId, sessionUrl?, repoUrl, model?, reasoningEffort?, baseBranch?, startBranch?, promptId?}`. With `--wait`, JSON mode also includes best-effort result fields when available: `prUrl?`, `publishedBranch?`, and `lastBranch?`.
218
216
 
219
217
  ### `arcanist sessions send <session-id> [prompt]`
220
218
 
@@ -233,19 +231,6 @@ Repeatable `--uploaded-file <path>` flags attach local UTF-8 text files to the f
233
231
  JSON mode returns `{sessionId, promptId?}`.
234
232
  With `--wait`, JSON mode also includes best-effort result fields when available: `prUrl?`, `publishedBranch?`, `lastBranch?`.
235
233
 
236
- ### `arcanist sessions respond <session-id> [answer]`
237
-
238
- Answers a pending `question` event from `sessions events --follow`.
239
- Pass the `questionId` from the question event so the answer is durable and safe across reconnects.
240
-
241
- ```bash
242
- arcanist sessions respond abc123 "Use PostgreSQL" --question-id q_123
243
- printf "Use PostgreSQL" | arcanist sessions respond abc123 --question-id q_123 --answer-stdin --json
244
- ```
245
-
246
- JSON mode returns the raw respond payload plus `sessionId`.
247
- If the session is no longer waiting for input, the command exits with conflict and points back to `sessions events --follow --json`.
248
-
249
234
  ### `arcanist sessions stop <session-id>`
250
235
 
251
236
  Stops the active run for a session. Idempotent: if no sandbox is active, the server returns `already_stopped`.
package/dist/index.js CHANGED
@@ -7910,15 +7910,6 @@ function randomIdempotencyKey() {
7910
7910
  function assertArcanistSessionMutationAllowed(subcommand) {
7911
7911
  const role = process.env.ARCANIST_AGENT_ROLE?.trim();
7912
7912
  if (role !== "verification" && role !== "review") return;
7913
- if (subcommand === "respond") {
7914
- throw new CliError(
7915
- "user",
7916
- `\`arcanist sessions respond\` is disabled inside ${role} sessions because read-only agents cannot mutate the session under review.`,
7917
- {
7918
- hint: "Report the unanswered question as a verification blocker instead."
7919
- }
7920
- );
7921
- }
7922
7913
  const commandName = subcommand === "review" || subcommand === "anubis" ? subcommand : `sessions ${subcommand}`;
7923
7914
  throw new CliError(
7924
7915
  "user",
@@ -10743,7 +10734,6 @@ async function createCommand(repoUrl, promptArg, options, command) {
10743
10734
  const body = { context: { repoUrl } };
10744
10735
  if (options.model) body.model = options.model;
10745
10736
  if (options.reasoningEffort) body.reasoningEffort = options.reasoningEffort;
10746
- if (options.autoVerify) body.autoVerify = true;
10747
10737
  const promptPreview = buildSessionCreatePromptPreview(prompt);
10748
10738
  if (promptPreview) body.prompt = promptPreview;
10749
10739
  if (baseBranch) body.baseBranch = baseBranch;
@@ -10816,7 +10806,6 @@ async function createCommand(repoUrl, promptArg, options, command) {
10816
10806
  output.repoUrl = repoUrl;
10817
10807
  if (options.model) output.model = options.model;
10818
10808
  if (options.reasoningEffort) output.reasoningEffort = options.reasoningEffort;
10819
- if (options.autoVerify) output.autoVerify = true;
10820
10809
  if (baseBranch) output.baseBranch = baseBranch;
10821
10810
  if (startBranch) output.startBranch = startBranch;
10822
10811
  if (promptId) output.promptId = promptId;
@@ -11138,53 +11127,6 @@ async function repoSkillsCommand(repoArg, options = {}, command) {
11138
11127
  });
11139
11128
  }
11140
11129
 
11141
- // src/commands/respond.ts
11142
- async function resolveAnswerInput(answerArg, options) {
11143
- const shouldReadStdin = options.answerStdin === true || answerArg === "-";
11144
- const answer = shouldReadStdin ? await readStdin() : answerArg;
11145
- if (!answer || answer.trim().length === 0) {
11146
- throw new CliError(
11147
- "user",
11148
- "Missing answer. Pass an answer argument, use '-' to read stdin, or pass --answer-stdin."
11149
- );
11150
- }
11151
- return answer;
11152
- }
11153
- async function respondCommand(sessionId, answerArg, options = {}, command) {
11154
- assertArcanistSessionMutationAllowed("respond");
11155
- const questionId = options.questionId?.trim();
11156
- if (!questionId) {
11157
- throw new CliError("user", "Missing --question-id for the pending question.", {
11158
- hint: `Find the question id with: arcanist sessions events ${sessionId} --follow --json`
11159
- });
11160
- }
11161
- const { config } = resolveBusinessContext(command, options);
11162
- const answer = await resolveAnswerInput(answerArg, options);
11163
- try {
11164
- const payload = await apiFetch(config, `/api/sessions/${sessionId}/respond`, {
11165
- method: "POST",
11166
- body: JSON.stringify({ answer, questionId })
11167
- });
11168
- emit(command, options, { sessionId, ...payload }, () => console.log(`Answer sent to session ${sessionId}.`));
11169
- } catch (err) {
11170
- const conflict = parseRespondConflict(err);
11171
- if (!conflict) throw err;
11172
- throw new CliError("conflict", conflict.message, {
11173
- data: { reason: conflict.reason },
11174
- hint: `Inspect pending questions with: arcanist sessions events ${sessionId} --follow --json`
11175
- });
11176
- }
11177
- }
11178
- function parseRespondConflict(err) {
11179
- const body = parseConflictBody(err);
11180
- if (!body || body.error !== "session_not_respondable") return null;
11181
- const reason = typeof body.reason === "string" ? body.reason : void 0;
11182
- return {
11183
- message: reason ? `Session cannot be answered from phase=${reason}.` : "Session does not have a pending question.",
11184
- reason: reason ?? "session_not_respondable"
11185
- };
11186
- }
11187
-
11188
11130
  // src/commands/review.ts
11189
11131
  var PR_REVIEW_POLL_INTERVAL_MS = 1e4;
11190
11132
  var PR_REVIEW_WAIT_TIMEOUT_MS = 30 * 60 * 1e3;
@@ -12713,7 +12655,7 @@ program.hook("preAction", (_thisCommand, actionCommand) => {
12713
12655
  applyColorEnvironment(getRuntimeOptions(actionCommand));
12714
12656
  });
12715
12657
  function addCreateOptions(cmd) {
12716
- return cmd.argument("<repo-url>", "Repository URL").argument("[prompt]", "Prompt to send, or '-' to read stdin").option("--model <model>", "Model to use").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(
12658
+ return cmd.argument("<repo-url>", "Repository URL").argument("[prompt]", "Prompt to send, or '-' to read stdin").option("--model <model>", "Model to use").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(
12717
12659
  "--start-branch <branch>",
12718
12660
  "Resume an existing branch with its history instead of forking a new one off base"
12719
12661
  ).option("--browser-identity <id|none>", "Attach a business browser identity, or explicitly attach none").option("--prompt-stdin", "Read prompt from stdin").option(
@@ -12735,7 +12677,7 @@ Examples:
12735
12677
  arcanist sessions create https://github.com/org/repo - --json | jq -r .sessionId | xargs -I{} arcanist sessions events {} --follow --json
12736
12678
 
12737
12679
  JSON:
12738
- JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, reasoningEffort?, autoVerify?, baseBranch?, startBranch?, promptId?}
12680
+ JSON mode returns {sessionId, sessionUrl?, repoUrl, model?, reasoningEffort?, baseBranch?, startBranch?, promptId?}
12739
12681
  --wait --json also includes best-effort result fields when available: prUrl?, publishedBranch?, lastBranch?
12740
12682
  Follow async progress with: arcanist sessions events <session-id> --follow --json
12741
12683
  `
@@ -12830,17 +12772,6 @@ addCreateOptions(sessions.command("create").description("Create a session and se
12830
12772
  addSendOptions(sessions.command("send").description("Send a message to an existing session")).action(
12831
12773
  (sessionId, prompt, options, command) => messageCommand(sessionId, prompt, options, command)
12832
12774
  );
12833
- sessions.command("respond").description("Answer a pending session question").argument("<session-id>", "Session ID").argument("[answer]", "Answer text, or '-' to read stdin").option("--answer-stdin", "Read answer from stdin").requiredOption("--question-id <id>", "Question ID from the question event").addHelpText(
12834
- "after",
12835
- `
12836
- Examples:
12837
- arcanist sessions respond <session-id> "Use PostgreSQL" --question-id q_123
12838
- printf "Use PostgreSQL" | arcanist sessions respond <session-id> --question-id q_123 --answer-stdin --json
12839
-
12840
- JSON:
12841
- JSON mode returns the raw respond payload plus sessionId.
12842
- `
12843
- ).action((sessionId, answer, options, command) => respondCommand(sessionId, answer, options, command));
12844
12775
  sessions.command("stop").description("Stop the active run for a session").argument("<session-id>", "Session ID").addHelpText(
12845
12776
  "after",
12846
12777
  `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryarcanist/cli",
3
- "version": "0.1.264",
3
+ "version": "0.1.265",
4
4
  "description": "CLI for Arcanist — create and manage coding agent sessions",
5
5
  "type": "module",
6
6
  "bin": {