@toolproof-core/schema 1.0.10 → 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 (40) hide show
  1. package/dist/generated/artifacts/constants.d.ts +4 -3
  2. package/dist/generated/artifacts/constants.js +4 -3
  3. package/dist/generated/normalized/Genesis.json +50 -25
  4. package/dist/generated/resources/Genesis.json +68 -31
  5. package/dist/generated/schemas/Genesis.json +38 -19
  6. package/dist/generated/schemas/standalone/Job.json +7 -8
  7. package/dist/generated/schemas/standalone/ResourceType.json +4 -4
  8. package/dist/generated/schemas/standalone/RunnableStrategy.json +7 -7
  9. package/dist/generated/schemas/standalone/StrategyRun.json +7 -7
  10. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  11. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  12. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  13. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  15. package/dist/generated/types/types.d.ts +229 -221
  16. package/dist/index.d.ts +1 -1
  17. package/dist/scripts/generateStandaloneType.js +2 -1
  18. package/dist/scripts/generateTypes.js +136 -3
  19. package/package.json +1 -1
  20. package/src/Genesis.json +54 -28
  21. package/src/generated/artifacts/constants.ts +122 -121
  22. package/src/generated/artifacts/dependencyMap.json +282 -278
  23. package/src/generated/artifacts/terminals.json +13 -12
  24. package/src/generated/normalized/Genesis.json +50 -25
  25. package/src/generated/resources/Genesis.json +68 -31
  26. package/src/generated/schemas/Genesis.json +38 -19
  27. package/src/generated/schemas/standalone/Job.json +195 -196
  28. package/src/generated/schemas/standalone/RawStrategy.json +580 -580
  29. package/src/generated/schemas/standalone/ResourceType.json +106 -106
  30. package/src/generated/schemas/standalone/RunnableStrategy.json +7 -7
  31. package/src/generated/schemas/standalone/StrategyRun.json +7 -7
  32. package/src/generated/types/standalone/Resource_Genesis.d.ts +3 -3
  33. package/src/generated/types/standalone/Resource_Job.d.ts +3 -3
  34. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +3 -3
  35. package/src/generated/types/standalone/Resource_ResourceType.d.ts +3 -3
  36. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -3
  37. package/src/generated/types/types.d.ts +229 -221
  38. package/src/index.ts +47 -45
  39. package/src/scripts/generateStandaloneType.ts +3 -1
  40. package/src/scripts/generateTypes.ts +151 -5
@@ -1,106 +1,106 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "required": [
5
- "identity",
6
- "nucleusSchema"
7
- ],
8
- "properties": {
9
- "identity": {
10
- "$ref": "#/$defs/ResourceTypeIdentity"
11
- },
12
- "nucleusSchema": true,
13
- "embeddingUriMap": {
14
- "type": "object",
15
- "propertyNames": {
16
- "type": "string",
17
- "pattern": "^EMBEDDING-.+$"
18
- },
19
- "additionalProperties": {
20
- "$ref": "#/$defs/Uri"
21
- },
22
- "minProperties": 1,
23
- "$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this map are members of a set of predefined embedding models."
24
- },
25
- "generatorUriMap": {
26
- "type": "object",
27
- "propertyNames": {
28
- "type": "string",
29
- "pattern": "^GENERATOR-.+$"
30
- },
31
- "additionalProperties": {
32
- "$ref": "#/$defs/Uri"
33
- },
34
- "minProperties": 1,
35
- "$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this map are members of a set of predefined generators. GENERATOR-Json is an identifier for a generator that generates JSON data from the raw file. If the raw file is a JSON file, GENERATOR-Json is an implicit identity operation (i.e. an operation that does nothing) and must not be present in the map. A ResourceType may also specify other generators, such as GENERATOR-LeanTerm, which generates an instance (or 'term' in Lean jargon) of a corresponding Lean type from the raw file. ResourceTypes that specify GENERATOR-LeanTerm must also specify a corresponding GENERATOR-LeanType. While the term-version runs when data instances enter the ecosystem, the type-version runs when the ResourceType itself enters the ecosystem."
36
- }
37
- },
38
- "allOf": [
39
- {
40
- "$ref": "#/$defs/DocumentationFacet"
41
- }
42
- ],
43
- "$defs": {
44
- "ResourceTypeIdentity": {
45
- "$schema": "https://json-schema.org/draft/2020-12/schema",
46
- "type": "string",
47
- "pattern": "^TYPE-.+$"
48
- },
49
- "Uri": {
50
- "$schema": "https://json-schema.org/draft/2020-12/schema",
51
- "type": "string",
52
- "format": "uri"
53
- },
54
- "DocumentationFacet": {
55
- "$schema": "https://json-schema.org/draft/2020-12/schema",
56
- "type": "object",
57
- "allOf": [
58
- {
59
- "$ref": "#/$defs/NameFacet"
60
- },
61
- {
62
- "$ref": "#/$defs/DescriptionFacet"
63
- }
64
- ]
65
- },
66
- "NameFacet": {
67
- "$schema": "https://json-schema.org/draft/2020-12/schema",
68
- "type": "object",
69
- "required": [
70
- "name"
71
- ],
72
- "properties": {
73
- "name": {
74
- "$ref": "#/$defs/Name"
75
- }
76
- }
77
- },
78
- "DescriptionFacet": {
79
- "$schema": "https://json-schema.org/draft/2020-12/schema",
80
- "type": "object",
81
- "required": [
82
- "description"
83
- ],
84
- "properties": {
85
- "description": {
86
- "$ref": "#/$defs/Description"
87
- }
88
- }
89
- },
90
- "Name": {
91
- "$schema": "https://json-schema.org/draft/2020-12/schema",
92
- "type": "string",
93
- "minLength": 1,
94
- "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
95
- "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
96
- "semanticValidation": "Ajv custom keyword to verify name."
97
- },
98
- "Description": {
99
- "$schema": "https://json-schema.org/draft/2020-12/schema",
100
- "type": "string",
101
- "minLength": 1,
102
- "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
103
- "semanticValidation": "Ajv custom keyword to verify description."
104
- }
105
- }
106
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "required": [
5
+ "identity",
6
+ "nucleusSchema"
7
+ ],
8
+ "properties": {
9
+ "identity": {
10
+ "$ref": "#/$defs/ResourceTypeIdentity"
11
+ },
12
+ "nucleusSchema": true,
13
+ "embeddingUriDict": {
14
+ "type": "object",
15
+ "propertyNames": {
16
+ "type": "string",
17
+ "pattern": "^EMBEDDING-.+$"
18
+ },
19
+ "additionalProperties": {
20
+ "$ref": "#/$defs/Uri"
21
+ },
22
+ "minProperties": 1,
23
+ "$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this dict are members of a set of predefined embedding models."
24
+ },
25
+ "generatorUriDict": {
26
+ "type": "object",
27
+ "propertyNames": {
28
+ "type": "string",
29
+ "pattern": "^GENERATOR-.+$"
30
+ },
31
+ "additionalProperties": {
32
+ "$ref": "#/$defs/Uri"
33
+ },
34
+ "minProperties": 1,
35
+ "$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this dict are members of a set of predefined generators. GENERATOR-Json is an identifier for a generator that generates JSON data from the raw file. If the raw file is a JSON file, GENERATOR-Json is an implicit identity operation (i.e. an operation that does nothing) and must not be present in the dict. A ResourceType may also specify other generators, such as GENERATOR-LeanTerm, which generates an instance (or 'term' in Lean jargon) of a corresponding Lean type from the raw file. ResourceTypes that specify GENERATOR-LeanTerm must also specify a corresponding GENERATOR-LeanType. While the term-version runs when data instances enter the ecosystem, the type-version runs when the ResourceType itself enters the ecosystem."
36
+ }
37
+ },
38
+ "allOf": [
39
+ {
40
+ "$ref": "#/$defs/DocumentationFacet"
41
+ }
42
+ ],
43
+ "$defs": {
44
+ "ResourceTypeIdentity": {
45
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
46
+ "type": "string",
47
+ "pattern": "^TYPE-.+$"
48
+ },
49
+ "Uri": {
50
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
51
+ "type": "string",
52
+ "format": "uri"
53
+ },
54
+ "DocumentationFacet": {
55
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
56
+ "type": "object",
57
+ "allOf": [
58
+ {
59
+ "$ref": "#/$defs/NameFacet"
60
+ },
61
+ {
62
+ "$ref": "#/$defs/DescriptionFacet"
63
+ }
64
+ ]
65
+ },
66
+ "NameFacet": {
67
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
68
+ "type": "object",
69
+ "required": [
70
+ "name"
71
+ ],
72
+ "properties": {
73
+ "name": {
74
+ "$ref": "#/$defs/Name"
75
+ }
76
+ }
77
+ },
78
+ "DescriptionFacet": {
79
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
80
+ "type": "object",
81
+ "required": [
82
+ "description"
83
+ ],
84
+ "properties": {
85
+ "description": {
86
+ "$ref": "#/$defs/Description"
87
+ }
88
+ }
89
+ },
90
+ "Name": {
91
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
95
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
96
+ "semanticValidation": "Ajv custom keyword to verify name."
97
+ },
98
+ "Description": {
99
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
103
+ "semanticValidation": "Ajv custom keyword to verify description."
104
+ }
105
+ }
106
+ }
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "allOf": [
17
17
  {
18
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
19
- "$ref": "#/$defs/StrategyThreadMapFacet"
18
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
19
+ "$ref": "#/$defs/StrategyThreadDictFacet"
20
20
  },
21
21
  {
22
22
  "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts inputPotential and outputPotential Resources upon step injections.",
@@ -49,15 +49,15 @@
49
49
  },
50
50
  "unevaluatedProperties": false
51
51
  },
52
- "StrategyThreadMapFacet": {
52
+ "StrategyThreadDictFacet": {
53
53
  "$schema": "https://json-schema.org/draft/2020-12/schema",
54
54
  "type": "object",
55
55
  "required": [
56
- "strategyThreadMap"
56
+ "strategyThreadDict"
57
57
  ],
58
58
  "properties": {
59
- "strategyThreadMap": {
60
- "$ref": "#/$defs/StrategyThreadMap"
59
+ "strategyThreadDict": {
60
+ "$ref": "#/$defs/StrategyThreadDict"
61
61
  }
62
62
  }
63
63
  },
@@ -89,7 +89,7 @@
89
89
  "type": "string",
90
90
  "format": "date-time"
91
91
  },
92
- "StrategyThreadMap": {
92
+ "StrategyThreadDict": {
93
93
  "$schema": "https://json-schema.org/draft/2020-12/schema",
94
94
  "type": "object",
95
95
  "propertyNames": {
@@ -188,8 +188,8 @@
188
188
  },
189
189
  "allOf": [
190
190
  {
191
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
192
- "$ref": "#/$defs/StrategyThreadMapFacet"
191
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
192
+ "$ref": "#/$defs/StrategyThreadDictFacet"
193
193
  },
194
194
  {
195
195
  "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts inputPotential and outputPotential Resources upon step injections.",
@@ -297,15 +297,15 @@
297
297
  },
298
298
  "unevaluatedProperties": false
299
299
  },
300
- "StrategyThreadMapFacet": {
300
+ "StrategyThreadDictFacet": {
301
301
  "$schema": "https://json-schema.org/draft/2020-12/schema",
302
302
  "type": "object",
303
303
  "required": [
304
- "strategyThreadMap"
304
+ "strategyThreadDict"
305
305
  ],
306
306
  "properties": {
307
- "strategyThreadMap": {
308
- "$ref": "#/$defs/StrategyThreadMap"
307
+ "strategyThreadDict": {
308
+ "$ref": "#/$defs/StrategyThreadDict"
309
309
  }
310
310
  }
311
311
  },
@@ -380,7 +380,7 @@
380
380
  "cancelled"
381
381
  ]
382
382
  },
383
- "StrategyThreadMap": {
383
+ "StrategyThreadDict": {
384
384
  "$schema": "https://json-schema.org/draft/2020-12/schema",
385
385
  "type": "object",
386
386
  "propertyNames": {
@@ -1,3 +1,3 @@
1
- // Auto-generated strict composite type. Do not edit.
2
- import type { ShellMaterializedBase, Genesis as NucleusSchema } from "../types.js";
3
- export type Resource_Genesis = ShellMaterializedBase & { nucleus: NucleusSchema };
1
+ // Auto-generated strict composite type. Do not edit.
2
+ import type { ShellMaterializedBaseJson as ShellMaterializedBase, GenesisJson as NucleusSchema } from "../types.js";
3
+ export type Resource_Genesis = ShellMaterializedBase & { nucleus: NucleusSchema };
@@ -1,3 +1,3 @@
1
- // Auto-generated strict composite type. Do not edit.
2
- import type { ShellMaterializedBase, Job as NucleusSchema } from "../types.js";
3
- export type Resource_Job = ShellMaterializedBase & { nucleus: NucleusSchema };
1
+ // Auto-generated strict composite type. Do not edit.
2
+ import type { ShellMaterializedBaseJson as ShellMaterializedBase, JobJson as NucleusSchema } from "../types.js";
3
+ export type Resource_Job = ShellMaterializedBase & { nucleus: NucleusSchema };
@@ -1,3 +1,3 @@
1
- // Auto-generated strict composite type. Do not edit.
2
- import type { ShellMaterializedBase, RawStrategy as NucleusSchema } from "../types.js";
3
- export type Resource_RawStrategy = ShellMaterializedBase & { nucleus: NucleusSchema };
1
+ // Auto-generated strict composite type. Do not edit.
2
+ import type { ShellMaterializedBaseJson as ShellMaterializedBase, RawStrategyJson as NucleusSchema } from "../types.js";
3
+ export type Resource_RawStrategy = ShellMaterializedBase & { nucleus: NucleusSchema };
@@ -1,3 +1,3 @@
1
- // Auto-generated strict composite type. Do not edit.
2
- import type { ShellMaterializedBase, ResourceType as NucleusSchema } from "../types.js";
3
- export type Resource_ResourceType = ShellMaterializedBase & { nucleus: NucleusSchema };
1
+ // Auto-generated strict composite type. Do not edit.
2
+ import type { ShellMaterializedBaseJson as ShellMaterializedBase, ResourceTypeJson as NucleusSchema } from "../types.js";
3
+ export type Resource_ResourceType = ShellMaterializedBase & { nucleus: NucleusSchema };
@@ -1,3 +1,3 @@
1
- // Auto-generated strict composite type. Do not edit.
2
- import type { ShellMaterializedBase, RunnableStrategy as NucleusSchema } from "../types.js";
3
- export type Resource_RunnableStrategy = ShellMaterializedBase & { nucleus: NucleusSchema };
1
+ // Auto-generated strict composite type. Do not edit.
2
+ import type { ShellMaterializedBaseJson as ShellMaterializedBase, RunnableStrategyJson as NucleusSchema } from "../types.js";
3
+ export type Resource_RunnableStrategy = ShellMaterializedBase & { nucleus: NucleusSchema };