@openclaw/codex 2026.7.2-beta.7 → 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-BSaO2JIT.js → app-server-policy-zcBDc1JU.js} +1 -1
- package/dist/attempt-client-cleanup-DMLXUfa8.js +735 -0
- package/dist/{notification-correlation-CU6_AnOb.js → binding-connection-I5Bo-AsX.js} +3 -37
- package/dist/{bounded-turn-D2ZAgZVz.js → bounded-turn-qgZmzy_4.js} +50 -49
- package/dist/{capabilities-BFDTVYr4.js → capabilities-CybGI1oz.js} +8 -2
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-C336eRVS.js → command-formatters-B1AEz8ZA.js} +18 -18
- package/dist/{command-handlers-DAHUSry9.js → command-handlers-Db8pu_ds.js} +484 -95
- package/dist/{compact-D_uvHurS.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-D2gYkSBO.js → dynamic-tools-BVdyWkUD.js} +2597 -1221
- package/dist/{effective-mcp-catalog-Bbd98Inw.js → effective-mcp-catalog-DIIhAtOZ.js} +20 -15
- package/dist/{event-projector-assistant-message-DTgnPPVF.js → event-projector-assistant-message-BwxV4d6N.js} +11 -23
- package/dist/{attempt-notifications-AP-a-Q5k.js → event-projector-usage-e5huIQWu.js} +113 -29
- package/dist/harness.js +80 -14
- package/dist/image-payload-sanitizer-CnfoUPCE.js +65 -0
- package/dist/index.js +591 -240
- 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-BBMKU4jA.js → models-BFlpn1Ex.js} +12 -17
- package/dist/native-subagent-monitor-DyTGmTUx.js +3111 -0
- package/dist/{plugin-app-cache-key-DztPafOA.js → plugin-app-cache-key-C3H2CVp6.js} +5 -5
- package/dist/plugin-marketplace-discovery-CzrGJdCR.js +385 -0
- package/dist/{computer-use-CYEc8U3w.js → plugin-metadata-cache-CNJPj4_b.js} +105 -5
- package/dist/protocol-validators-B4F7L8Rf.js +2346 -0
- package/dist/{rate-limits-CU-gVCCS.js → rate-limits-DZXmOL8-.js} +17 -35
- package/dist/{request-qKh331yu.js → request-BRl5_UfX.js} +3 -3
- package/dist/{run-attempt-CY9WlDLc.js → run-attempt-P8BdxC1I.js} +4837 -9047
- package/dist/{runtime-artifact-CmtG_t1L.js → runtime-artifact-BVSPdd6g.js} +8 -23
- package/dist/{sandbox-guard-NuhpXmPB.js → sandbox-guard-Cmwc9eIk.js} +6 -13
- package/dist/{session-binding-BXpo9ymA.js → session-binding-DPxIvMgE.js} +246 -265
- package/dist/{session-catalog-DyOgR4WH.js → session-catalog-xwNi_SDM.js} +159 -109
- package/dist/{session-cli-2PZaFLRh.js → session-cli-7hgXZDV7.js} +1 -1
- package/dist/session-retirement-DoMMJFKm.js +36 -0
- package/dist/{session-upstream-marker-B6U7tLw5.js → session-upstream-marker-CrIFX06J.js} +1 -1
- package/dist/{settled-turn-finalizer-CXY2Z9dT.js → settled-turn-finalizer-BRWBO4MO.js} +21 -13
- package/dist/{shared-client-DTbvH-XV.js → shared-client-kIBbGjk4.js} +587 -223
- package/dist/{side-question-_ulBk1AL.js → side-question-9HAL26l9.js} +101 -52
- package/dist/{thread-lifecycle-DF53ogiA.js → thread-lifecycle-Bu1BTDXr.js} +694 -753
- package/dist/thread-ownership-6kOQHlyC.js +92 -0
- package/dist/thread-resume-CPrJNQVM.js +30 -0
- package/dist/transcript-mirror-B9gGgnJS.js +570 -0
- 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-Dy4Xvuoj.js → upstream-session-fork-CE-_LdnP.js} +5 -5
- package/dist/{usage-CQ6GhD5-.js → usage-CHlV0e-o.js} +3 -3
- package/dist/{web-search-provider.runtime-CCFhg2z5.js → web-search-provider.runtime-DRw2Vl42.js} +8 -9
- package/openclaw.plugin.json +18 -3
- package/package.json +5 -5
- package/dist/conversation-control-xsIeXbo4.js +0 -287
- package/dist/event-projector-usage-Xp4AlR2k.js +0 -86
- package/dist/transcript-mirror-DzsdNCf5.js +0 -6924
package/dist/{conversation-binding-data-BHRpYbX3.js → conversation-binding-data-CW2GuupV.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
+
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
-
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
//#region extensions/codex/src/conversation-binding-data.ts
|
|
6
6
|
var conversation_binding_data_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -77,10 +77,10 @@ function readCodexConversationBindingDataRecord(data) {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
function readConversationSource(value) {
|
|
80
|
-
const agentId =
|
|
81
|
-
const sessionId =
|
|
82
|
-
const threadId =
|
|
83
|
-
const sessionKey =
|
|
80
|
+
const agentId = normalizeOptionalString(value?.agentId);
|
|
81
|
+
const sessionId = normalizeOptionalString(value?.sessionId);
|
|
82
|
+
const threadId = normalizeOptionalString(value?.threadId);
|
|
83
|
+
const sessionKey = normalizeOptionalString(value?.sessionKey);
|
|
84
84
|
if (!agentId || !sessionId || !threadId) return;
|
|
85
85
|
return {
|
|
86
86
|
agentId,
|
|
@@ -94,11 +94,7 @@ function legacyCodexConversationBindingId(sessionFile) {
|
|
|
94
94
|
return `legacy-${createHash("sha256").update(sessionFile).digest("base64url")}`;
|
|
95
95
|
}
|
|
96
96
|
function resolveCodexDefaultWorkspaceDir(pluginConfig) {
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
function readString(record, key) {
|
|
100
|
-
const value = record?.[key];
|
|
101
|
-
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
97
|
+
return normalizeOptionalString(asOptionalRecord(asOptionalRecord(pluginConfig)?.appServer)?.defaultWorkspaceDir) ?? process.cwd();
|
|
102
98
|
}
|
|
103
99
|
function readConversationStart(value) {
|
|
104
100
|
const read = (key) => {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { n as CODEX_APP_SERVER_BINDING_NAMESPACE, t as CODEX_APP_SERVER_BINDING_MAX_ENTRIES } from "./session-binding-meta-B7aEMU7g.js";
|
|
2
|
+
import { asNullableRecord, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
3
|
import fs from "node:fs/promises";
|
|
3
4
|
import path from "node:path";
|
|
4
|
-
import { listAgentIds, resolveAgentDir, resolveSessionAgentIds } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
5
|
import { isDeepStrictEqual } from "node:util";
|
|
6
|
-
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
|
-
import { patchSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
8
6
|
import { canonicalPathFromExistingAncestor, isPathInside, pathExists } from "openclaw/plugin-sdk/security-runtime";
|
|
7
|
+
import { listAgentIds, resolveAgentDir, resolveSessionAgentIds } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
9
8
|
import { withFileLock } from "openclaw/plugin-sdk/file-lock";
|
|
10
|
-
import { archiveLegacyStateSource, legacyStateFileExists } from "openclaw/plugin-sdk/runtime-doctor";
|
|
9
|
+
import { archiveLegacyStateSource, legacyStateFileExists } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
11
10
|
//#region extensions/codex/src/migration/session-binding-sidecars.ts
|
|
12
11
|
const LEGACY_BINDING_SUFFIX = ".codex-app-server.json";
|
|
13
12
|
const CODEX_AGENT_HARNESS_ID = "codex";
|
|
@@ -22,6 +21,7 @@ const LEGACY_BINDING_LOCK_OPTIONS = {
|
|
|
22
21
|
stale: 12e4
|
|
23
22
|
};
|
|
24
23
|
async function collectSessionSurfaces(params) {
|
|
24
|
+
const { resolveStorePath } = await import("openclaw/plugin-sdk/session-store-runtime");
|
|
25
25
|
const surfaces = /* @__PURE__ */ new Map();
|
|
26
26
|
const stateRoot = await canonicalPathFromExistingAncestor(params.stateDir);
|
|
27
27
|
const add = async (root, storePath, agentId, scan) => {
|
|
@@ -34,7 +34,7 @@ async function collectSessionSurfaces(params) {
|
|
|
34
34
|
};
|
|
35
35
|
surface.scan ||= scan;
|
|
36
36
|
surface.storePaths.add(path.resolve(storePath));
|
|
37
|
-
surface.agentIds.add(agentId);
|
|
37
|
+
if (agentId) surface.agentIds.add(agentId);
|
|
38
38
|
surfaces.set(canonicalRoot, surface);
|
|
39
39
|
};
|
|
40
40
|
const agentIds = new Set(listAgentIds(params.config));
|
|
@@ -58,8 +58,11 @@ async function collectSessionSurfaces(params) {
|
|
|
58
58
|
await add(root, storePath, agentId, isPathInside(stateRoot, await canonicalPathFromExistingAncestor(root)));
|
|
59
59
|
}
|
|
60
60
|
const legacyRoot = path.join(params.stateDir, "sessions");
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const legacyOwner = tryResolveLegacyBindingOwnerAgentId({
|
|
62
|
+
sessionKey: "",
|
|
63
|
+
config: params.config
|
|
64
|
+
});
|
|
65
|
+
await add(legacyRoot, path.join(legacyRoot, "sessions.json"), legacyOwner, true);
|
|
63
66
|
return [...surfaces.values()].toSorted((a, b) => a.root.localeCompare(b.root));
|
|
64
67
|
}
|
|
65
68
|
async function collectLegacyBindingSources(params, options = {}) {
|
|
@@ -164,6 +167,7 @@ async function* walkSidecars(root) {
|
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
async function collectBindingOwners(sources, surfaces, params) {
|
|
170
|
+
const { resolveStorePath } = await import("openclaw/plugin-sdk/session-store-runtime");
|
|
167
171
|
const sourcePaths = new Set(await Promise.all(sources.map((source) => canonicalPathFromExistingAncestor(source.transcriptPath))));
|
|
168
172
|
const owners = /* @__PURE__ */ new Map();
|
|
169
173
|
const storePaths = new Set(surfaces.flatMap((surface) => [...surface.storePaths]));
|
|
@@ -184,11 +188,15 @@ async function collectBindingOwners(sources, surfaces, params) {
|
|
|
184
188
|
const sessionsDir = path.dirname(storePath);
|
|
185
189
|
for (const { sessionKey, entry } of index.entries) {
|
|
186
190
|
const sessionId = entry.sessionId;
|
|
187
|
-
const agentId =
|
|
191
|
+
const agentId = tryResolveLegacyBindingOwnerAgentId({
|
|
188
192
|
sessionKey,
|
|
189
193
|
config: params.config,
|
|
190
194
|
storeAgentIds: storeAgentIds.get(storePath)
|
|
191
195
|
});
|
|
196
|
+
if (!agentId) {
|
|
197
|
+
failures.push(`session index ${storePath} has an ambiguous owner for ${sessionKey}`);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
192
200
|
let legacyTranscriptPath;
|
|
193
201
|
let canonicalLegacyTranscriptPath;
|
|
194
202
|
try {
|
|
@@ -246,6 +254,14 @@ function resolveLegacyBindingOwnerAgentId(params) {
|
|
|
246
254
|
...storeAgentId ? { agentId: storeAgentId } : {}
|
|
247
255
|
}).sessionAgentId;
|
|
248
256
|
}
|
|
257
|
+
function tryResolveLegacyBindingOwnerAgentId(params) {
|
|
258
|
+
try {
|
|
259
|
+
return resolveLegacyBindingOwnerAgentId(params);
|
|
260
|
+
} catch (error) {
|
|
261
|
+
if (error.code === "AGENT_SELECTION_REQUIRED") return;
|
|
262
|
+
throw error;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
249
265
|
function copyBindingForSession(stored, sessionId) {
|
|
250
266
|
return stored.state === "active" ? {
|
|
251
267
|
version: 1,
|
|
@@ -276,7 +292,7 @@ async function migrateSource(source, candidates, params, store) {
|
|
|
276
292
|
return await withFileLock(source.sidecarPath, LEGACY_BINDING_LOCK_OPTIONS, async () => {
|
|
277
293
|
const [contents, stat] = await Promise.all([fs.readFile(source.sidecarPath, "utf8"), fs.stat(source.sidecarPath)]);
|
|
278
294
|
const raw = JSON.parse(contents);
|
|
279
|
-
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-
|
|
295
|
+
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-DPxIvMgE.js").then((n) => n.f), import("./conversation-binding-data-CW2GuupV.js").then((n) => n.t)]);
|
|
280
296
|
const agentId = owner?.agentId ?? (source.agentIds.size === 1 ? [...source.agentIds][0] : void 0);
|
|
281
297
|
const baseStored = createStoredCodexAppServerBinding(raw, {
|
|
282
298
|
now: stat.mtime.toISOString(),
|
|
@@ -398,6 +414,7 @@ async function migrateSource(source, candidates, params, store) {
|
|
|
398
414
|
}
|
|
399
415
|
}
|
|
400
416
|
async function recordSessionOwner(owner, env) {
|
|
417
|
+
const { patchSessionEntry } = await import("openclaw/plugin-sdk/session-store-runtime");
|
|
401
418
|
const currentIndex = await readLegacySessionIndex(owner.storePath);
|
|
402
419
|
if ("failure" in currentIndex) return "its legacy session owner could not be revalidated";
|
|
403
420
|
const currentOwner = currentIndex.entries.find(({ sessionKey }) => sessionKey === owner.sessionKey);
|
|
@@ -509,21 +526,18 @@ const stateMigrations = [{
|
|
|
509
526
|
}];
|
|
510
527
|
//#endregion
|
|
511
528
|
//#region extensions/codex/doctor-contract-api.ts
|
|
512
|
-
function asRecord(value) {
|
|
513
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
514
|
-
}
|
|
515
529
|
function hasRetiredDynamicToolsProfile(value) {
|
|
516
|
-
return Object.hasOwn(
|
|
530
|
+
return Object.hasOwn(asNullableRecord(value) ?? {}, "codexDynamicToolsProfile");
|
|
517
531
|
}
|
|
518
532
|
function hasLegacyPluginDestructivePolicy(value) {
|
|
519
|
-
const codexPlugins =
|
|
533
|
+
const codexPlugins = asNullableRecord(value);
|
|
520
534
|
if (!codexPlugins) return false;
|
|
521
535
|
if (codexPlugins.allow_destructive_actions === "on-request") return true;
|
|
522
|
-
const plugins =
|
|
523
|
-
return Object.values(plugins ?? {}).some((plugin) =>
|
|
536
|
+
const plugins = asNullableRecord(codexPlugins.plugins);
|
|
537
|
+
return Object.values(plugins ?? {}).some((plugin) => asNullableRecord(plugin)?.allow_destructive_actions === "on-request");
|
|
524
538
|
}
|
|
525
539
|
function hasRetiredOnFailureApprovalPolicy(value) {
|
|
526
|
-
return
|
|
540
|
+
return asNullableRecord(value)?.approvalPolicy === "on-failure";
|
|
527
541
|
}
|
|
528
542
|
/** Legacy Codex config keys that doctor should report or repair. */
|
|
529
543
|
const legacyConfigRules = [
|
|
@@ -564,9 +578,9 @@ const legacyConfigRules = [
|
|
|
564
578
|
* Removes retired Codex plugin config keys while preserving unrelated config.
|
|
565
579
|
*/
|
|
566
580
|
function normalizeCompatibilityConfig({ cfg }) {
|
|
567
|
-
const rawPluginConfig =
|
|
568
|
-
const rawCodexPlugins =
|
|
569
|
-
const rawAppServer =
|
|
581
|
+
const rawPluginConfig = asNullableRecord(asNullableRecord(cfg.plugins?.entries?.codex)?.config);
|
|
582
|
+
const rawCodexPlugins = asNullableRecord(rawPluginConfig?.codexPlugins);
|
|
583
|
+
const rawAppServer = asNullableRecord(rawPluginConfig?.appServer);
|
|
570
584
|
const shouldRemoveDynamicToolsProfile = rawPluginConfig !== null && hasRetiredDynamicToolsProfile(rawPluginConfig);
|
|
571
585
|
const shouldRewriteDestructivePolicy = hasLegacyPluginDestructivePolicy(rawCodexPlugins);
|
|
572
586
|
const shouldRewriteApprovalPolicy = hasRetiredOnFailureApprovalPolicy(rawAppServer);
|
|
@@ -575,7 +589,7 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
575
589
|
changes: []
|
|
576
590
|
};
|
|
577
591
|
const nextConfig = structuredClone(cfg);
|
|
578
|
-
const nextPluginConfig =
|
|
592
|
+
const nextPluginConfig = asNullableRecord(asNullableRecord(asNullableRecord(asNullableRecord(nextConfig.plugins)?.entries)?.codex)?.config);
|
|
579
593
|
if (!nextPluginConfig) return {
|
|
580
594
|
config: cfg,
|
|
581
595
|
changes: []
|
|
@@ -586,17 +600,17 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
586
600
|
changes.push("Removed retired plugins.entries.codex.config.codexDynamicToolsProfile; Codex app-server always keeps Codex-native workspace tools native.");
|
|
587
601
|
}
|
|
588
602
|
if (shouldRewriteDestructivePolicy) {
|
|
589
|
-
const nextCodexPlugins =
|
|
603
|
+
const nextCodexPlugins = asNullableRecord(nextPluginConfig.codexPlugins);
|
|
590
604
|
if (nextCodexPlugins?.allow_destructive_actions === "on-request") nextCodexPlugins.allow_destructive_actions = "auto";
|
|
591
|
-
const nextPluginPolicies =
|
|
605
|
+
const nextPluginPolicies = asNullableRecord(nextCodexPlugins?.plugins);
|
|
592
606
|
for (const plugin of Object.values(nextPluginPolicies ?? {})) {
|
|
593
|
-
const nextPlugin =
|
|
607
|
+
const nextPlugin = asNullableRecord(plugin);
|
|
594
608
|
if (nextPlugin?.allow_destructive_actions === "on-request") nextPlugin.allow_destructive_actions = "auto";
|
|
595
609
|
}
|
|
596
610
|
changes.push("Renamed plugins.entries.codex.config.codexPlugins allow_destructive_actions=\"on-request\" values to \"auto\".");
|
|
597
611
|
}
|
|
598
612
|
if (shouldRewriteApprovalPolicy) {
|
|
599
|
-
const nextAppServer =
|
|
613
|
+
const nextAppServer = asNullableRecord(nextPluginConfig.appServer);
|
|
600
614
|
if (nextAppServer?.approvalPolicy === "on-failure") nextAppServer.approvalPolicy = "on-request";
|
|
601
615
|
changes.push("Renamed plugins.entries.codex.config.appServer.approvalPolicy=\"on-failure\" to \"on-request\".");
|
|
602
616
|
}
|
|
@@ -605,22 +619,5 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
605
619
|
changes
|
|
606
620
|
};
|
|
607
621
|
}
|
|
608
|
-
/** Session/auth ownership metadata used by doctor route-state checks. */
|
|
609
|
-
const sessionRouteStateOwners = [{
|
|
610
|
-
id: "codex",
|
|
611
|
-
label: "Codex",
|
|
612
|
-
providerIds: [
|
|
613
|
-
"codex",
|
|
614
|
-
"codex-cli",
|
|
615
|
-
"openai-codex"
|
|
616
|
-
],
|
|
617
|
-
runtimeIds: ["codex", "codex-cli"],
|
|
618
|
-
cliSessionKeys: ["codex-cli"],
|
|
619
|
-
authProfilePrefixes: [
|
|
620
|
-
"codex:",
|
|
621
|
-
"codex-cli:",
|
|
622
|
-
"openai-codex:"
|
|
623
|
-
]
|
|
624
|
-
}];
|
|
625
622
|
//#endregion
|
|
626
|
-
export { legacyConfigRules, normalizeCompatibilityConfig,
|
|
623
|
+
export { legacyConfigRules, normalizeCompatibilityConfig, stateMigrations };
|