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
|
@@ -1,92 +1,168 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/product-version-manifest.schema.json",
|
|
4
|
-
"
|
|
4
|
+
"title": "ProductVersionManifest",
|
|
5
5
|
"additionalProperties": false,
|
|
6
|
-
"
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"product",
|
|
10
|
+
"packageManager",
|
|
11
|
+
"engines",
|
|
12
|
+
"surfaces",
|
|
13
|
+
"schemas",
|
|
14
|
+
"runtime"
|
|
15
|
+
],
|
|
7
16
|
"properties": {
|
|
8
|
-
"schemaVersion": {
|
|
17
|
+
"schemaVersion": {
|
|
18
|
+
"const": "archcontext.product-version-manifest/v1"
|
|
19
|
+
},
|
|
9
20
|
"product": {
|
|
10
|
-
"type": "object",
|
|
11
21
|
"additionalProperties": false,
|
|
12
|
-
"
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": [
|
|
24
|
+
"name",
|
|
25
|
+
"version",
|
|
26
|
+
"distribution"
|
|
27
|
+
],
|
|
13
28
|
"properties": {
|
|
14
|
-
"name": {
|
|
15
|
-
|
|
16
|
-
|
|
29
|
+
"name": {
|
|
30
|
+
"const": "archctx"
|
|
31
|
+
},
|
|
32
|
+
"version": {
|
|
33
|
+
"$ref": "#/$defs/semver"
|
|
34
|
+
},
|
|
35
|
+
"distribution": {
|
|
36
|
+
"enum": [
|
|
37
|
+
"one-package"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
17
40
|
}
|
|
18
41
|
},
|
|
19
|
-
"packageManager": {
|
|
42
|
+
"packageManager": {
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
20
46
|
"engines": {
|
|
21
|
-
"type": "object",
|
|
22
47
|
"additionalProperties": false,
|
|
23
|
-
"
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": [
|
|
50
|
+
"node"
|
|
51
|
+
],
|
|
24
52
|
"properties": {
|
|
25
|
-
"node": {
|
|
53
|
+
"node": {
|
|
54
|
+
"const": ">=22.22 <26"
|
|
55
|
+
}
|
|
26
56
|
}
|
|
27
57
|
},
|
|
28
58
|
"surfaces": {
|
|
29
|
-
"type": "object",
|
|
30
59
|
"additionalProperties": false,
|
|
31
|
-
"
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": [
|
|
62
|
+
"cli",
|
|
63
|
+
"daemon"
|
|
64
|
+
],
|
|
32
65
|
"properties": {
|
|
33
|
-
"cli": {
|
|
66
|
+
"cli": {
|
|
67
|
+
"$ref": "#/$defs/surface"
|
|
68
|
+
},
|
|
34
69
|
"daemon": {
|
|
35
|
-
"type": "object",
|
|
36
70
|
"additionalProperties": false,
|
|
37
|
-
"required": ["packageName", "version", "entrypoint", "rpcSchemaVersion"],
|
|
38
|
-
"properties": {
|
|
39
|
-
"packageName": { "type": "string", "minLength": 1 },
|
|
40
|
-
"version": { "$ref": "#/$defs/semver" },
|
|
41
|
-
"entrypoint": { "type": "string", "minLength": 1 },
|
|
42
|
-
"rpcSchemaVersion": { "const": "archcontext.runtime-rpc/v2" }
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"mcp": {
|
|
46
71
|
"type": "object",
|
|
47
|
-
"
|
|
48
|
-
|
|
72
|
+
"required": [
|
|
73
|
+
"packageName",
|
|
74
|
+
"version",
|
|
75
|
+
"entrypoint",
|
|
76
|
+
"rpcSchemaVersion"
|
|
77
|
+
],
|
|
49
78
|
"properties": {
|
|
50
|
-
"packageName": {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
"packageName": {
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"version": {
|
|
84
|
+
"$ref": "#/$defs/semver"
|
|
85
|
+
},
|
|
86
|
+
"entrypoint": {
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"rpcSchemaVersion": {
|
|
91
|
+
"const": "archcontext.runtime-rpc/v2"
|
|
92
|
+
}
|
|
54
93
|
}
|
|
55
94
|
}
|
|
56
95
|
}
|
|
57
96
|
},
|
|
58
97
|
"schemas": {
|
|
59
|
-
"type": "object",
|
|
60
98
|
"additionalProperties": false,
|
|
61
|
-
"
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": [
|
|
101
|
+
"schemaSetVersion",
|
|
102
|
+
"contractsPackageVersion"
|
|
103
|
+
],
|
|
62
104
|
"properties": {
|
|
63
|
-
"schemaSetVersion": {
|
|
64
|
-
|
|
105
|
+
"schemaSetVersion": {
|
|
106
|
+
"minLength": 1,
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"contractsPackageVersion": {
|
|
110
|
+
"$ref": "#/$defs/semver"
|
|
111
|
+
}
|
|
65
112
|
}
|
|
66
113
|
},
|
|
67
114
|
"runtime": {
|
|
68
|
-
"type": "object",
|
|
69
115
|
"additionalProperties": false,
|
|
70
|
-
"
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": [
|
|
118
|
+
"localRpc",
|
|
119
|
+
"sqliteMigrations",
|
|
120
|
+
"codeGraph"
|
|
121
|
+
],
|
|
71
122
|
"properties": {
|
|
72
123
|
"localRpc": {
|
|
73
|
-
"type": "object",
|
|
74
124
|
"additionalProperties": false,
|
|
75
|
-
"
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": [
|
|
127
|
+
"schemaVersion",
|
|
128
|
+
"protocol"
|
|
129
|
+
],
|
|
76
130
|
"properties": {
|
|
77
|
-
"schemaVersion": {
|
|
78
|
-
|
|
131
|
+
"schemaVersion": {
|
|
132
|
+
"const": "archcontext.runtime-rpc/v2"
|
|
133
|
+
},
|
|
134
|
+
"protocol": {
|
|
135
|
+
"enum": [
|
|
136
|
+
"http-loopback"
|
|
137
|
+
]
|
|
138
|
+
}
|
|
79
139
|
}
|
|
80
140
|
},
|
|
81
|
-
"sqliteMigrations": {
|
|
141
|
+
"sqliteMigrations": {
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
82
145
|
"codeGraph": {
|
|
83
|
-
"type": "object",
|
|
84
146
|
"additionalProperties": false,
|
|
85
|
-
"
|
|
147
|
+
"type": "object",
|
|
148
|
+
"required": [
|
|
149
|
+
"packageName",
|
|
150
|
+
"requiredVersion",
|
|
151
|
+
"adapter"
|
|
152
|
+
],
|
|
86
153
|
"properties": {
|
|
87
|
-
"packageName": {
|
|
88
|
-
|
|
89
|
-
|
|
154
|
+
"packageName": {
|
|
155
|
+
"const": "@colbymchenry/codegraph"
|
|
156
|
+
},
|
|
157
|
+
"requiredVersion": {
|
|
158
|
+
"minLength": 1,
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"adapter": {
|
|
162
|
+
"enum": [
|
|
163
|
+
"codegraph-cli"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
90
166
|
}
|
|
91
167
|
}
|
|
92
168
|
}
|
|
@@ -94,17 +170,29 @@
|
|
|
94
170
|
},
|
|
95
171
|
"$defs": {
|
|
96
172
|
"semver": {
|
|
97
|
-
"
|
|
98
|
-
"
|
|
173
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$",
|
|
174
|
+
"type": "string"
|
|
99
175
|
},
|
|
100
176
|
"surface": {
|
|
101
|
-
"type": "object",
|
|
102
177
|
"additionalProperties": false,
|
|
103
|
-
"
|
|
178
|
+
"type": "object",
|
|
179
|
+
"required": [
|
|
180
|
+
"packageName",
|
|
181
|
+
"version",
|
|
182
|
+
"entrypoint"
|
|
183
|
+
],
|
|
104
184
|
"properties": {
|
|
105
|
-
"packageName": {
|
|
106
|
-
|
|
107
|
-
|
|
185
|
+
"packageName": {
|
|
186
|
+
"minLength": 1,
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"version": {
|
|
190
|
+
"$ref": "#/$defs/semver"
|
|
191
|
+
},
|
|
192
|
+
"entrypoint": {
|
|
193
|
+
"minLength": 1,
|
|
194
|
+
"type": "string"
|
|
195
|
+
}
|
|
108
196
|
}
|
|
109
197
|
}
|
|
110
198
|
}
|
|
@@ -3,8 +3,29 @@
|
|
|
3
3
|
"$id": "https://archcontext.dev/schemas/runtime/projection-slice.schema.json",
|
|
4
4
|
"title": "ProjectionSliceV1",
|
|
5
5
|
"description": "Read-only pull request projection of capability diagrams and entrypoint anchors from the same merge base and HEAD used to select changed paths.",
|
|
6
|
-
"type": "object",
|
|
7
6
|
"additionalProperties": false,
|
|
7
|
+
"if": {
|
|
8
|
+
"properties": {
|
|
9
|
+
"changed": {
|
|
10
|
+
"const": true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"then": {
|
|
15
|
+
"properties": {
|
|
16
|
+
"affectedCapabilities": {
|
|
17
|
+
"minItems": 1
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"else": {
|
|
22
|
+
"properties": {
|
|
23
|
+
"affectedCapabilities": {
|
|
24
|
+
"maxItems": 0
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"type": "object",
|
|
8
29
|
"required": [
|
|
9
30
|
"schemaVersion",
|
|
10
31
|
"base",
|
|
@@ -33,12 +54,12 @@
|
|
|
33
54
|
"$ref": "#/$defs/sha"
|
|
34
55
|
},
|
|
35
56
|
"changedPaths": {
|
|
36
|
-
"type": "array",
|
|
37
57
|
"uniqueItems": true,
|
|
58
|
+
"description": "Sorted union of paths changed between the merge base and HEAD and explicit changed path overrides.",
|
|
59
|
+
"type": "array",
|
|
38
60
|
"items": {
|
|
39
61
|
"$ref": "#/$defs/nonEmpty"
|
|
40
|
-
}
|
|
41
|
-
"description": "Sorted union of paths changed between the merge base and HEAD and explicit changed path overrides."
|
|
62
|
+
}
|
|
42
63
|
},
|
|
43
64
|
"changed": {
|
|
44
65
|
"type": "boolean"
|
|
@@ -53,39 +74,18 @@
|
|
|
53
74
|
"$ref": "#/$defs/nonEmpty"
|
|
54
75
|
}
|
|
55
76
|
},
|
|
56
|
-
"if": {
|
|
57
|
-
"properties": {
|
|
58
|
-
"changed": {
|
|
59
|
-
"const": true
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"then": {
|
|
64
|
-
"properties": {
|
|
65
|
-
"affectedCapabilities": {
|
|
66
|
-
"minItems": 1
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"else": {
|
|
71
|
-
"properties": {
|
|
72
|
-
"affectedCapabilities": {
|
|
73
|
-
"maxItems": 0
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
77
|
"$defs": {
|
|
78
78
|
"sha": {
|
|
79
|
-
"
|
|
80
|
-
"
|
|
79
|
+
"pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$",
|
|
80
|
+
"type": "string"
|
|
81
81
|
},
|
|
82
82
|
"nonEmpty": {
|
|
83
|
-
"
|
|
84
|
-
"
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"type": "string"
|
|
85
85
|
},
|
|
86
86
|
"capability": {
|
|
87
|
-
"type": "object",
|
|
88
87
|
"additionalProperties": false,
|
|
88
|
+
"type": "object",
|
|
89
89
|
"required": [
|
|
90
90
|
"capabilityId",
|
|
91
91
|
"modulePath",
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"$ref": "#/$defs/nonEmpty"
|
|
102
102
|
},
|
|
103
103
|
"diagramMermaid": {
|
|
104
|
+
"minLength": 1,
|
|
105
|
+
"description": "Unfenced Mermaid or null when the capability was removed or its P1 diagram is unprovable.",
|
|
104
106
|
"type": [
|
|
105
107
|
"string",
|
|
106
108
|
"null"
|
|
107
|
-
]
|
|
108
|
-
"minLength": 1,
|
|
109
|
-
"description": "Unfenced Mermaid or null when the capability was removed or its P1 diagram is unprovable."
|
|
109
|
+
]
|
|
110
110
|
},
|
|
111
111
|
"entrypoints": {
|
|
112
112
|
"type": "array",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"entrypoint": {
|
|
123
|
-
"type": "object",
|
|
124
123
|
"additionalProperties": false,
|
|
124
|
+
"type": "object",
|
|
125
125
|
"required": [
|
|
126
126
|
"nodeId",
|
|
127
127
|
"entrypointId",
|