@sdux-vault/shared 0.0.10 → 0.0.12
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.
|
@@ -70,7 +70,7 @@ const registerVersion = (packageName, version) => {
|
|
|
70
70
|
// cmd+alt+j (see .vscode/keybindings.json)
|
|
71
71
|
// --- END AI MODEL FILE PATH ---
|
|
72
72
|
const SDUX_PACKAGE = '@sdux-vault/shared';
|
|
73
|
-
const SDUX_VERSION = '0.0.
|
|
73
|
+
const SDUX_VERSION = '0.0.12';
|
|
74
74
|
registerVersion(SDUX_PACKAGE, SDUX_VERSION);
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -180,7 +180,12 @@ function push(level, ...args) {
|
|
|
180
180
|
const logLevel = getVaultLogLevel();
|
|
181
181
|
if (logLevel === LogLevelTypes.Off)
|
|
182
182
|
return;
|
|
183
|
-
const levels = [
|
|
183
|
+
const levels = [
|
|
184
|
+
ConsoleTypes.Error,
|
|
185
|
+
ConsoleTypes.Warn,
|
|
186
|
+
ConsoleTypes.Log,
|
|
187
|
+
ConsoleTypes.Debug
|
|
188
|
+
];
|
|
184
189
|
const allowed = levels.indexOf(level) <= levels.indexOf(logLevel);
|
|
185
190
|
if (!allowed)
|
|
186
191
|
return;
|
|
@@ -412,7 +417,9 @@ class VaultErrorServiceClass {
|
|
|
412
417
|
constructor() {
|
|
413
418
|
vaultDebug('[VaultErrorService] Initializing service and subscribing to private error stream.');
|
|
414
419
|
// Mirror the private error service into this one
|
|
415
|
-
const sub = this.#privateVaultErrorService
|
|
420
|
+
const sub = this.#privateVaultErrorService
|
|
421
|
+
.getError()
|
|
422
|
+
.subscribe((err) => {
|
|
416
423
|
vaultDebug(`[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`);
|
|
417
424
|
this.#hasErrorState = !!err;
|
|
418
425
|
this.#error$.next(err);
|
|
@@ -1005,8 +1012,10 @@ function validateControllerKey(key) {
|
|
|
1005
1012
|
// cmd+alt+j (see .vscode/keybindings.json)
|
|
1006
1013
|
// --- END AI MODEL FILE PATH ---
|
|
1007
1014
|
function isDeferredFactory(value) {
|
|
1008
|
-
|
|
1009
|
-
|
|
1015
|
+
return (!!value &&
|
|
1016
|
+
typeof value === 'object' &&
|
|
1017
|
+
// eslint-disable-next-line
|
|
1018
|
+
typeof value.value === 'function');
|
|
1010
1019
|
}
|
|
1011
1020
|
|
|
1012
1021
|
/**
|
|
@@ -1057,43 +1066,55 @@ function createVaultError(err, featureCellKey) {
|
|
|
1057
1066
|
};
|
|
1058
1067
|
}
|
|
1059
1068
|
|
|
1069
|
+
// --- AI Model File Path (DO NOT DELETE) ---
|
|
1070
|
+
// FilePath: libs > shared > src > lib > utils > isolate-value > isolate-value.util.ts
|
|
1071
|
+
// Updated: 2026-04-07 15:49
|
|
1072
|
+
// Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or
|
|
1073
|
+
// cmd+alt+j (see .vscode/keybindings.json)
|
|
1074
|
+
// --- END AI MODEL FILE PATH ---
|
|
1060
1075
|
/*
|
|
1061
|
-
| Category | Type / Example | structuredClone behavior
|
|
1062
|
-
| ------------------------ | --------------------- |
|
|
1063
|
-
| **Primitives** | number | Returned as-is
|
|
1064
|
-
| | string | Returned as-is
|
|
1065
|
-
| | boolean | Returned as-is
|
|
1066
|
-
| | bigint | Returned as-is
|
|
1067
|
-
| | symbol | Returned as-is
|
|
1068
|
-
| | undefined | Returned as-is
|
|
1069
|
-
| | null | Returned as-is
|
|
1070
|
-
| **Plain Objects** | `{ a: 1 }` | Deep cloned
|
|
1071
|
-
| **Arrays** | `[1,2,3]` | Deep cloned
|
|
1072
|
-
| **Functions** | `() => {}` | ❌ Throws
|
|
1073
|
-
| **Promises** | `Promise.resolve()` | ❌ Throws
|
|
1074
|
-
| **Dates** | `new Date()` | Cloned
|
|
1075
|
-
| **RegExp** | `/abc/g` | Cloned
|
|
1076
|
-
| **Error** | `new Error()` | Cloned
|
|
1077
|
-
| **Map** | `new Map()` | Deep cloned
|
|
1078
|
-
| **Set** | `new Set()` | Deep cloned
|
|
1079
|
-
| **WeakMap** | `new WeakMap()` | ❌ Throws
|
|
1080
|
-
| **WeakSet** | `new WeakSet()` | ❌ Throws
|
|
1081
|
-
| **TypedArray** | `Uint8Array` | Cloned
|
|
1082
|
-
| **ArrayBuffer** | `ArrayBuffer` | Cloned
|
|
1083
|
-
| **DataView** | `DataView` | Cloned
|
|
1084
|
-
| **Observable (RxJS)** | `new Observable()` | ❌ Throws
|
|
1085
|
-
| **Class Instance** | `new Foo()` | Prototype stripped
|
|
1086
|
-
| **Object.create(null)** | null-proto object | Cloned
|
|
1087
|
-
| **Cyclic Objects** | `{ self }` | Cloned with cycles
|
|
1088
|
-
| **Getters / Setters** | `{ get x(){} }` | Getter invoked
|
|
1089
|
-
| **Non-enumerable props** |
|
|
1090
|
-
| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped
|
|
1091
|
-
| **DOM Nodes** | `HTMLElement` | ❌ Throws
|
|
1092
|
-
| **Proxy (well-formed)** | `new Proxy()` | Cloned
|
|
1093
|
-
| **Proxy (malicious)** | fake ownKeys | ❌ Throws
|
|
1094
|
-
| **JSON-like data** | POJO graphs | Deep cloned
|
|
1095
|
-
| **Modules** | ES module namespace | ❌ Throws
|
|
1096
|
-
| **Intl objects** | `Intl.DateTimeFormat` | Cloned
|
|
1076
|
+
| Category | Type / Example | structuredClone behavior | deepFreeze fallback behavior | Isolated? | Notes |
|
|
1077
|
+
| ------------------------ | --------------------- | ------------------------- | ------------------------------------- | ---------- | ---------------------------------------------- |
|
|
1078
|
+
| **Primitives** | number | Returned as-is | Returned as-is | ✅ Yes | Immutable by definition |
|
|
1079
|
+
| | string | Returned as-is | Returned as-is | ✅ Yes | Immutable |
|
|
1080
|
+
| | boolean | Returned as-is | Returned as-is | ✅ Yes | Immutable |
|
|
1081
|
+
| | bigint | Returned as-is | Returned as-is | ✅ Yes | Immutable |
|
|
1082
|
+
| | symbol | Returned as-is | Returned as-is | ✅ Yes | Identity preserved |
|
|
1083
|
+
| | undefined | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |
|
|
1084
|
+
| | null | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |
|
|
1085
|
+
| **Plain Objects** | `{ a: 1 }` | Deep cloned | Deep cloned + frozen | ✅ Yes | Always returns new reference |
|
|
1086
|
+
| **Arrays** | `[1,2,3]` | Deep cloned | Deep cloned + frozen | ✅ Yes | Structural mutation blocked |
|
|
1087
|
+
| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Cannot be cloned or frozen meaningfully |
|
|
1088
|
+
| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Identity preserved intentionally |
|
|
1089
|
+
| **Dates** | `new Date()` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Time value preserved |
|
|
1090
|
+
| **RegExp** | `/abc/g` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Pattern preserved |
|
|
1091
|
+
| **Error** | `new Error()` | Cloned (core fields only) | Frozen original OR cloned+frozen | ⚠️ Partial | Custom props not guaranteed |
|
|
1092
|
+
| **Map** | `new Map()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.set()` still works; internal slots preserved |
|
|
1093
|
+
| **Set** | `new Set()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.add()` still works |
|
|
1094
|
+
| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be cloned or frozen safely |
|
|
1095
|
+
| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |
|
|
1096
|
+
| **TypedArray** | `Uint8Array` | Cloned | Frozen | ✅ Yes | Buffer copied or locked |
|
|
1097
|
+
| **ArrayBuffer** | `ArrayBuffer` | Cloned | Frozen | ✅ Yes | Memory isolated |
|
|
1098
|
+
| **DataView** | `DataView` | Cloned | Frozen | ✅ Yes | Backing buffer safe |
|
|
1099
|
+
| **Observable (RxJS)** | `new Observable()` | ❌ Throws | Same reference, frozen wrapper | ⚠️ Partial | Internal emissions mutable |
|
|
1100
|
+
| **Class Instance** | `new Foo()` | Prototype stripped | Frozen instance | ⚠️ Partial | Methods lost on clone |
|
|
1101
|
+
| **Object.create(null)** | null-proto object | Cloned | Deep cloned + frozen | ✅ Yes | Prototype normalized |
|
|
1102
|
+
| **Cyclic Objects** | `{ self }` | Cloned with cycles | Deep cloned + frozen (cycle-safe) | ✅ Yes | WeakSet prevents recursion |
|
|
1103
|
+
| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |
|
|
1104
|
+
| **Non-enumerable props** | defineProperty | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Visibility differs |
|
|
1105
|
+
| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Symbols skipped by clone |
|
|
1106
|
+
| **DOM Nodes** | `HTMLElement` | ❌ Throws | Same reference, frozen wrapper | ❌ No | Host object semantics |
|
|
1107
|
+
| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target (if accessible) | ⚠️ Partial | Depends on handler |
|
|
1108
|
+
| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |
|
|
1109
|
+
| **JSON-like data** | POJO graphs | Deep cloned | Deep cloned + frozen | ✅ Yes | Ideal use case |
|
|
1110
|
+
| **Modules** | ES module namespace | ❌ Throws | Returned as-is | ❌ No | Immutable by spec |
|
|
1111
|
+
| **Intl objects** | `Intl.DateTimeFormat` | Cloned | Frozen | ⚠️ Partial | Internal slots opaque |
|
|
1112
|
+
| **Shared References** | `{a:x, b:x}` | Preserved in clone | Preserved in clone | ✅ Yes | Graph identity maintained |
|
|
1113
|
+
| **Sparse Arrays** | `[ , , 3 ]` | Preserved | Preserved | ✅ Yes | Holes maintained |
|
|
1114
|
+
| **Symbol Values** | `{ x: Symbol() }` | Preserved | Preserved | ✅ Yes | Value identity intact |
|
|
1115
|
+
| **Mixed Graphs** | fn + object | ❌ Partial | Clone + preserve refs | ⚠️ Partial | Hybrid isolation |
|
|
1116
|
+
| **Frozen Objects** | `Object.freeze(obj)` | Cloned (unfrozen) | Preserved frozen OR cloned+frozen | ✅ Yes | Freeze state not guaranteed |
|
|
1117
|
+
| **Boxed Primitives** | `new Number(1)` | Cloned | Frozen | ✅ Yes | Unboxed behavior retained |
|
|
1097
1118
|
*/
|
|
1098
1119
|
function deepFreeze(obj, seen = new WeakSet()) {
|
|
1099
1120
|
if (obj === null || typeof obj !== 'object')
|
|
@@ -1120,12 +1141,28 @@ function deepFreeze(obj, seen = new WeakSet()) {
|
|
|
1120
1141
|
const isolateValue = (value) => {
|
|
1121
1142
|
if (value === null || typeof value !== 'object')
|
|
1122
1143
|
return value;
|
|
1144
|
+
if (Object.isFrozen(value))
|
|
1145
|
+
return value;
|
|
1123
1146
|
try {
|
|
1124
|
-
|
|
1147
|
+
if (value instanceof Map ||
|
|
1148
|
+
value instanceof Set ||
|
|
1149
|
+
value instanceof WeakMap ||
|
|
1150
|
+
value instanceof WeakSet) {
|
|
1151
|
+
try {
|
|
1152
|
+
return structuredClone(value);
|
|
1153
|
+
}
|
|
1154
|
+
catch {
|
|
1155
|
+
return deepFreeze(value); // ← IMPORTANT: same reference
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1125
1158
|
return structuredClone(value);
|
|
1126
1159
|
}
|
|
1127
1160
|
catch {
|
|
1128
|
-
|
|
1161
|
+
const clone = Array.isArray(value)
|
|
1162
|
+
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1163
|
+
[...value]
|
|
1164
|
+
: Object.assign(Object.create(Object.getPrototypeOf(value)), value);
|
|
1165
|
+
return deepFreeze(clone);
|
|
1129
1166
|
}
|
|
1130
1167
|
};
|
|
1131
1168
|
|
|
@@ -1173,7 +1210,6 @@ const isDefined = (current) => !isUndefined(current);
|
|
|
1173
1210
|
* @returns `true` for `null` or `undefined`, otherwise `false`.
|
|
1174
1211
|
*/
|
|
1175
1212
|
const isNullish = (current) => current == null;
|
|
1176
|
-
// eslint-disable-next-line
|
|
1177
1213
|
const isFunction = (value) => typeof value === 'function';
|
|
1178
1214
|
const isObject = (value) => typeof value === 'object' && value !== null;
|
|
1179
1215
|
const isStateInputShape = (value) => {
|
|
@@ -1185,9 +1221,10 @@ const isStateInputShape = (value) => {
|
|
|
1185
1221
|
};
|
|
1186
1222
|
|
|
1187
1223
|
function isPromise(value) {
|
|
1188
|
-
return (
|
|
1189
|
-
|
|
1190
|
-
|
|
1224
|
+
return (!!value &&
|
|
1225
|
+
(typeof value === 'object' || typeof value === 'function') &&
|
|
1226
|
+
// eslint-disable-next-line
|
|
1227
|
+
typeof value.then === 'function');
|
|
1191
1228
|
}
|
|
1192
1229
|
|
|
1193
1230
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/typings/global.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/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/config/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/contexts/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/interfaces/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/shapes/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":["// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > typings > global.d.ts\n// Updated: 2026-03-24 12:38\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { SDuXShape } from '../public-api';\n\n/**\n * Extends the global Window object with optional SDuX monitoring and DevTools references.\n * This declaration defines the global attachment points used to expose runtime singletons.\n */\ndeclare global {\n interface Window {\n /**\n * Optional container for globally exposed SDuX runtime instances.\n */\n sdux?: SDuXShape;\n }\n\n /**\n * Optional global reference to SDuX runtime instances.\n */\n var sdux: SDuXShape | undefined;\n}\n\nexport {};\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > dev-mode > testing-environment.util.ts\n// Updated: 2026-03-09 14:47\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > dev-mode > dev-mode.util.ts\n// Updated: 2026-03-09 14:46\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { isTestEnv } from './testing-environment.util';\n\nlet devMode: boolean | null = null;\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > version > version.register.ts\n// Updated: 2026-03-03 07:47\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { SDuXShape } from '../../shapes/sdux/sdux.shape';\nimport { DevMode } from '../dev-mode/dev-mode.util';\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > version > version.register.ts\n// Updated: 2026-03-03 08:12\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { registerVersion } from '../utils/version/version.register';\n\nconst SDUX_PACKAGE = '@sdux-vault/shared';\nconst SDUX_VERSION = '0.0.10';\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 DevPipelineObserver: 'devPipelineObserver',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\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} 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 * --RelatedStart--\n * BehaviorTypes\n * --RelatedEnd--\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > logging > console.type.ts\n// Updated: 2026-03-21 21:00\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > logging > log-level.type.ts\n// Updated: 2026-03-21 21:00\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > logger > logger.util.ts\n// Updated: 2026-03-23 16:50\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport { LogLevelType, LogLevelTypes } from '../../types/logging/log-level.type';\n\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// 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[] = [ConsoleTypes.Error, ConsoleTypes.Warn, ConsoleTypes.Log, ConsoleTypes.Debug];\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\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\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\nexport abstract class AbstractErrorCallbackBehavior<T> 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 abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n *\n * Error behaviors do not allocate runtime resources and therefore require\n * no cleanup. A diagnostic entry is logged for lifecycle visibility.\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 * Error behaviors hold no internal state, making this a no-operation.\n * The hook ensures lifecycle uniformity across all behaviors.\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 * --RelatedStart--\n * ErrorTransformBehaviorContract\n * BehaviorClassContext\n * StateSnapshotShape\n * VaultErrorShape\n * --RelatedEnd--\n */\nexport abstract class AbstractErrorTransformBehavior<T> 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 * ------------------------------------------ */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n constructor() {\n vaultDebug('[VaultPrivateErrorService] initialized (singleton instance created)');\n }\n\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\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\nexport function VaultPrivateErrorService(): VaultPrivateErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultPrivateErrorService] creating new singleton instance');\n _instance = new VaultPrivateErrorClass();\n } else {\n vaultDebug('[VaultPrivateErrorService] returning existing singleton instance');\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\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n #hasErrorState = false;\n\n /** Track internal subscription for cleanup */\n readonly #subscription = new Subscription();\n\n /** Public observable error stream */\n readonly error$ = this.#error$.asObservable();\n\n constructor() {\n vaultDebug('[VaultErrorService] Initializing service and subscribing to private error stream.');\n\n // Mirror the private error service into this one\n const sub = this.#privateVaultErrorService.getError().subscribe((err: VaultErrorShape | null) => {\n vaultDebug(`[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`);\n this.#hasErrorState = !!err;\n this.#error$.next(err);\n });\n\n this.#subscription.add(sub);\n }\n\n get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n// --------------------------------\n// SINGLETON FACTORY (EXPORTED)\n// --------------------------------\n\nlet _instance: VaultErrorServiceClass | null = null;\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\nexport abstract class AbstractActiveController<T> implements ControllerContract<T> {\n readonly key: string;\n abstract readonly type: ControllerType;\n readonly critical = false;\n\n protected hasError = false;\n protected traceId: string | null = null;\n\n #subscription: Subscription;\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(`${this.key} VaultErrorService dispatched event. Raw event: ${safeStringify(error)}.`);\n const newValue = error != null;\n vaultDebug(`${this.key} New transformed error value: \"${newValue}\".`);\n\n const revoteDecision = 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(`${this.key} this.hasError replace with newValue: \"${this.hasError}\".`);\n vaultDebug(`${this.key} onExternalTrigger dispatchd with: \"${newValue}\".`);\n this.onExternalTrigger(newValue);\n\n if (revoteDecision) {\n vaultDebug(`${this.key} Revote Requesed with traceId: \"${this.traceId}\".`);\n this.ctx.requestRevote(this.traceId!);\n }\n })\n )\n .subscribe();\n }\n\n /** Child classes override to react to external error toggles */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /** All controllers must implement this */\n abstract handleMessage(msg: ControllerMessageShape<T>): Observable<ControllerVote | void>;\n\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > abstracts > index.ts\n// Updated: 2026-03-23 17:27\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > config > index.ts\n// Updated: 2026-03-23 16:54\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * CONFIGS\n * --------------------------------------------------------- */\nexport type { InsightConfig } from './insight.config';\nexport type { MergeConfig } from './merge.config';\nexport type { ObjectDeepMergeConfig } from './object-deep-merge.config';\nexport type { VaultConfig } from './vault.config';\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > constants > behavior-meta.constant.ts\n// Updated: 2026-03-28 14:09\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","export const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","// --- AI Model File Path ---\n// libs > shared > src > lib > constants > dev-tools > devtools-aggregate-key.constant.ts\n\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 = 'vault::devtools::aggregate:feature::cell';\n","// --- AI Model File Path ---\n// libs > shared > src > lib > constants > dev-tools > devtools-logging-key.constant.ts\n\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 = 'vault::devtools::logging::feature::cell';\n","export const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","export const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","export const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","export const VAULT_STOP = Symbol.for('VAULT_STOP');\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > constants > public-api.ts\n// Updated: 2026-03-23 18:48\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > contexts > index.ts\n// Updated: 2026-03-23 17:31\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * CONTEXTS\n * --------------------------------------------------------- */\nexport type { BehaviorClassContext } from './behavior-class.context';\nexport type { BehaviorContext } from './behavior.context';\nexport type { ControllerClassContext } from './controller-class.context';\nexport type { ControllerContext } from './controller.context';\nexport type { FeatureCellExtensionContext } from './feature-cell-extension.context';\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\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > decorators > index.ts\n// Updated: 2026-03-23 18:29\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > error > vault-error-name.type.ts\n// Updated: 2026-03-12 11:57\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\nexport type VaultErrorNameType = (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.ts\n// Updated: 2026-03-12 12:08\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorKindType, VaultErrorKindTypes } from '../types/error/vault-error-kind.type';\nimport { VaultErrorNameType, VaultErrorNameTypes } from '../types/error/vault-error-name.type';\n\nexport class VaultError extends Error {\n readonly kind: VaultErrorKindType;\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.encryption.integrity.ts\n// Updated: 2026-03-12\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when encrypted payload integrity verification fails.\n *\n * This occurs when AES-GCM authentication fails during decryption.\n * Causes may include:\n *\n * - Tampered ciphertext\n * - Modified IV\n * - Incorrect encryption key\n * - Corrupted storage payload\n *\n * AES-GCM provides authenticated encryption, so any modification to the\n * encrypted envelope will cause the WebCrypto decrypt operation to throw.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > error > vault-error-usage-kind.type.ts\n// Updated: 2026-03-12 11:57\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\nexport type VaultErrorUsageKindType = (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.license.ts\n// Updated: 2026-03-12 11:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultErrorUsageKindType, VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\nexport class VaultLicenseError extends VaultError {\n constructor(message: string, kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.License) {\n super(message, VaultErrorNameTypes.License, kind);\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultErrorUsageKindType, VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\nexport class VaultUsageError extends VaultError {\n constructor(message: string, kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.usage.promise.ts\n// Updated: 2026-03-12 12:01\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\nexport class VaultUsagePromiseError extends VaultUsageError {\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\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > index.ts\n// Updated: 2026-03-23 17:21\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > interfaces > index.ts\n// Updated: 2026-03-23 18:45\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * BEHAVIOR INTERFACES\n * --------------------------------------------------------- */\nexport type { BehaviorClassContract } from './behaviors/behavior/behavior-class.interface';\nexport type { BehaviorContract, BehaviorExtension, BehaviorExtFunction } from './behaviors/behavior/behavior.interface';\nexport type { CoreEmitStateBehaviorContract } from './behaviors/core-emit-state-behavior.interface';\nexport type { DevPipelineObserverBehaviorContract } from './behaviors/dev/dev-pipeline-observer-behavior.interface';\nexport type { EncryptBehaviorContract } from './behaviors/encrypt-behavior.interface';\nexport type { ErrorCallbackBehaviorContract } from './behaviors/error-callback-behavior.interface';\nexport type { ErrorTransformBehaviorContract } from './behaviors/error-transform-behavior.interface';\nexport type { FeatureCellExtension } from './behaviors/feature-cell-extension.interface';\nexport type { FeatureCellFluentApi } from './behaviors/feature-cell-fluent-api.interface';\nexport type { FilterBehaviorContract } from './behaviors/filter-behavior.interface';\nexport type { InterceptorBehaviorClassContract } from './behaviors/interceptor/interceptor-behavior-class.interface';\nexport type { InterceptorBehaviorContract } from './behaviors/interceptor/interceptor-behavior.interface';\nexport type { MergeBehaviorContract } from './behaviors/merge-behavior.interface';\nexport type { OperatorsBehaviorClassContract } from './behaviors/operator/operator-behavior-class.interface';\nexport type { OperatorBehaviorContract } from './behaviors/operator/operator-behavior.interface';\nexport type { PersistBehaviorContract } from './behaviors/persist-behavior.interface';\nexport type { ReduceBehaviorContract } from './behaviors/reduce-behavior.interface';\nexport type { ResolveBehaviorContract } from './behaviors/resolve-behavior.interface';\nexport type { StepwiseBehaviorContract } from './behaviors/stepwise-behavior.interface';\nexport type { AfterTapBehaviorContract } from './behaviors/tap/after-tap-behavior.interface';\nexport type { BeforeTapBehaviorContract } from './behaviors/tap/before-tap-behavior.interface';\nexport type { CellBuilderContract } from './cell-builder.interface';\nexport type { ControllerClassContract } from './controllers/controller-class.interface';\nexport type { ControllerContract } from './controllers/controller.interface';\nexport type { EventBusContract } from './event/event-bus.interface';\nexport type { VaultErrorServiceContract } from './vault/vault-error-service.interface';\nexport type { VaultMonitorContract } from './vault/vault-monitor.interface';\nexport type { VaultPrivateErrorServiceContract } from './vault/vault-private-error-service.interface';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > shapes > index.ts\n// Updated: 2026-03-23 18:42\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * Shapes\n * --------------------------------------------------------- */\nexport type { BehaviorMetaShape } from './behavior-meta.shape';\nexport type { ControllerAttemptMessageShape } from './controller/controller-attempt-message.shape';\nexport type { ControllerDecisionShape } from './controller/controller-decision.shape';\nexport type { ControllerFailMessageShape } from './controller/controller-fail-message.shape';\nexport type { ControllerFinalizeMessageShape } from './controller/controller-finalize-message.shape';\nexport type { ControllerMessageShape } from './controller/controller-message.shape';\nexport type { ControllerMetaShape } from './controller/controller-meta.shape';\nexport type { ControllerSuccessMessageShape } from './controller/controller-success-message.shape';\nexport type { EventShape } from './event/event.shape';\nexport type { FeatureCellBaseShape } from './feature-cell/feature-cell.base.shape';\nexport type { HttpResourceRefShape } from './http-resource-ref-shape.shape';\nexport type { SDuXShape } from './sdux/sdux.shape';\nexport type { StateEmitSnapshotShape } from './state/state-emit-snapshot.shape';\nexport type { StateInputShape } from './state/state-input.shape';\nexport type { StateSnapshotShape } from './state/state-snapshot.shape';\nexport type { VaultErrorShape } from './vault-error.shape';\nexport type { VaultLicensingShape } from './vault/vault-licensing.shape';\nexport type { VaultRegistrationEntityShape } from './vault/vault-registration.entity.shape';\nexport type { VaultRegistrationFluentApiShape } from './vault/vault-registration.fluent-api.shape';\nexport type { VaultRegistrationShape } from './vault/vault-registration.shape';\n","export const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\nexport type ControllerMessageType = (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","export const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\nexport type ControllerVote = (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","export const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise'\n} as const;\n\nexport type ControllerType = (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","export const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\nexport type DecisionOutcomeType = (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > event > event-boundary.type.ts\n// Updated: 2026-03-10 09:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const EventBoundaryTypes = {\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\nexport type EventBoundaryType = (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > event > event.type.ts\n// Updated: 2026-03-10 09:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","export const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\nexport type OperationType = (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","export 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} as const;\n\nexport type StateEmitType = (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > index.ts\n// Updated: 2026-03-23 18:51\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > behavior > define-behavior-key.util.ts\n// Updated: 2026-03-28 10:46\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\nexport function defineVaultKey(kind: 'Behavior' | 'Controller', domain: string, name: string): string {\n const normalize = (s: string) => 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 = /^SDUX::(Behavior|Controller)::[A-Z][A-Za-z0-9]*::[A-Z][A-Za-z0-9]*$/;\n return pattern.test(key);\n}\n","import { defineVaultKey, validateBehaviorKey } from '../behavior/define-behavior-key.util';\n\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > deferred-factory > is-deferred-factory.util.ts\n// Updated: 2026-03-21 20:36\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { DeferredFactory } from '../../types/state/deferred-factory.type';\n\nexport function isDeferredFactory<T = unknown>(value: unknown): value is DeferredFactory<T> {\n // eslint-disable-next-line\n return !!value && typeof value === 'object' && typeof (value as any).value === 'function';\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(err: unknown, featureCellKey: string): 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 | Same reference, deeply frozen | ✅ Yes | Fallback prevents mutation |\n| **Arrays** | `[1,2,3]` | Deep cloned | Same reference, frozen + elements frozen | ✅ Yes | Structural mutation blocked |\n| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Body & closures mutable |\n| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Internal state mutable |\n| **Dates** | `new Date()` | Cloned | Frozen original | ✅ Yes | Time value preserved |\n| **RegExp** | `/abc/g` | Cloned | Frozen original | ✅ Yes | Pattern preserved |\n| **Error** | `new Error()` | Cloned | Frozen original | ⚠️ Partial | Stack may differ |\n| **Map** | `new Map()` | Deep cloned | Frozen object, entries mutable | ⚠️ Partial | `.set()` still works |\n| **Set** | `new Set()` | Deep cloned | Frozen object, entries mutable | ⚠️ Partial | `.add()` still works |\n| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |\n| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be frozen |\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 | Frozen object | ⚠️ 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 | Frozen original | ✅ Yes | Prototype preserved on clone |\n| **Cyclic Objects** | `{ self }` | Cloned with cycles | Frozen safely | ✅ Yes | WeakSet prevents recursion |\n| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |\n| **Non-enumerable props** | `defineProperty` | Dropped | Frozen but preserved | ⚠️ Partial | Visibility differs |\n| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Frozen but ignored | ⚠️ Partial | Symbols skipped intentionally |\n| **DOM Nodes** | `HTMLElement` | ❌ Throws | Frozen object | ❌ No | Host object semantics |\n| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target | ⚠️ Partial | Depends on handler |\n| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |\n| **JSON-like data** | POJO graphs | 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*/\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\nexport const isolateValue = <T>(value: T): T => {\n if (value === null || typeof value !== 'object') return value;\n\n try {\n // Works even if structuredClone is missing: ReferenceError is caught\n return structuredClone(value);\n } catch {\n return deepFreeze(value);\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\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\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 => 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 => current == null;\n\n// eslint-disable-next-line\nexport const isFunction = (value: unknown): value is (...args: any[]) => unknown => typeof value === 'function';\n\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\nexport const isStateInputShape = <T>(value: unknown): value is StateInputShape<T> => {\n if (value === null || typeof value !== 'object') return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey = 'loading' in v || 'value' in v || 'error' in v;\n\n return hasKnownKey;\n};\n","export function isPromise<T = unknown>(value: unknown): value is Promise<T> {\n return (\n // eslint-disable-next-line\n !!value && (typeof value === 'object' || typeof value === 'function') && 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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > index.ts\n// Updated: 2026-03-24 09:59\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * UTILITY FUNCTIONS (SAFE TO WILDCARD)\n * --------------------------------------------------------- */\nexport { defineBehaviorKey, validateBehaviorKey } from './behavior/define-behavior-key.util';\nexport { defineControllerKey, validateControllerKey } 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 { getVaultLogLevel, setVaultLogLevel, vaultDebug, vaultError, vaultLog, vaultWarn } 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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > public-api.ts\n// Updated: 2026-03-23 16:55\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AAEO,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,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AAQ;AAAE,QAAA,OAAO,KAAK;IAE7D,MAAM,CAAC,GAAG,KAAgC;AAE1C,IAAA,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC;AAElE,IAAA,OAAO,WAAW;AACpB;;ACvEM,SAAU,SAAS,CAAc,KAAc,EAAA;IACnD;;IAEE,CAAC,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC,IAAI,OAAQ,KAAa,CAAC,IAAI,KAAK,UAAU;AAEtH;;ACHA;;;;;;;;;;;;;;;;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;AACA;AACA;AACA;AACA;AACA;AAEA;;AAE+D;;ACT/D;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;AAOG;AAEH;;AAE+D;AAE/D;;AAEG;;ACtBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/typings/global.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/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/config/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/contexts/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/interfaces/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/shapes/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":["// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > typings > global.d.ts\n// Updated: 2026-03-24 12:38\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { SDuXShape } from '../public-api';\n\n/**\n * Extends the global Window object with optional SDuX monitoring and DevTools references.\n * This declaration defines the global attachment points used to expose runtime singletons.\n */\ndeclare global {\n interface Window {\n /**\n * Optional container for globally exposed SDuX runtime instances.\n */\n sdux?: SDuXShape;\n }\n\n /**\n * Optional global reference to SDuX runtime instances.\n */\n var sdux: SDuXShape | undefined;\n}\n\nexport {};\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > dev-mode > testing-environment.util.ts\n// Updated: 2026-03-09 14:47\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > dev-mode > dev-mode.util.ts\n// Updated: 2026-03-09 14:46\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { isTestEnv } from './testing-environment.util';\n\nlet devMode: boolean | null = null;\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > version > version.register.ts\n// Updated: 2026-03-03 07:47\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { SDuXShape } from '../../shapes/sdux/sdux.shape';\nimport { DevMode } from '../dev-mode/dev-mode.util';\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > version > version.register.ts\n// Updated: 2026-03-03 08:12\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { registerVersion } from '../utils/version/version.register';\n\nconst SDUX_PACKAGE = '@sdux-vault/shared';\nconst SDUX_VERSION = '0.0.12';\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 DevPipelineObserver: 'devPipelineObserver',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\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} 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 * --RelatedStart--\n * BehaviorTypes\n * --RelatedEnd--\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > logging > console.type.ts\n// Updated: 2026-03-21 21:00\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > logging > log-level.type.ts\n// Updated: 2026-03-21 21:00\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > logger > logger.util.ts\n// Updated: 2026-03-23 16:50\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport {\n LogLevelType,\n LogLevelTypes\n} from '../../types/logging/log-level.type';\n\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// 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\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\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\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 abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n *\n * Error behaviors do not allocate runtime resources and therefore require\n * no cleanup. A diagnostic entry is logged for lifecycle visibility.\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 * Error behaviors hold no internal state, making this a no-operation.\n * The hook ensures lifecycle uniformity across all behaviors.\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 * --RelatedStart--\n * ErrorTransformBehaviorContract\n * BehaviorClassContext\n * StateSnapshotShape\n * VaultErrorShape\n * --RelatedEnd--\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 * ------------------------------------------ */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n constructor() {\n vaultDebug(\n '[VaultPrivateErrorService] initialized (singleton instance created)'\n );\n }\n\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\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\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\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n #hasErrorState = false;\n\n /** Track internal subscription for cleanup */\n readonly #subscription = new Subscription();\n\n /** Public observable error stream */\n readonly error$ = this.#error$.asObservable();\n\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 get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n// --------------------------------\n// SINGLETON FACTORY (EXPORTED)\n// --------------------------------\n\nlet _instance: VaultErrorServiceClass | null = null;\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\nexport abstract class AbstractActiveController<T>\n implements ControllerContract<T>\n{\n readonly key: string;\n abstract readonly type: ControllerType;\n readonly critical = false;\n\n protected hasError = false;\n protected traceId: string | null = null;\n\n #subscription: Subscription;\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 /** Child classes override to react to external error toggles */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /** All controllers must implement this */\n abstract handleMessage(\n msg: ControllerMessageShape<T>\n ): Observable<ControllerVote | void>;\n\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > abstracts > index.ts\n// Updated: 2026-03-23 17:27\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > config > index.ts\n// Updated: 2026-03-23 16:54\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * CONFIGS\n * --------------------------------------------------------- */\nexport type { InsightConfig } from './insight.config';\nexport type { MergeConfig } from './merge.config';\nexport type { ObjectDeepMergeConfig } from './object-deep-merge.config';\nexport type { VaultConfig } from './vault.config';\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > constants > behavior-meta.constant.ts\n// Updated: 2026-03-28 14:09\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","export const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","// --- AI Model File Path ---\n// libs > shared > src > lib > constants > dev-tools > devtools-aggregate-key.constant.ts\n\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","// --- AI Model File Path ---\n// libs > shared > src > lib > constants > dev-tools > devtools-logging-key.constant.ts\n\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","export const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","export const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","export const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","export const VAULT_STOP = Symbol.for('VAULT_STOP');\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > constants > public-api.ts\n// Updated: 2026-03-23 18:48\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > contexts > index.ts\n// Updated: 2026-03-23 17:31\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * CONTEXTS\n * --------------------------------------------------------- */\nexport type { BehaviorClassContext } from './behavior-class.context';\nexport type { BehaviorContext } from './behavior.context';\nexport type { ControllerClassContext } from './controller-class.context';\nexport type { ControllerContext } from './controller.context';\nexport type { FeatureCellExtensionContext } from './feature-cell-extension.context';\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\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > decorators > index.ts\n// Updated: 2026-03-23 18:29\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > error > vault-error-name.type.ts\n// Updated: 2026-03-12 11:57\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\nexport type VaultErrorNameType =\n (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.ts\n// Updated: 2026-03-12 12:08\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport {\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\nexport class VaultError extends Error {\n readonly kind: VaultErrorKindType;\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.encryption.integrity.ts\n// Updated: 2026-03-12\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when encrypted payload integrity verification fails.\n *\n * This occurs when AES-GCM authentication fails during decryption.\n * Causes may include:\n *\n * - Tampered ciphertext\n * - Modified IV\n * - Incorrect encryption key\n * - Corrupted storage payload\n *\n * AES-GCM provides authenticated encryption, so any modification to the\n * encrypted envelope will cause the WebCrypto decrypt operation to throw.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > error > vault-error-usage-kind.type.ts\n// Updated: 2026-03-12 11:57\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\nexport type VaultErrorUsageKindType =\n (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.license.ts\n// Updated: 2026-03-12 11:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { 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\nexport class VaultLicenseError extends VaultError {\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\nexport class VaultUsageError extends VaultError {\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage\n ) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > vault-error.usage.promise.ts\n// Updated: 2026-03-12 12:01\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\nexport class VaultUsagePromiseError extends VaultUsageError {\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\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > errors > index.ts\n// Updated: 2026-03-23 17:21\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > interfaces > index.ts\n// Updated: 2026-03-23 18:45\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * BEHAVIOR INTERFACES\n * --------------------------------------------------------- */\nexport type { BehaviorClassContract } from './behaviors/behavior/behavior-class.interface';\nexport type {\n BehaviorContract,\n BehaviorExtension,\n BehaviorExtFunction\n} from './behaviors/behavior/behavior.interface';\nexport type { CoreEmitStateBehaviorContract } from './behaviors/core-emit-state-behavior.interface';\nexport type { DevPipelineObserverBehaviorContract } from './behaviors/dev/dev-pipeline-observer-behavior.interface';\nexport type { EncryptBehaviorContract } from './behaviors/encrypt-behavior.interface';\nexport type { ErrorCallbackBehaviorContract } from './behaviors/error-callback-behavior.interface';\nexport type { ErrorTransformBehaviorContract } from './behaviors/error-transform-behavior.interface';\nexport type { FeatureCellExtension } from './behaviors/feature-cell-extension.interface';\nexport type { FeatureCellFluentApi } from './behaviors/feature-cell-fluent-api.interface';\nexport type { FilterBehaviorContract } from './behaviors/filter-behavior.interface';\nexport type { InterceptorBehaviorClassContract } from './behaviors/interceptor/interceptor-behavior-class.interface';\nexport type { InterceptorBehaviorContract } from './behaviors/interceptor/interceptor-behavior.interface';\nexport type { MergeBehaviorContract } from './behaviors/merge-behavior.interface';\nexport type { OperatorsBehaviorClassContract } from './behaviors/operator/operator-behavior-class.interface';\nexport type { OperatorBehaviorContract } from './behaviors/operator/operator-behavior.interface';\nexport type { PersistBehaviorContract } from './behaviors/persist-behavior.interface';\nexport type { ReduceBehaviorContract } from './behaviors/reduce-behavior.interface';\nexport type { ResolveBehaviorContract } from './behaviors/resolve-behavior.interface';\nexport type { StepwiseBehaviorContract } from './behaviors/stepwise-behavior.interface';\nexport type { AfterTapBehaviorContract } from './behaviors/tap/after-tap-behavior.interface';\nexport type { BeforeTapBehaviorContract } from './behaviors/tap/before-tap-behavior.interface';\nexport type { CellBuilderContract } from './cell-builder.interface';\nexport type { ControllerClassContract } from './controllers/controller-class.interface';\nexport type { ControllerContract } from './controllers/controller.interface';\nexport type { EventBusContract } from './event/event-bus.interface';\nexport type { VaultErrorServiceContract } from './vault/vault-error-service.interface';\nexport type { VaultMonitorContract } from './vault/vault-monitor.interface';\nexport type { VaultPrivateErrorServiceContract } from './vault/vault-private-error-service.interface';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > shapes > index.ts\n// Updated: 2026-03-23 18:42\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/* -----------------------------------------------------------\n * Shapes\n * --------------------------------------------------------- */\nexport type { BehaviorMetaShape } from './behavior-meta.shape';\nexport type { ControllerAttemptMessageShape } from './controller/controller-attempt-message.shape';\nexport type { ControllerDecisionShape } from './controller/controller-decision.shape';\nexport type { ControllerFailMessageShape } from './controller/controller-fail-message.shape';\nexport type { ControllerFinalizeMessageShape } from './controller/controller-finalize-message.shape';\nexport type { ControllerMessageShape } from './controller/controller-message.shape';\nexport type { ControllerMetaShape } from './controller/controller-meta.shape';\nexport type { ControllerSuccessMessageShape } from './controller/controller-success-message.shape';\nexport type { EventShape } from './event/event.shape';\nexport type { FeatureCellBaseShape } from './feature-cell/feature-cell.base.shape';\nexport type { HttpResourceRefShape } from './http-resource-ref-shape.shape';\nexport type { SDuXShape } from './sdux/sdux.shape';\nexport type { StateEmitSnapshotShape } from './state/state-emit-snapshot.shape';\nexport type { StateInputShape } from './state/state-input.shape';\nexport type { StateSnapshotShape } from './state/state-snapshot.shape';\nexport type { VaultErrorShape } from './vault-error.shape';\nexport type { VaultLicensingShape } from './vault/vault-licensing.shape';\nexport type { VaultRegistrationEntityShape } from './vault/vault-registration.entity.shape';\nexport type { VaultRegistrationFluentApiShape } from './vault/vault-registration.fluent-api.shape';\nexport type { VaultRegistrationShape } from './vault/vault-registration.shape';\n","export const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\nexport type ControllerMessageType =\n (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","export const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\nexport type ControllerVote =\n (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","export const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise'\n} as const;\n\nexport type ControllerType =\n (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","export const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\nexport type DecisionOutcomeType =\n (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > event > event-boundary.type.ts\n// Updated: 2026-03-10 09:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const EventBoundaryTypes = {\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\nexport type EventBoundaryType =\n (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > event > event.type.ts\n// Updated: 2026-03-10 09:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","export const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\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","export 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} as const;\n\nexport type StateEmitType =\n (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > types > index.ts\n// Updated: 2026-03-23 18:51\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > behavior > define-behavior-key.util.ts\n// Updated: 2026-03-28 10:46\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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\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\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > deferred-factory > is-deferred-factory.util.ts\n// Updated: 2026-03-21 20:36\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { DeferredFactory } from '../../types/state/deferred-factory.type';\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > isolate-value > isolate-value.util.ts\n// Updated: 2026-04-07 15:49\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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\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\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\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\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\nexport const isFunction = (\n value: unknown\n): // eslint-disable-next-line\nvalue is (...args: any[]) => unknown => typeof value === 'function';\n\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\nexport const isStateInputShape = <T>(\n value: unknown\n): value is StateInputShape<T> => {\n if (value === null || typeof value !== 'object') return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey = 'loading' in v || 'value' in v || 'error' in v;\n\n return hasKnownKey;\n};\n","export 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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > lib > utils > index.ts\n// Updated: 2026-03-24 09:59\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\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","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > shared > src > public-api.ts\n// Updated: 2026-03-23 16:55\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\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;AACA;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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;AACA;AACA;AACA;AACA;AACA;AAEA;;AAE+D;;ACT/D;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;AAOG;AAEH;;AAE+D;AAE/D;;AAEG;;ACtBH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1395,6 +1395,46 @@ interface PersistBehaviorContract<T> extends BehaviorContract<T> {
|
|
|
1395
1395
|
loadState(): PipelinePersistValue<T>;
|
|
1396
1396
|
}
|
|
1397
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* Comparison function used by withDistinctUntilChanged to determine
|
|
1400
|
+
* whether the new incoming value should be considered equal to the
|
|
1401
|
+
* previously emitted value.
|
|
1402
|
+
*
|
|
1403
|
+
* @typeParam T - The value type being compared.
|
|
1404
|
+
*/
|
|
1405
|
+
type DistinctComparison<T> = (a: T, b: T) => boolean;
|
|
1406
|
+
|
|
1407
|
+
declare const EventBoundaryTypes: {
|
|
1408
|
+
readonly End: "end";
|
|
1409
|
+
readonly Notification: "notification";
|
|
1410
|
+
readonly Start: "start";
|
|
1411
|
+
readonly Unknown: "unknown";
|
|
1412
|
+
};
|
|
1413
|
+
type EventBoundaryType = (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];
|
|
1414
|
+
|
|
1415
|
+
declare const EventTypes: {
|
|
1416
|
+
readonly Conductor: "conductor";
|
|
1417
|
+
readonly Controller: "controller";
|
|
1418
|
+
readonly Lifecycle: "lifecycle";
|
|
1419
|
+
readonly Stage: "stage";
|
|
1420
|
+
readonly Unknown: "unknown";
|
|
1421
|
+
};
|
|
1422
|
+
type EventType = (typeof EventTypes)[keyof typeof EventTypes];
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* Represents the final UI-facing value flowing out of a FeatureCell.
|
|
1426
|
+
*
|
|
1427
|
+
* A `PipelineValue<T>` is the resolved form of state after all
|
|
1428
|
+
* pipeline stages
|
|
1429
|
+
*
|
|
1430
|
+
* Unlike internal pipeline values, this UI-facing type never includes
|
|
1431
|
+
*
|
|
1432
|
+
* @typeParam T - The underlying state type maintained by the FeatureCell.
|
|
1433
|
+
*/
|
|
1434
|
+
type PipelineValue<T> = T | undefined;
|
|
1435
|
+
|
|
1436
|
+
type FinalState<T> = PipelineUpstreamValue<T> | typeof VAULT_STOP;
|
|
1437
|
+
|
|
1398
1438
|
interface ReduceBehaviorContract<T> extends BehaviorContract<T> {
|
|
1399
1439
|
/** Pipeline behavior type identifier for reducer-stage execution. */
|
|
1400
1440
|
type: 'reduce';
|
|
@@ -1405,7 +1445,7 @@ interface ReduceBehaviorContract<T> extends BehaviorContract<T> {
|
|
|
1405
1445
|
* @param reducer - A pure reducer function returning a new state value.
|
|
1406
1446
|
* @returns The transformed state value.
|
|
1407
1447
|
*/
|
|
1408
|
-
applyReducer(current: T
|
|
1448
|
+
applyReducer(current: PipelineUpstreamValue<T>, reducer: ReducerFunction<T>): T;
|
|
1409
1449
|
}
|
|
1410
1450
|
|
|
1411
1451
|
interface ResolveBehaviorContract<T> extends BehaviorContract<T> {
|
|
@@ -1434,23 +1474,6 @@ interface ControllerClassContract<T = any> {
|
|
|
1434
1474
|
installFluentApi?: <T>(cell: FeatureCellBaseShape<T>, behaviorConfigs: Map<string, unknown>) => void;
|
|
1435
1475
|
}
|
|
1436
1476
|
|
|
1437
|
-
declare const EventBoundaryTypes: {
|
|
1438
|
-
readonly End: "end";
|
|
1439
|
-
readonly Notification: "notification";
|
|
1440
|
-
readonly Start: "start";
|
|
1441
|
-
readonly Unknown: "unknown";
|
|
1442
|
-
};
|
|
1443
|
-
type EventBoundaryType = (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];
|
|
1444
|
-
|
|
1445
|
-
declare const EventTypes: {
|
|
1446
|
-
readonly Conductor: "conductor";
|
|
1447
|
-
readonly Controller: "controller";
|
|
1448
|
-
readonly Lifecycle: "lifecycle";
|
|
1449
|
-
readonly Stage: "stage";
|
|
1450
|
-
readonly Unknown: "unknown";
|
|
1451
|
-
};
|
|
1452
|
-
type EventType = (typeof EventTypes)[keyof typeof EventTypes];
|
|
1453
|
-
|
|
1454
1477
|
/**
|
|
1455
1478
|
* Describes the shape of a pipeline event emitted during FeatureCell execution.
|
|
1456
1479
|
* This interface defines the core event contract used for diagnostics, Devtools inspection, and lifecycle tracking.
|
|
@@ -1600,29 +1623,6 @@ interface SDuXShape {
|
|
|
1600
1623
|
};
|
|
1601
1624
|
}
|
|
1602
1625
|
|
|
1603
|
-
/**
|
|
1604
|
-
* Comparison function used by withDistinctUntilChanged to determine
|
|
1605
|
-
* whether the new incoming value should be considered equal to the
|
|
1606
|
-
* previously emitted value.
|
|
1607
|
-
*
|
|
1608
|
-
* @typeParam T - The value type being compared.
|
|
1609
|
-
*/
|
|
1610
|
-
type DistinctComparison<T> = (a: T, b: T) => boolean;
|
|
1611
|
-
|
|
1612
|
-
/**
|
|
1613
|
-
* Represents the final UI-facing value flowing out of a FeatureCell.
|
|
1614
|
-
*
|
|
1615
|
-
* A `PipelineValue<T>` is the resolved form of state after all
|
|
1616
|
-
* pipeline stages
|
|
1617
|
-
*
|
|
1618
|
-
* Unlike internal pipeline values, this UI-facing type never includes
|
|
1619
|
-
*
|
|
1620
|
-
* @typeParam T - The underlying state type maintained by the FeatureCell.
|
|
1621
|
-
*/
|
|
1622
|
-
type PipelineValue<T> = T | undefined;
|
|
1623
|
-
|
|
1624
|
-
type FinalState<T> = PipelineUpstreamValue<T> | typeof VAULT_STOP;
|
|
1625
|
-
|
|
1626
1626
|
/**
|
|
1627
1627
|
* Creates a normalized behavior key identifier used for behavior registration.
|
|
1628
1628
|
*
|