@openclaw/codex 2026.6.11 → 2026.7.1-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-server-policy-BPTiVNsW.js → app-server-policy-C968Kgin.js} +5 -5
- package/dist/{attempt-notifications-BYnndyFl.js → attempt-notifications-BGsEIIDI.js} +29 -40
- package/dist/{command-handlers-DEPTJYk0.js → command-handlers-Dv-pzAmg.js} +278 -237
- package/dist/command-rpc-eLM_mtC7.js +784 -0
- package/dist/compact-4mVBriKT.js +603 -0
- package/dist/{computer-use-ClrJwoFp.js → computer-use-Bmaz333N.js} +3 -3
- package/dist/{config-CszD0vP3.js → config-CYEDnLJ2.js} +44 -18
- package/dist/conversation-binding-data-BHRpYbX3.js +121 -0
- package/dist/doctor-contract-api.js +590 -22
- package/dist/harness.js +29 -10
- package/dist/index.js +1134 -35
- package/dist/{media-understanding-provider-ZUQHN7gT.js → media-understanding-provider-BHOu9-Gg.js} +13 -8
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{models-CAmfBWRl.js → models-DDmO1zwd.js} +2 -2
- package/dist/notification-correlation-Bo7KB3ks.js +35 -0
- package/dist/{plugin-app-cache-key-C9ILt7bl.js → plugin-app-cache-key-BrhVdeEf.js} +13 -5
- package/dist/{protocol-dh-ETiNd.js → protocol-2POPqAY4.js} +2 -1
- package/dist/{protocol-validators-B19q5BIX.js → protocol-validators-dZQ-UTOa.js} +205 -56
- package/dist/provider-capabilities-DzI8fgEu.js +6172 -0
- package/dist/provider-catalog.js +4 -2
- package/dist/{provider-B-OHpbD3.js → provider-zjPfx5Fs.js} +94 -23
- package/dist/provider.js +2 -2
- package/dist/{request-Dcd452Nk.js → request-BcJyl8KL.js} +2 -2
- package/dist/{run-attempt-CXxtFC9d.js → run-attempt-DNSNk_G8.js} +1250 -2992
- package/dist/{sandbox-guard-3tnjhjFb.js → sandbox-guard-DA2TQfZW.js} +5 -3
- package/dist/session-binding-C1ZXdP-x.js +627 -0
- package/dist/session-binding-meta-B7aEMU7g.js +6 -0
- package/dist/shared-client-4ICy3U6d.js +1853 -0
- package/dist/{side-question-C-DhgJOd.js → side-question-CMOpEhvY.js} +134 -142
- package/dist/{thread-lifecycle-DtT3-ehU.js → thread-lifecycle-qWE88Dn2.js} +803 -481
- package/dist/{web-search-provider.runtime-CkwxrXQj.js → web-search-provider.runtime-BSlriav6.js} +3 -3
- package/npm-shrinkwrap.json +34 -34
- package/openclaw.plugin.json +23 -3
- package/package.json +9 -6
- package/dist/client-CLrtWgrD.js +0 -729
- package/dist/client-factory-Bm6HsGob.js +0 -18
- package/dist/compact-aQJ0ZKhe.js +0 -278
- package/dist/conversation-binding-t0XMLz-j.js +0 -1557
- package/dist/provider-capabilities-D7hnTO76.js +0 -3201
- package/dist/rate-limit-cache-C7qmZ0Jh.js +0 -26
- package/dist/session-binding-HOuPt-E0.js +0 -338
- package/dist/shared-client-Dtx5i7Ez.js +0 -1013
package/dist/provider-catalog.js
CHANGED
|
@@ -39,11 +39,12 @@ const FALLBACK_CODEX_MODELS = [{
|
|
|
39
39
|
*/
|
|
40
40
|
function buildCodexModelDefinition(model) {
|
|
41
41
|
const id = model.id.trim() || model.model.trim();
|
|
42
|
+
const supportedReasoningEfforts = model.supportedReasoningEfforts;
|
|
42
43
|
return {
|
|
43
44
|
id,
|
|
44
45
|
name: model.displayName?.trim() || id,
|
|
45
46
|
api: "openai-chatgpt-responses",
|
|
46
|
-
reasoning:
|
|
47
|
+
reasoning: supportedReasoningEfforts !== void 0 ? supportedReasoningEfforts.length > 0 : shouldDefaultToReasoningModel(id),
|
|
47
48
|
input: model.inputModalities.includes("image") ? ["text", "image"] : ["text"],
|
|
48
49
|
cost: {
|
|
49
50
|
input: 0,
|
|
@@ -54,7 +55,8 @@ function buildCodexModelDefinition(model) {
|
|
|
54
55
|
contextWindow: DEFAULT_CONTEXT_WINDOW,
|
|
55
56
|
maxTokens: DEFAULT_MAX_TOKENS,
|
|
56
57
|
compat: {
|
|
57
|
-
supportsReasoningEffort:
|
|
58
|
+
...supportedReasoningEfforts !== void 0 ? { supportsReasoningEffort: supportedReasoningEfforts.length > 0 } : {},
|
|
59
|
+
...supportedReasoningEfforts && supportedReasoningEfforts.length > 0 ? { supportedReasoningEfforts: [...supportedReasoningEfforts] } : {},
|
|
58
60
|
supportsUsageInStreaming: true
|
|
59
61
|
}
|
|
60
62
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CODEX_APP_SERVER_AUTH_MARKER, CODEX_BASE_URL, CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS, buildCodexModelDefinition, buildCodexProviderConfig } from "./provider-catalog.js";
|
|
2
|
-
import {
|
|
3
|
-
import { d as resolveCodexAppServerRuntimeOptions, u as readCodexPluginConfig } from "./config-
|
|
2
|
+
import { r as isJsonObject } from "./protocol-2POPqAY4.js";
|
|
3
|
+
import { d as resolveCodexAppServerRuntimeOptions, u as readCodexPluginConfig } from "./config-CYEDnLJ2.js";
|
|
4
4
|
import { resolveCodexSystemPromptContribution } from "./prompt-overlay.js";
|
|
5
5
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
import { MAX_DATE_TIMESTAMP_MS, resolveExpiresAtMsFromEpochSeconds } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -410,6 +410,35 @@ const MODEL_DISCOVERY_PAGE_LIMIT = 100;
|
|
|
410
410
|
const CODEX_APP_SERVER_SETUP_METHOD_ID = "app-server";
|
|
411
411
|
const CODEX_DEFAULT_MODEL_REF = `${CODEX_PROVIDER_ID}/${FALLBACK_CODEX_MODELS[0].id}`;
|
|
412
412
|
const codexCatalogLog = createSubsystemLogger("codex/catalog");
|
|
413
|
+
const CODEX_REASONING_EFFORTS = [
|
|
414
|
+
"minimal",
|
|
415
|
+
"low",
|
|
416
|
+
"medium",
|
|
417
|
+
"high",
|
|
418
|
+
"xhigh",
|
|
419
|
+
"max",
|
|
420
|
+
"ultra"
|
|
421
|
+
];
|
|
422
|
+
const GPT_56_MAX_REASONING_EFFORTS = [
|
|
423
|
+
"low",
|
|
424
|
+
"medium",
|
|
425
|
+
"high",
|
|
426
|
+
"xhigh",
|
|
427
|
+
"max"
|
|
428
|
+
];
|
|
429
|
+
const GPT_56_ULTRA_REASONING_EFFORTS = [...GPT_56_MAX_REASONING_EFFORTS, "ultra"];
|
|
430
|
+
const GPT_56_ULTRA_MODEL_IDS = /* @__PURE__ */ new Set(["gpt-5.6-sol", "gpt-5.6-terra"]);
|
|
431
|
+
const GPT_56_MAX_MODEL_IDS = /* @__PURE__ */ new Set([...GPT_56_ULTRA_MODEL_IDS, "gpt-5.6-luna"]);
|
|
432
|
+
const GPT_56_DEFAULT_REASONING_EFFORTS = /* @__PURE__ */ new Map([
|
|
433
|
+
["gpt-5.6-sol", "low"],
|
|
434
|
+
["gpt-5.6-terra", "medium"],
|
|
435
|
+
["gpt-5.6-luna", "medium"]
|
|
436
|
+
]);
|
|
437
|
+
const GPT_5_PRO_REASONING_EFFORTS = [
|
|
438
|
+
"medium",
|
|
439
|
+
"high",
|
|
440
|
+
"xhigh"
|
|
441
|
+
];
|
|
413
442
|
/**
|
|
414
443
|
* Builds the Codex provider plugin, including setup metadata, catalog discovery,
|
|
415
444
|
* dynamic model resolution, and prompt/thinking hooks.
|
|
@@ -471,14 +500,17 @@ function buildCodexProvider(options = {}) {
|
|
|
471
500
|
startOptions: appServer.start
|
|
472
501
|
}));
|
|
473
502
|
},
|
|
474
|
-
resolveThinkingProfile: ({ modelId }) =>
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
503
|
+
resolveThinkingProfile: ({ modelId, compat }) => {
|
|
504
|
+
const efforts = resolveCodexThinkingEfforts({
|
|
505
|
+
modelId,
|
|
506
|
+
supportedReasoningEfforts: readCodexSupportedReasoningEfforts(compat)
|
|
507
|
+
});
|
|
508
|
+
const defaultLevel = GPT_56_DEFAULT_REASONING_EFFORTS.get(modelId.trim().toLowerCase());
|
|
509
|
+
return {
|
|
510
|
+
levels: [{ id: "off" }, ...efforts.map((id) => ({ id }))],
|
|
511
|
+
...defaultLevel && efforts.includes(defaultLevel) ? { defaultLevel } : {}
|
|
512
|
+
};
|
|
513
|
+
},
|
|
482
514
|
resolveSystemPromptContribution: ({ config, modelId }) => resolveCodexSystemPromptContribution({
|
|
483
515
|
config,
|
|
484
516
|
modelId
|
|
@@ -512,7 +544,7 @@ function resolveCodexDynamicModel(modelId) {
|
|
|
512
544
|
id,
|
|
513
545
|
model: id,
|
|
514
546
|
inputModalities: fallbackModel?.inputModalities ?? ["text"],
|
|
515
|
-
supportedReasoningEfforts: fallbackModel?.supportedReasoningEfforts
|
|
547
|
+
supportedReasoningEfforts: fallbackModel?.supportedReasoningEfforts
|
|
516
548
|
}),
|
|
517
549
|
provider: CODEX_PROVIDER_ID,
|
|
518
550
|
baseUrl: CODEX_BASE_URL
|
|
@@ -541,11 +573,11 @@ async function listModelsBestEffort(params) {
|
|
|
541
573
|
}
|
|
542
574
|
}
|
|
543
575
|
async function listCodexAppServerModelsLazy(options) {
|
|
544
|
-
const { listCodexAppServerModels } = await import("./models-
|
|
576
|
+
const { listCodexAppServerModels } = await import("./models-DDmO1zwd.js").then((n) => n.r);
|
|
545
577
|
return listCodexAppServerModels(options);
|
|
546
578
|
}
|
|
547
579
|
async function requestCodexAppServerRateLimitsLazy(options) {
|
|
548
|
-
const { requestCodexAppServerJson } = await import("./request-
|
|
580
|
+
const { requestCodexAppServerJson } = await import("./request-BcJyl8KL.js").then((n) => n.n);
|
|
549
581
|
return await requestCodexAppServerJson({
|
|
550
582
|
method: "account/rateLimits/read",
|
|
551
583
|
timeoutMs: options.timeoutMs,
|
|
@@ -564,21 +596,60 @@ function shouldSkipLiveDiscovery(env = process.env) {
|
|
|
564
596
|
if (override === "0" || override === "false") return true;
|
|
565
597
|
return Boolean(env.VITEST) && override !== "1";
|
|
566
598
|
}
|
|
567
|
-
function shouldDefaultToReasoningModel(modelId) {
|
|
568
|
-
const lower = modelId.toLowerCase();
|
|
569
|
-
return lower.startsWith("gpt-5") || lower.startsWith("o1") || lower.startsWith("o3") || lower.startsWith("o4");
|
|
570
|
-
}
|
|
571
599
|
function isKnownXHighCodexModel(modelId) {
|
|
572
600
|
const lower = modelId.trim().toLowerCase();
|
|
573
601
|
return lower.startsWith("gpt-5") || lower.startsWith("o3") || lower.startsWith("o4") || lower.includes("codex");
|
|
574
602
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
603
|
+
function normalizeCodexReasoningEfforts(efforts) {
|
|
604
|
+
if (!efforts) return [];
|
|
605
|
+
const supported = new Set(efforts.map((effort) => effort.trim().toLowerCase()));
|
|
606
|
+
return CODEX_REASONING_EFFORTS.filter((effort) => supported.has(effort));
|
|
607
|
+
}
|
|
608
|
+
/** Read app-server reasoning metadata from a runtime model compat union. */
|
|
609
|
+
function readCodexSupportedReasoningEfforts(compat) {
|
|
610
|
+
if (!compat || typeof compat !== "object" || Array.isArray(compat)) return;
|
|
611
|
+
const efforts = compat.supportedReasoningEfforts;
|
|
612
|
+
if (!Array.isArray(efforts)) return;
|
|
613
|
+
const strings = efforts.filter((effort) => typeof effort === "string");
|
|
614
|
+
return strings.some((effort) => effort.trim().toLowerCase() === "none") ? void 0 : strings;
|
|
615
|
+
}
|
|
616
|
+
function resolveCodexThinkingEfforts(params) {
|
|
617
|
+
if (params.supportedReasoningEfforts) return normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
618
|
+
const fallbackEfforts = resolveCodexFallbackReasoningEfforts(params.modelId);
|
|
619
|
+
if (fallbackEfforts) return [...fallbackEfforts];
|
|
620
|
+
return [
|
|
621
|
+
"minimal",
|
|
622
|
+
"low",
|
|
623
|
+
"medium",
|
|
624
|
+
"high",
|
|
625
|
+
...isKnownXHighCodexModel(params.modelId) ? ["xhigh"] : [],
|
|
626
|
+
...isMaxReasoningCodexModel(params.modelId) ? ["max"] : []
|
|
627
|
+
];
|
|
628
|
+
}
|
|
629
|
+
/** Map a requested effort onto the authoritative app-server model contract. */
|
|
630
|
+
function resolveCodexSupportedReasoningEffort(params) {
|
|
631
|
+
const supported = normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
632
|
+
if (supported.includes(params.requested)) return params.requested;
|
|
633
|
+
const fallbackEfforts = params.requested === "ultra" ? supported : supported.filter((effort) => effort !== "ultra");
|
|
634
|
+
const requestedRank = CODEX_REASONING_EFFORTS.indexOf(params.requested);
|
|
635
|
+
return fallbackEfforts.find((effort) => CODEX_REASONING_EFFORTS.indexOf(effort) >= requestedRank) ?? fallbackEfforts.at(-1);
|
|
636
|
+
}
|
|
637
|
+
/** Return the known effort contract when app-server model metadata is unavailable. */
|
|
638
|
+
function resolveCodexFallbackReasoningEfforts(modelId) {
|
|
639
|
+
const normalized = modelId.trim().toLowerCase();
|
|
640
|
+
if (GPT_56_ULTRA_MODEL_IDS.has(normalized)) return GPT_56_ULTRA_REASONING_EFFORTS;
|
|
641
|
+
if (normalized === "gpt-5.6-luna") return GPT_56_MAX_REASONING_EFFORTS;
|
|
642
|
+
if (normalized === "gpt-5.5-pro" || normalized === "gpt-5.4-pro") return GPT_5_PRO_REASONING_EFFORTS;
|
|
643
|
+
}
|
|
644
|
+
/** Return whether the model uses the modern Codex reasoning profile. */
|
|
579
645
|
function isModernCodexModel(modelId) {
|
|
580
646
|
const lower = modelId.trim().toLowerCase();
|
|
581
|
-
return lower === "gpt-5.5" || lower === "gpt-5.4" || lower === "gpt-5.4-mini" || lower === "gpt-5.3-codex-spark";
|
|
647
|
+
return GPT_56_MAX_MODEL_IDS.has(lower) || lower === "gpt-5.5" || lower === "gpt-5.5-pro" || lower === "gpt-5.4" || lower === "gpt-5.4-pro" || lower === "gpt-5.4-mini" || lower === "gpt-5.3-codex-spark";
|
|
648
|
+
}
|
|
649
|
+
/** Return whether Codex accepts the preview GPT-5.6 `max` reasoning effort. */
|
|
650
|
+
function isMaxReasoningCodexModel(modelId) {
|
|
651
|
+
const lower = modelId.trim().toLowerCase();
|
|
652
|
+
return GPT_56_MAX_MODEL_IDS.has(lower);
|
|
582
653
|
}
|
|
583
654
|
//#endregion
|
|
584
|
-
export {
|
|
655
|
+
export { readCodexSupportedReasoningEfforts as a, formatCodexUsageLimitErrorMessage as c, shouldRefreshCodexRateLimitsForUsageLimitMessage as d, summarizeCodexAccountRateLimits as f, isModernCodexModel as i, hasCodexRateLimitSnapshots as l, summarizeCodexRateLimits as m, buildCodexProviderCatalog as n, resolveCodexFallbackReasoningEfforts as o, summarizeCodexAccountUsage as p, isMaxReasoningCodexModel as r, resolveCodexSupportedReasoningEffort as s, buildCodexProvider as t, resolveCodexUsageLimitResetAtMs as u };
|
package/dist/provider.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as buildCodexProviderCatalog, r as
|
|
2
|
-
export { buildCodexProvider, buildCodexProviderCatalog, isModernCodexModel };
|
|
1
|
+
import { a as readCodexSupportedReasoningEfforts, i as isModernCodexModel, n as buildCodexProviderCatalog, o as resolveCodexFallbackReasoningEfforts, r as isMaxReasoningCodexModel, s as resolveCodexSupportedReasoningEffort, t as buildCodexProvider } from "./provider-zjPfx5Fs.js";
|
|
2
|
+
export { buildCodexProvider, buildCodexProviderCatalog, isMaxReasoningCodexModel, isModernCodexModel, readCodexSupportedReasoningEfforts, resolveCodexFallbackReasoningEfforts, resolveCodexSupportedReasoningEffort };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as getLeasedSharedCodexAppServerClient, i as createIsolatedCodexAppServerClient, l as withTimeout, o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
3
|
-
import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-
|
|
2
|
+
import { a as getLeasedSharedCodexAppServerClient, i as createIsolatedCodexAppServerClient, l as withTimeout, o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-4ICy3U6d.js";
|
|
3
|
+
import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-DA2TQfZW.js";
|
|
4
4
|
//#region extensions/codex/src/app-server/request.ts
|
|
5
5
|
var request_exports = /* @__PURE__ */ __exportAll({ requestCodexAppServerJson: () => requestCodexAppServerJson });
|
|
6
6
|
async function requestCodexAppServerJson(params) {
|