@tangle-network/agent-app 0.47.11 → 0.47.13

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.
@@ -18,6 +18,14 @@
18
18
  * session — including its `step-finish` usage, which must never be billed) and
19
19
  * lets `runWithModelFailover` walk to the next model.
20
20
  *
21
+ * `liveLifecycleEvents` relaxes the buffer for progress only. `start`,
22
+ * `status`, `model-processing`, and session lifecycle carry no answer and no
23
+ * receipt, so a product may take them the moment they arrive and show what
24
+ * the turn is waiting on. Measured 2026-09-11 on a warm production box:
25
+ * OpenCode reports whole parts, so the buffer held every event for 16 s and
26
+ * the product could show nothing through provisioning and agent startup. Off
27
+ * by default: with it on, an abandoned model's progress stays in the stream.
28
+ *
21
29
  * The classification itself is `isUpstreamUnavailable` verbatim, so this path
22
30
  * inherits the measured facts from the 2026-07-25 outage — above all that an
23
31
  * outage is NOT always a thrown error: the sandbox RESOLVES a terminal `error`
@@ -81,6 +89,13 @@ interface TerminalFailure {
81
89
  * never by throwing. Both `data` and the whole record are offered to
82
90
  * `isUpstreamUnavailable` so a payload nested either way is caught.
83
91
  */
92
+ /**
93
+ * Progress the consumer may see before the commit point: it names no model
94
+ * output and carries no billing receipt, so streaming it live cannot duplicate
95
+ * an answer or bill an abandoned attempt. `warning` and every
96
+ * `message.part.updated` (including `step-start`/`step-finish`) stay buffered.
97
+ */
98
+ export declare function isLiveLifecycleEvent(event: unknown): boolean;
84
99
  export declare function classifyTerminalFailure(event: unknown): TerminalFailure | null;
85
100
  /** Open the raw turn stream for one specific model. */
86
101
  export type OpenModelStream = (args: {
@@ -118,6 +133,14 @@ export interface ModelFailoverStreamOptions {
118
133
  firstResponseTimeoutMs?: number;
119
134
  /** Override the commit-point rule. Default {@link isCommittingSandboxEvent}. */
120
135
  isCommitting?: (event: unknown) => boolean;
136
+ /**
137
+ * Stream {@link isLiveLifecycleEvent} progress to the consumer as it arrives
138
+ * instead of holding it until the attempt commits. Default `false`, which
139
+ * keeps an abandoned model's events entirely off the wire. With it on, such
140
+ * an event is never replayed from the buffer, and one from an abandoned
141
+ * attempt stays in the stream — it describes the sandbox, not the answer.
142
+ */
143
+ liveLifecycleEvents?: boolean;
121
144
  onFallback?: (info: ModelFallbackInfo) => void;
122
145
  /**
123
146
  * How many times to RE-RUN THE SAME MODEL when a turn completes having
@@ -87,6 +87,11 @@ export interface SandboxChatProducerOptions {
87
87
  * answer-bearing event. Default 60 seconds. Processing/lifecycle events do
88
88
  * not extend it. */
89
89
  firstResponseTimeoutMs?: number;
90
+ /** Forward `start`/`status`/`model-processing`/session lifecycle to the
91
+ * client as it arrives instead of after the commit point, so a product can
92
+ * show what a turn is waiting on. Default `false`. An abandoned model's
93
+ * progress then stays on the wire; its answer and receipt never do. */
94
+ liveLifecycleEvents?: boolean;
90
95
  /** Fired when a model is abandoned mid-chain (telemetry/alerting). The user
91
96
  * already sees a transcript notice; this is for the operator. */
92
97
  onModelFallback?: (info: ModelFallbackInfo) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.47.11",
3
+ "version": "0.47.13",
4
4
  "packageManager": "pnpm@11.24.0",
5
5
  "description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
6
6
  "keywords": [
@@ -541,7 +541,7 @@
541
541
  "@tangle-network/agent-interface": "2.6.0",
542
542
  "@tangle-network/agent-knowledge": "15.0.2",
543
543
  "@tangle-network/agent-profile-materialize": "0.19.0",
544
- "@tangle-network/agent-runtime": "0.204.1",
544
+ "@tangle-network/agent-runtime": "0.207.0",
545
545
  "@tangle-network/brand": "1.5.0",
546
546
  "@tangle-network/sandbox": "0.38.2",
547
547
  "@tangle-network/sandbox-ui": "0.113.3",
@@ -601,7 +601,7 @@
601
601
  "@tangle-network/agent-interface": "^2.6.0",
602
602
  "@tangle-network/agent-knowledge": "^15.0.2",
603
603
  "@tangle-network/agent-profile-materialize": ">=0.19.0 <0.20.0",
604
- "@tangle-network/agent-runtime": ">=0.204.1 <0.205.0",
604
+ "@tangle-network/agent-runtime": ">=0.207.0 <0.208.0",
605
605
  "@tangle-network/brand": ">=1.5.0",
606
606
  "@tangle-network/sandbox": ">=0.38.2 <0.39.0",
607
607
  "@tangle-network/sandbox-ui": ">=0.113.3 <0.114.0",