@toolproof-npm/schema 0.1.36 → 0.1.37

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.
@@ -228,12 +228,6 @@ export type ResourcePotentialOutput =
228
228
  ResourceKind & {
229
229
  kind: "potential-output";
230
230
  };
231
- /**
232
- * This interface was referenced by `GenesisJson`'s JSON-Schema
233
- * via the `definition` "ResourceRawMeta".
234
- */
235
- export type ResourceRawMeta =
236
- ResourceBase & CanonicalRef & Timestamp;
237
231
  /**
238
232
  * This interface was referenced by `GenesisJson`'s JSON-Schema
239
233
  * via the `definition` "ResourceType".
@@ -331,13 +325,6 @@ export interface RoleBindingsInner {
331
325
  * via the `definition` "RoleBindingMap".
332
326
  */
333
327
  export type RoleBindingMap = Record<ResourceRoleId, ResourceId>;
334
- /**
335
- * This interface was referenced by `GenesisJson`'s JSON-Schema
336
- * via the `definition` "CanonicalRef".
337
- */
338
- export interface CanonicalRef {
339
- canonicalRef: string;
340
- }
341
328
  /**
342
329
  * This interface was referenced by `GenesisJson`'s JSON-Schema
343
330
  * via the `definition` "CreationContext".
@@ -382,8 +369,7 @@ export interface ExtractionSchema {
382
369
  * via the `patternProperty` "^[A-Za-z][A-Za-z0-9._-]*Id$".
383
370
  */
384
371
  export interface IdSchemaValue {
385
- type: "string";
386
- pattern: string;
372
+ type: "string" | "number" | "integer" | "boolean";
387
373
  }
388
374
  /**
389
375
  * This interface was referenced by `GenesisJson`'s JSON-Schema
@@ -128,8 +128,8 @@
128
128
  "properties": {
129
129
  "$ref": {
130
130
  "type": "string",
131
- "$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
132
- "pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
131
+ "$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
132
+ "pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
133
133
  }
134
134
  },
135
135
  "additionalProperties": false
@@ -155,16 +155,16 @@
155
155
  "$schema": "https://json-schema.org/draft/2020-12/schema",
156
156
  "type": "object",
157
157
  "required": [
158
- "type",
159
- "pattern"
158
+ "type"
160
159
  ],
161
160
  "properties": {
162
161
  "type": {
163
- "const": "string"
164
- },
165
- "pattern": {
166
- "type": "string",
167
- "pattern": "^[A-Z][A-Z0-9._-]*-.+$"
162
+ "enum": [
163
+ "string",
164
+ "number",
165
+ "integer",
166
+ "boolean"
167
+ ]
168
168
  }
169
169
  }
170
170
  }
@@ -1199,36 +1199,6 @@
1199
1199
  }
1200
1200
  }
1201
1201
  },
1202
- "CanonicalRef": {
1203
- "identity": "RESOURCE-CanonicalRef",
1204
- "resourceTypeId": "TYPE-ResourceType",
1205
- "creationContext": {
1206
- "resourceRoleId": "ROLE-Genesis",
1207
- "executionId": "EXECUTION-CanonicalRef"
1208
- },
1209
- "kind": "materialized",
1210
- "timestamp": "2025-11-30T00:00:00.000Z",
1211
- "extractedData": {
1212
- "identity": "TYPE-CanonicalRef",
1213
- "name": "CanonicalRef",
1214
- "description": "dummy-description",
1215
- "resourceFormatId": "FORMAT-ApplicationJson",
1216
- "extractionSchema": {
1217
- "$anchor": "CanonicalRef",
1218
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1219
- "type": "object",
1220
- "required": [
1221
- "canonicalRef"
1222
- ],
1223
- "properties": {
1224
- "canonicalRef": {
1225
- "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
1226
- "$ref": "#/$defs/ResourceId"
1227
- }
1228
- }
1229
- }
1230
- }
1231
- },
1232
1202
  "Timestamp": {
1233
1203
  "identity": "RESOURCE-Timestamp",
1234
1204
  "resourceTypeId": "TYPE-ResourceType",
@@ -1259,39 +1229,6 @@
1259
1229
  }
1260
1230
  }
1261
1231
  },
1262
- "ResourceRawMeta": {
1263
- "identity": "RESOURCE-ResourceRawMeta",
1264
- "resourceTypeId": "TYPE-ResourceType",
1265
- "creationContext": {
1266
- "resourceRoleId": "ROLE-Genesis",
1267
- "executionId": "EXECUTION-ResourceRawMeta"
1268
- },
1269
- "kind": "materialized",
1270
- "timestamp": "2025-11-30T00:00:00.000Z",
1271
- "extractedData": {
1272
- "identity": "TYPE-ResourceRawMeta",
1273
- "name": "ResourceRawMeta",
1274
- "description": "dummy-description",
1275
- "resourceFormatId": "FORMAT-ApplicationJson",
1276
- "extractionSchema": {
1277
- "$anchor": "ResourceRawMeta",
1278
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1279
- "type": "object",
1280
- "allOf": [
1281
- {
1282
- "$ref": "#/$defs/ResourceBase"
1283
- },
1284
- {
1285
- "$ref": "#/$defs/CanonicalRef"
1286
- },
1287
- {
1288
- "$ref": "#/$defs/Timestamp"
1289
- }
1290
- ],
1291
- "unevaluatedProperties": false
1292
- }
1293
- }
1294
- },
1295
1232
  "Path": {
1296
1233
  "identity": "RESOURCE-Path",
1297
1234
  "resourceTypeId": "TYPE-ResourceType",
@@ -42,20 +42,6 @@
42
42
  "$anchor": "BranchStepId",
43
43
  "pattern": "^BRANCHSTEP-.+$"
44
44
  },
45
- "CanonicalRef": {
46
- "$schema": "https://json-schema.org/draft/2020-12/schema",
47
- "type": "object",
48
- "properties": {
49
- "canonicalRef": {
50
- "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
51
- "$ref": "#/$defs/ResourceId"
52
- }
53
- },
54
- "required": [
55
- "canonicalRef"
56
- ],
57
- "$anchor": "CanonicalRef"
58
- },
59
45
  "ConditionalWrapper": {
60
46
  "$schema": "https://json-schema.org/draft/2020-12/schema",
61
47
  "type": "object",
@@ -310,16 +296,16 @@
310
296
  "type": "object",
311
297
  "properties": {
312
298
  "type": {
313
- "const": "string"
314
- },
315
- "pattern": {
316
- "type": "string",
317
- "pattern": "^[A-Z][A-Z0-9._-]*-.+$"
299
+ "enum": [
300
+ "string",
301
+ "number",
302
+ "integer",
303
+ "boolean"
304
+ ]
318
305
  }
319
306
  },
320
307
  "required": [
321
- "type",
322
- "pattern"
308
+ "type"
323
309
  ],
324
310
  "$anchor": "IdSchemaValue"
325
311
  },
@@ -376,8 +362,8 @@
376
362
  "properties": {
377
363
  "$ref": {
378
364
  "type": "string",
379
- "$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
380
- "pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
365
+ "$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
366
+ "pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
381
367
  }
382
368
  },
383
369
  "required": [
@@ -731,23 +717,6 @@
731
717
  "unevaluatedProperties": false,
732
718
  "$anchor": "ResourcePotentialOutput"
733
719
  },
734
- "ResourceRawMeta": {
735
- "$schema": "https://json-schema.org/draft/2020-12/schema",
736
- "type": "object",
737
- "allOf": [
738
- {
739
- "$ref": "#/$defs/ResourceBase"
740
- },
741
- {
742
- "$ref": "#/$defs/CanonicalRef"
743
- },
744
- {
745
- "$ref": "#/$defs/Timestamp"
746
- }
747
- ],
748
- "unevaluatedProperties": false,
749
- "$anchor": "ResourceRawMeta"
750
- },
751
720
  "ResourceRoleId": {
752
721
  "$schema": "https://json-schema.org/draft/2020-12/schema",
753
722
  "type": "string",
@@ -301,16 +301,16 @@
301
301
  "type": "object",
302
302
  "properties": {
303
303
  "type": {
304
- "const": "string"
305
- },
306
- "pattern": {
307
- "type": "string",
308
- "pattern": "^[A-Z][A-Z0-9._-]*-.+$"
304
+ "enum": [
305
+ "string",
306
+ "number",
307
+ "integer",
308
+ "boolean"
309
+ ]
309
310
  }
310
311
  },
311
312
  "required": [
312
- "type",
313
- "pattern"
313
+ "type"
314
314
  ],
315
315
  "$anchor": "IdSchemaValue"
316
316
  },
@@ -320,8 +320,8 @@
320
320
  "properties": {
321
321
  "$ref": {
322
322
  "type": "string",
323
- "$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
324
- "pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
323
+ "$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
324
+ "pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
325
325
  }
326
326
  },
327
327
  "required": [
@@ -87,8 +87,8 @@
87
87
  "properties": {
88
88
  "$ref": {
89
89
  "type": "string",
90
- "$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
91
- "pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
90
+ "$comment": "Supports both anchor syntax (#<Name>Id) and JSON Pointer syntax (#/path/to/definition). Anchors use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
91
+ "pattern": "^#([A-Za-z][A-Za-z0-9._-]*Id|/.*)$"
92
92
  }
93
93
  },
94
94
  "additionalProperties": false
@@ -104,16 +104,16 @@
104
104
  "$schema": "https://json-schema.org/draft/2020-12/schema",
105
105
  "type": "object",
106
106
  "required": [
107
- "type",
108
- "pattern"
107
+ "type"
109
108
  ],
110
109
  "properties": {
111
110
  "type": {
112
- "const": "string"
113
- },
114
- "pattern": {
115
- "type": "string",
116
- "pattern": "^[A-Z][A-Z0-9._-]*-.+$"
111
+ "enum": [
112
+ "string",
113
+ "number",
114
+ "integer",
115
+ "boolean"
116
+ ]
117
117
  }
118
118
  }
119
119
  }
@@ -877,26 +877,6 @@
877
877
  "unevaluatedProperties": false
878
878
  }
879
879
  },
880
- "CanonicalRef": {
881
- "identity": "TYPE-CanonicalRef",
882
- "name": "CanonicalRef",
883
- "description": "dummy-description",
884
- "resourceFormatId": "FORMAT-ApplicationJson",
885
- "extractionSchema": {
886
- "$anchor": "CanonicalRef",
887
- "$schema": "https://json-schema.org/draft/2020-12/schema",
888
- "type": "object",
889
- "required": [
890
- "canonicalRef"
891
- ],
892
- "properties": {
893
- "canonicalRef": {
894
- "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
895
- "$ref": "#ResourceId"
896
- }
897
- }
898
- }
899
- },
900
880
  "Timestamp": {
901
881
  "identity": "TYPE-Timestamp",
902
882
  "name": "Timestamp",
@@ -917,29 +897,6 @@
917
897
  }
918
898
  }
919
899
  },
920
- "ResourceRawMeta": {
921
- "identity": "TYPE-ResourceRawMeta",
922
- "name": "ResourceRawMeta",
923
- "description": "dummy-description",
924
- "resourceFormatId": "FORMAT-ApplicationJson",
925
- "extractionSchema": {
926
- "$anchor": "ResourceRawMeta",
927
- "$schema": "https://json-schema.org/draft/2020-12/schema",
928
- "type": "object",
929
- "allOf": [
930
- {
931
- "$ref": "#ResourceBase"
932
- },
933
- {
934
- "$ref": "#CanonicalRef"
935
- },
936
- {
937
- "$ref": "#Timestamp"
938
- }
939
- ],
940
- "unevaluatedProperties": false
941
- }
942
- },
943
900
  "Path": {
944
901
  "identity": "TYPE-Path",
945
902
  "name": "Path",
package/dist/index.d.ts CHANGED
@@ -4,5 +4,5 @@ export { default as JobSchema } from './genesis/generated/schemas/Job.js';
4
4
  export type { Resource_ResourceFormat as Resource_ResourceFormatJson } from './_lib/types/Resource_ResourceFormat.js';
5
5
  export type { Resource_ResourceType as Resource_ResourceTypeJson } from './_lib/types/Resource_ResourceType.js';
6
6
  export type { Resource_Job as Resource_JobJson } from './_lib/types/Resource_Job.js';
7
- export type { Documented as DocumentedJson, ResourceFormatId as ResourceFormatIdJson, ResourceFormat as ResourceFormatJson, ExtractionSchema as ExtractionSchemaJson, ExtractionSchemaValue as ExtractionSchemaValueJson, IdentityProp as IdentityPropJson, MeritProp as MeritPropJson, ResourceTypeId as ResourceTypeIdJson, ResourceType as ResourceTypeJson, ResourceRoleId as ResourceRoleIdJson, ResourceRoleValue as ResourceRoleValueJson, ExecutionId as ExecutionIdJson, Execution as ExecutionJson, ConditionalWrapper as ConditionalWrapperJson, RoleMap as RoleMapJson, RolesOuter as RolesOuterJson, RoleBindingMap as RoleBindingMapJson, RoleBindingsOuter as RoleBindingsOuterJson, ResourceId as ResourceIdJson, WorkStepId as WorkStepIdJson, BranchStepId as BranchStepIdJson, WhileStepId as WhileStepIdJson, ForStepId as ForStepIdJson, WorkStep as WorkStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, Step as StepJson, ResourceSocket as ResourceSocketJson, ResourcePotentialInput as ResourcePotentialInputJson, ResourcePotentialOutput as ResourcePotentialOutputJson, ResourceRawMeta as ResourceRawMetaJson, Resource as ResourceJson, StrategyState as StrategyStateJson, StrategyStateValue as StrategyStateValueJson, StatelessStrategy as StatelessStrategyIdJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyId as StatefulStrategyIdJson, StatefulStrategy as StatefulStrategyJson, Job as JobJson, JsonValue as JsonValueJson, } from './_lib/types/types.js';
7
+ export type { Documented as DocumentedJson, ResourceFormatId as ResourceFormatIdJson, ResourceFormat as ResourceFormatJson, ExtractionSchema as ExtractionSchemaJson, ExtractionSchemaValue as ExtractionSchemaValueJson, IdentityProp as IdentityPropJson, MeritProp as MeritPropJson, ResourceTypeId as ResourceTypeIdJson, ResourceType as ResourceTypeJson, ResourceRoleId as ResourceRoleIdJson, ResourceRoleValue as ResourceRoleValueJson, ExecutionId as ExecutionIdJson, Execution as ExecutionJson, ConditionalWrapper as ConditionalWrapperJson, RoleMap as RoleMapJson, RolesOuter as RolesOuterJson, RoleBindingMap as RoleBindingMapJson, RoleBindingsOuter as RoleBindingsOuterJson, ResourceId as ResourceIdJson, WorkStepId as WorkStepIdJson, BranchStepId as BranchStepIdJson, WhileStepId as WhileStepIdJson, ForStepId as ForStepIdJson, WorkStep as WorkStepJson, BranchStep as BranchStepJson, WhileStep as WhileStepJson, ForStep as ForStepJson, Step as StepJson, ResourceSocket as ResourceSocketJson, ResourcePotentialInput as ResourcePotentialInputJson, ResourcePotentialOutput as ResourcePotentialOutputJson, Resource as ResourceJson, StrategyState as StrategyStateJson, StrategyStateValue as StrategyStateValueJson, StatelessStrategy as StatelessStrategyIdJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyId as StatefulStrategyIdJson, StatefulStrategy as StatefulStrategyJson, Job as JobJson, JsonValue as JsonValueJson, } from './_lib/types/types.js';
8
8
  export { unsafeBrand, asResourceTypeId, asResourceRoleId, asExecutionId, asResourceId, asWorkStepId, asBranchStepId, asForStepId, asResourceFormatId, asWhileStepId, asStatelessStrategyId, asStatefulStrategyId, asResourceTypeIds, asResourceRoleIds, asExecutionIds, asResourceIds, asWorkStepIds, asBranchStepIds, asForStepIds, asResourceFormatIds, asWhileStepIds, asStatelessStrategyIds, asStatefulStrategyIds, } from './scripts/brandFactories.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/schema",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "JSON schemas and TypeScript types for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",