@toolproof-npm/schema 0.1.82 → 0.1.84

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.
Files changed (27) hide show
  1. package/README.md +59 -59
  2. package/dist/genesis/generated/dependencies_ordered.json +17 -23
  3. package/dist/genesis/generated/resourceTypes/Genesis.json +42 -77
  4. package/dist/genesis/generated/resources/Genesis.json +52 -97
  5. package/dist/genesis/generated/schemas/Genesis.json +104 -133
  6. package/dist/genesis/generated/schemas/RunRecording.json +186 -215
  7. package/dist/genesis/generated/schemas/RunnableStrategy.d.ts +2 -0
  8. package/dist/genesis/generated/schemas/RunnableStrategy.js +2 -0
  9. package/dist/genesis/generated/schemas/{StrategyRun.json → RunnableStrategy.json} +21 -21
  10. package/dist/genesis/generated/terminals.json +1 -1
  11. package/dist/genesis/generated/types/ResourceTypeGenesis.d.ts +5 -6
  12. package/dist/genesis/generated/types/Resource_RunnableStrategy.d.ts +3 -0
  13. package/dist/genesis/generated/types/types.d.ts +284 -300
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +1 -1
  16. package/dist/scripts/generateTypes.js +1 -3
  17. package/package.json +62 -62
  18. package/dist/genesis/generated/resource-envelopes/Genesis.d.ts +0 -2
  19. package/dist/genesis/generated/resource-envelopes/Genesis.js +0 -2
  20. package/dist/genesis/generated/resource-envelopes/Genesis.json +0 -2337
  21. package/dist/genesis/generated/resource-type-envelopes/Genesis.d.ts +0 -2
  22. package/dist/genesis/generated/resource-type-envelopes/Genesis.js +0 -2
  23. package/dist/genesis/generated/resource-type-envelopes/Genesis.json +0 -1757
  24. package/dist/genesis/generated/schemas/StrategyRun.d.ts +0 -2
  25. package/dist/genesis/generated/schemas/StrategyRun.js +0 -2
  26. package/dist/genesis/generated/types/Resource_StrategyRun.d.ts +0 -3
  27. /package/dist/genesis/generated/types/{Resource_StrategyRun.js → Resource_RunnableStrategy.js} +0 -0
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,10 +65,6 @@
65
65
  "Error": [
66
66
  "Documented"
67
67
  ],
68
- "ExecutionSocketMaterialized": [
69
- "Resource",
70
- "ResourceRoleIdentity"
71
- ],
72
68
  "ForStepIdentity": [],
73
69
  "JobIdentity": [],
74
70
  "ResourceFormat": [
@@ -137,23 +133,21 @@
137
133
  "RunEventCounters": [],
138
134
  "RunEventKind": [],
139
135
  "RunEventStepKind": [],
136
+ "RunnableStrategyIdentity": [],
137
+ "RunnableStrategyStatus": [],
138
+ "RunnableStrategyContext": [
139
+ "Timestamp",
140
+ "RunnableStrategyStatus"
141
+ ],
140
142
  "StatefulStrategyIdentity": [],
141
143
  "StatelessStrategyIdentity": [],
142
144
  "StepKind": [],
143
- "StrategyRunIdentity": [],
144
- "StrategyRunStatus": [],
145
- "StrategyRunContext": [
146
- "Timestamp",
147
- "StrategyRunStatus"
148
- ],
149
145
  "StrategyState": [
150
146
  "ExecutionSocket",
151
147
  "ExecutionIdentity"
152
148
  ],
153
149
  "StrategyStateDelta": [
154
- "ExecutionSocketMaterialized",
155
- "ExecutionIdentity",
156
- "ExecutionSocket"
150
+ "StrategyState"
157
151
  ],
158
152
  "StrategyStateWrapper": [
159
153
  "StrategyState"
@@ -207,8 +201,8 @@
207
201
  "RunEventCounters",
208
202
  "Timestamp",
209
203
  "RunEventKind",
204
+ "RunnableStrategyIdentity",
210
205
  "RunEventStepMetaData",
211
- "StrategyRunIdentity",
212
206
  "StrategyThreadIdentity",
213
207
  "RunEventUpdates"
214
208
  ],
@@ -237,21 +231,21 @@
237
231
  "StrategyThreadMapWrapper": [
238
232
  "StrategyThreadMap"
239
233
  ],
240
- "StrategyRun": [
234
+ "RunnableStrategy": [
241
235
  "StrategyThreadMapWrapper",
242
236
  "StrategyStateWrapper",
243
- "StrategyRunIdentity",
244
- "StatefulStrategyIdentity",
245
- "StrategyRunContext"
237
+ "RunnableStrategyIdentity",
238
+ "RunnableStrategyContext",
239
+ "StatefulStrategyIdentity"
246
240
  ],
247
241
  "GraphStartRunEvent": [
248
242
  "RunEventBase",
249
- "StrategyRun"
243
+ "RunnableStrategy"
250
244
  ],
251
- "StrategyRunUpdate": [
245
+ "RunnableStrategyUpdate": [
252
246
  "StrategyStateDelta",
253
- "StrategyRun",
254
- "StrategyRunIdentity"
247
+ "RunnableStrategy",
248
+ "RunnableStrategyIdentity"
255
249
  ],
256
250
  "TickRunEvent": [
257
251
  "RunEventBase"
@@ -265,7 +259,7 @@
265
259
  "RunRecording": [
266
260
  "Timestamp",
267
261
  "RunEvent",
268
- "StrategyRunIdentity",
262
+ "RunnableStrategyIdentity",
269
263
  "StrategyThreadIdentity"
270
264
  ]
271
265
  }
@@ -1774,24 +1774,6 @@
1774
1774
  "unevaluatedProperties": false
1775
1775
  }
1776
1776
  },
1777
- "ExecutionSocketMaterialized": {
1778
- "identity": "TYPE-ExecutionSocketMaterialized",
1779
- "name": "ExecutionSocketMaterialized",
1780
- "description": "dummy-description",
1781
- "resourceFormatRef": "FORMAT-ApplicationJson",
1782
- "extractionSchema": {
1783
- "$anchor": "ExecutionSocketMaterialized",
1784
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1785
- "type": "object",
1786
- "propertyNames": {
1787
- "$ref": "#/$defs/ResourceRoleIdentity"
1788
- },
1789
- "additionalProperties": {
1790
- "$ref": "#/$defs/Resource"
1791
- },
1792
- "unevaluatedProperties": false
1793
- }
1794
- },
1795
1777
  "StrategyState": {
1796
1778
  "identity": "TYPE-StrategyState",
1797
1779
  "name": "StrategyState",
@@ -1868,25 +1850,25 @@
1868
1850
  "unevaluatedProperties": false
1869
1851
  }
1870
1852
  },
1871
- "StrategyRunIdentity": {
1872
- "identity": "TYPE-StrategyRunIdentity",
1873
- "name": "StrategyRunIdentity",
1853
+ "RunnableStrategyIdentity": {
1854
+ "identity": "TYPE-RunnableStrategyIdentity",
1855
+ "name": "RunnableStrategyIdentity",
1874
1856
  "description": "dummy-description",
1875
1857
  "resourceFormatRef": "FORMAT-ApplicationJson",
1876
1858
  "extractionSchema": {
1877
- "$anchor": "StrategyRunIdentity",
1859
+ "$anchor": "RunnableStrategyIdentity",
1878
1860
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1879
1861
  "type": "string",
1880
- "pattern": "^STRATEGY_RUN-.+$"
1862
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
1881
1863
  }
1882
1864
  },
1883
- "StrategyRunStatus": {
1884
- "identity": "TYPE-StrategyRunStatus",
1885
- "name": "StrategyRunStatus",
1865
+ "RunnableStrategyStatus": {
1866
+ "identity": "TYPE-RunnableStrategyStatus",
1867
+ "name": "RunnableStrategyStatus",
1886
1868
  "description": "dummy-description",
1887
1869
  "resourceFormatRef": "FORMAT-ApplicationJson",
1888
1870
  "extractionSchema": {
1889
- "$anchor": "StrategyRunStatus",
1871
+ "$anchor": "RunnableStrategyStatus",
1890
1872
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1891
1873
  "type": "string",
1892
1874
  "enum": [
@@ -1898,13 +1880,13 @@
1898
1880
  ]
1899
1881
  }
1900
1882
  },
1901
- "StrategyRunContext": {
1902
- "identity": "TYPE-StrategyRunContext",
1903
- "name": "StrategyRunContext",
1883
+ "RunnableStrategyContext": {
1884
+ "identity": "TYPE-RunnableStrategyContext",
1885
+ "name": "RunnableStrategyContext",
1904
1886
  "description": "dummy-description",
1905
1887
  "resourceFormatRef": "FORMAT-ApplicationJson",
1906
1888
  "extractionSchema": {
1907
- "$anchor": "StrategyRunContext",
1889
+ "$anchor": "RunnableStrategyContext",
1908
1890
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1909
1891
  "type": "object",
1910
1892
  "required": [
@@ -1912,7 +1894,7 @@
1912
1894
  ],
1913
1895
  "properties": {
1914
1896
  "status": {
1915
- "$ref": "#/$defs/StrategyRunStatus"
1897
+ "$ref": "#/$defs/RunnableStrategyStatus"
1916
1898
  },
1917
1899
  "startedAt": {
1918
1900
  "$ref": "#/$defs/Timestamp"
@@ -1976,29 +1958,29 @@
1976
1958
  }
1977
1959
  }
1978
1960
  },
1979
- "StrategyRun": {
1980
- "identity": "TYPE-StrategyRun",
1981
- "name": "StrategyRun",
1961
+ "RunnableStrategy": {
1962
+ "identity": "TYPE-RunnableStrategy",
1963
+ "name": "RunnableStrategy",
1982
1964
  "description": "dummy-description",
1983
1965
  "resourceFormatRef": "FORMAT-ApplicationJson",
1984
1966
  "extractionSchema": {
1985
- "$anchor": "StrategyRun",
1967
+ "$anchor": "RunnableStrategy",
1986
1968
  "$schema": "https://json-schema.org/draft/2020-12/schema",
1987
1969
  "type": "object",
1988
1970
  "required": [
1989
1971
  "identity",
1990
1972
  "statefulStrategyRef",
1991
- "strategyRunContext"
1973
+ "runnableStrategyContext"
1992
1974
  ],
1993
1975
  "properties": {
1994
1976
  "identity": {
1995
- "$ref": "#/$defs/StrategyRunIdentity"
1977
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1996
1978
  },
1997
1979
  "statefulStrategyRef": {
1998
1980
  "$ref": "#/$defs/StatefulStrategyIdentity"
1999
1981
  },
2000
- "strategyRunContext": {
2001
- "$ref": "#/$defs/StrategyRunContext"
1982
+ "runnableStrategyContext": {
1983
+ "$ref": "#/$defs/RunnableStrategyContext"
2002
1984
  }
2003
1985
  },
2004
1986
  "allOf": [
@@ -2007,7 +1989,7 @@
2007
1989
  "$ref": "#/$defs/StrategyThreadMapWrapper"
2008
1990
  },
2009
1991
  {
2010
- "$comment": "Reusing StrategyStateWrapper to include the strategy state in the StrategyRun. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
1992
+ "$comment": "Reusing StrategyStateWrapper to include the strategy state in the RunnableStrategy. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
2011
1993
  "$ref": "#/$defs/StrategyStateWrapper"
2012
1994
  }
2013
1995
  ],
@@ -2026,48 +2008,31 @@
2026
2008
  "$comment": "Shared delta payload for strategy state updates; used both as standalone updates and embedded within run events.",
2027
2009
  "properties": {
2028
2010
  "strategyStateUpdate": {
2029
- "type": "object",
2030
- "propertyNames": {
2031
- "$ref": "#/$defs/ExecutionIdentity"
2032
- },
2033
- "additionalProperties": {
2034
- "$ref": "#/$defs/ExecutionSocketMaterialized"
2035
- },
2036
- "unevaluatedProperties": false
2037
- },
2038
- "strategyStateUpdateWide": {
2039
- "type": "object",
2040
- "propertyNames": {
2041
- "$ref": "#/$defs/ExecutionIdentity"
2042
- },
2043
- "additionalProperties": {
2044
- "$ref": "#/$defs/ExecutionSocket"
2045
- },
2046
- "unevaluatedProperties": false
2011
+ "$ref": "#/$defs/StrategyState"
2047
2012
  }
2048
2013
  }
2049
2014
  }
2050
2015
  },
2051
- "StrategyRunUpdate": {
2052
- "identity": "TYPE-StrategyRunUpdate",
2053
- "name": "StrategyRunUpdate",
2016
+ "RunnableStrategyUpdate": {
2017
+ "identity": "TYPE-RunnableStrategyUpdate",
2018
+ "name": "RunnableStrategyUpdate",
2054
2019
  "description": "dummy-description",
2055
2020
  "resourceFormatRef": "FORMAT-ApplicationJson",
2056
2021
  "extractionSchema": {
2057
- "$anchor": "StrategyRunUpdate",
2022
+ "$anchor": "RunnableStrategyUpdate",
2058
2023
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2059
2024
  "type": "object",
2060
2025
  "required": [
2061
- "strategyRunRef",
2026
+ "runnableStrategyRef",
2062
2027
  "strategyStateUpdate"
2063
2028
  ],
2064
2029
  "properties": {
2065
- "strategyRunRef": {
2066
- "$ref": "#/$defs/StrategyRunIdentity"
2030
+ "runnableStrategyRef": {
2031
+ "$ref": "#/$defs/RunnableStrategyIdentity"
2067
2032
  },
2068
- "strategyRun": {
2069
- "$comment": "Optional embedded snapshot; strategyRunRef remains the canonical pointer.",
2070
- "$ref": "#/$defs/StrategyRun"
2033
+ "runnableStrategy": {
2034
+ "$comment": "Optional embedded snapshot; runnableStrategyRef remains the canonical pointer.",
2035
+ "$ref": "#/$defs/RunnableStrategy"
2071
2036
  }
2072
2037
  },
2073
2038
  "allOf": [
@@ -2231,7 +2196,7 @@
2231
2196
  "type": "object",
2232
2197
  "required": [
2233
2198
  "kind",
2234
- "strategyRunRef",
2199
+ "runnableStrategyRef",
2235
2200
  "strategyThreadRef",
2236
2201
  "createdAt",
2237
2202
  "nodeName",
@@ -2241,8 +2206,8 @@
2241
2206
  "kind": {
2242
2207
  "$ref": "#/$defs/RunEventKind"
2243
2208
  },
2244
- "strategyRunRef": {
2245
- "$ref": "#/$defs/StrategyRunIdentity"
2209
+ "runnableStrategyRef": {
2210
+ "$ref": "#/$defs/RunnableStrategyIdentity"
2246
2211
  },
2247
2212
  "strategyThreadRef": {
2248
2213
  "$ref": "#/$defs/StrategyThreadIdentity"
@@ -2283,14 +2248,14 @@
2283
2248
  {
2284
2249
  "type": "object",
2285
2250
  "required": [
2286
- "strategyRunSeed"
2251
+ "runnableStrategySeed"
2287
2252
  ],
2288
2253
  "properties": {
2289
2254
  "kind": {
2290
2255
  "const": "graph_start"
2291
2256
  },
2292
- "strategyRunSeed": {
2293
- "$ref": "#/$defs/StrategyRun"
2257
+ "runnableStrategySeed": {
2258
+ "$ref": "#/$defs/RunnableStrategy"
2294
2259
  }
2295
2260
  }
2296
2261
  }
@@ -2403,9 +2368,9 @@
2403
2368
  "runEvents"
2404
2369
  ],
2405
2370
  "properties": {
2406
- "strategyRunRef": {
2371
+ "runnableStrategyRef": {
2407
2372
  "$comment": "Optional; derived from the first event but useful for indexing.",
2408
- "$ref": "#/$defs/StrategyRunIdentity"
2373
+ "$ref": "#/$defs/RunnableStrategyIdentity"
2409
2374
  },
2410
2375
  "strategyThreadRef": {
2411
2376
  "$comment": "Optional; derived from the first event but useful for indexing.",