@parcha/agentrun-dsl 0.1.0-beta.277 → 0.1.0-beta.278
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/recovery/driver.d.ts +5 -0
- package/dist/recovery/driver.js +10 -0
- package/package.json +1 -1
|
@@ -220,6 +220,11 @@ export declare function openRecovery(store: RecoveryStore, workflow: Workflow, o
|
|
|
220
220
|
* continuation identity, whatever fires again. */
|
|
221
221
|
escalate(row: Omit<EscalationRow, "tail" | "revision">): Promise<EscalationRow>;
|
|
222
222
|
escalation(): EscalationRow | undefined;
|
|
223
|
+
/** The run failed: its frame is committed once more, so the journal holds every node the run began and never
|
|
224
|
+
* committed. A node's start is otherwise durable only with the next commit, and a step that failed before anything
|
|
225
|
+
* under it was written (a read of a state path no node wrote) would leave no trace of where the run failed. A
|
|
226
|
+
* stopped driver, or one whose commit failed, writes nothing; a failed write is thrown, as `flush` throws it. */
|
|
227
|
+
failed(): Promise<void>;
|
|
223
228
|
/** The driver's frame as it stands, serialized: what a host shows of a live run while its store is held. */
|
|
224
229
|
pinJson(): string;
|
|
225
230
|
/** How many effects the driver admitted. */
|
package/dist/recovery/driver.js
CHANGED
|
@@ -1209,6 +1209,16 @@ export async function openRecovery(store, workflow, options) {
|
|
|
1209
1209
|
return snapshot.escalation;
|
|
1210
1210
|
},
|
|
1211
1211
|
escalation() { return snapshot.escalation; },
|
|
1212
|
+
/** The run failed: its frame is committed once more, so the journal holds every node the run began and never
|
|
1213
|
+
* committed. A node's start is otherwise durable only with the next commit, and a step that failed before anything
|
|
1214
|
+
* under it was written (a read of a state path no node wrote) would leave no trace of where the run failed. A
|
|
1215
|
+
* stopped driver, or one whose commit failed, writes nothing; a failed write is thrown, as `flush` throws it. */
|
|
1216
|
+
async failed() {
|
|
1217
|
+
if (fatal || stopping)
|
|
1218
|
+
return;
|
|
1219
|
+
void save();
|
|
1220
|
+
await flush();
|
|
1221
|
+
},
|
|
1212
1222
|
/** The driver's frame as it stands, serialized: what a host shows of a live run while its store is held. */
|
|
1213
1223
|
pinJson() { return JSON.stringify(snapshot.pin); },
|
|
1214
1224
|
/** How many effects the driver admitted. */
|