archctx-contracts 0.4.0 → 0.4.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "archcontext.capabilities/v1",
|
|
3
|
-
"package": { "name": "archctx", "version": "0.4.
|
|
3
|
+
"package": { "name": "archctx", "version": "0.4.2" },
|
|
4
4
|
"protocols": {
|
|
5
5
|
"projectionRequest": "archcontext.projection-request/v1",
|
|
6
6
|
"projectionResult": "archcontext.projection-result/v1",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": "archcontext.product-version-manifest/v1",
|
|
3
3
|
"product": {
|
|
4
4
|
"name": "archctx",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.2",
|
|
6
6
|
"distribution": "one-package"
|
|
7
7
|
},
|
|
8
8
|
"packageManager": "bun@1.3.10",
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
"surfaces": {
|
|
13
13
|
"cli": {
|
|
14
14
|
"packageName": "@archcontext/surfaces",
|
|
15
|
-
"version": "0.4.
|
|
15
|
+
"version": "0.4.2",
|
|
16
16
|
"entrypoint": "archctx"
|
|
17
17
|
},
|
|
18
18
|
"daemon": {
|
|
19
19
|
"packageName": "@archcontext/local-runtime",
|
|
20
|
-
"version": "0.4.
|
|
20
|
+
"version": "0.4.2",
|
|
21
21
|
"entrypoint": "archctx daemon start",
|
|
22
22
|
"rpcSchemaVersion": "archcontext.runtime-rpc/v1"
|
|
23
23
|
},
|
|
24
24
|
"mcp": {
|
|
25
25
|
"packageName": "@archcontext/surfaces",
|
|
26
|
-
"version": "0.4.
|
|
26
|
+
"version": "0.4.2",
|
|
27
27
|
"entrypoint": "archctx mcp",
|
|
28
28
|
"transport": "stdio"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"schemas": {
|
|
32
32
|
"schemaSetVersion": "2026-06-25.al0-ledger",
|
|
33
|
-
"contractsPackageVersion": "0.4.
|
|
33
|
+
"contractsPackageVersion": "0.4.2",
|
|
34
34
|
"reviewChallenge": "archcontext.review-challenge/v2",
|
|
35
35
|
"attestation": "archcontext.attestation/v2",
|
|
36
36
|
"deviceIdentity": "archcontext.device-identity/v1",
|
package/package.json
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"items": { "$ref": "#/$defs/repoPath" }
|
|
25
25
|
},
|
|
26
26
|
"expected": { "$ref": "#/$defs/expectedSnapshot" },
|
|
27
|
-
"adoptionPlanId": { "type": "string", "pattern": "^adoption_plan\\.[a-zA-Z0-9_.-]+$" }
|
|
27
|
+
"adoptionPlanId": { "type": "string", "pattern": "^adoption_plan\\.[a-zA-Z0-9_.-]+$" },
|
|
28
|
+
"acceptedChange": { "$ref": "#/$defs/acceptedChange" }
|
|
28
29
|
},
|
|
29
30
|
"allOf": [
|
|
30
31
|
{
|
|
@@ -46,6 +47,45 @@
|
|
|
46
47
|
]
|
|
47
48
|
}
|
|
48
49
|
},
|
|
50
|
+
"acceptedChange": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["changeSetId", "eventId", "reasonCodes", "affectedNodeIds"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"changeSetId": { "type": "string", "minLength": 1 },
|
|
56
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
57
|
+
"reasonCodes": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"uniqueItems": true,
|
|
61
|
+
"description": "Canonical wire order is lexicographic and is enforced by projectionRequestInvariantIssues.",
|
|
62
|
+
"items": {
|
|
63
|
+
"enum": [
|
|
64
|
+
"constraint-changed",
|
|
65
|
+
"entrypoint-changed",
|
|
66
|
+
"interface-changed",
|
|
67
|
+
"lifecycle-changed",
|
|
68
|
+
"node-added",
|
|
69
|
+
"node-moved",
|
|
70
|
+
"node-removed",
|
|
71
|
+
"node-renamed",
|
|
72
|
+
"ownership-changed",
|
|
73
|
+
"relation-changed",
|
|
74
|
+
"responsibility-changed",
|
|
75
|
+
"risk-boundary-changed",
|
|
76
|
+
"verified-flow-proof-changed"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"affectedNodeIds": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"minItems": 1,
|
|
83
|
+
"uniqueItems": true,
|
|
84
|
+
"description": "Canonical wire order is lexicographic and is enforced by projectionRequestInvariantIssues.",
|
|
85
|
+
"items": { "type": "string", "minLength": 1 }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
49
89
|
"expectedSnapshot": {
|
|
50
90
|
"type": "object",
|
|
51
91
|
"additionalProperties": false,
|
package/src/product-version.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const ARCHCONTEXT_PRODUCT_NAME = "archctx";
|
|
2
|
-
export const ARCHCONTEXT_PRODUCT_VERSION = "0.4.
|
|
2
|
+
export const ARCHCONTEXT_PRODUCT_VERSION = "0.4.2";
|
|
3
3
|
export const ARCHCONTEXT_PACKAGE_MANAGER = "bun@1.3.10";
|
|
4
4
|
export const ARCHCONTEXT_NODE_RANGE = ">=24 <26";
|
|
5
5
|
export const LOCAL_RUNTIME_RPC_SCHEMA_VERSION = "archcontext.runtime-rpc/v1";
|
package/src/projection.ts
CHANGED
|
@@ -79,6 +79,7 @@ export interface ProjectionRequestV1 {
|
|
|
79
79
|
changedPaths: string[];
|
|
80
80
|
expected: ProjectionExpectedSnapshotV1;
|
|
81
81
|
adoptionPlanId?: string;
|
|
82
|
+
acceptedChange?: AcceptedArchitectureChangeReferenceV1;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
export interface ProjectionSnapshotV1 extends ProjectionExpectedSnapshotV1 {
|
|
@@ -193,12 +194,31 @@ export function archctxCapabilities(packageVersion: string): ArchctxCapabilities
|
|
|
193
194
|
export function projectionRequestInvariantIssues(input: ProjectionRequestV1): string[] {
|
|
194
195
|
const issues = [
|
|
195
196
|
...sortedUniqueIssues("targets", input.targets),
|
|
196
|
-
...sortedUniqueIssues("changedPaths", input.changedPaths)
|
|
197
|
+
...sortedUniqueIssues("changedPaths", input.changedPaths),
|
|
198
|
+
...(input.acceptedChange
|
|
199
|
+
? [
|
|
200
|
+
...sortedUniqueIssues("acceptedChange.reasonCodes", input.acceptedChange.reasonCodes),
|
|
201
|
+
...sortedUniqueIssues("acceptedChange.affectedNodeIds", input.acceptedChange.affectedNodeIds)
|
|
202
|
+
]
|
|
203
|
+
: [])
|
|
197
204
|
];
|
|
198
205
|
if (input.targets.length === 0) issues.push("targets must contain at least one projection target");
|
|
199
206
|
if (!/^[a-zA-Z0-9_.:-]+$/.test(input.requestId)) issues.push("requestId must use the stable identifier character set");
|
|
200
207
|
if (input.mode === "adopt" && !input.adoptionPlanId) issues.push("adoptionPlanId is required when mode=adopt");
|
|
201
208
|
if (input.mode !== "adopt" && input.adoptionPlanId !== undefined) issues.push("adoptionPlanId is only allowed when mode=adopt");
|
|
209
|
+
if (input.acceptedChange) {
|
|
210
|
+
if (input.acceptedChange.changeSetId.trim() === "") issues.push("acceptedChange.changeSetId must not be empty");
|
|
211
|
+
if (input.acceptedChange.eventId.trim() === "") issues.push("acceptedChange.eventId must not be empty");
|
|
212
|
+
if (input.acceptedChange.reasonCodes.length === 0) issues.push("acceptedChange.reasonCodes must contain at least one reason");
|
|
213
|
+
if (input.acceptedChange.affectedNodeIds.length === 0) issues.push("acceptedChange.affectedNodeIds must contain at least one node");
|
|
214
|
+
const allowedReasons = new Set<string>(ARCHITECTURE_MAJOR_CHANGE_REASON_CODES);
|
|
215
|
+
for (const reason of input.acceptedChange.reasonCodes) {
|
|
216
|
+
if (!allowedReasons.has(reason)) issues.push(`acceptedChange.reasonCodes contains unsupported reason: ${reason}`);
|
|
217
|
+
}
|
|
218
|
+
for (const nodeId of input.acceptedChange.affectedNodeIds) {
|
|
219
|
+
if (nodeId.trim() === "") issues.push("acceptedChange.affectedNodeIds must not contain empty node ids");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
202
222
|
return issues;
|
|
203
223
|
}
|
|
204
224
|
|