@toolproof-npm/schema 0.1.39 → 0.1.41

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.
@@ -29,7 +29,7 @@ export interface ResourceSocket {
29
29
  resourceRoleId: string;
30
30
  }
31
31
  export interface ResourceKind {
32
- kind: "potential-input" | "potential-output" | "materialized";
32
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
33
33
  }
34
34
  export interface Timestamp {
35
35
  timestamp: string;
@@ -24,7 +24,7 @@ export interface ResourceSocket {
24
24
  resourceRoleId: string;
25
25
  }
26
26
  export interface ResourceKind {
27
- kind: "potential-input" | "potential-output" | "materialized";
27
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
28
28
  }
29
29
  export interface Timestamp {
30
30
  timestamp: string;
@@ -42,7 +42,7 @@ export interface ResourceSocket {
42
42
  resourceRoleId: string;
43
43
  }
44
44
  export interface ResourceKind {
45
- kind: "potential-input" | "potential-output" | "materialized";
45
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
46
46
  }
47
47
  export interface Timestamp {
48
48
  timestamp: string;
@@ -52,7 +52,7 @@ export interface ResourceSocket {
52
52
  resourceRoleId: string;
53
53
  }
54
54
  export interface ResourceKind {
55
- kind: "potential-input" | "potential-output" | "materialized";
55
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
56
56
  }
57
57
  export interface Timestamp {
58
58
  timestamp: string;
@@ -210,6 +210,15 @@ export type ResourceMetaBase1 =
210
210
  kind: "materialized";
211
211
  } & Timestamp &
212
212
  Path;
213
+ /**
214
+ * This interface was referenced by `GenesisJson`'s JSON-Schema
215
+ * via the `definition` "ResourceMissing".
216
+ */
217
+ export type ResourceMissing =
218
+ ResourceBase &
219
+ ResourceKind & {
220
+ kind: "missing";
221
+ };
213
222
  /**
214
223
  * This interface was referenced by `GenesisJson`'s JSON-Schema
215
224
  * via the `definition` "ResourcePotentialInput".
@@ -445,7 +454,7 @@ export interface ResourceSocket1 {
445
454
  * via the `definition` "ResourceKind".
446
455
  */
447
456
  export interface ResourceKind {
448
- kind: "potential-input" | "potential-output" | "materialized";
457
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
449
458
  }
450
459
  /**
451
460
  * This interface was referenced by `GenesisJson`'s JSON-Schema
@@ -474,7 +483,7 @@ export interface StrategyState {
474
483
  */
475
484
  export interface StrategyStateValue {
476
485
  [k: string]: {
477
- [k: string]: ResourcePotentialInput | ResourcePotentialOutput | Resource;
486
+ [k: string]: ResourceMissing | ResourcePotentialInput | ResourcePotentialOutput | Resource;
478
487
  };
479
488
  }
480
489
 
@@ -627,11 +636,11 @@ export type ForStep =
627
636
  };
628
637
  export type ForStepId =
629
638
  string;
630
- export type ResourcePotentialInput =
639
+ export type ResourceMissing =
631
640
  ResourceBase &
632
641
  ResourceKind & {
633
- kind: "potential-input";
634
- } & PendingRef;
642
+ kind: "missing";
643
+ };
635
644
  export type ResourceBase =
636
645
  {
637
646
  identity: ResourceId;
@@ -641,6 +650,11 @@ export type ResourceTypeId =
641
650
  string;
642
651
  export type ResourceRoleId =
643
652
  string;
653
+ export type ResourcePotentialInput =
654
+ ResourceBase &
655
+ ResourceKind & {
656
+ kind: "potential-input";
657
+ } & PendingRef;
644
658
  export type ResourcePotentialOutput =
645
659
  ResourceBase &
646
660
  ResourceKind & {
@@ -688,7 +702,7 @@ export interface StrategyState {
688
702
  }
689
703
  export interface StrategyStateValue {
690
704
  [k: string]: {
691
- [k: string]: ResourcePotentialInput | ResourcePotentialOutput | Resource;
705
+ [k: string]: ResourceMissing | ResourcePotentialInput | ResourcePotentialOutput | Resource;
692
706
  };
693
707
  }
694
708
  export interface CreationContext {
@@ -699,7 +713,7 @@ export interface ResourceSocket {
699
713
  resourceRoleId: ResourceRoleId;
700
714
  }
701
715
  export interface ResourceKind {
702
- kind: "potential-input" | "potential-output" | "materialized";
716
+ kind: "missing" | "potential-input" | "potential-output" | "materialized";
703
717
  }
704
718
  export interface PendingRef {
705
719
  pendingRef: ResourceSocket1;
@@ -1077,6 +1077,7 @@
1077
1077
  "properties": {
1078
1078
  "kind": {
1079
1079
  "enum": [
1080
+ "missing",
1080
1081
  "potential-input",
1081
1082
  "potential-output",
1082
1083
  "materialized"
@@ -1086,6 +1087,46 @@
1086
1087
  }
1087
1088
  }
1088
1089
  },
1090
+ "ResourceMissing": {
1091
+ "identity": "RESOURCE-ResourceMissing",
1092
+ "resourceTypeId": "TYPE-ResourceType",
1093
+ "creationContext": {
1094
+ "resourceRoleId": "ROLE-Genesis",
1095
+ "executionId": "EXECUTION-ResourceMissing"
1096
+ },
1097
+ "kind": "materialized",
1098
+ "timestamp": "2025-11-30T00:00:00.000Z",
1099
+ "extractedData": {
1100
+ "identity": "TYPE-ResourceMissing",
1101
+ "name": "ResourceMissing",
1102
+ "description": "dummy-description",
1103
+ "resourceFormatId": "FORMAT-ApplicationJson",
1104
+ "extractionSchema": {
1105
+ "$anchor": "ResourceMissing",
1106
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1107
+ "type": "object",
1108
+ "allOf": [
1109
+ {
1110
+ "$ref": "#/$defs/ResourceBase"
1111
+ },
1112
+ {
1113
+ "$ref": "#/$defs/ResourceKind"
1114
+ },
1115
+ {
1116
+ "required": [
1117
+ "kind"
1118
+ ],
1119
+ "properties": {
1120
+ "kind": {
1121
+ "const": "missing"
1122
+ }
1123
+ }
1124
+ }
1125
+ ],
1126
+ "unevaluatedProperties": false
1127
+ }
1128
+ }
1129
+ },
1089
1130
  "PendingRef": {
1090
1131
  "identity": "RESOURCE-PendingRef",
1091
1132
  "resourceTypeId": "TYPE-ResourceType",
@@ -1109,7 +1150,7 @@
1109
1150
  ],
1110
1151
  "properties": {
1111
1152
  "pendingRef": {
1112
- "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet materialized at the time of defining the workflow, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
1153
+ "$comment": "This points to a resource created at a previous step in the same execution. This resource is not yet materialized at the time of defining the execution, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
1113
1154
  "$ref": "#/$defs/ResourceSocket"
1114
1155
  }
1115
1156
  }
@@ -1948,6 +1989,9 @@
1948
1989
  },
1949
1990
  "additionalProperties": {
1950
1991
  "oneOf": [
1992
+ {
1993
+ "$ref": "#/$defs/ResourceMissing"
1994
+ },
1951
1995
  {
1952
1996
  "$ref": "#/$defs/ResourcePotentialInput"
1953
1997
  },
@@ -522,7 +522,7 @@
522
522
  "type": "object",
523
523
  "properties": {
524
524
  "pendingRef": {
525
- "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet materialized at the time of defining the workflow, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
525
+ "$comment": "This points to a resource created at a previous step in the same execution. This resource is not yet materialized at the time of defining the execution, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
526
526
  "$ref": "#/$defs/ResourceSocket"
527
527
  }
528
528
  },
@@ -619,6 +619,7 @@
619
619
  "properties": {
620
620
  "kind": {
621
621
  "enum": [
622
+ "missing",
622
623
  "potential-input",
623
624
  "potential-output",
624
625
  "materialized"
@@ -666,6 +667,30 @@
666
667
  ],
667
668
  "$anchor": "ResourceMetaBase"
668
669
  },
670
+ "ResourceMissing": {
671
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
672
+ "type": "object",
673
+ "allOf": [
674
+ {
675
+ "$ref": "#/$defs/ResourceBase"
676
+ },
677
+ {
678
+ "$ref": "#/$defs/ResourceKind"
679
+ },
680
+ {
681
+ "properties": {
682
+ "kind": {
683
+ "const": "missing"
684
+ }
685
+ },
686
+ "required": [
687
+ "kind"
688
+ ]
689
+ }
690
+ ],
691
+ "unevaluatedProperties": false,
692
+ "$anchor": "ResourceMissing"
693
+ },
669
694
  "ResourcePotentialInput": {
670
695
  "$schema": "https://json-schema.org/draft/2020-12/schema",
671
696
  "type": "object",
@@ -1029,6 +1054,9 @@
1029
1054
  "type": "object",
1030
1055
  "additionalProperties": {
1031
1056
  "oneOf": [
1057
+ {
1058
+ "$ref": "#/$defs/ResourceMissing"
1059
+ },
1032
1060
  {
1033
1061
  "$ref": "#/$defs/ResourcePotentialInput"
1034
1062
  },
@@ -101,6 +101,9 @@
101
101
  "type": "object",
102
102
  "additionalProperties": {
103
103
  "oneOf": [
104
+ {
105
+ "$ref": "#/$defs/ResourceMissing"
106
+ },
104
107
  {
105
108
  "$ref": "#/$defs/ResourcePotentialInput"
106
109
  },
@@ -242,6 +245,30 @@
242
245
  ],
243
246
  "$anchor": "ForStep"
244
247
  },
248
+ "ResourceMissing": {
249
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
250
+ "type": "object",
251
+ "allOf": [
252
+ {
253
+ "$ref": "#/$defs/ResourceBase"
254
+ },
255
+ {
256
+ "$ref": "#/$defs/ResourceKind"
257
+ },
258
+ {
259
+ "properties": {
260
+ "kind": {
261
+ "const": "missing"
262
+ }
263
+ },
264
+ "required": [
265
+ "kind"
266
+ ]
267
+ }
268
+ ],
269
+ "unevaluatedProperties": false,
270
+ "$anchor": "ResourceMissing"
271
+ },
245
272
  "ResourcePotentialInput": {
246
273
  "$schema": "https://json-schema.org/draft/2020-12/schema",
247
274
  "type": "object",
@@ -447,6 +474,7 @@
447
474
  "properties": {
448
475
  "kind": {
449
476
  "enum": [
477
+ "missing",
450
478
  "potential-input",
451
479
  "potential-output",
452
480
  "materialized"
@@ -463,7 +491,7 @@
463
491
  "type": "object",
464
492
  "properties": {
465
493
  "pendingRef": {
466
- "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet materialized at the time of defining the workflow, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
494
+ "$comment": "This points to a resource created at a previous step in the same execution. This resource is not yet materialized at the time of defining the execution, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
467
495
  "$ref": "#/$defs/ResourceSocket"
468
496
  }
469
497
  },
@@ -786,6 +786,7 @@
786
786
  "properties": {
787
787
  "kind": {
788
788
  "enum": [
789
+ "missing",
789
790
  "potential-input",
790
791
  "potential-output",
791
792
  "materialized"
@@ -794,6 +795,36 @@
794
795
  }
795
796
  }
796
797
  },
798
+ "ResourceMissing": {
799
+ "identity": "TYPE-ResourceMissing",
800
+ "name": "ResourceMissing",
801
+ "description": "dummy-description",
802
+ "resourceFormatId": "FORMAT-ApplicationJson",
803
+ "extractionSchema": {
804
+ "$anchor": "ResourceMissing",
805
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
806
+ "type": "object",
807
+ "allOf": [
808
+ {
809
+ "$ref": "#ResourceBase"
810
+ },
811
+ {
812
+ "$ref": "#ResourceKind"
813
+ },
814
+ {
815
+ "required": [
816
+ "kind"
817
+ ],
818
+ "properties": {
819
+ "kind": {
820
+ "const": "missing"
821
+ }
822
+ }
823
+ }
824
+ ],
825
+ "unevaluatedProperties": false
826
+ }
827
+ },
797
828
  "PendingRef": {
798
829
  "identity": "TYPE-PendingRef",
799
830
  "name": "PendingRef",
@@ -808,7 +839,7 @@
808
839
  ],
809
840
  "properties": {
810
841
  "pendingRef": {
811
- "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet materialized at the time of defining the workflow, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
842
+ "$comment": "This points to a resource created at a previous step in the same execution. This resource is not yet materialized at the time of defining the execution, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
812
843
  "$ref": "#ResourceSocket"
813
844
  }
814
845
  }
@@ -1407,6 +1438,9 @@
1407
1438
  },
1408
1439
  "additionalProperties": {
1409
1440
  "oneOf": [
1441
+ {
1442
+ "$ref": "#ResourceMissing"
1443
+ },
1410
1444
  {
1411
1445
  "$ref": "#ResourcePotentialInput"
1412
1446
  },
package/dist/index.d.ts CHANGED
@@ -5,5 +5,5 @@ export type { Resource_ResourceFormat as Resource_ResourceFormatJson } from './_
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
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, ResourceMetaBase as ResourceMetaJson, // ATTENTION: type not generated for ResourceMeta
8
- Resource as ResourceJson, StrategyState as StrategyStateJson, StrategyStateValue as StrategyStateValueJson, StatelessStrategyId as StatelessStrategyIdJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyId as StatefulStrategyIdJson, StatefulStrategy as StatefulStrategyJson, Job as JobJson, JsonValue as JsonValueJson, } from './_lib/types/types.js';
8
+ Resource as ResourceJson, StrategyState as StrategyStateJson, StrategyStateValue as StrategyStateValueJson, StatelessStrategyId as StatelessStrategyIdJson, StatelessStrategy as StatelessStrategyJson, StatefulStrategyId as StatefulStrategyIdJson, StatefulStrategy as StatefulStrategyJson, JobId as JobIdJson, Job as JobJson, JsonValue as JsonValueJson, } from './_lib/types/types.js';
9
9
  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';
@@ -246,7 +246,7 @@ async function main() {
246
246
  ts = ts.replace(/^(export interface IdentityProp[\s\S]*?)(required:\s*\[\{type:\s*"array";\s*contains:\s*\{const:\s*"identity"\};\s*items:\s*\{type:\s*"string"\};\s*uniqueItems:\s*true\}\];)/gm, '$1required?: string[];');
247
247
  // Prune verbose type/interface names produced from absolute $id URLs.
248
248
  // Deterministic pruning based on original $id -> baseName map
249
- // This avoids heuristic truncation that dropped prefixes like Resource / Workflow.
249
+ // This avoids heuristic truncation that dropped prefixes.
250
250
  function idToGeneratedIdentifier(id) {
251
251
  // json-schema-to-typescript seems to create a PascalCase of the URL with protocol prefix
252
252
  // Simplified reconstruction: 'https://' => 'Https', then capitalize path & host segments
@@ -324,8 +324,7 @@ async function main() {
324
324
  // Common form: ^PREFIX-.+$ => PREFIX-${string}
325
325
  const m1 = /^\^([^$]+)\.\+\$/.exec(pattern);
326
326
  if (m1) {
327
- const prefix = m1[1]; // e.g., 'WORKFLOW-'
328
- // Basic safety: ensure backticks/interpolations aren't present
327
+ const prefix = m1[1];
329
328
  if (!/[`]/.test(prefix)) {
330
329
  return '`' + prefix + '${string}`';
331
330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-npm/schema",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "JSON schemas and TypeScript types for ToolProof",
5
5
  "keywords": [
6
6
  "toolproof",