@openclaw/codex 2026.9.7 → 2026.10.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/README.md +8 -0
- package/dist/.setup/{account-usage-runtime-DFhbh1zz.mjs → account-usage-runtime-C4GFoef_.mjs} +5 -5
- package/dist/.setup/app-server-policy-Bg4FZw1f.mjs +23 -0
- package/dist/.setup/{apply-D3GcSoSa.mjs → apply-D02fLpgN.mjs} +48 -39
- package/dist/.setup/attempt-client-cleanup-yLjGwbwT.mjs +155 -0
- package/dist/.setup/{attempt-workspace-context-C5HigshI.mjs → attempt-workspace-context-CbSzT6V2.mjs} +11 -15
- package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-BoMwpuPN.mjs} +17 -25
- package/dist/.setup/{auth-cache-key-Dbvq-QgB.mjs → auth-cache-key-CEd9QlIs.mjs} +244 -82
- package/dist/.setup/{auth-profile-B0okYl2D.mjs → auth-profile-CgHQ8Vot.mjs} +2 -1
- package/dist/.setup/{auth-profile-selection-DFu9e167.mjs → auth-profile-selection-hr8ocLtz.mjs} +5 -7
- package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-C-08ez1w.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-Dn2p-fdy.mjs} +3 -3
- package/dist/.setup/{bounded-turn-CbjoN2OW.mjs → bounded-turn-DlHlNTyS.mjs} +14 -13
- package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-DklXNk3k.mjs} +4 -4
- package/dist/.setup/{build-state-Da1_z0kd.mjs → build-state-CIi3Ckqu.mjs} +1 -1
- package/dist/.setup/{capabilities-B3WEZl4e.mjs → capabilities-kQntafj_.mjs} +1 -1
- package/dist/.setup/{client-N0JpgSzF.mjs → client-CBzEVDyb.mjs} +438 -160
- package/dist/.setup/{client-catalog-response-5HHLdcde.mjs → client-catalog-response-CmvIiDdj.mjs} +57 -25
- package/dist/.setup/command-authorization-AikPDtcc.mjs +15 -0
- package/dist/.setup/{command-dispatch-BeAoaovI.mjs → command-dispatch-BE_RdMou.mjs} +3 -3
- package/dist/.setup/{command-formatters-R3ckE3Co.mjs → command-formatters-DV3DHhdr.mjs} +7 -5
- package/dist/.setup/{command-handlers-ylTMS00z.mjs → command-handlers-DNoRq5Ps.mjs} +82 -144
- package/dist/.setup/{command-rpc-CGJGUQ6Y.mjs → command-rpc-B6xsq2dB.mjs} +23 -31
- package/dist/.setup/{compact-C2WamavS.mjs → compact-BLSAd-ru.mjs} +117 -65
- package/dist/.setup/{plugin-metadata-cache-DsjsL1dr.mjs → computer-use-DpolvQHw.mjs} +66 -203
- package/dist/.setup/{config-DKhXquav.mjs → config-0Gxk3_eq.mjs} +5 -6
- package/dist/.setup/{config-options-CzyWLTJt.mjs → config-options-HG_Rr3W_.mjs} +13 -23
- package/dist/.setup/{config-parsing-b088LyhT.mjs → config-parsing-BQq-CHTF.mjs} +41 -4
- package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-cUYrqu_a.mjs} +2 -2
- package/dist/.setup/{config-security-CE-FcGw9.mjs → config-security-KAPScztc.mjs} +20 -36
- package/dist/.setup/{context-engine-projection-PezSESth.mjs → context-engine-projection-CsgYSQhW.mjs} +11 -14
- package/dist/.setup/{conversation-binding-3Min8qvP.mjs → conversation-binding-CgSSD1Qz.mjs} +36 -48
- package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DJ4ix-W5.mjs} +1 -1
- package/dist/.setup/{conversation-control-CEP8X5JC.mjs → conversation-control-tCg763cI.mjs} +19 -21
- package/dist/.setup/{cyber-failover-XV0nNRZu.mjs → cyber-failover-Bb1J6hS1.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-RNpGpTyP.mjs → cyber-failover-notice-XR03ef31.mjs} +1 -1
- package/dist/.setup/doctor-start-options-DPW9JxIE.mjs +63 -0
- package/dist/.setup/dynamic-tool-build-CVrx02cH.mjs +463 -0
- package/dist/.setup/{dynamic-tools-DzlsLUuS.mjs → dynamic-tools-DdsymYGQ.mjs} +238 -878
- package/dist/.setup/{effective-mcp-catalog-CxUtC-xG.mjs → effective-mcp-catalog-BysTBZCW.mjs} +83 -11
- package/dist/.setup/{elicitation-input-DPoK8F7w.mjs → elicitation-input-r9axtppm.mjs} +4 -2
- package/dist/.setup/{ephemeral-turn-CDsPJOa2.mjs → ephemeral-turn-oPKxs3ia.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-CigreO4K.mjs → event-projector-assistant-message-YCL2wspu.mjs} +2 -2
- package/dist/.setup/{event-projector-values-DJSz8BTk.mjs → event-projector-values-DTqZHizf.mjs} +2 -12
- package/dist/.setup/{inference-dispatch-CMZtjQyz.mjs → inference-dispatch-B5UKEUyC.mjs} +12 -21
- package/dist/.setup/{inference-proxy-DhcXOgUE.mjs → inference-proxy-DUO5E2QQ.mjs} +6 -5
- package/dist/.setup/{isolated-completion-Dm3PzxJk.mjs → isolated-completion-D5gbKm6k.mjs} +8 -8
- package/dist/.setup/{managed-binary-kiWRhNRE.mjs → managed-binary-C1VFoVPf.mjs} +31 -38
- package/dist/.setup/mcp-app-session-preparation-CdqsXwZX.mjs +223 -0
- package/dist/.setup/mcp-tool-metadata-j10HhfTC.mjs +43 -0
- package/dist/.setup/{model-catalog-PAuZgJC6.mjs → model-catalog-Dj_uvusa.mjs} +7 -7
- package/dist/.setup/{models-DHXZtVVk.mjs → models-Du_i5G_t.mjs} +10 -7
- package/dist/.setup/{native-auth-CuG53tu4.mjs → native-auth-Cjb9y7IZ.mjs} +5 -6
- package/dist/.setup/{native-execution-policy-BxZJy5mP.mjs → native-execution-policy-ClzpdG3D.mjs} +1 -12
- package/dist/.setup/native-mcp-app-DV7VbfzF.mjs +310 -0
- package/dist/.setup/{native-subagent-monitor-Dpsmf2wz.mjs → native-subagent-monitor-CCEFO6qK.mjs} +235 -318
- package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-BDqhOdJp.mjs} +0 -4
- package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-C6KVqiN1.mjs} +9 -8
- package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-B5oNDkUS.mjs} +11 -17
- package/dist/.setup/{node-exec-server.runtime-BgBfWQqo.mjs → node-exec-server.runtime-0xSEjKYt.mjs} +2 -2
- package/dist/.setup/{plan-Y-QIvrKB.mjs → plan-CUHSIOep.mjs} +67 -89
- package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BcyBv8PG.mjs} +4 -4
- package/dist/.setup/{plugin-app-cache-key-BL9B5H0L.mjs → plugin-app-cache-key-BW8rd98k.mjs} +11 -15
- package/dist/.setup/plugin-approval-roundtrip-uAR-oQfr.mjs +109 -0
- package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-Bf0_piTw.mjs} +29 -51
- package/dist/.setup/{plugin-marketplace-discovery-D_dV9FXa.mjs → plugin-marketplace-discovery-SQPhSuic.mjs} +2 -16
- package/dist/.setup/plugin-metadata-cache-DWnB7VMj.mjs +84 -0
- package/dist/.setup/plugin-thread-config-deadline-CdRzGJt4.mjs +124 -0
- package/dist/.setup/{provider-DH8NSzGt.mjs → provider-BP8ZaZqn.mjs} +4 -4
- package/dist/.setup/provider-capabilities-Z5ZbBxqP.mjs +50 -0
- package/dist/.setup/{rate-limits-B7-X2TgG.mjs → rate-limits-CMPy24F5.mjs} +1 -5
- package/dist/.setup/{request-BHZ1nz8d.mjs → request-BH3FvYUE.mjs} +189 -49
- package/dist/.setup/rpc-error-hmWM21RB.mjs +57 -0
- package/dist/.setup/{run-attempt-D8RZUOzY.mjs → run-attempt-CgvFoW7R.mjs} +553 -727
- package/dist/.setup/{run-attempt-lifecycle-C-6O3Exn.mjs → run-attempt-lifecycle-BuZgVbDA.mjs} +19 -3
- package/dist/.setup/{runtime-artifact-DDQ-HGXf.mjs → runtime-artifact-CUTOOnKw.mjs} +5 -6
- package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-CADz3_BY.mjs} +5 -4
- package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-WqE8yPge.mjs} +3 -3
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +15 -0
- package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Ce7BqiPN.mjs} +92 -102
- package/dist/.setup/session-binding-meta-Lkm5Lpf4.mjs +15 -0
- package/dist/.setup/session-binding-record-BZB8RgcF.mjs +179 -0
- package/dist/.setup/session-binding-record-codec-z4ZpDn6E.mjs +216 -0
- package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BrdV95Fg.mjs} +8 -2
- package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-CPIP4S_y.mjs} +34 -18
- package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-DcgwvSbF.mjs} +24 -29
- package/dist/.setup/{session-catalog-events-DePDzzjc.mjs → session-catalog-events-KIXOoSnQ.mjs} +5 -5
- package/dist/.setup/{session-catalog-index-CZvDzC6z.mjs → session-catalog-index-DPICGlxr.mjs} +361 -72
- package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-nhyO0wdW.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-DEU36Qlo.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-list-request-tXephOB4.mjs} +180 -6
- package/dist/.setup/{session-catalog-native-projection-DjhwGL6x.mjs → session-catalog-native-projection-CTBd4EUm.mjs} +7 -6
- package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-7-WEQTB1.mjs} +12 -2
- package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-DLWBwAAO.mjs} +11 -15
- package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-Uufckwcm.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-B-qWJh2x.mjs} +70 -28
- package/dist/.setup/{session-catalog-projection-Cr5qP5Dj.mjs → session-catalog-projection-CE0_Hffi.mjs} +6 -122
- package/dist/.setup/{session-catalog-provenance-DoAvktcj.mjs → session-catalog-provenance-CmsOE5mh.mjs} +6 -1
- package/dist/.setup/{session-cli-Cn_nCqfq.mjs → session-cli-kH4vuGod.mjs} +1 -2
- package/dist/.setup/{session-history-D83lJWHG.mjs → session-history-BogBHKLk.mjs} +1 -1
- package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-NWKPa4ZO.mjs} +4 -4
- package/dist/.setup/{session-history-read-Ov3StuL4.mjs → session-history-read-CNN8zwbD.mjs} +8 -19
- package/dist/.setup/{session-history.worker-MnPKncqP.mjs → session-history.worker-Cq_4DYgN.mjs} +3 -3
- package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-D6dtFQkE.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-BxIUJ0Zd.mjs} +8 -37
- package/dist/.setup/{session-retirement-qMTxkNx2.mjs → session-retirement-aC60o6P3.mjs} +14 -15
- package/dist/.setup/{settled-turn-context-D4yj4rxf.mjs → settled-turn-context-BZsMjkIO.mjs} +13 -6
- package/dist/.setup/{settled-turn-finalizer-BsvEabkw.mjs → settled-turn-finalizer-CDxCejjC.mjs} +8 -8
- package/dist/.setup/{shared-client-DqyTMYug.mjs → shared-client-DJJ3ljH2.mjs} +291 -272
- package/dist/.setup/{provider-capabilities-CAxoF-X1.mjs → shell-dynamic-tools-Do9lIAT1.mjs} +16 -55
- package/dist/.setup/{side-question-C4kCmQy1.mjs → side-question-B7T0_GEC.mjs} +99 -91
- package/dist/.setup/{source-CS_7GFJZ.mjs → source-DH70LqN0.mjs} +24 -40
- package/dist/.setup/{thread-lifecycle-DPflntEJ.mjs → thread-lifecycle-DkcoX9q-.mjs} +262 -305
- package/dist/.setup/{thread-ownership-roNP0l1c.mjs → thread-ownership-0aRHD9iK.mjs} +10 -8
- package/dist/.setup/{thread-policy-DTd-DtkX.mjs → thread-policy-CXZV97TS.mjs} +22 -21
- package/dist/.setup/{thread-requests-B_bRnMGN.mjs → thread-requests-COrRJcZb.mjs} +107 -98
- package/dist/.setup/{thread-resume-CdDaoc7T.mjs → thread-resume-rx7J68Rx.mjs} +10 -18
- package/dist/.setup/{transcript-history-projection-DRSifI-1.mjs → transcript-history-projection-B9a7HwUV.mjs} +11 -16
- package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BfLRARNL.mjs} +64 -67
- package/dist/.setup/{transport-stdio-Bdegpn2V.mjs → transport-stdio-a0HDa2Mj.mjs} +27 -8
- package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zqJ0Cmtn.mjs} +3 -8
- package/dist/.setup/{attempt-client-cleanup-DOP-cW5j.mjs → turn-router-CX1-EoCp.mjs} +75 -170
- package/dist/.setup/{upstream-session-fork-CBeVjBpT.mjs → upstream-session-fork-LYlaQnbt.mjs} +35 -46
- package/dist/.setup/{usage-BMzNxeR_.mjs → usage-Dmx7B0W2.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-QXerDo3i.mjs → usage-limit-error-M8jVnITZ.mjs} +4 -4
- package/dist/.setup/{web-search-provider.runtime-P77OUeoo.mjs → web-search-provider.runtime-CsVmqbFm.mjs} +4 -20
- package/dist/.setup/websocket-data-XlRvt8Ys.mjs +6 -0
- package/dist/.setup/workspace-write-sandbox-probe-DmUHLrrl.mjs +118 -0
- package/dist/api.js +34 -54
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +15 -27
- package/dist/harness.js +37 -22
- package/dist/index.js +2880 -276
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +2 -0
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +33 -4
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +3 -3
- package/package.json +6 -6
- package/dist/.setup/config-utils-D0CXecki.mjs +0 -57
- package/dist/.setup/incognito-session-DWYapfwf.mjs +0 -2
- package/dist/.setup/managed-thread-store-BMqgThVL.mjs +0 -100
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +0 -31
- package/dist/.setup/session-binding-meta-B7aEMU7g.mjs +0 -6
- package/dist/.setup/session-binding-record-Oe9L-CNY.mjs +0 -375
- package/dist/.setup/session-catalog-4sCdv5qx.mjs +0 -2610
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +0 -170
- package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +0 -153
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { a as resolveCodexPrivateLauncher, n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
2
|
+
import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-a0HDa2Mj.mjs";
|
|
3
|
+
import { t as resolveCodexDoctorStartOptions } from "./doctor-start-options-DPW9JxIE.mjs";
|
|
4
|
+
import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import fs from "node:fs/promises";
|
|
7
|
+
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
|
+
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
|
9
|
+
//#region extensions/codex/src/workspace-write-sandbox-probe.ts
|
|
10
|
+
const PROBE_ARGS = [
|
|
11
|
+
"sandbox",
|
|
12
|
+
"-c",
|
|
13
|
+
"sandbox_mode=\"workspace-write\"",
|
|
14
|
+
"-c",
|
|
15
|
+
"sandbox_workspace_write.network_access=false",
|
|
16
|
+
"--",
|
|
17
|
+
"true"
|
|
18
|
+
];
|
|
19
|
+
const PROBE_TIMEOUT_MS = 2e4;
|
|
20
|
+
const BWRAP_DENIAL = /^bwrap: (?:loopback: Failed RTM_NEW(?:ADDR|LINK)|setting up uid map: Permission denied|No permissions to create a new namespace)\b/u;
|
|
21
|
+
function renderCommand(argv) {
|
|
22
|
+
return argv.map((arg) => /^[\w./:=+@%,-]+$/u.test(arg) ? arg : `'${arg.replaceAll("'", "'\\''")}'`).join(" ");
|
|
23
|
+
}
|
|
24
|
+
/** Runs Codex's own Linux sandbox so network isolation also exercises bwrap loopback setup. */
|
|
25
|
+
async function probeCodexWorkspaceWriteSandbox(params) {
|
|
26
|
+
let command;
|
|
27
|
+
try {
|
|
28
|
+
if (process.platform !== "linux") return {
|
|
29
|
+
status: "skipped",
|
|
30
|
+
reason: "Codex bwrap is only used on Linux."
|
|
31
|
+
};
|
|
32
|
+
const baseEnv = params.env ?? process.env;
|
|
33
|
+
const selection = await resolveCodexDoctorStartOptions({
|
|
34
|
+
...params,
|
|
35
|
+
env: baseEnv
|
|
36
|
+
});
|
|
37
|
+
if (selection.status === "skipped") return selection;
|
|
38
|
+
const start = selection.start;
|
|
39
|
+
if (isCodexAppServerProxyLaunch(start.args)) return {
|
|
40
|
+
status: "skipped",
|
|
41
|
+
reason: "Codex app-server proxy forwards to an externally owned runtime."
|
|
42
|
+
};
|
|
43
|
+
command = renderCommand([start.command, ...PROBE_ARGS]);
|
|
44
|
+
const launchCwd = start.cwd ?? process.cwd();
|
|
45
|
+
const { launcherArgs } = resolveCodexPrivateLauncher({
|
|
46
|
+
command: start.command,
|
|
47
|
+
args: start.args,
|
|
48
|
+
cwd: launchCwd
|
|
49
|
+
});
|
|
50
|
+
const env = resolveCodexAppServerSpawnEnv(start, baseEnv);
|
|
51
|
+
const invocation = resolveCodexAppServerSpawnInvocation({
|
|
52
|
+
...start,
|
|
53
|
+
command: start.command.includes("/") ? path.resolve(launchCwd, start.command) : start.command,
|
|
54
|
+
args: [...launcherArgs, ...PROBE_ARGS]
|
|
55
|
+
}, env);
|
|
56
|
+
const argv = [invocation.command, ...invocation.argv];
|
|
57
|
+
command = renderCommand(argv);
|
|
58
|
+
const root = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "openclaw-codex-sandbox-probe-"));
|
|
59
|
+
try {
|
|
60
|
+
const codexHome = path.join(root, "codex-home");
|
|
61
|
+
const cwd = path.join(root, "workspace");
|
|
62
|
+
await fs.mkdir(codexHome);
|
|
63
|
+
await fs.mkdir(cwd);
|
|
64
|
+
const result = await runUtf8CommandWithTimeout(argv, {
|
|
65
|
+
cwd,
|
|
66
|
+
baseEnv: {
|
|
67
|
+
...env,
|
|
68
|
+
CODEX_HOME: codexHome
|
|
69
|
+
},
|
|
70
|
+
input: "",
|
|
71
|
+
timeoutMs: PROBE_TIMEOUT_MS,
|
|
72
|
+
maxOutputBytes: 65536,
|
|
73
|
+
outputCapture: "head",
|
|
74
|
+
terminateOnOutputLimit: true,
|
|
75
|
+
killProcessTree: true,
|
|
76
|
+
killSignal: "SIGKILL",
|
|
77
|
+
killGraceMs: 0
|
|
78
|
+
});
|
|
79
|
+
if (result.outputLimitExceeded || result.termination !== "exit" || result.signal) return {
|
|
80
|
+
status: "inconclusive",
|
|
81
|
+
command,
|
|
82
|
+
reason: result.outputLimitExceeded ? "Sandbox probe output exceeded its capture limit." : result.termination === "timeout" ? `Sandbox probe timed out after ${PROBE_TIMEOUT_MS} ms.` : `Sandbox probe ended with ${result.signal ?? result.termination}.`
|
|
83
|
+
};
|
|
84
|
+
if (result.code === 0) return {
|
|
85
|
+
status: "ok",
|
|
86
|
+
command
|
|
87
|
+
};
|
|
88
|
+
const denial = `${result.stdout}\n${result.stderr}`.split(/\r?\n/u).map((line) => line.trim()).find((line) => BWRAP_DENIAL.test(line));
|
|
89
|
+
if (result.code !== null && denial) return {
|
|
90
|
+
status: "denied",
|
|
91
|
+
command,
|
|
92
|
+
denial
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
status: "inconclusive",
|
|
96
|
+
command,
|
|
97
|
+
reason: `Sandbox probe exited with ${result.code ?? "no exit code"} without a recognized bwrap denial.`
|
|
98
|
+
};
|
|
99
|
+
} finally {
|
|
100
|
+
await fs.rm(root, {
|
|
101
|
+
recursive: true,
|
|
102
|
+
force: true
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
} catch (error) {
|
|
106
|
+
const reason = coerceErrorMessage(error);
|
|
107
|
+
return command ? {
|
|
108
|
+
status: "inconclusive",
|
|
109
|
+
command,
|
|
110
|
+
reason
|
|
111
|
+
} : {
|
|
112
|
+
status: "inconclusive",
|
|
113
|
+
reason
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { probeCodexWorkspaceWriteSandbox };
|
package/dist/api.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as resolveCodexAppServerStartOptionsForAgent } from "./.setup/config-options-CzyWLTJt.mjs";
|
|
3
|
-
import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, s as CODEX_APP_SERVER_VERSION, t as isManagedCodexDesktopCommand } from "./.setup/managed-binary-kiWRhNRE.mjs";
|
|
1
|
+
import { i as resolveManagedCodexNativeCommand, s as CODEX_APP_SERVER_VERSION } from "./.setup/managed-binary-C1VFoVPf.mjs";
|
|
4
2
|
import { t as codexNativeProfileRecoveryHealthCheck } from "./.setup/auth-profile-health-oHizqgye.mjs";
|
|
5
3
|
import { n as findCodexAppServerSpawnError, t as describeCodexSpawnError } from "./.setup/spawn-error-CL3n6MAa.mjs";
|
|
6
|
-
import "./.setup/
|
|
7
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./.setup/config-runtime-C0NbLms1.mjs";
|
|
8
|
-
import { listAgentIds, resolveAgentDir } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
4
|
+
import { t as resolveCodexDoctorStartOptions } from "./.setup/doctor-start-options-DPW9JxIE.mjs";
|
|
9
5
|
import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
10
6
|
import path from "node:path";
|
|
11
7
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
12
8
|
import { fileURLToPath } from "node:url";
|
|
13
|
-
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
14
|
-
import { resolveEffectiveAgentRuntime } from "openclaw/plugin-sdk/command-auth-native";
|
|
15
9
|
//#region extensions/codex/src/doctor.ts
|
|
16
10
|
const CODEX_MANAGED_APP_SERVER_CHECK_ID = "codex/managed-app-server";
|
|
17
11
|
const CODEX_VERSION_TIMEOUT_MS = 5e3;
|
|
@@ -46,9 +40,6 @@ async function runVersionCommand(command, env) {
|
|
|
46
40
|
return result;
|
|
47
41
|
}
|
|
48
42
|
function createCodexManagedAppServerHealthCheck(params) {
|
|
49
|
-
const resolveStartOptions = params.deps?.resolveStartOptions ?? resolveManagedCodexAppServerStartOptions;
|
|
50
|
-
const resolveAgentStartOptions = params.deps?.resolveAgentStartOptions ?? resolveCodexAppServerStartOptionsForAgent;
|
|
51
|
-
const isDesktopCommand = params.deps?.isDesktopCommand ?? isManagedCodexDesktopCommand;
|
|
52
43
|
const resolveNativeCommand = params.deps?.resolveNativeCommand ?? resolveManagedCodexNativeCommand;
|
|
53
44
|
return {
|
|
54
45
|
id: CODEX_MANAGED_APP_SERVER_CHECK_ID,
|
|
@@ -57,54 +48,29 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
57
48
|
source: "codex",
|
|
58
49
|
defaultEnabled: false,
|
|
59
50
|
async detect(ctx) {
|
|
60
|
-
const pluginConfig = ctx.cfg.plugins?.entries?.codex?.config;
|
|
61
|
-
const start = resolveCodexAppServerRuntimeOptions({
|
|
62
|
-
pluginConfig,
|
|
63
|
-
env: ctx.env ?? process.env
|
|
64
|
-
}).start;
|
|
65
|
-
if (start.transport !== "stdio" || start.commandSource !== "managed") return [];
|
|
66
51
|
const env = ctx.env ?? process.env;
|
|
67
52
|
const isFinalization = ctx.mode === "fix" && env.OPENCLAW_UPDATE_POST_CORE === "1";
|
|
68
53
|
const versionFailureSeverity = isFinalization ? "warning" : "error";
|
|
69
54
|
const versionFailureHint = isFinalization ? "Codex readiness will be rechecked by its plugin after restart; inspect the Codex plugin if the warning persists." : void 0;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
let selection;
|
|
56
|
+
try {
|
|
57
|
+
selection = await resolveCodexDoctorStartOptions({
|
|
73
58
|
cfg: ctx.cfg,
|
|
74
|
-
|
|
59
|
+
env,
|
|
60
|
+
pluginRoot: params.pluginRoot,
|
|
61
|
+
managedOnly: true,
|
|
62
|
+
deps: params.deps
|
|
75
63
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
startOptions: start,
|
|
84
|
-
agentDir: resolveAgentDir(ctx.cfg, agentId, env),
|
|
85
|
-
env
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
if (ctx.cfg.plugins?.entries?.codex?.enabled === true && readCodexPluginConfig(pluginConfig).sessionCatalog?.enabled !== false) candidates.push({
|
|
89
|
-
...start,
|
|
90
|
-
managedCommandOrder: "package-only"
|
|
91
|
-
});
|
|
92
|
-
let resolved;
|
|
93
|
-
for (const candidate of candidates) {
|
|
94
|
-
try {
|
|
95
|
-
resolved = await resolveStartOptions(candidate, { pluginRoot: params.pluginRoot });
|
|
96
|
-
} catch (error) {
|
|
97
|
-
return [managedCodexFinding({
|
|
98
|
-
message: `Managed Codex app-server could not be resolved: ${coerceErrorMessage(error)}`,
|
|
99
|
-
path: params.pluginRoot,
|
|
100
|
-
requirement: `an executable Codex ${CODEX_APP_SERVER_VERSION} managed artifact`,
|
|
101
|
-
fixHint: "Reinstall the staged OpenClaw package with its @openai/codex platform dependency, then rerun the candidate check."
|
|
102
|
-
})];
|
|
103
|
-
}
|
|
104
|
-
if (!isDesktopCommand(resolved.command)) break;
|
|
105
|
-
resolved = void 0;
|
|
64
|
+
} catch (error) {
|
|
65
|
+
return [managedCodexFinding({
|
|
66
|
+
message: `Managed Codex app-server could not be resolved: ${coerceErrorMessage(error)}`,
|
|
67
|
+
path: params.pluginRoot,
|
|
68
|
+
requirement: `an executable Codex ${CODEX_APP_SERVER_VERSION} managed artifact`,
|
|
69
|
+
fixHint: "Reinstall the staged OpenClaw package with its @openai/codex platform dependency, then rerun the candidate check."
|
|
70
|
+
})];
|
|
106
71
|
}
|
|
107
|
-
if (
|
|
72
|
+
if (selection.status === "skipped") return [];
|
|
73
|
+
const resolved = selection.start;
|
|
108
74
|
const nativeCommand = resolveNativeCommand(resolved.command);
|
|
109
75
|
if (!nativeCommand) return [managedCodexFinding({
|
|
110
76
|
message: "Managed Codex app-server resolved a launcher without a native artifact.",
|
|
@@ -126,7 +92,7 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
126
92
|
})];
|
|
127
93
|
}
|
|
128
94
|
const detectedVersion = parseCodexVersion(`${output.stdout}\n${output.stderr}`);
|
|
129
|
-
if (detectedVersion !== "0.
|
|
95
|
+
if (detectedVersion !== "0.160.0") return [managedCodexFinding({
|
|
130
96
|
severity: versionFailureSeverity,
|
|
131
97
|
message: detectedVersion ? `Managed Codex app-server version mismatch: expected ${CODEX_APP_SERVER_VERSION}, detected ${detectedVersion}.` : `Managed Codex app-server did not report a parseable version; expected ${CODEX_APP_SERVER_VERSION}.`,
|
|
132
98
|
path: nativeCommand,
|
|
@@ -147,6 +113,20 @@ function registerCodexManagedAppServerDoctorChecks$1(host, deps) {
|
|
|
147
113
|
//#endregion
|
|
148
114
|
//#region extensions/codex/api.ts
|
|
149
115
|
const CODEX_PLUGIN_ROOT = path.dirname(fileURLToPath(import.meta.url));
|
|
116
|
+
async function probeCodexWorkspaceWriteSandbox(params) {
|
|
117
|
+
try {
|
|
118
|
+
const { probeCodexWorkspaceWriteSandbox: probe } = await import("./.setup/workspace-write-sandbox-probe-DmUHLrrl.mjs");
|
|
119
|
+
return await probe({
|
|
120
|
+
...params,
|
|
121
|
+
pluginRoot: CODEX_PLUGIN_ROOT
|
|
122
|
+
});
|
|
123
|
+
} catch (error) {
|
|
124
|
+
return {
|
|
125
|
+
status: "inconclusive",
|
|
126
|
+
reason: coerceErrorMessage(error)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
150
130
|
function registerCodexManagedAppServerDoctorChecks(host) {
|
|
151
131
|
registerCodexManagedAppServerDoctorChecks$1({
|
|
152
132
|
...host,
|
|
@@ -155,4 +135,4 @@ function registerCodexManagedAppServerDoctorChecks(host) {
|
|
|
155
135
|
if (!host.getHealthCheck(codexNativeProfileRecoveryHealthCheck.id)) host.registerHealthCheck(codexNativeProfileRecoveryHealthCheck);
|
|
156
136
|
}
|
|
157
137
|
//#endregion
|
|
158
|
-
export { CODEX_MANAGED_APP_SERVER_CHECK_ID, registerCodexManagedAppServerDoctorChecks };
|
|
138
|
+
export { CODEX_MANAGED_APP_SERVER_CHECK_ID, probeCodexWorkspaceWriteSandbox, registerCodexManagedAppServerDoctorChecks };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-
|
|
1
|
+
import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-CmvIiDdj.mjs";
|
|
2
2
|
import { serveWorkerTasks } from "openclaw/plugin-sdk/worker-task-server";
|
|
3
3
|
//#region extensions/codex/catalog-page.worker.ts
|
|
4
4
|
const decode = createCodexCatalogDecoder();
|
package/dist/cli-metadata.js
CHANGED
|
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
2
2
|
//#region extensions/codex/cli-metadata.ts
|
|
3
3
|
function registerCodexCliMetadata(api) {
|
|
4
4
|
api.registerCli(async ({ program }) => {
|
|
5
|
-
const { registerCodexSessionCli } = await import("./.setup/session-cli-
|
|
5
|
+
const { registerCodexSessionCli } = await import("./.setup/session-cli-kH4vuGod.mjs");
|
|
6
6
|
registerCodexSessionCli(program);
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "codex",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as CODEX_APP_SERVER_BINDING_NAMESPACE } from "./.setup/session-binding-meta-Lkm5Lpf4.mjs";
|
|
2
2
|
import { asNullableRecord, asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { setImmediate } from "node:timers/promises";
|
|
@@ -193,31 +193,19 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
193
193
|
const rawPluginConfig = asNullableRecord(rawEntry?.config);
|
|
194
194
|
const rawCodexPlugins = asNullableRecord(rawPluginConfig?.codexPlugins);
|
|
195
195
|
const rawAppServer = asNullableRecord(rawPluginConfig?.appServer);
|
|
196
|
-
|
|
197
|
-
const shouldRewriteDestructivePolicy = hasLegacyPluginDestructivePolicy(rawCodexPlugins);
|
|
198
|
-
const shouldRewriteApprovalPolicy = hasRetiredApprovalPolicy(rawAppServer);
|
|
199
|
-
const shouldRemoveTurnIdleTimeouts = hasRetiredTurnIdleTimeout(rawAppServer);
|
|
200
|
-
const shouldRemoveBlankNetworkProxyFields = hasBlankNetworkProxyOptionalFields(rawAppServer);
|
|
201
|
-
if (!rawPluginConfig || !shouldRemoveDynamicToolsProfile && !shouldRewriteDestructivePolicy && !shouldRewriteApprovalPolicy && !shouldRemoveTurnIdleTimeouts && !shouldRemoveBlankNetworkProxyFields) return {
|
|
196
|
+
if (!rawPluginConfig || !hasRetiredDynamicToolsProfile(rawPluginConfig) && !hasLegacyPluginDestructivePolicy(rawCodexPlugins) && !hasRetiredApprovalPolicy(rawAppServer) && !hasRetiredTurnIdleTimeout(rawAppServer) && !hasBlankNetworkProxyOptionalFields(rawAppServer)) return {
|
|
202
197
|
config: cfg,
|
|
203
198
|
changes: []
|
|
204
199
|
};
|
|
205
200
|
const nextConfig = structuredClone(cfg);
|
|
206
|
-
const
|
|
207
|
-
const nextEntries = asNullableRecord(nextPlugins?.entries);
|
|
208
|
-
const nextEntry = asNullableRecord(nextEntries?.codex);
|
|
209
|
-
const nextPluginConfig = asNullableRecord(nextEntry?.config);
|
|
210
|
-
if (!nextPluginConfig) return {
|
|
211
|
-
config: cfg,
|
|
212
|
-
changes: []
|
|
213
|
-
};
|
|
201
|
+
const nextPluginConfig = nextConfig.plugins.entries.codex.config;
|
|
214
202
|
const changes = [];
|
|
215
|
-
if (
|
|
203
|
+
if (hasRetiredDynamicToolsProfile(nextPluginConfig)) {
|
|
216
204
|
delete nextPluginConfig.codexDynamicToolsProfile;
|
|
217
205
|
changes.push("Removed retired plugins.entries.codex.config.codexDynamicToolsProfile; Codex app-server always keeps Codex-native workspace tools native.");
|
|
218
206
|
}
|
|
219
|
-
|
|
220
|
-
|
|
207
|
+
const nextCodexPlugins = asNullableRecord(nextPluginConfig.codexPlugins);
|
|
208
|
+
if (hasLegacyPluginDestructivePolicy(nextCodexPlugins)) {
|
|
221
209
|
if (nextCodexPlugins?.allow_destructive_actions === "on-request") nextCodexPlugins.allow_destructive_actions = "auto";
|
|
222
210
|
const nextPluginPolicies = asNullableRecord(nextCodexPlugins?.plugins);
|
|
223
211
|
for (const plugin of Object.values(nextPluginPolicies ?? {})) {
|
|
@@ -227,13 +215,13 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
227
215
|
changes.push("Renamed plugins.entries.codex.config.codexPlugins allow_destructive_actions=\"on-request\" values to \"auto\".");
|
|
228
216
|
}
|
|
229
217
|
const nextAppServer = asNullableRecord(nextPluginConfig.appServer);
|
|
230
|
-
if (nextAppServer &&
|
|
218
|
+
if (nextAppServer && hasRetiredTurnIdleTimeout(nextAppServer)) {
|
|
231
219
|
for (const key of RETIRED_TURN_IDLE_TIMEOUT_KEYS) if (Object.hasOwn(nextAppServer, key)) {
|
|
232
220
|
delete nextAppServer[key];
|
|
233
221
|
changes.push(`Removed retired plugins.entries.codex.config.appServer.${key}; native Codex owns provider liveness and turn completion. agents.defaults.timeoutSeconds was not changed.`);
|
|
234
222
|
}
|
|
235
223
|
}
|
|
236
|
-
if (nextAppServer &&
|
|
224
|
+
if (nextAppServer && hasBlankNetworkProxyOptionalFields(nextAppServer)) {
|
|
237
225
|
const nextNetworkProxy = asNullableRecord(nextAppServer.networkProxy);
|
|
238
226
|
for (const [target, key, configPath] of [[
|
|
239
227
|
nextNetworkProxy,
|
|
@@ -248,8 +236,8 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
248
236
|
changes.push(`Removed blank plugins.entries.codex.config.appServer.${configPath}; the default now applies.`);
|
|
249
237
|
}
|
|
250
238
|
}
|
|
251
|
-
if (
|
|
252
|
-
|
|
239
|
+
if (nextAppServer && hasRetiredApprovalPolicy(nextAppServer)) {
|
|
240
|
+
nextAppServer.approvalPolicy = "on-request";
|
|
253
241
|
changes.push("Renamed retired plugins.entries.codex.config.appServer.approvalPolicy to \"on-request\".");
|
|
254
242
|
}
|
|
255
243
|
return {
|
|
@@ -261,15 +249,15 @@ const stateMigrations = [
|
|
|
261
249
|
{
|
|
262
250
|
id: "codex-app-server-sidecars-to-plugin-state",
|
|
263
251
|
label: "Codex app-server thread bindings",
|
|
264
|
-
detectLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-
|
|
265
|
-
migrateLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-
|
|
252
|
+
detectLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-BrdV95Fg.mjs")).detectLegacySessionBindingSidecars(params),
|
|
253
|
+
migrateLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-BrdV95Fg.mjs")).migrateLegacySessionBindingSidecars(params)
|
|
266
254
|
},
|
|
267
255
|
{
|
|
268
256
|
id: "codex-native-task-assignments",
|
|
269
257
|
label: "Codex native pending assignments",
|
|
270
|
-
collectBackupResources: async (params) => (await import("./.setup/native-task-assignments-
|
|
271
|
-
detectLegacyState: async (params) => (await import("./.setup/native-task-assignments-
|
|
272
|
-
migrateLegacyState: async (params) => (await import("./.setup/native-task-assignments-
|
|
258
|
+
collectBackupResources: async (params) => (await import("./.setup/native-task-assignments-C6KVqiN1.mjs")).codexNativeTaskAssignmentMigration.collectBackupResources(params),
|
|
259
|
+
detectLegacyState: async (params) => (await import("./.setup/native-task-assignments-C6KVqiN1.mjs")).codexNativeTaskAssignmentMigration.detectLegacyState(params),
|
|
260
|
+
migrateLegacyState: async (params) => (await import("./.setup/native-task-assignments-C6KVqiN1.mjs")).codexNativeTaskAssignmentMigration.migrateLegacyState(params)
|
|
273
261
|
},
|
|
274
262
|
codexOrphanedSessionBindingMigration
|
|
275
263
|
];
|
package/dist/harness.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "./native-tool-policy.js";
|
|
2
2
|
import { n as readCodexRuntimeModelId } from "./.setup/model-runtime-BdqzOMkU.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as codexBuildSymbol } from "./.setup/build-state-
|
|
3
|
+
import { m as sessionBindingIdentity } from "./.setup/session-binding-record-BZB8RgcF.mjs";
|
|
4
|
+
import { t as codexBuildSymbol } from "./.setup/build-state-CIi3Ckqu.mjs";
|
|
5
5
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
|
+
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
7
|
//#region extensions/codex/harness.ts
|
|
7
8
|
const DEFAULT_CODEX_HARNESS_PROVIDER_IDS = /* @__PURE__ */ new Set(["codex", "openai"]);
|
|
8
9
|
/** Keep the shipped callback loadable on older hosts without inventing source authority. */
|
|
@@ -60,6 +61,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
60
61
|
let modelCatalog;
|
|
61
62
|
let disposed = false;
|
|
62
63
|
const resolveAttemptPluginConfig = (config) => resolvePluginConfigObject(config, "codex") ?? options.resolvePluginConfig?.() ?? options.pluginConfig;
|
|
64
|
+
const resolveIsolatedCompletionRuntime = ({ authorizationOwner }) => authorizationOwner === "host" ? "openclaw" : "self";
|
|
63
65
|
return {
|
|
64
66
|
id: harnessRuntimeId,
|
|
65
67
|
label: options?.label ?? "Codex agent harness",
|
|
@@ -79,6 +81,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
79
81
|
conversationToolPolicyNativeTools: CODEX_NATIVE_TOOL_REQUIREMENTS,
|
|
80
82
|
deliveryDefaults: { visibleReplies: "message_tool" },
|
|
81
83
|
authBootstrap: "harness",
|
|
84
|
+
resolveIsolatedCompletionRuntime,
|
|
82
85
|
resolveSessionRuntimeOwnership: (params) => {
|
|
83
86
|
const assertCurrent = () => {
|
|
84
87
|
params.assertCurrent();
|
|
@@ -108,7 +111,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
108
111
|
executionEnvironment: "host-only",
|
|
109
112
|
upstreamKinds: ["codex-app-server"],
|
|
110
113
|
fork: async (params) => {
|
|
111
|
-
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-
|
|
114
|
+
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-LYlaQnbt.mjs");
|
|
112
115
|
return await forkCodexUpstreamSession(params, {
|
|
113
116
|
bindingStore: options.bindingStore,
|
|
114
117
|
controlFactory: sessionCatalogControlFactory,
|
|
@@ -119,29 +122,41 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
119
122
|
}
|
|
120
123
|
} } : {},
|
|
121
124
|
authBinding: { fingerprint: async (params) => {
|
|
122
|
-
const { fingerprintCodexAppServerAuthBinding } = await import("./.setup/auth-binding-
|
|
125
|
+
const { fingerprintCodexAppServerAuthBinding } = await import("./.setup/auth-binding-BoMwpuPN.mjs").then((n) => n.t);
|
|
123
126
|
return fingerprintCodexAppServerAuthBinding(params);
|
|
124
127
|
} },
|
|
125
128
|
runtimeArtifact: { validate: async (binding) => {
|
|
126
|
-
const { validateCodexAppServerRuntimeArtifact } = await import("./.setup/runtime-artifact-
|
|
127
|
-
const { isCodexConfiguredConnectionArtifact } = await import("./.setup/runtime-artifact-connection-
|
|
129
|
+
const { validateCodexAppServerRuntimeArtifact } = await import("./.setup/runtime-artifact-CUTOOnKw.mjs");
|
|
130
|
+
const { isCodexConfiguredConnectionArtifact } = await import("./.setup/runtime-artifact-connection-CADz3_BY.mjs");
|
|
128
131
|
if (!isCodexConfiguredConnectionArtifact(binding.id)) return validateCodexAppServerRuntimeArtifact(binding);
|
|
129
|
-
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-
|
|
132
|
+
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-0Gxk3_eq.mjs").then((n) => n.t);
|
|
130
133
|
return validateCodexAppServerRuntimeArtifact(binding, void 0, resolveCodexAppServerRuntimeOptions({ pluginConfig: resolveAttemptPluginConfig(options.resolveConfig?.()) }).start);
|
|
131
134
|
} },
|
|
132
135
|
fetchUsageSnapshot: async (ctx) => {
|
|
133
|
-
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-
|
|
136
|
+
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-Dmx7B0W2.mjs");
|
|
134
137
|
return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
135
138
|
},
|
|
136
139
|
loadModelCatalog: async (params) => {
|
|
137
|
-
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-
|
|
140
|
+
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-Dj_uvusa.mjs");
|
|
138
141
|
if (disposed) return { entries: [] };
|
|
139
142
|
modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
|
|
140
143
|
return { entries: await modelCatalog.load(params, resolveAttemptPluginConfig(params.config)) };
|
|
141
144
|
},
|
|
142
145
|
readModelCatalogReadiness: (params) => modelCatalog?.read(params, resolveAttemptPluginConfig(params.config)),
|
|
146
|
+
filterModelServiceTiers: ({ config, serviceTiers }) => {
|
|
147
|
+
return asOptionalRecord(asOptionalRecord(resolveAttemptPluginConfig(config))?.appServer)?.enableUltrafast === false ? serviceTiers.filter((tier) => tier !== "ultrafast") : serviceTiers;
|
|
148
|
+
},
|
|
149
|
+
acquireMcpAppRuntime: async (params) => {
|
|
150
|
+
const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-BysTBZCW.mjs");
|
|
151
|
+
if (disposed) return;
|
|
152
|
+
params.assertCurrent();
|
|
153
|
+
return await acquireCodexMcpAppRuntime(params, {
|
|
154
|
+
bindingStore: options.bindingStore,
|
|
155
|
+
pluginConfig: resolveAttemptPluginConfig(params.config)
|
|
156
|
+
});
|
|
157
|
+
},
|
|
143
158
|
loadMcpToolCatalog: async (params) => {
|
|
144
|
-
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-
|
|
159
|
+
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-BysTBZCW.mjs");
|
|
145
160
|
return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
|
|
146
161
|
},
|
|
147
162
|
supports: (ctx) => {
|
|
@@ -184,9 +199,9 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
184
199
|
};
|
|
185
200
|
},
|
|
186
201
|
runAttempt: async (params) => {
|
|
187
|
-
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-
|
|
188
|
-
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-
|
|
189
|
-
const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-
|
|
202
|
+
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-CgvFoW7R.mjs");
|
|
203
|
+
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-Bb1J6hS1.mjs");
|
|
204
|
+
const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-XR03ef31.mjs");
|
|
190
205
|
const pluginConfig = resolveAttemptPluginConfig(params.config);
|
|
191
206
|
const attemptModel = readCodexRuntimeModelId(params.model, params.modelId);
|
|
192
207
|
const runAttemptOnModel = (model, isRetry = false) => runCodexAppServerAttempt(isRetry ? {
|
|
@@ -246,11 +261,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
246
261
|
return escalated;
|
|
247
262
|
},
|
|
248
263
|
runIsolatedCompletionV2: async (params) => {
|
|
249
|
-
if (params.authorization.owner === "
|
|
264
|
+
if (resolveIsolatedCompletionRuntime({ authorizationOwner: params.authorization.owner }) === "openclaw") {
|
|
250
265
|
const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
|
|
251
266
|
return runHostPreparedIsolatedCompletion(params);
|
|
252
267
|
}
|
|
253
|
-
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-
|
|
268
|
+
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-D5gbKm6k.mjs");
|
|
254
269
|
return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
255
270
|
},
|
|
256
271
|
runIsolatedCompletion: async (params) => {
|
|
@@ -266,11 +281,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
266
281
|
});
|
|
267
282
|
},
|
|
268
283
|
finalizeSettledTurn: async (params) => {
|
|
269
|
-
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-
|
|
284
|
+
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-CDxCejjC.mjs");
|
|
270
285
|
return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
271
286
|
},
|
|
272
287
|
runSideQuestion: async (params) => {
|
|
273
|
-
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-
|
|
288
|
+
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-B7T0_GEC.mjs");
|
|
274
289
|
return runCodexAppServerSideQuestion(params, {
|
|
275
290
|
bindingStore: options.bindingStore,
|
|
276
291
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
@@ -281,25 +296,25 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
281
296
|
},
|
|
282
297
|
compact: async (params) => {
|
|
283
298
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
284
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
299
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BLSAd-ru.mjs");
|
|
285
300
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
286
301
|
bindingStore: options.bindingStore,
|
|
287
302
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
|
|
288
303
|
});
|
|
289
304
|
},
|
|
290
305
|
withSessionDeletion: async (params, run) => {
|
|
291
|
-
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-
|
|
306
|
+
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-aC60o6P3.mjs");
|
|
292
307
|
params.assertCurrent();
|
|
293
308
|
return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
|
|
294
309
|
},
|
|
295
310
|
withSessionContextReset: async (params, run) => {
|
|
296
|
-
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-
|
|
311
|
+
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-aC60o6P3.mjs");
|
|
297
312
|
params.assertCurrent();
|
|
298
313
|
return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
|
|
299
314
|
},
|
|
300
315
|
reset: async (params) => {
|
|
301
316
|
if (params.sessionId && params.reason !== "deleted") {
|
|
302
|
-
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-
|
|
317
|
+
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Ce7BqiPN.mjs").then((n) => n.i), import("./.setup/session-retirement-aC60o6P3.mjs")]);
|
|
303
318
|
const identity = sessionBindingIdentity({
|
|
304
319
|
agentId: params.agentId,
|
|
305
320
|
sessionId: params.sessionId,
|
|
@@ -332,7 +347,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
332
347
|
function createCodexAppServerNativeCompaction(options) {
|
|
333
348
|
return async (params) => {
|
|
334
349
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
335
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
350
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BLSAd-ru.mjs");
|
|
336
351
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
337
352
|
bindingStore: options.bindingStore,
|
|
338
353
|
pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
|