@toolproof-core/schema 1.0.9 → 1.0.11

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 (67) hide show
  1. package/dist/generated/artifacts/constants.d.ts +121 -0
  2. package/dist/generated/artifacts/constants.js +121 -0
  3. package/dist/generated/artifacts/mappings.d.ts +23 -0
  4. package/dist/generated/artifacts/mappings.js +23 -0
  5. package/dist/generated/normalized/Genesis.json +117 -78
  6. package/dist/generated/resources/Genesis.json +489 -264
  7. package/dist/generated/schemas/Genesis.json +94 -61
  8. package/dist/generated/schemas/standalone/Job.json +9 -8
  9. package/dist/generated/schemas/standalone/RawStrategy.json +86 -110
  10. package/dist/generated/schemas/standalone/ResourceType.json +4 -4
  11. package/dist/generated/schemas/standalone/RunnableStrategy.json +115 -139
  12. package/dist/generated/schemas/standalone/StrategyRun.json +93 -117
  13. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  15. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  16. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  17. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  18. package/dist/generated/types/types.d.ts +247 -239
  19. package/dist/index.d.ts +6 -3
  20. package/dist/index.js +5 -2
  21. package/dist/scripts/_lib/config.d.ts +3 -5
  22. package/dist/scripts/_lib/config.js +8 -14
  23. package/dist/scripts/generateConstantsAndMappings.d.ts +31 -0
  24. package/dist/scripts/generateConstantsAndMappings.js +243 -0
  25. package/dist/scripts/generateDependencies.js +1 -1
  26. package/dist/scripts/generateStandaloneType.js +2 -1
  27. package/dist/scripts/generateTerminals.js +2 -2
  28. package/dist/scripts/generateTypes.js +183 -5
  29. package/dist/scripts/wrapResourceTypesWithResourceShells.js +7 -3
  30. package/package.json +9 -10
  31. package/src/Genesis.json +1873 -1833
  32. package/src/generated/artifacts/constants.ts +122 -0
  33. package/src/generated/{dependencies → artifacts}/dependencyMap.json +282 -280
  34. package/src/generated/artifacts/mappings.ts +24 -0
  35. package/src/generated/{dependencies → artifacts}/terminals.json +13 -11
  36. package/src/generated/normalized/Genesis.json +1785 -1746
  37. package/src/generated/resources/Genesis.json +2833 -2608
  38. package/src/generated/schemas/Genesis.json +1348 -1315
  39. package/src/generated/schemas/standalone/Job.json +195 -194
  40. package/src/generated/schemas/standalone/RawStrategy.json +86 -110
  41. package/src/generated/schemas/standalone/ResourceType.json +106 -106
  42. package/src/generated/schemas/standalone/RunnableStrategy.json +645 -669
  43. package/src/generated/schemas/standalone/StrategyRun.json +913 -937
  44. package/src/generated/types/standalone/Resource_Genesis.d.ts +3 -3
  45. package/src/generated/types/standalone/Resource_Job.d.ts +3 -3
  46. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +3 -3
  47. package/src/generated/types/standalone/Resource_ResourceType.d.ts +3 -3
  48. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -3
  49. package/src/generated/types/types.d.ts +717 -709
  50. package/src/index.ts +77 -70
  51. package/src/scripts/_lib/config.ts +207 -215
  52. package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -261
  53. package/src/scripts/generateConstantsAndMappings.ts +309 -0
  54. package/src/scripts/generateDependencies.ts +121 -121
  55. package/src/scripts/generateSchemaShims.ts +127 -127
  56. package/src/scripts/generateStandaloneSchema.ts +185 -185
  57. package/src/scripts/generateStandaloneType.ts +129 -127
  58. package/src/scripts/generateTerminals.ts +73 -73
  59. package/src/scripts/generateTypes.ts +733 -531
  60. package/src/scripts/normalizeAnchorsToPointers.ts +141 -141
  61. package/src/scripts/wrapResourceTypesWithResourceShells.ts +86 -82
  62. package/dist/generated/constants/constants.d.ts +0 -60
  63. package/dist/generated/constants/constants.js +0 -60
  64. package/dist/scripts/generateConstants.d.ts +0 -12
  65. package/dist/scripts/generateConstants.js +0 -179
  66. package/src/generated/constants/constants.ts +0 -61
  67. package/src/scripts/generateConstants.ts +0 -217
@@ -1,194 +1,195 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "required": [
5
- "identity",
6
- "implementationUri"
7
- ],
8
- "properties": {
9
- "identity": {
10
- "$ref": "#/$defs/JobIdentity"
11
- },
12
- "implementationUri": {
13
- "$ref": "#/$defs/Uri"
14
- }
15
- },
16
- "allOf": [
17
- {
18
- "$ref": "#/$defs/DocumentationFacet"
19
- },
20
- {
21
- "$ref": "#/$defs/RolesFacet"
22
- }
23
- ],
24
- "unevaluatedProperties": false,
25
- "$defs": {
26
- "JobIdentity": {
27
- "$schema": "https://json-schema.org/draft/2020-12/schema",
28
- "type": "string",
29
- "pattern": "^JOB-.+$"
30
- },
31
- "Uri": {
32
- "$schema": "https://json-schema.org/draft/2020-12/schema",
33
- "type": "string",
34
- "format": "uri"
35
- },
36
- "DocumentationFacet": {
37
- "$schema": "https://json-schema.org/draft/2020-12/schema",
38
- "type": "object",
39
- "allOf": [
40
- {
41
- "$ref": "#/$defs/NameFacet"
42
- },
43
- {
44
- "$ref": "#/$defs/DescriptionFacet"
45
- }
46
- ]
47
- },
48
- "RolesFacet": {
49
- "$schema": "https://json-schema.org/draft/2020-12/schema",
50
- "type": "object",
51
- "required": [
52
- "roles"
53
- ],
54
- "properties": {
55
- "roles": {
56
- "$ref": "#/$defs/Roles"
57
- }
58
- }
59
- },
60
- "NameFacet": {
61
- "$schema": "https://json-schema.org/draft/2020-12/schema",
62
- "type": "object",
63
- "required": [
64
- "name"
65
- ],
66
- "properties": {
67
- "name": {
68
- "$ref": "#/$defs/Name"
69
- }
70
- }
71
- },
72
- "DescriptionFacet": {
73
- "$schema": "https://json-schema.org/draft/2020-12/schema",
74
- "type": "object",
75
- "required": [
76
- "description"
77
- ],
78
- "properties": {
79
- "description": {
80
- "$ref": "#/$defs/Description"
81
- }
82
- }
83
- },
84
- "Roles": {
85
- "$schema": "https://json-schema.org/draft/2020-12/schema",
86
- "type": "object",
87
- "required": [
88
- "inputMap",
89
- "outputMap"
90
- ],
91
- "properties": {
92
- "inputMap": {
93
- "$ref": "#/$defs/RoleMap"
94
- },
95
- "outputMap": {
96
- "allOf": [
97
- {
98
- "$ref": "#/$defs/RoleMap"
99
- },
100
- {
101
- "required": [
102
- "ROLE-ErrorOutput"
103
- ],
104
- "properties": {
105
- "ROLE-ErrorOutput": {
106
- "type": "object",
107
- "allOf": [
108
- {
109
- "$ref": "#/$defs/ResourceRoleValue"
110
- },
111
- {
112
- "required": [
113
- "resourceTypeHandle",
114
- "name",
115
- "description"
116
- ],
117
- "properties": {
118
- "resourceTypeHandle": {
119
- "const": "TYPE-Error"
120
- },
121
- "name": {
122
- "const": "ErrorOutput"
123
- },
124
- "description": {
125
- "const": "Represents error outputs from job runs."
126
- }
127
- }
128
- }
129
- ]
130
- }
131
- }
132
- }
133
- ]
134
- }
135
- },
136
- "unevaluatedProperties": false
137
- },
138
- "Name": {
139
- "$schema": "https://json-schema.org/draft/2020-12/schema",
140
- "type": "string",
141
- "minLength": 1,
142
- "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
143
- "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
144
- "semanticValidation": "Ajv custom keyword to verify name."
145
- },
146
- "Description": {
147
- "$schema": "https://json-schema.org/draft/2020-12/schema",
148
- "type": "string",
149
- "minLength": 1,
150
- "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
151
- "semanticValidation": "Ajv custom keyword to verify description."
152
- },
153
- "RoleMap": {
154
- "$schema": "https://json-schema.org/draft/2020-12/schema",
155
- "type": "object",
156
- "propertyNames": {
157
- "$ref": "#/$defs/ResourceRoleIdentity"
158
- },
159
- "additionalProperties": {
160
- "$ref": "#/$defs/ResourceRoleValue"
161
- }
162
- },
163
- "ResourceRoleValue": {
164
- "$schema": "https://json-schema.org/draft/2020-12/schema",
165
- "type": "object",
166
- "allOf": [
167
- {
168
- "$comment": "A ResourceRole does not have a self-contained identity, as it is always defined in the context of a RoleMap. ResourceRoleValue uses the Value suffix to mean 'the value stored in this map' (RoleMap.additionalProperties).",
169
- "required": [
170
- "resourceTypeHandle"
171
- ],
172
- "properties": {
173
- "resourceTypeHandle": {
174
- "$ref": "#/$defs/ResourceTypeIdentity"
175
- }
176
- }
177
- },
178
- {
179
- "$ref": "#/$defs/DocumentationFacet"
180
- }
181
- ]
182
- },
183
- "ResourceRoleIdentity": {
184
- "$schema": "https://json-schema.org/draft/2020-12/schema",
185
- "type": "string",
186
- "pattern": "^ROLE-.+$"
187
- },
188
- "ResourceTypeIdentity": {
189
- "$schema": "https://json-schema.org/draft/2020-12/schema",
190
- "type": "string",
191
- "pattern": "^TYPE-.+$"
192
- }
193
- }
194
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "required": [
5
+ "identity",
6
+ "implementationUri"
7
+ ],
8
+ "properties": {
9
+ "identity": {
10
+ "$ref": "#/$defs/JobIdentity"
11
+ },
12
+ "implementationUri": {
13
+ "$comment": "Instances of a ResourceType that requires implementationUri are 'executable' ResourceTypes. TYPE-Job is the canonical executable ResourceType in the ecosystem.",
14
+ "$ref": "#/$defs/Uri"
15
+ }
16
+ },
17
+ "allOf": [
18
+ {
19
+ "$ref": "#/$defs/DocumentationFacet"
20
+ },
21
+ {
22
+ "$ref": "#/$defs/RolesFacet"
23
+ }
24
+ ],
25
+ "unevaluatedProperties": false,
26
+ "$defs": {
27
+ "JobIdentity": {
28
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
29
+ "type": "string",
30
+ "pattern": "^JOB-.+$"
31
+ },
32
+ "Uri": {
33
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
34
+ "type": "string",
35
+ "format": "uri"
36
+ },
37
+ "DocumentationFacet": {
38
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
39
+ "type": "object",
40
+ "allOf": [
41
+ {
42
+ "$ref": "#/$defs/NameFacet"
43
+ },
44
+ {
45
+ "$ref": "#/$defs/DescriptionFacet"
46
+ }
47
+ ]
48
+ },
49
+ "RolesFacet": {
50
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
51
+ "type": "object",
52
+ "required": [
53
+ "roles"
54
+ ],
55
+ "properties": {
56
+ "roles": {
57
+ "$ref": "#/$defs/Roles"
58
+ }
59
+ }
60
+ },
61
+ "NameFacet": {
62
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
63
+ "type": "object",
64
+ "required": [
65
+ "name"
66
+ ],
67
+ "properties": {
68
+ "name": {
69
+ "$ref": "#/$defs/Name"
70
+ }
71
+ }
72
+ },
73
+ "DescriptionFacet": {
74
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
75
+ "type": "object",
76
+ "required": [
77
+ "description"
78
+ ],
79
+ "properties": {
80
+ "description": {
81
+ "$ref": "#/$defs/Description"
82
+ }
83
+ }
84
+ },
85
+ "Roles": {
86
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
87
+ "type": "object",
88
+ "required": [
89
+ "inputDict",
90
+ "outputDict"
91
+ ],
92
+ "properties": {
93
+ "inputDict": {
94
+ "$ref": "#/$defs/RoleDict"
95
+ },
96
+ "outputDict": {
97
+ "allOf": [
98
+ {
99
+ "$ref": "#/$defs/RoleDict"
100
+ },
101
+ {
102
+ "type": "object",
103
+ "required": [
104
+ "ROLE-ErrorOutput"
105
+ ],
106
+ "properties": {
107
+ "ROLE-ErrorOutput": {
108
+ "type": "object",
109
+ "allOf": [
110
+ {
111
+ "$ref": "#/$defs/ResourceRoleValue"
112
+ },
113
+ {
114
+ "required": [
115
+ "resourceTypeHandle",
116
+ "name",
117
+ "description"
118
+ ],
119
+ "properties": {
120
+ "resourceTypeHandle": {
121
+ "const": "TYPE-Error"
122
+ },
123
+ "name": {
124
+ "const": "ErrorOutput"
125
+ },
126
+ "description": {
127
+ "const": "Represents error outputs from job runs."
128
+ }
129
+ }
130
+ }
131
+ ]
132
+ }
133
+ }
134
+ }
135
+ ]
136
+ }
137
+ },
138
+ "unevaluatedProperties": false
139
+ },
140
+ "Name": {
141
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
142
+ "type": "string",
143
+ "minLength": 1,
144
+ "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
145
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
146
+ "semanticValidation": "Ajv custom keyword to verify name."
147
+ },
148
+ "Description": {
149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
153
+ "semanticValidation": "Ajv custom keyword to verify description."
154
+ },
155
+ "RoleDict": {
156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
157
+ "type": "object",
158
+ "propertyNames": {
159
+ "$ref": "#/$defs/ResourceRoleIdentity"
160
+ },
161
+ "additionalProperties": {
162
+ "$ref": "#/$defs/ResourceRoleValue"
163
+ }
164
+ },
165
+ "ResourceRoleValue": {
166
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
167
+ "type": "object",
168
+ "allOf": [
169
+ {
170
+ "required": [
171
+ "resourceTypeHandle"
172
+ ],
173
+ "properties": {
174
+ "resourceTypeHandle": {
175
+ "$ref": "#/$defs/ResourceTypeIdentity"
176
+ }
177
+ }
178
+ },
179
+ {
180
+ "$ref": "#/$defs/DocumentationFacet"
181
+ }
182
+ ]
183
+ },
184
+ "ResourceRoleIdentity": {
185
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
186
+ "type": "string",
187
+ "pattern": "^ROLE-.+$"
188
+ },
189
+ "ResourceTypeIdentity": {
190
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
191
+ "type": "string",
192
+ "pattern": "^TYPE-.+$"
193
+ }
194
+ }
195
+ }