@cleocode/adapters 2026.4.42 → 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 +153 -37
- package/dist/index.js.map +3 -3
- package/dist/providers/claude-code/install.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/cant-context.ts +210 -20
- package/src/providers/claude-code/install.ts +1 -5
- 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
|
});
|
|
@@ -661,11 +781,7 @@ var INSTRUCTION_REFERENCES, ClaudeCodeInstallProvider;
|
|
|
661
781
|
var init_install = __esm({
|
|
662
782
|
"packages/adapters/src/providers/claude-code/install.ts"() {
|
|
663
783
|
"use strict";
|
|
664
|
-
INSTRUCTION_REFERENCES = [
|
|
665
|
-
"@.cleo/CLEOOS-IDENTITY.md",
|
|
666
|
-
"@~/.cleo/templates/CLEO-INJECTION.md",
|
|
667
|
-
"@.cleo/memory-bridge.md"
|
|
668
|
-
];
|
|
784
|
+
INSTRUCTION_REFERENCES = ["@~/.cleo/templates/CLEO-INJECTION.md", "@.cleo/memory-bridge.md"];
|
|
669
785
|
ClaudeCodeInstallProvider = class {
|
|
670
786
|
/**
|
|
671
787
|
* Install CLEO into a Claude Code project.
|
|
@@ -984,13 +1100,13 @@ var init_src = __esm({
|
|
|
984
1100
|
// packages/adapters/src/providers/claude-code/spawn.ts
|
|
985
1101
|
import { exec, spawn as nodeSpawn } from "node:child_process";
|
|
986
1102
|
import { unlink, writeFile } from "node:fs/promises";
|
|
987
|
-
import { promisify } from "node:util";
|
|
1103
|
+
import { promisify as promisify2 } from "node:util";
|
|
988
1104
|
var execAsync, ClaudeCodeSpawnProvider;
|
|
989
1105
|
var init_spawn = __esm({
|
|
990
1106
|
"packages/adapters/src/providers/claude-code/spawn.ts"() {
|
|
991
1107
|
"use strict";
|
|
992
1108
|
init_src();
|
|
993
|
-
execAsync =
|
|
1109
|
+
execAsync = promisify2(exec);
|
|
994
1110
|
ClaudeCodeSpawnProvider = class {
|
|
995
1111
|
/** Map of instance IDs to tracked process info. */
|
|
996
1112
|
processMap = /* @__PURE__ */ new Map();
|
|
@@ -1235,7 +1351,7 @@ import { exec as exec2 } from "node:child_process";
|
|
|
1235
1351
|
import { existsSync as existsSync5 } from "node:fs";
|
|
1236
1352
|
import { homedir as homedir6 } from "node:os";
|
|
1237
1353
|
import { join as join7 } from "node:path";
|
|
1238
|
-
import { promisify as
|
|
1354
|
+
import { promisify as promisify3 } from "node:util";
|
|
1239
1355
|
var execAsync2, ClaudeCodeAdapter;
|
|
1240
1356
|
var init_adapter = __esm({
|
|
1241
1357
|
"packages/adapters/src/providers/claude-code/adapter.ts"() {
|
|
@@ -1247,7 +1363,7 @@ var init_adapter = __esm({
|
|
|
1247
1363
|
init_spawn();
|
|
1248
1364
|
init_task_sync();
|
|
1249
1365
|
init_transport();
|
|
1250
|
-
execAsync2 =
|
|
1366
|
+
execAsync2 = promisify3(exec2);
|
|
1251
1367
|
ClaudeCodeAdapter = class {
|
|
1252
1368
|
/** Unique provider identifier. */
|
|
1253
1369
|
id = "claude-code";
|
|
@@ -2201,7 +2317,7 @@ var init_install3 = __esm({
|
|
|
2201
2317
|
import { exec as exec6, spawn as nodeSpawn2 } from "node:child_process";
|
|
2202
2318
|
import { mkdir as mkdir2, readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
|
|
2203
2319
|
import { join as join21 } from "node:path";
|
|
2204
|
-
import { promisify as
|
|
2320
|
+
import { promisify as promisify7 } from "node:util";
|
|
2205
2321
|
function buildOpenCodeAgentMarkdown(description, instructions) {
|
|
2206
2322
|
const normalizedDesc = description.replace(/\s+/g, " ").trim();
|
|
2207
2323
|
return [
|
|
@@ -2244,7 +2360,7 @@ var execAsync6, OPENCODE_SUBAGENT_NAME, OPENCODE_FALLBACK_AGENT, OpenCodeSpawnPr
|
|
|
2244
2360
|
var init_spawn2 = __esm({
|
|
2245
2361
|
"packages/adapters/src/providers/opencode/spawn.ts"() {
|
|
2246
2362
|
"use strict";
|
|
2247
|
-
execAsync6 =
|
|
2363
|
+
execAsync6 = promisify7(exec6);
|
|
2248
2364
|
OPENCODE_SUBAGENT_NAME = "cleo-subagent";
|
|
2249
2365
|
OPENCODE_FALLBACK_AGENT = "general";
|
|
2250
2366
|
OpenCodeSpawnProvider = class {
|
|
@@ -2392,7 +2508,7 @@ var init_spawn2 = __esm({
|
|
|
2392
2508
|
import { exec as exec7 } from "node:child_process";
|
|
2393
2509
|
import { existsSync as existsSync16 } from "node:fs";
|
|
2394
2510
|
import { join as join22 } from "node:path";
|
|
2395
|
-
import { promisify as
|
|
2511
|
+
import { promisify as promisify8 } from "node:util";
|
|
2396
2512
|
var execAsync7, OpenCodeAdapter;
|
|
2397
2513
|
var init_adapter3 = __esm({
|
|
2398
2514
|
"packages/adapters/src/providers/opencode/adapter.ts"() {
|
|
@@ -2400,7 +2516,7 @@ var init_adapter3 = __esm({
|
|
|
2400
2516
|
init_hooks3();
|
|
2401
2517
|
init_install3();
|
|
2402
2518
|
init_spawn2();
|
|
2403
|
-
execAsync7 =
|
|
2519
|
+
execAsync7 = promisify8(exec7);
|
|
2404
2520
|
OpenCodeAdapter = class {
|
|
2405
2521
|
/** Unique provider identifier. */
|
|
2406
2522
|
id = "opencode";
|
|
@@ -2848,7 +2964,7 @@ var init_install4 = __esm({
|
|
|
2848
2964
|
// packages/adapters/src/providers/pi/spawn.ts
|
|
2849
2965
|
import { exec as exec8, spawn as nodeSpawn3 } from "node:child_process";
|
|
2850
2966
|
import { unlink as unlink2, writeFile as writeFile3 } from "node:fs/promises";
|
|
2851
|
-
import { promisify as
|
|
2967
|
+
import { promisify as promisify9 } from "node:util";
|
|
2852
2968
|
function getPiCliPath() {
|
|
2853
2969
|
return process.env["PI_CLI_PATH"] ?? "pi";
|
|
2854
2970
|
}
|
|
@@ -2857,7 +2973,7 @@ var init_spawn3 = __esm({
|
|
|
2857
2973
|
"packages/adapters/src/providers/pi/spawn.ts"() {
|
|
2858
2974
|
"use strict";
|
|
2859
2975
|
init_src();
|
|
2860
|
-
execAsync8 =
|
|
2976
|
+
execAsync8 = promisify9(exec8);
|
|
2861
2977
|
PiSpawnProvider = class {
|
|
2862
2978
|
/** Map of instance IDs to tracked process info. */
|
|
2863
2979
|
processMap = /* @__PURE__ */ new Map();
|
|
@@ -3001,7 +3117,7 @@ import { exec as exec9 } from "node:child_process";
|
|
|
3001
3117
|
import { existsSync as existsSync18 } from "node:fs";
|
|
3002
3118
|
import { homedir as homedir14 } from "node:os";
|
|
3003
3119
|
import { join as join24 } from "node:path";
|
|
3004
|
-
import { promisify as
|
|
3120
|
+
import { promisify as promisify10 } from "node:util";
|
|
3005
3121
|
function getPiAgentDir2() {
|
|
3006
3122
|
const env = process.env["PI_CODING_AGENT_DIR"];
|
|
3007
3123
|
if (env !== void 0 && env.length > 0) {
|
|
@@ -3022,7 +3138,7 @@ var init_adapter4 = __esm({
|
|
|
3022
3138
|
init_hooks4();
|
|
3023
3139
|
init_install4();
|
|
3024
3140
|
init_spawn3();
|
|
3025
|
-
execAsync9 =
|
|
3141
|
+
execAsync9 = promisify10(exec9);
|
|
3026
3142
|
PiAdapter = class {
|
|
3027
3143
|
/** Unique provider identifier. */
|
|
3028
3144
|
id = "pi";
|
|
@@ -3200,7 +3316,7 @@ import { exec as exec3 } from "node:child_process";
|
|
|
3200
3316
|
import { existsSync as existsSync8 } from "node:fs";
|
|
3201
3317
|
import { homedir as homedir9 } from "node:os";
|
|
3202
3318
|
import { join as join12 } from "node:path";
|
|
3203
|
-
import { promisify as
|
|
3319
|
+
import { promisify as promisify4 } from "node:util";
|
|
3204
3320
|
|
|
3205
3321
|
// packages/adapters/src/providers/codex/hooks.ts
|
|
3206
3322
|
import { homedir as homedir8 } from "node:os";
|
|
@@ -3424,7 +3540,7 @@ var CodexInstallProvider = class {
|
|
|
3424
3540
|
};
|
|
3425
3541
|
|
|
3426
3542
|
// packages/adapters/src/providers/codex/adapter.ts
|
|
3427
|
-
var execAsync3 =
|
|
3543
|
+
var execAsync3 = promisify4(exec3);
|
|
3428
3544
|
var CodexAdapter = class {
|
|
3429
3545
|
/** Unique provider identifier. */
|
|
3430
3546
|
id = "codex";
|
|
@@ -3548,7 +3664,7 @@ import { exec as exec4 } from "node:child_process";
|
|
|
3548
3664
|
import { existsSync as existsSync12 } from "node:fs";
|
|
3549
3665
|
import { homedir as homedir11 } from "node:os";
|
|
3550
3666
|
import { join as join17 } from "node:path";
|
|
3551
|
-
import { promisify as
|
|
3667
|
+
import { promisify as promisify5 } from "node:util";
|
|
3552
3668
|
|
|
3553
3669
|
// packages/adapters/src/providers/gemini-cli/hooks.ts
|
|
3554
3670
|
import { homedir as homedir10 } from "node:os";
|
|
@@ -3731,7 +3847,7 @@ var GeminiCliInstallProvider = class {
|
|
|
3731
3847
|
};
|
|
3732
3848
|
|
|
3733
3849
|
// packages/adapters/src/providers/gemini-cli/adapter.ts
|
|
3734
|
-
var execAsync4 =
|
|
3850
|
+
var execAsync4 = promisify5(exec4);
|
|
3735
3851
|
var GeminiCliAdapter = class {
|
|
3736
3852
|
/** Unique provider identifier. */
|
|
3737
3853
|
id = "gemini-cli";
|
|
@@ -3863,7 +3979,7 @@ import { exec as exec5 } from "node:child_process";
|
|
|
3863
3979
|
import { existsSync as existsSync14 } from "node:fs";
|
|
3864
3980
|
import { homedir as homedir12 } from "node:os";
|
|
3865
3981
|
import { join as join19 } from "node:path";
|
|
3866
|
-
import { promisify as
|
|
3982
|
+
import { promisify as promisify6 } from "node:util";
|
|
3867
3983
|
|
|
3868
3984
|
// packages/adapters/src/providers/kimi/hooks.ts
|
|
3869
3985
|
var KimiHookProvider = class {
|
|
@@ -4017,7 +4133,7 @@ var KimiInstallProvider = class {
|
|
|
4017
4133
|
};
|
|
4018
4134
|
|
|
4019
4135
|
// packages/adapters/src/providers/kimi/adapter.ts
|
|
4020
|
-
var execAsync5 =
|
|
4136
|
+
var execAsync5 = promisify6(exec5);
|
|
4021
4137
|
var KimiAdapter = class {
|
|
4022
4138
|
/** Unique provider identifier. */
|
|
4023
4139
|
id = "kimi";
|