@ai-sdk/harness-codex 1.0.123 → 1.0.125
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/CHANGELOG.md +21 -0
- package/dist/bridge/index.mjs +0 -3
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.js +11 -15
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/bridge/codex-step-tracker.ts +0 -1
- package/src/bridge/create-emit-stream-event.ts +0 -1
- package/src/codex-bootstrap.ts +5 -5
- package/src/codex-harness.ts +13 -13
- package/src/codex-subscription.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -4,7 +4,9 @@ import path from "path";
|
|
|
4
4
|
import {
|
|
5
5
|
commonTool,
|
|
6
6
|
HarnessCapabilityUnsupportedError,
|
|
7
|
-
harnessV1DiagnosticFromBridgeFrame
|
|
7
|
+
harnessV1DiagnosticFromBridgeFrame,
|
|
8
|
+
harnessStateDirectoryPath,
|
|
9
|
+
harnessSessionDataDirectoryPath
|
|
8
10
|
} from "@ai-sdk/harness";
|
|
9
11
|
import {
|
|
10
12
|
applyCredentialForwarding,
|
|
@@ -17,7 +19,6 @@ import {
|
|
|
17
19
|
forwardBridgeProcessStream,
|
|
18
20
|
getRestrictedSandboxSession,
|
|
19
21
|
markBridgeStarting,
|
|
20
|
-
resolveSandboxDefaultWorkingDirectory,
|
|
21
22
|
resolveSandboxHomeDir,
|
|
22
23
|
SandboxChannel,
|
|
23
24
|
shellQuote,
|
|
@@ -321,7 +322,6 @@ async function readCodexAuthCredentialsStoreMode({
|
|
|
321
322
|
return toCodexAuthCredentialsStoreMode(match[1]);
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
|
-
return void 0;
|
|
325
325
|
}
|
|
326
326
|
function toCodexAuthCredentialsStoreMode(value) {
|
|
327
327
|
return value === "file" || value === "keyring" || value === "auto" || value === "ephemeral" ? value : void 0;
|
|
@@ -420,7 +420,6 @@ function createCodexKeyring({
|
|
|
420
420
|
if (isWindows(platform)) {
|
|
421
421
|
return createWindowsCodexKeyring();
|
|
422
422
|
}
|
|
423
|
-
return void 0;
|
|
424
423
|
}
|
|
425
424
|
function shellQuoteForSecurity(value) {
|
|
426
425
|
return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
|
|
@@ -533,7 +532,7 @@ var inboundMessageSchema = z.discriminatedUnion("type", [
|
|
|
533
532
|
var CLI_SHIM_FILENAME = "harness-tool.mjs";
|
|
534
533
|
|
|
535
534
|
// src/version.ts
|
|
536
|
-
var VERSION = true ? "1.0.
|
|
535
|
+
var VERSION = true ? "1.0.125" : "0.0.0-test";
|
|
537
536
|
|
|
538
537
|
// src/codex-harness.ts
|
|
539
538
|
var DEFAULT_CODEX_MODEL = "gpt-5.5";
|
|
@@ -600,10 +599,6 @@ function createCodex(settings = {}) {
|
|
|
600
599
|
message: "The codex harness cannot use `mintBridgeToken` with a sandbox session that does not expose an id."
|
|
601
600
|
});
|
|
602
601
|
}
|
|
603
|
-
const defaultWorkingDirectory = await resolveSandboxDefaultWorkingDirectory({
|
|
604
|
-
sandboxSession,
|
|
605
|
-
abortSignal: startOpts.abortSignal
|
|
606
|
-
});
|
|
607
602
|
const lifecycleState = startOpts.continueFrom ?? startOpts.resumeFrom;
|
|
608
603
|
const isResume = lifecycleState != null;
|
|
609
604
|
const isContinue = startOpts.continueFrom != null;
|
|
@@ -647,16 +642,17 @@ function createCodex(settings = {}) {
|
|
|
647
642
|
sandboxAuthEnvironment.OPENAI_BASE_URL = DEFAULT_OPENAI_BASE_URL;
|
|
648
643
|
}
|
|
649
644
|
}
|
|
650
|
-
const bootstrapDir = path.posix.resolve(
|
|
651
|
-
defaultWorkingDirectory,
|
|
652
|
-
CODEX_BOOTSTRAP_DIR
|
|
653
|
-
);
|
|
654
|
-
const workDir = startOpts.sessionWorkDir;
|
|
655
645
|
const sandboxHomeDir = await resolveSandboxHomeDir({
|
|
656
646
|
sandbox: toolSafeSandboxSession,
|
|
657
647
|
abortSignal: startOpts.abortSignal
|
|
658
648
|
});
|
|
659
|
-
const
|
|
649
|
+
const stateDir = harnessStateDirectoryPath({ sandboxHomeDir });
|
|
650
|
+
const bootstrapDir = path.posix.resolve(stateDir, CODEX_BOOTSTRAP_DIR);
|
|
651
|
+
const workDir = startOpts.sessionWorkDir;
|
|
652
|
+
const sessionDataDir = harnessSessionDataDirectoryPath({
|
|
653
|
+
stateDirectory: stateDir,
|
|
654
|
+
sessionId: startOpts.sessionId
|
|
655
|
+
});
|
|
660
656
|
const bridgeStateDir = `${sessionDataDir}/bridge`;
|
|
661
657
|
const cliShimDir = `${sessionDataDir}/codex`;
|
|
662
658
|
const cliShimPath = `${cliShimDir}/${CLI_SHIM_FILENAME}`;
|