@sdux-vault/engine 0.0.10 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ import { registerVersion, vaultDebug, ControllerVotes, ControllerMessageTypes, O
|
|
|
2
2
|
import { of, map, catchError, forkJoin, Subject, ReplaySubject, isObservable, firstValueFrom, tap } from 'rxjs';
|
|
3
3
|
import { __decorate } from 'tslib';
|
|
4
4
|
import { filter } from 'rxjs/operators';
|
|
5
|
-
import { EventBus } from '@sdux-vault/devtools';
|
|
5
|
+
import { EventBus, initDevtoolsWidget } from '@sdux-vault/devtools';
|
|
6
6
|
|
|
7
7
|
// --- AI Model File Path (DO NOT DELETE) ---
|
|
8
8
|
// FilePath: projects > engine > src > lib > utils > version > version.register.ts
|
|
@@ -11,7 +11,7 @@ import { EventBus } from '@sdux-vault/devtools';
|
|
|
11
11
|
// cmd+alt+j (see .vscode/keybindings.json)
|
|
12
12
|
// --- END AI MODEL FILE PATH ---
|
|
13
13
|
const SDUX_PACKAGE = '@sdux-vault/engine';
|
|
14
|
-
const SDUX_VERSION = '0.
|
|
14
|
+
const SDUX_VERSION = '0.1.2';
|
|
15
15
|
registerVersion(SDUX_PACKAGE, SDUX_VERSION);
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1815,25 +1815,11 @@ class VaultCoreInstance {
|
|
|
1815
1815
|
if (typeof document === 'undefined')
|
|
1816
1816
|
return;
|
|
1817
1817
|
// Ensure root container exists
|
|
1818
|
-
|
|
1819
|
-
globalThis.sdux = {};
|
|
1820
|
-
}
|
|
1818
|
+
globalThis.sdux ??= {};
|
|
1821
1819
|
// Ensure debugWidget exists
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
};
|
|
1826
|
-
}
|
|
1827
|
-
const debugWidget = globalThis.sdux.debugWidget;
|
|
1828
|
-
// prevent duplicate injection
|
|
1829
|
-
if (debugWidget.injected)
|
|
1830
|
-
return;
|
|
1831
|
-
debugWidget.injected = true;
|
|
1832
|
-
debugWidget.getRegistry = () => this.getRegistrySnapshot();
|
|
1833
|
-
// istanbul ignore next - this is defensive only
|
|
1834
|
-
import('@sdux-vault/devtools').catch(() => {
|
|
1835
|
-
// fail silently if dev-tools not installed
|
|
1836
|
-
});
|
|
1820
|
+
globalThis.sdux.debugWidget ??= {};
|
|
1821
|
+
globalThis.sdux.debugWidget.getRegistry = () => this.getRegistrySnapshot();
|
|
1822
|
+
initDevtoolsWidget();
|
|
1837
1823
|
}
|
|
1838
1824
|
//#endregion
|
|
1839
1825
|
//#region Public Testing Method
|
|
@@ -2295,6 +2281,13 @@ class Orchestrator {
|
|
|
2295
2281
|
this.#runStateBehaviors(ctx);
|
|
2296
2282
|
this.vaultMonitor.endCoreState(this.cellKey, VAULT_ORCHESTRATOR, ctx);
|
|
2297
2283
|
}
|
|
2284
|
+
if (isVaultClearState(normalizedIncoming)) {
|
|
2285
|
+
this.vaultMonitor.startCoreState(this.cellKey, VAULT_ORCHESTRATOR, ctx);
|
|
2286
|
+
this.#resetBehaviors(ctx);
|
|
2287
|
+
this.#runStateBehaviors(ctx);
|
|
2288
|
+
this.vaultMonitor.endCoreState(this.cellKey, VAULT_ORCHESTRATOR, ctx);
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2298
2291
|
return normalizedIncoming;
|
|
2299
2292
|
}
|
|
2300
2293
|
//#endregion
|
|
@@ -3153,11 +3146,11 @@ class Conductor extends Orchestrator {
|
|
|
3153
3146
|
//#region public method
|
|
3154
3147
|
conduct(ctx, incoming, operation, options) {
|
|
3155
3148
|
const behaviorCtx = this.#buildPipelineCtx(ctx, operation, options);
|
|
3156
|
-
const
|
|
3157
|
-
if (isVaultNoop(
|
|
3149
|
+
const preparedIncoming = this.prepareIncoming(behaviorCtx, incoming, operation);
|
|
3150
|
+
if (isVaultNoop(preparedIncoming) || isVaultClearState(preparedIncoming)) {
|
|
3158
3151
|
return;
|
|
3159
3152
|
}
|
|
3160
|
-
behaviorCtx.incoming =
|
|
3153
|
+
behaviorCtx.incoming = preparedIncoming;
|
|
3161
3154
|
const controllerCtx = this.buildControllerCtx(behaviorCtx);
|
|
3162
3155
|
this.#enqueueAttempt({ behaviorCtx, controllerCtx, options });
|
|
3163
3156
|
}
|