@openclaw/codex 2026.10.1-beta.2 → 2026.10.5-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/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
- package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
- package/dist/.setup/{apply-CXTudl9p.mjs → apply-CBMV8LN0.mjs} +40 -51
- package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
- package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
- package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
- package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
- package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
- package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
- package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
- package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-CzLMy1S9.mjs} +1 -1
- package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
- package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
- package/dist/.setup/{client-C8lgBOoO.mjs → client-y7nO6X9c.mjs} +198 -247
- package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
- package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
- package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
- package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
- package/dist/.setup/{compact-tUb9AYfH.mjs → compact-CD8xJxXS.mjs} +41 -61
- package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CiToXF5C.mjs} +109 -147
- package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
- package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
- package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
- package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
- package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
- package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
- package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
- package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
- package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
- package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
- package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-GXM3unE4.mjs} +7 -10
- package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
- package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
- package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
- package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
- package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
- package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
- package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
- package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
- package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
- package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
- package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
- package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
- package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
- package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
- package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
- package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
- package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
- package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
- package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
- package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-B227ST3D.mjs} +6 -6
- package/dist/.setup/{models-DSseKSMg.mjs → models-DdRyi93L.mjs} +6 -10
- package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
- package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
- package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
- package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
- package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
- package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
- package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
- package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
- package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
- package/dist/.setup/{plan-BJ37d2Og.mjs → plan-C_F3aio0.mjs} +40 -50
- package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
- package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
- package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
- package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
- package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
- package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
- package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
- package/dist/.setup/{provider-BnwHVD_z.mjs → provider-BJ4xhaGX.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
- package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
- package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
- package/dist/.setup/{request-jSbhc1sg.mjs → request-Y8dmbqZ3.mjs} +28 -48
- package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
- package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -849
- package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
- package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
- package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
- package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
- package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
- package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
- package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
- package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
- package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
- package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
- package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
- package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
- package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
- package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
- package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
- package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
- package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
- package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
- package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
- package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
- package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
- package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
- package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
- package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
- package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
- package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
- package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
- package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-IoS3zr17.mjs} +7 -7
- package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
- package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-ByIwuAC-.mjs} +172 -229
- package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-BDUdozFy.mjs} +116 -137
- package/dist/.setup/{source-BYu0T780.mjs → source-Bxbqf3S1.mjs} +37 -56
- package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
- package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
- package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
- package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
- package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
- package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
- package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
- package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
- package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
- package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
- package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
- package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
- package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
- package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-DKDAziUW.mjs} +30 -31
- package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
- package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
- package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-DQA-peQC.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
- package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
- package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
- package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
- package/dist/api.js +15 -15
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -6
- package/dist/harness.js +32 -61
- package/dist/index.js +302 -416
- package/dist/media-understanding-provider.js +32 -43
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +1 -1
- package/dist/native-tool-policy.js +23 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +52 -31
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +20 -3
- package/package.json +7 -7
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
- package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +0 -124
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
- package/dist/.setup/shell-dynamic-tools-D3Brj3g9.mjs +0 -85
- package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
- package/dist/.setup/thread-requests-CL1e8Wmx.mjs +0 -2111
- package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
package/dist/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
2
|
-
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-
|
|
3
|
-
import { t as readCodexAppServerUsage } from "./request-
|
|
4
|
-
import "./config-
|
|
5
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
2
|
+
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CI8pTPqL.mjs";
|
|
3
|
+
import { t as readCodexAppServerUsage } from "./request-Y8dmbqZ3.mjs";
|
|
4
|
+
import "./config-C1YVVLEA.mjs";
|
|
5
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
6
6
|
import { a as resolveCodexAppServerAuthProfileStore } from "./auth-profile-CgHQ8Vot.mjs";
|
|
7
7
|
import { isDeepStrictEqual } from "node:util";
|
|
8
8
|
import { listAgentIds, resolveAgentDir } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
@@ -14,15 +14,16 @@ const paramsSchema = z.object({
|
|
|
14
14
|
profileId: z.string().min(1)
|
|
15
15
|
}).strict();
|
|
16
16
|
async function handleCodexAccountUsage({ params, respond, context, signal, hasCurrentClientAuthority }) {
|
|
17
|
+
const invalid = (message) => respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, message));
|
|
17
18
|
const parsed = paramsSchema.safeParse(params);
|
|
18
19
|
if (!parsed.success) {
|
|
19
|
-
|
|
20
|
+
invalid("Expected agentId and profileId.");
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
const { agentId, profileId } = parsed.data;
|
|
23
24
|
const config = context.getRuntimeConfig();
|
|
24
25
|
if (!listAgentIds(config).includes(agentId)) {
|
|
25
|
-
|
|
26
|
+
invalid("Unknown agent.");
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
29
|
try {
|
|
@@ -35,7 +36,7 @@ async function handleCodexAccountUsage({ params, respond, context, signal, hasCu
|
|
|
35
36
|
const store = structuredClone(readStore());
|
|
36
37
|
const credential = store.profiles[profileId];
|
|
37
38
|
if (!credential || credential.provider !== "openai" || credential.type === "api_key") {
|
|
38
|
-
|
|
39
|
+
invalid("Select a saved Codex subscription login.");
|
|
39
40
|
return;
|
|
40
41
|
}
|
|
41
42
|
const assertCurrent = () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-
|
|
1
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-C1YVVLEA.mjs";
|
|
2
2
|
//#region extensions/codex/src/app-server/app-server-policy.ts
|
|
3
3
|
function resolveCodexAppServerForModelProvider(params) {
|
|
4
|
-
|
|
4
|
+
return params.appServer.approvalsReviewer === "user" || canUseCodexModelBackedApprovalsReviewerForModel({
|
|
5
5
|
modelProvider: params.provider,
|
|
6
6
|
model: params.model,
|
|
7
7
|
config: params.config,
|
|
@@ -13,8 +13,7 @@ function resolveCodexAppServerForModelProvider(params) {
|
|
|
13
13
|
codexConfigToml: params.codexConfigToml,
|
|
14
14
|
homeScope: params.appServer.start.homeScope,
|
|
15
15
|
codexArgs: params.appServer.start.args
|
|
16
|
-
})
|
|
17
|
-
return {
|
|
16
|
+
}) ? params.appServer : {
|
|
18
17
|
...params.appServer,
|
|
19
18
|
approvalsReviewer: "user"
|
|
20
19
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import
|
|
6
|
-
import "./config-
|
|
7
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
|
|
1
|
+
import { s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-DyfUvsSa.mjs";
|
|
2
|
+
import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
3
|
+
import { r as requestCodexAppServerJson } from "./request-Y8dmbqZ3.mjs";
|
|
4
|
+
import { r as isOpenAiCuratedMarketplaceName, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-CYgdo14P.mjs";
|
|
5
|
+
import "./config-C1YVVLEA.mjs";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
8
7
|
import { i as resolveCodexAppServerAuthProfileIdForAgent } from "./auth-profile-CgHQ8Vot.mjs";
|
|
9
|
-
import { c as getLeasedSharedCodexAppServerClient, et as resolveCodexAppServerAuthAccountCacheKey, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-
|
|
10
|
-
import { t as ensureCodexPluginActivation } from "./plugin-activation-
|
|
11
|
-
import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as resolveCodexConfigPatchMode, readCodexPluginMigrationConfigEntry, t as createCodexAuthItemApplier } from "./plan-
|
|
8
|
+
import { c as getLeasedSharedCodexAppServerClient, et as resolveCodexAppServerAuthAccountCacheKey, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-ByIwuAC-.mjs";
|
|
9
|
+
import { t as ensureCodexPluginActivation } from "./plugin-activation-D7WkJMvU.mjs";
|
|
10
|
+
import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as resolveCodexConfigPatchMode, readCodexPluginMigrationConfigEntry, t as createCodexAuthItemApplier } from "./plan-C_F3aio0.mjs";
|
|
12
11
|
import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
12
|
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
14
13
|
import path from "node:path";
|
|
@@ -67,17 +66,14 @@ var CodexPluginConfigConflictError = class extends Error {
|
|
|
67
66
|
function prepareTargetCodexAppServer(ctx) {
|
|
68
67
|
const appServer = resolveTargetCodexAppServer(ctx);
|
|
69
68
|
const targets = resolvePlannedMigrationTargets(ctx);
|
|
70
|
-
let warmedClient;
|
|
71
69
|
const ready = getLeasedSharedCodexAppServerClient({
|
|
72
70
|
startOptions: appServer.start,
|
|
73
71
|
timeoutMs: 6e4,
|
|
74
72
|
agentDir: targets.agentDir,
|
|
75
73
|
config: ctx.config
|
|
76
|
-
}).
|
|
77
|
-
warmedClient = client;
|
|
78
|
-
}, () => void 0);
|
|
74
|
+
}).catch(() => void 0);
|
|
79
75
|
return { async dispose() {
|
|
80
|
-
await ready;
|
|
76
|
+
const warmedClient = await ready;
|
|
81
77
|
if (warmedClient) releaseLeasedSharedCodexAppServerClient(warmedClient);
|
|
82
78
|
await clearSharedCodexAppServerClientIfCurrentAndWait(warmedClient, {
|
|
83
79
|
exitTimeoutMs: 2e3,
|
|
@@ -163,49 +159,42 @@ async function applyCodexPluginInstallItem(ctx, item) {
|
|
|
163
159
|
appCache: defaultCodexAppInventoryCache,
|
|
164
160
|
appCacheKey
|
|
165
161
|
});
|
|
166
|
-
const
|
|
167
|
-
...item.details,
|
|
168
|
-
code: result.reason,
|
|
169
|
-
activationReason: result.reason,
|
|
170
|
-
...PLUGIN_ACTIVATION_REPORT_STATE[result.reason],
|
|
171
|
-
installAttempted: result.installAttempted,
|
|
172
|
-
diagnostics: result.diagnostics.map((diagnostic) => diagnostic.message)
|
|
173
|
-
};
|
|
174
|
-
if (result.ok) return {
|
|
175
|
-
...item,
|
|
176
|
-
status: "migrated",
|
|
177
|
-
...result.reason === "already_active" ? { reason: "already active" } : {},
|
|
178
|
-
details: baseDetails
|
|
179
|
-
};
|
|
180
|
-
if (result.reason === CODEX_PLUGIN_AUTH_REQUIRED_REASON) return {
|
|
162
|
+
const applied = {
|
|
181
163
|
...item,
|
|
182
|
-
status: "
|
|
183
|
-
reason: CODEX_PLUGIN_AUTH_REQUIRED_REASON,
|
|
164
|
+
status: result.ok ? "migrated" : "error",
|
|
184
165
|
details: {
|
|
185
|
-
...
|
|
166
|
+
...item.details,
|
|
167
|
+
code: result.reason,
|
|
168
|
+
activationReason: result.reason,
|
|
169
|
+
...PLUGIN_ACTIVATION_REPORT_STATE[result.reason],
|
|
170
|
+
installAttempted: result.installAttempted,
|
|
171
|
+
diagnostics: result.diagnostics.map((diagnostic) => diagnostic.message)
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
if (result.ok) {
|
|
175
|
+
if (result.reason === "already_active") applied.reason = "already active";
|
|
176
|
+
return applied;
|
|
177
|
+
}
|
|
178
|
+
applied.reason = result.reason;
|
|
179
|
+
if (result.reason === CODEX_PLUGIN_AUTH_REQUIRED_REASON) {
|
|
180
|
+
applied.status = "skipped";
|
|
181
|
+
applied.details = {
|
|
182
|
+
...applied.details,
|
|
186
183
|
appsNeedingAuth: (result.installResponse?.appsNeedingAuth ?? []).map(({ id, name }) => ({
|
|
187
184
|
id,
|
|
188
185
|
name,
|
|
189
186
|
needsAuth: true
|
|
190
187
|
}))
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
message: `Codex plugin "${policy.pluginName}" could not be migrated automatically`,
|
|
198
|
-
details: {
|
|
199
|
-
...baseDetails,
|
|
188
|
+
};
|
|
189
|
+
} else if (result.reason === "plugin_missing" || result.reason === "marketplace_missing") {
|
|
190
|
+
applied.status = "warning";
|
|
191
|
+
applied.message = `Codex plugin "${policy.pluginName}" could not be migrated automatically`;
|
|
192
|
+
applied.details = {
|
|
193
|
+
...applied.details,
|
|
200
194
|
warningReason: CODEX_PLUGIN_LOAD_WARNING
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return
|
|
204
|
-
...item,
|
|
205
|
-
status: "error",
|
|
206
|
-
reason: result.reason,
|
|
207
|
-
details: baseDetails
|
|
208
|
-
};
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
return applied;
|
|
209
198
|
} catch (error) {
|
|
210
199
|
if (coerceErrorMessage(error).includes("codex app-server plugin/list timed out")) return {
|
|
211
200
|
...item,
|
|
@@ -231,7 +220,7 @@ async function applyCodexPluginInstallItem(ctx, item) {
|
|
|
231
220
|
}
|
|
232
221
|
}
|
|
233
222
|
function resolveTargetCodexAppServer(ctx) {
|
|
234
|
-
return resolveCodexAppServerRuntimeOptions({ pluginConfig:
|
|
223
|
+
return resolveCodexAppServerRuntimeOptions({ pluginConfig: ctx.config.plugins?.entries?.codex?.config });
|
|
235
224
|
}
|
|
236
225
|
async function requestTargetCodexAppServerJson(params) {
|
|
237
226
|
if (params.method !== "plugin/list") return await requestCodexAppServerJson(params);
|
package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-
|
|
2
|
-
import { a as codexPrewriteRejectionCause, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-
|
|
3
|
-
import { J as unsubscribeCodexAppServerLiveThread, ft as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-
|
|
4
|
-
import {
|
|
5
|
-
import { n as getCodexAppServerTurnRouter } from "./turn-router-
|
|
6
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-DyfUvsSa.mjs";
|
|
2
|
+
import { a as codexPrewriteRejectionCause, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
3
|
+
import { J as unsubscribeCodexAppServerLiveThread, ft as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-ByIwuAC-.mjs";
|
|
4
|
+
import { I as isCodexAppServerBrokenPipeError, c as isCodexAppServerRequestTimeoutError } from "./client-y7nO6X9c.mjs";
|
|
5
|
+
import { n as getCodexAppServerTurnRouter } from "./turn-router-DKDAziUW.mjs";
|
|
6
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
7
7
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
8
8
|
import { AgentHarnessPreflightError, embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
9
9
|
//#region extensions/codex/src/app-server/attempt-client-cleanup.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { I as isMessageOnlyCodexSourceReply } from "./thread-requests-BgzJwJtS.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { buildAgentWorkspaceInstructionSnapshot, buildBootstrapContextForFiles, embeddedAgentLog, prepareAgentWorkspaceContext } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -102,31 +102,34 @@ async function buildCodexWorkspaceBootstrapContext(params) {
|
|
|
102
102
|
}
|
|
103
103
|
function renderCodexWorkspaceBootstrapPromptContext(contextFiles) {
|
|
104
104
|
if (contextFiles.length === 0) return;
|
|
105
|
-
|
|
105
|
+
return [
|
|
106
106
|
"OpenClaw loaded these user-editable workspace files for the current turn. Codex loads project-local AGENTS.md natively. When execution uses another folder, OpenClaw supplies the agent workspace AGENTS.md as thread-level developer instructions. SOUL.md, IDENTITY.md, and USER.md are prepared separately from user input and are not repeated here.",
|
|
107
107
|
"",
|
|
108
108
|
"# Project Context",
|
|
109
109
|
"",
|
|
110
110
|
"The following project context files have been loaded:",
|
|
111
|
-
""
|
|
112
|
-
];
|
|
113
|
-
for (const file of contextFiles) lines.push(`## ${file.path}`, "", file.content, "");
|
|
114
|
-
return lines.join("\n").trim();
|
|
115
|
-
}
|
|
116
|
-
function renderCodexWorkspaceMemoryReference(params) {
|
|
117
|
-
if (params.files.length === 0) return;
|
|
118
|
-
const lines = [
|
|
119
|
-
"## OpenClaw Workspace Memory",
|
|
120
111
|
"",
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
...contextFiles.flatMap((file) => [
|
|
113
|
+
`## ${file.path}`,
|
|
114
|
+
"",
|
|
115
|
+
file.content,
|
|
116
|
+
""
|
|
117
|
+
])
|
|
118
|
+
].join("\n").trim();
|
|
126
119
|
}
|
|
127
120
|
function renderCodexWorkspaceMemoryInstructions(params) {
|
|
128
|
-
const sections = [params.memoryRecallInstructions ? [params.memoryRecallInstructions, renderCodexMemoryToolSearchBridge(params.toolNames)].filter(isNonEmptyString).join("\n").trim() : void 0
|
|
129
|
-
|
|
121
|
+
const sections = [params.memoryRecallInstructions ? [params.memoryRecallInstructions, renderCodexMemoryToolSearchBridge(params.toolNames)].filter(isNonEmptyString).join("\n").trim() : void 0];
|
|
122
|
+
if (params.files.length > 0) {
|
|
123
|
+
const toolNames = params.toolNames.length ? params.toolNames : Array.from(CODEX_MEMORY_TOOL_NAMES);
|
|
124
|
+
sections.push([
|
|
125
|
+
"## OpenClaw Workspace Memory",
|
|
126
|
+
"",
|
|
127
|
+
`MEMORY.md exists in the active agent workspace as a memory file, not an instruction file. OpenClaw does not paste its contents into native Codex turns; use ${toolNames.join(" or ")} when durable memory is relevant and the tools are available.`,
|
|
128
|
+
"",
|
|
129
|
+
...params.files.map((file) => `- ${file.path}`)
|
|
130
|
+
].join("\n").trim());
|
|
131
|
+
}
|
|
132
|
+
return sections.filter(isNonEmptyString).join("\n\n") || void 0;
|
|
130
133
|
}
|
|
131
134
|
function renderCodexMemoryToolSearchBridge(toolNames) {
|
|
132
135
|
const memoryToolNames = toolNames.map(normalizeLowercaseStringOrEmpty).filter((name) => CODEX_MEMORY_TOOL_NAMES.has(name)).toSorted();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as isCodexResponsesOAuthCredential, o as resolveCodexResponsesOAuthProfileFingerprint } from "./responses-oauth-twnuTaAa.mjs";
|
|
2
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
3
|
-
import { fingerprintResolvedAuthProfileCredential } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
2
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
4
3
|
import { resolveApiKeyForProfile } from "openclaw/plugin-sdk/agent-runtime";
|
|
4
|
+
import { fingerprintResolvedAuthProfileCredential } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
5
5
|
import { resolveOpenAICodexAuthIdentity } from "openclaw/plugin-sdk/provider-auth";
|
|
6
6
|
//#region extensions/codex/src/app-server/auth-binding.ts
|
|
7
7
|
var auth_binding_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as defineCodexBuildState } from "./build-state-
|
|
2
|
-
import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-
|
|
3
|
-
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-
|
|
1
|
+
import { n as defineCodexBuildState } from "./build-state-CzLMy1S9.mjs";
|
|
2
|
+
import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-BtIjV7yN.mjs";
|
|
3
|
+
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-CRWTkKOn.mjs";
|
|
4
4
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import fs, { constants, existsSync, watch } from "node:fs";
|
|
@@ -52,18 +52,14 @@ function resolveComputerUseArtifactRoots(candidate) {
|
|
|
52
52
|
}
|
|
53
53
|
/** Stable roots that cover bundle replacement and recursive artifact updates. */
|
|
54
54
|
function resolveMacOSDesktopGenerationWatchPaths(candidates = resolveMacOSDesktopCodexAppPathCandidates("darwin")) {
|
|
55
|
-
|
|
56
|
-
for (const candidate of candidates) watched.add(candidate.appBundlePath);
|
|
57
|
-
return [...watched];
|
|
55
|
+
return [.../* @__PURE__ */ new Set(["/Applications", ...candidates.map((candidate) => candidate.appBundlePath)])];
|
|
58
56
|
}
|
|
59
57
|
async function readCodexDesktopArtifactTreeFingerprint(root) {
|
|
60
58
|
let rootStat;
|
|
61
59
|
try {
|
|
62
60
|
rootStat = await fs$1.lstat(root, { bigint: true });
|
|
63
61
|
} catch (error) {
|
|
64
|
-
|
|
65
|
-
if (code === "ENOENT" || code === "ENOTDIR") return "missing";
|
|
66
|
-
throw error;
|
|
62
|
+
return missingFingerprint(error);
|
|
67
63
|
}
|
|
68
64
|
if (!rootStat.isDirectory()) return statFingerprint(root);
|
|
69
65
|
let entryCount = 0;
|
|
@@ -100,9 +96,7 @@ async function statFingerprint(filePath) {
|
|
|
100
96
|
const content = target.isFile() ? await readFileFingerprint(filePath, target, true) : "";
|
|
101
97
|
return `${type}:${own}:${link}:${realPath}:${statTuple(target)}:${content}`;
|
|
102
98
|
} catch (error) {
|
|
103
|
-
|
|
104
|
-
if (code === "ENOENT" || code === "ENOTDIR") return "missing";
|
|
105
|
-
throw error;
|
|
99
|
+
return missingFingerprint(error);
|
|
106
100
|
}
|
|
107
101
|
}
|
|
108
102
|
async function readFileFingerprint(filePath, expected, followsSymlink) {
|
|
@@ -132,6 +126,11 @@ function statTuple(stat) {
|
|
|
132
126
|
stat.ctimeNs
|
|
133
127
|
].join(":");
|
|
134
128
|
}
|
|
129
|
+
function missingFingerprint(error) {
|
|
130
|
+
const code = extractErrorCode(error);
|
|
131
|
+
if (code === "ENOENT" || code === "ENOTDIR") return "missing";
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
135
134
|
//#endregion
|
|
136
135
|
//#region extensions/codex/src/app-server/desktop-generation-owner.ts
|
|
137
136
|
const SETTLE_DELAY_MS = 1e3;
|
|
@@ -139,11 +138,10 @@ const SETTLE_DELAY_MS = 1e3;
|
|
|
139
138
|
function createCodexDesktopGenerationOwner(params) {
|
|
140
139
|
let generation = params.initialGeneration;
|
|
141
140
|
let invalidation = 0;
|
|
142
|
-
let
|
|
141
|
+
let settledInvalidation = 0;
|
|
143
142
|
let refresh;
|
|
144
143
|
const markDirty = () => {
|
|
145
144
|
invalidation += 1;
|
|
146
|
-
dirty = true;
|
|
147
145
|
};
|
|
148
146
|
const reconcile = () => {
|
|
149
147
|
if (refresh) return refresh;
|
|
@@ -162,7 +160,7 @@ function createCodexDesktopGenerationOwner(params) {
|
|
|
162
160
|
epoch: (previous?.epoch ?? 0) + 1,
|
|
163
161
|
fingerprint: second
|
|
164
162
|
};
|
|
165
|
-
|
|
163
|
+
settledInvalidation = invalidation;
|
|
166
164
|
if (previous && generation !== previous) params.onGenerationChange?.(generation);
|
|
167
165
|
return generation;
|
|
168
166
|
}
|
|
@@ -174,12 +172,12 @@ function createCodexDesktopGenerationOwner(params) {
|
|
|
174
172
|
return {
|
|
175
173
|
read: () => generation,
|
|
176
174
|
markDirty,
|
|
177
|
-
wait: () =>
|
|
175
|
+
wait: () => settledInvalidation !== invalidation ? reconcile() : Promise.resolve(generation),
|
|
178
176
|
refresh: () => {
|
|
179
177
|
markDirty();
|
|
180
178
|
return reconcile();
|
|
181
179
|
},
|
|
182
|
-
isCurrent: (candidate) => Boolean(candidate && !params.signal.aborted &&
|
|
180
|
+
isCurrent: (candidate) => Boolean(candidate && !params.signal.aborted && settledInvalidation === invalidation && generation && candidate.epoch === generation.epoch && candidate.fingerprint === generation.fingerprint),
|
|
183
181
|
waitForIdle: async () => {
|
|
184
182
|
await refresh?.catch(() => {});
|
|
185
183
|
}
|
|
@@ -229,7 +227,6 @@ function createCodexDesktopGenerationService(params, runtime = {
|
|
|
229
227
|
scheduler?.beginClose();
|
|
230
228
|
current.lastGeneration = current.owner?.read() ?? current.lastGeneration;
|
|
231
229
|
current.owner = void 0;
|
|
232
|
-
current.armEpoch = (current.armEpoch ?? 0) + 1;
|
|
233
230
|
current.context = void 0;
|
|
234
231
|
current.runtime = void 0;
|
|
235
232
|
current.watchHealthy = void 0;
|
|
@@ -244,8 +241,6 @@ function armWatchers(current) {
|
|
|
244
241
|
const owner = current.owner;
|
|
245
242
|
const runtime = current.runtime;
|
|
246
243
|
if (!owner || !runtime || current.watchers) return false;
|
|
247
|
-
const armEpoch = (current.armEpoch ?? 0) + 1;
|
|
248
|
-
current.armEpoch = armEpoch;
|
|
249
244
|
const watchers = /* @__PURE__ */ new Set();
|
|
250
245
|
current.watchers = watchers;
|
|
251
246
|
const candidateNames = new Set(resolveMacOSDesktopCodexAppPathCandidates("darwin").map((candidate) => candidate.appName));
|
|
@@ -254,14 +249,14 @@ function armWatchers(current) {
|
|
|
254
249
|
if (!runtime.pathExists(watchedPath)) continue;
|
|
255
250
|
try {
|
|
256
251
|
const watcher = runtime.watchPath(watchedPath, { recursive: watchedPath !== APPLICATIONS_PATH }, (_eventType, filename) => {
|
|
257
|
-
if (!isCurrentArm(current, owner, watchers
|
|
252
|
+
if (!isCurrentArm(current, owner, watchers)) return;
|
|
258
253
|
if (watchedPath === APPLICATIONS_PATH && filename && !candidateNames.has(filename.toString().split(path.sep)[0] ?? "")) return;
|
|
259
254
|
owner.markDirty();
|
|
260
255
|
scheduleRearm(current, owner);
|
|
261
256
|
});
|
|
262
257
|
watchers.add(watcher);
|
|
263
258
|
watcher.on("error", (error) => {
|
|
264
|
-
if (!isCurrentArm(current, owner, watchers
|
|
259
|
+
if (!isCurrentArm(current, owner, watchers)) return;
|
|
265
260
|
reportWatcherFailure(current, owner, error);
|
|
266
261
|
scheduleRearm(current, owner);
|
|
267
262
|
});
|
|
@@ -282,8 +277,8 @@ function reportWatcherFailure(current, owner, error) {
|
|
|
282
277
|
current.context?.serviceHealth?.reportFailure(error);
|
|
283
278
|
current.context?.logger.warn(`codex desktop generation watcher failed: ${String(error)}`);
|
|
284
279
|
}
|
|
285
|
-
function isCurrentArm(current, owner, watchers
|
|
286
|
-
return current
|
|
280
|
+
function isCurrentArm(current, owner, watchers) {
|
|
281
|
+
return isCurrentOwner(current, owner) && current.watchers === watchers;
|
|
287
282
|
}
|
|
288
283
|
function scheduleRearm(current, owner) {
|
|
289
284
|
if (current.rearmPending && current.watchHealthy === false) return;
|
|
@@ -295,7 +290,7 @@ function scheduleRearm(current, owner) {
|
|
|
295
290
|
delayMs,
|
|
296
291
|
run: async () => {
|
|
297
292
|
current.rearmPending = false;
|
|
298
|
-
if (current
|
|
293
|
+
if (!isCurrentOwner(current, owner)) return;
|
|
299
294
|
const wasUnhealthy = current.watchHealthy === false;
|
|
300
295
|
closeWatchers(current);
|
|
301
296
|
if (!armWatchers(current) || wasUnhealthy) owner.markDirty();
|
|
@@ -305,9 +300,9 @@ function scheduleRearm(current, owner) {
|
|
|
305
300
|
}
|
|
306
301
|
function refreshGeneration(current, owner, refresh) {
|
|
307
302
|
return refresh.then(() => {
|
|
308
|
-
if (current
|
|
303
|
+
if (isCurrentOwner(current, owner) && current.watchHealthy) current.context?.serviceHealth?.clearFailure();
|
|
309
304
|
}).catch((error) => {
|
|
310
|
-
if (current
|
|
305
|
+
if (!isCurrentOwner(current, owner)) return;
|
|
311
306
|
current.context?.serviceHealth?.reportFailure(error);
|
|
312
307
|
current.context?.logger.warn(`codex desktop generation refresh failed: ${String(error)}`);
|
|
313
308
|
});
|
|
@@ -317,6 +312,9 @@ function closeWatchers(current) {
|
|
|
317
312
|
current.watchers = void 0;
|
|
318
313
|
for (const watcher of watchers ?? []) watcher.close();
|
|
319
314
|
}
|
|
315
|
+
function isCurrentOwner(current, owner) {
|
|
316
|
+
return current.owner === owner && !current.context?.scheduler.signal.aborted;
|
|
317
|
+
}
|
|
320
318
|
//#endregion
|
|
321
319
|
//#region extensions/codex/src/app-server/shared-client-lifecycle.ts
|
|
322
320
|
/** Client ownership and synchronous retirement, independent of startup/auth execution. */
|
|
@@ -453,7 +451,6 @@ function retirePendingSharedClientEntryIfUnclaimed(entry) {
|
|
|
453
451
|
entry.closeWhenIdle = true;
|
|
454
452
|
const state = getSharedCodexAppServerClientState();
|
|
455
453
|
if (state.clients.get(entry.key) === entry) state.clients.delete(entry.key);
|
|
456
|
-
if (!entry.client) return;
|
|
457
454
|
closeRetiredSharedClientEntry(entry);
|
|
458
455
|
}
|
|
459
456
|
/** Failed final claimants join physical cleanup; healthy peers keep their startup. */
|
|
@@ -512,9 +509,6 @@ function releaseSharedClientEntry(entry, counter) {
|
|
|
512
509
|
//#endregion
|
|
513
510
|
//#region extensions/codex/src/app-server/auth-cache-key.ts
|
|
514
511
|
/** Auth cache identity and native CLI credential reads, without login or refresh. */
|
|
515
|
-
const CODEX_HOME_ENV_VAR = "CODEX_HOME";
|
|
516
|
-
const HOME_ENV_VAR = "HOME";
|
|
517
|
-
const CODEX_HOME_DIRNAME = ".codex";
|
|
518
512
|
const CODEX_AUTH_JSON_FILENAME = "auth.json";
|
|
519
513
|
const CODEX_APP_SERVER_API_KEY_ENV_VARS = ["CODEX_API_KEY", "OPENAI_API_KEY"];
|
|
520
514
|
function resolveCodexAppServerFallbackApiKeyCacheKey(params) {
|
|
@@ -538,17 +532,12 @@ function fingerprintAuthCacheKey(prefix, domain, ...parts) {
|
|
|
538
532
|
return `${prefix}:sha256:${createHash("sha256").update(`openclaw:codex:app-server-${domain}:v1\0`).update(parts.join("\0")).digest("hex")}`;
|
|
539
533
|
}
|
|
540
534
|
function resolveCodexCliAuthFilePath(env) {
|
|
541
|
-
const
|
|
542
|
-
if (
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
function resolveHomeRelativePath(value, env) {
|
|
547
|
-
if (value === "~" || value.startsWith("~/") || value.startsWith("~\\")) {
|
|
548
|
-
const home = env[HOME_ENV_VAR]?.trim() || env.USERPROFILE?.trim() || os.homedir();
|
|
549
|
-
return path.join(home, value.slice(value === "~" ? 1 : 2));
|
|
535
|
+
const codexHome = env.CODEX_HOME?.trim() || "~/.codex";
|
|
536
|
+
if (codexHome === "~" || codexHome.startsWith("~/") || codexHome.startsWith("~\\")) {
|
|
537
|
+
const home = env.HOME?.trim() || env.USERPROFILE?.trim() || os.homedir();
|
|
538
|
+
return path.join(home, codexHome.slice(codexHome === "~" ? 1 : 2), CODEX_AUTH_JSON_FILENAME);
|
|
550
539
|
}
|
|
551
|
-
return
|
|
540
|
+
return path.join(codexHome, CODEX_AUTH_JSON_FILENAME);
|
|
552
541
|
}
|
|
553
542
|
function parseCodexCliAuthFileApiKey(raw) {
|
|
554
543
|
let parsed;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
2
2
|
import { AgentHarnessPreflightError } from "openclaw/plugin-sdk/agent-harness-registration";
|
|
3
3
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
4
4
|
//#region extensions/codex/src/app-server/binding-connection.ts
|
|
@@ -44,7 +44,7 @@ function requireCodexSupervisionModelSelection(binding) {
|
|
|
44
44
|
}
|
|
45
45
|
/** Registration publishes the resolver; connection policy loads only for an actual request. */
|
|
46
46
|
async function resolveCodexBindingAppServerConnection(params) {
|
|
47
|
-
return (await import("./binding-connection.runtime-
|
|
47
|
+
return (await import("./binding-connection.runtime-DAXn7iFl.mjs")).resolveCodexBindingAppServerConnection(params, catalogHomes.tryGetRuntime());
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
export { setCodexCatalogConnectionHomeResolver as a, resolveCodexBindingAppServerConnection as i, binding_connection_exports as n, requireCodexSupervisionModelSelection as r, assertCodexSessionRuntimeOwnership as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as readCodexPluginConfig } from "./config-parsing-
|
|
1
|
+
import { d as readCodexPluginConfig } from "./config-parsing-DsWSCPHO.mjs";
|
|
2
2
|
import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
3
|
-
import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-
|
|
4
|
-
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
3
|
+
import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
4
|
+
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
5
5
|
//#region extensions/codex/src/app-server/binding-connection.runtime.ts
|
|
6
6
|
/** Resolves connection and auth ownership exclusively from the private thread binding. */
|
|
7
7
|
async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
|
|
@@ -13,7 +13,8 @@ async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
|
|
|
13
13
|
let appServer = resolveRuntimeOptions(runtimeParams);
|
|
14
14
|
if (usesSupervisionConnection) {
|
|
15
15
|
const persistedFingerprint = binding.pendingSupervisionBranch?.connectionFingerprint ?? binding.appServerRuntimeFingerprint;
|
|
16
|
-
|
|
16
|
+
const fingerprint = () => buildCodexAppServerConnectionFingerprint(appServer, runtimeParams.agentDir);
|
|
17
|
+
let currentFingerprint = fingerprint();
|
|
17
18
|
if (persistedFingerprint && currentFingerprint !== persistedFingerprint && runtimeParams.agentDir) {
|
|
18
19
|
const home = (await discoverHomes?.(runtimeParams.agentDir))?.find((source) => source.appServer.start.transport === "stdio" && buildCodexAppServerConnectionFingerprint(source.appServer, source.agentDir) === persistedFingerprint);
|
|
19
20
|
if (home) {
|
|
@@ -31,7 +32,7 @@ async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
currentFingerprint =
|
|
35
|
+
currentFingerprint = fingerprint();
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
if (!persistedFingerprint || persistedFingerprint !== currentFingerprint) throw new Error("Codex supervision connection changed; refusing to operate on its bound native thread");
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
2
|
import { a as resolveCodexPrivateLauncher, i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
|
|
3
|
-
import { d as readCodexEffectiveConfig } from "./config-options-
|
|
4
|
-
import { a as codexPrewriteRejectionCause } from "./rpc-error-
|
|
5
|
-
import "./config-
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
7
|
-
import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-
|
|
8
|
-
import { _ as assertCodexTurnStartResponse, b as readCodexErrorNotification, g as assertCodexThreadStartResponse, w as createCodexElicitationResponse } from "./client-
|
|
9
|
-
import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-
|
|
10
|
-
import { t as CodexEphemeralTurn } from "./ephemeral-turn-
|
|
11
|
-
import { i as readModelListResult } from "./models-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
3
|
+
import { d as readCodexEffectiveConfig } from "./config-options-DDzeNQ8m.mjs";
|
|
4
|
+
import { a as codexPrewriteRejectionCause } from "./rpc-error-C98SHchT.mjs";
|
|
5
|
+
import "./config-C1YVVLEA.mjs";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
7
|
+
import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-ByIwuAC-.mjs";
|
|
8
|
+
import { _ as assertCodexTurnStartResponse, b as readCodexErrorNotification, g as assertCodexThreadStartResponse, w as createCodexElicitationResponse } from "./client-y7nO6X9c.mjs";
|
|
9
|
+
import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-t-kd_1ys.mjs";
|
|
10
|
+
import { t as CodexEphemeralTurn } from "./ephemeral-turn-Cphy5Qr_.mjs";
|
|
11
|
+
import { i as readModelListResult } from "./models-DdRyi93L.mjs";
|
|
12
|
+
import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-BVcvnps8.mjs";
|
|
13
|
+
import { n as resolveCodexAppServerReasoningEffort } from "./reasoning-effort-CS9kKWB9.mjs";
|
|
14
|
+
import { n as buildCodexRingZeroThreadConfigPatch, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, r as buildCodexRuntimeThreadConfig, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames } from "./thread-requests-BgzJwJtS.mjs";
|
|
15
|
+
import { a as resolveCodexPromptError } from "./usage-limit-error-2t3KBqiX.mjs";
|
|
15
16
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
16
17
|
import { parse } from "smol-toml";
|
|
17
18
|
import path from "node:path";
|
|
@@ -145,7 +146,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
|
|
|
145
146
|
assertCurrent: params.assertCurrent,
|
|
146
147
|
...params.signal ? { abandonSignal: params.signal } : {}
|
|
147
148
|
};
|
|
148
|
-
const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-
|
|
149
|
+
const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-ByIwuAC-.mjs").then((n) => n.v).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
|
|
149
150
|
...clientOptions,
|
|
150
151
|
authProfileStore: params.authProfileStore
|
|
151
152
|
}));
|
|
@@ -285,10 +286,13 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
|
|
|
285
286
|
});
|
|
286
287
|
}
|
|
287
288
|
function resolveBoundedThreadConfig(params, workspace, inheritedMcpServerNames, enableManagedHooks) {
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
289
|
+
const configs = [
|
|
290
|
+
CODEX_BOUNDED_THREAD_CONFIG,
|
|
291
|
+
params.threadConfig,
|
|
292
|
+
workspace.codexHome ? CODEX_PRIVATE_BOUNDED_THREAD_CONFIG : void 0
|
|
293
|
+
];
|
|
294
|
+
if (params.requireNoExternalCapabilities) configs.push(CODEX_SETTLED_FINALIZER_THREAD_CONFIG, buildCodexRingZeroThreadConfigPatch({ toolsAllow: ["openclaw"] }, true, inheritedMcpServerNames), enableManagedHooks ? { "features.hooks": true } : void 0);
|
|
295
|
+
return mergeCodexThreadConfigs(...configs) ?? CODEX_BOUNDED_THREAD_CONFIG;
|
|
292
296
|
}
|
|
293
297
|
function buildPrivateCodexAppServerStartOptions(start, codexHome, cwd, inspectManagedHooks) {
|
|
294
298
|
const launchCwd = start.cwd ?? process.cwd();
|
package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as readCodexPluginConfig } from "./config-parsing-
|
|
1
|
+
import { d as readCodexPluginConfig } from "./config-parsing-DsWSCPHO.mjs";
|
|
2
2
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
3
|
-
import { i as resolveCodexAppServerHomeScope } from "./config-options-
|
|
4
|
-
import "./config-
|
|
5
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
3
|
+
import { i as resolveCodexAppServerHomeScope } from "./config-options-DDzeNQ8m.mjs";
|
|
4
|
+
import "./config-C1YVVLEA.mjs";
|
|
5
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
6
6
|
//#region extensions/codex/src/app-server/bounded-turn-isolation.ts
|
|
7
7
|
function resolveCodexBoundedTurnIsolation(options) {
|
|
8
8
|
const pluginConfig = readCodexPluginConfig(options.pluginConfig);
|