@sdux-vault/shared 0.5.0 → 0.7.0

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.
@@ -5,6 +5,7 @@ import { Observable, Subject } from 'rxjs';
5
5
  * This declaration defines the global attachment points used to expose runtime singletons.
6
6
  */
7
7
  declare global {
8
+ /** Augments the global Window with an optional SDuX runtime attachment point. */
8
9
  interface Window {
9
10
  /**
10
11
  * Optional container for globally exposed SDuX runtime instances.
@@ -17,13 +18,26 @@ declare global {
17
18
  var sdux: SDuXShape | undefined;
18
19
  }
19
20
 
20
- interface BehaviorClassContext {
21
- /**
22
- * The unique key of the FeatureCell that this behavior instance is
23
- * operating within. Used to scope behavior execution to a specific cell.
24
- */
21
+ /**
22
+ * Minimal context contract shared by any class that participates
23
+ * in Vault license validation (behaviors and controllers).
24
+ */
25
+ interface LicensableClassContext {
26
+ /** Key identifying the FeatureCell subject to license validation. */
25
27
  readonly featureCellKey: string;
28
+ /** Optional license payload provided during FeatureCell registration. */
29
+ readonly licensePayload?: unknown;
30
+ }
31
+
32
+ /**
33
+ * Context provided to behavior class constructors during instantiation.
34
+ */
35
+ interface BehaviorClassContext extends LicensableClassContext {
36
+ /** Key of the FeatureCell this behavior instance operates within. */
37
+ readonly featureCellKey: string;
38
+ /** Optional consumer-supplied configuration for this behavior. */
26
39
  readonly behaviorConfig?: unknown;
40
+ /** Optional license payload for behaviors requiring license validation. */
27
41
  readonly licensePayload?: unknown;
28
42
  }
29
43
 
@@ -71,9 +85,6 @@ interface VaultErrorShape {
71
85
  * Defines the immutable snapshot shape representing FeatureCell state at a specific moment.
72
86
  * This interface exposes loading, value, and error indicators used by consumers to reason about current state.
73
87
  *
74
- * --RelatedStart--
75
- * VaultErrorShape
76
- * --RelatedEnd--
77
88
  */
78
89
  interface StateSnapshotShape<T> {
79
90
  /**
@@ -110,6 +121,7 @@ interface StateSnapshotShape<T> {
110
121
  */
111
122
  type VaultErrorCallback<T> = (error: VaultErrorShape, state: Readonly<StateSnapshotShape<T>>) => void;
112
123
 
124
+ /** Enumeration of state emission event classifications. */
113
125
  declare const StateEmitTypes: {
114
126
  readonly IncomingPipeline: "Incoming Pipeline";
115
127
  readonly FinalizePipeline: "Finalize Pipeline";
@@ -120,19 +132,26 @@ declare const StateEmitTypes: {
120
132
  readonly DenyController: "Deny Controller";
121
133
  readonly TabSync: "Tab Sync";
122
134
  };
135
+ /** Union type derived from StateEmitTypes values. */
123
136
  type StateEmitType = (typeof StateEmitTypes)[keyof typeof StateEmitTypes];
124
137
 
138
+ /** Shape wrapping a state snapshot with its emission type and options. */
125
139
  interface StateEmitSnapshotShape<T> {
140
+ /** The state snapshot at the time of emission. */
126
141
  snapshot: StateSnapshotShape<T>;
142
+ /** Optional configuration passed with the emission. */
127
143
  options: unknown | undefined;
144
+ /** Classification of the state emission event. */
128
145
  type: StateEmitType;
129
146
  }
130
147
 
148
+ /** Enumeration of pipeline operation modes. */
131
149
  declare const OperationTypes: {
132
150
  readonly Merge: "merge";
133
151
  readonly Replace: "replace";
134
152
  readonly Initialize: "initialize";
135
153
  };
154
+ /** Union type derived from OperationTypes values. */
136
155
  type OperationType = (typeof OperationTypes)[keyof typeof OperationTypes];
137
156
 
138
157
  /**
@@ -208,6 +227,7 @@ interface HttpResourceRefShape<T> {
208
227
  hasValue(): boolean;
209
228
  }
210
229
 
230
+ /** Factory function type that lazily produces a state value or a Promise of one. */
211
231
  type DeferredType<T> = () => T | undefined | null | Promise<T | undefined | null>;
212
232
 
213
233
  /**
@@ -230,12 +250,14 @@ interface StateInputShape<T> {
230
250
  error?: unknown;
231
251
  }
232
252
 
253
+ /** Shape wrapping a deferred value factory with optional loading and error state. */
233
254
  type DeferredFactory<T> = Partial<{
234
255
  loading: boolean;
235
256
  value: DeferredType<T>;
236
257
  error: unknown;
237
258
  }>;
238
259
 
260
+ /** Union of all accepted state input forms for pipeline ingestion. */
239
261
  type StateInputType<T> = T | StateInputShape<T> | DeferredFactory<T> | DeferredType<T> | HttpResourceRefShape<T> | Observable<T> | undefined | null;
240
262
 
241
263
  /**
@@ -324,20 +346,34 @@ interface InsightConfig {
324
346
  wantsErrors?: boolean;
325
347
  }
326
348
 
349
+ /** Enumeration of conductor decision outcomes after controller voting. */
327
350
  declare const DecisionOutcomeTypes: {
328
351
  readonly Abort: "abort";
329
352
  readonly Abstain: "abstain";
330
353
  readonly Deny: "deny";
331
354
  };
355
+ /** Union type derived from DecisionOutcomeTypes values. */
332
356
  type DecisionOutcomeType = (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];
333
357
 
358
+ /** Shape representing the outcome of a controller voting round. */
334
359
  interface ControllerDecisionShape {
360
+ /** Trace identifier for the pipeline operation under evaluation. */
335
361
  traceId: string;
362
+ /** Normalized decision outcome used by the conductor. */
336
363
  outcome: DecisionOutcomeType;
337
364
  }
338
365
 
366
+ /**
367
+ * Context supplied to a controller during pipeline admission voting.
368
+ */
339
369
  interface ControllerContext<T> {
370
+ /**
371
+ * Trace identifier for the current pipeline operation.
372
+ */
340
373
  traceId: string;
374
+ /**
375
+ * Key identifying the FeatureCell associated with this operation.
376
+ */
341
377
  featureCellKey: string;
342
378
  /** Immutable snapshot of the current cell state. */
343
379
  snapshot: Readonly<StateSnapshotShape<T>>;
@@ -347,100 +383,656 @@ interface ControllerContext<T> {
347
383
  operation: OperationType;
348
384
  }
349
385
 
386
+ /** Union of context types accepted by VaultMonitor lifecycle methods. */
350
387
  type VaultMonitorContext<T> = BehaviorContext<T> | ControllerContext<T> | FeatureCellExtensionContext<T>;
351
388
 
352
389
  /**
353
- * Public interface for the VaultMonitor singleton.
354
- *
355
- * This interface defines the full DevTools-visible monitoring API
356
- * without exposing implementation details.
390
+ * Contract for the VaultMonitor singleton exposing the full DevTools-visible
391
+ * monitoring API without implementation details.
357
392
  */
358
393
  interface VaultMonitorContract {
394
+ /**
395
+ * Activates global insight tracking with the supplied configuration.
396
+ *
397
+ * @param definition - The insight configuration to activate.
398
+ */
359
399
  activateGlobalInsights(definition: InsightConfig): void;
400
+ /**
401
+ * Signals the start of an after-tap lifecycle event.
402
+ *
403
+ * @param cell - The FeatureCell key.
404
+ * @param behaviorKey - The behavior key.
405
+ * @param ctx - The monitor context for this operation.
406
+ */
360
407
  startAfterTap<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
408
+ /**
409
+ * Signals the end of an after-tap lifecycle event.
410
+ *
411
+ * @param cell - The FeatureCell key.
412
+ * @param behaviorKey - The behavior key.
413
+ * @param ctx - The monitor context for this operation.
414
+ * @param payload - Optional result payload.
415
+ */
361
416
  endAfterTap<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
417
+ /**
418
+ * Signals the start of a before-tap lifecycle event.
419
+ *
420
+ * @param cell - The FeatureCell key.
421
+ * @param behaviorKey - The behavior key.
422
+ * @param ctx - The monitor context for this operation.
423
+ */
362
424
  startBeforeTap<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
425
+ /**
426
+ * Signals the end of a before-tap lifecycle event.
427
+ *
428
+ * @param cell - The FeatureCell key.
429
+ * @param behaviorKey - The behavior key.
430
+ * @param ctx - The monitor context for this operation.
431
+ * @param payload - Optional result payload.
432
+ */
363
433
  endBeforeTap<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
434
+ /**
435
+ * Signals the start of a compute-merge lifecycle event.
436
+ *
437
+ * @param cell - The FeatureCell key.
438
+ * @param behaviorKey - The behavior key.
439
+ * @param ctx - The monitor context for this operation.
440
+ */
364
441
  startComputeMerge<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
442
+ /**
443
+ * Signals the end of a compute-merge lifecycle event.
444
+ *
445
+ * @param cell - The FeatureCell key.
446
+ * @param behaviorKey - The behavior key.
447
+ * @param ctx - The monitor context for this operation.
448
+ */
365
449
  endComputeMerge<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
450
+ /**
451
+ * Signals the start of a clear-persist lifecycle event.
452
+ *
453
+ * @param cell - The FeatureCell key.
454
+ * @param behaviorKey - The behavior key.
455
+ * @param ctx - The monitor context for this operation.
456
+ */
366
457
  startClearPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
458
+ /**
459
+ * Signals the end of a clear-persist lifecycle event.
460
+ *
461
+ * @param cell - The FeatureCell key.
462
+ * @param behaviorKey - The behavior key.
463
+ * @param ctx - The monitor context for this operation.
464
+ */
367
465
  endClearPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
466
+ /**
467
+ * Signals the start of a core callback-error lifecycle event.
468
+ *
469
+ * @param cell - The FeatureCell key.
470
+ * @param behaviorKey - The behavior key.
471
+ * @param ctx - The monitor context for this operation.
472
+ */
368
473
  startCoreCallbackError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
474
+ /**
475
+ * Signals the end of a core callback-error lifecycle event.
476
+ *
477
+ * @param cell - The FeatureCell key.
478
+ * @param behaviorKey - The behavior key.
479
+ * @param ctx - The monitor context for this operation.
480
+ */
369
481
  endCoreCallbackError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
482
+ /**
483
+ * Signals the start of a core emit-state lifecycle event.
484
+ *
485
+ * @param cell - The FeatureCell key.
486
+ * @param behaviorKey - The behavior key.
487
+ * @param ctx - The monitor context for this operation.
488
+ */
370
489
  startCoreEmitState<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
490
+ /**
491
+ * Signals the end of a core emit-state lifecycle event.
492
+ *
493
+ * @param cell - The FeatureCell key.
494
+ * @param behaviorKey - The behavior key.
495
+ * @param ctx - The monitor context for this operation.
496
+ */
371
497
  endCoreEmitState<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
498
+ /**
499
+ * Signals the start of a core error lifecycle event.
500
+ *
501
+ * @param cell - The FeatureCell key.
502
+ * @param behaviorKey - The behavior key.
503
+ * @param ctx - The monitor context for this operation.
504
+ */
372
505
  startCoreError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
506
+ /**
507
+ * Signals the end of a core error lifecycle event.
508
+ *
509
+ * @param cell - The FeatureCell key.
510
+ * @param behaviorKey - The behavior key.
511
+ * @param ctx - The monitor context for this operation.
512
+ */
373
513
  endCoreError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
514
+ /**
515
+ * Signals the start of a core state lifecycle event.
516
+ *
517
+ * @param cell - The FeatureCell key.
518
+ * @param behaviorKey - The behavior key.
519
+ * @param ctx - The monitor context for this operation.
520
+ */
374
521
  startCoreState<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
522
+ /**
523
+ * Signals the end of a core state lifecycle event.
524
+ *
525
+ * @param cell - The FeatureCell key.
526
+ * @param behaviorKey - The behavior key.
527
+ * @param ctx - The monitor context for this operation.
528
+ */
375
529
  endCoreState<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
530
+ /**
531
+ * Signals the start of a destroy lifecycle event.
532
+ *
533
+ * @param cell - The FeatureCell key.
534
+ * @param behaviorKey - The behavior key.
535
+ * @param ctx - The monitor context for this operation.
536
+ */
376
537
  startDestroy<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
538
+ /**
539
+ * Signals the end of a destroy lifecycle event.
540
+ *
541
+ * @param cell - The FeatureCell key.
542
+ * @param behaviorKey - The behavior key.
543
+ * @param ctx - The monitor context for this operation.
544
+ * @param payload - Optional result payload.
545
+ */
377
546
  endDestroy<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
547
+ /**
548
+ * Signals the start of a decrypt lifecycle event.
549
+ *
550
+ * @param cell - The FeatureCell key.
551
+ * @param behaviorKey - The behavior key.
552
+ * @param ctx - The monitor context for this operation.
553
+ */
378
554
  startDecrypt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
555
+ /**
556
+ * Signals the end of a decrypt lifecycle event.
557
+ *
558
+ * @param cell - The FeatureCell key.
559
+ * @param behaviorKey - The behavior key.
560
+ * @param ctx - The monitor context for this operation.
561
+ * @param payload - Optional result payload.
562
+ */
379
563
  endDecrypt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
564
+ /**
565
+ * Signals the start of an encrypt lifecycle event.
566
+ *
567
+ * @param cell - The FeatureCell key.
568
+ * @param behaviorKey - The behavior key.
569
+ * @param ctx - The monitor context for this operation.
570
+ */
380
571
  startEncrypt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
572
+ /**
573
+ * Signals the end of an encrypt lifecycle event.
574
+ *
575
+ * @param cell - The FeatureCell key.
576
+ * @param behaviorKey - The behavior key.
577
+ * @param ctx - The monitor context for this operation.
578
+ */
381
579
  endEncrypt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
580
+ /**
581
+ * Signals the start of a filter lifecycle event.
582
+ *
583
+ * @param cell - The FeatureCell key.
584
+ * @param behaviorKey - The behavior key.
585
+ * @param ctx - The monitor context for this operation.
586
+ */
382
587
  startFilter<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
588
+ /**
589
+ * Signals the end of a filter lifecycle event.
590
+ *
591
+ * @param cell - The FeatureCell key.
592
+ * @param behaviorKey - The behavior key.
593
+ * @param ctx - The monitor context for this operation.
594
+ */
383
595
  endFilter<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
596
+ /**
597
+ * Signals the start of a global error lifecycle event.
598
+ *
599
+ * @param cell - The FeatureCell key.
600
+ * @param behaviorKey - The behavior key.
601
+ * @param ctx - The monitor context for this operation.
602
+ */
384
603
  startGlobalError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
604
+ /**
605
+ * Signals the end of a global error lifecycle event.
606
+ *
607
+ * @param cell - The FeatureCell key.
608
+ * @param behaviorKey - The behavior key.
609
+ * @param ctx - The monitor context for this operation.
610
+ */
385
611
  endGlobalError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
612
+ /**
613
+ * Records that an ingress source has been subscribed.
614
+ *
615
+ * @param cell - The FeatureCell key.
616
+ * @param behaviorKey - The behavior key.
617
+ * @param ctx - The monitor context for this operation.
618
+ * @param source - The ingress source identifier.
619
+ */
386
620
  ingressSubscribed<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, source: string): void;
621
+ /**
622
+ * Records that an ingress source has completed.
623
+ *
624
+ * @param cell - The FeatureCell key.
625
+ * @param behaviorKey - The behavior key.
626
+ * @param ctx - The monitor context for this operation.
627
+ * @param source - The ingress source identifier.
628
+ */
387
629
  ingressCompleted<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, source: string): void;
630
+ /**
631
+ * Signals the start of an interceptor lifecycle event.
632
+ *
633
+ * @param cell - The FeatureCell key.
634
+ * @param behaviorKey - The behavior key.
635
+ * @param ctx - The monitor context for this operation.
636
+ */
388
637
  startInterceptor<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
638
+ /**
639
+ * Signals the end of an interceptor lifecycle event.
640
+ *
641
+ * @param cell - The FeatureCell key.
642
+ * @param behaviorKey - The behavior key.
643
+ * @param ctx - The monitor context for this operation.
644
+ * @param payload - Optional result payload.
645
+ */
389
646
  endInterceptor<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
647
+ /**
648
+ * Signals the start of an initialized lifecycle event.
649
+ *
650
+ * @param cell - The FeatureCell key.
651
+ * @param behaviorKey - The behavior key.
652
+ * @param ctx - The monitor context for this operation.
653
+ */
390
654
  startInitialized<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
655
+ /**
656
+ * Signals the end of an initialized lifecycle event.
657
+ *
658
+ * @param cell - The FeatureCell key.
659
+ * @param behaviorKey - The behavior key.
660
+ * @param ctx - The monitor context for this operation.
661
+ * @param payload - Optional result payload.
662
+ */
391
663
  endInitialized<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
664
+ /**
665
+ * Signals the start of a load-persist lifecycle event.
666
+ *
667
+ * @param cell - The FeatureCell key.
668
+ * @param behaviorKey - The behavior key.
669
+ * @param ctx - The monitor context for this operation.
670
+ */
392
671
  startLoadPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
672
+ /**
673
+ * Signals the end of a load-persist lifecycle event.
674
+ *
675
+ * @param cell - The FeatureCell key.
676
+ * @param behaviorKey - The behavior key.
677
+ * @param ctx - The monitor context for this operation.
678
+ * @param payload - Optional result payload.
679
+ */
393
680
  endLoadPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
681
+ /**
682
+ * Signals the start of a merge lifecycle event.
683
+ *
684
+ * @param cell - The FeatureCell key.
685
+ * @param behaviorKey - The behavior key.
686
+ * @param ctx - The monitor context for this operation.
687
+ */
394
688
  startMerge<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
689
+ /**
690
+ * Signals the end of a merge lifecycle event.
691
+ *
692
+ * @param cell - The FeatureCell key.
693
+ * @param behaviorKey - The behavior key.
694
+ * @param ctx - The monitor context for this operation.
695
+ * @param payload - Optional result payload.
696
+ */
395
697
  endMerge<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
698
+ /**
699
+ * Signals the start of a persist lifecycle event.
700
+ *
701
+ * @param cell - The FeatureCell key.
702
+ * @param behaviorKey - The behavior key.
703
+ * @param ctx - The monitor context for this operation.
704
+ */
396
705
  startPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
706
+ /**
707
+ * Signals the end of a persist lifecycle event.
708
+ *
709
+ * @param cell - The FeatureCell key.
710
+ * @param behaviorKey - The behavior key.
711
+ * @param ctx - The monitor context for this operation.
712
+ */
397
713
  endPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
714
+ /**
715
+ * Signals the start of an operator lifecycle event.
716
+ *
717
+ * @param cell - The FeatureCell key.
718
+ * @param behaviorKey - The behavior key.
719
+ * @param ctx - The monitor context for this operation.
720
+ */
398
721
  startOperator<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
722
+ /**
723
+ * Signals the end of an operator lifecycle event.
724
+ *
725
+ * @param cell - The FeatureCell key.
726
+ * @param behaviorKey - The behavior key.
727
+ * @param ctx - The monitor context for this operation.
728
+ * @param payload - Optional result payload.
729
+ */
399
730
  endOperator<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
731
+ /**
732
+ * Signals the start of a persist lifecycle event.
733
+ *
734
+ * @param cell - The FeatureCell key.
735
+ * @param behaviorKey - The behavior key.
736
+ * @param ctx - The monitor context for this operation.
737
+ */
400
738
  startPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
739
+ /**
740
+ * Signals the end of a persist lifecycle event.
741
+ *
742
+ * @param cell - The FeatureCell key.
743
+ * @param behaviorKey - The behavior key.
744
+ * @param ctx - The monitor context for this operation.
745
+ */
401
746
  endPersist<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
747
+ /**
748
+ * Signals the start of a reducer lifecycle event.
749
+ *
750
+ * @param cell - The FeatureCell key.
751
+ * @param behaviorKey - The behavior key.
752
+ * @param ctx - The monitor context for this operation.
753
+ */
402
754
  startReducer<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
755
+ /**
756
+ * Signals the end of a reducer lifecycle event.
757
+ *
758
+ * @param cell - The FeatureCell key.
759
+ * @param behaviorKey - The behavior key.
760
+ * @param ctx - The monitor context for this operation.
761
+ */
403
762
  endReducer<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
763
+ /**
764
+ * Registers a FeatureCell for monitoring.
765
+ *
766
+ * @param cellKey - The FeatureCell key to register.
767
+ * @param insight - Optional insight configuration for the cell.
768
+ */
404
769
  registerCell(cellKey: string, insight?: InsightConfig): void;
770
+ /**
771
+ * Signals the start of a replace lifecycle event.
772
+ *
773
+ * @param cell - The FeatureCell key.
774
+ * @param behaviorKey - The behavior key.
775
+ * @param ctx - The monitor context for this operation.
776
+ */
405
777
  startReplace<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
778
+ /**
779
+ * Signals the end of a replace lifecycle event.
780
+ *
781
+ * @param cell - The FeatureCell key.
782
+ * @param behaviorKey - The behavior key.
783
+ * @param ctx - The monitor context for this operation.
784
+ * @param payload - Optional result payload.
785
+ */
406
786
  endReplace<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
787
+ /**
788
+ * Signals the start of a reset lifecycle event.
789
+ *
790
+ * @param cell - The FeatureCell key.
791
+ * @param behaviorKey - The behavior key.
792
+ * @param ctx - The monitor context for this operation.
793
+ */
407
794
  startReset<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
795
+ /**
796
+ * Signals the end of a reset lifecycle event.
797
+ *
798
+ * @param cell - The FeatureCell key.
799
+ * @param behaviorKey - The behavior key.
800
+ * @param ctx - The monitor context for this operation.
801
+ * @param payload - Optional result payload.
802
+ */
408
803
  endReset<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
804
+ /**
805
+ * Signals the start of a resolve lifecycle event.
806
+ *
807
+ * @param cell - The FeatureCell key.
808
+ * @param behaviorKey - The behavior key.
809
+ * @param ctx - The monitor context for this operation.
810
+ */
409
811
  startResolve<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
812
+ /**
813
+ * Signals the end of a resolve lifecycle event.
814
+ *
815
+ * @param cell - The FeatureCell key.
816
+ * @param behaviorKey - The behavior key.
817
+ * @param ctx - The monitor context for this operation.
818
+ */
410
819
  endResolve<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
820
+ /**
821
+ * Signals the start of a set-initial-value lifecycle event.
822
+ *
823
+ * @param cell - The FeatureCell key.
824
+ * @param behaviorKey - The behavior key.
825
+ * @param ctx - The monitor context for this operation.
826
+ */
411
827
  startSetInitialValue<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
828
+ /**
829
+ * Signals the end of a set-initial-value lifecycle event.
830
+ *
831
+ * @param cell - The FeatureCell key.
832
+ * @param behaviorKey - The behavior key.
833
+ * @param ctx - The monitor context for this operation.
834
+ */
412
835
  endSetInitialValue<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
836
+ /**
837
+ * Signals the start of a stepwise lifecycle event.
838
+ *
839
+ * @param cell - The FeatureCell key.
840
+ * @param behaviorKey - The behavior key.
841
+ * @param ctx - The monitor context for this operation.
842
+ */
413
843
  startStepwise<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
844
+ /**
845
+ * Signals the end of a stepwise lifecycle event.
846
+ *
847
+ * @param cell - The FeatureCell key.
848
+ * @param behaviorKey - The behavior key.
849
+ * @param ctx - The monitor context for this operation.
850
+ * @param payload - Optional result payload.
851
+ */
414
852
  endStepwise<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload?: unknown): void;
853
+ /**
854
+ * Records that the conductor denied a pipeline operation.
855
+ *
856
+ * @param cell - The FeatureCell key.
857
+ * @param behaviorKey - The behavior key.
858
+ * @param ctx - The monitor context for this operation.
859
+ */
415
860
  notifyConductorDeny<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
861
+ /**
862
+ * Records that the conductor triggered a revote.
863
+ *
864
+ * @param cell - The FeatureCell key.
865
+ * @param behaviorKey - The behavior key.
866
+ * @param ctx - The monitor context for this operation.
867
+ */
416
868
  conductorRevote<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
869
+ /**
870
+ * Records that the conductor aborted a pipeline operation.
871
+ *
872
+ * @param cell - The FeatureCell key.
873
+ * @param behaviorKey - The behavior key.
874
+ * @param ctx - The monitor context for this operation.
875
+ */
417
876
  conductorAbort<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
877
+ /**
878
+ * Records a license validation attempt for a FeatureCell.
879
+ *
880
+ * @param cell - The FeatureCell key.
881
+ * @param featureCellKey - The target cell key under validation.
882
+ */
418
883
  conductorLicenseAttempt(cell: string, featureCellKey: string): void;
884
+ /**
885
+ * Records that a license validation was approved.
886
+ *
887
+ * @param cell - The FeatureCell key.
888
+ * @param featureCellKey - The target cell key that was approved.
889
+ */
419
890
  conductorLicenseApproved(cell: string, featureCellKey: string): void;
891
+ /**
892
+ * Records that a license validation was denied.
893
+ *
894
+ * @param cell - The FeatureCell key.
895
+ * @param featureCellKey - The target cell key that was denied.
896
+ */
420
897
  conductorLicenseDenied(cell: string, featureCellKey: string): void;
898
+ /**
899
+ * Signals the start of a controller attempt lifecycle event.
900
+ *
901
+ * @param cell - The FeatureCell key.
902
+ * @param behaviorKey - The behavior key.
903
+ * @param ctx - The monitor context for this operation.
904
+ */
421
905
  startControllerAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
906
+ /**
907
+ * Signals the end of a controller attempt lifecycle event.
908
+ *
909
+ * @param cell - The FeatureCell key.
910
+ * @param behaviorKey - The behavior key.
911
+ * @param ctx - The monitor context for this operation.
912
+ * @param payload - The attempt result payload.
913
+ */
422
914
  endControllerAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: unknown): void;
915
+ /**
916
+ * Records that a controller attempt was restarted.
917
+ *
918
+ * @param cell - The FeatureCell key.
919
+ * @param behaviorKey - The behavior key.
920
+ * @param ctx - The monitor context for this operation.
921
+ * @param payload - The restart reason.
922
+ */
423
923
  restartControllerAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: string): void;
924
+ /**
925
+ * Records a controller failure event.
926
+ *
927
+ * @param behaviorKey - The behavior key.
928
+ * @param ctx - The monitor context for this operation.
929
+ * @param error - The error that caused the failure.
930
+ */
424
931
  controllerFailure<T>(behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, error: unknown): void;
932
+ /**
933
+ * Records a controller finalize event.
934
+ *
935
+ * @param behaviorKey - The behavior key.
936
+ * @param ctx - The monitor context for this operation.
937
+ */
425
938
  controllerFinalize<T>(behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
939
+ /**
940
+ * Records a controller success event.
941
+ *
942
+ * @param behaviorKey - The behavior key.
943
+ * @param ctx - The monitor context for this operation.
944
+ */
426
945
  controllerSuccess<T>(behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
946
+ /**
947
+ * Signals the start of a controller vote lifecycle event.
948
+ *
949
+ * @param cell - The FeatureCell key.
950
+ * @param behaviorKey - The behavior key.
951
+ * @param ctx - The monitor context for this operation.
952
+ */
427
953
  startControllerVote<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
954
+ /**
955
+ * Signals the end of a controller vote lifecycle event.
956
+ *
957
+ * @param cell - The FeatureCell key.
958
+ * @param behaviorKey - The behavior key.
959
+ * @param ctx - The monitor context for this operation.
960
+ * @param payload - The controller decision result.
961
+ */
428
962
  endControllerVote<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: ControllerDecisionShape): void;
963
+ /**
964
+ * Records that the conductor crashed during execution.
965
+ *
966
+ * @param cell - The FeatureCell key.
967
+ * @param behaviorKey - The behavior key.
968
+ * @param ctx - The monitor context for this operation.
969
+ * @param error - The error that caused the crash.
970
+ */
429
971
  conductorCrashed<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, error: unknown): void;
972
+ /**
973
+ * Records a runtime error encountered during pipeline execution.
974
+ *
975
+ * @param cell - The FeatureCell key.
976
+ * @param behaviorKey - The behavior key.
977
+ * @param ctx - The monitor context for this operation.
978
+ * @param error - The runtime error.
979
+ */
430
980
  runtimeError<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, error: unknown): void;
981
+ /**
982
+ * Records a warning message during pipeline execution.
983
+ *
984
+ * @param cell - The FeatureCell key.
985
+ * @param behaviorKey - The behavior key.
986
+ * @param ctx - The monitor context for this operation.
987
+ * @param message - The warning message.
988
+ */
431
989
  warn<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, message: string): void;
990
+ /**
991
+ * Signals the start of an error-transform lifecycle event.
992
+ *
993
+ * @param cell - The FeatureCell key.
994
+ * @param behaviorKey - The behavior key.
995
+ * @param ctx - The monitor context for this operation.
996
+ */
432
997
  startErrorTransform<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
998
+ /**
999
+ * Signals the end of an error-transform lifecycle event.
1000
+ *
1001
+ * @param cell - The FeatureCell key.
1002
+ * @param behaviorKey - The behavior key.
1003
+ * @param ctx - The monitor context for this operation.
1004
+ * @param payload - The transformed error shape.
1005
+ */
433
1006
  endErrorTransform<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: VaultErrorShape): void;
434
1007
  }
435
1008
 
1009
+ /** Runtime context provided to behavior extensions for interacting with a FeatureCell. */
436
1010
  interface FeatureCellExtensionContext<T> {
1011
+ /** Observable that emits when the FeatureCell is destroyed. */
437
1012
  destroyed$: Observable<void>;
1013
+ /** Unique key identifying the FeatureCell. */
438
1014
  featureCellKey: string;
1015
+ /**
1016
+ * Merges incoming state into the current FeatureCell state.
1017
+ *
1018
+ * @param incoming - The state input to merge.
1019
+ * @param options - Optional merge configuration.
1020
+ */
439
1021
  mergeState(incoming: StateInputType<T>, options?: unknown): Promise<void>;
1022
+ /**
1023
+ * Replaces the current FeatureCell state with the provided input.
1024
+ *
1025
+ * @param input - The state input to set.
1026
+ * @param options - Optional replacement configuration.
1027
+ */
440
1028
  replaceState(input: StateInputType<T>, options?: unknown): Promise<void>;
1029
+ /** Observable that emits when the FeatureCell is reset. */
441
1030
  reset$: Observable<void>;
1031
+ /** Observable stream of state-emit snapshots from the FeatureCell. */
442
1032
  state$: Observable<StateEmitSnapshotShape<T>>;
1033
+ /** Reference to the Vault monitor for diagnostics and tracing. */
443
1034
  vaultMonitor: VaultMonitorContract;
1035
+ /** Optional configuration options for the extension context. */
444
1036
  options?: unknown;
445
1037
  }
446
1038
 
@@ -452,6 +1044,7 @@ interface FeatureCellExtensionContext<T> {
452
1044
  interface FeatureCellExtension<TEntity> {
453
1045
  }
454
1046
 
1047
+ /** Extensible interface for FeatureCell fluent API methods added by behaviors. */
455
1048
  interface FeatureCellFluentApi<TEntity> {
456
1049
  }
457
1050
 
@@ -500,45 +1093,51 @@ declare const BehaviorTypes: {
500
1093
  * This type should not be manually extended—add new values to `BehaviorTypes`
501
1094
  * instead.
502
1095
  *
503
- * --RelatedStart--
504
- * BehaviorTypes
505
- * --RelatedEnd--
506
1096
  */
507
1097
  type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];
508
1098
 
1099
+ /**
1100
+ * Static-side contract for behavior classes used by the behavior factory.
1101
+ */
509
1102
  interface BehaviorClassContract<T = any> {
510
1103
  /**
511
1104
  * Creates a new behavior instance.
512
1105
  *
513
1106
  * @param behaviorKey - Unique key assigned by the behavior factory.
514
- * @param behaviorCtx - The behaviorCtxfor dependency resolution.
1107
+ * @param behaviorCtx - Class-level context for dependency resolution.
515
1108
  */
516
1109
  new (behaviorKey: string, behaviorCtx: BehaviorClassContext): BehaviorContract<T>;
1110
+ /** Pipeline stage in which this behavior participates. */
517
1111
  readonly type: BehaviorType;
518
- /**
519
- * Unique identifier assigned to this behavior instance. Used by the
520
- * orchestrator, diagnostics, and devtools for behavior correlation.
521
- */
1112
+ /** Unique identifier assigned to this behavior class. */
522
1113
  readonly key: string;
1114
+ /** Whether errors from this behavior halt the pipeline. */
1115
+ readonly critical: boolean;
523
1116
  /**
524
- * If the actions of the behavior are critical in regards to error handling.
525
- * True means the pipeline should VAULT_NOOP and stop the pipeline flow on any errors
526
- * False means that pipeline should log any error and continue
1117
+ * Optional hook that installs a fluent API onto the FeatureCell.
1118
+ *
1119
+ * @param cell - The FeatureCell shape to extend.
1120
+ * @param behaviorConfigs - Map of behavior configuration entries.
527
1121
  */
528
- readonly critical: boolean;
529
1122
  installFluentApi?: <T>(cell: FeatureCellBaseShape<T>, behaviorConfigs: Map<string, unknown>) => void;
1123
+ /** Whether this behavior requires consumer-supplied configuration. */
530
1124
  readonly wantsConfig?: boolean;
1125
+ /** Configuration key used to locate behavior options in the config registry. */
531
1126
  readonly configKey?: string;
532
1127
  }
533
1128
 
1129
+ /** Static-side contract for interceptor behavior classes. */
534
1130
  interface InterceptorBehaviorClassContract<T> extends BehaviorClassContract<T> {
535
1131
  }
536
1132
 
1133
+ /** Static-side contract for operator behavior classes. */
537
1134
  interface OperatorsBehaviorClassContract<T> extends BehaviorClassContract<T> {
538
1135
  }
539
1136
 
1137
+ /** Callback type invoked when the core emits a state snapshot. */
540
1138
  type CoreEmitStateCallback<T, E = void> = (snapshot: StateSnapshotShape<T>) => E;
541
1139
 
1140
+ /** Callback type invoked with the current value during a tap lifecycle event. */
542
1141
  type TapCallback<T> = (current: T) => void;
543
1142
 
544
1143
  /**
@@ -571,18 +1170,6 @@ type ReducerFunction<T> = (current: T) => T;
571
1170
  /**
572
1171
  * Defines the builder contract used to configure and initialize a FeatureCell.
573
1172
  * This interface exposes the fluent configuration surface for registering behaviors, callbacks, and operators prior to activation.
574
- *
575
- * --RelatedStart--
576
- * FeatureCellExtension
577
- * FeatureCellFluentApi
578
- * CoreEmitStateCallback
579
- * TapCallback
580
- * VaultErrorCallback
581
- * FilterFunction
582
- * InterceptorBehaviorClassContract
583
- * OperatorsBehaviorClassContract
584
- * ReducerFunction
585
- * --RelatedEnd--
586
1173
  */
587
1174
  interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFluentApi<T> {
588
1175
  /**
@@ -612,7 +1199,7 @@ interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFlu
612
1199
  emitStates(emitStates: CoreEmitStateCallback<T>[]): CellBuilderContract<T>;
613
1200
  /**
614
1201
  * Registers error functions to run during the error stage.
615
- *CellBuilderContract
1202
+ *
616
1203
  * @param errors - Error functions that may block or transform values.
617
1204
  * @returns The same builder instance for fluent chaining.
618
1205
  */
@@ -624,13 +1211,15 @@ interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFlu
624
1211
  * @returns The same builder instance for fluent chaining.
625
1212
  */
626
1213
  filters(filters: FilterFunction<T>[]): CellBuilderContract<T>;
1214
+ /**
1215
+ * Registers a deferred hydration source for the FeatureCell.
1216
+ *
1217
+ * @param incoming - Deferred value used to hydrate the cell state.
1218
+ * @returns The builder instance for fluent chaining.
1219
+ */
627
1220
  hydrate(incoming: DeferredType<T>): CellBuilderContract<T>;
628
1221
  /**
629
1222
  * Finalizes the builder configuration and activates the FeatureCell.
630
- *
631
- * Implementations may perform synchronous or asynchronous setup.
632
- *
633
- * @returns The builder instance, or a Promise resolving when initialization completes.
634
1223
  */
635
1224
  initialize(): void;
636
1225
  /**
@@ -658,7 +1247,9 @@ interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFlu
658
1247
 
659
1248
  /**
660
1249
  * Defines the public base contract for a FeatureCell instance.
661
- * This interface exposes the full builder, lifecycle, and state update surface required to configure, initialize, and interact with a FeatureCell at runtime.
1250
+ *
1251
+ * FeatureCellBaseShape describes the builder, lifecycle, and state update
1252
+ * surface required to configure, initialize, and interact with a FeatureCell.
662
1253
  */
663
1254
  interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFluentApi<T> {
664
1255
  /**
@@ -705,6 +1296,12 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
705
1296
  * @returns The builder instance for fluent chaining.
706
1297
  */
707
1298
  filters(filters: FilterFunction<T>[]): CellBuilderContract<T>;
1299
+ /**
1300
+ * Registers a deferred hydration source for the FeatureCell.
1301
+ *
1302
+ * @param incoming - Deferred value used to hydrate the cell state.
1303
+ * @returns The builder instance for fluent chaining.
1304
+ */
708
1305
  hydrate(incoming: DeferredType<T>): CellBuilderContract<T>;
709
1306
  /**
710
1307
  * Finalizes builder configuration and activates the FeatureCell.
@@ -726,8 +1323,8 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
726
1323
  /**
727
1324
  * Performs a merge-style state update using the configured merge behavior.
728
1325
  *
729
- * @param incoming Structured state input to be merged.
730
- * @param options Optional merge behavior configuration.
1326
+ * @param incoming - Structured state input to be merged.
1327
+ * @param options - Optional merge behavior configuration.
731
1328
  */
732
1329
  mergeState(incoming: StateInputType<T>, options?: unknown): void;
733
1330
  /**
@@ -747,8 +1344,8 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
747
1344
  /**
748
1345
  * Performs a replace-style state update that fully replaces the current state.
749
1346
  *
750
- * @param incoming Structured state input to replace the current state.
751
- * @param options Optional merge behavior configuration.
1347
+ * @param incoming - Structured state input to replace the current state.
1348
+ * @param options - Optional merge behavior configuration.
752
1349
  */
753
1350
  replaceState(incoming: StateInputType<T>, options?: unknown): void;
754
1351
  /**
@@ -760,17 +1357,16 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
760
1357
  */
761
1358
  reset$?: Observable<void>;
762
1359
  /**
763
- * Observable that emits when the FeatureCell has been reset.
1360
+ * Observable that emits state snapshots whenever the FeatureCell state changes.
764
1361
  */
765
1362
  state$: Observable<StateEmitSnapshotShape<T>>;
766
1363
  /**
767
- * Dev-mode testing hook.
768
- * Only defined when DevMode.active === true.
769
- * Non-enumerable and not part of runtime API.
1364
+ * Dev-mode testing hook that resolves once all pending pipeline activity has settled.
770
1365
  */
771
1366
  vaultSettled?: () => Promise<void>;
772
1367
  }
773
1368
 
1369
+ /** Function signature for behavior extension methods added to the FeatureCell. */
774
1370
  type BehaviorExtFunction = (...args: any[]) => unknown;
775
1371
  /**
776
1372
  * A map of extension function names to their implementation functions.
@@ -780,50 +1376,75 @@ type BehaviorExtFunction = (...args: any[]) => unknown;
780
1376
  */
781
1377
  type BehaviorExtension = Partial<Record<string, BehaviorExtFunction>>;
782
1378
  /**
783
- * Base interface implemented by all behavior types in the SDuX/ Vault
784
- * pipeline. Behaviors participate in specific pipeline stages based on
785
- * their declared BehaviorType, and may optionally expose additional
786
- * FeatureCell APIs through the `extendCellAPI()` hook.
1379
+ * Base interface implemented by all behavior types in the Vault pipeline.
787
1380
  *
788
- * @typeParam T - The FeatureCell state value type handled by this behavior.
789
- * @typeParam E - The shape of the extension API returned by this behavior.
1381
+ * Behaviors participate in specific pipeline stages based on their declared
1382
+ * BehaviorType, and may optionally expose additional FeatureCell APIs through
1383
+ * the extendCellAPI hook.
790
1384
  */
791
1385
  interface BehaviorContract<T = unknown, E extends BehaviorExtension = BehaviorExtension> {
792
1386
  /**
793
- * Declares the pipeline classification for this behavior. The orchestrator
794
- * uses this to determine the execution order in the upstream and persist
795
- * stages.
1387
+ * Pipeline classification for this behavior used to determine execution order.
796
1388
  */
797
1389
  readonly type: BehaviorType;
798
1390
  /**
799
- * Unique identifier assigned to this behavior instance. Used by the
800
- * orchestrator, diagnostics, and devtools for behavior correlation.
1391
+ * Unique identifier assigned to this behavior instance.
801
1392
  */
802
1393
  readonly key: string;
803
1394
  /**
804
- * If the actions of the behavior are critical in regards to error handling.
805
- * True means the pipeline should VAULT_NOOP and stop the pipeline flow on any errors
806
- * False means that pipeline should log any error and continue
1395
+ * Whether this behavior is critical for pipeline error handling.
807
1396
  */
808
1397
  readonly critical: boolean;
809
1398
  /**
810
- * Optional list of extension function names that this behavior is permitted
811
- * to override when multiple behaviors contribute conflicting API keys.
812
- * Behaviors without explicit override permission may not replace an
813
- * existing API entry.
1399
+ * Extension function names this behavior is permitted to override.
814
1400
  */
815
1401
  allowOverride?: string[];
1402
+ /**
1403
+ * Extends the FeatureCell with additional APIs backed by this behavior.
1404
+ *
1405
+ * @param ctx - Extension context used to observe state and merge updates.
1406
+ * @returns The extension API surface, or void if no extensions are provided.
1407
+ */
816
1408
  extendCellAPI?(ctx: FeatureCellExtensionContext<T>): E | void;
1409
+ /**
1410
+ * Teardown hook invoked when the behavior instance is destroyed.
1411
+ *
1412
+ * @param ctx - Pipeline behavior context.
1413
+ */
817
1414
  destroy(ctx?: BehaviorContext<T>): void;
1415
+ /**
1416
+ * Resets the behavior to its initial state.
1417
+ *
1418
+ * @param ctx - Pipeline behavior context.
1419
+ */
818
1420
  reset(ctx?: BehaviorContext<T>): void;
1421
+ /**
1422
+ * Installs fluent configuration APIs onto a FeatureCell instance.
1423
+ *
1424
+ * @param cell - FeatureCell instance to augment.
1425
+ * @param behaviorConfigs - Registry used to store behavior configuration.
1426
+ */
819
1427
  installFluentApi?: <T>(cell: FeatureCellBaseShape<T>, behaviorConfigs: Map<string, unknown>) => void;
820
1428
  }
821
1429
 
1430
+ /** Contract for behaviors that invoke consumer error callbacks on pipeline errors. */
822
1431
  interface ErrorCallbackBehaviorContract<T> extends BehaviorContract<T> {
1432
+ /** Identifies this behavior as a core error callback behavior. */
823
1433
  type: 'coreErrorCallback';
1434
+ /**
1435
+ * Invokes the consumer error callback with the current error and state.
1436
+ *
1437
+ * @param current - The current Vault error shape.
1438
+ * @param state - The state snapshot at the time of error.
1439
+ * @param oldschoolCallback - The consumer-supplied error callback.
1440
+ */
824
1441
  callbackError(current: VaultErrorShape, state: StateSnapshotShape<T>, oldschoolCallback: VaultErrorCallback<T>): Promise<void>;
825
1442
  }
826
1443
 
1444
+ /**
1445
+ * Abstract base class for error callback behaviors that execute consumer-supplied
1446
+ * error handlers during the error stage of the Vault pipeline.
1447
+ */
827
1448
  declare abstract class AbstractErrorCallbackBehavior<T> implements ErrorCallbackBehaviorContract<T> {
828
1449
  readonly behaviorCtx: BehaviorClassContext;
829
1450
  /** Indicates that this error behavior is critical and always executed. */
@@ -839,27 +1460,40 @@ declare abstract class AbstractErrorCallbackBehavior<T> implements ErrorCallback
839
1460
  * @param behaviorCtx - Behavior class context providing injector access and extensibility hooks.
840
1461
  */
841
1462
  constructor(key: string, behaviorCtx: BehaviorClassContext);
842
- abstract callbackError(current: VaultErrorShape, state: StateSnapshotShape<T>, oldschoolCallback: VaultErrorCallback<T>): Promise<void>;
843
1463
  /**
844
- * Lifecycle hook invoked when the behavior instance is destroyed.
1464
+ * Executes the consumer-supplied error callback against the current error and state.
845
1465
  *
846
- * Error behaviors do not allocate runtime resources and therefore require
847
- * no cleanup. A diagnostic entry is logged for lifecycle visibility.
1466
+ * @param current - The error shape describing the pipeline failure.
1467
+ * @param state - The state snapshot at the time of the error.
1468
+ * @param oldschoolCallback - Consumer-supplied error callback to invoke.
1469
+ * @returns A promise that resolves when the callback completes.
1470
+ */
1471
+ abstract callbackError(current: VaultErrorShape, state: StateSnapshotShape<T>, oldschoolCallback: VaultErrorCallback<T>): Promise<void>;
1472
+ /**
1473
+ * Teardown hook invoked when the behavior instance is destroyed.
848
1474
  */
849
1475
  destroy(): void;
850
1476
  /**
851
- * Lifecycle hook invoked when the behavior instance is reset.
852
- *
853
- * Error behaviors hold no internal state, making this a no-operation.
854
- * The hook ensures lifecycle uniformity across all behaviors.
1477
+ * Resets the error behavior to its initial state.
855
1478
  */
856
1479
  reset(): void;
857
1480
  }
858
1481
 
1482
+ /** Sentinel symbol that signals the pipeline to skip the current operation. */
859
1483
  declare const VAULT_NOOP: unique symbol;
860
1484
 
1485
+ /** Contract for behaviors that transform pipeline errors before propagation. */
861
1486
  interface ErrorTransformBehaviorContract<T> extends BehaviorContract<T> {
1487
+ /** Identifies this behavior as an error transform behavior. */
862
1488
  type: 'errorTransform';
1489
+ /**
1490
+ * Transforms a raw error into a normalized shape or signals a NOOP.
1491
+ *
1492
+ * @param error - The raw error thrown during pipeline execution.
1493
+ * @param current - The current Vault error shape.
1494
+ * @param previousStateSnapshot - The state snapshot before the error occurred.
1495
+ * @returns The transformed error value, or VAULT_NOOP to skip.
1496
+ */
863
1497
  transformError(error: unknown, current: VaultErrorShape, previousStateSnapshot: StateSnapshotShape<T>): Promise<unknown | typeof VAULT_NOOP>;
864
1498
  }
865
1499
 
@@ -867,12 +1501,6 @@ interface ErrorTransformBehaviorContract<T> extends BehaviorContract<T> {
867
1501
  * Abstract base behavior for transforming errors during pipeline execution.
868
1502
  * This class defines the contract and lifecycle hooks required for error transformation behaviors.
869
1503
  *
870
- * --RelatedStart--
871
- * ErrorTransformBehaviorContract
872
- * BehaviorClassContext
873
- * StateSnapshotShape
874
- * VaultErrorShape
875
- * --RelatedEnd--
876
1504
  */
877
1505
  declare abstract class AbstractErrorTransformBehavior<T> implements ErrorTransformBehaviorContract<T> {
878
1506
  readonly behaviorCtx: BehaviorClassContext;
@@ -914,16 +1542,25 @@ declare abstract class AbstractErrorTransformBehavior<T> implements ErrorTransfo
914
1542
  reset(): void;
915
1543
  }
916
1544
 
917
- interface ControllerClassContext {
1545
+ /** Runtime context supplied to controller class instances during pipeline execution. */
1546
+ interface ControllerClassContext extends LicensableClassContext {
1547
+ /** Unique key of the FeatureCell this controller is attached to. */
918
1548
  featureCellKey: string;
1549
+ /** Requests a revote for the pipeline identified by the trace ID. */
919
1550
  requestRevote: (traceId: string) => void;
1551
+ /** Requests an abort for the pipeline identified by the trace ID. */
920
1552
  requestAbort: (traceId: string) => void;
1553
+ /** Signals that the license was denied for the given trace. */
921
1554
  licenseDenied?: (traceId: string) => void;
1555
+ /** Signals that the license was approved for the given trace. */
922
1556
  licenseApproved?: (traceId: string) => void;
1557
+ /** Optional configuration object for this controller. */
923
1558
  readonly controllerConfig?: unknown;
1559
+ /** Optional license payload associated with this controller. */
924
1560
  readonly licensePayload?: unknown;
925
1561
  }
926
1562
 
1563
+ /** Enumeration of message types dispatched to controllers during pipeline orchestration. */
927
1564
  declare const ControllerMessageTypes: {
928
1565
  readonly Attempt: "attempt";
929
1566
  readonly Failure: "failure";
@@ -931,42 +1568,62 @@ declare const ControllerMessageTypes: {
931
1568
  readonly Success: "success";
932
1569
  readonly Vote: "vote";
933
1570
  };
1571
+ /** Union type derived from ControllerMessageTypes values. */
934
1572
  type ControllerMessageType = (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];
935
1573
 
1574
+ /** Base shape shared by all controller message variants. */
936
1575
  interface ControllerMessageBaseShape {
1576
+ /** Discriminant identifying the message type. */
937
1577
  type: ControllerMessageType;
1578
+ /** Trace identifier linking this message to a pipeline operation. */
938
1579
  traceId: string;
939
1580
  }
940
1581
 
1582
+ /** Message shape dispatched to controllers during a pipeline attempt. */
941
1583
  interface ControllerAttemptMessageShape<T> extends ControllerMessageBaseShape {
1584
+ /** Discriminant identifying this as an attempt message. */
942
1585
  type: typeof ControllerMessageTypes.Attempt;
1586
+ /** Controller context for the current pipeline operation. */
943
1587
  ctx: ControllerContext<T>;
944
1588
  }
945
1589
 
1590
+ /** Message shape dispatched to controllers when a pipeline operation fails. */
946
1591
  interface ControllerFailMessageShape<T> extends ControllerMessageBaseShape {
1592
+ /** Discriminant identifying this as a failure message. */
947
1593
  type: typeof ControllerMessageTypes.Failure;
1594
+ /** Controller context for the current pipeline operation. */
948
1595
  ctx: ControllerContext<T>;
1596
+ /** Error that caused the pipeline failure. */
949
1597
  error: VaultErrorShape | unknown;
950
1598
  }
951
1599
 
1600
+ /** Message shape dispatched to controllers when a pipeline operation finalizes. */
952
1601
  interface ControllerFinalizeMessageShape extends ControllerMessageBaseShape {
1602
+ /** Discriminant identifying this as a finalize message. */
953
1603
  type: typeof ControllerMessageTypes.Finalize;
954
1604
  }
955
1605
 
1606
+ /** Message shape dispatched to controllers when a pipeline operation succeeds. */
956
1607
  interface ControllerSuccessMessageShape<T> extends ControllerMessageBaseShape {
1608
+ /** Discriminant identifying this as a success message. */
957
1609
  type: typeof ControllerMessageTypes.Success;
1610
+ /** Controller context for the current pipeline operation. */
958
1611
  ctx: ControllerContext<T>;
959
1612
  }
960
1613
 
1614
+ /** Discriminated union of all controller message shapes. */
961
1615
  type ControllerMessageShape<T> = ControllerAttemptMessageShape<T> | ControllerSuccessMessageShape<T> | ControllerFailMessageShape<T> | ControllerFinalizeMessageShape;
962
1616
 
1617
+ /** Enumeration of votes a controller may cast during pipeline admission. */
963
1618
  declare const ControllerVotes: {
964
1619
  readonly Abstain: "abstain";
965
1620
  readonly Abort: "abort";
966
1621
  readonly Deny: "deny";
967
1622
  };
1623
+ /** Union type derived from ControllerVotes values. */
968
1624
  type ControllerVote = (typeof ControllerVotes)[keyof typeof ControllerVotes];
969
1625
 
1626
+ /** Enumeration of controller category classifications. */
970
1627
  declare const ControllerTypes: {
971
1628
  readonly CoreAbstain: "coreAbstain";
972
1629
  readonly Error: "error";
@@ -974,33 +1631,79 @@ declare const ControllerTypes: {
974
1631
  readonly Policy: "policy";
975
1632
  readonly ReplayGlobalError: "replayGlobalError";
976
1633
  readonly Stepwise: "stepwise";
1634
+ readonly TabSync: "tabSync";
977
1635
  };
1636
+ /** Union type derived from ControllerTypes values. */
978
1637
  type ControllerType = (typeof ControllerTypes)[keyof typeof ControllerTypes];
979
1638
 
1639
+ /** Instance-side contract that all controllers must implement. */
980
1640
  interface ControllerContract<T = unknown> {
1641
+ /** Controller category classification. */
981
1642
  readonly type: ControllerType;
1643
+ /** Unique identifier for this controller instance. */
982
1644
  readonly key: string;
1645
+ /** Whether errors from this controller halt the pipeline. */
983
1646
  readonly critical: boolean;
1647
+ /**
1648
+ * Processes an incoming controller message and returns a vote.
1649
+ *
1650
+ * @param msg - The controller message to evaluate.
1651
+ * @returns An observable emitting the controller vote or void.
1652
+ */
984
1653
  handleMessage(msg: ControllerMessageShape<T>): Observable<ControllerVote | void>;
1654
+ /** Tears down the controller and releases resources. */
985
1655
  destroy(): void;
1656
+ /** Resets the controller to its initial state. */
986
1657
  reset(): void;
1658
+ /**
1659
+ * Optional hook that installs a fluent API onto the FeatureCell.
1660
+ *
1661
+ * @param cell - The FeatureCell shape to extend.
1662
+ * @param behaviorConfigs - Map of behavior configuration entries.
1663
+ */
987
1664
  installFluentApi?: <T>(cell: FeatureCellBaseShape<T>, behaviorConfigs: Map<string, unknown>) => void;
988
1665
  }
989
1666
 
1667
+ /**
1668
+ * Abstract base class for active controllers that react to external error
1669
+ * state changes and participate in pipeline admission voting.
1670
+ */
990
1671
  declare abstract class AbstractActiveController<T> implements ControllerContract<T> {
991
1672
  #private;
992
1673
  protected readonly ctx: ControllerClassContext;
1674
+ /** Unique identifier for this controller instance. */
993
1675
  readonly key: string;
1676
+ /** Controller type classification determined by the subclass. */
994
1677
  abstract readonly type: ControllerType;
1678
+ /** Whether errors from this controller halt the pipeline. */
995
1679
  readonly critical = false;
1680
+ /** Tracks whether the global error service currently holds an error. */
996
1681
  protected hasError: boolean;
1682
+ /** Trace identifier from the most recent pipeline operation. */
997
1683
  protected traceId: string | null;
1684
+ /**
1685
+ * Creates an active controller and subscribes to the global error stream.
1686
+ *
1687
+ * @param key - Unique controller identifier supplied by the factory.
1688
+ * @param ctx - Class-level context providing revote and lifecycle access.
1689
+ */
998
1690
  constructor(key: string, ctx: ControllerClassContext);
999
- /** Child classes override to react to external error toggles */
1691
+ /**
1692
+ * Hook invoked when the external error state changes.
1693
+ *
1694
+ * @param _newErrorState - The updated error state flag.
1695
+ */
1000
1696
  protected onExternalTrigger(_newErrorState: boolean): void;
1001
- /** All controllers must implement this */
1697
+ /**
1698
+ * Processes an incoming controller message and returns a vote.
1699
+ *
1700
+ * @param msg - The controller message to evaluate.
1701
+ * @returns An observable emitting the controller vote or void.
1702
+ */
1002
1703
  abstract handleMessage(msg: ControllerMessageShape<T>): Observable<ControllerVote | void>;
1704
+ /** Tears down the controller and unsubscribes from the error stream. */
1003
1705
  destroy(): void;
1706
+ /** Resets the controller to its initial state. */
1004
1707
  reset(): void;
1005
1708
  }
1006
1709
 
@@ -1042,8 +1745,11 @@ interface ObjectDeepMergeConfig {
1042
1745
  stripNulls?: boolean;
1043
1746
  }
1044
1747
 
1748
+ /** Shape representing a license entry registered with the Vault. */
1045
1749
  interface VaultLicensingShape {
1750
+ /** Unique identifier for the license. */
1046
1751
  licenseId: string;
1752
+ /** Opaque license payload supplied by the consumer. */
1047
1753
  payload: unknown;
1048
1754
  }
1049
1755
 
@@ -1060,6 +1766,7 @@ interface VaultLicensingShape {
1060
1766
  * - `'log'` — standard log events, warnings, and errors are logged
1061
1767
  * - `'debug'` — all debug-level information is emitted
1062
1768
  */
1769
+ /** Enumeration of Vault log verbosity levels. */
1063
1770
  declare const LogLevelTypes: {
1064
1771
  readonly Off: "off";
1065
1772
  readonly Error: "error";
@@ -1067,8 +1774,12 @@ declare const LogLevelTypes: {
1067
1774
  readonly Log: "log";
1068
1775
  readonly Debug: "debug";
1069
1776
  };
1777
+ /** Union type derived from LogLevelTypes values. */
1070
1778
  type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];
1071
1779
 
1780
+ /**
1781
+ * Configuration options supplied to Vault at initialization.
1782
+ */
1072
1783
  interface VaultConfig {
1073
1784
  /**
1074
1785
  * Enables development-mode diagnostics and additional internal checks.
@@ -1114,8 +1825,10 @@ interface VaultConfig {
1114
1825
  bypassLicensing?: boolean;
1115
1826
  }
1116
1827
 
1828
+ /** Symbol key used to attach behavior metadata to a behavior class. */
1117
1829
  declare const BEHAVIOR_META: unique symbol;
1118
1830
 
1831
+ /** Symbol key used to attach controller metadata to a controller class. */
1119
1832
  declare const CONTROLLER_META: unique symbol;
1120
1833
 
1121
1834
  /**
@@ -1142,37 +1855,64 @@ declare const DEVTOOLS_AGGREGATE_KEY_CONSTANT = "vault::devtools::aggregate:feat
1142
1855
  */
1143
1856
  declare const DEVTOOLS_LOGGING_KEY_CONSTANT = "vault::devtools::logging::feature::cell";
1144
1857
 
1858
+ /** Sentinel symbol that signals the pipeline to clear the current state. */
1145
1859
  declare const VAULT_CLEAR_STATE: unique symbol;
1146
1860
 
1861
+ /** Sentinel symbol that signals the pipeline to continue processing. */
1147
1862
  declare const VAULT_CONTINUE: unique symbol;
1148
1863
 
1864
+ /** Sentinel symbol that signals the pipeline to halt execution. */
1149
1865
  declare const VAULT_STOP: unique symbol;
1150
1866
 
1867
+ /**
1868
+ * Extended behavior class context providing direct state access for tab-sync behaviors.
1869
+ */
1870
+ interface TabSyncBehaviorClassContext extends BehaviorClassContext {
1871
+ /**
1872
+ * Live reference to the FeatureCell's mutable state snapshot.
1873
+ */
1874
+ readonly lastSnapshot: StateSnapshotShape<unknown>;
1875
+ /**
1876
+ * Subject used to emit state snapshots to the FeatureCell.
1877
+ */
1878
+ readonly state$: Subject<StateEmitSnapshotShape<unknown>>;
1879
+ }
1880
+
1881
+ /**
1882
+ * Metadata shape describing a registered behavior's static configuration.
1883
+ */
1151
1884
  interface BehaviorMetaShape {
1152
1885
  /**
1153
- * The pipeline stage in which this behavior participates.
1154
- * Determines when the orchestrator invokes the behavior.
1886
+ * Pipeline stage in which this behavior participates.
1155
1887
  */
1156
1888
  type: BehaviorType;
1157
1889
  /**
1158
- * Unique identifier for this behavior. Used for diagnostics,
1159
- * devtools visualization, and orchestrator classification.
1890
+ * Unique identifier for this behavior.
1160
1891
  */
1161
1892
  key: string;
1162
1893
  /**
1163
- * Indicates whether this behavior is critical. Critical behaviors
1164
- * are mandatory and must always run when present in the pipeline.
1894
+ * Whether this behavior is critical to pipeline execution.
1165
1895
  */
1166
1896
  critical: boolean;
1167
1897
  /**
1168
1898
  * Optional resolve strategy associated with this behavior.
1169
- * Only set for resolution behaviors that determine how state
1170
- * is initially derived (e.g., value, http, observable).
1171
1899
  */
1172
1900
  resolveType?: ResolveType;
1901
+ /**
1902
+ * Whether this behavior requires consumer-supplied configuration.
1903
+ */
1173
1904
  wantsConfig?: boolean;
1905
+ /**
1906
+ * Configuration key used to locate behavior options in the config registry.
1907
+ */
1174
1908
  configKey?: string;
1909
+ /**
1910
+ * Whether this behavior requires a valid license to operate.
1911
+ */
1175
1912
  needsLicense?: boolean;
1913
+ /**
1914
+ * License identifier used for license validation.
1915
+ */
1176
1916
  licenseId?: string;
1177
1917
  }
1178
1918
 
@@ -1195,18 +1935,33 @@ interface BehaviorMetaShape {
1195
1935
  */
1196
1936
  declare function VaultBehavior(meta: BehaviorMetaShape): (target: any) => void;
1197
1937
 
1938
+ /** Metadata shape describing a registered controller's static configuration. */
1198
1939
  interface ControllerMetaShape {
1940
+ /** Controller category classification. */
1199
1941
  type: ControllerType;
1942
+ /** Unique identifier for this controller. */
1200
1943
  key: string;
1944
+ /** Whether this controller is critical to pipeline execution. */
1201
1945
  critical?: boolean;
1946
+ /** Whether this controller requires consumer-supplied configuration. */
1202
1947
  wantsConfig?: boolean;
1948
+ /** Configuration key used to locate controller options in the config registry. */
1203
1949
  configKey?: string;
1950
+ /** Whether this controller requires a valid license to operate. */
1204
1951
  needsLicense?: boolean;
1952
+ /** License identifier used for license validation. */
1205
1953
  licenseId?: string;
1206
1954
  }
1207
1955
 
1956
+ /**
1957
+ * Class decorator that attaches controller metadata to the target class.
1958
+ *
1959
+ * @param meta - The controller metadata shape to apply.
1960
+ * @returns A class decorator function.
1961
+ */
1208
1962
  declare function VaultController(meta: ControllerMetaShape): (target: any) => void;
1209
1963
 
1964
+ /** Enumeration of usage-specific Vault error sub-kind classifications. */
1210
1965
  declare const VaultErrorUsageKindTypes: {
1211
1966
  readonly Encryption: "VaultErrorEncryption";
1212
1967
  readonly License: "VaultErrorLicense";
@@ -1214,58 +1969,94 @@ declare const VaultErrorUsageKindTypes: {
1214
1969
  readonly PromiseFactoryRequired: "VaultErrorUsagePromiseFactoryRequired";
1215
1970
  readonly Usage: "VaultErrorUsage";
1216
1971
  };
1972
+ /** Union type derived from VaultErrorUsageKindTypes values. */
1217
1973
  type VaultErrorUsageKindType = (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];
1218
1974
 
1975
+ /** Enumeration of top-level Vault error kind classifications. */
1219
1976
  declare const VaultErrorKindTypes: {
1220
1977
  readonly Usage: "VaultErrorUsage";
1221
1978
  readonly VaultError: "VaultError";
1222
1979
  };
1980
+ /** Union type of all Vault error kind values including usage sub-kinds. */
1223
1981
  type VaultErrorKindType = (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes] | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];
1224
1982
 
1983
+ /** Enumeration of Vault error name identifiers. */
1225
1984
  declare const VaultErrorNameTypes: {
1226
1985
  readonly EncryptionIntegrity: "VaultErrorEncryptionIntegrity";
1227
1986
  readonly License: "VaultErrorLicense";
1228
1987
  readonly Usage: "VaultErrorUsage";
1229
1988
  readonly VaultError: "VaultError";
1230
1989
  };
1990
+ /** Union type derived from VaultErrorNameTypes values. */
1231
1991
  type VaultErrorNameType = (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];
1232
1992
 
1993
+ /**
1994
+ * Base error class for all Vault-specific errors. Extends the native Error
1995
+ * with a typed name and kind for structured error classification.
1996
+ */
1233
1997
  declare class VaultError extends Error {
1998
+ /** Classification kind used to categorize this error in diagnostics. */
1234
1999
  readonly kind: VaultErrorKindType;
2000
+ /**
2001
+ * Creates a new VaultError instance with prototype chain correction.
2002
+ *
2003
+ * @param message - Human-readable description of the error.
2004
+ * @param name - Typed error name used for identification.
2005
+ * @param kind - Error kind used for diagnostic classification.
2006
+ */
1235
2007
  constructor(message: string, name?: VaultErrorNameType, kind?: VaultErrorKindType);
1236
2008
  }
1237
2009
 
1238
2010
  /**
1239
- * Thrown when encrypted payload integrity verification fails.
1240
- *
1241
- * This occurs when AES-GCM authentication fails during decryption.
1242
- * Causes may include:
1243
- *
1244
- * - Tampered ciphertext
1245
- * - Modified IV
1246
- * - Incorrect encryption key
1247
- * - Corrupted storage payload
1248
- *
1249
- * AES-GCM provides authenticated encryption, so any modification to the
1250
- * encrypted envelope will cause the WebCrypto decrypt operation to throw.
2011
+ * Thrown when an encrypted payload fails AES-GCM integrity verification
2012
+ * during decryption, indicating tampered, corrupted, or mismatched key data.
1251
2013
  */
1252
2014
  declare class VaultEncryptionIntegrityError extends VaultError {
2015
+ /** Creates the error with a descriptive integrity-failure message. */
1253
2016
  constructor();
1254
2017
  }
1255
2018
 
2019
+ /**
2020
+ * Thrown when a behavior or controller fails license validation.
2021
+ */
1256
2022
  declare class VaultLicenseError extends VaultError {
2023
+ /**
2024
+ * Creates a license validation error.
2025
+ *
2026
+ * @param message - Description of the license violation.
2027
+ * @param kind - Usage-kind classification for diagnostics.
2028
+ */
1257
2029
  constructor(message: string, kind?: VaultErrorUsageKindType);
1258
2030
  }
1259
2031
 
2032
+ /**
2033
+ * Base error for Vault API usage violations detected at runtime.
2034
+ */
1260
2035
  declare class VaultUsageError extends VaultError {
2036
+ /**
2037
+ * Creates a usage error with the specified message and kind.
2038
+ *
2039
+ * @param message - Description of the usage violation.
2040
+ * @param kind - Usage-kind classification for diagnostics.
2041
+ */
1261
2042
  constructor(message: string, kind?: VaultErrorUsageKindType);
1262
2043
  }
1263
2044
 
2045
+ /**
2046
+ * Thrown when an eager Promise is passed directly to the state pipeline
2047
+ * instead of a deferred factory function.
2048
+ */
1264
2049
  declare class VaultUsagePromiseError extends VaultUsageError {
2050
+ /** Creates the error with a descriptive usage-violation message. */
1265
2051
  constructor();
1266
2052
  }
1267
2053
 
2054
+ /**
2055
+ * Thrown when a Promise-based state method receives a raw value instead
2056
+ * of a factory function that returns a Promise.
2057
+ */
1268
2058
  declare class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {
2059
+ /** Creates the error with a descriptive usage-violation message. */
1269
2060
  constructor();
1270
2061
  }
1271
2062
 
@@ -1273,9 +2064,6 @@ declare class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {
1273
2064
  * Represents the possible result of a core emit operation.
1274
2065
  * This type indicates either an intentional no-op signal or the absence of an emitted state.
1275
2066
  *
1276
- * --RelatedStart--
1277
- * VAULT_NOOP
1278
- * --RelatedEnd--
1279
2067
  */
1280
2068
  type CoreEmitStateResult = typeof VAULT_NOOP | undefined;
1281
2069
 
@@ -1293,14 +2081,17 @@ interface CoreEmitStateBehaviorContract<T> extends BehaviorContract<T> {
1293
2081
  emitState(snapshot: StateSnapshotShape<T>, callback: CoreEmitStateCallback<T>): CoreEmitStateResult;
1294
2082
  }
1295
2083
 
2084
+ /** Enumeration of event boundary positions within a lifecycle span. */
1296
2085
  declare const EventBoundaryTypes: {
1297
2086
  readonly End: "end";
1298
2087
  readonly Notification: "notification";
1299
2088
  readonly Start: "start";
1300
2089
  readonly Unknown: "unknown";
1301
2090
  };
2091
+ /** Union type derived from EventBoundaryTypes values. */
1302
2092
  type EventBoundaryType = (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];
1303
2093
 
2094
+ /** Enumeration of monitor event category classifications. */
1304
2095
  declare const EventTypes: {
1305
2096
  readonly Conductor: "conductor";
1306
2097
  readonly Controller: "controller";
@@ -1308,15 +2099,12 @@ declare const EventTypes: {
1308
2099
  readonly Stage: "stage";
1309
2100
  readonly Unknown: "unknown";
1310
2101
  };
2102
+ /** Union type derived from EventTypes values. */
1311
2103
  type EventType = (typeof EventTypes)[keyof typeof EventTypes];
1312
2104
 
1313
2105
  /**
1314
2106
  * Describes the shape of a pipeline event emitted during FeatureCell execution.
1315
2107
  * This interface defines the core event contract used for diagnostics, Devtools inspection, and lifecycle tracking.
1316
- *
1317
- * --RelatedStart--
1318
- * StateSnapshotShape
1319
- * --RelatedEnd--
1320
2108
  */
1321
2109
  interface EventShape<T = any> {
1322
2110
  /**
@@ -1351,6 +2139,9 @@ interface EventShape<T = any> {
1351
2139
  * The event name describing the lifecycle transition or action.
1352
2140
  */
1353
2141
  name: string;
2142
+ /**
2143
+ * Classification of the event within the pipeline lifecycle.
2144
+ */
1354
2145
  type: EventType;
1355
2146
  /**
1356
2147
  * The event boundary type.
@@ -1370,10 +2161,6 @@ interface EventShape<T = any> {
1370
2161
  * Defines the contract for an event bus responsible for emitting and observing pipeline and queue events.
1371
2162
  * This interface provides methods for publishing events and subscribing to their corresponding event streams.
1372
2163
  *
1373
- * --RelatedStart--
1374
- * EventShape
1375
- * EventQueueShape
1376
- * --RelatedEnd--
1377
2164
  */
1378
2165
  interface EventBusContract {
1379
2166
  /**
@@ -1390,6 +2177,7 @@ interface EventBusContract {
1390
2177
  pipeline$(): Observable<EventShape>;
1391
2178
  }
1392
2179
 
2180
+ /** Enumeration of license validation statuses for FeatureCell registration. */
1393
2181
  declare const VaultRegistrationLicenseStatusTypes: {
1394
2182
  readonly NotRequired: "not-required";
1395
2183
  readonly Pending: "pending";
@@ -1397,36 +2185,62 @@ declare const VaultRegistrationLicenseStatusTypes: {
1397
2185
  readonly Timeout: "timeout";
1398
2186
  readonly Valid: "valid";
1399
2187
  };
2188
+ /** Union type derived from VaultRegistrationLicenseStatusTypes values. */
1400
2189
  type VaultRegistrationLicenseStatusType = (typeof VaultRegistrationLicenseStatusTypes)[keyof typeof VaultRegistrationLicenseStatusTypes];
1401
2190
 
2191
+ /** Shape describing a registered behavior or controller entity within a FeatureCell. */
1402
2192
  interface VaultRegistrationEntityShape {
2193
+ /** Unique identifier for this entity. */
1403
2194
  key: string;
2195
+ /** Entity type classification string. */
1404
2196
  type: string;
2197
+ /** Whether this entity is critical to pipeline execution. */
1405
2198
  critical?: boolean;
2199
+ /** Whether this entity requires a valid license. */
1406
2200
  needsLicense?: boolean;
2201
+ /** Current license validation status for this entity. */
1407
2202
  validLicense?: VaultRegistrationLicenseStatusType;
2203
+ /** License identifier associated with this entity. */
1408
2204
  licenseId?: string;
1409
2205
  }
1410
2206
 
2207
+ /** Shape tracking the count of fluent API registrations on a FeatureCell. */
1411
2208
  interface VaultRegistrationFluentApiShape {
2209
+ /** Number of registered filter functions. */
1412
2210
  filters: number;
2211
+ /** Number of registered reducer functions. */
1413
2212
  reducers: number;
2213
+ /** Number of registered before-tap callbacks. */
1414
2214
  beforeTaps: number;
2215
+ /** Number of registered after-tap callbacks. */
1415
2216
  afterTaps: number;
2217
+ /** Number of registered emit-state callbacks. */
1416
2218
  emitStateCallbacks: number;
2219
+ /** Number of registered error callbacks. */
1417
2220
  errorCallbacks: number;
1418
2221
  }
1419
2222
 
2223
+ /** Shape representing the full registration record of a FeatureCell in the Vault. */
1420
2224
  interface VaultRegistrationShape {
2225
+ /** Unique key identifying the registered FeatureCell. */
1421
2226
  key: string;
2227
+ /** Factory returning a promise that resolves when the vault has settled. */
1422
2228
  vaultSettled?: () => Promise<void>;
2229
+ /** Map of registered behavior entities keyed by behavior key. */
1423
2230
  behaviors?: Map<string, VaultRegistrationEntityShape>;
2231
+ /** Map of registered controller entities keyed by controller key. */
1424
2232
  controllers?: Map<string, VaultRegistrationEntityShape>;
2233
+ /** Read-only snapshot of fluent API registration counts. */
1425
2234
  fluentApis?: Readonly<VaultRegistrationFluentApiShape>;
2235
+ /** Whether all behaviors have completed registration. */
1426
2236
  behaviorsRegistered?: boolean;
2237
+ /** Whether all controllers have completed registration. */
1427
2238
  controllersRegistered?: boolean;
1428
2239
  }
1429
2240
 
2241
+ /**
2242
+ * Shape of the global SDuX runtime namespace attached to the window object.
2243
+ */
1430
2244
  interface SDuXShape {
1431
2245
  /**
1432
2246
  * Global Vault monitor instance.
@@ -1436,6 +2250,9 @@ interface SDuXShape {
1436
2250
  * Global Vault event bus instance.
1437
2251
  */
1438
2252
  vaultEventBus?: EventBusContract;
2253
+ /**
2254
+ * Optional debug widget configuration for devtools integration.
2255
+ */
1439
2256
  debugWidget?: {
1440
2257
  versions?: Record<string, string>;
1441
2258
  injected?: boolean;
@@ -1502,6 +2319,7 @@ type InterceptorStateType<T> = StateInputType<T> | typeof VAULT_STOP;
1502
2319
  */
1503
2320
  type PipelinePersistValue<T> = T | undefined;
1504
2321
 
2322
+ /** Union of all valid upstream values that a pipeline stage may produce. */
1505
2323
  type PipelineUpstreamValue<T> = T | undefined | typeof VAULT_NOOP | typeof VAULT_CLEAR_STATE | typeof VAULT_CONTINUE;
1506
2324
 
1507
2325
  /**
@@ -1516,6 +2334,7 @@ type PipelineUpstreamValue<T> = T | undefined | typeof VAULT_NOOP | typeof VAULT
1516
2334
  */
1517
2335
  type PipelineValue<T> = T | undefined;
1518
2336
 
2337
+ /** Union of all terminal pipeline values including the stop sentinel. */
1519
2338
  type FinalState<T> = PipelineUpstreamValue<T> | typeof VAULT_STOP;
1520
2339
 
1521
2340
  /**
@@ -1590,6 +2409,9 @@ interface DevPipelineObserverBehaviorContract extends BehaviorContract {
1590
2409
  emitError(cellKey: string, error: VaultErrorShape): void;
1591
2410
  }
1592
2411
 
2412
+ /**
2413
+ * Contract for encryption behaviors that protect persisted state values.
2414
+ */
1593
2415
  interface EncryptBehaviorContract<T> extends BehaviorContract<T> {
1594
2416
  /**
1595
2417
  * Encrypts a plain or already-processed state value before persistence.
@@ -1610,41 +2432,84 @@ interface EncryptBehaviorContract<T> extends BehaviorContract<T> {
1610
2432
  decryptState(ctx: BehaviorContext<T>, encrypted: PipelinePersistValue<T>): Promise<PipelinePersistValue<T>> | PipelinePersistValue<T>;
1611
2433
  }
1612
2434
 
2435
+ /**
2436
+ * Contract for filter behaviors that selectively pass or reject state updates.
2437
+ */
1613
2438
  interface FilterBehaviorContract<T> extends BehaviorContract<T> {
1614
2439
  /** Identifies this behavior as a filter behavior. */
1615
2440
  type: 'filter';
2441
+ /**
2442
+ * Applies the filter function against the current pipeline value.
2443
+ *
2444
+ * @param current - The upstream pipeline value to evaluate.
2445
+ * @param filter - The filter function that determines acceptance.
2446
+ * @returns The filtered pipeline value.
2447
+ */
1616
2448
  applyFilter(current: PipelineUpstreamValue<T>, filter: FilterFunction<T>): PipelineUpstreamValue<T>;
1617
2449
  }
1618
2450
 
2451
+ /**
2452
+ * Contract for interceptor behaviors that preprocess incoming state before resolve.
2453
+ */
1619
2454
  interface InterceptorBehaviorContract<T> extends BehaviorContract<T> {
1620
2455
  /**
1621
2456
  * Applies the interceptor logic for the incoming state packet.
1622
2457
  *
1623
- * @param ctx - The behavior execution context containing the incoming
1624
- * state and lifecycle metadata for the current pipeline operation.
1625
- * @returns A promise that resolves to a transformed or replacement
1626
- * {@link StateInputType} value, or `undefined` when no modification is
1627
- * necessary.
2458
+ * @param ctx - The behavior execution context for the current pipeline operation.
2459
+ * @returns A transformed state value, or undefined when no modification is necessary.
1628
2460
  */
1629
2461
  applyInterceptor(ctx: BehaviorContext<T>): Promise<InterceptorStateType<T>>;
1630
2462
  }
1631
2463
 
2464
+ /** Contract for merge behaviors that combine current and incoming state. */
1632
2465
  interface MergeBehaviorContract<T> extends BehaviorContract<T> {
2466
+ /**
2467
+ * Computes the merged result of the current and next pipeline values.
2468
+ *
2469
+ * @param currentValue - The existing state value.
2470
+ * @param nextValue - The incoming candidate value.
2471
+ * @param options - Optional merge configuration.
2472
+ * @returns The merged pipeline value.
2473
+ */
1633
2474
  computeMerge(currentValue: PipelineUpstreamValue<T> | undefined, nextValue: PipelineUpstreamValue<T> | undefined, options?: MergeConfig): PipelineUpstreamValue<T> | undefined;
1634
2475
  }
1635
2476
 
2477
+ /** Contract for operator behaviors that transform pipeline values. */
1636
2478
  interface OperatorBehaviorContract<T> extends BehaviorContract<T> {
2479
+ /**
2480
+ * Applies the operator transformation to the current pipeline value.
2481
+ *
2482
+ * @param value - The upstream pipeline value to transform.
2483
+ * @returns A promise resolving to the transformed pipeline value.
2484
+ */
1637
2485
  applyOperator(value: PipelineUpstreamValue<T>): Promise<PipelineUpstreamValue<T>>;
1638
2486
  }
1639
2487
 
2488
+ /**
2489
+ * Contract for persistence behaviors that save and restore FeatureCell state.
2490
+ */
1640
2491
  interface PersistBehaviorContract<T> extends BehaviorContract<T> {
1641
2492
  /** Identifies this behavior as a persistence behavior. */
1642
2493
  type: 'persist';
2494
+ /**
2495
+ * Persists the current state snapshot to the configured storage.
2496
+ *
2497
+ * @param current - The pipeline persist value to store.
2498
+ */
1643
2499
  persistState(current: PipelinePersistValue<T>): Promise<void> | void;
2500
+ /** Clears the persisted state from storage. */
1644
2501
  clearState(): void;
2502
+ /**
2503
+ * Loads the previously persisted state from storage.
2504
+ *
2505
+ * @returns The restored persist value.
2506
+ */
1645
2507
  loadState(): PipelinePersistValue<T>;
1646
2508
  }
1647
2509
 
2510
+ /**
2511
+ * Contract for reducer-stage behaviors that transform pipeline state.
2512
+ */
1648
2513
  interface ReduceBehaviorContract<T> extends BehaviorContract<T> {
1649
2514
  /** Pipeline behavior type identifier for reducer-stage execution. */
1650
2515
  type: 'reduce';
@@ -1658,46 +2523,120 @@ interface ReduceBehaviorContract<T> extends BehaviorContract<T> {
1658
2523
  applyReducer(current: PipelineUpstreamValue<T>, reducer: ReducerFunction<T>): T;
1659
2524
  }
1660
2525
 
2526
+ /**
2527
+ * Contract for resolve behaviors that derive initial state from an external source.
2528
+ */
1661
2529
  interface ResolveBehaviorContract<T> extends BehaviorContract<T> {
1662
2530
  /** Resolve strategy used by this behavior (value, HTTP resource, observable, etc.). */
1663
2531
  resolveType: 'http-resource' | 'observable' | 'promise' | 'value';
2532
+ /**
2533
+ * Computes the resolved state value for the current pipeline operation.
2534
+ *
2535
+ * @param ctx - The behavior execution context for the current pipeline run.
2536
+ * @returns The resolved state value, synchronously or as a promise.
2537
+ */
1664
2538
  computeResolve(ctx: BehaviorContext<T>): Promise<PipelineUpstreamValue<T>> | PipelineUpstreamValue<T>;
1665
2539
  }
1666
2540
 
2541
+ /** Contract for stepwise behaviors that compare current and candidate state. */
1667
2542
  interface StepwiseBehaviorContract<T> extends BehaviorContract<T> {
2543
+ /**
2544
+ * Evaluates whether the candidate value should replace the current state.
2545
+ *
2546
+ * @param current - The current state value.
2547
+ * @param candidate - The candidate pipeline value.
2548
+ * @param pipelineId - Trace identifier for the current pipeline run.
2549
+ * @returns A promise resolving to the accepted pipeline value.
2550
+ */
1668
2551
  evaluateStepwise(current: T | undefined, candidate: PipelineUpstreamValue<T>, pipelineId: string): Promise<PipelineUpstreamValue<T>>;
1669
2552
  }
1670
2553
 
2554
+ /** Contract for after-tap behaviors that observe state after pipeline resolution. */
1671
2555
  interface AfterTapBehaviorContract<T> extends BehaviorContract<T> {
2556
+ /**
2557
+ * Invokes the tap callback with the current pipeline value after resolution.
2558
+ *
2559
+ * @param current - The upstream pipeline value.
2560
+ * @param tap - The tap callback to invoke.
2561
+ */
1672
2562
  applyAfterTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void;
1673
2563
  }
1674
2564
 
2565
+ /** Contract for before-tap behaviors that observe state before pipeline resolution. */
1675
2566
  interface BeforeTapBehaviorContract<T> extends BehaviorContract<T> {
2567
+ /**
2568
+ * Invokes the tap callback with the current pipeline value before resolution.
2569
+ *
2570
+ * @param current - The upstream pipeline value.
2571
+ * @param tap - The tap callback to invoke.
2572
+ */
1676
2573
  applyBeforeTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void;
1677
2574
  }
1678
2575
 
2576
+ /** Static-side contract for controller classes used by the controller factory. */
1679
2577
  interface ControllerClassContract<T = any> {
2578
+ /**
2579
+ * Creates a new controller instance.
2580
+ *
2581
+ * @param controllerKey - Unique key assigned by the controller factory.
2582
+ * @param controllerCtx - Class-level context for dependency resolution.
2583
+ */
1680
2584
  new (controllerKey: string, controllerCtx: ControllerClassContext): ControllerContract<T>;
2585
+ /** Pipeline stage in which this controller participates. */
1681
2586
  readonly type: ControllerType;
2587
+ /** Unique identifier assigned to this controller class. */
1682
2588
  readonly key: string;
2589
+ /** Whether errors from this controller halt the pipeline. */
1683
2590
  readonly critical: boolean;
2591
+ /**
2592
+ * Optional hook that installs a fluent API onto the FeatureCell.
2593
+ *
2594
+ * @param cell - The FeatureCell shape to extend.
2595
+ * @param behaviorConfigs - Map of behavior configuration entries.
2596
+ */
1684
2597
  installFluentApi?: <T>(cell: FeatureCellBaseShape<T>, behaviorConfigs: Map<string, unknown>) => void;
1685
2598
  }
1686
2599
 
2600
+ /** Contract for the public-facing Vault error service. */
1687
2601
  interface VaultErrorServiceContract {
2602
+ /** Observable stream of the current error state. */
1688
2603
  readonly error$: Observable<VaultErrorShape | null>;
2604
+ /** Clears the current error state. */
1689
2605
  clear(): void;
2606
+ /** Whether an active error is currently present. */
1690
2607
  get hasError(): boolean;
1691
2608
  }
1692
2609
 
2610
+ /** Contract for the internal private error service used by VaultErrorService. */
1693
2611
  interface VaultPrivateErrorServiceContract {
2612
+ /**
2613
+ * Publishes a new error or clears the current error.
2614
+ *
2615
+ * @param error - The error shape to publish, or null to clear.
2616
+ */
1694
2617
  setError(error: VaultErrorShape | null): void;
2618
+ /**
2619
+ * Returns an observable of the current error state.
2620
+ *
2621
+ * @returns Observable emitting the current error or null.
2622
+ */
1695
2623
  getError(): Observable<VaultErrorShape | null>;
2624
+ /** Resets the error state to null. */
1696
2625
  clear(): void;
1697
2626
  }
1698
2627
 
2628
+ /**
2629
+ * Returns the singleton VaultErrorService instance, creating it on first call.
2630
+ *
2631
+ * @returns The shared VaultErrorService instance.
2632
+ */
1699
2633
  declare function VaultErrorService(): VaultErrorServiceContract;
1700
2634
 
2635
+ /**
2636
+ * Returns the singleton VaultPrivateErrorService instance, creating it on first call.
2637
+ *
2638
+ * @returns The shared private error service instance.
2639
+ */
1701
2640
  declare function VaultPrivateErrorService(): VaultPrivateErrorServiceContract;
1702
2641
 
1703
2642
  /**
@@ -1735,16 +2674,37 @@ declare function defineBehaviorKey(domain: string, name: string): string;
1735
2674
  */
1736
2675
  declare function validateBehaviorKey(key: string): boolean;
1737
2676
 
2677
+ /**
2678
+ * Creates a normalized controller key following the Vault key format.
2679
+ *
2680
+ * @param domain - The logical domain or category of the controller.
2681
+ * @param name - The specific controller name within the domain.
2682
+ * @returns A normalized controller key string.
2683
+ */
1738
2684
  declare function defineControllerKey(domain: string, name: string): string;
2685
+ /**
2686
+ * Validates whether a string conforms to the Vault controller key format.
2687
+ *
2688
+ * @param key - The controller key string to validate.
2689
+ * @returns `true` if the key matches the required pattern.
2690
+ */
1739
2691
  declare function validateControllerKey(key: string): boolean;
1740
2692
 
2693
+ /**
2694
+ * Determines whether a value conforms to the DeferredFactory contract.
2695
+ *
2696
+ * @param value - The value to inspect.
2697
+ * @returns `true` if the value is an object with a callable `value` property.
2698
+ */
1741
2699
  declare function isDeferredFactory<T = unknown>(value: unknown): value is DeferredFactory<T>;
1742
2700
 
2701
+ /** Singleton accessor for Vault development mode state. */
1743
2702
  declare const DevMode: {
1744
2703
  readonly active: boolean;
1745
2704
  setDevMode(isDevMode: boolean): void;
1746
2705
  };
1747
2706
 
2707
+ /** Singleton accessor that detects whether code is running in a test environment. */
1748
2708
  declare const isTestEnv: {
1749
2709
  readonly active: boolean;
1750
2710
  };
@@ -1761,6 +2721,12 @@ declare const isTestEnv: {
1761
2721
  */
1762
2722
  declare function createVaultError(err: unknown, featureCellKey: string): VaultErrorShape;
1763
2723
 
2724
+ /**
2725
+ * Creates an immutable copy of a value using structuredClone with a deepFreeze fallback.
2726
+ *
2727
+ * @param value - The value to isolate.
2728
+ * @returns An immutable copy of the value.
2729
+ */
1764
2730
  declare const isolateValue: <T>(value: T) => T;
1765
2731
 
1766
2732
  /**
@@ -1787,7 +2753,17 @@ declare const vaultLog: (...args: any[]) => void;
1787
2753
  * @param args - Console arguments to log.
1788
2754
  */
1789
2755
  declare const vaultDebug: (...args: any[]) => void;
2756
+ /**
2757
+ * Sets the global Vault log level threshold.
2758
+ *
2759
+ * @param level - The log level to apply.
2760
+ */
1790
2761
  declare function setVaultLogLevel(level: LogLevelType): void;
2762
+ /**
2763
+ * Returns the current global Vault log level.
2764
+ *
2765
+ * @returns The active log level threshold.
2766
+ */
1791
2767
  declare function getVaultLogLevel(): LogLevelType;
1792
2768
 
1793
2769
  /**
@@ -1797,7 +2773,19 @@ declare function getVaultLogLevel(): LogLevelType;
1797
2773
  * @returns `true` if the value is the `VAULT_NOOP` sentinel.
1798
2774
  */
1799
2775
  declare const isVaultNoop: <T>(current: FinalState<T>) => boolean;
2776
+ /**
2777
+ * Indicates whether a final pipeline value represents the clear-state sentinel.
2778
+ *
2779
+ * @param current - The computed pipeline result.
2780
+ * @returns `true` if the value is the `VAULT_CLEAR_STATE` sentinel.
2781
+ */
1800
2782
  declare const isVaultClearState: <T>(current: FinalState<T>) => boolean;
2783
+ /**
2784
+ * Indicates whether a final pipeline value represents the continue sentinel.
2785
+ *
2786
+ * @param current - The computed pipeline result.
2787
+ * @returns `true` if the value is the `VAULT_CONTINUE` sentinel.
2788
+ */
1801
2789
  declare const isVaultContinue: <T>(current: FinalState<T>) => boolean;
1802
2790
  /**
1803
2791
  * Checks whether a value is exactly `null`.
@@ -1828,10 +2816,34 @@ declare const isDefined: (current: unknown) => boolean;
1828
2816
  * @returns `true` for `null` or `undefined`, otherwise `false`.
1829
2817
  */
1830
2818
  declare const isNullish: (current: unknown) => current is null | undefined;
2819
+ /**
2820
+ * Determines whether a value is a function.
2821
+ *
2822
+ * @param value - The value to check.
2823
+ * @returns `true` if the value is a function.
2824
+ */
1831
2825
  declare const isFunction: (value: unknown) => value is (...args: any[]) => unknown;
2826
+ /**
2827
+ * Determines whether a value is a non-null object.
2828
+ *
2829
+ * @param value - The value to check.
2830
+ * @returns `true` if the value is an object and not null.
2831
+ */
1832
2832
  declare const isObject: (value: unknown) => value is Record<string, unknown>;
2833
+ /**
2834
+ * Determines whether a value conforms to the StateInputShape contract.
2835
+ *
2836
+ * @param value - The value to inspect.
2837
+ * @returns `true` if the value is a plain object with recognized state keys or is empty.
2838
+ */
1833
2839
  declare const isStateInputShape: <T>(value: unknown) => value is StateInputShape<T>;
1834
2840
 
2841
+ /**
2842
+ * Determines whether a value is a thenable Promise-like object.
2843
+ *
2844
+ * @param value - The value to inspect.
2845
+ * @returns `true` if the value has a callable `then` property.
2846
+ */
1835
2847
  declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;
1836
2848
 
1837
2849
  /**
@@ -1872,7 +2884,13 @@ declare function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T>;
1872
2884
  */
1873
2885
  declare function safeStringify(value: unknown): string;
1874
2886
 
2887
+ /**
2888
+ * Registers a package version on the global SDuX debug widget when dev mode is active.
2889
+ *
2890
+ * @param packageName - The npm package name to register.
2891
+ * @param version - The semver version string.
2892
+ */
1875
2893
  declare const registerVersion: (packageName: string, version: string) => void;
1876
2894
 
1877
2895
  export { AbstractActiveController, AbstractErrorCallbackBehavior, AbstractErrorTransformBehavior, BEHAVIOR_META, BehaviorTypes, CONTROLLER_META, ControllerMessageTypes, ControllerTypes, ControllerVotes, DEVTOOLS_AGGREGATE_KEY_CONSTANT, DEVTOOLS_LOGGING_KEY_CONSTANT, DecisionOutcomeTypes, DevMode, EventBoundaryTypes, EventTypes, LogLevelTypes, OperationTypes, ResolveTypes, StateEmitTypes, VAULT_CLEAR_STATE, VAULT_CONTINUE, VAULT_NOOP, VAULT_STOP, VaultBehavior, VaultController, VaultEncryptionIntegrityError, VaultError, VaultErrorKindTypes, VaultErrorNameTypes, VaultErrorService, VaultErrorUsageKindTypes, VaultLicenseError, VaultPrivateErrorService, VaultUsageError, VaultUsagePromiseError, VaultUsagePromiseFactoryRequiredError, createVaultError, defineBehaviorKey, defineControllerKey, getVaultLogLevel, isDeferredFactory, isDefined, isFunction, isHttpResourceRef, isNull, isNullish, isObject, isPromise, isStateInputShape, isTestEnv, isUndefined, isVaultClearState, isVaultContinue, isVaultNoop, isolateValue, registerVersion, safeStringify, setVaultLogLevel, validateBehaviorKey, validateControllerKey, vaultDebug, vaultError, vaultLog, vaultWarn };
1878
- export type { AfterTapBehaviorContract, BeforeTapBehaviorContract, BehaviorClassContext, BehaviorClassContract, BehaviorContext, BehaviorContract, BehaviorExtFunction, BehaviorExtension, BehaviorMetaShape, BehaviorType, CellBuilderContract, ControllerAttemptMessageShape, ControllerClassContext, ControllerClassContract, ControllerContext, ControllerContract, ControllerDecisionShape, ControllerFailMessageShape, ControllerFinalizeMessageShape, ControllerMessageShape, ControllerMessageType, ControllerMetaShape, ControllerSuccessMessageShape, ControllerType, ControllerVote, CoreEmitStateBehaviorContract, CoreEmitStateCallback, CoreEmitStateResult, CoreErrorBehaviorContract, CoreStateBehaviorContract, DecisionOutcomeType, DeferredFactory, DeferredType, DevPipelineObserverBehaviorContract, DistinctComparison, EncryptBehaviorContract, ErrorCallbackBehaviorContract, ErrorTransformBehaviorContract, EventBoundaryType, EventBusContract, EventShape, EventType, FeatureCellBaseShape, FeatureCellExtension, FeatureCellExtensionContext, FeatureCellFluentApi, FilterBehaviorContract, FilterFunction, FinalState, HttpResourceRefShape, InsightConfig, InterceptorBehaviorClassContract, InterceptorBehaviorContract, InterceptorStateType, LogLevelType, MergeBehaviorContract, MergeConfig, ObjectDeepMergeConfig, OperationType, OperatorBehaviorContract, OperatorsBehaviorClassContract, PersistBehaviorContract, PipelinePersistValue, PipelineUpstreamValue, PipelineValue, ReduceBehaviorContract, ReducerFunction, ResolveBehaviorContract, ResolveType, SDuXShape, StateEmitSnapshotShape, StateEmitType, StateInputShape, StateInputType, StateSnapshotShape, StepwiseBehaviorContract, TapCallback, VaultConfig, VaultErrorCallback, VaultErrorKindType, VaultErrorNameType, VaultErrorServiceContract, VaultErrorShape, VaultErrorUsageKindType, VaultLicensingShape, VaultMonitorContract, VaultPrivateErrorServiceContract, VaultRegistrationEntityShape, VaultRegistrationFluentApiShape, VaultRegistrationShape };
2896
+ export type { AfterTapBehaviorContract, BeforeTapBehaviorContract, BehaviorClassContext, BehaviorClassContract, BehaviorContext, BehaviorContract, BehaviorExtFunction, BehaviorExtension, BehaviorMetaShape, BehaviorType, CellBuilderContract, ControllerAttemptMessageShape, ControllerClassContext, ControllerClassContract, ControllerContext, ControllerContract, ControllerDecisionShape, ControllerFailMessageShape, ControllerFinalizeMessageShape, ControllerMessageShape, ControllerMessageType, ControllerMetaShape, ControllerSuccessMessageShape, ControllerType, ControllerVote, CoreEmitStateBehaviorContract, CoreEmitStateCallback, CoreEmitStateResult, CoreErrorBehaviorContract, CoreStateBehaviorContract, DecisionOutcomeType, DeferredFactory, DeferredType, DevPipelineObserverBehaviorContract, DistinctComparison, EncryptBehaviorContract, ErrorCallbackBehaviorContract, ErrorTransformBehaviorContract, EventBoundaryType, EventBusContract, EventShape, EventType, FeatureCellBaseShape, FeatureCellExtension, FeatureCellExtensionContext, FeatureCellFluentApi, FilterBehaviorContract, FilterFunction, FinalState, HttpResourceRefShape, InsightConfig, InterceptorBehaviorClassContract, InterceptorBehaviorContract, InterceptorStateType, LicensableClassContext, LogLevelType, MergeBehaviorContract, MergeConfig, ObjectDeepMergeConfig, OperationType, OperatorBehaviorContract, OperatorsBehaviorClassContract, PersistBehaviorContract, PipelinePersistValue, PipelineUpstreamValue, PipelineValue, ReduceBehaviorContract, ReducerFunction, ResolveBehaviorContract, ResolveType, SDuXShape, StateEmitSnapshotShape, StateEmitType, StateInputShape, StateInputType, StateSnapshotShape, StepwiseBehaviorContract, TabSyncBehaviorClassContext, TapCallback, VaultConfig, VaultErrorCallback, VaultErrorKindType, VaultErrorNameType, VaultErrorServiceContract, VaultErrorShape, VaultErrorUsageKindType, VaultLicensingShape, VaultMonitorContract, VaultPrivateErrorServiceContract, VaultRegistrationEntityShape, VaultRegistrationFluentApiShape, VaultRegistrationShape };