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