@sdux-vault/core 0.0.9
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/LICENSE +249 -0
- package/README.md +190 -0
- package/fesm2022/sdux-vault-core.mjs +1841 -0
- package/fesm2022/sdux-vault-core.mjs.map +1 -0
- package/package.json +52 -0
- package/types/sdux-vault-core.d.ts +219 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdux-vault-core.mjs","sources":["../../../libs/core/src/lib/behaviors/observable/interface/from-observable-behavior.interface.ts","../../../libs/core/src/lib/behaviors/promise/interface/from-promise-behavior.interface.ts","../../../libs/core/src/lib/behaviors/resolve/from-stream/interface/from-stream-behavior.interface.ts","../../../libs/core/src/extensions/index.ts","../../../libs/core/src/lib/version/version.register.ts","../../../libs/core/src/lib/behaviors/merge/object/with-object-shallow-merge.behavior.ts","../../../libs/core/src/lib/behaviors/error/with-core-error-callback/with-core-error-callback.behavior.ts","../../../libs/core/src/lib/behaviors/error/with-core-error/with-core-error.behavior.ts","../../../libs/core/src/lib/behaviors/filter/with-core-filter.behavior.ts","../../../libs/core/src/lib/behaviors/merge/array/with-array-merge.behavior.ts","../../../libs/core/src/lib/behaviors/observable/function/extend-from-observable.function.ts","../../../libs/core/src/lib/behaviors/observable/with-core-from-observable.behavior.ts","../../../libs/core/src/lib/behaviors/promise/function/extend-from-promise.function.ts","../../../libs/core/src/lib/behaviors/promise/with-core-from-promise.behavior.ts","../../../libs/core/src/lib/behaviors/reducer/with-core-reducer.behavior.ts","../../../libs/core/src/lib/behaviors/resolve/core-observable/with-core-observable.behavior.ts","../../../libs/core/src/lib/behaviors/resolve/core-promise/with-core-promise.behavior.ts","../../../libs/core/src/lib/behaviors/resolve/core-value/with-core-value.behavior.ts","../../../libs/core/src/lib/behaviors/resolve/from-stream/function/extend-from-stream.function.ts","../../../libs/core/src/lib/behaviors/resolve/from-stream/with-core-from-stream.behavior.ts","../../../libs/core/src/lib/behaviors/state/with-core-emit-state/with-core-emit-state.behavior.ts","../../../libs/core/src/lib/constants/vault-external.constant.ts","../../../libs/core/src/lib/behaviors/state/with-core-state/with-core-state.behavior.ts","../../../libs/core/src/lib/behaviors/tap/tap.abstract.ts","../../../libs/core/src/lib/behaviors/tap/with-core-after-tap.behavior.ts","../../../libs/core/src/lib/behaviors/tap/with-core-before-tap.behavior.ts","../../../libs/core/src/lib/factories/feature-cell/feature-cell.ts","../../../libs/core/src/lib/factories/vault/vault.ts","../../../libs/core/src/public-api.ts","../../../libs/core/src/sdux-vault-core.ts"],"sourcesContent":["// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > behaviors > observable > interface > from-observable-behavior.interface.ts\n// Updated: 2026-03-30 18:53\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultStateRef } from '@sdux-vault/engine';\nimport { BehaviorExtFunction } from '@sdux-vault/shared';\nimport { Observable } from 'rxjs';\n\n/**\n * Extension contract for observable-based FeatureCell integration.\n *\n * This interface defines the shape of the dynamically injected\n * `fromObservable` API that allows a FeatureCell to accept observable\n * sources and expose them as normalized vault state references.\n */\nexport interface FromObservableBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {\n [key: string]: BehaviorExtFunction | undefined;\n\n /**\n * Behavior extension function that installs the `fromObservable` API.\n */\n fromObservable: BehaviorExtFunction;\n}\n\ndeclare module '@sdux-vault/shared' {\n /**\n * FeatureCell extension interface augmented with observable integration support.\n */\n interface FeatureCellExtension<TEntity> {\n /**\n * Wraps an observable source and exposes it as a stream of vault state references.\n *\n * @param source$ Observable emitting raw entity values.\n * @returns Observable emitting vault state references.\n */\n fromObservable?(source$: Observable<TEntity>): Observable<VaultStateRef<TEntity>>;\n }\n}\n\nexport const __fromObservable = true;\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > behaviors > promise > interface > from-promise-behavior.interface.ts\n// Updated: 2026-03-30 18:54\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { BehaviorExtFunction, DeferredFactory, StateInputShape } from '@sdux-vault/shared';\n\n/**\n * Runtime extension contract for promise-based state resolution APIs.\n *\n * This interface defines the behavior extension surface exposed when a\n * promise-capable resolve behavior is installed. It declares the dynamic\n * methods added to a FeatureCell to support deferred and promise-based\n * resolution through the pipeline.\n *\n * --RelatedStart--\n * DeferredFactory\n * --RelatedEnd--\n */\nexport interface FromPromiseBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {\n [key: string]: BehaviorExtFunction | undefined;\n\n /**\n * Resolves state from a deferred factory using promise semantics.\n */\n fromPromise: BehaviorExtFunction;\n\n /**\n * Resolves state from a deferred factory using deferred semantics.\n */\n fromDeferred: BehaviorExtFunction;\n}\n\ndeclare module '@sdux-vault/shared' {\n /**\n * FeatureCell extension methods for promise-based state resolution.\n */\n interface FeatureCellExtension<TEntity> {\n /**\n * Resolves state from a deferred factory using deferred semantics.\n *\n * @param incoming Deferred factory that produces the state value.\n * @returns A promise resolving to a normalized state envelope.\n */\n fromDeferred?(incoming: DeferredFactory<TEntity>): Promise<StateInputShape<TEntity>>;\n\n /**\n * Resolves state from a deferred factory using promise semantics.\n *\n * @param incoming Deferred factory that produces the state value.\n * @returns A promise resolving to a normalized state envelope.\n */\n fromPromise?(incoming: DeferredFactory<TEntity>): Promise<StateInputShape<TEntity>>;\n }\n}\n\nexport const __fromPromise_extension = true;\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > behaviors > resolve > from-stream > interface > from-stream-behavior.interface.ts\n// Updated: 2026-03-30 18:27\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { BehaviorExtFunction } from '@sdux-vault/shared';\nimport { Observable } from 'rxjs';\nimport { FromStreamOptions } from '../options/from-stream.options';\n\n/**\n * Runtime extension contract for behaviors that expose a `fromStream` API.\n *\n * This interface defines the shape of the dynamically injected extension\n * that enables streaming observable sources to participate in pipeline\n * execution through a FeatureCell instance.\n */\nexport interface FromStreamBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {\n [key: string]: BehaviorExtFunction | undefined;\n\n /**\n * Function used to bridge an observable stream into the FeatureCell pipeline.\n */\n fromStream: BehaviorExtFunction;\n}\n\ndeclare module '@sdux-vault/shared' {\n /**\n * FeatureCell extension surface for stream-based resolution.\n */\n interface FeatureCellExtension<TEntity> {\n /**\n * Submits a streaming observable source for pipeline processing.\n *\n * @param source$ Observable stream emitting candidate values.\n * @param options Optional configuration controlling stream behavior.\n */\n fromStream?(source$: Observable<TEntity>, options?: FromStreamOptions): void;\n }\n}\nexport const __fromStream_extension = true;\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > extensions > index.ts\n// Updated: 2026-03-30 18:48\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n// This file exists ONLY for side effects\n\n// Register ALL behavior extensions\nimport * as observableExt from '../lib/behaviors/observable/interface/from-observable-behavior.interface';\nimport * as promiseExt from '../lib/behaviors/promise/interface/from-promise-behavior.interface';\nimport * as streamExt from '../lib/behaviors/resolve/from-stream/interface/from-stream-behavior.interface';\n\nvoid observableExt;\nvoid promiseExt;\nvoid streamExt;\n\nexport * from '../lib/behaviors/observable/interface/from-observable-behavior.interface';\nexport * from '../lib/behaviors/promise/interface/from-promise-behavior.interface';\nexport * from '../lib/behaviors/resolve/from-stream/interface/from-stream-behavior.interface';\n\nexport const __core_extensions_loaded = true;\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > version > version.register.ts\n// Updated: 2026-03-03 08:07\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { registerVersion } from '@sdux-vault/shared';\n\nconst SDUX_PACKAGE = '@sdux-vault/core';\nconst SDUX_VERSION = '0.0.9';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","import {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n MergeBehaviorContract,\n PipelineUpstreamValue,\n VAULT_CLEAR_STATE,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\nimport { MergeConfig } from '@sdux-vault/shared';\n\n/**\n * Shallow object merge behavior for the Vault merge stage.\n *\n * This behavior performs a one-level object merge where the incoming\n * object spreads over the existing state. Non-object values, arrays,\n * and `null` values bypass merging and are returned directly.\n *\n * The behavior also supports optional merge configuration, such as\n * `clearUndefined`, which determines whether an `undefined` incoming\n * value should clear the current state.\n *\n * This merge strategy is marked as a core, critical behavior and must\n * always be present when selected as the FeatureCell’s merge behavior.\n *\n * @typeParam T - The state value type processed during merge.\n */\n@VaultBehavior({\n type: BehaviorTypes.Merge,\n key: defineBehaviorKey('Core', 'ObjectMerge'),\n critical: true\n})\nexport class withObjectShallowMergeBehavior<T> implements MergeBehaviorContract<T> {\n /** Static metadata used for orchestrator behavior classification. */\n static readonly type: BehaviorType;\n\n /** Unique identifier for behavior diagnostics and devtools. */\n static readonly key: string;\n\n /** Indicates this merge behavior is pipeline-critical. */\n static readonly critical = true;\n\n /** Pipeline behavior type identifier. */\n readonly type = BehaviorTypes.Merge;\n\n /** Unique merge behavior instance identifier. */\n readonly key: string;\n\n /** Instance-level criticality flag. */\n readonly critical = true;\n\n /**\n * Creates a new shallow object merge behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the factory.\n * @param behaviorCtx - BehaviorCtx for future extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Computes the shallow merge result between the current state and\n * the incoming value. Non-object inputs bypass merging and are\n * forwarded directly. When `clearUndefined=true`, an undefined\n * incoming value clears the state.\n *\n * @param currentValue - The current FeatureCell state value.\n * @param nextValue - The incoming value to merge into the current state.\n * @param options - Optional merge configuration including `clearUndefined`.\n * @returns The merged or forwarded next state value.\n */\n computeMerge(\n currentValue: PipelineUpstreamValue<T> | undefined,\n nextValue: PipelineUpstreamValue<T> | undefined,\n options?: MergeConfig\n ): PipelineUpstreamValue<T> | undefined {\n const curr = currentValue;\n const next = nextValue;\n\n const clear = options?.clearUndefined ?? false;\n\n vaultDebug(`${this.key} shallow merge (clearUndefined=${clear})`);\n\n if (next === undefined && !clear) {\n vaultDebug(`${this.key} next undefined, preserve current`);\n return curr;\n }\n\n if (next === undefined && clear) {\n vaultDebug(`${this.key} next undefined & clear=true → return undefined`);\n return VAULT_CLEAR_STATE;\n }\n\n if (\n curr == null ||\n next == null ||\n typeof curr !== 'object' ||\n typeof next !== 'object' ||\n Array.isArray(curr) ||\n Array.isArray(next)\n ) {\n vaultDebug(`${this.key} non-object merge return next`);\n return next;\n }\n\n vaultDebug(`${this.key} shallow merge curr & next`);\n return { ...curr, ...next } as PipelineUpstreamValue<T>;\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n * This merge behavior maintains no internal resources.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the shallow merge behavior.\n *\n * Object shallow merge is a fully stateless, pure merge strategy.\n * It holds no timers, caches, or internal merge state, meaning\n * there is nothing to reset. This lifecycle hook exists solely\n * to support the FeatureCell reset pipeline and to provide a\n * diagnostic signal for DevTools and monitoring systems.\n *\n * After reset, the behavior continues to function identically.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n AbstractErrorCallbackBehavior,\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n StateSnapshotShape,\n VaultBehavior,\n VaultErrorCallback,\n VaultErrorShape,\n vaultWarn\n} from '@sdux-vault/shared';\n/**\n * Core error callback behavior for invoking legacy error handlers.\n *\n * This behavior executes an optional consumer-supplied error callback when a\n * pipeline error occurs, forwarding the normalized error and an immutable\n * snapshot of the FeatureCell state without altering error flow.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreErrorCallback,\n key: defineBehaviorKey('Core', 'ErrorCallback'),\n critical: true\n})\nexport class withCoreErrorCallbackBehavior<T> extends AbstractErrorCallbackBehavior<T> {\n /**\n * Static behavior type identifier used for orchestrator classification.\n */\n static readonly type: BehaviorType;\n\n /**\n * Static behavior key used for diagnostics and tooling.\n */\n static readonly key: string;\n\n /**\n * Indicates that this behavior is critical within the pipeline.\n */\n static readonly critical: boolean;\n\n /**\n * Indicates that this error callback behavior is always executed.\n */\n override readonly critical = withCoreErrorCallbackBehavior.critical;\n\n /**\n * Creates a new core error callback behavior instance.\n *\n * @param key Unique behavior identifier.\n * @param behaviorCtx Behavior class context for dependency access.\n */\n constructor(key: string, behaviorCtx: BehaviorClassContext) {\n super(key, behaviorCtx);\n }\n\n /**\n * Invokes a legacy error callback with the normalized error and state snapshot.\n *\n * @param current The normalized error value.\n * @param state Immutable snapshot of the FeatureCell state.\n * @param oldschoolCallback Optional legacy callback function.\n * @returns Resolves after callback execution completes.\n */\n async callbackError(\n current: VaultErrorShape,\n state: StateSnapshotShape<T>,\n oldschoolCallback: VaultErrorCallback<T>\n ): Promise<void> {\n if (typeof oldschoolCallback !== 'function') {\n vaultWarn(`${this.key} handleError skipped - \"${oldschoolCallback}\" is not a function.`);\n } else {\n try {\n await oldschoolCallback(current, state);\n } catch (err) {\n vaultWarn(`${this.key} oldschoolCallback threw: ${err}`);\n }\n }\n\n return;\n }\n}\n","import { CoreErrorBehaviorContract } from '@sdux-vault/engine';\nimport {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n VaultBehavior,\n VaultErrorShape,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core error behavior used internally by the Vault orchestrator.\n *\n * This behavior represents the **first step** in the error-handling pipeline.\n * It is intentionally minimal and exists solely to normalize any thrown value—\n * regardless of type—into a canonical ResourceStateError using\n * resourceError.\n *\n * ## Responsibilities\n * - Convert `unknown` errors into a well-structured `ResourceStateError`\n * - Provide a deterministic starting point for all addon error behaviors\n * - Guarantee error normalization before transformations occur\n *\n * All richer behaviors (mapping, retries, notifications, old-school callbacks)\n * are implemented as **addon error behaviors** layered after this one.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreError,\n key: defineBehaviorKey('Core', 'Error'),\n critical: true\n})\nexport class withCoreErrorBehavior<T> implements CoreErrorBehaviorContract<T> {\n /** Behavior type metadata assigned by the decorator. */\n static readonly type: BehaviorType;\n\n /**\n * Unique behavior key assigned by the decorator. */\n static readonly key: string;\n\n /** Indicates this behavior participates critically in the pipeline. */\n static readonly critical: boolean;\n\n /** Indicates that this error behavior is critical and always executed. */\n readonly critical = true;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Behavior type for orchestrator registration. */\n readonly type = BehaviorTypes.CoreError;\n\n /**\n * Creates a new Core Error Behavior instance.\n *\n * @param key - Runtime identifier assigned by the behavior factory.\n * @param behaviorCtx - Behavior context providing injector access and\n * future extensibility hooks.\n *\n * This constructor performs no allocation of runtime resources. It simply\n * stores metadata required by the orchestrator and devtools.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Normalizes an unknown error into a {@link VaultErrorShape}.\n *\n * This is the *only* operation performed by the core error behavior.\n * Additional behaviors further down the pipeline may inspect or transform\n * the returned structure.\n *\n * @param error - The raw error thrown during pipeline execution.\n * @param feaetureCellKey - The FeatureCell key where the error originated.\n * @returns A canonical `ResourceStateError` created from the raw value.\n */\n handleError(error: unknown, featureCellKey: string): VaultErrorShape {\n return createVaultError(error, featureCellKey);\n }\n\n /**\n * Lifecycle hook invoked when the behavior instance is destroyed.\n *\n * Core behaviors maintain no internal resources and therefore perform no\n * cleanup. This method logs a devtools-friendly \"noop\" warning to help\n * with behavior lifecycle introspection.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the behavior instance.\n *\n * This behavior maintains no internal mutable state. The reset hook exists\n * strictly for lifecycle symmetry across all behavior types and to support\n * devtools state introspection.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n FilterBehaviorContract,\n FilterFunction,\n PipelineUpstreamValue,\n safeStringify,\n VAULT_NOOP,\n VaultBehavior,\n vaultDebug,\n vaultError,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core filter behavior for Vault.\n *\n * This behavior participates in the filter stage of the pipeline.\n * A filter function receives the current state and may return:\n * - the same state\n * - a transformed state of the same structural type\n * - `undefined` to indicate that the state update should be aborted\n *\n * This behavior enforces type alignment between the incoming value\n * and the filtered result, ensuring that filters cannot mutate or\n * reshape the state into an incompatible type. When a mismatch is\n * detected, a controlled Vault error is thrown.\n *\n * Filters MUST be pure and must not mutate the incoming value.\n *\n * @typeParam T - The state type handled by this filter behavior.\n */\n@VaultBehavior({\n type: BehaviorTypes.Filter,\n key: defineBehaviorKey('Core', 'Filter'),\n critical: true\n})\nexport class withCoreFilterBehavior<T> implements FilterBehaviorContract<T> {\n /** Static behavior type used for pipeline classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for introspection and diagnostics. */\n static readonly key: string;\n\n /** Indicates that filter behavior is required in the pipeline. */\n static readonly critical: boolean;\n\n /** Instance-level criticality flag. */\n readonly type = BehaviorTypes.Filter;\n\n /** Indicates that this behavior must always run as part of filtering. */\n readonly critical = true;\n\n /** Unique identifier for this filter behavior instance. */\n readonly key: string;\n\n /**\n * Creates a new filter behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the factory.\n * @param behaviorCtx - BehaviorCtx for future extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Applies the provided filter function to the current state.\n *\n * If the filter returns `undefined`, the state update is aborted.\n * Filter output must preserve the shape of:\n * - arrays\n * - plain objects\n * - primitives\n *\n * Structural mismatches result in a thrown Vault error.\n * Filters must not mutate the incoming value and should remain pure.\n *\n * @param current - The current value before filtering.\n * @param filter - A pure filter function that may transform or reject the value.\n * @returns The filtered value, or `undefined` to abort the update.\n */\n applyFilter(current: T, filter: FilterFunction<T>): PipelineUpstreamValue<T> {\n vaultDebug(`${this.key} applyFilter called with \"${safeStringify(current)}\".`);\n\n if (current === undefined) {\n vaultDebug(\n `${this.key} applyFilter skipped - not a valid plain state. The current type is ${typeof current}. Undefined returned.`\n );\n return undefined;\n }\n if (typeof filter !== 'function') {\n vaultDebug(\n `${this.key} applyFilter skipped. The filter type is ${typeof filter}. \"${safeStringify(current)}\" returned.`\n );\n return current;\n }\n\n let next: T;\n try {\n next = filter(current);\n // eslint-disable-next-line\n } catch (err: any) {\n vaultError(`${this.key} filter execution failed`, err.message);\n throw err;\n }\n\n if (next === undefined) {\n vaultDebug(`${this.key} Filter returned undefined. state rejected.`);\n return VAULT_NOOP;\n }\n\n if (this.#handleArrayLogic(current, next)) return next;\n\n if (this.#handleObjectLogic(current, next)) return next;\n\n this.#handlePrimitiveLogic(current, next);\n\n vaultDebug(`${this.key} applyFilter returned with \"${safeStringify(next)}\".`);\n return next;\n }\n\n /**\n * Performs type validation when filtering array state values.\n *\n * Ensures the filtered output remains an array when the input was an array.\n *\n * @param current - The pre-filter state value.\n * @param next - The filtered state value.\n * @returns `true` if array handling was applied.\n */\n #handleArrayLogic(current: T, next: T): boolean {\n if (Array.isArray(current)) {\n if (!Array.isArray(next)) {\n this.#typeAlignmentDebug(current, next);\n throw new Error(`[vault] Filter returned non-array for array input.`);\n }\n return true;\n }\n\n return false;\n }\n\n /**\n * Performs type validation when filtering object-based state values.\n *\n * Ensures the filter returns a valid non-null object of compatible structure.\n *\n * @param current - The pre-filter state value.\n * @param next - The filtered state value.\n * @returns `true` if object handling was applied.\n */\n #handleObjectLogic(current: T, next: T): boolean {\n if (current !== null && typeof current === 'object') {\n if (typeof next !== 'object' || next === null || Array.isArray(next)) {\n this.#typeAlignmentDebug(current, next);\n throw new Error(`[vault] Filter returned invalid object for object input.`);\n }\n return true;\n }\n return false;\n }\n\n /**\n * Performs type validation for primitive state values.\n *\n * Ensures the filter output matches the primitive type of the input.\n *\n * @param current - The pre-filter primitive value.\n * @param next - The filtered primitive value.\n */\n #handlePrimitiveLogic(current: T, next: T): void {\n if (typeof next !== typeof current) {\n this.#typeAlignmentDebug(current, next);\n throw new Error(\n `[vault] Filter returned a value of incorrect type. Expected \"${typeof current}\", got \"${typeof next}\".`\n );\n }\n }\n\n /**\n * Emits detailed debug output when filter output does not align with the input type.\n *\n * @param current - The original state value.\n * @param next - The returned filter value.\n */\n #typeAlignmentDebug(current: T, next: T): void {\n vaultDebug(\n `${this.key} The types not aligned. Current type: \"${typeof current}\". Next type: ${typeof next}. \"${safeStringify(next)}\" returned.`\n );\n }\n\n /**\n * Invoked during behavior teardown.\n * This behavior maintains no internal resources and requires no cleanup.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the filter behavior.\n *\n * Since core filters do not maintain internal state, this reset operation\n * performs no functional work. It exists to support the FeatureCell reset\n * lifecycle and provides a diagnostic hook for DevTools and monitoring.\n *\n * After reset, the behavior continues operating identically to before.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n MergeBehaviorContract,\n PipelineUpstreamValue,\n VAULT_CLEAR_STATE,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\nimport { MergeConfig } from '@sdux-vault/shared';\n\n/**\n * Array merge behavior for Vault.\n *\n * This merge strategy replaces arrays rather than merging them, ensuring\n * predictable and immutable updates for list-like state. All non-array values\n * are returned directly without transformation.\n *\n * This behavior is marked as critical, ensuring it participates in every\n * merge pipeline unless explicitly replaced by a custom merge behavior.\n *\n * @typeParam T - The pipeline state value type handled by this behavior.\n */\n@VaultBehavior({\n type: BehaviorTypes.Merge,\n key: defineBehaviorKey('Core', 'ArrayMerge'),\n critical: true\n})\nexport class withArrayMergeBehavior<T> implements MergeBehaviorContract<T> {\n /** Static behavior type used by the orchestrator. */\n static readonly type: BehaviorType;\n\n /** Static unique key assigned to this behavior. */\n static readonly key: string;\n\n /** Indicates this behavior is required for merge processing. */\n static readonly critical = true;\n\n /** Instance-level merge behavior type identifier. */\n readonly type = withArrayMergeBehavior.type;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Flags this behavior instance as critical within the pipeline. */\n readonly critical = withArrayMergeBehavior.critical;\n\n /**\n * Creates a new array merge behavior instance.\n *\n * @param key - Unique behavior identifier supplied by the factory.\n * @param behaviorCtx - BehaviorCtx for future extensibility hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Computes the merged state value using array-replacement semantics.\n *\n * - If `nextValue` is undefined and `clearUndefined` is false,\n * the current value is preserved.\n * - If `nextValue` is undefined and `clearUndefined` is true,\n * the merge resolves to `undefined`.\n * - If both values are arrays, a shallow clone of `nextValue`\n * is returned to maintain immutability.\n * - All other values pass through as-is.\n *\n * @param currentValue - The existing state value.\n * @param nextValue - The incoming state value to merge.\n * @param options - Optional merge configuration.\n * @returns The merged pipeline value.\n */\n computeMerge(\n currentValue: PipelineUpstreamValue<T> | undefined,\n nextValue: PipelineUpstreamValue<T> | undefined,\n options?: MergeConfig\n ): PipelineUpstreamValue<T> {\n const curr = currentValue;\n const next = nextValue;\n\n const clear = options?.clearUndefined ?? false;\n\n vaultDebug(`${this.key} merge called (clear: ${clear})`);\n\n if (next === undefined && !clear) {\n vaultDebug(`${this.key} computeMerge skipped. The next value \"${next}\" and clear is \"${clear}`);\n return curr;\n }\n\n if (next === undefined && clear) {\n vaultDebug(`${this.key} computeMerge skipped. The next value \"${next}\" and clear is \"${clear}`);\n return VAULT_CLEAR_STATE;\n }\n\n if (Array.isArray(curr) && Array.isArray(next)) {\n vaultDebug(`${this.key} merging array. Return clone of next`);\n return [...next] as PipelineUpstreamValue<T>;\n }\n\n vaultDebug(`${this.key} non-array branch. Return next`);\n return next as PipelineUpstreamValue<T>;\n }\n\n /**\n * Performs teardown when the behavior instance is destroyed.\n * This merge behavior maintains no resources and requires no cleanup.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the merge behavior.\n *\n * Array merge is a fully stateless behavior and maintains no internal\n * resources, configuration mutations, or cached values. As a result,\n * this reset operation performs no functional work and simply emits a\n * diagnostic event for DevTools and monitoring.\n *\n * After reset, this behavior continues to operate identically to before.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { FeatureCellShape, VaultStateRef } from '@sdux-vault/engine';\nimport { Observable } from 'rxjs';\n\n/**\n * Extends a FeatureCell with a `fromObservable` helper for observable-based state sources.\n *\n * This function installs a placeholder implementation that accepts an observable\n * and exposes it as a stream of `VaultStateRef<T>` values, with the runtime behavior\n * replaced by the corresponding pipeline behavior when installed.\n *\n * @param cell The FeatureCell instance to extend.\n */\nexport function extendFromObservable<T>(cell: FeatureCellShape<T>) {\n /**\n * Wraps an observable source for integration with the FeatureCell pipeline.\n *\n * @param source$ Observable emitting raw state values.\n * @returns Observable emitting vault state references.\n */\n cell.fromObservable = function (source$: Observable<T>): Observable<VaultStateRef<T>> {\n return source$ as Observable<VaultStateRef<T>>;\n };\n}\n","import {\n BehaviorClassContext,\n BehaviorContract,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n FeatureCellExtensionContext,\n ResolveType,\n ResolveTypes,\n safeStringify,\n StateInputShape,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\nimport { EMPTY, Observable, take, takeUntil } from 'rxjs';\nimport { extendFromObservable } from './function/extend-from-observable.function';\nimport { FromObservableBehaviorExtension } from './interface/from-observable-behavior.interface';\n\n/**\n * Extension behavior that enables FeatureCells to resolve state from observable sources.\n *\n * This behavior augments the FeatureCell API with a `fromObservable` method that\n * converts a single observable emission into a normalized state envelope and\n * binds subscription lifetime to the cell lifecycle.\n *\n * @deprecated\n * This API exists as a migration bridge for observable-based workflows.\n * Prefer using `replaceState` or `mergeState` to resolve\n * observables directly within the pipeline.\n *\n * --RelatedStart--\n * FromObservableBehaviorExtension\n * withCoreObservableBehavior\n * replaceState\n * mergeState\n * --RelatedEnd--\n */\n@VaultBehavior({\n type: BehaviorTypes.FromObservable,\n key: defineBehaviorKey('Core', 'FromObservable'),\n critical: false,\n resolveType: ResolveTypes.Observable\n})\nexport class withCoreFromObservableBehavior<T> implements BehaviorContract<T, FromObservableBehaviorExtension> {\n /** Extension function used to attach observable APIs to the FeatureCell. */\n static readonly extension = extendFromObservable;\n\n /** Static behavior type used for pipeline classification. */\n static readonly type: BehaviorType;\n\n /** Static behavior key used for diagnostics and introspection. */\n static readonly key: string;\n\n /** Resolve type associated with observable-based resolution. */\n static readonly resolveType: ResolveType;\n\n /** Indicates whether this behavior is required by the pipeline. */\n static readonly critical: boolean;\n\n /** Instance-level behavior type identifier. */\n readonly type = withCoreFromObservableBehavior.type;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Indicates that this behavior is optional within the pipeline. */\n readonly critical = withCoreFromObservableBehavior.critical;\n\n /** Resolve type for this behavior instance. */\n readonly resolveType = withCoreFromObservableBehavior.resolveType;\n\n /**\n * Creates a new observable extension behavior instance.\n *\n * @param key Unique identifier assigned by the behavior factory.\n * @param behaviorCtx Behavior class context used for configuration access.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Extends the FeatureCell API with observable-based resolution support.\n *\n * @param ctx FeatureCell extension context providing lifecycle signals.\n * @returns An extension object exposing the `fromObservable` API.\n */\n extendCellAPI(ctx: FeatureCellExtensionContext<T>): FromObservableBehaviorExtension {\n return {\n fromObservable: (source$: Observable<T>) =>\n new Observable<StateInputShape<T>>((observer) => {\n vaultDebug(`${this.key} fromObservable called.`);\n\n const destroy$ = ctx.destroyed$ ?? EMPTY;\n const reset$ = ctx.reset$ ?? EMPTY;\n\n const subscription = source$.pipe(takeUntil(reset$), takeUntil(destroy$), take(1)).subscribe({\n next: (value) => {\n vaultDebug(`${this.key} fromObservable emitted value \"${safeStringify(value)}\".`);\n observer.next({\n loading: false,\n value,\n error: null\n });\n },\n\n error: (err) => {\n const error = createVaultError(err, ctx.featureCellKey);\n observer.error(error);\n vaultDebug(`${this.key} fromObservable emitted error \"${error.message}\".`);\n },\n\n complete: () => {\n observer.complete();\n vaultDebug(`${this.key} fromObservable completed.`);\n }\n });\n\n return () => {\n subscription.unsubscribe();\n vaultDebug(`${this.key} fromObservable subscription unsubscribed.`);\n };\n })\n };\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the observable extension behavior.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { FeatureCellShape } from '@sdux-vault/engine';\nimport { DeferredFactory, StateInputShape } from '@sdux-vault/shared';\n\n/**\n * Extends a FeatureCell with promise-based resolution placeholders.\n *\n * This function attaches `fromDeferred` and `fromPromise` methods to the\n * FeatureCell shape as build-time stubs. These methods are replaced at\n * runtime by the corresponding resolve behavior when installed.\n *\n * --RelatedStart--\n * FeatureCellShape\n * DeferredFactory\n * --RelatedEnd--\n *\n * @param cell The FeatureCell instance being extended.\n */\nexport function extendFromPromise<T>(cell: FeatureCellShape<T>) {\n /**\n * Resolves state from a deferred factory using promise semantics.\n *\n * @param _incoming Deferred factory that produces the state value.\n * @returns A promise resolving to a normalized state envelope.\n */\n cell.fromDeferred = function (_incoming: DeferredFactory<T>): Promise<StateInputShape<T>> {\n // runtime behavior will replace this implementation\n throw new Error('[vault] fromDeferred() behavior not installed');\n };\n\n /**\n * Resolves state from a deferred factory using promise semantics.\n *\n * @param _incoming Deferred factory that produces the state value.\n * @returns A promise resolving to a normalized state envelope.\n */\n cell.fromPromise = function (_incoming: DeferredFactory<T>): Promise<StateInputShape<T>> {\n // runtime behavior will replace this implementation\n throw new Error('[vault] fromPromise() behavior not installed');\n };\n}\n","import {\n BehaviorClassContext,\n BehaviorContract,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n DeferredFactory,\n defineBehaviorKey,\n FeatureCellExtensionContext,\n isDeferredFactory,\n isUndefined,\n ResolveType,\n ResolveTypes,\n safeStringify,\n StateInputType,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\nimport { extendFromPromise } from './function/extend-from-promise.function';\nimport { FromPromiseBehaviorExtension } from './interface/from-promise-behavior.interface';\n\n/**\n * Extension behavior that enables promise-based state resolution for FeatureCells.\n *\n * This behavior augments a FeatureCell with APIs that accept deferred factories\n * and resolve their produced values into normalized state inputs. It supports\n * both promise and deferred invocation semantics while preserving pipeline\n * loading and error metadata.\n *\n * @deprecated\n * This API exists as a migration bridge for deferred- and promise-based workflows.\n * Prefer using `replaceState` or `mergeState` to resolve promises\n * directly within the pipeline.\n *\n * --RelatedStart--\n * FromPromiseBehaviorExtension\n * DeferredFactory\n * withCorePromiseBehavior\n * replaceState\n * mergeState\n * --RelatedEnd--\n */\n@VaultBehavior({\n type: BehaviorTypes.FromPromise,\n key: defineBehaviorKey('Core', 'FromPromise'),\n critical: false,\n resolveType: ResolveTypes.Promise\n})\nexport class withCoreFromPromiseBehavior<T> implements BehaviorContract<T, FromPromiseBehaviorExtension> {\n /** Static behavior function used to extend the FeatureCell API. */\n static readonly extension = extendFromPromise;\n\n /** Static behavior type used for orchestrator classification. */\n static readonly type: BehaviorType;\n\n /** Static behavior key used for diagnostics and tooling. */\n static readonly key: string;\n\n /** Indicates whether this behavior is required by the pipeline. */\n static readonly critical: boolean;\n\n /** Resolve type identifier for promise-based resolution. */\n static readonly resolveType: ResolveType;\n\n /** Instance-level behavior type identifier. */\n readonly type = withCoreFromPromiseBehavior.type;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Indicates that this behavior is optional within the pipeline. */\n readonly critical = withCoreFromPromiseBehavior.critical;\n\n /** Resolve type identifier for this behavior instance. */\n readonly resolveType = withCoreFromPromiseBehavior.resolveType;\n\n /**\n * Creates a new instance of the promise resolution behavior.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior context providing configuration and lifecycle hooks.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Extends the FeatureCell API with promise-based resolution functions.\n *\n * @param ctx FeatureCell extension context used for lifecycle coordination.\n * @returns An extension object exposing promise-based resolution methods.\n */\n extendCellAPI(ctx: FeatureCellExtensionContext<T>): FromPromiseBehaviorExtension {\n const handleDeferred = (incoming: DeferredFactory<T> | unknown): Promise<StateInputType<T>> =>\n new Promise<StateInputType<T>>((resolve, reject) => {\n vaultDebug(`${this.key} fromPromise called.`);\n\n if (isUndefined(incoming)) {\n resolve({\n loading: false,\n value: undefined,\n error: null\n });\n return;\n }\n\n if (!isDeferredFactory(incoming)) {\n const potentialIncoming = incoming as Partial<DeferredFactory<T>>;\n resolve({\n loading: potentialIncoming?.loading ?? false,\n value: undefined,\n error: potentialIncoming?.error ?? null\n });\n return;\n }\n\n let result: T | undefined | null | Promise<T | undefined | null>;\n\n try {\n result = incoming.value?.() as T | undefined | null | Promise<T | undefined | null>;\n } catch (err) {\n const error = createVaultError(err, ctx.featureCellKey);\n reject(error);\n return;\n }\n\n Promise.resolve(result)\n .then((value) => {\n vaultDebug(`${this.key} fromPromise resolved value: ${safeStringify(value)}`);\n resolve({\n loading: incoming.loading ?? false,\n value,\n error: incoming.error ?? null\n });\n })\n .catch((err) => {\n const error = createVaultError(err, ctx.featureCellKey);\n reject(error);\n });\n });\n\n return {\n fromPromise: (incoming: DeferredFactory<T>) => handleDeferred(incoming),\n fromDeferred: (incoming: DeferredFactory<T>) => handleDeferred(incoming)\n };\n }\n\n /**\n * Invoked during behavior teardown.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the behavior state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n ReduceBehaviorContract,\n ReducerFunction,\n safeStringify,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core reducer behavior that applies pure reducer functions to state values.\n *\n * This behavior participates in the reduce stage of the pipeline and is\n * responsible for invoking reducer functions supplied by consumers to\n * transform the current state into a new value. It performs no validation\n * beyond ensuring the reducer is callable.\n */\n@VaultBehavior({\n type: BehaviorTypes.Reduce,\n key: defineBehaviorKey('Core', 'Reducer'),\n critical: true\n})\nexport class withCoreReducerBehavior<T> implements ReduceBehaviorContract<T> {\n /** Static metadata used for orchestrator behavior classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior identifier for diagnostics and devtools. */\n static readonly key: string;\n\n /** Indicates that reducer behavior is essential to the pipeline. */\n static readonly critical: boolean;\n\n /** Instance-level criticality flag. */\n readonly critical = true;\n\n /** Pipeline behavior type identifier. */\n readonly type = BehaviorTypes.Reduce;\n\n /** Unique identifier for this reducer behavior instance. */\n readonly key: string;\n\n /**\n * Creates a new reducer behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection and configuration.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Applies a reducer function to the current state value.\n *\n * @param current The current state value before reduction.\n * @param reducer A reducer function that produces the next state value.\n * @returns The reduced state value.\n */\n applyReducer(current: T, reducer: ReducerFunction<T>): T {\n vaultDebug(`${this.key} applyReducer called with \"${safeStringify(current)}\".`);\n if (typeof reducer !== 'function') {\n vaultDebug(`${this.key} applyReducer skipped - reducer is not a function.`);\n return current;\n }\n return reducer(current);\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the reducer behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorContext,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n PipelineUpstreamValue,\n ResolveBehaviorContract,\n ResolveType,\n ResolveTypes,\n safeStringify,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\nimport { EMPTY, firstValueFrom, isObservable, Observable, take, takeUntil } from 'rxjs';\n\n/**\n * Core resolve behavior that extracts a single value from an RxJS Observable.\n *\n * This behavior participates in the resolve stage and handles incoming\n * Observable values by subscribing once and resolving with the first emitted\n * value. Resolution is automatically terminated when the FeatureCell is reset\n * or destroyed.\n */\n@VaultBehavior({\n type: BehaviorTypes.Resolve,\n key: defineBehaviorKey('Core', 'Observable'),\n critical: false,\n resolveType: ResolveTypes.Observable\n})\nexport class withCoreObservableBehavior<T> implements ResolveBehaviorContract<T> {\n /** Static behavior type used for orchestrator classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for diagnostics and devtools. */\n static readonly key: string;\n\n /** Indicates whether this behavior is required by the pipeline. */\n static readonly critical: boolean;\n\n /** Resolve type classification for observable-based resolution. */\n static readonly resolveType: ResolveType;\n\n /** The pipeline behavior type identifier. */\n readonly type = BehaviorTypes.Resolve;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Indicates that this behavior is optional within the pipeline. */\n readonly critical = false;\n\n /** Resolve type identifier for observable-based resolution. */\n readonly resolveType = withCoreObservableBehavior.resolveType;\n\n /**\n * Creates a new observable resolve behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection and configuration.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Resolves a state value from an Observable input.\n *\n * @param ctx The resolve behavior context containing the incoming value.\n * @returns The resolved state value or undefined if resolution is skipped.\n */\n async computeResolve(ctx: BehaviorContext<T>): Promise<PipelineUpstreamValue<T>> {\n const incoming = ctx.incoming;\n\n vaultDebug(`${this.key} computeResolve called with incoming: ${safeStringify(incoming)}`);\n\n if (!isObservable(incoming)) {\n vaultDebug(`${this.key} computeResolve skipped — incoming is not an Observable.`);\n return;\n }\n\n vaultDebug(`${this.key} computeResolve detected Observable input.`);\n\n const source$ = incoming as Observable<T>;\n const reset$ = ctx.reset$ ?? EMPTY;\n const destroyed$ = ctx.destroyed$ ?? EMPTY;\n\n try {\n const value = await firstValueFrom(source$.pipe(takeUntil(reset$), takeUntil(destroyed$), take(1)));\n\n vaultDebug(`${this.key} computeResolve resolved value: ${safeStringify(value)}`);\n\n return value;\n } catch (err) {\n const vaultError = createVaultError(err, ctx.featureCellKey);\n\n vaultDebug(`${this.key} computeResolve caught error: ${vaultError.message}`);\n\n throw vaultError;\n }\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the resolve behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorContext,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n isDeferredFactory,\n isFunction,\n isUndefined,\n PipelineUpstreamValue,\n ResolveBehaviorContract,\n ResolveType,\n ResolveTypes,\n safeStringify,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core resolve behavior that extracts a value from a deferred promise factory.\n *\n * This behavior participates in the resolve stage and handles incoming\n * deferred factories by invoking the factory exactly once and resolving\n * with the resulting value. Errors are normalized and propagated through\n * the pipeline error handling contract.\n */\n@VaultBehavior({\n type: BehaviorTypes.Resolve,\n key: defineBehaviorKey('Core', 'Promise'),\n critical: false,\n resolveType: ResolveTypes.Promise\n})\nexport class withCorePromiseBehavior<T> implements ResolveBehaviorContract<T> {\n /** Static behavior type used for orchestrator classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for diagnostics and devtools. */\n static readonly key: string;\n\n /** Indicates whether this behavior is required by the pipeline. */\n static readonly critical: boolean;\n\n /** Resolve type classification for promise-based resolution. */\n static readonly resolveType: ResolveType;\n\n /** The pipeline behavior type identifier. */\n readonly type = withCorePromiseBehavior.type;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /** Indicates that this behavior is optional within the pipeline. */\n readonly critical = withCorePromiseBehavior.critical;\n\n /** Resolve type identifier for promise-based resolution. */\n readonly resolveType = withCorePromiseBehavior.resolveType;\n\n /**\n * Creates a new promise resolve behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection and configuration.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Resolves a state value from a deferred promise factory.\n *\n * @param ctx The resolve behavior context containing the incoming value.\n * @returns The resolved state value or undefined if resolution is skipped.\n */\n async computeResolve(ctx: BehaviorContext<T>): Promise<PipelineUpstreamValue<T>> {\n const incoming = ctx.incoming;\n\n vaultDebug(`${this.key} computeResolve promise called with incoming: ${safeStringify(incoming)}`);\n\n if (!(isDeferredFactory(incoming) || isFunction(incoming)) || isUndefined(incoming)) {\n vaultDebug(`${this.key} computeResolve skipped — incoming is not a deferred factory.`);\n return;\n }\n\n vaultDebug(`${this.key} computeResolve detected Promise input.`);\n\n try {\n let value: T;\n if (isFunction(incoming)) {\n value = (await incoming?.()) as T;\n } else {\n value = (await incoming.value?.()) as T;\n }\n\n vaultDebug(`${this.key} computeResolve resolved value: ${safeStringify(value)}`);\n\n return value;\n } catch (err) {\n const vaultError = createVaultError(err, ctx.featureCellKey);\n vaultDebug(`${this.key} computeResolve caught error: ${vaultError.message}`);\n throw vaultError;\n }\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the resolve behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorContext,\n BehaviorType,\n BehaviorTypes,\n defineBehaviorKey,\n isHttpResourceRef,\n PipelineUpstreamValue,\n ResolveBehaviorContract,\n ResolveType,\n ResolveTypes,\n safeStringify,\n VAULT_CLEAR_STATE,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core resolve behavior that extracts a plain value from an incoming state envelope.\n *\n * This behavior participates in the resolve stage and handles direct value-based\n * state inputs by safely normalizing the contained value. Objects and arrays are\n * shallow-cloned to preserve immutability guarantees, while null and undefined\n * values are handled explicitly according to pipeline semantics.\n */\n@VaultBehavior({\n type: BehaviorTypes.Resolve,\n key: defineBehaviorKey('Core', 'Value'),\n critical: true,\n resolveType: ResolveTypes.Value\n})\nexport class withCoreValueBehavior<T> implements ResolveBehaviorContract<T> {\n /** Static behavior type for orchestrator classification. */\n static readonly type: BehaviorType;\n\n /** Static unique behavior identifier. */\n static readonly key: string;\n\n /** Static flag marking this behavior as pipeline-critical. */\n static readonly critical: boolean;\n\n /** Resolve type classification for value-based resolution. */\n static readonly resolveType: ResolveType;\n\n /** Instance-level pipeline type identifier. */\n readonly type = withCoreValueBehavior.type;\n\n /** Indicates this resolve behavior is required for pipeline operation. */\n readonly critical = withCoreValueBehavior.critical;\n\n /** Unique behavior key for the instance. */\n readonly key: string;\n\n /** Resolve mode indicating plain value resolution. */\n readonly resolveType = withCoreValueBehavior.resolveType;\n\n /**\n * Creates a new value resolve behavior instance.\n *\n * @param key Unique behavior identifier assigned by the factory.\n * @param behaviorCtx Behavior class context for dependency injection and configuration.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Resolves a state value from a plain state envelope.\n *\n * @param ctx Resolve context containing the incoming state packet.\n * @returns The normalized resolved value, a clear signal, or undefined.\n */\n async computeResolve(ctx: BehaviorContext<T>): Promise<PipelineUpstreamValue<T>> {\n vaultDebug(`${this.key} computeResolve called with \"${safeStringify(ctx.incoming)}\".`);\n\n const incoming = ctx.incoming;\n if (!incoming || isHttpResourceRef<T>(incoming)) {\n vaultDebug(`${this.key} computeResolve skipped - not a valid plain state.`);\n return;\n }\n\n const { value } = incoming as { value?: PipelineUpstreamValue<T> };\n\n if (value === undefined) {\n vaultDebug(`${this.key} value is undefined and resolution skipped.`);\n return;\n }\n\n if (value === null) {\n vaultDebug(`${this.key} value is null and clear state returned.`);\n return VAULT_CLEAR_STATE;\n }\n\n if (Array.isArray(value)) {\n vaultDebug(`${this.key} array value detected and cloned.`);\n return [...value] as T;\n }\n\n if (typeof value === 'object') {\n vaultDebug(`${this.key} object value detected and cloned.`);\n return { ...value } as T;\n }\n\n vaultDebug(`${this.key} primitive value detected and returned.`);\n return value as T;\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the resolve behavior to its initial state.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import { FeatureCellShape } from '@sdux-vault/engine';\nimport { Observable } from 'rxjs';\nimport { FromStreamOptions } from '../options/from-stream.options';\n\n/**\n * Extends a FeatureCell instance with a placeholder `fromStream` API.\n *\n * This function installs a stub implementation that is replaced at runtime\n * by the corresponding behavior. It defines the method shape so that\n * consumers may invoke `fromStream` once the behavior is installed.\n *\n * @param cell The FeatureCell instance being extended.\n */\nexport function extendFromStream<T>(cell: FeatureCellShape<T>) {\n /**\n * Bridges a streaming observable source into the FeatureCell pipeline.\n *\n * @param _source$ Observable stream emitting values to be resolved.\n * @param _options Optional stream configuration options.\n */\n cell.fromStream = function (_source$: Observable<T>, _options: FromStreamOptions): void {};\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > behaviors > resolve > from-stream > with-core-from-stream.behavior.ts\n// Updated: 2026-03-02 08:26\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n// --- AI Model File Path (DO NOT DELETE) ---\n\nimport {\n BehaviorClassContext,\n BehaviorContract,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n FeatureCellExtensionContext,\n ResolveType,\n ResolveTypes,\n safeStringify,\n StateInputType,\n VaultBehavior,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\nimport { Observable, takeUntil } from 'rxjs';\nimport { extendFromStream } from './function/extend-from-stream.function';\nimport { FromStreamBehaviorExtension } from './interface/from-stream-behavior.interface';\nimport { FromStreamOptions } from './options/from-stream.options';\n\n@VaultBehavior({\n type: BehaviorTypes.FromStream,\n key: defineBehaviorKey('Core', 'FromStream'),\n critical: false,\n resolveType: ResolveTypes.Observable\n})\nexport class withCoreFromStreamBehavior<T> implements BehaviorContract<T, FromStreamBehaviorExtension> {\n /** Static behavior to extend the cell api dynamically */\n static readonly extension = extendFromStream;\n\n /** Static behavior type used for orchestrator classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for diagnostics and devtools. */\n static readonly key: string;\n\n /** Indicates whether this behavior is required by the pipeline. */\n static readonly critical: boolean;\n\n static readonly resolveType: ResolveType;\n\n /** The extension behavior type identifier. */\n readonly type = withCoreFromStreamBehavior.type;\n\n /** Unique identifier for this behavior instance. */\n public readonly key: string;\n\n /** Indicates that this behavior is optional within the pipeline. */\n public readonly critical = withCoreFromStreamBehavior.critical;\n\n public readonly resolveType = withCoreFromStreamBehavior.resolveType;\n\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n extendCellAPI(ctx: FeatureCellExtensionContext<T>): FromStreamBehaviorExtension {\n return {\n fromStream: (source$: Observable<T>, options?: FromStreamOptions): void => {\n const { autoResetError = true } = options ?? {};\n\n vaultDebug(`${this.key} fromStream called.`);\n vaultDebug(`${this.key} fromStream options resolved (autoResetError=${autoResetError}).`);\n\n ctx.vaultMonitor.ingressSubscribed(ctx.featureCellKey, this.key, ctx, 'fromStream');\n\n vaultDebug(`${this.key} fromStream subscription started.`);\n\n source$.pipe(takeUntil(ctx.destroyed$)).subscribe({\n next: (incomingItem) => {\n vaultDebug(`${this.key} subscription.next called.`);\n vaultDebug(`${this.key} incoming value received: \"${safeStringify(incomingItem)}\".`);\n\n if (autoResetError) {\n vaultDebug(`${this.key} autoResetError enabled → clearing error.`);\n }\n\n const nextState: StateInputType<T> = autoResetError\n ? { value: incomingItem, error: null }\n : { value: incomingItem };\n\n ctx.mergeState(nextState);\n\n vaultDebug(`${this.key} mergeState invoked from stream.next.`);\n },\n\n error: (err) => {\n vaultDebug(`${this.key} subscription.error called.`);\n\n const vaultError = createVaultError(err, this.key);\n\n vaultDebug(`${this.key} stream error converted to VaultError: \"${vaultError.message}\".`);\n\n ctx.mergeState({ error: vaultError });\n\n vaultDebug(`${this.key} mergeState invoked from stream.error.`);\n },\n\n complete: () => {\n vaultDebug(`${this.key} subscription.complete called.`);\n\n ctx.vaultMonitor.ingressCompleted(ctx.featureCellKey, this.key, ctx, 'fromStream');\n\n vaultDebug(`${this.key} fromStream completed.`);\n }\n });\n }\n };\n }\n\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorType,\n BehaviorTypes,\n CoreEmitStateBehaviorContract,\n CoreEmitStateCallback,\n CoreEmitStateResult,\n defineBehaviorKey,\n safeStringify,\n StateSnapshotShape,\n VAULT_NOOP,\n VaultBehavior,\n vaultDebug,\n vaultError,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Core behavior responsible for invoking `emitState` callbacks.\n *\n * This behavior executes a consumer-provided callback with the current\n * immutable state snapshot, allowing external observers to react to\n * state emission events without mutating pipeline state.\n *\n * It is critical to pipeline execution and always runs during emitState\n * processing when a callback is provided.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreEmitState,\n key: defineBehaviorKey('Core', 'EmitState'),\n critical: true\n})\nexport class withCoreEmitStateBehavior<T> implements CoreEmitStateBehaviorContract<T> {\n /** Static behavior type used for pipeline classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for introspection and diagnostics. */\n static readonly key: string;\n\n /** Indicates that emitState behavior is required in the pipeline. */\n static readonly critical: boolean;\n\n /** Instance-level pipeline behavior type identifier. */\n readonly type = BehaviorTypes.CoreEmitState;\n\n /** Indicates that this behavior must always run during emitState execution. */\n readonly critical = true;\n\n /** Unique identifier for this emitState behavior instance. */\n readonly key: string;\n\n /**\n * Creates a new core emitState behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection and extensibility.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes a provided emitState callback with the current state snapshot.\n *\n * If the callback is not a function or throws during execution, the behavior\n * logs the failure and returns `VAULT_NOOP` without interrupting pipeline flow.\n *\n * @param snapshot Immutable snapshot of the current FeatureCell state.\n * @param callback Consumer-provided emitState callback.\n * @returns A core emitState result or `VAULT_NOOP` when no action is taken.\n */\n // eslint-disable-next-line\n emitState<T>(snapshot: StateSnapshotShape<T>, callback: CoreEmitStateCallback<T, any>): CoreEmitStateResult {\n vaultDebug(`${this.key} emitState called with \"${safeStringify(snapshot)}\".`);\n\n if (typeof callback !== 'function') {\n vaultDebug(\n `${this.key} emitState skipped. The emitState type is ${typeof callback}. \"${safeStringify(snapshot)}\" returned.`\n );\n return VAULT_NOOP;\n }\n\n try {\n callback(snapshot);\n } catch (err) {\n vaultError(`${this.key} emitState execution failed`, safeStringify(err));\n return VAULT_NOOP;\n }\n\n return;\n }\n\n /**\n * Performs cleanup when the behavior instance is destroyed.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the emitState behavior.\n *\n * This behavior does not retain internal state and therefore requires\n * no reset logic beyond lifecycle participation.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","/**\n * Canonical identifier used to mark values or errors originating outside the Vault pipeline.\n */\nexport const VAULT_EXTERNAL = 'external';\n","import { CoreStateBehaviorContract, isPipelineTerminal } from '@sdux-vault/engine';\nimport {\n BehaviorClassContext,\n BehaviorContext,\n BehaviorType,\n BehaviorTypes,\n createVaultError,\n defineBehaviorKey,\n FinalState,\n isDefined,\n isHttpResourceRef,\n isNull,\n isNullish,\n isolateValue,\n isStateInputShape,\n isVaultClearState,\n isVaultNoop,\n safeStringify,\n StateEmitSnapshotShape,\n StateEmitType,\n StateEmitTypes,\n StateInputType,\n StateSnapshotShape,\n VAULT_NOOP,\n VaultBehavior,\n vaultDebug,\n vaultError,\n VaultErrorShape,\n vaultWarn\n} from '@sdux-vault/shared';\nimport { VAULT_EXTERNAL } from '../../../constants/vault-external.constant';\n\n/**\n * Core behavior responsible for committing resolved pipeline outcomes into state.\n *\n * This behavior translates pipeline execution results into immutable state\n * snapshots and emits authoritative state lifecycle events. It coordinates\n * loading, value, and error transitions and ensures state emission remains\n * atomic and ordered.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreState,\n key: defineBehaviorKey('Core', 'State'),\n critical: true\n})\nexport class withCoreStateBehavior<T> implements CoreStateBehaviorContract<T> {\n /** Static behavior type used for pipeline classification. */\n static readonly type: BehaviorType;\n\n /** Unique behavior key used for introspection and diagnostics. */\n static readonly key: string;\n\n /** Indicates that this behavior is required for pipeline execution. */\n static readonly critical: boolean;\n\n /** Instance-level pipeline behavior type identifier. */\n readonly type = withCoreStateBehavior.type;\n\n /** Indicates that this behavior must always execute. */\n readonly critical = withCoreStateBehavior.critical;\n\n /** Unique identifier for this behavior instance. */\n readonly key: string;\n\n /**\n * Creates a new core state behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Commits partial state changes and emits a single state snapshot event.\n *\n * @param ctx Pipeline behavior context containing state references.\n * @param changes Partial snapshot changes or null.\n * @param type State emission classification.\n */\n #commitState(ctx: BehaviorContext<T>, changes: Partial<StateSnapshotShape<T>> | null, type: StateEmitType): void {\n vaultDebug(`${this.key} commitState called with: ${safeStringify(changes)}`);\n\n try {\n if (changes) {\n const safeChanges = isolateValue(changes);\n Object.assign(ctx.lastSnapshot, safeChanges);\n ctx.lastSnapshot.hasValue = ctx.lastSnapshot.value !== undefined && ctx.lastSnapshot.value !== null;\n }\n\n const snapshotEmit = {\n snapshot: isolateValue(ctx.lastSnapshot),\n type\n } as StateEmitSnapshotShape<T>;\n\n if (ctx.options) {\n snapshotEmit.options = ctx.options;\n }\n\n ctx.state$.next(snapshotEmit);\n } catch (error) {\n vaultError(`${this.key} an error occurred updating the state`, error);\n }\n }\n\n /**\n * Prepares incoming pipeline input and emits an initial incoming state.\n *\n * @param ctx Pipeline behavior context.\n * @returns The incoming value or `VAULT_NOOP`.\n */\n preparePipelineIncoming(ctx: BehaviorContext<T>): StateInputType<T> | typeof VAULT_NOOP {\n const incoming = ctx.incoming;\n const changes: Partial<StateSnapshotShape<T>> = {};\n\n if (isNullish(incoming) || (isStateInputShape(incoming) && isNull(incoming.value))) {\n changes.isLoading = false;\n changes.value = undefined;\n changes.error = null;\n\n this.#commitState(ctx, changes, StateEmitTypes.IncomingPipeline);\n return VAULT_NOOP;\n }\n\n if (isHttpResourceRef(incoming)) {\n changes.isLoading = true;\n } else if (isStateInputShape(incoming)) {\n if (!isNullish(incoming?.loading)) {\n changes.isLoading = incoming.loading;\n }\n\n if (isDefined(incoming?.error)) {\n changes.error = isNull(incoming.error) ? null : createVaultError(incoming.error, VAULT_EXTERNAL);\n }\n }\n\n if (Object.keys(changes).length > 0) {\n this.#commitState(ctx, changes, StateEmitTypes.IncomingPipeline);\n }\n\n return incoming;\n }\n\n /**\n * Finalizes state after pipeline resolution completes.\n *\n * @param value Final pipeline output.\n * @param ctx Pipeline behavior context.\n */\n finalizePipelineState(value: FinalState<T>, ctx: BehaviorContext<T>): void {\n vaultDebug(`${this.key} - finalizeVaultState`);\n\n if (isHttpResourceRef(ctx.incoming)) {\n this.#commitState(ctx, { isLoading: false }, StateEmitTypes.FinalizePipeline);\n }\n\n if (isVaultNoop(value)) {\n this.#commitState(ctx, null, StateEmitTypes.FinalizePipeline);\n return;\n }\n\n if (isNull(value) || isVaultClearState(value)) {\n this.#commitState(ctx, { value: undefined }, StateEmitTypes.FinalizePipeline);\n return;\n }\n\n if (!isNullish(value) && !isPipelineTerminal(value)) {\n this.#commitState(ctx, { value: value as T }, StateEmitTypes.FinalizePipeline);\n }\n }\n\n /**\n * Finalizes state when pipeline execution is stopped.\n *\n * @param ctx Pipeline behavior context.\n */\n finalizePipelineVaultStop(ctx: BehaviorContext<T>): void {\n vaultDebug(`${this.key} - finalizePipelineVaultStop`);\n this.#commitState(ctx, null, StateEmitTypes.FinalizePipeline);\n }\n\n /**\n * Finalizes state when a pipeline error occurs.\n *\n * @param err Normalized vault error or null.\n * @param ctx Pipeline behavior context.\n */\n finalizePipelineError(err: VaultErrorShape | null, ctx: BehaviorContext<T>): void {\n vaultDebug(`${this.key} - finalizePipelineError`);\n this.#commitState(\n ctx,\n {\n error: err,\n value: ctx.lastSnapshot.value,\n\n isLoading: false\n },\n StateEmitTypes.PipelineError\n );\n }\n\n /**\n * Finalizes state when a controller abort occurs.\n *\n * @param ctx Pipeline behavior context.\n */\n finalizeControllerAbort(ctx: BehaviorContext<T>): void {\n vaultDebug(`${this.key} - finalizeAbort`);\n this.#commitState(ctx, { isLoading: false }, StateEmitTypes.AbortController);\n }\n\n /**\n * Finalizes state when a controller deny occurs.\n *\n * @param ctx Pipeline behavior context.\n */\n finalizeControllerDeny(ctx: BehaviorContext<T>): void {\n vaultDebug(`${this.key} - finalizeDeny`);\n this.#commitState(ctx, { isLoading: false }, StateEmitTypes.DenyController);\n }\n\n /**\n * Emits a terminal destroy state snapshot.\n *\n * @param ctx Pipeline behavior context.\n */\n destroy(ctx: BehaviorContext<T>): void {\n vaultWarn(`${this.key} - destroy`);\n this.#commitState(ctx, { isLoading: false, value: undefined, error: null }, StateEmitTypes.PipelineDestroy);\n }\n\n /**\n * Emits a terminal reset state snapshot.\n *\n * @param ctx Pipeline behavior context.\n */\n reset(ctx: BehaviorContext<T>): void {\n vaultWarn(`${this.key} - reset`);\n this.#commitState(ctx, { isLoading: false, value: undefined, error: null }, StateEmitTypes.PipelineReset);\n }\n}\n","import {\n BehaviorClassContext,\n BehaviorContract,\n BehaviorType,\n PipelineUpstreamValue,\n TapCallback,\n safeStringify,\n vaultDebug,\n vaultWarn\n} from '@sdux-vault/shared';\n\n/**\n * Abstract base class for tap behaviors in the Vault pipeline.\n *\n * This class provides shared execution logic for tap behaviors, which are\n * permitted to observe pipeline values and perform side effects without\n * modifying pipeline state. It centralizes validation, logging, and lifecycle\n * handling common to both pre- and post-reducer tap behaviors.\n *\n * @typeParam T - The pipeline state value type observed by the tap.\n */\nexport abstract class TapAbstractBehavior<T> implements BehaviorContract<T> {\n /** Static behavior type used for pipeline classification. */\n static readonly type: BehaviorType;\n\n /** Static key used to identify the tap behavior. */\n static readonly key: string;\n\n /** Indicates that tap behaviors participate critically in the pipeline. */\n static readonly critical = true;\n\n /** Instance-level criticality flag. */\n readonly critical = true;\n\n /** Unique identifier for this tap behavior instance. */\n readonly key: string;\n\n readonly type!: BehaviorType;\n\n /**\n * Creates a new tap behavior instance.\n *\n * @param key Unique behavior identifier supplied by the factory.\n * @param behaviorCtx Behavior class context for dependency injection.\n */\n constructor(\n key: string,\n readonly behaviorCtx: BehaviorClassContext\n ) {\n this.key = key;\n }\n\n /**\n * Executes a tap callback against the current pipeline value.\n *\n * The tap callback is invoked for observational or side-effect purposes only.\n * If the provided callback is not a function, execution is skipped and logged.\n *\n * @param current The current pipeline value being observed.\n * @param tap The tap callback function.\n */\n protected executeTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void {\n vaultDebug(`${this.key} executeTap called with \"${safeStringify(current)}\".`);\n\n if (typeof tap !== 'function') {\n vaultDebug(`${this.key} executeTap skipped - tap is not a function. Type is \"${typeof tap}\".`);\n }\n\n tap(current as T);\n }\n\n /**\n * Invoked when the behavior instance is destroyed.\n *\n * Tap behaviors do not allocate resources or maintain subscriptions, so\n * destruction performs no cleanup beyond emitting a diagnostic event.\n */\n destroy(): void {\n vaultWarn(`${this.key} - destroy \"noop\"`);\n }\n\n /**\n * Resets the tap behavior.\n *\n * Tap behaviors are stateless and require no reset logic. This method exists\n * solely to participate in the FeatureCell lifecycle and provide diagnostic\n * visibility.\n */\n reset(): void {\n vaultWarn(`${this.key} - reset \"noop\"`);\n }\n}\n","import {\n AfterTapBehaviorContract,\n BehaviorTypes,\n defineBehaviorKey,\n PipelineUpstreamValue,\n TapCallback,\n VaultBehavior\n} from '@sdux-vault/shared';\n\nimport { TapAbstractBehavior } from './tap.abstract';\n\n/**\n * Core tap behavior executed after reducer completion.\n *\n * This behavior allows consumers to observe the finalized pipeline value\n * after all reducer logic has executed. It delegates tap execution to the\n * shared tap abstraction and does not modify pipeline state.\n *\n * @typeParam T - The pipeline state value type observed by the tap.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreAfterTap,\n key: defineBehaviorKey('Core', 'AfterTap'),\n critical: true\n})\nexport class withCoreAfterTapBehavior<T> extends TapAbstractBehavior<T> implements AfterTapBehaviorContract<T> {\n /** Pipeline behavior type indicating execution occurs after reducers. */\n override readonly type = BehaviorTypes.CoreAfterTap;\n\n /**\n * Executes the provided tap callback after reducer completion.\n *\n * The tap is invoked for observational or side-effect purposes only and\n * does not influence pipeline control flow or state resolution.\n *\n * @param current - The finalized pipeline value.\n * @param tap - The tap callback to invoke.\n */\n applyAfterTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void {\n this.executeTap(current, tap);\n }\n}\n","import {\n BeforeTapBehaviorContract,\n BehaviorTypes,\n defineBehaviorKey,\n PipelineUpstreamValue,\n TapCallback,\n VaultBehavior\n} from '@sdux-vault/shared';\n\nimport { TapAbstractBehavior } from './tap.abstract';\n\n/**\n * Core tap behavior executed before reducer evaluation.\n *\n * This behavior allows consumers to observe or react to the pipeline value\n * prior to reducer execution. It delegates tap execution to the shared tap\n * abstraction and does not modify pipeline state or control flow.\n *\n * @typeParam T - The pipeline state value type observed by the tap.\n */\n@VaultBehavior({\n type: BehaviorTypes.CoreBeforeTap,\n key: defineBehaviorKey('Core', 'BeforeTap'),\n critical: true\n})\nexport class withCoreBeforeTapBehavior<T> extends TapAbstractBehavior<T> implements BeforeTapBehaviorContract<T> {\n /** Pipeline behavior type indicating execution occurs prior to reducers. */\n override readonly type = BehaviorTypes.CoreBeforeTap;\n\n /**\n * Executes the provided tap callback before reducer evaluation.\n *\n * The tap is invoked for observational or side-effect purposes only and\n * does not influence reducer logic or state resolution.\n *\n * @param current - The current pipeline value prior to reduction.\n * @param tap - The tap callback to invoke.\n */\n applyBeforeTap(current: PipelineUpstreamValue<T>, tap: TapCallback<T>): void {\n this.executeTap(current, tap);\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > factories > feature-cell > feature-cell.ts\n// Updated: 2026-03-02 19:53\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport {\n createFeatureCellToken,\n FeatureCellClass,\n FeatureCellConfig,\n FeatureCellShape,\n registerFeatureCell\n} from '@sdux-vault/engine';\nimport { BehaviorClassContract, ControllerClassContract } from '@sdux-vault/shared';\nimport { withCoreErrorCallbackBehavior } from '../../behaviors/error/with-core-error-callback/with-core-error-callback.behavior';\nimport { withCoreErrorBehavior } from '../../behaviors/error/with-core-error/with-core-error.behavior';\nimport { withCoreFilterBehavior } from '../../behaviors/filter/with-core-filter.behavior';\nimport { withArrayMergeBehavior } from '../../behaviors/merge/array/with-array-merge.behavior';\nimport { withCoreFromObservableBehavior } from '../../behaviors/observable/with-core-from-observable.behavior';\nimport { withCoreFromPromiseBehavior } from '../../behaviors/promise/with-core-from-promise.behavior';\nimport { withCoreReducerBehavior } from '../../behaviors/reducer/with-core-reducer.behavior';\nimport { withCoreObservableBehavior } from '../../behaviors/resolve/core-observable/with-core-observable.behavior';\nimport { withCorePromiseBehavior } from '../../behaviors/resolve/core-promise/with-core-promise.behavior';\nimport { withCoreValueBehavior } from '../../behaviors/resolve/core-value/with-core-value.behavior';\nimport { withCoreFromStreamBehavior } from '../../behaviors/resolve/from-stream/with-core-from-stream.behavior';\nimport { withCoreEmitStateBehavior } from '../../behaviors/state/with-core-emit-state/with-core-emit-state.behavior';\nimport { withCoreStateBehavior } from '../../behaviors/state/with-core-state/with-core-state.behavior';\nimport { withCoreAfterTapBehavior } from '../../behaviors/tap/with-core-after-tap.behavior';\nimport { withCoreBeforeTapBehavior } from '../../behaviors/tap/with-core-before-tap.behavior';\n\n/**\n * Creates and registers a Feature Cell using the provided configuration and optional behavior and controller contracts.\n * This function produces a Feature Cell instance keyed by the descriptor and registers it for later resolution and usage.\n *\n * --RelatedStart--\n * FeatureCellConfig\n * BehaviorClassContract\n * ControllerClassContract\n * FeatureCellShape\n * --RelatedEnd--\n *\n * @param descriptor Configuration descriptor that defines the Feature Cell identity and setup.\n * @param behaviors Behavior class contracts applied during Feature Cell construction.\n * @param controllers Controller class contracts applied during Feature Cell construction.\n * @returns The registered Feature Cell instance.\n */\nexport function FeatureCell<T>(\n descriptor: FeatureCellConfig<T>,\n behaviors: BehaviorClassContract<T>[] = [],\n controllers: ControllerClassContract<T>[] = []\n): FeatureCellShape<T> {\n createFeatureCellToken(descriptor.key);\n\n registerFeatureCell({\n key: descriptor.key\n });\n\n return new FeatureCellClass(descriptor, loadDefaultBehaviors(), behaviors, controllers).build();\n}\n\nfunction loadDefaultBehaviors<T>(): BehaviorClassContract<T>[] {\n return [\n withCoreAfterTapBehavior,\n withCoreBeforeTapBehavior,\n withCoreErrorBehavior,\n withCoreFilterBehavior,\n withCoreFromObservableBehavior,\n withCoreFromPromiseBehavior,\n withCoreFromStreamBehavior,\n withCoreObservableBehavior,\n withCorePromiseBehavior,\n withCoreReducerBehavior,\n withCoreValueBehavior,\n withCoreStateBehavior,\n withCoreErrorCallbackBehavior,\n withArrayMergeBehavior,\n withCoreEmitStateBehavior\n ];\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > lib > factories > vault > vault.ts\n// Updated: 2026-03-02 19:51\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { VaultCore } from '@sdux-vault/engine';\nimport { VaultConfig } from '@sdux-vault/shared';\n\n/**\n * Initializes the Vault runtime using the provided configuration and prepares the global feature cell registry.\n * This function establishes the required Vault infrastructure and applies the supplied options for core initialization.\n *\n * --RelatedStart--\n * VaultConfig\n * --RelatedEnd--\n *\n * @param options Configuration options used to initialize the Vault runtime.\n */\nexport function Vault(options: VaultConfig = {}): void {\n VaultCore(options);\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > core > src > public-api.ts\n// Updated: 2026-03-03 07:37\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport './extensions';\nexport * from './extensions';\n\nimport './lib/version/version.register';\n\nexport { withObjectShallowMergeBehavior } from './lib/behaviors/merge/object/with-object-shallow-merge.behavior';\nexport type { FromStreamOptions } from './lib/behaviors/resolve/from-stream/options/from-stream.options';\nexport { FeatureCell } from './lib/factories/feature-cell/feature-cell';\nexport { Vault } from './lib/factories/vault/vault';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAqCO,MAAM,gBAAgB,GAAG;;;;;;;AC1ChC;AACA;AACA;AACA;AACA;AACA;AAqDO,MAAM,uBAAuB,GAAG;;;;;;;AC1DvC;AACA;AACA;AACA;AACA;AACA;AAoCO,MAAM,sBAAsB,GAAG;;;;;;;ACzCtC;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAKA,KAAK,aAAa;AAClB,KAAK,UAAU;AACf,KAAK,SAAS;AAMP,MAAM,wBAAwB,GAAG;;ACtBxC;AACA;AACA;AACA;AACA;AACA;AAIA,MAAM,YAAY,GAAG,kBAAkB;AACvC,MAAM,YAAY,GAAG,OAAO;AAE5B,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC;;ACG3C;;;;;;;;;;;;;;;AAeG;AAMI,IAAM,8BAA8B,GAApC,MAAM,8BAA8B,CAAA;AA2B9B,IAAA,WAAA;;IAzBX,OAAgB,IAAI;;IAGpB,OAAgB,GAAG;;AAGnB,IAAA,OAAgB,QAAQ,GAAG,IAAI;;AAGtB,IAAA,IAAI,GAAG,aAAa,CAAC,KAAK;;AAG1B,IAAA,GAAG;;IAGH,QAAQ,GAAG,IAAI;AAExB;;;;;AAKG;IACH,WAAA,CACE,GAAW,EACF,WAAiC,EAAA;QAAjC,I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EG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sdux-vault/core",
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/sdux-vault/core.git"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://www.sdux-vault.com",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"tslib": "^2.3.0"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@sdux-vault/engine": "^0.0.9",
|
|
18
|
+
"@sdux-vault/shared": ">=0.0.6 <0.1.0",
|
|
19
|
+
"rxjs": "^7.0.0"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"fesm2022/",
|
|
23
|
+
"types/",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"package.json"
|
|
27
|
+
],
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"types": "./types/sdux-vault-core.d.ts",
|
|
32
|
+
"main": "./fesm2022/sdux-vault-core.mjs",
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"./fesm2022/*.mjs",
|
|
35
|
+
"src/lib/version/version.register.ts",
|
|
36
|
+
"src/lib/behaviors/observable/interface/from-observable-behavior.interface",
|
|
37
|
+
"src/lib/behaviors/promise/interface/from-promise-behavior.interface",
|
|
38
|
+
"src/lib/behaviors/resolve/from-stream/interface/from-stream-behavior.interface",
|
|
39
|
+
"src/extensions/index.ts"
|
|
40
|
+
],
|
|
41
|
+
"module": "fesm2022/sdux-vault-core.mjs",
|
|
42
|
+
"typings": "types/sdux-vault-core.d.ts",
|
|
43
|
+
"exports": {
|
|
44
|
+
"./package.json": {
|
|
45
|
+
"default": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
".": {
|
|
48
|
+
"types": "./types/sdux-vault-core.d.ts",
|
|
49
|
+
"default": "./fesm2022/sdux-vault-core.mjs"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { VaultStateRef, FeatureCellConfig, FeatureCellShape } from '@sdux-vault/engine';
|
|
2
|
+
import { BehaviorExtFunction, DeferredFactory, StateInputShape, MergeBehaviorContract, BehaviorClassContext, BehaviorType, PipelineUpstreamValue, MergeConfig, BehaviorClassContract, ControllerClassContract, VaultConfig } from '@sdux-vault/shared';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Extension contract for observable-based FeatureCell integration.
|
|
7
|
+
*
|
|
8
|
+
* This interface defines the shape of the dynamically injected
|
|
9
|
+
* `fromObservable` API that allows a FeatureCell to accept observable
|
|
10
|
+
* sources and expose them as normalized vault state references.
|
|
11
|
+
*/
|
|
12
|
+
interface FromObservableBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {
|
|
13
|
+
[key: string]: BehaviorExtFunction | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Behavior extension function that installs the `fromObservable` API.
|
|
16
|
+
*/
|
|
17
|
+
fromObservable: BehaviorExtFunction;
|
|
18
|
+
}
|
|
19
|
+
declare module '@sdux-vault/shared' {
|
|
20
|
+
/**
|
|
21
|
+
* FeatureCell extension interface augmented with observable integration support.
|
|
22
|
+
*/
|
|
23
|
+
interface FeatureCellExtension<TEntity> {
|
|
24
|
+
/**
|
|
25
|
+
* Wraps an observable source and exposes it as a stream of vault state references.
|
|
26
|
+
*
|
|
27
|
+
* @param source$ Observable emitting raw entity values.
|
|
28
|
+
* @returns Observable emitting vault state references.
|
|
29
|
+
*/
|
|
30
|
+
fromObservable?(source$: Observable<TEntity>): Observable<VaultStateRef<TEntity>>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
declare const __fromObservable = true;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Runtime extension contract for promise-based state resolution APIs.
|
|
37
|
+
*
|
|
38
|
+
* This interface defines the behavior extension surface exposed when a
|
|
39
|
+
* promise-capable resolve behavior is installed. It declares the dynamic
|
|
40
|
+
* methods added to a FeatureCell to support deferred and promise-based
|
|
41
|
+
* resolution through the pipeline.
|
|
42
|
+
*
|
|
43
|
+
* --RelatedStart--
|
|
44
|
+
* DeferredFactory
|
|
45
|
+
* --RelatedEnd--
|
|
46
|
+
*/
|
|
47
|
+
interface FromPromiseBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {
|
|
48
|
+
[key: string]: BehaviorExtFunction | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves state from a deferred factory using promise semantics.
|
|
51
|
+
*/
|
|
52
|
+
fromPromise: BehaviorExtFunction;
|
|
53
|
+
/**
|
|
54
|
+
* Resolves state from a deferred factory using deferred semantics.
|
|
55
|
+
*/
|
|
56
|
+
fromDeferred: BehaviorExtFunction;
|
|
57
|
+
}
|
|
58
|
+
declare module '@sdux-vault/shared' {
|
|
59
|
+
/**
|
|
60
|
+
* FeatureCell extension methods for promise-based state resolution.
|
|
61
|
+
*/
|
|
62
|
+
interface FeatureCellExtension<TEntity> {
|
|
63
|
+
/**
|
|
64
|
+
* Resolves state from a deferred factory using deferred semantics.
|
|
65
|
+
*
|
|
66
|
+
* @param incoming Deferred factory that produces the state value.
|
|
67
|
+
* @returns A promise resolving to a normalized state envelope.
|
|
68
|
+
*/
|
|
69
|
+
fromDeferred?(incoming: DeferredFactory<TEntity>): Promise<StateInputShape<TEntity>>;
|
|
70
|
+
/**
|
|
71
|
+
* Resolves state from a deferred factory using promise semantics.
|
|
72
|
+
*
|
|
73
|
+
* @param incoming Deferred factory that produces the state value.
|
|
74
|
+
* @returns A promise resolving to a normalized state envelope.
|
|
75
|
+
*/
|
|
76
|
+
fromPromise?(incoming: DeferredFactory<TEntity>): Promise<StateInputShape<TEntity>>;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
declare const __fromPromise_extension = true;
|
|
80
|
+
|
|
81
|
+
interface FromStreamOptions {
|
|
82
|
+
/**
|
|
83
|
+
* When true (default), any successful `next` clears the error state.
|
|
84
|
+
*/
|
|
85
|
+
autoResetError?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Runtime extension contract for behaviors that expose a `fromStream` API.
|
|
90
|
+
*
|
|
91
|
+
* This interface defines the shape of the dynamically injected extension
|
|
92
|
+
* that enables streaming observable sources to participate in pipeline
|
|
93
|
+
* execution through a FeatureCell instance.
|
|
94
|
+
*/
|
|
95
|
+
interface FromStreamBehaviorExtension extends Partial<Record<string, BehaviorExtFunction>> {
|
|
96
|
+
[key: string]: BehaviorExtFunction | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Function used to bridge an observable stream into the FeatureCell pipeline.
|
|
99
|
+
*/
|
|
100
|
+
fromStream: BehaviorExtFunction;
|
|
101
|
+
}
|
|
102
|
+
declare module '@sdux-vault/shared' {
|
|
103
|
+
/**
|
|
104
|
+
* FeatureCell extension surface for stream-based resolution.
|
|
105
|
+
*/
|
|
106
|
+
interface FeatureCellExtension<TEntity> {
|
|
107
|
+
/**
|
|
108
|
+
* Submits a streaming observable source for pipeline processing.
|
|
109
|
+
*
|
|
110
|
+
* @param source$ Observable stream emitting candidate values.
|
|
111
|
+
* @param options Optional configuration controlling stream behavior.
|
|
112
|
+
*/
|
|
113
|
+
fromStream?(source$: Observable<TEntity>, options?: FromStreamOptions): void;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
declare const __fromStream_extension = true;
|
|
117
|
+
|
|
118
|
+
declare const __core_extensions_loaded = true;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Shallow object merge behavior for the Vault merge stage.
|
|
122
|
+
*
|
|
123
|
+
* This behavior performs a one-level object merge where the incoming
|
|
124
|
+
* object spreads over the existing state. Non-object values, arrays,
|
|
125
|
+
* and `null` values bypass merging and are returned directly.
|
|
126
|
+
*
|
|
127
|
+
* The behavior also supports optional merge configuration, such as
|
|
128
|
+
* `clearUndefined`, which determines whether an `undefined` incoming
|
|
129
|
+
* value should clear the current state.
|
|
130
|
+
*
|
|
131
|
+
* This merge strategy is marked as a core, critical behavior and must
|
|
132
|
+
* always be present when selected as the FeatureCell’s merge behavior.
|
|
133
|
+
*
|
|
134
|
+
* @typeParam T - The state value type processed during merge.
|
|
135
|
+
*/
|
|
136
|
+
declare class withObjectShallowMergeBehavior<T> implements MergeBehaviorContract<T> {
|
|
137
|
+
readonly behaviorCtx: BehaviorClassContext;
|
|
138
|
+
/** Static metadata used for orchestrator behavior classification. */
|
|
139
|
+
static readonly type: BehaviorType;
|
|
140
|
+
/** Unique identifier for behavior diagnostics and devtools. */
|
|
141
|
+
static readonly key: string;
|
|
142
|
+
/** Indicates this merge behavior is pipeline-critical. */
|
|
143
|
+
static readonly critical = true;
|
|
144
|
+
/** Pipeline behavior type identifier. */
|
|
145
|
+
readonly type: "merge";
|
|
146
|
+
/** Unique merge behavior instance identifier. */
|
|
147
|
+
readonly key: string;
|
|
148
|
+
/** Instance-level criticality flag. */
|
|
149
|
+
readonly critical = true;
|
|
150
|
+
/**
|
|
151
|
+
* Creates a new shallow object merge behavior instance.
|
|
152
|
+
*
|
|
153
|
+
* @param key - Unique behavior identifier supplied by the factory.
|
|
154
|
+
* @param behaviorCtx - BehaviorCtx for future extensibility hooks.
|
|
155
|
+
*/
|
|
156
|
+
constructor(key: string, behaviorCtx: BehaviorClassContext);
|
|
157
|
+
/**
|
|
158
|
+
* Computes the shallow merge result between the current state and
|
|
159
|
+
* the incoming value. Non-object inputs bypass merging and are
|
|
160
|
+
* forwarded directly. When `clearUndefined=true`, an undefined
|
|
161
|
+
* incoming value clears the state.
|
|
162
|
+
*
|
|
163
|
+
* @param currentValue - The current FeatureCell state value.
|
|
164
|
+
* @param nextValue - The incoming value to merge into the current state.
|
|
165
|
+
* @param options - Optional merge configuration including `clearUndefined`.
|
|
166
|
+
* @returns The merged or forwarded next state value.
|
|
167
|
+
*/
|
|
168
|
+
computeMerge(currentValue: PipelineUpstreamValue<T> | undefined, nextValue: PipelineUpstreamValue<T> | undefined, options?: MergeConfig): PipelineUpstreamValue<T> | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Invoked when the behavior instance is destroyed.
|
|
171
|
+
* This merge behavior maintains no internal resources.
|
|
172
|
+
*/
|
|
173
|
+
destroy(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Resets the shallow merge behavior.
|
|
176
|
+
*
|
|
177
|
+
* Object shallow merge is a fully stateless, pure merge strategy.
|
|
178
|
+
* It holds no timers, caches, or internal merge state, meaning
|
|
179
|
+
* there is nothing to reset. This lifecycle hook exists solely
|
|
180
|
+
* to support the FeatureCell reset pipeline and to provide a
|
|
181
|
+
* diagnostic signal for DevTools and monitoring systems.
|
|
182
|
+
*
|
|
183
|
+
* After reset, the behavior continues to function identically.
|
|
184
|
+
*/
|
|
185
|
+
reset(): void;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Creates and registers a Feature Cell using the provided configuration and optional behavior and controller contracts.
|
|
190
|
+
* This function produces a Feature Cell instance keyed by the descriptor and registers it for later resolution and usage.
|
|
191
|
+
*
|
|
192
|
+
* --RelatedStart--
|
|
193
|
+
* FeatureCellConfig
|
|
194
|
+
* BehaviorClassContract
|
|
195
|
+
* ControllerClassContract
|
|
196
|
+
* FeatureCellShape
|
|
197
|
+
* --RelatedEnd--
|
|
198
|
+
*
|
|
199
|
+
* @param descriptor Configuration descriptor that defines the Feature Cell identity and setup.
|
|
200
|
+
* @param behaviors Behavior class contracts applied during Feature Cell construction.
|
|
201
|
+
* @param controllers Controller class contracts applied during Feature Cell construction.
|
|
202
|
+
* @returns The registered Feature Cell instance.
|
|
203
|
+
*/
|
|
204
|
+
declare function FeatureCell<T>(descriptor: FeatureCellConfig<T>, behaviors?: BehaviorClassContract<T>[], controllers?: ControllerClassContract<T>[]): FeatureCellShape<T>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Initializes the Vault runtime using the provided configuration and prepares the global feature cell registry.
|
|
208
|
+
* This function establishes the required Vault infrastructure and applies the supplied options for core initialization.
|
|
209
|
+
*
|
|
210
|
+
* --RelatedStart--
|
|
211
|
+
* VaultConfig
|
|
212
|
+
* --RelatedEnd--
|
|
213
|
+
*
|
|
214
|
+
* @param options Configuration options used to initialize the Vault runtime.
|
|
215
|
+
*/
|
|
216
|
+
declare function Vault(options?: VaultConfig): void;
|
|
217
|
+
|
|
218
|
+
export { FeatureCell, Vault, __core_extensions_loaded, __fromObservable, __fromPromise_extension, __fromStream_extension, withObjectShallowMergeBehavior };
|
|
219
|
+
export type { FromObservableBehaviorExtension, FromPromiseBehaviorExtension, FromStreamBehaviorExtension, FromStreamOptions };
|