@apexops/contracts 0.10.0-next.5 → 0.11.0-next.0

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 (76) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/archetype-source.d.ts +70 -0
  3. package/dist/archetype-source.d.ts.map +1 -0
  4. package/dist/archetype-source.js +58 -0
  5. package/dist/archetype-source.js.map +1 -0
  6. package/dist/artifacts.d.ts +64 -0
  7. package/dist/artifacts.d.ts.map +1 -1
  8. package/dist/artifacts.js +69 -0
  9. package/dist/artifacts.js.map +1 -1
  10. package/dist/common.d.ts +2 -0
  11. package/dist/common.d.ts.map +1 -1
  12. package/dist/common.js +1 -0
  13. package/dist/common.js.map +1 -1
  14. package/dist/evidence.d.ts.map +1 -1
  15. package/dist/evidence.js +2 -0
  16. package/dist/evidence.js.map +1 -1
  17. package/dist/governance-observation.d.ts +15 -0
  18. package/dist/governance-observation.d.ts.map +1 -0
  19. package/dist/governance-observation.js +15 -0
  20. package/dist/governance-observation.js.map +1 -0
  21. package/dist/index.d.ts +616 -3
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +47 -4
  24. package/dist/index.js.map +1 -1
  25. package/dist/native-validation.d.ts +136 -0
  26. package/dist/native-validation.d.ts.map +1 -0
  27. package/dist/native-validation.js +276 -0
  28. package/dist/native-validation.js.map +1 -0
  29. package/dist/onboarding.d.ts +184 -3
  30. package/dist/onboarding.d.ts.map +1 -1
  31. package/dist/onboarding.js +122 -6
  32. package/dist/onboarding.js.map +1 -1
  33. package/dist/policy-validation.d.ts +45 -0
  34. package/dist/policy-validation.d.ts.map +1 -0
  35. package/dist/policy-validation.js +194 -0
  36. package/dist/policy-validation.js.map +1 -0
  37. package/dist/runtime.d.ts +72 -0
  38. package/dist/runtime.d.ts.map +1 -1
  39. package/dist/runtime.js +34 -1
  40. package/dist/runtime.js.map +1 -1
  41. package/dist/targets.d.ts +158 -1
  42. package/dist/targets.d.ts.map +1 -1
  43. package/dist/targets.js +168 -2
  44. package/dist/targets.js.map +1 -1
  45. package/dist/test/contracts.test.js +751 -3
  46. package/dist/test/contracts.test.js.map +1 -1
  47. package/package.json +2 -2
  48. package/schemas/archetype-batch-config-v1.schema.json +51 -0
  49. package/schemas/archetype-batch-plan-v1.schema.json +227 -0
  50. package/schemas/archetype-source-proposal-v1.schema.json +113 -0
  51. package/schemas/architecture-v1.schema.json +278 -0
  52. package/schemas/bootstrap-plan-v1.schema.json +206 -0
  53. package/schemas/contract-metadata.json +85 -0
  54. package/schemas/cost-estimate-v1.schema.json +54 -1
  55. package/schemas/diagnosis-v1.schema.json +323 -0
  56. package/schemas/governance-constraints-v1.schema.json +13 -0
  57. package/schemas/governance-observation-receipt-v1.schema.json +60 -0
  58. package/schemas/governance-provision-plan-v1.schema.json +307 -0
  59. package/schemas/governance-setup-config-v1.schema.json +80 -0
  60. package/schemas/governance-setup-plan-v1.schema.json +217 -0
  61. package/schemas/iac-binding-v1.schema.json +60 -0
  62. package/schemas/input-request-v1.schema.json +190 -0
  63. package/schemas/logical-resource-manifest-v1.schema.json +4 -0
  64. package/schemas/native-validation-receipt-v1.schema.json +862 -0
  65. package/schemas/onboarding-config-v1.schema.json +15 -12
  66. package/schemas/policy-property-map-v1.schema.json +17 -0
  67. package/schemas/policy-validation-v1.schema.json +278 -0
  68. package/schemas/project-config-v1.schema.json +14 -1
  69. package/schemas/repeat-guard-records-v1.schema.json +76 -0
  70. package/schemas/repository-publish-config-v1.schema.json +52 -0
  71. package/schemas/repository-publish-plan-v1.schema.json +265 -0
  72. package/schemas/requirements-amendment-v1.schema.json +213 -0
  73. package/schemas/requirements-change-proposal-v1.schema.json +196 -0
  74. package/schemas/review-capture-v1.schema.json +67 -0
  75. package/schemas/review-findings-v1.schema.json +103 -0
  76. package/schemas/review-request-v1.schema.json +111 -0
@@ -0,0 +1,265 @@
1
+ {
2
+ "$id": "https://schemas.apexops.dev/repository-publish-plan-v1.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "actions": {
7
+ "items": {
8
+ "anyOf": [
9
+ {
10
+ "const": "create-repository",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "const": "add-remote",
15
+ "type": "string"
16
+ },
17
+ {
18
+ "const": "push-branch",
19
+ "type": "string"
20
+ }
21
+ ]
22
+ },
23
+ "maxItems": 3,
24
+ "type": "array",
25
+ "uniqueItems": true
26
+ },
27
+ "blockers": {
28
+ "items": {
29
+ "maxLength": 512,
30
+ "minLength": 1,
31
+ "type": "string"
32
+ },
33
+ "maxItems": 16,
34
+ "type": "array"
35
+ },
36
+ "config": {
37
+ "$id": "https://schemas.apexops.dev/repository-publish-config-v1.json",
38
+ "additionalProperties": false,
39
+ "properties": {
40
+ "branch": {
41
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$(?![\\s\\S])",
42
+ "type": "string"
43
+ },
44
+ "name": {
45
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$(?![\\s\\S])",
46
+ "type": "string"
47
+ },
48
+ "owner": {
49
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,38}$(?![\\s\\S])",
50
+ "type": "string"
51
+ },
52
+ "remote": {
53
+ "const": "origin",
54
+ "type": "string"
55
+ },
56
+ "schemaVersion": {
57
+ "const": "1.0.0",
58
+ "type": "string"
59
+ },
60
+ "visibility": {
61
+ "anyOf": [
62
+ {
63
+ "const": "private",
64
+ "type": "string"
65
+ },
66
+ {
67
+ "const": "internal",
68
+ "type": "string"
69
+ },
70
+ {
71
+ "const": "public",
72
+ "type": "string"
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ "required": [
78
+ "schemaVersion",
79
+ "owner",
80
+ "name",
81
+ "visibility",
82
+ "branch",
83
+ "remote"
84
+ ],
85
+ "type": "object"
86
+ },
87
+ "deploymentAuthorized": {
88
+ "const": false,
89
+ "type": "boolean"
90
+ },
91
+ "evidenceHash": {
92
+ "pattern": "^[0-9a-f]{64}$",
93
+ "type": "string"
94
+ },
95
+ "executionAuthorized": {
96
+ "const": false,
97
+ "type": "boolean"
98
+ },
99
+ "filesModified": {
100
+ "const": false,
101
+ "type": "boolean"
102
+ },
103
+ "pendingActions": {
104
+ "items": {
105
+ "maxLength": 256,
106
+ "minLength": 1,
107
+ "type": "string"
108
+ },
109
+ "maxItems": 16,
110
+ "type": "array"
111
+ },
112
+ "planHash": {
113
+ "pattern": "^[0-9a-f]{64}$",
114
+ "type": "string"
115
+ },
116
+ "push": {
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "branch": {
120
+ "maxLength": 255,
121
+ "minLength": 1,
122
+ "type": "string"
123
+ },
124
+ "commit": {
125
+ "pattern": "^[0-9a-f]{40}$(?![\\s\\S])",
126
+ "type": "string"
127
+ },
128
+ "commitCount": {
129
+ "maximum": 1000000,
130
+ "minimum": 0,
131
+ "type": "integer"
132
+ },
133
+ "files": {
134
+ "items": {
135
+ "maxLength": 1024,
136
+ "minLength": 1,
137
+ "type": "string"
138
+ },
139
+ "maxItems": 512,
140
+ "type": "array"
141
+ },
142
+ "filesTruncated": {
143
+ "type": "boolean"
144
+ },
145
+ "forcePush": {
146
+ "const": false,
147
+ "type": "boolean"
148
+ },
149
+ "uncommittedChanges": {
150
+ "items": {
151
+ "maxLength": 1024,
152
+ "minLength": 1,
153
+ "type": "string"
154
+ },
155
+ "maxItems": 512,
156
+ "type": "array"
157
+ }
158
+ },
159
+ "required": [
160
+ "branch",
161
+ "commit",
162
+ "commitCount",
163
+ "files",
164
+ "filesTruncated",
165
+ "uncommittedChanges",
166
+ "forcePush"
167
+ ],
168
+ "type": "object"
169
+ },
170
+ "repository": {
171
+ "additionalProperties": false,
172
+ "properties": {
173
+ "exists": {
174
+ "type": "boolean"
175
+ },
176
+ "fullName": {
177
+ "maxLength": 140,
178
+ "minLength": 3,
179
+ "type": "string"
180
+ },
181
+ "owner": {
182
+ "maxLength": 39,
183
+ "minLength": 1,
184
+ "type": "string"
185
+ },
186
+ "ownerType": {
187
+ "anyOf": [
188
+ {
189
+ "const": "user",
190
+ "type": "string"
191
+ },
192
+ {
193
+ "const": "organization",
194
+ "type": "string"
195
+ },
196
+ {
197
+ "const": "unknown",
198
+ "type": "string"
199
+ }
200
+ ]
201
+ },
202
+ "visibility": {
203
+ "anyOf": [
204
+ {
205
+ "const": "private",
206
+ "type": "string"
207
+ },
208
+ {
209
+ "const": "internal",
210
+ "type": "string"
211
+ },
212
+ {
213
+ "const": "public",
214
+ "type": "string"
215
+ }
216
+ ]
217
+ }
218
+ },
219
+ "required": [
220
+ "fullName",
221
+ "owner",
222
+ "ownerType",
223
+ "visibility",
224
+ "exists"
225
+ ],
226
+ "type": "object"
227
+ },
228
+ "schemaVersion": {
229
+ "const": "1.0.0",
230
+ "type": "string"
231
+ },
232
+ "status": {
233
+ "anyOf": [
234
+ {
235
+ "const": "ready",
236
+ "type": "string"
237
+ },
238
+ {
239
+ "const": "pending",
240
+ "type": "string"
241
+ },
242
+ {
243
+ "const": "blocked",
244
+ "type": "string"
245
+ }
246
+ ]
247
+ }
248
+ },
249
+ "required": [
250
+ "schemaVersion",
251
+ "config",
252
+ "evidenceHash",
253
+ "planHash",
254
+ "status",
255
+ "repository",
256
+ "actions",
257
+ "push",
258
+ "blockers",
259
+ "pendingActions",
260
+ "filesModified",
261
+ "executionAuthorized",
262
+ "deploymentAuthorized"
263
+ ],
264
+ "type": "object"
265
+ }
@@ -0,0 +1,213 @@
1
+ {
2
+ "$id": "https://schemas.apexops.dev/requirements-amendment-v1.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "additions": {
7
+ "items": {
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "id": {
11
+ "minLength": 1,
12
+ "type": "string"
13
+ },
14
+ "priority": {
15
+ "anyOf": [
16
+ {
17
+ "const": "must",
18
+ "type": "string"
19
+ },
20
+ {
21
+ "const": "should",
22
+ "type": "string"
23
+ },
24
+ {
25
+ "const": "could",
26
+ "type": "string"
27
+ }
28
+ ]
29
+ },
30
+ "source": {
31
+ "minLength": 1,
32
+ "type": "string"
33
+ },
34
+ "statement": {
35
+ "minLength": 1,
36
+ "type": "string"
37
+ },
38
+ "status": {
39
+ "anyOf": [
40
+ {
41
+ "const": "confirmed",
42
+ "type": "string"
43
+ },
44
+ {
45
+ "const": "unknown",
46
+ "type": "string"
47
+ },
48
+ {
49
+ "const": "deferred",
50
+ "type": "string"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ "required": [
56
+ "id",
57
+ "statement",
58
+ "priority",
59
+ "status",
60
+ "source"
61
+ ],
62
+ "type": "object"
63
+ },
64
+ "maxItems": 128,
65
+ "type": "array"
66
+ },
67
+ "baseRequirementsHash": {
68
+ "pattern": "^[0-9a-f]{64}$",
69
+ "type": "string"
70
+ },
71
+ "fields": {
72
+ "additionalProperties": false,
73
+ "properties": {
74
+ "architectureHandoff": {
75
+ "minLength": 1,
76
+ "type": "string"
77
+ },
78
+ "assumptions": {
79
+ "items": {
80
+ "minLength": 1,
81
+ "type": "string"
82
+ },
83
+ "type": "array"
84
+ },
85
+ "budgetAndOperations": {
86
+ "minLength": 1,
87
+ "type": "string"
88
+ },
89
+ "businessContext": {
90
+ "minLength": 1,
91
+ "type": "string"
92
+ },
93
+ "nonFunctionalRequirements": {
94
+ "minLength": 1,
95
+ "type": "string"
96
+ },
97
+ "regionalConstraints": {
98
+ "minLength": 1,
99
+ "type": "string"
100
+ },
101
+ "securityAndCompliance": {
102
+ "minLength": 1,
103
+ "type": "string"
104
+ },
105
+ "successCriteria": {
106
+ "minLength": 1,
107
+ "type": "string"
108
+ },
109
+ "unknowns": {
110
+ "items": {
111
+ "minLength": 1,
112
+ "type": "string"
113
+ },
114
+ "type": "array"
115
+ },
116
+ "workload": {
117
+ "minLength": 1,
118
+ "type": "string"
119
+ }
120
+ },
121
+ "type": "object"
122
+ },
123
+ "removals": {
124
+ "items": {
125
+ "maxLength": 512,
126
+ "minLength": 1,
127
+ "type": "string"
128
+ },
129
+ "maxItems": 128,
130
+ "type": "array",
131
+ "uniqueItems": true
132
+ },
133
+ "schemaVersion": {
134
+ "const": "1.0.0",
135
+ "type": "string"
136
+ },
137
+ "updates": {
138
+ "items": {
139
+ "additionalProperties": false,
140
+ "properties": {
141
+ "changes": {
142
+ "additionalProperties": false,
143
+ "minProperties": 1,
144
+ "properties": {
145
+ "priority": {
146
+ "anyOf": [
147
+ {
148
+ "const": "must",
149
+ "type": "string"
150
+ },
151
+ {
152
+ "const": "should",
153
+ "type": "string"
154
+ },
155
+ {
156
+ "const": "could",
157
+ "type": "string"
158
+ }
159
+ ]
160
+ },
161
+ "source": {
162
+ "minLength": 1,
163
+ "type": "string"
164
+ },
165
+ "statement": {
166
+ "minLength": 1,
167
+ "type": "string"
168
+ },
169
+ "status": {
170
+ "anyOf": [
171
+ {
172
+ "const": "confirmed",
173
+ "type": "string"
174
+ },
175
+ {
176
+ "const": "unknown",
177
+ "type": "string"
178
+ },
179
+ {
180
+ "const": "deferred",
181
+ "type": "string"
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ "type": "object"
187
+ },
188
+ "id": {
189
+ "maxLength": 512,
190
+ "minLength": 1,
191
+ "type": "string"
192
+ }
193
+ },
194
+ "required": [
195
+ "id",
196
+ "changes"
197
+ ],
198
+ "type": "object"
199
+ },
200
+ "maxItems": 128,
201
+ "type": "array"
202
+ }
203
+ },
204
+ "required": [
205
+ "schemaVersion",
206
+ "baseRequirementsHash",
207
+ "updates",
208
+ "additions",
209
+ "removals",
210
+ "fields"
211
+ ],
212
+ "type": "object"
213
+ }
@@ -0,0 +1,196 @@
1
+ {
2
+ "$id": "https://schemas.apexops.dev/requirements-change-proposal-v1.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "addedRequirementIds": {
7
+ "items": {
8
+ "maxLength": 512,
9
+ "minLength": 1,
10
+ "type": "string"
11
+ },
12
+ "maxItems": 4096,
13
+ "type": "array",
14
+ "uniqueItems": true
15
+ },
16
+ "candidateHash": {
17
+ "pattern": "^[0-9a-f]{64}$",
18
+ "type": "string"
19
+ },
20
+ "changedFields": {
21
+ "items": {
22
+ "maxLength": 512,
23
+ "minLength": 1,
24
+ "type": "string"
25
+ },
26
+ "maxItems": 4096,
27
+ "type": "array",
28
+ "uniqueItems": true
29
+ },
30
+ "changedRequirementIds": {
31
+ "items": {
32
+ "maxLength": 512,
33
+ "minLength": 1,
34
+ "type": "string"
35
+ },
36
+ "maxItems": 4096,
37
+ "type": "array",
38
+ "uniqueItems": true
39
+ },
40
+ "deploymentAuthorized": {
41
+ "const": false,
42
+ "type": "boolean"
43
+ },
44
+ "expectedHead": {
45
+ "pattern": "^[0-9a-f]{64}$",
46
+ "type": "string"
47
+ },
48
+ "filesModified": {
49
+ "const": false,
50
+ "type": "boolean"
51
+ },
52
+ "invalidatedGates": {
53
+ "items": {
54
+ "maximum": 4,
55
+ "minimum": 1,
56
+ "type": "integer"
57
+ },
58
+ "maxItems": 4,
59
+ "type": "array",
60
+ "uniqueItems": true
61
+ },
62
+ "invalidatedNodes": {
63
+ "items": {
64
+ "maxLength": 512,
65
+ "minLength": 1,
66
+ "type": "string"
67
+ },
68
+ "maxItems": 4096,
69
+ "type": "array",
70
+ "uniqueItems": true
71
+ },
72
+ "mode": {
73
+ "anyOf": [
74
+ {
75
+ "const": "adopt",
76
+ "type": "string"
77
+ },
78
+ {
79
+ "const": "revise",
80
+ "type": "string"
81
+ }
82
+ ]
83
+ },
84
+ "ownerEpoch": {
85
+ "minimum": 0,
86
+ "type": "integer"
87
+ },
88
+ "projectId": {
89
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
90
+ "type": "string"
91
+ },
92
+ "proposalHash": {
93
+ "pattern": "^[0-9a-f]{64}$",
94
+ "type": "string"
95
+ },
96
+ "reason": {
97
+ "maxLength": 2048,
98
+ "minLength": 1,
99
+ "type": "string"
100
+ },
101
+ "removedRequirementIds": {
102
+ "items": {
103
+ "maxLength": 512,
104
+ "minLength": 1,
105
+ "type": "string"
106
+ },
107
+ "maxItems": 4096,
108
+ "type": "array",
109
+ "uniqueItems": true
110
+ },
111
+ "requiresReassessment": {
112
+ "additionalItems": false,
113
+ "items": [
114
+ {
115
+ "const": "cost",
116
+ "type": "string"
117
+ },
118
+ {
119
+ "const": "policy",
120
+ "type": "string"
121
+ },
122
+ {
123
+ "const": "security",
124
+ "type": "string"
125
+ },
126
+ {
127
+ "const": "dependencies",
128
+ "type": "string"
129
+ },
130
+ {
131
+ "const": "code",
132
+ "type": "string"
133
+ },
134
+ {
135
+ "const": "documents",
136
+ "type": "string"
137
+ }
138
+ ],
139
+ "maxItems": 6,
140
+ "minItems": 6,
141
+ "type": "array"
142
+ },
143
+ "retainedRequirementIds": {
144
+ "items": {
145
+ "maxLength": 512,
146
+ "minLength": 1,
147
+ "type": "string"
148
+ },
149
+ "maxItems": 4096,
150
+ "type": "array",
151
+ "uniqueItems": true
152
+ },
153
+ "runId": {
154
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$",
155
+ "type": "string"
156
+ },
157
+ "schemaVersion": {
158
+ "const": "1.0.0",
159
+ "type": "string"
160
+ },
161
+ "sourceRequirementsHash": {
162
+ "anyOf": [
163
+ {
164
+ "pattern": "^[0-9a-f]{64}$",
165
+ "type": "string"
166
+ },
167
+ {
168
+ "type": "null"
169
+ }
170
+ ]
171
+ }
172
+ },
173
+ "required": [
174
+ "schemaVersion",
175
+ "projectId",
176
+ "runId",
177
+ "expectedHead",
178
+ "ownerEpoch",
179
+ "sourceRequirementsHash",
180
+ "mode",
181
+ "candidateHash",
182
+ "reason",
183
+ "addedRequirementIds",
184
+ "removedRequirementIds",
185
+ "changedRequirementIds",
186
+ "retainedRequirementIds",
187
+ "changedFields",
188
+ "invalidatedNodes",
189
+ "invalidatedGates",
190
+ "requiresReassessment",
191
+ "filesModified",
192
+ "deploymentAuthorized",
193
+ "proposalHash"
194
+ ],
195
+ "type": "object"
196
+ }