@openclaw/codex 2026.8.1-beta.3 → 2026.9.1-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/api.js +3 -3
- package/dist/{attempt-client-cleanup-URjUlCHg.js → attempt-client-cleanup-bfsmcQ6m.js} +21 -2
- package/dist/{binding-connection-DAvZwp96.js → binding-connection-BMvPX73o.js} +2 -2
- package/dist/{bounded-turn-4BjrZEwW.js → bounded-turn-B7iBUcuP.js} +8 -8
- package/dist/{capabilities-CH3K57v4.js → capabilities-BRMh0aIq.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-D0nZ3qtd.js → command-formatters-DEsIufkt.js} +2 -2
- package/dist/{command-handlers-DC86lgT4.js → command-handlers-D_-1_qRp.js} +43 -32
- package/dist/{command-rpc-xUIIonsO.js → command-rpc-CCeCkf_v.js} +4 -4
- package/dist/{compact-COqgBRny.js → compact-BglNFZrQ.js} +8 -8
- package/dist/{config-CpNeo5AE.js → config-giW8X0QA.js} +82 -28
- package/dist/doctor-contract-api.js +9 -8
- package/dist/{dynamic-tools-fJZhl4CE.js → dynamic-tools-Dnlfa--w.js} +108 -820
- package/dist/{effective-mcp-catalog-4YKn51aG.js → effective-mcp-catalog-CTeGrnfO.js} +2 -2
- package/dist/{event-projector-assistant-message-BwxV4d6N.js → event-projector-assistant-message-C5-Ds8mA.js} +18 -1
- package/dist/{event-projector-usage-CLwNEJqW.js → event-projector-usage-Bk1I90Bg.js} +3 -3
- package/dist/{harness-DoKQcF8n.js → harness-Csz0F-DK.js} +11 -11
- package/dist/harness.js +1 -1
- package/dist/index.js +130 -172
- package/dist/{isolated-completion-DPMtlH9r.js → isolated-completion-Cv6FqygM.js} +4 -4
- package/dist/{managed-binary-By4FZC6i.js → managed-binary-DFYK4DWq.js} +43 -7
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{model-catalog-CmGoqVKB.js → model-catalog-i9rNBthX.js} +4 -4
- package/dist/{models-CZw1wClT.js → models-TS3HBU-q.js} +4 -3
- package/dist/{native-subagent-monitor-GGq3RnOo.js → native-subagent-monitor-4Mfq2HDs.js} +176 -19
- package/dist/{node-exec-server.runtime-Bsu1LdFZ.js → node-exec-server.runtime-BpWqJO1V.js} +2 -2
- package/dist/{plugin-app-cache-key-DMNQ8Zi8.js → plugin-app-cache-key-C1CAdfcP.js} +6 -3
- package/dist/{plugin-approval-roundtrip-C75Yiiwc.js → plugin-approval-roundtrip-bUm777tR.js} +1 -1
- package/dist/{plugin-marketplace-discovery-CSWDkMrP.js → plugin-marketplace-discovery-B9DvaAG-.js} +29 -38
- package/dist/{plugin-metadata-cache-BXH5NF-4.js → plugin-metadata-cache-CTCT3w5L.js} +162 -135
- package/dist/{protocol-validators-VAVyEnDp.js → protocol-validators-VeJxxJ0U.js} +25 -3
- package/dist/{rate-limits-BI1dMHDG.js → rate-limits-C5_D8Gmb.js} +1 -1
- package/dist/{request-DSK0W6YI.js → request-DXXGHko0.js} +2 -2
- package/dist/{run-attempt-BV3HzuCf.js → run-attempt-DYc0QCBF.js} +346 -267
- package/dist/{sandbox-guard-C1qEeZ5C.js → sandbox-guard-kuWTn9C5.js} +1 -1
- package/dist/{session-binding-BTrLf9Qm.js → session-binding-Bcynfd-_.js} +1 -1
- package/dist/{session-catalog-ezP_UcRM.js → session-catalog-DaLKVtpH.js} +17 -16
- package/dist/{session-cli-B1hKvfkI.js → session-cli-DMc4oS2w.js} +1 -1
- package/dist/session-permission-policy-BrNH1bjy.js +160 -0
- package/dist/{session-retirement-CE4iMiLh.js → session-retirement-CcNC3YSY.js} +3 -3
- package/dist/{session-upstream-marker-D_2npHlA.js → session-upstream-marker-BIkusb95.js} +1 -1
- package/dist/{settled-turn-finalizer-Dx1onIqg.js → settled-turn-finalizer-Dc3ApjU4.js} +4 -4
- package/dist/{shared-client-Dw-rzii0.js → shared-client-DKz23hHY.js} +1026 -248
- package/dist/{side-question-DbXkJZzg.js → side-question-DjA_jsNe.js} +65 -36
- package/dist/{thread-lifecycle-DKdrnTMX.js → thread-lifecycle-L7oEkTlq.js} +850 -35
- package/dist/{thread-ownership-i2NBwDUL.js → thread-ownership-DZeuKH1j.js} +2 -2
- package/dist/{thread-resume-CdJk2Ehf.js → thread-resume-BE9qNEW0.js} +3 -3
- package/dist/{transcript-mirror-BU0_LKAL.js → transcript-mirror-DsCMWBca.js} +91 -10
- package/dist/{upstream-session-fork-BDVJCLAD.js → upstream-session-fork-DlaHxSLC.js} +3 -3
- package/dist/{usage-9dKJCgcy.js → usage-ROIaW3wo.js} +3 -3
- package/dist/{web-search-provider.runtime-DCdx4DGu.js → web-search-provider.runtime-ClaNPV7N.js} +3 -3
- package/openclaw.plugin.json +18 -1
- package/package.json +8 -8
- package/dist/app-server-policy-bg5QPSVP.js +0 -25
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { d as sessionBindingIdentity } from "./session-binding-
|
|
4
|
-
import { d as unsubscribeCodexThreadBestEffort, h as isCodexNotificationForTurn, s as isCodexAlreadyTerminalInterruptError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-
|
|
5
|
-
import { l as readCodexTurn, o as assertCodexTurnStartResponse, r as assertCodexThreadForkResponse, s as readCodexDynamicToolCallParams } from "./protocol-validators-
|
|
6
|
-
import {
|
|
7
|
-
import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-
|
|
8
|
-
import {
|
|
9
|
-
import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-
|
|
10
|
-
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-
|
|
11
|
-
import {
|
|
1
|
+
import { C as resolveCodexModelBackedReviewerPolicyContext, D as readCodexRequirementsToml, f as isCodexPairedNodeRemoteExecPlacementSandbox, h as readCodexPluginConfig, j as resolveOpenClawExecPolicyForCodexAppServer, m as isCodexSandboxExecServerEnabled, p as isCodexRemoteExecPlacementSandbox, r as resolveCodexAppServerHomeScope, u as shouldAutoApproveCodexAppServerApprovals, x as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-giW8X0QA.js";
|
|
2
|
+
import { F as isCodexAppServerApprovalRequest, K as createCodexElicitationResponse, R as isCodexAppServerIndeterminateRequestCancellationError, Y as ensureCodexAppServerClientRuntime, at as readRecentCodexRateLimits, f as releaseCodexAppServerClientLease, o as getLeasedSharedCodexAppServerClient, pt as resolveCodexAppServerPreparedAuthHandoff, vt as isJsonObject, x as withLeasedCodexAppServerClientStartSelectionRetry } from "./shared-client-DKz23hHY.js";
|
|
3
|
+
import { d as sessionBindingIdentity } from "./session-binding-Bcynfd-_.js";
|
|
4
|
+
import { d as unsubscribeCodexThreadBestEffort, h as isCodexNotificationForTurn, s as isCodexAlreadyTerminalInterruptError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-bfsmcQ6m.js";
|
|
5
|
+
import { l as readCodexTurn, o as assertCodexTurnStartResponse, r as assertCodexThreadForkResponse, s as readCodexDynamicToolCallParams } from "./protocol-validators-VeJxxJ0U.js";
|
|
6
|
+
import { B as resolveCodexAppServerRequestModelSelection, F as resolveCodexWebSearchPlan, H as resolveCodexBindingModelProviderFallback, M as buildCodexRuntimeThreadConfig, R as CODEX_NATIVE_PERSONALITY_NONE, T as resolveCodexToolAbortTerminalReason, U as resolveReasoningEffort, W as readCodexSupportedReasoningEfforts, Z as filterCodexDynamicTools, bt as mergeCodexThreadConfigs, c as buildCodexNativeHookRelayConfig, d as emitCodexNativePreToolUseFailureDiagnostic, h as handleDynamicToolCallWithTimeout, l as buildCodexNativeHookRelayDisabledConfig, mt as buildCodexPluginAppsConfigPatchFromPolicyContext, o as CODEX_NATIVE_HOOK_RELAY_EVENTS, rt as resolveCodexDynamicToolsLoading, y as resolveDynamicToolCallTimeoutMs, z as resolveCodexAppServerModelProvider } from "./thread-lifecycle-L7oEkTlq.js";
|
|
7
|
+
import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-C5_D8Gmb.js";
|
|
8
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BrNH1bjy.js";
|
|
9
|
+
import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-kuWTn9C5.js";
|
|
10
|
+
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-BMvPX73o.js";
|
|
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-Dnlfa--w.js";
|
|
12
12
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, resolveSessionAgentIds, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
15
|
+
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
15
16
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
16
17
|
//#region extensions/codex/src/app-server/side-question.ts
|
|
17
18
|
const SIDE_QUESTION_COMPLETION_TIMEOUT_MS = 6e5;
|
|
@@ -57,15 +58,18 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
57
58
|
config: params.cfg
|
|
58
59
|
}));
|
|
59
60
|
if (!binding?.threadId) throw new Error("Codex /btw needs an active Codex thread. Send a normal message first, then try /btw again.");
|
|
60
|
-
if (isCodexPairedNodeRemoteExecPlacementSandbox(params.sandbox)) throw new Error("Normal Codex turns are supported on
|
|
61
|
+
if (isCodexPairedNodeRemoteExecPlacementSandbox(params.sandbox)) throw new Error("Normal Codex turns are supported on nodes, but /btw is not yet bound to the active placement.");
|
|
61
62
|
const pluginConfig = readCodexPluginConfig(options.pluginConfig);
|
|
62
63
|
const { sessionAgentId } = resolveSessionAgentIds({
|
|
63
64
|
sessionKey: params.sessionKey,
|
|
64
65
|
config: params.cfg,
|
|
65
66
|
agentId: params.agentId
|
|
66
67
|
});
|
|
68
|
+
const agentWorkspaceDir = params.workspaceDir?.trim() || resolveAgentWorkspaceDir(params.cfg, sessionAgentId);
|
|
67
69
|
const execPolicy = resolveOpenClawExecPolicyForCodexAppServer({
|
|
68
|
-
|
|
70
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
71
|
+
execOverrides: params.sessionEntry.permissionMode ? { mode: CODEX_SESSION_PERMISSION_EXEC_MODES[params.sessionEntry.permissionMode] } : void 0,
|
|
72
|
+
approvals: params.sessionEntry.permissionMode === "full" ? void 0 : loadExecApprovals(),
|
|
69
73
|
config: params.cfg,
|
|
70
74
|
agentId: sessionAgentId
|
|
71
75
|
});
|
|
@@ -125,8 +129,41 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
125
129
|
config: params.cfg,
|
|
126
130
|
agentDir: params.agentDir
|
|
127
131
|
});
|
|
128
|
-
const
|
|
129
|
-
|
|
132
|
+
const reviewerContext = {
|
|
133
|
+
modelProvider: reviewerPolicyContext.modelProvider,
|
|
134
|
+
model: reviewerPolicyContext.model,
|
|
135
|
+
config: params.cfg,
|
|
136
|
+
env: process.env,
|
|
137
|
+
agentDir: params.agentDir
|
|
138
|
+
};
|
|
139
|
+
const appServer = resolveCodexAppServerForModelProvider({
|
|
140
|
+
appServer: applyCodexSessionPermissionPolicy({
|
|
141
|
+
appServer: connection.appServer,
|
|
142
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
143
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
144
|
+
defaultRoot: agentWorkspaceDir,
|
|
145
|
+
pluginConfig,
|
|
146
|
+
canUseAutoReview: canUseCodexModelBackedApprovalsReviewerForModel(reviewerContext),
|
|
147
|
+
requirementsToml: readCodexRequirementsToml({}),
|
|
148
|
+
policyLocked: usesSupervisionConnection,
|
|
149
|
+
execMode: execPolicy.mode
|
|
150
|
+
}),
|
|
151
|
+
...reviewerContext,
|
|
152
|
+
provider: reviewerContext.modelProvider
|
|
153
|
+
});
|
|
154
|
+
const sessionPermissionPolicy = resolveCodexEffectiveSessionPermissionPolicy({
|
|
155
|
+
appServer,
|
|
156
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
157
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
158
|
+
defaultRoot: agentWorkspaceDir
|
|
159
|
+
});
|
|
160
|
+
const cwd = resolveCodexSessionPermissionCwd({
|
|
161
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
162
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
163
|
+
defaultRoot: agentWorkspaceDir,
|
|
164
|
+
requestedCwd: binding.cwd,
|
|
165
|
+
fallbackCwd: agentWorkspaceDir
|
|
166
|
+
});
|
|
130
167
|
const runId = params.opts?.runId ?? randomUUID();
|
|
131
168
|
const effectiveParams = supervisionModelSelection ? {
|
|
132
169
|
...params,
|
|
@@ -153,6 +190,9 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
153
190
|
runId,
|
|
154
191
|
timeoutMs: appServer.requestTimeoutMs
|
|
155
192
|
});
|
|
193
|
+
sideRunParams.permissionMode = sessionPermissionPolicy?.mode;
|
|
194
|
+
sideRunParams.sessionRoot = sessionPermissionPolicy?.root;
|
|
195
|
+
sideRunParams.execOverrides = sessionPermissionPolicy && { mode: sessionPermissionPolicy.execMode };
|
|
156
196
|
const sandboxExecServerEnabled = isCodexSandboxExecServerEnabled(pluginConfig, params.sandbox);
|
|
157
197
|
const nativeToolSurfaceEnabled = shouldEnableCodexAppServerNativeToolSurface(sideRunParams, params.sandbox ?? void 0, {
|
|
158
198
|
agentId: sideRunParams.agentId,
|
|
@@ -262,23 +302,8 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
262
302
|
sandboxEnvironmentClient = targetClient;
|
|
263
303
|
};
|
|
264
304
|
try {
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
provider: reviewerPolicyContext.modelProvider,
|
|
268
|
-
model: reviewerPolicyContext.model,
|
|
269
|
-
config: params.cfg,
|
|
270
|
-
env: process.env,
|
|
271
|
-
agentDir: params.agentDir
|
|
272
|
-
});
|
|
273
|
-
const useModelScopedPolicy = !canUseCodexModelBackedApprovalsReviewerForModel({
|
|
274
|
-
modelProvider: reviewerPolicyContext.modelProvider,
|
|
275
|
-
model: reviewerPolicyContext.model,
|
|
276
|
-
config: params.cfg,
|
|
277
|
-
env: process.env,
|
|
278
|
-
agentDir: params.agentDir
|
|
279
|
-
});
|
|
280
|
-
const approvalPolicy = useModelScopedPolicy ? modelScopedAppServer.approvalPolicy : binding.approvalPolicy ?? modelScopedAppServer.approvalPolicy;
|
|
281
|
-
const sandbox = useModelScopedPolicy ? modelScopedAppServer.sandbox : binding.sandbox ?? modelScopedAppServer.sandbox;
|
|
305
|
+
const approvalPolicy = appServer.approvalPolicy;
|
|
306
|
+
const sandbox = appServer.sandbox;
|
|
282
307
|
const { toolBridge, webSearchPlan } = await createCodexSideToolBridge({
|
|
283
308
|
params: effectiveParams,
|
|
284
309
|
cwd,
|
|
@@ -294,6 +319,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
294
319
|
modelProviderOverride: modelSelection.modelProvider,
|
|
295
320
|
signal: runAbortController.signal
|
|
296
321
|
}) : "unsupported",
|
|
322
|
+
sessionPermissionPolicy,
|
|
297
323
|
runId,
|
|
298
324
|
signal: runAbortController.signal
|
|
299
325
|
});
|
|
@@ -329,7 +355,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
329
355
|
nativeHookRelay,
|
|
330
356
|
autoApprove: shouldAutoApproveCodexAppServerApprovals({
|
|
331
357
|
approvalPolicy,
|
|
332
|
-
networkProxy:
|
|
358
|
+
networkProxy: appServer.networkProxy,
|
|
333
359
|
sandbox
|
|
334
360
|
}),
|
|
335
361
|
signal: runAbortController.signal,
|
|
@@ -434,7 +460,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
434
460
|
nativeCodeModeEnabled: nativeToolSurfaceEnabled,
|
|
435
461
|
nativeCodeModeOnlyEnabled: appServer.codeModeOnly
|
|
436
462
|
});
|
|
437
|
-
const threadConfig = mergeCodexThreadConfigs(nativeHookRelayConfig, runtimeThreadConfig, binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0,
|
|
463
|
+
const threadConfig = mergeCodexThreadConfigs(nativeHookRelayConfig, runtimeThreadConfig, binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0, appServer.networkProxy?.configPatch) ?? runtimeThreadConfig;
|
|
438
464
|
const forkResponse = assertCodexThreadForkResponse(await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
439
465
|
lease: clientLease,
|
|
440
466
|
options: clientOptions,
|
|
@@ -447,9 +473,10 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
447
473
|
model: modelSelection.model,
|
|
448
474
|
...modelSelection.modelProvider ? { modelProvider: modelSelection.modelProvider } : {},
|
|
449
475
|
cwd: executionCwd,
|
|
476
|
+
...sessionPermissionPolicy ? { runtimeWorkspaceRoots: [sessionPermissionPolicy.root] } : {},
|
|
450
477
|
approvalPolicy,
|
|
451
|
-
approvalsReviewer:
|
|
452
|
-
...sandboxEnvironment ||
|
|
478
|
+
approvalsReviewer: appServer.approvalsReviewer,
|
|
479
|
+
...sandboxEnvironment || appServer.networkProxy ? {} : { sandbox },
|
|
453
480
|
...serviceTier ? { serviceTier } : {},
|
|
454
481
|
config: threadConfig,
|
|
455
482
|
developerInstructions: SIDE_DEVELOPER_INSTRUCTIONS,
|
|
@@ -672,6 +699,8 @@ async function createCodexSideToolBridge(input) {
|
|
|
672
699
|
sessionKey: sandboxSessionKey,
|
|
673
700
|
runSessionKey: input.params.sessionKey && input.params.sessionKey !== sandboxSessionKey ? input.params.sessionKey : void 0,
|
|
674
701
|
sessionId: input.params.sessionId,
|
|
702
|
+
exec: input.sessionPermissionPolicy && { mode: input.sessionPermissionPolicy.execMode },
|
|
703
|
+
sessionPermissionPolicy: input.sessionPermissionPolicy,
|
|
675
704
|
runId: input.runId,
|
|
676
705
|
agentDir: input.params.agentDir ?? resolveAgentDir(input.params.cfg ?? {}, input.sessionAgentId),
|
|
677
706
|
workspaceDir: input.cwd,
|