grafast 0.1.1-beta.24 → 0.1.1-beta.26

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.
Files changed (68) hide show
  1. package/dist/engine/LayerPlan.d.ts +4 -0
  2. package/dist/engine/LayerPlan.js +123 -43
  3. package/dist/engine/OperationPlan.d.ts +9 -2
  4. package/dist/engine/OperationPlan.js +280 -146
  5. package/dist/engine/OutputPlan.js +47 -72
  6. package/dist/engine/distributor.d.ts +25 -0
  7. package/dist/engine/distributor.js +342 -0
  8. package/dist/engine/executeBucket.js +141 -46
  9. package/dist/engine/lib/defaultPlanResolver.js +2 -2
  10. package/dist/engine/lib/withGlobalLayerPlan.d.ts +7 -2
  11. package/dist/engine/lib/withGlobalLayerPlan.js +36 -1
  12. package/dist/establishOperationPlan.d.ts +2 -2
  13. package/dist/establishOperationPlan.js +8 -5
  14. package/dist/grafastGraphql.js +3 -1
  15. package/dist/index.d.ts +39 -7
  16. package/dist/index.js +19 -10
  17. package/dist/interfaces.d.ts +11 -0
  18. package/dist/makeGrafastSchema.d.ts +2 -2
  19. package/dist/mermaid.js +15 -6
  20. package/dist/multistep.d.ts +2 -1
  21. package/dist/multistep.js +2 -1
  22. package/dist/prepare.js +44 -4
  23. package/dist/step.d.ts +27 -6
  24. package/dist/step.js +21 -3
  25. package/dist/steps/__cloneStream.d.ts +18 -0
  26. package/dist/steps/__cloneStream.js +43 -0
  27. package/dist/steps/__flag.d.ts +2 -3
  28. package/dist/steps/__flag.js +3 -0
  29. package/dist/steps/__trackedValue.d.ts +3 -0
  30. package/dist/steps/__value.d.ts +3 -0
  31. package/dist/steps/_loadCommon.d.ts +28 -0
  32. package/dist/steps/_loadCommon.js +192 -0
  33. package/dist/steps/access.d.ts +4 -16
  34. package/dist/steps/access.js +1 -14
  35. package/dist/steps/applyTransforms.js +1 -1
  36. package/dist/steps/connection.d.ts +331 -79
  37. package/dist/steps/connection.js +819 -165
  38. package/dist/steps/constant.d.ts +4 -1
  39. package/dist/steps/each.d.ts +4 -3
  40. package/dist/steps/each.js +24 -12
  41. package/dist/steps/filter.d.ts +2 -2
  42. package/dist/steps/first.d.ts +13 -8
  43. package/dist/steps/first.js +37 -9
  44. package/dist/steps/get.d.ts +50 -0
  45. package/dist/steps/get.js +13 -0
  46. package/dist/steps/groupBy.d.ts +2 -2
  47. package/dist/steps/index.d.ts +6 -3
  48. package/dist/steps/index.js +16 -12
  49. package/dist/steps/last.d.ts +15 -9
  50. package/dist/steps/last.js +43 -8
  51. package/dist/steps/listTransform.d.ts +9 -9
  52. package/dist/steps/listTransform.js +1 -1
  53. package/dist/steps/loadMany.d.ts +98 -0
  54. package/dist/steps/loadMany.js +173 -0
  55. package/dist/steps/loadOne.d.ts +85 -0
  56. package/dist/steps/loadOne.js +150 -0
  57. package/dist/steps/loadedRecord.d.ts +31 -0
  58. package/dist/steps/loadedRecord.js +87 -0
  59. package/dist/steps/object.d.ts +1 -0
  60. package/dist/steps/partitionByIndex.d.ts +2 -2
  61. package/dist/steps/sideEffect.js +2 -1
  62. package/dist/utils.d.ts +19 -2
  63. package/dist/utils.js +102 -2
  64. package/dist/version.d.ts +1 -1
  65. package/dist/version.js +1 -1
  66. package/package.json +4 -11
  67. package/dist/steps/load.d.ts +0 -94
  68. package/dist/steps/load.js +0 -389
@@ -153,6 +153,9 @@ export declare class LayerPlan<TReason extends LayerPlanReason = LayerPlanReason
153
153
  readonly operationPlan: OperationPlan;
154
154
  readonly reason: TReason;
155
155
  id: number;
156
+ distributorDependencies: null | {
157
+ [distributorStepId: number]: number[];
158
+ };
156
159
  /** How "deep" this layer plan is (how many ancestors it has). The root layer plan has a depth of 0. */
157
160
  depth: number;
158
161
  /** The depth at which a "defer boundary" occurs (OperationPlan.getPeers cannot pass a defer boundary), or 0. */
@@ -172,6 +175,7 @@ export declare class LayerPlan<TReason extends LayerPlanReason = LayerPlanReason
172
175
  * complete otherwise nothing will happen).
173
176
  */
174
177
  outOfBoundsLayerPlanIds: Set<number>;
178
+ private sideEffectRootLayerPlan;
175
179
  constructor(operationPlan: OperationPlan, reason: TReason);
176
180
  toString(): string;
177
181
  print(depth?: number): string;
@@ -6,9 +6,11 @@ exports.isDeferredLayerPlan = isDeferredLayerPlan;
6
6
  const tslib_1 = require("tslib");
7
7
  const assert = tslib_1.__importStar(require("../assert.js"));
8
8
  const constants_js_1 = require("../constants.js");
9
+ const dev_js_1 = require("../dev.js");
9
10
  const error_js_1 = require("../error.js");
10
11
  const inspect_js_1 = require("../inspect.js");
11
12
  const utils_js_1 = require("../utils.js");
13
+ const distributor_js_1 = require("./distributor.js");
12
14
  const executeBucket_js_1 = require("./executeBucket.js");
13
15
  /**
14
16
  * If any of these flags exist on a value then it isn't the value we want to
@@ -90,6 +92,7 @@ class LayerPlan {
90
92
  this.copyStepIds = [];
91
93
  /** @internal */
92
94
  this.children = [];
95
+ this.distributorDependencies = null;
93
96
  /** @internal */
94
97
  this.steps = [];
95
98
  /** @internal */
@@ -130,10 +133,9 @@ class LayerPlan {
130
133
  this.combinations = [];
131
134
  /** @internal */
132
135
  this.finalCombinations = [];
133
- // There has yet to be any side effects created in this layer.
134
- this.latestSideEffectStep = null;
135
136
  this.stepsByConstructor = new Map();
136
137
  if (reason.type === "root") {
138
+ this.sideEffectRootLayerPlan = null;
137
139
  this.parentSideEffectStep = null;
138
140
  this.depth = 0;
139
141
  this.ancestry = [this];
@@ -144,6 +146,13 @@ class LayerPlan {
144
146
  else if (reason.type === "combined") {
145
147
  this.parentSideEffectStep = null;
146
148
  const firstParentLayerPlan = reason.parentLayerPlans[0];
149
+ this.sideEffectRootLayerPlan =
150
+ firstParentLayerPlan.sideEffectRootLayerPlan;
151
+ if (dev_js_1.isDev) {
152
+ for (const plp of reason.parentLayerPlans) {
153
+ assert.strictEqual(plp.sideEffectRootLayerPlan, this.sideEffectRootLayerPlan, `Expected all parentLayerPlans to have the same sideEffectRootLayerPlan`);
154
+ }
155
+ }
147
156
  const rootLp = firstParentLayerPlan.ancestry[0];
148
157
  if (rootLp.reason.type !== "root") {
149
158
  throw new Error("GrafastInternalError<e9290db3-9a1b-45af-a50e-baa9e161d7cc>: expected the 0'th entry in ancestry to be the root layer plan");
@@ -188,6 +197,13 @@ class LayerPlan {
188
197
  }
189
198
  else {
190
199
  const parentLayerPlan = reason.parentLayerPlan;
200
+ if (parentLayerPlan.reason.type === "root" ||
201
+ parentLayerPlan.reason.type === "mutationField") {
202
+ this.sideEffectRootLayerPlan = parentLayerPlan;
203
+ }
204
+ else {
205
+ this.sideEffectRootLayerPlan = parentLayerPlan.sideEffectRootLayerPlan;
206
+ }
191
207
  if (reason.type === "polymorphicPartition") {
192
208
  if (parentLayerPlan.reason.type !== "polymorphic") {
193
209
  throw new Error(`GrafastInternalError<ef8fcb9a-5252-4593-915c-b3ebe4aa8eff>: a polymorphicPartition may only be a child of a polymorphic layer plan, but ${this} was created under ${parentLayerPlan}`);
@@ -205,6 +221,8 @@ class LayerPlan {
205
221
  this.id = operationPlan.addLayerPlan(this);
206
222
  parentLayerPlan.children.push(this);
207
223
  }
224
+ this.latestSideEffectStep =
225
+ this.sideEffectRootLayerPlan?.latestSideEffectStep ?? null;
208
226
  }
209
227
  toString() {
210
228
  let chain = "";
@@ -288,6 +306,10 @@ class LayerPlan {
288
306
  else {
289
307
  parentSideEffectValue = null;
290
308
  }
309
+ const skippedIndicies = this.distributorDependencies === null ? null : [];
310
+ const skipIndex = skippedIndicies === null
311
+ ? null
312
+ : skippedIndicies.push.bind(skippedIndicies);
291
313
  let size = 0;
292
314
  switch (this.reason.type) {
293
315
  case "nullableBoundary": {
@@ -307,8 +329,18 @@ class LayerPlan {
307
329
  }
308
330
  else {
309
331
  store.set(itemStepId, fieldValue);
332
+ const batchCopy = [];
310
333
  for (const stepId of copyStepIds) {
311
- store.set(stepId, parentBucket.store.get(stepId));
334
+ const orig = parentBucket.store.get(stepId);
335
+ if (orig.isBatch) {
336
+ // Prepare store with an empty list for each copyPlanId
337
+ const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
338
+ store.set(stepId, ev);
339
+ batchCopy.push({ orig, ev });
340
+ }
341
+ else {
342
+ store.set(stepId, orig);
343
+ }
312
344
  }
313
345
  const parentBucketSize = parentBucket.size;
314
346
  for (let originalIndex = 0; originalIndex < parentBucketSize; originalIndex++) {
@@ -319,6 +351,12 @@ class LayerPlan {
319
351
  polymorphicPathList[newIndex] =
320
352
  parentBucket.polymorphicPathList[originalIndex];
321
353
  iterators[newIndex] = parentBucket.iterators[originalIndex];
354
+ for (const { orig, ev } of batchCopy) {
355
+ ev._copyResult(newIndex, orig, originalIndex);
356
+ }
357
+ }
358
+ else {
359
+ skipIndex?.(originalIndex);
322
360
  }
323
361
  }
324
362
  }
@@ -343,14 +381,17 @@ class LayerPlan {
343
381
  else {
344
382
  const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
345
383
  store.set(itemStepId, ev);
384
+ const batchCopy = [];
346
385
  for (const stepId of copyStepIds) {
347
- const ev = parentBucket.store.get(stepId);
348
- if (ev.isBatch) {
386
+ const orig = parentBucket.store.get(stepId);
387
+ if (orig.isBatch) {
349
388
  // Prepare store with an empty list for each copyPlanId
350
- store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([]));
389
+ const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
390
+ store.set(stepId, ev);
391
+ batchCopy.push({ orig, ev });
351
392
  }
352
393
  else {
353
- store.set(stepId, ev);
394
+ store.set(stepId, orig);
354
395
  }
355
396
  }
356
397
  const nullableStepStore = parentBucket.store.get(itemStepId);
@@ -370,14 +411,13 @@ class LayerPlan {
370
411
  polymorphicPathList[newIndex] =
371
412
  parentBucket.polymorphicPathList[originalIndex];
372
413
  iterators[newIndex] = parentBucket.iterators[originalIndex];
373
- for (const stepId of copyStepIds) {
374
- const ev = store.get(stepId);
375
- if (ev.isBatch) {
376
- const orig = parentBucket.store.get(stepId);
377
- ev._copyResult(newIndex, orig, originalIndex);
378
- }
414
+ for (const { orig, ev } of batchCopy) {
415
+ ev._copyResult(newIndex, orig, originalIndex);
379
416
  }
380
417
  }
418
+ else {
419
+ skipIndex?.(originalIndex);
420
+ }
381
421
  }
382
422
  }
383
423
  break;
@@ -398,15 +438,18 @@ class LayerPlan {
398
438
  }
399
439
  const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
400
440
  store.set(itemStepId, ev);
441
+ const batchCopy = [];
401
442
  for (const stepId of copyStepIds) {
402
443
  // Deliberate shadowing
403
- const ev = parentBucket.store.get(stepId);
404
- if (ev.isBatch) {
444
+ const orig = parentBucket.store.get(stepId);
445
+ if (orig.isBatch) {
405
446
  // Prepare store with an empty list for each copyPlanId
406
- store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([]));
447
+ const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
448
+ store.set(stepId, ev);
449
+ batchCopy.push({ orig, ev });
407
450
  }
408
451
  else {
409
- store.set(stepId, ev);
452
+ store.set(stepId, orig);
410
453
  }
411
454
  }
412
455
  // We'll typically be creating more listItem bucket entries than we
@@ -437,15 +480,14 @@ class LayerPlan {
437
480
  polymorphicPathList[newIndex] =
438
481
  parentBucket.polymorphicPathList[originalIndex];
439
482
  iterators[newIndex] = parentBucket.iterators[originalIndex];
440
- for (const stepId of copyStepIds) {
441
- const ev = store.get(stepId);
442
- if (ev.isBatch) {
443
- const orig = parentBucket.store.get(stepId);
444
- ev._copyResult(newIndex, orig, originalIndex);
445
- }
483
+ for (const { orig, ev } of batchCopy) {
484
+ ev._copyResult(newIndex, orig, originalIndex);
446
485
  }
447
486
  }
448
487
  }
488
+ else {
489
+ skipIndex?.(originalIndex);
490
+ }
449
491
  }
450
492
  break;
451
493
  }
@@ -466,32 +508,36 @@ class LayerPlan {
466
508
  if (!typenameEV) {
467
509
  throw new Error(`GrafastInternalError<af1417c6-752b-466e-af7e-cfc35724c3bc>: Entry for '${parentBucket.layerPlan.operationPlan.dangerouslyGetStep(parentStepId)}' not found in bucket for '${parentBucket.layerPlan}'`);
468
510
  }
469
- const batchCopyStepIds = [];
511
+ const batchCopy = [];
470
512
  for (const stepId of copyStepIds) {
471
- const ev = parentBucket.store.get(stepId);
472
- if (!ev) {
513
+ const orig = parentBucket.store.get(stepId);
514
+ if (!orig) {
473
515
  throw new Error(`GrafastInternalError<548f0d84-4556-4189-8655-fb16aa3345a6>: new bucket for ${this} wants to copy ${this.operationPlan.dangerouslyGetStep(stepId)}, but bucket for ${parentBucket.layerPlan} doesn't contain that plan`);
474
516
  }
475
- if (ev.isBatch) {
476
- batchCopyStepIds.push(stepId);
477
- store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([]));
517
+ if (orig.isBatch) {
518
+ const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
519
+ store.set(stepId, ev);
520
+ batchCopy.push({ orig, ev });
478
521
  }
479
522
  else {
480
- store.set(stepId, ev);
523
+ store.set(stepId, orig);
481
524
  }
482
525
  }
483
526
  for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) {
484
527
  const flags = typenameEV._flagsAt(originalIndex);
485
528
  if ((flags & NO_TYPENAME_FLAGS) !== 0) {
529
+ skipIndex?.(originalIndex);
486
530
  continue;
487
531
  }
488
532
  if (parentSideEffectValue !== null &&
489
533
  parentSideEffectValue._flagsAt(originalIndex) & constants_js_1.FLAG_ERROR) {
534
+ skipIndex?.(originalIndex);
490
535
  continue;
491
536
  }
492
537
  const polymorphicPath = parentBucket.polymorphicPathList.at(originalIndex);
493
538
  const typeName = typenameEV.at(originalIndex);
494
539
  if (!this.reason.typeNames.includes(typeName)) {
540
+ skipIndex?.(originalIndex);
495
541
  // Search: InvalidConcreteTypeName
496
542
  // TODO: should we throw an error?
497
543
  // Skip
@@ -503,9 +549,7 @@ class LayerPlan {
503
549
  (polymorphicPath ?? "") + ">" + typeName;
504
550
  polymorphicType[newIndex] = typeName;
505
551
  iterators[newIndex] = parentBucket.iterators[originalIndex];
506
- for (const planId of batchCopyStepIds) {
507
- const ev = store.get(planId);
508
- const orig = parentBucket.store.get(planId);
552
+ for (const { orig, ev } of batchCopy) {
509
553
  ev._copyResult(newIndex, orig, originalIndex);
510
554
  }
511
555
  }
@@ -513,27 +557,30 @@ class LayerPlan {
513
557
  }
514
558
  case "polymorphicPartition": {
515
559
  // Similar to polymorphic
516
- const batchCopyStepIds = [];
560
+ const batchCopy = [];
517
561
  for (const stepId of copyStepIds) {
518
- const ev = parentBucket.store.get(stepId);
519
- if (!ev) {
562
+ const orig = parentBucket.store.get(stepId);
563
+ if (!orig) {
520
564
  throw new Error(`GrafastInternalError<548f0d84-4556-4189-8655-fb16aa3345a6>: new bucket for ${this} wants to copy ${this.operationPlan.dangerouslyGetStep(stepId)}, but bucket for ${parentBucket.layerPlan} doesn't contain that plan`);
521
565
  }
522
- if (ev.isBatch) {
523
- batchCopyStepIds.push(stepId);
524
- store.set(stepId, (0, executeBucket_js_1.batchExecutionValue)([]));
566
+ if (orig.isBatch) {
567
+ const ev = (0, executeBucket_js_1.batchExecutionValue)([]);
568
+ store.set(stepId, ev);
569
+ batchCopy.push({ orig, ev });
525
570
  }
526
571
  else {
527
- store.set(stepId, ev);
572
+ store.set(stepId, orig);
528
573
  }
529
574
  }
530
575
  for (let originalIndex = 0; originalIndex < parentBucket.size; originalIndex++) {
531
576
  if (parentSideEffectValue !== null &&
532
577
  parentSideEffectValue._flagsAt(originalIndex) & constants_js_1.FLAG_ERROR) {
578
+ skipIndex?.(originalIndex);
533
579
  continue;
534
580
  }
535
581
  const typeName = parentBucket.polymorphicType.at(originalIndex);
536
582
  if (!this.reason.typeNames.includes(typeName)) {
583
+ skipIndex?.(originalIndex);
537
584
  continue;
538
585
  }
539
586
  const newIndex = size++;
@@ -541,9 +588,7 @@ class LayerPlan {
541
588
  polymorphicPathList[newIndex] =
542
589
  parentBucket.polymorphicPathList.at(originalIndex);
543
590
  iterators[newIndex] = parentBucket.iterators[originalIndex];
544
- for (const planId of batchCopyStepIds) {
545
- const ev = store.get(planId);
546
- const orig = parentBucket.store.get(planId);
591
+ for (const { orig, ev } of batchCopy) {
547
592
  ev._copyResult(newIndex, orig, originalIndex);
548
593
  }
549
594
  }
@@ -569,6 +614,27 @@ class LayerPlan {
569
614
  }
570
615
  }
571
616
  if (size > 0) {
617
+ if (this.distributorDependencies !== null) {
618
+ if (dev_js_1.isDev) {
619
+ if (this.reason.type === "listItem") {
620
+ throw new Error(`distributorDependencies should not be set on ${this}`);
621
+ }
622
+ assert.strictEqual(skippedIndicies?.length, parentBucket.size - size, "Incorrectly populated skippedIndicies");
623
+ }
624
+ if (skippedIndicies !== null && skippedIndicies.length > 0) {
625
+ for (const [distributorStepId, consumerStepIds] of Object.entries(this.distributorDependencies)) {
626
+ const distribEV = parentBucket.store.get(Number(distributorStepId));
627
+ for (const originalIndex of skippedIndicies) {
628
+ const v = distribEV.at(originalIndex);
629
+ if ((0, distributor_js_1.isDistributor)(v)) {
630
+ for (const consumerStepId of consumerStepIds) {
631
+ v.releaseIfUnused(consumerStepId);
632
+ }
633
+ }
634
+ }
635
+ }
636
+ }
637
+ }
572
638
  // Reference
573
639
  const childBucket = (0, executeBucket_js_1.newBucket)(parentBucket, {
574
640
  layerPlan: this,
@@ -587,6 +653,20 @@ class LayerPlan {
587
653
  return childBucket;
588
654
  }
589
655
  else {
656
+ if (this.distributorDependencies !== null) {
657
+ const parentBucketSize = parentBucket.size;
658
+ for (const [distributorStepId, consumerStepIds] of Object.entries(this.distributorDependencies)) {
659
+ const distribEV = parentBucket.store.get(Number(distributorStepId));
660
+ for (let originalIndex = 0; originalIndex < parentBucketSize; originalIndex++) {
661
+ const v = distribEV.at(originalIndex);
662
+ if ((0, distributor_js_1.isDistributor)(v)) {
663
+ for (const consumerStepId of consumerStepIds) {
664
+ v.releaseIfUnused(consumerStepId);
665
+ }
666
+ }
667
+ }
668
+ }
669
+ }
590
670
  return null;
591
671
  }
592
672
  }
@@ -1,7 +1,7 @@
1
1
  import type { FragmentDefinitionNode, GraphQLField, GraphQLObjectType, GraphQLOutputType, GraphQLSchema, GraphQLUnionType, OperationDefinitionNode } from "graphql";
2
2
  import { $$timeout, $$ts } from "../constants.js";
3
3
  import type { Constraint } from "../constraints.js";
4
- import type { GrafastPlanJSON } from "../index.js";
4
+ import type { ErrorBehavior, GrafastPlanJSON } from "../index.js";
5
5
  import { Step } from "../index.js";
6
6
  import type { FieldPlanResolver, LocationDetails, TrackedArguments } from "../interfaces.js";
7
7
  import type { ApplyAfterModeArg } from "../operationPlan-input.js";
@@ -30,6 +30,7 @@ export declare class OperationPlan {
30
30
  [key: string]: any;
31
31
  };
32
32
  readonly rootValue: any;
33
+ readonly errorBehavior: ErrorBehavior;
33
34
  readonly [$$timeout]: undefined;
34
35
  readonly [$$ts]: undefined;
35
36
  readonly queryType: GraphQLObjectType;
@@ -74,7 +75,7 @@ export declare class OperationPlan {
74
75
  [key: string]: any;
75
76
  }, contextConstraints: Constraint[], context: {
76
77
  [key: string]: any;
77
- }, rootValueConstraints: Constraint[], rootValue: any, options: GrafastOperationOptions);
78
+ }, rootValueConstraints: Constraint[], rootValue: any, errorBehavior: ErrorBehavior, options: GrafastOperationOptions);
78
79
  private lap;
79
80
  private checkTimeout;
80
81
  private planOperation;
@@ -99,9 +100,11 @@ export declare class OperationPlan {
99
100
  processGroupedFieldSet(details: ProcessGroupedFieldSetDetails): Generator<() => {
100
101
  haltTree: boolean;
101
102
  step: Step;
103
+ latestSideEffectStep: Step | null;
102
104
  }, void, {
103
105
  step: Step<any>;
104
106
  haltTree: boolean;
107
+ latestSideEffectStep: Step<any> | null;
105
108
  }>;
106
109
  /**
107
110
  *
@@ -138,9 +141,11 @@ export declare class OperationPlan {
138
141
  _realPlanField(planFieldDetails: PlanFieldDetails): {
139
142
  step: Step<unknown>;
140
143
  haltTree: boolean;
144
+ latestSideEffectStep: Step<any> | null;
141
145
  } | {
142
146
  step: import("../index.js").ErrorStep<any>;
143
147
  haltTree: boolean;
148
+ latestSideEffectStep: Step<any> | null;
144
149
  };
145
150
  /**
146
151
  * A replacement for GraphQL's
@@ -211,6 +216,7 @@ export declare class OperationPlan {
211
216
  /** Finalizes each step */
212
217
  private finalizeSteps;
213
218
  private finalizeLayerPlans;
219
+ private finalize;
214
220
  /** Optimizes each output plan */
215
221
  private optimizeOutputPlans;
216
222
  /** Finalizes each output plan */
@@ -261,6 +267,7 @@ type PlanFieldBatchResult = {
261
267
  error?: never;
262
268
  haltTree: boolean;
263
269
  step: Step;
270
+ latestSideEffectStep: Step | null;
264
271
  };
265
272
  interface PlanFieldBatch {
266
273
  complete: boolean;