@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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ct as isJsonObject } from "./shared-client-kIBbGjk4.js";
|
|
2
|
+
import { asBoolean, asFiniteNumber, normalizeOptionalString, parseStrictFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
3
|
import { MAX_DATE_TIMESTAMP_MS, resolveExpiresAtMsFromEpochSeconds } from "openclaw/plugin-sdk/number-runtime";
|
|
3
|
-
import { asFiniteNumber, parseStrictFiniteNumber } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
5
5
|
import { PROVIDER_LABELS, clampPercent } from "openclaw/plugin-sdk/provider-usage";
|
|
6
6
|
//#region extensions/codex/src/app-server/rate-limits.ts
|
|
@@ -21,7 +21,7 @@ const CODEX_USAGE_LIMIT_MESSAGE_PREFIX = "You've reached your Codex subscription
|
|
|
21
21
|
const CODEX_USAGE_LIMIT_STATE_MISMATCH_MESSAGE = "Codex rejected the request with a usage-limit error, but its current account usage does not report an exhausted limit.";
|
|
22
22
|
/** Enriches Codex usage-limit failures with reset timing and recovery guidance. */
|
|
23
23
|
function formatCodexUsageLimitErrorMessage(params) {
|
|
24
|
-
const message =
|
|
24
|
+
const message = normalizeOptionalString(params.message);
|
|
25
25
|
if (!isCodexUsageLimitError(params.codexErrorInfo)) return;
|
|
26
26
|
const nowMs = params.nowMs ?? Date.now();
|
|
27
27
|
const usageSummary = summarizeCodexAccountUsage(params.rateLimits, nowMs);
|
|
@@ -47,7 +47,7 @@ function formatCodexUsageLimitErrorMessage(params) {
|
|
|
47
47
|
}
|
|
48
48
|
/** Detects usage-limit messages that need a fresh rate-limit query before display. */
|
|
49
49
|
function shouldRefreshCodexRateLimitsForUsageLimitMessage(message) {
|
|
50
|
-
const text =
|
|
50
|
+
const text = normalizeOptionalString(message);
|
|
51
51
|
return Boolean(text?.startsWith(CODEX_USAGE_LIMIT_MESSAGE_PREFIX) && !text.includes("Next reset "));
|
|
52
52
|
}
|
|
53
53
|
/** Formats compact summaries for raw Codex rate-limit snapshot payloads. */
|
|
@@ -133,7 +133,7 @@ function summarizeRateLimitSnapshot(snapshot, nowMs) {
|
|
|
133
133
|
const window = readRateLimitWindow(snapshot, key);
|
|
134
134
|
return window ? [formatRateLimitWindow(key, window, nowMs)] : [];
|
|
135
135
|
});
|
|
136
|
-
const reachedType =
|
|
136
|
+
const reachedType = normalizeOptionalString(snapshot.rateLimitReachedType) ?? normalizeOptionalString(snapshot.rate_limit_reached_type);
|
|
137
137
|
const suffix = reachedType ? ` (${formatReachedType(reachedType)})` : "";
|
|
138
138
|
if (windows.length > 0) return `${label}: ${windows.join(" · ")}${suffix}`;
|
|
139
139
|
if (reachedType) return `${label}: ${formatReachedType(reachedType)}`;
|
|
@@ -171,8 +171,8 @@ function sortedRateLimitKeys(keys) {
|
|
|
171
171
|
}
|
|
172
172
|
function addRateLimitSnapshot(snapshot, snapshots, seen) {
|
|
173
173
|
const signature = [
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
normalizeOptionalString(snapshot.limitId) ?? normalizeOptionalString(snapshot.limit_id) ?? "",
|
|
175
|
+
normalizeOptionalString(snapshot.limitName) ?? normalizeOptionalString(snapshot.limit_name) ?? "",
|
|
176
176
|
formatWindowSignature(snapshot.primary),
|
|
177
177
|
formatWindowSignature(snapshot.secondary)
|
|
178
178
|
].join("|");
|
|
@@ -187,17 +187,17 @@ function readRateLimitWindow(snapshot, key) {
|
|
|
187
187
|
const window = snapshot[key];
|
|
188
188
|
if (!isJsonObject(window)) return;
|
|
189
189
|
return {
|
|
190
|
-
resetsAtMs: resolveExpiresAtMsFromEpochSeconds(
|
|
190
|
+
resetsAtMs: resolveExpiresAtMsFromEpochSeconds(asFiniteNumber(window.resetsAt) ?? asFiniteNumber(window.resets_at), { maxMs: MAX_DATE_TIMESTAMP_MS }) ?? 0,
|
|
191
191
|
...readOptionalNumberField(window, "usedPercent", "used_percent"),
|
|
192
192
|
...readOptionalNumberField(window, "windowDurationMins", "window_duration_mins", "windowMinutes", "window_minutes")
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
function snapshotHasDisplayableData(snapshot) {
|
|
196
|
-
if (
|
|
196
|
+
if (normalizeOptionalString(snapshot.rateLimitReachedType) ?? normalizeOptionalString(snapshot.rate_limit_reached_type)) return true;
|
|
197
197
|
return readWindowEntries(snapshot).some((entry) => entry.window.usedPercent !== void 0 || entry.window.resetsAtMs > 0);
|
|
198
198
|
}
|
|
199
199
|
function readOptionalNumberField(record, ...keys) {
|
|
200
|
-
const value = keys.map((key) =>
|
|
200
|
+
const value = keys.map((key) => asFiniteNumber(record[key])).find((entry) => entry !== void 0);
|
|
201
201
|
if (value === void 0) return {};
|
|
202
202
|
return keys.some((key) => key.toLowerCase().includes("window")) ? { windowDurationMins: value } : { usedPercent: value };
|
|
203
203
|
}
|
|
@@ -208,7 +208,7 @@ function formatRateLimitWindowDetails(window, nowMs) {
|
|
|
208
208
|
return `${window.usedPercent === void 0 ? "usage unknown" : `${Math.max(0, 100 - Math.round(window.usedPercent))}% left`}${window.resetsAtMs > nowMs ? ` ⏱${formatResetDuration(window.resetsAtMs, nowMs)}` : ""}`;
|
|
209
209
|
}
|
|
210
210
|
function formatLimitLabel(snapshot) {
|
|
211
|
-
const label =
|
|
211
|
+
const label = normalizeOptionalString(snapshot.limitName) ?? normalizeOptionalString(snapshot.limit_name) ?? normalizeOptionalString(snapshot.limitId) ?? normalizeOptionalString(snapshot.limit_id);
|
|
212
212
|
if (!label || label === CODEX_LIMIT_ID) return "Codex";
|
|
213
213
|
return label.replace(/[_-]+/gu, " ").replace(/\s+/gu, " ").trim();
|
|
214
214
|
}
|
|
@@ -222,10 +222,10 @@ function formatAccountResetTime(resetsAtMs, nowMs) {
|
|
|
222
222
|
return `${formatCalendarResetTime(resetsAtMs, nowMs)} (in ${formatRelativeDuration(resetsAtMs - nowMs)})`;
|
|
223
223
|
}
|
|
224
224
|
function snapshotHasLimitBlock(snapshot) {
|
|
225
|
-
return Boolean(
|
|
225
|
+
return Boolean(normalizeOptionalString(snapshot.rateLimitReachedType) ?? normalizeOptionalString(snapshot.rate_limit_reached_type) ?? readWindowEntries(snapshot).some((entry) => entry.window.usedPercent !== void 0 && entry.window.usedPercent >= 100));
|
|
226
226
|
}
|
|
227
227
|
function isCodexLimitSnapshot(snapshot) {
|
|
228
|
-
const id =
|
|
228
|
+
const id = normalizeOptionalString(snapshot.limitId) ?? normalizeOptionalString(snapshot.limit_id);
|
|
229
229
|
return !id || id === CODEX_LIMIT_ID;
|
|
230
230
|
}
|
|
231
231
|
function selectCodexProviderUsageSnapshot(value) {
|
|
@@ -251,15 +251,15 @@ function formatProviderUsageWindowLabel(entry, entries) {
|
|
|
251
251
|
return entry.key === "primary" ? "Short" : "Long";
|
|
252
252
|
}
|
|
253
253
|
function resolveCodexProviderUsagePlan(snapshot) {
|
|
254
|
-
const plan =
|
|
254
|
+
const plan = normalizeOptionalString(snapshot.planType) ?? normalizeOptionalString(snapshot.plan_type);
|
|
255
255
|
const creditSummary = formatCodexCreditSummary(isJsonObject(snapshot.credits) ? snapshot.credits : void 0);
|
|
256
256
|
if (!creditSummary) return plan;
|
|
257
257
|
return plan ? `${plan} (${creditSummary})` : creditSummary;
|
|
258
258
|
}
|
|
259
259
|
function formatCodexCreditSummary(credits) {
|
|
260
260
|
if (!credits) return;
|
|
261
|
-
if ((
|
|
262
|
-
if (
|
|
261
|
+
if ((asBoolean(credits.hasCredits) ?? asBoolean(credits.has_credits)) === false) return;
|
|
262
|
+
if (asBoolean(credits.unlimited)) return "Unlimited credits";
|
|
263
263
|
const balance = typeof credits.balance === "string" ? parseStrictFiniteNumber(credits.balance) : asFiniteNumber(credits.balance);
|
|
264
264
|
if (balance === void 0 || balance <= 0) return;
|
|
265
265
|
const roundedBalance = Math.round(balance);
|
|
@@ -371,7 +371,7 @@ function formatResetDuration(resetsAtMs, nowMs) {
|
|
|
371
371
|
}
|
|
372
372
|
function formatWindowSignature(value) {
|
|
373
373
|
if (!isJsonObject(value)) return "";
|
|
374
|
-
return `${
|
|
374
|
+
return `${asFiniteNumber(value.usedPercent) ?? asFiniteNumber(value.used_percent) ?? ""}:${asFiniteNumber(value.resetsAt) ?? asFiniteNumber(value.resets_at) ?? ""}`;
|
|
375
375
|
}
|
|
376
376
|
function extractCodexRetryHint(message) {
|
|
377
377
|
if (!message) return;
|
|
@@ -379,23 +379,5 @@ function extractCodexRetryHint(message) {
|
|
|
379
379
|
if (tryAgainAt?.[1]) return tryAgainAt[1].trim();
|
|
380
380
|
return /\btry again\s+((?:tomorrow|in\s+[^.!?\n]+)[^.!?\n]*)(?:[.!?]|$)/iu.exec(message)?.[1]?.trim();
|
|
381
381
|
}
|
|
382
|
-
function readString(record, key) {
|
|
383
|
-
const value = record[key];
|
|
384
|
-
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
385
|
-
}
|
|
386
|
-
function readNullableString(record, key) {
|
|
387
|
-
return readString(record, key) ?? void 0;
|
|
388
|
-
}
|
|
389
|
-
function readNumber(record, key) {
|
|
390
|
-
return asFiniteNumber(record[key]);
|
|
391
|
-
}
|
|
392
|
-
function readBoolean(record, key) {
|
|
393
|
-
const value = record[key];
|
|
394
|
-
return typeof value === "boolean" ? value : void 0;
|
|
395
|
-
}
|
|
396
|
-
function normalizeText(value) {
|
|
397
|
-
const text = value?.trim();
|
|
398
|
-
return text ? text : void 0;
|
|
399
|
-
}
|
|
400
382
|
//#endregion
|
|
401
383
|
export { shouldRefreshCodexRateLimitsForUsageLimitMessage as a, summarizeCodexRateLimits as c, resolveCodexUsageLimitResetAtMs as i, formatCodexUsageLimitErrorMessage as n, summarizeCodexAccountRateLimits as o, hasCodexRateLimitSnapshots as r, summarizeCodexAccountUsage as s, buildCodexAppServerUsageSnapshot as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-
|
|
1
|
+
import { _ as withTimeout, a as getLeasedSharedCodexAppServerClient, i as createIsolatedCodexAppServerClient, l as releaseLeasedSharedCodexAppServerClient, p as retireSharedCodexAppServerClientIfCurrent, s as isCodexAppServerStartSelectionChangedError } from "./shared-client-kIBbGjk4.js";
|
|
2
|
+
import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-Cmwc9eIk.js";
|
|
3
3
|
//#region extensions/codex/src/app-server/request.ts
|
|
4
4
|
/** Sends one guarded request over a client lease owned by the caller. */
|
|
5
5
|
async function requestCodexAppServerClientJson(params) {
|
|
@@ -131,7 +131,7 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
131
131
|
signal: timeoutController.signal
|
|
132
132
|
});
|
|
133
133
|
};
|
|
134
|
-
return await run(scopedRequest);
|
|
134
|
+
return await run(scopedRequest, client);
|
|
135
135
|
} catch (error) {
|
|
136
136
|
if (!isCodexAppServerStartSelectionChangedError(error) || attempt > 0) throw error;
|
|
137
137
|
if (!params.isolated) retireSharedCodexAppServerClientIfCurrent(client);
|
|
@@ -154,4 +154,4 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
|
-
export { requestCodexAppServerClientJson as n, requestCodexAppServerJson as r, readCodexAppServerUsage as t };
|
|
157
|
+
export { withCodexAppServerJsonClient as i, requestCodexAppServerClientJson as n, requestCodexAppServerJson as r, readCodexAppServerUsage as t };
|