archctx-contracts 0.17.1 → 0.18.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.
- package/fixtures/valid/archctx-capabilities.json +2 -2
- package/fixtures/valid/product-version-manifest.json +4 -10
- package/package.json +4 -1
- package/schemas/repo/refactor-decision.schema.json +283 -37
- package/schemas/runtime/archctx-capabilities.schema.json +144 -20
- package/schemas/runtime/architecture-debt-delta.schema.json +58 -19
- package/schemas/runtime/architecture-debt.schema.json +42 -42
- package/schemas/runtime/architecture-event.schema.json +1 -1
- package/schemas/runtime/architecture-history.schema.json +354 -0
- package/schemas/runtime/capability-dependencies.schema.json +266 -59
- package/schemas/runtime/cli-check.schema.json +197 -0
- package/schemas/runtime/cli-help.schema.json +28 -0
- package/schemas/runtime/dependency-constraint-evaluation.schema.json +67 -68
- package/schemas/runtime/docs-anchors.schema.json +250 -67
- package/schemas/runtime/doctor-code-facts.schema.json +49 -0
- package/schemas/runtime/evidence-binding.schema.json +1 -1
- package/schemas/runtime/flow-selector-check.schema.json +179 -46
- package/schemas/runtime/hook-debt-checkpoint.schema.json +12 -12
- package/schemas/runtime/index-seed.schema.json +56 -0
- package/schemas/runtime/path-context.schema.json +108 -0
- package/schemas/runtime/product-version-manifest.schema.json +142 -54
- package/schemas/runtime/projection-slice.schema.json +34 -34
- package/schemas/runtime/recommendation-v3.schema.json +372 -1
- package/schemas/runtime/ref-impact-batch-request.schema.json +20 -7
- package/schemas/runtime/ref-impact-batch.schema.json +83 -13
- package/schemas/runtime/ref-impact.schema.json +68 -61
- package/schemas/runtime/refactor-scan-v2.schema.json +434 -0
- package/schemas/runtime/refactor-simulate.schema.json +505 -0
- package/schemas/runtime/refactor-verify-v2.schema.json +172 -0
- package/schemas/runtime/resolve-path.schema.json +69 -0
- package/schemas/runtime/runtime-recommendation-show.schema.json +531 -2
- package/schemas/runtime/runtime-refactor-scan.schema.json +498 -2
- package/schemas/runtime/runtime-verify.schema.json +274 -56
- package/schemas/runtime/state-machine-check.schema.json +357 -89
- package/schemas/runtime/structural-observation-payload.schema.json +372 -1
- package/schemas/runtime/sync-check.schema.json +65 -0
- package/src/architecture-debt.ts +125 -38
- package/src/architecture-history.ts +168 -42
- package/src/architecture.ts +100 -0
- package/src/cli-read.ts +228 -0
- package/src/docs-anchors.ts +105 -50
- package/src/explorer-occurrence-ports.ts +175 -0
- package/src/explorer-query-ports.ts +270 -0
- package/src/failure.ts +3 -0
- package/src/index-seed.ts +42 -0
- package/src/index.ts +5 -0
- package/src/ledger-records.ts +262 -0
- package/src/ledger.ts +27 -566
- package/src/ownership-dependencies.ts +115 -5
- package/src/ports.ts +6 -541
- package/src/product-version.ts +74 -55
- package/src/projection-apply-types.ts +216 -0
- package/src/projection-apply-validators.ts +355 -0
- package/src/projection-capabilities.ts +181 -0
- package/src/projection-constants.ts +317 -0
- package/src/projection-manifest-types.ts +298 -0
- package/src/projection-manifest.ts +12 -299
- package/src/projection-recovery-validators.ts +229 -0
- package/src/projection-request-validators.ts +326 -0
- package/src/projection-types.ts +365 -0
- package/src/projection-validation-helpers.ts +15 -0
- package/src/projection.ts +7 -1689
- package/src/ref-impact.ts +225 -33
- package/src/refactor-constants.ts +213 -0
- package/src/refactor-decision-validators.ts +350 -0
- package/src/refactor-evidence-types.ts +286 -0
- package/src/refactor-observation-validators.ts +359 -0
- package/src/refactor-resolution-validators.ts +229 -0
- package/src/refactor-snapshot-validators.ts +368 -0
- package/src/refactor-types.ts +270 -0
- package/src/refactor-v2.ts +389 -0
- package/src/refactor-validation-helpers.ts +195 -0
- package/src/refactor.ts +7 -1849
- package/src/review-guards.ts +3 -23
- package/src/runtime-verify.ts +87 -0
- package/src/schema-kit.ts +183 -0
- package/src/schema-registry.ts +73 -0
- package/src/schema.ts +0 -4
- package/src/state-machine-schemas.ts +192 -0
- package/src/state-machine-types.ts +188 -0
- package/src/state-machine.ts +9 -189
- package/fixtures/boundary/agent-job-expired.json +0 -33
- package/fixtures/invalid/adapter-fidelity-reverse-sync.json +0 -9
- package/fixtures/invalid/agent-job-direct-mutation.json +0 -32
- package/fixtures/invalid/cloud-egress-envelope-private-field.json +0 -12
- package/fixtures/invalid/investigation-report-direct-mutation.json +0 -38
- package/fixtures/invalid/investigation-report-missing-proposed-delta.json +0 -19
- package/fixtures/invalid/notification-event-code-field.json +0 -11
- package/fixtures/valid/adapter-fidelity.json +0 -9
- package/fixtures/valid/agent-job.json +0 -33
- package/fixtures/valid/architecture-candidate-delta-policy.json +0 -45
- package/fixtures/valid/architecture-candidate-delta.json +0 -188
- package/fixtures/valid/chatgpt-ga-tool.json +0 -9
- package/fixtures/valid/cloud-egress-envelope.json +0 -11
- package/fixtures/valid/entitlement.json +0 -12
- package/fixtures/valid/investigation-report.json +0 -38
- package/fixtures/valid/likec4-mapping.json +0 -14
- package/fixtures/valid/notification-event.json +0 -10
- package/fixtures/valid/notification-provider.json +0 -12
- package/fixtures/valid/structurizr-mapping.json +0 -15
- package/schemas/cloud/cloud-egress-envelope.schema.json +0 -19
- package/schemas/cloud/entitlement.schema.json +0 -24
- package/schemas/integrations/adapter-fidelity.schema.json +0 -21
- package/schemas/integrations/chatgpt-ga-tool.schema.json +0 -25
- package/schemas/integrations/likec4-mapping.schema.json +0 -32
- package/schemas/integrations/structurizr-mapping.schema.json +0 -33
- package/schemas/runtime/agent-job.schema.json +0 -63
- package/schemas/runtime/architecture-candidate-delta-policy.schema.json +0 -129
- package/schemas/runtime/architecture-candidate-delta.schema.json +0 -386
- package/schemas/runtime/investigation-report.schema.json +0 -119
- package/schemas/runtime/notification-event.schema.json +0 -18
- package/schemas/runtime/notification-provider.schema.json +0 -26
|
@@ -2,127 +2,345 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/runtime-verify.schema.json",
|
|
4
4
|
"title": "RuntimeVerifyV1",
|
|
5
|
-
"type": "object",
|
|
6
5
|
"additionalProperties": false,
|
|
7
|
-
"
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"base",
|
|
10
|
+
"baseSha",
|
|
11
|
+
"headSha",
|
|
12
|
+
"checks"
|
|
13
|
+
],
|
|
8
14
|
"properties": {
|
|
9
|
-
"schemaVersion": {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
15
|
+
"schemaVersion": {
|
|
16
|
+
"const": "archcontext.runtime-verify/v1"
|
|
17
|
+
},
|
|
18
|
+
"base": {
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"baseSha": {
|
|
23
|
+
"$ref": "#/$defs/oid"
|
|
24
|
+
},
|
|
25
|
+
"headSha": {
|
|
26
|
+
"$ref": "#/$defs/oid"
|
|
27
|
+
},
|
|
13
28
|
"checks": {
|
|
14
|
-
"type": "object",
|
|
15
29
|
"additionalProperties": false,
|
|
16
|
-
"
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": [
|
|
32
|
+
"validate",
|
|
33
|
+
"flows",
|
|
34
|
+
"state-machines",
|
|
35
|
+
"constraints",
|
|
36
|
+
"docs",
|
|
37
|
+
"projection",
|
|
38
|
+
"debt"
|
|
39
|
+
],
|
|
17
40
|
"properties": {
|
|
18
41
|
"validate": {
|
|
19
42
|
"oneOf": [
|
|
20
|
-
{
|
|
21
|
-
|
|
43
|
+
{
|
|
44
|
+
"$ref": "#/$defs/failed"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"allOf": [
|
|
48
|
+
{
|
|
49
|
+
"$ref": "#/$defs/passed"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"properties": {
|
|
53
|
+
"data": {
|
|
54
|
+
"$ref": "#/$defs/validation"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
22
60
|
]
|
|
23
61
|
},
|
|
24
62
|
"flows": {
|
|
25
63
|
"oneOf": [
|
|
26
|
-
{
|
|
27
|
-
|
|
64
|
+
{
|
|
65
|
+
"$ref": "#/$defs/failed"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"allOf": [
|
|
69
|
+
{
|
|
70
|
+
"$ref": "#/$defs/passed"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"properties": {
|
|
74
|
+
"data": {
|
|
75
|
+
"$ref": "flow-selector-check.schema.json"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
28
81
|
]
|
|
29
82
|
},
|
|
30
83
|
"state-machines": {
|
|
31
84
|
"oneOf": [
|
|
32
|
-
{
|
|
33
|
-
|
|
85
|
+
{
|
|
86
|
+
"$ref": "#/$defs/failed"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"allOf": [
|
|
90
|
+
{
|
|
91
|
+
"$ref": "#/$defs/passed"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"properties": {
|
|
95
|
+
"data": {
|
|
96
|
+
"$ref": "state-machine-check.schema.json"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
34
102
|
]
|
|
35
103
|
},
|
|
36
104
|
"constraints": {
|
|
37
105
|
"oneOf": [
|
|
38
|
-
{
|
|
39
|
-
|
|
106
|
+
{
|
|
107
|
+
"$ref": "#/$defs/failed"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"allOf": [
|
|
111
|
+
{
|
|
112
|
+
"$ref": "#/$defs/passed"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"properties": {
|
|
116
|
+
"data": {
|
|
117
|
+
"$ref": "dependency-constraint-evaluation.schema.json"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
40
123
|
]
|
|
41
124
|
},
|
|
42
125
|
"docs": {
|
|
43
126
|
"oneOf": [
|
|
44
|
-
{
|
|
45
|
-
|
|
127
|
+
{
|
|
128
|
+
"$ref": "#/$defs/failed"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"allOf": [
|
|
132
|
+
{
|
|
133
|
+
"$ref": "#/$defs/passed"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"properties": {
|
|
137
|
+
"data": {
|
|
138
|
+
"$ref": "docs-anchors.schema.json"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
46
144
|
]
|
|
47
145
|
},
|
|
48
146
|
"projection": {
|
|
49
147
|
"oneOf": [
|
|
50
|
-
{
|
|
51
|
-
|
|
148
|
+
{
|
|
149
|
+
"$ref": "#/$defs/failed"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"allOf": [
|
|
153
|
+
{
|
|
154
|
+
"$ref": "#/$defs/passed"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"properties": {
|
|
158
|
+
"data": {
|
|
159
|
+
"$ref": "projection-pr-verification.schema.json"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
52
165
|
]
|
|
53
166
|
},
|
|
54
167
|
"debt": {
|
|
55
168
|
"oneOf": [
|
|
56
|
-
{
|
|
57
|
-
|
|
169
|
+
{
|
|
170
|
+
"$ref": "#/$defs/failed"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"allOf": [
|
|
174
|
+
{
|
|
175
|
+
"$ref": "#/$defs/passed"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"properties": {
|
|
179
|
+
"data": {
|
|
180
|
+
"$ref": "https://archctx.repoharness.com/schemas/runtime/architecture-debt.schema.json"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
58
186
|
]
|
|
59
187
|
}
|
|
60
188
|
}
|
|
61
189
|
}
|
|
62
190
|
},
|
|
63
191
|
"$defs": {
|
|
64
|
-
"oid": {
|
|
65
|
-
|
|
192
|
+
"oid": {
|
|
193
|
+
"pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"strings": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
66
202
|
"passed": {
|
|
67
|
-
"type": "object",
|
|
68
203
|
"additionalProperties": false,
|
|
69
|
-
"
|
|
70
|
-
"
|
|
204
|
+
"type": "object",
|
|
205
|
+
"required": [
|
|
206
|
+
"ok",
|
|
207
|
+
"data"
|
|
208
|
+
],
|
|
209
|
+
"properties": {
|
|
210
|
+
"ok": {
|
|
211
|
+
"const": true
|
|
212
|
+
},
|
|
213
|
+
"data": {}
|
|
214
|
+
}
|
|
71
215
|
},
|
|
72
216
|
"failed": {
|
|
73
|
-
"type": "object",
|
|
74
217
|
"additionalProperties": false,
|
|
75
|
-
"
|
|
218
|
+
"type": "object",
|
|
219
|
+
"required": [
|
|
220
|
+
"ok",
|
|
221
|
+
"error"
|
|
222
|
+
],
|
|
76
223
|
"properties": {
|
|
77
|
-
"ok": {
|
|
224
|
+
"ok": {
|
|
225
|
+
"const": false
|
|
226
|
+
},
|
|
78
227
|
"error": {
|
|
79
|
-
"type": "object",
|
|
80
228
|
"additionalProperties": false,
|
|
81
|
-
"
|
|
229
|
+
"type": "object",
|
|
230
|
+
"required": [
|
|
231
|
+
"code",
|
|
232
|
+
"message",
|
|
233
|
+
"severity",
|
|
234
|
+
"retryable",
|
|
235
|
+
"action"
|
|
236
|
+
],
|
|
82
237
|
"properties": {
|
|
83
|
-
"code": {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
238
|
+
"code": {
|
|
239
|
+
"pattern": "^AC_[A-Z_]+$",
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"message": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
"severity": {
|
|
246
|
+
"enum": [
|
|
247
|
+
"notice",
|
|
248
|
+
"warning",
|
|
249
|
+
"error",
|
|
250
|
+
"critical"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
"retryable": {
|
|
254
|
+
"type": "boolean"
|
|
255
|
+
},
|
|
256
|
+
"action": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"reasonCode": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"details": {
|
|
263
|
+
"type": "object"
|
|
264
|
+
}
|
|
90
265
|
}
|
|
91
266
|
}
|
|
92
267
|
}
|
|
93
268
|
},
|
|
94
269
|
"validation": {
|
|
95
|
-
"type": "object",
|
|
96
270
|
"additionalProperties": false,
|
|
97
|
-
"
|
|
271
|
+
"type": "object",
|
|
272
|
+
"required": [
|
|
273
|
+
"valid",
|
|
274
|
+
"errors",
|
|
275
|
+
"modelDigest"
|
|
276
|
+
],
|
|
98
277
|
"properties": {
|
|
99
|
-
"valid": {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
278
|
+
"valid": {
|
|
279
|
+
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"errors": {
|
|
282
|
+
"$ref": "#/$defs/strings"
|
|
283
|
+
},
|
|
284
|
+
"modelDigest": {
|
|
285
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"referenceErrors": {
|
|
289
|
+
"$ref": "#/$defs/strings"
|
|
290
|
+
},
|
|
291
|
+
"layerOrderErrors": {
|
|
292
|
+
"$ref": "#/$defs/strings"
|
|
293
|
+
},
|
|
294
|
+
"allowedTargetErrors": {
|
|
295
|
+
"$ref": "#/$defs/strings"
|
|
296
|
+
},
|
|
297
|
+
"warnings": {
|
|
298
|
+
"$ref": "#/$defs/strings"
|
|
299
|
+
},
|
|
106
300
|
"diagnostics": {
|
|
107
301
|
"type": "array",
|
|
108
302
|
"items": {
|
|
109
|
-
"type": "object",
|
|
110
303
|
"additionalProperties": false,
|
|
111
|
-
"
|
|
304
|
+
"type": "object",
|
|
305
|
+
"required": [
|
|
306
|
+
"path",
|
|
307
|
+
"code",
|
|
308
|
+
"error"
|
|
309
|
+
],
|
|
112
310
|
"properties": {
|
|
113
|
-
"path": {
|
|
114
|
-
|
|
115
|
-
|
|
311
|
+
"path": {
|
|
312
|
+
"type": "string"
|
|
313
|
+
},
|
|
314
|
+
"code": {
|
|
315
|
+
"enum": [
|
|
316
|
+
"missing-file",
|
|
317
|
+
"schema-version-missing",
|
|
318
|
+
"node-schema-invalid"
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
"error": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
}
|
|
116
324
|
}
|
|
117
325
|
}
|
|
118
326
|
},
|
|
119
327
|
"nodeSchemaErrors": {
|
|
120
328
|
"type": "array",
|
|
121
329
|
"items": {
|
|
122
|
-
"type": "object",
|
|
123
330
|
"additionalProperties": false,
|
|
124
|
-
"
|
|
125
|
-
"
|
|
331
|
+
"type": "object",
|
|
332
|
+
"required": [
|
|
333
|
+
"path",
|
|
334
|
+
"error"
|
|
335
|
+
],
|
|
336
|
+
"properties": {
|
|
337
|
+
"path": {
|
|
338
|
+
"type": "string"
|
|
339
|
+
},
|
|
340
|
+
"error": {
|
|
341
|
+
"type": "string"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
126
344
|
}
|
|
127
345
|
}
|
|
128
346
|
}
|