@sdux-vault/devtools 0.0.7

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 ADDED
@@ -0,0 +1,249 @@
1
+ # MIT License
2
+
3
+ (with SDuX Clarification Notice)
4
+
5
+ ---
6
+
7
+ ## MIT License (Standard Text)
8
+
9
+ Copyright (c) 2026 NextGen Luminary
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the “Software”), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ ---
30
+
31
+ ## SDuX Clarification Notice (Non-License Commentary)
32
+
33
+ **IMPORTANT:**
34
+ The following sections are **clarifying notices** provided for transparency, auditability, ecosystem boundary clarity, acquisition readiness, and architectural separation within the SDuX ecosystem. They **do not modify, amend, replace, restrict, supersede, or reinterpret** the MIT License above.
35
+
36
+ If any conflict is perceived between this clarification notice and the MIT License text above, the MIT License text **controls in all cases**.
37
+
38
+ The MIT License text above applies **only** to the specific SDuX repositories and npm packages explicitly designated as open source by NextGen Luminary.
39
+
40
+ ---
41
+
42
+ ## 1. Scope of This License
43
+
44
+ This MIT License applies exclusively to the following SDuX components:
45
+
46
+ ### SDuX Framework Source
47
+
48
+ - @sdux-vault/core
49
+ - @sdux-vault/add-ons
50
+ - @sdux-vault/shared
51
+ - @sdux-vault/devtools/tooling
52
+ - @sdux-vault/devtools/ui
53
+ - @sdux-vault/ui/web-components
54
+
55
+ ### SDuX Open-Source npm Packages
56
+
57
+ - Identical package names as listed above when distributed via npm
58
+
59
+ No other SDuX components are licensed under the MIT License unless explicitly stated in writing by NextGen Luminary.
60
+
61
+ The MIT License does **not** apply to any repository, package, module, runtime, binary, service, distribution artifact, hosted system, entitlement service, or enforcement subsystem that is not expressly designated as MIT-licensed.
62
+
63
+ ---
64
+
65
+ ## 2. Explicit Exclusion of Proprietary Components
66
+
67
+ For the avoidance of doubt:
68
+
69
+ This MIT License **does not apply** to:
70
+
71
+ - @sdux-vault/engine
72
+ - SDuX Vault runtime components
73
+ - Persistence modules
74
+ - Encryption modules
75
+ - Licensing enforcement modules
76
+ - Telemetry systems
77
+ - Commercial-only features
78
+ - Runtime gating mechanisms
79
+ - Deterministic license validation infrastructure
80
+ - Any proprietary binaries, services, network services, entitlement servers, or internal source code
81
+
82
+ Use of proprietary SDuX components is governed exclusively by their applicable commercial or community licenses.
83
+
84
+ No rights—express or implied—are granted to proprietary components by virtue of this MIT License.
85
+
86
+ In particular, this MIT License does **not** grant rights to:
87
+
88
+ - Proprietary runtime enforcement systems
89
+ - Deterministic gating or validation logic
90
+ - License timeout mechanisms
91
+ - Runtime license tokens
92
+ - Production-gating systems
93
+ - Commercial entitlement APIs
94
+ - Proprietary network services or validation endpoints
95
+ - Internal orchestration engines not explicitly released under MIT
96
+
97
+ ---
98
+
99
+ ## 3. No Transitive or Implied Licensing
100
+
101
+ This MIT License:
102
+
103
+ - Does **not** grant rights to dependencies that are not themselves MIT-licensed
104
+ - Does **not** extend rights to runtime engines, orchestrators, execution layers, or enforcement systems
105
+ - Does **not** create any obligation for NextGen Luminary to open-source additional components
106
+ - Does **not** grant rights to use proprietary licensing APIs, enforcement surfaces, runtime validation endpoints, or commercial network services outside their intended licensed boundaries
107
+
108
+ Each SDuX package is licensed independently and must be evaluated on its own terms.
109
+
110
+ No transitive, derivative, architectural, structural, or implied licensing rights arise merely because MIT-licensed components may interoperate with proprietary components.
111
+
112
+ Interoperability does not imply relicensing, source disclosure obligations, or any grant of rights to non-MIT components.
113
+
114
+ ---
115
+
116
+ ## 4. Use in Commercial and Enterprise Environments
117
+
118
+ The MIT-licensed SDuX framework components:
119
+
120
+ - May be used in commercial, enterprise, and production environments
121
+ - May be modified and redistributed in accordance with the MIT License
122
+ - May be included in proprietary products, subject to MIT attribution requirements
123
+
124
+ This permissive licensing is intentional and designed to:
125
+
126
+ - Encourage adoption
127
+ - Support long-term maintainability
128
+ - Reduce legal friction during audits and acquisitions
129
+
130
+ No additional enterprise license is required for the MIT-designated components themselves.
131
+
132
+ ---
133
+
134
+ ## 5. Separation From Third-Party Extensions
135
+
136
+ Third-party extensions, add-ons, Behaviors, Controllers, integrations, or other modules developed by independent Vendors are **independently licensed**.
137
+
138
+ This MIT License:
139
+
140
+ - Does **not** apply to third-party extensions unless explicitly stated by their respective authors
141
+ - Does **not** grant rights to any Vendor-developed Licensed Extension
142
+ - Does **not** modify, override, validate, or enforce any Vendor commercial license
143
+
144
+ MIT-licensed SDuX components may be used to build extensions.
145
+ However:
146
+
147
+ - Any proprietary enforcement components used by such extensions remain separately licensed
148
+ - Runtime gating systems remain governed by their applicable community or commercial licenses
149
+ - Validation, entitlement, or enforcement behavior implemented outside MIT-designated repositories remains subject to its own governing license
150
+
151
+ No open-source contamination, copyleft effect, reciprocal licensing obligation, or forced disclosure requirement is created by virtue of integrating MIT-licensed SDuX components with proprietary or third-party components.
152
+
153
+ ---
154
+
155
+ ## 6. No Grant of Rights to Commercial Services or APIs
156
+
157
+ For clarity:
158
+
159
+ This MIT License does **not** grant rights to:
160
+
161
+ - Access proprietary commercial APIs
162
+ - Access proprietary network services
163
+ - Access entitlement servers
164
+ - Access validation infrastructure
165
+ - Access hosted SDuX services
166
+ - Bypass production-gating or enforcement systems
167
+
168
+ Any such rights, if available, are governed exclusively by their respective commercial or community licenses.
169
+
170
+ ---
171
+
172
+ ## 7. Trademark and Branding Clarification
173
+
174
+ This MIT License does **not** grant any trademark rights in the names, logos, product branding, or service marks of NextGen Luminary or SDuX, except as required for reasonable and customary attribution consistent with the MIT License.
175
+
176
+ Use of SDuX or NextGen Luminary trademarks in product names, marketplace listings, or marketing materials may require separate permission.
177
+
178
+ Nothing in this clarification notice modifies the trademark rights (or lack thereof) under the MIT License; it is provided solely for clarity and avoidance of confusion.
179
+
180
+ ---
181
+
182
+ ## 8. Relationship to Other SDuX Licenses
183
+
184
+ This MIT License operates independently from:
185
+
186
+ - NGL Commercial License 1.0
187
+ - SDuX / Vault Community License
188
+ - Any enterprise or custom licensing agreements
189
+
190
+ Possession or use of MIT-licensed SDuX components does **not** grant access to or rights under those other licenses.
191
+
192
+ Likewise, possession of proprietary SDuX licenses does not alter the terms of the MIT License for designated open-source components.
193
+
194
+ Each license operates independently and must be interpreted separately.
195
+
196
+ ---
197
+
198
+ ## 9. Assignment and Acquisition Clarity
199
+
200
+ The MIT License is inherently **assignable** and **transferable**.
201
+
202
+ Accordingly:
203
+
204
+ - Use of MIT-licensed SDuX components **does not prevent acquisition**
205
+ - No special approval is required to transfer ownership of products containing these components
206
+ - Auditors and acquiring entities may rely on standard MIT interpretations without exception
207
+
208
+ This aligns with industry-standard expectations for permissive open-source frameworks.
209
+
210
+ ---
211
+
212
+ ## 10. Audit and Due-Diligence Statement
213
+
214
+ During security reviews, license audits, or acquisition due diligence:
215
+
216
+ - MIT-licensed SDuX components should be reviewed as standard permissive open-source software
217
+ - No copyleft, reciprocity, source disclosure, or distribution obligations apply beyond standard MIT attribution
218
+ - No viral or contaminating license effects exist
219
+ - No patent retaliation, field-of-use restrictions, sublicense limitations, or production-gating obligations exist beyond those inherent in MIT
220
+
221
+ These characteristics are intentional and designed to be acquisition-safe and enterprise-friendly.
222
+
223
+ ---
224
+
225
+ ## 11. No Modification of License Terms
226
+
227
+ Nothing in this clarification notice:
228
+
229
+ - Modifies the MIT License text
230
+ - Adds restrictions to the MIT License
231
+ - Removes rights granted by the MIT License
232
+ - Expands rights beyond those granted by the MIT License
233
+
234
+ If any conflict is perceived between this clarification notice and the MIT License text above, the MIT License text **controls**.
235
+
236
+ ---
237
+
238
+ ## 12. Entire Notice
239
+
240
+ This document consists of:
241
+
242
+ 1. The unmodified MIT License text
243
+ 2. A non-binding clarification notice for transparency, architectural boundary clarity, compliance certainty, and acquisition readiness
244
+
245
+ Together, they provide a complete and accurate description of how MIT licensing is applied within the SDuX ecosystem.
246
+
247
+ ---
248
+
249
+ **END OF MIT LICENSE (WITH SDUX CLARIFICATION NOTICE)**
package/README.md ADDED
@@ -0,0 +1,267 @@
1
+ # @sdux-vault/devtools
2
+
3
+ > Observability, debugging, and runtime inspection for the SDuX platform.
4
+
5
+ `@sdux-vault/devtools-tooling` provides the developer-facing tooling layer for SDuX.
6
+ It enables deep insight into pipeline execution, controller decisions, and state transitions in real time.
7
+
8
+ ---
9
+
10
+ ## TL;DR
11
+
12
+ For full documentation, guides, and API references:
13
+ https://www.sdux-vault.com
14
+
15
+ ---
16
+
17
+ ## Overview
18
+
19
+ SDuX is built as a layered system:
20
+
21
+ ```plaintext
22
+ shared → engine → core → core-extensions → apps
23
+ └─────────---------───────────→ devtools
24
+ ```
25
+
26
+ - **apps** → end-user applications
27
+ - **core** → behavior runtime + execution layer
28
+ - **core-extensions** → framework integrations
29
+ - **devtools** → debugging and inspection (this package)
30
+ - **engine** → runtime engine and orchestration
31
+ - **shared** → contracts, types, utilities
32
+
33
+ ---
34
+
35
+ ## What This Package Provides
36
+
37
+ - Runtime instrumentation layer
38
+ - Pipeline inspection tools
39
+ - Controller decision tracing
40
+ - State transition visualization hooks
41
+ - DevTools integration bridge
42
+ - Debug-safe monitoring utilities
43
+
44
+ ---
45
+
46
+ ## Key Characteristics
47
+
48
+ - ✅ Non-invasive instrumentation
49
+ - ✅ Dev-only execution (no production overhead)
50
+ - ✅ Framework-agnostic
51
+ - ✅ Real-time pipeline visibility
52
+ - ✅ Deterministic and traceable execution insights
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ npm install @sdux-vault/devtools-tooling
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Usage
65
+
66
+ ### Basic Import
67
+
68
+ ```ts
69
+ import '@sdux-vault/devtools-tooling';
70
+ ```
71
+
72
+ This enables:
73
+
74
+ - runtime instrumentation
75
+ - DevTools communication
76
+ - feature cell registration tracking
77
+
78
+ ---
79
+
80
+ ## Example: Dev Mode Integration
81
+
82
+ ```ts
83
+ import { DevMode } from '@sdux-vault/shared';
84
+
85
+ if (DevMode.active) {
86
+ // DevTools will automatically attach
87
+ }
88
+ ```
89
+
90
+ ---
91
+
92
+ ## How It Works
93
+
94
+ This package integrates with the SDuX runtime through:
95
+
96
+ - VaultMonitor hooks
97
+ - DecisionEngine events
98
+ - Behavior + controller lifecycle signals
99
+
100
+ It observes:
101
+
102
+ - pipeline execution
103
+ - controller outcomes
104
+ - state mutations
105
+ - error propagation
106
+
107
+ All without mutating runtime behavior.
108
+
109
+ ---
110
+
111
+ ## Instrumentation Model
112
+
113
+ ### Passive Observation
114
+
115
+ Devtools tooling:
116
+
117
+ - does not alter execution
118
+ - does not mutate state
119
+ - does not introduce side effects in production
120
+
121
+ ---
122
+
123
+ ## Event Sources
124
+
125
+ Instrumentation is driven by:
126
+
127
+ - FeatureCell lifecycle events
128
+ - Behavior execution stages
129
+ - Controller decision flow
130
+ - Orchestrator pipeline phases
131
+
132
+ ---
133
+
134
+ ## Traceability
135
+
136
+ Each pipeline run is tracked via:
137
+
138
+ ```ts
139
+ traceId: string;
140
+ ```
141
+
142
+ This enables:
143
+
144
+ - deterministic debugging
145
+ - replayable execution flows
146
+ - cross-layer correlation
147
+
148
+ ---
149
+
150
+ ## DevTools Integration
151
+
152
+ This package acts as the bridge between runtime and DevTools UI.
153
+
154
+ It enables:
155
+
156
+ - feature cell inspection
157
+ - timeline visualization
158
+ - state diffing
159
+ - controller decision tracing
160
+
161
+ ---
162
+
163
+ ## Environment Behavior
164
+
165
+ Instrumentation is:
166
+
167
+ - ✅ Enabled in DevMode
168
+ - 🚫 No-op in production
169
+ - ✅ Safe for SSR and browser environments
170
+
171
+ ---
172
+
173
+ ## Side Effects
174
+
175
+ This package performs controlled, dev-only side effects:
176
+
177
+ ```ts
178
+ import '@sdux-vault/devtools-tooling';
179
+ ```
180
+
181
+ Triggers:
182
+
183
+ - DevTools registration
184
+ - runtime instrumentation wiring
185
+
186
+ Behavior:
187
+
188
+ - no-op in production
189
+ - idempotent
190
+ - safe across all runtimes
191
+
192
+ ---
193
+
194
+ ## Development
195
+
196
+ ### Build
197
+
198
+ ```bash
199
+ npm run build:devtools-tooling
200
+ ```
201
+
202
+ Output:
203
+
204
+ ```
205
+ dist/devtools/tooling
206
+ ```
207
+
208
+ ---
209
+
210
+ ## Test
211
+
212
+ ```bash
213
+ npm run test:devtools-tooling
214
+ ```
215
+
216
+ ---
217
+
218
+ ## Verify
219
+
220
+ ```bash
221
+ npm run verify
222
+ ```
223
+
224
+ Includes:
225
+
226
+ - linting
227
+ - formatting
228
+ - type checking
229
+ - tests
230
+
231
+ ---
232
+
233
+ ## Publishing
234
+
235
+ See `RELEASE.md` for full publishing instructions.
236
+
237
+ ---
238
+
239
+ ## Ecosystem
240
+
241
+ - `@sdux-vault/addons` — optional, composable extensions for runtime behavior ([README](../addons/README.md))
242
+ - `@sdux-vault/core` — execution engine for pipelines and state orchestration ([README](../core/README.md))
243
+ - `@sdux-vault/core-extensions/angular` — Angular integration layer (signals, DI, reactive bindings) ([README](../core-extensions/angular/README.md))
244
+ - `@sdux-vault/engine` — orchestration, conductor, decision engine
245
+ - `@sdux-vault/shared` — contracts, types, utilities([README](../shared/README.md))
246
+
247
+ ---
248
+
249
+ ## Tree Shaking & Side Effects
250
+
251
+ This package includes intentional side effects for:
252
+
253
+ - runtime instrumentation
254
+ - DevTools registration
255
+
256
+ These are required for debugging capabilities.
257
+
258
+ As a result, the bundle is marked as side-effectful.
259
+
260
+ ---
261
+
262
+ ## License
263
+
264
+ For full licensing details:
265
+ https://www.sdux-vault.com/docs/welcome/license#license-texts
266
+
267
+ MIT © SDuX Vault
@@ -0,0 +1,99 @@
1
+ import { registerVersion, DevMode } from '@sdux-vault/shared';
2
+ import { Subject } from 'rxjs';
3
+
4
+ // --- AI Model File Path (DO NOT DELETE) ---
5
+ // FilePath: libs > dev-tools > tooling > src > lib > version > version.register.ts
6
+ // Updated: 2026-03-03 07:56
7
+ // Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or
8
+ // cmd+alt+j (see .vscode/keybindings.json)
9
+ // --- END AI MODEL FILE PATH ---
10
+ const SDUX_PACKAGE = '@sdux-vault/devtools';
11
+ const SDUX_VERSION = '0.0.7';
12
+ registerVersion(SDUX_PACKAGE, SDUX_VERSION);
13
+
14
+ // --- AI Model File Path (DO NOT DELETE) ---
15
+ // FilePath: libs > dev-tools > tooling > src > lib > interfaces > event-bus.contract.ts
16
+ // Updated: 2026-03-04 08:11
17
+ // Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or
18
+ // cmd+alt+j (see .vscode/keybindings.json)
19
+ // --- END AI MODEL FILE PATH ---
20
+
21
+ // --- AI Model File Path (DO NOT DELETE) ---
22
+ // FilePath: libs > dev-tools > tooling > src > lib > utils > event-bus.ts
23
+ // Updated: 2026-03-02 19:26
24
+ // Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or
25
+ // cmd+alt+j (see .vscode/keybindings.json)
26
+ // --- END AI MODEL FILE PATH ---
27
+ /**
28
+ * Holds the singleton EventBus instance used for global event dispatch.
29
+ */
30
+ let instance = null;
31
+ /**
32
+ * Returns the global EventBus singleton used to emit and observe DevTools events.
33
+ * This function ensures a single EventBus instance is created and reused for the application lifecycle.
34
+ *
35
+ * --RelatedStart--
36
+ * EventBusInterface
37
+ * --RelatedEnd--
38
+ *
39
+ * @returns The global EventBus instance.
40
+ */
41
+ function EventBus() {
42
+ if (!instance) {
43
+ instance = new EventBusInstance();
44
+ }
45
+ return instance;
46
+ }
47
+ /**
48
+ * Implements the EventBusInterface by managing pipeline and queue event streams.
49
+ * This class provides gated event emission based on development mode and exposes observable streams for subscribers.
50
+ * It is instantiated once and registered globally to support DevTools integration.
51
+ */
52
+ class EventBusInstance {
53
+ /**
54
+ * Subject used to emit pipeline events to subscribers.
55
+ */
56
+ #pipeline$ = new Subject();
57
+ /**
58
+ * Creates a new EventBus instance and exposes it on the global object for DevTools access.
59
+ */
60
+ constructor() {
61
+ window.sdux ??= {};
62
+ window.sdux.vaultEventBus = this;
63
+ }
64
+ /**
65
+ * Emits a pipeline event to subscribed observers when development mode is active.
66
+ *
67
+ * @param event Pipeline event instance to emit.
68
+ */
69
+ nextPipeline(event) {
70
+ if (DevMode.active && event) {
71
+ this.#pipeline$.next(event);
72
+ }
73
+ }
74
+ /**
75
+ * Provides an observable stream of emitted pipeline events.
76
+ *
77
+ * @returns Observable stream of pipeline events.
78
+ */
79
+ pipeline$() {
80
+ return this.#pipeline$.asObservable();
81
+ }
82
+ }
83
+
84
+ // --- AI Model File Path (DO NOT DELETE) ---
85
+ // FilePath: libs > devtools > tooling > src > public-api.ts
86
+ // Updated: 2026-03-28 11:45
87
+ // Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or
88
+ // cmd+alt+j (see .vscode/keybindings.json)
89
+ // --- END AI MODEL FILE PATH ---
90
+ /**
91
+ * This is for version support in dev mode and tracking in the devtools
92
+ */
93
+
94
+ /**
95
+ * Generated bundle index. Do not edit.
96
+ */
97
+
98
+ export { EventBus };
99
+ //# sourceMappingURL=sdux-vault-devtools.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdux-vault-devtools.mjs","sources":["../../../../libs/devtools/tooling/src/lib/version/version.register.ts","../../../../libs/devtools/tooling/src/lib/interfaces/event-bus.contract.ts","../../../../libs/devtools/tooling/src/lib/utils/event-bus.ts","../../../../libs/devtools/tooling/src/public-api.ts","../../../../libs/devtools/tooling/src/sdux-vault-devtools.ts"],"sourcesContent":["// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > dev-tools > tooling > src > lib > version > version.register.ts\n// Updated: 2026-03-03 07:56\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\nimport { registerVersion } from '@sdux-vault/shared';\n\nconst SDUX_PACKAGE = '@sdux-vault/devtools';\nconst SDUX_VERSION = '0.0.7';\n\nregisterVersion(SDUX_PACKAGE, SDUX_VERSION);\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > dev-tools > tooling > src > lib > interfaces > event-bus.contract.ts\n// Updated: 2026-03-04 08:11\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 { EventShape } from '@sdux-vault/shared';\nimport { Observable } from 'rxjs';\n\n/**\n * Defines the contract for an event bus responsible for emitting and observing pipeline and queue events.\n * This interface provides methods for publishing events and subscribing to their corresponding event streams.\n *\n * --RelatedStart--\n * EventShape\n * EventQueueShape\n * --RelatedEnd--\n */\nexport interface EventBusContract {\n /**\n * Emits a pipeline event to all subscribed observers.\n *\n * @param event Pipeline event instance to be dispatched.\n */\n nextPipeline(event: EventShape): void;\n\n /**\n * Provides an observable stream of emitted pipeline events.\n *\n * @returns Observable stream of pipeline events.\n */\n pipeline$(): Observable<EventShape>;\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > dev-tools > tooling > src > lib > utils > event-bus.ts\n// Updated: 2026-03-02 19: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\nimport { Subject } from 'rxjs';\n\nimport type { EventShape, SDuXShape } from '@sdux-vault/shared';\nimport { DevMode } from '@sdux-vault/shared';\nimport type { EventBusContract } from '../interfaces/event-bus.contract';\n\n/**\n * Holds the singleton EventBus instance used for global event dispatch.\n */\nlet instance: EventBusContract | null = null;\n\n/**\n * Returns the global EventBus singleton used to emit and observe DevTools events.\n * This function ensures a single EventBus instance is created and reused for the application lifecycle.\n *\n * --RelatedStart--\n * EventBusInterface\n * --RelatedEnd--\n *\n * @returns The global EventBus instance.\n */\nexport function EventBus(): EventBusContract {\n if (!instance) {\n instance = new EventBusInstance();\n }\n\n return instance;\n}\n\n/**\n * Implements the EventBusInterface by managing pipeline and queue event streams.\n * This class provides gated event emission based on development mode and exposes observable streams for subscribers.\n * It is instantiated once and registered globally to support DevTools integration.\n */\nclass EventBusInstance implements EventBusContract {\n /**\n * Subject used to emit pipeline events to subscribers.\n */\n #pipeline$ = new Subject<EventShape>();\n\n /**\n * Creates a new EventBus instance and exposes it on the global object for DevTools access.\n */\n constructor() {\n window.sdux ??= {} as SDuXShape;\n window.sdux.vaultEventBus = this;\n }\n\n /**\n * Emits a pipeline event to subscribed observers when development mode is active.\n *\n * @param event Pipeline event instance to emit.\n */\n nextPipeline(event: EventShape): void {\n if (DevMode.active && event) {\n this.#pipeline$.next(event);\n }\n }\n\n /**\n * Provides an observable stream of emitted pipeline events.\n *\n * @returns Observable stream of pipeline events.\n */\n pipeline$() {\n return this.#pipeline$.asObservable();\n }\n}\n","// --- AI Model File Path (DO NOT DELETE) ---\n// FilePath: libs > devtools > tooling > src > public-api.ts\n// Updated: 2026-03-28 11:45\n//\t Generated by pathcomment [tab] (see .vscode/typescript.code-snippets) or\n//\t cmd+alt+j (see .vscode/keybindings.json)\n// --- END AI MODEL FILE PATH ---\n\n/**\n * This is for version support in dev mode and tracking in the devtools\n */\nimport './lib/version/version.register';\n\nexport * from './lib/interfaces/event-bus.contract';\nexport * from './lib/utils/event-bus';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AAIA,MAAM,YAAY,GAAG,sBAAsB;AAC3C,MAAM,YAAY,GAAG,OAAO;AAE5B,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC;;ACZ3C;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AAQA;;AAEG;AACH,IAAI,QAAQ,GAA4B,IAAI;AAE5C;;;;;;;;;AASG;SACa,QAAQ,GAAA;IACtB,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,QAAQ,GAAG,IAAI,gBAAgB,EAAE;IACnC;AAEA,IAAA,OAAO,QAAQ;AACjB;AAEA;;;;AAIG;AACH,MAAM,gBAAgB,CAAA;AACpB;;AAEG;AACH,IAAA,UAAU,GAAG,IAAI,OAAO,EAAc;AAEtC;;AAEG;AACH,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,CAAC,IAAI,KAAK,EAAe;AAC/B,QAAA,MAAM,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI;IAClC;AAEA;;;;AAIG;AACH,IAAA,YAAY,CAAC,KAAiB,EAAA;AAC5B,QAAA,IAAI,OAAO,CAAC,MAAM,IAAI,KAAK,EAAE;AAC3B,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B;IACF;AAEA;;;;AAIG;IACH,SAAS,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE;IACvC;AACD;;AC1ED;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEG;;ACTH;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@sdux-vault/devtools",
3
+ "version": "0.0.7",
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/shared": ">=0.0.6 <0.1.0",
18
+ "rxjs": "^7.0.0"
19
+ },
20
+ "files": [
21
+ "fesm2022/",
22
+ "types/",
23
+ "README.md",
24
+ "LICENSE",
25
+ "package.json"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "types": "./types/sdux-vault-devtools.d.ts",
31
+ "main": "./fesm2022/sdux-vault-devtools.mjs",
32
+ "sideEffects": [
33
+ "./fesm2022/*.mjs",
34
+ "src/lib/version/version.register.ts"
35
+ ],
36
+ "module": "fesm2022/sdux-vault-devtools.mjs",
37
+ "typings": "types/sdux-vault-devtools.d.ts",
38
+ "exports": {
39
+ "./package.json": {
40
+ "default": "./package.json"
41
+ },
42
+ ".": {
43
+ "types": "./types/sdux-vault-devtools.d.ts",
44
+ "default": "./fesm2022/sdux-vault-devtools.mjs"
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,41 @@
1
+ import { EventShape } from '@sdux-vault/shared';
2
+ import { Observable } from 'rxjs';
3
+
4
+ /**
5
+ * Defines the contract for an event bus responsible for emitting and observing pipeline and queue events.
6
+ * This interface provides methods for publishing events and subscribing to their corresponding event streams.
7
+ *
8
+ * --RelatedStart--
9
+ * EventShape
10
+ * EventQueueShape
11
+ * --RelatedEnd--
12
+ */
13
+ interface EventBusContract {
14
+ /**
15
+ * Emits a pipeline event to all subscribed observers.
16
+ *
17
+ * @param event Pipeline event instance to be dispatched.
18
+ */
19
+ nextPipeline(event: EventShape): void;
20
+ /**
21
+ * Provides an observable stream of emitted pipeline events.
22
+ *
23
+ * @returns Observable stream of pipeline events.
24
+ */
25
+ pipeline$(): Observable<EventShape>;
26
+ }
27
+
28
+ /**
29
+ * Returns the global EventBus singleton used to emit and observe DevTools events.
30
+ * This function ensures a single EventBus instance is created and reused for the application lifecycle.
31
+ *
32
+ * --RelatedStart--
33
+ * EventBusInterface
34
+ * --RelatedEnd--
35
+ *
36
+ * @returns The global EventBus instance.
37
+ */
38
+ declare function EventBus(): EventBusContract;
39
+
40
+ export { EventBus };
41
+ export type { EventBusContract };