@tangle-network/agent-app 0.47.12 → 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