@openclaw/codex 2026.8.1-beta.2 → 2026.8.1-beta.3
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 +147 -0
- package/dist/app-server-policy-bg5QPSVP.js +25 -0
- package/dist/{attempt-client-cleanup-DMLXUfa8.js → attempt-client-cleanup-URjUlCHg.js} +1 -1
- package/dist/{binding-connection-I5Bo-AsX.js → binding-connection-DAvZwp96.js} +15 -3
- package/dist/{bounded-turn-qgZmzy_4.js → bounded-turn-4BjrZEwW.js} +22 -16
- package/dist/{capabilities-CybGI1oz.js → capabilities-CH3K57v4.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{command-formatters-B1AEz8ZA.js → command-formatters-D0nZ3qtd.js} +2 -2
- package/dist/{command-handlers-Db8pu_ds.js → command-handlers-DC86lgT4.js} +39 -22
- package/dist/command-rpc-xUIIonsO.js +90 -0
- package/dist/{compact-LspQaGfl.js → compact-COqgBRny.js} +35 -29
- package/dist/{session-binding-DPxIvMgE.js → config-CpNeo5AE.js} +28 -888
- package/dist/context-compaction-activity-BOeJf7yo.js +58 -0
- package/dist/doctor-contract-api.js +15 -14
- package/dist/{dynamic-tools-BVdyWkUD.js → dynamic-tools-fJZhl4CE.js} +1284 -651
- package/dist/{effective-mcp-catalog-DIIhAtOZ.js → effective-mcp-catalog-4YKn51aG.js} +2 -2
- package/dist/elicitation-input-DMkeki8d.js +71 -0
- package/dist/{event-projector-usage-e5huIQWu.js → event-projector-usage-CLwNEJqW.js} +16 -16
- package/dist/harness-DoKQcF8n.js +258 -0
- package/dist/harness.js +2 -226
- package/dist/index.js +171 -48
- package/dist/{isolated-completion-C58NbL40.js → isolated-completion-DPMtlH9r.js} +3 -3
- package/dist/managed-binary-By4FZC6i.js +212 -0
- package/dist/media-understanding-provider.js +2 -2
- package/dist/model-catalog-CmGoqVKB.js +48 -0
- package/dist/{models-BFlpn1Ex.js → models-CZw1wClT.js} +2 -2
- package/dist/{native-subagent-monitor-DyTGmTUx.js → native-subagent-monitor-GGq3RnOo.js} +185 -71
- package/dist/node-exec-server.runtime-Bsu1LdFZ.js +192 -0
- package/dist/{plugin-app-cache-key-C3H2CVp6.js → plugin-app-cache-key-DMNQ8Zi8.js} +15 -3
- package/dist/plugin-approval-roundtrip-C75Yiiwc.js +95 -0
- package/dist/{plugin-marketplace-discovery-CzrGJdCR.js → plugin-marketplace-discovery-CSWDkMrP.js} +40 -26
- package/dist/{plugin-metadata-cache-CNJPj4_b.js → plugin-metadata-cache-BXH5NF-4.js} +8 -5
- package/dist/{protocol-validators-B4F7L8Rf.js → protocol-validators-VAVyEnDp.js} +55 -2
- package/dist/{rate-limits-DZXmOL8-.js → rate-limits-BI1dMHDG.js} +1 -1
- package/dist/{request-BRl5_UfX.js → request-DSK0W6YI.js} +2 -2
- package/dist/{run-attempt-P8BdxC1I.js → run-attempt-BV3HzuCf.js} +1098 -666
- package/dist/{runtime-artifact-BVSPdd6g.js → runtime-artifact-BvyT1uyd.js} +4 -7
- package/dist/{sandbox-guard-Cmwc9eIk.js → sandbox-guard-C1qEeZ5C.js} +25 -19
- package/dist/session-binding-BTrLf9Qm.js +874 -0
- package/dist/{session-catalog-xwNi_SDM.js → session-catalog-ezP_UcRM.js} +1541 -1296
- package/dist/session-catalog-home-id-BNwAJ9D7.js +18 -0
- package/dist/{session-cli-7hgXZDV7.js → session-cli-B1hKvfkI.js} +20 -7
- package/dist/{session-retirement-DoMMJFKm.js → session-retirement-CE4iMiLh.js} +3 -3
- package/dist/{session-upstream-marker-CrIFX06J.js → session-upstream-marker-D_2npHlA.js} +1 -1
- package/dist/{settled-turn-finalizer-BRWBO4MO.js → settled-turn-finalizer-Dx1onIqg.js} +23 -19
- package/dist/{shared-client-kIBbGjk4.js → shared-client-Dw-rzii0.js} +755 -273
- package/dist/{side-question-9HAL26l9.js → side-question-DbXkJZzg.js} +52 -30
- package/dist/{thread-lifecycle-Bu1BTDXr.js → thread-lifecycle-DKdrnTMX.js} +310 -92
- package/dist/{thread-ownership-6kOQHlyC.js → thread-ownership-i2NBwDUL.js} +2 -2
- package/dist/{thread-resume-CPrJNQVM.js → thread-resume-CdJk2Ehf.js} +3 -3
- package/dist/{transcript-mirror-B9gGgnJS.js → transcript-mirror-BU0_LKAL.js} +46 -28
- package/dist/{transport-stdio-DIImwDVS.js → transport-stdio-DhoGy33Z.js} +2 -2
- package/dist/{upstream-prompt-provenance-ClRBije0.js → upstream-prompt-provenance-CFmsKwr9.js} +12 -14
- package/dist/{upstream-session-fork-CE-_LdnP.js → upstream-session-fork-BDVJCLAD.js} +12 -6
- package/dist/{usage-CHlV0e-o.js → usage-9dKJCgcy.js} +3 -3
- package/dist/{web-search-provider.runtime-DRw2Vl42.js → web-search-provider.runtime-DCdx4DGu.js} +3 -3
- package/openclaw.plugin.json +31 -1
- package/package.json +6 -5
- package/dist/app-server-policy-zcBDc1JU.js +0 -49
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _ as readCodexNotificationTurnId, a as closeCodexStartupClientBestEffort, d as unsubscribeCodexThreadBestEffort, g as readCodexNotificationThreadId, r as CodexAppServerUnsafeSubscriptionError, s as isCodexAlreadyTerminalInterruptError } from "./attempt-client-cleanup-
|
|
4
|
-
import { i as readCodexThreadContextSnapshot, x as readCodexNotificationItem } from "./event-projector-usage-
|
|
1
|
+
import { B as CodexAppServerRpcError, U as consumeCodexAppServerLiveThread, Y as retainCodexAppServerLiveThread, a as getLeasedSharedCodexAppServerClient, l as releaseLeasedSharedCodexAppServerClient, ut as isJsonObject } from "./shared-client-Dw-rzii0.js";
|
|
2
|
+
import { d as sessionBindingIdentity, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-BTrLf9Qm.js";
|
|
3
|
+
import { _ as readCodexNotificationTurnId, a as closeCodexStartupClientBestEffort, d as unsubscribeCodexThreadBestEffort, g as readCodexNotificationThreadId, r as CodexAppServerUnsafeSubscriptionError, s as isCodexAlreadyTerminalInterruptError } from "./attempt-client-cleanup-URjUlCHg.js";
|
|
4
|
+
import { i as readCodexThreadContextSnapshot, x as readCodexNotificationItem } from "./event-projector-usage-CLwNEJqW.js";
|
|
5
5
|
import { t as isIncognitoSessionKey } from "./incognito-session-ET_ufDH-.js";
|
|
6
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
7
|
-
import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-
|
|
8
|
-
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
9
|
-
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
6
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-CdJk2Ehf.js";
|
|
7
|
+
import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-C1qEeZ5C.js";
|
|
8
|
+
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-i2NBwDUL.js";
|
|
9
|
+
import { n as resolveCodexBindingAppServerConnection } from "./binding-connection-DAvZwp96.js";
|
|
10
|
+
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-BOeJf7yo.js";
|
|
10
11
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
12
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
12
13
|
import { embeddedAgentLog, resolveCompactionTimeoutMs } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
13
|
-
import { resolveAgentDir as resolveAgentDir$1
|
|
14
|
+
import { resolveAgentDir as resolveAgentDir$1 } from "openclaw/plugin-sdk/agent-runtime";
|
|
15
|
+
import { resolveDefaultAgentId as resolveDefaultAgentId$1 } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
14
16
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
17
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
16
18
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
@@ -54,6 +56,8 @@ function watchCodexNativeCompactionCompletion(params) {
|
|
|
54
56
|
};
|
|
55
57
|
const complete = () => finish({
|
|
56
58
|
completed: true,
|
|
59
|
+
...compactionTurnId ? { turnId: compactionTurnId } : {},
|
|
60
|
+
...compactionItemId ? { itemId: compactionItemId } : {},
|
|
57
61
|
...tokensAfter !== void 0 ? { tokensAfter } : {}
|
|
58
62
|
});
|
|
59
63
|
const fail = (reason) => finish({
|
|
@@ -235,11 +239,9 @@ function readIgnoredCompactionOverridePaths(params) {
|
|
|
235
239
|
const ignored = /* @__PURE__ */ new Set();
|
|
236
240
|
for (const entry of readCompactionOverrideEntries(params)) {
|
|
237
241
|
const localProvider = typeof entry.record.provider === "string" ? entry.record.provider.trim() : "";
|
|
238
|
-
const inheritedProvider = !localProvider && typeof entry.inheritedRecord?.provider === "string" ? entry.inheritedRecord.provider.trim() : "";
|
|
239
|
-
const providerPath = localProvider ? `${entry.path}.compaction.provider` : inheritedProvider && entry.inheritedPath ? `${entry.inheritedPath}.compaction.provider` : void 0;
|
|
240
242
|
if (typeof entry.record.model === "string" && entry.record.model.trim()) ignored.add(`${entry.path}.compaction.model`);
|
|
241
243
|
if (typeof entry.record.thinkingLevel === "string" && entry.record.thinkingLevel.trim()) ignored.add(`${entry.path}.compaction.thinkingLevel`);
|
|
242
|
-
if (
|
|
244
|
+
if (localProvider) ignored.add(`${entry.path}.compaction.provider`);
|
|
243
245
|
}
|
|
244
246
|
return [...ignored];
|
|
245
247
|
}
|
|
@@ -250,17 +252,6 @@ function readCompactionOverrideEntries(params) {
|
|
|
250
252
|
path: "agents.defaults",
|
|
251
253
|
record: defaultRecord
|
|
252
254
|
});
|
|
253
|
-
const agentId = readAgentIdFromSessionKey(params.sessionKey ?? params.sandboxSessionKey);
|
|
254
|
-
if (!agentId) return entries;
|
|
255
|
-
const agentRecord = asOptionalRecord((Array.isArray(params.config?.agents?.list) ? params.config.agents.list : []).find((agent) => {
|
|
256
|
-
return (typeof agent?.id === "string" ? agent.id.trim().toLowerCase() : "") === agentId;
|
|
257
|
-
})?.compaction);
|
|
258
|
-
if (agentRecord) entries.push({
|
|
259
|
-
path: `agents.list.${agentId}`,
|
|
260
|
-
record: agentRecord,
|
|
261
|
-
inheritedRecord: defaultRecord,
|
|
262
|
-
inheritedPath: "agents.defaults"
|
|
263
|
-
});
|
|
264
255
|
return entries;
|
|
265
256
|
}
|
|
266
257
|
function readAgentIdFromSessionKey(sessionKey) {
|
|
@@ -291,6 +282,7 @@ async function compactCodexNativeThread(params, options) {
|
|
|
291
282
|
config: params.config,
|
|
292
283
|
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
293
284
|
sessionId: params.sessionId,
|
|
285
|
+
agentId: params.agentId,
|
|
294
286
|
sandbox,
|
|
295
287
|
surface: "native compaction"
|
|
296
288
|
});
|
|
@@ -325,7 +317,7 @@ async function compactCodexNativeThread(params, options) {
|
|
|
325
317
|
let connection;
|
|
326
318
|
try {
|
|
327
319
|
const config = params.config ?? {};
|
|
328
|
-
const agentId = params.agentId ?? readAgentIdFromSessionKey(params.sessionKey) ?? resolveDefaultAgentId(config);
|
|
320
|
+
const agentId = params.agentId ?? readAgentIdFromSessionKey(params.sessionKey) ?? resolveDefaultAgentId$1(config);
|
|
329
321
|
connection = resolveCodexBindingAppServerConnection({
|
|
330
322
|
binding,
|
|
331
323
|
authProfileId: requestedAuthProfileId ?? binding.authProfileId,
|
|
@@ -431,27 +423,30 @@ async function compactCodexNativeThread(params, options) {
|
|
|
431
423
|
result: skippedCodexNativeCompactionResult(params, {
|
|
432
424
|
reason: "codex app-server compaction aborted before native compaction",
|
|
433
425
|
code: "aborted_before_native_compaction",
|
|
426
|
+
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
434
427
|
expectedThreadId: binding.threadId,
|
|
435
428
|
currentThreadId: currentBinding?.threadId
|
|
436
429
|
})
|
|
437
430
|
};
|
|
438
431
|
}
|
|
439
432
|
if (!currentBinding || !isSameNativeCompactionBinding(currentBinding, binding)) {
|
|
440
|
-
embeddedAgentLog.warn("
|
|
433
|
+
embeddedAgentLog.warn("codex app-server compaction could not use the thread binding because it changed", {
|
|
441
434
|
sessionId: params.sessionId,
|
|
442
435
|
sessionKey: params.sessionKey,
|
|
443
436
|
expectedThreadId: binding.threadId,
|
|
444
437
|
currentThreadId: currentBinding?.threadId
|
|
445
438
|
});
|
|
439
|
+
const isRequiredPreflight = options.nativeCompactionRequest === "required_preflight";
|
|
446
440
|
return {
|
|
447
441
|
started: false,
|
|
448
|
-
result: options.allowNonManualNativeRequest ? skippedCodexNativeCompactionResult(params, {
|
|
442
|
+
result: options.allowNonManualNativeRequest && !isRequiredPreflight ? skippedCodexNativeCompactionResult(params, {
|
|
449
443
|
reason: "codex app-server binding changed before native compaction",
|
|
450
444
|
code: "binding_changed_before_native_compaction",
|
|
445
|
+
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
451
446
|
expectedThreadId: binding.threadId,
|
|
452
447
|
currentThreadId: currentBinding?.threadId
|
|
453
448
|
}) : failedCodexThreadBindingCompactionResult(params, {
|
|
454
|
-
threadId: binding.threadId,
|
|
449
|
+
threadId: currentBinding?.threadId ?? binding.threadId,
|
|
455
450
|
reason: "codex app-server binding changed before native compaction",
|
|
456
451
|
recovery: "stale_thread_binding"
|
|
457
452
|
})
|
|
@@ -502,6 +497,16 @@ async function compactCodexNativeThread(params, options) {
|
|
|
502
497
|
const completion = await completionWatch.completion;
|
|
503
498
|
if (!completion.completed) throw new Error(completion.reason);
|
|
504
499
|
tokensAfter = completion.tokensAfter;
|
|
500
|
+
if (completion.turnId && completion.itemId) await persistCodexContextCompactionActivity({
|
|
501
|
+
sessionTarget: params.sessionTarget,
|
|
502
|
+
config: params.config,
|
|
503
|
+
cwd: params.workspaceDir,
|
|
504
|
+
runId: params.runId,
|
|
505
|
+
threadId: binding.threadId,
|
|
506
|
+
turnId: completion.turnId,
|
|
507
|
+
itemId: completion.itemId,
|
|
508
|
+
timestamp: Date.now()
|
|
509
|
+
});
|
|
505
510
|
embeddedAgentLog.info("completed codex app-server compaction", {
|
|
506
511
|
sessionId: params.sessionId,
|
|
507
512
|
threadId: binding.threadId
|
|
@@ -545,7 +550,7 @@ async function compactCodexNativeThread(params, options) {
|
|
|
545
550
|
pending: false,
|
|
546
551
|
completed: true,
|
|
547
552
|
...options.allowNonManualNativeRequest ? {
|
|
548
|
-
request: "after_context_engine",
|
|
553
|
+
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
549
554
|
trigger: params.trigger ?? "unknown"
|
|
550
555
|
} : {}
|
|
551
556
|
};
|
|
@@ -560,6 +565,7 @@ async function compactCodexNativeThread(params, options) {
|
|
|
560
565
|
if (options.allowNonManualNativeRequest) return skippedCodexNativeCompactionResult(params, {
|
|
561
566
|
reason: "codex app-server compaction aborted before native compaction",
|
|
562
567
|
code: "aborted_before_native_compaction",
|
|
568
|
+
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
563
569
|
expectedThreadId: initialBinding.threadId,
|
|
564
570
|
currentThreadId: binding.threadId
|
|
565
571
|
});
|
|
@@ -594,7 +600,7 @@ function skippedCodexNativeCompactionResult(params, skipped) {
|
|
|
594
600
|
backend: "codex-app-server",
|
|
595
601
|
skipped: true,
|
|
596
602
|
reason: skipped.code,
|
|
597
|
-
request: "after_context_engine",
|
|
603
|
+
request: skipped.request ?? "after_context_engine",
|
|
598
604
|
trigger: params.trigger ?? "unknown",
|
|
599
605
|
...skipped.expectedThreadId ? { expectedThreadId: skipped.expectedThreadId } : {},
|
|
600
606
|
...skipped.currentThreadId ? { currentThreadId: skipped.currentThreadId } : {}
|