@sdux-vault/shared 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -209
- package/fesm2022/sdux-vault-shared.mjs +1 -1
- package/fesm2022/sdux-vault-shared.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,80 +1,61 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/sdux-vault/vault/main/apps/docs-app/assets/brand/sdux/brand-landscape.svg" height="80" alt="SDuX Vault" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
>
|
|
5
|
+
<h3 align="center">Plain TypeScript. Zero Magic.</h3>
|
|
6
|
+
<p align="center">Deterministic state management for every framework — one pipeline, zero ambiguity.</p>
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
It defines the universal language used across all SDuX packages, including types, contracts, behaviors, and utilities.
|
|
8
|
+
# @sdux-vault/shared
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
> Core primitives, contracts, and utilities for the SDuX Vault platform.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.sdux-vault.com"><strong>Docs</strong></a> ·
|
|
14
|
+
<a href="https://www.sdux-vault.com/stackblitz"><strong>Live Examples</strong></a> ·
|
|
15
|
+
<a href="https://www.sdux-vault.com/builder"><strong>Pipeline Builder</strong></a> ·
|
|
16
|
+
<a href="https://github.com/sdux-vault/vault/issues"><strong>Issues</strong></a>
|
|
17
|
+
</p>
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
https://
|
|
19
|
+
<p align="center">
|
|
20
|
+
<img src="https://img.shields.io/badge/license-MIT-blue" alt="License" />
|
|
21
|
+
<img src="https://img.shields.io/badge/TypeScript-first-3178C6?logo=typescript&logoColor=white" alt="TypeScript" />
|
|
22
|
+
<img src="https://img.shields.io/badge/frameworks-Angular%20·%20React%20·%20Vue%20·%20Svelte%20·%20Node-333" alt="Frameworks" />
|
|
23
|
+
</p>
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
## What is SDuX Vault?
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
SDuX Vault is a **framework-agnostic, deterministic state management system** built around a reactive execution pipeline. It replaces the unpredictable sprawl of action/reducer architectures with a single, ordered, traceable pipeline where every transition is explicit and every output is guaranteed.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
## What is SDuX Vault Shared?
|
|
20
30
|
|
|
21
|
-
|
|
22
|
-
shared → engine → core → core-extensions → apps
|
|
23
|
-
└─────────---------───────────→ devtools
|
|
24
|
-
```
|
|
31
|
+
`@sdux-vault/shared` is the **foundation of the SDuX ecosystem**. It defines the universal language used across all SDuX packages — types, contracts, behaviors, and utilities. Every SDuX package depends on `shared`. It is the lowest layer in the dependency graph and has **zero external dependencies**.
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
- **core** → behavior runtime + execution layer
|
|
28
|
-
- **core-extensions** → framework integrations (Angular, React, etc.)
|
|
29
|
-
- **devtools** → end-user tooling
|
|
30
|
-
- **engine** → runtime engine and orchestration
|
|
31
|
-
- **shared** → contracts, types, utilities (this package)
|
|
33
|
+
**Features:**
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
- **Core contracts** — interfaces, shapes, and types that define the SDuX API surface
|
|
36
|
+
- **Behavior and controller abstractions** — base types for pipeline stages
|
|
37
|
+
- **Utility functions** — type guards, safe helpers, runtime utilities
|
|
38
|
+
- **Configuration primitives** — options, settings, and feature flags
|
|
39
|
+
- **Error models** — structured error types and services
|
|
40
|
+
- **Runtime instrumentation hooks** — DevTools integration points
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
**Key Characteristics:**
|
|
36
43
|
|
|
37
|
-
-
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **Error models and services**
|
|
42
|
-
- **Runtime instrumentation hooks (DevTools integration)**
|
|
44
|
+
- ✅ **Framework-agnostic** — pure TypeScript, zero dependencies
|
|
45
|
+
- ✅ **Tree-shakable** — domain-based exports, minimal runtime footprint
|
|
46
|
+
- ✅ **SSR-safe and browser-safe** — works everywhere
|
|
47
|
+
- ✅ **Stable public API** — domain-driven, designed for composition
|
|
43
48
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## Key Characteristics
|
|
47
|
-
|
|
48
|
-
- ✅ Framework-agnostic TypeScript
|
|
49
|
-
- ✅ Tree-shakable
|
|
50
|
-
- ✅ SSR-safe and browser-safe
|
|
51
|
-
- ✅ Designed for composition and extensibility
|
|
52
|
-
- ✅ Stable, domain-driven public API
|
|
49
|
+
For full documentation, guides, and API references: [sdux-vault.com](https://www.sdux-vault.com)
|
|
53
50
|
|
|
54
51
|
---
|
|
55
52
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm install @sdux-vault/shared
|
|
60
|
-
```
|
|
53
|
+
## Example
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Usage
|
|
65
|
-
|
|
66
|
-
### Basic Import
|
|
67
|
-
|
|
68
|
-
```ts
|
|
55
|
+
```typescript
|
|
69
56
|
import { VaultError, BehaviorTypes } from '@sdux-vault/shared';
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
### Example: Utility Usage
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
57
|
import { isPromise } from '@sdux-vault/shared';
|
|
58
|
+
import type { BehaviorType, StateSnapshotShape } from '@sdux-vault/shared';
|
|
78
59
|
|
|
79
60
|
if (isPromise(value)) {
|
|
80
61
|
// handle async flow
|
|
@@ -83,176 +64,39 @@ if (isPromise(value)) {
|
|
|
83
64
|
|
|
84
65
|
---
|
|
85
66
|
|
|
86
|
-
### Example: Type Usage
|
|
87
|
-
|
|
88
|
-
```ts
|
|
89
|
-
import type { BehaviorType } from '@sdux-vault/shared';
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Public API Structure
|
|
95
|
-
|
|
96
|
-
### Tree-Shakable by Default
|
|
97
|
-
|
|
98
|
-
- No unnecessary side effects
|
|
99
|
-
- Domain-based exports
|
|
100
|
-
- Minimal runtime footprint
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
### Framework-Agnostic Core
|
|
105
|
-
|
|
106
|
-
This package:
|
|
107
|
-
|
|
108
|
-
- has zero framework dependencies
|
|
109
|
-
- supports multiple adapters
|
|
110
|
-
- acts as the foundation for integrations like:
|
|
111
|
-
|
|
112
|
-
```plaintext
|
|
113
|
-
@sdux-vault/core-extensions/*
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
### Safe Runtime Instrumentation
|
|
119
|
-
|
|
120
|
-
Includes dev-only instrumentation:
|
|
121
|
-
|
|
122
|
-
- version registration
|
|
123
|
-
- DevTools integration
|
|
124
|
-
|
|
125
|
-
These are:
|
|
126
|
-
|
|
127
|
-
- environment guarded
|
|
128
|
-
- idempotent
|
|
129
|
-
- safe in SSR and production
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Environment Utilities
|
|
134
|
-
|
|
135
|
-
```ts
|
|
136
|
-
import { DevMode } from '@sdux-vault/shared';
|
|
137
|
-
import { isTestEnv } from '@sdux-vault/shared';
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Provides runtime awareness for:
|
|
141
|
-
|
|
142
|
-
- development mode
|
|
143
|
-
- test environments
|
|
144
|
-
|
|
145
|
-
These are part of the **runtime platform**, not test-only helpers.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Utilities
|
|
150
|
-
|
|
151
|
-
The `utils` domain includes:
|
|
152
|
-
|
|
153
|
-
- type guards
|
|
154
|
-
- safe helpers
|
|
155
|
-
- logging utilities
|
|
156
|
-
- runtime helpers
|
|
157
|
-
|
|
158
|
-
All utilities are:
|
|
159
|
-
|
|
160
|
-
- side-effect free (except controlled instrumentation)
|
|
161
|
-
- safe for universal usage
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
67
|
## Side Effects
|
|
166
68
|
|
|
167
|
-
This package
|
|
168
|
-
|
|
169
|
-
```ts
|
|
170
|
-
import '@sdux-vault/shared';
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Triggers:
|
|
174
|
-
|
|
175
|
-
- version registration for DevTools
|
|
176
|
-
|
|
177
|
-
Behavior:
|
|
178
|
-
|
|
179
|
-
- no-op in production
|
|
180
|
-
- idempotent
|
|
181
|
-
- safe across all runtimes
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Development
|
|
186
|
-
|
|
187
|
-
### Build
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
npm run build:shared
|
|
191
|
-
```
|
|
69
|
+
This package includes intentional side effects for:
|
|
192
70
|
|
|
193
|
-
|
|
71
|
+
- Global TypeScript typing augmentation
|
|
72
|
+
- Runtime version registration for DevTools
|
|
194
73
|
|
|
195
|
-
|
|
196
|
-
dist/shared
|
|
197
|
-
```
|
|
74
|
+
These are environment-guarded, idempotent, and safe in SSR and production.
|
|
198
75
|
|
|
199
76
|
---
|
|
200
77
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
npm run test:shared
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
---
|
|
78
|
+
## Installation
|
|
208
79
|
|
|
209
|
-
|
|
80
|
+
This package is installed automatically as a dependency of `@sdux-vault/core`.
|
|
210
81
|
|
|
211
82
|
```bash
|
|
212
|
-
npm
|
|
83
|
+
npm install @sdux-vault/core
|
|
213
84
|
```
|
|
214
85
|
|
|
215
|
-
Includes:
|
|
216
|
-
|
|
217
|
-
- linting
|
|
218
|
-
- formatting
|
|
219
|
-
- type checking
|
|
220
|
-
- tests
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Publishing
|
|
225
|
-
|
|
226
|
-
See [RELEASE.md](./RELEASE.md) for full publishing instructions.
|
|
227
|
-
|
|
228
86
|
---
|
|
229
87
|
|
|
230
88
|
## Ecosystem
|
|
231
89
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
### Tree Shaking & Side Effects
|
|
241
|
-
|
|
242
|
-
This package includes intentional side effects for:
|
|
243
|
-
|
|
244
|
-
- global TypeScript typing augmentation
|
|
245
|
-
- runtime version registration for devtools
|
|
246
|
-
|
|
247
|
-
These are required for correct framework behavior.
|
|
248
|
-
|
|
249
|
-
As a result, the bundle is marked as side-effectful.
|
|
90
|
+
| Package | Purpose |
|
|
91
|
+
| -------------------------------------------------------------------------------------------- | -------------------------------------------- |
|
|
92
|
+
| [`@sdux-vault/engine`](https://www.npmjs.com/package/@sdux-vault/engine) | Orchestration, conductor, decision engine |
|
|
93
|
+
| [`@sdux-vault/core`](https://www.npmjs.com/package/@sdux-vault/core) | Behavior runtime and pipeline execution |
|
|
94
|
+
| [`@sdux-vault/addons`](https://www.npmjs.com/package/@sdux-vault/addons) | Optional runtime policies and controllers |
|
|
95
|
+
| [`@sdux-vault/core-extensions`](https://www.npmjs.com/package/@sdux-vault/core-extensions) | Framework integrations (Angular, React, Vue) |
|
|
96
|
+
| [`@sdux-vault/devtools-tooling`](https://www.npmjs.com/package/@sdux-vault/devtools-tooling) | Observability and debugging |
|
|
250
97
|
|
|
251
98
|
---
|
|
252
99
|
|
|
253
100
|
## License
|
|
254
101
|
|
|
255
|
-
|
|
256
|
-
https://www.sdux-vault.com/docs/welcome/license#license-texts
|
|
257
|
-
|
|
258
|
-
MIT © SDuX Vault
|
|
102
|
+
[MIT (with SDuX Clarification Notice)](https://www.sdux-vault.com/docs/welcome/license#license-texts) © SDuX Vault
|
|
@@ -50,7 +50,7 @@ const registerVersion = (packageName, version) => {
|
|
|
50
50
|
/** Package name used for version registration. */
|
|
51
51
|
const SDUX_PACKAGE = '@sdux-vault/shared';
|
|
52
52
|
/** Current package version string. */
|
|
53
|
-
const SDUX_VERSION = '0.
|
|
53
|
+
const SDUX_VERSION = '0.9.0';
|
|
54
54
|
registerVersion(SDUX_PACKAGE, SDUX_VERSION);
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/lib/utils/dev-mode/testing-environment.util.ts","../../../libs/shared/src/lib/utils/dev-mode/dev-mode.util.ts","../../../libs/shared/src/lib/utils/version/version.register.ts","../../../libs/shared/src/lib/version/version.register.ts","../../../libs/shared/src/lib/types/behavior/behavior.type.ts","../../../libs/shared/src/lib/types/logging/console.type.ts","../../../libs/shared/src/lib/types/logging/log-level.type.ts","../../../libs/shared/src/lib/utils/logger/logger.util.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-callback.abstract.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-transform.abstract.ts","../../../libs/shared/src/lib/utils/safe-stringify/safe-stringify.util.ts","../../../libs/shared/src/lib/services/error/vault-private-error.service.ts","../../../libs/shared/src/lib/services/error/vault-error.service.ts","../../../libs/shared/src/lib/abstracts/controllers/active-controller.abstract.ts","../../../libs/shared/src/lib/abstracts/index.ts","../../../libs/shared/src/lib/constants/behavior-meta.constant.ts","../../../libs/shared/src/lib/constants/controller-meta.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-aggregate-key.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-logging-key.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-clear-state.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-continue.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-noop.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-stop.constant.ts","../../../libs/shared/src/lib/constants/index.ts","../../../libs/shared/src/lib/decorators/vault-behavior.decorator.ts","../../../libs/shared/src/lib/decorators/vault-controller.decorator.ts","../../../libs/shared/src/lib/decorators/index.ts","../../../libs/shared/src/lib/types/error/vault-error-kind.type.ts","../../../libs/shared/src/lib/types/error/vault-error-name.type.ts","../../../libs/shared/src/lib/errors/vault-error.ts","../../../libs/shared/src/lib/errors/vault-error.encryption-integrity.ts","../../../libs/shared/src/lib/types/error/vault-error-usage-kind.type.ts","../../../libs/shared/src/lib/errors/vault-error.license.ts","../../../libs/shared/src/lib/errors/vault-error.usage.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise-factory-required.ts","../../../libs/shared/src/lib/errors/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/types/controller/controller-message.type.ts","../../../libs/shared/src/lib/types/controller/controller-vote.type.ts","../../../libs/shared/src/lib/types/controller/controller.type.ts","../../../libs/shared/src/lib/types/controller/decision-outcome.type.ts","../../../libs/shared/src/lib/types/event/event-boundary.type.ts","../../../libs/shared/src/lib/types/event/event.type.ts","../../../libs/shared/src/lib/types/operation.type.ts","../../../libs/shared/src/lib/types/resolve.type.ts","../../../libs/shared/src/lib/types/state/state-emit.type.ts","../../../libs/shared/src/lib/types/index.ts","../../../libs/shared/src/lib/utils/behavior/define-behavior-key.util.ts","../../../libs/shared/src/lib/utils/controller/define-controller-key.util.ts","../../../libs/shared/src/lib/utils/deferred-factory/is-deferred-factory.util.ts","../../../libs/shared/src/lib/utils/error/create-vault-error.util.ts","../../../libs/shared/src/lib/utils/isolate-value/isolate-value.util.ts","../../../libs/shared/src/lib/utils/logic/logic.utils.ts","../../../libs/shared/src/lib/utils/promise/is-promise.util.ts","../../../libs/shared/src/lib/utils/resolve/is-http-resource.util.ts","../../../libs/shared/src/lib/utils/index.ts","../../../libs/shared/src/public-api.ts","../../../libs/shared/src/sdux-vault-shared.ts"],"sourcesContent":["/** Singleton accessor that detects whether code is running in a test environment. */\nexport const isTestEnv = {\n get active(): boolean {\n return (\n // eslint-disable-next-line\n typeof (globalThis as any).jasmine !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).jest !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).vitest !== 'undefined'\n );\n }\n};\n","import { isTestEnv } from './testing-environment.util';\n\n/** Tracks whether Vault development mode has been enabled. */\nlet devMode: boolean | null = null;\n\n/** Singleton accessor for Vault development mode state. */\nexport const DevMode = {\n get active(): boolean {\n return devMode === true;\n },\n\n setDevMode(isDevMode: boolean): void {\n if (devMode !== null && !isTestEnv.active) {\n throw new Error('[vault] DevMode has already been initialized.');\n }\n\n devMode = isDevMode;\n }\n};\n","import { SDuXShape } from '../../shapes/sdux/sdux.shape';\nimport { DevMode } from '../dev-mode/dev-mode.util';\n\n/**\n * Registers a package version on the global SDuX debug widget when dev mode is active.\n *\n * @param packageName - The npm package name to register.\n * @param version - The semver version string.\n */\nexport const registerVersion = (packageName: string, version: string): void => {\n if (!DevMode.active || typeof globalThis === 'undefined') return;\n\n const sdux = (globalThis.sdux ??= {} as SDuXShape);\n const debug = (sdux.debugWidget ??= {});\n const versions = (debug.versions ??= {});\n\n if (versions[packageName] === version) return;\n\n versions[packageName] = version;\n};\n","import { registerVersion } from '../utils/version/version.register';\n\n/** Package name used for version registration. */\nconst SDUX_PACKAGE = '@sdux-vault/shared';\n\n/** Current package version string. */\nconst SDUX_VERSION = '0.7.0';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","/**\n * Runtime-safe registry of all behavior types.\n *\n * This object acts as an enum substitute without introducing JavaScript enum\n * overhead.\n * Values are string literals preserved at runtime and suitable for\n * switch statements, comparisons, and pipeline classification.\n * Each key maps 1:1 to its string literal value.\n * The structure is fully tree-shakable and safely inferable by TypeScript.\n */\nexport const BehaviorTypes = {\n CoreAfterTap: 'coreAfterTap',\n CoreBeforeTap: 'coreBeforeTap',\n ReplayGlobalError: 'replayGlobalError',\n CoreError: 'coreError',\n CoreErrorCallback: 'coreErrorCallback',\n CoreState: 'coreState',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\n CoreLicense: 'coreLicense',\n ErrorTransform: 'errorTransform',\n Extension: 'extension',\n Filter: 'filter',\n FromObservable: 'fromObservable',\n FromPromise: 'fromPromise',\n FromStream: 'fromStream',\n Interceptor: 'interceptor',\n Merge: 'merge',\n Operator: 'operator',\n Persist: 'persist',\n Reduce: 'reduce',\n Resolve: 'resolve',\n StepwiseFilter: 'stepwiseFilter',\n StepwiseReducer: 'stepwiseReducer',\n StepwiseResolve: 'stepwiseResolve',\n TabSyncState: 'tabSyncState'\n} as const;\n\n/**\n * Union of all valid behavior type strings.\n *\n * This type is derived from `BehaviorTypes` using literal inference, ensuring\n * strong typing while preserving full runtime compatibility.\n * This type should not be manually extended—add new values to `BehaviorTypes`\n * instead.\n *\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of console output severity levels. */\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from ConsoleTypes values. */\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of Vault log verbosity levels. */\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from LogLevelTypes values. */\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","import { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport {\n LogLevelType,\n LogLevelTypes\n} from '../../types/logging/log-level.type';\n\n/** Current log level threshold controlling which messages are emitted. */\nlet _logLevel: LogLevelType = LogLevelTypes.Off;\n\n/**\n * Prefix applied to all vault-related console output. Used to keep log\n * messages consistently identifiable across all log levels.\n */\nconst LOG_PREFIX = '[vault]';\n\n/**\n * Routes a log message to the console if the current log level permits it.\n *\n * @param level - The console severity level for this message.\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nfunction push(level: ConsoleType, ...args: any[]): void {\n const logLevel = getVaultLogLevel();\n\n if (logLevel === LogLevelTypes.Off) return;\n\n const levels: ConsoleType[] = [\n ConsoleTypes.Error,\n ConsoleTypes.Warn,\n ConsoleTypes.Log,\n ConsoleTypes.Debug\n ];\n\n const allowed = levels.indexOf(level) <= levels.indexOf(logLevel!);\n\n if (!allowed) return;\n\n // eslint-disable-next-line\n console[level](LOG_PREFIX, ...args);\n}\n\n/**\n * Emits an `error`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultError = (...args: any[]) => push('error', ...args);\n\n/**\n * Emits a `warn`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultWarn = (...args: any[]) => push('warn', ...args);\n\n/**\n * Emits a `log`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultLog = (...args: any[]) => push('log', ...args);\n\n/**\n * Emits a `debug`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultDebug = (...args: any[]) => push('debug', ...args);\n\n/**\n * Sets the global Vault log level threshold.\n *\n * @param level - The log level to apply.\n */\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\n\n/**\n * Returns the current global Vault log level.\n *\n * @returns The active log level threshold.\n */\nexport function getVaultLogLevel(): LogLevelType {\n return _logLevel;\n}\n","import { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorCallbackBehaviorContract } from '../../../interfaces/behaviors/error-callback-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { VaultErrorCallback } from '../../../types/callback/vault-error-callback.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base class for error callback behaviors that execute consumer-supplied\n * error handlers during the error stage of the Vault pipeline.\n */\nexport abstract class AbstractErrorCallbackBehavior<T>\n implements ErrorCallbackBehaviorContract<T>\n{\n /** Indicates that this error behavior is critical and always executed. */\n readonly critical!: boolean;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Behavior type for orchestrator registration. */\n readonly type = BehaviorTypes.CoreErrorCallback;\n\n /**\n * Creates a new abstract error behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the behavior factory.\n * @param behaviorCtx - Behavior class context providing injector access and extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes the consumer-supplied error callback against the current error and state.\n *\n * @param current - The error shape describing the pipeline failure.\n * @param state - The state snapshot at the time of the error.\n * @param oldschoolCallback - Consumer-supplied error callback to invoke.\n * @returns A promise that resolves when the callback completes.\n */\n abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Teardown hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the error behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { VAULT_NOOP } from '../../../constants/vault/vault-noop.constant';\nimport { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorTransformBehaviorContract } from '../../../interfaces/behaviors/error-transform-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base behavior for transforming errors during pipeline execution.\n * This class defines the contract and lifecycle hooks required for error transformation behaviors.\n *\n */\nexport abstract class AbstractErrorTransformBehavior<T>\n implements ErrorTransformBehaviorContract<T>\n{\n /**\n * Indicates that this error transform behavior is critical and always executed.\n */\n readonly critical!: boolean;\n\n /**\n * Unique identifier for this behavior instance.\n */\n readonly key: string;\n\n /**\n * Behavior type identifier used for orchestrator registration.\n */\n readonly type = BehaviorTypes.ErrorTransform;\n\n /**\n * Creates a new abstract error transform behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context providing configuration and hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Transforms an error produced during pipeline execution.\n *\n * @param error Incoming error value to be transformed.\n * @param current Current normalized Vault error value.\n * @param previousStateSnapshot Snapshot of state prior to the error.\n * @returns Transformed error, original error, or VAULT_NOOP to suppress emission.\n */\n abstract transformError(\n error: unknown,\n current: VaultErrorShape,\n previousStateSnapshot: StateSnapshotShape<T>\n ): Promise<unknown | typeof VAULT_NOOP>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Lifecycle hook invoked when the behavior instance is reset.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/**\n * Safely converts an arbitrary value into a JSON string representation.\n *\n * This function wraps `JSON.stringify` with enhanced handling for non-serializable\n * values, including:\n * - functions\n * - `Error` objects\n * - `Map` and `Set` instances\n * - circular references\n *\n * If serialization fails for any reason, a fallback string `\"[unserializable]\"`\n * is returned. The replacer ensures stable and predictable stringification for\n * use in logging and debugging utilities.\n *\n * @param value - The value to stringify safely.\n * @returns A JSON-formatted string or a fallback indicator.\n */\nexport function safeStringify(value: unknown): string {\n try {\n return JSON.stringify(value, jsonSafeReplacer, 2);\n } catch {\n return '[unserializable]';\n }\n}\n\n/**\n * Replacer function used by `safeStringify` to handle values that are normally\n * not serializable via `JSON.stringify`.\n *\n * It converts functions, errors, `Map`, and `Set` values into safe structures\n * and detects circular references. If a value cannot be serialized, a fallback\n * marker string is returned.\n *\n * @param _key - The property key being processed (unused).\n * @param val - The value associated with the key.\n * @returns A serializable representation of the value.\n */\n\nfunction jsonSafeReplacer(_key: string, val: unknown) {\n if (typeof val === 'function') return '[Function]';\n if (val instanceof Error) return { message: val.message, stack: val.stack };\n if (val instanceof Map) return { map: Array.from(val.entries()) };\n if (val instanceof Set) return { set: Array.from(val.values()) };\n\n // Avoid circular references\n try {\n JSON.stringify(val);\n return val;\n } catch {\n return '[Circular]';\n }\n}\n","import { BehaviorSubject, Observable } from 'rxjs';\nimport { VaultPrivateErrorServiceContract } from '../../interfaces/vault/vault-private-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/** ------------------------------------------\n * INTERNAL CLASS (NOT EXPORTED)\n * ------------------------------------------ */\n/**\n * Internal singleton error service that holds the current Vault error state.\n * Not exported directly; consumed exclusively by the public VaultErrorService.\n */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n /** Subject backing the private error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Initializes the private error service singleton. */\n constructor() {\n vaultDebug(\n '[VaultPrivateErrorService] initialized (singleton instance created)'\n );\n }\n\n /**\n * Publishes a new error or clears the current error.\n *\n * @param error - The error shape to publish, or null to clear.\n */\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n /**\n * Returns an observable of the current error state.\n *\n * @returns Observable emitting the current error or null.\n */\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\n /** Resets the error state to null. */\n clear(): void {\n vaultDebug('[VaultPrivateErrorService] clear() → error reset to null');\n this.#error$.next(null);\n }\n}\n\n/** ------------------------------------------\n * SINGLETON FACTORY (EXPORTED)\n * ------------------------------------------ */\nlet _instance: VaultPrivateErrorServiceContract | null = null;\n\n/**\n * Returns the singleton VaultPrivateErrorService instance, creating it on first call.\n *\n * @returns The shared private error service instance.\n */\nexport function VaultPrivateErrorService(): VaultPrivateErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultPrivateErrorService] creating new singleton instance');\n _instance = new VaultPrivateErrorClass();\n } else {\n vaultDebug(\n '[VaultPrivateErrorService] returning existing singleton instance'\n );\n }\n return _instance;\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { VaultErrorServiceContract } from '../../interfaces/vault/vault-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { VaultPrivateErrorService } from './vault-private-error.service';\n\n/**\n * Singleton service that aggregates and exposes the current Vault error state.\n * Subscribes to the private error service and mirrors updates through a public\n * observable stream for consumer consumption.\n */\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n /** Internal delegate responsible for low-level error state management. */\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n /** Subject backing the public error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Tracks whether an active error is currently held. */\n #hasErrorState = false;\n\n /** Aggregate subscription used for cleanup on teardown. */\n readonly #subscription = new Subscription();\n\n /** Public observable stream of the current error state. */\n readonly error$ = this.#error$.asObservable();\n\n /** Initializes the service and subscribes to the private error stream. */\n constructor() {\n vaultDebug(\n '[VaultErrorService] Initializing service and subscribing to private error stream.'\n );\n\n // Mirror the private error service into this one\n const sub = this.#privateVaultErrorService\n .getError()\n .subscribe((err: VaultErrorShape | null) => {\n vaultDebug(\n `[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`\n );\n this.#hasErrorState = !!err;\n this.#error$.next(err);\n });\n\n this.#subscription.add(sub);\n }\n\n /** Whether an active error is currently present. */\n get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n /** Clears the current error state via the private error service. */\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n/** Cached singleton instance of the VaultErrorService. */\nlet _instance: VaultErrorServiceClass | null = null;\n\n/**\n * Returns the singleton VaultErrorService instance, creating it on first call.\n *\n * @returns The shared VaultErrorService instance.\n */\nexport function VaultErrorService(): VaultErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultErrorService] Creating new singleton instance.');\n _instance = new VaultErrorServiceClass();\n }\n return _instance;\n}\n","import { Observable, Subscription, tap } from 'rxjs';\nimport { ControllerClassContext } from '../../contexts/controller-class.context';\nimport { ControllerContract } from '../../interfaces/controllers/controller.interface';\nimport { VaultErrorService } from '../../services/error/vault-error.service';\nimport { ControllerMessageShape } from '../../shapes/controller/controller-message.shape';\nimport { ControllerVote } from '../../types/controller/controller-vote.type';\nimport { ControllerType } from '../../types/controller/controller.type';\nimport { vaultDebug, vaultWarn } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/**\n * Abstract base class for active controllers that react to external error\n * state changes and participate in pipeline admission voting.\n */\nexport abstract class AbstractActiveController<T>\n implements ControllerContract<T>\n{\n /** Unique identifier for this controller instance. */\n readonly key: string;\n\n /** Controller type classification determined by the subclass. */\n abstract readonly type: ControllerType;\n\n /** Whether errors from this controller halt the pipeline. */\n readonly critical = false;\n\n /** Tracks whether the global error service currently holds an error. */\n protected hasError = false;\n\n /** Trace identifier from the most recent pipeline operation. */\n protected traceId: string | null = null;\n\n /** Subscription to the global VaultErrorService stream. */\n #subscription: Subscription;\n\n /**\n * Creates an active controller and subscribes to the global error stream.\n *\n * @param key - Unique controller identifier supplied by the factory.\n * @param ctx - Class-level context providing revote and lifecycle access.\n */\n constructor(\n key: string,\n protected readonly ctx: ControllerClassContext\n ) {\n this.key = key;\n\n this.#subscription = VaultErrorService()\n .error$.pipe(\n tap((error) => {\n vaultDebug(\n `${this.key} VaultErrorService dispatched event. Raw event: ${safeStringify(error)}.`\n );\n const newValue = error != null;\n vaultDebug(`${this.key} New transformed error value: \"${newValue}\".`);\n\n const revoteDecision =\n newValue !== this.hasError && this.traceId !== undefined;\n vaultDebug(\n `${this.key} Revote Decision: ${revoteDecision}. Factors. NewValue: ${newValue} HasError: ${this.hasError} TraceId: ${this.traceId} Rubric: 'newValue !== this.hasError && this.traceId !== undefined'`\n );\n\n this.hasError = newValue;\n vaultDebug(\n `${this.key} this.hasError replace with newValue: \"${this.hasError}\".`\n );\n vaultDebug(\n `${this.key} onExternalTrigger dispatchd with: \"${newValue}\".`\n );\n this.onExternalTrigger(newValue);\n\n if (revoteDecision) {\n vaultDebug(\n `${this.key} Revote Requesed with traceId: \"${this.traceId}\".`\n );\n this.ctx.requestRevote(this.traceId!);\n }\n })\n )\n .subscribe();\n }\n\n /**\n * Hook invoked when the external error state changes.\n *\n * @param _newErrorState - The updated error state flag.\n */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /**\n * Processes an incoming controller message and returns a vote.\n *\n * @param msg - The controller message to evaluate.\n * @returns An observable emitting the controller vote or void.\n */\n abstract handleMessage(\n msg: ControllerMessageShape<T>\n ): Observable<ControllerVote | void>;\n\n /** Tears down the controller and unsubscribes from the error stream. */\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n /** Resets the controller to its initial state. */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/* -----------------------------------------------------------\n * Abstracts\n * --------------------------------------------------------- */\nexport { AbstractErrorCallbackBehavior } from './behaviors/error/with-error-callback.abstract';\nexport { AbstractErrorTransformBehavior } from './behaviors/error/with-error-transform.abstract';\nexport { AbstractActiveController } from './controllers/active-controller.abstract';\n","/** Symbol key used to attach behavior metadata to a behavior class. */\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","/** Symbol key used to attach controller metadata to a controller class. */\nexport const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","/**\n * String token used to uniquely identify the DevTools Aggregate FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_AGGREGATE_KEY_CONSTANT =\n 'vault::devtools::aggregate:feature::cell';\n","/**\n * String token used to uniquely identify the DevTools Logging FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_LOGGING_KEY_CONSTANT =\n 'vault::devtools::logging::feature::cell';\n","/** Sentinel symbol that signals the pipeline to clear the current state. */\nexport const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","/** Sentinel symbol that signals the pipeline to continue processing. */\nexport const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","/** Sentinel symbol that signals the pipeline to skip the current operation. */\nexport const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","/** Sentinel symbol that signals the pipeline to halt execution. */\nexport const VAULT_STOP = Symbol.for('VAULT_STOP');\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { BEHAVIOR_META } from './behavior-meta.constant';\nexport { CONTROLLER_META } from './controller-meta.constant';\nexport { DEVTOOLS_AGGREGATE_KEY_CONSTANT } from './dev-tools/devtools-aggregate-key.constant';\nexport { DEVTOOLS_LOGGING_KEY_CONSTANT } from './dev-tools/devtools-logging-key.constant';\nexport { VAULT_CLEAR_STATE } from './vault/vault-clear-state.constant';\nexport { VAULT_CONTINUE } from './vault/vault-continue.constant';\nexport { VAULT_NOOP } from './vault/vault-noop.constant';\nexport { VAULT_STOP } from './vault/vault-stop.constant';\n","// vault-behavior.decorator.ts\nimport { BEHAVIOR_META } from '../constants/behavior-meta.constant';\nimport { BehaviorMetaShape } from '../shapes/behavior-meta.shape';\n\n/**\n * Decorator that registers a class as an Vault behavior.\n *\n * The `VaultBehavior` decorator attaches the provided `BehaviorMeta`\n * definition to the target constructor, making the behavior discoverable by\n * the orchestrator during pipeline initialization. Metadata fields such as\n * `type`, `key`, and `critical` are also mirrored onto static properties of\n * the decorated class to support lightweight runtime introspection.\n *\n * This decorator does not modify method logic or structure; it only assigns\n * metadata required for orchestrator classification and behavior lifecycle\n * management.\n *\n * @param meta - Metadata describing the behavior’s category, unique key, and\n * criticality within the pipeline.\n * @returns A class decorator that applies behavior metadata to the target.\n */\nexport function VaultBehavior(meta: BehaviorMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[BEHAVIOR_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n\n if (meta.resolveType !== undefined) {\n target.resolveType = meta.resolveType;\n }\n\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","// vault-behavior.decorator.ts\nimport { CONTROLLER_META } from '../constants/controller-meta.constant';\nimport { ControllerMetaShape } from '../shapes/controller/controller-meta.shape';\n\n/**\n * Class decorator that attaches controller metadata to the target class.\n *\n * @param meta - The controller metadata shape to apply.\n * @returns A class decorator function.\n */\nexport function VaultController(meta: ControllerMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[CONTROLLER_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { VaultBehavior } from './vault-behavior.decorator';\nexport { VaultController } from './vault-controller.decorator';\n","import { VaultErrorUsageKindTypes } from './vault-error-usage-kind.type';\n\n/** Enumeration of top-level Vault error kind classifications. */\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type of all Vault error kind values including usage sub-kinds. */\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","/** Enumeration of Vault error name identifiers. */\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type derived from VaultErrorNameTypes values. */\nexport type VaultErrorNameType =\n (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","import {\n VaultErrorKindType,\n VaultErrorKindTypes\n} from '../types/error/vault-error-kind.type';\nimport {\n VaultErrorNameType,\n VaultErrorNameTypes\n} from '../types/error/vault-error-name.type';\n\n/**\n * Base error class for all Vault-specific errors. Extends the native Error\n * with a typed name and kind for structured error classification.\n */\nexport class VaultError extends Error {\n /** Classification kind used to categorize this error in diagnostics. */\n readonly kind: VaultErrorKindType;\n\n /**\n * Creates a new VaultError instance with prototype chain correction.\n *\n * @param message - Human-readable description of the error.\n * @param name - Typed error name used for identification.\n * @param kind - Error kind used for diagnostic classification.\n */\n constructor(\n message: string,\n name: VaultErrorNameType = VaultErrorNameTypes.VaultError,\n kind: VaultErrorKindType = VaultErrorKindTypes.VaultError\n ) {\n super(message);\n\n this.name = name;\n this.kind = kind;\n\n // Required for proper instanceof checks in TS / ES5 targets\n Object.setPrototypeOf(this, new.target.prototype);\n\n // Optional but nice: clean stack trace\n // eslint-disable-next-line\n const anyError = Error as any;\n if (typeof anyError.captureStackTrace === 'function') {\n anyError.captureStackTrace(this, new.target);\n }\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when an encrypted payload fails AES-GCM integrity verification\n * during decryption, indicating tampered, corrupted, or mismatched key data.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\n /** Creates the error with a descriptive integrity-failure message. */\n constructor() {\n const message = `Encrypted snapshot failed integrity verification.\n\nThe encrypted payload could not be authenticated during AES-GCM decryption.\n\nPossible causes:\n\n• The stored ciphertext has been tampered with\n• The stored initialization vector (IV) was modified\n• The encryption key does not match the original key\n• The stored payload is corrupted\n\nVault refuses to restore state from unauthenticated encrypted data.`;\n\n super(message, VaultErrorNameTypes.EncryptionIntegrity);\n }\n}\n","/** Enumeration of usage-specific Vault error sub-kind classifications. */\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\n/** Union type derived from VaultErrorUsageKindTypes values. */\nexport type VaultErrorUsageKindType =\n (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when a behavior or controller fails license validation.\n */\nexport class VaultLicenseError extends VaultError {\n /**\n * Creates a license validation error.\n *\n * @param message - Description of the license violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.License\n ) {\n super(message, VaultErrorNameTypes.License, kind);\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Base error for Vault API usage violations detected at runtime.\n */\nexport class VaultUsageError extends VaultError {\n /**\n * Creates a usage error with the specified message and kind.\n *\n * @param message - Description of the usage violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage\n ) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when an eager Promise is passed directly to the state pipeline\n * instead of a deferred factory function.\n */\nexport class VaultUsagePromiseError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid incoming value: Promise detected.\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nUse the following instead a DeferredFactory value\n\nThis guarantees the promise is created and executed inside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.Promise);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when a Promise-based state method receives a raw value instead\n * of a factory function that returns a Promise.\n */\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid usage of Promise-based state API.\n\nYou called a Promise-specific method (replaceState / mergeState),\nbut did not provide a function that creates a Promise.\n\nExpected:\n• () => Promise<T>\n\nReceived:\n• A non-function value\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nAlways wrap promises in a function so they are created and executed\ninside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.PromiseFactoryRequired);\n }\n}\n","/* -----------------------------------------------------------\n * ERRORS\n * --------------------------------------------------------- */\nexport { VaultError } from './vault-error';\nexport { VaultEncryptionIntegrityError } from './vault-error.encryption-integrity';\nexport { VaultLicenseError } from './vault-error.license';\nexport { VaultUsageError } from './vault-error.usage';\nexport { VaultUsagePromiseError } from './vault-error.usage.promise';\nexport { VaultUsagePromiseFactoryRequiredError } from './vault-error.usage.promise-factory-required';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","/** Enumeration of message types dispatched to controllers during pipeline orchestration. */\nexport const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\n/** Union type derived from ControllerMessageTypes values. */\nexport type ControllerMessageType =\n (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","/** Enumeration of votes a controller may cast during pipeline admission. */\nexport const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from ControllerVotes values. */\nexport type ControllerVote =\n (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","/** Enumeration of controller category classifications. */\nexport const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise',\n TabSync: 'tabSync'\n} as const;\n\n/** Union type derived from ControllerTypes values. */\nexport type ControllerType =\n (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","/** Enumeration of conductor decision outcomes after controller voting. */\nexport const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from DecisionOutcomeTypes values. */\nexport type DecisionOutcomeType =\n (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","/** Enumeration of event boundary positions within a lifecycle span. */\nexport const EventBoundaryTypes = {\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventBoundaryTypes values. */\nexport type EventBoundaryType =\n (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","/** Enumeration of monitor event category classifications. */\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventTypes values. */\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","/** Enumeration of pipeline operation modes. */\nexport const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\n/** Union type derived from OperationTypes values. */\nexport type OperationType =\n (typeof OperationTypes)[keyof typeof OperationTypes];\n","/**\n * Enumerates the available resolve strategy identifiers used by resolve\n * behaviors. These identifiers indicate how a FeatureCell obtains its initial\n * and subsequent state values during the resolve stage of the pipeline.\n *\n * - `Value` — Resolve from a synchronous, in-memory value.\n * - `HttpResource` — Resolve using an HTTP-driven resource behavior.\n * - `Observable` — Resolve from an observable stream source.\n * - `Promise` — Resolve from a promise source.\n */\nexport const ResolveTypes = {\n HttpResource: 'http-resource',\n Observable: 'observable',\n Promise: 'promise',\n Value: 'value'\n} as const;\n\n/**\n * Union type representing all supported resolve strategy identifiers.\n */\nexport type ResolveType = (typeof ResolveTypes)[keyof typeof ResolveTypes];\n","/** Enumeration of state emission event classifications. */\nexport const StateEmitTypes = {\n IncomingPipeline: 'Incoming Pipeline',\n FinalizePipeline: 'Finalize Pipeline',\n PipelineError: 'Pipeline Error',\n PipelineDestroy: 'Pipeline Destroy',\n PipelineReset: 'Pipeline Reset',\n AbortController: 'Abort Controller',\n DenyController: 'Deny Controller',\n TabSync: 'Tab Sync'\n} as const;\n\n/** Union type derived from StateEmitTypes values. */\nexport type StateEmitType =\n (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","/* -----------------------------------------------------------\n * TYPES (USER-FACING)\n * --------------------------------------------------------- */\nexport { BehaviorTypes } from './behavior/behavior.type';\nexport type { BehaviorType } from './behavior/behavior.type';\nexport type { DistinctComparison } from './behavior/distinct-comparison.type';\nexport type { CoreEmitStateCallback } from './callback/core-emit-state-callback.type';\nexport type { TapCallback } from './callback/tap-callback.type';\nexport type { VaultErrorCallback } from './callback/vault-error-callback.type';\nexport { ControllerMessageTypes } from './controller/controller-message.type';\nexport type { ControllerMessageType } from './controller/controller-message.type';\nexport { ControllerVotes } from './controller/controller-vote.type';\nexport type { ControllerVote } from './controller/controller-vote.type';\nexport { ControllerTypes } from './controller/controller.type';\nexport type { ControllerType } from './controller/controller.type';\nexport { DecisionOutcomeTypes } from './controller/decision-outcome.type';\nexport type { DecisionOutcomeType } from './controller/decision-outcome.type';\nexport { VaultErrorKindTypes } from './error/vault-error-kind.type';\nexport type { VaultErrorKindType } from './error/vault-error-kind.type';\nexport { VaultErrorNameTypes } from './error/vault-error-name.type';\nexport type { VaultErrorNameType } from './error/vault-error-name.type';\nexport { VaultErrorUsageKindTypes } from './error/vault-error-usage-kind.type';\nexport type { VaultErrorUsageKindType } from './error/vault-error-usage-kind.type';\nexport { EventBoundaryTypes } from './event/event-boundary.type';\nexport type { EventBoundaryType } from './event/event-boundary.type';\nexport { EventTypes } from './event/event.type';\nexport type { EventType } from './event/event.type';\nexport type { FilterFunction } from './function/filter-function.type';\nexport type { ReducerFunction } from './function/reducer-function.type';\nexport type { InterceptorStateType } from './interceptor-state.type';\nexport { LogLevelTypes } from './logging/log-level.type';\nexport type { LogLevelType } from './logging/log-level.type';\nexport { OperationTypes } from './operation.type';\nexport type { OperationType } from './operation.type';\nexport type { PipelinePersistValue } from './pipeline/pipeline-persist-value.type';\nexport type { PipelineUpstreamValue } from './pipeline/pipeline-upstream-value.type';\nexport type { PipelineValue } from './pipeline/pipeline-value.type';\nexport { ResolveTypes } from './resolve.type';\nexport type { ResolveType } from './resolve.type';\nexport type { CoreEmitStateResult } from './state/core-emit-state-result.type';\nexport type { DeferredFactory } from './state/deferred-factory.type';\nexport type { DeferredType } from './state/deferred.type';\nexport type { FinalState } from './state/final-state.type';\nexport { StateEmitTypes } from './state/state-emit.type';\nexport type { StateEmitType } from './state/state-emit.type';\nexport type { StateInputType } from './state/state-input.type';\n","/**\n * Creates a normalized behavior key identifier used for behavior registration.\n *\n * A behavior key uniquely identifies a behavior within the Vault pipeline,\n * following the canonical format:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Both `domain` and `name` are normalized by:\n * - capitalizing the first character\n * - removing all non-alphanumeric characters\n *\n * This ensures consistent and predictable behavior keys for orchestration,\n * diagnostics, and tooling.\n *\n * @param domain - The logical domain or category of the behavior.\n * @param name - The specific behavior name within the domain.\n * @returns A normalized behavior key string.\n */\nexport function defineBehaviorKey(domain: string, name: string): string {\n return defineVaultKey('Behavior', domain, name);\n}\n\n/**\n * Constructs a normalized Vault key for behavior or controller registration.\n *\n * @param kind - Whether the key is for a Behavior or Controller.\n * @param domain - The logical domain or category.\n * @param name - The specific name within the domain.\n * @returns A normalized Vault key string.\n */\nexport function defineVaultKey(\n kind: 'Behavior' | 'Controller',\n domain: string,\n name: string\n): string {\n const normalize = (s: string) =>\n s.charAt(0).toUpperCase() + s.slice(1).replace(/[^A-Za-z0-9]/g, '');\n\n return `SDUX::${kind}::${normalize(domain)}::${normalize(name)}`;\n}\n\n/**\n * Validates whether a string conforms to the Vault behavior key format.\n *\n * A valid behavior key must follow the structure:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Where `<Domain>` and `<Name>` begin with an uppercase character and contain\n * only alphanumeric characters.\n *\n * @param key - The behavior key string to validate.\n * @returns `true` if the key matches the required pattern; otherwise `false`.\n */\nexport function validateBehaviorKey(key: string): boolean {\n if (typeof key !== 'string') return false;\n\n const pattern =\n /^SDUX::(Behavior|Controller)::[A-Z][A-Za-z0-9]*::[A-Z][A-Za-z0-9]*$/;\n return pattern.test(key);\n}\n","import {\n defineVaultKey,\n validateBehaviorKey\n} from '../behavior/define-behavior-key.util';\n\n/**\n * Creates a normalized controller key following the Vault key format.\n *\n * @param domain - The logical domain or category of the controller.\n * @param name - The specific controller name within the domain.\n * @returns A normalized controller key string.\n */\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\n/**\n * Validates whether a string conforms to the Vault controller key format.\n *\n * @param key - The controller key string to validate.\n * @returns `true` if the key matches the required pattern.\n */\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","import { DeferredFactory } from '../../types/state/deferred-factory.type';\n\n/**\n * Determines whether a value conforms to the DeferredFactory contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is an object with a callable `value` property.\n */\nexport function isDeferredFactory<T = unknown>(\n value: unknown\n): value is DeferredFactory<T> {\n return (\n !!value &&\n typeof value === 'object' &&\n // eslint-disable-next-line\n typeof (value as any).value === 'function'\n );\n}\n","import { VaultErrorShape } from '../../shapes/vault-error.shape';\n\n/**\n * Normalizes any thrown error into a canonical `VaultError` structure.\n *\n * This ensures that all errors—HTTP, runtime, string, or unknown—\n * are represented consistently throughout the Vault error pipeline.\n *\n * @param err - The raw thrown value.\n * @param featureCellKey - the origination of the error\n * @returns A fully normalized `VaultError`.\n */\nexport function createVaultError(\n err: unknown,\n featureCellKey: string\n): VaultErrorShape {\n const timestamp = Date.now();\n\n // -----------------------------------------\n // Standard JS Error\n // -----------------------------------------\n if (err instanceof Error) {\n return {\n message: err.message || 'Unexpected error',\n details: err.stack,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // String error\n // -----------------------------------------\n if (typeof err === 'string') {\n return {\n message: err,\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // Fallback: unknown error\n // -----------------------------------------\n return {\n message: 'Unexpected error',\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n}\n","/*\n| Category | Type / Example | structuredClone behavior | deepFreeze fallback behavior | Isolated? | Notes |\n| ------------------------ | --------------------- | ------------------------- | ------------------------------------- | ---------- | ---------------------------------------------- |\n| **Primitives** | number | Returned as-is | Returned as-is | ✅ Yes | Immutable by definition |\n| | string | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | boolean | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | bigint | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | symbol | Returned as-is | Returned as-is | ✅ Yes | Identity preserved |\n| | undefined | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| | null | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| **Plain Objects** | `{ a: 1 }` | Deep cloned | Deep cloned + frozen | ✅ Yes | Always returns new reference |\n| **Arrays** | `[1,2,3]` | Deep cloned | Deep cloned + frozen | ✅ Yes | Structural mutation blocked |\n| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Cannot be cloned or frozen meaningfully |\n| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Identity preserved intentionally |\n| **Dates** | `new Date()` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Time value preserved |\n| **RegExp** | `/abc/g` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Pattern preserved |\n| **Error** | `new Error()` | Cloned (core fields only) | Frozen original OR cloned+frozen | ⚠️ Partial | Custom props not guaranteed |\n| **Map** | `new Map()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.set()` still works; internal slots preserved |\n| **Set** | `new Set()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.add()` still works |\n| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be cloned or frozen safely |\n| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |\n| **TypedArray** | `Uint8Array` | Cloned | Frozen | ✅ Yes | Buffer copied or locked |\n| **ArrayBuffer** | `ArrayBuffer` | Cloned | Frozen | ✅ Yes | Memory isolated |\n| **DataView** | `DataView` | Cloned | Frozen | ✅ Yes | Backing buffer safe |\n| **Observable (RxJS)** | `new Observable()` | ❌ Throws | Same reference, frozen wrapper | ⚠️ Partial | Internal emissions mutable |\n| **Class Instance** | `new Foo()` | Prototype stripped | Frozen instance | ⚠️ Partial | Methods lost on clone |\n| **Object.create(null)** | null-proto object | Cloned | Deep cloned + frozen | ✅ Yes | Prototype normalized |\n| **Cyclic Objects** | `{ self }` | Cloned with cycles | Deep cloned + frozen (cycle-safe) | ✅ Yes | WeakSet prevents recursion |\n| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |\n| **Non-enumerable props** | defineProperty | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Visibility differs |\n| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Symbols skipped by clone |\n| **DOM Nodes** | `HTMLElement` | ❌ Throws | Same reference, frozen wrapper | ❌ No | Host object semantics |\n| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target (if accessible) | ⚠️ Partial | Depends on handler |\n| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |\n| **JSON-like data** | POJO graphs | Deep cloned | Deep cloned + frozen | ✅ Yes | Ideal use case |\n| **Modules** | ES module namespace | ❌ Throws | Returned as-is | ❌ No | Immutable by spec |\n| **Intl objects** | `Intl.DateTimeFormat` | Cloned | Frozen | ⚠️ Partial | Internal slots opaque |\n| **Shared References** | `{a:x, b:x}` | Preserved in clone | Preserved in clone | ✅ Yes | Graph identity maintained |\n| **Sparse Arrays** | `[ , , 3 ]` | Preserved | Preserved | ✅ Yes | Holes maintained |\n| **Symbol Values** | `{ x: Symbol() }` | Preserved | Preserved | ✅ Yes | Value identity intact |\n| **Mixed Graphs** | fn + object | ❌ Partial | Clone + preserve refs | ⚠️ Partial | Hybrid isolation |\n| **Frozen Objects** | `Object.freeze(obj)` | Cloned (unfrozen) | Preserved frozen OR cloned+frozen | ✅ Yes | Freeze state not guaranteed |\n| **Boxed Primitives** | `new Number(1)` | Cloned | Frozen | ✅ Yes | Unboxed behavior retained |\n*/\n\n/**\n * Recursively freezes an object and all nested properties to prevent mutation.\n *\n * @param obj - The object to deep-freeze.\n * @param seen - WeakSet used to track visited references and prevent cycles.\n * @returns The frozen object.\n */\nfunction deepFreeze<T>(obj: T, seen = new WeakSet<object>()): T {\n if (obj === null || typeof obj !== 'object') return obj;\n\n const o = obj as unknown as object;\n if (seen.has(o)) return obj;\n seen.add(o);\n\n if (!Object.isFrozen(o)) Object.freeze(o);\n\n for (const key of Reflect.ownKeys(o)) {\n const desc = Object.getOwnPropertyDescriptor(o, key);\n /* istanbul ignore next -- impossible after Object.freeze due to Proxy invariants */\n if (!desc) continue;\n\n // Only recurse into data properties; do NOT invoke getters\n if ('value' in desc) {\n // eslint-disable-next-line\n deepFreeze((desc as PropertyDescriptor).value as any, seen);\n }\n }\n\n return obj;\n}\n\n/**\n * Creates an immutable copy of a value using structuredClone with a deepFreeze fallback.\n *\n * @param value - The value to isolate.\n * @returns An immutable copy of the value.\n */\nexport const isolateValue = <T>(value: T): T => {\n if (value === null || typeof value !== 'object') return value;\n\n if (Object.isFrozen(value)) return value;\n\n try {\n if (\n value instanceof Map ||\n value instanceof Set ||\n value instanceof WeakMap ||\n value instanceof WeakSet\n ) {\n try {\n return structuredClone(value);\n } catch {\n return deepFreeze(value); // ← IMPORTANT: same reference\n }\n }\n return structuredClone(value);\n } catch {\n const clone = Array.isArray(value)\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [...(value as any)]\n : Object.assign(Object.create(Object.getPrototypeOf(value)), value);\n\n return deepFreeze(clone);\n }\n};\n","import { VAULT_CLEAR_STATE } from '../../constants/vault/vault-clear-state.constant';\nimport { VAULT_CONTINUE } from '../../constants/vault/vault-continue.constant';\nimport { VAULT_NOOP } from '../../constants/vault/vault-noop.constant';\nimport { StateInputShape } from '../../shapes/state/state-input.shape';\nimport { FinalState } from '../../types/state/final-state.type';\n\n/**\n * Indicates whether a final pipeline value represents a NOOP condition.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_NOOP` sentinel.\n */\nexport const isVaultNoop = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_NOOP;\n};\n\n/**\n * Indicates whether a final pipeline value represents the clear-state sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CLEAR_STATE` sentinel.\n */\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\n\n/**\n * Indicates whether a final pipeline value represents the continue sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CONTINUE` sentinel.\n */\nexport const isVaultContinue = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CONTINUE;\n};\n\n/**\n * Checks whether a value is exactly `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `null`.\n */\nexport const isNull = (current: unknown): current is null => current === null;\n\n/**\n * Checks whether a value is exactly `undefined`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `undefined`.\n */\nexport const isUndefined = (current: unknown): current is undefined =>\n current === undefined;\n\n/**\n * Determines whether a value is defined (not `undefined`).\n * Note: This intentionally does *not* exclude `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is not `undefined`.\n */\nexport const isDefined = (current: unknown): boolean => !isUndefined(current);\n\n/**\n * Determines whether a value is nullish — meaning either `null` or `undefined`.\n *\n * @param current - The value to inspect.\n * @returns `true` for `null` or `undefined`, otherwise `false`.\n */\nexport const isNullish = (current: unknown): current is null | undefined =>\n current == null;\n\n/**\n * Determines whether a value is a function.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a function.\n */\nexport const isFunction = (\n value: unknown\n): // eslint-disable-next-line\nvalue is (...args: any[]) => unknown => typeof value === 'function';\n\n/**\n * Determines whether a value is a non-null object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an object and not null.\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\n/**\n * Determines whether a value is a plain object with no custom prototype.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a plain object.\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (value === null || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Determines whether a value conforms to the StateInputShape contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is a plain object with recognized state keys or is empty.\n */\nexport const isStateInputShape = <T>(\n value: unknown\n): value is StateInputShape<T> => {\n if (!isPlainObject(value)) return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey =\n Object.prototype.hasOwnProperty.call(v, 'loading') ||\n Object.prototype.hasOwnProperty.call(v, 'value') ||\n Object.prototype.hasOwnProperty.call(v, 'error');\n\n const isEmptyObject = Object.keys(v).length === 0;\n\n return hasKnownKey || isEmptyObject;\n};\n","/**\n * Determines whether a value is a thenable Promise-like object.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value has a callable `then` property.\n */\nexport function isPromise<T = unknown>(value: unknown): value is Promise<T> {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n // eslint-disable-next-line\n typeof (value as any).then === 'function'\n );\n}\n","import { HttpResourceRefShape } from '../../shapes/http-resource-ref-shape.shape';\n\n/**\n * Type guard that determines whether a value is an `HttpResourceRef<T>`.\n *\n * An `HttpResourceRef` is a structured object produced by Angular’s\n * `HttpClient` resource APIs. It contains a standardized shape used by\n * Vault to detect and normalize resource-backed state transitions.\n *\n * This utility checks only for the presence of the canonical\n * `HttpResourceRef` fields (`value`, `isLoading`, `error`, `hasValue`)\n * and does not validate the internal content of those properties.\n *\n * @typeParam T - The resource value type.\n *\n * @param obj - The value to test.\n * @returns `true` if the value matches the structural shape of an\n * `HttpResourceRef<T>`, otherwise `false`.\n */\n// eslint-disable-next-line\nexport function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T> {\n return !!(\n obj &&\n typeof obj === 'object' &&\n 'value' in obj &&\n 'isLoading' in obj &&\n 'error' in obj &&\n 'hasValue' in obj\n );\n}\n","/* -----------------------------------------------------------\n * UTILITY FUNCTIONS (SAFE TO WILDCARD)\n * --------------------------------------------------------- */\nexport {\n defineBehaviorKey,\n validateBehaviorKey\n} from './behavior/define-behavior-key.util';\nexport {\n defineControllerKey,\n validateControllerKey\n} from './controller/define-controller-key.util';\nexport { isDeferredFactory } from './deferred-factory/is-deferred-factory.util';\nexport { DevMode } from './dev-mode/dev-mode.util';\nexport { isTestEnv } from './dev-mode/testing-environment.util';\nexport { createVaultError } from './error/create-vault-error.util';\nexport { isolateValue } from './isolate-value/isolate-value.util';\nexport {\n getVaultLogLevel,\n setVaultLogLevel,\n vaultDebug,\n vaultError,\n vaultLog,\n vaultWarn\n} from './logger/logger.util';\nexport {\n isDefined,\n isFunction,\n isNull,\n isNullish,\n isObject,\n isStateInputShape,\n isUndefined,\n isVaultClearState,\n isVaultContinue,\n isVaultNoop\n} from './logic/logic.utils';\nexport { isPromise } from './promise/is-promise.util';\nexport { isHttpResourceRef } from './resolve/is-http-resource.util';\nexport { safeStringify } from './safe-stringify/safe-stringify.util';\nexport { registerVersion } from './version/version.register';\n","/*\n * Public API Surface of @sdux-vault/shared\n *\n * IMPORTANT:\n * - JSDoc is preserved only when using named exports.\n * - Avoid `export *` for public-facing interfaces, behaviors, and types.\n * - Internal utilities may still use `export *`.\n */\n\n/* -----------------------------------------------------------\n * INTENTIONAL SIDE EFFECTS\n * --------------------------------------------------------- */\n\n/**\n * This is to handle fluent api requirements for behaviors and controllers\n */\nimport './typings/global';\n\n/**\n * This is for version support in dev mode and tracking in the devtools\n */\nimport './lib/version/version.register';\n\n/* -----------------------------------------------------------\n * DOMAIN EXPORTS\n * --------------------------------------------------------- */\nexport * from './lib/abstracts';\nexport * from './lib/config';\nexport * from './lib/constants';\nexport * from './lib/contexts';\nexport * from './lib/decorators';\nexport * from './lib/errors';\nexport * from './lib/interfaces';\nexport * from './lib/services';\nexport * from './lib/shapes';\nexport * from './lib/types';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_instance"],"mappings":";;AAAA;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,IAAI,MAAM,GAAA;QACR;;AAEE,QAAA,OAAQ,UAAkB,CAAC,OAAO,KAAK,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OAAO,WAAW,IAAI,aAAa;AACrC;;AC7HA;;;;;AAKG;AACG,SAAU,SAAS,CAAc,KAAc,EAAA;IACnD,QACE,CAAC,CAAC,KAAK;SACN,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;;AAE1D,QAAA,OAAQ,KAAa,CAAC,IAAI,KAAK,UAAU;AAE7C;;ACXA;;;;;;;;;;;;;;;;AAgBG;AACH;AACM,SAAU,iBAAiB,CAAI,GAAQ,EAAA;IAC3C,OAAO,CAAC,EACN,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,OAAO,IAAI,GAAG;AACd,QAAA,WAAW,IAAI,GAAG;AAClB,QAAA,OAAO,IAAI,GAAG;QACd,UAAU,IAAI,GAAG,CAClB;AACH;;AC7BA;;AAE+D;;ACF/D;;;;;;;AAOG;AAEH;;AAE+D;AAE/D;;AAEG;;ACfH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdux-vault-shared.mjs","sources":["../../../libs/shared/src/lib/utils/dev-mode/testing-environment.util.ts","../../../libs/shared/src/lib/utils/dev-mode/dev-mode.util.ts","../../../libs/shared/src/lib/utils/version/version.register.ts","../../../libs/shared/src/lib/version/version.register.ts","../../../libs/shared/src/lib/types/behavior/behavior.type.ts","../../../libs/shared/src/lib/types/logging/console.type.ts","../../../libs/shared/src/lib/types/logging/log-level.type.ts","../../../libs/shared/src/lib/utils/logger/logger.util.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-callback.abstract.ts","../../../libs/shared/src/lib/abstracts/behaviors/error/with-error-transform.abstract.ts","../../../libs/shared/src/lib/utils/safe-stringify/safe-stringify.util.ts","../../../libs/shared/src/lib/services/error/vault-private-error.service.ts","../../../libs/shared/src/lib/services/error/vault-error.service.ts","../../../libs/shared/src/lib/abstracts/controllers/active-controller.abstract.ts","../../../libs/shared/src/lib/abstracts/index.ts","../../../libs/shared/src/lib/constants/behavior-meta.constant.ts","../../../libs/shared/src/lib/constants/controller-meta.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-aggregate-key.constant.ts","../../../libs/shared/src/lib/constants/dev-tools/devtools-logging-key.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-clear-state.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-continue.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-noop.constant.ts","../../../libs/shared/src/lib/constants/vault/vault-stop.constant.ts","../../../libs/shared/src/lib/constants/index.ts","../../../libs/shared/src/lib/decorators/vault-behavior.decorator.ts","../../../libs/shared/src/lib/decorators/vault-controller.decorator.ts","../../../libs/shared/src/lib/decorators/index.ts","../../../libs/shared/src/lib/types/error/vault-error-kind.type.ts","../../../libs/shared/src/lib/types/error/vault-error-name.type.ts","../../../libs/shared/src/lib/errors/vault-error.ts","../../../libs/shared/src/lib/errors/vault-error.encryption-integrity.ts","../../../libs/shared/src/lib/types/error/vault-error-usage-kind.type.ts","../../../libs/shared/src/lib/errors/vault-error.license.ts","../../../libs/shared/src/lib/errors/vault-error.usage.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise.ts","../../../libs/shared/src/lib/errors/vault-error.usage.promise-factory-required.ts","../../../libs/shared/src/lib/errors/index.ts","../../../libs/shared/src/lib/services/index.ts","../../../libs/shared/src/lib/types/controller/controller-message.type.ts","../../../libs/shared/src/lib/types/controller/controller-vote.type.ts","../../../libs/shared/src/lib/types/controller/controller.type.ts","../../../libs/shared/src/lib/types/controller/decision-outcome.type.ts","../../../libs/shared/src/lib/types/event/event-boundary.type.ts","../../../libs/shared/src/lib/types/event/event.type.ts","../../../libs/shared/src/lib/types/operation.type.ts","../../../libs/shared/src/lib/types/resolve.type.ts","../../../libs/shared/src/lib/types/state/state-emit.type.ts","../../../libs/shared/src/lib/types/index.ts","../../../libs/shared/src/lib/utils/behavior/define-behavior-key.util.ts","../../../libs/shared/src/lib/utils/controller/define-controller-key.util.ts","../../../libs/shared/src/lib/utils/deferred-factory/is-deferred-factory.util.ts","../../../libs/shared/src/lib/utils/error/create-vault-error.util.ts","../../../libs/shared/src/lib/utils/isolate-value/isolate-value.util.ts","../../../libs/shared/src/lib/utils/logic/logic.utils.ts","../../../libs/shared/src/lib/utils/promise/is-promise.util.ts","../../../libs/shared/src/lib/utils/resolve/is-http-resource.util.ts","../../../libs/shared/src/lib/utils/index.ts","../../../libs/shared/src/public-api.ts","../../../libs/shared/src/sdux-vault-shared.ts"],"sourcesContent":["/** Singleton accessor that detects whether code is running in a test environment. */\nexport const isTestEnv = {\n get active(): boolean {\n return (\n // eslint-disable-next-line\n typeof (globalThis as any).jasmine !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).jest !== 'undefined' ||\n // istanbul ignore next\n // eslint-disable-next-line\n typeof (globalThis as any).vitest !== 'undefined'\n );\n }\n};\n","import { isTestEnv } from './testing-environment.util';\n\n/** Tracks whether Vault development mode has been enabled. */\nlet devMode: boolean | null = null;\n\n/** Singleton accessor for Vault development mode state. */\nexport const DevMode = {\n get active(): boolean {\n return devMode === true;\n },\n\n setDevMode(isDevMode: boolean): void {\n if (devMode !== null && !isTestEnv.active) {\n throw new Error('[vault] DevMode has already been initialized.');\n }\n\n devMode = isDevMode;\n }\n};\n","import { SDuXShape } from '../../shapes/sdux/sdux.shape';\nimport { DevMode } from '../dev-mode/dev-mode.util';\n\n/**\n * Registers a package version on the global SDuX debug widget when dev mode is active.\n *\n * @param packageName - The npm package name to register.\n * @param version - The semver version string.\n */\nexport const registerVersion = (packageName: string, version: string): void => {\n if (!DevMode.active || typeof globalThis === 'undefined') return;\n\n const sdux = (globalThis.sdux ??= {} as SDuXShape);\n const debug = (sdux.debugWidget ??= {});\n const versions = (debug.versions ??= {});\n\n if (versions[packageName] === version) return;\n\n versions[packageName] = version;\n};\n","import { registerVersion } from '../utils/version/version.register';\n\n/** Package name used for version registration. */\nconst SDUX_PACKAGE = '@sdux-vault/shared';\n\n/** Current package version string. */\nconst SDUX_VERSION = '0.9.0';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","/**\n * Runtime-safe registry of all behavior types.\n *\n * This object acts as an enum substitute without introducing JavaScript enum\n * overhead.\n * Values are string literals preserved at runtime and suitable for\n * switch statements, comparisons, and pipeline classification.\n * Each key maps 1:1 to its string literal value.\n * The structure is fully tree-shakable and safely inferable by TypeScript.\n */\nexport const BehaviorTypes = {\n CoreAfterTap: 'coreAfterTap',\n CoreBeforeTap: 'coreBeforeTap',\n ReplayGlobalError: 'replayGlobalError',\n CoreError: 'coreError',\n CoreErrorCallback: 'coreErrorCallback',\n CoreState: 'coreState',\n Encrypt: 'encrypt',\n CoreEmitState: 'coreEmitState',\n CoreLicense: 'coreLicense',\n ErrorTransform: 'errorTransform',\n Extension: 'extension',\n Filter: 'filter',\n FromObservable: 'fromObservable',\n FromPromise: 'fromPromise',\n FromStream: 'fromStream',\n Interceptor: 'interceptor',\n Merge: 'merge',\n Operator: 'operator',\n Persist: 'persist',\n Reduce: 'reduce',\n Resolve: 'resolve',\n StepwiseFilter: 'stepwiseFilter',\n StepwiseReducer: 'stepwiseReducer',\n StepwiseResolve: 'stepwiseResolve',\n TabSyncState: 'tabSyncState'\n} as const;\n\n/**\n * Union of all valid behavior type strings.\n *\n * This type is derived from `BehaviorTypes` using literal inference, ensuring\n * strong typing while preserving full runtime compatibility.\n * This type should not be manually extended—add new values to `BehaviorTypes`\n * instead.\n *\n */\nexport type BehaviorType = (typeof BehaviorTypes)[keyof typeof BehaviorTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of console output severity levels. */\nexport const ConsoleTypes = {\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from ConsoleTypes values. */\nexport type ConsoleType = (typeof ConsoleTypes)[keyof typeof ConsoleTypes];\n","/**\n * Defines the allowable verbosity levels for Vault logging.\n *\n * A `LogLevel` controls the amount of diagnostic output emitted by the\n * vault’s internal debug, warning, or error channels. Higher levels\n * produce more detailed logs, while lower levels suppress output.\n *\n * - `'off'` — no logs are emitted\n * - `'error'` — only errors are logged\n * - `'warn'` — warnings and errors are logged\n * - `'log'` — standard log events, warnings, and errors are logged\n * - `'debug'` — all debug-level information is emitted\n */\n\n/** Enumeration of Vault log verbosity levels. */\nexport const LogLevelTypes = {\n Off: 'off',\n Error: 'error',\n Warn: 'warn',\n Log: 'log',\n Debug: 'debug'\n} as const;\n\n/** Union type derived from LogLevelTypes values. */\nexport type LogLevelType = (typeof LogLevelTypes)[keyof typeof LogLevelTypes];\n","import { ConsoleType, ConsoleTypes } from '../../types/logging/console.type';\nimport {\n LogLevelType,\n LogLevelTypes\n} from '../../types/logging/log-level.type';\n\n/** Current log level threshold controlling which messages are emitted. */\nlet _logLevel: LogLevelType = LogLevelTypes.Off;\n\n/**\n * Prefix applied to all vault-related console output. Used to keep log\n * messages consistently identifiable across all log levels.\n */\nconst LOG_PREFIX = '[vault]';\n\n/**\n * Routes a log message to the console if the current log level permits it.\n *\n * @param level - The console severity level for this message.\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nfunction push(level: ConsoleType, ...args: any[]): void {\n const logLevel = getVaultLogLevel();\n\n if (logLevel === LogLevelTypes.Off) return;\n\n const levels: ConsoleType[] = [\n ConsoleTypes.Error,\n ConsoleTypes.Warn,\n ConsoleTypes.Log,\n ConsoleTypes.Debug\n ];\n\n const allowed = levels.indexOf(level) <= levels.indexOf(logLevel!);\n\n if (!allowed) return;\n\n // eslint-disable-next-line\n console[level](LOG_PREFIX, ...args);\n}\n\n/**\n * Emits an `error`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultError = (...args: any[]) => push('error', ...args);\n\n/**\n * Emits a `warn`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultWarn = (...args: any[]) => push('warn', ...args);\n\n/**\n * Emits a `log`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultLog = (...args: any[]) => push('log', ...args);\n\n/**\n * Emits a `debug`-level Vault log message.\n *\n * @param args - Console arguments to log.\n */\n// eslint-disable-next-line\nexport const vaultDebug = (...args: any[]) => push('debug', ...args);\n\n/**\n * Sets the global Vault log level threshold.\n *\n * @param level - The log level to apply.\n */\nexport function setVaultLogLevel(level: LogLevelType) {\n _logLevel = level ?? 'off';\n}\n\n/**\n * Returns the current global Vault log level.\n *\n * @returns The active log level threshold.\n */\nexport function getVaultLogLevel(): LogLevelType {\n return _logLevel;\n}\n","import { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorCallbackBehaviorContract } from '../../../interfaces/behaviors/error-callback-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { VaultErrorCallback } from '../../../types/callback/vault-error-callback.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base class for error callback behaviors that execute consumer-supplied\n * error handlers during the error stage of the Vault pipeline.\n */\nexport abstract class AbstractErrorCallbackBehavior<T>\n implements ErrorCallbackBehaviorContract<T>\n{\n /** Indicates that this error behavior is critical and always executed. */\n readonly critical!: boolean;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Behavior type for orchestrator registration. */\n readonly type = BehaviorTypes.CoreErrorCallback;\n\n /**\n * Creates a new abstract error behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the behavior factory.\n * @param behaviorCtx - Behavior class context providing injector access and extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes the consumer-supplied error callback against the current error and state.\n *\n * @param current - The error shape describing the pipeline failure.\n * @param state - The state snapshot at the time of the error.\n * @param oldschoolCallback - Consumer-supplied error callback to invoke.\n * @returns A promise that resolves when the callback completes.\n */\n abstract callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void>;\n\n /**\n * Teardown hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the error behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { VAULT_NOOP } from '../../../constants/vault/vault-noop.constant';\nimport { BehaviorClassContext } from '../../../contexts/behavior-class.context';\nimport { ErrorTransformBehaviorContract } from '../../../interfaces/behaviors/error-transform-behavior.interface';\nimport { StateSnapshotShape } from '../../../shapes/state/state-snapshot.shape';\nimport { VaultErrorShape } from '../../../shapes/vault-error.shape';\nimport { BehaviorTypes } from '../../../types/behavior/behavior.type';\nimport { vaultWarn } from '../../../utils/logger/logger.util';\n\n/**\n * Abstract base behavior for transforming errors during pipeline execution.\n * This class defines the contract and lifecycle hooks required for error transformation behaviors.\n *\n */\nexport abstract class AbstractErrorTransformBehavior<T>\n implements ErrorTransformBehaviorContract<T>\n{\n /**\n * Indicates that this error transform behavior is critical and always executed.\n */\n readonly critical!: boolean;\n\n /**\n * Unique identifier for this behavior instance.\n */\n readonly key: string;\n\n /**\n * Behavior type identifier used for orchestrator registration.\n */\n readonly type = BehaviorTypes.ErrorTransform;\n\n /**\n * Creates a new abstract error transform behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context providing configuration and hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Transforms an error produced during pipeline execution.\n *\n * @param error Incoming error value to be transformed.\n * @param current Current normalized Vault error value.\n * @param previousStateSnapshot Snapshot of state prior to the error.\n * @returns Transformed error, original error, or VAULT_NOOP to suppress emission.\n */\n abstract transformError(\n error: unknown,\n current: VaultErrorShape,\n previousStateSnapshot: StateSnapshotShape<T>\n ): Promise<unknown | typeof VAULT_NOOP>;\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Lifecycle hook invoked when the behavior instance is reset.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/**\n * Safely converts an arbitrary value into a JSON string representation.\n *\n * This function wraps `JSON.stringify` with enhanced handling for non-serializable\n * values, including:\n * - functions\n * - `Error` objects\n * - `Map` and `Set` instances\n * - circular references\n *\n * If serialization fails for any reason, a fallback string `\"[unserializable]\"`\n * is returned. The replacer ensures stable and predictable stringification for\n * use in logging and debugging utilities.\n *\n * @param value - The value to stringify safely.\n * @returns A JSON-formatted string or a fallback indicator.\n */\nexport function safeStringify(value: unknown): string {\n try {\n return JSON.stringify(value, jsonSafeReplacer, 2);\n } catch {\n return '[unserializable]';\n }\n}\n\n/**\n * Replacer function used by `safeStringify` to handle values that are normally\n * not serializable via `JSON.stringify`.\n *\n * It converts functions, errors, `Map`, and `Set` values into safe structures\n * and detects circular references. If a value cannot be serialized, a fallback\n * marker string is returned.\n *\n * @param _key - The property key being processed (unused).\n * @param val - The value associated with the key.\n * @returns A serializable representation of the value.\n */\n\nfunction jsonSafeReplacer(_key: string, val: unknown) {\n if (typeof val === 'function') return '[Function]';\n if (val instanceof Error) return { message: val.message, stack: val.stack };\n if (val instanceof Map) return { map: Array.from(val.entries()) };\n if (val instanceof Set) return { set: Array.from(val.values()) };\n\n // Avoid circular references\n try {\n JSON.stringify(val);\n return val;\n } catch {\n return '[Circular]';\n }\n}\n","import { BehaviorSubject, Observable } from 'rxjs';\nimport { VaultPrivateErrorServiceContract } from '../../interfaces/vault/vault-private-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/** ------------------------------------------\n * INTERNAL CLASS (NOT EXPORTED)\n * ------------------------------------------ */\n/**\n * Internal singleton error service that holds the current Vault error state.\n * Not exported directly; consumed exclusively by the public VaultErrorService.\n */\nclass VaultPrivateErrorClass implements VaultPrivateErrorServiceContract {\n /** Subject backing the private error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Initializes the private error service singleton. */\n constructor() {\n vaultDebug(\n '[VaultPrivateErrorService] initialized (singleton instance created)'\n );\n }\n\n /**\n * Publishes a new error or clears the current error.\n *\n * @param error - The error shape to publish, or null to clear.\n */\n setError(error: VaultErrorShape | null): void {\n vaultDebug(`[VaultPrivateErrorService] setError() ${safeStringify(error)}`);\n this.#error$.next(error);\n }\n\n /**\n * Returns an observable of the current error state.\n *\n * @returns Observable emitting the current error or null.\n */\n getError(): Observable<VaultErrorShape | null> {\n vaultDebug('[VaultPrivateErrorService] getError() → observable subscribed');\n return this.#error$.asObservable();\n }\n\n /** Resets the error state to null. */\n clear(): void {\n vaultDebug('[VaultPrivateErrorService] clear() → error reset to null');\n this.#error$.next(null);\n }\n}\n\n/** ------------------------------------------\n * SINGLETON FACTORY (EXPORTED)\n * ------------------------------------------ */\nlet _instance: VaultPrivateErrorServiceContract | null = null;\n\n/**\n * Returns the singleton VaultPrivateErrorService instance, creating it on first call.\n *\n * @returns The shared private error service instance.\n */\nexport function VaultPrivateErrorService(): VaultPrivateErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultPrivateErrorService] creating new singleton instance');\n _instance = new VaultPrivateErrorClass();\n } else {\n vaultDebug(\n '[VaultPrivateErrorService] returning existing singleton instance'\n );\n }\n return _instance;\n}\n","import { BehaviorSubject, Subscription } from 'rxjs';\nimport { VaultErrorServiceContract } from '../../interfaces/vault/vault-error-service.interface';\nimport { VaultErrorShape } from '../../shapes/vault-error.shape';\nimport { vaultDebug } from '../../utils/logger/logger.util';\nimport { VaultPrivateErrorService } from './vault-private-error.service';\n\n/**\n * Singleton service that aggregates and exposes the current Vault error state.\n * Subscribes to the private error service and mirrors updates through a public\n * observable stream for consumer consumption.\n */\nclass VaultErrorServiceClass implements VaultErrorServiceContract {\n /** Internal delegate responsible for low-level error state management. */\n readonly #privateVaultErrorService = VaultPrivateErrorService();\n\n /** Subject backing the public error observable. */\n readonly #error$ = new BehaviorSubject<VaultErrorShape | null>(null);\n\n /** Tracks whether an active error is currently held. */\n #hasErrorState = false;\n\n /** Aggregate subscription used for cleanup on teardown. */\n readonly #subscription = new Subscription();\n\n /** Public observable stream of the current error state. */\n readonly error$ = this.#error$.asObservable();\n\n /** Initializes the service and subscribes to the private error stream. */\n constructor() {\n vaultDebug(\n '[VaultErrorService] Initializing service and subscribing to private error stream.'\n );\n\n // Mirror the private error service into this one\n const sub = this.#privateVaultErrorService\n .getError()\n .subscribe((err: VaultErrorShape | null) => {\n vaultDebug(\n `[VaultErrorService] Received error update from private service: ${err ? err.message : 'null'}`\n );\n this.#hasErrorState = !!err;\n this.#error$.next(err);\n });\n\n this.#subscription.add(sub);\n }\n\n /** Whether an active error is currently present. */\n get hasError(): boolean {\n return this.#hasErrorState;\n }\n\n /** Clears the current error state via the private error service. */\n clear(): void {\n vaultDebug('[VaultErrorService] Clearing current error.');\n this.#privateVaultErrorService.clear();\n }\n}\n\n/** Cached singleton instance of the VaultErrorService. */\nlet _instance: VaultErrorServiceClass | null = null;\n\n/**\n * Returns the singleton VaultErrorService instance, creating it on first call.\n *\n * @returns The shared VaultErrorService instance.\n */\nexport function VaultErrorService(): VaultErrorServiceContract {\n if (!_instance) {\n vaultDebug('[VaultErrorService] Creating new singleton instance.');\n _instance = new VaultErrorServiceClass();\n }\n return _instance;\n}\n","import { Observable, Subscription, tap } from 'rxjs';\nimport { ControllerClassContext } from '../../contexts/controller-class.context';\nimport { ControllerContract } from '../../interfaces/controllers/controller.interface';\nimport { VaultErrorService } from '../../services/error/vault-error.service';\nimport { ControllerMessageShape } from '../../shapes/controller/controller-message.shape';\nimport { ControllerVote } from '../../types/controller/controller-vote.type';\nimport { ControllerType } from '../../types/controller/controller.type';\nimport { vaultDebug, vaultWarn } from '../../utils/logger/logger.util';\nimport { safeStringify } from '../../utils/safe-stringify/safe-stringify.util';\n\n/**\n * Abstract base class for active controllers that react to external error\n * state changes and participate in pipeline admission voting.\n */\nexport abstract class AbstractActiveController<T>\n implements ControllerContract<T>\n{\n /** Unique identifier for this controller instance. */\n readonly key: string;\n\n /** Controller type classification determined by the subclass. */\n abstract readonly type: ControllerType;\n\n /** Whether errors from this controller halt the pipeline. */\n readonly critical = false;\n\n /** Tracks whether the global error service currently holds an error. */\n protected hasError = false;\n\n /** Trace identifier from the most recent pipeline operation. */\n protected traceId: string | null = null;\n\n /** Subscription to the global VaultErrorService stream. */\n #subscription: Subscription;\n\n /**\n * Creates an active controller and subscribes to the global error stream.\n *\n * @param key - Unique controller identifier supplied by the factory.\n * @param ctx - Class-level context providing revote and lifecycle access.\n */\n constructor(\n key: string,\n protected readonly ctx: ControllerClassContext\n ) {\n this.key = key;\n\n this.#subscription = VaultErrorService()\n .error$.pipe(\n tap((error) => {\n vaultDebug(\n `${this.key} VaultErrorService dispatched event. Raw event: ${safeStringify(error)}.`\n );\n const newValue = error != null;\n vaultDebug(`${this.key} New transformed error value: \"${newValue}\".`);\n\n const revoteDecision =\n newValue !== this.hasError && this.traceId !== undefined;\n vaultDebug(\n `${this.key} Revote Decision: ${revoteDecision}. Factors. NewValue: ${newValue} HasError: ${this.hasError} TraceId: ${this.traceId} Rubric: 'newValue !== this.hasError && this.traceId !== undefined'`\n );\n\n this.hasError = newValue;\n vaultDebug(\n `${this.key} this.hasError replace with newValue: \"${this.hasError}\".`\n );\n vaultDebug(\n `${this.key} onExternalTrigger dispatchd with: \"${newValue}\".`\n );\n this.onExternalTrigger(newValue);\n\n if (revoteDecision) {\n vaultDebug(\n `${this.key} Revote Requesed with traceId: \"${this.traceId}\".`\n );\n this.ctx.requestRevote(this.traceId!);\n }\n })\n )\n .subscribe();\n }\n\n /**\n * Hook invoked when the external error state changes.\n *\n * @param _newErrorState - The updated error state flag.\n */\n //istanbul ignore next\n protected onExternalTrigger(_newErrorState: boolean): void {}\n\n /**\n * Processes an incoming controller message and returns a vote.\n *\n * @param msg - The controller message to evaluate.\n * @returns An observable emitting the controller vote or void.\n */\n abstract handleMessage(\n msg: ControllerMessageShape<T>\n ): Observable<ControllerVote | void>;\n\n /** Tears down the controller and unsubscribes from the error stream. */\n destroy(): void {\n this.#subscription.unsubscribe();\n vaultWarn(`${this.key} - destroy`);\n }\n\n /** Resets the controller to its initial state. */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/* -----------------------------------------------------------\n * Abstracts\n * --------------------------------------------------------- */\nexport { AbstractErrorCallbackBehavior } from './behaviors/error/with-error-callback.abstract';\nexport { AbstractErrorTransformBehavior } from './behaviors/error/with-error-transform.abstract';\nexport { AbstractActiveController } from './controllers/active-controller.abstract';\n","/** Symbol key used to attach behavior metadata to a behavior class. */\nexport const BEHAVIOR_META = Symbol.for('BEHAVIOR_META');\n","/** Symbol key used to attach controller metadata to a controller class. */\nexport const CONTROLLER_META = Symbol.for('CONTROLLER_META');\n","/**\n * String token used to uniquely identify the DevTools Aggregate FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_AGGREGATE_KEY_CONSTANT =\n 'vault::devtools::aggregate:feature::cell';\n","/**\n * String token used to uniquely identify the DevTools Logging FeatureCell.\n *\n * This key is referenced by the DevTools service, monitor utilities,\n * and the router configuration to ensure all DevTools-related state\n * is consistently mapped to the same FeatureCell instance.\n *\n * The value is stable across versions to maintain compatibility with\n * external tools such as the Chrome DevTools extension.\n */\nexport const DEVTOOLS_LOGGING_KEY_CONSTANT =\n 'vault::devtools::logging::feature::cell';\n","/** Sentinel symbol that signals the pipeline to clear the current state. */\nexport const VAULT_CLEAR_STATE = Symbol.for('VAULT_CLEAR_STATE');\n","/** Sentinel symbol that signals the pipeline to continue processing. */\nexport const VAULT_CONTINUE = Symbol.for('VAULT_CONTINUE');\n","/** Sentinel symbol that signals the pipeline to skip the current operation. */\nexport const VAULT_NOOP = Symbol.for('VAULT_NOOP');\n","/** Sentinel symbol that signals the pipeline to halt execution. */\nexport const VAULT_STOP = Symbol.for('VAULT_STOP');\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { BEHAVIOR_META } from './behavior-meta.constant';\nexport { CONTROLLER_META } from './controller-meta.constant';\nexport { DEVTOOLS_AGGREGATE_KEY_CONSTANT } from './dev-tools/devtools-aggregate-key.constant';\nexport { DEVTOOLS_LOGGING_KEY_CONSTANT } from './dev-tools/devtools-logging-key.constant';\nexport { VAULT_CLEAR_STATE } from './vault/vault-clear-state.constant';\nexport { VAULT_CONTINUE } from './vault/vault-continue.constant';\nexport { VAULT_NOOP } from './vault/vault-noop.constant';\nexport { VAULT_STOP } from './vault/vault-stop.constant';\n","// vault-behavior.decorator.ts\nimport { BEHAVIOR_META } from '../constants/behavior-meta.constant';\nimport { BehaviorMetaShape } from '../shapes/behavior-meta.shape';\n\n/**\n * Decorator that registers a class as an Vault behavior.\n *\n * The `VaultBehavior` decorator attaches the provided `BehaviorMeta`\n * definition to the target constructor, making the behavior discoverable by\n * the orchestrator during pipeline initialization. Metadata fields such as\n * `type`, `key`, and `critical` are also mirrored onto static properties of\n * the decorated class to support lightweight runtime introspection.\n *\n * This decorator does not modify method logic or structure; it only assigns\n * metadata required for orchestrator classification and behavior lifecycle\n * management.\n *\n * @param meta - Metadata describing the behavior’s category, unique key, and\n * criticality within the pipeline.\n * @returns A class decorator that applies behavior metadata to the target.\n */\nexport function VaultBehavior(meta: BehaviorMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[BEHAVIOR_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n\n if (meta.resolveType !== undefined) {\n target.resolveType = meta.resolveType;\n }\n\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","// vault-behavior.decorator.ts\nimport { CONTROLLER_META } from '../constants/controller-meta.constant';\nimport { ControllerMetaShape } from '../shapes/controller/controller-meta.shape';\n\n/**\n * Class decorator that attaches controller metadata to the target class.\n *\n * @param meta - The controller metadata shape to apply.\n * @returns A class decorator function.\n */\nexport function VaultController(meta: ControllerMetaShape) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (target: any) {\n // Attach full metadata for the orchestrator\n target[CONTROLLER_META] = meta;\n\n // Also mirror some fields onto static props for convenience\n if (meta.type !== undefined) {\n target.type = meta.type;\n }\n if (meta.key !== undefined) {\n target.key = meta.key;\n }\n if (meta.critical !== undefined) {\n target.critical = meta.critical;\n }\n if (meta.wantsConfig !== undefined) {\n target.wantsConfig = meta.wantsConfig;\n } else {\n target.wantsConfig = false;\n }\n\n if (meta.configKey !== undefined) {\n target.configKey = meta.configKey;\n }\n\n if (meta.needsLicense !== undefined) {\n target.needsLicense = meta.needsLicense;\n } else {\n target.needsLicense = false;\n }\n\n if (meta.licenseId !== undefined) {\n target.licenseId = meta.licenseId;\n }\n };\n}\n","/* -----------------------------------------------------------\n * META + DECORATORS\n * --------------------------------------------------------- */\nexport { VaultBehavior } from './vault-behavior.decorator';\nexport { VaultController } from './vault-controller.decorator';\n","import { VaultErrorUsageKindTypes } from './vault-error-usage-kind.type';\n\n/** Enumeration of top-level Vault error kind classifications. */\nexport const VaultErrorKindTypes = {\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type of all Vault error kind values including usage sub-kinds. */\nexport type VaultErrorKindType =\n | (typeof VaultErrorKindTypes)[keyof typeof VaultErrorKindTypes]\n | (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","/** Enumeration of Vault error name identifiers. */\nexport const VaultErrorNameTypes = {\n EncryptionIntegrity: 'VaultErrorEncryptionIntegrity',\n License: 'VaultErrorLicense',\n Usage: 'VaultErrorUsage',\n VaultError: 'VaultError'\n} as const;\n\n/** Union type derived from VaultErrorNameTypes values. */\nexport type VaultErrorNameType =\n (typeof VaultErrorNameTypes)[keyof typeof VaultErrorNameTypes];\n","import {\n VaultErrorKindType,\n VaultErrorKindTypes\n} from '../types/error/vault-error-kind.type';\nimport {\n VaultErrorNameType,\n VaultErrorNameTypes\n} from '../types/error/vault-error-name.type';\n\n/**\n * Base error class for all Vault-specific errors. Extends the native Error\n * with a typed name and kind for structured error classification.\n */\nexport class VaultError extends Error {\n /** Classification kind used to categorize this error in diagnostics. */\n readonly kind: VaultErrorKindType;\n\n /**\n * Creates a new VaultError instance with prototype chain correction.\n *\n * @param message - Human-readable description of the error.\n * @param name - Typed error name used for identification.\n * @param kind - Error kind used for diagnostic classification.\n */\n constructor(\n message: string,\n name: VaultErrorNameType = VaultErrorNameTypes.VaultError,\n kind: VaultErrorKindType = VaultErrorKindTypes.VaultError\n ) {\n super(message);\n\n this.name = name;\n this.kind = kind;\n\n // Required for proper instanceof checks in TS / ES5 targets\n Object.setPrototypeOf(this, new.target.prototype);\n\n // Optional but nice: clean stack trace\n // eslint-disable-next-line\n const anyError = Error as any;\n if (typeof anyError.captureStackTrace === 'function') {\n anyError.captureStackTrace(this, new.target);\n }\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when an encrypted payload fails AES-GCM integrity verification\n * during decryption, indicating tampered, corrupted, or mismatched key data.\n */\nexport class VaultEncryptionIntegrityError extends VaultError {\n /** Creates the error with a descriptive integrity-failure message. */\n constructor() {\n const message = `Encrypted snapshot failed integrity verification.\n\nThe encrypted payload could not be authenticated during AES-GCM decryption.\n\nPossible causes:\n\n• The stored ciphertext has been tampered with\n• The stored initialization vector (IV) was modified\n• The encryption key does not match the original key\n• The stored payload is corrupted\n\nVault refuses to restore state from unauthenticated encrypted data.`;\n\n super(message, VaultErrorNameTypes.EncryptionIntegrity);\n }\n}\n","/** Enumeration of usage-specific Vault error sub-kind classifications. */\nexport const VaultErrorUsageKindTypes = {\n Encryption: 'VaultErrorEncryption',\n License: 'VaultErrorLicense',\n Promise: 'VaultErrorUsagePromise',\n PromiseFactoryRequired: 'VaultErrorUsagePromiseFactoryRequired',\n Usage: 'VaultErrorUsage'\n} as const;\n\n/** Union type derived from VaultErrorUsageKindTypes values. */\nexport type VaultErrorUsageKindType =\n (typeof VaultErrorUsageKindTypes)[keyof typeof VaultErrorUsageKindTypes];\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Thrown when a behavior or controller fails license validation.\n */\nexport class VaultLicenseError extends VaultError {\n /**\n * Creates a license validation error.\n *\n * @param message - Description of the license violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.License\n ) {\n super(message, VaultErrorNameTypes.License, kind);\n }\n}\n","import { VaultErrorNameTypes } from '../types/error/vault-error-name.type';\nimport {\n VaultErrorUsageKindType,\n VaultErrorUsageKindTypes\n} from '../types/error/vault-error-usage-kind.type';\nimport { VaultError } from './vault-error';\n\n/**\n * Base error for Vault API usage violations detected at runtime.\n */\nexport class VaultUsageError extends VaultError {\n /**\n * Creates a usage error with the specified message and kind.\n *\n * @param message - Description of the usage violation.\n * @param kind - Usage-kind classification for diagnostics.\n */\n constructor(\n message: string,\n kind: VaultErrorUsageKindType = VaultErrorUsageKindTypes.Usage\n ) {\n super(message, VaultErrorNameTypes.Usage, kind);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when an eager Promise is passed directly to the state pipeline\n * instead of a deferred factory function.\n */\nexport class VaultUsagePromiseError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid incoming value: Promise detected.\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nUse the following instead a DeferredFactory value\n\nThis guarantees the promise is created and executed inside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.Promise);\n }\n}\n","import { VaultErrorUsageKindTypes } from '../types/error/vault-error-usage-kind.type';\nimport { VaultUsageError } from './vault-error.usage';\n\n/**\n * Thrown when a Promise-based state method receives a raw value instead\n * of a factory function that returns a Promise.\n */\nexport class VaultUsagePromiseFactoryRequiredError extends VaultUsageError {\n /** Creates the error with a descriptive usage-violation message. */\n constructor() {\n const message = `Invalid usage of Promise-based state API.\n\nYou called a Promise-specific method (replaceState / mergeState),\nbut did not provide a function that creates a Promise.\n\nExpected:\n• () => Promise<T>\n\nReceived:\n• A non-function value\n\nPromises are eager and may resolve or reject before entering the Vault pipeline.\n\nAlways wrap promises in a function so they are created and executed\ninside the pipeline.`;\n\n super(message, VaultErrorUsageKindTypes.PromiseFactoryRequired);\n }\n}\n","/* -----------------------------------------------------------\n * ERRORS\n * --------------------------------------------------------- */\nexport { VaultError } from './vault-error';\nexport { VaultEncryptionIntegrityError } from './vault-error.encryption-integrity';\nexport { VaultLicenseError } from './vault-error.license';\nexport { VaultUsageError } from './vault-error.usage';\nexport { VaultUsagePromiseError } from './vault-error.usage.promise';\nexport { VaultUsagePromiseFactoryRequiredError } from './vault-error.usage.promise-factory-required';\n","/* -----------------------------------------------------------\n * SERVICES\n * --------------------------------------------------------- */\nexport { VaultErrorService } from './error/vault-error.service';\nexport { VaultPrivateErrorService } from './error/vault-private-error.service';\n","/** Enumeration of message types dispatched to controllers during pipeline orchestration. */\nexport const ControllerMessageTypes = {\n Attempt: 'attempt',\n Failure: 'failure',\n Finalize: 'Finalize Pipeline',\n Success: 'success',\n Vote: 'vote' // mostly internal\n} as const;\n\n/** Union type derived from ControllerMessageTypes values. */\nexport type ControllerMessageType =\n (typeof ControllerMessageTypes)[keyof typeof ControllerMessageTypes];\n","/** Enumeration of votes a controller may cast during pipeline admission. */\nexport const ControllerVotes = {\n Abstain: 'abstain',\n Abort: 'abort',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from ControllerVotes values. */\nexport type ControllerVote =\n (typeof ControllerVotes)[keyof typeof ControllerVotes];\n","/** Enumeration of controller category classifications. */\nexport const ControllerTypes = {\n CoreAbstain: 'coreAbstain',\n Error: 'error',\n License: 'license',\n Policy: 'policy',\n ReplayGlobalError: 'replayGlobalError',\n Stepwise: 'stepwise',\n TabSync: 'tabSync'\n} as const;\n\n/** Union type derived from ControllerTypes values. */\nexport type ControllerType =\n (typeof ControllerTypes)[keyof typeof ControllerTypes];\n","/** Enumeration of conductor decision outcomes after controller voting. */\nexport const DecisionOutcomeTypes = {\n Abort: 'abort',\n Abstain: 'abstain',\n Deny: 'deny'\n} as const;\n\n/** Union type derived from DecisionOutcomeTypes values. */\nexport type DecisionOutcomeType =\n (typeof DecisionOutcomeTypes)[keyof typeof DecisionOutcomeTypes];\n","/** Enumeration of event boundary positions within a lifecycle span. */\nexport const EventBoundaryTypes = {\n End: 'end',\n Notification: 'notification',\n Start: 'start',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventBoundaryTypes values. */\nexport type EventBoundaryType =\n (typeof EventBoundaryTypes)[keyof typeof EventBoundaryTypes];\n","/** Enumeration of monitor event category classifications. */\nexport const EventTypes = {\n Conductor: 'conductor',\n Controller: 'controller',\n Lifecycle: 'lifecycle',\n Stage: 'stage',\n Unknown: 'unknown'\n} as const;\n\n/** Union type derived from EventTypes values. */\nexport type EventType = (typeof EventTypes)[keyof typeof EventTypes];\n","/** Enumeration of pipeline operation modes. */\nexport const OperationTypes = {\n Merge: 'merge',\n Replace: 'replace',\n Initialize: 'initialize'\n} as const;\n\n/** Union type derived from OperationTypes values. */\nexport type OperationType =\n (typeof OperationTypes)[keyof typeof OperationTypes];\n","/**\n * Enumerates the available resolve strategy identifiers used by resolve\n * behaviors. These identifiers indicate how a FeatureCell obtains its initial\n * and subsequent state values during the resolve stage of the pipeline.\n *\n * - `Value` — Resolve from a synchronous, in-memory value.\n * - `HttpResource` — Resolve using an HTTP-driven resource behavior.\n * - `Observable` — Resolve from an observable stream source.\n * - `Promise` — Resolve from a promise source.\n */\nexport const ResolveTypes = {\n HttpResource: 'http-resource',\n Observable: 'observable',\n Promise: 'promise',\n Value: 'value'\n} as const;\n\n/**\n * Union type representing all supported resolve strategy identifiers.\n */\nexport type ResolveType = (typeof ResolveTypes)[keyof typeof ResolveTypes];\n","/** Enumeration of state emission event classifications. */\nexport const StateEmitTypes = {\n IncomingPipeline: 'Incoming Pipeline',\n FinalizePipeline: 'Finalize Pipeline',\n PipelineError: 'Pipeline Error',\n PipelineDestroy: 'Pipeline Destroy',\n PipelineReset: 'Pipeline Reset',\n AbortController: 'Abort Controller',\n DenyController: 'Deny Controller',\n TabSync: 'Tab Sync'\n} as const;\n\n/** Union type derived from StateEmitTypes values. */\nexport type StateEmitType =\n (typeof StateEmitTypes)[keyof typeof StateEmitTypes];\n","/* -----------------------------------------------------------\n * TYPES (USER-FACING)\n * --------------------------------------------------------- */\nexport { BehaviorTypes } from './behavior/behavior.type';\nexport type { BehaviorType } from './behavior/behavior.type';\nexport type { DistinctComparison } from './behavior/distinct-comparison.type';\nexport type { CoreEmitStateCallback } from './callback/core-emit-state-callback.type';\nexport type { TapCallback } from './callback/tap-callback.type';\nexport type { VaultErrorCallback } from './callback/vault-error-callback.type';\nexport { ControllerMessageTypes } from './controller/controller-message.type';\nexport type { ControllerMessageType } from './controller/controller-message.type';\nexport { ControllerVotes } from './controller/controller-vote.type';\nexport type { ControllerVote } from './controller/controller-vote.type';\nexport { ControllerTypes } from './controller/controller.type';\nexport type { ControllerType } from './controller/controller.type';\nexport { DecisionOutcomeTypes } from './controller/decision-outcome.type';\nexport type { DecisionOutcomeType } from './controller/decision-outcome.type';\nexport { VaultErrorKindTypes } from './error/vault-error-kind.type';\nexport type { VaultErrorKindType } from './error/vault-error-kind.type';\nexport { VaultErrorNameTypes } from './error/vault-error-name.type';\nexport type { VaultErrorNameType } from './error/vault-error-name.type';\nexport { VaultErrorUsageKindTypes } from './error/vault-error-usage-kind.type';\nexport type { VaultErrorUsageKindType } from './error/vault-error-usage-kind.type';\nexport { EventBoundaryTypes } from './event/event-boundary.type';\nexport type { EventBoundaryType } from './event/event-boundary.type';\nexport { EventTypes } from './event/event.type';\nexport type { EventType } from './event/event.type';\nexport type { FilterFunction } from './function/filter-function.type';\nexport type { ReducerFunction } from './function/reducer-function.type';\nexport type { InterceptorStateType } from './interceptor-state.type';\nexport { LogLevelTypes } from './logging/log-level.type';\nexport type { LogLevelType } from './logging/log-level.type';\nexport { OperationTypes } from './operation.type';\nexport type { OperationType } from './operation.type';\nexport type { PipelinePersistValue } from './pipeline/pipeline-persist-value.type';\nexport type { PipelineUpstreamValue } from './pipeline/pipeline-upstream-value.type';\nexport type { PipelineValue } from './pipeline/pipeline-value.type';\nexport { ResolveTypes } from './resolve.type';\nexport type { ResolveType } from './resolve.type';\nexport type { CoreEmitStateResult } from './state/core-emit-state-result.type';\nexport type { DeferredFactory } from './state/deferred-factory.type';\nexport type { DeferredType } from './state/deferred.type';\nexport type { FinalState } from './state/final-state.type';\nexport { StateEmitTypes } from './state/state-emit.type';\nexport type { StateEmitType } from './state/state-emit.type';\nexport type { StateInputType } from './state/state-input.type';\n","/**\n * Creates a normalized behavior key identifier used for behavior registration.\n *\n * A behavior key uniquely identifies a behavior within the Vault pipeline,\n * following the canonical format:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Both `domain` and `name` are normalized by:\n * - capitalizing the first character\n * - removing all non-alphanumeric characters\n *\n * This ensures consistent and predictable behavior keys for orchestration,\n * diagnostics, and tooling.\n *\n * @param domain - The logical domain or category of the behavior.\n * @param name - The specific behavior name within the domain.\n * @returns A normalized behavior key string.\n */\nexport function defineBehaviorKey(domain: string, name: string): string {\n return defineVaultKey('Behavior', domain, name);\n}\n\n/**\n * Constructs a normalized Vault key for behavior or controller registration.\n *\n * @param kind - Whether the key is for a Behavior or Controller.\n * @param domain - The logical domain or category.\n * @param name - The specific name within the domain.\n * @returns A normalized Vault key string.\n */\nexport function defineVaultKey(\n kind: 'Behavior' | 'Controller',\n domain: string,\n name: string\n): string {\n const normalize = (s: string) =>\n s.charAt(0).toUpperCase() + s.slice(1).replace(/[^A-Za-z0-9]/g, '');\n\n return `SDUX::${kind}::${normalize(domain)}::${normalize(name)}`;\n}\n\n/**\n * Validates whether a string conforms to the Vault behavior key format.\n *\n * A valid behavior key must follow the structure:\n *\n * `SDUX::<Domain>::<Name>`\n *\n * Where `<Domain>` and `<Name>` begin with an uppercase character and contain\n * only alphanumeric characters.\n *\n * @param key - The behavior key string to validate.\n * @returns `true` if the key matches the required pattern; otherwise `false`.\n */\nexport function validateBehaviorKey(key: string): boolean {\n if (typeof key !== 'string') return false;\n\n const pattern =\n /^SDUX::(Behavior|Controller)::[A-Z][A-Za-z0-9]*::[A-Z][A-Za-z0-9]*$/;\n return pattern.test(key);\n}\n","import {\n defineVaultKey,\n validateBehaviorKey\n} from '../behavior/define-behavior-key.util';\n\n/**\n * Creates a normalized controller key following the Vault key format.\n *\n * @param domain - The logical domain or category of the controller.\n * @param name - The specific controller name within the domain.\n * @returns A normalized controller key string.\n */\nexport function defineControllerKey(domain: string, name: string): string {\n return defineVaultKey('Controller', domain, name);\n}\n\n/**\n * Validates whether a string conforms to the Vault controller key format.\n *\n * @param key - The controller key string to validate.\n * @returns `true` if the key matches the required pattern.\n */\nexport function validateControllerKey(key: string): boolean {\n return validateBehaviorKey(key);\n}\n","import { DeferredFactory } from '../../types/state/deferred-factory.type';\n\n/**\n * Determines whether a value conforms to the DeferredFactory contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is an object with a callable `value` property.\n */\nexport function isDeferredFactory<T = unknown>(\n value: unknown\n): value is DeferredFactory<T> {\n return (\n !!value &&\n typeof value === 'object' &&\n // eslint-disable-next-line\n typeof (value as any).value === 'function'\n );\n}\n","import { VaultErrorShape } from '../../shapes/vault-error.shape';\n\n/**\n * Normalizes any thrown error into a canonical `VaultError` structure.\n *\n * This ensures that all errors—HTTP, runtime, string, or unknown—\n * are represented consistently throughout the Vault error pipeline.\n *\n * @param err - The raw thrown value.\n * @param featureCellKey - the origination of the error\n * @returns A fully normalized `VaultError`.\n */\nexport function createVaultError(\n err: unknown,\n featureCellKey: string\n): VaultErrorShape {\n const timestamp = Date.now();\n\n // -----------------------------------------\n // Standard JS Error\n // -----------------------------------------\n if (err instanceof Error) {\n return {\n message: err.message || 'Unexpected error',\n details: err.stack,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // String error\n // -----------------------------------------\n if (typeof err === 'string') {\n return {\n message: err,\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n }\n\n // -----------------------------------------\n // Fallback: unknown error\n // -----------------------------------------\n return {\n message: 'Unexpected error',\n details: err,\n raw: err,\n timestamp,\n featureCellKey\n };\n}\n","/*\n| Category | Type / Example | structuredClone behavior | deepFreeze fallback behavior | Isolated? | Notes |\n| ------------------------ | --------------------- | ------------------------- | ------------------------------------- | ---------- | ---------------------------------------------- |\n| **Primitives** | number | Returned as-is | Returned as-is | ✅ Yes | Immutable by definition |\n| | string | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | boolean | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | bigint | Returned as-is | Returned as-is | ✅ Yes | Immutable |\n| | symbol | Returned as-is | Returned as-is | ✅ Yes | Identity preserved |\n| | undefined | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| | null | Returned as-is | Returned as-is | ✅ Yes | No mutation possible |\n| **Plain Objects** | `{ a: 1 }` | Deep cloned | Deep cloned + frozen | ✅ Yes | Always returns new reference |\n| **Arrays** | `[1,2,3]` | Deep cloned | Deep cloned + frozen | ✅ Yes | Structural mutation blocked |\n| **Functions** | `() => {}` | ❌ Throws | Returned as-is | ⚠️ Partial | Cannot be cloned or frozen meaningfully |\n| **Promises** | `Promise.resolve()` | ❌ Throws | Returned as-is | ⚠️ Partial | Identity preserved intentionally |\n| **Dates** | `new Date()` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Time value preserved |\n| **RegExp** | `/abc/g` | Cloned | Frozen original OR cloned+frozen | ✅ Yes | Pattern preserved |\n| **Error** | `new Error()` | Cloned (core fields only) | Frozen original OR cloned+frozen | ⚠️ Partial | Custom props not guaranteed |\n| **Map** | `new Map()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.set()` still works; internal slots preserved |\n| **Set** | `new Set()` | Deep cloned | Same reference, frozen wrapper | ⚠️ Partial | `.add()` still works |\n| **WeakMap** | `new WeakMap()` | ❌ Throws | Returned as-is | ❌ No | Cannot be cloned or frozen safely |\n| **WeakSet** | `new WeakSet()` | ❌ Throws | Returned as-is | ❌ No | Cannot be isolated |\n| **TypedArray** | `Uint8Array` | Cloned | Frozen | ✅ Yes | Buffer copied or locked |\n| **ArrayBuffer** | `ArrayBuffer` | Cloned | Frozen | ✅ Yes | Memory isolated |\n| **DataView** | `DataView` | Cloned | Frozen | ✅ Yes | Backing buffer safe |\n| **Observable (RxJS)** | `new Observable()` | ❌ Throws | Same reference, frozen wrapper | ⚠️ Partial | Internal emissions mutable |\n| **Class Instance** | `new Foo()` | Prototype stripped | Frozen instance | ⚠️ Partial | Methods lost on clone |\n| **Object.create(null)** | null-proto object | Cloned | Deep cloned + frozen | ✅ Yes | Prototype normalized |\n| **Cyclic Objects** | `{ self }` | Cloned with cycles | Deep cloned + frozen (cycle-safe) | ✅ Yes | WeakSet prevents recursion |\n| **Getters / Setters** | `{ get x(){} }` | Getter invoked | Getter not invoked | ⚠️ Partial | Side effects possible |\n| **Non-enumerable props** | defineProperty | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Visibility differs |\n| **Symbol-keyed props** | `{ [sym]: 1 }` | Dropped | Preserved if fallback clone path used | ⚠️ Partial | Symbols skipped by clone |\n| **DOM Nodes** | `HTMLElement` | ❌ Throws | Same reference, frozen wrapper | ❌ No | Host object semantics |\n| **Proxy (well-formed)** | `new Proxy()` | Cloned | Frozen target (if accessible) | ⚠️ Partial | Depends on handler |\n| **Proxy (malicious)** | fake ownKeys | ❌ Throws | ❌ Throws | ❌ No | Engine invariant violation |\n| **JSON-like data** | POJO graphs | Deep cloned | Deep cloned + frozen | ✅ Yes | Ideal use case |\n| **Modules** | ES module namespace | ❌ Throws | Returned as-is | ❌ No | Immutable by spec |\n| **Intl objects** | `Intl.DateTimeFormat` | Cloned | Frozen | ⚠️ Partial | Internal slots opaque |\n| **Shared References** | `{a:x, b:x}` | Preserved in clone | Preserved in clone | ✅ Yes | Graph identity maintained |\n| **Sparse Arrays** | `[ , , 3 ]` | Preserved | Preserved | ✅ Yes | Holes maintained |\n| **Symbol Values** | `{ x: Symbol() }` | Preserved | Preserved | ✅ Yes | Value identity intact |\n| **Mixed Graphs** | fn + object | ❌ Partial | Clone + preserve refs | ⚠️ Partial | Hybrid isolation |\n| **Frozen Objects** | `Object.freeze(obj)` | Cloned (unfrozen) | Preserved frozen OR cloned+frozen | ✅ Yes | Freeze state not guaranteed |\n| **Boxed Primitives** | `new Number(1)` | Cloned | Frozen | ✅ Yes | Unboxed behavior retained |\n*/\n\n/**\n * Recursively freezes an object and all nested properties to prevent mutation.\n *\n * @param obj - The object to deep-freeze.\n * @param seen - WeakSet used to track visited references and prevent cycles.\n * @returns The frozen object.\n */\nfunction deepFreeze<T>(obj: T, seen = new WeakSet<object>()): T {\n if (obj === null || typeof obj !== 'object') return obj;\n\n const o = obj as unknown as object;\n if (seen.has(o)) return obj;\n seen.add(o);\n\n if (!Object.isFrozen(o)) Object.freeze(o);\n\n for (const key of Reflect.ownKeys(o)) {\n const desc = Object.getOwnPropertyDescriptor(o, key);\n /* istanbul ignore next -- impossible after Object.freeze due to Proxy invariants */\n if (!desc) continue;\n\n // Only recurse into data properties; do NOT invoke getters\n if ('value' in desc) {\n // eslint-disable-next-line\n deepFreeze((desc as PropertyDescriptor).value as any, seen);\n }\n }\n\n return obj;\n}\n\n/**\n * Creates an immutable copy of a value using structuredClone with a deepFreeze fallback.\n *\n * @param value - The value to isolate.\n * @returns An immutable copy of the value.\n */\nexport const isolateValue = <T>(value: T): T => {\n if (value === null || typeof value !== 'object') return value;\n\n if (Object.isFrozen(value)) return value;\n\n try {\n if (\n value instanceof Map ||\n value instanceof Set ||\n value instanceof WeakMap ||\n value instanceof WeakSet\n ) {\n try {\n return structuredClone(value);\n } catch {\n return deepFreeze(value); // ← IMPORTANT: same reference\n }\n }\n return structuredClone(value);\n } catch {\n const clone = Array.isArray(value)\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [...(value as any)]\n : Object.assign(Object.create(Object.getPrototypeOf(value)), value);\n\n return deepFreeze(clone);\n }\n};\n","import { VAULT_CLEAR_STATE } from '../../constants/vault/vault-clear-state.constant';\nimport { VAULT_CONTINUE } from '../../constants/vault/vault-continue.constant';\nimport { VAULT_NOOP } from '../../constants/vault/vault-noop.constant';\nimport { StateInputShape } from '../../shapes/state/state-input.shape';\nimport { FinalState } from '../../types/state/final-state.type';\n\n/**\n * Indicates whether a final pipeline value represents a NOOP condition.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_NOOP` sentinel.\n */\nexport const isVaultNoop = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_NOOP;\n};\n\n/**\n * Indicates whether a final pipeline value represents the clear-state sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CLEAR_STATE` sentinel.\n */\nexport const isVaultClearState = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CLEAR_STATE;\n};\n\n/**\n * Indicates whether a final pipeline value represents the continue sentinel.\n *\n * @param current - The computed pipeline result.\n * @returns `true` if the value is the `VAULT_CONTINUE` sentinel.\n */\nexport const isVaultContinue = <T>(current: FinalState<T>): boolean => {\n return current === VAULT_CONTINUE;\n};\n\n/**\n * Checks whether a value is exactly `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `null`.\n */\nexport const isNull = (current: unknown): current is null => current === null;\n\n/**\n * Checks whether a value is exactly `undefined`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is `undefined`.\n */\nexport const isUndefined = (current: unknown): current is undefined =>\n current === undefined;\n\n/**\n * Determines whether a value is defined (not `undefined`).\n * Note: This intentionally does *not* exclude `null`.\n *\n * @param current - The value to check.\n * @returns `true` if the value is not `undefined`.\n */\nexport const isDefined = (current: unknown): boolean => !isUndefined(current);\n\n/**\n * Determines whether a value is nullish — meaning either `null` or `undefined`.\n *\n * @param current - The value to inspect.\n * @returns `true` for `null` or `undefined`, otherwise `false`.\n */\nexport const isNullish = (current: unknown): current is null | undefined =>\n current == null;\n\n/**\n * Determines whether a value is a function.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a function.\n */\nexport const isFunction = (\n value: unknown\n): // eslint-disable-next-line\nvalue is (...args: any[]) => unknown => typeof value === 'function';\n\n/**\n * Determines whether a value is a non-null object.\n *\n * @param value - The value to check.\n * @returns `true` if the value is an object and not null.\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null;\n\n/**\n * Determines whether a value is a plain object with no custom prototype.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a plain object.\n */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> => {\n if (value === null || typeof value !== 'object') return false;\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n};\n\n/**\n * Determines whether a value conforms to the StateInputShape contract.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value is a plain object with recognized state keys or is empty.\n */\nexport const isStateInputShape = <T>(\n value: unknown\n): value is StateInputShape<T> => {\n if (!isPlainObject(value)) return false;\n\n const v = value as Record<string, unknown>;\n\n const hasKnownKey =\n Object.prototype.hasOwnProperty.call(v, 'loading') ||\n Object.prototype.hasOwnProperty.call(v, 'value') ||\n Object.prototype.hasOwnProperty.call(v, 'error');\n\n const isEmptyObject = Object.keys(v).length === 0;\n\n return hasKnownKey || isEmptyObject;\n};\n","/**\n * Determines whether a value is a thenable Promise-like object.\n *\n * @param value - The value to inspect.\n * @returns `true` if the value has a callable `then` property.\n */\nexport function isPromise<T = unknown>(value: unknown): value is Promise<T> {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n // eslint-disable-next-line\n typeof (value as any).then === 'function'\n );\n}\n","import { HttpResourceRefShape } from '../../shapes/http-resource-ref-shape.shape';\n\n/**\n * Type guard that determines whether a value is an `HttpResourceRef<T>`.\n *\n * An `HttpResourceRef` is a structured object produced by Angular’s\n * `HttpClient` resource APIs. It contains a standardized shape used by\n * Vault to detect and normalize resource-backed state transitions.\n *\n * This utility checks only for the presence of the canonical\n * `HttpResourceRef` fields (`value`, `isLoading`, `error`, `hasValue`)\n * and does not validate the internal content of those properties.\n *\n * @typeParam T - The resource value type.\n *\n * @param obj - The value to test.\n * @returns `true` if the value matches the structural shape of an\n * `HttpResourceRef<T>`, otherwise `false`.\n */\n// eslint-disable-next-line\nexport function isHttpResourceRef<T>(obj: any): obj is HttpResourceRefShape<T> {\n return !!(\n obj &&\n typeof obj === 'object' &&\n 'value' in obj &&\n 'isLoading' in obj &&\n 'error' in obj &&\n 'hasValue' in obj\n );\n}\n","/* -----------------------------------------------------------\n * UTILITY FUNCTIONS (SAFE TO WILDCARD)\n * --------------------------------------------------------- */\nexport {\n defineBehaviorKey,\n validateBehaviorKey\n} from './behavior/define-behavior-key.util';\nexport {\n defineControllerKey,\n validateControllerKey\n} from './controller/define-controller-key.util';\nexport { isDeferredFactory } from './deferred-factory/is-deferred-factory.util';\nexport { DevMode } from './dev-mode/dev-mode.util';\nexport { isTestEnv } from './dev-mode/testing-environment.util';\nexport { createVaultError } from './error/create-vault-error.util';\nexport { isolateValue } from './isolate-value/isolate-value.util';\nexport {\n getVaultLogLevel,\n setVaultLogLevel,\n vaultDebug,\n vaultError,\n vaultLog,\n vaultWarn\n} from './logger/logger.util';\nexport {\n isDefined,\n isFunction,\n isNull,\n isNullish,\n isObject,\n isStateInputShape,\n isUndefined,\n isVaultClearState,\n isVaultContinue,\n isVaultNoop\n} from './logic/logic.utils';\nexport { isPromise } from './promise/is-promise.util';\nexport { isHttpResourceRef } from './resolve/is-http-resource.util';\nexport { safeStringify } from './safe-stringify/safe-stringify.util';\nexport { registerVersion } from './version/version.register';\n","/*\n * Public API Surface of @sdux-vault/shared\n *\n * IMPORTANT:\n * - JSDoc is preserved only when using named exports.\n * - Avoid `export *` for public-facing interfaces, behaviors, and types.\n * - Internal utilities may still use `export *`.\n */\n\n/* -----------------------------------------------------------\n * INTENTIONAL SIDE EFFECTS\n * --------------------------------------------------------- */\n\n/**\n * This is to handle fluent api requirements for behaviors and controllers\n */\nimport './typings/global';\n\n/**\n * This is for version support in dev mode and tracking in the devtools\n */\nimport './lib/version/version.register';\n\n/* -----------------------------------------------------------\n * DOMAIN EXPORTS\n * --------------------------------------------------------- */\nexport * from './lib/abstracts';\nexport * from './lib/config';\nexport * from './lib/constants';\nexport * from './lib/contexts';\nexport * from './lib/decorators';\nexport * from './lib/errors';\nexport * from './lib/interfaces';\nexport * from './lib/services';\nexport * from './lib/shapes';\nexport * from './lib/types';\nexport * from './lib/utils';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["_instance"],"mappings":";;AAAA;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,IAAI,MAAM,GAAA;QACR;;AAEE,QAAA,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW;;;AAGlD,YAAA,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW;;;AAG/C,YAAA,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW;IAErD;;;ACXF;AACA,IAAI,OAAO,GAAmB,IAAI;AAElC;AACO,MAAM,OAAO,GAAG;AACrB,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,OAAO,KAAK,IAAI;IACzB,CAAC;AAED,IAAA,UAAU,CAAC,SAAkB,EAAA;QAC3B,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACzC,YAAA,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC;QAClE;QAEA,OAAO,GAAG,SAAS;IACrB;;;ACdF;;;;;AAKG;MACU,eAAe,GAAG,CAAC,WAAmB,EAAE,OAAe,KAAU;IAC5E,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,UAAU,KAAK,WAAW;QAAE;IAE1D,MAAM,IAAI,IAAI,UAAU,CAAC,IAAI,KAAK,EAAe,CAAC;IAClD,MAAM,KAAK,IAAI,IAAI,CAAC,WAAW,KAAK,EAAE,CAAC;IACvC,MAAM,QAAQ,IAAI,KAAK,CAAC,QAAQ,KAAK,EAAE,CAAC;AAExC,IAAA,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,OAAO;QAAE;AAEvC,IAAA,QAAQ,CAAC,WAAW,CAAC,GAAG,OAAO;AACjC;;ACjBA;AACA,MAAM,YAAY,GAAG,oBAAoB;AA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