mindwire 0.1.10 → 0.1.11
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/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +5 -1
- package/dist/types.d.ts +13 -0
- package/package.json +1 -1
package/dist/run.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Http } from "./http.js";
|
|
2
|
-
import type { Event, ResultInfo, RespondInput, Run as RunData } from "./types.js";
|
|
2
|
+
import type { Event, ResultInfo, RespondInput, RunSnapshot, Run as RunData } from "./types.js";
|
|
3
3
|
export interface StreamOptions {
|
|
4
4
|
signal?: AbortSignal;
|
|
5
|
+
/** Resume after a snapshot/event cursor without replaying earlier output. */
|
|
6
|
+
after?: number;
|
|
5
7
|
/**
|
|
6
8
|
* Include the daemon's `{ type: "status", meta: { stream: "open" } }` sentinel that is
|
|
7
9
|
* flushed the instant the stream opens (used to detect a live vs. buffered transport).
|
|
@@ -86,6 +88,8 @@ export declare class Run {
|
|
|
86
88
|
children(): Promise<Run[]>;
|
|
87
89
|
/** Re-fetch the run record from the daemon and update this handle. */
|
|
88
90
|
refresh(): Promise<RunData>;
|
|
91
|
+
/** Restore current output once, then follow with `stream({ after: snapshot.sequence })`. */
|
|
92
|
+
snapshot(): Promise<RunSnapshot>;
|
|
89
93
|
/**
|
|
90
94
|
* Consume the event stream to completion. Returns the final run record and the `result`
|
|
91
95
|
* event's summary (if any). Throws {@link RunFailedError} on an `error`/`cancelled` outcome
|
package/dist/types.d.ts
CHANGED
|
@@ -129,6 +129,10 @@ export interface ResultInfo {
|
|
|
129
129
|
/** The unified stream item. Optional fields are populated per `type`. */
|
|
130
130
|
export interface Event {
|
|
131
131
|
type: EventType;
|
|
132
|
+
/** Per-run cursor. Subscribe with `stream({ after: sequence })` to receive newer events. */
|
|
133
|
+
sequence?: number;
|
|
134
|
+
/** Buffered output from before this stream connection opened. */
|
|
135
|
+
replay?: boolean;
|
|
132
136
|
/** Text/thinking item identity. A non-delta snapshot replaces this item's earlier text. */
|
|
133
137
|
itemId?: string;
|
|
134
138
|
sessionId?: string;
|
|
@@ -585,6 +589,15 @@ export interface ConditionUX {
|
|
|
585
589
|
export interface NotificationSpec {
|
|
586
590
|
conditions: ConditionUX[];
|
|
587
591
|
}
|
|
592
|
+
/** Materialized output at an exact stream cursor, shared by all agent harnesses. */
|
|
593
|
+
export interface RunSnapshot {
|
|
594
|
+
run: Run;
|
|
595
|
+
sequence: number;
|
|
596
|
+
parts: Part[];
|
|
597
|
+
result?: ResultInfo;
|
|
598
|
+
error?: string;
|
|
599
|
+
statusMessage?: string;
|
|
600
|
+
}
|
|
588
601
|
/** A paired tool call (use + result) within an assistant turn. */
|
|
589
602
|
export interface ToolPart {
|
|
590
603
|
id?: string;
|