@cleocode/adapters 2026.11.2 → 2026.11.3-canary.2

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.
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schema": 2,
3
- "sourceHash": "a3e7beba4e0f300c5317416a0d780c676f407cfb94045e02fd506fb3046e6a38"
3
+ "sourceHash": "e1f97297a2acfe976f0157621b8e42f200ccb848ab44cd1a280ac7bfbf119226"
4
4
  }
package/dist/index.js CHANGED
@@ -1127,7 +1127,7 @@ var init_code_symbol = __esm({
1127
1127
 
1128
1128
  // packages/contracts/src/orca-execution.ts
1129
1129
  import { z as z4 } from "zod";
1130
- var identifier, orcaAgentSchema, DEFAULT_ORCA_AGENTS, orchestrateOrcaConfigSchema, orcaContextSchema, orcaRoutingRunSchema, orcaLaunchSchema, orcaStartBindingSchema, orcaAttemptSchema, orcaWorkerDoneSchema, orcaWorkerReportSchema, orcaReportDeliverySchema, orcaWorkerSettlementSchema, orcaReportMessageSchema, orcaReportSourceSchema, orcaWorkerDonePayloadSchema, orcaWorkerRequestSchema, effectSchema, selectionSchema, orcaReplySchema, orcaCommandRegistrySchema, accountProviderSchema, orcaAccountReplySchema;
1130
+ var identifier, orcaAgentSchema, DEFAULT_ORCA_AGENTS, orchestrateOrcaConfigSchema, orcaContextSchema, orcaRoutingRunSchema, orcaLaunchSchema, orcaStartBindingSchema, orcaAttemptSchema, orcaWorkerDoneSchema, orcaWorkerReportSchema, orcaReportDeliverySchema, orcaWorkerSettlementSchema, orcaReportMessageSchema, orcaReportSourceSchema, orcaWorkerDonePayloadSchema, orcaWorkerRequestSchema, orcaLeadTerminalSchema, effectSchema, selectionSchema, orcaReplySchema, orcaCommandRegistrySchema, accountProviderSchema, orcaAccountReplySchema;
1131
1131
  var init_orca_execution = __esm({
1132
1132
  "packages/contracts/src/orca-execution.ts"() {
1133
1133
  "use strict";
@@ -1310,6 +1310,14 @@ var init_orca_execution = __esm({
1310
1310
  message: "ingest-report requires an exact message id; other actions do not accept one.",
1311
1311
  path: ["messageId"]
1312
1312
  });
1313
+ orcaLeadTerminalSchema = z4.object({
1314
+ /** Runtime that issued the terminal handle. */
1315
+ runtimeId: identifier,
1316
+ /** Handle for Orca terminal read/show/interrupt supervision. */
1317
+ terminalHandle: identifier,
1318
+ /** Shell PID, preserved by exec into the guarded provider. */
1319
+ pid: z4.number().int().positive()
1320
+ });
1313
1321
  effectSchema = z4.object({
1314
1322
  kind: z4.string(),
1315
1323
  role: z4.string().optional(),
@@ -1372,10 +1380,22 @@ var init_orca_execution = __esm({
1372
1380
  status: z4.string().optional(),
1373
1381
  terminal: z4.object({
1374
1382
  handle: identifier,
1375
- connected: z4.boolean(),
1376
- writable: z4.boolean(),
1377
- executionHostId: identifier
1383
+ connected: z4.boolean().optional(),
1384
+ writable: z4.boolean().optional(),
1385
+ executionHostId: identifier,
1386
+ worktreePath: identifier.optional(),
1387
+ processId: z4.number().int().positive().optional(),
1388
+ hostPlatform: z4.string().optional(),
1389
+ surface: z4.string().optional(),
1390
+ tabId: identifier.optional()
1391
+ }).optional(),
1392
+ focus: z4.object({
1393
+ handle: identifier,
1394
+ tabId: identifier,
1395
+ worktreeId: identifier,
1396
+ navigated: z4.boolean()
1378
1397
  }).optional(),
1398
+ close: z4.object({ handle: identifier, ptyKilled: z4.boolean() }).optional(),
1379
1399
  runtime: z4.object({
1380
1400
  runtimeId: identifier,
1381
1401
  reachable: z4.boolean(),
@@ -47066,6 +47086,51 @@ var init_install = __esm({
47066
47086
  }
47067
47087
  });
47068
47088
 
47089
+ // packages/adapters/src/orca-execution.ts
47090
+ import {
47091
+ ORCA_LEAD_LAUNCH_REFUSAL,
47092
+ orcaAccountReplySchema as orcaAccountReplySchema2,
47093
+ orcaCommandRegistrySchema as orcaCommandRegistrySchema2,
47094
+ orcaContextSchema as orcaContextSchema2,
47095
+ orcaLaunchSchema as orcaLaunchSchema2,
47096
+ orcaReplySchema as orcaReplySchema2,
47097
+ orcaReportMessageSchema as orcaReportMessageSchema2,
47098
+ orcaReportSourceSchema as orcaReportSourceSchema2,
47099
+ orcaWorkerDonePayloadSchema as orcaWorkerDonePayloadSchema2
47100
+ } from "@cleocode/contracts/orca-execution.js";
47101
+ import { PS_STABLE_ENV as PS_STABLE_ENV2 } from "@cleocode/contracts/process-probe.js";
47102
+ import { findOnPath, pathDelimiterFor, splitPathEnv } from "@cleocode/paths";
47103
+ var MAX_DIAGNOSTIC_LENGTH, MAX_RECEIPT_LENGTH, OrcaExecutionError;
47104
+ var init_orca_execution2 = __esm({
47105
+ "packages/adapters/src/orca-execution.ts"() {
47106
+ "use strict";
47107
+ MAX_DIAGNOSTIC_LENGTH = 4096;
47108
+ MAX_RECEIPT_LENGTH = 65536;
47109
+ OrcaExecutionError = class extends Error {
47110
+ /** Numeric CLI refusal status, independent of a worker's exit. */
47111
+ exitCode = 63;
47112
+ /** Stable refusal code. */
47113
+ code;
47114
+ /** Recovery instruction that never disables the lead policy. */
47115
+ fix;
47116
+ /** Bounded original receipt, when available; oversized receipts are diagnostic only. */
47117
+ receipt;
47118
+ /** Nonsecret terminal/PID evidence for a guarded lead refusal. */
47119
+ details;
47120
+ /** Construct a refusal before any unsupported operation runs. */
47121
+ constructor(code, message, fix, receipt = null, details) {
47122
+ super(message.slice(0, MAX_DIAGNOSTIC_LENGTH));
47123
+ this.name = "OrcaExecutionError";
47124
+ this.code = code;
47125
+ this.fix = fix;
47126
+ this.details = details;
47127
+ const truncated = "[truncated]\n";
47128
+ this.receipt = receipt !== null && receipt.length > MAX_RECEIPT_LENGTH ? truncated + receipt.slice(0, MAX_RECEIPT_LENGTH - truncated.length) : receipt;
47129
+ }
47130
+ };
47131
+ }
47132
+ });
47133
+
47069
47134
  // packages/adapters/src/providers/shared/agent-spawn-wrapper.ts
47070
47135
  import { spawnSync } from "node:child_process";
47071
47136
  import { readFileSync as readFileSync6 } from "node:fs";
@@ -47303,7 +47368,7 @@ import {
47303
47368
  E_LEAD_NO_OWNER_CHANNEL as E_LEAD_NO_OWNER_CHANNEL3,
47304
47369
  LEAD_ASK_TOOL as LEAD_ASK_TOOL2
47305
47370
  } from "@cleocode/contracts/operations/orchestrate.js";
47306
- import { findOnPath, pathDelimiterFor, pathEnvKey, splitPathEnv } from "@cleocode/paths";
47371
+ import { findOnPath as findOnPath2, pathDelimiterFor as pathDelimiterFor2, pathEnvKey, splitPathEnv as splitPathEnv2 } from "@cleocode/paths";
47307
47372
  function leadSessionId(options) {
47308
47373
  const id = options?.leadSessionId;
47309
47374
  return typeof id === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(id) ? id : void 0;
@@ -47313,8 +47378,8 @@ function leadModeOf(options) {
47313
47378
  }
47314
47379
  function resolveAbsoluteBinary(name15, env = process.env) {
47315
47380
  const key = pathEnvKey(env);
47316
- const absolute = splitPathEnv(env[key]).filter((dir) => isAbsolute4(dir));
47317
- return findOnPath(name15, { env: { ...env, [key]: absolute.join(pathDelimiterFor()) } });
47381
+ const absolute = splitPathEnv2(env[key]).filter((dir) => isAbsolute4(dir));
47382
+ return findOnPath2(name15, { env: { ...env, [key]: absolute.join(pathDelimiterFor2()) } });
47318
47383
  }
47319
47384
  function shellQuote(value) {
47320
47385
  if (value.includes("'")) throw new Error(`refusing a hook argument with a quote: ${value}`);
@@ -47496,7 +47561,7 @@ import { spawn as nodeSpawn2 } from "node:child_process";
47496
47561
  import { writeFile as writeFile3 } from "node:fs/promises";
47497
47562
  import { dirname as dirname7, join as join11 } from "node:path";
47498
47563
  import { E_LEAD_NO_OWNER_CHANNEL as E_LEAD_NO_OWNER_CHANNEL4 } from "@cleocode/contracts/operations/orchestrate.js";
47499
- import { findOnPath as findOnPath2 } from "@cleocode/paths";
47564
+ import { findOnPath as findOnPath3 } from "@cleocode/paths";
47500
47565
  function trackedWorkerInstanceId(options) {
47501
47566
  const id = options?.workerInstanceId;
47502
47567
  return typeof id === "string" && /^[A-Za-z0-9-]+$/.test(id) ? id : void 0;
@@ -47539,6 +47604,7 @@ var init_spawn2 = __esm({
47539
47604
  "packages/adapters/src/providers/claude-code/spawn.ts"() {
47540
47605
  "use strict";
47541
47606
  init_src();
47607
+ init_orca_execution2();
47542
47608
  init_agent_spawn_wrapper();
47543
47609
  init_lead_tool_strip();
47544
47610
  init_prompt_file();
@@ -47556,7 +47622,7 @@ var init_spawn2 = __esm({
47556
47622
  * @returns true if `claude` is found on PATH (PATHEXT-aware on Windows)
47557
47623
  */
47558
47624
  async canSpawn() {
47559
- return findOnPath2("claude") !== null;
47625
+ return findOnPath3("claude") !== null;
47560
47626
  }
47561
47627
  /**
47562
47628
  * Spawn a subagent via Claude CLI.
@@ -47631,6 +47697,34 @@ var init_spawn2 = __esm({
47631
47697
  leadMcp: leadMcp.report
47632
47698
  };
47633
47699
  }
47700
+ if (context.leadTerminalLauncher) {
47701
+ const command = resolveAbsoluteBinary("claude");
47702
+ if (!command || !context.onLeadStarted) {
47703
+ throw new Error(
47704
+ "The guarded Orca lead needs an absolute claude binary and a lifecycle recorder."
47705
+ );
47706
+ }
47707
+ const terminal = await context.leadTerminalLauncher(
47708
+ {
47709
+ command,
47710
+ args: buildClaudeArgs(context, tmpFile, settingsArgs, leadMcp),
47711
+ cwd: context.workingDirectory ?? process.cwd(),
47712
+ tempDir: dir,
47713
+ env: envStrings(context.options)
47714
+ },
47715
+ context.onLeadStarted
47716
+ );
47717
+ return {
47718
+ instanceId,
47719
+ taskId: context.taskId,
47720
+ providerId: "claude-code",
47721
+ status: "running",
47722
+ startTime,
47723
+ leadMcp: leadMcp.report,
47724
+ leadTempDir: dir,
47725
+ leadTerminal: terminal
47726
+ };
47727
+ }
47634
47728
  if (leadModeOf(context.options) === "interactive") {
47635
47729
  const env = envStrings(context.options);
47636
47730
  const exit = await runInteractiveLead(
@@ -47704,10 +47798,19 @@ var init_spawn2 = __esm({
47704
47798
  ...leadMcp ? { leadMcp: leadMcp.report, leadTempDir: dirname7(tmpFile) } : {}
47705
47799
  };
47706
47800
  } catch (error48) {
47707
- console.error(`[ClaudeCodeSpawnProvider] Failed to spawn: ${getErrorMessage(error48)}`);
47708
47801
  if (tmpFile) {
47709
47802
  await removeSpawnPromptFile(tmpFile);
47710
47803
  }
47804
+ if (context.leadTerminalLauncher) {
47805
+ if (typeof error48 === "object" && error48 !== null && "code" in error48 && typeof error48.code === "string" && "fix" in error48 && typeof error48.fix === "string")
47806
+ throw error48;
47807
+ throw new OrcaExecutionError(
47808
+ "E_LEAD_TOOLS_UNSTRIPPED",
47809
+ getErrorMessage(error48),
47810
+ "Inspect the guarded Orca terminal setup and use --adapter claude-code; keep orchestrate.leadWorker.v1 enabled."
47811
+ );
47812
+ }
47813
+ console.error(`[ClaudeCodeSpawnProvider] Failed to spawn: ${getErrorMessage(error48)}`);
47711
47814
  return {
47712
47815
  instanceId,
47713
47816
  taskId: context.taskId,
@@ -47886,7 +47989,7 @@ var init_transport = __esm({
47886
47989
  import { existsSync as existsSync9 } from "node:fs";
47887
47990
  import { homedir as homedir6 } from "node:os";
47888
47991
  import { join as join13 } from "node:path";
47889
- import { findOnPath as findOnPath3 } from "@cleocode/paths";
47992
+ import { findOnPath as findOnPath4 } from "@cleocode/paths";
47890
47993
  var ClaudeCodeAdapter;
47891
47994
  var init_adapter = __esm({
47892
47995
  "packages/adapters/src/providers/claude-code/adapter.ts"() {
@@ -48034,7 +48137,7 @@ var init_adapter = __esm({
48034
48137
  };
48035
48138
  }
48036
48139
  let cliAvailable = false;
48037
- const resolvedCli = findOnPath3("claude");
48140
+ const resolvedCli = findOnPath4("claude");
48038
48141
  cliAvailable = resolvedCli !== null;
48039
48142
  if (resolvedCli) details.cliPath = resolvedCli;
48040
48143
  else details.cliAvailable = false;
@@ -49054,7 +49157,7 @@ var init_install3 = __esm({
49054
49157
  // packages/adapters/src/providers/opencode/spawn.ts
49055
49158
  import { mkdir as mkdir2, readFile as readFile4, writeFile as writeFile4 } from "node:fs/promises";
49056
49159
  import { join as join28 } from "node:path";
49057
- import { findOnPath as findOnPath10 } from "@cleocode/paths";
49160
+ import { findOnPath as findOnPath11 } from "@cleocode/paths";
49058
49161
  function buildOpenCodeAgentMarkdown(description, instructions) {
49059
49162
  const normalizedDesc = description.replace(/\s+/g, " ").trim();
49060
49163
  return [
@@ -49113,7 +49216,7 @@ var init_spawn3 = __esm({
49113
49216
  * @returns true if `opencode` is found on PATH (PATHEXT-aware on Windows)
49114
49217
  */
49115
49218
  async canSpawn() {
49116
- return findOnPath10("opencode") !== null;
49219
+ return findOnPath11("opencode") !== null;
49117
49220
  }
49118
49221
  /**
49119
49222
  * Spawn a subagent via OpenCode CLI.
@@ -49240,7 +49343,7 @@ var init_spawn3 = __esm({
49240
49343
  // packages/adapters/src/providers/opencode/adapter.ts
49241
49344
  import { existsSync as existsSync20 } from "node:fs";
49242
49345
  import { join as join29 } from "node:path";
49243
- import { findOnPath as findOnPath11 } from "@cleocode/paths";
49346
+ import { findOnPath as findOnPath12 } from "@cleocode/paths";
49244
49347
  var OpenCodeAdapter;
49245
49348
  var init_adapter3 = __esm({
49246
49349
  "packages/adapters/src/providers/opencode/adapter.ts"() {
@@ -49342,7 +49445,7 @@ var init_adapter3 = __esm({
49342
49445
  };
49343
49446
  }
49344
49447
  let cliAvailable = false;
49345
- const resolvedCli = findOnPath11("opencode");
49448
+ const resolvedCli = findOnPath12("opencode");
49346
49449
  cliAvailable = resolvedCli !== null;
49347
49450
  if (resolvedCli) details.cliPath = resolvedCli;
49348
49451
  else details.cliAvailable = false;
@@ -49633,7 +49736,7 @@ var init_install4 = __esm({
49633
49736
  });
49634
49737
 
49635
49738
  // packages/adapters/src/providers/pi/spawn.ts
49636
- import { findOnPath as findOnPath13 } from "@cleocode/paths";
49739
+ import { findOnPath as findOnPath14 } from "@cleocode/paths";
49637
49740
  function getPiCliPath() {
49638
49741
  return process.env["PI_CLI_PATH"] ?? "pi";
49639
49742
  }
@@ -49659,7 +49762,7 @@ var init_spawn4 = __esm({
49659
49762
  */
49660
49763
  async canSpawn() {
49661
49764
  const cliPath = getPiCliPath();
49662
- return findOnPath13(cliPath) !== null;
49765
+ return findOnPath14(cliPath) !== null;
49663
49766
  }
49664
49767
  /**
49665
49768
  * Spawn a subagent via Pi CLI.
@@ -49774,7 +49877,7 @@ var init_spawn4 = __esm({
49774
49877
  import { existsSync as existsSync23 } from "node:fs";
49775
49878
  import { homedir as homedir14 } from "node:os";
49776
49879
  import { join as join33 } from "node:path";
49777
- import { findOnPath as findOnPath14 } from "@cleocode/paths";
49880
+ import { findOnPath as findOnPath15 } from "@cleocode/paths";
49778
49881
  function getPiAgentDir() {
49779
49882
  const env = process.env["PI_CODING_AGENT_DIR"];
49780
49883
  if (env !== void 0 && env.length > 0) {
@@ -49889,7 +49992,7 @@ var init_adapter4 = __esm({
49889
49992
  }
49890
49993
  let cliAvailable = false;
49891
49994
  const cliPath = process.env["PI_CLI_PATH"] ?? "pi";
49892
- const resolvedCli = findOnPath14(cliPath);
49995
+ const resolvedCli = findOnPath15(cliPath);
49893
49996
  cliAvailable = resolvedCli !== null;
49894
49997
  if (resolvedCli) details.cliPath = cliPath === "pi" ? resolvedCli : cliPath;
49895
49998
  else details.cliAvailable = false;
@@ -50113,7 +50216,7 @@ function createAdapter2() {
50113
50216
  import { existsSync as existsSync12 } from "node:fs";
50114
50217
  import { homedir as homedir9 } from "node:os";
50115
50218
  import { join as join19 } from "node:path";
50116
- import { findOnPath as findOnPath4 } from "@cleocode/paths";
50219
+ import { findOnPath as findOnPath5 } from "@cleocode/paths";
50117
50220
 
50118
50221
  // packages/adapters/src/providers/codex/hooks.ts
50119
50222
  import { homedir as homedir8 } from "node:os";
@@ -50406,7 +50509,7 @@ var CodexAdapter = class {
50406
50509
  };
50407
50510
  }
50408
50511
  let cliAvailable = false;
50409
- const resolvedCli = findOnPath4("codex");
50512
+ const resolvedCli = findOnPath5("codex");
50410
50513
  cliAvailable = resolvedCli !== null;
50411
50514
  if (resolvedCli) details.cliPath = resolvedCli;
50412
50515
  else details.cliAvailable = false;
@@ -50442,7 +50545,7 @@ init_src();
50442
50545
  init_cli_spawn();
50443
50546
  init_lead_tool_strip();
50444
50547
  init_prompt_file();
50445
- import { findOnPath as findOnPath5 } from "@cleocode/paths";
50548
+ import { findOnPath as findOnPath6 } from "@cleocode/paths";
50446
50549
 
50447
50550
  // packages/adapters/src/providers/codex/index.ts
50448
50551
  function createAdapter3() {
@@ -50456,7 +50559,7 @@ init_cursor();
50456
50559
  import { existsSync as existsSync16 } from "node:fs";
50457
50560
  import { homedir as homedir11 } from "node:os";
50458
50561
  import { join as join24 } from "node:path";
50459
- import { findOnPath as findOnPath6 } from "@cleocode/paths";
50562
+ import { findOnPath as findOnPath7 } from "@cleocode/paths";
50460
50563
 
50461
50564
  // packages/adapters/src/providers/gemini-cli/hooks.ts
50462
50565
  import { homedir as homedir10 } from "node:os";
@@ -50698,7 +50801,7 @@ var GeminiCliAdapter = class {
50698
50801
  };
50699
50802
  }
50700
50803
  let cliAvailable = false;
50701
- const resolvedCli = findOnPath6("gemini");
50804
+ const resolvedCli = findOnPath7("gemini");
50702
50805
  cliAvailable = resolvedCli !== null;
50703
50806
  if (resolvedCli) details.cliPath = resolvedCli;
50704
50807
  else details.cliAvailable = false;
@@ -50733,7 +50836,7 @@ var GeminiCliAdapter = class {
50733
50836
  init_src();
50734
50837
  init_cli_spawn();
50735
50838
  init_lead_tool_strip();
50736
- import { findOnPath as findOnPath7 } from "@cleocode/paths";
50839
+ import { findOnPath as findOnPath8 } from "@cleocode/paths";
50737
50840
 
50738
50841
  // packages/adapters/src/providers/gemini-cli/index.ts
50739
50842
  function createAdapter5() {
@@ -50744,7 +50847,7 @@ function createAdapter5() {
50744
50847
  import { existsSync as existsSync18 } from "node:fs";
50745
50848
  import { homedir as homedir12 } from "node:os";
50746
50849
  import { join as join26 } from "node:path";
50747
- import { findOnPath as findOnPath8 } from "@cleocode/paths";
50850
+ import { findOnPath as findOnPath9 } from "@cleocode/paths";
50748
50851
 
50749
50852
  // packages/adapters/src/providers/kimi/hooks.ts
50750
50853
  var KimiHookProvider = class {
@@ -50954,7 +51057,7 @@ var KimiAdapter = class {
50954
51057
  };
50955
51058
  }
50956
51059
  let cliAvailable = false;
50957
- const resolvedCli = findOnPath8("kimi");
51060
+ const resolvedCli = findOnPath9("kimi");
50958
51061
  cliAvailable = resolvedCli !== null;
50959
51062
  if (resolvedCli) details.cliPath = resolvedCli;
50960
51063
  else details.cliAvailable = false;
@@ -50988,7 +51091,7 @@ var KimiAdapter = class {
50988
51091
  // packages/adapters/src/providers/kimi/spawn.ts
50989
51092
  init_src();
50990
51093
  init_lead_tool_strip();
50991
- import { findOnPath as findOnPath9 } from "@cleocode/paths";
51094
+ import { findOnPath as findOnPath10 } from "@cleocode/paths";
50992
51095
 
50993
51096
  // packages/adapters/src/providers/kimi/index.ts
50994
51097
  function createAdapter6() {
@@ -51007,7 +51110,7 @@ import { existsSync as existsSync21, lstatSync, readFileSync as readFileSync13,
51007
51110
  import { homedir as homedir13 } from "node:os";
51008
51111
  import { dirname as dirname8, join as join30 } from "node:path";
51009
51112
  import { JsonConfigParseError } from "@cleocode/caamp";
51010
- import { findOnPath as findOnPath12 } from "@cleocode/paths";
51113
+ import { findOnPath as findOnPath13 } from "@cleocode/paths";
51011
51114
  var HEAVY_HOOK_DELIVERY_PROVIDERS = Object.freeze([
51012
51115
  "claude-code",
51013
51116
  "codex",
@@ -51041,11 +51144,11 @@ function detectHeavyHookProvider(provider, projectDir, env = process.env) {
51041
51144
  "running inside Claude Code"
51042
51145
  ],
51043
51146
  [() => existsSync21(join30(projectDir, ".claude")), "the project has .claude/"],
51044
- [() => findOnPath12("claude", { env }) !== null, "`claude` is on PATH"],
51147
+ [() => findOnPath13("claude", { env }) !== null, "`claude` is on PATH"],
51045
51148
  [() => existsSync21(env.CLAUDE_CONFIG_DIR || join30(home, ".claude")), "~/.claude exists"]
51046
51149
  ] : provider === "codex" ? [
51047
51150
  [() => existsSync21(join30(projectDir, ".codex")), "the project has .codex"],
51048
- [() => findOnPath12("codex", { env }) !== null, "`codex` is on PATH"],
51151
+ [() => findOnPath13("codex", { env }) !== null, "`codex` is on PATH"],
51049
51152
  [() => existsSync21(env.CODEX_HOME || join30(home, ".codex")), "~/.codex exists"]
51050
51153
  ] : provider === "opencode" ? [
51051
51154
  [() => existsSync21(join30(projectDir, ".opencode")), "the project has .opencode/"],
@@ -51053,13 +51156,13 @@ function detectHeavyHookProvider(provider, projectDir, env = process.env) {
51053
51156
  () => existsSync21(join30(projectDir, "opencode.json")) || existsSync21(join30(projectDir, "opencode.jsonc")),
51054
51157
  "the project has opencode.json"
51055
51158
  ],
51056
- [() => findOnPath12("opencode", { env }) !== null, "`opencode` is on PATH"],
51159
+ [() => findOnPath13("opencode", { env }) !== null, "`opencode` is on PATH"],
51057
51160
  [
51058
51161
  () => existsSync21(join30(env.XDG_CONFIG_HOME || join30(home, ".config"), "opencode")),
51059
51162
  "~/.config/opencode exists"
51060
51163
  ]
51061
51164
  ] : [
51062
- [() => findOnPath12("kimi", { env }) !== null, "`kimi` is on PATH"],
51165
+ [() => findOnPath13("kimi", { env }) !== null, "`kimi` is on PATH"],
51063
51166
  [() => existsSync21(join30(home, ".kimi")), "~/.kimi exists"]
51064
51167
  ];
51065
51168
  for (const [test, why] of signals) {
@@ -51433,7 +51536,7 @@ function hasOlderCleoMarker(cleoPath, dir, env) {
51433
51536
  }
51434
51537
  function probeHeavyHookCli(projectDir, options = {}) {
51435
51538
  const env = options.env ?? process.env;
51436
- const path = findOnPath12("cleo", { env });
51539
+ const path = findOnPath13("cleo", { env });
51437
51540
  if (path === null) {
51438
51541
  return {
51439
51542
  state: "missing",