@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.
- package/dist/.source-stamp.json +1 -1
- package/dist/heavy-command-hook.js +20 -11
- package/dist/heavy-command-hook.js.map +1 -1
- package/dist/index.js +30 -14
- package/dist/index.js.map +1 -1
- package/dist/project-hook-delivery.d.ts.map +1 -1
- package/dist/project-hook-delivery.js +26 -16
- package/dist/project-hook-delivery.js.map +2 -2
- package/dist/providers/claude-code/index.js +21 -9
- package/dist/providers/claude-code/index.js.map +1 -1
- package/dist/providers/claude-sdk/index.js +10 -3
- package/dist/providers/claude-sdk/index.js.map +1 -1
- package/dist/providers/codex/index.js +30 -14
- package/dist/providers/codex/index.js.map +1 -1
- package/dist/providers/cursor/index.js +1 -0
- package/dist/providers/cursor/index.js.map +1 -1
- package/dist/providers/gemini-cli/index.js +10 -3
- package/dist/providers/gemini-cli/index.js.map +1 -1
- package/dist/providers/kimi/index.js +10 -3
- package/dist/providers/kimi/index.js.map +1 -1
- package/dist/providers/openai-sdk/index.js +10 -3
- package/dist/providers/openai-sdk/index.js.map +1 -1
- package/dist/providers/opencode/index.js +21 -9
- package/dist/providers/opencode/index.js.map +1 -1
- package/dist/providers/pi/index.js +10 -3
- package/dist/providers/pi/index.js.map +1 -1
- package/dist/providers/shared/heavy-command-hook-install.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/project-hook-delivery.ts +15 -10
- package/src/providers/shared/heavy-command-hook-install.ts +20 -11
|
@@ -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(
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
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(
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
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: [
|
|
13509
|
+
requiredParams: [],
|
|
13501
13510
|
params: [
|
|
13502
13511
|
{
|
|
13503
13512
|
name: "taskId",
|
|
13504
13513
|
type: "string",
|
|
13505
|
-
required:
|
|
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",
|