@openclaw/codex 2026.9.1 → 2026.9.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/dist/api.js +6 -6
- package/dist/{attempt-client-cleanup-DYHcRQAa.js → attempt-client-cleanup-Bp1ZOnk2.js} +76 -32
- package/dist/{attempt-context-DmQUNWwT.js → attempt-context-CSazkWns.js} +6 -6
- package/dist/{bounded-turn-wzJrwKKe.js → bounded-turn-DxGJRYbY.js} +46 -45
- package/dist/{capabilities-dIjNVCYH.js → capabilities-B1mgvpP8.js} +2 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-CLHhEB1Q.js → command-formatters-DSbGMXA0.js} +2 -2
- package/dist/{command-handlers-CTGb2csu.js → command-handlers-DOJvGv6-.js} +146 -74
- package/dist/{compact-_t0HQrUS.js → compact-Y_xBqrHN.js} +83 -48
- package/dist/{config-BhmfC1s6.js → config-CyapYSji.js} +47 -105
- package/dist/config-utils-C57JiJrU.js +69 -0
- package/dist/doctor-contract-api.js +4 -5
- package/dist/{dynamic-tools-BU9tmlYm.js → dynamic-tools-BwpvTxaX.js} +678 -638
- package/dist/{effective-mcp-catalog-DzYBW4h1.js → effective-mcp-catalog-CY9Jn4bA.js} +4 -3
- package/dist/{event-projector-assistant-message-DHRFXKbS.js → event-projector-assistant-message-B9kp6iGC.js} +11 -2
- package/dist/{event-projector-usage-C5mcrGjp.js → event-projector-usage-ZqEVbAEY.js} +30 -13
- package/dist/{harness-DXVZ5II5.js → harness-Czh2Sdoc.js} +36 -13
- package/dist/harness.js +1 -1
- package/dist/{image-payload-sanitizer-CnfoUPCE.js → image-payload-sanitizer-tupAr-2o.js} +29 -15
- package/dist/index.js +68 -84
- package/dist/{isolated-completion-kg9kv4iH.js → isolated-completion-CRh-51AK.js} +9 -21
- package/dist/{managed-binary-4-Vjz5GH.js → managed-binary-DcpnJF9x.js} +105 -73
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{model-catalog-CUM68Hkl.js → model-catalog-DT5vo6qo.js} +5 -5
- package/dist/{models-sYnEc0gd.js → models-CcrgSMQR.js} +4 -4
- package/dist/{native-subagent-monitor-CnH147jH.js → native-subagent-monitor-B3bvQGcg.js} +12 -11
- package/dist/{node-exec-server.runtime-CstNHCmC.js → node-exec-server.runtime-nfbUOtUB.js} +3 -3
- package/dist/{plugin-approval-roundtrip-CNe-Xrjx.js → plugin-approval-roundtrip-aQVdyL5g.js} +1 -1
- package/dist/{plugin-marketplace-discovery-CfFlKqDl.js → plugin-marketplace-discovery-B7gHXJ3d.js} +35 -22
- package/dist/{plugin-metadata-cache-BFrPhb2c.js → plugin-metadata-cache-BwCLTY_U.js} +5 -5
- package/dist/{provider-capabilities-DW5p4k9w.js → provider-capabilities-BpG9Ltc5.js} +2 -2
- package/dist/{rate-limits-CawQJfUS.js → rate-limits-Fx_l4eNa.js} +1 -1
- package/dist/{request-DYAI5FQE.js → request-C8H22rPi.js} +2 -2
- package/dist/{run-attempt-D1hJO4fX.js → run-attempt-BzthFQSM.js} +977 -723
- package/dist/{runtime-artifact-C3jVimFn.js → runtime-artifact-Bh_gf6-t.js} +3 -3
- package/dist/{session-binding-BHuTCRZQ.js → session-binding-4Ki04sW-.js} +94 -282
- package/dist/session-binding-record-CyaXZvTe.js +270 -0
- package/dist/{session-catalog-yyvTWFOw.js → session-catalog-B47uwekb.js} +266 -114
- package/dist/{session-cli-CmFEXMAM.js → session-cli-BjLhpmS1.js} +1 -1
- package/dist/session-history-DWmMqiqW.js +93 -0
- package/dist/session-history-read-LHldwvyh.js +36 -0
- package/dist/session-history-worker-runtime.js +48 -0
- package/dist/{settled-turn-context-D3SNWtUn.js → session-history.worker-zZVcx0ME.js} +30 -31
- package/dist/session-history.worker.js +2 -0
- package/dist/{session-initialization-BeWzjGiR.js → session-initialization-BCFVnLL4.js} +2 -1
- package/dist/{session-permission-policy-DeWVTCMj.js → session-permission-policy-BaueHmSj.js} +1 -1
- package/dist/{session-retirement-BujDjXVF.js → session-retirement-DNdmYdFc.js} +7 -7
- package/dist/{session-upstream-marker-C351-5Qw.js → session-upstream-marker-DReTpGz6.js} +4 -3
- package/dist/settled-turn-context-BOM3Y1pl.js +45 -0
- package/dist/{settled-turn-finalizer-BVJx4yoc.js → settled-turn-finalizer-BI-b1sry.js} +53 -42
- package/dist/{shared-client-DxcfF9KX.js → shared-client-CKhX2kFt.js} +279 -268
- package/dist/{side-question-BTZAII4l.js → side-question-B6DWAw1A.js} +85 -36
- package/dist/{thread-lifecycle-DAcEJ_Om.js → thread-lifecycle-DPK30jad.js} +382 -388
- package/dist/{thread-ownership-zGokd8i1.js → thread-ownership-CbucAmmp.js} +5 -5
- package/dist/thread-policy-CTalhWFy.js +105 -0
- package/dist/{thread-resume-C7pyVKeW.js → thread-resume-BLgqkUc1.js} +7 -7
- package/dist/{transcript-mirror-DTUxFWa_.js → transcript-mirror-_njEB84z.js} +67 -125
- package/dist/transcript-mirror-attestation-Byl34PC-.js +76 -0
- package/dist/{transport-stdio-CyPldczm.js → transport-stdio-CzTngV0j.js} +10 -8
- package/dist/{upstream-session-fork-CYlBIGVt.js → upstream-session-fork-1fwbNKzQ.js} +85 -165
- package/dist/{usage-Bj-rrzkR.js → usage-i9fv5-4m.js} +3 -3
- package/dist/{web-search-provider.runtime-D2FWSK4w.js → web-search-provider.runtime-DKQn67A7.js} +3 -3
- package/package.json +6 -6
- package/dist/binding-connection-E6uDsPlx.js +0 -45
- package/dist/launch-args-RXQwn8zV.js +0 -90
- package/dist/session-history-C5J1AKzG.js +0 -87
- package/dist/thread-policy-g4KbJPzp.js +0 -54
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { n as sanitizeCodexHistoryImagePayloads } from "./image-payload-sanitizer-CnfoUPCE.js";
|
|
2
|
-
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import fs from "node:fs/promises";
|
|
4
|
-
import { getSessionEntry, parseSqliteSessionFileMarker, resolveTranscriptSessionKeyBySessionId } from "openclaw/plugin-sdk/session-store-runtime";
|
|
5
|
-
import { SessionManager, buildSessionContext, migrateSessionEntries, parseSessionEntries } from "openclaw/plugin-sdk/agent-sessions";
|
|
6
|
-
//#region extensions/codex/src/app-server/session-history.ts
|
|
7
|
-
/** Reads model context separately from full-fidelity Codex mirror evidence. */
|
|
8
|
-
/** Returns sanitized session-context messages for consumers that need an owned array. */
|
|
9
|
-
async function readCodexMirroredSessionHistoryMessages(target, admission, view = "native-evidence") {
|
|
10
|
-
return readCodexMirroredSessionHistory(target, (messages) => Array.from(messages), admission, view);
|
|
11
|
-
}
|
|
12
|
-
/** The synchronous consumer can reject before further SQLite message payloads are acquired. */
|
|
13
|
-
async function readCodexMirroredSessionHistory(target, read, admission, view = "native-evidence") {
|
|
14
|
-
const consume = (messages, header, imageLabel = "codex mirrored history") => {
|
|
15
|
-
if (!isRecord(header) || header.type !== "session") return read([]);
|
|
16
|
-
if (typeof header.id !== "string") return;
|
|
17
|
-
if (header.id !== target.sessionId) return read([]);
|
|
18
|
-
return read((function* () {
|
|
19
|
-
for (const message of messages) yield sanitizeCodexHistoryImagePayloads(message, imageLabel);
|
|
20
|
-
})());
|
|
21
|
-
};
|
|
22
|
-
const readTarget = (transcriptTarget) => {
|
|
23
|
-
if (view === "native-evidence") return SessionManager.readSessionContext(transcriptTarget, consume, { admission });
|
|
24
|
-
const loaded = SessionManager.openModelContext(transcriptTarget, { admission });
|
|
25
|
-
return consume(loaded.buildSessionContext().messages, loaded.getHeader(), "codex mirrored model context");
|
|
26
|
-
};
|
|
27
|
-
try {
|
|
28
|
-
if (target.sessionTarget) {
|
|
29
|
-
const { agentId, sessionId, sessionKey, storePath } = target.sessionTarget;
|
|
30
|
-
if (!agentId || !sessionId || !sessionKey || !storePath || sessionId !== target.sessionId || target.agentId !== void 0 && agentId !== target.agentId || target.sessionKey !== void 0 && sessionKey !== target.sessionKey) return read([]);
|
|
31
|
-
return readTarget({
|
|
32
|
-
agentId,
|
|
33
|
-
sessionId,
|
|
34
|
-
sessionKey,
|
|
35
|
-
storePath
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
const sqliteMarker = parseSqliteSessionFileMarker(target.sessionFile);
|
|
39
|
-
if (sqliteMarker) {
|
|
40
|
-
if (sqliteMarker.sessionId !== target.sessionId || target.agentId !== void 0 && sqliteMarker.agentId !== target.agentId) return read([]);
|
|
41
|
-
const sessionKey = resolveSqliteMarkerSessionKey(target, sqliteMarker);
|
|
42
|
-
if (!sessionKey) return read([]);
|
|
43
|
-
return readTarget({
|
|
44
|
-
agentId: sqliteMarker.agentId,
|
|
45
|
-
sessionId: sqliteMarker.sessionId,
|
|
46
|
-
sessionKey,
|
|
47
|
-
storePath: sqliteMarker.storePath
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (admission) {
|
|
51
|
-
if (admission.sessionId !== target.sessionId || target.agentId !== void 0 && admission.agentId !== target.agentId || target.sessionKey !== void 0 && admission.sessionKey !== target.sessionKey) return read([]);
|
|
52
|
-
return readTarget({
|
|
53
|
-
agentId: admission.agentId,
|
|
54
|
-
sessionId: admission.sessionId,
|
|
55
|
-
sessionKey: admission.sessionKey,
|
|
56
|
-
storePath: admission.storePath
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
const entries = parseSessionEntries(await fs.readFile(target.sessionFile, "utf-8"));
|
|
60
|
-
return consume((function* () {
|
|
61
|
-
migrateSessionEntries(entries);
|
|
62
|
-
const sessionEntries = entries.filter((entry) => isRecord(entry) && entry.type !== "session");
|
|
63
|
-
yield* buildSessionContext(sessionEntries).messages;
|
|
64
|
-
})(), entries[0]);
|
|
65
|
-
} catch (error) {
|
|
66
|
-
if (isRecord(error) && error.code === "ENOENT") return read([]);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function resolveSqliteMarkerSessionKey(target, marker) {
|
|
71
|
-
const explicitSessionKey = target.sessionKey?.trim();
|
|
72
|
-
if (explicitSessionKey) {
|
|
73
|
-
const explicitEntry = getSessionEntry({
|
|
74
|
-
agentId: marker.agentId,
|
|
75
|
-
sessionKey: explicitSessionKey,
|
|
76
|
-
storePath: marker.storePath
|
|
77
|
-
});
|
|
78
|
-
if (explicitEntry) return explicitEntry.sessionId === marker.sessionId ? explicitSessionKey : void 0;
|
|
79
|
-
}
|
|
80
|
-
return resolveTranscriptSessionKeyBySessionId({
|
|
81
|
-
agentId: marker.agentId,
|
|
82
|
-
sessionId: marker.sessionId,
|
|
83
|
-
storePath: marker.storePath
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
export { readCodexMirroredSessionHistoryMessages as n, readCodexMirroredSessionHistory as t };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { H as isCodexAppServerOverloadError, U as isCodexAppServerPrewriteRequestCancellationError } from "./shared-client-DxcfF9KX.js";
|
|
2
|
-
import { r as requestCodexAppServerClientJson, t as CodexAppServerScopedRequestRejectedError } from "./request-DYAI5FQE.js";
|
|
3
|
-
import { AgentHarnessPreflightError } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
4
|
-
//#region extensions/codex/src/app-server/thread-policy.ts
|
|
5
|
-
/** A refusal, not a failed native write: the ephemeral conversation must stay alive. */
|
|
6
|
-
var CodexIncognitoPolicyChangeError = class extends AgentHarnessPreflightError {
|
|
7
|
-
constructor() {
|
|
8
|
-
super("Codex cannot change generic instructions in a live incognito conversation. No turn was sent and the conversation is preserved. Restore the previous instructions to continue it, or start a new incognito conversation for the changed policy.");
|
|
9
|
-
this.name = "CodexIncognitoPolicyChangeError";
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
/** Never replay a handoff: native persistence can precede an unsuccessful RPC response. */
|
|
13
|
-
var CodexThreadPolicyHandoffError = class extends AgentHarnessPreflightError {
|
|
14
|
-
constructor(outcome, cause) {
|
|
15
|
-
super(`Codex session policy handoff failed: ${cause instanceof Error ? cause.message : String(cause)}. The conversation is preserved; reconnect before retrying.`, { cause });
|
|
16
|
-
this.outcome = outcome;
|
|
17
|
-
this.name = "CodexThreadPolicyHandoffError";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
/** The complete body remains generic configuration for compaction and native child inheritance. */
|
|
21
|
-
async function refreshCodexThreadPolicy(params) {
|
|
22
|
-
const text = "The following is the complete current OpenClaw-supplied generic instruction policy. It replaces earlier OpenClaw-supplied generic policy, including OpenClaw-carried workspace text and sections now absent. Independently supplied native managed, guardian, security, collaboration, and project instructions retain their authority. User requests retain their own authority.\n\n" + (params.developerInstructions === "" ? "The current OpenClaw generic policy is empty; earlier OpenClaw generic policy is withdrawn." : params.developerInstructions);
|
|
23
|
-
let outcome = "unknown";
|
|
24
|
-
try {
|
|
25
|
-
await requestCodexAppServerClientJson({
|
|
26
|
-
...params,
|
|
27
|
-
method: "thread/inject_items",
|
|
28
|
-
requestParams: {
|
|
29
|
-
threadId: params.threadId,
|
|
30
|
-
items: [{
|
|
31
|
-
type: "message",
|
|
32
|
-
role: "developer",
|
|
33
|
-
content: [{
|
|
34
|
-
type: "input_text",
|
|
35
|
-
text
|
|
36
|
-
}]
|
|
37
|
-
}]
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
outcome = "acknowledged";
|
|
41
|
-
params.assertCurrent();
|
|
42
|
-
params.signal?.throwIfAborted();
|
|
43
|
-
} catch (cause) {
|
|
44
|
-
if (outcome !== "acknowledged" && (cause instanceof CodexAppServerScopedRequestRejectedError || isCodexAppServerPrewriteRequestCancellationError(cause) || isCodexAppServerOverloadError(cause))) outcome = "not-written";
|
|
45
|
-
throw new CodexThreadPolicyHandoffError(outcome, cause);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** Native lineage classifies the exact bound thread; it never grants session authority. */
|
|
49
|
-
function assertCodexSupervisionThreadLineage(binding, thread) {
|
|
50
|
-
if (binding.connectionScope !== "supervision" || binding.pendingSupervisionBranch) return;
|
|
51
|
-
if (thread.id !== binding.threadId || !binding.supervisionSourceThreadId || thread.forkedFromId !== null && (typeof thread.forkedFromId !== "string" || !thread.forkedFromId.trim() || thread.forkedFromId === thread.id)) throw new Error("Codex supervision lineage could not be verified; reconnect before continuing.");
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
54
|
-
export { refreshCodexThreadPolicy as i, CodexThreadPolicyHandoffError as n, assertCodexSupervisionThreadLineage as r, CodexIncognitoPolicyChangeError as t };
|