@sdux-vault/shared 0.0.10

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,258 @@
1
+ # @sdux-vault/shared
2
+
3
+ > Core primitives, contracts, and utilities for the SDuX platform.
4
+
5
+ `@sdux-vault/shared` is the **foundation of the SDuX ecosystem**.
6
+ It defines the universal language used across all SDuX packages, including types, contracts, behaviors, and utilities.
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 (Angular, React, etc.)
29
+ - **devtools** → end-user tooling
30
+ - **engine** → runtime engine and orchestration
31
+ - **shared** → contracts, types, utilities (this package)
32
+
33
+ ---
34
+
35
+ ## What This Package Provides
36
+
37
+ - **Core contracts** — interfaces, shapes, and types
38
+ - **Behavior + controller abstractions**
39
+ - **Utility functions** — safe, composable, framework-agnostic
40
+ - **Configuration primitives**
41
+ - **Error models and services**
42
+ - **Runtime instrumentation hooks (DevTools integration)**
43
+
44
+ ---
45
+
46
+ ## Key Characteristics
47
+
48
+ - ✅ Framework-agnostic TypeScript
49
+ - ✅ Tree-shakable
50
+ - ✅ SSR-safe and browser-safe
51
+ - ✅ Designed for composition and extensibility
52
+ - ✅ Stable, domain-driven public API
53
+
54
+ ---
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ npm install @sdux-vault/shared
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Usage
65
+
66
+ ### Basic Import
67
+
68
+ ```ts
69
+ import { VaultError, BehaviorTypes } from '@sdux-vault/shared';
70
+ ```
71
+
72
+ ---
73
+
74
+ ### Example: Utility Usage
75
+
76
+ ```ts
77
+ import { isPromise } from '@sdux-vault/shared';
78
+
79
+ if (isPromise(value)) {
80
+ // handle async flow
81
+ }
82
+ ```
83
+
84
+ ---
85
+
86
+ ### Example: Type Usage
87
+
88
+ ```ts
89
+ import type { BehaviorType } from '@sdux-vault/shared';
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Public API Structure
95
+
96
+ ### Tree-Shakable by Default
97
+
98
+ - No unnecessary side effects
99
+ - Domain-based exports
100
+ - Minimal runtime footprint
101
+
102
+ ---
103
+
104
+ ### Framework-Agnostic Core
105
+
106
+ This package:
107
+
108
+ - has zero framework dependencies
109
+ - supports multiple adapters
110
+ - acts as the foundation for integrations like:
111
+
112
+ ```plaintext
113
+ @sdux-vault/core-extensions/*
114
+ ```
115
+
116
+ ---
117
+
118
+ ### Safe Runtime Instrumentation
119
+
120
+ Includes dev-only instrumentation:
121
+
122
+ - version registration
123
+ - DevTools integration
124
+
125
+ These are:
126
+
127
+ - environment guarded
128
+ - idempotent
129
+ - safe in SSR and production
130
+
131
+ ---
132
+
133
+ ## Environment Utilities
134
+
135
+ ```ts
136
+ import { DevMode } from '@sdux-vault/shared';
137
+ import { isTestEnv } from '@sdux-vault/shared';
138
+ ```
139
+
140
+ Provides runtime awareness for:
141
+
142
+ - development mode
143
+ - test environments
144
+
145
+ These are part of the **runtime platform**, not test-only helpers.
146
+
147
+ ---
148
+
149
+ ## Utilities
150
+
151
+ The `utils` domain includes:
152
+
153
+ - type guards
154
+ - safe helpers
155
+ - logging utilities
156
+ - runtime helpers
157
+
158
+ All utilities are:
159
+
160
+ - side-effect free (except controlled instrumentation)
161
+ - safe for universal usage
162
+
163
+ ---
164
+
165
+ ## Side Effects
166
+
167
+ This package performs **controlled, dev-only side effects**:
168
+
169
+ ```ts
170
+ import '@sdux-vault/shared';
171
+ ```
172
+
173
+ Triggers:
174
+
175
+ - version registration for DevTools
176
+
177
+ Behavior:
178
+
179
+ - no-op in production
180
+ - idempotent
181
+ - safe across all runtimes
182
+
183
+ ---
184
+
185
+ ## Development
186
+
187
+ ### Build
188
+
189
+ ```bash
190
+ npm run build:shared
191
+ ```
192
+
193
+ Output:
194
+
195
+ ```plaintext
196
+ dist/shared
197
+ ```
198
+
199
+ ---
200
+
201
+ ### Test
202
+
203
+ ```bash
204
+ npm run test:shared
205
+ ```
206
+
207
+ ---
208
+
209
+ ### Verify
210
+
211
+ ```bash
212
+ npm run verify
213
+ ```
214
+
215
+ Includes:
216
+
217
+ - linting
218
+ - formatting
219
+ - type checking
220
+ - tests
221
+
222
+ ---
223
+
224
+ ## Publishing
225
+
226
+ See [RELEASE.md](./RELEASE.md) for full publishing instructions.
227
+
228
+ ---
229
+
230
+ ## Ecosystem
231
+
232
+ - `@sdux-vault/addons` — optional, composable extensions for runtime behavior ([README](../addons/README.md))
233
+ - `@sdux-vault/core` — execution engine for pipelines and state orchestration ([README](../core/README.md))
234
+ - `@sdux-vault/core-extensions/angular` — Angular integration layer (signals, DI, reactive bindings) ([README](../core-extensions/angular/README.md))
235
+ - `@sdux-vault/devtools` — observability and debugging layer for runtime inspection ([README](../devtools/tooling/README.md))
236
+ - `@sdux-vault/engine` — orchestration, conductor, decision engine
237
+
238
+ ---
239
+
240
+ ### Tree Shaking & Side Effects
241
+
242
+ This package includes intentional side effects for:
243
+
244
+ - global TypeScript typing augmentation
245
+ - runtime version registration for devtools
246
+
247
+ These are required for correct framework behavior.
248
+
249
+ As a result, the bundle is marked as side-effectful.
250
+
251
+ ---
252
+
253
+ ## License
254
+
255
+ For full licensing details:
256
+ https://www.sdux-vault.com/docs/welcome/license#license-texts
257
+
258
+ MIT © SDuX Vault