@openclaw/codex 2026.8.1-beta.3 → 2026.8.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 +4 -5
- package/dist/{attempt-client-cleanup-URjUlCHg.js → attempt-client-cleanup-CVPvp9dL.js} +47 -5
- package/dist/{auth-binding-B4FfbcCg.js → auth-binding-Ds_QVm-X.js} +18 -3
- package/dist/{binding-connection-DAvZwp96.js → binding-connection-CCQFs8lf.js} +2 -2
- package/dist/{bounded-turn-4BjrZEwW.js → bounded-turn-rq5tiSXk.js} +13 -18
- package/dist/{capabilities-CH3K57v4.js → capabilities-CGm_94eL.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-D0nZ3qtd.js → command-formatters-C54Yg3eA.js} +2 -2
- package/dist/{command-handlers-DC86lgT4.js → command-handlers-BvOAHTrA.js} +89 -62
- package/dist/{compact-COqgBRny.js → compact-Hd7SAc0N.js} +8 -9
- package/dist/{config-CpNeo5AE.js → config-Cxw3Cl3k.js} +346 -286
- package/dist/doctor-contract-api.js +115 -14
- package/dist/{dynamic-tools-fJZhl4CE.js → dynamic-tools-BFoUcRdx.js} +147 -903
- package/dist/{effective-mcp-catalog-4YKn51aG.js → effective-mcp-catalog-BTJHnDSx.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-D3PHFFXh.js} +3 -3
- package/dist/{harness-DoKQcF8n.js → harness-DVfUQBlQ.js} +42 -52
- package/dist/harness.js +1 -1
- package/dist/index.js +278 -295
- package/dist/{isolated-completion-DPMtlH9r.js → isolated-completion-Cbbx_5Ed.js} +4 -4
- package/dist/launch-args-sXOAg0SX.js +84 -0
- package/dist/{managed-binary-By4FZC6i.js → managed-binary-ZkGodW19.js} +43 -7
- package/dist/media-understanding-provider.js +1 -1
- package/dist/model-catalog-o6Cgjoss.js +101 -0
- package/dist/{models-CZw1wClT.js → models-DgFWSuxA.js} +25 -28
- package/dist/{native-subagent-monitor-GGq3RnOo.js → native-subagent-monitor-CwFyoylz.js} +207 -30
- package/dist/{node-exec-server.runtime-Bsu1LdFZ.js → node-exec-server.runtime-DXrqpw1c.js} +8 -5
- package/dist/{plugin-approval-roundtrip-C75Yiiwc.js → plugin-approval-roundtrip-D80UZiJ_.js} +1 -1
- package/dist/{plugin-marketplace-discovery-CSWDkMrP.js → plugin-marketplace-discovery-mdmScYOj.js} +30 -39
- package/dist/{plugin-metadata-cache-BXH5NF-4.js → plugin-metadata-cache-CulOABwu.js} +162 -135
- package/dist/{protocol-validators-VAVyEnDp.js → protocol-validators-Bg5rpNxk.js} +148 -5
- package/dist/{rate-limits-BI1dMHDG.js → rate-limits-hFtzt2Up.js} +1 -1
- package/dist/{sandbox-guard-C1qEeZ5C.js → request-CCm4LaED.js} +183 -2
- package/dist/{run-attempt-BV3HzuCf.js → run-attempt-BwNQDH2u.js} +599 -361
- package/dist/{runtime-artifact-BvyT1uyd.js → runtime-artifact-DeBvleJw.js} +1 -1
- package/dist/{session-binding-BTrLf9Qm.js → session-binding-q2WSTVmC.js} +195 -122
- package/dist/{session-catalog-ezP_UcRM.js → session-catalog-C2Tae4rI.js} +229 -122
- package/dist/session-catalog-home-id-DAKUrm3C.js +112 -0
- package/dist/{session-cli-B1hKvfkI.js → session-cli-BuDjm5Ou.js} +1 -1
- package/dist/session-permission-policy-gLm40Vtq.js +160 -0
- package/dist/session-retirement-CdkI0bvb.js +90 -0
- package/dist/{session-upstream-marker-D_2npHlA.js → session-upstream-marker-Bcy33kam.js} +2 -3
- package/dist/{settled-turn-finalizer-Dx1onIqg.js → settled-turn-finalizer-B8JJcxCi.js} +7 -6
- package/dist/{shared-client-Dw-rzii0.js → shared-client-kNkljY-R.js} +1720 -786
- package/dist/{side-question-DbXkJZzg.js → side-question-GwD73tX6.js} +69 -39
- package/dist/{thread-lifecycle-DKdrnTMX.js → thread-lifecycle-Ss-uwnC4.js} +852 -359
- package/dist/{thread-ownership-i2NBwDUL.js → thread-ownership-CeYBqg_4.js} +18 -8
- package/dist/{plugin-app-cache-key-DMNQ8Zi8.js → thread-resume-DF54hagX.js} +52 -6
- package/dist/{transcript-mirror-BU0_LKAL.js → transcript-mirror-CkEQIna-.js} +112 -13
- package/dist/transport-stdio-C7-s9TLG.js +708 -0
- package/dist/{upstream-session-fork-BDVJCLAD.js → upstream-session-fork-BACGlOFa.js} +78 -86
- package/dist/{usage-9dKJCgcy.js → usage-C2l8Mils.js} +3 -3
- package/dist/{web-search-provider.runtime-DCdx4DGu.js → web-search-provider.runtime-B2XgRdFv.js} +3 -3
- package/openclaw.plugin.json +19 -1
- package/package.json +8 -8
- package/dist/app-server-policy-bg5QPSVP.js +0 -25
- package/dist/command-rpc-xUIIonsO.js +0 -90
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/model-catalog-CmGoqVKB.js +0 -48
- package/dist/request-DSK0W6YI.js +0 -157
- package/dist/session-catalog-home-id-BNwAJ9D7.js +0 -18
- package/dist/session-retirement-CE4iMiLh.js +0 -36
- package/dist/thread-resume-CdJk2Ehf.js +0 -30
- package/dist/transport-stdio-DhoGy33Z.js +0 -99
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { d as sessionBindingIdentity } from "./session-binding-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-
|
|
11
|
-
import {
|
|
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-Cxw3Cl3k.js";
|
|
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-kNkljY-R.js";
|
|
3
|
+
import { d as sessionBindingIdentity } from "./session-binding-q2WSTVmC.js";
|
|
4
|
+
import { a as assertCodexThreadForkResponse, c as assertCodexTurnStartResponse, d as readCodexTurn, l as readCodexDynamicToolCallParams } from "./protocol-validators-Bg5rpNxk.js";
|
|
5
|
+
import { f as unsubscribeCodexThreadBestEffort, g as isCodexNotificationForTurn, s as isCodexAlreadyTerminalInterruptError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-CVPvp9dL.js";
|
|
6
|
+
import { A as readCodexSupportedReasoningEfforts, E as resolveCodexAppServerRequestModelSelection, L as filterCodexDynamicTools, O as resolveCodexBindingModelProviderFallback, T as resolveCodexAppServerModelProvider, U as resolveCodexDynamicToolsLoading, c as buildCodexNativeHookRelayConfig, d as emitCodexNativePreToolUseFailureDiagnostic, et as buildCodexPluginAppsConfigPatchFromPolicyContext, k as resolveReasoningEffort, l as buildCodexNativeHookRelayDisabledConfig, o as CODEX_NATIVE_HOOK_RELAY_EVENTS, ot as mergeCodexThreadConfigs, v as buildCodexRuntimeThreadConfig, w as CODEX_NATIVE_PERSONALITY_NONE, x as resolveCodexWebSearchPlan } from "./thread-lifecycle-Ss-uwnC4.js";
|
|
7
|
+
import { s as resolveCodexNativeExecutionBlock } from "./request-CCm4LaED.js";
|
|
8
|
+
import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-hFtzt2Up.js";
|
|
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-gLm40Vtq.js";
|
|
10
|
+
import { n as resolveCodexBindingAppServerConnection, t as requireCodexSupervisionModelSelection } from "./binding-connection-CCQFs8lf.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-BFoUcRdx.js";
|
|
12
12
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
|
-
import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext,
|
|
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";
|
|
15
|
+
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
16
|
+
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
15
17
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
16
18
|
//#region extensions/codex/src/app-server/side-question.ts
|
|
17
19
|
const SIDE_QUESTION_COMPLETION_TIMEOUT_MS = 6e5;
|
|
@@ -57,15 +59,18 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
57
59
|
config: params.cfg
|
|
58
60
|
}));
|
|
59
61
|
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
|
|
62
|
+
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
63
|
const pluginConfig = readCodexPluginConfig(options.pluginConfig);
|
|
62
|
-
const { sessionAgentId } =
|
|
64
|
+
const { sessionAgentId } = resolveSessionAgentIdsStrict({
|
|
63
65
|
sessionKey: params.sessionKey,
|
|
64
66
|
config: params.cfg,
|
|
65
67
|
agentId: params.agentId
|
|
66
68
|
});
|
|
69
|
+
const agentWorkspaceDir = params.workspaceDir?.trim() || resolveAgentWorkspaceDir(params.cfg, sessionAgentId);
|
|
67
70
|
const execPolicy = resolveOpenClawExecPolicyForCodexAppServer({
|
|
68
|
-
|
|
71
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
72
|
+
execOverrides: params.sessionEntry.permissionMode ? { mode: CODEX_SESSION_PERMISSION_EXEC_MODES[params.sessionEntry.permissionMode] } : void 0,
|
|
73
|
+
approvals: params.sessionEntry.permissionMode === "full" ? void 0 : loadExecApprovals(),
|
|
69
74
|
config: params.cfg,
|
|
70
75
|
agentId: sessionAgentId
|
|
71
76
|
});
|
|
@@ -125,8 +130,41 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
125
130
|
config: params.cfg,
|
|
126
131
|
agentDir: params.agentDir
|
|
127
132
|
});
|
|
128
|
-
const
|
|
129
|
-
|
|
133
|
+
const reviewerContext = {
|
|
134
|
+
modelProvider: reviewerPolicyContext.modelProvider,
|
|
135
|
+
model: reviewerPolicyContext.model,
|
|
136
|
+
config: params.cfg,
|
|
137
|
+
env: process.env,
|
|
138
|
+
agentDir: params.agentDir
|
|
139
|
+
};
|
|
140
|
+
const appServer = resolveCodexAppServerForModelProvider({
|
|
141
|
+
appServer: applyCodexSessionPermissionPolicy({
|
|
142
|
+
appServer: connection.appServer,
|
|
143
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
144
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
145
|
+
defaultRoot: agentWorkspaceDir,
|
|
146
|
+
pluginConfig,
|
|
147
|
+
canUseAutoReview: canUseCodexModelBackedApprovalsReviewerForModel(reviewerContext),
|
|
148
|
+
requirementsToml: readCodexRequirementsToml({}),
|
|
149
|
+
policyLocked: usesSupervisionConnection,
|
|
150
|
+
execMode: execPolicy.mode
|
|
151
|
+
}),
|
|
152
|
+
...reviewerContext,
|
|
153
|
+
provider: reviewerContext.modelProvider
|
|
154
|
+
});
|
|
155
|
+
const sessionPermissionPolicy = resolveCodexEffectiveSessionPermissionPolicy({
|
|
156
|
+
appServer,
|
|
157
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
158
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
159
|
+
defaultRoot: agentWorkspaceDir
|
|
160
|
+
});
|
|
161
|
+
const cwd = resolveCodexSessionPermissionCwd({
|
|
162
|
+
permissionMode: params.sessionEntry.permissionMode,
|
|
163
|
+
sessionRoot: params.sessionEntry.sessionRoot,
|
|
164
|
+
defaultRoot: agentWorkspaceDir,
|
|
165
|
+
requestedCwd: binding.cwd,
|
|
166
|
+
fallbackCwd: agentWorkspaceDir
|
|
167
|
+
});
|
|
130
168
|
const runId = params.opts?.runId ?? randomUUID();
|
|
131
169
|
const effectiveParams = supervisionModelSelection ? {
|
|
132
170
|
...params,
|
|
@@ -153,6 +191,9 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
153
191
|
runId,
|
|
154
192
|
timeoutMs: appServer.requestTimeoutMs
|
|
155
193
|
});
|
|
194
|
+
sideRunParams.permissionMode = sessionPermissionPolicy?.mode;
|
|
195
|
+
sideRunParams.sessionRoot = sessionPermissionPolicy?.root;
|
|
196
|
+
sideRunParams.execOverrides = sessionPermissionPolicy && { mode: sessionPermissionPolicy.execMode };
|
|
156
197
|
const sandboxExecServerEnabled = isCodexSandboxExecServerEnabled(pluginConfig, params.sandbox);
|
|
157
198
|
const nativeToolSurfaceEnabled = shouldEnableCodexAppServerNativeToolSurface(sideRunParams, params.sandbox ?? void 0, {
|
|
158
199
|
agentId: sideRunParams.agentId,
|
|
@@ -262,23 +303,8 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
262
303
|
sandboxEnvironmentClient = targetClient;
|
|
263
304
|
};
|
|
264
305
|
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;
|
|
306
|
+
const approvalPolicy = appServer.approvalPolicy;
|
|
307
|
+
const sandbox = appServer.sandbox;
|
|
282
308
|
const { toolBridge, webSearchPlan } = await createCodexSideToolBridge({
|
|
283
309
|
params: effectiveParams,
|
|
284
310
|
cwd,
|
|
@@ -294,6 +320,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
294
320
|
modelProviderOverride: modelSelection.modelProvider,
|
|
295
321
|
signal: runAbortController.signal
|
|
296
322
|
}) : "unsupported",
|
|
323
|
+
sessionPermissionPolicy,
|
|
297
324
|
runId,
|
|
298
325
|
signal: runAbortController.signal
|
|
299
326
|
});
|
|
@@ -329,7 +356,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
329
356
|
nativeHookRelay,
|
|
330
357
|
autoApprove: shouldAutoApproveCodexAppServerApprovals({
|
|
331
358
|
approvalPolicy,
|
|
332
|
-
networkProxy:
|
|
359
|
+
networkProxy: appServer.networkProxy,
|
|
333
360
|
sandbox
|
|
334
361
|
}),
|
|
335
362
|
signal: runAbortController.signal,
|
|
@@ -434,7 +461,7 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
434
461
|
nativeCodeModeEnabled: nativeToolSurfaceEnabled,
|
|
435
462
|
nativeCodeModeOnlyEnabled: appServer.codeModeOnly
|
|
436
463
|
});
|
|
437
|
-
const threadConfig = mergeCodexThreadConfigs(nativeHookRelayConfig, runtimeThreadConfig, binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0,
|
|
464
|
+
const threadConfig = mergeCodexThreadConfigs(nativeHookRelayConfig, runtimeThreadConfig, binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0, appServer.networkProxy?.configPatch) ?? runtimeThreadConfig;
|
|
438
465
|
const forkResponse = assertCodexThreadForkResponse(await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
439
466
|
lease: clientLease,
|
|
440
467
|
options: clientOptions,
|
|
@@ -447,15 +474,16 @@ async function runCodexAppServerSideQuestion(params, options) {
|
|
|
447
474
|
model: modelSelection.model,
|
|
448
475
|
...modelSelection.modelProvider ? { modelProvider: modelSelection.modelProvider } : {},
|
|
449
476
|
cwd: executionCwd,
|
|
477
|
+
...sessionPermissionPolicy ? { runtimeWorkspaceRoots: [sessionPermissionPolicy.root] } : {},
|
|
450
478
|
approvalPolicy,
|
|
451
|
-
approvalsReviewer:
|
|
452
|
-
...sandboxEnvironment ||
|
|
479
|
+
approvalsReviewer: appServer.approvalsReviewer,
|
|
480
|
+
...sandboxEnvironment || appServer.networkProxy ? {} : { sandbox },
|
|
453
481
|
...serviceTier ? { serviceTier } : {},
|
|
454
482
|
config: threadConfig,
|
|
455
483
|
developerInstructions: SIDE_DEVELOPER_INSTRUCTIONS,
|
|
456
484
|
ephemeral: true,
|
|
457
485
|
threadSource: "user"
|
|
458
|
-
}, requestOptions);
|
|
486
|
+
}, requestOptions());
|
|
459
487
|
},
|
|
460
488
|
onClientChange: rebindClientHandlers
|
|
461
489
|
}));
|
|
@@ -672,6 +700,8 @@ async function createCodexSideToolBridge(input) {
|
|
|
672
700
|
sessionKey: sandboxSessionKey,
|
|
673
701
|
runSessionKey: input.params.sessionKey && input.params.sessionKey !== sandboxSessionKey ? input.params.sessionKey : void 0,
|
|
674
702
|
sessionId: input.params.sessionId,
|
|
703
|
+
exec: input.sessionPermissionPolicy && { mode: input.sessionPermissionPolicy.execMode },
|
|
704
|
+
sessionPermissionPolicy: input.sessionPermissionPolicy,
|
|
675
705
|
runId: input.runId,
|
|
676
706
|
agentDir: input.params.agentDir ?? resolveAgentDir(input.params.cfg ?? {}, input.sessionAgentId),
|
|
677
707
|
workspaceDir: input.cwd,
|