@openclaw/codex 2026.8.1 → 2026.8.33
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/{attempt-client-cleanup-CVPvp9dL.js → .setup/attempt-client-cleanup-FBnDjmtX.mjs} +1 -1
- package/dist/{auth-binding-Ds_QVm-X.js → .setup/auth-binding-oyIUSaFi.mjs} +1 -1
- package/dist/{binding-connection-CCQFs8lf.js → .setup/binding-connection-BgiXAp29.mjs} +2 -2
- package/dist/{bounded-turn-rq5tiSXk.js → .setup/bounded-turn-kWYLbaDH.mjs} +12 -11
- package/dist/{capabilities-CGm_94eL.js → .setup/capabilities-oLHKpYRj.mjs} +1 -1
- package/dist/{command-formatters-C54Yg3eA.js → .setup/command-formatters-DylXEqck.mjs} +4 -3
- package/dist/{command-handlers-BvOAHTrA.js → .setup/command-handlers-PRe4WEmx.mjs} +42 -34
- package/dist/{compact-Hd7SAc0N.js → .setup/compact-K2iOmzQp.mjs} +14 -12
- package/dist/{config-Cxw3Cl3k.js → .setup/config-ClwHKKTN.mjs} +7 -5
- package/dist/{conversation-binding-data-CW2GuupV.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +3 -2
- package/dist/{dynamic-tools-BFoUcRdx.js → .setup/dynamic-tools-XNStyzzb.mjs} +105 -108
- package/dist/{effective-mcp-catalog-BTJHnDSx.js → .setup/effective-mcp-catalog-BHpifbgx.mjs} +2 -2
- package/dist/{event-projector-assistant-message-C5-Ds8mA.js → .setup/event-projector-assistant-message-BCnzlajn.mjs} +1 -1
- package/dist/{event-projector-usage-D3PHFFXh.js → .setup/event-projector-usage-h7P0Raok.mjs} +7 -12
- package/dist/{harness-DVfUQBlQ.js → .setup/harness-CawBdltH.mjs} +14 -14
- package/dist/{isolated-completion-Cbbx_5Ed.js → .setup/isolated-completion-rL3zrcAe.mjs} +4 -4
- package/dist/{managed-binary-ZkGodW19.js → .setup/managed-binary-DlGr2kYu.mjs} +1 -1
- package/dist/{model-catalog-o6Cgjoss.js → .setup/model-catalog--miA1cod.mjs} +5 -5
- package/dist/{models-DgFWSuxA.js → .setup/models-BNPc8Vr2.mjs} +5 -4
- package/dist/{native-subagent-monitor-CwFyoylz.js → .setup/native-subagent-monitor-mhFvLcPG.mjs} +25 -105
- package/dist/{node-exec-server.runtime-DXrqpw1c.js → .setup/node-exec-server.runtime-BmAZPmrd.mjs} +3 -3
- package/dist/{plugin-approval-roundtrip-D80UZiJ_.js → .setup/plugin-approval-roundtrip-Dlq4n0n8.mjs} +2 -1
- package/dist/{plugin-marketplace-discovery-mdmScYOj.js → .setup/plugin-marketplace-discovery-KyJdBtCC.mjs} +14 -13
- package/dist/{plugin-metadata-cache-CulOABwu.js → .setup/plugin-metadata-cache-RRQ_VJrs.mjs} +6 -6
- package/dist/{rate-limits-hFtzt2Up.js → .setup/rate-limits-CQUmEcUk.mjs} +3 -2
- package/dist/{request-CCm4LaED.js → .setup/request-fEUi95EK.mjs} +3 -3
- package/dist/{run-attempt-BwNQDH2u.js → .setup/run-attempt-BJ6tOQeE.mjs} +138 -187
- package/dist/{runtime-artifact-DeBvleJw.js → .setup/runtime-artifact-D0ssVSlz.mjs} +3 -3
- package/dist/{session-binding-q2WSTVmC.js → .setup/session-binding-Bd9dh1Er.mjs} +3 -3
- package/dist/{session-catalog-C2Tae4rI.js → .setup/session-catalog-eQhJDU41.mjs} +234 -206
- package/dist/{session-catalog-home-id-DAKUrm3C.js → .setup/session-catalog-home-id-CjyBDShn.mjs} +3 -3
- package/dist/{session-cli-BuDjm5Ou.js → .setup/session-cli-mJePHTAs.mjs} +1 -1
- package/dist/.setup/session-history-Cg8PzgeU.mjs +87 -0
- package/dist/{session-permission-policy-gLm40Vtq.js → .setup/session-permission-policy-C0bdhR_I.mjs} +1 -1
- package/dist/{session-retirement-CdkI0bvb.js → .setup/session-retirement-osjW6zy5.mjs} +4 -4
- package/dist/{session-upstream-marker-Bcy33kam.js → .setup/session-upstream-marker-CIgMzZku.mjs} +1 -1
- package/dist/.setup/settled-turn-context-OxoGQWJK.mjs +290 -0
- package/dist/.setup/settled-turn-finalizer-D9SoKTb-.mjs +104 -0
- package/dist/{shared-client-kNkljY-R.js → .setup/shared-client-DG1kAfGq.mjs} +37 -39
- package/dist/{side-question-GwD73tX6.js → .setup/side-question-Bi9chAvD.mjs} +25 -17
- package/dist/{thread-lifecycle-Ss-uwnC4.js → .setup/thread-lifecycle-Cc6I-gbl.mjs} +273 -232
- package/dist/{thread-ownership-CeYBqg_4.js → .setup/thread-ownership-B3vjUi0P.mjs} +2 -2
- package/dist/{thread-resume-DF54hagX.js → .setup/thread-resume-OMjvue9F.mjs} +8 -7
- package/dist/{transcript-mirror-CkEQIna-.js → .setup/transcript-mirror-DN-ed7Kf.mjs} +14 -7
- package/dist/{transport-stdio-C7-s9TLG.js → .setup/transport-stdio-Cu0xKDRo.mjs} +41 -25
- package/dist/{upstream-prompt-provenance-CFmsKwr9.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +8 -4
- package/dist/{upstream-session-fork-BACGlOFa.js → .setup/upstream-session-fork-DL7QQ1e_.mjs} +14 -20
- package/dist/{usage-C2l8Mils.js → .setup/usage-dsPLHd8O.mjs} +3 -3
- package/dist/{web-search-provider.runtime-B2XgRdFv.js → .setup/web-search-provider.runtime-BRH3ahFN.mjs} +3 -3
- package/dist/api.js +4 -4
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +9 -5
- package/dist/harness.js +1 -1
- package/dist/index.js +60 -41
- package/dist/media-understanding-provider.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/package.json +6 -6
- package/dist/settled-turn-finalizer-B8JJcxCi.js +0 -329
- /package/dist/{context-compaction-activity-BOeJf7yo.js → .setup/context-compaction-activity-BOeJf7yo.mjs} +0 -0
- /package/dist/{elicitation-input-DMkeki8d.js → .setup/elicitation-input-DMkeki8d.mjs} +0 -0
- /package/dist/{image-payload-sanitizer-CnfoUPCE.js → .setup/image-payload-sanitizer-CnfoUPCE.mjs} +0 -0
- /package/dist/{launch-args-sXOAg0SX.js → .setup/launch-args-sXOAg0SX.mjs} +0 -0
- /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- /package/dist/{protocol-validators-Bg5rpNxk.js → .setup/protocol-validators-Bg5rpNxk.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.
|
|
2
|
-
import { F as resolveCodexAppServerLocalHomeDir, I as resolveCodexAppServerUserHomeDir, L as withEphemeralCodexAuthStore, P as resolveCodexAppServerHomeDir, a as resolveCodexAppServerStartOptionsForAgent, i as resolveCodexAppServerRuntimeOptions, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey } from "./config-
|
|
3
|
-
import { a as CODEX_APP_SERVER_VERSION, c as resolveMacOSDesktopCodexAppPathCandidates, l as resolveMacOSDesktopCodexBundledMarketplaceCandidates, n as resolveManagedCodexAppServerStartOptions, o as MIN_SUPPORTED_CODEX_APP_SERVER_VERSION, r as resolveManagedCodexNativeCommand, s as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand, u as resolveMacOSDesktopCodexComputerUseServiceAppCandidates } from "./managed-binary-
|
|
4
|
-
import { o as isCodexAppServerNativeAuthProfile } from "./session-binding-
|
|
5
|
-
import { a as hasCodexAppServerNaturalExit, i as closeCodexAppServerTransportAndWait, n as resolveCodexAppServerSpawnEnv, r as closeCodexAppServerTransport, t as createStdioTransport } from "./transport-stdio-
|
|
6
|
-
import { l as readCodexDynamicToolCallParams } from "./protocol-validators-Bg5rpNxk.
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
+
import { F as resolveCodexAppServerLocalHomeDir, I as resolveCodexAppServerUserHomeDir, L as withEphemeralCodexAuthStore, P as resolveCodexAppServerHomeDir, a as resolveCodexAppServerStartOptionsForAgent, i as resolveCodexAppServerRuntimeOptions, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey } from "./config-ClwHKKTN.mjs";
|
|
3
|
+
import { a as CODEX_APP_SERVER_VERSION, c as resolveMacOSDesktopCodexAppPathCandidates, l as resolveMacOSDesktopCodexBundledMarketplaceCandidates, n as resolveManagedCodexAppServerStartOptions, o as MIN_SUPPORTED_CODEX_APP_SERVER_VERSION, r as resolveManagedCodexNativeCommand, s as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand, u as resolveMacOSDesktopCodexComputerUseServiceAppCandidates } from "./managed-binary-DlGr2kYu.mjs";
|
|
4
|
+
import { o as isCodexAppServerNativeAuthProfile } from "./session-binding-Bd9dh1Er.mjs";
|
|
5
|
+
import { a as hasCodexAppServerNaturalExit, i as closeCodexAppServerTransportAndWait, n as resolveCodexAppServerSpawnEnv, r as closeCodexAppServerTransport, t as createStdioTransport } from "./transport-stdio-Cu0xKDRo.mjs";
|
|
6
|
+
import { l as readCodexDynamicToolCallParams } from "./protocol-validators-Bg5rpNxk.mjs";
|
|
7
7
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
@@ -1215,21 +1215,15 @@ async function applyCodexAppServerAuthProfile(params) {
|
|
|
1215
1215
|
await assertNativeCodexAccountMatchesRoute(params.client, params.authRequirement);
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
config: params.config
|
|
1228
|
-
});
|
|
1229
|
-
} catch (error) {
|
|
1230
|
-
if (params.authRequirement === "subscription" && error instanceof CodexAppServerAuthProfileUnavailableError) throw createCodexAppServerAuthError("Codex subscription auth profile could not produce login credentials. Sign in with `openclaw models auth login --provider openai`, select that profile, then retry.", error);
|
|
1231
|
-
throw error;
|
|
1232
|
-
}
|
|
1218
|
+
const loginParams = params.preparedAuth?.kind === "profile" ? params.preparedAuth.snapshot.loginParams : params.preparedAuth?.kind === "api-key" ? {
|
|
1219
|
+
type: "apiKey",
|
|
1220
|
+
apiKey: params.preparedAuth.apiKey
|
|
1221
|
+
} : await resolveCodexAppServerAuthProfileLoginParams({
|
|
1222
|
+
agentDir: params.agentDir,
|
|
1223
|
+
authProfileId: params.authProfileId ?? void 0,
|
|
1224
|
+
authProfileStore: params.authProfileStore,
|
|
1225
|
+
config: params.config
|
|
1226
|
+
});
|
|
1233
1227
|
if (params.authRequirement === "subscription" && loginParams?.type !== "chatgptAuthTokens") throw createCodexAppServerAuthError("Codex subscription auth profile could not produce login credentials. Sign in with `openclaw models auth login --provider openai`, select that profile, then retry.");
|
|
1234
1228
|
if (!loginParams) {
|
|
1235
1229
|
if (params.authRequirement !== "api-key" || params.startOptions?.transport !== "stdio") return;
|
|
@@ -1269,6 +1263,7 @@ var CodexAppServerAuthProfileUnavailableError = class extends Error {
|
|
|
1269
1263
|
constructor(..._args) {
|
|
1270
1264
|
super(..._args);
|
|
1271
1265
|
this.status = 401;
|
|
1266
|
+
this.code = "selected_auth_profile_unavailable";
|
|
1272
1267
|
}
|
|
1273
1268
|
};
|
|
1274
1269
|
async function resolveCodexAppServerAuthProfileLoginParams(params) {
|
|
@@ -1325,8 +1320,8 @@ async function resolveCodexAppServerAuthProfileLoginParamsInternal(params) {
|
|
|
1325
1320
|
});
|
|
1326
1321
|
if (!profileId) return;
|
|
1327
1322
|
const credential = store.profiles[profileId];
|
|
1328
|
-
if (!credential) throw new
|
|
1329
|
-
if (!isCodexAppServerAuthProfileCredential(credential)) throw new
|
|
1323
|
+
if (!credential) throw new CodexAppServerAuthProfileUnavailableError(`Codex app-server auth profile "${profileId}" was not found. Select an existing OpenAI profile or sign in again with OpenClaw, then retry.`);
|
|
1324
|
+
if (!isCodexAppServerAuthProfileCredential(credential)) throw new CodexAppServerAuthProfileUnavailableError(`Codex app-server auth profile "${profileId}" must use the canonical OpenAI auth provider; run "openclaw doctor --fix" to migrate legacy provider IDs.`);
|
|
1330
1325
|
const loginParams = await resolveLoginParamsForCredential(profileId, credential, {
|
|
1331
1326
|
agentDir: params.agentDir,
|
|
1332
1327
|
store,
|
|
@@ -1573,7 +1568,7 @@ function resolveExplicitChatgptAccountId(credential) {
|
|
|
1573
1568
|
}
|
|
1574
1569
|
//#endregion
|
|
1575
1570
|
//#region extensions/codex/src/app-server/rate-limit-cache.ts
|
|
1576
|
-
const DEFAULT_CODEX_RATE_LIMIT_CACHE_MAX_AGE_MS =
|
|
1571
|
+
const DEFAULT_CODEX_RATE_LIMIT_CACHE_MAX_AGE_MS = 6e5;
|
|
1577
1572
|
const SPARSE_ACCOUNT_METADATA_KEYS = [
|
|
1578
1573
|
"credits",
|
|
1579
1574
|
"individualLimit",
|
|
@@ -1705,7 +1700,7 @@ async function withAbortableTimeout(params) {
|
|
|
1705
1700
|
//#region extensions/codex/src/app-server/client-runtime.ts
|
|
1706
1701
|
/** Client-scoped Codex auth and account observers. */
|
|
1707
1702
|
/** Match Codex's native grace window without retaining inactive conversations indefinitely. */
|
|
1708
|
-
const CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS =
|
|
1703
|
+
const CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS = 18e5;
|
|
1709
1704
|
/** Native-child parents are active ownership, so only otherwise-idle threads count against this cap. */
|
|
1710
1705
|
const CODEX_APP_SERVER_LIVE_THREAD_MAX_IDLE = 64;
|
|
1711
1706
|
/** Return a deterministic error before Codex cancels its ten-second external-auth request. */
|
|
@@ -2178,7 +2173,7 @@ function normalizeLogField(value) {
|
|
|
2178
2173
|
if (typeof value !== "string") return;
|
|
2179
2174
|
const normalized = value.replaceAll(String.fromCharCode(27), " ").replaceAll("\r", " ").replaceAll("\n", " ").replaceAll(" ", " ").trim();
|
|
2180
2175
|
if (!normalized) return;
|
|
2181
|
-
return normalized.length > LOG_FIELD_MAX_LENGTH ? `${truncateUtf16Safe(normalized,
|
|
2176
|
+
return normalized.length > LOG_FIELD_MAX_LENGTH ? `${truncateUtf16Safe(normalized, 157)}...` : normalized;
|
|
2182
2177
|
}
|
|
2183
2178
|
function readNumericTimeoutMs(value) {
|
|
2184
2179
|
if (typeof value === "number" && Number.isFinite(value)) return Math.max(0, Math.floor(value));
|
|
@@ -2692,7 +2687,7 @@ function websocketFrameToText(data) {
|
|
|
2692
2687
|
* routing, notification fanout, server request handlers, and version checks.
|
|
2693
2688
|
*/
|
|
2694
2689
|
const CODEX_APP_SERVER_PARSE_LOG_MAX = 500;
|
|
2695
|
-
const CODEX_APP_SERVER_PARSE_BUFFER_MAX =
|
|
2690
|
+
const CODEX_APP_SERVER_PARSE_BUFFER_MAX = 8388608;
|
|
2696
2691
|
const CODEX_APP_SERVER_PARSE_BUFFER_MAX_LINES = 1e3;
|
|
2697
2692
|
const CODEX_APP_SERVER_STDERR_TAIL_MAX = 2e3;
|
|
2698
2693
|
const CODEX_APP_SERVER_OVERLOADED_ERROR_CODE = -32001;
|
|
@@ -3343,7 +3338,7 @@ function assertSupportedCodexAppServerVersion(response) {
|
|
|
3343
3338
|
if (!detectedVersion) throw new CodexAppServerVersionError(detectedVersion);
|
|
3344
3339
|
const detected = parse(detectedVersion);
|
|
3345
3340
|
if (!detected || detected.compare("0.149.0") < 0) throw new CodexAppServerVersionError(detectedVersion);
|
|
3346
|
-
if (detected.compare("0.
|
|
3341
|
+
if (detected.compare("0.156.1") > 0) embeddedAgentLog.warn("codex app-server is newer than OpenClaw's managed runtime; continuing with normal startup validation", {
|
|
3347
3342
|
detectedVersion,
|
|
3348
3343
|
validatedVersion: CODEX_APP_SERVER_VERSION
|
|
3349
3344
|
});
|
|
@@ -3424,12 +3419,12 @@ const CODEX_APP_SERVER_STARTUP_TIMEOUT_FLOOR_MS = 100;
|
|
|
3424
3419
|
const CODEX_TURN_COMPLETION_IDLE_TIMEOUT_MS = 6e4;
|
|
3425
3420
|
/** Short guard after apparent assistant completion. */
|
|
3426
3421
|
const CODEX_TURN_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS = 1e4;
|
|
3427
|
-
const CODEX_POST_TOOL_RAW_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS =
|
|
3422
|
+
const CODEX_POST_TOOL_RAW_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS = 3e5;
|
|
3428
3423
|
/** Guard after reasoning/commentary progress when no tool handoff occurred. */
|
|
3429
|
-
const CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS =
|
|
3424
|
+
const CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS = 3e5;
|
|
3430
3425
|
/** Long terminal idle watch for app-server turns that never send completion. */
|
|
3431
|
-
const CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS =
|
|
3432
|
-
const TURN_TERMINAL_SETTLEMENT_IDLE_TIMEOUT_MS =
|
|
3426
|
+
const CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS = 18e5;
|
|
3427
|
+
const TURN_TERMINAL_SETTLEMENT_IDLE_TIMEOUT_MS = 12e4;
|
|
3433
3428
|
const TURN_FINALIZE_DRAIN_ABORT_GRACE_MS = 5e3;
|
|
3434
3429
|
var CodexAppServerStartupError = class extends Error {
|
|
3435
3430
|
constructor(reason, message = reason === "timed_out" ? "codex app-server startup timed out" : "codex app-server startup aborted") {
|
|
@@ -3443,7 +3438,8 @@ function isCodexAppServerStartupError(error, reason) {
|
|
|
3443
3438
|
return error instanceof Error && "code" in error && error.code === "CODEX_APP_SERVER_STARTUP_CANCELLED" && "reason" in error && (error.reason === "aborted" || error.reason === "timed_out") && (reason === void 0 || error.reason === reason);
|
|
3444
3439
|
}
|
|
3445
3440
|
function resolvePositiveIntegerTimeoutMs(value, fallbackMs) {
|
|
3446
|
-
|
|
3441
|
+
const fallback = resolveTimerTimeoutMs(fallbackMs, 1);
|
|
3442
|
+
return resolveTimerTimeoutMs(value, fallback);
|
|
3447
3443
|
}
|
|
3448
3444
|
/** Runs startup work with abort and timeout handling plus optional cleanup. */
|
|
3449
3445
|
async function withCodexStartupTimeout(params) {
|
|
@@ -3509,7 +3505,8 @@ function resolveCodexTurnTerminalIdleTimeoutMs(value, runTimeoutOverrideMs) {
|
|
|
3509
3505
|
/** Adds gateway grace time to a caller timeout without overflowing invalid values. */
|
|
3510
3506
|
function resolveCodexGatewayTimeoutWithGraceMs(timeoutMs, graceMs = 1e4) {
|
|
3511
3507
|
const timeout = resolvePositiveIntegerTimeoutMs(timeoutMs, 1);
|
|
3512
|
-
|
|
3508
|
+
const grace = resolveTimerTimeoutMs(graceMs, 0, 0);
|
|
3509
|
+
return addTimerTimeoutGraceMs(timeout, grace) ?? timeout;
|
|
3513
3510
|
}
|
|
3514
3511
|
//#endregion
|
|
3515
3512
|
//#region extensions/codex/src/app-server/desktop-generation-fingerprint.ts
|
|
@@ -4101,6 +4098,10 @@ async function resolveCodexAppServerClientStartContext(options) {
|
|
|
4101
4098
|
store: authProfileStore,
|
|
4102
4099
|
snapshot: preparedAuthProfileSnapshot
|
|
4103
4100
|
} : void 0;
|
|
4101
|
+
const agentStartOptions = resolveCodexAppServerStartOptionsForAgent({
|
|
4102
|
+
startOptions: requestedStartOptions,
|
|
4103
|
+
agentDir
|
|
4104
|
+
});
|
|
4104
4105
|
return {
|
|
4105
4106
|
agentDir,
|
|
4106
4107
|
usesNativeAuth,
|
|
@@ -4110,10 +4111,7 @@ async function resolveCodexAppServerClientStartContext(options) {
|
|
|
4110
4111
|
preparedAuth: resolvedPreparedAuth,
|
|
4111
4112
|
authRequirement,
|
|
4112
4113
|
startOptions: await bridgeCodexAppServerStartOptions({
|
|
4113
|
-
startOptions: await resolveManagedCodexAppServerStartOptions(
|
|
4114
|
-
startOptions: requestedStartOptions,
|
|
4115
|
-
agentDir
|
|
4116
|
-
})),
|
|
4114
|
+
startOptions: await resolveManagedCodexAppServerStartOptions(agentStartOptions),
|
|
4117
4115
|
agentId: options?.agentId,
|
|
4118
4116
|
agentDir,
|
|
4119
4117
|
authProfileId: usesNativeAuth || preparedAuth?.kind === "api-key" ? null : authProfileId,
|
|
@@ -4448,7 +4446,7 @@ async function startInitializedCodexAppServerClient(params) {
|
|
|
4448
4446
|
} finally {
|
|
4449
4447
|
artifactDrain?.cancel();
|
|
4450
4448
|
}
|
|
4451
|
-
const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-
|
|
4449
|
+
const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-D0ssVSlz.mjs") : void 0;
|
|
4452
4450
|
const nativeCommandBeforeStart = startOptions.commandSource === "resolved-managed" ? resolveManagedCodexNativeCommand(startOptions.command) : void 0;
|
|
4453
4451
|
const runtimeArtifactBeforeStart = runtimeArtifactModule ? await runtimeArtifactModule.captureCodexAppServerRuntimeArtifactBeforeStart({
|
|
4454
4452
|
startOptions,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as isCodexRemoteExecPlacementSandbox, D as resolveOpenClawExecPolicyForCodexAppServer, S as isCodexPairedNodeRemoteExecPlacementSandbox, T as readCodexPluginConfig, m as resolveCodexModelBackedReviewerPolicyContext, p as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveCodexAppServerHomeScope, u as shouldAutoApproveCodexAppServerApprovals, v as readCodexRequirementsToml, w as isCodexSandboxExecServerEnabled } from "./config-
|
|
2
|
-
import { C as withLeasedCodexAppServerClientStartSelectionRetry, Ht as isJsonObject, K as isCodexAppServerIndeterminateRequestCancellationError, Lt as resolveCodexAppServerPreparedAuthHandoff, Ot as readRecentCodexRateLimits, U as isCodexAppServerApprovalRequest, _t as ensureCodexAppServerClientRuntime, at as resolveDynamicToolCallTimeoutMs, c as getLeasedSharedCodexAppServerClient, dt as resolveCodexToolAbortTerminalReason, et as createCodexElicitationResponse, m as releaseCodexAppServerClientLease, tt as handleDynamicToolCallWithTimeout } from "./shared-client-
|
|
3
|
-
import { d as sessionBindingIdentity } from "./session-binding-
|
|
4
|
-
import { a as assertCodexThreadForkResponse, c as assertCodexTurnStartResponse, d as readCodexTurn, l as readCodexDynamicToolCallParams } from "./protocol-validators-Bg5rpNxk.
|
|
5
|
-
import { f as unsubscribeCodexThreadBestEffort, g as isCodexNotificationForTurn, s as isCodexAlreadyTerminalInterruptError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-
|
|
6
|
-
import { A as
|
|
7
|
-
import { s as resolveCodexNativeExecutionBlock } from "./request-
|
|
8
|
-
import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-
|
|
9
|
-
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-
|
|
10
|
-
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-
|
|
11
|
-
import { C as shouldRequireCodexSandboxExecServerEnvironment, D as CodexNativeToolLifecycleProjector, S as shouldEnableCodexAppServerNativeToolSurface, T as filterCodexVisionTools, a as emitDynamicToolStartedDiagnostic, b as resolveCodexNodePlacementToolConstructionPlan, d as releaseCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as resolveCodexProviderWebSearchSupportForClient, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as ensureCodexSandboxExecServerEnvironment, v as resolveCodexExternalSandboxPolicyForOpenClawSandbox, x as resolveCodexSandboxEnvironmentSelection, y as resolveCodexMessageToolProvider } from "./dynamic-tools-
|
|
1
|
+
import { C as isCodexRemoteExecPlacementSandbox, D as resolveOpenClawExecPolicyForCodexAppServer, S as isCodexPairedNodeRemoteExecPlacementSandbox, T as readCodexPluginConfig, m as resolveCodexModelBackedReviewerPolicyContext, p as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveCodexAppServerHomeScope, u as shouldAutoApproveCodexAppServerApprovals, v as readCodexRequirementsToml, w as isCodexSandboxExecServerEnabled } from "./config-ClwHKKTN.mjs";
|
|
2
|
+
import { C as withLeasedCodexAppServerClientStartSelectionRetry, Ht as isJsonObject, K as isCodexAppServerIndeterminateRequestCancellationError, Lt as resolveCodexAppServerPreparedAuthHandoff, Ot as readRecentCodexRateLimits, U as isCodexAppServerApprovalRequest, _t as ensureCodexAppServerClientRuntime, at as resolveDynamicToolCallTimeoutMs, c as getLeasedSharedCodexAppServerClient, dt as resolveCodexToolAbortTerminalReason, et as createCodexElicitationResponse, m as releaseCodexAppServerClientLease, tt as handleDynamicToolCallWithTimeout } from "./shared-client-DG1kAfGq.mjs";
|
|
3
|
+
import { d as sessionBindingIdentity } from "./session-binding-Bd9dh1Er.mjs";
|
|
4
|
+
import { a as assertCodexThreadForkResponse, c as assertCodexTurnStartResponse, d as readCodexTurn, l as readCodexDynamicToolCallParams } from "./protocol-validators-Bg5rpNxk.mjs";
|
|
5
|
+
import { f as unsubscribeCodexThreadBestEffort, g as isCodexNotificationForTurn, s as isCodexAlreadyTerminalInterruptError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-FBnDjmtX.mjs";
|
|
6
|
+
import { A as resolveCodexBindingModelProviderFallback, C as resolveCodexWebSearchPlan, D as resolveCodexAppServerModelProvider, E as CODEX_NATIVE_PERSONALITY_NONE, L as filterCodexDynamicTools, O as resolveCodexAppServerRequestModelSelection, U as resolveCodexDynamicToolsLoading, a as resolveCodexAppServerReasoningEffort, b as buildCodexRuntimeThreadConfig, c as CODEX_NATIVE_HOOK_RELAY_EVENTS, d as buildCodexNativeHookRelayDisabledConfig, et as buildCodexPluginAppsConfigPatchFromPolicyContext, i as readCodexSupportedReasoningEfforts, ot as mergeCodexThreadConfigs, p as emitCodexNativePreToolUseFailureDiagnostic, u as buildCodexNativeHookRelayConfig } from "./thread-lifecycle-Cc6I-gbl.mjs";
|
|
7
|
+
import { s as resolveCodexNativeExecutionBlock } from "./request-fEUi95EK.mjs";
|
|
8
|
+
import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CQUmEcUk.mjs";
|
|
9
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-C0bdhR_I.mjs";
|
|
10
|
+
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-BgiXAp29.mjs";
|
|
11
|
+
import { C as shouldRequireCodexSandboxExecServerEnvironment, D as CodexNativeToolLifecycleProjector, S as shouldEnableCodexAppServerNativeToolSurface, T as filterCodexVisionTools, a as emitDynamicToolStartedDiagnostic, b as resolveCodexNodePlacementToolConstructionPlan, d as releaseCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as resolveCodexProviderWebSearchSupportForClient, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as ensureCodexSandboxExecServerEnvironment, v as resolveCodexExternalSandboxPolicyForOpenClawSandbox, x as resolveCodexSandboxEnvironmentSelection, y as resolveCodexMessageToolProvider } from "./dynamic-tools-XNStyzzb.mjs";
|
|
12
12
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
@@ -23,8 +23,8 @@ var CodexSideQuestionTimeoutError = class extends Error {
|
|
|
23
23
|
this.name = "TimeoutError";
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const CODEX_SIDE_NATIVE_HOOK_RELAY_MIN_TTL_MS =
|
|
27
|
-
const CODEX_SIDE_NATIVE_HOOK_RELAY_TTL_GRACE_MS =
|
|
26
|
+
const CODEX_SIDE_NATIVE_HOOK_RELAY_MIN_TTL_MS = 18e5;
|
|
27
|
+
const CODEX_SIDE_NATIVE_HOOK_RELAY_TTL_GRACE_MS = 3e5;
|
|
28
28
|
const CODEX_SIDE_NATIVE_HOOK_RELAY_STARTUP_REQUEST_COUNT = 3;
|
|
29
29
|
const CODEX_SIDE_NATIVE_HOOK_RELAY_EVENTS_WITH_APP_SERVER_APPROVALS = CODEX_NATIVE_HOOK_RELAY_EVENTS.filter((event) => event !== "permission_request");
|
|
30
30
|
const SIDE_BOUNDARY_PROMPT = `Side conversation boundary.
|
|
@@ -461,7 +461,8 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
461
461
|
nativeCodeModeEnabled: nativeToolSurfaceEnabled,
|
|
462
462
|
nativeCodeModeOnlyEnabled: appServer.codeModeOnly
|
|
463
463
|
});
|
|
464
|
-
const
|
|
464
|
+
const pluginAppsConfigPatch = binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0;
|
|
465
|
+
const threadConfig = mergeCodexThreadConfigs(nativeHookRelayConfig, runtimeThreadConfig, pluginAppsConfigPatch, appServer.networkProxy?.configPatch) ?? runtimeThreadConfig;
|
|
465
466
|
const forkResponse = assertCodexThreadForkResponse(await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
466
467
|
lease: clientLease,
|
|
467
468
|
options: clientOptions,
|
|
@@ -496,7 +497,11 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
496
497
|
timeoutMs: appServer.requestTimeoutMs,
|
|
497
498
|
signal: runAbortController.signal
|
|
498
499
|
});
|
|
499
|
-
const effort = usesSupervisionConnection ? void 0 :
|
|
500
|
+
const effort = usesSupervisionConnection ? void 0 : resolveCodexAppServerReasoningEffort({
|
|
501
|
+
thinkLevel: params.resolvedThinkLevel ?? "off",
|
|
502
|
+
modelId: modelSelection.model,
|
|
503
|
+
supportedReasoningEfforts: readCodexSupportedReasoningEfforts(params.runtimeModel?.compat)
|
|
504
|
+
});
|
|
500
505
|
turnId = assertCodexTurnStartResponse(await client.request("turn/start", {
|
|
501
506
|
threadId: childThreadId,
|
|
502
507
|
input: [{
|
|
@@ -695,8 +700,9 @@ async function createCodexSideToolBridge(input) {
|
|
|
695
700
|
workspaceDir: input.cwd
|
|
696
701
|
});
|
|
697
702
|
const toolConstructionPlan = resolveCodexNodePlacementToolConstructionPlan(sandbox, input.nativeToolSurfaceEnabled);
|
|
698
|
-
|
|
703
|
+
const allTools = createOpenClawCodingTools({
|
|
699
704
|
agentId: input.sessionAgentId,
|
|
705
|
+
requesterThinkingLevel: input.params.resolvedThinkLevel ?? "off",
|
|
700
706
|
sessionKey: sandboxSessionKey,
|
|
701
707
|
runSessionKey: input.params.sessionKey && input.params.sessionKey !== sandboxSessionKey ? input.params.sessionKey : void 0,
|
|
702
708
|
sessionId: input.params.sessionId,
|
|
@@ -752,7 +758,9 @@ async function createCodexSideToolBridge(input) {
|
|
|
752
758
|
emitBeforeToolCallDiagnostics: false,
|
|
753
759
|
modelHasVision: runtimeModel.input?.includes("image") ?? false,
|
|
754
760
|
requireExplicitMessageTarget: true
|
|
755
|
-
})
|
|
761
|
+
});
|
|
762
|
+
const codexFilteredTools = filterCodexDynamicTools(allTools, input.pluginConfig);
|
|
763
|
+
tools = filterCodexVisionTools(codexFilteredTools, {
|
|
756
764
|
modelHasVision: runtimeModel.input?.includes("image") ?? false,
|
|
757
765
|
nativeImageInspectionEnabled: input.nativeToolSurfaceEnabled
|
|
758
766
|
});
|