@ego-z/contracts 0.12.0 → 0.13.0
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/package.json +1 -1
- package/src/stream.d.ts +18 -0
package/package.json
CHANGED
package/src/stream.d.ts
CHANGED
|
@@ -55,6 +55,24 @@ export interface AskStreamDeltaEvent {
|
|
|
55
55
|
type: 'delta';
|
|
56
56
|
/** Token (or token-like fragment) appended to the running answer. */
|
|
57
57
|
content: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this delta is part of the model's pre-tool narration
|
|
60
|
+
* ('thinking' — text emitted by an iteration that also asked for a
|
|
61
|
+
* tool call) or the terminal reply ('final' — the last iteration's
|
|
62
|
+
* text, no further tool calls follow).
|
|
63
|
+
*
|
|
64
|
+
* Consumers can use this to render two channels: a secondary
|
|
65
|
+
* "thinking out loud" strip and the primary answer body. A single
|
|
66
|
+
* 'thinking' iteration streams live token-by-token; the 'final'
|
|
67
|
+
* delta is flushed as one event at iteration end so its label is
|
|
68
|
+
* known when it lands (the alternative would be a post-hoc
|
|
69
|
+
* correction event, which was rejected).
|
|
70
|
+
*
|
|
71
|
+
* Optional so a consumer pinned to an older contract version still
|
|
72
|
+
* parses the frame. Absent only on the pre-phase emit sites that
|
|
73
|
+
* predate the field.
|
|
74
|
+
*/
|
|
75
|
+
phase?: 'thinking' | 'final';
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
export interface AskStreamToolCallingEvent {
|