@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { T as readCodexPluginConfig, h as resolveCodexAppServerHomeScope } from "./session-binding-DPxIvMgE.js";
|
|
2
|
+
import { ct as isJsonObject, rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-kIBbGjk4.js";
|
|
3
|
+
import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-qgZmzy_4.js";
|
|
4
|
+
import { i as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BwxV4d6N.js";
|
|
5
|
+
//#region extensions/codex/src/app-server/isolated-completion.ts
|
|
6
|
+
const ISOLATED_PASSIVE_ITEM_TYPES = /* @__PURE__ */ new Set(["agentMessage", "reasoning"]);
|
|
7
|
+
function assertIsolatedCompletionItems(items, prompt) {
|
|
8
|
+
let promptEchoSeen = false;
|
|
9
|
+
for (const item of items) {
|
|
10
|
+
if (ISOLATED_PASSIVE_ITEM_TYPES.has(item.type)) continue;
|
|
11
|
+
if (item.type === "userMessage" && !promptEchoSeen) {
|
|
12
|
+
const content = Array.isArray(item.content) ? item.content : [];
|
|
13
|
+
const input = content[0];
|
|
14
|
+
if (content.length === 1 && isJsonObject(input) && input.type === "text" && input.text === prompt) {
|
|
15
|
+
promptEchoSeen = true;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`Codex isolated completion returned unexpected native item: ${item.type}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/** Runs prompt-only Codex inference on an ephemeral, ring-zero native thread. */
|
|
23
|
+
async function runCodexIsolatedCompletion(params, options) {
|
|
24
|
+
const authorization = params.authorization;
|
|
25
|
+
if (authorization.owner !== "harness") throw new Error("Codex native isolated completion requires harness-owned authorization.");
|
|
26
|
+
const pluginConfig = readCodexPluginConfig(options.pluginConfig);
|
|
27
|
+
const authRequirement = authorization.plan.modelRoute?.authRequirement;
|
|
28
|
+
const authHandoff = await resolveCodexAppServerPreparedAuthHandoff({
|
|
29
|
+
authRequirement,
|
|
30
|
+
authProfileId: authorization.plan.forwardedAuthProfileId,
|
|
31
|
+
authProfileStore: authorization.authProfileStore,
|
|
32
|
+
agentDir: params.agentDir,
|
|
33
|
+
homeScope: resolveCodexAppServerHomeScope({ appServer: pluginConfig.appServer }),
|
|
34
|
+
config: params.config,
|
|
35
|
+
subscriptionProfileRequiredError: "Prepared Codex subscription route requires a scoped native OAuth or token profile.",
|
|
36
|
+
subscriptionProfileUnusableError: `Prepared Codex auth profile "${authorization.plan.forwardedAuthProfileId}" is unusable.`
|
|
37
|
+
});
|
|
38
|
+
const authSelection = authHandoff.preparedAuth ? { preparedAuth: authHandoff.preparedAuth } : { profile: authHandoff.authProfileId };
|
|
39
|
+
const result = await runBoundedCodexAppServerTurn({
|
|
40
|
+
config: params.config,
|
|
41
|
+
model: {
|
|
42
|
+
mode: "required",
|
|
43
|
+
id: params.modelId
|
|
44
|
+
},
|
|
45
|
+
...authSelection,
|
|
46
|
+
authRequirement,
|
|
47
|
+
timeoutMs: params.timeoutMs,
|
|
48
|
+
signal: params.abortSignal,
|
|
49
|
+
agentDir: params.agentDir,
|
|
50
|
+
authProfileStore: authorization.authProfileStore,
|
|
51
|
+
options,
|
|
52
|
+
taskLabel: "isolated completion",
|
|
53
|
+
developerInstructions: params.systemPrompt,
|
|
54
|
+
input: [{
|
|
55
|
+
type: "text",
|
|
56
|
+
text: params.prompt,
|
|
57
|
+
text_elements: []
|
|
58
|
+
}],
|
|
59
|
+
requiredModalities: ["text"],
|
|
60
|
+
isolation: "configured-transport",
|
|
61
|
+
requireNoExternalCapabilities: true
|
|
62
|
+
});
|
|
63
|
+
assertIsolatedCompletionItems(result.items, params.prompt);
|
|
64
|
+
return { assistant: createAttributedCodexAssistantMessage({
|
|
65
|
+
api: "openai-chatgpt-responses",
|
|
66
|
+
provider: params.provider,
|
|
67
|
+
modelId: result.model
|
|
68
|
+
}, result.text, {
|
|
69
|
+
tokenUsage: result.usage,
|
|
70
|
+
aborted: false,
|
|
71
|
+
promptError: null
|
|
72
|
+
}) };
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { runCodexIsolatedCompletion };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
//#region extensions/codex/src/app-server/local-runtime-attribution.ts
|
|
3
|
+
const OPENAI_PROVIDER_ID = "openai";
|
|
4
|
+
const OPENAI_RESPONSES_API = "openai-responses";
|
|
5
|
+
const OPENAI_CODEX_RESPONSES_API = "openai-chatgpt-responses";
|
|
6
|
+
/** Maps local Codex runtime plans onto the provider/api pair exposed to event projection. */
|
|
7
|
+
function resolveCodexLocalRuntimeAttribution(params) {
|
|
8
|
+
const authProfileProvider = normalizeLowercaseStringOrEmpty(params.runtimePlan?.auth?.authProfileProviderForAuth);
|
|
9
|
+
if (normalizeLowercaseStringOrEmpty(params.runtimePlan?.observability.harnessId) === "codex" && authProfileProvider !== OPENAI_PROVIDER_ID && normalizeLowercaseStringOrEmpty(params.model.provider) === OPENAI_PROVIDER_ID && normalizeLowercaseStringOrEmpty(params.model.api) === OPENAI_RESPONSES_API) return {
|
|
10
|
+
provider: OPENAI_PROVIDER_ID,
|
|
11
|
+
api: OPENAI_CODEX_RESPONSES_API
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
provider: params.provider,
|
|
15
|
+
api: params.model.api
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { resolveCodexLocalRuntimeAttribution as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-
|
|
1
|
+
import { t as runBoundedCodexAppServerTurn } from "./bounded-turn-qgZmzy_4.js";
|
|
2
2
|
import { validateJsonSchemaValue } from "openclaw/plugin-sdk/json-schema-runtime";
|
|
3
|
+
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
4
|
//#region extensions/codex/media-understanding-provider.ts
|
|
4
5
|
/**
|
|
5
6
|
* Codex-backed media understanding provider for bounded image description and
|
|
@@ -49,6 +50,7 @@ async function describeCodexImages(req, options) {
|
|
|
49
50
|
mode: "required",
|
|
50
51
|
id: model
|
|
51
52
|
},
|
|
53
|
+
modelProvider: "openai",
|
|
52
54
|
profile: req.profile,
|
|
53
55
|
timeoutMs: req.timeoutMs,
|
|
54
56
|
signal: req.signal,
|
|
@@ -86,6 +88,7 @@ async function extractCodexStructured(req, options) {
|
|
|
86
88
|
mode: "required",
|
|
87
89
|
id: model
|
|
88
90
|
},
|
|
91
|
+
modelProvider: "openai",
|
|
89
92
|
profile: req.profile,
|
|
90
93
|
timeoutMs: req.timeoutMs,
|
|
91
94
|
signal: req.signal,
|
|
@@ -138,9 +141,6 @@ function buildStructuredExtractionPrompt(req) {
|
|
|
138
141
|
req.jsonMode === false ? "Return the extraction as concise text." : "Return valid JSON only. Do not wrap the JSON in Markdown fences."
|
|
139
142
|
].filter((part) => Boolean(part)).join("\n\n");
|
|
140
143
|
}
|
|
141
|
-
function isJsonSchemaObject(value) {
|
|
142
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
143
|
-
}
|
|
144
144
|
function normalizeStructuredExtractionResult(params) {
|
|
145
145
|
const result = {
|
|
146
146
|
text: params.text,
|
|
@@ -154,7 +154,7 @@ function normalizeStructuredExtractionResult(params) {
|
|
|
154
154
|
} catch {
|
|
155
155
|
throw new Error("Codex structured extraction returned invalid JSON.");
|
|
156
156
|
}
|
|
157
|
-
if (
|
|
157
|
+
if (isRecord(params.req.jsonSchema)) {
|
|
158
158
|
const validation = validateJsonSchemaValue({
|
|
159
159
|
schema: params.req.jsonSchema,
|
|
160
160
|
cacheKey: "codex.media-understanding.extractStructured",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { t as assertCodexModelListResponse } from "./protocol-validators-B4F7L8Rf.js";
|
|
2
|
+
import { normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/codex/src/app-server/models.ts
|
|
4
4
|
/**
|
|
5
5
|
* Lists and normalizes models exposed by the Codex app-server `model/list`
|
|
@@ -40,7 +40,7 @@ async function listAllCodexAppServerModels(options = {}) {
|
|
|
40
40
|
async function withCodexAppServerModelClient(options, run) {
|
|
41
41
|
const timeoutMs = options.timeoutMs ?? 2500;
|
|
42
42
|
const useSharedClient = options.sharedClient !== false;
|
|
43
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-
|
|
43
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-kIBbGjk4.js").then((n) => n.m);
|
|
44
44
|
const client = useSharedClient ? await getLeasedSharedCodexAppServerClient({
|
|
45
45
|
startOptions: options.startOptions,
|
|
46
46
|
timeoutMs,
|
|
@@ -75,9 +75,8 @@ async function requestModelListPage(client, options) {
|
|
|
75
75
|
}
|
|
76
76
|
/** Parses a raw Codex app-server model/list response into OpenClaw's normalized shape. */
|
|
77
77
|
function readModelListResult(value) {
|
|
78
|
-
const response =
|
|
79
|
-
|
|
80
|
-
const models = response.data.map((entry) => readCodexModel(entry)).filter((entry) => entry !== void 0);
|
|
78
|
+
const response = assertCodexModelListResponse(value);
|
|
79
|
+
const models = response.data.map((entry) => readCodexModel(entry));
|
|
81
80
|
const nextCursor = response.nextCursor ?? void 0;
|
|
82
81
|
return {
|
|
83
82
|
models,
|
|
@@ -85,27 +84,23 @@ function readModelListResult(value) {
|
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
86
|
function readCodexModel(value) {
|
|
88
|
-
const id =
|
|
89
|
-
const model =
|
|
90
|
-
if (!id || !model)
|
|
87
|
+
const id = normalizeOptionalString(value.id);
|
|
88
|
+
const model = normalizeOptionalString(value.model);
|
|
89
|
+
if (!id || !model) throw new Error("Invalid Codex app-server model/list response: model id and name must be non-empty strings");
|
|
91
90
|
return {
|
|
92
91
|
id,
|
|
93
92
|
model,
|
|
94
|
-
...
|
|
95
|
-
...
|
|
93
|
+
...normalizeOptionalString(value.displayName) ? { displayName: normalizeOptionalString(value.displayName) } : {},
|
|
94
|
+
...normalizeOptionalString(value.description) ? { description: normalizeOptionalString(value.description) } : {},
|
|
96
95
|
hidden: value.hidden,
|
|
97
96
|
isDefault: value.isDefault,
|
|
98
97
|
inputModalities: value.inputModalities,
|
|
99
98
|
supportedReasoningEfforts: readReasoningEfforts(value.supportedReasoningEfforts),
|
|
100
|
-
...
|
|
99
|
+
...normalizeOptionalString(value.defaultReasoningEffort) ? { defaultReasoningEffort: normalizeOptionalString(value.defaultReasoningEffort) } : {}
|
|
101
100
|
};
|
|
102
101
|
}
|
|
103
102
|
function readReasoningEfforts(value) {
|
|
104
|
-
return uniqueStrings(value.map((entry) =>
|
|
105
|
-
}
|
|
106
|
-
function readNonEmptyString(value) {
|
|
107
|
-
if (typeof value !== "string") return;
|
|
108
|
-
return value.trim() || void 0;
|
|
103
|
+
return uniqueStrings(value.map((entry) => normalizeOptionalString(entry.reasoningEffort)).filter((entry) => entry !== void 0));
|
|
109
104
|
}
|
|
110
105
|
function normalizeMaxPages(value) {
|
|
111
106
|
return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : 20;
|