@openclaw/codex 2026.9.4 → 2026.9.6
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/account-usage-runtime-Eem_WGqY.mjs +75 -0
- package/dist/{apply-CvT8tW5i.js → .setup/apply-DDOi8uNx.mjs} +24 -30
- package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
- package/dist/{attempt-client-cleanup-DKHzbwt5.js → .setup/attempt-client-cleanup-CEv1cKwF.mjs} +79 -49
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +331 -0
- package/dist/{auth-binding-CWlKVccJ.js → .setup/auth-binding-DhLWa_7K.mjs} +1 -1
- package/dist/{auth-cache-key-7orQae_j.js → .setup/auth-cache-key-B2mpaI9D.mjs} +9 -81
- package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/binding-connection-ThoatDcb.mjs +50 -0
- package/dist/.setup/binding-connection.runtime-yoHrABt-.mjs +48 -0
- package/dist/{bounded-turn-C_Hneydj.js → .setup/bounded-turn-B2HScEgT.mjs} +143 -32
- package/dist/{build-state-BCmg9-5p.js → .setup/build-state-C7EnDVgr.mjs} +1 -1
- package/dist/{capabilities-8vx68WLH.js → .setup/capabilities-CDXOOFdZ.mjs} +1 -1
- package/dist/{client-B57KWPQx.js → .setup/client-Cs08OXVQ.mjs} +705 -512
- package/dist/.setup/client-catalog-response-BMgt_4q4.mjs +285 -0
- package/dist/{command-dispatch-BpduNGVf.js → .setup/command-dispatch-B4JuOsOk.mjs} +8 -4
- package/dist/{command-formatters-lxlkNZgU.js → .setup/command-formatters-Bmqvr9tO.mjs} +8 -4
- package/dist/{command-handlers-tiL9iWj7.js → .setup/command-handlers-DW7Lx9oH.mjs} +137 -186
- package/dist/{command-rpc-CR5EOEZX.js → .setup/command-rpc-DixIj3HW.mjs} +47 -23
- package/dist/{compact-B_H3AOd7.js → .setup/compact-Du5UvtxA.mjs} +29 -51
- package/dist/{config-oIORaQ5T.js → .setup/config-BoTP_mrL.mjs} +5 -4
- package/dist/{config-options-CXMq1T-C.js → .setup/config-options-BvaRs51b.mjs} +50 -446
- package/dist/{protocol-5bh1G-H7.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
- package/dist/{config-runtime-D0zGNIHu.js → .setup/config-runtime-C8Rw1m1m.mjs} +2 -2
- package/dist/.setup/config-security-BEReZ6go.mjs +380 -0
- package/dist/{conversation-binding-DsB4-O7U.js → .setup/conversation-binding-DP-gMrBP.mjs} +29 -38
- package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
- package/dist/{conversation-control-CtUu1b3m.js → .setup/conversation-control-uK9Jomlc.mjs} +32 -67
- package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
- package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
- package/dist/{dynamic-tools-CmN5RAip.js → .setup/dynamic-tools-BDXl-8Cw.mjs} +936 -620
- package/dist/{effective-mcp-catalog-Bd73bqA8.js → .setup/effective-mcp-catalog-CvnvnGIe.mjs} +3 -3
- package/dist/{ephemeral-turn-D78_VmzO.js → .setup/ephemeral-turn-poidXgek.mjs} +9 -7
- package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-BsruvNrH.mjs} +8 -7
- package/dist/{event-projector-items-5VhsECCO.js → .setup/event-projector-items-C6L_5ZiT.mjs} +42 -8
- package/dist/{attempt-notifications-C9XufG6l.js → .setup/event-projector-usage-CnBS8Wa3.mjs} +102 -9
- package/dist/{harness-C7rRa7bm.js → .setup/harness-a_MsE4-_.mjs} +81 -21
- package/dist/{inference-context-Dr_mzvk4.js → .setup/inference-context-D96l9-ew.mjs} +1 -1
- package/dist/.setup/inference-proxy-b-aJMSxm.mjs +601 -0
- package/dist/{isolated-completion-DWVb5U2J.js → .setup/isolated-completion-BIZFhTNG.mjs} +18 -11
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/{managed-binary-D22rNEcR.js → .setup/managed-binary-BnshlFag.mjs} +14 -3
- package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
- package/dist/{model-catalog-Dq2n8f_p.js → .setup/model-catalog-CfXJf9Ay.mjs} +36 -12
- package/dist/{models-PCKOim-h.js → .setup/models-KnqBv0hE.mjs} +3 -3
- package/dist/.setup/native-auth-rWbGbMn3.mjs +57 -0
- package/dist/{native-subagent-history-DjtPloaU.js → .setup/native-subagent-history-0nYYgo0k.mjs} +43 -35
- package/dist/.setup/native-subagent-monitor-D3filLY2.mjs +4859 -0
- package/dist/{native-subagent-task-ids-BzTdT0Uw.js → .setup/native-subagent-task-ids-wb8CKZGN.mjs} +98 -44
- package/dist/{node-cli-sessions-DKaOmVUh.js → .setup/node-cli-sessions-r3avj02l.mjs} +86 -68
- package/dist/.setup/node-exec-server.runtime-BDwWXVpK.mjs +247 -0
- package/dist/{plan-7uG-Fp36.js → .setup/plan-CN3VwfNU.mjs} +133 -119
- package/dist/{plugin-activation-BYQculil.js → .setup/plugin-activation-DT3MNtqj.mjs} +7 -16
- package/dist/{plugin-app-cache-key-d0eKxy7b.js → .setup/plugin-app-cache-key-B2CsSdnV.mjs} +32 -44
- package/dist/{plugin-approval-roundtrip-Bz3FT8W5.js → .setup/plugin-approval-roundtrip-C0MZzCuP.mjs} +1 -1
- package/dist/{plugin-inventory-oL4Na1ZG.js → .setup/plugin-inventory-BoRei8Z4.mjs} +21 -11
- package/dist/{plugin-marketplace-discovery-P-Vndfqq.js → .setup/plugin-marketplace-discovery-CDOi8IFs.mjs} +4 -1
- package/dist/{plugin-metadata-cache-ClPJpRio.js → .setup/plugin-metadata-cache-Ctmo83k_.mjs} +226 -141
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/{provider-MQ8PVkuE.js → .setup/provider-BOsxQHOM.mjs} +9 -5
- package/dist/{provider-capabilities-BvCUL69A.js → .setup/provider-capabilities-BfE88FZ5.mjs} +31 -3
- package/dist/{rate-limits-CBMmWBr9.js → .setup/rate-limits-CMU3DUD0.mjs} +174 -151
- package/dist/{request-B7hEkBGq.js → .setup/request-D2L0zMrq.mjs} +130 -42
- package/dist/{run-attempt-CvsAAGa0.js → .setup/run-attempt-BHu11r7h.mjs} +1628 -966
- package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
- package/dist/{runtime-artifact-BJ0rXBZ_.js → .setup/runtime-artifact-CLZ8udh-.mjs} +29 -45
- package/dist/{sandbox-guard-BxgyoM8M.js → .setup/sandbox-guard-C2sRMOEY.mjs} +3 -3
- package/dist/{session-binding-CI8UuilT.js → .setup/session-binding-Cm0apEbd.mjs} +36 -83
- package/dist/{session-binding-record-Bcvslnhf.js → .setup/session-binding-record-BGoz8wOK.mjs} +202 -5
- package/dist/.setup/session-binding-sidecars-BlB5EvIS.mjs +546 -0
- package/dist/.setup/session-catalog-Pno1xGcl.mjs +2764 -0
- package/dist/{session-catalog-adoption-tcZi1IfX.js → .setup/session-catalog-adoption-BI6UTDZT.mjs} +58 -26
- package/dist/{session-catalog-archive-CwKg8Xz2.js → .setup/session-catalog-archive-lHBqzhaO.mjs} +6 -6
- package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +347 -0
- package/dist/.setup/session-catalog-index-B9_VQIUz.mjs +1170 -0
- package/dist/.setup/session-catalog-index-order-hcdz07yN.mjs +48 -0
- package/dist/.setup/session-catalog-index-state-Dgh8ORJm.mjs +183 -0
- package/dist/{thread-history-page-D0JIp48V.js → .setup/session-catalog-native-projection-DowriLid.mjs} +223 -95
- package/dist/{session-catalog-node-adoption-B1tgDW-m.js → .setup/session-catalog-node-adoption-ITddWx_X.mjs} +25 -13
- package/dist/{session-catalog-node-continue-Ci-DXyJP.js → .setup/session-catalog-node-continue-6g6qi4A9.mjs} +24 -15
- package/dist/.setup/session-catalog-projection-zK_PUsiE.mjs +422 -0
- package/dist/{session-cli-DNN_jhGc.js → .setup/session-cli-irrD-uo7.mjs} +3 -3
- package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-BrqhSCf9.mjs} +19 -19
- package/dist/{session-history-import-DwyijFI6.js → .setup/session-history-import-D-3wAgOP.mjs} +4 -4
- package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
- package/dist/{session-history.worker-BeK1YOyT.js → .setup/session-history.worker-CaCh0xF_.mjs} +10 -24
- package/dist/{session-initialization-Ct0_Hzmg.js → .setup/session-initialization-rcgbZiid.mjs} +2 -2
- package/dist/{session-permission-policy-BBmXA8Eg.js → .setup/session-permission-policy-BI1QK_98.mjs} +2 -2
- package/dist/{session-retirement-B2YfbAAT.js → .setup/session-retirement-BH-S6qkJ.mjs} +26 -7
- package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
- package/dist/{settled-turn-finalizer-Dn91stmc.js → .setup/settled-turn-finalizer-DiAi6Kx6.mjs} +12 -12
- package/dist/{shared-client-CscigXXL.js → .setup/shared-client-DA4VR4Eb.mjs} +332 -221
- package/dist/{side-question-BGMJQf4U.js → .setup/side-question-BJ1wSDcB.mjs} +183 -230
- package/dist/{source-CElXU0Oy.js → .setup/source-CUzJq5WN.mjs} +11 -10
- package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
- package/dist/{thread-archive-guard-DfpBr-Sz.js → .setup/thread-archive-guard-C9frICzX.mjs} +10 -3
- package/dist/.setup/thread-history-page-DoVpnHim.mjs +83 -0
- package/dist/{thread-lifecycle-DXl1-I6b.js → .setup/thread-lifecycle-B3mfz1TG.mjs} +347 -2318
- package/dist/{thread-ownership-BsDRTsyp.js → .setup/thread-ownership-DcTtAcXj.mjs} +6 -4
- package/dist/{thread-policy-BuEQfE0g.js → .setup/thread-policy-DGuQsuFC.mjs} +19 -3
- package/dist/.setup/thread-requests-BLvGkP2R.mjs +2205 -0
- package/dist/{thread-resume-DsDOZpFg.js → .setup/thread-resume-DIBXwOpE.mjs} +8 -5
- package/dist/.setup/timeout-C910MdAB.mjs +80 -0
- package/dist/{transcript-history-projection-v17wXgdK.js → .setup/transcript-history-projection-ZZpkFkJ_.mjs} +96 -61
- package/dist/{transcript-mirror-C5CKgNy6.js → .setup/transcript-mirror-BtHDBp1G.mjs} +224 -195
- package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
- package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-h2VHOskC.mjs} +274 -89
- package/dist/{upstream-session-fork-BZerMte_.js → .setup/upstream-session-fork-BUr4OUbC.mjs} +51 -42
- package/dist/{usage-tCk-mg_x.js → .setup/usage-BML0r-ua.mjs} +5 -4
- package/dist/.setup/usage-limit-error-DUMbefVY.mjs +166 -0
- package/dist/{web-search-provider.runtime-B7bGbGWq.js → .setup/web-search-provider.runtime-CDKlN-Rv.mjs} +4 -3
- package/dist/api.js +23 -12
- package/dist/catalog-page-worker-entrypoint.js +12 -0
- package/dist/catalog-page.worker.js +9 -0
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +8 -528
- package/dist/harness.js +1 -1
- package/dist/index.js +306 -215
- package/dist/media-understanding-provider.js +3 -3
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-tool-policy.js +12 -0
- package/dist/provider-discovery.js +18 -0
- package/dist/session-history-worker-runtime.js +36 -35
- package/dist/session-history.worker.js +2 -2
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +354 -69
- package/package.json +14 -8
- package/dist/attempt-context-D44yeDII.js +0 -636
- package/dist/binding-connection-D3udKbIE.js +0 -60
- package/dist/event-projector-usage-BfXmpOec.js +0 -102
- package/dist/inference-proxy-HGXKUIre.js +0 -311
- package/dist/launch-args-RXQwn8zV.js +0 -90
- package/dist/native-subagent-history-owner-Pcp7JuVF.js +0 -34
- package/dist/native-subagent-monitor-fQ7eIXEf.js +0 -2978
- package/dist/node-exec-server.runtime-Cl2vapEi.js +0 -226
- package/dist/rpc-error-ttN_QjEm.js +0 -30
- package/dist/session-catalog-ct-AH01I.js +0 -1477
- package/dist/session-catalog-home-id-CwhLdC03.js +0 -18
- package/dist/session-catalog-provenance-D-dIfRAH.js +0 -96
- package/dist/timeout-BVw8aaM1.js +0 -33
- package/dist/version-omm6IPI3.js +0 -12
- /package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
- /package/dist/{config-utils-DujwEnhg.js → .setup/config-utils-DujwEnhg.mjs} +0 -0
- /package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
- /package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
- /package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
- /package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
- /package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
- /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- /package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-umd0tgh4.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
- /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
package/dist/{effective-mcp-catalog-Bd73bqA8.js → .setup/effective-mcp-catalog-CvnvnGIe.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-
|
|
3
|
-
import "./session-binding-
|
|
1
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-BGoz8wOK.mjs";
|
|
2
|
+
import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-DA4VR4Eb.mjs";
|
|
3
|
+
import "./session-binding-Cm0apEbd.mjs";
|
|
4
4
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
6
6
|
//#region extensions/codex/src/app-server/effective-mcp-catalog.ts
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as readCodexTurnCompletedNotification } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as CodexUsageProjection } from "./event-projector-usage-BfXmpOec.js";
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { T as readCodexTurnCompletedNotification } from "./client-Cs08OXVQ.mjs";
|
|
3
|
+
import { h as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-CEv1cKwF.mjs";
|
|
4
|
+
import { c as readCodexNotificationItem, s as isTerminalTurnStatus, t as CodexUsageProjection } from "./event-projector-usage-CnBS8Wa3.mjs";
|
|
6
5
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
6
|
import { toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
7
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -37,8 +36,11 @@ var CodexEphemeralTurn = class {
|
|
|
37
36
|
if (firstDelta) await options.onAssistantMessageStart?.();
|
|
38
37
|
} else if (notification.method === "rawResponse/completed") this.usage.record(params);
|
|
39
38
|
else if (notification.method === "turn/completed") {
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const completed = readCodexTurnCompletedNotification(params);
|
|
40
|
+
if (completed) {
|
|
41
|
+
this.turn = completed.turn;
|
|
42
|
+
this.completion.resolve();
|
|
43
|
+
}
|
|
42
44
|
} else if (notification.method === "error") {
|
|
43
45
|
this.usage.invalidateContext();
|
|
44
46
|
if (params.willRetry !== true) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as codexProviderRefusalDetails } from "./event-projector-items-C6L_5ZiT.mjs";
|
|
2
|
+
import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.mjs";
|
|
2
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
3
4
|
//#region extensions/codex/src/app-server/event-projector-assistant-message.ts
|
|
4
5
|
const ZERO_USAGE = {
|
|
@@ -49,10 +50,7 @@ function createAttributedCodexAssistantMessage(attribution, text, options) {
|
|
|
49
50
|
...refusal ? { diagnostics: [{
|
|
50
51
|
type: "provider_refusal",
|
|
51
52
|
timestamp: Date.now(),
|
|
52
|
-
details:
|
|
53
|
-
provider: "openai",
|
|
54
|
-
category: refusal.category
|
|
55
|
-
}
|
|
53
|
+
details: codexProviderRefusalDetails(refusal)
|
|
56
54
|
}] } : {},
|
|
57
55
|
timestamp: Date.now()
|
|
58
56
|
};
|
|
@@ -70,13 +68,16 @@ function createAssistantCommentaryMessage(params, text, itemId, timestamp) {
|
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
70
|
}
|
|
73
|
-
function createAssistantAsyncMessage(params, text, itemId, timestamp) {
|
|
71
|
+
function createAssistantAsyncMessage(params, text, itemId, timestamp, questions) {
|
|
74
72
|
return {
|
|
75
73
|
...createNonterminalAssistantMessage(params, [{
|
|
76
74
|
type: "text",
|
|
77
75
|
text
|
|
78
76
|
}], timestamp),
|
|
79
|
-
openclawAsyncDelivery: {
|
|
77
|
+
openclawAsyncDelivery: {
|
|
78
|
+
itemId,
|
|
79
|
+
...questions ? { questions } : {}
|
|
80
|
+
}
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
function createAssistantReasoningMessage(params, text) {
|
package/dist/{event-projector-items-5VhsECCO.js → .setup/event-projector-items-C6L_5ZiT.mjs}
RENAMED
|
@@ -1,23 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
2
|
import { asFiniteNumber, normalizeOptionalString as normalizeOptionalString$1, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
+
import { Buffer } from "node:buffer";
|
|
3
4
|
//#region extensions/codex/src/app-server/event-projector-values.ts
|
|
4
5
|
const BIO_POLICY_SAFETY_ACCESS_BLOCK_PREFIX = "This content was flagged for possible biological risk.";
|
|
6
|
+
/** Decode app-server v2 findings with the Codex UI's UTF-8 limits; never truncate a steer. */
|
|
7
|
+
function readCodexMisalignmentReview(value) {
|
|
8
|
+
if (!isJsonObject(value)) return;
|
|
9
|
+
const explanation = value.detailedExplanation;
|
|
10
|
+
if (typeof explanation !== "string" || !explanation.trim() || Buffer.byteLength(explanation, "utf8") > 65536) return;
|
|
11
|
+
const message = isJsonObject(value.steer) ? value.steer.message : void 0;
|
|
12
|
+
return {
|
|
13
|
+
explanation,
|
|
14
|
+
...typeof message === "string" && message.trim() && Buffer.byteLength(message, "utf8") <= 1024 ? { continuation: { message } } : {},
|
|
15
|
+
...typeof value.errorType === "string" && value.errorType.trim() ? { errorType: value.errorType } : {}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
5
18
|
/** Project only Codex's explicit refusal contracts; other policy errors retain their own paths. */
|
|
6
|
-
function readCodexProviderRefusal(message, codexErrorInfo) {
|
|
19
|
+
function readCodexProviderRefusal(message, codexErrorInfo, options) {
|
|
7
20
|
if (!message) return;
|
|
8
21
|
if (codexErrorInfo === "cyberPolicy") return {
|
|
9
22
|
category: "cyber",
|
|
10
23
|
message
|
|
11
24
|
};
|
|
12
|
-
if (codexErrorInfo === "misalignmentPolicyViolation")
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
if (codexErrorInfo === "misalignmentPolicyViolation") {
|
|
26
|
+
const review = readCodexMisalignmentReview(options?.misalignment);
|
|
27
|
+
return {
|
|
28
|
+
category: "misalignment",
|
|
29
|
+
message,
|
|
30
|
+
...review ? { review } : {},
|
|
31
|
+
...options?.nativeThreadId ? { nativeThreadId: options.nativeThreadId } : {},
|
|
32
|
+
...options?.nativeTurnId ? { nativeTurnId: options.nativeTurnId } : {}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
16
35
|
return message.startsWith(BIO_POLICY_SAFETY_ACCESS_BLOCK_PREFIX) ? {
|
|
17
36
|
category: "bio",
|
|
18
37
|
message
|
|
19
38
|
} : void 0;
|
|
20
39
|
}
|
|
40
|
+
function codexProviderRefusalDetails(refusal) {
|
|
41
|
+
return {
|
|
42
|
+
provider: "openai",
|
|
43
|
+
category: refusal.category,
|
|
44
|
+
...refusal.review ? { review: refusal.review } : {},
|
|
45
|
+
...refusal.nativeThreadId ? { nativeThreadId: refusal.nativeThreadId } : {},
|
|
46
|
+
...refusal.nativeTurnId ? { nativeTurnId: refusal.nativeTurnId } : {}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
21
49
|
function readNonEmptyString(record, key) {
|
|
22
50
|
return normalizeOptionalString$1(record[key]);
|
|
23
51
|
}
|
|
@@ -178,7 +206,13 @@ function shouldSynthesizeToolProgressForItem(item) {
|
|
|
178
206
|
}
|
|
179
207
|
}
|
|
180
208
|
function shouldRecordNativeToolTranscript(item) {
|
|
181
|
-
|
|
209
|
+
switch (item.type) {
|
|
210
|
+
case "commandExecution":
|
|
211
|
+
case "fileChange":
|
|
212
|
+
case "webSearch":
|
|
213
|
+
case "mcpToolCall": return true;
|
|
214
|
+
default: return false;
|
|
215
|
+
}
|
|
182
216
|
}
|
|
183
217
|
function isMutatingNativeToolItem(item) {
|
|
184
218
|
if (item.type === "commandExecution") return true;
|
|
@@ -197,4 +231,4 @@ function shouldClearTerminalPresentationForNativeItem(item) {
|
|
|
197
231
|
}
|
|
198
232
|
}
|
|
199
233
|
//#endregion
|
|
200
|
-
export {
|
|
234
|
+
export { readItemString as C, readNullableString as D, readNonNegativeInteger as E, splitPlanText as O, readItem as S, readNonEmptyStringArray as T, extractRawAssistantText as _, isNonSuccessItemStatus as a, readCodexProviderRefusal as b, itemName as c, matchesCodexSnapshotTurn as d, shouldClearTerminalPresentationForNativeItem as f, codexProviderRefusalDetails as g, unknownItemStatus as h, isMutatingNativeToolItem as i, itemStatus as l, shouldSynthesizeToolProgressForItem as m, auditNativeToolTerminalStatus as n, isSideEffectingNativeToolItem as o, shouldRecordNativeToolTranscript as p, auditNativeToolUnfinishedStatus as r, itemKind as s, auditNativeToolName as t, itemTitle as u, normalizeOptionalString$1 as v, readNonEmptyString as w, readHookOutputEntries as x, readCodexErrorNotificationMessage as y };
|
package/dist/{attempt-notifications-C9XufG6l.js → .setup/event-projector-usage-CnBS8Wa3.mjs}
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { asSafeIntegerInRange, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
+
import { normalizeUsage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
3
4
|
//#region extensions/codex/src/app-server/attempt-notifications.ts
|
|
4
5
|
const CODEX_TURN_ABORT_MARKER_START = "<turn_aborted>";
|
|
5
6
|
const CODEX_TURN_ABORT_MARKER_END = "</turn_aborted>";
|
|
@@ -34,12 +35,6 @@ function isRawFunctionToolOutputCompletionNotification(notification) {
|
|
|
34
35
|
const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
|
|
35
36
|
return item ? readStringField(item, "type") === "function_call_output" : false;
|
|
36
37
|
}
|
|
37
|
-
/** Distinguishes progress-only assistant items from conversation answers. */
|
|
38
|
-
function isAssistantCommentaryCompletionNotification(notification) {
|
|
39
|
-
if (!isJsonObject(notification.params) || notification.method !== "item/completed") return false;
|
|
40
|
-
const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
|
|
41
|
-
return Boolean(item && readStringField(item, "type") === "agentMessage" && (readStringField(item, "phase") === "commentary" || readStringField(item, "delivery") === "async"));
|
|
42
|
-
}
|
|
43
38
|
/** Returns true for terminal app-server thread status strings. */
|
|
44
39
|
function isTerminalTurnStatus(status) {
|
|
45
40
|
return status === "completed" || status === "interrupted" || status === "failed";
|
|
@@ -106,4 +101,102 @@ function isNonEmptyString(value) {
|
|
|
106
101
|
return typeof value === "string" && value.length > 0;
|
|
107
102
|
}
|
|
108
103
|
//#endregion
|
|
109
|
-
|
|
104
|
+
//#region extensions/codex/src/app-server/event-projector-usage.ts
|
|
105
|
+
function readTokenCount(record, key) {
|
|
106
|
+
return asSafeIntegerInRange(record[key], { min: 0 });
|
|
107
|
+
}
|
|
108
|
+
function readCodexThreadTokenUsage(params) {
|
|
109
|
+
const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
|
|
110
|
+
const last = tokenUsage && isJsonObject(tokenUsage.last) ? tokenUsage.last : void 0;
|
|
111
|
+
return last ? normalizeCodexResponseTokenUsage(last) : void 0;
|
|
112
|
+
}
|
|
113
|
+
function readCodexThreadContextSnapshot(params) {
|
|
114
|
+
const tokenUsage = isJsonObject(params.tokenUsage) ? params.tokenUsage : void 0;
|
|
115
|
+
const last = tokenUsage && isJsonObject(tokenUsage.last) ? tokenUsage.last : void 0;
|
|
116
|
+
const modelContextWindow = tokenUsage ? readTokenCount(tokenUsage, "modelContextWindow") : void 0;
|
|
117
|
+
const activeContextTokens = last ? readTokenCount(last, "totalTokens") : void 0;
|
|
118
|
+
const inputTokens = last ? readTokenCount(last, "inputTokens") : void 0;
|
|
119
|
+
const cachedInputTokens = last ? readTokenCount(last, "cachedInputTokens") : void 0;
|
|
120
|
+
const cacheWriteInputTokens = last ? readTokenCount(last, "cacheWriteInputTokens") : void 0;
|
|
121
|
+
const reasoningOutputTokens = last ? readTokenCount(last, "reasoningOutputTokens") : void 0;
|
|
122
|
+
return {
|
|
123
|
+
...activeContextTokens !== void 0 ? { activeContextTokens } : {},
|
|
124
|
+
...cachedInputTokens !== void 0 ? { cachedInputTokens } : {},
|
|
125
|
+
...cacheWriteInputTokens !== void 0 ? { cacheWriteInputTokens } : {},
|
|
126
|
+
...inputTokens !== void 0 ? { inputTokens } : {},
|
|
127
|
+
...modelContextWindow && modelContextWindow > 0 ? { modelContextWindow } : {},
|
|
128
|
+
...inputTokens !== void 0 ? { promptTokens: inputTokens } : {},
|
|
129
|
+
...reasoningOutputTokens !== void 0 ? { reasoningOutputTokens } : {}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function normalizeCodexResponseTokenUsage(record) {
|
|
133
|
+
const totalTokens = readTokenCount(record, "totalTokens");
|
|
134
|
+
const inputTokens = readTokenCount(record, "inputTokens");
|
|
135
|
+
const cacheRead = readTokenCount(record, "cachedInputTokens");
|
|
136
|
+
const output = readTokenCount(record, "outputTokens");
|
|
137
|
+
const reasoningTokens = readTokenCount(record, "reasoningOutputTokens");
|
|
138
|
+
const cacheWrite = record.cacheWriteInputTokens === void 0 ? 0 : readTokenCount(record, "cacheWriteInputTokens");
|
|
139
|
+
const hasCoherentInput = inputTokens !== void 0 && cacheRead !== void 0 && cacheWrite !== void 0 && cacheRead + cacheWrite <= inputTokens;
|
|
140
|
+
const hasCoherentContext = hasCoherentInput && totalTokens !== void 0 && output !== void 0 && totalTokens === inputTokens + output;
|
|
141
|
+
const usage = normalizeUsage({
|
|
142
|
+
input: hasCoherentInput ? inputTokens - cacheRead - cacheWrite : void 0,
|
|
143
|
+
output,
|
|
144
|
+
cacheRead,
|
|
145
|
+
cacheWrite,
|
|
146
|
+
reasoningTokens,
|
|
147
|
+
total: totalTokens
|
|
148
|
+
});
|
|
149
|
+
if (!usage) return;
|
|
150
|
+
return {
|
|
151
|
+
...usage,
|
|
152
|
+
contextUsage: hasCoherentContext ? {
|
|
153
|
+
state: "available",
|
|
154
|
+
promptTokens: inputTokens,
|
|
155
|
+
totalTokens
|
|
156
|
+
} : { state: "unavailable" }
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
var CodexUsageProjection = class {
|
|
160
|
+
constructor() {
|
|
161
|
+
this.responseIds = /* @__PURE__ */ new Set();
|
|
162
|
+
}
|
|
163
|
+
get usage() {
|
|
164
|
+
const usage = this.responseUsage ?? this.threadUsage;
|
|
165
|
+
return usage ? {
|
|
166
|
+
...usage,
|
|
167
|
+
contextUsage: this.contextUsage
|
|
168
|
+
} : void 0;
|
|
169
|
+
}
|
|
170
|
+
get modelIterations() {
|
|
171
|
+
return this.responseIds.size;
|
|
172
|
+
}
|
|
173
|
+
invalidateContext() {
|
|
174
|
+
this.contextUsage = { state: "unavailable" };
|
|
175
|
+
}
|
|
176
|
+
recordThread(params) {
|
|
177
|
+
const usage = readCodexThreadTokenUsage(params);
|
|
178
|
+
this.threadUsage = usage ?? this.threadUsage;
|
|
179
|
+
if (!this.responseUsage && usage) this.contextUsage = usage.contextUsage;
|
|
180
|
+
return readCodexThreadContextSnapshot(params);
|
|
181
|
+
}
|
|
182
|
+
record(params, reportOutputTokens) {
|
|
183
|
+
const responseId = readStringField(params, "responseId");
|
|
184
|
+
if (!responseId || this.responseIds.has(responseId)) return;
|
|
185
|
+
this.responseIds.add(responseId);
|
|
186
|
+
const usage = isJsonObject(params.usage) ? normalizeCodexResponseTokenUsage(params.usage) : void 0;
|
|
187
|
+
this.contextUsage = usage?.contextUsage ?? { state: "unavailable" };
|
|
188
|
+
this.responseUsage ??= {};
|
|
189
|
+
for (const field of [
|
|
190
|
+
"input",
|
|
191
|
+
"output",
|
|
192
|
+
"cacheRead",
|
|
193
|
+
"cacheWrite",
|
|
194
|
+
"reasoningTokens",
|
|
195
|
+
"total"
|
|
196
|
+
]) if (usage?.[field] !== void 0) this.responseUsage[field] = (this.responseUsage[field] ?? 0) + usage[field];
|
|
197
|
+
const outputTokens = usage?.output;
|
|
198
|
+
if (outputTokens !== void 0) reportOutputTokens?.(outputTokens);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
//#endregion
|
|
202
|
+
export { isPendingOpenClawDynamicToolCompletionNotification as a, readCodexNotificationItem as c, updateActiveTurnItemIds as d, isCodexTurnAbortMarkerNotification as i, readNotificationItemId as l, readCodexThreadContextSnapshot as n, isRawFunctionToolOutputCompletionNotification as o, codexExecutionToolName as r, isTerminalTurnStatus as s, CodexUsageProjection as t, readRawResponseToolCallId as u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "../native-tool-policy.js";
|
|
2
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-BGoz8wOK.mjs";
|
|
3
|
+
import { t as codexBuildSymbol } from "./build-state-C7EnDVgr.mjs";
|
|
3
4
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
4
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
6
|
//#region extensions/codex/src/app-server/model-runtime.ts
|
|
@@ -73,6 +74,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
73
74
|
contextEngineHostCapabilities: CODEX_APP_SERVER_CONTEXT_ENGINE_HOST_CAPABILITIES,
|
|
74
75
|
conversationToolPolicySupport: "exact",
|
|
75
76
|
conversationToolPolicySafeDenyTools: CODEX_TOOL_POLICY_SAFE_DENY_NAMES,
|
|
77
|
+
conversationToolPolicyNativeTools: CODEX_NATIVE_TOOL_REQUIREMENTS,
|
|
76
78
|
deliveryDefaults: { visibleReplies: "message_tool" },
|
|
77
79
|
authBootstrap: "harness",
|
|
78
80
|
resolveSessionRuntimeOwnership: (params) => {
|
|
@@ -100,10 +102,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
100
102
|
} } : {}
|
|
101
103
|
} : void 0;
|
|
102
104
|
},
|
|
103
|
-
...sessionCatalogControlFactory && sessionRuntime ? {
|
|
105
|
+
...sessionCatalogControlFactory && sessionRuntime ? { sessionForkV2: {
|
|
106
|
+
executionEnvironment: "host-only",
|
|
104
107
|
upstreamKinds: ["codex-app-server"],
|
|
105
108
|
fork: async (params) => {
|
|
106
|
-
const { forkCodexUpstreamSession } = await import("./upstream-session-fork-
|
|
109
|
+
const { forkCodexUpstreamSession } = await import("./upstream-session-fork-BUr4OUbC.mjs");
|
|
107
110
|
return await forkCodexUpstreamSession(params, {
|
|
108
111
|
bindingStore: options.bindingStore,
|
|
109
112
|
controlFactory: sessionCatalogControlFactory,
|
|
@@ -116,7 +119,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
116
119
|
taskHistory: {
|
|
117
120
|
taskKinds: ["codex-native"],
|
|
118
121
|
read: async (params) => {
|
|
119
|
-
const { readCodexNativeSubagentHistory } = await import("./native-subagent-history-
|
|
122
|
+
const { readCodexNativeSubagentHistory } = await import("./native-subagent-history-0nYYgo0k.mjs");
|
|
120
123
|
const assertCurrent = () => {
|
|
121
124
|
params.assertCurrent();
|
|
122
125
|
if (disposed) throw new Error("Agent harness is disposed");
|
|
@@ -131,26 +134,26 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
131
134
|
}
|
|
132
135
|
},
|
|
133
136
|
authBinding: { fingerprint: async (params) => {
|
|
134
|
-
const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-
|
|
137
|
+
const { fingerprintCodexAppServerAuthBinding } = await import("./auth-binding-DhLWa_7K.mjs").then((n) => n.t);
|
|
135
138
|
return fingerprintCodexAppServerAuthBinding(params);
|
|
136
139
|
} },
|
|
137
140
|
runtimeArtifact: { validate: async (binding) => {
|
|
138
|
-
const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-
|
|
141
|
+
const { validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-CLZ8udh-.mjs");
|
|
139
142
|
return validateCodexAppServerRuntimeArtifact(binding);
|
|
140
143
|
} },
|
|
141
144
|
fetchUsageSnapshot: async (ctx) => {
|
|
142
|
-
const { fetchCodexAppServerUsageSnapshot } = await import("./usage-
|
|
145
|
+
const { fetchCodexAppServerUsageSnapshot } = await import("./usage-BML0r-ua.mjs");
|
|
143
146
|
return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
144
147
|
},
|
|
145
148
|
loadModelCatalog: async (params) => {
|
|
146
|
-
const { createCodexAppServerModelCatalog } = await import("./model-catalog-
|
|
149
|
+
const { createCodexAppServerModelCatalog } = await import("./model-catalog-CfXJf9Ay.mjs");
|
|
147
150
|
if (disposed) return [];
|
|
148
151
|
modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
|
|
149
152
|
return await modelCatalog.load(params, resolveAttemptPluginConfig(params.config));
|
|
150
153
|
},
|
|
151
154
|
readModelCatalogReadiness: (params) => modelCatalog?.read(params, resolveAttemptPluginConfig(params.config)),
|
|
152
155
|
loadMcpToolCatalog: async (params) => {
|
|
153
|
-
const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-
|
|
156
|
+
const { loadCodexEffectiveMcpCatalog } = await import("./effective-mcp-catalog-CvnvnGIe.mjs");
|
|
154
157
|
return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
|
|
155
158
|
},
|
|
156
159
|
supports: (ctx) => {
|
|
@@ -193,21 +196,73 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
193
196
|
};
|
|
194
197
|
},
|
|
195
198
|
runAttempt: async (params) => {
|
|
196
|
-
const { runCodexAppServerAttempt } = await import("./run-attempt-
|
|
197
|
-
|
|
199
|
+
const { runCodexAppServerAttempt } = await import("./run-attempt-BHu11r7h.mjs");
|
|
200
|
+
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./cyber-failover-DYwbmf1o.mjs");
|
|
201
|
+
const { emitCodexCyberNotice } = await import("./cyber-failover-notice-e9G3J9-e.mjs");
|
|
202
|
+
const pluginConfig = resolveAttemptPluginConfig(params.config);
|
|
203
|
+
const attemptModel = readCodexRuntimeModelId(params.model, params.modelId);
|
|
204
|
+
const runAttemptOnModel = (model, isRetry = false) => runCodexAppServerAttempt(isRetry ? {
|
|
205
|
+
...params,
|
|
206
|
+
suppressNextUserMessagePersistence: true
|
|
207
|
+
} : params, {
|
|
198
208
|
bindingStore: options.bindingStore,
|
|
199
|
-
pluginConfig
|
|
209
|
+
pluginConfig,
|
|
200
210
|
runtime: sessionRuntime,
|
|
201
|
-
runtimeModelId:
|
|
211
|
+
runtimeModelId: model,
|
|
202
212
|
nativeHookRelay: { enabled: true }
|
|
203
213
|
});
|
|
214
|
+
const cyberFailover = resolveCodexCyberFailoverConfig(pluginConfig);
|
|
215
|
+
const workspace = {
|
|
216
|
+
agentId: params.agentId,
|
|
217
|
+
authProfileId: params.authProfileId
|
|
218
|
+
};
|
|
219
|
+
const result = await runAttemptOnModel(attemptModel);
|
|
220
|
+
const refusal = readCodexCyberAttemptVerdict(result);
|
|
221
|
+
if (!refusal.cyberRefused) return result;
|
|
222
|
+
const plan = planCodexCyberEscalation({
|
|
223
|
+
config: cyberFailover,
|
|
224
|
+
currentModel: attemptModel,
|
|
225
|
+
replaySafe: refusal.replaySafe,
|
|
226
|
+
workspace
|
|
227
|
+
});
|
|
228
|
+
if (plan.kind !== "escalate") {
|
|
229
|
+
if (plan.reason === "target_unavailable") await emitCodexCyberNotice(params, {
|
|
230
|
+
state: "unavailable",
|
|
231
|
+
model: attemptModel,
|
|
232
|
+
fallbackModel: cyberFailover.model
|
|
233
|
+
});
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
const releaseProbe = reserveCodexCyberProbe({
|
|
237
|
+
model: plan.model,
|
|
238
|
+
workspace
|
|
239
|
+
});
|
|
240
|
+
let escalated;
|
|
241
|
+
try {
|
|
242
|
+
escalated = await runAttemptOnModel(plan.model, true);
|
|
243
|
+
} finally {
|
|
244
|
+
releaseProbe();
|
|
245
|
+
}
|
|
246
|
+
const outcome = readCodexCyberAttemptVerdict(escalated);
|
|
247
|
+
if (outcome.unavailable) recordCodexCyberTargetUnavailable({
|
|
248
|
+
model: plan.model,
|
|
249
|
+
workspace,
|
|
250
|
+
cooloffMs: cyberFailover.cooloffMs
|
|
251
|
+
});
|
|
252
|
+
if (outcome.answered || outcome.unavailable) await emitCodexCyberNotice(params, {
|
|
253
|
+
state: outcome.answered ? "escalated" : "unavailable",
|
|
254
|
+
model: attemptModel,
|
|
255
|
+
fallbackModel: plan.model
|
|
256
|
+
});
|
|
257
|
+
if (outcome.unavailable && outcome.replaySafe && escalated.terminal.kind === "failed" && escalated.toolMetas.length === 0) return result;
|
|
258
|
+
return escalated;
|
|
204
259
|
},
|
|
205
260
|
runIsolatedCompletionV2: async (params) => {
|
|
206
261
|
if (params.authorization.owner === "host") {
|
|
207
262
|
const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
|
|
208
263
|
return runHostPreparedIsolatedCompletion(params);
|
|
209
264
|
}
|
|
210
|
-
const { runCodexIsolatedCompletion } = await import("./isolated-completion-
|
|
265
|
+
const { runCodexIsolatedCompletion } = await import("./isolated-completion-BIZFhTNG.mjs");
|
|
211
266
|
return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
212
267
|
},
|
|
213
268
|
runIsolatedCompletion: async (params) => {
|
|
@@ -223,11 +278,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
223
278
|
});
|
|
224
279
|
},
|
|
225
280
|
finalizeSettledTurn: async (params) => {
|
|
226
|
-
const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-
|
|
281
|
+
const { runCodexSettledTurnFinalization } = await import("./settled-turn-finalizer-DiAi6Kx6.mjs");
|
|
227
282
|
return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
228
283
|
},
|
|
229
284
|
runSideQuestion: async (params) => {
|
|
230
|
-
const { runCodexAppServerSideQuestion } = await import("./side-question-
|
|
285
|
+
const { runCodexAppServerSideQuestion } = await import("./side-question-BJ1wSDcB.mjs");
|
|
231
286
|
return runCodexAppServerSideQuestion(params, {
|
|
232
287
|
bindingStore: options.bindingStore,
|
|
233
288
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
@@ -237,20 +292,25 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
237
292
|
});
|
|
238
293
|
},
|
|
239
294
|
compact: async (params) => {
|
|
240
|
-
const { maybeCompactCodexAppServerSession } = await import("./compact-
|
|
295
|
+
const { maybeCompactCodexAppServerSession } = await import("./compact-Du5UvtxA.mjs");
|
|
241
296
|
return maybeCompactCodexAppServerSession(params, {
|
|
242
297
|
bindingStore: options.bindingStore,
|
|
243
298
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
|
|
244
299
|
});
|
|
245
300
|
},
|
|
246
301
|
withSessionDeletion: async (params, run) => {
|
|
247
|
-
const { withCodexAppServerSessionDeletion } = await import("./session-retirement-
|
|
302
|
+
const { withCodexAppServerSessionDeletion } = await import("./session-retirement-BH-S6qkJ.mjs");
|
|
248
303
|
params.assertCurrent();
|
|
249
304
|
return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
|
|
250
305
|
},
|
|
306
|
+
withSessionContextReset: async (params, run) => {
|
|
307
|
+
const { withCodexAppServerSessionContextReset } = await import("./session-retirement-BH-S6qkJ.mjs");
|
|
308
|
+
params.assertCurrent();
|
|
309
|
+
return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
|
|
310
|
+
},
|
|
251
311
|
reset: async (params) => {
|
|
252
312
|
if (params.sessionId && params.reason !== "deleted") {
|
|
253
|
-
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-
|
|
313
|
+
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./session-binding-Cm0apEbd.mjs").then((n) => n.s), import("./session-retirement-BH-S6qkJ.mjs")]);
|
|
254
314
|
const identity = sessionBindingIdentity({
|
|
255
315
|
agentId: params.agentId,
|
|
256
316
|
sessionId: params.sessionId,
|
|
@@ -282,7 +342,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
282
342
|
/** Creates the private native-compaction bridge registered in host-owned capability state. */
|
|
283
343
|
function createCodexAppServerNativeCompaction(options) {
|
|
284
344
|
return async (params) => {
|
|
285
|
-
const { maybeCompactCodexAppServerSession } = await import("./compact-
|
|
345
|
+
const { maybeCompactCodexAppServerSession } = await import("./compact-Du5UvtxA.mjs");
|
|
286
346
|
return maybeCompactCodexAppServerSession(params, {
|
|
287
347
|
bindingStore: options.bindingStore,
|
|
288
348
|
pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
|