@ai-sdk/harness-codex 1.0.175 → 1.0.177
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 +28 -0
- package/dist/bridge/index.mjs +38 -9
- package/dist/bridge/index.mjs.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/bridge/index.ts +20 -20
- package/src/codex-harness.ts +9 -2
package/src/codex-harness.ts
CHANGED
|
@@ -105,7 +105,8 @@ export type CodexHarnessSettings = {
|
|
|
105
105
|
/**
|
|
106
106
|
* Additional configuration passed through to Codex as-is. Codex config keys
|
|
107
107
|
* typically use snake_case and must be provided in that form. Values managed
|
|
108
|
-
* by this adapter take precedence over conflicting entries
|
|
108
|
+
* by this adapter take precedence over conflicting entries, except for the
|
|
109
|
+
* model_reasoning_summary default, which callers can override.
|
|
109
110
|
*/
|
|
110
111
|
readonly codexConfig?: Record<string, unknown>;
|
|
111
112
|
/**
|
|
@@ -136,6 +137,12 @@ export type CodexHarnessSettings = {
|
|
|
136
137
|
readonly portEndpoint?: HarnessV1PortEndpoint;
|
|
137
138
|
/** Maximum milliseconds to wait for the bridge to advertise its port. Defaults to 120000. */
|
|
138
139
|
readonly startupTimeoutMs?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Abort a running turn when its host disconnects and does not reconnect
|
|
142
|
+
* within this many milliseconds, so the turn stops spending. A suspended
|
|
143
|
+
* turn is exempt. Unset keeps the turn running until it finishes.
|
|
144
|
+
*/
|
|
145
|
+
readonly hostDisconnectTimeoutMs?: number;
|
|
139
146
|
/**
|
|
140
147
|
* Configures reconnection attempts after an established bridge connection
|
|
141
148
|
* drops. The reconnect window includes connection establishment and
|
|
@@ -498,7 +505,7 @@ export function createCodex(
|
|
|
498
505
|
});
|
|
499
506
|
|
|
500
507
|
const proc = await toolSafeSandboxSession.spawn({
|
|
501
|
-
command: `node ${shellQuote(`${bootstrapDir}/bridge.mjs`)} --workdir ${shellQuote(workDir)} --bridge-state-dir ${shellQuote(bridgeStateDir)}`,
|
|
508
|
+
command: `node ${shellQuote(`${bootstrapDir}/bridge.mjs`)} --workdir ${shellQuote(workDir)} --bridge-state-dir ${shellQuote(bridgeStateDir)}${settings.hostDisconnectTimeoutMs !== undefined ? ` --host-disconnect-timeout-ms ${shellQuote(String(settings.hostDisconnectTimeoutMs))}` : ''}`,
|
|
502
509
|
env,
|
|
503
510
|
abortSignal: startOpts.abortSignal,
|
|
504
511
|
});
|