@cleocode/adapters 2026.4.41 → 2026.4.43
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/cant-context.d.ts +35 -0
- package/dist/cant-context.d.ts.map +1 -1
- package/dist/index.js +152 -32
- package/dist/index.js.map +3 -3
- package/package.json +7 -5
- package/src/cant-context.ts +210 -20
- package/dist/cant-context.js +0 -284
- package/dist/cant-context.js.map +0 -1
- package/dist/providers/claude-code/adapter.js +0 -187
- package/dist/providers/claude-code/adapter.js.map +0 -1
- package/dist/providers/claude-code/context-monitor.js +0 -159
- package/dist/providers/claude-code/context-monitor.js.map +0 -1
- package/dist/providers/claude-code/hooks.js +0 -389
- package/dist/providers/claude-code/hooks.js.map +0 -1
- package/dist/providers/claude-code/index.js +0 -41
- package/dist/providers/claude-code/index.js.map +0 -1
- package/dist/providers/claude-code/install.js +0 -199
- package/dist/providers/claude-code/install.js.map +0 -1
- package/dist/providers/claude-code/paths.js +0 -41
- package/dist/providers/claude-code/paths.js.map +0 -1
- package/dist/providers/claude-code/spawn.js +0 -185
- package/dist/providers/claude-code/spawn.js.map +0 -1
- package/dist/providers/claude-code/statusline.js +0 -130
- package/dist/providers/claude-code/statusline.js.map +0 -1
- package/dist/providers/claude-code/task-sync.js +0 -119
- package/dist/providers/claude-code/task-sync.js.map +0 -1
- package/dist/providers/claude-code/transport.js +0 -29
- package/dist/providers/claude-code/transport.js.map +0 -1
- package/dist/providers/codex/adapter.js +0 -146
- package/dist/providers/codex/adapter.js.map +0 -1
- package/dist/providers/codex/hooks.js +0 -113
- package/dist/providers/codex/hooks.js.map +0 -1
- package/dist/providers/codex/index.js +0 -39
- package/dist/providers/codex/index.js.map +0 -1
- package/dist/providers/codex/install.js +0 -124
- package/dist/providers/codex/install.js.map +0 -1
- package/dist/providers/cursor/adapter.js +0 -151
- package/dist/providers/cursor/adapter.js.map +0 -1
- package/dist/providers/cursor/hooks.js +0 -208
- package/dist/providers/cursor/hooks.js.map +0 -1
- package/dist/providers/cursor/index.js +0 -36
- package/dist/providers/cursor/index.js.map +0 -1
- package/dist/providers/cursor/install.js +0 -180
- package/dist/providers/cursor/install.js.map +0 -1
- package/dist/providers/cursor/spawn.js +0 -59
- package/dist/providers/cursor/spawn.js.map +0 -1
- package/dist/providers/gemini-cli/adapter.js +0 -158
- package/dist/providers/gemini-cli/adapter.js.map +0 -1
- package/dist/providers/gemini-cli/hooks.js +0 -128
- package/dist/providers/gemini-cli/hooks.js.map +0 -1
- package/dist/providers/gemini-cli/index.js +0 -39
- package/dist/providers/gemini-cli/index.js.map +0 -1
- package/dist/providers/gemini-cli/install.js +0 -124
- package/dist/providers/gemini-cli/install.js.map +0 -1
- package/dist/providers/kimi/adapter.js +0 -145
- package/dist/providers/kimi/adapter.js.map +0 -1
- package/dist/providers/kimi/hooks.js +0 -79
- package/dist/providers/kimi/hooks.js.map +0 -1
- package/dist/providers/kimi/index.js +0 -39
- package/dist/providers/kimi/index.js.map +0 -1
- package/dist/providers/kimi/install.js +0 -124
- package/dist/providers/kimi/install.js.map +0 -1
- package/dist/providers/opencode/adapter.js +0 -166
- package/dist/providers/opencode/adapter.js.map +0 -1
- package/dist/providers/opencode/hooks.js +0 -206
- package/dist/providers/opencode/hooks.js.map +0 -1
- package/dist/providers/opencode/index.js +0 -37
- package/dist/providers/opencode/index.js.map +0 -1
- package/dist/providers/opencode/install.js +0 -115
- package/dist/providers/opencode/install.js.map +0 -1
- package/dist/providers/opencode/spawn.js +0 -256
- package/dist/providers/opencode/spawn.js.map +0 -1
- package/dist/providers/pi/adapter.js +0 -220
- package/dist/providers/pi/adapter.js.map +0 -1
- package/dist/providers/pi/hooks.js +0 -223
- package/dist/providers/pi/hooks.js.map +0 -1
- package/dist/providers/pi/index.js +0 -38
- package/dist/providers/pi/index.js.map +0 -1
- package/dist/providers/pi/install.js +0 -175
- package/dist/providers/pi/install.js.map +0 -1
- package/dist/providers/pi/spawn.js +0 -187
- package/dist/providers/pi/spawn.js.map +0 -1
- package/dist/providers/shared/transcript-reader.js +0 -124
- package/dist/providers/shared/transcript-reader.js.map +0 -1
- package/dist/registry.js +0 -92
- package/dist/registry.js.map +0 -1
package/dist/cant-context.d.ts
CHANGED
|
@@ -41,6 +41,17 @@ export interface BuildCantEnrichedPromptOptions {
|
|
|
41
41
|
basePrompt: string;
|
|
42
42
|
/** Agent name for mental model injection. Omit to skip mental model fetch. */
|
|
43
43
|
agentName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* When true, prepend the CleoOS identity bootstrap from CLEOOS-IDENTITY.md.
|
|
46
|
+
* Intended for the main session agent only — sub-agents get identity via CANT bundle.
|
|
47
|
+
*/
|
|
48
|
+
isMainAgent?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Pre-compiled CANT bundle string (from a session-level cache).
|
|
51
|
+
* When provided, steps 1–3 (discovery + compile + render) are skipped.
|
|
52
|
+
* Use this to avoid double-compilation when the Pi bridge already compiled the bundle.
|
|
53
|
+
*/
|
|
54
|
+
compiledBundle?: string;
|
|
44
55
|
}
|
|
45
56
|
/**
|
|
46
57
|
* Recursively discover `.cant` files in a directory.
|
|
@@ -105,6 +116,30 @@ export declare function buildMemoryBridgeBlock(content: string): string;
|
|
|
105
116
|
* or empty string when `observations` is empty.
|
|
106
117
|
*/
|
|
107
118
|
export declare function buildMentalModelInjection(agentName: string, observations: MentalModelObservation[]): string;
|
|
119
|
+
/**
|
|
120
|
+
* Read CLEOOS-IDENTITY.md from the project or global XDG location.
|
|
121
|
+
*
|
|
122
|
+
* Search order:
|
|
123
|
+
* 1. `<projectDir>/.cleo/CLEOOS-IDENTITY.md` (project-level, deployed by init)
|
|
124
|
+
* 2. `$XDG_DATA_HOME/cleo/CLEOOS-IDENTITY.md` (global XDG default)
|
|
125
|
+
*
|
|
126
|
+
* @param projectDir - The project root directory.
|
|
127
|
+
* @returns The identity file content, or null if not found.
|
|
128
|
+
*/
|
|
129
|
+
export declare function readIdentityFile(projectDir: string): string | null;
|
|
130
|
+
/**
|
|
131
|
+
* Build the CleoOS identity bootstrap block for the main session agent.
|
|
132
|
+
*
|
|
133
|
+
* Reads CLEOOS-IDENTITY.md from disk and appends live operational context
|
|
134
|
+
* (current session briefing, next tasks, recent brain decisions) gathered
|
|
135
|
+
* via best-effort CLI calls with an 8-second timeout each.
|
|
136
|
+
*
|
|
137
|
+
* Returns an empty string on any failure — never throws.
|
|
138
|
+
*
|
|
139
|
+
* @param projectDir - The project root directory (used for CWD and file lookup).
|
|
140
|
+
* @returns The fully assembled identity block, or "" if unavailable.
|
|
141
|
+
*/
|
|
142
|
+
export declare function buildIdentityBootstrap(projectDir: string): Promise<string>;
|
|
108
143
|
/**
|
|
109
144
|
* Build an enriched prompt with CANT context, memory bridge, and mental model.
|
|
110
145
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cant-context.d.ts","sourceRoot":"","sources":["../src/cant-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"cant-context.d.ts","sourceRoot":"","sources":["../src/cant-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAcH,qDAAqD;AACrD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,6EAA6E;AAC7E,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gDAAgD;AAChD,MAAM,WAAW,8BAA8B;IAC7C,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAoBD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAcvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAUA;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAmCA;AAMD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CASlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQ9D;AAMD;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,sBAAsB,EAAE,GACrC,MAAM,CAaR;AAyDD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAwBlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqGhF;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,MAAM,CAAC,CA6EjB"}
|
package/dist/index.js
CHANGED
|
@@ -12,16 +12,20 @@ var __export = (target, all) => {
|
|
|
12
12
|
var cant_context_exports = {};
|
|
13
13
|
__export(cant_context_exports, {
|
|
14
14
|
buildCantEnrichedPrompt: () => buildCantEnrichedPrompt,
|
|
15
|
+
buildIdentityBootstrap: () => buildIdentityBootstrap,
|
|
15
16
|
buildMemoryBridgeBlock: () => buildMemoryBridgeBlock,
|
|
16
17
|
buildMentalModelInjection: () => buildMentalModelInjection,
|
|
17
18
|
discoverCantFiles: () => discoverCantFiles,
|
|
18
19
|
discoverCantFilesMultiTier: () => discoverCantFilesMultiTier,
|
|
20
|
+
readIdentityFile: () => readIdentityFile,
|
|
19
21
|
readMemoryBridge: () => readMemoryBridge,
|
|
20
22
|
resolveThreeTierPaths: () => resolveThreeTierPaths
|
|
21
23
|
});
|
|
24
|
+
import { execFile } from "node:child_process";
|
|
22
25
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
23
26
|
import { homedir } from "node:os";
|
|
24
27
|
import { basename, join } from "node:path";
|
|
28
|
+
import { promisify } from "node:util";
|
|
25
29
|
function discoverCantFiles(dir) {
|
|
26
30
|
try {
|
|
27
31
|
const entries = readdirSync(dir, { recursive: true, withFileTypes: true });
|
|
@@ -121,24 +125,139 @@ async function fetchMentalModelInjection(agentName, projectRoot) {
|
|
|
121
125
|
return "";
|
|
122
126
|
}
|
|
123
127
|
}
|
|
128
|
+
function readIdentityFile(projectDir) {
|
|
129
|
+
const projectPath = join(projectDir, ".cleo", "CLEOOS-IDENTITY.md");
|
|
130
|
+
if (existsSync(projectPath)) {
|
|
131
|
+
try {
|
|
132
|
+
const content = readFileSync(projectPath, "utf-8");
|
|
133
|
+
return content.length > 0 ? content : null;
|
|
134
|
+
} catch {
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const home = homedir();
|
|
138
|
+
const xdgData = process.env["XDG_DATA_HOME"] ?? join(home, ".local", "share");
|
|
139
|
+
const globalPath = join(xdgData, "cleo", "CLEOOS-IDENTITY.md");
|
|
140
|
+
if (existsSync(globalPath)) {
|
|
141
|
+
try {
|
|
142
|
+
const content = readFileSync(globalPath, "utf-8");
|
|
143
|
+
return content.length > 0 ? content : null;
|
|
144
|
+
} catch {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
async function buildIdentityBootstrap(projectDir) {
|
|
151
|
+
const identityContent = readIdentityFile(projectDir);
|
|
152
|
+
if (!identityContent) return "";
|
|
153
|
+
const [briefingResult, nextResult, memoryResult] = await Promise.allSettled([
|
|
154
|
+
execFileAsync("cleo", ["session", "briefing", "--json"], {
|
|
155
|
+
timeout: 8e3,
|
|
156
|
+
cwd: projectDir || void 0
|
|
157
|
+
}),
|
|
158
|
+
execFileAsync("cleo", ["next", "--json", "--limit", "3"], {
|
|
159
|
+
timeout: 8e3,
|
|
160
|
+
cwd: projectDir || void 0
|
|
161
|
+
}),
|
|
162
|
+
execFileAsync("cleo", ["memory", "find", "decision", "--json", "--limit", "5"], {
|
|
163
|
+
timeout: 8e3,
|
|
164
|
+
cwd: projectDir || void 0
|
|
165
|
+
})
|
|
166
|
+
]);
|
|
167
|
+
const dynamicLines = [];
|
|
168
|
+
if (briefingResult.status === "fulfilled") {
|
|
169
|
+
try {
|
|
170
|
+
const briefing = JSON.parse(briefingResult.value.stdout);
|
|
171
|
+
const data = briefing?.data ?? briefing;
|
|
172
|
+
if (data?.currentTask) {
|
|
173
|
+
dynamicLines.push("## Current Task");
|
|
174
|
+
dynamicLines.push(
|
|
175
|
+
`- **${data.currentTask.id}**: ${data.currentTask.title} (${data.currentTask.status})`
|
|
176
|
+
);
|
|
177
|
+
dynamicLines.push("");
|
|
178
|
+
}
|
|
179
|
+
if (data?.handoff?.note) {
|
|
180
|
+
dynamicLines.push("## Last Session Handoff");
|
|
181
|
+
dynamicLines.push(data.handoff.note);
|
|
182
|
+
dynamicLines.push("");
|
|
183
|
+
}
|
|
184
|
+
} catch {
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (nextResult.status === "fulfilled") {
|
|
188
|
+
try {
|
|
189
|
+
const next = JSON.parse(nextResult.value.stdout);
|
|
190
|
+
const tasks = next?.data?.tasks ?? [];
|
|
191
|
+
if (Array.isArray(tasks) && tasks.length > 0) {
|
|
192
|
+
dynamicLines.push("## Next Tasks");
|
|
193
|
+
for (const t of tasks.slice(0, 3)) {
|
|
194
|
+
dynamicLines.push(`- **${t.id}**: ${t.title} (${t.priority ?? "medium"})`);
|
|
195
|
+
}
|
|
196
|
+
dynamicLines.push("");
|
|
197
|
+
}
|
|
198
|
+
} catch {
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (memoryResult.status === "fulfilled") {
|
|
202
|
+
try {
|
|
203
|
+
const mem = JSON.parse(memoryResult.value.stdout);
|
|
204
|
+
const results = mem?.data?.results ?? [];
|
|
205
|
+
if (Array.isArray(results) && results.length > 0) {
|
|
206
|
+
dynamicLines.push("## Recent Brain Context");
|
|
207
|
+
for (const r of results.slice(0, 5)) {
|
|
208
|
+
dynamicLines.push(`- [${r.id}] ${r.title} (${r.date ?? ""})`);
|
|
209
|
+
}
|
|
210
|
+
dynamicLines.push("");
|
|
211
|
+
}
|
|
212
|
+
} catch {
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const sections = [
|
|
216
|
+
"",
|
|
217
|
+
"===== CLEOOS IDENTITY BOOTSTRAP =====",
|
|
218
|
+
"",
|
|
219
|
+
identityContent.trim()
|
|
220
|
+
];
|
|
221
|
+
if (dynamicLines.length > 0) {
|
|
222
|
+
sections.push("");
|
|
223
|
+
sections.push(...dynamicLines);
|
|
224
|
+
}
|
|
225
|
+
sections.push("===== END IDENTITY BOOTSTRAP =====");
|
|
226
|
+
return sections.join("\n");
|
|
227
|
+
}
|
|
124
228
|
async function buildCantEnrichedPrompt(options) {
|
|
125
|
-
const { projectDir, basePrompt, agentName } = options;
|
|
229
|
+
const { projectDir, basePrompt, agentName, isMainAgent, compiledBundle } = options;
|
|
126
230
|
let appendix = "";
|
|
231
|
+
if (isMainAgent) {
|
|
232
|
+
try {
|
|
233
|
+
const identityBlock = await buildIdentityBootstrap(projectDir);
|
|
234
|
+
if (identityBlock) {
|
|
235
|
+
appendix += identityBlock;
|
|
236
|
+
}
|
|
237
|
+
} catch {
|
|
238
|
+
}
|
|
239
|
+
}
|
|
127
240
|
try {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
);
|
|
134
|
-
if (
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
241
|
+
if (compiledBundle) {
|
|
242
|
+
appendix += `
|
|
243
|
+
|
|
244
|
+
${compiledBundle}`;
|
|
245
|
+
} else {
|
|
246
|
+
const { files } = discoverCantFilesMultiTier(projectDir);
|
|
247
|
+
if (files.length > 0) {
|
|
248
|
+
const cantModule = await import(
|
|
249
|
+
/* webpackIgnore: true */
|
|
250
|
+
"@cleocode/cant"
|
|
251
|
+
);
|
|
252
|
+
if (typeof cantModule.compileBundle === "function") {
|
|
253
|
+
const bundle = await cantModule.compileBundle(files);
|
|
254
|
+
if (bundle.valid) {
|
|
255
|
+
const rendered = bundle.renderSystemPrompt();
|
|
256
|
+
if (rendered) {
|
|
257
|
+
appendix += `
|
|
140
258
|
|
|
141
259
|
${rendered}`;
|
|
260
|
+
}
|
|
142
261
|
}
|
|
143
262
|
}
|
|
144
263
|
}
|
|
@@ -165,10 +284,11 @@ ${mentalModel}`;
|
|
|
165
284
|
}
|
|
166
285
|
return appendix ? basePrompt + appendix : basePrompt;
|
|
167
286
|
}
|
|
168
|
-
var VALIDATE_ON_LOAD_PREAMBLE;
|
|
287
|
+
var execFileAsync, VALIDATE_ON_LOAD_PREAMBLE;
|
|
169
288
|
var init_cant_context = __esm({
|
|
170
289
|
"packages/adapters/src/cant-context.ts"() {
|
|
171
290
|
"use strict";
|
|
291
|
+
execFileAsync = promisify(execFile);
|
|
172
292
|
VALIDATE_ON_LOAD_PREAMBLE = "===== MENTAL MODEL (validate-on-load) =====\nThese are your prior observations, patterns, and learnings for this project.\nBefore acting, you MUST re-evaluate each entry against current project state.\nIf an entry is stale, note it and proceed with fresh understanding.";
|
|
173
293
|
}
|
|
174
294
|
});
|
|
@@ -980,13 +1100,13 @@ var init_src = __esm({
|
|
|
980
1100
|
// packages/adapters/src/providers/claude-code/spawn.ts
|
|
981
1101
|
import { exec, spawn as nodeSpawn } from "node:child_process";
|
|
982
1102
|
import { unlink, writeFile } from "node:fs/promises";
|
|
983
|
-
import { promisify } from "node:util";
|
|
1103
|
+
import { promisify as promisify2 } from "node:util";
|
|
984
1104
|
var execAsync, ClaudeCodeSpawnProvider;
|
|
985
1105
|
var init_spawn = __esm({
|
|
986
1106
|
"packages/adapters/src/providers/claude-code/spawn.ts"() {
|
|
987
1107
|
"use strict";
|
|
988
1108
|
init_src();
|
|
989
|
-
execAsync =
|
|
1109
|
+
execAsync = promisify2(exec);
|
|
990
1110
|
ClaudeCodeSpawnProvider = class {
|
|
991
1111
|
/** Map of instance IDs to tracked process info. */
|
|
992
1112
|
processMap = /* @__PURE__ */ new Map();
|
|
@@ -1231,7 +1351,7 @@ import { exec as exec2 } from "node:child_process";
|
|
|
1231
1351
|
import { existsSync as existsSync5 } from "node:fs";
|
|
1232
1352
|
import { homedir as homedir6 } from "node:os";
|
|
1233
1353
|
import { join as join7 } from "node:path";
|
|
1234
|
-
import { promisify as
|
|
1354
|
+
import { promisify as promisify3 } from "node:util";
|
|
1235
1355
|
var execAsync2, ClaudeCodeAdapter;
|
|
1236
1356
|
var init_adapter = __esm({
|
|
1237
1357
|
"packages/adapters/src/providers/claude-code/adapter.ts"() {
|
|
@@ -1243,7 +1363,7 @@ var init_adapter = __esm({
|
|
|
1243
1363
|
init_spawn();
|
|
1244
1364
|
init_task_sync();
|
|
1245
1365
|
init_transport();
|
|
1246
|
-
execAsync2 =
|
|
1366
|
+
execAsync2 = promisify3(exec2);
|
|
1247
1367
|
ClaudeCodeAdapter = class {
|
|
1248
1368
|
/** Unique provider identifier. */
|
|
1249
1369
|
id = "claude-code";
|
|
@@ -2197,7 +2317,7 @@ var init_install3 = __esm({
|
|
|
2197
2317
|
import { exec as exec6, spawn as nodeSpawn2 } from "node:child_process";
|
|
2198
2318
|
import { mkdir as mkdir2, readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
|
|
2199
2319
|
import { join as join21 } from "node:path";
|
|
2200
|
-
import { promisify as
|
|
2320
|
+
import { promisify as promisify7 } from "node:util";
|
|
2201
2321
|
function buildOpenCodeAgentMarkdown(description, instructions) {
|
|
2202
2322
|
const normalizedDesc = description.replace(/\s+/g, " ").trim();
|
|
2203
2323
|
return [
|
|
@@ -2240,7 +2360,7 @@ var execAsync6, OPENCODE_SUBAGENT_NAME, OPENCODE_FALLBACK_AGENT, OpenCodeSpawnPr
|
|
|
2240
2360
|
var init_spawn2 = __esm({
|
|
2241
2361
|
"packages/adapters/src/providers/opencode/spawn.ts"() {
|
|
2242
2362
|
"use strict";
|
|
2243
|
-
execAsync6 =
|
|
2363
|
+
execAsync6 = promisify7(exec6);
|
|
2244
2364
|
OPENCODE_SUBAGENT_NAME = "cleo-subagent";
|
|
2245
2365
|
OPENCODE_FALLBACK_AGENT = "general";
|
|
2246
2366
|
OpenCodeSpawnProvider = class {
|
|
@@ -2388,7 +2508,7 @@ var init_spawn2 = __esm({
|
|
|
2388
2508
|
import { exec as exec7 } from "node:child_process";
|
|
2389
2509
|
import { existsSync as existsSync16 } from "node:fs";
|
|
2390
2510
|
import { join as join22 } from "node:path";
|
|
2391
|
-
import { promisify as
|
|
2511
|
+
import { promisify as promisify8 } from "node:util";
|
|
2392
2512
|
var execAsync7, OpenCodeAdapter;
|
|
2393
2513
|
var init_adapter3 = __esm({
|
|
2394
2514
|
"packages/adapters/src/providers/opencode/adapter.ts"() {
|
|
@@ -2396,7 +2516,7 @@ var init_adapter3 = __esm({
|
|
|
2396
2516
|
init_hooks3();
|
|
2397
2517
|
init_install3();
|
|
2398
2518
|
init_spawn2();
|
|
2399
|
-
execAsync7 =
|
|
2519
|
+
execAsync7 = promisify8(exec7);
|
|
2400
2520
|
OpenCodeAdapter = class {
|
|
2401
2521
|
/** Unique provider identifier. */
|
|
2402
2522
|
id = "opencode";
|
|
@@ -2844,7 +2964,7 @@ var init_install4 = __esm({
|
|
|
2844
2964
|
// packages/adapters/src/providers/pi/spawn.ts
|
|
2845
2965
|
import { exec as exec8, spawn as nodeSpawn3 } from "node:child_process";
|
|
2846
2966
|
import { unlink as unlink2, writeFile as writeFile3 } from "node:fs/promises";
|
|
2847
|
-
import { promisify as
|
|
2967
|
+
import { promisify as promisify9 } from "node:util";
|
|
2848
2968
|
function getPiCliPath() {
|
|
2849
2969
|
return process.env["PI_CLI_PATH"] ?? "pi";
|
|
2850
2970
|
}
|
|
@@ -2853,7 +2973,7 @@ var init_spawn3 = __esm({
|
|
|
2853
2973
|
"packages/adapters/src/providers/pi/spawn.ts"() {
|
|
2854
2974
|
"use strict";
|
|
2855
2975
|
init_src();
|
|
2856
|
-
execAsync8 =
|
|
2976
|
+
execAsync8 = promisify9(exec8);
|
|
2857
2977
|
PiSpawnProvider = class {
|
|
2858
2978
|
/** Map of instance IDs to tracked process info. */
|
|
2859
2979
|
processMap = /* @__PURE__ */ new Map();
|
|
@@ -2997,7 +3117,7 @@ import { exec as exec9 } from "node:child_process";
|
|
|
2997
3117
|
import { existsSync as existsSync18 } from "node:fs";
|
|
2998
3118
|
import { homedir as homedir14 } from "node:os";
|
|
2999
3119
|
import { join as join24 } from "node:path";
|
|
3000
|
-
import { promisify as
|
|
3120
|
+
import { promisify as promisify10 } from "node:util";
|
|
3001
3121
|
function getPiAgentDir2() {
|
|
3002
3122
|
const env = process.env["PI_CODING_AGENT_DIR"];
|
|
3003
3123
|
if (env !== void 0 && env.length > 0) {
|
|
@@ -3018,7 +3138,7 @@ var init_adapter4 = __esm({
|
|
|
3018
3138
|
init_hooks4();
|
|
3019
3139
|
init_install4();
|
|
3020
3140
|
init_spawn3();
|
|
3021
|
-
execAsync9 =
|
|
3141
|
+
execAsync9 = promisify10(exec9);
|
|
3022
3142
|
PiAdapter = class {
|
|
3023
3143
|
/** Unique provider identifier. */
|
|
3024
3144
|
id = "pi";
|
|
@@ -3196,7 +3316,7 @@ import { exec as exec3 } from "node:child_process";
|
|
|
3196
3316
|
import { existsSync as existsSync8 } from "node:fs";
|
|
3197
3317
|
import { homedir as homedir9 } from "node:os";
|
|
3198
3318
|
import { join as join12 } from "node:path";
|
|
3199
|
-
import { promisify as
|
|
3319
|
+
import { promisify as promisify4 } from "node:util";
|
|
3200
3320
|
|
|
3201
3321
|
// packages/adapters/src/providers/codex/hooks.ts
|
|
3202
3322
|
import { homedir as homedir8 } from "node:os";
|
|
@@ -3420,7 +3540,7 @@ var CodexInstallProvider = class {
|
|
|
3420
3540
|
};
|
|
3421
3541
|
|
|
3422
3542
|
// packages/adapters/src/providers/codex/adapter.ts
|
|
3423
|
-
var execAsync3 =
|
|
3543
|
+
var execAsync3 = promisify4(exec3);
|
|
3424
3544
|
var CodexAdapter = class {
|
|
3425
3545
|
/** Unique provider identifier. */
|
|
3426
3546
|
id = "codex";
|
|
@@ -3544,7 +3664,7 @@ import { exec as exec4 } from "node:child_process";
|
|
|
3544
3664
|
import { existsSync as existsSync12 } from "node:fs";
|
|
3545
3665
|
import { homedir as homedir11 } from "node:os";
|
|
3546
3666
|
import { join as join17 } from "node:path";
|
|
3547
|
-
import { promisify as
|
|
3667
|
+
import { promisify as promisify5 } from "node:util";
|
|
3548
3668
|
|
|
3549
3669
|
// packages/adapters/src/providers/gemini-cli/hooks.ts
|
|
3550
3670
|
import { homedir as homedir10 } from "node:os";
|
|
@@ -3727,7 +3847,7 @@ var GeminiCliInstallProvider = class {
|
|
|
3727
3847
|
};
|
|
3728
3848
|
|
|
3729
3849
|
// packages/adapters/src/providers/gemini-cli/adapter.ts
|
|
3730
|
-
var execAsync4 =
|
|
3850
|
+
var execAsync4 = promisify5(exec4);
|
|
3731
3851
|
var GeminiCliAdapter = class {
|
|
3732
3852
|
/** Unique provider identifier. */
|
|
3733
3853
|
id = "gemini-cli";
|
|
@@ -3859,7 +3979,7 @@ import { exec as exec5 } from "node:child_process";
|
|
|
3859
3979
|
import { existsSync as existsSync14 } from "node:fs";
|
|
3860
3980
|
import { homedir as homedir12 } from "node:os";
|
|
3861
3981
|
import { join as join19 } from "node:path";
|
|
3862
|
-
import { promisify as
|
|
3982
|
+
import { promisify as promisify6 } from "node:util";
|
|
3863
3983
|
|
|
3864
3984
|
// packages/adapters/src/providers/kimi/hooks.ts
|
|
3865
3985
|
var KimiHookProvider = class {
|
|
@@ -4013,7 +4133,7 @@ var KimiInstallProvider = class {
|
|
|
4013
4133
|
};
|
|
4014
4134
|
|
|
4015
4135
|
// packages/adapters/src/providers/kimi/adapter.ts
|
|
4016
|
-
var execAsync5 =
|
|
4136
|
+
var execAsync5 = promisify6(exec5);
|
|
4017
4137
|
var KimiAdapter = class {
|
|
4018
4138
|
/** Unique provider identifier. */
|
|
4019
4139
|
id = "kimi";
|