@toolproof-npm/schema 0.1.72 → 0.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,59 +1,59 @@
1
- # @toolproof-npm/schema
2
-
3
- JSON schemas and TypeScript types for ToolProof...
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pnpm add @toolproof-npm/schema
9
- # or
10
- npm install @toolproof-npm/schema
11
- # or
12
- yarn add @toolproof-npm/schema
13
- ```
14
-
15
- ## Usage
16
-
17
- ### Import Schemas and Types
18
-
19
- ```typescript
20
- import { /* schemas and types */ } from '@toolproof-npm/schema';
21
- ```
22
-
23
- ## Features
24
-
25
- - JSON Schema definitions with $defs subschemas
26
- - Generated TypeScript types from JSON schemas
27
- - Runtime schema validation support
28
- - Extractors for non-JSON resource types
29
- - Schema bundling utilities
30
-
31
- ## Development
32
-
33
- ### Generate Types
34
-
35
- ```bash
36
- pnpm run generateTypes
37
- ```
38
-
39
- ### Build
40
-
41
- ```bash
42
- pnpm run build
43
- ```
44
-
45
- ### Update (Clean build + generate types)
46
-
47
- ```bash
48
- pnpm run update
49
- ```
50
-
51
- ## Requirements
52
-
53
- - Node.js 16+
54
- - TypeScript 4.5+ (for TypeScript projects)
55
-
56
- ## License
57
-
58
- MIT
59
-
1
+ # @toolproof-npm/schema
2
+
3
+ JSON schemas and TypeScript types for ToolProof...
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @toolproof-npm/schema
9
+ # or
10
+ npm install @toolproof-npm/schema
11
+ # or
12
+ yarn add @toolproof-npm/schema
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Import Schemas and Types
18
+
19
+ ```typescript
20
+ import { /* schemas and types */ } from '@toolproof-npm/schema';
21
+ ```
22
+
23
+ ## Features
24
+
25
+ - JSON Schema definitions with $defs subschemas
26
+ - Generated TypeScript types from JSON schemas
27
+ - Runtime schema validation support
28
+ - Extractors for non-JSON resource types
29
+ - Schema bundling utilities
30
+
31
+ ## Development
32
+
33
+ ### Generate Types
34
+
35
+ ```bash
36
+ pnpm run generateTypes
37
+ ```
38
+
39
+ ### Build
40
+
41
+ ```bash
42
+ pnpm run build
43
+ ```
44
+
45
+ ### Update (Clean build + generate types)
46
+
47
+ ```bash
48
+ pnpm run update
49
+ ```
50
+
51
+ ## Requirements
52
+
53
+ - Node.js 16+
54
+ - TypeScript 4.5+ (for TypeScript projects)
55
+
56
+ ## License
57
+
58
+ MIT
59
+
@@ -65,6 +65,10 @@
65
65
  "Error": [
66
66
  "Documented"
67
67
  ],
68
+ "ExecutionSocketMaterialized": [
69
+ "Resource",
70
+ "ResourceRoleIdentity"
71
+ ],
68
72
  "ForStepIdentity": [],
69
73
  "JobIdentity": [],
70
74
  "ResourceFormat": [
@@ -88,6 +92,13 @@
88
92
  "CreationContextWrapper",
89
93
  "ResourceKind"
90
94
  ],
95
+ "ExecutionSocket": [
96
+ "ResourceMissing",
97
+ "ResourcePotentialInput",
98
+ "ResourcePotentialOutput",
99
+ "Resource",
100
+ "ResourceRoleIdentity"
101
+ ],
91
102
  "ResourceRoleValue": [
92
103
  "ResourceTypeIdentity",
93
104
  "Documented"
@@ -133,11 +144,7 @@
133
144
  "StrategyRunStatus"
134
145
  ],
135
146
  "StrategyState": [
136
- "ResourceMissing",
137
- "ResourcePotentialInput",
138
- "ResourcePotentialOutput",
139
- "Resource",
140
- "ResourceRoleIdentity",
147
+ "ExecutionSocket",
141
148
  "ExecutionIdentity"
142
149
  ],
143
150
  "StrategyStateWrapper": [
@@ -204,7 +211,7 @@
204
211
  "StrategyRunUpdate": [
205
212
  "StrategyRun",
206
213
  "StrategyRunIdentity",
207
- "StrategyState",
208
- "Resource"
214
+ "ExecutionSocketMaterialized",
215
+ "ExecutionIdentity"
209
216
  ]
210
217
  }
@@ -1744,6 +1744,55 @@
1744
1744
  "unevaluatedProperties": false
1745
1745
  }
1746
1746
  },
1747
+ "ExecutionSocket": {
1748
+ "identity": "TYPE-ExecutionSocket",
1749
+ "name": "ExecutionSocket",
1750
+ "description": "dummy-description",
1751
+ "resourceFormatRef": "FORMAT-ApplicationJson",
1752
+ "extractionSchema": {
1753
+ "$anchor": "ExecutionSocket",
1754
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1755
+ "type": "object",
1756
+ "propertyNames": {
1757
+ "$ref": "#/$defs/ResourceRoleIdentity"
1758
+ },
1759
+ "additionalProperties": {
1760
+ "oneOf": [
1761
+ {
1762
+ "$ref": "#/$defs/ResourceMissing"
1763
+ },
1764
+ {
1765
+ "$ref": "#/$defs/ResourcePotentialInput"
1766
+ },
1767
+ {
1768
+ "$ref": "#/$defs/ResourcePotentialOutput"
1769
+ },
1770
+ {
1771
+ "$ref": "#/$defs/Resource"
1772
+ }
1773
+ ]
1774
+ },
1775
+ "unevaluatedProperties": false
1776
+ }
1777
+ },
1778
+ "ExecutionSocketMaterialized": {
1779
+ "identity": "TYPE-ExecutionSocketMaterialized",
1780
+ "name": "ExecutionSocketMaterialized",
1781
+ "description": "dummy-description",
1782
+ "resourceFormatRef": "FORMAT-ApplicationJson",
1783
+ "extractionSchema": {
1784
+ "$anchor": "ExecutionSocketMaterialized",
1785
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1786
+ "type": "object",
1787
+ "propertyNames": {
1788
+ "$ref": "#/$defs/ResourceRoleIdentity"
1789
+ },
1790
+ "additionalProperties": {
1791
+ "$ref": "#/$defs/Resource"
1792
+ },
1793
+ "unevaluatedProperties": false
1794
+ }
1795
+ },
1747
1796
  "StrategyState": {
1748
1797
  "identity": "TYPE-StrategyState",
1749
1798
  "name": "StrategyState",
@@ -1757,26 +1806,7 @@
1757
1806
  "$ref": "#/$defs/ExecutionIdentity"
1758
1807
  },
1759
1808
  "additionalProperties": {
1760
- "type": "object",
1761
- "propertyNames": {
1762
- "$ref": "#/$defs/ResourceRoleIdentity"
1763
- },
1764
- "additionalProperties": {
1765
- "oneOf": [
1766
- {
1767
- "$ref": "#/$defs/ResourceMissing"
1768
- },
1769
- {
1770
- "$ref": "#/$defs/ResourcePotentialInput"
1771
- },
1772
- {
1773
- "$ref": "#/$defs/ResourcePotentialOutput"
1774
- },
1775
- {
1776
- "$ref": "#/$defs/Resource"
1777
- }
1778
- ]
1779
- }
1809
+ "$ref": "#/$defs/ExecutionSocket"
1780
1810
  }
1781
1811
  }
1782
1812
  },
@@ -2009,27 +2039,14 @@
2009
2039
  "$ref": "#/$defs/StrategyRun"
2010
2040
  },
2011
2041
  "strategyStateUpdate": {
2012
- "$comment": "A StrategyState containing exactly one ExecutionIdentity key (an update for a single execution).",
2013
- "allOf": [
2014
- {
2015
- "$ref": "#/$defs/StrategyState"
2016
- },
2017
- {
2018
- "type": "object",
2019
- "minProperties": 1,
2020
- "maxProperties": 1
2021
- },
2022
- {
2023
- "$comment": "In this update bucket, only materialized Resources are allowed (no missing/potential placeholders).",
2024
- "type": "object",
2025
- "additionalProperties": {
2026
- "type": "object",
2027
- "additionalProperties": {
2028
- "$ref": "#/$defs/Resource"
2029
- }
2030
- }
2031
- }
2032
- ]
2042
+ "type": "object",
2043
+ "propertyNames": {
2044
+ "$ref": "#/$defs/ExecutionIdentity"
2045
+ },
2046
+ "additionalProperties": {
2047
+ "$ref": "#/$defs/ExecutionSocketMaterialized"
2048
+ },
2049
+ "unevaluatedProperties": false
2033
2050
  }
2034
2051
  },
2035
2052
  "unevaluatedProperties": false
@@ -2306,6 +2306,75 @@
2306
2306
  }
2307
2307
  }
2308
2308
  },
2309
+ "ExecutionSocket": {
2310
+ "identity": "RESOURCE-ExecutionSocket",
2311
+ "resourceTypeRef": "TYPE-ResourceType",
2312
+ "creationContext": {
2313
+ "resourceRoleRef": "ROLE-Genesis",
2314
+ "executionRef": "EXECUTION-ExecutionSocket"
2315
+ },
2316
+ "kind": "materialized",
2317
+ "timestamp": "2025-11-30T00:00:00.000Z",
2318
+ "extractedData": {
2319
+ "identity": "TYPE-ExecutionSocket",
2320
+ "name": "ExecutionSocket",
2321
+ "description": "dummy-description",
2322
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2323
+ "extractionSchema": {
2324
+ "$anchor": "ExecutionSocket",
2325
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2326
+ "type": "object",
2327
+ "propertyNames": {
2328
+ "$ref": "#/$defs/ResourceRoleIdentity"
2329
+ },
2330
+ "additionalProperties": {
2331
+ "oneOf": [
2332
+ {
2333
+ "$ref": "#/$defs/ResourceMissing"
2334
+ },
2335
+ {
2336
+ "$ref": "#/$defs/ResourcePotentialInput"
2337
+ },
2338
+ {
2339
+ "$ref": "#/$defs/ResourcePotentialOutput"
2340
+ },
2341
+ {
2342
+ "$ref": "#/$defs/Resource"
2343
+ }
2344
+ ]
2345
+ },
2346
+ "unevaluatedProperties": false
2347
+ }
2348
+ }
2349
+ },
2350
+ "ExecutionSocketMaterialized": {
2351
+ "identity": "RESOURCE-ExecutionSocketMaterialized",
2352
+ "resourceTypeRef": "TYPE-ResourceType",
2353
+ "creationContext": {
2354
+ "resourceRoleRef": "ROLE-Genesis",
2355
+ "executionRef": "EXECUTION-ExecutionSocketMaterialized"
2356
+ },
2357
+ "kind": "materialized",
2358
+ "timestamp": "2025-11-30T00:00:00.000Z",
2359
+ "extractedData": {
2360
+ "identity": "TYPE-ExecutionSocketMaterialized",
2361
+ "name": "ExecutionSocketMaterialized",
2362
+ "description": "dummy-description",
2363
+ "resourceFormatRef": "FORMAT-ApplicationJson",
2364
+ "extractionSchema": {
2365
+ "$anchor": "ExecutionSocketMaterialized",
2366
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2367
+ "type": "object",
2368
+ "propertyNames": {
2369
+ "$ref": "#/$defs/ResourceRoleIdentity"
2370
+ },
2371
+ "additionalProperties": {
2372
+ "$ref": "#/$defs/Resource"
2373
+ },
2374
+ "unevaluatedProperties": false
2375
+ }
2376
+ }
2377
+ },
2309
2378
  "StrategyState": {
2310
2379
  "identity": "RESOURCE-StrategyState",
2311
2380
  "resourceTypeRef": "TYPE-ResourceType",
@@ -2328,26 +2397,7 @@
2328
2397
  "$ref": "#/$defs/ExecutionIdentity"
2329
2398
  },
2330
2399
  "additionalProperties": {
2331
- "type": "object",
2332
- "propertyNames": {
2333
- "$ref": "#/$defs/ResourceRoleIdentity"
2334
- },
2335
- "additionalProperties": {
2336
- "oneOf": [
2337
- {
2338
- "$ref": "#/$defs/ResourceMissing"
2339
- },
2340
- {
2341
- "$ref": "#/$defs/ResourcePotentialInput"
2342
- },
2343
- {
2344
- "$ref": "#/$defs/ResourcePotentialOutput"
2345
- },
2346
- {
2347
- "$ref": "#/$defs/Resource"
2348
- }
2349
- ]
2350
- }
2400
+ "$ref": "#/$defs/ExecutionSocket"
2351
2401
  }
2352
2402
  }
2353
2403
  }
@@ -2690,27 +2740,14 @@
2690
2740
  "$ref": "#/$defs/StrategyRun"
2691
2741
  },
2692
2742
  "strategyStateUpdate": {
2693
- "$comment": "A StrategyState containing exactly one ExecutionIdentity key (an update for a single execution).",
2694
- "allOf": [
2695
- {
2696
- "$ref": "#/$defs/StrategyState"
2697
- },
2698
- {
2699
- "type": "object",
2700
- "minProperties": 1,
2701
- "maxProperties": 1
2702
- },
2703
- {
2704
- "$comment": "In this update bucket, only materialized Resources are allowed (no missing/potential placeholders).",
2705
- "type": "object",
2706
- "additionalProperties": {
2707
- "type": "object",
2708
- "additionalProperties": {
2709
- "$ref": "#/$defs/Resource"
2710
- }
2711
- }
2712
- }
2713
- ]
2743
+ "type": "object",
2744
+ "propertyNames": {
2745
+ "$ref": "#/$defs/ExecutionIdentity"
2746
+ },
2747
+ "additionalProperties": {
2748
+ "$ref": "#/$defs/ExecutionSocketMaterialized"
2749
+ },
2750
+ "unevaluatedProperties": false
2714
2751
  }
2715
2752
  },
2716
2753
  "unevaluatedProperties": false
@@ -163,6 +163,43 @@
163
163
  "$anchor": "ExecutionIdentity",
164
164
  "pattern": "^EXECUTION-.+$"
165
165
  },
166
+ "ExecutionSocket": {
167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
168
+ "type": "object",
169
+ "additionalProperties": {
170
+ "oneOf": [
171
+ {
172
+ "$ref": "#/$defs/ResourceMissing"
173
+ },
174
+ {
175
+ "$ref": "#/$defs/ResourcePotentialInput"
176
+ },
177
+ {
178
+ "$ref": "#/$defs/ResourcePotentialOutput"
179
+ },
180
+ {
181
+ "$ref": "#/$defs/Resource"
182
+ }
183
+ ]
184
+ },
185
+ "unevaluatedProperties": false,
186
+ "$anchor": "ExecutionSocket",
187
+ "propertyNames": {
188
+ "$ref": "#/$defs/ResourceRoleIdentity"
189
+ }
190
+ },
191
+ "ExecutionSocketMaterialized": {
192
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
193
+ "type": "object",
194
+ "additionalProperties": {
195
+ "$ref": "#/$defs/Resource"
196
+ },
197
+ "unevaluatedProperties": false,
198
+ "$anchor": "ExecutionSocketMaterialized",
199
+ "propertyNames": {
200
+ "$ref": "#/$defs/ResourceRoleIdentity"
201
+ }
202
+ },
166
203
  "ExtractionSchema": {
167
204
  "$schema": "https://json-schema.org/draft/2020-12/schema",
168
205
  "type": "object",
@@ -1433,27 +1470,14 @@
1433
1470
  "$ref": "#/$defs/StrategyRunIdentity"
1434
1471
  },
1435
1472
  "strategyStateUpdate": {
1436
- "allOf": [
1437
- {
1438
- "$ref": "#/$defs/StrategyState"
1439
- },
1440
- {
1441
- "type": "object",
1442
- "maxProperties": 1,
1443
- "minProperties": 1
1444
- },
1445
- {
1446
- "type": "object",
1447
- "additionalProperties": {
1448
- "type": "object",
1449
- "additionalProperties": {
1450
- "$ref": "#/$defs/Resource"
1451
- }
1452
- },
1453
- "$comment": "In this update bucket, only materialized Resources are allowed (no missing/potential placeholders)."
1454
- }
1455
- ],
1456
- "$comment": "A StrategyState containing exactly one ExecutionIdentity key (an update for a single execution)."
1473
+ "type": "object",
1474
+ "additionalProperties": {
1475
+ "$ref": "#/$defs/ExecutionSocketMaterialized"
1476
+ },
1477
+ "unevaluatedProperties": false,
1478
+ "propertyNames": {
1479
+ "$ref": "#/$defs/ExecutionIdentity"
1480
+ }
1457
1481
  }
1458
1482
  },
1459
1483
  "required": [
@@ -1467,26 +1491,7 @@
1467
1491
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1468
1492
  "type": "object",
1469
1493
  "additionalProperties": {
1470
- "type": "object",
1471
- "additionalProperties": {
1472
- "oneOf": [
1473
- {
1474
- "$ref": "#/$defs/ResourceMissing"
1475
- },
1476
- {
1477
- "$ref": "#/$defs/ResourcePotentialInput"
1478
- },
1479
- {
1480
- "$ref": "#/$defs/ResourcePotentialOutput"
1481
- },
1482
- {
1483
- "$ref": "#/$defs/Resource"
1484
- }
1485
- ]
1486
- },
1487
- "propertyNames": {
1488
- "$ref": "#/$defs/ResourceRoleIdentity"
1489
- }
1494
+ "$ref": "#/$defs/ExecutionSocket"
1490
1495
  },
1491
1496
  "$anchor": "StrategyState",
1492
1497
  "propertyNames": {