@openclaw/codex 2026.8.1 → 2026.8.33
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/{attempt-client-cleanup-CVPvp9dL.js → .setup/attempt-client-cleanup-FBnDjmtX.mjs} +1 -1
- package/dist/{auth-binding-Ds_QVm-X.js → .setup/auth-binding-oyIUSaFi.mjs} +1 -1
- package/dist/{binding-connection-CCQFs8lf.js → .setup/binding-connection-BgiXAp29.mjs} +2 -2
- package/dist/{bounded-turn-rq5tiSXk.js → .setup/bounded-turn-kWYLbaDH.mjs} +12 -11
- package/dist/{capabilities-CGm_94eL.js → .setup/capabilities-oLHKpYRj.mjs} +1 -1
- package/dist/{command-formatters-C54Yg3eA.js → .setup/command-formatters-DylXEqck.mjs} +4 -3
- package/dist/{command-handlers-BvOAHTrA.js → .setup/command-handlers-PRe4WEmx.mjs} +42 -34
- package/dist/{compact-Hd7SAc0N.js → .setup/compact-K2iOmzQp.mjs} +14 -12
- package/dist/{config-Cxw3Cl3k.js → .setup/config-ClwHKKTN.mjs} +7 -5
- package/dist/{conversation-binding-data-CW2GuupV.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +3 -2
- package/dist/{dynamic-tools-BFoUcRdx.js → .setup/dynamic-tools-XNStyzzb.mjs} +105 -108
- package/dist/{effective-mcp-catalog-BTJHnDSx.js → .setup/effective-mcp-catalog-BHpifbgx.mjs} +2 -2
- package/dist/{event-projector-assistant-message-C5-Ds8mA.js → .setup/event-projector-assistant-message-BCnzlajn.mjs} +1 -1
- package/dist/{event-projector-usage-D3PHFFXh.js → .setup/event-projector-usage-h7P0Raok.mjs} +7 -12
- package/dist/{harness-DVfUQBlQ.js → .setup/harness-CawBdltH.mjs} +14 -14
- package/dist/{isolated-completion-Cbbx_5Ed.js → .setup/isolated-completion-rL3zrcAe.mjs} +4 -4
- package/dist/{managed-binary-ZkGodW19.js → .setup/managed-binary-DlGr2kYu.mjs} +1 -1
- package/dist/{model-catalog-o6Cgjoss.js → .setup/model-catalog--miA1cod.mjs} +5 -5
- package/dist/{models-DgFWSuxA.js → .setup/models-BNPc8Vr2.mjs} +5 -4
- package/dist/{native-subagent-monitor-CwFyoylz.js → .setup/native-subagent-monitor-mhFvLcPG.mjs} +25 -105
- package/dist/{node-exec-server.runtime-DXrqpw1c.js → .setup/node-exec-server.runtime-BmAZPmrd.mjs} +3 -3
- package/dist/{plugin-approval-roundtrip-D80UZiJ_.js → .setup/plugin-approval-roundtrip-Dlq4n0n8.mjs} +2 -1
- package/dist/{plugin-marketplace-discovery-mdmScYOj.js → .setup/plugin-marketplace-discovery-KyJdBtCC.mjs} +14 -13
- package/dist/{plugin-metadata-cache-CulOABwu.js → .setup/plugin-metadata-cache-RRQ_VJrs.mjs} +6 -6
- package/dist/{rate-limits-hFtzt2Up.js → .setup/rate-limits-CQUmEcUk.mjs} +3 -2
- package/dist/{request-CCm4LaED.js → .setup/request-fEUi95EK.mjs} +3 -3
- package/dist/{run-attempt-BwNQDH2u.js → .setup/run-attempt-BJ6tOQeE.mjs} +138 -187
- package/dist/{runtime-artifact-DeBvleJw.js → .setup/runtime-artifact-D0ssVSlz.mjs} +3 -3
- package/dist/{session-binding-q2WSTVmC.js → .setup/session-binding-Bd9dh1Er.mjs} +3 -3
- package/dist/{session-catalog-C2Tae4rI.js → .setup/session-catalog-eQhJDU41.mjs} +234 -206
- package/dist/{session-catalog-home-id-DAKUrm3C.js → .setup/session-catalog-home-id-CjyBDShn.mjs} +3 -3
- package/dist/{session-cli-BuDjm5Ou.js → .setup/session-cli-mJePHTAs.mjs} +1 -1
- package/dist/.setup/session-history-Cg8PzgeU.mjs +87 -0
- package/dist/{session-permission-policy-gLm40Vtq.js → .setup/session-permission-policy-C0bdhR_I.mjs} +1 -1
- package/dist/{session-retirement-CdkI0bvb.js → .setup/session-retirement-osjW6zy5.mjs} +4 -4
- package/dist/{session-upstream-marker-Bcy33kam.js → .setup/session-upstream-marker-CIgMzZku.mjs} +1 -1
- package/dist/.setup/settled-turn-context-OxoGQWJK.mjs +290 -0
- package/dist/.setup/settled-turn-finalizer-D9SoKTb-.mjs +104 -0
- package/dist/{shared-client-kNkljY-R.js → .setup/shared-client-DG1kAfGq.mjs} +37 -39
- package/dist/{side-question-GwD73tX6.js → .setup/side-question-Bi9chAvD.mjs} +25 -17
- package/dist/{thread-lifecycle-Ss-uwnC4.js → .setup/thread-lifecycle-Cc6I-gbl.mjs} +273 -232
- package/dist/{thread-ownership-CeYBqg_4.js → .setup/thread-ownership-B3vjUi0P.mjs} +2 -2
- package/dist/{thread-resume-DF54hagX.js → .setup/thread-resume-OMjvue9F.mjs} +8 -7
- package/dist/{transcript-mirror-CkEQIna-.js → .setup/transcript-mirror-DN-ed7Kf.mjs} +14 -7
- package/dist/{transport-stdio-C7-s9TLG.js → .setup/transport-stdio-Cu0xKDRo.mjs} +41 -25
- package/dist/{upstream-prompt-provenance-CFmsKwr9.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +8 -4
- package/dist/{upstream-session-fork-BACGlOFa.js → .setup/upstream-session-fork-DL7QQ1e_.mjs} +14 -20
- package/dist/{usage-C2l8Mils.js → .setup/usage-dsPLHd8O.mjs} +3 -3
- package/dist/{web-search-provider.runtime-B2XgRdFv.js → .setup/web-search-provider.runtime-BRH3ahFN.mjs} +3 -3
- package/dist/api.js +4 -4
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +9 -5
- package/dist/harness.js +1 -1
- package/dist/index.js +60 -41
- package/dist/media-understanding-provider.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/package.json +6 -6
- package/dist/settled-turn-finalizer-B8JJcxCi.js +0 -329
- /package/dist/{context-compaction-activity-BOeJf7yo.js → .setup/context-compaction-activity-BOeJf7yo.mjs} +0 -0
- /package/dist/{elicitation-input-DMkeki8d.js → .setup/elicitation-input-DMkeki8d.mjs} +0 -0
- /package/dist/{image-payload-sanitizer-CnfoUPCE.js → .setup/image-payload-sanitizer-CnfoUPCE.mjs} +0 -0
- /package/dist/{launch-args-sXOAg0SX.js → .setup/launch-args-sXOAg0SX.mjs} +0 -0
- /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- /package/dist/{protocol-validators-Bg5rpNxk.js → .setup/protocol-validators-Bg5rpNxk.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
package/dist/{attempt-client-cleanup-CVPvp9dL.js → .setup/attempt-client-cleanup-FBnDjmtX.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CodexAppServerRpcError, Ht as isJsonObject, wt as unsubscribeCodexAppServerLiveThread, y as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-
|
|
1
|
+
import { $ as CodexAppServerRpcError, Ht as isJsonObject, wt as unsubscribeCodexAppServerLiveThread, y as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-DG1kAfGq.mjs";
|
|
2
2
|
import { asFiniteNumber, normalizeOptionalString, normalizeOptionalString as normalizeOptionalString$1, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
4
4
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
2
|
import { fingerprintResolvedAuthProfileCredential } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
3
3
|
import { resolveApiKeyForProfile } from "openclaw/plugin-sdk/agent-runtime";
|
|
4
4
|
import { resolveOpenAICodexAuthIdentity } from "openclaw/plugin-sdk/provider-auth";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions, s as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-
|
|
2
|
-
import { n as buildCodexAppServerConnectionFingerprint, o as resolveCodexCatalogConnectionHome } from "./thread-resume-
|
|
1
|
+
import { T as readCodexPluginConfig, i as resolveCodexAppServerRuntimeOptions, s as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-ClwHKKTN.mjs";
|
|
2
|
+
import { n as buildCodexAppServerConnectionFingerprint, o as resolveCodexCatalogConnectionHome } from "./thread-resume-OMjvue9F.mjs";
|
|
3
3
|
//#region extensions/codex/src/app-server/binding-connection.ts
|
|
4
4
|
/** Requires the native model pair after a supervised pending branch has materialized. */
|
|
5
5
|
function requireCodexSupervisionModelSelection(binding) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as readCodexAppServerConfigOptions } from "./launch-args-sXOAg0SX.
|
|
2
|
-
import { i as resolveCodexAppServerRuntimeOptions } from "./config-
|
|
3
|
-
import { Ht as isJsonObject, et as createCodexElicitationResponse, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-
|
|
4
|
-
import { c as assertCodexTurnStartResponse, f as readCodexTurnCompletedNotification, s as assertCodexThreadStartResponse, u as readCodexErrorNotification } from "./protocol-validators-Bg5rpNxk.
|
|
5
|
-
import { a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS, v as readCodexNotificationTurnId } from "./attempt-client-cleanup-
|
|
6
|
-
import { b as isTerminalTurnStatus, n as normalizeCodexResponseTokenUsage, x as readCodexNotificationItem, y as isRetryableErrorNotification } from "./event-projector-usage-
|
|
7
|
-
import { r as readModelListResult } from "./models-
|
|
8
|
-
import { _ as
|
|
1
|
+
import { n as readCodexAppServerConfigOptions } from "./launch-args-sXOAg0SX.mjs";
|
|
2
|
+
import { i as resolveCodexAppServerRuntimeOptions } from "./config-ClwHKKTN.mjs";
|
|
3
|
+
import { Ht as isJsonObject, et as createCodexElicitationResponse, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-DG1kAfGq.mjs";
|
|
4
|
+
import { c as assertCodexTurnStartResponse, f as readCodexTurnCompletedNotification, s as assertCodexThreadStartResponse, u as readCodexErrorNotification } from "./protocol-validators-Bg5rpNxk.mjs";
|
|
5
|
+
import { a as closeCodexStartupClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS, v as readCodexNotificationTurnId } from "./attempt-client-cleanup-FBnDjmtX.mjs";
|
|
6
|
+
import { b as isTerminalTurnStatus, n as normalizeCodexResponseTokenUsage, x as readCodexNotificationItem, y as isRetryableErrorNotification } from "./event-projector-usage-h7P0Raok.mjs";
|
|
7
|
+
import { r as readModelListResult } from "./models-BNPc8Vr2.mjs";
|
|
8
|
+
import { _ as assertCodexManagedRequirementsDoNotOverrideToolPolicy, b as buildCodexRuntimeThreadConfig, ot as mergeCodexThreadConfigs, v as attestCodexRestrictedToolSurfaceMcpServersDisabled, x as readCodexInheritedMcpServerNames, y as buildCodexRingZeroThreadConfigPatch } from "./thread-lifecycle-Cc6I-gbl.mjs";
|
|
9
9
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
@@ -77,7 +77,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
|
|
|
77
77
|
config: params.config,
|
|
78
78
|
timeoutMs,
|
|
79
79
|
...params.signal ? { abandonSignal: params.signal } : {}
|
|
80
|
-
}) : await import("./shared-client-
|
|
80
|
+
}) : await import("./shared-client-DG1kAfGq.mjs").then((n) => n.x).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
|
|
81
81
|
startOptions,
|
|
82
82
|
timeoutMs,
|
|
83
83
|
...authSelection,
|
|
@@ -241,14 +241,15 @@ function createCodexBoundedApprovalHandler(taskLabel) {
|
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
async function resolveCodexBoundedTurnModel(params) {
|
|
244
|
-
const
|
|
244
|
+
const result = await params.client.request("model/list", {
|
|
245
245
|
limit: null,
|
|
246
246
|
cursor: null,
|
|
247
247
|
includeHidden: params.selection.mode === "required"
|
|
248
248
|
}, {
|
|
249
249
|
timeoutMs: Math.min(params.timeoutMs, 5e3),
|
|
250
250
|
signal: params.signal
|
|
251
|
-
})
|
|
251
|
+
});
|
|
252
|
+
const listed = readModelListResult(result).models;
|
|
252
253
|
if (params.selection.mode === "live-default") {
|
|
253
254
|
const supported = listed.filter((entry) => params.requiredModalities.every((modality) => entry.inputModalities.includes(modality)));
|
|
254
255
|
const selected = supported.find((entry) => entry.isDefault) ?? supported[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CodexAppServerRpcError } from "./shared-client-
|
|
1
|
+
import { $ as CodexAppServerRpcError } from "./shared-client-DG1kAfGq.mjs";
|
|
2
2
|
//#region extensions/codex/src/app-server/capabilities.ts
|
|
3
3
|
/**
|
|
4
4
|
* Capability helpers for optional Codex app-server control-plane methods.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ht as isJsonObject } from "./shared-client-
|
|
2
|
-
import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-
|
|
1
|
+
import { Ht as isJsonObject } from "./shared-client-DG1kAfGq.mjs";
|
|
2
|
+
import { c as summarizeCodexRateLimits, o as summarizeCodexAccountRateLimits, r as hasCodexRateLimitSnapshots } from "./rate-limits-CQUmEcUk.mjs";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/codex/src/command-formatters.ts
|
|
5
5
|
/**
|
|
@@ -118,7 +118,8 @@ function formatSkills(response) {
|
|
|
118
118
|
return lines.join("\n");
|
|
119
119
|
}
|
|
120
120
|
function formatCodexSkillEntry(entry) {
|
|
121
|
-
|
|
121
|
+
const record = isJsonObject(entry) ? entry : {};
|
|
122
|
+
return `\`${formatCodexDisplayText(normalizeOptionalString(record.name) ?? "<unknown>")}\``;
|
|
122
123
|
}
|
|
123
124
|
const CODEX_RESUME_SAFE_THREAD_ID_PATTERN = /^[A-Za-z0-9._:-]+$/;
|
|
124
125
|
function formatCodexResumeHint(threadId) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { i as resolveCodexAppServerRuntimeOptions, j as CODEX_PLUGINS_MARKETPLACE_NAME, k as isCodexFastServiceTier } from "./config-
|
|
2
|
-
import { Ft as resolveCodexAppServerFallbackApiKeyCacheKey, Ht as isJsonObject, Nt as resolveCodexAppServerAuthProfileIdForAgent, c as getLeasedSharedCodexAppServerClient, gt as consumeCodexAppServerLiveThread, h as releaseLeasedSharedCodexAppServerClient, jt as resolveCodexAppServerAuthAccountCacheKey, vt as hasCodexAppServerLiveThread } from "./shared-client-
|
|
3
|
-
import { c as reclaimCurrentCodexSessionGeneration, d as sessionBindingIdentity, i as createCodexSessionGenerationSupersededError, n as assertCodexBindingMayBeReplaced, r as bindingStoreKey, s as normalizeCodexAppServerBindingModelProvider } from "./session-binding-
|
|
4
|
-
import { o as assertCodexThreadResumeResponse, r as assertCodexThreadAcceptsDirectInput } from "./protocol-validators-Bg5rpNxk.
|
|
5
|
-
import { a as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-
|
|
6
|
-
import { t as listAllCodexAppServerModels } from "./models-
|
|
7
|
-
import { i as buildCodexPluginAppCacheKey, s as defaultCodexAppInventoryCache } from "./thread-resume-
|
|
8
|
-
import { dt as isOpenAiCuratedMarketplaceName, lt as refreshCodexPluginRuntimeState } from "./thread-lifecycle-
|
|
9
|
-
import { a as rollbackCodexAppServerBindingSubscription, c as withExclusiveCodexAppServerThread, i as retireCodexConversationThreadBinding, l as isIncognitoSessionKey, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, s as withCodexConversationThreadActivity, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
10
|
-
import { c as resolveCodexNativeSandboxBlock, s as resolveCodexNativeExecutionBlock } from "./request-
|
|
11
|
-
import { t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
12
|
-
import { s as summarizeCodexAccountUsage } from "./rate-limits-
|
|
13
|
-
import { a as formatComputerUseStatus, c as formatSkills, i as formatCodexStatus, l as formatThreads, n as formatAccount, o as formatList, r as formatCodexDisplayText, s as formatModels, t as buildHelp } from "./command-formatters-
|
|
14
|
-
import { _ as hasCodexAdminScope, a as parseCodexPermissionsModeArg, c as setCodexConversationModel, d as stopCodexConversationTurn, g as canMutateCodexHost, h as CODEX_NATIVE_EXECUTION_AUTH_ERROR, i as parseCodexFastModeArg, l as setCodexConversationPermissions, m as CODEX_HOST_INSPECTION_AUTH_ERROR, n as parseCodexPluginMarketplaceId, o as readCodexConversationActiveTurn, p as CODEX_FULL_PERMISSIONS_AUTH_ERROR, r as formatPermissionsMode, s as setCodexConversationFastMode, t as discoverCodexMarketplacePlugins, u as steerCodexConversationTurn } from "./plugin-marketplace-discovery-
|
|
15
|
-
import { i as readCodexConversationBindingData, n as createCodexCliNodeConversationBindingData, o as resolveCodexDefaultWorkspaceDir, r as createCodexConversationBindingData } from "./conversation-binding-data-
|
|
16
|
-
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
17
|
-
import { c as readCodexStatusProbes, l as requestOptions, p as formatCodexCliSessions, s as codexControlRequest, u as safeCodexControlRequest } from "./session-catalog-
|
|
18
|
-
import { i as readCodexComputerUseStatus, r as installCodexComputerUse, t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-
|
|
1
|
+
import { i as resolveCodexAppServerRuntimeOptions, j as CODEX_PLUGINS_MARKETPLACE_NAME, k as isCodexFastServiceTier } from "./config-ClwHKKTN.mjs";
|
|
2
|
+
import { Ft as resolveCodexAppServerFallbackApiKeyCacheKey, Ht as isJsonObject, Nt as resolveCodexAppServerAuthProfileIdForAgent, c as getLeasedSharedCodexAppServerClient, gt as consumeCodexAppServerLiveThread, h as releaseLeasedSharedCodexAppServerClient, jt as resolveCodexAppServerAuthAccountCacheKey, vt as hasCodexAppServerLiveThread } from "./shared-client-DG1kAfGq.mjs";
|
|
3
|
+
import { c as reclaimCurrentCodexSessionGeneration, d as sessionBindingIdentity, i as createCodexSessionGenerationSupersededError, n as assertCodexBindingMayBeReplaced, r as bindingStoreKey, s as normalizeCodexAppServerBindingModelProvider } from "./session-binding-Bd9dh1Er.mjs";
|
|
4
|
+
import { o as assertCodexThreadResumeResponse, r as assertCodexThreadAcceptsDirectInput } from "./protocol-validators-Bg5rpNxk.mjs";
|
|
5
|
+
import { a as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-FBnDjmtX.mjs";
|
|
6
|
+
import { t as listAllCodexAppServerModels } from "./models-BNPc8Vr2.mjs";
|
|
7
|
+
import { i as buildCodexPluginAppCacheKey, s as defaultCodexAppInventoryCache } from "./thread-resume-OMjvue9F.mjs";
|
|
8
|
+
import { dt as isOpenAiCuratedMarketplaceName, lt as refreshCodexPluginRuntimeState } from "./thread-lifecycle-Cc6I-gbl.mjs";
|
|
9
|
+
import { a as rollbackCodexAppServerBindingSubscription, c as withExclusiveCodexAppServerThread, i as retireCodexConversationThreadBinding, l as isIncognitoSessionKey, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, s as withCodexConversationThreadActivity, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-B3vjUi0P.mjs";
|
|
10
|
+
import { c as resolveCodexNativeSandboxBlock, s as resolveCodexNativeExecutionBlock } from "./request-fEUi95EK.mjs";
|
|
11
|
+
import { t as CODEX_CONTROL_METHODS } from "./capabilities-oLHKpYRj.mjs";
|
|
12
|
+
import { s as summarizeCodexAccountUsage } from "./rate-limits-CQUmEcUk.mjs";
|
|
13
|
+
import { a as formatComputerUseStatus, c as formatSkills, i as formatCodexStatus, l as formatThreads, n as formatAccount, o as formatList, r as formatCodexDisplayText, s as formatModels, t as buildHelp } from "./command-formatters-DylXEqck.mjs";
|
|
14
|
+
import { _ as hasCodexAdminScope, a as parseCodexPermissionsModeArg, c as setCodexConversationModel, d as stopCodexConversationTurn, g as canMutateCodexHost, h as CODEX_NATIVE_EXECUTION_AUTH_ERROR, i as parseCodexFastModeArg, l as setCodexConversationPermissions, m as CODEX_HOST_INSPECTION_AUTH_ERROR, n as parseCodexPluginMarketplaceId, o as readCodexConversationActiveTurn, p as CODEX_FULL_PERMISSIONS_AUTH_ERROR, r as formatPermissionsMode, s as setCodexConversationFastMode, t as discoverCodexMarketplacePlugins, u as steerCodexConversationTurn } from "./plugin-marketplace-discovery-KyJdBtCC.mjs";
|
|
15
|
+
import { i as readCodexConversationBindingData, n as createCodexCliNodeConversationBindingData, o as resolveCodexDefaultWorkspaceDir, r as createCodexConversationBindingData } from "./conversation-binding-data-CrcyZk6O.mjs";
|
|
16
|
+
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-BgiXAp29.mjs";
|
|
17
|
+
import { c as readCodexStatusProbes, l as requestOptions, p as formatCodexCliSessions, s as codexControlRequest, u as safeCodexControlRequest } from "./session-catalog-eQhJDU41.mjs";
|
|
18
|
+
import { i as readCodexComputerUseStatus, r as installCodexComputerUse, t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-RRQ_VJrs.mjs";
|
|
19
19
|
import { normalizeOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
20
|
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
21
21
|
import crypto from "node:crypto";
|
|
@@ -591,7 +591,8 @@ function parseCodexCliSessionsArgs(args) {
|
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
593
|
if (arg === "--limit") {
|
|
594
|
-
const
|
|
594
|
+
const value = readRequiredOptionValue(args, index);
|
|
595
|
+
const parsedLimit = parseStrictPositiveInteger(value);
|
|
595
596
|
if (parsedLimit === void 0) {
|
|
596
597
|
parsed.help = true;
|
|
597
598
|
continue;
|
|
@@ -752,7 +753,7 @@ const CODEX_DIAGNOSTICS_COOLDOWN_MS = 6e4;
|
|
|
752
753
|
const CODEX_DIAGNOSTICS_ERROR_MAX_CHARS = 500;
|
|
753
754
|
const CODEX_DIAGNOSTICS_COOLDOWN_MAX_THREADS = 100;
|
|
754
755
|
const CODEX_DIAGNOSTICS_COOLDOWN_MAX_SCOPES = 100;
|
|
755
|
-
const CODEX_DIAGNOSTICS_CONFIRMATION_TTL_MS =
|
|
756
|
+
const CODEX_DIAGNOSTICS_CONFIRMATION_TTL_MS = 3e5;
|
|
756
757
|
const CODEX_DIAGNOSTICS_CONFIRMATION_MAX_REQUESTS_PER_SCOPE = 100;
|
|
757
758
|
const CODEX_DIAGNOSTICS_CONFIRMATION_MAX_SCOPES = 100;
|
|
758
759
|
const CODEX_DIAGNOSTICS_SCOPE_FIELD_MAX_CHARS = 128;
|
|
@@ -1063,7 +1064,8 @@ function resolveCodexCommandDeps(overrides) {
|
|
|
1063
1064
|
//#endregion
|
|
1064
1065
|
//#region extensions/codex/src/command-handler-scope.ts
|
|
1065
1066
|
async function resolveControlTarget(ctx) {
|
|
1066
|
-
const
|
|
1067
|
+
const binding = await ctx.getCurrentConversationBinding();
|
|
1068
|
+
const data = readCodexConversationBindingData(binding);
|
|
1067
1069
|
const scope = resolveCodexConversationControlScope(ctx);
|
|
1068
1070
|
if (data?.kind === "codex-app-server-session") return {
|
|
1069
1071
|
identity: conversationBindingIdentity(data.bindingId),
|
|
@@ -1087,13 +1089,14 @@ async function resolveCommandAppServerScope(deps, ctx, pluginConfig) {
|
|
|
1087
1089
|
const fallback = resolveCodexConversationControlScope(ctx);
|
|
1088
1090
|
const agentDir = target?.agentDir ?? fallback.agentDir;
|
|
1089
1091
|
const binding = target ? await deps.bindingStore.read(target.identity) : void 0;
|
|
1092
|
+
const authProfileId = binding?.connectionScope === "supervision" ? void 0 : resolveCodexAppServerAuthProfileIdForAgent({
|
|
1093
|
+
authProfileId: binding?.authProfileId ?? target?.requestedAuthProfileId,
|
|
1094
|
+
agentDir,
|
|
1095
|
+
config: ctx.config
|
|
1096
|
+
});
|
|
1090
1097
|
const connection = resolveCodexBindingAppServerConnection({
|
|
1091
1098
|
binding,
|
|
1092
|
-
authProfileId
|
|
1093
|
-
authProfileId: binding?.authProfileId ?? target?.requestedAuthProfileId,
|
|
1094
|
-
agentDir,
|
|
1095
|
-
config: ctx.config
|
|
1096
|
-
}),
|
|
1099
|
+
authProfileId,
|
|
1097
1100
|
pluginConfig
|
|
1098
1101
|
});
|
|
1099
1102
|
return {
|
|
@@ -1392,8 +1395,9 @@ function isCurrentSessionModelSelectionLocked(ctx) {
|
|
|
1392
1395
|
const sessionKey = ctx.sessionKey?.trim();
|
|
1393
1396
|
if (!sessionKey) return false;
|
|
1394
1397
|
const { agentId } = resolveCodexConversationControlScope(ctx);
|
|
1398
|
+
const storePath = resolveStorePath(ctx.config.session?.store, { agentId });
|
|
1395
1399
|
return isModelSelectionLocked(getSessionEntry({
|
|
1396
|
-
storePath
|
|
1400
|
+
storePath,
|
|
1397
1401
|
sessionKey,
|
|
1398
1402
|
hydrateSkillPromptRefs: false,
|
|
1399
1403
|
readConsistency: "latest"
|
|
@@ -1450,7 +1454,8 @@ async function bindConversation(deps, ctx, pluginConfig, args) {
|
|
|
1450
1454
|
}
|
|
1451
1455
|
async function detachConversation(deps, ctx) {
|
|
1452
1456
|
if (isCurrentSessionModelSelectionLocked(ctx)) return MODEL_SELECTION_LOCKED_MESSAGE;
|
|
1453
|
-
const
|
|
1457
|
+
const current = await ctx.getCurrentConversationBinding();
|
|
1458
|
+
const data = readCodexConversationBindingData(current);
|
|
1454
1459
|
const identity = data?.kind === "codex-app-server-session" ? conversationBindingIdentity(data.bindingId) : void 0;
|
|
1455
1460
|
const sourceSessionKey = data?.kind === "codex-app-server-session" ? data.source?.sessionKey : void 0;
|
|
1456
1461
|
let expectedThreadId;
|
|
@@ -1519,13 +1524,14 @@ async function describeConversationBinding(deps, ctx) {
|
|
|
1519
1524
|
}
|
|
1520
1525
|
async function buildThreads(deps, ctx, pluginConfig, filter) {
|
|
1521
1526
|
const scope = await resolveCommandAppServerScope(deps, ctx, pluginConfig);
|
|
1522
|
-
|
|
1527
|
+
const response = await deps.codexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.listThreads, {
|
|
1523
1528
|
limit: 10,
|
|
1524
1529
|
...filter.trim() ? { searchTerm: filter.trim() } : {}
|
|
1525
1530
|
}, {
|
|
1526
1531
|
config: ctx.config,
|
|
1527
1532
|
...scope
|
|
1528
|
-
})
|
|
1533
|
+
});
|
|
1534
|
+
return formatThreads(response);
|
|
1529
1535
|
}
|
|
1530
1536
|
async function buildCodexCliSessions(deps, args) {
|
|
1531
1537
|
const parsed = parseCodexCliSessionsArgs(args);
|
|
@@ -1651,12 +1657,13 @@ async function bindCodexCliNodeSession(deps, ctx, parsed) {
|
|
|
1651
1657
|
if (isCurrentSessionModelSelectionLocked(ctx)) return MODEL_SELECTION_LOCKED_MESSAGE;
|
|
1652
1658
|
if (ctx.sessionId) {
|
|
1653
1659
|
const scope = resolveCodexConversationControlScope(ctx);
|
|
1654
|
-
|
|
1660
|
+
const binding = await deps.bindingStore.read(sessionBindingIdentity({
|
|
1655
1661
|
sessionId: ctx.sessionId,
|
|
1656
1662
|
sessionKey: ctx.sessionKey,
|
|
1657
1663
|
agentId: scope.agentId,
|
|
1658
1664
|
config: ctx.config
|
|
1659
|
-
}))
|
|
1665
|
+
}));
|
|
1666
|
+
assertCodexBindingMayBeReplaced(binding, "binding a Codex CLI node session");
|
|
1660
1667
|
}
|
|
1661
1668
|
const resolved = await deps.resolveCodexCliSessionForBindingOnNode({
|
|
1662
1669
|
requestedNode: parsed.host,
|
|
@@ -1917,12 +1924,13 @@ async function startThreadAction(deps, ctx, pluginConfig, kind, args) {
|
|
|
1917
1924
|
});
|
|
1918
1925
|
if (currentSession?.sessionId !== ctx.sessionId || resolvePersistedSessionRuntimeId(currentSession) !== "codex") return "Codex compaction is unavailable because the current OpenClaw session is not using the Codex runtime.";
|
|
1919
1926
|
if (target.identity.kind === "conversation") {
|
|
1920
|
-
|
|
1927
|
+
const sessionBinding = ctx.sessionId ? await deps.bindingStore.read(sessionBindingIdentity({
|
|
1921
1928
|
sessionId: ctx.sessionId,
|
|
1922
1929
|
sessionKey: ctx.sessionKey,
|
|
1923
1930
|
agentId: sessionTarget.agentId,
|
|
1924
1931
|
config: ctx.config
|
|
1925
|
-
})) : void 0
|
|
1932
|
+
})) : void 0;
|
|
1933
|
+
if (!isSameCodexAppServerThreadOwner(binding, sessionBinding)) return "Codex compaction is unavailable because the conversation-bound thread differs from the current session binding. Resume that thread into the session first.";
|
|
1926
1934
|
}
|
|
1927
1935
|
const compactCurrent = ctx.runtimeContext?.compactCurrent;
|
|
1928
1936
|
if (!compactCurrent) return "Codex compaction is unavailable because this command is not bound to a session.";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as CodexAppServerRpcError, Ct as retainCodexAppServerLiveThread, Ht as isJsonObject, c as getLeasedSharedCodexAppServerClient, gt as consumeCodexAppServerLiveThread, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
2
|
-
import { d as sessionBindingIdentity, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-
|
|
3
|
-
import { _ as readCodexNotificationThreadId, a as closeCodexStartupClientBestEffort, f as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as isCodexAlreadyTerminalInterruptError, v as readCodexNotificationTurnId } from "./attempt-client-cleanup-
|
|
4
|
-
import { i as readCodexThreadContextSnapshot, x as readCodexNotificationItem } from "./event-projector-usage-
|
|
5
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
6
|
-
import { l as isIncognitoSessionKey, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
7
|
-
import { s as resolveCodexNativeExecutionBlock } from "./request-
|
|
8
|
-
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
9
|
-
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-BOeJf7yo.
|
|
1
|
+
import { $ as CodexAppServerRpcError, Ct as retainCodexAppServerLiveThread, Ht as isJsonObject, c as getLeasedSharedCodexAppServerClient, gt as consumeCodexAppServerLiveThread, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-DG1kAfGq.mjs";
|
|
2
|
+
import { d as sessionBindingIdentity, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-Bd9dh1Er.mjs";
|
|
3
|
+
import { _ as readCodexNotificationThreadId, a as closeCodexStartupClientBestEffort, f as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as isCodexAlreadyTerminalInterruptError, v as readCodexNotificationTurnId } from "./attempt-client-cleanup-FBnDjmtX.mjs";
|
|
4
|
+
import { i as readCodexThreadContextSnapshot, x as readCodexNotificationItem } from "./event-projector-usage-h7P0Raok.mjs";
|
|
5
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-OMjvue9F.mjs";
|
|
6
|
+
import { l as isIncognitoSessionKey, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-B3vjUi0P.mjs";
|
|
7
|
+
import { s as resolveCodexNativeExecutionBlock } from "./request-fEUi95EK.mjs";
|
|
8
|
+
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-BgiXAp29.mjs";
|
|
9
|
+
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-BOeJf7yo.mjs";
|
|
10
10
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
11
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
12
12
|
import { embeddedAgentLog, resolveCompactionTimeoutMs } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -281,7 +281,7 @@ async function compactCodexNativeThread(params, options) {
|
|
|
281
281
|
config: params.config,
|
|
282
282
|
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
283
283
|
sessionId: params.sessionId,
|
|
284
|
-
agentId: params.agentId,
|
|
284
|
+
agentId: params.sandboxAgentId ?? params.agentId,
|
|
285
285
|
sandbox,
|
|
286
286
|
surface: "native compaction"
|
|
287
287
|
});
|
|
@@ -533,8 +533,10 @@ async function compactCodexNativeThread(params, options) {
|
|
|
533
533
|
try {
|
|
534
534
|
if ((compactionSucceeded || compactionRequestDefinitelyRejected) && retainedThreadOwnership) {
|
|
535
535
|
const ownership = retainedThreadOwnership;
|
|
536
|
-
|
|
537
|
-
|
|
536
|
+
const currentBinding = await options.bindingStore.read(bindingIdentity);
|
|
537
|
+
if (!(isSameCodexAppServerThreadOwner(currentBinding, binding) && await options.bindingStore.withLease(bindingIdentity, async () => {
|
|
538
|
+
const leasedBinding = await options.bindingStore.read(bindingIdentity);
|
|
539
|
+
if (!isSameCodexAppServerThreadOwner(leasedBinding, binding)) return false;
|
|
538
540
|
return await retainCodexAppServerLiveThread(client, binding.threadId, ownership.release, ownership.configFingerprint, ownership.serviceTier);
|
|
539
541
|
}))) await releaseThreadSubscription?.();
|
|
540
542
|
} else await releaseThreadSubscription?.();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as readCodexAppServerConfigOptions, t as normalizeCodexAppServerArgs } from "./launch-args-sXOAg0SX.
|
|
1
|
+
import { n as readCodexAppServerConfigOptions, t as normalizeCodexAppServerArgs } from "./launch-args-sXOAg0SX.mjs";
|
|
2
2
|
import { asNullableRecord, asOptionalRecord as readRecord, normalizeOptionalString, normalizeOptionalString as readNonEmptyString, normalizeTrimmedStringList, parseBooleanValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { resolvePositiveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -722,10 +722,11 @@ const CODEX_CONFIG_TOML_FILENAME = "config.toml";
|
|
|
722
722
|
/** Cloud/system config can redirect reviews after local home/profile checks have passed. */
|
|
723
723
|
async function assertCodexModelBackedReviewerEffectiveConfig(params) {
|
|
724
724
|
if (params.approvalsReviewer !== "auto_review" && params.approvalsReviewer !== "guardian_subagent") return;
|
|
725
|
-
const
|
|
725
|
+
const response = await params.client.request("config/read", {
|
|
726
726
|
cwd: path.resolve(params.cwd),
|
|
727
727
|
includeLayers: false
|
|
728
|
-
}, { signal: params.signal })
|
|
728
|
+
}, { signal: params.signal });
|
|
729
|
+
const effectiveConfig = readRecord(readRecord(response)?.config);
|
|
729
730
|
if (!effectiveConfig) throw new Error("Codex config/read returned an invalid model-backed reviewer config");
|
|
730
731
|
const modelProvider = effectiveConfig.model_provider;
|
|
731
732
|
const providers = effectiveConfig.model_providers;
|
|
@@ -975,10 +976,11 @@ function resolveCodexAppServerNetworkProxy(config, sandbox) {
|
|
|
975
976
|
function resolveNetworkProxyPermissionProfileName(config, profile) {
|
|
976
977
|
const explicitProfileName = readNonEmptyString(config.profileName);
|
|
977
978
|
if (explicitProfileName) return explicitProfileName;
|
|
978
|
-
|
|
979
|
+
const suffix = createHash("sha256").update(stableStringifyJson({
|
|
979
980
|
version: 1,
|
|
980
981
|
profile
|
|
981
|
-
})).digest("hex").slice(0, 16)
|
|
982
|
+
})).digest("hex").slice(0, 16);
|
|
983
|
+
return `${DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX}-${suffix}`;
|
|
982
984
|
}
|
|
983
985
|
function fingerprintCodexAppServerNetworkProxyConfigPatch(configPatch) {
|
|
984
986
|
return createHash("sha256").update(stableStringifyJson(configPatch)).digest("hex");
|
package/dist/{conversation-binding-data-CW2GuupV.js → .setup/conversation-binding-data-CrcyZk6O.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.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";
|
|
@@ -94,7 +94,8 @@ function legacyCodexConversationBindingId(sessionFile) {
|
|
|
94
94
|
return `legacy-${createHash("sha256").update(sessionFile).digest("base64url")}`;
|
|
95
95
|
}
|
|
96
96
|
function resolveCodexDefaultWorkspaceDir(pluginConfig) {
|
|
97
|
-
|
|
97
|
+
const appServer = asOptionalRecord(asOptionalRecord(pluginConfig)?.appServer);
|
|
98
|
+
return normalizeOptionalString(appServer?.defaultWorkspaceDir) ?? process.cwd();
|
|
98
99
|
}
|
|
99
100
|
function readConversationStart(value) {
|
|
100
101
|
const read = (key) => {
|