@tryarcanist/cli 0.1.185 → 0.1.187

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 CHANGED
@@ -194,7 +194,7 @@ arcanist sessions qa https://github.com/your-org/your-repo/pull/123 --idempotenc
194
194
  ```
195
195
 
196
196
  The PR URL must be `https://github.com/<owner>/<repo>/pull/<number>`.
197
- The CLI derives the repo from that URL, creates a QA session with `qa: true` and `targetPrUrl`, then enqueues the verifier prompt.
197
+ The CLI derives the repo from that URL, creates a QA session with `qa: true` and `targetPrUrl`, then enqueues the verifier prompt (skipped when the server signals `promptAlreadyEnqueued`).
198
198
  Inspect progress with the session URL or the session events stream.
199
199
 
200
200
  `--backend` picks the agent runtime backend: `codex` (default), `claude_code`, or `opencode`.
@@ -210,7 +210,7 @@ The CLI derives separate session and prompt idempotency keys from the provided v
210
210
  If session creation succeeds but prompt enqueue fails, retry the same command with the same `--idempotency-key`.
211
211
 
212
212
  JSON mode returns `{sessionId, sessionUrl?, repoUrl, targetPrUrl, model?, agentRuntimeBackend?, reasoningEffort?, promptId?}`.
213
- Active-verifier and per-PR run-limit conflicts both use exit code `4`; active-verifier errors include the existing session handle when the server returns it.
213
+ `promptId` is absent when the coordinator already enqueued the verifier prompt (no duplicate send). Active-verifier and per-PR run-limit conflicts both use exit code `4`; active-verifier errors include the existing session handle when the server returns it.
214
214
 
215
215
  ### `arcanist sessions send <session-id> [prompt]`
216
216
 
package/dist/index.js CHANGED
@@ -221,9 +221,9 @@ import { randomUUID } from "crypto";
221
221
  import { createInterface } from "readline/promises";
222
222
 
223
223
  // src/config.ts
224
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
224
+ import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
225
225
  import { homedir } from "os";
226
- import { dirname, join } from "path";
226
+ import { dirname, join, resolve } from "path";
227
227
  var CONFIG_DIR = join(homedir(), ".arcanist");
228
228
  var CONFIG_FILE = join(CONFIG_DIR, "config.json");
229
229
  var PROJECT_CONFIG_FILE = ".arcanist-cli.json";
@@ -330,12 +330,34 @@ function validateAndNormalizeConfig(config) {
330
330
  function findGitRoot(cwd) {
331
331
  let current = cwd;
332
332
  while (true) {
333
- if (existsSync(join(current, ".git"))) return current;
333
+ if (hasGitMetadata(current)) return current;
334
334
  const parent = dirname(current);
335
335
  if (parent === current) return null;
336
336
  current = parent;
337
337
  }
338
338
  }
339
+ function hasGitMetadata(repoPath2) {
340
+ const gitPath = join(repoPath2, ".git");
341
+ if (!existsSync(gitPath)) return false;
342
+ try {
343
+ const gitStat = statSync(gitPath);
344
+ if (gitStat.isDirectory()) {
345
+ return existsSync(join(gitPath, "HEAD")) && existsSync(join(gitPath, "config"));
346
+ }
347
+ if (!gitStat.isFile()) return false;
348
+ const gitDir = readGitDirPointer(gitPath);
349
+ if (!gitDir) return false;
350
+ return existsSync(join(resolve(repoPath2, gitDir), "HEAD"));
351
+ } catch {
352
+ return false;
353
+ }
354
+ }
355
+ function readGitDirPointer(gitFilePath) {
356
+ const gitDirLine = readFileSync(gitFilePath, "utf-8").split(/\r?\n/).find((line) => line.startsWith("gitdir:"));
357
+ if (!gitDirLine) return null;
358
+ const gitDir = gitDirLine.slice("gitdir:".length).trim();
359
+ return gitDir || null;
360
+ }
339
361
  function parseProjectConfig(configPath) {
340
362
  let parsed;
341
363
  try {
@@ -434,7 +456,7 @@ async function readHiddenPrompt(prompt) {
434
456
  if (!process.stdin.isTTY || !process.stdout.isTTY) {
435
457
  throw new CliError("user", "No interactive terminal available. Re-run with --token-stdin or set ARCANIST_TOKEN.");
436
458
  }
437
- return new Promise((resolve, reject) => {
459
+ return new Promise((resolve2, reject) => {
438
460
  const stdin = process.stdin;
439
461
  const inputChars = [];
440
462
  let ansiCarry = "";
@@ -450,7 +472,7 @@ async function readHiddenPrompt(prompt) {
450
472
  settled = true;
451
473
  cleanup();
452
474
  process.stdout.write("\n");
453
- resolve(inputChars.join(""));
475
+ resolve2(inputChars.join(""));
454
476
  };
455
477
  const fail2 = (error) => {
456
478
  if (settled) return;
@@ -605,6 +627,10 @@ function asNonEmptyString(value) {
605
627
 
606
628
  // ../../shared/constants/models.ts
607
629
  var OpenAIModel = {
630
+ GPT56: "gpt-5.6",
631
+ GPT56Sol: "gpt-5.6-sol",
632
+ GPT56Terra: "gpt-5.6-terra",
633
+ GPT56Luna: "gpt-5.6-luna",
608
634
  GPT55: "gpt-5.5",
609
635
  GPT54: "gpt-5.4",
610
636
  GPT54Pro: "gpt-5.4-pro",
@@ -654,6 +680,48 @@ var MODEL_REGISTRY = [
654
680
  },
655
681
  sessionStart: { eligible: true, isDefault: true }
656
682
  },
683
+ {
684
+ id: OpenAIModel.GPT56,
685
+ name: "GPT-5.6",
686
+ provider: "openai",
687
+ backends: [CODEX_AGENT_RUNTIME_BACKEND],
688
+ contextWindow: 105e4,
689
+ // Verified 2026-07-09 against OpenAI's GPT-5.6 migration guide and model
690
+ // catalog: the alias routes to gpt-5.6-sol and supports max effort.
691
+ reasoning: { efforts: ["none", "low", "medium", "high", "xhigh", "max"], default: "medium" },
692
+ costTracked: false,
693
+ sessionStart: { eligible: true }
694
+ },
695
+ {
696
+ id: OpenAIModel.GPT56Sol,
697
+ name: "GPT-5.6 Sol",
698
+ provider: "openai",
699
+ backends: [CODEX_AGENT_RUNTIME_BACKEND],
700
+ contextWindow: 105e4,
701
+ reasoning: { efforts: ["none", "low", "medium", "high", "xhigh", "max"], default: "medium" },
702
+ costTracked: false,
703
+ sessionStart: { eligible: true }
704
+ },
705
+ {
706
+ id: OpenAIModel.GPT56Terra,
707
+ name: "GPT-5.6 Terra",
708
+ provider: "openai",
709
+ backends: [CODEX_AGENT_RUNTIME_BACKEND],
710
+ contextWindow: 105e4,
711
+ reasoning: { efforts: ["none", "low", "medium", "high", "xhigh", "max"], default: "medium" },
712
+ costTracked: false,
713
+ sessionStart: { eligible: true }
714
+ },
715
+ {
716
+ id: OpenAIModel.GPT56Luna,
717
+ name: "GPT-5.6 Luna",
718
+ provider: "openai",
719
+ backends: [CODEX_AGENT_RUNTIME_BACKEND],
720
+ contextWindow: 105e4,
721
+ reasoning: { efforts: ["none", "low", "medium", "high", "xhigh", "max"], default: "medium" },
722
+ costTracked: false,
723
+ sessionStart: { eligible: true }
724
+ },
657
725
  {
658
726
  id: OpenAIModel.GPT55,
659
727
  name: "GPT-5.5",
@@ -1180,7 +1248,7 @@ function formatTime(value) {
1180
1248
 
1181
1249
  // ../../shared/utils/timing.ts
1182
1250
  function sleep(ms) {
1183
- return new Promise((resolve) => setTimeout(resolve, ms));
1251
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
1184
1252
  }
1185
1253
 
1186
1254
  // ../../shared/session/phase.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryarcanist/cli",
3
- "version": "0.1.185",
3
+ "version": "0.1.187",
4
4
  "description": "CLI for Arcanist — create and manage coding agent sessions",
5
5
  "type": "module",
6
6
  "bin": {