@openclaw/codex 2026.9.2 → 2026.9.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/README.md +2 -0
- package/dist/api.js +14 -19
- package/dist/apply-B6el6hdO.js +357 -0
- package/dist/{attempt-client-cleanup-Bp1ZOnk2.js → attempt-client-cleanup-D6cR54TV.js} +39 -19
- package/dist/{attempt-context-CSazkWns.js → attempt-context-AO4DSjE0.js} +8 -6
- package/dist/{event-projector-usage-ZqEVbAEY.js → attempt-notifications--H8zXR5-.js} +3 -106
- package/dist/auth-cache-key-Kq6oerr6.js +498 -0
- package/dist/auth-profile-CwzO4_RG.js +43 -0
- package/dist/auth-profile-selection-DFu9e167.js +45 -0
- package/dist/binding-connection-QqgcPCgk.js +60 -0
- package/dist/{bounded-turn-DxGJRYbY.js → bounded-turn-lRpmZHFv.js} +25 -122
- package/dist/build-state-6RL6qohz.js +19 -0
- package/dist/{capabilities-B1mgvpP8.js → capabilities-BeqLPbtM.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/client-BEKu4yDx.js +3983 -0
- package/dist/command-dispatch-CisT9Jqq.js +21 -0
- package/dist/{command-formatters-DSbGMXA0.js → command-formatters-DeTfrapr.js} +2 -2
- package/dist/{command-handlers-DOJvGv6-.js → command-handlers-BfIsJEuA.js} +31 -21
- package/dist/command-rpc-BMqRQOFX.js +226 -0
- package/dist/{compact-Y_xBqrHN.js → compact-CGJZ2rlb.js} +19 -14
- package/dist/config-JDfTI4VI.js +106 -0
- package/dist/{config-CyapYSji.js → config-options-jnIFvwxD.js} +204 -592
- package/dist/config-runtime-BWf6JLWG.js +11 -0
- package/dist/conversation-binding-CxOlHiix.js +889 -0
- package/dist/{plugin-marketplace-discovery-B7gHXJ3d.js → conversation-control-CUCrSIQI.js} +10 -142
- package/dist/doctor-contract-api.js +5 -5
- package/dist/{dynamic-tools-BwpvTxaX.js → dynamic-tools-D-JBoaLt.js} +66 -70
- package/dist/{effective-mcp-catalog-CY9Jn4bA.js → effective-mcp-catalog-J_5Ep5Um.js} +3 -3
- package/dist/{elicitation-input-DMkeki8d.js → elicitation-input-DPoK8F7w.js} +8 -22
- package/dist/ephemeral-turn-DSwzP8YY.js +101 -0
- package/dist/{event-projector-assistant-message-B9kp6iGC.js → event-projector-assistant-message-BmBM4qBV.js} +12 -25
- package/dist/event-projector-usage-CIyrYYid.js +102 -0
- package/dist/{harness-Czh2Sdoc.js → harness-FR6eQgyO.js} +31 -24
- package/dist/harness.js +1 -1
- package/dist/history-rejection-B4nOXNXF.js +13 -0
- package/dist/incognito-session-uhrBF6wJ.js +15 -0
- package/dist/index.js +411 -2875
- package/dist/{isolated-completion-CRh-51AK.js → isolated-completion-DHBefrzg.js} +7 -4
- package/dist/launch-args-RXQwn8zV.js +90 -0
- package/dist/{managed-binary-DcpnJF9x.js → managed-binary-DrjjRRUD.js} +4 -103
- package/dist/managed-thread-store-D1t5jh3G.js +66 -0
- package/dist/media-understanding-provider.js +4 -1
- package/dist/{model-catalog-DT5vo6qo.js → model-catalog-B_6M04Wo.js} +6 -5
- package/dist/{models-CcrgSMQR.js → models-P9k2qAof.js} +3 -3
- package/dist/native-execution-policy-umd0tgh4.js +128 -0
- package/dist/{native-subagent-monitor-B3bvQGcg.js → native-subagent-monitor-BbCUKRwC.js} +69 -42
- package/dist/node-cli-sessions-rj0ysJwM.js +527 -0
- package/dist/{node-exec-server.runtime-nfbUOtUB.js → node-exec-server.runtime-BY_ctYnT.js} +53 -22
- package/dist/plan-BMJdMOEF.js +711 -0
- package/dist/plugin-activation-BQK-f5sV.js +133 -0
- package/dist/{thread-resume-BLgqkUc1.js → plugin-app-cache-key-CdSQzWyX.js} +4 -52
- package/dist/{plugin-approval-roundtrip-aQVdyL5g.js → plugin-approval-roundtrip-DeW95wB5.js} +1 -1
- package/dist/plugin-inventory-CoRCzWW4.js +325 -0
- package/dist/plugin-marketplace-discovery-3akBizzF.js +134 -0
- package/dist/{plugin-metadata-cache-BwCLTY_U.js → plugin-metadata-cache-DgNfRAGA.js} +13 -9
- package/dist/protocol-CAAcVIKF.js +275 -0
- package/dist/{provider-capabilities-BpG9Ltc5.js → provider-capabilities-W4tfK5Y5.js} +2 -2
- package/dist/{rate-limits-Fx_l4eNa.js → rate-limits-Bqnx1N4z.js} +1 -1
- package/dist/request-CGvGOpeR.js +198 -0
- package/dist/{run-attempt-BzthFQSM.js → run-attempt-DwKds3DN.js} +589 -373
- package/dist/{runtime-artifact-Bh_gf6-t.js → runtime-artifact-T-NwqeSH.js} +27 -27
- package/dist/sandbox-guard-BcT66fWy.js +165 -0
- package/dist/{session-binding-4Ki04sW-.js → session-binding-CKSepwIC.js} +29 -47
- package/dist/{session-binding-record-CyaXZvTe.js → session-binding-record-CaZjYwNS.js} +11 -25
- package/dist/session-catalog-HaDcp7Sv.js +1533 -0
- package/dist/session-catalog-adoption-BKLtSrwi.js +251 -0
- package/dist/session-catalog-archive-D0i2pGj2.js +56 -0
- package/dist/session-catalog-home-id-D7-aLiNt.js +190 -0
- package/dist/session-catalog-node-adoption-BUuDYY8R.js +182 -0
- package/dist/session-catalog-node-continue-CBtc4wkI.js +238 -0
- package/dist/session-catalog-parsing-CdD3JhdM.js +280 -0
- package/dist/session-catalog-provenance-DkJHo735.js +124 -0
- package/dist/{session-cli-BjLhpmS1.js → session-cli-CbgaHh0f.js} +3 -2
- package/dist/{session-history-DWmMqiqW.js → session-history-Cz-tOOYj.js} +6 -3
- package/dist/{session-upstream-marker-DReTpGz6.js → session-history-import-DFN7sWRU.js} +5 -50
- package/dist/{session-history-read-LHldwvyh.js → session-history-read-cxPUxyVV.js} +21 -7
- package/dist/session-history-worker-runtime.js +18 -6
- package/dist/{session-history.worker-zZVcx0ME.js → session-history.worker-CNEvGaU5.js} +58 -51
- package/dist/session-history.worker.js +1 -1
- package/dist/{session-initialization-BCFVnLL4.js → session-initialization-Jo86C60I.js} +2 -2
- package/dist/{session-permission-policy-BaueHmSj.js → session-permission-policy-B22InTp_.js} +4 -7
- package/dist/{session-retirement-DNdmYdFc.js → session-retirement-BSNG_mhf.js} +6 -5
- package/dist/session-upstream-marker-D15C9NHp.js +46 -0
- package/dist/{settled-turn-context-BOM3Y1pl.js → settled-turn-context-Du6gdUDd.js} +9 -9
- package/dist/{settled-turn-finalizer-BI-b1sry.js → settled-turn-finalizer-BuLUrZl2.js} +7 -6
- package/dist/shared-client-CVhez2Uo.js +2911 -0
- package/dist/{side-question-B6DWAw1A.js → side-question-DLbr2vUU.js} +64 -169
- package/dist/source-Da-h6f7e.js +518 -0
- package/dist/thread-archive-guard-D1bP04Tf.js +53 -0
- package/dist/{thread-lifecycle-DPK30jad.js → thread-lifecycle-D1pzRwHB.js} +112 -616
- package/dist/{thread-ownership-CbucAmmp.js → thread-ownership-D6oASVRu.js} +13 -15
- package/dist/thread-policy-D8kI7yAO.js +54 -0
- package/dist/thread-resume-T5cveyxA.js +52 -0
- package/dist/timeout-BVw8aaM1.js +33 -0
- package/dist/{transcript-mirror-attestation-Byl34PC-.js → transcript-mirror-attestation-DibE0krH.js} +17 -4
- package/dist/{transcript-mirror-_njEB84z.js → transcript-mirror-t5TOccct.js} +50 -260
- package/dist/{transport-stdio-CzTngV0j.js → transport-stdio-BGjHoYLr.js} +73 -43
- package/dist/{upstream-session-fork-1fwbNKzQ.js → upstream-session-fork-De-sLJ2r.js} +26 -18
- package/dist/{usage-i9fv5-4m.js → usage-CPPTmBvZ.js} +4 -3
- package/dist/version-omm6IPI3.js +12 -0
- package/dist/{web-search-provider.runtime-DKQn67A7.js → web-search-provider.runtime-CSVgQL0w.js} +3 -3
- package/openclaw.plugin.json +22 -1
- package/package.json +4 -4
- package/dist/request-C8H22rPi.js +0 -475
- package/dist/session-catalog-B47uwekb.js +0 -3272
- package/dist/shared-client-CKhX2kFt.js +0 -7505
- package/dist/thread-policy-CTalhWFy.js +0 -105
- package/dist/{auth-binding-Ds_QVm-X.js → auth-binding-Co2Vfcf_.js} +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Ct as claimCodexAppServerLiveThread, Mt as retainCodexAppServerLiveThread, jt as releaseCodexAppServerLiveThread } from "./shared-client-CKhX2kFt.js";
|
|
3
|
-
import { A as shouldRecordNativeToolTranscript, B as readNonEmptyStringArray, C as isSideEffectingNativeToolItem, D as itemTitle, E as itemStatus, H as readNullableString$1, I as readHookOutputEntries, L as readItem, N as normalizeOptionalString$1, S as isNonSuccessItemStatus, T as itemName, j as shouldSynthesizeToolProgressForItem, w as itemKind, x as isMutatingNativeToolItem, y as auditNativeToolTerminalStatus, z as readNonEmptyString } from "./attempt-client-cleanup-Bp1ZOnk2.js";
|
|
1
|
+
import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
|
|
4
2
|
import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-LphB8slG.js";
|
|
5
|
-
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-
|
|
3
|
+
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-Cz-tOOYj.js";
|
|
4
|
+
import { N as claimCodexAppServerLiveThread, U as releaseCodexAppServerLiveThread, W as retainCodexAppServerLiveThread } from "./shared-client-CVhez2Uo.js";
|
|
5
|
+
import { A as shouldRecordNativeToolTranscript, B as readNonEmptyStringArray, C as isSideEffectingNativeToolItem, D as itemTitle, E as itemStatus, H as readNullableString$1, I as readHookOutputEntries, L as readItem, N as normalizeOptionalString$1, O as matchesCodexSnapshotTurn, S as isNonSuccessItemStatus, T as itemName, j as shouldSynthesizeToolProgressForItem, w as itemKind, x as isMutatingNativeToolItem, y as auditNativeToolTerminalStatus, z as readNonEmptyString } from "./attempt-client-cleanup-D6cR54TV.js";
|
|
6
6
|
import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.js";
|
|
7
|
-
import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-
|
|
7
|
+
import { n as codexApprovalTimeoutText } from "./plugin-approval-roundtrip-DeW95wB5.js";
|
|
8
8
|
import { asFiniteNumber, asNonArrayRecord, normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
10
10
|
import path from "node:path";
|
|
11
|
-
import {
|
|
11
|
+
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
12
12
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
13
|
+
import { TOOL_PROGRESS_OUTPUT_MAX_CHARS, embeddedAgentLog, emitAgentEvent, formatErrorMessage, formatToolAggregate, formatToolProgressOutput, inferToolMetaFromArgs, runAgentHarnessAfterToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
13
14
|
import { redactSensitiveFieldValue, redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
14
|
-
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
15
15
|
import { createAgentHarnessTaskRuntime, deliverAgentHarnessTaskCompletion, isDurableAgentHarnessCompletionDelivery } from "openclaw/plugin-sdk/agent-harness-task-runtime";
|
|
16
16
|
//#region extensions/codex/src/app-server/event-projector-tool-output.ts
|
|
17
17
|
const TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS = 1e4;
|
|
@@ -20,7 +20,6 @@ var ToolOutputAccumulator = class {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
this.prefixByItem = /* @__PURE__ */ new Map();
|
|
22
22
|
this.originalLengthByItem = /* @__PURE__ */ new Map();
|
|
23
|
-
this.normalizedLengthByItem = /* @__PURE__ */ new Map();
|
|
24
23
|
this.trimStateByItem = /* @__PURE__ */ new Map();
|
|
25
24
|
this.truncatedItemIds = /* @__PURE__ */ new Set();
|
|
26
25
|
this.textByItem = /* @__PURE__ */ new Map();
|
|
@@ -29,19 +28,7 @@ var ToolOutputAccumulator = class {
|
|
|
29
28
|
const originalLength = (this.originalLengthByItem.get(itemId) ?? this.textByItem.get(itemId)?.length ?? 0) + delta.length;
|
|
30
29
|
this.originalLengthByItem.set(itemId, originalLength);
|
|
31
30
|
const normalizedLength = updateToolOutputTrimState(this.trimStateByItem, itemId, delta);
|
|
32
|
-
this.
|
|
33
|
-
if (this.truncatedItemIds.has(itemId)) {
|
|
34
|
-
const next = appendBoundedToolTranscriptText(this.prefixByItem.get(itemId) ?? this.textByItem.get(itemId) ?? "", "", originalLength);
|
|
35
|
-
this.prefixByItem.set(itemId, next.rawPrefix);
|
|
36
|
-
this.textByItem.set(itemId, next.text);
|
|
37
|
-
return {
|
|
38
|
-
text: next.text,
|
|
39
|
-
originalLength,
|
|
40
|
-
normalizedLength,
|
|
41
|
-
rawPrefix: next.rawPrefix
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const next = appendBoundedToolTranscriptText(this.prefixByItem.get(itemId) ?? this.textByItem.get(itemId) ?? "", delta, originalLength);
|
|
31
|
+
const next = appendBoundedToolTranscriptText(this.prefixByItem.get(itemId) ?? this.textByItem.get(itemId) ?? "", this.truncatedItemIds.has(itemId) ? "" : delta, originalLength);
|
|
45
32
|
this.prefixByItem.set(itemId, next.rawPrefix);
|
|
46
33
|
this.textByItem.set(itemId, next.text);
|
|
47
34
|
if (originalLength > 1e4) this.truncatedItemIds.add(itemId);
|
|
@@ -562,7 +549,8 @@ var CodexToolProgressProjection = class {
|
|
|
562
549
|
else if (this.lastNativeToolError?.mutatingAction !== true) this.lastNativeToolError = void 0;
|
|
563
550
|
}
|
|
564
551
|
emitToolResultSummary(item) {
|
|
565
|
-
if (!item ||
|
|
552
|
+
if (!item || item.type === "dynamicToolCall") return;
|
|
553
|
+
if (!this.params.onToolResult || !this.shouldEmitToolResult()) return;
|
|
566
554
|
if (this.resultSummaryItemIds.has(item.id)) return;
|
|
567
555
|
const toolName = itemName(item);
|
|
568
556
|
const args = itemToolArgs(item);
|
|
@@ -575,7 +563,8 @@ var CodexToolProgressProjection = class {
|
|
|
575
563
|
});
|
|
576
564
|
}
|
|
577
565
|
emitToolResultOutput(item) {
|
|
578
|
-
if (!item ||
|
|
566
|
+
if (!item || item.type === "dynamicToolCall") return;
|
|
567
|
+
if (!this.params.onToolResult || !this.shouldEmitToolOutput()) return;
|
|
579
568
|
if (this.resultOutputItemIds.has(item.id) || this.resultOutputStreamedItemIds.has(item.id)) return;
|
|
580
569
|
const toolName = itemName(item);
|
|
581
570
|
const output = itemOutputText(item, this.output.textByItem);
|
|
@@ -658,7 +647,7 @@ var CodexToolProgressProjection = class {
|
|
|
658
647
|
return !commandBearing || !channel && this.shouldEmitToolOutput();
|
|
659
648
|
}
|
|
660
649
|
emitTranscriptToolCallProgress(params) {
|
|
661
|
-
if (!shouldEmitTranscriptToolProgress(params.name, params.arguments)) return;
|
|
650
|
+
if (params.name === "progress_card" || !shouldEmitTranscriptToolProgress(params.name, params.arguments)) return;
|
|
662
651
|
this.transcriptProgressCallIds.add(params.id);
|
|
663
652
|
const args = normalizeToolTranscriptArguments(params.arguments);
|
|
664
653
|
const meta = this.shouldIncludeFormattedMeta(isCodexCommandBearingToolCall(params.name, args)) ? inferToolMetaFromArgs(params.name, args, { detailMode: this.toolProgressDetailMode() }) : void 0;
|
|
@@ -670,7 +659,12 @@ var CodexToolProgressProjection = class {
|
|
|
670
659
|
});
|
|
671
660
|
}
|
|
672
661
|
emitTranscriptToolResultProgress(params) {
|
|
673
|
-
if (this.transcriptProgressSuppressedIds.has(params.id) || !shouldEmitTranscriptToolProgress(params.name, this.transcriptArgumentsById.get(params.id))) return;
|
|
662
|
+
if (params.name === "progress_card" && !params.isError || this.transcriptProgressSuppressedIds.has(params.id) || !shouldEmitTranscriptToolProgress(params.name, this.transcriptArgumentsById.get(params.id))) return;
|
|
663
|
+
if (params.name === "progress_card" && this.shouldEmitToolResult()) this.emitToolResultMessage({
|
|
664
|
+
itemId: params.id,
|
|
665
|
+
text: formatToolSummary(params.name),
|
|
666
|
+
isError: true
|
|
667
|
+
});
|
|
674
668
|
if (!this.transcriptProgressCallIds.has(params.id)) this.emitTranscriptToolCallProgress({
|
|
675
669
|
id: params.id,
|
|
676
670
|
name: params.name,
|
|
@@ -1389,6 +1383,16 @@ var CodexEventProjection = class {
|
|
|
1389
1383
|
}
|
|
1390
1384
|
});
|
|
1391
1385
|
}
|
|
1386
|
+
handleRetry(params) {
|
|
1387
|
+
const rateLimited = isJsonObject(params.error) && params.error.codexErrorInfo === "rateLimitExceeded";
|
|
1388
|
+
this.emitAgentEvent({
|
|
1389
|
+
stream: "run_status",
|
|
1390
|
+
data: {
|
|
1391
|
+
phase: "retrying",
|
|
1392
|
+
message: rateLimited ? "Rate limited. The provider is retrying." : "Connection interrupted. The provider is retrying."
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1392
1396
|
flushPendingGuardianWarning() {
|
|
1393
1397
|
const pending = this.pendingGuardianWarning;
|
|
1394
1398
|
if (!pending) return;
|
|
@@ -1445,20 +1449,26 @@ var CodexEventProjection = class {
|
|
|
1445
1449
|
emitStandardItemEvent(params) {
|
|
1446
1450
|
const { item } = params;
|
|
1447
1451
|
if (!item) return;
|
|
1448
|
-
const
|
|
1452
|
+
const activity = item.type === "subAgentActivity";
|
|
1453
|
+
if (activity && params.phase === "start") return;
|
|
1454
|
+
const subagent = activity || item.type === "collabAgentToolCall";
|
|
1455
|
+
const kind = subagent ? "tool" : itemKind(item);
|
|
1449
1456
|
if (!kind) return;
|
|
1450
|
-
const name = itemName(item);
|
|
1457
|
+
const name = subagent ? "subagents" : itemName(item);
|
|
1451
1458
|
const commandBearing = isCommandBearingToolItem(item, itemToolArgs(item));
|
|
1452
|
-
const
|
|
1459
|
+
const subagentStatus = readStringField(item, activity ? "kind" : "status");
|
|
1460
|
+
const interaction = activity && subagentStatus === "interacted";
|
|
1461
|
+
const status = subagent && subagentStatus === "interrupted" ? "failed" : activity ? subagentStatus === "completed" || interaction ? "completed" : "running" : params.phase === "start" ? "running" : itemStatus(item);
|
|
1462
|
+
const meta = subagent ? [interaction ? "message sent" : activity ? subagentStatus : status, readStringField(item, activity ? "agentPath" : "tool")].filter(Boolean).join(": ") : itemMeta(item, this.toolProgress.toolProgressDetailMode());
|
|
1453
1463
|
const suppressChannelProgress = shouldSuppressChannelProgressForItem(item);
|
|
1454
1464
|
this.emitAgentEvent({
|
|
1455
1465
|
stream: "item",
|
|
1456
1466
|
data: {
|
|
1457
|
-
itemId: item.id,
|
|
1467
|
+
itemId: activity && !interaction ? `subagent:${readStringField(item, "agentThreadId") ?? item.id}` : item.id,
|
|
1458
1468
|
phase: params.phase,
|
|
1459
1469
|
kind,
|
|
1460
1470
|
title: itemTitle(item),
|
|
1461
|
-
status
|
|
1471
|
+
status,
|
|
1462
1472
|
...name ? { name } : {},
|
|
1463
1473
|
...meta ? { meta } : {},
|
|
1464
1474
|
...commandBearing ? { commandBearing: true } : {},
|
|
@@ -1466,6 +1476,31 @@ var CodexEventProjection = class {
|
|
|
1466
1476
|
}
|
|
1467
1477
|
});
|
|
1468
1478
|
}
|
|
1479
|
+
async emitSnapshotOnlyNativeToolProgress(params) {
|
|
1480
|
+
const { item, activeItemIds, completedItemIds, isActive } = params;
|
|
1481
|
+
if (!shouldSynthesizeToolProgressForItem(item) || !matchesCodexSnapshotTurn(item, this.turnId) || completedItemIds.has(item.id) || itemStatus(item) === "running") return;
|
|
1482
|
+
if (!activeItemIds.has(item.id)) {
|
|
1483
|
+
this.emitStandardItemEvent({
|
|
1484
|
+
phase: "start",
|
|
1485
|
+
item
|
|
1486
|
+
});
|
|
1487
|
+
await this.emitNormalizedToolItemEvent({
|
|
1488
|
+
phase: "start",
|
|
1489
|
+
item
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
if (!isActive()) return;
|
|
1493
|
+
activeItemIds.delete(item.id);
|
|
1494
|
+
this.emitStandardItemEvent({
|
|
1495
|
+
phase: "end",
|
|
1496
|
+
item
|
|
1497
|
+
});
|
|
1498
|
+
await this.emitNormalizedToolItemEvent({
|
|
1499
|
+
phase: "result",
|
|
1500
|
+
item
|
|
1501
|
+
});
|
|
1502
|
+
completedItemIds.add(item.id);
|
|
1503
|
+
}
|
|
1469
1504
|
async emitNormalizedToolItemEvent(params) {
|
|
1470
1505
|
const projection = projectNormalizedToolItem({
|
|
1471
1506
|
...params,
|
|
@@ -1517,10 +1552,10 @@ function extractCodexNativeSubagentCompletions(notification) {
|
|
|
1517
1552
|
if (!params) return [];
|
|
1518
1553
|
const item = isJsonObject(params.item) ? params.item : void 0;
|
|
1519
1554
|
if (!item) return [];
|
|
1520
|
-
const
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
return extractCodexNativeSubagentCompletionsFromText(text).filter((completion) => completion.agentPath === author);
|
|
1555
|
+
const communication = readTrustedInterAgentCommunication(item);
|
|
1556
|
+
const text = communication?.content;
|
|
1557
|
+
if (typeof text !== "string" || !text) return [];
|
|
1558
|
+
return extractCodexNativeSubagentCompletionsFromText(text).filter((completion) => completion.agentPath === communication?.author);
|
|
1524
1559
|
}
|
|
1525
1560
|
/** Parses one or more tagged subagent completion payloads from commentary text. */
|
|
1526
1561
|
function extractCodexNativeSubagentCompletionsFromText(text) {
|
|
@@ -1613,14 +1648,6 @@ function completedWithoutFinalAssistantMessage() {
|
|
|
1613
1648
|
kind: "no_final_assistant_message"
|
|
1614
1649
|
};
|
|
1615
1650
|
}
|
|
1616
|
-
function readTrustedInterAgentCommunicationContent(item) {
|
|
1617
|
-
const communication = readTrustedInterAgentCommunication(item);
|
|
1618
|
-
return typeof communication?.content === "string" ? communication.content : void 0;
|
|
1619
|
-
}
|
|
1620
|
-
function readTrustedInterAgentCommunicationAuthor(item) {
|
|
1621
|
-
const communication = readTrustedInterAgentCommunication(item);
|
|
1622
|
-
return typeof communication?.author === "string" ? communication.author : void 0;
|
|
1623
|
-
}
|
|
1624
1651
|
function readTrustedInterAgentCommunication(item) {
|
|
1625
1652
|
if (readStringField(item, "type") !== "message" || readStringField(item, "role") !== "assistant" || readStringField(item, "phase") !== "commentary") return;
|
|
1626
1653
|
const text = extractSingleTextPart(item);
|