@openclaw/codex 2026.7.2-beta.5 → 2026.8.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{app-server-policy-BmDgseo_.js → app-server-policy-zcBDc1JU.js} +1 -1
- package/dist/attempt-client-cleanup-DMLXUfa8.js +735 -0
- package/dist/binding-connection-I5Bo-AsX.js +33 -0
- package/dist/{bounded-turn-FEbUXoYT.js → bounded-turn-qgZmzy_4.js} +71 -63
- package/dist/{capabilities-BHRSI6Cn.js → capabilities-CybGI1oz.js} +8 -2
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-ico4ZFnk.js → command-formatters-B1AEz8ZA.js} +18 -18
- package/dist/{command-handlers-CRmnwI2N.js → command-handlers-Db8pu_ds.js} +484 -95
- package/dist/{compact-dEN49UH6.js → compact-LspQaGfl.js} +213 -199
- package/dist/{conversation-binding-data-BHRpYbX3.js → conversation-binding-data-CW2GuupV.js} +6 -10
- package/dist/doctor-contract-api.js +40 -43
- package/dist/{dynamic-tools-LIt9ojep.js → dynamic-tools-BVdyWkUD.js} +2984 -1221
- package/dist/effective-mcp-catalog-DIIhAtOZ.js +119 -0
- package/dist/{event-projector-assistant-message-DTgnPPVF.js → event-projector-assistant-message-BwxV4d6N.js} +11 -23
- package/dist/{attempt-notifications-CMR2_fmR.js → event-projector-usage-e5huIQWu.js} +113 -29
- package/dist/harness.js +83 -13
- package/dist/image-payload-sanitizer-CnfoUPCE.js +65 -0
- package/dist/index.js +703 -329
- package/dist/isolated-completion-C58NbL40.js +75 -0
- package/dist/local-runtime-attribution-B_2mnqhb.js +19 -0
- package/dist/media-understanding-provider.js +5 -5
- package/dist/{models-BA01NEez.js → models-BFlpn1Ex.js} +12 -17
- package/dist/native-subagent-monitor-DyTGmTUx.js +3111 -0
- package/dist/{plugin-app-cache-key-DSXX-rXO.js → plugin-app-cache-key-C3H2CVp6.js} +135 -42
- package/dist/plugin-marketplace-discovery-CzrGJdCR.js +385 -0
- package/dist/{computer-use-BjGylO-E.js → plugin-metadata-cache-CNJPj4_b.js} +211 -113
- package/dist/protocol-validators-B4F7L8Rf.js +2346 -0
- package/dist/{rate-limits-S_PXs0ul.js → rate-limits-DZXmOL8-.js} +17 -35
- package/dist/{request-CXpPennK.js → request-BRl5_UfX.js} +4 -4
- package/dist/{run-attempt-C5GTPJOE.js → run-attempt-P8BdxC1I.js} +1996 -5728
- package/dist/{runtime-artifact-C2ITXdhM.js → runtime-artifact-BVSPdd6g.js} +91 -40
- package/dist/{sandbox-guard-D1Wky__S.js → sandbox-guard-Cmwc9eIk.js} +10 -13
- package/dist/{session-binding-DlVQ-Pxs.js → session-binding-DPxIvMgE.js} +305 -271
- package/dist/{session-catalog-CP2oCcEb.js → session-catalog-xwNi_SDM.js} +418 -144
- package/dist/{session-cli-CqZ0Fp2a.js → session-cli-7hgXZDV7.js} +1 -1
- package/dist/session-retirement-DoMMJFKm.js +36 -0
- package/dist/{session-upstream-marker-QE-m5QFG.js → session-upstream-marker-CrIFX06J.js} +1 -1
- package/dist/{settled-turn-finalizer-CA_2QXIE.js → settled-turn-finalizer-BRWBO4MO.js} +36 -15
- package/dist/{shared-client-BVKE40c-.js → shared-client-kIBbGjk4.js} +721 -240
- package/dist/{side-question-CO12sHxo.js → side-question-9HAL26l9.js} +102 -53
- package/dist/{thread-lifecycle-DRg_FdzC.js → thread-lifecycle-Bu1BTDXr.js} +1355 -660
- package/dist/thread-ownership-6kOQHlyC.js +92 -0
- package/dist/thread-resume-CPrJNQVM.js +30 -0
- package/dist/{transcript-mirror-uKA-A4tB.js → transcript-mirror-B9gGgnJS.js} +202 -182
- package/dist/{transport-stdio-DXgGZ7Ib.js → transport-stdio-DIImwDVS.js} +11 -0
- package/dist/upstream-prompt-provenance-ClRBije0.js +41 -0
- package/dist/{upstream-session-fork-_Vrz4WJr.js → upstream-session-fork-CE-_LdnP.js} +5 -5
- package/dist/{usage-UpVbdX5G.js → usage-CHlV0e-o.js} +3 -3
- package/dist/{web-search-provider.runtime-CaQMYDbp.js → web-search-provider.runtime-DRw2Vl42.js} +8 -9
- package/openclaw.plugin.json +18 -3
- package/package.json +6 -7
- package/dist/attempt-client-cleanup-Ia52yRWc.js +0 -127
- package/dist/conversation-control-DE7d9DOj.js +0 -287
- package/dist/event-projector-usage-tvgb1NCX.js +0 -69
- package/dist/notification-correlation-Bj_Ak_jI.js +0 -67
- package/dist/protocol-validators-Dm4eXZmt.js +0 -6337
- package/dist/realtime-voice-api-BPcA1uN9.js +0 -494
- package/dist/realtime-voice-api.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CODEX_LOCAL_SESSION_HOST_ID } from "./session-catalog-
|
|
1
|
+
import { a as CODEX_LOCAL_SESSION_HOST_ID } from "./session-catalog-xwNi_SDM.js";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
4
|
import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { K as releaseCodexAppServerLiveThread, d as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-kIBbGjk4.js";
|
|
2
|
+
import { a as closeCodexStartupClientBestEffort, d as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DMLXUfa8.js";
|
|
3
|
+
import { t as isIncognitoSessionKey } from "./incognito-session-ET_ufDH-.js";
|
|
4
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-DyTGmTUx.js";
|
|
5
|
+
//#region extensions/codex/src/app-server/session-retirement.ts
|
|
6
|
+
/** Retire binding and native subscription under the same generation/physical-client ownership fence. */
|
|
7
|
+
async function retireCodexAppServerSessionGeneration(params) {
|
|
8
|
+
const retireGeneration = () => params.mode === "reset" ? params.bindingStore.resetSessionGeneration(params.identity) : params.bindingStore.retireSessionGeneration(params.identity);
|
|
9
|
+
const expectedBinding = await params.bindingStore.read(params.identity);
|
|
10
|
+
if (!expectedBinding) return await retireGeneration();
|
|
11
|
+
return await params.bindingStore.withLease(params.identity, async () => {
|
|
12
|
+
const binding = await params.bindingStore.read(params.identity);
|
|
13
|
+
if (binding?.threadId !== expectedBinding.threadId) return "conflict";
|
|
14
|
+
const result = await retireGeneration();
|
|
15
|
+
if (result !== "applied" || !binding?.clientId) return result;
|
|
16
|
+
const clientLease = retainSharedCodexAppServerClientByInstanceId(binding.clientId);
|
|
17
|
+
if (!clientLease) return result;
|
|
18
|
+
try {
|
|
19
|
+
codexNativeSubagentMonitorRuntime.retireParent(clientLease.client, binding.threadId);
|
|
20
|
+
if (!await releaseCodexAppServerLiveThread(clientLease.client, binding.threadId) && isIncognitoSessionKey(params.identity.sessionKey)) {
|
|
21
|
+
if (!await unsubscribeCodexThreadBestEffort(clientLease.client, {
|
|
22
|
+
threadId: binding.threadId,
|
|
23
|
+
timeoutMs: 5e3
|
|
24
|
+
})) {
|
|
25
|
+
await closeCodexStartupClientBestEffort(clientLease.client);
|
|
26
|
+
throw new CodexAppServerUnsafeSubscriptionError(`Codex retired session subscription could not be released: ${binding.threadId}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
} finally {
|
|
30
|
+
clientLease.release();
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { retireCodexAppServerSessionGeneration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as importCodexThreadHistoryToTranscript } from "./transcript-mirror-
|
|
1
|
+
import { r as importCodexThreadHistoryToTranscript } from "./transcript-mirror-B9gGgnJS.js";
|
|
2
2
|
import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
3
3
|
//#region extensions/codex/src/app-server/session-history-import.ts
|
|
4
4
|
/** Creates a session whose transcript is derived from one verified Codex thread snapshot. */
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { ct as isJsonObject } from "./shared-client-kIBbGjk4.js";
|
|
2
|
+
import { i as readUpstreamUserText, r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-ClRBije0.js";
|
|
3
|
+
import { c as readCodexMirrorSourceFingerprint, s as fingerprintCodexMirrorSourceMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-B9gGgnJS.js";
|
|
4
|
+
import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-qgZmzy_4.js";
|
|
5
|
+
import { n as createAssistantMessage } from "./event-projector-assistant-message-BwxV4d6N.js";
|
|
6
|
+
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
7
|
import { Buffer } from "node:buffer";
|
|
5
8
|
import { isSilentReplyText } from "openclaw/plugin-sdk/reply-runtime";
|
|
6
9
|
//#region extensions/codex/src/app-server/settled-turn-projection.ts
|
|
@@ -9,12 +12,6 @@ const MAX_PROJECTION_BYTES = 512 * 1024;
|
|
|
9
12
|
const MAX_TEXT_BYTES = 64 * 1024;
|
|
10
13
|
const TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]{1,128}$/u;
|
|
11
14
|
const TOOL_ERROR_STATUS_PREFIX = "[Tool result status: error]\n";
|
|
12
|
-
function isRecord(value) {
|
|
13
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
14
|
-
}
|
|
15
|
-
function readNonEmptyString(value) {
|
|
16
|
-
return typeof value === "string" ? value.trim() || void 0 : void 0;
|
|
17
|
-
}
|
|
18
15
|
function readBoundedText(value, label, maxBytes = MAX_TEXT_BYTES) {
|
|
19
16
|
if (typeof value !== "string" || !value.trim()) return;
|
|
20
17
|
if (Buffer.byteLength(value, "utf8") > maxBytes) throw new Error(`Codex settled-turn projection found oversized ${label}`);
|
|
@@ -29,12 +26,12 @@ function responseItemBytes(item) {
|
|
|
29
26
|
return Buffer.byteLength(JSON.stringify(item), "utf8");
|
|
30
27
|
}
|
|
31
28
|
function requireCallId(value) {
|
|
32
|
-
const callId =
|
|
29
|
+
const callId = normalizeOptionalString(value);
|
|
33
30
|
if (!callId || callId.length > 256) throw new Error("Codex settled-turn projection found an invalid tool call id");
|
|
34
31
|
return callId;
|
|
35
32
|
}
|
|
36
33
|
function requireToolName(value) {
|
|
37
|
-
const name =
|
|
34
|
+
const name = normalizeOptionalString(value);
|
|
38
35
|
if (!name || !TOOL_NAME_PATTERN.test(name)) throw new Error("Codex settled-turn projection found an invalid tool name");
|
|
39
36
|
return name;
|
|
40
37
|
}
|
|
@@ -153,7 +150,7 @@ function projectToolResult(message) {
|
|
|
153
150
|
for (const value of message.content) {
|
|
154
151
|
if (!isRecord(value)) throw new Error("Codex settled-turn projection found malformed tool result content");
|
|
155
152
|
if (value.type === "image") {
|
|
156
|
-
const mimeType =
|
|
153
|
+
const mimeType = normalizeOptionalString(value.mimeType) ?? "unknown type";
|
|
157
154
|
parts.push(`[Image tool result: ${mimeType}]`);
|
|
158
155
|
continue;
|
|
159
156
|
}
|
|
@@ -247,6 +244,7 @@ async function runCodexSettledTurnFinalization(operation, options) {
|
|
|
247
244
|
mode: "required",
|
|
248
245
|
id: attempt.modelId
|
|
249
246
|
},
|
|
247
|
+
modelProvider: "openai",
|
|
250
248
|
profile: attempt.authProfileId,
|
|
251
249
|
timeoutMs: attempt.runTimeoutOverrideMs ?? attempt.timeoutMs,
|
|
252
250
|
signal: attempt.abortSignal,
|
|
@@ -263,12 +261,35 @@ async function runCodexSettledTurnFinalization(operation, options) {
|
|
|
263
261
|
requiredModalities: ["text"],
|
|
264
262
|
isolation: "private-stdio",
|
|
265
263
|
historyItems,
|
|
266
|
-
requireNoExternalCapabilities: true
|
|
264
|
+
requireNoExternalCapabilities: true,
|
|
265
|
+
allowEmptyText: true
|
|
267
266
|
});
|
|
268
|
-
|
|
267
|
+
let promptEchoSeen = false;
|
|
268
|
+
let unexpectedItem;
|
|
269
|
+
for (const item of bounded.items) {
|
|
270
|
+
if (FINALIZER_PASSIVE_ITEM_TYPES.has(item.type)) continue;
|
|
271
|
+
if (item.type === "userMessage" && !promptEchoSeen) {
|
|
272
|
+
const content = Array.isArray(item.content) ? item.content : [];
|
|
273
|
+
const input = content[0];
|
|
274
|
+
if (content.length === 1 && isJsonObject(input) && input.type === "text" && input.text === attempt.prompt) {
|
|
275
|
+
promptEchoSeen = true;
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
unexpectedItem = item;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
269
282
|
if (unexpectedItem) throw new Error(`Codex settled-turn finalization returned unexpected native item: ${unexpectedItem.type}`);
|
|
270
283
|
const text = bounded.text.trim();
|
|
271
|
-
if (!text
|
|
284
|
+
if (!text) return {
|
|
285
|
+
assistant: createAssistantMessage(attempt, "", {
|
|
286
|
+
tokenUsage: bounded.usage,
|
|
287
|
+
aborted: false,
|
|
288
|
+
promptError: null
|
|
289
|
+
}),
|
|
290
|
+
...bounded.usage ? { usage: bounded.usage } : {}
|
|
291
|
+
};
|
|
292
|
+
if (isSilentReplyText(text)) throw new Error("Codex settled-turn finalization completed without a visible answer");
|
|
272
293
|
const mirrorIdentity = `settled-finalizer:${attempt.runId}`;
|
|
273
294
|
const assistant = attachCodexMirrorIdentity(createAssistantMessage(attempt, text, {
|
|
274
295
|
tokenUsage: bounded.usage,
|