@cleocode/adapters 2026.4.67 → 2026.4.68
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/index.js +50 -32
- package/dist/index.js.map +4 -4
- package/dist/providers/codex/index.d.ts +1 -0
- package/dist/providers/codex/index.d.ts.map +1 -1
- package/dist/providers/codex/spawn.d.ts +82 -0
- package/dist/providers/codex/spawn.d.ts.map +1 -0
- package/dist/providers/gemini-cli/index.d.ts +1 -0
- package/dist/providers/gemini-cli/index.d.ts.map +1 -1
- package/dist/providers/gemini-cli/spawn.d.ts +83 -0
- package/dist/providers/gemini-cli/spawn.d.ts.map +1 -0
- package/dist/providers/kimi/index.d.ts +1 -0
- package/dist/providers/kimi/index.d.ts.map +1 -1
- package/dist/providers/kimi/spawn.d.ts +91 -0
- package/dist/providers/kimi/spawn.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/providers/codex/index.ts +1 -0
- package/src/providers/codex/spawn.ts +224 -0
- package/src/providers/gemini-cli/index.ts +1 -0
- package/src/providers/gemini-cli/spawn.ts +220 -0
- package/src/providers/kimi/index.ts +1 -0
- package/src/providers/kimi/spawn.ts +274 -0
package/dist/index.js
CHANGED
|
@@ -21749,10 +21749,10 @@ var init_install3 = __esm({
|
|
|
21749
21749
|
});
|
|
21750
21750
|
|
|
21751
21751
|
// packages/adapters/src/providers/opencode/spawn.ts
|
|
21752
|
-
import { exec as
|
|
21752
|
+
import { exec as exec9, spawn as nodeSpawn4 } from "node:child_process";
|
|
21753
21753
|
import { mkdir as mkdir2, readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
|
|
21754
21754
|
import { join as join23 } from "node:path";
|
|
21755
|
-
import { promisify as
|
|
21755
|
+
import { promisify as promisify10 } from "node:util";
|
|
21756
21756
|
function buildOpenCodeAgentMarkdown(description, instructions) {
|
|
21757
21757
|
const normalizedDesc = description.replace(/\s+/g, " ").trim();
|
|
21758
21758
|
return [
|
|
@@ -21791,11 +21791,11 @@ async function ensureSubagentDefinition(workingDirectory, enrichedInstructions)
|
|
|
21791
21791
|
}
|
|
21792
21792
|
return OPENCODE_SUBAGENT_NAME;
|
|
21793
21793
|
}
|
|
21794
|
-
var
|
|
21794
|
+
var execAsync9, OPENCODE_SUBAGENT_NAME, OPENCODE_FALLBACK_AGENT, OpenCodeSpawnProvider;
|
|
21795
21795
|
var init_spawn3 = __esm({
|
|
21796
21796
|
"packages/adapters/src/providers/opencode/spawn.ts"() {
|
|
21797
21797
|
"use strict";
|
|
21798
|
-
|
|
21798
|
+
execAsync9 = promisify10(exec9);
|
|
21799
21799
|
OPENCODE_SUBAGENT_NAME = "cleo-subagent";
|
|
21800
21800
|
OPENCODE_FALLBACK_AGENT = "general";
|
|
21801
21801
|
OpenCodeSpawnProvider = class {
|
|
@@ -21808,7 +21808,7 @@ var init_spawn3 = __esm({
|
|
|
21808
21808
|
*/
|
|
21809
21809
|
async canSpawn() {
|
|
21810
21810
|
try {
|
|
21811
|
-
await
|
|
21811
|
+
await execAsync9("which opencode");
|
|
21812
21812
|
return true;
|
|
21813
21813
|
} catch {
|
|
21814
21814
|
return false;
|
|
@@ -21845,7 +21845,7 @@ var init_spawn3 = __esm({
|
|
|
21845
21845
|
} catch {
|
|
21846
21846
|
agentName = OPENCODE_FALLBACK_AGENT;
|
|
21847
21847
|
}
|
|
21848
|
-
const child =
|
|
21848
|
+
const child = nodeSpawn4(
|
|
21849
21849
|
"opencode",
|
|
21850
21850
|
[
|
|
21851
21851
|
"run",
|
|
@@ -21940,18 +21940,18 @@ var init_spawn3 = __esm({
|
|
|
21940
21940
|
});
|
|
21941
21941
|
|
|
21942
21942
|
// packages/adapters/src/providers/opencode/adapter.ts
|
|
21943
|
-
import { exec as
|
|
21943
|
+
import { exec as exec10 } from "node:child_process";
|
|
21944
21944
|
import { existsSync as existsSync19 } from "node:fs";
|
|
21945
21945
|
import { join as join24 } from "node:path";
|
|
21946
|
-
import { promisify as
|
|
21947
|
-
var
|
|
21946
|
+
import { promisify as promisify11 } from "node:util";
|
|
21947
|
+
var execAsync10, OpenCodeAdapter;
|
|
21948
21948
|
var init_adapter3 = __esm({
|
|
21949
21949
|
"packages/adapters/src/providers/opencode/adapter.ts"() {
|
|
21950
21950
|
"use strict";
|
|
21951
21951
|
init_hooks3();
|
|
21952
21952
|
init_install3();
|
|
21953
21953
|
init_spawn3();
|
|
21954
|
-
|
|
21954
|
+
execAsync10 = promisify11(exec10);
|
|
21955
21955
|
OpenCodeAdapter = class {
|
|
21956
21956
|
/** Unique provider identifier. */
|
|
21957
21957
|
id = "opencode";
|
|
@@ -22047,7 +22047,7 @@ var init_adapter3 = __esm({
|
|
|
22047
22047
|
}
|
|
22048
22048
|
let cliAvailable = false;
|
|
22049
22049
|
try {
|
|
22050
|
-
const { stdout } = await
|
|
22050
|
+
const { stdout } = await execAsync10("which opencode");
|
|
22051
22051
|
cliAvailable = stdout.trim().length > 0;
|
|
22052
22052
|
details.cliPath = stdout.trim();
|
|
22053
22053
|
} catch {
|
|
@@ -22397,18 +22397,18 @@ var init_install4 = __esm({
|
|
|
22397
22397
|
});
|
|
22398
22398
|
|
|
22399
22399
|
// packages/adapters/src/providers/pi/spawn.ts
|
|
22400
|
-
import { exec as
|
|
22400
|
+
import { exec as exec11, spawn as nodeSpawn5 } from "node:child_process";
|
|
22401
22401
|
import { unlink as unlink2, writeFile as writeFile3 } from "node:fs/promises";
|
|
22402
|
-
import { promisify as
|
|
22402
|
+
import { promisify as promisify12 } from "node:util";
|
|
22403
22403
|
function getPiCliPath() {
|
|
22404
22404
|
return process.env["PI_CLI_PATH"] ?? "pi";
|
|
22405
22405
|
}
|
|
22406
|
-
var
|
|
22406
|
+
var execAsync11, PiSpawnProvider;
|
|
22407
22407
|
var init_spawn4 = __esm({
|
|
22408
22408
|
"packages/adapters/src/providers/pi/spawn.ts"() {
|
|
22409
22409
|
"use strict";
|
|
22410
22410
|
init_src();
|
|
22411
|
-
|
|
22411
|
+
execAsync11 = promisify12(exec11);
|
|
22412
22412
|
PiSpawnProvider = class {
|
|
22413
22413
|
/** Map of instance IDs to tracked process info. */
|
|
22414
22414
|
processMap = /* @__PURE__ */ new Map();
|
|
@@ -22423,10 +22423,10 @@ var init_spawn4 = __esm({
|
|
|
22423
22423
|
const cliPath = getPiCliPath();
|
|
22424
22424
|
try {
|
|
22425
22425
|
if (cliPath !== "pi") {
|
|
22426
|
-
const { stdout } = await
|
|
22426
|
+
const { stdout } = await execAsync11(`test -x "${cliPath}" && echo ok`);
|
|
22427
22427
|
return stdout.trim() === "ok";
|
|
22428
22428
|
}
|
|
22429
|
-
await
|
|
22429
|
+
await execAsync11("which pi");
|
|
22430
22430
|
return true;
|
|
22431
22431
|
} catch {
|
|
22432
22432
|
return false;
|
|
@@ -22457,7 +22457,7 @@ var init_spawn4 = __esm({
|
|
|
22457
22457
|
if (context.workingDirectory) {
|
|
22458
22458
|
spawnOpts.cwd = context.workingDirectory;
|
|
22459
22459
|
}
|
|
22460
|
-
const child =
|
|
22460
|
+
const child = nodeSpawn5(cliPath, args, spawnOpts);
|
|
22461
22461
|
child.unref();
|
|
22462
22462
|
if (child.pid) {
|
|
22463
22463
|
this.processMap.set(instanceId, {
|
|
@@ -22548,11 +22548,11 @@ var init_spawn4 = __esm({
|
|
|
22548
22548
|
});
|
|
22549
22549
|
|
|
22550
22550
|
// packages/adapters/src/providers/pi/adapter.ts
|
|
22551
|
-
import { exec as
|
|
22551
|
+
import { exec as exec12 } from "node:child_process";
|
|
22552
22552
|
import { existsSync as existsSync21 } from "node:fs";
|
|
22553
22553
|
import { homedir as homedir15 } from "node:os";
|
|
22554
22554
|
import { join as join26 } from "node:path";
|
|
22555
|
-
import { promisify as
|
|
22555
|
+
import { promisify as promisify13 } from "node:util";
|
|
22556
22556
|
function getPiAgentDir2() {
|
|
22557
22557
|
const env = process.env["PI_CODING_AGENT_DIR"];
|
|
22558
22558
|
if (env !== void 0 && env.length > 0) {
|
|
@@ -22566,14 +22566,14 @@ function getPiAgentDir2() {
|
|
|
22566
22566
|
}
|
|
22567
22567
|
return join26(homedir15(), ".pi", "agent");
|
|
22568
22568
|
}
|
|
22569
|
-
var
|
|
22569
|
+
var execAsync12, PiAdapter;
|
|
22570
22570
|
var init_adapter4 = __esm({
|
|
22571
22571
|
"packages/adapters/src/providers/pi/adapter.ts"() {
|
|
22572
22572
|
"use strict";
|
|
22573
22573
|
init_hooks4();
|
|
22574
22574
|
init_install4();
|
|
22575
22575
|
init_spawn4();
|
|
22576
|
-
|
|
22576
|
+
execAsync12 = promisify13(exec12);
|
|
22577
22577
|
PiAdapter = class {
|
|
22578
22578
|
/** Unique provider identifier. */
|
|
22579
22579
|
id = "pi";
|
|
@@ -22670,11 +22670,11 @@ var init_adapter4 = __esm({
|
|
|
22670
22670
|
const cliPath = process.env["PI_CLI_PATH"] ?? "pi";
|
|
22671
22671
|
try {
|
|
22672
22672
|
if (cliPath !== "pi") {
|
|
22673
|
-
const { stdout } = await
|
|
22673
|
+
const { stdout } = await execAsync12(`test -x "${cliPath}" && echo ok`);
|
|
22674
22674
|
cliAvailable = stdout.trim() === "ok";
|
|
22675
22675
|
details.cliPath = cliPath;
|
|
22676
22676
|
} else {
|
|
22677
|
-
const { stdout } = await
|
|
22677
|
+
const { stdout } = await execAsync12("which pi");
|
|
22678
22678
|
cliAvailable = stdout.trim().length > 0;
|
|
22679
22679
|
details.cliPath = stdout.trim();
|
|
22680
22680
|
}
|
|
@@ -23092,6 +23092,12 @@ var CodexAdapter = class {
|
|
|
23092
23092
|
}
|
|
23093
23093
|
};
|
|
23094
23094
|
|
|
23095
|
+
// packages/adapters/src/providers/codex/spawn.ts
|
|
23096
|
+
import { exec as exec4, spawn as nodeSpawn2 } from "node:child_process";
|
|
23097
|
+
init_src();
|
|
23098
|
+
import { promisify as promisify5 } from "node:util";
|
|
23099
|
+
var execAsync4 = promisify5(exec4);
|
|
23100
|
+
|
|
23095
23101
|
// packages/adapters/src/providers/codex/index.ts
|
|
23096
23102
|
function createAdapter2() {
|
|
23097
23103
|
return new CodexAdapter();
|
|
@@ -23101,11 +23107,11 @@ function createAdapter2() {
|
|
|
23101
23107
|
init_cursor();
|
|
23102
23108
|
|
|
23103
23109
|
// packages/adapters/src/providers/gemini-cli/adapter.ts
|
|
23104
|
-
import { exec as
|
|
23110
|
+
import { exec as exec5 } from "node:child_process";
|
|
23105
23111
|
import { existsSync as existsSync15 } from "node:fs";
|
|
23106
23112
|
import { homedir as homedir12 } from "node:os";
|
|
23107
23113
|
import { join as join19 } from "node:path";
|
|
23108
|
-
import { promisify as
|
|
23114
|
+
import { promisify as promisify6 } from "node:util";
|
|
23109
23115
|
|
|
23110
23116
|
// packages/adapters/src/providers/gemini-cli/hooks.ts
|
|
23111
23117
|
import { homedir as homedir11 } from "node:os";
|
|
@@ -23288,7 +23294,7 @@ var GeminiCliInstallProvider = class {
|
|
|
23288
23294
|
};
|
|
23289
23295
|
|
|
23290
23296
|
// packages/adapters/src/providers/gemini-cli/adapter.ts
|
|
23291
|
-
var
|
|
23297
|
+
var execAsync5 = promisify6(exec5);
|
|
23292
23298
|
var GeminiCliAdapter = class {
|
|
23293
23299
|
/** Unique provider identifier. */
|
|
23294
23300
|
id = "gemini-cli";
|
|
@@ -23377,7 +23383,7 @@ var GeminiCliAdapter = class {
|
|
|
23377
23383
|
}
|
|
23378
23384
|
let cliAvailable = false;
|
|
23379
23385
|
try {
|
|
23380
|
-
const { stdout } = await
|
|
23386
|
+
const { stdout } = await execAsync5("which gemini");
|
|
23381
23387
|
cliAvailable = stdout.trim().length > 0;
|
|
23382
23388
|
details.cliPath = stdout.trim();
|
|
23383
23389
|
} catch {
|
|
@@ -23410,17 +23416,23 @@ var GeminiCliAdapter = class {
|
|
|
23410
23416
|
}
|
|
23411
23417
|
};
|
|
23412
23418
|
|
|
23419
|
+
// packages/adapters/src/providers/gemini-cli/spawn.ts
|
|
23420
|
+
init_src();
|
|
23421
|
+
import { exec as exec6, spawn as nodeSpawn3 } from "node:child_process";
|
|
23422
|
+
import { promisify as promisify7 } from "node:util";
|
|
23423
|
+
var execAsync6 = promisify7(exec6);
|
|
23424
|
+
|
|
23413
23425
|
// packages/adapters/src/providers/gemini-cli/index.ts
|
|
23414
23426
|
function createAdapter4() {
|
|
23415
23427
|
return new GeminiCliAdapter();
|
|
23416
23428
|
}
|
|
23417
23429
|
|
|
23418
23430
|
// packages/adapters/src/providers/kimi/adapter.ts
|
|
23419
|
-
import { exec as
|
|
23431
|
+
import { exec as exec7 } from "node:child_process";
|
|
23420
23432
|
import { existsSync as existsSync17 } from "node:fs";
|
|
23421
23433
|
import { homedir as homedir13 } from "node:os";
|
|
23422
23434
|
import { join as join21 } from "node:path";
|
|
23423
|
-
import { promisify as
|
|
23435
|
+
import { promisify as promisify8 } from "node:util";
|
|
23424
23436
|
|
|
23425
23437
|
// packages/adapters/src/providers/kimi/hooks.ts
|
|
23426
23438
|
var KimiHookProvider = class {
|
|
@@ -23574,7 +23586,7 @@ var KimiInstallProvider = class {
|
|
|
23574
23586
|
};
|
|
23575
23587
|
|
|
23576
23588
|
// packages/adapters/src/providers/kimi/adapter.ts
|
|
23577
|
-
var
|
|
23589
|
+
var execAsync7 = promisify8(exec7);
|
|
23578
23590
|
var KimiAdapter = class {
|
|
23579
23591
|
/** Unique provider identifier. */
|
|
23580
23592
|
id = "kimi";
|
|
@@ -23650,7 +23662,7 @@ var KimiAdapter = class {
|
|
|
23650
23662
|
}
|
|
23651
23663
|
let cliAvailable = false;
|
|
23652
23664
|
try {
|
|
23653
|
-
const { stdout } = await
|
|
23665
|
+
const { stdout } = await execAsync7("which kimi");
|
|
23654
23666
|
cliAvailable = stdout.trim().length > 0;
|
|
23655
23667
|
details.cliPath = stdout.trim();
|
|
23656
23668
|
} catch {
|
|
@@ -23683,6 +23695,12 @@ var KimiAdapter = class {
|
|
|
23683
23695
|
}
|
|
23684
23696
|
};
|
|
23685
23697
|
|
|
23698
|
+
// packages/adapters/src/providers/kimi/spawn.ts
|
|
23699
|
+
init_src();
|
|
23700
|
+
import { exec as exec8 } from "node:child_process";
|
|
23701
|
+
import { promisify as promisify9 } from "node:util";
|
|
23702
|
+
var execAsync8 = promisify9(exec8);
|
|
23703
|
+
|
|
23686
23704
|
// packages/adapters/src/providers/kimi/index.ts
|
|
23687
23705
|
function createAdapter5() {
|
|
23688
23706
|
return new KimiAdapter();
|