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/index.cjs
CHANGED
|
@@ -361,7 +361,8 @@ var Run = class _Run {
|
|
|
361
361
|
}
|
|
362
362
|
/** Unified SSE event stream: replay buffer, then live events, then close. */
|
|
363
363
|
async *stream(opts = {}) {
|
|
364
|
-
const
|
|
364
|
+
const cursor = opts.after === void 0 ? "" : `?after=${encodeURIComponent(opts.after)}`;
|
|
365
|
+
const res = await this.http.open("GET", `/runs/${encodeURIComponent(this.id)}/stream${cursor}`, {
|
|
365
366
|
...opts.signal ? { signal: opts.signal } : {}
|
|
366
367
|
});
|
|
367
368
|
for await (const ev of readSSE(res.body, opts.signal)) {
|
|
@@ -438,6 +439,12 @@ var Run = class _Run {
|
|
|
438
439
|
this.data = await this.http.request("GET", `/runs/${encodeURIComponent(this.id)}`);
|
|
439
440
|
return this.data;
|
|
440
441
|
}
|
|
442
|
+
/** Restore current output once, then follow with `stream({ after: snapshot.sequence })`. */
|
|
443
|
+
async snapshot() {
|
|
444
|
+
const snapshot = await this.http.request("GET", `/runs/${encodeURIComponent(this.id)}/snapshot`);
|
|
445
|
+
this.data = snapshot.run;
|
|
446
|
+
return snapshot;
|
|
447
|
+
}
|
|
441
448
|
/**
|
|
442
449
|
* Consume the event stream to completion. Returns the final run record and the `result`
|
|
443
450
|
* event's summary (if any). Throws {@link RunFailedError} on an `error`/`cancelled` outcome
|
|
@@ -469,7 +476,7 @@ var Run = class _Run {
|
|
|
469
476
|
};
|
|
470
477
|
|
|
471
478
|
// src/version.ts
|
|
472
|
-
var SDK_VERSION = "0.1.
|
|
479
|
+
var SDK_VERSION = "0.1.11" ;
|
|
473
480
|
|
|
474
481
|
// src/daemon-binary.ts
|
|
475
482
|
function supported(platform, arch) {
|