yepanywhere 0.6.1 → 0.6.2
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/bundled/@yep-anywhere/shared/dist/app-types.d.ts +22 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts +25 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js +52 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.d.ts +46 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +4 -1
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/package.json +1 -1
- package/client-dist/assets/index-1y2h7U7U.js +582 -0
- package/client-dist/assets/index-Cn_ZDP6u.css +1 -0
- package/client-dist/index.html +2 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js.map +1 -1
- package/dist/codex/codeModeExec.d.ts +5 -2
- package/dist/codex/codeModeExec.d.ts.map +1 -1
- package/dist/codex/codeModeExec.js +157 -2
- package/dist/codex/codeModeExec.js.map +1 -1
- package/dist/codex/normalization.d.ts.map +1 -1
- package/dist/codex/normalization.js +102 -3
- package/dist/codex/normalization.js.map +1 -1
- package/dist/codex/webRun.d.ts +42 -0
- package/dist/codex/webRun.d.ts.map +1 -0
- package/dist/codex/webRun.js +199 -0
- package/dist/codex/webRun.js.map +1 -0
- package/dist/indexes/SessionIndexService.d.ts.map +1 -1
- package/dist/indexes/SessionIndexService.js +15 -3
- package/dist/indexes/SessionIndexService.js.map +1 -1
- package/dist/routes/public-shares.d.ts +1 -1
- package/dist/routes/public-shares.d.ts.map +1 -1
- package/dist/routes/public-shares.js +4 -6
- package/dist/routes/public-shares.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +7 -2
- package/dist/routes/sessions.js.map +1 -1
- package/dist/sdk/cli-detection.d.ts +15 -1
- package/dist/sdk/cli-detection.d.ts.map +1 -1
- package/dist/sdk/cli-detection.js +159 -28
- package/dist/sdk/cli-detection.js.map +1 -1
- package/dist/sdk/providers/codex.d.ts +1 -1
- package/dist/sdk/providers/codex.d.ts.map +1 -1
- package/dist/sdk/providers/codex.js +101 -30
- package/dist/sdk/providers/codex.js.map +1 -1
- package/dist/sessions/claude-summary.d.ts.map +1 -1
- package/dist/sessions/claude-summary.js +13 -1
- package/dist/sessions/claude-summary.js.map +1 -1
- package/dist/sessions/codex-reader.d.ts +0 -2
- package/dist/sessions/codex-reader.d.ts.map +1 -1
- package/dist/sessions/codex-reader.js +47 -85
- package/dist/sessions/codex-reader.js.map +1 -1
- package/dist/sessions/codex-user-turn-provenance.d.ts +40 -0
- package/dist/sessions/codex-user-turn-provenance.d.ts.map +1 -0
- package/dist/sessions/codex-user-turn-provenance.js +165 -0
- package/dist/sessions/codex-user-turn-provenance.js.map +1 -0
- package/dist/sessions/normalization.d.ts +0 -1
- package/dist/sessions/normalization.d.ts.map +1 -1
- package/dist/sessions/normalization.js +50 -53
- package/dist/sessions/normalization.js.map +1 -1
- package/dist/sessions/pagination.d.ts.map +1 -1
- package/dist/sessions/pagination.js +3 -0
- package/dist/sessions/pagination.js.map +1 -1
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +1 -0
- package/dist/subscriptions.js.map +1 -1
- package/dist/supervisor/Process.d.ts +3 -0
- package/dist/supervisor/Process.d.ts.map +1 -1
- package/dist/supervisor/Process.js +123 -6
- package/dist/supervisor/Process.js.map +1 -1
- package/dist/supervisor/Supervisor.d.ts +5 -1
- package/dist/supervisor/Supervisor.d.ts.map +1 -1
- package/dist/supervisor/Supervisor.js +47 -0
- package/dist/supervisor/Supervisor.js.map +1 -1
- package/package.json +1 -1
- package/client-dist/assets/index-C41clQ66.js +0 -561
- package/client-dist/assets/index-LbeFv8ym.css +0 -1
|
@@ -39,6 +39,11 @@ export interface CodexCliInfo {
|
|
|
39
39
|
/** Error message if not found */
|
|
40
40
|
error?: string;
|
|
41
41
|
}
|
|
42
|
+
export interface CodexCliInstall {
|
|
43
|
+
path: string;
|
|
44
|
+
version: string;
|
|
45
|
+
normalizedVersion: string | null;
|
|
46
|
+
}
|
|
42
47
|
/**
|
|
43
48
|
* Detect the Codex CLI installation.
|
|
44
49
|
*
|
|
@@ -54,12 +59,21 @@ export declare function detectCodexCli(explicitPath?: string): Promise<CodexCliI
|
|
|
54
59
|
* Includes Codex desktop app locations.
|
|
55
60
|
*/
|
|
56
61
|
export declare function getCodexCommonPaths(): string[];
|
|
62
|
+
export declare function normalizeCodexCliVersion(raw: string | null | undefined): string | null;
|
|
63
|
+
export declare function compareCodexCliVersions(a: string, b: string): number;
|
|
57
64
|
/**
|
|
58
65
|
* Find the Codex CLI path by checking an explicit path first, then PATH, then
|
|
59
|
-
* common locations.
|
|
66
|
+
* common locations. In auto mode, all usable candidates are probed and the
|
|
67
|
+
* highest parsed CLI version wins; discovery order is only a tie-breaker.
|
|
68
|
+
* If an explicit path is provided but missing, return null:
|
|
60
69
|
* explicit provider configuration is authoritative and should not silently
|
|
61
70
|
* drift to a different install.
|
|
62
71
|
* Returns the path if found, null otherwise.
|
|
63
72
|
*/
|
|
64
73
|
export declare function findCodexCliPath(explicitPath?: string): Promise<string | null>;
|
|
74
|
+
export declare function findCodexCliInstall(explicitPath?: string): Promise<CodexCliInstall | null>;
|
|
75
|
+
/**
|
|
76
|
+
* Get the version of the Codex CLI at the given path.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getCodexCliVersion(codexPath: string): Promise<string | undefined>;
|
|
65
79
|
//# sourceMappingURL=cli-detection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-detection.d.ts","sourceRoot":"","sources":["../../src/sdk/cli-detection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-detection.d.ts","sourceRoot":"","sources":["../../src/sdk/cli-detection.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,aAAa,CAG/C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAMD;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,YAAY,CAAC,CAUvB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAqB9C;AAoDD,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAYpE;AAuGD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOxB;AAED,wBAAsB,mBAAmB,CACvC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAcjC;AAUD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAkB7B"}
|
|
@@ -4,6 +4,7 @@ import * as os from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
6
|
const isWindows = os.platform() === "win32";
|
|
7
|
+
const CODEX_VERSION_PROBE_TIMEOUT_MS = 3000;
|
|
7
8
|
const execAsync = promisify(exec);
|
|
8
9
|
const execFileAsync = promisify(execFile);
|
|
9
10
|
/**
|
|
@@ -36,12 +37,9 @@ export function detectClaudeCli() {
|
|
|
36
37
|
* @returns Information about the CLI installation
|
|
37
38
|
*/
|
|
38
39
|
export async function detectCodexCli(explicitPath) {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
if (version) {
|
|
43
|
-
return { found: true, path: codexPath, version };
|
|
44
|
-
}
|
|
40
|
+
const install = await findCodexCliInstall(explicitPath);
|
|
41
|
+
if (install) {
|
|
42
|
+
return { found: true, path: install.path, version: install.version };
|
|
45
43
|
}
|
|
46
44
|
return {
|
|
47
45
|
found: false,
|
|
@@ -106,12 +104,131 @@ function parseWhichOutput(stdout) {
|
|
|
106
104
|
.map((line) => line.trim())
|
|
107
105
|
.filter(Boolean);
|
|
108
106
|
}
|
|
109
|
-
|
|
110
|
-
return
|
|
107
|
+
function dedupePathKey(path) {
|
|
108
|
+
return isWindows ? path.toLowerCase() : path;
|
|
109
|
+
}
|
|
110
|
+
function uniquePaths(paths) {
|
|
111
|
+
const seen = new Set();
|
|
112
|
+
const unique = [];
|
|
113
|
+
for (const path of paths) {
|
|
114
|
+
const key = dedupePathKey(path);
|
|
115
|
+
if (seen.has(key))
|
|
116
|
+
continue;
|
|
117
|
+
seen.add(key);
|
|
118
|
+
unique.push(path);
|
|
119
|
+
}
|
|
120
|
+
return unique;
|
|
121
|
+
}
|
|
122
|
+
export function normalizeCodexCliVersion(raw) {
|
|
123
|
+
if (!raw)
|
|
124
|
+
return null;
|
|
125
|
+
const match = raw.match(/(\d+)\.(\d+)\.(\d+)(?:-([\w.]+))?/);
|
|
126
|
+
if (!match)
|
|
127
|
+
return null;
|
|
128
|
+
const [, major, minor, patch, pre] = match;
|
|
129
|
+
return pre
|
|
130
|
+
? `${major}.${minor}.${patch}-${pre}`
|
|
131
|
+
: `${major}.${minor}.${patch}`;
|
|
132
|
+
}
|
|
133
|
+
export function compareCodexCliVersions(a, b) {
|
|
134
|
+
const parsedA = splitCodexCliVersion(a);
|
|
135
|
+
const parsedB = splitCodexCliVersion(b);
|
|
136
|
+
for (let i = 0; i < 3; i++) {
|
|
137
|
+
const partA = parsedA.parts[i] ?? 0;
|
|
138
|
+
const partB = parsedB.parts[i] ?? 0;
|
|
139
|
+
if (partA !== partB)
|
|
140
|
+
return partA < partB ? -1 : 1;
|
|
141
|
+
}
|
|
142
|
+
if (parsedA.pre === null && parsedB.pre === null)
|
|
143
|
+
return 0;
|
|
144
|
+
if (parsedA.pre === null)
|
|
145
|
+
return 1;
|
|
146
|
+
if (parsedB.pre === null)
|
|
147
|
+
return -1;
|
|
148
|
+
return parsedA.pre < parsedB.pre ? -1 : parsedA.pre > parsedB.pre ? 1 : 0;
|
|
149
|
+
}
|
|
150
|
+
function splitCodexCliVersion(version) {
|
|
151
|
+
const dashIndex = version.indexOf("-");
|
|
152
|
+
const core = dashIndex === -1 ? version : version.slice(0, dashIndex);
|
|
153
|
+
const pre = dashIndex === -1 ? null : version.slice(dashIndex + 1);
|
|
154
|
+
return {
|
|
155
|
+
parts: core.split(".").map((part) => {
|
|
156
|
+
const parsed = Number.parseInt(part, 10);
|
|
157
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
158
|
+
}),
|
|
159
|
+
pre,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function compareCodexCandidates(a, b) {
|
|
163
|
+
if (a.normalizedVersion && b.normalizedVersion) {
|
|
164
|
+
const versionOrder = compareCodexCliVersions(a.normalizedVersion, b.normalizedVersion);
|
|
165
|
+
if (versionOrder !== 0)
|
|
166
|
+
return versionOrder;
|
|
167
|
+
}
|
|
168
|
+
else if (a.normalizedVersion) {
|
|
169
|
+
return 1;
|
|
170
|
+
}
|
|
171
|
+
else if (b.normalizedVersion) {
|
|
172
|
+
return -1;
|
|
173
|
+
}
|
|
174
|
+
// Lower order means earlier discovery priority; keep it as the tie-breaker.
|
|
175
|
+
return b.order - a.order;
|
|
176
|
+
}
|
|
177
|
+
function selectBestCodexCandidate(candidates) {
|
|
178
|
+
let best = null;
|
|
179
|
+
for (const candidate of candidates) {
|
|
180
|
+
if (!best || compareCodexCandidates(candidate, best) > 0) {
|
|
181
|
+
best = candidate;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return best;
|
|
185
|
+
}
|
|
186
|
+
async function probeCodexCandidate(path, order) {
|
|
187
|
+
const version = await getCodexCliVersion(path);
|
|
188
|
+
if (!version)
|
|
189
|
+
return null;
|
|
190
|
+
return {
|
|
191
|
+
path,
|
|
192
|
+
version,
|
|
193
|
+
normalizedVersion: normalizeCodexCliVersion(version),
|
|
194
|
+
order,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
async function getPathCodexCandidates() {
|
|
198
|
+
try {
|
|
199
|
+
// `where` returns every Windows match, while Unix `which` needs `-a` to
|
|
200
|
+
// enumerate beyond the first PATH hit so version selection can compare all
|
|
201
|
+
// installed candidates.
|
|
202
|
+
const command = isWindows ? whichCommand("codex") : "which -a codex";
|
|
203
|
+
const { stdout } = await execAsync(command, {
|
|
204
|
+
encoding: "utf-8",
|
|
205
|
+
});
|
|
206
|
+
return parseWhichOutput(stdout);
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
return [];
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async function findAutoCodexCliInstall() {
|
|
213
|
+
const candidatePaths = uniquePaths([
|
|
214
|
+
...(await getPathCodexCandidates()),
|
|
215
|
+
...getCodexCommonPaths().filter((path) => existsSync(path)),
|
|
216
|
+
]);
|
|
217
|
+
const candidates = (await Promise.all(candidatePaths.map((path, order) => probeCodexCandidate(path, order)))).filter((candidate) => Boolean(candidate));
|
|
218
|
+
const best = selectBestCodexCandidate(candidates);
|
|
219
|
+
return best
|
|
220
|
+
? {
|
|
221
|
+
path: best.path,
|
|
222
|
+
version: best.version,
|
|
223
|
+
normalizedVersion: best.normalizedVersion,
|
|
224
|
+
}
|
|
225
|
+
: null;
|
|
111
226
|
}
|
|
112
227
|
/**
|
|
113
228
|
* Find the Codex CLI path by checking an explicit path first, then PATH, then
|
|
114
|
-
* common locations.
|
|
229
|
+
* common locations. In auto mode, all usable candidates are probed and the
|
|
230
|
+
* highest parsed CLI version wins; discovery order is only a tie-breaker.
|
|
231
|
+
* If an explicit path is provided but missing, return null:
|
|
115
232
|
* explicit provider configuration is authoritative and should not silently
|
|
116
233
|
* drift to a different install.
|
|
117
234
|
* Returns the path if found, null otherwise.
|
|
@@ -120,32 +237,46 @@ export async function findCodexCliPath(explicitPath) {
|
|
|
120
237
|
if (explicitPath) {
|
|
121
238
|
return existsSync(explicitPath) ? explicitPath : null;
|
|
122
239
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
240
|
+
const install = await findAutoCodexCliInstall();
|
|
241
|
+
return install?.path ?? null;
|
|
242
|
+
}
|
|
243
|
+
export async function findCodexCliInstall(explicitPath) {
|
|
244
|
+
if (explicitPath) {
|
|
245
|
+
if (!existsSync(explicitPath))
|
|
246
|
+
return null;
|
|
247
|
+
const version = await getCodexCliVersion(explicitPath);
|
|
248
|
+
return version
|
|
249
|
+
? {
|
|
250
|
+
path: explicitPath,
|
|
251
|
+
version,
|
|
252
|
+
normalizedVersion: normalizeCodexCliVersion(version),
|
|
253
|
+
}
|
|
254
|
+
: null;
|
|
138
255
|
}
|
|
139
|
-
return
|
|
256
|
+
return findAutoCodexCliInstall();
|
|
257
|
+
}
|
|
258
|
+
function isWindowsCommandScript(path) {
|
|
259
|
+
return isWindows && /\.(?:cmd|bat)$/i.test(path);
|
|
260
|
+
}
|
|
261
|
+
function quoteWindowsCommandPath(path) {
|
|
262
|
+
return `"${path.replace(/"/g, '""')}"`;
|
|
140
263
|
}
|
|
141
264
|
/**
|
|
142
265
|
* Get the version of the Codex CLI at the given path.
|
|
143
266
|
*/
|
|
144
|
-
async function
|
|
267
|
+
export async function getCodexCliVersion(codexPath) {
|
|
145
268
|
try {
|
|
146
|
-
const
|
|
269
|
+
const options = {
|
|
147
270
|
encoding: "utf-8",
|
|
148
|
-
|
|
271
|
+
timeout: CODEX_VERSION_PROBE_TIMEOUT_MS,
|
|
272
|
+
windowsHide: true,
|
|
273
|
+
};
|
|
274
|
+
const { stdout } = isWindowsCommandScript(codexPath)
|
|
275
|
+
? await execAsync(`${quoteWindowsCommandPath(codexPath)} --version`, {
|
|
276
|
+
...options,
|
|
277
|
+
windowsHide: true,
|
|
278
|
+
})
|
|
279
|
+
: await execFileAsync(codexPath, ["--version"], options);
|
|
149
280
|
const output = stdout.trim();
|
|
150
281
|
return output;
|
|
151
282
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-detection.js","sourceRoot":"","sources":["../../src/sdk/cli-detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,SAAS,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC;AAC5C,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAClC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC;AACvD,CAAC;AAgBD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe;IAC7B,4DAA4D;IAC5D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AACnE,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-detection.js","sourceRoot":"","sources":["../../src/sdk/cli-detection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,E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4
4
|
* Uses `codex app-server --listen stdio://` for turn execution so we can handle
|
|
5
5
|
* server-initiated permission requests (command/file approval).
|
|
6
6
|
*/
|
|
7
|
-
import type
|
|
7
|
+
import { type ModelInfo } from "@yep-anywhere/shared";
|
|
8
8
|
import type { AgentProvider, AgentSession, AuthStatus, StartSessionOptions, SummaryGenerationRequest, SummaryGenerationResult } from "./types.js";
|
|
9
9
|
/**
|
|
10
10
|
* Configuration for Codex provider.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/codex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/sdk/providers/codex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAkG9B,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AA4SpB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoYD;;GAEG;AACH,qBAAa,aAAc,YAAW,aAAa;IACjD,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAU;IACjC,QAAQ,CAAC,WAAW,WAAW;IAC/B,QAAQ,CAAC,sBAAsB,QAAQ;IACvC,QAAQ,CAAC,sBAAsB,QAAQ;IACvC,QAAQ,CAAC,qBAAqB,QAAQ;IACtC,QAAQ,CAAC,gBAAgB,QAAQ;IACjC,QAAQ,CAAC,cAAc,QAAQ;IAC/B,QAAQ,CAAC,+BAA+B,SAAS;IAEjD,OAAO,CAAC,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eAAe;IAKvB,OAAO,CAAC,uCAAuC;IAe/C,OAAO,CAAC,iCAAiC;IAezC,OAAO,CAAC,kCAAkC;IAkB1C,OAAO,CAAC,4BAA4B;IAgBpC,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,wBAAwB;IAahC,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,8BAA8B;IAWtC,OAAO,CAAC,6BAA6B;IAarC,OAAO,CAAC,gCAAgC;IAUxC,OAAO,CAAC,8BAA8B;IAgCtC,OAAO,CAAC,qCAAqC;IAmC7C,OAAO,CAAC,+BAA+B;IAgDvC,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,mCAAmC;IAoR3C;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAmmBhC,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,4BAA4B;IAiBpC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;CAG1B;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,eAAsB,CAAC"}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
import {
|
|
9
|
+
import { CODEX_TOOL_CORRELATION_FIELD, createCodexToolCorrelation, } from "../../../bundled/@yep-anywhere/shared/dist/index.js";
|
|
10
10
|
import { isCodexCorrelationDebugEnabled, logCodexCorrelationDebug, summarizeCodexNormalizedMessage, } from "../../codex/correlationDebugLogger.js";
|
|
11
11
|
import { canonicalizeCodexToolName, isCodexBackgroundProcessOutput, isCodexInterruptedToolOutput, normalizeCodexCommandExecutionOutput, normalizeCodexCustomToolInvocation, normalizeCodexToolInvocation, normalizeCodexToolOutputWithContext, parseCodexToolArguments, } from "../../codex/normalization.js";
|
|
12
12
|
import { getLogger } from "../../logging/logger.js";
|
|
13
|
-
import { findCodexCliPath } from "../cli-detection.js";
|
|
13
|
+
import { findCodexCliPath, getCodexCliVersion } from "../cli-detection.js";
|
|
14
14
|
import { logSDKMessage } from "../messageLogger.js";
|
|
15
15
|
import { MessageQueue } from "../messageQueue.js";
|
|
16
16
|
import { createAgentctlSessionEnvBridge } from "./agentctl-session-env.js";
|
|
@@ -19,7 +19,7 @@ import { asCodexAgentMessageDeltaNotification, asCodexCommandExecutionOutputDelt
|
|
|
19
19
|
import { captureCodexSummaryTextFromNotification, captureCodexSummaryTextFromTurnItems, cleanCodexRecapText, cleanCodexSummaryText, CODEX_RECAP_TIMEOUT_MS, CODEX_SUMMARY_TIMEOUT_MS, createCodexForkSummaryPrompt, createCodexForkSummaryThreadResumeParams, createCodexRecapPrompt, joinCodexSummaryText, resolveCodexRecapHelperModel, } from "./codex-summary-helpers.js";
|
|
20
20
|
import { CODEX_BUILTIN_COMMANDS } from "./staticSlashCommands.js";
|
|
21
21
|
const log = getLogger().child({ component: "codex-provider" });
|
|
22
|
-
const
|
|
22
|
+
const CODEX_DESKTOP_BROWSER_SKILL_NAME = "browser:control-in-app-browser";
|
|
23
23
|
function logSdkCorrelationDebug(sessionId, message, metadata = {}) {
|
|
24
24
|
if (!isCodexCorrelationDebugEnabled())
|
|
25
25
|
return;
|
|
@@ -213,6 +213,9 @@ class CodexAppServerClient {
|
|
|
213
213
|
this.env = env;
|
|
214
214
|
this.shouldSuppressNotification = shouldSuppressNotification;
|
|
215
215
|
}
|
|
216
|
+
get isClosed() {
|
|
217
|
+
return this.closed;
|
|
218
|
+
}
|
|
216
219
|
setServerRequestHandler(handler) {
|
|
217
220
|
this.onServerRequest = handler;
|
|
218
221
|
}
|
|
@@ -421,6 +424,7 @@ class CodexAppServerClient {
|
|
|
421
424
|
params: {
|
|
422
425
|
error: { message: error.message },
|
|
423
426
|
willRetry: false,
|
|
427
|
+
codexProcessExit: true,
|
|
424
428
|
},
|
|
425
429
|
});
|
|
426
430
|
this.notifications.close(error);
|
|
@@ -669,11 +673,8 @@ export class CodexProvider {
|
|
|
669
673
|
async getInstalledCodexCliVersion() {
|
|
670
674
|
try {
|
|
671
675
|
const codexCommand = await this.resolveCodexCommand();
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
timeout: 3000,
|
|
675
|
-
});
|
|
676
|
-
return normalizeSemver(stdout);
|
|
676
|
+
const version = await getCodexCliVersion(codexCommand);
|
|
677
|
+
return normalizeSemver(version);
|
|
677
678
|
}
|
|
678
679
|
catch {
|
|
679
680
|
return null;
|
|
@@ -1129,10 +1130,13 @@ export class CodexProvider {
|
|
|
1129
1130
|
turnResult.turn.error?.message) {
|
|
1130
1131
|
yield {
|
|
1131
1132
|
type: "error",
|
|
1133
|
+
uuid: `codex-error-${turnResult.turn.id}`,
|
|
1132
1134
|
session_id: sessionId,
|
|
1133
1135
|
error: turnResult.turn.error.message,
|
|
1134
1136
|
codexErrorInfo: turnResult.turn.error.codexErrorInfo ?? null,
|
|
1135
1137
|
codexAdditionalDetails: turnResult.turn.error.additionalDetails ?? null,
|
|
1138
|
+
codexWillRetry: false,
|
|
1139
|
+
codexTurnId: turnResult.turn.id,
|
|
1136
1140
|
codexFailureTrace: this.snapshotCodexFailureTrace(failureTrace),
|
|
1137
1141
|
codexFailureSummary: this.formatCodexFailureTrace(failureTrace),
|
|
1138
1142
|
codexRequestId: this.extractOpenAIRequestId(turnResult.turn.error, turnResult.turn.error.additionalDetails, turnResult.turn.error.message),
|
|
@@ -1148,8 +1152,16 @@ export class CodexProvider {
|
|
|
1148
1152
|
const codexFailureTrace = this.snapshotCodexFailureTrace(failureTrace);
|
|
1149
1153
|
log.error({ error, codexFailureTrace }, "Error in codex app-server session");
|
|
1150
1154
|
if (!signal.aborted) {
|
|
1155
|
+
const isProcessFailure = appServer.isClosed;
|
|
1151
1156
|
yield {
|
|
1152
1157
|
type: "error",
|
|
1158
|
+
...(isProcessFailure
|
|
1159
|
+
? {
|
|
1160
|
+
uuid: `codex-error-${sessionId || "unknown"}-process-exit`,
|
|
1161
|
+
codexWillRetry: false,
|
|
1162
|
+
codexErrorScope: "app_server_process",
|
|
1163
|
+
}
|
|
1164
|
+
: {}),
|
|
1153
1165
|
session_id: sessionId,
|
|
1154
1166
|
error: error instanceof Error ? error.message : String(error),
|
|
1155
1167
|
codexFailureTrace,
|
|
@@ -1189,7 +1201,13 @@ export class CodexProvider {
|
|
|
1189
1201
|
}
|
|
1190
1202
|
if (notification.method === "error") {
|
|
1191
1203
|
const params = asCodexErrorNotification(notification.params);
|
|
1192
|
-
|
|
1204
|
+
if (params) {
|
|
1205
|
+
return params.turnId === turnId && !params.willRetry;
|
|
1206
|
+
}
|
|
1207
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
1208
|
+
? notification.params
|
|
1209
|
+
: null;
|
|
1210
|
+
return (rawParams?.codexProcessExit === true && rawParams.willRetry === false);
|
|
1193
1211
|
}
|
|
1194
1212
|
return false;
|
|
1195
1213
|
}
|
|
@@ -1298,7 +1316,7 @@ export class CodexProvider {
|
|
|
1298
1316
|
threadId: options.sessionId,
|
|
1299
1317
|
cwd: options.cwd,
|
|
1300
1318
|
...this.buildThreadPermissionParams(policy),
|
|
1301
|
-
config:
|
|
1319
|
+
config: this.buildThreadConfigOverrides({}),
|
|
1302
1320
|
};
|
|
1303
1321
|
if (experimentalApiEnabled) {
|
|
1304
1322
|
params.excludeTurns = true;
|
|
@@ -1366,11 +1384,25 @@ export class CodexProvider {
|
|
|
1366
1384
|
};
|
|
1367
1385
|
}
|
|
1368
1386
|
buildThreadConfigOverrides(options) {
|
|
1387
|
+
// The OpenAI browser plugin controls a desktop-owned browser backend that
|
|
1388
|
+
// YA's Codex app-server host does not provide. Suppress the unavailable
|
|
1389
|
+
// skill at thread scope so Codex follows YA's Playwright fallback instead
|
|
1390
|
+
// of advertising a browser that fails during backend discovery.
|
|
1391
|
+
const config = {
|
|
1392
|
+
skills: {
|
|
1393
|
+
config: [
|
|
1394
|
+
{
|
|
1395
|
+
name: CODEX_DESKTOP_BROWSER_SKILL_NAME,
|
|
1396
|
+
enabled: false,
|
|
1397
|
+
},
|
|
1398
|
+
],
|
|
1399
|
+
},
|
|
1400
|
+
};
|
|
1369
1401
|
const reasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking, options.model);
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1402
|
+
if (reasoningEffort) {
|
|
1403
|
+
config.model_reasoning_effort = reasoningEffort;
|
|
1372
1404
|
}
|
|
1373
|
-
return
|
|
1405
|
+
return config;
|
|
1374
1406
|
}
|
|
1375
1407
|
createTurnStartParams(threadId, userPrompt, options, turnPolicy = null) {
|
|
1376
1408
|
return {
|
|
@@ -1784,13 +1816,20 @@ export class CodexProvider {
|
|
|
1784
1816
|
case "error": {
|
|
1785
1817
|
const params = asCodexErrorNotification(notification.params);
|
|
1786
1818
|
const fallbackError = this.extractErrorRecord(notification.params);
|
|
1819
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
1820
|
+
? notification.params
|
|
1821
|
+
: null;
|
|
1822
|
+
const willRetry = params?.willRetry ??
|
|
1823
|
+
(typeof rawParams?.willRetry === "boolean"
|
|
1824
|
+
? rawParams.willRetry
|
|
1825
|
+
: false);
|
|
1787
1826
|
const errorMessage = params?.error.message ??
|
|
1788
1827
|
this.getOptionalString(fallbackError?.message) ??
|
|
1789
1828
|
"Codex turn failed";
|
|
1790
1829
|
return base({
|
|
1791
1830
|
sourceEvent: notification.method,
|
|
1792
1831
|
turnId: params?.turnId,
|
|
1793
|
-
phase:
|
|
1832
|
+
phase: willRetry ? "retrying" : "terminal",
|
|
1794
1833
|
errorMessage,
|
|
1795
1834
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
1796
1835
|
fallbackError?.codexErrorInfo ??
|
|
@@ -2276,19 +2315,36 @@ export class CodexProvider {
|
|
|
2276
2315
|
}
|
|
2277
2316
|
case "error": {
|
|
2278
2317
|
const params = asCodexErrorNotification(notification.params);
|
|
2279
|
-
const
|
|
2318
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
2319
|
+
? notification.params
|
|
2320
|
+
: null;
|
|
2321
|
+
const fallbackError = this.extractErrorRecord(notification.params);
|
|
2322
|
+
const errorMessage = params?.error.message ??
|
|
2323
|
+
this.getOptionalString(fallbackError?.message);
|
|
2324
|
+
const willRetry = params?.willRetry ??
|
|
2325
|
+
(typeof rawParams?.willRetry === "boolean"
|
|
2326
|
+
? rawParams.willRetry
|
|
2327
|
+
: false);
|
|
2328
|
+
const isProcessExit = rawParams?.codexProcessExit === true;
|
|
2280
2329
|
const message = (typeof errorMessage === "string" && errorMessage) ||
|
|
2281
|
-
(typeof
|
|
2282
|
-
|
|
2283
|
-
? notification.params.message
|
|
2330
|
+
(typeof rawParams?.message === "string"
|
|
2331
|
+
? rawParams.message
|
|
2284
2332
|
: "Codex turn failed");
|
|
2285
2333
|
const errorEvent = {
|
|
2286
2334
|
type: "error",
|
|
2335
|
+
uuid: params?.turnId
|
|
2336
|
+
? `codex-error-${params.turnId}`
|
|
2337
|
+
: `codex-error-${sessionId}-${Date.now()}`,
|
|
2287
2338
|
session_id: sessionId,
|
|
2288
2339
|
error: message,
|
|
2289
|
-
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2290
|
-
|
|
2291
|
-
|
|
2340
|
+
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2341
|
+
fallbackError?.codexErrorInfo ??
|
|
2342
|
+
null,
|
|
2343
|
+
codexAdditionalDetails: params?.error.additionalDetails ??
|
|
2344
|
+
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
2345
|
+
null,
|
|
2346
|
+
codexWillRetry: willRetry,
|
|
2347
|
+
codexErrorScope: isProcessExit ? "app_server_process" : "turn",
|
|
2292
2348
|
codexThreadId: params?.threadId,
|
|
2293
2349
|
codexTurnId: params?.turnId,
|
|
2294
2350
|
codexRequestId: this.extractOpenAIRequestId(notification.params, params?.error, message),
|
|
@@ -2415,6 +2471,9 @@ export class CodexProvider {
|
|
|
2415
2471
|
exit_code: this.getOptionalNumber(itemRecord.exit_code) ??
|
|
2416
2472
|
this.getOptionalNumber(itemRecord.exitCode) ??
|
|
2417
2473
|
undefined,
|
|
2474
|
+
durationMs: this.getOptionalNumber(itemRecord.duration_ms) ??
|
|
2475
|
+
this.getOptionalNumber(itemRecord.durationMs) ??
|
|
2476
|
+
undefined,
|
|
2418
2477
|
status: this.normalizeStatus(itemRecord.status),
|
|
2419
2478
|
...(cwd ? { cwd } : {}),
|
|
2420
2479
|
...(commandActions ? { commandActions } : {}),
|
|
@@ -2647,12 +2706,11 @@ export class CodexProvider {
|
|
|
2647
2706
|
buildItemMessageUuid(turnId, itemId) {
|
|
2648
2707
|
return `${itemId}-${turnId}`;
|
|
2649
2708
|
}
|
|
2650
|
-
//
|
|
2651
|
-
//
|
|
2652
|
-
//
|
|
2653
|
-
//
|
|
2654
|
-
//
|
|
2655
|
-
// topics/stream-durable-id-dedup.md (Codex tool calls).
|
|
2709
|
+
// Native tool thread items carry Codex's globally-unique call_id as item.id,
|
|
2710
|
+
// so this uuid aligns directly with the durable response item. A code-mode
|
|
2711
|
+
// commandExecution instead carries an inner exec-* id while rollout stores
|
|
2712
|
+
// the outer call_* id; the client reconciles that scoped exception via
|
|
2713
|
+
// _codexToolCorrelation. See topics/stream-durable-id-dedup.md.
|
|
2656
2714
|
buildItemToolUuid(callId) {
|
|
2657
2715
|
return callId;
|
|
2658
2716
|
}
|
|
@@ -2750,6 +2808,11 @@ export class CodexProvider {
|
|
|
2750
2808
|
session_id: sessionId,
|
|
2751
2809
|
uuid: this.buildItemResultUuid(itemId),
|
|
2752
2810
|
_isStreaming: true,
|
|
2811
|
+
...(sourceEvent === "command_output_delta"
|
|
2812
|
+
? {
|
|
2813
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, itemId),
|
|
2814
|
+
}
|
|
2815
|
+
: {}),
|
|
2753
2816
|
message: {
|
|
2754
2817
|
role: "user",
|
|
2755
2818
|
content: [
|
|
@@ -2885,6 +2948,7 @@ export class CodexProvider {
|
|
|
2885
2948
|
type: "assistant",
|
|
2886
2949
|
session_id: sessionId,
|
|
2887
2950
|
uuid: this.buildItemToolUuid(callId),
|
|
2951
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("custom_tool_call", params.turnId, callId),
|
|
2888
2952
|
message: {
|
|
2889
2953
|
role: "assistant",
|
|
2890
2954
|
content: [
|
|
@@ -2932,6 +2996,7 @@ export class CodexProvider {
|
|
|
2932
2996
|
type: "user",
|
|
2933
2997
|
session_id: sessionId,
|
|
2934
2998
|
uuid: this.buildItemResultUuid(callId),
|
|
2999
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("custom_tool_call", params.turnId, callId),
|
|
2935
3000
|
message: {
|
|
2936
3001
|
role: "user",
|
|
2937
3002
|
content: [toolResult],
|
|
@@ -2977,9 +3042,10 @@ export class CodexProvider {
|
|
|
2977
3042
|
convertItemToSDKMessages(item, sessionId, turnId, sourceEvent) {
|
|
2978
3043
|
const isComplete = sourceEvent === "item/completed";
|
|
2979
3044
|
const observedAt = new Date().toISOString();
|
|
2980
|
-
//
|
|
2981
|
-
//
|
|
2982
|
-
//
|
|
3045
|
+
// Native tool items key the uuid on call_id (item.id). Code-mode
|
|
3046
|
+
// commandExecution items temporarily key on exec-* and carry correlation
|
|
3047
|
+
// metadata for adoption of the outer durable call_* id client-side.
|
|
3048
|
+
// Message/reasoning counters have no durable equivalent and stay scoped.
|
|
2983
3049
|
const uuid = this.isToolBackedThreadItem(item)
|
|
2984
3050
|
? this.buildItemToolUuid(item.id)
|
|
2985
3051
|
: `${item.id}-${turnId}`;
|
|
@@ -3029,6 +3095,9 @@ export class CodexProvider {
|
|
|
3029
3095
|
}
|
|
3030
3096
|
case "command_execution": {
|
|
3031
3097
|
const messages = [];
|
|
3098
|
+
const correlationStartedAt = item.durationMs !== undefined
|
|
3099
|
+
? new Date(Date.parse(observedAt) - Math.max(0, item.durationMs)).toISOString()
|
|
3100
|
+
: observedAt;
|
|
3032
3101
|
const normalizedInvocation = normalizeCodexToolInvocation("Bash", {
|
|
3033
3102
|
command: item.command,
|
|
3034
3103
|
...(item.cwd ? { cwd: item.cwd } : {}),
|
|
@@ -3044,6 +3113,7 @@ export class CodexProvider {
|
|
|
3044
3113
|
type: "assistant",
|
|
3045
3114
|
session_id: sessionId,
|
|
3046
3115
|
uuid,
|
|
3116
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, item.id, correlationStartedAt),
|
|
3047
3117
|
message: {
|
|
3048
3118
|
role: "assistant",
|
|
3049
3119
|
content: [
|
|
@@ -3088,6 +3158,7 @@ export class CodexProvider {
|
|
|
3088
3158
|
type: "user",
|
|
3089
3159
|
session_id: sessionId,
|
|
3090
3160
|
uuid: `${uuid}-result`,
|
|
3161
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, item.id, correlationStartedAt),
|
|
3091
3162
|
message: {
|
|
3092
3163
|
role: "user",
|
|
3093
3164
|
content: [toolResultBlock],
|