@openclaw/codex 2026.5.16-beta.7 → 2026.5.18-beta.1
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/harness.js +2 -2
- package/dist/{run-attempt-Mn4zlbBO.js → run-attempt-DyLQRA61.js} +23 -18
- package/dist/{side-question-D8VnF9iq.js → side-question-CfRPUq5X.js} +1 -1
- package/dist/test-api.js +1 -1
- package/dist/{thread-lifecycle-Czx7CGwZ.js → thread-lifecycle-5SBrtWFl.js} +4 -4
- package/package.json +4 -4
package/dist/harness.js
CHANGED
|
@@ -18,14 +18,14 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
18
18
|
};
|
|
19
19
|
},
|
|
20
20
|
runAttempt: async (params) => {
|
|
21
|
-
const { runCodexAppServerAttempt } = await import("./run-attempt-
|
|
21
|
+
const { runCodexAppServerAttempt } = await import("./run-attempt-DyLQRA61.js");
|
|
22
22
|
return runCodexAppServerAttempt(params, {
|
|
23
23
|
pluginConfig: options?.pluginConfig,
|
|
24
24
|
nativeHookRelay: { enabled: true }
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
27
|
runSideQuestion: async (params) => {
|
|
28
|
-
const { runCodexAppServerSideQuestion } = await import("./side-question-
|
|
28
|
+
const { runCodexAppServerSideQuestion } = await import("./side-question-CfRPUq5X.js");
|
|
29
29
|
return runCodexAppServerSideQuestion(params, {
|
|
30
30
|
pluginConfig: options?.pluginConfig,
|
|
31
31
|
nativeHookRelay: { enabled: true }
|
|
@@ -7,7 +7,7 @@ import { d as resolveCodexUsageLimitResetAtMs, f as shouldRefreshCodexRateLimits
|
|
|
7
7
|
import { c as resolveCodexAppServerAuthAccountCacheKey, d as resolveCodexAppServerEnvApiKeyCacheKey, f as resolveCodexAppServerHomeDir, l as resolveCodexAppServerAuthProfileId, s as refreshCodexAppServerAuthTokens, t as clearSharedCodexAppServerClientIfCurrent, u as resolveCodexAppServerAuthProfileIdForAgent } from "./shared-client-DlvmoLBJ.js";
|
|
8
8
|
import { i as readCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-DqApZIgD.js";
|
|
9
9
|
import { a as defaultCodexAppInventoryCache } from "./plugin-activation-B49xb7pI.js";
|
|
10
|
-
import { C as isForcedPrivateQaCodexRuntime, S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, _ as projectContextEngineAssemblyForCodex, b as createCodexDynamicToolBridge, c as codexDynamicToolsFingerprint, f as startOrResumeThread, g as shouldBuildCodexPluginThreadConfig, h as mergeCodexThreadConfigs, i as buildDeveloperInstructions, l as isContextEngineBindingCompatible, m as buildCodexPluginThreadConfigInputFingerprint, p as buildCodexPluginThreadConfig, r as buildContextEngineBinding, s as buildTurnStartParams, t as areCodexDynamicToolFingerprintsCompatible, v as resolveCodexContextEngineProjectionMaxChars, w as normalizeCodexDynamicToolName, x as sanitizeCodexHistoryImagePayloads, y as resolveCodexContextEngineProjectionReserveTokens } from "./thread-lifecycle-
|
|
10
|
+
import { C as isForcedPrivateQaCodexRuntime, S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, _ as projectContextEngineAssemblyForCodex, b as createCodexDynamicToolBridge, c as codexDynamicToolsFingerprint, f as startOrResumeThread, g as shouldBuildCodexPluginThreadConfig, h as mergeCodexThreadConfigs, i as buildDeveloperInstructions, l as isContextEngineBindingCompatible, m as buildCodexPluginThreadConfigInputFingerprint, p as buildCodexPluginThreadConfig, r as buildContextEngineBinding, s as buildTurnStartParams, t as areCodexDynamicToolFingerprintsCompatible, v as resolveCodexContextEngineProjectionMaxChars, w as normalizeCodexDynamicToolName, x as sanitizeCodexHistoryImagePayloads, y as resolveCodexContextEngineProjectionReserveTokens } from "./thread-lifecycle-5SBrtWFl.js";
|
|
11
11
|
import { t as defaultCodexAppServerClientFactory } from "./client-factory-9L6Ie1dC.js";
|
|
12
12
|
import { a as handleCodexAppServerElicitationRequest, i as buildCodexNativeHookRelayDisabledConfig, n as CODEX_NATIVE_HOOK_RELAY_EVENTS, o as handleCodexAppServerApprovalRequest, r as buildCodexNativeHookRelayConfig, t as filterToolsForVisionInputs } from "./vision-tools-BX9YuTEK.js";
|
|
13
13
|
import { t as ensureCodexComputerUse } from "./computer-use-UJ3dxrXF.js";
|
|
@@ -2482,13 +2482,21 @@ function toCodexTextInput(text) {
|
|
|
2482
2482
|
text_elements: []
|
|
2483
2483
|
};
|
|
2484
2484
|
}
|
|
2485
|
-
function
|
|
2486
|
-
if (!sandbox?.enabled || appServer.sandbox
|
|
2485
|
+
function resolveCodexAppServerSandboxPolicyForOpenClawSandbox(appServer, sandbox, cwd) {
|
|
2486
|
+
if (!sandbox?.enabled || appServer.sandbox === "read-only") return;
|
|
2487
|
+
const networkAccess = codexNetworkAccessForOpenClawSandbox(sandbox);
|
|
2487
2488
|
return {
|
|
2488
|
-
|
|
2489
|
-
|
|
2489
|
+
type: "workspaceWrite",
|
|
2490
|
+
writableRoots: [cwd],
|
|
2491
|
+
networkAccess,
|
|
2492
|
+
excludeTmpdirEnvVar: false,
|
|
2493
|
+
excludeSlashTmp: false
|
|
2490
2494
|
};
|
|
2491
2495
|
}
|
|
2496
|
+
function codexNetworkAccessForOpenClawSandbox(sandbox) {
|
|
2497
|
+
if (!sandbox?.enabled || sandbox.backendId !== "docker") return true;
|
|
2498
|
+
return sandbox.docker.network.trim().toLowerCase() !== "none";
|
|
2499
|
+
}
|
|
2492
2500
|
function resolveCodexAppServerForOpenClawToolPolicy(params) {
|
|
2493
2501
|
if (!params.shouldPromote || !params.canUseUntrustedApprovalPolicy || params.appServer.approvalPolicy !== "never") return params.appServer;
|
|
2494
2502
|
const explicitMode = params.pluginConfig.appServer?.mode !== void 0 || isCodexAppServerPolicyMode(params.env.OPENCLAW_CODEX_APP_SERVER_MODE);
|
|
@@ -2683,8 +2691,9 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
2683
2691
|
});
|
|
2684
2692
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
2685
2693
|
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
2694
|
+
const codexSandboxPolicy = resolveCodexAppServerSandboxPolicyForOpenClawSandbox(configuredAppServer, sandbox, effectiveWorkspace);
|
|
2686
2695
|
const appServer = resolveCodexAppServerForOpenClawToolPolicy({
|
|
2687
|
-
appServer:
|
|
2696
|
+
appServer: configuredAppServer,
|
|
2688
2697
|
pluginConfig,
|
|
2689
2698
|
env: process.env,
|
|
2690
2699
|
shouldPromote: hasBeforeToolCallPolicy(),
|
|
@@ -3766,7 +3775,8 @@ async function runCodexAppServerAttempt(params, options = {}) {
|
|
|
3766
3775
|
threadId: thread.threadId,
|
|
3767
3776
|
cwd: effectiveWorkspace,
|
|
3768
3777
|
appServer: pluginAppServer,
|
|
3769
|
-
promptText: promptBuild.prompt
|
|
3778
|
+
promptText: promptBuild.prompt,
|
|
3779
|
+
sandboxPolicy: codexSandboxPolicy
|
|
3770
3780
|
}), {
|
|
3771
3781
|
timeoutMs: params.timeoutMs,
|
|
3772
3782
|
signal: runAbortController.signal
|
|
@@ -4368,12 +4378,14 @@ function resolveCodexAppServerHookChannelId(params, sandboxSessionKey) {
|
|
|
4368
4378
|
messageTo: params.messageTo
|
|
4369
4379
|
}).channelId;
|
|
4370
4380
|
}
|
|
4371
|
-
function
|
|
4381
|
+
async function buildDynamicTools(input) {
|
|
4372
4382
|
const { params } = input;
|
|
4383
|
+
if (params.disableTools || !supportsModelTools(params.model)) return [];
|
|
4373
4384
|
const modelHasVision = params.model.input?.includes("image") ?? false;
|
|
4374
4385
|
const agentDir = params.agentDir ?? resolveAgentDir$1(params.config ?? {}, input.sessionAgentId);
|
|
4386
|
+
const createOpenClawCodingTools = openClawCodingToolsFactoryForTests ?? (await import("openclaw/plugin-sdk/agent-harness")).createOpenClawCodingTools;
|
|
4375
4387
|
const sessionKeys = resolveOpenClawCodingToolsSessionKeys(params, input.sandboxSessionKey);
|
|
4376
|
-
|
|
4388
|
+
const filteredTools = filterCodexDynamicToolsForAllowlist(filterToolsForVisionInputs(filterCodexDynamicTools(createOpenClawCodingTools({
|
|
4377
4389
|
agentId: input.sessionAgentId,
|
|
4378
4390
|
...buildEmbeddedAttemptToolRunContext(params),
|
|
4379
4391
|
exec: {
|
|
@@ -4438,15 +4450,8 @@ function buildOpenClawCodingToolsOptions(input) {
|
|
|
4438
4450
|
});
|
|
4439
4451
|
input.runAbortController.abort("sessions_yield");
|
|
4440
4452
|
}
|
|
4441
|
-
}
|
|
4442
|
-
|
|
4443
|
-
async function buildDynamicTools(input) {
|
|
4444
|
-
const { params } = input;
|
|
4445
|
-
if (params.disableTools || !supportsModelTools(params.model)) return [];
|
|
4446
|
-
const createOpenClawCodingTools = openClawCodingToolsFactoryForTests ?? (await import("openclaw/plugin-sdk/agent-harness")).createOpenClawCodingTools;
|
|
4447
|
-
const toolOptions = buildOpenClawCodingToolsOptions(input);
|
|
4448
|
-
const filteredTools = filterCodexDynamicToolsForAllowlist(filterToolsForVisionInputs(filterCodexDynamicTools(createOpenClawCodingTools(toolOptions), input.pluginConfig), {
|
|
4449
|
-
modelHasVision: toolOptions.modelHasVision ?? false,
|
|
4453
|
+
}), input.pluginConfig), {
|
|
4454
|
+
modelHasVision,
|
|
4450
4455
|
hasInboundImages: (params.images?.length ?? 0) > 0
|
|
4451
4456
|
}), includeForcedMessageToolAllow(params.toolsAllow, params));
|
|
4452
4457
|
return normalizeAgentRuntimeTools({
|
|
@@ -5,7 +5,7 @@ import { r as isCodexAppServerApprovalRequest } from "./client-6FkrXfaz.js";
|
|
|
5
5
|
import { u as formatCodexUsageLimitErrorMessage } from "./command-formatters-BRW7_Nu7.js";
|
|
6
6
|
import { i as getSharedCodexAppServerClient, s as refreshCodexAppServerAuthTokens } from "./shared-client-DlvmoLBJ.js";
|
|
7
7
|
import { i as readCodexAppServerBinding } from "./session-binding-DqApZIgD.js";
|
|
8
|
-
import { S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, b as createCodexDynamicToolBridge, d as resolveReasoningEffort, h as mergeCodexThreadConfigs, n as buildCodexRuntimeThreadConfig, u as resolveCodexAppServerModelProvider } from "./thread-lifecycle-
|
|
8
|
+
import { S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, b as createCodexDynamicToolBridge, d as resolveReasoningEffort, h as mergeCodexThreadConfigs, n as buildCodexRuntimeThreadConfig, u as resolveCodexAppServerModelProvider } from "./thread-lifecycle-5SBrtWFl.js";
|
|
9
9
|
import { a as handleCodexAppServerElicitationRequest, i as buildCodexNativeHookRelayDisabledConfig, n as CODEX_NATIVE_HOOK_RELAY_EVENTS, o as handleCodexAppServerApprovalRequest, r as buildCodexNativeHookRelayConfig, t as filterToolsForVisionInputs } from "./vision-tools-BX9YuTEK.js";
|
|
10
10
|
import { n as rememberCodexRateLimits, t as readRecentCodexRateLimits } from "./rate-limit-cache-dvhq-4pi.js";
|
|
11
11
|
import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, resolveSessionAgentIds, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
|
package/dist/test-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as resolveCodexAppServerRuntimeOptions } from "./config-B5pq6hEz.js";
|
|
2
|
-
import { S as filterCodexDynamicTools, a as buildThreadResumeParams, b as createCodexDynamicToolBridge, i as buildDeveloperInstructions, o as buildThreadStartParams, s as buildTurnStartParams } from "./thread-lifecycle-
|
|
2
|
+
import { S as filterCodexDynamicTools, a as buildThreadResumeParams, b as createCodexDynamicToolBridge, i as buildDeveloperInstructions, o as buildThreadStartParams, s as buildTurnStartParams } from "./thread-lifecycle-5SBrtWFl.js";
|
|
3
3
|
//#region extensions/codex/test-api.ts
|
|
4
4
|
function resolveCodexPromptSnapshotAppServerOptions(pluginConfig) {
|
|
5
5
|
return resolveCodexAppServerRuntimeOptions({
|
|
@@ -986,7 +986,7 @@ function stableStringify(value) {
|
|
|
986
986
|
//#region extensions/codex/src/app-server/thread-lifecycle.ts
|
|
987
987
|
const CODEX_CODE_MODE_THREAD_CONFIG = {
|
|
988
988
|
"features.code_mode": true,
|
|
989
|
-
"features.code_mode_only":
|
|
989
|
+
"features.code_mode_only": false
|
|
990
990
|
};
|
|
991
991
|
const CODEX_CODE_MODE_DISABLED_THREAD_CONFIG = {
|
|
992
992
|
"features.code_mode": false,
|
|
@@ -1328,8 +1328,8 @@ function buildThreadResumeParams(params, options) {
|
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
function buildCodexRuntimeThreadConfig(config, options = {}) {
|
|
1331
|
-
|
|
1332
|
-
return mergeCodexThreadConfigs(
|
|
1331
|
+
if (options.nativeCodeModeEnabled === false) return mergeCodexThreadConfigs(CODEX_CODE_MODE_THREAD_CONFIG, config, CODEX_CODE_MODE_DISABLED_THREAD_CONFIG) ?? { ...CODEX_CODE_MODE_DISABLED_THREAD_CONFIG };
|
|
1332
|
+
return mergeCodexThreadConfigs(CODEX_CODE_MODE_THREAD_CONFIG, config) ?? { ...CODEX_CODE_MODE_THREAD_CONFIG };
|
|
1333
1333
|
}
|
|
1334
1334
|
function buildCodexRuntimeThreadConfigForRun(params, config, options = {}) {
|
|
1335
1335
|
const runtimeConfig = buildCodexRuntimeThreadConfig(config, options);
|
|
@@ -1346,7 +1346,7 @@ function buildTurnStartParams(params, options) {
|
|
|
1346
1346
|
cwd: options.cwd,
|
|
1347
1347
|
approvalPolicy: options.appServer.approvalPolicy,
|
|
1348
1348
|
approvalsReviewer: options.appServer.approvalsReviewer,
|
|
1349
|
-
sandboxPolicy: codexSandboxPolicyForTurn(options.appServer.sandbox, options.cwd),
|
|
1349
|
+
sandboxPolicy: options.sandboxPolicy ?? codexSandboxPolicyForTurn(options.appServer.sandbox, options.cwd),
|
|
1350
1350
|
model: params.modelId,
|
|
1351
1351
|
...options.appServer.serviceTier ? { serviceTier: options.appServer.serviceTier } : {},
|
|
1352
1352
|
effort: resolveReasoningEffort(params.thinkLevel, params.modelId),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/codex",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.18-beta.1",
|
|
4
4
|
"description": "OpenClaw Codex harness and model provider plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"minHostVersion": ">=2026.5.1-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"compat": {
|
|
30
|
-
"pluginApi": ">=2026.5.
|
|
30
|
+
"pluginApi": ">=2026.5.18-beta.1"
|
|
31
31
|
},
|
|
32
32
|
"build": {
|
|
33
|
-
"openclawVersion": "2026.5.
|
|
33
|
+
"openclawVersion": "2026.5.18-beta.1"
|
|
34
34
|
},
|
|
35
35
|
"release": {
|
|
36
36
|
"publishToClawHub": true,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"openclaw.plugin.json"
|
|
46
46
|
],
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"openclaw": ">=2026.5.
|
|
48
|
+
"openclaw": ">=2026.5.18-beta.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"openclaw": {
|