@cleocode/adapters 2026.11.19 → 2026.11.20

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.
@@ -620,6 +620,7 @@ import {
620
620
  import { homedir as homedir2, tmpdir } from "node:os";
621
621
  import { dirname, isAbsolute, join as join3, resolve } from "node:path";
622
622
  import { updateJsonConfigFile } from "@cleocode/caamp";
623
+ import { boundedExecOptions } from "@cleocode/paths";
623
624
 
624
625
  // packages/adapters/src/providers/shared/hook-config.ts
625
626
  var CLEO_HOOK_MARKER = "# cleo-hook";
@@ -858,12 +859,16 @@ var CODEX_HOOKS_FILE = ".codex/hooks.json";
858
859
  var OPENCODE_PLUGIN_FILE = `.opencode/plugins/${OPENCODE_HEAVY_COMMAND_PLUGIN}`;
859
860
  function gitOutput(projectDir, args, env = process.env) {
860
861
  try {
861
- return execFileSync("git", ["-C", projectDir, ...args], {
862
- encoding: "utf-8",
863
- stdio: ["ignore", "pipe", "ignore"],
864
- timeout: 5e3,
865
- env
866
- }).trim();
862
+ return execFileSync(
863
+ "git",
864
+ ["-C", projectDir, ...args],
865
+ boundedExecOptions({
866
+ encoding: "utf-8",
867
+ stdio: ["ignore", "pipe", "ignore"],
868
+ timeout: 5e3,
869
+ env
870
+ })
871
+ ).trim();
867
872
  } catch {
868
873
  return null;
869
874
  }
@@ -983,11 +988,15 @@ function restoreCommittedCodexHooks(projectDir) {
983
988
  let committed;
984
989
  let working;
985
990
  try {
986
- committed = execFileSync("git", ["-C", projectDir, "show", `HEAD:./${CODEX_HOOKS_FILE}`], {
987
- encoding: "utf-8",
988
- stdio: ["ignore", "pipe", "ignore"],
989
- timeout: 5e3
990
- });
991
+ committed = execFileSync(
992
+ "git",
993
+ ["-C", projectDir, "show", `HEAD:./${CODEX_HOOKS_FILE}`],
994
+ boundedExecOptions({
995
+ encoding: "utf-8",
996
+ stdio: ["ignore", "pipe", "ignore"],
997
+ timeout: 5e3
998
+ })
999
+ );
991
1000
  working = JSON.parse(readFileSync(file, "utf-8"));
992
1001
  } catch {
993
1002
  return false;
@@ -13497,15 +13506,22 @@ var OPERATIONS = [
13497
13506
  tier: 1,
13498
13507
  idempotent: true,
13499
13508
  sessionRequired: false,
13500
- requiredParams: ["taskId"],
13509
+ requiredParams: [],
13501
13510
  params: [
13502
13511
  {
13503
13512
  name: "taskId",
13504
13513
  type: "string",
13505
- required: true,
13506
- description: "Task ID whose XDG worktree should be destroyed (e.g. T9805).",
13514
+ required: false,
13515
+ description: "Task ID whose XDG worktree should be destroyed (e.g. T9805). Give it or worktreePath, not both.",
13507
13516
  cli: { positional: true }
13508
13517
  },
13518
+ {
13519
+ name: "worktreePath",
13520
+ type: "string",
13521
+ required: false,
13522
+ description: "Exact path of a registered linked worktree to destroy, for one no task id names such as a detached HEAD (T14627). CLI: --path.",
13523
+ cli: { flag: "path" }
13524
+ },
13509
13525
  {
13510
13526
  name: "force",
13511
13527
  type: "boolean",