@tangle-network/sdk-provider-cli-base 0.13.98 → 0.13.99

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.
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { McpConfig, ProviderConfig, StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { At as reasoningEvents, B as jsonEventParser, Ft as toolResultEvents, It as toolStartEvents, K as recordCliTokenUsage, Nt as textDeltaEvents, Q as localMcpEnv, Z as localMcpArgv, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { At as reasoningEvents, B as jsonEventParser, Ft as toolResultEvents, It as toolStartEvents, K as recordCliTokenUsage, Nt as textDeltaEvents, Q as localMcpEnv, Z as localMcpArgv, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  //#region src/adapters/amp/types.ts
3
3
  /**
4
4
  * Type guard for AMP events.
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Dt as CliTurnSpawn, Et as CliTurnProcess, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Dt as CliTurnSpawn, Et as CliTurnProcess, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { V as plaintextResponseParser, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { V as plaintextResponseParser, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
3
3
  import { join } from "node:path";
4
4
  //#region src/adapters/exo/adapter.ts
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { AgentExecutionInput, AgentExecutionResult, BackendCapabilities, InteractionResponse, McpConfig, ProviderConfig, SdkHostServices, StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { $ as enabledInteractionKinds, At as reasoningEvents, B as jsonEventParser, Ft as toolResultEvents, It as toolStartEvents, K as recordCliTokenUsage, Mt as streamPartBase, Nt as textDeltaEvents, P as McpInteractionSupport, Q as localMcpEnv, X as isLocalMcpConfig, Z as localMcpArgv, at as withTurnInteractions, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { $ as enabledInteractionKinds, At as reasoningEvents, B as jsonEventParser, Ft as toolResultEvents, It as toolStartEvents, K as recordCliTokenUsage, Mt as streamPartBase, Nt as textDeltaEvents, P as McpInteractionSupport, Q as localMcpEnv, X as isLocalMcpConfig, Z as localMcpArgv, at as withTurnInteractions, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { createHash, randomUUID } from "node:crypto";
3
3
  import { InteractionKind } from "@tangle-network/agent-interface";
4
4
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { V as plaintextResponseParser, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { V as plaintextResponseParser, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  //#region src/adapters/grok/adapter.ts
3
3
  const DECLARE_MODEL = "d=$HOME/.grok; [ -z \"$GROK_HOME\" ] || d=$GROK_HOME; t=\"[model.\\\"$1\\\"]\"; mkdir -p \"$d\" && { grep -qxF \"$t\" \"$d/managed_config.toml\" 2>/dev/null || printf '%s\\nmodel = \"%s\"\\n' \"$t\" \"$1\" >> \"$d/managed_config.toml\"; }; shift; exec \"$@\"";
4
4
  var GrokProviderAdapter = class extends CliProviderAdapterBase {
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
3
3
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
4
4
  import { InputPart, McpConfig, StreamEvent } from "@tangle-network/agent-interface";
@@ -1,4 +1,4 @@
1
- import { K as recordCliTokenUsage, Q as localMcpEnv, V as plaintextResponseParser, X as isLocalMcpConfig, Z as localMcpArgv, dt as prependPromptSection, jt as sessionObservedEvents, lt as partitionImageAttachments, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { K as recordCliTokenUsage, Q as localMcpEnv, V as plaintextResponseParser, X as isLocalMcpConfig, Z as localMcpArgv, dt as prependPromptSection, jt as sessionObservedEvents, lt as partitionImageAttachments, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
3
3
  import { writeFile } from "node:fs/promises";
4
4
  import { dirname, join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { K as recordCliTokenUsage, V as plaintextResponseParser, W as parseCliUsageLine, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { K as recordCliTokenUsage, V as plaintextResponseParser, W as parseCliUsageLine, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
3
3
  import { join } from "node:path";
4
4
  //#region src/adapters/nanoclaw/adapter.ts
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
3
3
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
4
4
  import { InputPart, StreamEvent } from "@tangle-network/agent-interface";
@@ -1,4 +1,4 @@
1
- import { V as plaintextResponseParser, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { V as plaintextResponseParser, dt as prependPromptSection, jt as sessionObservedEvents, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { qualifyModelId } from "@tangle-network/agent-profile-materialize";
3
3
  import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, o as WorkspacePlanApplication, qt as ExecutionState } from "../../index-C5lgVtsB.mjs";
1
+ import { Ct as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, o as WorkspacePlanApplication, qt as ExecutionState } from "../../index-DFhLi0WL.mjs";
2
2
  import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
3
3
  import { CliAuthFile, ProviderConfig, StreamEvent } from "@tangle-network/agent-interface";
4
4
 
@@ -1,4 +1,4 @@
1
- import { K as recordCliTokenUsage, N as nativeEffortArgs, dt as prependPromptSection, jt as sessionObservedEvents, kt as finalTextEvent, q as CliProviderAdapterBase } from "../../src-BWNbC3sj.mjs";
1
+ import { K as recordCliTokenUsage, N as nativeEffortArgs, dt as prependPromptSection, jt as sessionObservedEvents, kt as finalTextEvent, q as CliProviderAdapterBase } from "../../src-DIzNc1yb.mjs";
2
2
  import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
3
3
  //#region src/adapters/openclaw/adapter.ts
4
4
  /** openclaw's default agent id; the synthesized config declares only it. */
@@ -1,4 +1,4 @@
1
- import { Cn as AcpProcessSpec, Mt as AcpContentBlock, Rt as AcpTurn, Sn as AcpBridgeSpawn, St as AcpProviderAdapterBase, jt as AcpBridgeConfig } from "../../index-C5lgVtsB.mjs";
1
+ import { Cn as AcpProcessSpec, Mt as AcpContentBlock, Rt as AcpTurn, Sn as AcpBridgeSpawn, St as AcpProviderAdapterBase, jt as AcpBridgeConfig } from "../../index-DFhLi0WL.mjs";
2
2
  import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
3
3
  import { PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PrimeHarnessStateError, PrimeMaterializeOptions, PrimeProfileControls, PrimeProfileControls as PrimeProfileControls$1, PrimeProfileError, PrimeProfileSkill, PrimeProfileSubagent, assertPrimeModelAgreement, hasPrimeProfileMaterial, matchPrimeKernelDeadMarker, materializePrimeProfileControls, primeAgentDirEnv, primeProfileNeedsAgentDir, primeSubagentEntryId as subagentEntryId, primeThinkingLevel, prunePrimeProfileMaterial, readPrimeProfileControls } from "@tangle-network/agent-profile-materialize";
4
4
  import { RpcBridge } from "@tangle-network/sdk-cli-runner";
@@ -1,4 +1,4 @@
1
- import { H as AcpProviderAdapterBase, Ht as spawnAcpBridge, dt as prependPromptSection } from "../../src-BWNbC3sj.mjs";
1
+ import { H as AcpProviderAdapterBase, Ht as spawnAcpBridge, dt as prependPromptSection } from "../../src-DIzNc1yb.mjs";
2
2
  import { PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_HARNESS_STATE_ENV_DENYLIST as PRIME_HARNESS_STATE_ENV_DENYLIST$1, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_KERNEL_ENV_PASSTHROUGH as PRIME_KERNEL_ENV_PASSTHROUGH$1, PRIME_MCP_UNSUPPORTED_REASON, PrimeHarnessStateError, PrimeProfileError, assertPrimeModelAgreement, assertPrimeModelAgreement as assertPrimeModelAgreement$1, buildPiModelsConfig, hasPrimeProfileMaterial, matchPrimeKernelDeadMarker, materializePrimeProfileControls, materializePrimeProfileControls as materializePrimeProfileControls$1, primeAgentDirEnv, primeAgentDirEnv as primeAgentDirEnv$1, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId as subagentEntryId, primeThinkingLevel, primeThinkingLevel as primeThinkingLevel$1, prunePrimeProfileMaterial, readPrimeProfileControls, readPrimeProfileControls as readPrimeProfileControls$1, writePrimeAgentFile } from "@tangle-network/agent-profile-materialize";
3
3
  import { isAbsolute, join, relative, sep } from "node:path";
4
4
  import { existsSync, lchownSync, lstatSync, mkdirSync } from "node:fs";
@@ -228,6 +228,18 @@ interface ExecutionState {
228
228
  id: string;
229
229
  text: string;
230
230
  }>;
231
+ /**
232
+ * Each streamed part's `type:id`, numbered by its first
233
+ * `message.part.updated` (recordStreamedPart): the order the live
234
+ * transcript showed. The persisted reply keeps it.
235
+ */
236
+ partOrder?: Map<string, number>;
237
+ /**
238
+ * Each streamed text part's latest text, by the id the stream named it by.
239
+ * A reply that streams text, a tool and more text has two; each is stored
240
+ * as its own part. `textBuffer` stays the reply's text.
241
+ */
242
+ textParts?: Map<string, string>;
231
243
  fileParts?: Array<{
232
244
  id: string;
233
245
  key: string;
@@ -1362,4 +1374,4 @@ declare function homeXdgEnv(home: string): {
1362
1374
  };
1363
1375
  //#endregion
1364
1376
  export { PermissionPromptBridge as $, enabledInteractionKinds as $t, RouterModelLimits as A, ACP_PROTOCOL_VERSION as At, nativeEffortArgs as B, assertAcpTurnFinished as Bt, assertSealedNativeHome as C, AcpProcessSpec as Cn, CliProviderAdapterBase as Ct, resolveExecutableRealpath as D, CliTurnSpawn as Dt, refuseSecretLaunch as E, CliTurnProcess as Et, RepeatedToolFailure as F, AcpNewSessionResult as Ft, isLocalMcpConfig as G, CliProviderOptions as Gt, parseCliUsageLine as H, CliExecutionInput as Ht, RepeatedToolFailureGuardOptions as I, AcpPromptResult as It, McpInteractionSupport as J, InteractionToggleConfig as Jt, localMcpArgv as K, EphemeralContextInput as Kt, createRepeatedToolFailureGuard as L, AcpSessionUpdateParams as Lt, findRouterCatalogEntry as M, AcpContentBlock as Mt, resolveRouterModelLimits as N, AcpInitializeParams as Nt, ROUTER_MODEL_CATALOG_TIMEOUT_MS as O, PreparedCliLaunch as Ot, resolveRouterModelReasoningEfforts as P, AcpInitializeResult as Pt, InteractionMcpServerConfig$1 as Q, TurnEndReason as Qt, trackReasoningBlock as R, AcpTurn as Rt, SEALED_NATIVE_HOME_LAYOUT as S, AcpBridgeSpawn as Sn, AcpProviderAdapterBase as St, provenStoreBinary as T, createExecutionState as Tt, readCliTokenUsage as U, CliProviderConfig as Ut, accumulateCliTokenUsage as V, CliExecArgs as Vt, recordCliTokenUsage as W, CliProviderLogger as Wt, DEFAULT_INTERACTION_MCP_SERVER_NAME as X, PerTurnInteractionInput as Xt, AskUserBridge as Y, InteractionToggleKind as Yt, InteractionMcpServer$1 as Z, ToolCallState as Zt, toolResultEvents as _, resolveReferences as _n, InvalidAttachmentError as _t, PERMISSION_DECISION_TIMEOUT_MS as a, withTurnInteractions as an, deriveFilePart as at, secretMcpScope as b, servableStdioServer as bn, wasNeverLaunched as bt, homeXdgEnv as c, SecretProfileMcpCredentialProxy as cn, trackFilePart as ct, finalTextEvent as d, assertSealedNativeSearchPath as dn, EXECUTION_TRACE_HEADER as dt, interactionToggleEnabled as en, RequestPermissionBridge as et, reasoningEvents as f, directStdioMcpServers as fn, MANAGED_QUOTE_VERSION_HEADER as ft, textSnapshotEvents as g, requireRecord as gn, plaintextResponseParser as gt, textDeltaEvents as h, joinQueue as hn, jsonEventParser as ht, InteractionHttpBridge as i, withEphemeralContext as in, buildFileUrl as it, RouterModelLimitsResult as j, AcpBridgeConfig as jt, ResolveRouterModelLimitsInput as k, ACP_MIN_PROTOCOL_VERSION as kt, TerminalPlanSupport as l, SecretProfileMcpLease as ln, EXECUTION_CORRELATION_HEADERS as lt, streamPartBase as m, isPlainRecord as mn, PlaintextResponse as mt, HarnessId$1 as n, turnEndReason as nn, brokerInteractionTools$1 as nt, WorkspacePlanApplication$1 as o, SECRET_REFERENCE as on, deterministicFilePartId as ot, sessionObservedEvents as p, isLoopbackEndpoint as pn, executionCorrelationHeaders as pt, localMcpEnv as q, ExecutionState as qt, InteractionBroker$1 as r, turnInteractionEnabled as rn, interactionMcpToolName as rt, codexDeveloperInstructionArgs as s, SECRET_REFERENCE_PREFIX as sn, inferMediaType as st, CODEX_DISABLED_FEATURE_ARGS as t, readEphemeralContext as tn, RequestPlanBridge as tt, TerminalPlanSupportOptions as u, SecretProfileMcpServer as un, EXECUTION_ID_HEADER as ut, toolStartEvents as v, secretSessionTurnQueue as vn, SessionRehydrationError as vt, isTrustedStoreBinary as w, spawnAcpBridge as wn, runtimeSecretsOverlay as wt, NATIVE_SESSION_CONTRACTS$1 as x, untilSettledOrAborted as xn, mapAcpSessionUpdate as xt, forgetSessionScopes as y, servableMcpServer as yn, rejectNotLaunched as yt, kimiThinkingArgs as z, acpContentText as zt };
1365
- //# sourceMappingURL=index-C5lgVtsB.d.mts.map
1377
+ //# sourceMappingURL=index-DFhLi0WL.d.mts.map
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as PermissionPromptBridge, $t as enabledInteractionKinds, A as RouterModelLimits, At as ACP_PROTOCOL_VERSION, B as nativeEffortArgs, Bt as assertAcpTurnFinished, C as assertSealedNativeHome, Cn as AcpProcessSpec, Ct as CliProviderAdapterBase, D as resolveExecutableRealpath, Dt as CliTurnSpawn, E as refuseSecretLaunch, Et as CliTurnProcess, F as RepeatedToolFailure, Ft as AcpNewSessionResult, G as isLocalMcpConfig, Gt as CliProviderOptions, H as parseCliUsageLine, Ht as CliExecutionInput, I as RepeatedToolFailureGuardOptions, It as AcpPromptResult, J as McpInteractionSupport, Jt as InteractionToggleConfig, K as localMcpArgv, Kt as EphemeralContextInput, L as createRepeatedToolFailureGuard, Lt as AcpSessionUpdateParams, M as findRouterCatalogEntry, Mt as AcpContentBlock, N as resolveRouterModelLimits, Nt as AcpInitializeParams, O as ROUTER_MODEL_CATALOG_TIMEOUT_MS, Ot as PreparedCliLaunch, P as resolveRouterModelReasoningEfforts, Pt as AcpInitializeResult, Q as InteractionMcpServerConfig, Qt as TurnEndReason, R as trackReasoningBlock, Rt as AcpTurn, S as SEALED_NATIVE_HOME_LAYOUT, Sn as AcpBridgeSpawn, St as AcpProviderAdapterBase, T as provenStoreBinary, Tt as createExecutionState, U as readCliTokenUsage, Ut as CliProviderConfig, V as accumulateCliTokenUsage, Vt as CliExecArgs, W as recordCliTokenUsage, Wt as CliProviderLogger, X as DEFAULT_INTERACTION_MCP_SERVER_NAME, Xt as PerTurnInteractionInput, Y as AskUserBridge, Yt as InteractionToggleKind, Z as InteractionMcpServer, Zt as ToolCallState, _ as toolResultEvents, _n as resolveReferences, _t as InvalidAttachmentError, a as PERMISSION_DECISION_TIMEOUT_MS, an as withTurnInteractions, at as deriveFilePart, b as secretMcpScope, bn as servableStdioServer, bt as wasNeverLaunched, c as homeXdgEnv, cn as SecretProfileMcpCredentialProxy, ct as trackFilePart, d as finalTextEvent, dn as assertSealedNativeSearchPath, dt as EXECUTION_TRACE_HEADER, en as interactionToggleEnabled, et as RequestPermissionBridge, f as reasoningEvents, fn as directStdioMcpServers, ft as MANAGED_QUOTE_VERSION_HEADER, g as textSnapshotEvents, gn as requireRecord, gt as plaintextResponseParser, h as textDeltaEvents, hn as joinQueue, ht as jsonEventParser, i as InteractionHttpBridge, in as withEphemeralContext, it as buildFileUrl, j as RouterModelLimitsResult, jt as AcpBridgeConfig, k as ResolveRouterModelLimitsInput, kt as ACP_MIN_PROTOCOL_VERSION, l as TerminalPlanSupport, ln as SecretProfileMcpLease, lt as EXECUTION_CORRELATION_HEADERS, m as streamPartBase, mn as isPlainRecord, mt as PlaintextResponse, n as HarnessId, nn as turnEndReason, nt as brokerInteractionTools, o as WorkspacePlanApplication, on as SECRET_REFERENCE, ot as deterministicFilePartId, p as sessionObservedEvents, pn as isLoopbackEndpoint, pt as executionCorrelationHeaders, q as localMcpEnv, qt as ExecutionState, r as InteractionBroker, rn as turnInteractionEnabled, rt as interactionMcpToolName, s as codexDeveloperInstructionArgs, sn as SECRET_REFERENCE_PREFIX, st as inferMediaType, t as CODEX_DISABLED_FEATURE_ARGS, tn as readEphemeralContext, tt as RequestPlanBridge, u as TerminalPlanSupportOptions, un as SecretProfileMcpServer, ut as EXECUTION_ID_HEADER, v as toolStartEvents, vn as secretSessionTurnQueue, vt as SessionRehydrationError, w as isTrustedStoreBinary, wn as spawnAcpBridge, wt as runtimeSecretsOverlay, x as NATIVE_SESSION_CONTRACTS, xn as untilSettledOrAborted, xt as mapAcpSessionUpdate, y as forgetSessionScopes, yn as servableMcpServer, yt as rejectNotLaunched, z as kimiThinkingArgs, zt as acpContentText } from "./index-C5lgVtsB.mjs";
1
+ import { $ as PermissionPromptBridge, $t as enabledInteractionKinds, A as RouterModelLimits, At as ACP_PROTOCOL_VERSION, B as nativeEffortArgs, Bt as assertAcpTurnFinished, C as assertSealedNativeHome, Cn as AcpProcessSpec, Ct as CliProviderAdapterBase, D as resolveExecutableRealpath, Dt as CliTurnSpawn, E as refuseSecretLaunch, Et as CliTurnProcess, F as RepeatedToolFailure, Ft as AcpNewSessionResult, G as isLocalMcpConfig, Gt as CliProviderOptions, H as parseCliUsageLine, Ht as CliExecutionInput, I as RepeatedToolFailureGuardOptions, It as AcpPromptResult, J as McpInteractionSupport, Jt as InteractionToggleConfig, K as localMcpArgv, Kt as EphemeralContextInput, L as createRepeatedToolFailureGuard, Lt as AcpSessionUpdateParams, M as findRouterCatalogEntry, Mt as AcpContentBlock, N as resolveRouterModelLimits, Nt as AcpInitializeParams, O as ROUTER_MODEL_CATALOG_TIMEOUT_MS, Ot as PreparedCliLaunch, P as resolveRouterModelReasoningEfforts, Pt as AcpInitializeResult, Q as InteractionMcpServerConfig, Qt as TurnEndReason, R as trackReasoningBlock, Rt as AcpTurn, S as SEALED_NATIVE_HOME_LAYOUT, Sn as AcpBridgeSpawn, St as AcpProviderAdapterBase, T as provenStoreBinary, Tt as createExecutionState, U as readCliTokenUsage, Ut as CliProviderConfig, V as accumulateCliTokenUsage, Vt as CliExecArgs, W as recordCliTokenUsage, Wt as CliProviderLogger, X as DEFAULT_INTERACTION_MCP_SERVER_NAME, Xt as PerTurnInteractionInput, Y as AskUserBridge, Yt as InteractionToggleKind, Z as InteractionMcpServer, Zt as ToolCallState, _ as toolResultEvents, _n as resolveReferences, _t as InvalidAttachmentError, a as PERMISSION_DECISION_TIMEOUT_MS, an as withTurnInteractions, at as deriveFilePart, b as secretMcpScope, bn as servableStdioServer, bt as wasNeverLaunched, c as homeXdgEnv, cn as SecretProfileMcpCredentialProxy, ct as trackFilePart, d as finalTextEvent, dn as assertSealedNativeSearchPath, dt as EXECUTION_TRACE_HEADER, en as interactionToggleEnabled, et as RequestPermissionBridge, f as reasoningEvents, fn as directStdioMcpServers, ft as MANAGED_QUOTE_VERSION_HEADER, g as textSnapshotEvents, gn as requireRecord, gt as plaintextResponseParser, h as textDeltaEvents, hn as joinQueue, ht as jsonEventParser, i as InteractionHttpBridge, in as withEphemeralContext, it as buildFileUrl, j as RouterModelLimitsResult, jt as AcpBridgeConfig, k as ResolveRouterModelLimitsInput, kt as ACP_MIN_PROTOCOL_VERSION, l as TerminalPlanSupport, ln as SecretProfileMcpLease, lt as EXECUTION_CORRELATION_HEADERS, m as streamPartBase, mn as isPlainRecord, mt as PlaintextResponse, n as HarnessId, nn as turnEndReason, nt as brokerInteractionTools, o as WorkspacePlanApplication, on as SECRET_REFERENCE, ot as deterministicFilePartId, p as sessionObservedEvents, pn as isLoopbackEndpoint, pt as executionCorrelationHeaders, q as localMcpEnv, qt as ExecutionState, r as InteractionBroker, rn as turnInteractionEnabled, rt as interactionMcpToolName, s as codexDeveloperInstructionArgs, sn as SECRET_REFERENCE_PREFIX, st as inferMediaType, t as CODEX_DISABLED_FEATURE_ARGS, tn as readEphemeralContext, tt as RequestPlanBridge, u as TerminalPlanSupportOptions, un as SecretProfileMcpServer, ut as EXECUTION_ID_HEADER, v as toolStartEvents, vn as secretSessionTurnQueue, vt as SessionRehydrationError, w as isTrustedStoreBinary, wn as spawnAcpBridge, wt as runtimeSecretsOverlay, x as NATIVE_SESSION_CONTRACTS, xn as untilSettledOrAborted, xt as mapAcpSessionUpdate, y as forgetSessionScopes, yn as servableMcpServer, yt as rejectNotLaunched, z as kimiThinkingArgs, zt as acpContentText } from "./index-DFhLi0WL.mjs";
2
2
  import { a as partitionImageAttachments, i as PreparedAttachment, n as MAX_TOTAL_INLINE_IMAGE_BYTES, o as preparePromptInputParts, r as PROMPT_SECTION_SEPARATOR, s as prependPromptSection, t as MAX_INLINE_IMAGE_BYTES } from "./prompt-input-CD7okX8T.mjs";
3
3
  export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpBridgeConfig, AcpBridgeSpawn, AcpContentBlock, AcpInitializeParams, AcpInitializeResult, AcpNewSessionResult, AcpProcessSpec, AcpPromptResult, AcpProviderAdapterBase, AcpSessionUpdateParams, AcpTurn, AskUserBridge, CODEX_DISABLED_FEATURE_ARGS, CliExecArgs, CliExecutionInput, CliProviderAdapterBase, CliProviderConfig, CliProviderLogger, CliProviderOptions, CliTurnProcess, CliTurnSpawn, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, EphemeralContextInput, ExecutionState, HarnessId, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InteractionMcpServerConfig, InteractionToggleConfig, InteractionToggleKind, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, PerTurnInteractionInput, PermissionPromptBridge, PlaintextResponse, PreparedAttachment, PreparedCliLaunch, ROUTER_MODEL_CATALOG_TIMEOUT_MS, RepeatedToolFailure, RepeatedToolFailureGuardOptions, RequestPermissionBridge, RequestPlanBridge, ResolveRouterModelLimitsInput, RouterModelLimits, RouterModelLimitsResult, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SecretProfileMcpCredentialProxy, SecretProfileMcpLease, SecretProfileMcpServer, SessionRehydrationError, TerminalPlanSupport, TerminalPlanSupportOptions, ToolCallState, TurnEndReason, WorkspacePlanApplication, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as enabledInteractionKinds, A as resolveRouterModelLimits, At as reasoningEvents, B as jsonEventParser, Bt as acpContentText, C as assertSealedNativeHome, Ct as EXECUTION_ID_HEADER, D as resolveExecutableRealpath, Dt as homeXdgEnv, E as refuseSecretLaunch, Et as executionCorrelationHeaders, F as TerminalPlanSupport, Ft as toolResultEvents, G as readCliTokenUsage, H as AcpProviderAdapterBase, Ht as spawnAcpBridge, I as DEFAULT_INTERACTION_MCP_SERVER_NAME, It as toolStartEvents, J as createRepeatedToolFailureGuard, K as recordCliTokenUsage, L as InteractionMcpServer, Lt as trackReasoningBlock, M as kimiThinkingArgs, Mt as streamPartBase, N as nativeEffortArgs, Nt as textDeltaEvents, O as ROUTER_MODEL_CATALOG_TIMEOUT_MS, Ot as mapAcpSessionUpdate, P as McpInteractionSupport, Pt as textSnapshotEvents, Q as localMcpEnv, R as brokerInteractionTools, Rt as ACP_MIN_PROTOCOL_VERSION, S as SEALED_NATIVE_HOME_LAYOUT, St as EXECUTION_CORRELATION_HEADERS, T as provenStoreBinary, Tt as MANAGED_QUOTE_VERSION_HEADER, U as accumulateCliTokenUsage, V as plaintextResponseParser, Vt as assertAcpTurnFinished, W as parseCliUsageLine, X as isLocalMcpConfig, Y as createExecutionState, Z as localMcpArgv, _ as secretSessionTurnQueue, _t as InvalidAttachmentError, a as codexDeveloperInstructionArgs, at as withTurnInteractions, b as untilSettledOrAborted, bt as wasNeverLaunched, c as SECRET_REFERENCE, ct as PROMPT_SECTION_SEPARATOR, d as directStdioMcpServers, dt as prependPromptSection, et as interactionToggleEnabled, f as isLoopbackEndpoint, ft as buildFileUrl, g as resolveReferences, gt as trackFilePart, h as requireRecord, ht as inferMediaType, i as PERMISSION_DECISION_TIMEOUT_MS, it as withEphemeralContext, j as resolveRouterModelReasoningEfforts, jt as sessionObservedEvents, k as findRouterCatalogEntry, kt as finalTextEvent, l as SECRET_REFERENCE_PREFIX, lt as partitionImageAttachments, m as joinQueue, mt as deterministicFilePartId, n as InteractionBroker, nt as turnEndReason, o as forgetSessionScopes, ot as MAX_INLINE_IMAGE_BYTES, p as isPlainRecord, pt as deriveFilePart, q as CliProviderAdapterBase, r as InteractionHttpBridge, rt as turnInteractionEnabled, s as secretMcpScope, st as MAX_TOTAL_INLINE_IMAGE_BYTES, t as CODEX_DISABLED_FEATURE_ARGS, tt as readEphemeralContext, u as assertSealedNativeSearchPath, ut as preparePromptInputParts, v as servableMcpServer, vt as SessionRehydrationError, w as isTrustedStoreBinary, wt as EXECUTION_TRACE_HEADER, x as NATIVE_SESSION_CONTRACTS, xt as runtimeSecretsOverlay, y as servableStdioServer, yt as rejectNotLaunched, z as interactionMcpToolName, zt as ACP_PROTOCOL_VERSION } from "./src-BWNbC3sj.mjs";
1
+ import { $ as enabledInteractionKinds, A as resolveRouterModelLimits, At as reasoningEvents, B as jsonEventParser, Bt as acpContentText, C as assertSealedNativeHome, Ct as EXECUTION_ID_HEADER, D as resolveExecutableRealpath, Dt as homeXdgEnv, E as refuseSecretLaunch, Et as executionCorrelationHeaders, F as TerminalPlanSupport, Ft as toolResultEvents, G as readCliTokenUsage, H as AcpProviderAdapterBase, Ht as spawnAcpBridge, I as DEFAULT_INTERACTION_MCP_SERVER_NAME, It as toolStartEvents, J as createRepeatedToolFailureGuard, K as recordCliTokenUsage, L as InteractionMcpServer, Lt as trackReasoningBlock, M as kimiThinkingArgs, Mt as streamPartBase, N as nativeEffortArgs, Nt as textDeltaEvents, O as ROUTER_MODEL_CATALOG_TIMEOUT_MS, Ot as mapAcpSessionUpdate, P as McpInteractionSupport, Pt as textSnapshotEvents, Q as localMcpEnv, R as brokerInteractionTools, Rt as ACP_MIN_PROTOCOL_VERSION, S as SEALED_NATIVE_HOME_LAYOUT, St as EXECUTION_CORRELATION_HEADERS, T as provenStoreBinary, Tt as MANAGED_QUOTE_VERSION_HEADER, U as accumulateCliTokenUsage, V as plaintextResponseParser, Vt as assertAcpTurnFinished, W as parseCliUsageLine, X as isLocalMcpConfig, Y as createExecutionState, Z as localMcpArgv, _ as secretSessionTurnQueue, _t as InvalidAttachmentError, a as codexDeveloperInstructionArgs, at as withTurnInteractions, b as untilSettledOrAborted, bt as wasNeverLaunched, c as SECRET_REFERENCE, ct as PROMPT_SECTION_SEPARATOR, d as directStdioMcpServers, dt as prependPromptSection, et as interactionToggleEnabled, f as isLoopbackEndpoint, ft as buildFileUrl, g as resolveReferences, gt as trackFilePart, h as requireRecord, ht as inferMediaType, i as PERMISSION_DECISION_TIMEOUT_MS, it as withEphemeralContext, j as resolveRouterModelReasoningEfforts, jt as sessionObservedEvents, k as findRouterCatalogEntry, kt as finalTextEvent, l as SECRET_REFERENCE_PREFIX, lt as partitionImageAttachments, m as joinQueue, mt as deterministicFilePartId, n as InteractionBroker, nt as turnEndReason, o as forgetSessionScopes, ot as MAX_INLINE_IMAGE_BYTES, p as isPlainRecord, pt as deriveFilePart, q as CliProviderAdapterBase, r as InteractionHttpBridge, rt as turnInteractionEnabled, s as secretMcpScope, st as MAX_TOTAL_INLINE_IMAGE_BYTES, t as CODEX_DISABLED_FEATURE_ARGS, tt as readEphemeralContext, u as assertSealedNativeSearchPath, ut as preparePromptInputParts, v as servableMcpServer, vt as SessionRehydrationError, w as isTrustedStoreBinary, wt as EXECUTION_TRACE_HEADER, x as NATIVE_SESSION_CONTRACTS, xt as runtimeSecretsOverlay, y as servableStdioServer, yt as rejectNotLaunched, z as interactionMcpToolName, zt as ACP_PROTOCOL_VERSION } from "./src-DIzNc1yb.mjs";
2
2
  export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpProviderAdapterBase, CODEX_DISABLED_FEATURE_ARGS, CliProviderAdapterBase, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, ROUTER_MODEL_CATALOG_TIMEOUT_MS, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SessionRehydrationError, TerminalPlanSupport, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
@@ -1992,13 +1992,34 @@ var CliAdapterSessions = class extends CliAdapterProfile {
1992
1992
  }
1993
1993
  buildAssistantParts(state) {
1994
1994
  const parts = [];
1995
- for (const reasoning of state.reasoningBuffer) parts.push({
1996
- type: "reasoning",
1997
- text: reasoning
1995
+ const reasoningParts = state.reasoningParts ?? [];
1996
+ let nextReasoning = 0;
1997
+ for (const reasoning of state.reasoningBuffer) {
1998
+ const at = reasoningParts.findIndex(({ text }, index) => index >= nextReasoning && text === reasoning);
1999
+ const id = reasoningParts[at]?.id;
2000
+ if (id) nextReasoning = at + 1;
2001
+ parts.push({
2002
+ key: id ? `reasoning:${id}` : void 0,
2003
+ part: {
2004
+ type: "reasoning",
2005
+ text: reasoning
2006
+ }
2007
+ });
2008
+ }
2009
+ const streamedText = [...state.textParts ?? []].filter(([, text]) => text !== "");
2010
+ for (const [id, text] of streamedText) parts.push({
2011
+ key: `text:${id}`,
2012
+ part: {
2013
+ type: "text",
2014
+ text
2015
+ }
1998
2016
  });
1999
- if (state.textBuffer) parts.push({
2000
- type: "text",
2001
- text: state.textBuffer
2017
+ if (streamedText.length === 0 && state.textBuffer) parts.push({
2018
+ rank: Number.POSITIVE_INFINITY,
2019
+ part: {
2020
+ type: "text",
2021
+ text: state.textBuffer
2022
+ }
2002
2023
  });
2003
2024
  for (const toolCall of state.toolCalls.values()) {
2004
2025
  const inputRecord = toolCall.input ?? {};
@@ -2022,20 +2043,33 @@ var CliAdapterSessions = class extends CliAdapterProfile {
2022
2043
  input: inputRecord
2023
2044
  };
2024
2045
  parts.push({
2025
- type: "tool",
2026
- tool: toolCall.name,
2027
- callID: toolCall.id,
2028
- state: toolState
2046
+ key: `tool:${toolCall.id}`,
2047
+ part: {
2048
+ type: "tool",
2049
+ tool: toolCall.name,
2050
+ callID: toolCall.id,
2051
+ state: toolState
2052
+ }
2029
2053
  });
2030
2054
  }
2031
2055
  for (const file of state.fileParts ?? []) parts.push({
2032
- type: "file",
2033
- id: file.id,
2034
- filename: file.filename,
2035
- mediaType: file.mediaType,
2036
- url: file.url
2056
+ key: `file:${file.id}`,
2057
+ part: {
2058
+ type: "file",
2059
+ id: file.id,
2060
+ filename: file.filename,
2061
+ mediaType: file.mediaType,
2062
+ url: file.url
2063
+ }
2037
2064
  });
2038
- return parts;
2065
+ let rank = -1;
2066
+ return parts.map(({ key, part, rank: fixed }) => {
2067
+ rank = fixed ?? (key === void 0 ? void 0 : state.partOrder?.get(key)) ?? rank;
2068
+ return {
2069
+ part,
2070
+ rank
2071
+ };
2072
+ }).sort((a, b) => a.rank - b.rank).map(({ part }) => part);
2039
2073
  }
2040
2074
  extractToolInvocations(state) {
2041
2075
  const invocations = [];
@@ -2890,6 +2924,25 @@ var TurnLiveness = class {
2890
2924
  */
2891
2925
  const REPEATED_TOOL_FAILURE_LIMIT = 3;
2892
2926
  /**
2927
+ * Records a streamed part on the turn: its rank, by the first
2928
+ * `message.part.updated` that names it, and a text part's latest text. The
2929
+ * stored reply replays both (buildAssistantParts), so it reads as the live
2930
+ * transcript did.
2931
+ */
2932
+ function recordStreamedPart(state, event) {
2933
+ if (event.type !== "message.part.updated") return;
2934
+ const { part } = event;
2935
+ const id = part.id;
2936
+ if (!id) return;
2937
+ state.partOrder ??= /* @__PURE__ */ new Map();
2938
+ const key = `${part.type}:${id}`;
2939
+ if (!state.partOrder.has(key)) state.partOrder.set(key, state.partOrder.size);
2940
+ if (part.type === "text") {
2941
+ state.textParts ??= /* @__PURE__ */ new Map();
2942
+ state.textParts.set(id, part.text);
2943
+ }
2944
+ }
2945
+ /**
2893
2946
  * Observes one turn's provider stream: keeps the execution state current,
2894
2947
  * persists parts and the provider session id as they arrive, stops a turn
2895
2948
  * that repeats a rejected tool call, and pings while the stream is quiet.
@@ -2954,6 +3007,7 @@ var TurnObserver = class {
2954
3007
  state.terminalStatus = event.status;
2955
3008
  if (event.status === "failed" && event.detail) state.lastDiagnostic = event.detail;
2956
3009
  }
3010
+ recordStreamedPart(state, event);
2957
3011
  if (event.type === "message.part.updated" && recorder.recordAssistantPartUpdate) this.partUpdates.schedule(event.part, event.delta);
2958
3012
  this.options.onEvent?.(event);
2959
3013
  this.stopIfRequested();
@@ -3771,7 +3825,10 @@ var AcpProviderAdapterBase = class extends CliProviderAdapterBase {
3771
3825
  timeoutMs: Math.min(timeoutMs, 12e4),
3772
3826
  abortSignal: input.abortSignal,
3773
3827
  onUpdate: (params) => {
3774
- for (const event of this.mapAcpUpdate(params, state, sessionId)) onEvent?.(event);
3828
+ for (const event of this.mapAcpUpdate(params, state, sessionId)) {
3829
+ recordStreamedPart(state, event);
3830
+ onEvent?.(event);
3831
+ }
3775
3832
  }
3776
3833
  });
3777
3834
  break;
@@ -4781,4 +4838,4 @@ async function forgetSessionScopes(target) {
4781
4838
  //#endregion
4782
4839
  export { enabledInteractionKinds as $, resolveRouterModelLimits as A, reasoningEvents as At, jsonEventParser as B, acpContentText as Bt, assertSealedNativeHome as C, EXECUTION_ID_HEADER as Ct, resolveExecutableRealpath as D, homeXdgEnv as Dt, refuseSecretLaunch as E, executionCorrelationHeaders as Et, TerminalPlanSupport as F, toolResultEvents as Ft, readCliTokenUsage as G, AcpProviderAdapterBase as H, spawnAcpBridge as Ht, DEFAULT_INTERACTION_MCP_SERVER_NAME as I, toolStartEvents as It, createRepeatedToolFailureGuard as J, recordCliTokenUsage as K, InteractionMcpServer$1 as L, trackReasoningBlock as Lt, kimiThinkingArgs as M, streamPartBase as Mt, nativeEffortArgs as N, textDeltaEvents as Nt, ROUTER_MODEL_CATALOG_TIMEOUT_MS as O, mapAcpSessionUpdate as Ot, McpInteractionSupport as P, textSnapshotEvents as Pt, localMcpEnv as Q, brokerInteractionTools$1 as R, ACP_MIN_PROTOCOL_VERSION as Rt, SEALED_NATIVE_HOME_LAYOUT as S, EXECUTION_CORRELATION_HEADERS as St, provenStoreBinary as T, MANAGED_QUOTE_VERSION_HEADER as Tt, accumulateCliTokenUsage as U, plaintextResponseParser as V, assertAcpTurnFinished as Vt, parseCliUsageLine as W, isLocalMcpConfig as X, createExecutionState as Y, localMcpArgv as Z, secretSessionTurnQueue as _, InvalidAttachmentError as _t, codexDeveloperInstructionArgs as a, withTurnInteractions as at, untilSettledOrAborted as b, wasNeverLaunched as bt, SECRET_REFERENCE as c, PROMPT_SECTION_SEPARATOR as ct, directStdioMcpServers as d, prependPromptSection as dt, interactionToggleEnabled as et, isLoopbackEndpoint as f, buildFileUrl as ft, resolveReferences as g, trackFilePart as gt, requireRecord as h, inferMediaType as ht, PERMISSION_DECISION_TIMEOUT_MS as i, withEphemeralContext as it, resolveRouterModelReasoningEfforts as j, sessionObservedEvents as jt, findRouterCatalogEntry as k, finalTextEvent as kt, SECRET_REFERENCE_PREFIX as l, partitionImageAttachments as lt, joinQueue as m, deterministicFilePartId as mt, InteractionBroker$1 as n, turnEndReason as nt, forgetSessionScopes as o, MAX_INLINE_IMAGE_BYTES as ot, isPlainRecord as p, deriveFilePart as pt, CliProviderAdapterBase as q, InteractionHttpBridge as r, turnInteractionEnabled as rt, secretMcpScope as s, MAX_TOTAL_INLINE_IMAGE_BYTES as st, CODEX_DISABLED_FEATURE_ARGS as t, readEphemeralContext as tt, assertSealedNativeSearchPath as u, preparePromptInputParts as ut, servableMcpServer as v, SessionRehydrationError as vt, isTrustedStoreBinary as w, EXECUTION_TRACE_HEADER as wt, NATIVE_SESSION_CONTRACTS$1 as x, runtimeSecretsOverlay as xt, servableStdioServer as y, rejectNotLaunched as yt, interactionMcpToolName as z, ACP_PROTOCOL_VERSION as zt };
4783
4840
 
4784
- //# sourceMappingURL=src-BWNbC3sj.mjs.map
4841
+ //# sourceMappingURL=src-DIzNc1yb.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sdk-provider-cli-base",
3
- "version": "0.13.98",
3
+ "version": "0.13.99",
4
4
  "description": "Base adapter for CLI-based AI agent providers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -79,8 +79,8 @@
79
79
  "registry": "https://registry.npmjs.org"
80
80
  },
81
81
  "tangleRelease": {
82
- "sourceSha": "8ef259a66cfa3bc636ac2dc12c661e539818bdb1",
83
- "mergedAt": "2026-11-16T00:53:37-08:00"
82
+ "sourceSha": "d20b0ed9593d98d760c1337aa8bba4934a03387e",
83
+ "mergedAt": "2026-11-16T01:14:23-08:00"
84
84
  },
85
85
  "scripts": {
86
86
  "build": "tsdown",