@sdux-vault/shared 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/fesm2022/sdux-vault-shared.mjs +65 -37
- package/fesm2022/sdux-vault-shared.mjs.map +1 -1
- package/package.json +3 -2
- package/types/sdux-vault-shared.d.ts +258 -113
|
@@ -344,6 +344,12 @@ interface InsightConfig {
|
|
|
344
344
|
* Whether error information should be included in emitted insight events.
|
|
345
345
|
*/
|
|
346
346
|
wantsErrors?: boolean;
|
|
347
|
+
/**
|
|
348
|
+
* Whether pipeline candidate snapshots should be included in emitted
|
|
349
|
+
* insight events. Candidates capture the state value at each pipeline
|
|
350
|
+
* stage boundary, enabling before/after diff comparison across stages.
|
|
351
|
+
*/
|
|
352
|
+
wantsCandidates?: boolean;
|
|
347
353
|
}
|
|
348
354
|
|
|
349
355
|
/** Enumeration of conductor decision outcomes after controller voting. */
|
|
@@ -363,6 +369,28 @@ interface ControllerDecisionShape {
|
|
|
363
369
|
outcome: DecisionOutcomeType;
|
|
364
370
|
}
|
|
365
371
|
|
|
372
|
+
/** Enumeration of votes a controller may cast during pipeline admission. */
|
|
373
|
+
declare const ControllerVotes: {
|
|
374
|
+
readonly Abstain: "abstain";
|
|
375
|
+
readonly Abort: "abort";
|
|
376
|
+
readonly Deny: "deny";
|
|
377
|
+
};
|
|
378
|
+
/** Union type derived from ControllerVotes values. */
|
|
379
|
+
type ControllerVote = (typeof ControllerVotes)[keyof typeof ControllerVotes];
|
|
380
|
+
|
|
381
|
+
/** Enumeration of pipeline stages that produce state-transforming snapshots for DevTools diffing. */
|
|
382
|
+
declare const PipelineStages: {
|
|
383
|
+
readonly PipelineStart: "pipeline-start";
|
|
384
|
+
readonly Resolve: "resolve";
|
|
385
|
+
readonly ComputeMerge: "compute-merge";
|
|
386
|
+
readonly Operator: "operator";
|
|
387
|
+
readonly Filter: "filter";
|
|
388
|
+
readonly Reducer: "reducer";
|
|
389
|
+
readonly CoreState: "core-state";
|
|
390
|
+
};
|
|
391
|
+
/** Union type derived from PipelineStages values. */
|
|
392
|
+
type PipelineStage = (typeof PipelineStages)[keyof typeof PipelineStages];
|
|
393
|
+
|
|
366
394
|
/**
|
|
367
395
|
* Context supplied to a controller during pipeline admission voting.
|
|
368
396
|
*/
|
|
@@ -896,31 +924,31 @@ interface VaultMonitorContract {
|
|
|
896
924
|
*/
|
|
897
925
|
conductorLicenseDenied(cell: string, featureCellKey: string): void;
|
|
898
926
|
/**
|
|
899
|
-
* Signals the start of a
|
|
927
|
+
* Signals the start of a conductor attempt lifecycle event.
|
|
900
928
|
*
|
|
901
929
|
* @param cell - The FeatureCell key.
|
|
902
930
|
* @param behaviorKey - The behavior key.
|
|
903
931
|
* @param ctx - The monitor context for this operation.
|
|
904
932
|
*/
|
|
905
|
-
|
|
933
|
+
startConductorAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
|
|
906
934
|
/**
|
|
907
|
-
* Signals the end of a
|
|
935
|
+
* Signals the end of a conductor attempt lifecycle event.
|
|
908
936
|
*
|
|
909
937
|
* @param cell - The FeatureCell key.
|
|
910
938
|
* @param behaviorKey - The behavior key.
|
|
911
939
|
* @param ctx - The monitor context for this operation.
|
|
912
940
|
* @param payload - The attempt result payload.
|
|
913
941
|
*/
|
|
914
|
-
|
|
942
|
+
endConductorAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: unknown): void;
|
|
915
943
|
/**
|
|
916
|
-
* Records that a
|
|
944
|
+
* Records that a conductorattempt was restarted.
|
|
917
945
|
*
|
|
918
946
|
* @param cell - The FeatureCell key.
|
|
919
947
|
* @param behaviorKey - The behavior key.
|
|
920
948
|
* @param ctx - The monitor context for this operation.
|
|
921
949
|
* @param payload - The restart reason.
|
|
922
950
|
*/
|
|
923
|
-
|
|
951
|
+
restartConductorAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: string): void;
|
|
924
952
|
/**
|
|
925
953
|
* Records a controller failure event.
|
|
926
954
|
*
|
|
@@ -944,22 +972,56 @@ interface VaultMonitorContract {
|
|
|
944
972
|
*/
|
|
945
973
|
controllerSuccess<T>(behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
|
|
946
974
|
/**
|
|
947
|
-
* Signals the start of
|
|
975
|
+
* Signals the start of the conductor vote aggregation phase.
|
|
948
976
|
*
|
|
949
977
|
* @param cell - The FeatureCell key.
|
|
950
978
|
* @param behaviorKey - The behavior key.
|
|
951
979
|
* @param ctx - The monitor context for this operation.
|
|
952
980
|
*/
|
|
953
|
-
|
|
981
|
+
startConductorVote<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
|
|
954
982
|
/**
|
|
955
|
-
* Signals the end of
|
|
983
|
+
* Signals the end of the conductor vote aggregation phase.
|
|
956
984
|
*
|
|
957
985
|
* @param cell - The FeatureCell key.
|
|
958
986
|
* @param behaviorKey - The behavior key.
|
|
959
987
|
* @param ctx - The monitor context for this operation.
|
|
960
988
|
* @param payload - The controller decision result.
|
|
961
989
|
*/
|
|
962
|
-
|
|
990
|
+
endConductorVote<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: ControllerDecisionShape): void;
|
|
991
|
+
/**
|
|
992
|
+
* Signals the start of an individual controller vote during attempt evaluation.
|
|
993
|
+
*
|
|
994
|
+
* @param cell - The FeatureCell key.
|
|
995
|
+
* @param controllerKey - The key of the controller being evaluated.
|
|
996
|
+
* @param traceId - The trace identifier for the current attempt.
|
|
997
|
+
*/
|
|
998
|
+
startControllerVote(cell: string, controllerKey: string, traceId: string): void;
|
|
999
|
+
/**
|
|
1000
|
+
* Signals the end of an individual controller vote during attempt evaluation.
|
|
1001
|
+
*
|
|
1002
|
+
* @param cell - The FeatureCell key.
|
|
1003
|
+
* @param controllerKey - The key of the controller that voted.
|
|
1004
|
+
* @param traceId - The trace identifier for the current attempt.
|
|
1005
|
+
* @param vote - The resolved controller vote.
|
|
1006
|
+
*/
|
|
1007
|
+
endControllerVote(cell: string, controllerKey: string, traceId: string, vote: ControllerVote): void;
|
|
1008
|
+
/**
|
|
1009
|
+
* Signals the start of a controller attempt lifecycle event.
|
|
1010
|
+
*
|
|
1011
|
+
* @param cell - The FeatureCell key.
|
|
1012
|
+
* @param behaviorKey - The behavior key.
|
|
1013
|
+
* @param ctx - The monitor context for this operation.
|
|
1014
|
+
*/
|
|
1015
|
+
startControllerAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>): void;
|
|
1016
|
+
/**
|
|
1017
|
+
* Signals the end of a controller attempt lifecycle event.
|
|
1018
|
+
*
|
|
1019
|
+
* @param cell - The FeatureCell key.
|
|
1020
|
+
* @param behaviorKey - The behavior key.
|
|
1021
|
+
* @param ctx - The monitor context for this operation.
|
|
1022
|
+
* @param payload - The attempt result payload.
|
|
1023
|
+
*/
|
|
1024
|
+
endControllerAttempt<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, payload: unknown): void;
|
|
963
1025
|
/**
|
|
964
1026
|
* Records that the conductor crashed during execution.
|
|
965
1027
|
*
|
|
@@ -969,6 +1031,19 @@ interface VaultMonitorContract {
|
|
|
969
1031
|
* @param error - The error that caused the crash.
|
|
970
1032
|
*/
|
|
971
1033
|
conductorCrashed<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, error: unknown): void;
|
|
1034
|
+
/**
|
|
1035
|
+
* Emits a pipeline candidate capturing the in-flight state value
|
|
1036
|
+
* after a pipeline stage completes. These events are used exclusively
|
|
1037
|
+
* by the State Diff View in DevTools and are not displayed in the
|
|
1038
|
+
* standard trace detail timeline.
|
|
1039
|
+
*
|
|
1040
|
+
* @param cell - The FeatureCell key.
|
|
1041
|
+
* @param behaviorKey - The behavior key.
|
|
1042
|
+
* @param ctx - The monitor context for this operation.
|
|
1043
|
+
* @param stage - The pipeline stage that just completed.
|
|
1044
|
+
* @param value - The in-flight pipeline value after the stage.
|
|
1045
|
+
*/
|
|
1046
|
+
pipelineCandidate<T>(cell: string, behaviorKey: string, ctx: Readonly<VaultMonitorContext<T>>, stage: PipelineStage, value: T | undefined): void;
|
|
972
1047
|
/**
|
|
973
1048
|
* Records a runtime error encountered during pipeline execution.
|
|
974
1049
|
*
|
|
@@ -1061,7 +1136,6 @@ interface FeatureCellFluentApi<TEntity> {
|
|
|
1061
1136
|
declare const BehaviorTypes: {
|
|
1062
1137
|
readonly CoreAfterTap: "coreAfterTap";
|
|
1063
1138
|
readonly CoreBeforeTap: "coreBeforeTap";
|
|
1064
|
-
readonly ReplayGlobalError: "replayGlobalError";
|
|
1065
1139
|
readonly CoreError: "coreError";
|
|
1066
1140
|
readonly CoreErrorCallback: "coreErrorCallback";
|
|
1067
1141
|
readonly CoreState: "coreState";
|
|
@@ -1167,84 +1241,6 @@ type FilterFunction<T> = (current: T) => T;
|
|
|
1167
1241
|
*/
|
|
1168
1242
|
type ReducerFunction<T> = (current: T) => T;
|
|
1169
1243
|
|
|
1170
|
-
/**
|
|
1171
|
-
* Defines the builder contract used to configure and initialize a FeatureCell.
|
|
1172
|
-
* This interface exposes the fluent configuration surface for registering behaviors, callbacks, and operators prior to activation.
|
|
1173
|
-
*/
|
|
1174
|
-
interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFluentApi<T> {
|
|
1175
|
-
/**
|
|
1176
|
-
* Registers functions executed during the "after tap" stage.
|
|
1177
|
-
*
|
|
1178
|
-
* @param afterTaps - Tap functions invoked after reducers.
|
|
1179
|
-
* @returns The same builder instance for fluent chaining.
|
|
1180
|
-
*/
|
|
1181
|
-
afterTaps(afterTaps: TapCallback<T>[]): CellBuilderContract<T>;
|
|
1182
|
-
/**
|
|
1183
|
-
* Registers functions executed during the "before tap" stage.
|
|
1184
|
-
*
|
|
1185
|
-
* @param beforeTaps - Tap functions invoked before reducers.
|
|
1186
|
-
* @returns The same builder instance for fluent chaining.
|
|
1187
|
-
*/
|
|
1188
|
-
beforeTaps(beforeTaps: TapCallback<T>[]): CellBuilderContract<T>;
|
|
1189
|
-
/**
|
|
1190
|
-
* Map of behavior configuration values keyed by behavior configuration identifiers.
|
|
1191
|
-
*/
|
|
1192
|
-
behaviorConfigs: Map<string, unknown>;
|
|
1193
|
-
/**
|
|
1194
|
-
* Registers emitState functions executed during the emitState stage.
|
|
1195
|
-
*
|
|
1196
|
-
* @param emitStates - EmitState callbacks invoked during state changes.
|
|
1197
|
-
* @returns The builder instance for fluent chaining.
|
|
1198
|
-
*/
|
|
1199
|
-
emitStates(emitStates: CoreEmitStateCallback<T>[]): CellBuilderContract<T>;
|
|
1200
|
-
/**
|
|
1201
|
-
* Registers error functions to run during the error stage.
|
|
1202
|
-
*
|
|
1203
|
-
* @param errors - Error functions that may block or transform values.
|
|
1204
|
-
* @returns The same builder instance for fluent chaining.
|
|
1205
|
-
*/
|
|
1206
|
-
errors(errors: VaultErrorCallback<T>[]): CellBuilderContract<T>;
|
|
1207
|
-
/**
|
|
1208
|
-
* Registers filter functions to run during the filter stage.
|
|
1209
|
-
*
|
|
1210
|
-
* @param filters - Filter functions that may block or transform values.
|
|
1211
|
-
* @returns The same builder instance for fluent chaining.
|
|
1212
|
-
*/
|
|
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
|
-
*/
|
|
1220
|
-
hydrate(incoming: DeferredType<T>): CellBuilderContract<T>;
|
|
1221
|
-
/**
|
|
1222
|
-
* Finalizes the builder configuration and activates the FeatureCell.
|
|
1223
|
-
*/
|
|
1224
|
-
initialize(): void;
|
|
1225
|
-
/**
|
|
1226
|
-
* Registers interceptor behaviors that preprocess incoming state before resolve.
|
|
1227
|
-
*
|
|
1228
|
-
* @param interceptors - Interceptor behavior classes.
|
|
1229
|
-
* @returns The same builder instance for fluent chaining.
|
|
1230
|
-
*/
|
|
1231
|
-
interceptors(interceptors: InterceptorBehaviorClassContract<T>[]): CellBuilderContract<T>;
|
|
1232
|
-
/**
|
|
1233
|
-
* Registers operator behaviors executed prior to filtering.
|
|
1234
|
-
*
|
|
1235
|
-
* @param operators - Operator behavior classes that may transform or block updates.
|
|
1236
|
-
* @returns The same builder instance for fluent chaining.
|
|
1237
|
-
*/
|
|
1238
|
-
operators(operators: OperatorsBehaviorClassContract<T>[]): CellBuilderContract<T>;
|
|
1239
|
-
/**
|
|
1240
|
-
* Registers a sequence of reducer functions to run during the reducer stage.
|
|
1241
|
-
*
|
|
1242
|
-
* @param reducers - Ordered reducer functions applied to the working state.
|
|
1243
|
-
* @returns The same builder instance for fluent chaining.
|
|
1244
|
-
*/
|
|
1245
|
-
reducers(reducers: ReducerFunction<T>[]): CellBuilderContract<T>;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
1244
|
/**
|
|
1249
1245
|
* Defines the public base contract for a FeatureCell instance.
|
|
1250
1246
|
*
|
|
@@ -1258,14 +1254,14 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
|
|
|
1258
1254
|
* @param afterTaps - Functions invoked after the reducer stage.
|
|
1259
1255
|
* @returns The builder instance for fluent chaining.
|
|
1260
1256
|
*/
|
|
1261
|
-
afterTaps(afterTaps: TapCallback<T>[]):
|
|
1257
|
+
afterTaps(afterTaps: TapCallback<T>[]): this;
|
|
1262
1258
|
/**
|
|
1263
1259
|
* Registers tap functions executed during the "before tap" stage.
|
|
1264
1260
|
*
|
|
1265
1261
|
* @param beforeTaps - Functions invoked before the reducer stage.
|
|
1266
1262
|
* @returns The builder instance for fluent chaining.
|
|
1267
1263
|
*/
|
|
1268
|
-
beforeTaps(beforeTaps: TapCallback<T>[]):
|
|
1264
|
+
beforeTaps(beforeTaps: TapCallback<T>[]): this;
|
|
1269
1265
|
/**
|
|
1270
1266
|
* Performs cleanup and teardown of the FeatureCell.
|
|
1271
1267
|
* Called automatically when the cell's hosting provider is destroyed.
|
|
@@ -1281,41 +1277,41 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
|
|
|
1281
1277
|
* @param emitStates - EmitState callbacks invoked during state changes.
|
|
1282
1278
|
* @returns The builder instance for fluent chaining.
|
|
1283
1279
|
*/
|
|
1284
|
-
emitStates(emitStates: CoreEmitStateCallback<T>[]):
|
|
1280
|
+
emitStates(emitStates: CoreEmitStateCallback<T>[]): this;
|
|
1285
1281
|
/**
|
|
1286
1282
|
* Registers error functions to run during the error stage.
|
|
1287
1283
|
*
|
|
1288
1284
|
* @param errors - Error functions applied to the upstream snapshot.
|
|
1289
1285
|
* @returns The builder instance for fluent chaining.
|
|
1290
1286
|
*/
|
|
1291
|
-
errors(errors: VaultErrorCallback<T>[]):
|
|
1287
|
+
errors(errors: VaultErrorCallback<T>[]): this;
|
|
1292
1288
|
/**
|
|
1293
1289
|
* Registers filter functions to run during the filter stage.
|
|
1294
1290
|
*
|
|
1295
1291
|
* @param filters - Filter functions applied to the upstream snapshot.
|
|
1296
1292
|
* @returns The builder instance for fluent chaining.
|
|
1297
1293
|
*/
|
|
1298
|
-
filters(filters: FilterFunction<T>[]):
|
|
1294
|
+
filters(filters: FilterFunction<T>[]): this;
|
|
1299
1295
|
/**
|
|
1300
1296
|
* Registers a deferred hydration source for the FeatureCell.
|
|
1301
1297
|
*
|
|
1302
1298
|
* @param incoming - Deferred value used to hydrate the cell state.
|
|
1303
1299
|
* @returns The builder instance for fluent chaining.
|
|
1304
1300
|
*/
|
|
1305
|
-
hydrate(incoming: DeferredType<T>):
|
|
1301
|
+
hydrate(incoming: DeferredType<T>): this;
|
|
1306
1302
|
/**
|
|
1307
1303
|
* Finalizes builder configuration and activates the FeatureCell.
|
|
1308
1304
|
*
|
|
1309
1305
|
* @returns The builder instance, or a Promise resolving once initialization completes.
|
|
1310
1306
|
*/
|
|
1311
|
-
initialize():
|
|
1307
|
+
initialize(): this | void;
|
|
1312
1308
|
/**
|
|
1313
1309
|
* Registers interceptor behaviors executed prior to resolve.
|
|
1314
1310
|
*
|
|
1315
1311
|
* @param interceptors - Interceptor behavior classes.
|
|
1316
1312
|
* @returns The builder instance for fluent chaining.
|
|
1317
1313
|
*/
|
|
1318
|
-
interceptors(interceptors: InterceptorBehaviorClassContract<T>[]):
|
|
1314
|
+
interceptors(interceptors: InterceptorBehaviorClassContract<T>[]): this;
|
|
1319
1315
|
/**
|
|
1320
1316
|
* Unique identifier assigned to the FeatureCell.
|
|
1321
1317
|
*/
|
|
@@ -1333,14 +1329,14 @@ interface FeatureCellBaseShape<T> extends FeatureCellExtension<T>, FeatureCellFl
|
|
|
1333
1329
|
* @param operators - Operator behavior classes.
|
|
1334
1330
|
* @returns The builder instance for fluent chaining.
|
|
1335
1331
|
*/
|
|
1336
|
-
operators(operators: OperatorsBehaviorClassContract<T>[]):
|
|
1332
|
+
operators(operators: OperatorsBehaviorClassContract<T>[]): this;
|
|
1337
1333
|
/**
|
|
1338
1334
|
* Registers reducer functions executed during the reducer stage.
|
|
1339
1335
|
*
|
|
1340
1336
|
* @param reducers - Reducer functions that transform the working state.
|
|
1341
1337
|
* @returns The builder instance for fluent chaining.
|
|
1342
1338
|
*/
|
|
1343
|
-
reducers(reducers: ReducerFunction<T>[]):
|
|
1339
|
+
reducers(reducers: ReducerFunction<T>[]): this;
|
|
1344
1340
|
/**
|
|
1345
1341
|
* Performs a replace-style state update that fully replaces the current state.
|
|
1346
1342
|
*
|
|
@@ -1614,15 +1610,6 @@ interface ControllerSuccessMessageShape<T> extends ControllerMessageBaseShape {
|
|
|
1614
1610
|
/** Discriminated union of all controller message shapes. */
|
|
1615
1611
|
type ControllerMessageShape<T> = ControllerAttemptMessageShape<T> | ControllerSuccessMessageShape<T> | ControllerFailMessageShape<T> | ControllerFinalizeMessageShape;
|
|
1616
1612
|
|
|
1617
|
-
/** Enumeration of votes a controller may cast during pipeline admission. */
|
|
1618
|
-
declare const ControllerVotes: {
|
|
1619
|
-
readonly Abstain: "abstain";
|
|
1620
|
-
readonly Abort: "abort";
|
|
1621
|
-
readonly Deny: "deny";
|
|
1622
|
-
};
|
|
1623
|
-
/** Union type derived from ControllerVotes values. */
|
|
1624
|
-
type ControllerVote = (typeof ControllerVotes)[keyof typeof ControllerVotes];
|
|
1625
|
-
|
|
1626
1613
|
/** Enumeration of controller category classifications. */
|
|
1627
1614
|
declare const ControllerTypes: {
|
|
1628
1615
|
readonly CoreAbstain: "coreAbstain";
|
|
@@ -2081,8 +2068,29 @@ interface CoreEmitStateBehaviorContract<T> extends BehaviorContract<T> {
|
|
|
2081
2068
|
emitState(snapshot: StateSnapshotShape<T>, callback: CoreEmitStateCallback<T>): CoreEmitStateResult;
|
|
2082
2069
|
}
|
|
2083
2070
|
|
|
2071
|
+
/**
|
|
2072
|
+
* Describes the shape of an in-flight pipeline candidate value captured
|
|
2073
|
+
* after a pipeline stage completes. Used exclusively by the State Diff
|
|
2074
|
+
* View in DevTools to compare state transformations across stages.
|
|
2075
|
+
*/
|
|
2076
|
+
interface EventCandidateShape<T = unknown> {
|
|
2077
|
+
/**
|
|
2078
|
+
* The pipeline stage that produced this candidate.
|
|
2079
|
+
*/
|
|
2080
|
+
stage: PipelineStage;
|
|
2081
|
+
/**
|
|
2082
|
+
* The in-flight pipeline value after the stage completed.
|
|
2083
|
+
*/
|
|
2084
|
+
value: T | undefined;
|
|
2085
|
+
/**
|
|
2086
|
+
* Whether the candidate carries a defined value.
|
|
2087
|
+
*/
|
|
2088
|
+
hasValue: boolean;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2084
2091
|
/** Enumeration of event boundary positions within a lifecycle span. */
|
|
2085
2092
|
declare const EventBoundaryTypes: {
|
|
2093
|
+
readonly Candidate: "candidate";
|
|
2086
2094
|
readonly End: "end";
|
|
2087
2095
|
readonly Notification: "notification";
|
|
2088
2096
|
readonly Start: "start";
|
|
@@ -2096,6 +2104,7 @@ declare const EventTypes: {
|
|
|
2096
2104
|
readonly Conductor: "conductor";
|
|
2097
2105
|
readonly Controller: "controller";
|
|
2098
2106
|
readonly Lifecycle: "lifecycle";
|
|
2107
|
+
readonly Pipeline: "pipeline";
|
|
2099
2108
|
readonly Stage: "stage";
|
|
2100
2109
|
readonly Unknown: "unknown";
|
|
2101
2110
|
};
|
|
@@ -2155,6 +2164,16 @@ interface EventShape<T = any> {
|
|
|
2155
2164
|
* Optional source identifier provided by the event origin.
|
|
2156
2165
|
*/
|
|
2157
2166
|
source?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* Optional in-flight pipeline candidate value captured after a stage completes.
|
|
2169
|
+
* Used exclusively by the State Diff View in DevTools.
|
|
2170
|
+
*/
|
|
2171
|
+
candidate?: T | undefined;
|
|
2172
|
+
/**
|
|
2173
|
+
* High-resolution monotonic timestamp captured via performance.now().
|
|
2174
|
+
* Used for precise trace timing in DevTools and Chrome Trace Export.
|
|
2175
|
+
*/
|
|
2176
|
+
monotonicTimestamp?: number;
|
|
2158
2177
|
}
|
|
2159
2178
|
|
|
2160
2179
|
/**
|
|
@@ -2177,6 +2196,34 @@ interface EventBusContract {
|
|
|
2177
2196
|
pipeline$(): Observable<EventShape>;
|
|
2178
2197
|
}
|
|
2179
2198
|
|
|
2199
|
+
/** Enumeration of Vault license tier classifications. */
|
|
2200
|
+
declare const VaultLicensePayloadTypes: {
|
|
2201
|
+
readonly Development: "development";
|
|
2202
|
+
readonly Pro: "pro";
|
|
2203
|
+
readonly Enterprise: "enterprise";
|
|
2204
|
+
};
|
|
2205
|
+
/** Union type of all Vault license payload values. */
|
|
2206
|
+
type VaultLicensePayloadType = (typeof VaultLicensePayloadTypes)[keyof typeof VaultLicensePayloadTypes];
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* Shape describing a verified Vault license payload surfaced on the
|
|
2210
|
+
* global `SDuX` namespace for devtools and runtime consumption.
|
|
2211
|
+
*/
|
|
2212
|
+
interface VaultLicensePayloadShape {
|
|
2213
|
+
/** Organization name the license was issued to. */
|
|
2214
|
+
organization: string;
|
|
2215
|
+
/** Domain the license is scoped to. */
|
|
2216
|
+
domain: string;
|
|
2217
|
+
/** License tier classification. */
|
|
2218
|
+
licenseType: VaultLicensePayloadType;
|
|
2219
|
+
/** Unix-epoch millisecond timestamp when the license was issued. */
|
|
2220
|
+
issuedAt: number;
|
|
2221
|
+
/** Unix-epoch millisecond timestamp when the license expires, or `'forever'` for perpetual licenses. */
|
|
2222
|
+
expires: number | 'forever';
|
|
2223
|
+
/** Whether the license signature was successfully verified. */
|
|
2224
|
+
verified: boolean;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2180
2227
|
/** Enumeration of license validation statuses for FeatureCell registration. */
|
|
2181
2228
|
declare const VaultRegistrationLicenseStatusTypes: {
|
|
2182
2229
|
readonly NotRequired: "not-required";
|
|
@@ -2214,6 +2261,10 @@ interface VaultRegistrationFluentApiShape {
|
|
|
2214
2261
|
beforeTaps: number;
|
|
2215
2262
|
/** Number of registered after-tap callbacks. */
|
|
2216
2263
|
afterTaps: number;
|
|
2264
|
+
/** Number of registered interceptor classes. */
|
|
2265
|
+
interceptors: number;
|
|
2266
|
+
/** Number of registered operator classes. */
|
|
2267
|
+
operators: number;
|
|
2217
2268
|
/** Number of registered emit-state callbacks. */
|
|
2218
2269
|
emitStateCallbacks: number;
|
|
2219
2270
|
/** Number of registered error callbacks. */
|
|
@@ -2250,14 +2301,30 @@ interface SDuXShape {
|
|
|
2250
2301
|
* Global Vault event bus instance.
|
|
2251
2302
|
*/
|
|
2252
2303
|
vaultEventBus?: EventBusContract;
|
|
2304
|
+
/**
|
|
2305
|
+
* Registered package versions keyed by npm package name.
|
|
2306
|
+
*/
|
|
2307
|
+
versions?: Record<string, string>;
|
|
2308
|
+
/**
|
|
2309
|
+
* Returns a read-only snapshot of the FeatureCell registry.
|
|
2310
|
+
*/
|
|
2311
|
+
getRegistry?: () => ReadonlyMap<string, VaultRegistrationShape>;
|
|
2312
|
+
/**
|
|
2313
|
+
* Verified license payload, populated after successful token verification.
|
|
2314
|
+
*/
|
|
2315
|
+
license?: VaultLicensePayloadShape;
|
|
2253
2316
|
/**
|
|
2254
2317
|
* Optional debug widget configuration for devtools integration.
|
|
2255
2318
|
*/
|
|
2256
2319
|
debugWidget?: {
|
|
2257
|
-
versions?: Record<string, string>;
|
|
2258
2320
|
injected?: boolean;
|
|
2259
2321
|
aiAssistEnabled?: boolean;
|
|
2260
|
-
|
|
2322
|
+
};
|
|
2323
|
+
/**
|
|
2324
|
+
* DevTools replay API for accessing live FeatureCell instances.
|
|
2325
|
+
*/
|
|
2326
|
+
replay?: {
|
|
2327
|
+
getCell: (key: string) => unknown;
|
|
2261
2328
|
};
|
|
2262
2329
|
}
|
|
2263
2330
|
|
|
@@ -2573,6 +2640,84 @@ interface BeforeTapBehaviorContract<T> extends BehaviorContract<T> {
|
|
|
2573
2640
|
applyBeforeTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void;
|
|
2574
2641
|
}
|
|
2575
2642
|
|
|
2643
|
+
/**
|
|
2644
|
+
* Defines the builder contract used to configure and initialize a FeatureCell.
|
|
2645
|
+
* This interface exposes the fluent configuration surface for registering behaviors, callbacks, and operators prior to activation.
|
|
2646
|
+
*/
|
|
2647
|
+
interface CellBuilderContract<T> extends FeatureCellExtension<T>, FeatureCellFluentApi<T> {
|
|
2648
|
+
/**
|
|
2649
|
+
* Registers functions executed during the "after tap" stage.
|
|
2650
|
+
*
|
|
2651
|
+
* @param afterTaps - Tap functions invoked after reducers.
|
|
2652
|
+
* @returns The same builder instance for fluent chaining.
|
|
2653
|
+
*/
|
|
2654
|
+
afterTaps(afterTaps: TapCallback<T>[]): CellBuilderContract<T>;
|
|
2655
|
+
/**
|
|
2656
|
+
* Registers functions executed during the "before tap" stage.
|
|
2657
|
+
*
|
|
2658
|
+
* @param beforeTaps - Tap functions invoked before reducers.
|
|
2659
|
+
* @returns The same builder instance for fluent chaining.
|
|
2660
|
+
*/
|
|
2661
|
+
beforeTaps(beforeTaps: TapCallback<T>[]): CellBuilderContract<T>;
|
|
2662
|
+
/**
|
|
2663
|
+
* Map of behavior configuration values keyed by behavior configuration identifiers.
|
|
2664
|
+
*/
|
|
2665
|
+
behaviorConfigs: Map<string, unknown>;
|
|
2666
|
+
/**
|
|
2667
|
+
* Registers emitState functions executed during the emitState stage.
|
|
2668
|
+
*
|
|
2669
|
+
* @param emitStates - EmitState callbacks invoked during state changes.
|
|
2670
|
+
* @returns The builder instance for fluent chaining.
|
|
2671
|
+
*/
|
|
2672
|
+
emitStates(emitStates: CoreEmitStateCallback<T>[]): CellBuilderContract<T>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Registers error functions to run during the error stage.
|
|
2675
|
+
*
|
|
2676
|
+
* @param errors - Error functions that may block or transform values.
|
|
2677
|
+
* @returns The same builder instance for fluent chaining.
|
|
2678
|
+
*/
|
|
2679
|
+
errors(errors: VaultErrorCallback<T>[]): CellBuilderContract<T>;
|
|
2680
|
+
/**
|
|
2681
|
+
* Registers filter functions to run during the filter stage.
|
|
2682
|
+
*
|
|
2683
|
+
* @param filters - Filter functions that may block or transform values.
|
|
2684
|
+
* @returns The same builder instance for fluent chaining.
|
|
2685
|
+
*/
|
|
2686
|
+
filters(filters: FilterFunction<T>[]): CellBuilderContract<T>;
|
|
2687
|
+
/**
|
|
2688
|
+
* Registers a deferred hydration source for the FeatureCell.
|
|
2689
|
+
*
|
|
2690
|
+
* @param incoming - Deferred value used to hydrate the cell state.
|
|
2691
|
+
* @returns The builder instance for fluent chaining.
|
|
2692
|
+
*/
|
|
2693
|
+
hydrate(incoming: DeferredType<T>): CellBuilderContract<T>;
|
|
2694
|
+
/**
|
|
2695
|
+
* Finalizes the builder configuration and activates the FeatureCell.
|
|
2696
|
+
*/
|
|
2697
|
+
initialize(): void;
|
|
2698
|
+
/**
|
|
2699
|
+
* Registers interceptor behaviors that preprocess incoming state before resolve.
|
|
2700
|
+
*
|
|
2701
|
+
* @param interceptors - Interceptor behavior classes.
|
|
2702
|
+
* @returns The same builder instance for fluent chaining.
|
|
2703
|
+
*/
|
|
2704
|
+
interceptors(interceptors: InterceptorBehaviorClassContract<T>[]): CellBuilderContract<T>;
|
|
2705
|
+
/**
|
|
2706
|
+
* Registers operator behaviors executed prior to filtering.
|
|
2707
|
+
*
|
|
2708
|
+
* @param operators - Operator behavior classes that may transform or block updates.
|
|
2709
|
+
* @returns The same builder instance for fluent chaining.
|
|
2710
|
+
*/
|
|
2711
|
+
operators(operators: OperatorsBehaviorClassContract<T>[]): CellBuilderContract<T>;
|
|
2712
|
+
/**
|
|
2713
|
+
* Registers a sequence of reducer functions to run during the reducer stage.
|
|
2714
|
+
*
|
|
2715
|
+
* @param reducers - Ordered reducer functions applied to the working state.
|
|
2716
|
+
* @returns The same builder instance for fluent chaining.
|
|
2717
|
+
*/
|
|
2718
|
+
reducers(reducers: ReducerFunction<T>[]): CellBuilderContract<T>;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2576
2721
|
/** Static-side contract for controller classes used by the controller factory. */
|
|
2577
2722
|
interface ControllerClassContract<T = any> {
|
|
2578
2723
|
/**
|
|
@@ -2885,12 +3030,12 @@ declare function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T>;
|
|
|
2885
3030
|
declare function safeStringify(value: unknown): string;
|
|
2886
3031
|
|
|
2887
3032
|
/**
|
|
2888
|
-
* Registers a package version on the global SDuX
|
|
3033
|
+
* Registers a package version on the global SDuX namespace.
|
|
2889
3034
|
*
|
|
2890
3035
|
* @param packageName - The npm package name to register.
|
|
2891
3036
|
* @param version - The semver version string.
|
|
2892
3037
|
*/
|
|
2893
3038
|
declare const registerVersion: (packageName: string, version: string) => void;
|
|
2894
3039
|
|
|
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 };
|
|
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 };
|
|
3040
|
+
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, PipelineStages, ResolveTypes, StateEmitTypes, VAULT_CLEAR_STATE, VAULT_CONTINUE, VAULT_NOOP, VAULT_STOP, VaultBehavior, VaultController, VaultEncryptionIntegrityError, VaultError, VaultErrorKindTypes, VaultErrorNameTypes, VaultErrorService, VaultErrorUsageKindTypes, VaultLicenseError, VaultLicensePayloadTypes, VaultPrivateErrorService, VaultRegistrationLicenseStatusTypes, 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 };
|
|
3041
|
+
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, EventCandidateShape, EventShape, EventType, FeatureCellBaseShape, FeatureCellExtension, FeatureCellExtensionContext, FeatureCellFluentApi, FilterBehaviorContract, FilterFunction, FinalState, HttpResourceRefShape, InsightConfig, InterceptorBehaviorClassContract, InterceptorBehaviorContract, InterceptorStateType, LicensableClassContext, LogLevelType, MergeBehaviorContract, MergeConfig, ObjectDeepMergeConfig, OperationType, OperatorBehaviorContract, OperatorsBehaviorClassContract, PersistBehaviorContract, PipelinePersistValue, PipelineStage, PipelineUpstreamValue, PipelineValue, ReduceBehaviorContract, ReducerFunction, ResolveBehaviorContract, ResolveType, SDuXShape, StateEmitSnapshotShape, StateEmitType, StateInputShape, StateInputType, StateSnapshotShape, StepwiseBehaviorContract, TabSyncBehaviorClassContext, TapCallback, VaultConfig, VaultErrorCallback, VaultErrorKindType, VaultErrorNameType, VaultErrorServiceContract, VaultErrorShape, VaultErrorUsageKindType, VaultLicensePayloadShape, VaultLicensePayloadType, VaultLicensingShape, VaultMonitorContract, VaultPrivateErrorServiceContract, VaultRegistrationEntityShape, VaultRegistrationFluentApiShape, VaultRegistrationLicenseStatusType, VaultRegistrationShape };
|