@openclaw/codex 2026.9.34 → 2026.9.36
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-CD8HYWaz.mjs → account-usage-runtime-BOmEegZv.mjs} +3 -3
- package/dist/.setup/{apply-DN-qPbcH.mjs → apply-DhLjXde1.mjs} +8 -8
- package/dist/.setup/{attempt-client-cleanup-93r-CLTi.mjs → attempt-client-cleanup-C9dwStbK.mjs} +5 -5
- package/dist/.setup/{attempt-workspace-context-ejEuxrY1.mjs → attempt-workspace-context-DJrvhJDC.mjs} +1 -1
- package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-Bnaj0_iV.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-Bs_3kRJD.mjs → auth-cache-key-DWIq3Lzf.mjs} +3 -3
- package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-DRPlnIgg.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-DC3oUqo-.mjs} +1 -1
- package/dist/.setup/{bounded-turn-I8Vb-qq3.mjs → bounded-turn-Csc9Qvpm.mjs} +11 -11
- package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-Ce-oOk-D.mjs} +2 -2
- package/dist/.setup/{build-state--SrHyc6r.mjs → build-state-CmeL24P5.mjs} +1 -1
- package/dist/.setup/{client-CyquSiJ2.mjs → client-BdNoDUaQ.mjs} +268 -7
- package/dist/.setup/{command-dispatch-BPLz7tlx.mjs → command-dispatch-9sYDmuIo.mjs} +1 -1
- package/dist/.setup/{command-handlers-95-WVrcl.mjs → command-handlers-C-uyeN_H.mjs} +22 -22
- package/dist/.setup/{command-rpc-BDfCWgc_.mjs → command-rpc-BHE3OG7z.mjs} +11 -11
- package/dist/.setup/{compact-5zzFlH-W.mjs → compact-DsrYq-_j.mjs} +12 -12
- package/dist/.setup/{config-DKhXquav.mjs → config-DqmrqI23.mjs} +2 -2
- package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-DDhvIeUC.mjs} +1 -1
- package/dist/.setup/{conversation-binding-C-0jWdSo.mjs → conversation-binding-CfIcWNVS.mjs} +15 -15
- package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DlsG-dQu.mjs} +1 -1
- package/dist/.setup/{conversation-control-BEotI-gH.mjs → conversation-control-BWzVNh-v.mjs} +5 -5
- package/dist/.setup/{dynamic-tools-D3NAwGw3.mjs → dynamic-tools-CAWsGyFZ.mjs} +7 -7
- package/dist/.setup/{effective-mcp-catalog-C0DfQNYU.mjs → effective-mcp-catalog-BYzIV1DD.mjs} +4 -4
- package/dist/.setup/{ephemeral-turn-ksZ9NfsS.mjs → ephemeral-turn-CIcaAzR4.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-BmWQXFLV.mjs → event-projector-assistant-message-CDe3ohIy.mjs} +1 -1
- package/dist/.setup/{isolated-completion-Ci27cKqA.mjs → isolated-completion-DLV0kBu2.mjs} +6 -6
- package/dist/.setup/{managed-binary-B6hQ1UKR.mjs → managed-binary-Ckgvm_4V.mjs} +1 -1
- package/dist/.setup/{model-catalog-qzAfnHzR.mjs → model-catalog-CbhJ0pMa.mjs} +7 -7
- package/dist/.setup/{models-BbEE4EWS.mjs → models-DXVC1KpU.mjs} +3 -3
- package/dist/.setup/{native-auth-BN-BD2AV.mjs → native-auth-BNGz77PF.mjs} +3 -3
- package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-GOGINNw0.mjs} +116 -27
- package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-XHNn4k5q.mjs} +51 -14
- package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-Dna952zv.mjs} +2 -2
- package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-BwhIYgCZ.mjs} +2 -2
- package/dist/.setup/{node-exec-server.runtime-BS7jsvK-.mjs → node-exec-server.runtime-9IZtsOmo.mjs} +2 -2
- package/dist/.setup/{plan-DTyFfTkk.mjs → plan-BB5rf7qh.mjs} +5 -5
- package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BaDnJKJd.mjs} +2 -2
- package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-B4uqIw4J.mjs} +1 -1
- package/dist/.setup/{plugin-metadata-cache-Q4ZFn6UH.mjs → plugin-metadata-cache-DuaAXtXC.mjs} +7 -7
- package/dist/.setup/{provider-Cnr_icbk.mjs → provider-BEDFjTWv.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-ByhBukaD.mjs → provider-capabilities-DcF-V_3D.mjs} +2 -2
- package/dist/.setup/{request-DxKAfWyy.mjs → request-DZKa6YSy.mjs} +5 -5
- package/dist/.setup/{run-attempt-BZKhzSrb.mjs → run-attempt-EMGdmQqt.mjs} +75 -40
- package/dist/.setup/{runtime-artifact-D7lCXdhV.mjs → runtime-artifact-Riq878B2.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-Bjv8P6Sx.mjs} +2 -2
- package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-OIYEmTRF.mjs} +1 -1
- package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Fn7Ekzuv.mjs} +19 -4
- package/dist/.setup/{session-binding-record-Oe9L-CNY.mjs → session-binding-record-CUKpUKVm.mjs} +1 -1
- package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BuEALwJY.mjs} +1 -1
- package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-58bqOngU.mjs} +5 -5
- package/dist/.setup/{session-catalog-BaVqm4-Q.mjs → session-catalog-apN5C2Oz.mjs} +22 -22
- package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-BM9gCB82.mjs} +5 -5
- package/dist/.setup/{session-catalog-events-D9zC7gRb.mjs → session-catalog-events-DHPtqvWu.mjs} +3 -3
- package/dist/.setup/{session-catalog-index-CNKpHanP.mjs → session-catalog-index-JJogsGuf.mjs} +8 -8
- package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-DQhmgM3b.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-index-state-DhLoAnfy.mjs} +3 -3
- package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-bz5ZvjtY.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-CvtxrYSe.mjs → session-catalog-list-request-A1wN4sKw.mjs} +2 -2
- package/dist/.setup/{session-catalog-native-projection-DhId_sl8.mjs → session-catalog-native-projection-C_xvyztm.mjs} +4 -4
- package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-BdS7zDuY.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-XFJG3JGh.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-D9AP5D5o.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-CnEH565l.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-DcqN7DuI.mjs → session-catalog-projection-C6PSmTcX.mjs} +4 -4
- package/dist/.setup/{session-cli-TEVHpWaE.mjs → session-cli-B5RvT_Rs.mjs} +3 -3
- package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-tquj9DCz.mjs} +4 -4
- package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-DefAI1_5.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-7lM447LW.mjs} +1 -1
- package/dist/.setup/{session-retirement-CW0ciVbW.mjs → session-retirement-Bdygfnxa.mjs} +6 -6
- package/dist/.setup/{settled-turn-finalizer-DlPT87wW.mjs → settled-turn-finalizer-BzVjkwgJ.mjs} +7 -7
- package/dist/.setup/{shared-client-tOOyadmg.mjs → shared-client-B__jQti1.mjs} +44 -31
- package/dist/.setup/{shared-client-lifecycle-CJ0lYVCW.mjs → shared-client-lifecycle-wN_lOZkB.mjs} +24 -2
- package/dist/.setup/{side-question-BbnuMFTT.mjs → side-question-B25zswMS.mjs} +15 -15
- package/dist/.setup/{source-Cr8STZpF.mjs → source-DuNxTQoz.mjs} +4 -4
- package/dist/.setup/{thread-lifecycle-DcNw9n7E.mjs → thread-lifecycle-Cw5Nsciw.mjs} +13 -13
- package/dist/.setup/{thread-ownership-DDban_4i.mjs → thread-ownership-Cxb01Uwq.mjs} +4 -4
- package/dist/.setup/{thread-policy-TTAb-1yF.mjs → thread-policy-BHr4QsDO.mjs} +3 -3
- package/dist/.setup/{thread-requests-DmkmrGIt.mjs → thread-requests-D-GTNAnZ.mjs} +8 -8
- package/dist/.setup/{thread-resume-eo3IhOhh.mjs → thread-resume-BNdEFZpM.mjs} +5 -5
- package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BRNhyb1o.mjs} +1 -1
- package/dist/.setup/{transport-stdio-CbutOIEh.mjs → transport-stdio-DU8dIOCj.mjs} +1 -1
- package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zu3jRPnu.mjs} +1 -1
- package/dist/.setup/{upstream-session-fork-BbUNlJPZ.mjs → upstream-session-fork-D8rqW9ad.mjs} +14 -14
- package/dist/.setup/{usage-CDiI_zkr.mjs → usage-D_W8Be4u.mjs} +3 -3
- package/dist/.setup/{usage-limit-error-BLnJh1mB.mjs → usage-limit-error-CpasNGjp.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-B_E2kpZN.mjs → web-search-provider.runtime-CyRLuVOO.mjs} +2 -2
- package/dist/.source-module-urls/0560e3825cf513bbe9e095a85951c1215dfced0c1e581c5f32b007a3e759636e.json +1 -0
- package/dist/.source-module-urls/89af8e902f34481d87fbb497cd5ac223d504b1fa22d95d3038b6d33a3b97c3da.json +1 -0
- package/dist/api.js +3 -3
- package/dist/catalog-page.worker.js +338 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -5
- package/dist/harness.js +19 -19
- package/dist/index.js +52 -42
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/package.json +5 -5
- package/dist/.setup/client-catalog-response-B9pLl58Y.mjs +0 -285
|
@@ -3,8 +3,8 @@ import "./config-security-CE-FcGw9.mjs";
|
|
|
3
3
|
import "./config-parsing-b088LyhT.mjs";
|
|
4
4
|
import "./auth-start-options-BPIPeEX8.mjs";
|
|
5
5
|
import { c as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-CzyWLTJt.mjs";
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
7
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
|
|
7
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
8
8
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
9
9
|
import { execPolicy } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
10
10
|
import { resolveExecApprovalsFromFile } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as createCodexAppServerConfig } from "./config-options-CzyWLTJt.mjs";
|
|
2
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
2
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
3
3
|
import { resolveProviderIdForAuth } from "openclaw/plugin-sdk/provider-auth-aliases";
|
|
4
4
|
//#region extensions/codex/src/app-server/config-runtime.ts
|
|
5
5
|
var config_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import { h as CodexThreadDirectInputError, l as isCodexAppServerOverloadError, s as isCodexAppServerIndeterminateRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, x as assertCodexThreadStartResponse } from "./client-BdNoDUaQ.mjs";
|
|
1
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import { n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-
|
|
3
|
+
import { n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
|
|
3
4
|
import { m as readCodexRequirementsToml } from "./config-security-CE-FcGw9.mjs";
|
|
4
5
|
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
5
6
|
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-CzyWLTJt.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { o as resolveCodexDefaultWorkspaceDir } from "./conversation-binding-data-
|
|
7
|
+
import { u as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-wN_lOZkB.mjs";
|
|
8
|
+
import { o as resolveCodexDefaultWorkspaceDir } from "./conversation-binding-data-DlsG-dQu.mjs";
|
|
8
9
|
import { n as projectBoundedCodexVisibleSessionHistory } from "./transcript-history-projection-DRSifI-1.mjs";
|
|
9
|
-
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-
|
|
10
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
10
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DqmrqI23.mjs";
|
|
11
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
|
|
11
12
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
|
|
12
|
-
import { B as isCodexAppServerClientRuntimeLive, F as consumeCodexAppServerLiveThread, K as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease } from "./shared-client-
|
|
13
|
-
import { h as
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import { t as
|
|
19
|
-
import { a as
|
|
20
|
-
import {
|
|
21
|
-
import { u as trackCodexConversationActiveTurn } from "./conversation-control-BEotI-gH.mjs";
|
|
13
|
+
import { B as isCodexAppServerClientRuntimeLive, F as consumeCodexAppServerLiveThread, K as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease } from "./shared-client-B__jQti1.mjs";
|
|
14
|
+
import { c as isCodexAppServerUnsafeSubscriptionError, h as getCodexAppServerTurnRouter, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort, v as isCodexNotificationForTurn } from "./attempt-client-cleanup-C9dwStbK.mjs";
|
|
15
|
+
import { S as buildCodexProjectDocThreadConfig, St as mergeCodexThreadConfigs, g as CODEX_NATIVE_PERSONALITY_NONE, v as resolveCodexAppServerRequestModelSelection, vt as buildDisabledAppsConfigPatch } from "./thread-requests-D-GTNAnZ.mjs";
|
|
16
|
+
import "./thread-lifecycle-Cw5Nsciw.mjs";
|
|
17
|
+
import "./session-binding-Fn7Ekzuv.mjs";
|
|
18
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-BNdEFZpM.mjs";
|
|
19
|
+
import { a as rollbackCodexAppServerBindingSubscription, c as withExclusiveCodexAppServerThread, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Cxb01Uwq.mjs";
|
|
20
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-7lM447LW.mjs";
|
|
21
|
+
import { u as trackCodexConversationActiveTurn } from "./conversation-control-BWzVNh-v.mjs";
|
|
22
22
|
import { asOptionalRecord, normalizeOptionalString, readNonEmptyStringPreservingWhitespace } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
23
23
|
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
24
24
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import process from "node:process";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as isCodexFastServiceTier } from "./config-utils-D0CXecki.mjs";
|
|
2
|
-
import { r as bindingStoreKey } from "./session-binding-record-
|
|
2
|
+
import { r as bindingStoreKey } from "./session-binding-record-CUKpUKVm.mjs";
|
|
3
3
|
import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
|
|
4
|
-
import "./config-
|
|
4
|
+
import "./config-DqmrqI23.mjs";
|
|
5
5
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
|
|
6
|
-
import { b as resolveCodexBindingModelProviderFallback, v as resolveCodexAppServerRequestModelSelection } from "./thread-requests-
|
|
7
|
-
import "./thread-lifecycle-
|
|
8
|
-
import "./session-binding-
|
|
6
|
+
import { b as resolveCodexBindingModelProviderFallback, v as resolveCodexAppServerRequestModelSelection } from "./thread-requests-D-GTNAnZ.mjs";
|
|
7
|
+
import "./thread-lifecycle-Cw5Nsciw.mjs";
|
|
8
|
+
import "./session-binding-Fn7Ekzuv.mjs";
|
|
9
9
|
import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
10
10
|
import { getSessionEntry, patchSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
11
11
|
import { ModelSelectionLockedError, applyModelOverrideWithAuthProfileCompatibility } from "openclaw/plugin-sdk/model-session-runtime";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "../native-tool-policy.js";
|
|
2
|
+
import { B as resolveCodexToolAbortTerminalReason, E as readCodexTurnCompletedNotification, H as failedToolResult, V as createFailedDynamicToolResponse, k as createCodexElicitationResponse, m as CodexServerRequestResolvedError } from "./client-BdNoDUaQ.mjs";
|
|
2
3
|
import { i as isJsonObject, r as flattenCodexDynamicToolFunctions, t as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE } from "./protocol-CANUwXJ3.mjs";
|
|
3
4
|
import { d as readCodexPluginConfig, l as isCodexRemoteExecPlacementSandbox } from "./config-parsing-b088LyhT.mjs";
|
|
4
5
|
import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
|
|
5
6
|
import { s as readItem } from "./event-projector-values-DJSz8BTk.mjs";
|
|
6
7
|
import { s as codexAppIdentityKey } from "./plugin-app-cache-key-BL9B5H0L.mjs";
|
|
7
|
-
import "./config-
|
|
8
|
+
import "./config-DqmrqI23.mjs";
|
|
8
9
|
import { i as sanitizeInlineImageDataUrl, r as invalidInlineImageText } from "./session-history-read-Ov3StuL4.mjs";
|
|
9
|
-
import { W as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent } from "./shared-client-
|
|
10
|
+
import { W as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent } from "./shared-client-B__jQti1.mjs";
|
|
10
11
|
import { a as isCodexResponsesOAuthRun } from "./responses-oauth-twnuTaAa.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { _ as waitForPluginApprovalDecision, d as mapExecDecisionToOutcome, f as requestPluginApproval, g as truncateCodexApprovalDisplayText, h as stripDanglingCodexApprovalTerminalSequence, l as approvalRequestExplicitlyUnavailable, m as sanitizeCodexApprovalVisibleText, p as requestPluginApprovalOutcome, u as codexApprovalTimeoutText } from "./native-subagent-monitor-B9aAqfnU.mjs";
|
|
12
|
+
import { A as itemStatus, C as auditNativeToolUnfinishedStatus, N as shouldClearTerminalPresentationForNativeItem, S as auditNativeToolTerminalStatus, b as readCodexNotificationTurnId, k as itemName, v as isCodexNotificationForTurn, x as auditNativeToolName, y as readCodexNotificationThreadId } from "./attempt-client-cleanup-C9dwStbK.mjs";
|
|
13
|
+
import { ct as isForcedPrivateQaCodexRuntime, dt as normalizeCodexDynamicToolName, j as emitCodexNativePreToolUseFailureDiagnostic, ot as filterCodexDynamicTools, p as resolveCodexWebSearchPlan, st as filterCodexDynamicToolsForDisabledNativeSurface, ut as isSystemAgentOnlyCodexDynamicToolAllowlist } from "./thread-requests-D-GTNAnZ.mjs";
|
|
14
|
+
import { _ as waitForPluginApprovalDecision, d as mapExecDecisionToOutcome, f as requestPluginApproval, g as truncateCodexApprovalDisplayText, h as stripDanglingCodexApprovalTerminalSequence, l as approvalRequestExplicitlyUnavailable, m as sanitizeCodexApprovalVisibleText, p as requestPluginApprovalOutcome, u as codexApprovalTimeoutText } from "./native-subagent-monitor-GOGINNw0.mjs";
|
|
15
15
|
import { n as resolveCodexNativeExecutionPolicy, r as resolveCodexNodeExecToolOverrides } from "./native-execution-policy-BxZJy5mP.mjs";
|
|
16
|
-
import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, d as isCodexDynamicToolExcluded, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as createSandboxExecProjection, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection, u as createSandboxProcessProjection } from "./provider-capabilities-
|
|
16
|
+
import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, d as isCodexDynamicToolExcluded, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as createSandboxExecProjection, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection, u as createSandboxProcessProjection } from "./provider-capabilities-DcF-V_3D.mjs";
|
|
17
17
|
import { createRequire } from "node:module";
|
|
18
18
|
import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeTrimmedStringList, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
19
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/.setup/{effective-mcp-catalog-C0DfQNYU.mjs → effective-mcp-catalog-BYzIV1DD.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { v as sessionBindingIdentity } from "./session-binding-record-
|
|
2
|
-
import {
|
|
3
|
-
import "./shared-client-
|
|
4
|
-
import "./session-binding-
|
|
1
|
+
import { v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
|
|
2
|
+
import { u as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-wN_lOZkB.mjs";
|
|
3
|
+
import "./shared-client-B__jQti1.mjs";
|
|
4
|
+
import "./session-binding-Fn7Ekzuv.mjs";
|
|
5
5
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
7
7
|
//#region extensions/codex/src/app-server/effective-mcp-catalog.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { E as readCodexTurnCompletedNotification } from "./client-BdNoDUaQ.mjs";
|
|
1
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { h as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-93r-CLTi.mjs";
|
|
3
|
+
import { h as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-C9dwStbK.mjs";
|
|
4
4
|
import { o as isTerminalTurnStatus, s as readCodexNotificationItem, t as CodexUsageProjection } from "./event-projector-usage-03R0I2dM.mjs";
|
|
5
5
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as codexProviderRefusalDiagnostics } from "./event-projector-values-DJSz8BTk.mjs";
|
|
2
|
-
import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-
|
|
2
|
+
import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-GOGINNw0.mjs";
|
|
3
3
|
import { createAgentHarnessAssistantMessage } from "openclaw/plugin-sdk/agent-harness-attempt-runtime";
|
|
4
4
|
//#region extensions/codex/src/app-server/event-projector-assistant-message.ts
|
|
5
5
|
function createAssistantMessage(params, text, options) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { _ as assertCodexPassiveTurnItems } from "./client-BdNoDUaQ.mjs";
|
|
1
2
|
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
2
3
|
import { i as resolveCodexAppServerHomeScope } from "./config-options-CzyWLTJt.mjs";
|
|
3
|
-
import "./config-
|
|
4
|
-
import { rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BmWQXFLV.mjs";
|
|
4
|
+
import "./config-DqmrqI23.mjs";
|
|
5
|
+
import { rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-B__jQti1.mjs";
|
|
6
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-Csc9Qvpm.mjs";
|
|
7
|
+
import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-Ce-oOk-D.mjs";
|
|
8
|
+
import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-CDe3ohIy.mjs";
|
|
9
9
|
//#region extensions/codex/src/app-server/isolated-completion.ts
|
|
10
10
|
/** Runs prompt-only Codex inference on an ephemeral, ring-zero native thread. */
|
|
11
11
|
async function runCodexIsolatedCompletion(params, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { constants, existsSync, realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as buildCodexRuntimeModelParams } from "./model-runtime-BdqzOMkU.mjs";
|
|
2
|
+
import { s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-BdNoDUaQ.mjs";
|
|
2
3
|
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
3
4
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { o as withCodexAppServerJsonClient } from "./request-
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
5
|
+
import { f as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-lifecycle-wN_lOZkB.mjs";
|
|
6
|
+
import { o as withCodexAppServerJsonClient } from "./request-DZKa6YSy.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
|
|
7
8
|
import { a as resolveCodexAppServerAuthProfileStore, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-B0okYl2D.mjs";
|
|
8
|
-
import { r as captureSharedCodexAppServerCatalogLifetime } from "./shared-client-
|
|
9
|
+
import { r as captureSharedCodexAppServerCatalogLifetime } from "./shared-client-B__jQti1.mjs";
|
|
9
10
|
import { i as isCodexResponsesOAuthCredential } from "./responses-oauth-twnuTaAa.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { probeCodexNativeAuth } from "./native-auth-BN-BD2AV.mjs";
|
|
11
|
+
import { n as listAllCodexAppServerModels } from "./models-DXVC1KpU.mjs";
|
|
12
|
+
import { probeCodexNativeAuth } from "./native-auth-BNGz77PF.mjs";
|
|
13
13
|
//#region extensions/codex/src/app-server/model-catalog.ts
|
|
14
14
|
const INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
15
15
|
"text",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as assertCodexModelListResponse } from "./client-
|
|
1
|
+
import { g as assertCodexModelListResponse } from "./client-BdNoDUaQ.mjs";
|
|
2
2
|
import { normalizeOptionalString, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/codex/src/app-server/models.ts
|
|
4
4
|
const DEFAULT_MODEL_DISCOVERY_TIMEOUT_MS = 1e4;
|
|
@@ -32,8 +32,8 @@ async function withCodexAppServerModelRequest(options, run) {
|
|
|
32
32
|
if (options.request) return await run(options.request);
|
|
33
33
|
const timeoutMs = options.timeoutMs ?? 1e4;
|
|
34
34
|
const useSharedClient = options.sharedClient !== false;
|
|
35
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-
|
|
36
|
-
const { requestCodexAppServerClientJson } = await import("./request-
|
|
35
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-B__jQti1.mjs").then((n) => n.v);
|
|
36
|
+
const { requestCodexAppServerClientJson } = await import("./request-DZKa6YSy.mjs").then((n) => n.a);
|
|
37
37
|
const client = await (useSharedClient ? getLeasedSharedCodexAppServerClient : createIsolatedCodexAppServerClient)({
|
|
38
38
|
startOptions: options.startOptions,
|
|
39
39
|
timeoutMs,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
2
2
|
import { n as isCodexAppServerProxyLaunch, t as buildCodexLoginStatusArgs } from "./launch-args-DbFCehO7.mjs";
|
|
3
|
-
import { r as resolveManagedCodexAppServerStartOptions } from "./managed-binary-
|
|
4
|
-
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-
|
|
5
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
3
|
+
import { r as resolveManagedCodexAppServerStartOptions } from "./managed-binary-Ckgvm_4V.mjs";
|
|
4
|
+
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-DU8dIOCj.mjs";
|
|
5
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
|
|
6
6
|
import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
7
7
|
import { materializeWindowsSpawnProgram, resolveWindowsSpawnProgram } from "openclaw/plugin-sdk/windows-spawn";
|
|
8
8
|
//#region extensions/codex/src/app-server/native-auth.ts
|
package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-GOGINNw0.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as codexNativeSubagentRunId, d as readNativeSubagentThreadIds, f as readThreadParentThreadId, l as normalizeIdentifier, m as assertHistoryOwnerMatchesRegistration, p as readThreadSpawnSource, t as matchesNativeAssignmentLifecycle, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-
|
|
1
|
+
import { c as codexNativeSubagentRunId, d as readNativeSubagentThreadIds, f as readThreadParentThreadId, l as normalizeIdentifier, m as assertHistoryOwnerMatchesRegistration, p as readThreadSpawnSource, t as matchesNativeAssignmentLifecycle, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
|
|
2
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
3
3
|
import { c as readNonEmptyString, o as readHookOutputEntries, r as normalizeOptionalString$1, s as readItem, u as readNullableString } from "./event-projector-values-DJSz8BTk.mjs";
|
|
4
4
|
import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
|
|
5
5
|
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-D83lJWHG.mjs";
|
|
6
|
-
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, ht as resolveCodexGatewayTimeoutWithGraceMs, q as retainCodexAppServerLiveThread } from "./shared-client-
|
|
7
|
-
import { A as itemStatus, D as isSideEffectingNativeToolItem, E as isProjectedNativeToolItem, M as matchesCodexSnapshotTurn, O as itemKind, P as unknownItemStatus, S as auditNativeToolTerminalStatus, T as isNonSuccessItemStatus, j as itemTitle, k as itemName, s as interruptCodexTurnAndWaitBestEffort, w as isMutatingNativeToolItem, x as auditNativeToolName } from "./attempt-client-cleanup-
|
|
8
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
6
|
+
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, ht as resolveCodexGatewayTimeoutWithGraceMs, q as retainCodexAppServerLiveThread } from "./shared-client-B__jQti1.mjs";
|
|
7
|
+
import { A as itemStatus, D as isSideEffectingNativeToolItem, E as isProjectedNativeToolItem, M as matchesCodexSnapshotTurn, O as itemKind, P as unknownItemStatus, S as auditNativeToolTerminalStatus, T as isNonSuccessItemStatus, j as itemTitle, k as itemName, s as interruptCodexTurnAndWaitBestEffort, w as isMutatingNativeToolItem, x as auditNativeToolName } from "./attempt-client-cleanup-C9dwStbK.mjs";
|
|
8
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
9
9
|
import { asFiniteNumber, asNonArrayRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -560,6 +560,7 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
560
560
|
this.dependencies = dependencies;
|
|
561
561
|
this.writes = /* @__PURE__ */ new Map();
|
|
562
562
|
this.snapshots = /* @__PURE__ */ new WeakMap();
|
|
563
|
+
this.acknowledged = /* @__PURE__ */ new WeakSet();
|
|
563
564
|
}
|
|
564
565
|
hasWrites(state) {
|
|
565
566
|
return this.writes.has(state);
|
|
@@ -597,7 +598,7 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
597
598
|
}
|
|
598
599
|
record(state, child) {
|
|
599
600
|
const assignment = this.fact(child);
|
|
600
|
-
if (!assignment || !state.assignmentStore || child.nativeCompletionDelivered || child.subscriptionClosed) return;
|
|
601
|
+
if (!assignment || !state.assignmentStore || child.nativeCompletionDelivered || child.completionDeliveryAbandoned || child.subscriptionClosed) return;
|
|
601
602
|
const snapshot = JSON.stringify(assignment);
|
|
602
603
|
if (this.snapshots.get(child) === snapshot) return;
|
|
603
604
|
this.snapshots.set(child, snapshot);
|
|
@@ -612,11 +613,46 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
612
613
|
}
|
|
613
614
|
settle(state, child) {
|
|
614
615
|
const assignment = this.fact(child);
|
|
615
|
-
if (!assignment || !state.assignmentStore || !child.nativeCompletionDelivered && (!child.subscriptionClosed || child.pendingCompletion)) return;
|
|
616
|
+
if (!assignment || !state.assignmentStore || this.acknowledged.has(child) || !child.nativeCompletionDelivered && (!child.subscriptionClosed || child.pendingCompletion)) return;
|
|
616
617
|
this.enqueue(state, async () => {
|
|
617
618
|
await state.assignmentStore?.consume(assignment, () => this.dependencies.assertCurrent(state));
|
|
618
619
|
});
|
|
619
620
|
}
|
|
621
|
+
abandon(state, child, assertCurrent) {
|
|
622
|
+
return this.enqueue(state, async () => {
|
|
623
|
+
const assignment = this.fact(child);
|
|
624
|
+
if (!assignment || !state.assignmentStore || !child.pendingCompletion) return;
|
|
625
|
+
if (!await state.assignmentStore.consume(assignment, () => {
|
|
626
|
+
this.dependencies.assertCurrent(state);
|
|
627
|
+
assertCurrent();
|
|
628
|
+
}, { status: child.pendingCompletion.status })) throw new Error("Undeliverable native assignment was not retired.");
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
async settleNestedCompletion(state, child, assertCurrent) {
|
|
632
|
+
const owner = child.historyOwner;
|
|
633
|
+
if (!owner || owner.parentThreadId === child.nativeParentThreadId || !await this.dependencies.isNativeChildThread(child.nativeParentThreadId)) return false;
|
|
634
|
+
await this.acknowledge(state, child, () => {
|
|
635
|
+
assertCurrent();
|
|
636
|
+
assertHistoryOwnerMatchesRegistration(owner, state.historyOwner, owner.parentThreadId, true);
|
|
637
|
+
});
|
|
638
|
+
child.nativeCompletionDelivered = true;
|
|
639
|
+
child.pendingCompletion = void 0;
|
|
640
|
+
return true;
|
|
641
|
+
}
|
|
642
|
+
acknowledge(state, child, assertCurrent) {
|
|
643
|
+
return this.enqueue(state, async () => {
|
|
644
|
+
const assertAdmission = () => {
|
|
645
|
+
this.dependencies.assertCurrent(state);
|
|
646
|
+
assertCurrent();
|
|
647
|
+
};
|
|
648
|
+
assertAdmission();
|
|
649
|
+
const assignment = this.fact(child);
|
|
650
|
+
if (!assignment || !state.assignmentStore || this.acknowledged.has(child)) return;
|
|
651
|
+
if (!await state.assignmentStore.consume(assignment, assertAdmission)) throw new Error("Native assignment was not acknowledged.");
|
|
652
|
+
this.acknowledged.add(child);
|
|
653
|
+
assertAdmission();
|
|
654
|
+
});
|
|
655
|
+
}
|
|
620
656
|
async restore(state, owner) {
|
|
621
657
|
const store = state.assignmentStore;
|
|
622
658
|
const current = state.historyOwner;
|
|
@@ -628,11 +664,15 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
628
664
|
for (const assignment of store.read()) {
|
|
629
665
|
if (!matchesNativeAssignmentLifecycle(assignment.owner, current)) continue;
|
|
630
666
|
const recovery = await this.dependencies.readHistory(assignment);
|
|
667
|
+
const pending = store.read();
|
|
631
668
|
if (!this.dependencies.isCurrent(state) || !custody.isCurrent()) return;
|
|
632
669
|
store.assertCurrent();
|
|
633
670
|
if (!recovery || recovery.parentThreadId !== assignment.nativeParentThreadId) continue;
|
|
634
|
-
|
|
635
|
-
|
|
671
|
+
const surviving = pending.find((entry) => entry.childThreadId === assignment.childThreadId && entry.nativeParentThreadId === assignment.nativeParentThreadId && matchesNativeAssignmentLifecycle(entry.owner, assignment.owner) && (entry.nativeTurnId === assignment.nativeTurnId && (entry.nativeTurnId !== void 0 || entry.runId === assignment.runId) || recovery.nativeTurnId !== void 0 && entry.nativeTurnId === recovery.nativeTurnId && (assignment.nativeTurnId === void 0 || entry.runId === assignment.runId)));
|
|
672
|
+
if (surviving) {
|
|
673
|
+
await this.dependencies.restore(state, surviving, recovery, custody);
|
|
674
|
+
await this.drain(state);
|
|
675
|
+
}
|
|
636
676
|
}
|
|
637
677
|
} catch (error) {
|
|
638
678
|
embeddedAgentLog.warn("Native pending assignments remain for reconciliation", { error: formatErrorMessage$1(error) });
|
|
@@ -993,7 +1033,18 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
993
1033
|
childState.deliveringCompletion = true;
|
|
994
1034
|
let deferredToForeground = false;
|
|
995
1035
|
try {
|
|
1036
|
+
if (await this.dependencies.settleNestedCompletion(state, childState, () => {
|
|
1037
|
+
if (!this.isCurrent(state, childState) || childState.completionCustody && !childState.completionCustody.isCurrent()) throw new Error("Native completion acknowledgement is no longer current.");
|
|
1038
|
+
})) {
|
|
1039
|
+
this.dependencies.unregisterChild(childState);
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
if (!this.isCurrent(state, childState)) return;
|
|
996
1043
|
if (!this.prepareDelivery(state, childState)) return;
|
|
1044
|
+
if (childState.completionDeliveryAbandoned) {
|
|
1045
|
+
await this.abandon(state, childState);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
997
1048
|
if (state.owners.size > 0 || !state.completionScope) {
|
|
998
1049
|
deferredToForeground = state.owners.size > 0;
|
|
999
1050
|
return;
|
|
@@ -1028,15 +1079,15 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1028
1079
|
return;
|
|
1029
1080
|
}
|
|
1030
1081
|
if (delivery.recoveryBlocked) {
|
|
1031
|
-
this.
|
|
1082
|
+
await this.abandon(state, childState);
|
|
1032
1083
|
return;
|
|
1033
1084
|
}
|
|
1034
1085
|
if (delivery.recoveryPending) {
|
|
1035
|
-
this.scheduleRetry(childState, delivery.error ?? "requester recovery owns completion", false);
|
|
1086
|
+
await this.scheduleRetry(state, childState, delivery.error ?? "requester recovery owns completion", false);
|
|
1036
1087
|
return;
|
|
1037
1088
|
}
|
|
1038
1089
|
const error = delivery.error ?? "completion delivery did not produce a parent response";
|
|
1039
|
-
this.scheduleRetry(childState, error);
|
|
1090
|
+
await this.scheduleRetry(state, childState, error);
|
|
1040
1091
|
} catch (error) {
|
|
1041
1092
|
if (!this.dependencies.isCurrentChild(childState) || !this.dependencies.isCurrentParent(state) || this.dependencies.isRetiredParent(state)) return;
|
|
1042
1093
|
if (!this.claim(state, childState)) {
|
|
@@ -1044,7 +1095,7 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1044
1095
|
return;
|
|
1045
1096
|
}
|
|
1046
1097
|
const message = formatErrorMessage$1(error);
|
|
1047
|
-
this.scheduleRetry(childState, message);
|
|
1098
|
+
await this.scheduleRetry(state, childState, message, !childState.completionDeliveryAbandoned);
|
|
1048
1099
|
embeddedAgentLog.warn("Failed to deliver Codex native subagent completion", {
|
|
1049
1100
|
parentThreadId: state.parentThreadId,
|
|
1050
1101
|
childThreadId: completion.childThreadId,
|
|
@@ -1107,22 +1158,41 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1107
1158
|
this.dependencies.releaseClientRetentionIfIdle();
|
|
1108
1159
|
return true;
|
|
1109
1160
|
}
|
|
1110
|
-
|
|
1161
|
+
async abandon(state, child) {
|
|
1162
|
+
child.completionDeliveryAbandoned = true;
|
|
1163
|
+
try {
|
|
1164
|
+
await this.dependencies.abandon(state, child, () => {
|
|
1165
|
+
if (child.nativeCompletionDelivered || !this.isCurrent(state, child) || !this.claim(state, child)) throw new Error("Native completion retirement is no longer current.");
|
|
1166
|
+
});
|
|
1167
|
+
this.dependencies.unregisterChild(child);
|
|
1168
|
+
} catch (error) {
|
|
1169
|
+
if (this.isCurrent(state, child) && child.nativeCompletionDelivered) {
|
|
1170
|
+
this.prepareDelivery(state, child);
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
embeddedAgentLog.warn("Native completion retirement remains pending", {
|
|
1174
|
+
childThreadId: child.childThreadId,
|
|
1175
|
+
error: formatErrorMessage$1(error)
|
|
1176
|
+
});
|
|
1177
|
+
await this.scheduleRetry(state, child, formatErrorMessage$1(error), false);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
async scheduleRetry(state, childState, error, chargeAttempt = true) {
|
|
1111
1181
|
if (!childState.pendingCompletion || childState.completionDeliveryTimer || !this.dependencies.isCurrentChild(childState)) return;
|
|
1112
1182
|
if (chargeAttempt && childState.completionDeliveryAttempt >= this.maxRetries) {
|
|
1113
1183
|
embeddedAgentLog.warn("Native subagent completion retries exhausted", {
|
|
1114
1184
|
childThreadId: childState.childThreadId,
|
|
1115
1185
|
error
|
|
1116
1186
|
});
|
|
1117
|
-
this.
|
|
1187
|
+
await this.abandon(state, childState);
|
|
1118
1188
|
return;
|
|
1119
1189
|
}
|
|
1120
1190
|
const delayMs = delayForAttempt(this.retryDelaysMs, chargeAttempt ? childState.completionDeliveryAttempt++ : childState.completionDeliveryAttempt);
|
|
1121
1191
|
childState.completionDeliveryTimer = setTimeout(() => {
|
|
1122
1192
|
childState.completionDeliveryTimer = void 0;
|
|
1123
1193
|
if (!this.dependencies.isCurrentChild(childState)) return;
|
|
1124
|
-
const
|
|
1125
|
-
if (
|
|
1194
|
+
const currentParent = this.dependencies.getParent(childState.parentThreadId);
|
|
1195
|
+
if (currentParent) this.deliverPending(currentParent, childState);
|
|
1126
1196
|
}, delayMs);
|
|
1127
1197
|
childState.completionDeliveryTimer.unref();
|
|
1128
1198
|
}
|
|
@@ -1130,7 +1200,7 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1130
1200
|
if (childState.completionCustody && !childState.completionCustody.isCurrent()) return false;
|
|
1131
1201
|
const requesterSessionKey = state.requesterSessionKey?.trim();
|
|
1132
1202
|
if (!requesterSessionKey) return true;
|
|
1133
|
-
const key = `${requesterSessionKey}\0${childState.runId}`;
|
|
1203
|
+
const key = childState.deliveryOwnerKey ?? `${requesterSessionKey}\0${childState.nativeTurnId ? codexNativeSubagentRunId(childState.childThreadId, childState.nativeTurnId) : childState.runId}`;
|
|
1134
1204
|
try {
|
|
1135
1205
|
state.assignmentStore?.assertCurrent();
|
|
1136
1206
|
assertHistoryOwnerMatchesRegistration(childState.historyOwner, state.historyOwner, childState.nativeParentThreadId, state.historyOwner !== void 0);
|
|
@@ -1408,6 +1478,10 @@ var CodexNativeSubagentHistoryRecovery = class {
|
|
|
1408
1478
|
itemsView: "full"
|
|
1409
1479
|
}, { timeoutMs: THREAD_READ_TIMEOUT_MS });
|
|
1410
1480
|
}
|
|
1481
|
+
async isNativeChildThread(threadId) {
|
|
1482
|
+
const response = await this.requestThreadRead(threadId, false);
|
|
1483
|
+
return response.thread.id === threadId && Boolean(readThreadParentThreadId(response.thread));
|
|
1484
|
+
}
|
|
1411
1485
|
async read(assignment, options) {
|
|
1412
1486
|
const { childThreadId } = assignment;
|
|
1413
1487
|
const { recordedCompletion } = options;
|
|
@@ -2633,6 +2707,7 @@ var CodexNativeSubagentSubmissionOwner = class {
|
|
|
2633
2707
|
if (!this.isObserving(state, custody) || !this.admitTurn(state, custody.receipt, turn, custody.owner, historyValidated, custody.completionCustody)) return;
|
|
2634
2708
|
custody.phase = "promoting";
|
|
2635
2709
|
if (custody.timer) clearTimeout(custody.timer);
|
|
2710
|
+
custody.release();
|
|
2636
2711
|
}
|
|
2637
2712
|
settleChild(state, child) {
|
|
2638
2713
|
for (const custody of this.pending.get(state)?.values() ?? []) {
|
|
@@ -4582,6 +4657,8 @@ var Monitor = class {
|
|
|
4582
4657
|
isRetiredParent: (state) => this.retiredParentStates.has(state),
|
|
4583
4658
|
getParent: (id) => this.parentStates.get(id),
|
|
4584
4659
|
unregisterChild: (child) => this.unregisterChild(child),
|
|
4660
|
+
abandon: (state, child, assertCurrent) => this.assignments.abandon(state, child, assertCurrent),
|
|
4661
|
+
settleNestedCompletion: (state, child, assertCurrent) => this.assignments.settleNestedCompletion(state, child, assertCurrent),
|
|
4585
4662
|
releaseClientRetentionIfIdle: () => this.releaseClientRetentionIfIdle()
|
|
4586
4663
|
});
|
|
4587
4664
|
this.turnObservation = new CodexNativeSubagentTurnObservation({
|
|
@@ -4697,8 +4774,9 @@ var Monitor = class {
|
|
|
4697
4774
|
revision.release();
|
|
4698
4775
|
}
|
|
4699
4776
|
},
|
|
4777
|
+
isNativeChildThread: async (threadId) => this.knownChildren.has(threadId) || await this.historyRecovery.isNativeChildThread(threadId),
|
|
4700
4778
|
restore: async (state, assignment, recovery, custody) => {
|
|
4701
|
-
const existing = this.childStates.get(assignment.runId);
|
|
4779
|
+
const existing = this.childStates.get(assignment.runId) ?? [...this.childStates.values()].find((child) => assignment.nativeTurnId !== void 0 && child.childThreadId === assignment.childThreadId && child.nativeTurnId === assignment.nativeTurnId && child.nativeParentThreadId === assignment.nativeParentThreadId && child.historyOwner !== void 0 && matchesNativeAssignmentLifecycle(child.historyOwner, assignment.owner));
|
|
4702
4780
|
if (existing) {
|
|
4703
4781
|
const original = this.parentStates.get(existing.parentThreadId);
|
|
4704
4782
|
if (original && original.requesterSessionKey === state.requesterSessionKey && original.historyOwner && state.historyOwner && matchesNativeAssignmentLifecycle(original.historyOwner, state.historyOwner)) original.assignmentStore = state.assignmentStore;
|
|
@@ -4845,6 +4923,9 @@ var Monitor = class {
|
|
|
4845
4923
|
});
|
|
4846
4924
|
if (!capture) return;
|
|
4847
4925
|
try {
|
|
4926
|
+
const known = this.knownChildren.get(request.threadId);
|
|
4927
|
+
const child = known ? this.admitFollowupChild(known, request.threadId) : void 0;
|
|
4928
|
+
if (child?.nativeTurnId === request.turnId && child.settledWithoutCompletion) this.resumeChild(child);
|
|
4848
4929
|
await this.persistModelAssignment(request, capture);
|
|
4849
4930
|
request.signal?.throwIfAborted();
|
|
4850
4931
|
capture.assertCurrent();
|
|
@@ -5018,6 +5099,7 @@ var Monitor = class {
|
|
|
5018
5099
|
childState.settledWithoutCompletion = false;
|
|
5019
5100
|
childState.fallbackCompletion = void 0;
|
|
5020
5101
|
this.releaseClientRetention ??= this.retainClient?.();
|
|
5102
|
+
this.retainParentThreadForChild(childState.parentThreadId);
|
|
5021
5103
|
}
|
|
5022
5104
|
settleResumableChild(childState) {
|
|
5023
5105
|
if (childState.terminal) return;
|
|
@@ -5028,6 +5110,7 @@ var Monitor = class {
|
|
|
5028
5110
|
releaseNativeDirectChild(childState);
|
|
5029
5111
|
releaseNativeModelExecution(childState);
|
|
5030
5112
|
this.recovery.clearRecoveryTimers(childState);
|
|
5113
|
+
this.releaseParentThreadIfChildrenSettled(childState.parentThreadId);
|
|
5031
5114
|
this.releaseClientRetentionIfIdle();
|
|
5032
5115
|
}
|
|
5033
5116
|
async handleChildTurnCompletion(notification, childState) {
|
|
@@ -5201,6 +5284,7 @@ var Monitor = class {
|
|
|
5201
5284
|
this.recovery.markTerminalRevision(childState.childThreadId);
|
|
5202
5285
|
releaseNativeDirectChild(childState);
|
|
5203
5286
|
this.recovery.clearRecoveryTimers(childState);
|
|
5287
|
+
this.releaseParentThreadIfChildrenSettled(state.parentThreadId);
|
|
5204
5288
|
this.applyNativeReceipts(state, childState.deliveryReceipts.record(childState.runId, this.knownChildren.get(childState.childThreadId)?.agentPaths ?? [childState.childThreadId], acceptedCompletion.result));
|
|
5205
5289
|
await this.completionDelivery.deliverPending(state, childState);
|
|
5206
5290
|
}
|
|
@@ -5260,10 +5344,7 @@ var Monitor = class {
|
|
|
5260
5344
|
if (!childState) {
|
|
5261
5345
|
this.updateChildThreadOwnership("claim", childThreadId, this.claimChildThread);
|
|
5262
5346
|
this.releaseClientRetention ??= this.retainClient?.();
|
|
5263
|
-
|
|
5264
|
-
const releaseParentThread = this.retainParentThread?.(parentThreadId);
|
|
5265
|
-
if (releaseParentThread) this.parentThreadRetentions.set(parentThreadId, releaseParentThread);
|
|
5266
|
-
}
|
|
5347
|
+
this.retainParentThreadForChild(parentThreadId);
|
|
5267
5348
|
childState = {
|
|
5268
5349
|
runId,
|
|
5269
5350
|
nativeTurnId: assignment.nativeTurnId,
|
|
@@ -5482,6 +5563,7 @@ var Monitor = class {
|
|
|
5482
5563
|
}
|
|
5483
5564
|
if (!transitioned) claimOwner.onDirectChildAccepted?.();
|
|
5484
5565
|
}
|
|
5566
|
+
this.observeActiveChild(child);
|
|
5485
5567
|
this.admissionCustody.bindEventSink(child);
|
|
5486
5568
|
return child;
|
|
5487
5569
|
}
|
|
@@ -5536,11 +5618,7 @@ var Monitor = class {
|
|
|
5536
5618
|
this.recovery.clearRecoveryTimers(childState);
|
|
5537
5619
|
this.completionDelivery.release(childState);
|
|
5538
5620
|
if (this.childStates.get(childState.runId) === childState) this.childStates.delete(childState.runId);
|
|
5539
|
-
|
|
5540
|
-
const releaseParentThread = this.parentThreadRetentions.get(childState.parentThreadId);
|
|
5541
|
-
this.parentThreadRetentions.delete(childState.parentThreadId);
|
|
5542
|
-
releaseParentThread?.();
|
|
5543
|
-
}
|
|
5621
|
+
this.releaseParentThreadIfChildrenSettled(childState.parentThreadId);
|
|
5544
5622
|
this.recovery.collectThreadStatusRevision(childState.childThreadId);
|
|
5545
5623
|
this.releaseClientRetentionIfIdle();
|
|
5546
5624
|
const state = this.parentStates.get(childState.parentThreadId);
|
|
@@ -5565,6 +5643,17 @@ var Monitor = class {
|
|
|
5565
5643
|
});
|
|
5566
5644
|
});
|
|
5567
5645
|
}
|
|
5646
|
+
retainParentThreadForChild(parentThreadId) {
|
|
5647
|
+
if (this.parentThreadRetentions.has(parentThreadId)) return;
|
|
5648
|
+
const releaseParentThread = this.retainParentThread?.(parentThreadId);
|
|
5649
|
+
if (releaseParentThread) this.parentThreadRetentions.set(parentThreadId, releaseParentThread);
|
|
5650
|
+
}
|
|
5651
|
+
releaseParentThreadIfChildrenSettled(parentThreadId) {
|
|
5652
|
+
for (const childState of this.childStates.values()) if (childState.parentThreadId === parentThreadId && !childState.terminal && !childState.settledWithoutCompletion) return;
|
|
5653
|
+
const releaseParentThread = this.parentThreadRetentions.get(parentThreadId);
|
|
5654
|
+
this.parentThreadRetentions.delete(parentThreadId);
|
|
5655
|
+
releaseParentThread?.();
|
|
5656
|
+
}
|
|
5568
5657
|
releaseClientRetentionIfIdle() {
|
|
5569
5658
|
if ([...this.childStates.values()].some((childState) => !childState.terminal && !childState.settledWithoutCompletion)) return;
|
|
5570
5659
|
this.releaseRetainedClient();
|