@openclaw/codex 2026.8.1-beta.3 → 2026.8.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 +5 -6
- package/dist/{attempt-client-cleanup-URjUlCHg.js → attempt-client-cleanup-CpVfwctT.js} +47 -5
- package/dist/{auth-binding-B4FfbcCg.js → auth-binding-Ds_QVm-X.js} +18 -3
- package/dist/{binding-connection-DAvZwp96.js → binding-connection-CF7BmrDk.js} +2 -2
- package/dist/{bounded-turn-4BjrZEwW.js → bounded-turn-DRC3hcjm.js} +16 -20
- package/dist/{capabilities-CH3K57v4.js → capabilities-D6m_TdVy.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-D0nZ3qtd.js → command-formatters--UToCokS.js} +4 -3
- package/dist/{command-handlers-DC86lgT4.js → command-handlers-CLFx2Ypa.js} +114 -79
- package/dist/{compact-COqgBRny.js → compact-5xqW1oCh.js} +13 -12
- package/dist/{config-CpNeo5AE.js → config-CcYL77O6.js} +350 -288
- package/dist/{conversation-binding-data-CW2GuupV.js → conversation-binding-data-BiodpIzq.js} +2 -1
- package/dist/doctor-contract-api.js +121 -16
- package/dist/{dynamic-tools-fJZhl4CE.js → dynamic-tools-BmeXjwNZ.js} +243 -1002
- package/dist/{effective-mcp-catalog-4YKn51aG.js → effective-mcp-catalog-XXQKgK1U.js} +2 -2
- package/dist/{event-projector-assistant-message-BwxV4d6N.js → event-projector-assistant-message-C5-Ds8mA.js} +18 -1
- package/dist/{event-projector-usage-CLwNEJqW.js → event-projector-usage-B2r5vhWH.js} +9 -14
- package/dist/{harness-DoKQcF8n.js → harness-BgeB7LnD.js} +42 -52
- package/dist/harness.js +1 -1
- package/dist/index.js +308 -306
- package/dist/{isolated-completion-DPMtlH9r.js → isolated-completion-CxTus3vZ.js} +4 -4
- package/dist/launch-args-sXOAg0SX.js +84 -0
- package/dist/{managed-binary-By4FZC6i.js → managed-binary-ZkGodW19.js} +43 -7
- package/dist/media-understanding-provider.js +1 -1
- package/dist/model-catalog-DULBcniB.js +101 -0
- package/dist/{models-CZw1wClT.js → models-DaWfETQk.js} +27 -29
- package/dist/{native-subagent-monitor-GGq3RnOo.js → native-subagent-monitor-vXYUZH37.js} +226 -129
- package/dist/{node-exec-server.runtime-Bsu1LdFZ.js → node-exec-server.runtime-DirKVZ5h.js} +9 -6
- package/dist/{plugin-approval-roundtrip-C75Yiiwc.js → plugin-approval-roundtrip-CCWQGlAI.js} +2 -1
- package/dist/{plugin-marketplace-discovery-CSWDkMrP.js → plugin-marketplace-discovery-BXjIFEiw.js} +38 -46
- package/dist/{plugin-metadata-cache-BXH5NF-4.js → plugin-metadata-cache-DQQm4gWT.js} +163 -136
- package/dist/{protocol-validators-VAVyEnDp.js → protocol-validators-Bg5rpNxk.js} +148 -5
- package/dist/{rate-limits-BI1dMHDG.js → rate-limits-BqHEHXQJ.js} +3 -2
- package/dist/{sandbox-guard-C1qEeZ5C.js → request-BWxweEdK.js} +183 -2
- package/dist/{run-attempt-BV3HzuCf.js → run-attempt-BVLE4Gbi.js} +706 -517
- package/dist/{runtime-artifact-BvyT1uyd.js → runtime-artifact-D9pYp4zL.js} +3 -3
- package/dist/{session-binding-BTrLf9Qm.js → session-binding-D0zinCP1.js} +195 -122
- package/dist/{session-catalog-ezP_UcRM.js → session-catalog-eMhVm0Ql.js} +448 -313
- package/dist/session-catalog-home-id-Dt2GiG5o.js +112 -0
- package/dist/{session-cli-B1hKvfkI.js → session-cli-B2lyjJA0.js} +1 -1
- package/dist/session-history-C5J1AKzG.js +87 -0
- package/dist/session-permission-policy-ScnAyG90.js +160 -0
- package/dist/session-retirement-CtUtUTr9.js +90 -0
- package/dist/{session-upstream-marker-D_2npHlA.js → session-upstream-marker-gqrYIRHk.js} +2 -3
- package/dist/settled-turn-context-Bk3IUwod.js +290 -0
- package/dist/settled-turn-finalizer-BXLN9PfJ.js +104 -0
- package/dist/{shared-client-Dw-rzii0.js → shared-client-B1tT5U6r.js} +1738 -806
- package/dist/{side-question-DbXkJZzg.js → side-question-CZ-mCw-t.js} +76 -43
- package/dist/{thread-lifecycle-DKdrnTMX.js → thread-lifecycle-CGGKP720.js} +991 -455
- package/dist/{thread-ownership-i2NBwDUL.js → thread-ownership-RkaoZCmQ.js} +18 -8
- package/dist/{plugin-app-cache-key-DMNQ8Zi8.js → thread-resume-BFt1-ZDa.js} +55 -8
- package/dist/{transcript-mirror-BU0_LKAL.js → transcript-mirror-1ep4XjzF.js} +124 -18
- package/dist/transport-stdio-NT_Dpd9V.js +724 -0
- package/dist/{upstream-prompt-provenance-CFmsKwr9.js → upstream-prompt-provenance-LphB8slG.js} +8 -4
- package/dist/{upstream-session-fork-BDVJCLAD.js → upstream-session-fork-Dc8BFExw.js} +76 -90
- package/dist/{usage-9dKJCgcy.js → usage-DUhd58gI.js} +3 -3
- package/dist/{web-search-provider.runtime-DCdx4DGu.js → web-search-provider.runtime-BEmlE7ov.js} +3 -3
- package/openclaw.plugin.json +19 -1
- package/package.json +8 -8
- package/dist/app-server-policy-bg5QPSVP.js +0 -25
- package/dist/command-rpc-xUIIonsO.js +0 -90
- package/dist/incognito-session-ET_ufDH-.js +0 -2
- package/dist/model-catalog-CmGoqVKB.js +0 -48
- package/dist/request-DSK0W6YI.js +0 -157
- package/dist/session-catalog-home-id-BNwAJ9D7.js +0 -18
- package/dist/session-retirement-CE4iMiLh.js +0 -36
- package/dist/settled-turn-finalizer-Dx1onIqg.js +0 -328
- package/dist/thread-resume-CdJk2Ehf.js +0 -30
- package/dist/transport-stdio-DhoGy33Z.js +0 -99
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as sessionBindingIdentity } from "./session-binding-
|
|
1
|
+
import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-B1tT5U6r.js";
|
|
2
|
+
import { d as sessionBindingIdentity } from "./session-binding-D0zinCP1.js";
|
|
3
3
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
5
5
|
//#region extensions/codex/src/app-server/effective-mcp-catalog.ts
|
|
@@ -69,6 +69,23 @@ function createAssistantCommentaryMessage(params, text, itemId, timestamp) {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
+
function createAssistantAsyncMessage(params, text, itemId, timestamp) {
|
|
73
|
+
const attribution = resolveCodexLocalRuntimeAttribution(params);
|
|
74
|
+
return {
|
|
75
|
+
role: "assistant",
|
|
76
|
+
content: [{
|
|
77
|
+
type: "text",
|
|
78
|
+
text
|
|
79
|
+
}],
|
|
80
|
+
api: attribution.api ?? "openai-chatgpt-responses",
|
|
81
|
+
provider: attribution.provider,
|
|
82
|
+
model: params.modelId,
|
|
83
|
+
usage: ZERO_USAGE,
|
|
84
|
+
stopReason: "stop",
|
|
85
|
+
timestamp,
|
|
86
|
+
openclawAsyncDelivery: { itemId }
|
|
87
|
+
};
|
|
88
|
+
}
|
|
72
89
|
function createAssistantMirrorMessage(params, title, text) {
|
|
73
90
|
const attribution = resolveCodexLocalRuntimeAttribution(params);
|
|
74
91
|
return {
|
|
@@ -86,4 +103,4 @@ function createAssistantMirrorMessage(params, title, text) {
|
|
|
86
103
|
};
|
|
87
104
|
}
|
|
88
105
|
//#endregion
|
|
89
|
-
export { createAttributedCodexAssistantMessage as i,
|
|
106
|
+
export { createAttributedCodexAssistantMessage as a, createAssistantMirrorMessage as i, createAssistantCommentaryMessage as n, createAssistantMessage as r, createAssistantAsyncMessage as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ht as isJsonObject } from "./shared-client-B1tT5U6r.js";
|
|
2
2
|
import { asSafeIntegerInRange, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { normalizeUsage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
4
4
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -61,7 +61,7 @@ function isCompletedAssistantNotification(notification) {
|
|
|
61
61
|
if (!isJsonObject(notification.params)) return false;
|
|
62
62
|
if (notification.method !== "item/completed") return false;
|
|
63
63
|
const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
|
|
64
|
-
return Boolean(item && readStringField(item, "type") === "agentMessage" && readStringField(item, "phase") !== "commentary");
|
|
64
|
+
return Boolean(item && readStringField(item, "type") === "agentMessage" && readStringField(item, "phase") !== "commentary" && readStringField(item, "delivery") !== "async");
|
|
65
65
|
}
|
|
66
66
|
/** Returns true for completed app-server reasoning items. */
|
|
67
67
|
function isReasoningItemCompletionNotification(notification) {
|
|
@@ -73,7 +73,7 @@ function isReasoningItemCompletionNotification(notification) {
|
|
|
73
73
|
function isAssistantCommentaryCompletionNotification(notification) {
|
|
74
74
|
if (!isJsonObject(notification.params) || notification.method !== "item/completed") return false;
|
|
75
75
|
const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
|
|
76
|
-
return Boolean(item && readStringField(item, "type") === "agentMessage" && readStringField(item, "phase") === "commentary");
|
|
76
|
+
return Boolean(item && readStringField(item, "type") === "agentMessage" && (readStringField(item, "phase") === "commentary" || readStringField(item, "delivery") === "async"));
|
|
77
77
|
}
|
|
78
78
|
/** Returns true for completed raw response reasoning items. */
|
|
79
79
|
function isRawReasoningCompletionNotification(notification) {
|
|
@@ -246,7 +246,7 @@ function readTokenCount(record, key) {
|
|
|
246
246
|
function readCodexThreadTokenUsage(params) {
|
|
247
247
|
const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
|
|
248
248
|
const last = tokenUsage && isJsonObject(tokenUsage.last) ? tokenUsage.last : void 0;
|
|
249
|
-
return last ?
|
|
249
|
+
return last ? normalizeCodexResponseTokenUsage(last) : void 0;
|
|
250
250
|
}
|
|
251
251
|
function readCodexThreadContextSnapshot(params) {
|
|
252
252
|
const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
|
|
@@ -256,7 +256,6 @@ function readCodexThreadContextSnapshot(params) {
|
|
|
256
256
|
const inputTokens = last ? readTokenCount(last, "inputTokens") : void 0;
|
|
257
257
|
const cachedInputTokens = last ? readTokenCount(last, "cachedInputTokens") : void 0;
|
|
258
258
|
const cacheWriteInputTokens = last ? readTokenCount(last, "cacheWriteInputTokens") : void 0;
|
|
259
|
-
const outputTokens = last ? readTokenCount(last, "outputTokens") : void 0;
|
|
260
259
|
const reasoningOutputTokens = last ? readTokenCount(last, "reasoningOutputTokens") : void 0;
|
|
261
260
|
return {
|
|
262
261
|
...activeContextTokens !== void 0 ? { activeContextTokens } : {},
|
|
@@ -264,7 +263,6 @@ function readCodexThreadContextSnapshot(params) {
|
|
|
264
263
|
...cacheWriteInputTokens !== void 0 ? { cacheWriteInputTokens } : {},
|
|
265
264
|
...inputTokens !== void 0 ? { inputTokens } : {},
|
|
266
265
|
...modelContextWindow && modelContextWindow > 0 ? { modelContextWindow } : {},
|
|
267
|
-
...outputTokens !== void 0 ? { outputTokens } : {},
|
|
268
266
|
...inputTokens !== void 0 ? { promptTokens: inputTokens } : {},
|
|
269
267
|
...reasoningOutputTokens !== void 0 ? { reasoningOutputTokens } : {}
|
|
270
268
|
};
|
|
@@ -274,13 +272,7 @@ function projectCodexThreadUsageUpdate(params, currentUsage, applyUsage, emitCon
|
|
|
274
272
|
const context = readCodexThreadContextSnapshot(params);
|
|
275
273
|
if (Object.keys(context).length > 0) emitContext(context);
|
|
276
274
|
}
|
|
277
|
-
function normalizeCodexThreadTokenUsage(record) {
|
|
278
|
-
return normalizeCodexTokenUsageBreakdown(record);
|
|
279
|
-
}
|
|
280
275
|
function normalizeCodexResponseTokenUsage(record) {
|
|
281
|
-
return normalizeCodexTokenUsageBreakdown(record);
|
|
282
|
-
}
|
|
283
|
-
function normalizeCodexTokenUsageBreakdown(record) {
|
|
284
276
|
const totalTokens = readTokenCount(record, "totalTokens");
|
|
285
277
|
const inputTokens = readTokenCount(record, "inputTokens");
|
|
286
278
|
const cacheRead = readTokenCount(record, "cachedInputTokens");
|
|
@@ -317,11 +309,14 @@ var CodexResponseCompletionProjection = class {
|
|
|
317
309
|
clear() {
|
|
318
310
|
this.usage = void 0;
|
|
319
311
|
}
|
|
320
|
-
record(params) {
|
|
312
|
+
record(params, reportOutputTokens) {
|
|
321
313
|
const responseId = readStringField(params, "responseId");
|
|
322
|
-
if (responseId
|
|
314
|
+
if (!responseId || this.responseIds.has(responseId)) return;
|
|
315
|
+
this.responseIds.add(responseId);
|
|
323
316
|
const usage = isJsonObject(params.usage) ? params.usage : void 0;
|
|
324
317
|
this.usage = usage ? normalizeCodexResponseTokenUsage(usage) : void 0;
|
|
318
|
+
const outputTokens = this.usage?.output;
|
|
319
|
+
if (outputTokens !== void 0) reportOutputTokens?.(outputTokens);
|
|
325
320
|
}
|
|
326
321
|
};
|
|
327
322
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { runHostPreparedIsolatedCompletion } from "openclaw/plugin-sdk/simple-completion-runtime";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/codex/src/app-server/model-runtime.ts
|
|
5
5
|
const CODEX_APP_SERVER_RUNTIME_MODEL_PARAM = "codexAppServerRuntimeModel";
|
|
@@ -40,30 +40,6 @@ const CODEX_APP_SERVER_CONTEXT_ENGINE_HOST_CAPABILITIES = [
|
|
|
40
40
|
"runtime-llm-complete",
|
|
41
41
|
"thread-bootstrap-projection"
|
|
42
42
|
];
|
|
43
|
-
async function runCodexHostPreparedIsolatedCompletion(params) {
|
|
44
|
-
const timeoutSignal = AbortSignal.timeout(params.timeoutMs);
|
|
45
|
-
const signal = params.abortSignal ? AbortSignal.any([params.abortSignal, timeoutSignal]) : timeoutSignal;
|
|
46
|
-
return { assistant: await completeWithPreparedSimpleCompletionModel({
|
|
47
|
-
model: params.model,
|
|
48
|
-
auth: params.auth,
|
|
49
|
-
cfg: params.config,
|
|
50
|
-
context: {
|
|
51
|
-
systemPrompt: params.systemPrompt,
|
|
52
|
-
messages: [{
|
|
53
|
-
role: "user",
|
|
54
|
-
content: params.prompt,
|
|
55
|
-
timestamp: Date.now()
|
|
56
|
-
}],
|
|
57
|
-
tools: []
|
|
58
|
-
},
|
|
59
|
-
options: {
|
|
60
|
-
maxTokens: params.streamParams?.maxTokens,
|
|
61
|
-
temperature: params.streamParams?.temperature,
|
|
62
|
-
reasoning: params.thinkLevel,
|
|
63
|
-
signal
|
|
64
|
-
}
|
|
65
|
-
}) };
|
|
66
|
-
}
|
|
67
43
|
async function disposeSharedCodexAppServerClients() {
|
|
68
44
|
const dispose = globalThis[SHARED_CODEX_APP_SERVER_CLIENT_DISPOSER];
|
|
69
45
|
await dispose?.();
|
|
@@ -78,6 +54,8 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
78
54
|
const providerIds = new Set([...options?.providerIds ?? DEFAULT_CODEX_HARNESS_PROVIDER_IDS].map((id) => id.trim().toLowerCase()));
|
|
79
55
|
const sessionCatalogControlFactory = options.sessionCatalogControlFactory;
|
|
80
56
|
const sessionRuntime = options.runtime;
|
|
57
|
+
let modelCatalog;
|
|
58
|
+
let disposed = false;
|
|
81
59
|
const resolveAttemptPluginConfig = (config) => resolvePluginConfigObject(config, "codex") ?? options.resolvePluginConfig?.() ?? options.pluginConfig;
|
|
82
60
|
return {
|
|
83
61
|
id: harnessRuntimeId,
|
|
@@ -99,7 +77,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
99
77
|
...sessionCatalogControlFactory && sessionRuntime ? { sessionFork: {
|
|
100
78
|
upstreamKinds: ["codex-app-server"],
|
|
101
79
|
fork: async (params) => {
|
|
102
|
-
const { forkCodexUpstreamSession } = await import("./upstream-session-fork-
|
|
80
|
+
const { forkCodexUpstreamSession } = await import("./upstream-session-fork-Dc8BFExw.js");
|
|
103
81
|
return await forkCodexUpstreamSession(params, {
|
|
104
82
|
bindingStore: options.bindingStore,
|
|
105
83
|
controlFactory: sessionCatalogControlFactory,
|
|
@@ -110,23 +88,26 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
110
88
|
}
|
|
111
89
|
} } : {},
|
|
112
90
|
authBinding: { fingerprint: async (params) => {
|
|
113
|
-
const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-
|
|
91
|
+
const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-Ds_QVm-X.js").then((n) => n.t);
|
|
114
92
|
return fingerprintCodexAppServerAuthBinding(params);
|
|
115
93
|
} },
|
|
116
94
|
runtimeArtifact: { validate: async (binding) => {
|
|
117
|
-
const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-
|
|
95
|
+
const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-D9pYp4zL.js");
|
|
118
96
|
return validateCodexAppServerRuntimeArtifact(binding);
|
|
119
97
|
} },
|
|
120
98
|
fetchUsageSnapshot: async (ctx) => {
|
|
121
|
-
const { fetchCodexAppServerUsageSnapshot } = await import("./usage-
|
|
99
|
+
const { fetchCodexAppServerUsageSnapshot } = await import("./usage-DUhd58gI.js");
|
|
122
100
|
return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
123
101
|
},
|
|
124
102
|
loadModelCatalog: async (params) => {
|
|
125
|
-
const {
|
|
126
|
-
|
|
103
|
+
const { createCodexAppServerModelCatalog } = await import("./model-catalog-DULBcniB.js");
|
|
104
|
+
if (disposed) return [];
|
|
105
|
+
modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
|
|
106
|
+
return await modelCatalog.load(params, resolveAttemptPluginConfig(params.config));
|
|
127
107
|
},
|
|
108
|
+
readModelCatalogReadiness: (params) => modelCatalog?.read(params, resolveAttemptPluginConfig(params.config)),
|
|
128
109
|
loadMcpToolCatalog: async (params) => {
|
|
129
|
-
const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-
|
|
110
|
+
const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-XXQKgK1U.js");
|
|
130
111
|
return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
|
|
131
112
|
},
|
|
132
113
|
supports: (ctx) => {
|
|
@@ -169,7 +150,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
169
150
|
};
|
|
170
151
|
},
|
|
171
152
|
runAttempt: async (params) => {
|
|
172
|
-
const { runCodexAppServerAttempt } = await import("./run-attempt-
|
|
153
|
+
const { runCodexAppServerAttempt } = await import("./run-attempt-BVLE4Gbi.js");
|
|
173
154
|
return runCodexAppServerAttempt(params, {
|
|
174
155
|
bindingStore: options.bindingStore,
|
|
175
156
|
pluginConfig: resolveAttemptPluginConfig(params.config),
|
|
@@ -179,27 +160,27 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
179
160
|
});
|
|
180
161
|
},
|
|
181
162
|
runIsolatedCompletionV2: async (params) => {
|
|
182
|
-
if (params.authorization.owner === "host")
|
|
183
|
-
|
|
184
|
-
return runCodexHostPreparedIsolatedCompletion({
|
|
185
|
-
...commonParams,
|
|
186
|
-
model: authorization.model,
|
|
187
|
-
auth: authorization.auth,
|
|
188
|
-
...authorization.sourceAuthFingerprint ? { sourceAuthFingerprint: authorization.sourceAuthFingerprint } : {}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
const { runCodexIsolatedCompletion } = await import("./isolated-completion-DPMtlH9r.js");
|
|
163
|
+
if (params.authorization.owner === "host") return runHostPreparedIsolatedCompletion(params);
|
|
164
|
+
const { runCodexIsolatedCompletion } = await import("./isolated-completion-CxTus3vZ.js");
|
|
192
165
|
return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
193
166
|
},
|
|
194
167
|
runIsolatedCompletion: async (params) => {
|
|
195
|
-
return
|
|
168
|
+
return runHostPreparedIsolatedCompletion({
|
|
169
|
+
...params,
|
|
170
|
+
authorization: {
|
|
171
|
+
owner: "host",
|
|
172
|
+
model: params.model,
|
|
173
|
+
auth: params.auth,
|
|
174
|
+
sourceAuthFingerprint: params.sourceAuthFingerprint
|
|
175
|
+
}
|
|
176
|
+
});
|
|
196
177
|
},
|
|
197
178
|
finalizeSettledTurn: async (params) => {
|
|
198
|
-
const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-
|
|
179
|
+
const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-BXLN9PfJ.js");
|
|
199
180
|
return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
200
181
|
},
|
|
201
182
|
runSideQuestion: async (params) => {
|
|
202
|
-
const { runCodexAppServerSideQuestion } = await import("./side-question-
|
|
183
|
+
const { runCodexAppServerSideQuestion } = await import("./side-question-CZ-mCw-t.js");
|
|
203
184
|
return runCodexAppServerSideQuestion(params, {
|
|
204
185
|
bindingStore: options.bindingStore,
|
|
205
186
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
@@ -209,15 +190,20 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
209
190
|
});
|
|
210
191
|
},
|
|
211
192
|
compact: async (params) => {
|
|
212
|
-
const { maybeCompactCodexAppServerSession } = await import("./compact-
|
|
193
|
+
const { maybeCompactCodexAppServerSession } = await import("./compact-5xqW1oCh.js");
|
|
213
194
|
return maybeCompactCodexAppServerSession(params, {
|
|
214
195
|
bindingStore: options.bindingStore,
|
|
215
196
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
|
|
216
197
|
});
|
|
217
198
|
},
|
|
199
|
+
withSessionDeletion: async (params, run) => {
|
|
200
|
+
const { withCodexAppServerSessionDeletion } = await import("./session-retirement-CtUtUTr9.js");
|
|
201
|
+
params.assertCurrent();
|
|
202
|
+
return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
|
|
203
|
+
},
|
|
218
204
|
reset: async (params) => {
|
|
219
|
-
if (params.sessionId) {
|
|
220
|
-
const [{ reclaimCurrentCodexSessionGeneration, sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-
|
|
205
|
+
if (params.sessionId && params.reason !== "deleted") {
|
|
206
|
+
const [{ reclaimCurrentCodexSessionGeneration, sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-D0zinCP1.js").then((n) => n.f), import("./session-retirement-CtUtUTr9.js")]);
|
|
221
207
|
const identity = sessionBindingIdentity({
|
|
222
208
|
agentId: params.agentId,
|
|
223
209
|
sessionId: params.sessionId,
|
|
@@ -226,7 +212,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
226
212
|
const resetGeneration = () => retireCodexAppServerSessionGeneration({
|
|
227
213
|
bindingStore: options.bindingStore,
|
|
228
214
|
identity,
|
|
229
|
-
mode:
|
|
215
|
+
mode: "reset"
|
|
230
216
|
});
|
|
231
217
|
let reset = await resetGeneration();
|
|
232
218
|
if (reset === "conflict") {
|
|
@@ -239,13 +225,17 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
239
225
|
if (reset === "conflict") throw new Error(`Codex binding generation changed before session ${params.sessionId} could reset`);
|
|
240
226
|
}
|
|
241
227
|
},
|
|
242
|
-
dispose:
|
|
228
|
+
dispose: async () => {
|
|
229
|
+
disposed = true;
|
|
230
|
+
modelCatalog?.dispose();
|
|
231
|
+
await disposeSharedCodexAppServerClients();
|
|
232
|
+
}
|
|
243
233
|
};
|
|
244
234
|
}
|
|
245
235
|
/** Creates the private native-compaction bridge registered in host-owned capability state. */
|
|
246
236
|
function createCodexAppServerNativeCompaction(options) {
|
|
247
237
|
return async (params) => {
|
|
248
|
-
const { maybeCompactCodexAppServerSession } = await import("./compact-
|
|
238
|
+
const { maybeCompactCodexAppServerSession } = await import("./compact-5xqW1oCh.js");
|
|
249
239
|
return maybeCompactCodexAppServerSession(params, {
|
|
250
240
|
bindingStore: options.bindingStore,
|
|
251
241
|
pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
|
package/dist/harness.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createCodexAppServerNativeCompaction, t as createCodexAppServerAgentHarness } from "./harness-
|
|
1
|
+
import { n as createCodexAppServerNativeCompaction, t as createCodexAppServerAgentHarness } from "./harness-BgeB7LnD.js";
|
|
2
2
|
export { createCodexAppServerAgentHarness, createCodexAppServerNativeCompaction };
|