archctx 0.2.3 → 0.4.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/assets/catalog.yaml +2 -2
- package/bin/archctx.mjs +20215 -10062
- package/package.json +2 -2
- package/schemas/repo/architecture-flow.schema.json +97 -0
- package/schemas/repo/architecture-node.schema.json +39 -2
- package/schemas/runtime/archctx-capabilities.schema.json +45 -0
- package/schemas/runtime/architecture-event.schema.json +172 -2
- package/schemas/runtime/architecture-refresh-signal.schema.json +88 -0
- package/schemas/runtime/architecture-snapshot.schema.json +37 -4
- package/schemas/runtime/changeset.schema.json +1 -1
- package/schemas/runtime/explorer-delta-query.schema.json +24 -0
- package/schemas/runtime/explorer-projection-delta.schema.json +79 -0
- package/schemas/runtime/explorer-projection-query-v2.schema.json +42 -0
- package/schemas/runtime/explorer-projection-v2.schema.json +538 -0
- package/schemas/runtime/projection-request.schema.json +61 -0
- package/schemas/runtime/projection-result.schema.json +162 -0
- package/schemas/runtime/explorer-projection.schema.json +0 -92
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archcontext.dev/schemas/runtime/projection-result.schema.json",
|
|
4
|
+
"title": "ProjectionResultV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "requestId", "status", "inputSnapshot", "outputSnapshot", "affectedNodeIds", "files", "humanActions", "refreshSignals", "receiptDigest"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.projection-result/v1" },
|
|
10
|
+
"requestId": { "type": "string", "pattern": "^[a-zA-Z0-9_.:-]+$", "minLength": 1 },
|
|
11
|
+
"status": { "enum": ["adoption-required", "applied", "blocked", "human-action-required", "noop", "permanent-failure", "planned", "retryable-failure"] },
|
|
12
|
+
"inputSnapshot": { "$ref": "#/$defs/snapshot" },
|
|
13
|
+
"outputSnapshot": { "$ref": "#/$defs/snapshot" },
|
|
14
|
+
"affectedNodeIds": { "type": "array", "uniqueItems": true, "description": "Canonical wire order is lexicographic and is enforced by projectionResultInvariantIssues.", "items": { "type": "string", "minLength": 1 } },
|
|
15
|
+
"files": { "type": "array", "description": "Canonical wire order is by path and is enforced by projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/file" } },
|
|
16
|
+
"humanActions": { "type": "array", "items": { "$ref": "#/$defs/humanAction" } },
|
|
17
|
+
"refreshSignals": { "type": "array", "description": "Canonical wire order is by signalId and cross-object receipt/snapshot bindings are enforced by projectionResultInvariantIssues.", "items": { "$ref": "#/$defs/refreshSignal" } },
|
|
18
|
+
"receiptDigest": { "$ref": "#/$defs/digest" }
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"if": { "properties": { "status": { "enum": ["adoption-required", "human-action-required"] } }, "required": ["status"] },
|
|
23
|
+
"then": { "properties": { "humanActions": { "minItems": 1 } } },
|
|
24
|
+
"else": { "properties": { "humanActions": { "maxItems": 0 } } }
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"$defs": {
|
|
28
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
29
|
+
"nullableDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
30
|
+
"snapshot": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["repositoryId", "workspaceId", "headSha", "baseHeadSha", "worktreeDigest", "sourceTreeDigest", "modelDigest", "codeGraphDigest", "indexedWorktreeDigest", "projectionInputDigest", "rendererVersion", "layoutVersion", "generatedFrom"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"repositoryId": { "type": "string", "minLength": 1 },
|
|
36
|
+
"workspaceId": { "type": "string", "minLength": 1 },
|
|
37
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
38
|
+
"baseHeadSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
39
|
+
"worktreeDigest": { "$ref": "#/$defs/digest" },
|
|
40
|
+
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
41
|
+
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
42
|
+
"codeGraphDigest": { "$ref": "#/$defs/digest" },
|
|
43
|
+
"indexedWorktreeDigest": { "$ref": "#/$defs/nullableDigest" },
|
|
44
|
+
"projectionInputDigest": { "$ref": "#/$defs/digest" },
|
|
45
|
+
"rendererVersion": { "const": "archcontext.docs-renderer/v2" },
|
|
46
|
+
"layoutVersion": { "const": "archcontext.docs-layout/v1" },
|
|
47
|
+
"generatedFrom": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["codeGraphPackage", "codeGraphVersion", "codeGraphBinaryDigest", "codeGraphStatus"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"codeGraphPackage": { "const": "@colbymchenry/codegraph" },
|
|
53
|
+
"codeGraphVersion": { "const": "1.5.0" },
|
|
54
|
+
"codeGraphBinaryDigest": { "$ref": "#/$defs/digest" },
|
|
55
|
+
"codeGraphStatus": { "enum": ["ready", "unavailable"] }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"file": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["path", "action", "preimageDigest", "outputDigest"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"path": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 1,
|
|
68
|
+
"not": { "anyOf": [{ "pattern": "^/" }, { "pattern": "\\\\" }, { "pattern": "(^|/)\\.\\.(/|$)" }] }
|
|
69
|
+
},
|
|
70
|
+
"action": { "enum": ["create", "delete", "unchanged", "update"] },
|
|
71
|
+
"preimageDigest": { "$ref": "#/$defs/nullableDigest" },
|
|
72
|
+
"outputDigest": { "$ref": "#/$defs/nullableDigest" }
|
|
73
|
+
},
|
|
74
|
+
"allOf": [
|
|
75
|
+
{
|
|
76
|
+
"if": { "properties": { "action": { "const": "create" } }, "required": ["action"] },
|
|
77
|
+
"then": { "properties": { "preimageDigest": { "const": null }, "outputDigest": { "$ref": "#/$defs/digest" } } }
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"if": { "properties": { "action": { "const": "delete" } }, "required": ["action"] },
|
|
81
|
+
"then": { "properties": { "preimageDigest": { "$ref": "#/$defs/digest" }, "outputDigest": { "const": null } } }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"if": { "properties": { "action": { "enum": ["unchanged", "update"] } }, "required": ["action"] },
|
|
85
|
+
"then": { "properties": { "preimageDigest": { "$ref": "#/$defs/digest" }, "outputDigest": { "$ref": "#/$defs/digest" } } }
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"humanAction": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": ["reasonCode", "affectedNodeIds", "requestPayloadDigest"],
|
|
93
|
+
"properties": {
|
|
94
|
+
"reasonCode": { "enum": ["adoption-required", "manual-region-conflict", "target-collision", "unprovable-required-flow", "unresolved-major-change"] },
|
|
95
|
+
"affectedNodeIds": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
96
|
+
"requestPayloadDigest": { "$ref": "#/$defs/digest" }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"digestSet": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["modelDigest", "sourceTreeDigest", "flowProofDigest", "projectionDigest"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"modelDigest": { "$ref": "#/$defs/digest" },
|
|
105
|
+
"sourceTreeDigest": { "$ref": "#/$defs/digest" },
|
|
106
|
+
"flowProofDigest": { "$ref": "#/$defs/digest" },
|
|
107
|
+
"projectionDigest": { "$ref": "#/$defs/digest" }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"reasonCode": {
|
|
111
|
+
"enum": ["constraint-changed", "entrypoint-changed", "interface-changed", "lifecycle-changed", "node-added", "node-moved", "node-removed", "node-renamed", "ownership-changed", "relation-changed", "responsibility-changed", "risk-boundary-changed", "verified-flow-proof-changed"]
|
|
112
|
+
},
|
|
113
|
+
"refreshSignal": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["schemaVersion", "signalId", "idempotencyKey", "mode", "repository", "worktree", "cause", "reasonCodes", "affectedNodeIds", "refreshTargets", "baseDigests", "resultingDigests", "projectionReceiptDigest"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"schemaVersion": { "const": "archcontext.architecture-refresh-signal/v1" },
|
|
119
|
+
"signalId": { "$ref": "#/$defs/digest" },
|
|
120
|
+
"idempotencyKey": { "$ref": "#/$defs/digest" },
|
|
121
|
+
"mode": { "enum": ["human-action-required", "refresh-required"] },
|
|
122
|
+
"repository": { "type": "object", "additionalProperties": false, "required": ["repositoryId"], "properties": { "repositoryId": { "type": "string", "minLength": 1 } } },
|
|
123
|
+
"worktree": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["workspaceId", "headSha", "worktreeDigest"],
|
|
127
|
+
"properties": {
|
|
128
|
+
"workspaceId": { "type": "string", "minLength": 1 },
|
|
129
|
+
"headSha": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
|
|
130
|
+
"worktreeDigest": { "$ref": "#/$defs/digest" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"cause": { "enum": ["accepted-semantic-delta", "unresolved-major-candidate", "verified-flow-proof-delta"] },
|
|
134
|
+
"acceptedChange": { "$ref": "#/$defs/acceptedChange" },
|
|
135
|
+
"reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
|
|
136
|
+
"affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
137
|
+
"refreshTargets": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["architecture-contract-context", "architecture-readiness", "architecture-request-index", "capability-context", "capability-index"] } },
|
|
138
|
+
"baseDigests": { "$ref": "#/$defs/digestSet" },
|
|
139
|
+
"resultingDigests": { "$ref": "#/$defs/digestSet" },
|
|
140
|
+
"projectionReceiptDigest": { "$ref": "#/$defs/digest" }
|
|
141
|
+
},
|
|
142
|
+
"allOf": [
|
|
143
|
+
{
|
|
144
|
+
"if": { "properties": { "cause": { "const": "unresolved-major-candidate" } }, "required": ["cause"] },
|
|
145
|
+
"then": { "properties": { "mode": { "const": "human-action-required" } }, "not": { "required": ["acceptedChange"] } },
|
|
146
|
+
"else": { "properties": { "mode": { "const": "refresh-required" } }, "required": ["acceptedChange"] }
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
"acceptedChange": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": ["changeSetId", "eventId", "reasonCodes", "affectedNodeIds"],
|
|
154
|
+
"properties": {
|
|
155
|
+
"changeSetId": { "type": "string", "minLength": 1 },
|
|
156
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
157
|
+
"reasonCodes": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/reasonCode" } },
|
|
158
|
+
"affectedNodeIds": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://archctx.repoharness.com/schemas/runtime/explorer-projection.schema.json",
|
|
4
|
-
"title": "ExplorerProjection",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": ["schemaVersion", "generatedAt", "repository", "nodes", "relations", "verification", "pressure", "interventions", "capabilities"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schemaVersion": { "const": "archcontext.explorer-projection/v1" },
|
|
10
|
-
"generatedAt": { "type": "string" },
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"additionalProperties": false,
|
|
14
|
-
"required": ["repositoryId", "headSha", "worktreeDigest"],
|
|
15
|
-
"properties": {
|
|
16
|
-
"repositoryId": { "type": "string" },
|
|
17
|
-
"headSha": { "type": "string" },
|
|
18
|
-
"worktreeDigest": { "type": "string" },
|
|
19
|
-
"modelDigest": { "type": "string" }
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"nodes": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"additionalProperties": false,
|
|
27
|
-
"required": ["id", "name", "kind", "verificationStatus", "pressure", "sourceSelectors"],
|
|
28
|
-
"properties": {
|
|
29
|
-
"id": { "type": "string" },
|
|
30
|
-
"name": { "type": "string" },
|
|
31
|
-
"kind": { "type": "string" },
|
|
32
|
-
"repositoryId": { "type": "string" },
|
|
33
|
-
"verificationStatus": { "type": "string", "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] },
|
|
34
|
-
"pressure": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"additionalProperties": false,
|
|
37
|
-
"required": ["level", "score", "signals"],
|
|
38
|
-
"properties": {
|
|
39
|
-
"level": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
40
|
-
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
41
|
-
"signals": { "type": "array", "items": { "type": "string" } }
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"sourceSelectors": {
|
|
45
|
-
"type": "array",
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "object",
|
|
48
|
-
"additionalProperties": false,
|
|
49
|
-
"required": ["path"],
|
|
50
|
-
"properties": {
|
|
51
|
-
"path": { "type": "string" },
|
|
52
|
-
"symbolId": { "type": "string" },
|
|
53
|
-
"startLine": { "type": "integer", "minimum": 1 },
|
|
54
|
-
"endLine": { "type": "integer", "minimum": 1 }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"relations": {
|
|
62
|
-
"type": "array",
|
|
63
|
-
"items": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"additionalProperties": false,
|
|
66
|
-
"required": ["id", "source", "target", "kind", "verificationStatus"],
|
|
67
|
-
"properties": {
|
|
68
|
-
"id": { "type": "string" },
|
|
69
|
-
"source": { "type": "string" },
|
|
70
|
-
"target": { "type": "string" },
|
|
71
|
-
"kind": { "type": "string" },
|
|
72
|
-
"verificationStatus": { "type": "string", "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] }
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
"landscape": { "type": "object", "additionalProperties": true },
|
|
77
|
-
"verification": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
78
|
-
"pressure": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
79
|
-
"interventions": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
|
|
80
|
-
"capabilities": {
|
|
81
|
-
"type": "object",
|
|
82
|
-
"additionalProperties": false,
|
|
83
|
-
"required": ["readOnly", "mutationMode", "egress", "tokenRequired"],
|
|
84
|
-
"properties": {
|
|
85
|
-
"readOnly": { "const": true },
|
|
86
|
-
"mutationMode": { "type": "string", "enum": ["forbidden"] },
|
|
87
|
-
"egress": { "type": "string", "enum": ["none"] },
|
|
88
|
-
"tokenRequired": { "type": "boolean" }
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|