@sdux-vault/shared 0.9.1 → 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.
|
@@ -1,47 +1,17 @@
|
|
|
1
1
|
import { BehaviorSubject, Subscription, tap } from 'rxjs';
|
|
2
2
|
|
|
3
|
-
/** Singleton accessor that detects whether code is running in a test environment. */
|
|
4
|
-
const isTestEnv = {
|
|
5
|
-
get active() {
|
|
6
|
-
return (
|
|
7
|
-
// eslint-disable-next-line
|
|
8
|
-
typeof globalThis.jasmine !== 'undefined' ||
|
|
9
|
-
// istanbul ignore next
|
|
10
|
-
// eslint-disable-next-line
|
|
11
|
-
typeof globalThis.jest !== 'undefined' ||
|
|
12
|
-
// istanbul ignore next
|
|
13
|
-
// eslint-disable-next-line
|
|
14
|
-
typeof globalThis.vitest !== 'undefined');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/** Tracks whether Vault development mode has been enabled. */
|
|
19
|
-
let devMode = null;
|
|
20
|
-
/** Singleton accessor for Vault development mode state. */
|
|
21
|
-
const DevMode = {
|
|
22
|
-
get active() {
|
|
23
|
-
return devMode === true;
|
|
24
|
-
},
|
|
25
|
-
setDevMode(isDevMode) {
|
|
26
|
-
if (devMode !== null && !isTestEnv.active) {
|
|
27
|
-
throw new Error('[vault] DevMode has already been initialized.');
|
|
28
|
-
}
|
|
29
|
-
devMode = isDevMode;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
3
|
/**
|
|
34
|
-
* Registers a package version on the global SDuX
|
|
4
|
+
* Registers a package version on the global SDuX namespace.
|
|
35
5
|
*
|
|
36
6
|
* @param packageName - The npm package name to register.
|
|
37
7
|
* @param version - The semver version string.
|
|
38
8
|
*/
|
|
39
9
|
const registerVersion = (packageName, version) => {
|
|
40
|
-
|
|
10
|
+
// istanbul ignore next line - globalThis is always defined in supported runtimes
|
|
11
|
+
if (typeof globalThis === 'undefined')
|
|
41
12
|
return;
|
|
42
13
|
const sdux = (globalThis.sdux ??= {});
|
|
43
|
-
const
|
|
44
|
-
const versions = (debug.versions ??= {});
|
|
14
|
+
const versions = (sdux.versions ??= {});
|
|
45
15
|
if (versions[packageName] === version)
|
|
46
16
|
return;
|
|
47
17
|
versions[packageName] = version;
|
|
@@ -50,7 +20,7 @@ const registerVersion = (packageName, version) => {
|
|
|
50
20
|
/** Package name used for version registration. */
|
|
51
21
|
const SDUX_PACKAGE = '@sdux-vault/shared';
|
|
52
22
|
/** Current package version string. */
|
|
53
|
-
const SDUX_VERSION = '0.9.
|
|
23
|
+
const SDUX_VERSION = '0.9.3';
|
|
54
24
|
registerVersion(SDUX_PACKAGE, SDUX_VERSION);
|
|
55
25
|
|
|
56
26
|
/**
|
|
@@ -66,7 +36,6 @@ registerVersion(SDUX_PACKAGE, SDUX_VERSION);
|
|
|
66
36
|
const BehaviorTypes = {
|
|
67
37
|
CoreAfterTap: 'coreAfterTap',
|
|
68
38
|
CoreBeforeTap: 'coreBeforeTap',
|
|
69
|
-
ReplayGlobalError: 'replayGlobalError',
|
|
70
39
|
CoreError: 'coreError',
|
|
71
40
|
CoreErrorCallback: 'coreErrorCallback',
|
|
72
41
|
CoreState: 'coreState',
|
|
@@ -864,6 +833,7 @@ const DecisionOutcomeTypes = {
|
|
|
864
833
|
|
|
865
834
|
/** Enumeration of event boundary positions within a lifecycle span. */
|
|
866
835
|
const EventBoundaryTypes = {
|
|
836
|
+
Candidate: 'candidate',
|
|
867
837
|
End: 'end',
|
|
868
838
|
Notification: 'notification',
|
|
869
839
|
Start: 'start',
|
|
@@ -875,6 +845,7 @@ const EventTypes = {
|
|
|
875
845
|
Conductor: 'conductor',
|
|
876
846
|
Controller: 'controller',
|
|
877
847
|
Lifecycle: 'lifecycle',
|
|
848
|
+
Pipeline: 'pipeline',
|
|
878
849
|
Stage: 'stage',
|
|
879
850
|
Unknown: 'unknown'
|
|
880
851
|
};
|
|
@@ -886,6 +857,17 @@ const OperationTypes = {
|
|
|
886
857
|
Initialize: 'initialize'
|
|
887
858
|
};
|
|
888
859
|
|
|
860
|
+
/** Enumeration of pipeline stages that produce state-transforming snapshots for DevTools diffing. */
|
|
861
|
+
const PipelineStages = {
|
|
862
|
+
PipelineStart: 'pipeline-start',
|
|
863
|
+
Resolve: 'resolve',
|
|
864
|
+
ComputeMerge: 'compute-merge',
|
|
865
|
+
Operator: 'operator',
|
|
866
|
+
Filter: 'filter',
|
|
867
|
+
Reducer: 'reducer',
|
|
868
|
+
CoreState: 'core-state'
|
|
869
|
+
};
|
|
870
|
+
|
|
889
871
|
/**
|
|
890
872
|
* Enumerates the available resolve strategy identifiers used by resolve
|
|
891
873
|
* behaviors. These identifiers indicate how a FeatureCell obtains its initial
|
|
@@ -915,6 +897,22 @@ const StateEmitTypes = {
|
|
|
915
897
|
TabSync: 'Tab Sync'
|
|
916
898
|
};
|
|
917
899
|
|
|
900
|
+
/** Enumeration of Vault license tier classifications. */
|
|
901
|
+
const VaultLicensePayloadTypes = {
|
|
902
|
+
Development: 'development',
|
|
903
|
+
Pro: 'pro',
|
|
904
|
+
Enterprise: 'enterprise'
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
/** Enumeration of license validation statuses for FeatureCell registration. */
|
|
908
|
+
const VaultRegistrationLicenseStatusTypes = {
|
|
909
|
+
NotRequired: 'not-required',
|
|
910
|
+
Pending: 'pending',
|
|
911
|
+
Revoked: 'revoked',
|
|
912
|
+
Timeout: 'timeout',
|
|
913
|
+
Valid: 'valid'
|
|
914
|
+
};
|
|
915
|
+
|
|
918
916
|
/* -----------------------------------------------------------
|
|
919
917
|
* TYPES (USER-FACING)
|
|
920
918
|
* --------------------------------------------------------- */
|
|
@@ -1006,6 +1004,36 @@ function isDeferredFactory(value) {
|
|
|
1006
1004
|
typeof value.value === 'function');
|
|
1007
1005
|
}
|
|
1008
1006
|
|
|
1007
|
+
/** Singleton accessor that detects whether code is running in a test environment. */
|
|
1008
|
+
const isTestEnv = {
|
|
1009
|
+
get active() {
|
|
1010
|
+
return (
|
|
1011
|
+
// eslint-disable-next-line
|
|
1012
|
+
typeof globalThis.jasmine !== 'undefined' ||
|
|
1013
|
+
// istanbul ignore next
|
|
1014
|
+
// eslint-disable-next-line
|
|
1015
|
+
typeof globalThis.jest !== 'undefined' ||
|
|
1016
|
+
// istanbul ignore next
|
|
1017
|
+
// eslint-disable-next-line
|
|
1018
|
+
typeof globalThis.vitest !== 'undefined');
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
/** Tracks whether Vault development mode has been enabled. */
|
|
1023
|
+
let devMode = null;
|
|
1024
|
+
/** Singleton accessor for Vault development mode state. */
|
|
1025
|
+
const DevMode = {
|
|
1026
|
+
get active() {
|
|
1027
|
+
return devMode === true;
|
|
1028
|
+
},
|
|
1029
|
+
setDevMode(isDevMode) {
|
|
1030
|
+
if (devMode !== null && !isTestEnv.active) {
|
|
1031
|
+
throw new Error('[vault] DevMode has already been initialized.');
|
|
1032
|
+
}
|
|
1033
|
+
devMode = isDevMode;
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1009
1037
|
/**
|
|
1010
1038
|
* Normalizes any thrown error into a canonical `VaultError` structure.
|
|
1011
1039
|
*
|
|
@@ -1323,5 +1351,5 @@ function isHttpResourceRef(obj) {
|
|
|
1323
1351
|
* Generated bundle index. Do not edit.
|
|
1324
1352
|
*/
|
|
1325
1353
|
|
|
1326
|
-
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 };
|
|
1354
|
+
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 };
|
|
1327
1355
|
//# sourceMappingURL=sdux-vault-shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/lib/utils/dev-mode/testing-environment.util.ts","../../../libs/shared/src/lib/utils/dev-mode/dev-mode.util.ts","../../../libs/shared/src/lib/utils/version/version.register.ts","../../../libs/shared/src/lib/version/version.register.ts","../../../libs/shared/src/lib/types/behavior/behavior.type.ts","../../../libs/shared/src/lib/types/logging/console.type.ts","../../../libs/shared/src/lib/types/logging/log-level.type.ts","../../../libs/shared/src/lib/utils/logger/logger.util.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-callback.abstract.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-transform.abstract.ts","../../../libs/shared/src/lib/utils/safe-stringify/safe-stringify.util.ts","../../../libs/shared/src/lib/services/error/vault-private-error.service.ts","../../../libs/shared/src/lib/services/error/vault-error.service.ts","../../../libs/shared/src/lib/abstracts/controllers/active-controller.abstract.ts","../../../libs/shared/src/lib/abstracts/index.ts","../../../libs/shared/src/lib/constants/behavior-meta.constant.ts","../../../libs/shared/src/lib/constants/controller-meta.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-aggregate-key.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-logging-key.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-clear-state.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-continue.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-noop.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-stop.constant.ts","../../../libs/shared/src/lib/constants/index.ts","../../../libs/shared/src/lib/decorators/vault-behavior.decorator.ts","../../../libs/shared/src/lib/decorators/vault-controller.decorator.ts","../../../libs/shared/src/lib/decorators/index.ts","../../../libs/shared/src/lib/types/error/vault-error-kind.type.ts","../../../libs/shared/src/lib/types/error/vault-error-name.type.ts","../../../libs/shared/src/lib/errors/vault-error.ts","../../../libs/shared/src/lib/errors/vault-error.encryption-integrity.ts","../../../libs/shared/src/lib/types/error/vault-error-usage-kind.type.ts","../../../libs/shared/src/lib/errors/vault-error.license.ts","../../../libs/shared/src/lib/errors/vault-error.usage.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise-factory-required.ts","../../../libs/shared/src/lib/errors/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/types/controller/controller-message.type.ts","../../../libs/shared/src/lib/types/controller/controller-vote.type.ts","../../../libs/shared/src/lib/types/controller/controller.type.ts","../../../libs/shared/src/lib/types/controller/decision-outcome.type.ts","../../../libs/shared/src/lib/types/event/event-boundary.type.ts","../../../libs/shared/src/lib/types/event/event.type.ts","../../../libs/shared/src/lib/types/operation.type.ts","../../../libs/shared/src/lib/types/resolve.type.ts","../../../libs/shared/src/lib/types/state/state-emit.type.ts","../../../libs/shared/src/lib/types/index.ts","../../../libs/shared/src/lib/utils/behavior/define-behavior-key.util.ts","../../../libs/shared/src/lib/utils/controller/define-controller-key.util.ts","../../../libs/shared/src/lib/utils/deferred-factory/is-deferred-factory.util.ts","../../../libs/shared/src/lib/utils/error/create-vault-error.util.ts","../../../libs/shared/src/lib/utils/isolate-value/isolate-value.util.ts","../../../libs/shared/src/lib/utils/logic/logic.utils.ts","../../../libs/shared/src/lib/utils/promise/is-promise.util.ts","../../../libs/shared/src/lib/utils/resolve/is-http-resource.util.ts","../../../libs/shared/src/lib/utils/index.ts","../../../libs/shared/src/public-api.ts","../../../libs/shared/src/sdux-vault-shared.ts"],"sourcesContent":["/** Singleton accessor that detects whether code is running in a test environment. */\nexport const isTestEnv = {\n get active(): boolean {\n return (\n // eslint-disable-next-line\n typeof (globalThis as any).jasmine !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).jest !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).vitest !== 'undefined'\n );\n }\n};\n","import { isTestEnv } from './testing-environment.util';\n\n/** Tracks whether Vault development mode has been enabled. */\nlet devMode: boolean | null = null;\n\n/** Singleton accessor for Vault development mode state. */\nexport const DevMode = {\n get active(): boolean {\n return devMode === true;\n },\n\n setDevMode(isDevMode: boolean): void {\n if (devMode !== null && !isTestEnv.active) {\n throw new Error('[vault] DevMode has already been initialized.');\n }\n\n devMode = isDevMode;\n }\n};\n","import { SDuXShape } from '../../shapes/sdux/sdux.shape';\nimport { DevMode } from '../dev-mode/dev-mode.util';\n\n/**\n * Registers a package version on the global SDuX debug widget when dev mode is active.\n *\n * @param packageName - The npm package name to register.\n * @param version - The semver version string.\n */\nexport const registerVersion = (packageName: string, version: string): void => {\n if (!DevMode.active || typeof globalThis === 'undefined') return;\n\n const sdux = (globalThis.sdux ??= {} as SDuXShape);\n const debug = (sdux.debugWidget ??= {});\n const versions = (debug.versions ??= {});\n\n if (versions[packageName] === version) return;\n\n versions[packageName] = version;\n};\n","import { registerVersion } from '../utils/version/version.register';\n\n/** Package name used for version registration. */\nconst SDUX_PACKAGE = '@sdux-vault/shared';\n\n/** Current package version string. */\nconst SDUX_VERSION = '0.9.1';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","/**\n * Runtime-safe registry of all behavior types.\n *\n * This object acts as an enum substitute without introducing JavaScript enum\n * overhead.\n * Values are string literals preserved at runtime and suitable for\n * switch statements, comparisons, and pipeline classification.\n * Each key maps 1:1 to its string literal value.\n * The structure is fully tree-shakable and safely inferable by TypeScript.\n */\nexport const BehaviorTypes = {\n CoreAfterTap: 'coreAfterTap',\n CoreBeforeTap: 'coreBeforeTap',\n ReplayGlobalError: 'replayGlobalError',\n CoreError: 'coreError',\n CoreErrorCallback: 'coreErrorCallback',\n CoreState: 'coreState',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\n CoreLicense: 'coreLicense',\n ErrorTransform: 'errorTransform',\n Extension: 'extension',\n Filter: 'filter',\n FromObservable: 'fromObservable',\n FromPromise: 'fromPromise',\n FromStream: 'fromStream',\n Interceptor: 'interceptor',\n Merge: 'merge',\n Operator: 'operator',\n Persist: 'persist',\n Reduce: 'reduce',\n Resolve: 'resolve',\n StepwiseFilter: 'stepwiseFilter',\n StepwiseReducer: 'stepwiseReducer',\n StepwiseResolve: 'stepwiseResolve',\n TabSyncState: 'tabSyncState'\n} as const;\n\n/**\n * Union of all valid behavior type strings.\n *\n * This type is derived from `BehaviorTypes` using literal inference, ensuring\n * strong typing while preserving full runtime compatibility.\n * This type should not be manually extended—add new values to `BehaviorTypes`\n * instead.\n *\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of console output severity levels. */\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from ConsoleTypes values. */\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of Vault log verbosity levels. */\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from LogLevelTypes values. */\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","import { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport {\n LogLevelType,\n LogLevelTypes\n} from '../../types/logging/log-level.type';\n\n/** Current log level threshold controlling which messages are emitted. */\nlet _logLevel: LogLevelType = LogLevelTypes.Off;\n\n/**\n * Prefix applied to all vault-related console output. Used to keep log\n * messages consistently identifiable across all log levels.\n */\nconst LOG_PREFIX = '[vault]';\n\n/**\n * Routes a log message to the console if the current log level permits it.\n *\n * @param level - The console severity level for this message.\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nfunction push(level: ConsoleType, ...args: any[]): void {\n const logLevel = getVaultLogLevel();\n\n if (logLevel === LogLevelTypes.Off) return;\n\n const levels: ConsoleType[] = [\n ConsoleTypes.Error,\n ConsoleTypes.Warn,\n ConsoleTypes.Log,\n ConsoleTypes.Debug\n ];\n\n const allowed = levels.indexOf(level) <= levels.indexOf(logLevel!);\n\n if (!allowed) return;\n\n // eslint-disable-next-line\n console[level](LOG_PREFIX, ...args);\n}\n\n/**\n * Emits an `error`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultError = (...args: any[]) => push('error', ...args);\n\n/**\n * Emits a `warn`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultWarn = (...args: any[]) => push('warn', ...args);\n\n/**\n * Emits a `log`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultLog = (...args: any[]) => push('log', ...args);\n\n/**\n * Emits a `debug`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultDebug = (...args: any[]) => push('debug', ...args);\n\n/**\n * Sets the global Vault log level threshold.\n *\n * @param level - The log level to apply.\n */\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\n\n/**\n * Returns the current global Vault log level.\n *\n * @returns The active log level threshold.\n */\nexport function getVaultLogLevel(): LogLevelType {\n return _logLevel;\n}\n","import { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorCallbackBehaviorContract } from '../../../interfaces/behaviors/error-callback-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { VaultErrorCallback } from '../../../types/callback/vault-error-callback.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base class for error callback behaviors that execute consumer-supplied\n * error handlers during the error stage of the Vault pipeline.\n */\nexport abstract class AbstractErrorCallbackBehavior<T>\n implements ErrorCallbackBehaviorContract<T>\n{\n /** Indicates that this error behavior is critical and always executed. */\n readonly critical!: boolean;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Behavior type for orchestrator registration. */\n readonly type = BehaviorTypes.CoreErrorCallback;\n\n /**\n * Creates a new abstract error behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the behavior factory.\n * @param behaviorCtx - Behavior class context providing injector access and extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes the consumer-supplied error callback against the current error and state.\n *\n * @param current - The error shape describing the pipeline failure.\n * @param state - The state snapshot at the time of the error.\n * @param oldschoolCallback - Consumer-supplied error callback to invoke.\n * @returns A promise that resolves when the callback completes.\n */\n abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Teardown hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the error behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { VAULT_NOOP } from '../../../constants/vault/vault-noop.constant';\nimport { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorTransformBehaviorContract } from '../../../interfaces/behaviors/error-transform-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base behavior for transforming errors during pipeline execution.\n * This class defines the contract and lifecycle hooks required for error transformation behaviors.\n *\n */\nexport abstract class AbstractErrorTransformBehavior<T>\n implements ErrorTransformBehaviorContract<T>\n{\n /**\n * Indicates that this error transform behavior is critical and always executed.\n */\n readonly critical!: boolean;\n\n /**\n * Unique identifier for this behavior instance.\n */\n readonly key: string;\n\n /**\n * Behavior type identifier used for orchestrator registration.\n */\n readonly type = BehaviorTypes.ErrorTransform;\n\n /**\n * Creates a new abstract error transform behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context providing configuration and hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Transforms an error produced during pipeline execution.\n *\n * @param error Incoming error value to be transformed.\n * @param current Current normalized Vault error value.\n * @param previousStateSnapshot Snapshot of state prior to the error.\n * @returns Transformed error, original error, or VAULT_NOOP to suppress emission.\n */\n abstract transformError(\n error: unknown,\n current: VaultErrorShape,\n previousStateSnapshot: StateSnapshotShape<T>\n ): Promise<unknown | typeof VAULT_NOOP>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Lifecycle hook invoked when the behavior instance is reset.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/**\n * Safely converts an arbitrary value into a JSON string representation.\n *\n * This function wraps `JSON.stringify` with enhanced handling for non-serializable\n * values, including:\n * - functions\n * - `Error` objects\n * - `Map` and `Set` instances\n * - circular references\n *\n * If serialization fails for any reason, a fallback string `\"[unserializable]\"`\n * is returned. The replacer ensures stable and predictable stringification for\n * use in logging and debugging utilities.\n *\n * @param value - The value to stringify safely.\n * @returns A JSON-formatted string or a fallback indicator.\n */\nexport function safeStringify(value: unknown): string {\n try {\n return JSON.stringify(value, jsonSafeReplacer, 2);\n } catch {\n return '[unserializable]';\n }\n}\n\n/**\n * Replacer function used by `safeStringify` to handle values that are normally\n * not serializable via `JSON.stringify`.\n *\n * It converts functions, errors, `Map`, and `Set` values into safe structures\n * and detects circular references. If a value cannot be serialized, a fallback\n * marker string is returned.\n *\n * @param _key - The property key being processed (unused).\n * @param val - The value associated with the key.\n * @returns A serializable representation of the value.\n */\n\nfunction jsonSafeReplacer(_key: string, val: unknown) {\n if (typeof val === 'function') return '[Function]';\n if (val instanceof Error) return { message: val.message, stack: val.stack };\n if (val instanceof Map) return { map: Array.from(val.entries()) };\n if (val instanceof Set) return { set: Array.from(val.values()) };\n\n // Avoid circular references\n try {\n JSON.stringify(val);\n return val;\n } catch {\n return '[Circular]';\n }\n}\n","import { BehaviorSubject, Observable } from 'rxjs';\nimport { VaultPrivateErrorServiceContract } from '../../interfaces/vault/vault-private-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/** ------------------------------------------\n * INTERNAL CLASS (NOT EXPORTED)\n * ------------------------------------------ */\n/**\n * Internal singleton error service that holds the current Vault error state.\n * Not exported directly; consumed exclusively by the public VaultErrorService.\n */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n /** Subject backing the private error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Initializes the private error service singleton. */\n constructor() {\n vaultDebug(\n '[VaultPrivateErrorService] initialized (singleton instance created)'\n );\n }\n\n /**\n * Publishes a new error or clears the current error.\n *\n * @param error - The error shape to publish, or null to clear.\n */\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n /**\n * Returns an observable of the current error state.\n *\n * @returns Observable emitting the current error or null.\n */\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\n /** Resets the error state to null. */\n clear(): void {\n vaultDebug('[VaultPrivateErrorService] clear() → error reset to null');\n this.#error$.next(null);\n }\n}\n\n/** ------------------------------------------\n * SINGLETON FACTORY (EXPORTED)\n * ------------------------------------------ */\nlet _instance: VaultPrivateErrorServiceContract | null = null;\n\n/**\n * Returns the singleton VaultPrivateErrorService instance, creating it on first call.\n *\n * @returns The shared private error service instance.\n */\nexport function VaultPrivateErrorService(): VaultPrivateErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultPrivateErrorService] creating new singleton instance');\n _instance = new VaultPrivateErrorClass();\n } else {\n vaultDebug(\n '[VaultPrivateErrorService] returning existing singleton instance'\n );\n }\n return _instance;\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { VaultErrorServiceContract } from '../../interfaces/vault/vault-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { VaultPrivateErrorService } from './vault-private-error.service';\n\n/**\n * Singleton service that aggregates and exposes the current Vault error state.\n * Subscribes to the private error service and mirrors updates through a public\n * observable stream for consumer consumption.\n */\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n /** Internal delegate responsible for low-level error state management. */\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n /** Subject backing the public error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Tracks whether an active error is currently held. */\n #hasErrorState = false;\n\n /** Aggregate subscription used for cleanup on teardown. */\n readonly #subscription = new Subscription();\n\n /** Public observable stream of the current error state. */\n readonly error$ = this.#error$.asObservable();\n\n /** Initializes the service and subscribes to the private error stream. */\n constructor() {\n vaultDebug(\n '[VaultErrorService] Initializing service and subscribing to private error stream.'\n );\n\n // Mirror the private error service into this one\n const sub = this.#privateVaultErrorService\n .getError()\n .subscribe((err: VaultErrorShape | null) => {\n vaultDebug(\n `[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`\n );\n this.#hasErrorState = !!err;\n this.#error$.next(err);\n });\n\n this.#subscription.add(sub);\n }\n\n /** Whether an active error is currently present. */\n get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n /** Clears the current error state via the private error service. */\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n/** Cached singleton instance of the VaultErrorService. */\nlet _instance: VaultErrorServiceClass | null = null;\n\n/**\n * Returns the singleton VaultErrorService instance, creating it on first call.\n *\n * @returns The shared VaultErrorService instance.\n */\nexport function VaultErrorService(): VaultErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultErrorService] Creating new singleton instance.');\n _instance = new VaultErrorServiceClass();\n }\n return _instance;\n}\n","import { Observable, Subscription, tap } from 'rxjs';\nimport { ControllerClassContext } from '../../contexts/controller-class.context';\nimport { ControllerContract } from '../../interfaces/controllers/controller.interface';\nimport { VaultErrorService } from '../../services/error/vault-error.service';\nimport { ControllerMessageShape } from '../../shapes/controller/controller-message.shape';\nimport { ControllerVote } from '../../types/controller/controller-vote.type';\nimport { ControllerType } from '../../types/controller/controller.type';\nimport { vaultDebug, vaultWarn } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/**\n * Abstract base class for active controllers that react to external error\n * state changes and participate in pipeline admission voting.\n */\nexport abstract class AbstractActiveController<T>\n implements ControllerContract<T>\n{\n /** Unique identifier for this controller instance. */\n readonly key: string;\n\n /** Controller type classification determined by the subclass. */\n abstract readonly type: ControllerType;\n\n /** Whether errors from this controller halt the pipeline. */\n readonly critical = false;\n\n /** Tracks whether the global error service currently holds an error. */\n protected hasError = false;\n\n /** Trace identifier from the most recent pipeline operation. */\n protected traceId: string | null = null;\n\n /** Subscription to the global VaultErrorService stream. */\n #subscription: Subscription;\n\n /**\n * Creates an active controller and subscribes to the global error stream.\n *\n * @param key - Unique controller identifier supplied by the factory.\n * @param ctx - Class-level context providing revote and lifecycle access.\n */\n constructor(\n key: string,\n protected readonly ctx: ControllerClassContext\n ) {\n this.key = key;\n\n this.#subscription = VaultErrorService()\n .error$.pipe(\n tap((error) => {\n vaultDebug(\n `${this.key} VaultErrorService dispatched event. Raw event: ${safeStringify(error)}.`\n );\n const newValue = error != null;\n vaultDebug(`${this.key} New transformed error value: \"${newValue}\".`);\n\n const revoteDecision =\n newValue !== this.hasError && this.traceId !== undefined;\n vaultDebug(\n `${this.key} Revote Decision: ${revoteDecision}. Factors. NewValue: ${newValue} HasError: ${this.hasError} TraceId: ${this.traceId} Rubric: 'newValue !== this.hasError && this.traceId !== undefined'`\n );\n\n this.hasError = newValue;\n vaultDebug(\n `${this.key} this.hasError replace with newValue: \"${this.hasError}\".`\n );\n vaultDebug(\n `${this.key} onExternalTrigger dispatchd with: \"${newValue}\".`\n );\n this.onExternalTrigger(newValue);\n\n if (revoteDecision) {\n vaultDebug(\n `${this.key} Revote Requesed with traceId: \"${this.traceId}\".`\n );\n this.ctx.requestRevote(this.traceId!);\n }\n })\n )\n .subscribe();\n }\n\n /**\n * Hook invoked when the external error state changes.\n *\n * @param _newErrorState - The updated error state flag.\n */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /**\n * Processes an incoming controller message and returns a vote.\n *\n * @param msg - The controller message to evaluate.\n * @returns An observable emitting the controller vote or void.\n */\n abstract handleMessage(\n msg: ControllerMessageShape<T>\n ): Observable<ControllerVote | void>;\n\n /** Tears down the controller and unsubscribes from the error stream. */\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n /** Resets the controller to its initial state. */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/* -----------------------------------------------------------\n * Abstracts\n * --------------------------------------------------------- */\nexport { AbstractErrorCallbackBehavior } from './behaviors/error/with-error-callback.abstract';\nexport { AbstractErrorTransformBehavior } from './behaviors/error/with-error-transform.abstract';\nexport { AbstractActiveController } from './controllers/active-controller.abstract';\n","/** Symbol key used to attach behavior metadata to a behavior class. */\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","/** Symbol key used to attach controller metadata to a controller class. */\nexport const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","/**\n * String token used to uniquely identify the DevTools Aggregate FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_AGGREGATE_KEY_CONSTANT =\n 'vault::devtools::aggregate:feature::cell';\n","/**\n * String token used to uniquely identify the DevTools Logging FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_LOGGING_KEY_CONSTANT =\n 'vault::devtools::logging::feature::cell';\n","/** Sentinel symbol that signals the pipeline to clear the current state. */\nexport const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","/** Sentinel symbol that signals the pipeline to continue processing. */\nexport const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","/** Sentinel symbol that signals the pipeline to skip the current operation. */\nexport const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","/** Sentinel symbol that signals the pipeline to halt execution. */\nexport const VAULT_STOP = Symbol.for('VAULT_STOP');\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { BEHAVIOR_META } from './behavior-meta.constant';\nexport { CONTROLLER_META } from './controller-meta.constant';\nexport { DEVTOOLS_AGGREGATE_KEY_CONSTANT } from './dev-tools/devtools-aggregate-key.constant';\nexport { DEVTOOLS_LOGGING_KEY_CONSTANT } from './dev-tools/devtools-logging-key.constant';\nexport { VAULT_CLEAR_STATE } from './vault/vault-clear-state.constant';\nexport { VAULT_CONTINUE } from './vault/vault-continue.constant';\nexport { VAULT_NOOP } from './vault/vault-noop.constant';\nexport { VAULT_STOP } from './vault/vault-stop.constant';\n","// vault-behavior.decorator.ts\nimport { BEHAVIOR_META } from '../constants/behavior-meta.constant';\nimport { BehaviorMetaShape } from '../shapes/behavior-meta.shape';\n\n/**\n * Decorator that registers a class as an Vault behavior.\n *\n * The `VaultBehavior` decorator attaches the provided `BehaviorMeta`\n * definition to the target constructor, making the behavior discoverable by\n * the orchestrator during pipeline initialization. Metadata fields such as\n * `type`, `key`, and `critical` are also mirrored onto static properties of\n * the decorated class to support lightweight runtime introspection.\n *\n * This decorator does not modify method logic or structure; it only assigns\n * metadata required for orchestrator classification and behavior lifecycle\n * management.\n *\n * @param meta - Metadata describing the behavior’s category, unique key, and\n * criticality within the pipeline.\n * @returns A class decorator that applies behavior metadata to the target.\n */\nexport function VaultBehavior(meta: BehaviorMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[BEHAVIOR_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n\n if (meta.resolveType !== undefined) {\n target.resolveType = meta.resolveType;\n }\n\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","// vault-behavior.decorator.ts\nimport { CONTROLLER_META } from '../constants/controller-meta.constant';\nimport { ControllerMetaShape } from '../shapes/controller/controller-meta.shape';\n\n/**\n * Class decorator that attaches controller metadata to the target class.\n *\n * @param meta - The controller metadata shape to apply.\n * @returns A class decorator function.\n */\nexport function VaultController(meta: ControllerMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[CONTROLLER_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { VaultBehavior } from './vault-behavior.decorator';\nexport { VaultController } from './vault-controller.decorator';\n","import { VaultErrorUsageKindTypes } from './vault-error-usage-kind.type';\n\n/** Enumeration of top-level Vault error kind classifications. */\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type of all Vault error kind values including usage sub-kinds. */\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","/** Enumeration of Vault error name identifiers. */\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type derived from VaultErrorNameTypes values. */\nexport type VaultErrorNameType =\n (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","import {\n VaultErrorKindType,\n VaultErrorKindTypes\n} from '../types/error/vault-error-kind.type';\nimport {\n VaultErrorNameType,\n VaultErrorNameTypes\n} from '../types/error/vault-error-name.type';\n\n/**\n * Base error class for all Vault-specific errors. Extends the native Error\n * with a typed name and kind for structured error classification.\n */\nexport class VaultError extends Error {\n /** Classification kind used to categorize this error in diagnostics. */\n readonly kind: VaultErrorKindType;\n\n /**\n * Creates a new VaultError instance with prototype chain correction.\n *\n * @param message - Human-readable description of the error.\n * @param name - Typed error name used for identification.\n * @param kind - Error kind used for diagnostic classification.\n */\n constructor(\n message: string,\n name: VaultErrorNameType = VaultErrorNameTypes.VaultError,\n kind: VaultErrorKindType = VaultErrorKindTypes.VaultError\n ) {\n super(message);\n\n this.name = name;\n this.kind = kind;\n\n // Required for proper instanceof checks in TS / ES5 targets\n Object.setPrototypeOf(this, new.target.prototype);\n\n // Optional but nice: clean stack trace\n // eslint-disable-next-line\n const anyError = Error as any;\n if (typeof anyError.captureStackTrace === 'function') {\n anyError.captureStackTrace(this, new.target);\n }\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when an encrypted payload fails AES-GCM integrity verification\n * during decryption, indicating tampered, corrupted, or mismatched key data.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\n /** Creates the error with a descriptive integrity-failure message. */\n constructor() {\n const message = `Encrypted snapshot failed integrity verification.\n\nThe encrypted payload could not be authenticated during AES-GCM decryption.\n\nPossible causes:\n\n• The stored ciphertext has been tampered with\n• The stored initialization vector (IV) was modified\n• The encryption key does not match the original key\n• The stored payload is corrupted\n\nVault refuses to restore state from unauthenticated encrypted data.`;\n\n super(message, VaultErrorNameTypes.EncryptionIntegrity);\n }\n}\n","/** Enumeration of usage-specific Vault error sub-kind classifications. */\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\n/** Union type derived from VaultErrorUsageKindTypes values. */\nexport type VaultErrorUsageKindType =\n (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when a behavior or controller fails license validation.\n */\nexport class VaultLicenseError extends VaultError {\n /**\n * Creates a license validation error.\n *\n * @param message - Description of the license violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.License\n ) {\n super(message, VaultErrorNameTypes.License, kind);\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Base error for Vault API usage violations detected at runtime.\n */\nexport class VaultUsageError extends VaultError {\n /**\n * Creates a usage error with the specified message and kind.\n *\n * @param message - Description of the usage violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage\n ) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when an eager Promise is passed directly to the state pipeline\n * instead of a deferred factory function.\n */\nexport class VaultUsagePromiseError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid incoming value: Promise detected.\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nUse the following instead a DeferredFactory value\n\nThis guarantees the promise is created and executed inside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.Promise);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when a Promise-based state method receives a raw value instead\n * of a factory function that returns a Promise.\n */\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid usage of Promise-based state API.\n\nYou called a Promise-specific method (replaceState / mergeState),\nbut did not provide a function that creates a Promise.\n\nExpected:\n• () => Promise<T>\n\nReceived:\n• A non-function value\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nAlways wrap promises in a function so they are created and executed\ninside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.PromiseFactoryRequired);\n }\n}\n","/* -----------------------------------------------------------\n * ERRORS\n * --------------------------------------------------------- */\nexport { VaultError } from './vault-error';\nexport { VaultEncryptionIntegrityError } from './vault-error.encryption-integrity';\nexport { VaultLicenseError } from './vault-error.license';\nexport { VaultUsageError } from './vault-error.usage';\nexport { VaultUsagePromiseError } from './vault-error.usage.promise';\nexport { VaultUsagePromiseFactoryRequiredError } from './vault-error.usage.promise-factory-required';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","/** Enumeration of message types dispatched to controllers during pipeline orchestration. */\nexport const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\n/** Union type derived from ControllerMessageTypes values. */\nexport type ControllerMessageType =\n (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","/** Enumeration of votes a controller may cast during pipeline admission. */\nexport const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from ControllerVotes values. */\nexport type ControllerVote =\n (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","/** Enumeration of controller category classifications. */\nexport const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise',\n TabSync: 'tabSync'\n} as const;\n\n/** Union type derived from ControllerTypes values. */\nexport type ControllerType =\n (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","/** Enumeration of conductor decision outcomes after controller voting. */\nexport const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from DecisionOutcomeTypes values. */\nexport type DecisionOutcomeType =\n (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","/** Enumeration of event boundary positions within a lifecycle span. */\nexport const EventBoundaryTypes = {\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventBoundaryTypes values. */\nexport type EventBoundaryType =\n (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","/** Enumeration of monitor event category classifications. */\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventTypes values. */\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","/** Enumeration of pipeline operation modes. */\nexport const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\n/** Union type derived from OperationTypes values. */\nexport type OperationType =\n (typeof OperationTypes)[keyof typeof OperationTypes];\n","/**\n * Enumerates the available resolve strategy identifiers used by resolve\n * behaviors. These identifiers indicate how a FeatureCell obtains its initial\n * and subsequent state values during the resolve stage of the pipeline.\n *\n * - `Value` — Resolve from a synchronous, in-memory value.\n * - `HttpResource` — Resolve using an HTTP-driven resource behavior.\n * - `Observable` — Resolve from an observable stream source.\n * - `Promise` — Resolve from a promise source.\n */\nexport const ResolveTypes = {\n HttpResource: 'http-resource',\n Observable: 'observable',\n Promise: 'promise',\n Value: 'value'\n} as const;\n\n/**\n * Union type representing all supported resolve strategy identifiers.\n */\nexport type ResolveType = (typeof ResolveTypes)[keyof typeof ResolveTypes];\n","/** Enumeration of state emission event classifications. */\nexport const StateEmitTypes = {\n IncomingPipeline: 'Incoming Pipeline',\n FinalizePipeline: 'Finalize Pipeline',\n PipelineError: 'Pipeline Error',\n PipelineDestroy: 'Pipeline Destroy',\n PipelineReset: 'Pipeline Reset',\n AbortController: 'Abort Controller',\n DenyController: 'Deny Controller',\n TabSync: 'Tab Sync'\n} as const;\n\n/** Union type derived from StateEmitTypes values. */\nexport type StateEmitType =\n (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","/* -----------------------------------------------------------\n * TYPES (USER-FACING)\n * --------------------------------------------------------- */\nexport { BehaviorTypes } from './behavior/behavior.type';\nexport type { BehaviorType } from './behavior/behavior.type';\nexport type { DistinctComparison } from './behavior/distinct-comparison.type';\nexport type { CoreEmitStateCallback } from './callback/core-emit-state-callback.type';\nexport type { TapCallback } from './callback/tap-callback.type';\nexport type { VaultErrorCallback } from './callback/vault-error-callback.type';\nexport { ControllerMessageTypes } from './controller/controller-message.type';\nexport type { ControllerMessageType } from './controller/controller-message.type';\nexport { ControllerVotes } from './controller/controller-vote.type';\nexport type { ControllerVote } from './controller/controller-vote.type';\nexport { ControllerTypes } from './controller/controller.type';\nexport type { ControllerType } from './controller/controller.type';\nexport { DecisionOutcomeTypes } from './controller/decision-outcome.type';\nexport type { DecisionOutcomeType } from './controller/decision-outcome.type';\nexport { VaultErrorKindTypes } from './error/vault-error-kind.type';\nexport type { VaultErrorKindType } from './error/vault-error-kind.type';\nexport { VaultErrorNameTypes } from './error/vault-error-name.type';\nexport type { VaultErrorNameType } from './error/vault-error-name.type';\nexport { VaultErrorUsageKindTypes } from './error/vault-error-usage-kind.type';\nexport type { VaultErrorUsageKindType } from './error/vault-error-usage-kind.type';\nexport { EventBoundaryTypes } from './event/event-boundary.type';\nexport type { EventBoundaryType } from './event/event-boundary.type';\nexport { EventTypes } from './event/event.type';\nexport type { EventType } from './event/event.type';\nexport type { FilterFunction } from './function/filter-function.type';\nexport type { ReducerFunction } from './function/reducer-function.type';\nexport type { InterceptorStateType } from './interceptor-state.type';\nexport { LogLevelTypes } from './logging/log-level.type';\nexport type { LogLevelType } from './logging/log-level.type';\nexport { OperationTypes } from './operation.type';\nexport type { OperationType } from './operation.type';\nexport type { PipelinePersistValue } from './pipeline/pipeline-persist-value.type';\nexport type { PipelineUpstreamValue } from './pipeline/pipeline-upstream-value.type';\nexport type { PipelineValue } from './pipeline/pipeline-value.type';\nexport { ResolveTypes } from './resolve.type';\nexport type { ResolveType } from './resolve.type';\nexport type { CoreEmitStateResult } from './state/core-emit-state-result.type';\nexport type { DeferredFactory } from './state/deferred-factory.type';\nexport type { DeferredType } from './state/deferred.type';\nexport type { FinalState } from './state/final-state.type';\nexport { StateEmitTypes } from './state/state-emit.type';\nexport type { StateEmitType } from './state/state-emit.type';\nexport type { StateInputType } from './state/state-input.type';\n","/**\n * Creates a normalized behavior key identifier used for behavior registration.\n *\n * A behavior key uniquely identifies a behavior within the Vault pipeline,\n * following the canonical format:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Both `domain` and `name` are normalized by:\n * - capitalizing the first character\n * - removing all non-alphanumeric characters\n *\n * This ensures consistent and predictable behavior keys for orchestration,\n * diagnostics, and tooling.\n *\n * @param domain - The logical domain or category of the behavior.\n * @param name - The specific behavior name within the domain.\n * @returns A normalized behavior key string.\n */\nexport function defineBehaviorKey(domain: string, name: string): string {\n return defineVaultKey('Behavior', domain, name);\n}\n\n/**\n * Constructs a normalized Vault key for behavior or controller registration.\n *\n * @param kind - Whether the key is for a Behavior or Controller.\n * @param domain - The logical domain or category.\n * @param name - The specific name within the domain.\n * @returns A normalized Vault key string.\n */\nexport function defineVaultKey(\n kind: 'Behavior' | 'Controller',\n domain: string,\n name: string\n): string {\n const normalize = (s: string) =>\n s.charAt(0).toUpperCase() + s.slice(1).replace(/[^A-Za-z0-9]/g, '');\n\n return `SDUX::${kind}::${normalize(domain)}::${normalize(name)}`;\n}\n\n/**\n * Validates whether a string conforms to the Vault behavior key format.\n *\n * A valid behavior key must follow the structure:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Where `<Domain>` and `<Name>` begin with an uppercase character and contain\n * only alphanumeric characters.\n *\n * @param key - The behavior key string to validate.\n * @returns `true` if the key matches the required pattern; otherwise `false`.\n */\nexport function validateBehaviorKey(key: string): boolean {\n if (typeof key !== 'string') return false;\n\n const pattern =\n /^SDUX::(Behavior|Controller)::[A-Z][A-Za-z0-9]*::[A-Z][A-Za-z0-9]*$/;\n return pattern.test(key);\n}\n","import {\n defineVaultKey,\n validateBehaviorKey\n} from '../behavior/define-behavior-key.util';\n\n/**\n * Creates a normalized controller key following the Vault key format.\n *\n * @param domain - The logical domain or category of the controller.\n * @param name - The specific controller name within the domain.\n * @returns A normalized controller key string.\n */\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\n/**\n * Validates whether a string conforms to the Vault controller key format.\n *\n * @param key - The controller key string to validate.\n * @returns `true` if the key matches the required pattern.\n */\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","import { DeferredFactory } from '../../types/state/deferred-factory.type';\n\n/**\n * Determines whether a value conforms to the DeferredFactory contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is an object with a callable `value` property.\n */\nexport function isDeferredFactory<T = unknown>(\n value: unknown\n): value is DeferredFactory<T> {\n return (\n !!value &&\n typeof value === 'object' &&\n // eslint-disable-next-line\n typeof (value as any).value === 'function'\n );\n}\n","import { VaultErrorShape } from '../../shapes/vault-error.shape';\n\n/**\n * Normalizes any thrown error into a canonical `VaultError` structure.\n *\n * This ensures that all errors—HTTP, runtime, string, or unknown—\n * are represented consistently throughout the Vault error pipeline.\n *\n * @param err - The raw thrown value.\n * @param featureCellKey - the origination of the error\n * @returns A fully normalized `VaultError`.\n */\nexport function createVaultError(\n err: unknown,\n featureCellKey: string\n): VaultErrorShape {\n const timestamp = Date.now();\n\n // -----------------------------------------\n // Standard JS Error\n // -----------------------------------------\n if (err instanceof Error) {\n return {\n message: err.message || 'Unexpected error',\n details: err.stack,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // String error\n // -----------------------------------------\n if (typeof err === 'string') {\n return {\n message: err,\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // Fallback: unknown error\n // -----------------------------------------\n return {\n message: 'Unexpected error',\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n}\n","/*\n| Category | Type / Example | structuredClone behavior | deepFreeze fallback behavior | Isolated? | Notes |\n| ------------------------ | --------------------- | ------------------------- | ------------------------------------- | ---------- | ---------------------------------------------- |\n| **Primitives** | number | Returned as-is | Returned as-is | ✅ Yes | Immutable by definition |\n| | string | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | boolean | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | bigint | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | symbol | Returned as-is | Returned as-is | ✅ Yes | Identity preserved |\n| | undefined | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| | null | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| **Plain Objects** | `{ a: 1 }` | Deep cloned | Deep cloned + frozen | ✅ Yes | Always returns new reference |\n| **Arrays** | `[1,2,3]` | Deep cloned | Deep cloned + frozen | ✅ Yes | Structural mutation blocked |\n| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Cannot be cloned or frozen meaningfully |\n| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Identity preserved intentionally |\n| **Dates** | `new Date()` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Time value preserved |\n| **RegExp** | `/abc/g` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Pattern preserved |\n| **Error** | `new Error()` | Cloned (core fields only) | Frozen original OR cloned+frozen | ⚠️ Partial | Custom props not guaranteed |\n| **Map** | `new Map()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.set()` still works; internal slots preserved |\n| **Set** | `new Set()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.add()` still works |\n| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be cloned or frozen safely |\n| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |\n| **TypedArray** | `Uint8Array` | Cloned | Frozen | ✅ Yes | Buffer copied or locked |\n| **ArrayBuffer** | `ArrayBuffer` | Cloned | Frozen | ✅ Yes | Memory isolated |\n| **DataView** | `DataView` | Cloned | Frozen | ✅ Yes | Backing buffer safe |\n| **Observable (RxJS)** | `new Observable()` | ❌ Throws | Same reference, frozen wrapper | ⚠️ Partial | Internal emissions mutable |\n| **Class Instance** | `new Foo()` | Prototype stripped | Frozen instance | ⚠️ Partial | Methods lost on clone |\n| **Object.create(null)** | null-proto object | Cloned | Deep cloned + frozen | ✅ Yes | Prototype normalized |\n| **Cyclic Objects** | `{ self }` | Cloned with cycles | Deep cloned + frozen (cycle-safe) | ✅ Yes | WeakSet prevents recursion |\n| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |\n| **Non-enumerable props** | defineProperty | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Visibility differs |\n| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Symbols skipped by clone |\n| **DOM Nodes** | `HTMLElement` | ❌ Throws | Same reference, frozen wrapper | ❌ No | Host object semantics |\n| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target (if accessible) | ⚠️ Partial | Depends on handler |\n| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |\n| **JSON-like data** | POJO graphs | Deep cloned | Deep cloned + frozen | ✅ Yes | Ideal use case |\n| **Modules** | ES module namespace | ❌ Throws | Returned as-is | ❌ No | Immutable by spec |\n| **Intl objects** | `Intl.DateTimeFormat` | Cloned | Frozen | ⚠️ Partial | Internal slots opaque |\n| **Shared References** | `{a:x, b:x}` | Preserved in clone | Preserved in clone | ✅ Yes | Graph identity maintained |\n| **Sparse Arrays** | `[ , , 3 ]` | Preserved | Preserved | ✅ Yes | Holes maintained |\n| **Symbol Values** | `{ x: Symbol() }` | Preserved | Preserved | ✅ Yes | Value identity intact |\n| **Mixed Graphs** | fn + object | ❌ Partial | Clone + preserve refs | ⚠️ Partial | Hybrid isolation |\n| **Frozen Objects** | `Object.freeze(obj)` | Cloned (unfrozen) | Preserved frozen OR cloned+frozen | ✅ Yes | Freeze state not guaranteed |\n| **Boxed Primitives** | `new Number(1)` | Cloned | Frozen | ✅ Yes | Unboxed behavior retained |\n*/\n\n/**\n * Recursively freezes an object and all nested properties to prevent mutation.\n *\n * @param obj - The object to deep-freeze.\n * @param seen - WeakSet used to track visited references and prevent cycles.\n * @returns The frozen object.\n */\nfunction deepFreeze<T>(obj: T, seen = new WeakSet<object>()): T {\n if (obj === null || typeof obj !== 'object') return obj;\n\n const o = obj as unknown as object;\n if (seen.has(o)) return obj;\n seen.add(o);\n\n if (!Object.isFrozen(o)) Object.freeze(o);\n\n for (const key of Reflect.ownKeys(o)) {\n const desc = Object.getOwnPropertyDescriptor(o, key);\n /* istanbul ignore next -- impossible after Object.freeze due to Proxy invariants */\n if (!desc) continue;\n\n // Only recurse into data properties; do NOT invoke getters\n if ('value' in desc) {\n // eslint-disable-next-line\n deepFreeze((desc as PropertyDescriptor).value as any, seen);\n }\n }\n\n return obj;\n}\n\n/**\n * Creates an immutable copy of a value using structuredClone with a deepFreeze fallback.\n *\n * @param value - The value to isolate.\n * @returns An immutable copy of the value.\n */\nexport const isolateValue = <T>(value: T): T => {\n if (value === null || typeof value !== 'object') return value;\n\n if (Object.isFrozen(value)) return value;\n\n try {\n if (\n value instanceof Map ||\n value instanceof Set ||\n value instanceof WeakMap ||\n value instanceof WeakSet\n ) {\n try {\n return structuredClone(value);\n } catch {\n return deepFreeze(value); // ← IMPORTANT: same reference\n }\n }\n return structuredClone(value);\n } catch {\n const clone = Array.isArray(value)\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [...(value as any)]\n : Object.assign(Object.create(Object.getPrototypeOf(value)), value);\n\n return deepFreeze(clone);\n }\n};\n","import { VAULT_CLEAR_STATE } from '../../constants/vault/vault-clear-state.constant';\nimport { VAULT_CONTINUE } from '../../constants/vault/vault-continue.constant';\nimport { VAULT_NOOP } from '../../constants/vault/vault-noop.constant';\nimport { StateInputShape } from '../../shapes/state/state-input.shape';\nimport { FinalState } from '../../types/state/final-state.type';\n\n/**\n * Indicates whether a final pipeline value represents a NOOP condition.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_NOOP` sentinel.\n */\nexport const isVaultNoop = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_NOOP;\n};\n\n/**\n * Indicates whether a final pipeline value represents the clear-state sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CLEAR_STATE` sentinel.\n */\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\n\n/**\n * Indicates whether a final pipeline value represents the continue sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CONTINUE` sentinel.\n */\nexport const isVaultContinue = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CONTINUE;\n};\n\n/**\n * Checks whether a value is exactly `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `null`.\n */\nexport const isNull = (current: unknown): current is null => current === null;\n\n/**\n * Checks whether a value is exactly `undefined`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `undefined`.\n */\nexport const isUndefined = (current: unknown): current is undefined =>\n current === undefined;\n\n/**\n * Determines whether a value is defined (not `undefined`).\n * Note: This intentionally does *not* exclude `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is not `undefined`.\n */\nexport const isDefined = (current: unknown): boolean => !isUndefined(current);\n\n/**\n * Determines whether a value is nullish — meaning either `null` or `undefined`.\n *\n * @param current - The value to inspect.\n * @returns `true` for `null` or `undefined`, otherwise `false`.\n */\nexport const isNullish = (current: unknown): current is null | undefined =>\n current == null;\n\n/**\n * Determines whether a value is a function.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a function.\n */\nexport const isFunction = (\n value: unknown\n): // eslint-disable-next-line\nvalue is (...args: any[]) => unknown => typeof value === 'function';\n\n/**\n * Determines whether a value is a non-null object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an object and not null.\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\n/**\n * Determines whether a value is a plain object with no custom prototype.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a plain object.\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (value === null || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Determines whether a value conforms to the StateInputShape contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is a plain object with recognized state keys or is empty.\n */\nexport const isStateInputShape = <T>(\n value: unknown\n): value is StateInputShape<T> => {\n if (!isPlainObject(value)) return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey =\n Object.prototype.hasOwnProperty.call(v, 'loading') ||\n Object.prototype.hasOwnProperty.call(v, 'value') ||\n Object.prototype.hasOwnProperty.call(v, 'error');\n\n const isEmptyObject = Object.keys(v).length === 0;\n\n return hasKnownKey || isEmptyObject;\n};\n","/**\n * Determines whether a value is a thenable Promise-like object.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value has a callable `then` property.\n */\nexport function isPromise<T = unknown>(value: unknown): value is Promise<T> {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n // eslint-disable-next-line\n typeof (value as any).then === 'function'\n );\n}\n","import { HttpResourceRefShape } from '../../shapes/http-resource-ref-shape.shape';\n\n/**\n * Type guard that determines whether a value is an `HttpResourceRef<T>`.\n *\n * An `HttpResourceRef` is a structured object produced by Angular’s\n * `HttpClient` resource APIs. It contains a standardized shape used by\n * Vault to detect and normalize resource-backed state transitions.\n *\n * This utility checks only for the presence of the canonical\n * `HttpResourceRef` fields (`value`, `isLoading`, `error`, `hasValue`)\n * and does not validate the internal content of those properties.\n *\n * @typeParam T - The resource value type.\n *\n * @param obj - The value to test.\n * @returns `true` if the value matches the structural shape of an\n * `HttpResourceRef<T>`, otherwise `false`.\n */\n// eslint-disable-next-line\nexport function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T> {\n return !!(\n obj &&\n typeof obj === 'object' &&\n 'value' in obj &&\n 'isLoading' in obj &&\n 'error' in obj &&\n 'hasValue' in obj\n );\n}\n","/* -----------------------------------------------------------\n * UTILITY FUNCTIONS (SAFE TO WILDCARD)\n * --------------------------------------------------------- */\nexport {\n defineBehaviorKey,\n validateBehaviorKey\n} from './behavior/define-behavior-key.util';\nexport {\n defineControllerKey,\n validateControllerKey\n} from './controller/define-controller-key.util';\nexport { isDeferredFactory } from './deferred-factory/is-deferred-factory.util';\nexport { DevMode } from './dev-mode/dev-mode.util';\nexport { isTestEnv } from './dev-mode/testing-environment.util';\nexport { createVaultError } from './error/create-vault-error.util';\nexport { isolateValue } from './isolate-value/isolate-value.util';\nexport {\n getVaultLogLevel,\n setVaultLogLevel,\n vaultDebug,\n vaultError,\n vaultLog,\n vaultWarn\n} from './logger/logger.util';\nexport {\n isDefined,\n isFunction,\n isNull,\n isNullish,\n isObject,\n isStateInputShape,\n isUndefined,\n isVaultClearState,\n isVaultContinue,\n isVaultNoop\n} from './logic/logic.utils';\nexport { isPromise } from './promise/is-promise.util';\nexport { isHttpResourceRef } from './resolve/is-http-resource.util';\nexport { safeStringify } from './safe-stringify/safe-stringify.util';\nexport { registerVersion } from './version/version.register';\n","/*\n * Public API Surface of @sdux-vault/shared\n *\n * IMPORTANT:\n * - JSDoc is preserved only when using named exports.\n * - Avoid `export *` for public-facing interfaces, behaviors, and types.\n * - Internal utilities may still use `export *`.\n */\n\n/* -----------------------------------------------------------\n * INTENTIONAL SIDE EFFECTS\n * --------------------------------------------------------- */\n\n/**\n * This is to handle fluent api requirements for behaviors and controllers\n */\nimport './typings/global';\n\n/**\n * This is for version support in dev mode and tracking in the devtools\n */\nimport './lib/version/version.register';\n\n/* -----------------------------------------------------------\n * DOMAIN EXPORTS\n * --------------------------------------------------------- */\nexport * from './lib/abstracts';\nexport * from './lib/config';\nexport * from './lib/constants';\nexport * from './lib/contexts';\nexport * from './lib/decorators';\nexport * from './lib/errors';\nexport * from './lib/interfaces';\nexport * from './lib/services';\nexport * from './lib/shapes';\nexport * from './lib/types';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_instance"],"mappings":";;AAAA;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,IAAI,MAAM,GAAA;QACR;;AAEE,QAAA,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW;;;AAGlD,YAAA,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW;;;AAG/C,YAAA,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW;IAErD;;;ACXF;AACA,IAAI,OAAO,GAAmB,IAAI;AAElC;AACO,MAAM,OAAO,GAAG;AACrB,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,OAAO,KAAK,IAAI;IACzB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;;;;;;;;;;AAgBG;AACH;AACM,SAAU,iBAAiB,CAAI,GAAQ,EAAA;IAC3C,OAAO,CAAC,EACN,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,OAAO,IAAI,GAAG;AACd,QAAA,WAAW,IAAI,GAAG;AAClB,QAAA,OAAO,IAAI,GAAG;QACd,UAAU,IAAI,GAAG,CAClB;AACH;;AC7BA;;AAE+D;;ACF/D;;;;;;;AAOG;AAEH;;AAE+D;AAE/D;;AAEG;;ACfH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/lib/utils/version/version.register.ts","../../../libs/shared/src/lib/version/version.register.ts","../../../libs/shared/src/lib/types/behavior/behavior.type.ts","../../../libs/shared/src/lib/types/logging/console.type.ts","../../../libs/shared/src/lib/types/logging/log-level.type.ts","../../../libs/shared/src/lib/utils/logger/logger.util.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-callback.abstract.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-transform.abstract.ts","../../../libs/shared/src/lib/utils/safe-stringify/safe-stringify.util.ts","../../../libs/shared/src/lib/services/error/vault-private-error.service.ts","../../../libs/shared/src/lib/services/error/vault-error.service.ts","../../../libs/shared/src/lib/abstracts/controllers/active-controller.abstract.ts","../../../libs/shared/src/lib/abstracts/index.ts","../../../libs/shared/src/lib/constants/behavior-meta.constant.ts","../../../libs/shared/src/lib/constants/controller-meta.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-aggregate-key.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-logging-key.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-clear-state.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-continue.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-noop.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-stop.constant.ts","../../../libs/shared/src/lib/constants/index.ts","../../../libs/shared/src/lib/decorators/vault-behavior.decorator.ts","../../../libs/shared/src/lib/decorators/vault-controller.decorator.ts","../../../libs/shared/src/lib/decorators/index.ts","../../../libs/shared/src/lib/types/error/vault-error-kind.type.ts","../../../libs/shared/src/lib/types/error/vault-error-name.type.ts","../../../libs/shared/src/lib/errors/vault-error.ts","../../../libs/shared/src/lib/errors/vault-error.encryption-integrity.ts","../../../libs/shared/src/lib/types/error/vault-error-usage-kind.type.ts","../../../libs/shared/src/lib/errors/vault-error.license.ts","../../../libs/shared/src/lib/errors/vault-error.usage.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise-factory-required.ts","../../../libs/shared/src/lib/errors/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/types/controller/controller-message.type.ts","../../../libs/shared/src/lib/types/controller/controller-vote.type.ts","../../../libs/shared/src/lib/types/controller/controller.type.ts","../../../libs/shared/src/lib/types/controller/decision-outcome.type.ts","../../../libs/shared/src/lib/types/event/event-boundary.type.ts","../../../libs/shared/src/lib/types/event/event.type.ts","../../../libs/shared/src/lib/types/operation.type.ts","../../../libs/shared/src/lib/types/pipeline/pipeline-stage.type.ts","../../../libs/shared/src/lib/types/resolve.type.ts","../../../libs/shared/src/lib/types/state/state-emit.type.ts","../../../libs/shared/src/lib/types/vault/vault-license-payload.type.ts","../../../libs/shared/src/lib/types/vault/vault-registration-license-status.type.ts","../../../libs/shared/src/lib/types/index.ts","../../../libs/shared/src/lib/utils/behavior/define-behavior-key.util.ts","../../../libs/shared/src/lib/utils/controller/define-controller-key.util.ts","../../../libs/shared/src/lib/utils/deferred-factory/is-deferred-factory.util.ts","../../../libs/shared/src/lib/utils/dev-mode/testing-environment.util.ts","../../../libs/shared/src/lib/utils/dev-mode/dev-mode.util.ts","../../../libs/shared/src/lib/utils/error/create-vault-error.util.ts","../../../libs/shared/src/lib/utils/isolate-value/isolate-value.util.ts","../../../libs/shared/src/lib/utils/logic/logic.utils.ts","../../../libs/shared/src/lib/utils/promise/is-promise.util.ts","../../../libs/shared/src/lib/utils/resolve/is-http-resource.util.ts","../../../libs/shared/src/lib/utils/index.ts","../../../libs/shared/src/public-api.ts","../../../libs/shared/src/sdux-vault-shared.ts"],"sourcesContent":["import { SDuXShape } from '../../shapes/sdux/sdux.shape';\n\n/**\n * Registers a package version on the global SDuX namespace.\n *\n * @param packageName - The npm package name to register.\n * @param version - The semver version string.\n */\nexport const registerVersion = (packageName: string, version: string): void => {\n // istanbul ignore next line - globalThis is always defined in supported runtimes\n if (typeof globalThis === 'undefined') return;\n\n const sdux = (globalThis.sdux ??= {} as SDuXShape);\n const versions = (sdux.versions ??= {});\n\n if (versions[packageName] === version) return;\n\n versions[packageName] = version;\n};\n","import { registerVersion } from '../utils/version/version.register';\n\n/** Package name used for version registration. */\nconst SDUX_PACKAGE = '@sdux-vault/shared';\n\n/** Current package version string. */\nconst SDUX_VERSION = '0.9.3';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","/**\n * Runtime-safe registry of all behavior types.\n *\n * This object acts as an enum substitute without introducing JavaScript enum\n * overhead.\n * Values are string literals preserved at runtime and suitable for\n * switch statements, comparisons, and pipeline classification.\n * Each key maps 1:1 to its string literal value.\n * The structure is fully tree-shakable and safely inferable by TypeScript.\n */\nexport const BehaviorTypes = {\n CoreAfterTap: 'coreAfterTap',\n CoreBeforeTap: 'coreBeforeTap',\n CoreError: 'coreError',\n CoreErrorCallback: 'coreErrorCallback',\n CoreState: 'coreState',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\n CoreLicense: 'coreLicense',\n ErrorTransform: 'errorTransform',\n Extension: 'extension',\n Filter: 'filter',\n FromObservable: 'fromObservable',\n FromPromise: 'fromPromise',\n FromStream: 'fromStream',\n Interceptor: 'interceptor',\n Merge: 'merge',\n Operator: 'operator',\n Persist: 'persist',\n Reduce: 'reduce',\n Resolve: 'resolve',\n StepwiseFilter: 'stepwiseFilter',\n StepwiseReducer: 'stepwiseReducer',\n StepwiseResolve: 'stepwiseResolve',\n TabSyncState: 'tabSyncState'\n} as const;\n\n/**\n * Union of all valid behavior type strings.\n *\n * This type is derived from `BehaviorTypes` using literal inference, ensuring\n * strong typing while preserving full runtime compatibility.\n * This type should not be manually extended—add new values to `BehaviorTypes`\n * instead.\n *\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of console output severity levels. */\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from ConsoleTypes values. */\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of Vault log verbosity levels. */\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from LogLevelTypes values. */\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","import { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport {\n LogLevelType,\n LogLevelTypes\n} from '../../types/logging/log-level.type';\n\n/** Current log level threshold controlling which messages are emitted. */\nlet _logLevel: LogLevelType = LogLevelTypes.Off;\n\n/**\n * Prefix applied to all vault-related console output. Used to keep log\n * messages consistently identifiable across all log levels.\n */\nconst LOG_PREFIX = '[vault]';\n\n/**\n * Routes a log message to the console if the current log level permits it.\n *\n * @param level - The console severity level for this message.\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nfunction push(level: ConsoleType, ...args: any[]): void {\n const logLevel = getVaultLogLevel();\n\n if (logLevel === LogLevelTypes.Off) return;\n\n const levels: ConsoleType[] = [\n ConsoleTypes.Error,\n ConsoleTypes.Warn,\n ConsoleTypes.Log,\n ConsoleTypes.Debug\n ];\n\n const allowed = levels.indexOf(level) <= levels.indexOf(logLevel!);\n\n if (!allowed) return;\n\n // eslint-disable-next-line\n console[level](LOG_PREFIX, ...args);\n}\n\n/**\n * Emits an `error`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultError = (...args: any[]) => push('error', ...args);\n\n/**\n * Emits a `warn`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultWarn = (...args: any[]) => push('warn', ...args);\n\n/**\n * Emits a `log`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultLog = (...args: any[]) => push('log', ...args);\n\n/**\n * Emits a `debug`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultDebug = (...args: any[]) => push('debug', ...args);\n\n/**\n * Sets the global Vault log level threshold.\n *\n * @param level - The log level to apply.\n */\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\n\n/**\n * Returns the current global Vault log level.\n *\n * @returns The active log level threshold.\n */\nexport function getVaultLogLevel(): LogLevelType {\n return _logLevel;\n}\n","import { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorCallbackBehaviorContract } from '../../../interfaces/behaviors/error-callback-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { VaultErrorCallback } from '../../../types/callback/vault-error-callback.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base class for error callback behaviors that execute consumer-supplied\n * error handlers during the error stage of the Vault pipeline.\n */\nexport abstract class AbstractErrorCallbackBehavior<\n T\n> implements ErrorCallbackBehaviorContract<T> {\n /** Indicates that this error behavior is critical and always executed. */\n readonly critical!: boolean;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Behavior type for orchestrator registration. */\n readonly type = BehaviorTypes.CoreErrorCallback;\n\n /**\n * Creates a new abstract error behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the behavior factory.\n * @param behaviorCtx - Behavior class context providing injector access and extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes the consumer-supplied error callback against the current error and state.\n *\n * @param current - The error shape describing the pipeline failure.\n * @param state - The state snapshot at the time of the error.\n * @param oldschoolCallback - Consumer-supplied error callback to invoke.\n * @returns A promise that resolves when the callback completes.\n */\n abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Teardown hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the error behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { VAULT_NOOP } from '../../../constants/vault/vault-noop.constant';\nimport { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorTransformBehaviorContract } from '../../../interfaces/behaviors/error-transform-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base behavior for transforming errors during pipeline execution.\n * This class defines the contract and lifecycle hooks required for error transformation behaviors.\n *\n */\nexport abstract class AbstractErrorTransformBehavior<\n T\n> implements ErrorTransformBehaviorContract<T> {\n /**\n * Indicates that this error transform behavior is critical and always executed.\n */\n readonly critical!: boolean;\n\n /**\n * Unique identifier for this behavior instance.\n */\n readonly key: string;\n\n /**\n * Behavior type identifier used for orchestrator registration.\n */\n readonly type = BehaviorTypes.ErrorTransform;\n\n /**\n * Creates a new abstract error transform behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context providing configuration and hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Transforms an error produced during pipeline execution.\n *\n * @param error Incoming error value to be transformed.\n * @param current Current normalized Vault error value.\n * @param previousStateSnapshot Snapshot of state prior to the error.\n * @returns Transformed error, original error, or VAULT_NOOP to suppress emission.\n */\n abstract transformError(\n error: unknown,\n current: VaultErrorShape,\n previousStateSnapshot: StateSnapshotShape<T>\n ): Promise<unknown | typeof VAULT_NOOP>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Lifecycle hook invoked when the behavior instance is reset.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/**\n * Safely converts an arbitrary value into a JSON string representation.\n *\n * This function wraps `JSON.stringify` with enhanced handling for non-serializable\n * values, including:\n * - functions\n * - `Error` objects\n * - `Map` and `Set` instances\n * - circular references\n *\n * If serialization fails for any reason, a fallback string `\"[unserializable]\"`\n * is returned. The replacer ensures stable and predictable stringification for\n * use in logging and debugging utilities.\n *\n * @param value - The value to stringify safely.\n * @returns A JSON-formatted string or a fallback indicator.\n */\nexport function safeStringify(value: unknown): string {\n try {\n return JSON.stringify(value, jsonSafeReplacer, 2);\n } catch {\n return '[unserializable]';\n }\n}\n\n/**\n * Replacer function used by `safeStringify` to handle values that are normally\n * not serializable via `JSON.stringify`.\n *\n * It converts functions, errors, `Map`, and `Set` values into safe structures\n * and detects circular references. If a value cannot be serialized, a fallback\n * marker string is returned.\n *\n * @param _key - The property key being processed (unused).\n * @param val - The value associated with the key.\n * @returns A serializable representation of the value.\n */\n\nfunction jsonSafeReplacer(_key: string, val: unknown) {\n if (typeof val === 'function') return '[Function]';\n if (val instanceof Error) return { message: val.message, stack: val.stack };\n if (val instanceof Map) return { map: Array.from(val.entries()) };\n if (val instanceof Set) return { set: Array.from(val.values()) };\n\n // Avoid circular references\n try {\n JSON.stringify(val);\n return val;\n } catch {\n return '[Circular]';\n }\n}\n","import { BehaviorSubject, Observable } from 'rxjs';\nimport { VaultPrivateErrorServiceContract } from '../../interfaces/vault/vault-private-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/** ------------------------------------------\n * INTERNAL CLASS (NOT EXPORTED)\n * ------------------------------------------ */\n/**\n * Internal singleton error service that holds the current Vault error state.\n * Not exported directly; consumed exclusively by the public VaultErrorService.\n */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n /** Subject backing the private error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Initializes the private error service singleton. */\n constructor() {\n vaultDebug(\n '[VaultPrivateErrorService] initialized (singleton instance created)'\n );\n }\n\n /**\n * Publishes a new error or clears the current error.\n *\n * @param error - The error shape to publish, or null to clear.\n */\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n /**\n * Returns an observable of the current error state.\n *\n * @returns Observable emitting the current error or null.\n */\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\n /** Resets the error state to null. */\n clear(): void {\n vaultDebug('[VaultPrivateErrorService] clear() → error reset to null');\n this.#error$.next(null);\n }\n}\n\n/** ------------------------------------------\n * SINGLETON FACTORY (EXPORTED)\n * ------------------------------------------ */\nlet _instance: VaultPrivateErrorServiceContract | null = null;\n\n/**\n * Returns the singleton VaultPrivateErrorService instance, creating it on first call.\n *\n * @returns The shared private error service instance.\n */\nexport function VaultPrivateErrorService(): VaultPrivateErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultPrivateErrorService] creating new singleton instance');\n _instance = new VaultPrivateErrorClass();\n } else {\n vaultDebug(\n '[VaultPrivateErrorService] returning existing singleton instance'\n );\n }\n return _instance;\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { VaultErrorServiceContract } from '../../interfaces/vault/vault-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { VaultPrivateErrorService } from './vault-private-error.service';\n\n/**\n * Singleton service that aggregates and exposes the current Vault error state.\n * Subscribes to the private error service and mirrors updates through a public\n * observable stream for consumer consumption.\n */\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n /** Internal delegate responsible for low-level error state management. */\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n /** Subject backing the public error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Tracks whether an active error is currently held. */\n #hasErrorState = false;\n\n /** Aggregate subscription used for cleanup on teardown. */\n readonly #subscription = new Subscription();\n\n /** Public observable stream of the current error state. */\n readonly error$ = this.#error$.asObservable();\n\n /** Initializes the service and subscribes to the private error stream. */\n constructor() {\n vaultDebug(\n '[VaultErrorService] Initializing service and subscribing to private error stream.'\n );\n\n // Mirror the private error service into this one\n const sub = this.#privateVaultErrorService\n .getError()\n .subscribe((err: VaultErrorShape | null) => {\n vaultDebug(\n `[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`\n );\n this.#hasErrorState = !!err;\n this.#error$.next(err);\n });\n\n this.#subscription.add(sub);\n }\n\n /** Whether an active error is currently present. */\n get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n /** Clears the current error state via the private error service. */\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n/** Cached singleton instance of the VaultErrorService. */\nlet _instance: VaultErrorServiceClass | null = null;\n\n/**\n * Returns the singleton VaultErrorService instance, creating it on first call.\n *\n * @returns The shared VaultErrorService instance.\n */\nexport function VaultErrorService(): VaultErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultErrorService] Creating new singleton instance.');\n _instance = new VaultErrorServiceClass();\n }\n return _instance;\n}\n","import { Observable, Subscription, tap } from 'rxjs';\nimport { ControllerClassContext } from '../../contexts/controller-class.context';\nimport { ControllerContract } from '../../interfaces/controllers/controller.interface';\nimport { VaultErrorService } from '../../services/error/vault-error.service';\nimport { ControllerMessageShape } from '../../shapes/controller/controller-message.shape';\nimport { ControllerVote } from '../../types/controller/controller-vote.type';\nimport { ControllerType } from '../../types/controller/controller.type';\nimport { vaultDebug, vaultWarn } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/**\n * Abstract base class for active controllers that react to external error\n * state changes and participate in pipeline admission voting.\n */\nexport abstract class AbstractActiveController<\n T\n> implements ControllerContract<T> {\n /** Unique identifier for this controller instance. */\n readonly key: string;\n\n /** Controller type classification determined by the subclass. */\n abstract readonly type: ControllerType;\n\n /** Whether errors from this controller halt the pipeline. */\n readonly critical = false;\n\n /** Tracks whether the global error service currently holds an error. */\n protected hasError = false;\n\n /** Trace identifier from the most recent pipeline operation. */\n protected traceId: string | null = null;\n\n /** Subscription to the global VaultErrorService stream. */\n #subscription: Subscription;\n\n /**\n * Creates an active controller and subscribes to the global error stream.\n *\n * @param key - Unique controller identifier supplied by the factory.\n * @param ctx - Class-level context providing revote and lifecycle access.\n */\n constructor(\n key: string,\n protected readonly ctx: ControllerClassContext\n ) {\n this.key = key;\n\n this.#subscription = VaultErrorService()\n .error$.pipe(\n tap((error) => {\n vaultDebug(\n `${this.key} VaultErrorService dispatched event. Raw event: ${safeStringify(error)}.`\n );\n const newValue = error != null;\n vaultDebug(`${this.key} New transformed error value: \"${newValue}\".`);\n\n const revoteDecision =\n newValue !== this.hasError && this.traceId !== undefined;\n vaultDebug(\n `${this.key} Revote Decision: ${revoteDecision}. Factors. NewValue: ${newValue} HasError: ${this.hasError} TraceId: ${this.traceId} Rubric: 'newValue !== this.hasError && this.traceId !== undefined'`\n );\n\n this.hasError = newValue;\n vaultDebug(\n `${this.key} this.hasError replace with newValue: \"${this.hasError}\".`\n );\n vaultDebug(\n `${this.key} onExternalTrigger dispatchd with: \"${newValue}\".`\n );\n this.onExternalTrigger(newValue);\n\n if (revoteDecision) {\n vaultDebug(\n `${this.key} Revote Requesed with traceId: \"${this.traceId}\".`\n );\n this.ctx.requestRevote(this.traceId!);\n }\n })\n )\n .subscribe();\n }\n\n /**\n * Hook invoked when the external error state changes.\n *\n * @param _newErrorState - The updated error state flag.\n */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /**\n * Processes an incoming controller message and returns a vote.\n *\n * @param msg - The controller message to evaluate.\n * @returns An observable emitting the controller vote or void.\n */\n abstract handleMessage(\n msg: ControllerMessageShape<T>\n ): Observable<ControllerVote | void>;\n\n /** Tears down the controller and unsubscribes from the error stream. */\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n /** Resets the controller to its initial state. */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/* -----------------------------------------------------------\n * Abstracts\n * --------------------------------------------------------- */\nexport { AbstractErrorCallbackBehavior } from './behaviors/error/with-error-callback.abstract';\nexport { AbstractErrorTransformBehavior } from './behaviors/error/with-error-transform.abstract';\nexport { AbstractActiveController } from './controllers/active-controller.abstract';\n","/** Symbol key used to attach behavior metadata to a behavior class. */\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","/** Symbol key used to attach controller metadata to a controller class. */\nexport const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","/**\n * String token used to uniquely identify the DevTools Aggregate FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_AGGREGATE_KEY_CONSTANT =\n 'vault::devtools::aggregate:feature::cell';\n","/**\n * String token used to uniquely identify the DevTools Logging FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_LOGGING_KEY_CONSTANT =\n 'vault::devtools::logging::feature::cell';\n","/** Sentinel symbol that signals the pipeline to clear the current state. */\nexport const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","/** Sentinel symbol that signals the pipeline to continue processing. */\nexport const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","/** Sentinel symbol that signals the pipeline to skip the current operation. */\nexport const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","/** Sentinel symbol that signals the pipeline to halt execution. */\nexport const VAULT_STOP = Symbol.for('VAULT_STOP');\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { BEHAVIOR_META } from './behavior-meta.constant';\nexport { CONTROLLER_META } from './controller-meta.constant';\nexport { DEVTOOLS_AGGREGATE_KEY_CONSTANT } from './dev-tools/devtools-aggregate-key.constant';\nexport { DEVTOOLS_LOGGING_KEY_CONSTANT } from './dev-tools/devtools-logging-key.constant';\nexport { VAULT_CLEAR_STATE } from './vault/vault-clear-state.constant';\nexport { VAULT_CONTINUE } from './vault/vault-continue.constant';\nexport { VAULT_NOOP } from './vault/vault-noop.constant';\nexport { VAULT_STOP } from './vault/vault-stop.constant';\n","// vault-behavior.decorator.ts\nimport { BEHAVIOR_META } from '../constants/behavior-meta.constant';\nimport { BehaviorMetaShape } from '../shapes/behavior-meta.shape';\n\n/**\n * Decorator that registers a class as an Vault behavior.\n *\n * The `VaultBehavior` decorator attaches the provided `BehaviorMeta`\n * definition to the target constructor, making the behavior discoverable by\n * the orchestrator during pipeline initialization. Metadata fields such as\n * `type`, `key`, and `critical` are also mirrored onto static properties of\n * the decorated class to support lightweight runtime introspection.\n *\n * This decorator does not modify method logic or structure; it only assigns\n * metadata required for orchestrator classification and behavior lifecycle\n * management.\n *\n * @param meta - Metadata describing the behavior’s category, unique key, and\n * criticality within the pipeline.\n * @returns A class decorator that applies behavior metadata to the target.\n */\nexport function VaultBehavior(meta: BehaviorMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[BEHAVIOR_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n\n if (meta.resolveType !== undefined) {\n target.resolveType = meta.resolveType;\n }\n\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","// vault-behavior.decorator.ts\nimport { CONTROLLER_META } from '../constants/controller-meta.constant';\nimport { ControllerMetaShape } from '../shapes/controller/controller-meta.shape';\n\n/**\n * Class decorator that attaches controller metadata to the target class.\n *\n * @param meta - The controller metadata shape to apply.\n * @returns A class decorator function.\n */\nexport function VaultController(meta: ControllerMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[CONTROLLER_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { VaultBehavior } from './vault-behavior.decorator';\nexport { VaultController } from './vault-controller.decorator';\n","import { VaultErrorUsageKindTypes } from './vault-error-usage-kind.type';\n\n/** Enumeration of top-level Vault error kind classifications. */\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type of all Vault error kind values including usage sub-kinds. */\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","/** Enumeration of Vault error name identifiers. */\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type derived from VaultErrorNameTypes values. */\nexport type VaultErrorNameType =\n (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","import {\n VaultErrorKindType,\n VaultErrorKindTypes\n} from '../types/error/vault-error-kind.type';\nimport {\n VaultErrorNameType,\n VaultErrorNameTypes\n} from '../types/error/vault-error-name.type';\n\n/**\n * Base error class for all Vault-specific errors. Extends the native Error\n * with a typed name and kind for structured error classification.\n */\nexport class VaultError extends Error {\n /** Classification kind used to categorize this error in diagnostics. */\n readonly kind: VaultErrorKindType;\n\n /**\n * Creates a new VaultError instance with prototype chain correction.\n *\n * @param message - Human-readable description of the error.\n * @param name - Typed error name used for identification.\n * @param kind - Error kind used for diagnostic classification.\n */\n constructor(\n message: string,\n name: VaultErrorNameType = VaultErrorNameTypes.VaultError,\n kind: VaultErrorKindType = VaultErrorKindTypes.VaultError\n ) {\n super(message);\n\n this.name = name;\n this.kind = kind;\n\n // Required for proper instanceof checks in TS / ES5 targets\n Object.setPrototypeOf(this, new.target.prototype);\n\n // Optional but nice: clean stack trace\n // eslint-disable-next-line\n const anyError = Error as any;\n if (typeof anyError.captureStackTrace === 'function') {\n anyError.captureStackTrace(this, new.target);\n }\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when an encrypted payload fails AES-GCM integrity verification\n * during decryption, indicating tampered, corrupted, or mismatched key data.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\n /** Creates the error with a descriptive integrity-failure message. */\n constructor() {\n const message = `Encrypted snapshot failed integrity verification.\n\nThe encrypted payload could not be authenticated during AES-GCM decryption.\n\nPossible causes:\n\n• The stored ciphertext has been tampered with\n• The stored initialization vector (IV) was modified\n• The encryption key does not match the original key\n• The stored payload is corrupted\n\nVault refuses to restore state from unauthenticated encrypted data.`;\n\n super(message, VaultErrorNameTypes.EncryptionIntegrity);\n }\n}\n","/** Enumeration of usage-specific Vault error sub-kind classifications. */\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\n/** Union type derived from VaultErrorUsageKindTypes values. */\nexport type VaultErrorUsageKindType =\n (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when a behavior or controller fails license validation.\n */\nexport class VaultLicenseError extends VaultError {\n /**\n * Creates a license validation error.\n *\n * @param message - Description of the license violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.License\n ) {\n super(message, VaultErrorNameTypes.License, kind);\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Base error for Vault API usage violations detected at runtime.\n */\nexport class VaultUsageError extends VaultError {\n /**\n * Creates a usage error with the specified message and kind.\n *\n * @param message - Description of the usage violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage\n ) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when an eager Promise is passed directly to the state pipeline\n * instead of a deferred factory function.\n */\nexport class VaultUsagePromiseError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid incoming value: Promise detected.\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nUse the following instead a DeferredFactory value\n\nThis guarantees the promise is created and executed inside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.Promise);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when a Promise-based state method receives a raw value instead\n * of a factory function that returns a Promise.\n */\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid usage of Promise-based state API.\n\nYou called a Promise-specific method (replaceState / mergeState),\nbut did not provide a function that creates a Promise.\n\nExpected:\n• () => Promise<T>\n\nReceived:\n• A non-function value\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nAlways wrap promises in a function so they are created and executed\ninside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.PromiseFactoryRequired);\n }\n}\n","/* -----------------------------------------------------------\n * ERRORS\n * --------------------------------------------------------- */\nexport { VaultError } from './vault-error';\nexport { VaultEncryptionIntegrityError } from './vault-error.encryption-integrity';\nexport { VaultLicenseError } from './vault-error.license';\nexport { VaultUsageError } from './vault-error.usage';\nexport { VaultUsagePromiseError } from './vault-error.usage.promise';\nexport { VaultUsagePromiseFactoryRequiredError } from './vault-error.usage.promise-factory-required';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","/** Enumeration of message types dispatched to controllers during pipeline orchestration. */\nexport const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\n/** Union type derived from ControllerMessageTypes values. */\nexport type ControllerMessageType =\n (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","/** Enumeration of votes a controller may cast during pipeline admission. */\nexport const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from ControllerVotes values. */\nexport type ControllerVote =\n (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","/** Enumeration of controller category classifications. */\nexport const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise',\n TabSync: 'tabSync'\n} as const;\n\n/** Union type derived from ControllerTypes values. */\nexport type ControllerType =\n (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","/** Enumeration of conductor decision outcomes after controller voting. */\nexport const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from DecisionOutcomeTypes values. */\nexport type DecisionOutcomeType =\n (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","/** Enumeration of event boundary positions within a lifecycle span. */\nexport const EventBoundaryTypes = {\n Candidate: 'candidate',\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventBoundaryTypes values. */\nexport type EventBoundaryType =\n (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","/** Enumeration of monitor event category classifications. */\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Pipeline: 'pipeline',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventTypes values. */\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","/** Enumeration of pipeline operation modes. */\nexport const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\n/** Union type derived from OperationTypes values. */\nexport type OperationType =\n (typeof OperationTypes)[keyof typeof OperationTypes];\n","/** Enumeration of pipeline stages that produce state-transforming snapshots for DevTools diffing. */\nexport const PipelineStages = {\n PipelineStart: 'pipeline-start',\n Resolve: 'resolve',\n ComputeMerge: 'compute-merge',\n Operator: 'operator',\n Filter: 'filter',\n Reducer: 'reducer',\n CoreState: 'core-state'\n} as const;\n\n/** Union type derived from PipelineStages values. */\nexport type PipelineStage =\n (typeof PipelineStages)[keyof typeof PipelineStages];\n","/**\n * Enumerates the available resolve strategy identifiers used by resolve\n * behaviors. These identifiers indicate how a FeatureCell obtains its initial\n * and subsequent state values during the resolve stage of the pipeline.\n *\n * - `Value` — Resolve from a synchronous, in-memory value.\n * - `HttpResource` — Resolve using an HTTP-driven resource behavior.\n * - `Observable` — Resolve from an observable stream source.\n * - `Promise` — Resolve from a promise source.\n */\nexport const ResolveTypes = {\n HttpResource: 'http-resource',\n Observable: 'observable',\n Promise: 'promise',\n Value: 'value'\n} as const;\n\n/**\n * Union type representing all supported resolve strategy identifiers.\n */\nexport type ResolveType = (typeof ResolveTypes)[keyof typeof ResolveTypes];\n","/** Enumeration of state emission event classifications. */\nexport const StateEmitTypes = {\n IncomingPipeline: 'Incoming Pipeline',\n FinalizePipeline: 'Finalize Pipeline',\n PipelineError: 'Pipeline Error',\n PipelineDestroy: 'Pipeline Destroy',\n PipelineReset: 'Pipeline Reset',\n AbortController: 'Abort Controller',\n DenyController: 'Deny Controller',\n TabSync: 'Tab Sync'\n} as const;\n\n/** Union type derived from StateEmitTypes values. */\nexport type StateEmitType =\n (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","/** Enumeration of Vault license tier classifications. */\nexport const VaultLicensePayloadTypes = {\n Development: 'development',\n Pro: 'pro',\n Enterprise: 'enterprise'\n} as const;\n\n/** Union type of all Vault license payload values. */\nexport type VaultLicensePayloadType =\n (typeof VaultLicensePayloadTypes)[keyof typeof VaultLicensePayloadTypes];\n","/** Enumeration of license validation statuses for FeatureCell registration. */\nexport const VaultRegistrationLicenseStatusTypes = {\n NotRequired: 'not-required',\n Pending: 'pending',\n Revoked: 'revoked',\n Timeout: 'timeout',\n Valid: 'valid'\n} as const;\n\n/** Union type derived from VaultRegistrationLicenseStatusTypes values. */\nexport type VaultRegistrationLicenseStatusType =\n (typeof VaultRegistrationLicenseStatusTypes)[keyof typeof VaultRegistrationLicenseStatusTypes];\n","/* -----------------------------------------------------------\n * TYPES (USER-FACING)\n * --------------------------------------------------------- */\nexport { BehaviorTypes } from './behavior/behavior.type';\nexport type { BehaviorType } from './behavior/behavior.type';\nexport type { DistinctComparison } from './behavior/distinct-comparison.type';\nexport type { CoreEmitStateCallback } from './callback/core-emit-state-callback.type';\nexport type { TapCallback } from './callback/tap-callback.type';\nexport type { VaultErrorCallback } from './callback/vault-error-callback.type';\nexport { ControllerMessageTypes } from './controller/controller-message.type';\nexport type { ControllerMessageType } from './controller/controller-message.type';\nexport { ControllerVotes } from './controller/controller-vote.type';\nexport type { ControllerVote } from './controller/controller-vote.type';\nexport { ControllerTypes } from './controller/controller.type';\nexport type { ControllerType } from './controller/controller.type';\nexport { DecisionOutcomeTypes } from './controller/decision-outcome.type';\nexport type { DecisionOutcomeType } from './controller/decision-outcome.type';\nexport { VaultErrorKindTypes } from './error/vault-error-kind.type';\nexport type { VaultErrorKindType } from './error/vault-error-kind.type';\nexport { VaultErrorNameTypes } from './error/vault-error-name.type';\nexport type { VaultErrorNameType } from './error/vault-error-name.type';\nexport { VaultErrorUsageKindTypes } from './error/vault-error-usage-kind.type';\nexport type { VaultErrorUsageKindType } from './error/vault-error-usage-kind.type';\nexport { EventBoundaryTypes } from './event/event-boundary.type';\nexport type { EventBoundaryType } from './event/event-boundary.type';\nexport { EventTypes } from './event/event.type';\nexport type { EventType } from './event/event.type';\nexport type { FilterFunction } from './function/filter-function.type';\nexport type { ReducerFunction } from './function/reducer-function.type';\nexport type { InterceptorStateType } from './interceptor-state.type';\nexport { LogLevelTypes } from './logging/log-level.type';\nexport type { LogLevelType } from './logging/log-level.type';\nexport { OperationTypes } from './operation.type';\nexport type { OperationType } from './operation.type';\nexport type { PipelinePersistValue } from './pipeline/pipeline-persist-value.type';\nexport { PipelineStages } from './pipeline/pipeline-stage.type';\nexport type { PipelineStage } from './pipeline/pipeline-stage.type';\nexport type { PipelineUpstreamValue } from './pipeline/pipeline-upstream-value.type';\nexport type { PipelineValue } from './pipeline/pipeline-value.type';\nexport { ResolveTypes } from './resolve.type';\nexport type { ResolveType } from './resolve.type';\nexport type { CoreEmitStateResult } from './state/core-emit-state-result.type';\nexport type { DeferredFactory } from './state/deferred-factory.type';\nexport type { DeferredType } from './state/deferred.type';\nexport type { FinalState } from './state/final-state.type';\nexport { StateEmitTypes } from './state/state-emit.type';\nexport type { StateEmitType } from './state/state-emit.type';\nexport type { StateInputType } from './state/state-input.type';\nexport { VaultLicensePayloadTypes } from './vault/vault-license-payload.type';\nexport type { VaultLicensePayloadType } from './vault/vault-license-payload.type';\nexport { VaultRegistrationLicenseStatusTypes } from './vault/vault-registration-license-status.type';\nexport type { VaultRegistrationLicenseStatusType } from './vault/vault-registration-license-status.type';\n","/**\n * Creates a normalized behavior key identifier used for behavior registration.\n *\n * A behavior key uniquely identifies a behavior within the Vault pipeline,\n * following the canonical format:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Both `domain` and `name` are normalized by:\n * - capitalizing the first character\n * - removing all non-alphanumeric characters\n *\n * This ensures consistent and predictable behavior keys for orchestration,\n * diagnostics, and tooling.\n *\n * @param domain - The logical domain or category of the behavior.\n * @param name - The specific behavior name within the domain.\n * @returns A normalized behavior key string.\n */\nexport function defineBehaviorKey(domain: string, name: string): string {\n return defineVaultKey('Behavior', domain, name);\n}\n\n/**\n * Constructs a normalized Vault key for behavior or controller registration.\n *\n * @param kind - Whether the key is for a Behavior or Controller.\n * @param domain - The logical domain or category.\n * @param name - The specific name within the domain.\n * @returns A normalized Vault key string.\n */\nexport function defineVaultKey(\n kind: 'Behavior' | 'Controller',\n domain: string,\n name: string\n): string {\n const normalize = (s: string) =>\n s.charAt(0).toUpperCase() + s.slice(1).replace(/[^A-Za-z0-9]/g, '');\n\n return `SDUX::${kind}::${normalize(domain)}::${normalize(name)}`;\n}\n\n/**\n * Validates whether a string conforms to the Vault behavior key format.\n *\n * A valid behavior key must follow the structure:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Where `<Domain>` and `<Name>` begin with an uppercase character and contain\n * only alphanumeric characters.\n *\n * @param key - The behavior key string to validate.\n * @returns `true` if the key matches the required pattern; otherwise `false`.\n */\nexport function validateBehaviorKey(key: string): boolean {\n if (typeof key !== 'string') return false;\n\n const pattern =\n /^SDUX::(Behavior|Controller)::[A-Z][A-Za-z0-9]*::[A-Z][A-Za-z0-9]*$/;\n return pattern.test(key);\n}\n","import {\n defineVaultKey,\n validateBehaviorKey\n} from '../behavior/define-behavior-key.util';\n\n/**\n * Creates a normalized controller key following the Vault key format.\n *\n * @param domain - The logical domain or category of the controller.\n * @param name - The specific controller name within the domain.\n * @returns A normalized controller key string.\n */\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\n/**\n * Validates whether a string conforms to the Vault controller key format.\n *\n * @param key - The controller key string to validate.\n * @returns `true` if the key matches the required pattern.\n */\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","import { DeferredFactory } from '../../types/state/deferred-factory.type';\n\n/**\n * Determines whether a value conforms to the DeferredFactory contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is an object with a callable `value` property.\n */\nexport function isDeferredFactory<T = unknown>(\n value: unknown\n): value is DeferredFactory<T> {\n return (\n !!value &&\n typeof value === 'object' &&\n // eslint-disable-next-line\n typeof (value as any).value === 'function'\n );\n}\n","/** Singleton accessor that detects whether code is running in a test environment. */\nexport const isTestEnv = {\n get active(): boolean {\n return (\n // eslint-disable-next-line\n typeof (globalThis as any).jasmine !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).jest !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).vitest !== 'undefined'\n );\n }\n};\n","import { isTestEnv } from './testing-environment.util';\n\n/** Tracks whether Vault development mode has been enabled. */\nlet devMode: boolean | null = null;\n\n/** Singleton accessor for Vault development mode state. */\nexport const DevMode = {\n get active(): boolean {\n return devMode === true;\n },\n\n setDevMode(isDevMode: boolean): void {\n if (devMode !== null && !isTestEnv.active) {\n throw new Error('[vault] DevMode has already been initialized.');\n }\n\n devMode = isDevMode;\n }\n};\n","import { VaultErrorShape } from '../../shapes/vault-error.shape';\n\n/**\n * Normalizes any thrown error into a canonical `VaultError` structure.\n *\n * This ensures that all errors—HTTP, runtime, string, or unknown—\n * are represented consistently throughout the Vault error pipeline.\n *\n * @param err - The raw thrown value.\n * @param featureCellKey - the origination of the error\n * @returns A fully normalized `VaultError`.\n */\nexport function createVaultError(\n err: unknown,\n featureCellKey: string\n): VaultErrorShape {\n const timestamp = Date.now();\n\n // -----------------------------------------\n // Standard JS Error\n // -----------------------------------------\n if (err instanceof Error) {\n return {\n message: err.message || 'Unexpected error',\n details: err.stack,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // String error\n // -----------------------------------------\n if (typeof err === 'string') {\n return {\n message: err,\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // Fallback: unknown error\n // -----------------------------------------\n return {\n message: 'Unexpected error',\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n}\n","/*\n| Category | Type / Example | structuredClone behavior | deepFreeze fallback behavior | Isolated? | Notes |\n| ------------------------ | --------------------- | ------------------------- | ------------------------------------- | ---------- | ---------------------------------------------- |\n| **Primitives** | number | Returned as-is | Returned as-is | ✅ Yes | Immutable by definition |\n| | string | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | boolean | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | bigint | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | symbol | Returned as-is | Returned as-is | ✅ Yes | Identity preserved |\n| | undefined | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| | null | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| **Plain Objects** | `{ a: 1 }` | Deep cloned | Deep cloned + frozen | ✅ Yes | Always returns new reference |\n| **Arrays** | `[1,2,3]` | Deep cloned | Deep cloned + frozen | ✅ Yes | Structural mutation blocked |\n| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Cannot be cloned or frozen meaningfully |\n| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Identity preserved intentionally |\n| **Dates** | `new Date()` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Time value preserved |\n| **RegExp** | `/abc/g` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Pattern preserved |\n| **Error** | `new Error()` | Cloned (core fields only) | Frozen original OR cloned+frozen | ⚠️ Partial | Custom props not guaranteed |\n| **Map** | `new Map()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.set()` still works; internal slots preserved |\n| **Set** | `new Set()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.add()` still works |\n| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be cloned or frozen safely |\n| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |\n| **TypedArray** | `Uint8Array` | Cloned | Frozen | ✅ Yes | Buffer copied or locked |\n| **ArrayBuffer** | `ArrayBuffer` | Cloned | Frozen | ✅ Yes | Memory isolated |\n| **DataView** | `DataView` | Cloned | Frozen | ✅ Yes | Backing buffer safe |\n| **Observable (RxJS)** | `new Observable()` | ❌ Throws | Same reference, frozen wrapper | ⚠️ Partial | Internal emissions mutable |\n| **Class Instance** | `new Foo()` | Prototype stripped | Frozen instance | ⚠️ Partial | Methods lost on clone |\n| **Object.create(null)** | null-proto object | Cloned | Deep cloned + frozen | ✅ Yes | Prototype normalized |\n| **Cyclic Objects** | `{ self }` | Cloned with cycles | Deep cloned + frozen (cycle-safe) | ✅ Yes | WeakSet prevents recursion |\n| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |\n| **Non-enumerable props** | defineProperty | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Visibility differs |\n| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Symbols skipped by clone |\n| **DOM Nodes** | `HTMLElement` | ❌ Throws | Same reference, frozen wrapper | ❌ No | Host object semantics |\n| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target (if accessible) | ⚠️ Partial | Depends on handler |\n| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |\n| **JSON-like data** | POJO graphs | Deep cloned | Deep cloned + frozen | ✅ Yes | Ideal use case |\n| **Modules** | ES module namespace | ❌ Throws | Returned as-is | ❌ No | Immutable by spec |\n| **Intl objects** | `Intl.DateTimeFormat` | Cloned | Frozen | ⚠️ Partial | Internal slots opaque |\n| **Shared References** | `{a:x, b:x}` | Preserved in clone | Preserved in clone | ✅ Yes | Graph identity maintained |\n| **Sparse Arrays** | `[ , , 3 ]` | Preserved | Preserved | ✅ Yes | Holes maintained |\n| **Symbol Values** | `{ x: Symbol() }` | Preserved | Preserved | ✅ Yes | Value identity intact |\n| **Mixed Graphs** | fn + object | ❌ Partial | Clone + preserve refs | ⚠️ Partial | Hybrid isolation |\n| **Frozen Objects** | `Object.freeze(obj)` | Cloned (unfrozen) | Preserved frozen OR cloned+frozen | ✅ Yes | Freeze state not guaranteed |\n| **Boxed Primitives** | `new Number(1)` | Cloned | Frozen | ✅ Yes | Unboxed behavior retained |\n*/\n\n/**\n * Recursively freezes an object and all nested properties to prevent mutation.\n *\n * @param obj - The object to deep-freeze.\n * @param seen - WeakSet used to track visited references and prevent cycles.\n * @returns The frozen object.\n */\nfunction deepFreeze<T>(obj: T, seen = new WeakSet<object>()): T {\n if (obj === null || typeof obj !== 'object') return obj;\n\n const o = obj as unknown as object;\n if (seen.has(o)) return obj;\n seen.add(o);\n\n if (!Object.isFrozen(o)) Object.freeze(o);\n\n for (const key of Reflect.ownKeys(o)) {\n const desc = Object.getOwnPropertyDescriptor(o, key);\n /* istanbul ignore next -- impossible after Object.freeze due to Proxy invariants */\n if (!desc) continue;\n\n // Only recurse into data properties; do NOT invoke getters\n if ('value' in desc) {\n // eslint-disable-next-line\n deepFreeze((desc as PropertyDescriptor).value as any, seen);\n }\n }\n\n return obj;\n}\n\n/**\n * Creates an immutable copy of a value using structuredClone with a deepFreeze fallback.\n *\n * @param value - The value to isolate.\n * @returns An immutable copy of the value.\n */\nexport const isolateValue = <T>(value: T): T => {\n if (value === null || typeof value !== 'object') return value;\n\n if (Object.isFrozen(value)) return value;\n\n try {\n if (\n value instanceof Map ||\n value instanceof Set ||\n value instanceof WeakMap ||\n value instanceof WeakSet\n ) {\n try {\n return structuredClone(value);\n } catch {\n return deepFreeze(value); // ← IMPORTANT: same reference\n }\n }\n return structuredClone(value);\n } catch {\n const clone = Array.isArray(value)\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [...(value as any)]\n : Object.assign(Object.create(Object.getPrototypeOf(value)), value);\n\n return deepFreeze(clone);\n }\n};\n","import { VAULT_CLEAR_STATE } from '../../constants/vault/vault-clear-state.constant';\nimport { VAULT_CONTINUE } from '../../constants/vault/vault-continue.constant';\nimport { VAULT_NOOP } from '../../constants/vault/vault-noop.constant';\nimport { StateInputShape } from '../../shapes/state/state-input.shape';\nimport { FinalState } from '../../types/state/final-state.type';\n\n/**\n * Indicates whether a final pipeline value represents a NOOP condition.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_NOOP` sentinel.\n */\nexport const isVaultNoop = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_NOOP;\n};\n\n/**\n * Indicates whether a final pipeline value represents the clear-state sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CLEAR_STATE` sentinel.\n */\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\n\n/**\n * Indicates whether a final pipeline value represents the continue sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CONTINUE` sentinel.\n */\nexport const isVaultContinue = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CONTINUE;\n};\n\n/**\n * Checks whether a value is exactly `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `null`.\n */\nexport const isNull = (current: unknown): current is null => current === null;\n\n/**\n * Checks whether a value is exactly `undefined`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `undefined`.\n */\nexport const isUndefined = (current: unknown): current is undefined =>\n current === undefined;\n\n/**\n * Determines whether a value is defined (not `undefined`).\n * Note: This intentionally does *not* exclude `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is not `undefined`.\n */\nexport const isDefined = (current: unknown): boolean => !isUndefined(current);\n\n/**\n * Determines whether a value is nullish — meaning either `null` or `undefined`.\n *\n * @param current - The value to inspect.\n * @returns `true` for `null` or `undefined`, otherwise `false`.\n */\nexport const isNullish = (current: unknown): current is null | undefined =>\n current == null;\n\n/**\n * Determines whether a value is a function.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a function.\n */\nexport const isFunction = (\n value: unknown\n): // eslint-disable-next-line\nvalue is (...args: any[]) => unknown => typeof value === 'function';\n\n/**\n * Determines whether a value is a non-null object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an object and not null.\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\n/**\n * Determines whether a value is a plain object with no custom prototype.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a plain object.\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (value === null || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Determines whether a value conforms to the StateInputShape contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is a plain object with recognized state keys or is empty.\n */\nexport const isStateInputShape = <T>(\n value: unknown\n): value is StateInputShape<T> => {\n if (!isPlainObject(value)) return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey =\n Object.prototype.hasOwnProperty.call(v, 'loading') ||\n Object.prototype.hasOwnProperty.call(v, 'value') ||\n Object.prototype.hasOwnProperty.call(v, 'error');\n\n const isEmptyObject = Object.keys(v).length === 0;\n\n return hasKnownKey || isEmptyObject;\n};\n","/**\n * Determines whether a value is a thenable Promise-like object.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value has a callable `then` property.\n */\nexport function isPromise<T = unknown>(value: unknown): value is Promise<T> {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n // eslint-disable-next-line\n typeof (value as any).then === 'function'\n );\n}\n","import { HttpResourceRefShape } from '../../shapes/http-resource-ref-shape.shape';\n\n/**\n * Type guard that determines whether a value is an `HttpResourceRef<T>`.\n *\n * An `HttpResourceRef` is a structured object produced by Angular’s\n * `HttpClient` resource APIs. It contains a standardized shape used by\n * Vault to detect and normalize resource-backed state transitions.\n *\n * This utility checks only for the presence of the canonical\n * `HttpResourceRef` fields (`value`, `isLoading`, `error`, `hasValue`)\n * and does not validate the internal content of those properties.\n *\n * @typeParam T - The resource value type.\n *\n * @param obj - The value to test.\n * @returns `true` if the value matches the structural shape of an\n * `HttpResourceRef<T>`, otherwise `false`.\n */\n// eslint-disable-next-line\nexport function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T> {\n return !!(\n obj &&\n typeof obj === 'object' &&\n 'value' in obj &&\n 'isLoading' in obj &&\n 'error' in obj &&\n 'hasValue' in obj\n );\n}\n","/* -----------------------------------------------------------\n * UTILITY FUNCTIONS (SAFE TO WILDCARD)\n * --------------------------------------------------------- */\nexport {\n defineBehaviorKey,\n validateBehaviorKey\n} from './behavior/define-behavior-key.util';\nexport {\n defineControllerKey,\n validateControllerKey\n} from './controller/define-controller-key.util';\nexport { isDeferredFactory } from './deferred-factory/is-deferred-factory.util';\nexport { DevMode } from './dev-mode/dev-mode.util';\nexport { isTestEnv } from './dev-mode/testing-environment.util';\nexport { createVaultError } from './error/create-vault-error.util';\nexport { isolateValue } from './isolate-value/isolate-value.util';\nexport {\n getVaultLogLevel,\n setVaultLogLevel,\n vaultDebug,\n vaultError,\n vaultLog,\n vaultWarn\n} from './logger/logger.util';\nexport {\n isDefined,\n isFunction,\n isNull,\n isNullish,\n isObject,\n isStateInputShape,\n isUndefined,\n isVaultClearState,\n isVaultContinue,\n isVaultNoop\n} from './logic/logic.utils';\nexport { isPromise } from './promise/is-promise.util';\nexport { isHttpResourceRef } from './resolve/is-http-resource.util';\nexport { safeStringify } from './safe-stringify/safe-stringify.util';\nexport { registerVersion } from './version/version.register';\n","/*\n * Public API Surface of @sdux-vault/shared\n *\n * IMPORTANT:\n * - JSDoc is preserved only when using named exports.\n * - Avoid `export *` for public-facing interfaces, behaviors, and types.\n * - Internal utilities may still use `export *`.\n */\n\n/* -----------------------------------------------------------\n * INTENTIONAL SIDE EFFECTS\n * --------------------------------------------------------- */\n\n/**\n * This is to handle fluent api requirements for behaviors and controllers\n */\nimport './typings/global';\n\n/**\n * This is for version support in dev mode and tracking in the devtools\n */\nimport './lib/version/version.register';\n\n/* -----------------------------------------------------------\n * DOMAIN EXPORTS\n * --------------------------------------------------------- */\nexport * from './lib/abstracts';\nexport * from './lib/config';\nexport * from './lib/constants';\nexport * from './lib/contexts';\nexport * from './lib/decorators';\nexport * from './lib/errors';\nexport * from './lib/interfaces';\nexport * from './lib/services';\nexport * from './lib/shapes';\nexport * from './lib/types';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_instance"],"mappings":";;AAEA;;;;;AAKG;MACU,eAAe,GAAG,CAAC,WAAmB,EAAE,OAAe,KAAU;;IAE5E,IAAI,OAAO,UAAU,KAAK,WAAW;QAAE;IAEvC,MAAM,IAAI,IAAI,UAAU,CAAC,IAAI,KAAK,EAAe,CAAC;IAClD,MAAM,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,EAAE,CAAC;A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E1C,IAAA,MAAM,WAAW,GACf,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC;QAChD,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC;AAElD,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;IAEjD,OAAO,WAAW,IAAI,aAAa;AACrC;;AC7HA;;;;;AAKG;AACG,SAAU,SAAS,CAAc,KAAc,EAAA;IACnD,QACE,CAAC,CAAC,KAAK;SACN,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;;AAE1D,QAAA,OAAQ,KAAa,CAAC,IAAI,KAAK,UAAU;AAE7C;;ACXA;;;;;;;;;;;;;;;;AAgBG;AACH;AACM,SAAU,iBAAiB,CAAI,GAAQ,EAAA;IAC3C,OAAO,CAAC,EACN,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,OAAO,IAAI,GAAG;AACd,QAAA,WAAW,IAAI,GAAG;AAClB,QAAA,OAAO,IAAI,GAAG;QACd,UAAU,IAAI,GAAG,CAClB;AACH;;AC7BA;;AAE+D;;ACF/D;;;;;;;AAOG;AAEH;;AAE+D;AAE/D;;AAEG;;ACfH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdux-vault/shared",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SDuX Vault",
|
|
@@ -67,5 +67,6 @@
|
|
|
67
67
|
"types": "./types/sdux-vault-shared.d.ts",
|
|
68
68
|
"default": "./fesm2022/sdux-vault-shared.mjs"
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"type": "module"
|
|
71
72
|
}
|
|
@@ -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 };
|