archctx 0.2.2 → 0.3.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 +7944 -1382
- package/package.json +3 -4
- package/schemas/runtime/architecture-event.schema.json +172 -2
- package/schemas/runtime/architecture-snapshot.schema.json +37 -4
- 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/bin/codegraph.mjs +0 -6
- package/schemas/runtime/explorer-projection.schema.json +0 -92
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://archctx.repoharness.com/schemas/runtime/explorer-projection-v2.schema.json",
|
|
4
|
+
"title": "ExplorerProjectionV2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "view", "availableViews", "semanticLevel", "breadcrumbs", "cursor", "inputManifest", "occurrences", "relations", "page", "projectionDigest", "capabilities"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "archcontext.explorer-projection/v2" },
|
|
10
|
+
"view": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["id", "title", "question"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": { "enum": ["system-map", "task-impact", "drift-pressure", "data-flow", "external-integrations"] },
|
|
16
|
+
"title": { "type": "string" },
|
|
17
|
+
"question": { "type": "string" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"availableViews": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["id", "enabled"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"id": { "enum": ["system-map", "task-impact", "drift-pressure", "data-flow", "external-integrations"] },
|
|
28
|
+
"enabled": { "type": "boolean" },
|
|
29
|
+
"reason": { "type": "string" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"semanticLevel": { "enum": ["overview", "context", "detail"] },
|
|
34
|
+
"breadcrumbs": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["occurrenceId", "label"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"occurrenceId": { "type": "string" },
|
|
42
|
+
"label": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"cursor": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"oneOf": [
|
|
50
|
+
{ "required": ["authoritySource", "authorityCursor"], "properties": { "authoritySource": { "const": "git" }, "authorityCursor": { "const": null } } },
|
|
51
|
+
{ "required": ["authoritySource", "authorityCursor"], "properties": { "authoritySource": { "const": "ledger" }, "authorityCursor": { "$ref": "#/$defs/authorityCursor" } } }
|
|
52
|
+
],
|
|
53
|
+
"required": ["repository", "worktree", "authoritySource", "authorityCursor", "evidenceAuthorityCursor", "inputManifestDigest", "compatibilityDigest", "graphDigest", "evidenceStateDigest", "observedFactsDigest", "viewDefinitionDigest", "compilerVersion", "observedAvailability"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
59
|
+
"properties": {
|
|
60
|
+
"repositoryId": { "type": "string" },
|
|
61
|
+
"storageRepositoryId": { "type": "string" }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"worktree": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"workspaceId": { "type": "string" },
|
|
70
|
+
"storageWorkspaceId": { "type": "string" },
|
|
71
|
+
"branch": { "type": "string" },
|
|
72
|
+
"headSha": { "type": "string" },
|
|
73
|
+
"worktreeDigest": { "type": "string" }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"authoritySource": { "enum": ["git", "ledger"] },
|
|
77
|
+
"authorityCursor": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/authorityCursor" }] },
|
|
78
|
+
"evidenceAuthorityCursor": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/authorityCursor" }] },
|
|
79
|
+
"inputManifestDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
80
|
+
"compatibilityDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
81
|
+
"graphDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
82
|
+
"evidenceStateDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
83
|
+
"observedFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
84
|
+
"viewDefinitionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
85
|
+
"compilerVersion": { "const": "archcontext.explorer-view-compiler/v1" },
|
|
86
|
+
"taskSessionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
87
|
+
"observedAvailability": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["status"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"status": { "enum": ["ready", "unavailable"] },
|
|
93
|
+
"reasonCode": { "type": "string" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"inputManifest": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{ "required": ["authoritySource", "authorityCursor"], "properties": { "authoritySource": { "const": "git" }, "authorityCursor": { "const": null } } },
|
|
103
|
+
{ "required": ["authoritySource", "authorityCursor"], "properties": { "authoritySource": { "const": "ledger" }, "authorityCursor": { "$ref": "#/$defs/authorityCursor" } } }
|
|
104
|
+
],
|
|
105
|
+
"required": ["schemaVersion", "repository", "worktree", "authoritySource", "authorityCursor", "evidenceAuthorityCursor", "queryDigest", "graphDigest", "evidenceStateDigest", "observedFactsDigest", "observedAvailability", "bindingsDigest", "eventBacklinksDigest", "driftDigest", "pressureDigest", "taskSessionDigest", "readPlan", "readSet", "inputDomains", "viewDefinitionDigest", "compilerVersion", "tokenRequired", "compatibilityDigest", "manifestDigest"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"schemaVersion": { "const": "archcontext.projection-input-manifest/v1" },
|
|
108
|
+
"repository": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
112
|
+
"properties": {
|
|
113
|
+
"repositoryId": { "type": "string" },
|
|
114
|
+
"storageRepositoryId": { "type": "string" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"worktree": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
121
|
+
"properties": {
|
|
122
|
+
"workspaceId": { "type": "string" },
|
|
123
|
+
"storageWorkspaceId": { "type": "string" },
|
|
124
|
+
"branch": { "type": "string" },
|
|
125
|
+
"headSha": { "type": "string" },
|
|
126
|
+
"worktreeDigest": { "type": "string" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"authoritySource": { "enum": ["git", "ledger"] },
|
|
130
|
+
"authorityCursor": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/authorityCursor" }] },
|
|
131
|
+
"evidenceAuthorityCursor": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/authorityCursor" }] },
|
|
132
|
+
"queryDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
133
|
+
"graphDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
134
|
+
"evidenceStateDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
135
|
+
"observedFactsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
136
|
+
"observedAvailability": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["status"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"status": { "enum": ["ready", "unavailable"] },
|
|
142
|
+
"reasonCode": { "type": "string" }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"bindingsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
146
|
+
"eventBacklinksDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
147
|
+
"driftDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
148
|
+
"pressureDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
149
|
+
"taskSessionDigest": { "type": ["string", "null"], "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
150
|
+
"readPlan": { "$ref": "#/$defs/readPlan" },
|
|
151
|
+
"readSet": { "$ref": "#/$defs/readSet" },
|
|
152
|
+
"inputDomains": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["authority", "graph", "evidence", "observed", "bindings", "event-backlinks", "drift", "pressure", "task-session"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"authority": { "$ref": "#/$defs/inputDomain" },
|
|
158
|
+
"graph": { "$ref": "#/$defs/inputDomain" },
|
|
159
|
+
"evidence": { "$ref": "#/$defs/inputDomain" },
|
|
160
|
+
"observed": { "$ref": "#/$defs/inputDomain" },
|
|
161
|
+
"bindings": { "$ref": "#/$defs/inputDomain" },
|
|
162
|
+
"event-backlinks": { "$ref": "#/$defs/inputDomain" },
|
|
163
|
+
"drift": { "$ref": "#/$defs/inputDomain" },
|
|
164
|
+
"pressure": { "$ref": "#/$defs/inputDomain" },
|
|
165
|
+
"task-session": { "$ref": "#/$defs/inputDomain" }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"viewDefinitionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
169
|
+
"compilerVersion": { "const": "archcontext.explorer-view-compiler/v1" },
|
|
170
|
+
"tokenRequired": { "type": "boolean" },
|
|
171
|
+
"compatibilityDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
172
|
+
"manifestDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"occurrences": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"oneOf": [
|
|
179
|
+
{
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"required": ["occurrenceId", "role", "subjectRefs", "name", "kind", "childrenCount", "expandable", "verificationStatus", "authorityState", "pressure", "sourceSelectors", "provenance", "inspector", "backlinks"],
|
|
183
|
+
"properties": {
|
|
184
|
+
"occurrenceId": { "type": "string" },
|
|
185
|
+
"role": { "const": "subject" },
|
|
186
|
+
"parentOccurrenceId": { "type": "string" },
|
|
187
|
+
"subjectRefs": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"minItems": 1,
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["kind", "id"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"kind": { "enum": ["architecture-entity", "architecture-relation", "architecture-constraint", "code-symbol"] },
|
|
196
|
+
"id": { "type": "string" }
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"name": { "type": "string" },
|
|
201
|
+
"kind": { "type": "string" },
|
|
202
|
+
"childrenCount": { "type": "integer", "minimum": 0 },
|
|
203
|
+
"expandable": { "type": "boolean" },
|
|
204
|
+
"verificationStatus": { "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] },
|
|
205
|
+
"authorityState": { "enum": ["BOUND", "UNBOUND_OBSERVED", "DECLARED_UNOBSERVED"] },
|
|
206
|
+
"pressure": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"required": ["evaluated", "signals"],
|
|
210
|
+
"properties": {
|
|
211
|
+
"evaluated": { "type": "boolean" },
|
|
212
|
+
"level": { "enum": ["low", "medium", "high"] },
|
|
213
|
+
"score": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
214
|
+
"signals": { "type": "array", "items": { "type": "string" } },
|
|
215
|
+
"inputDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"sourceSelectors": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": ["path"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"path": { "type": "string" },
|
|
226
|
+
"symbolId": { "type": "string" },
|
|
227
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
228
|
+
"endLine": { "type": "integer", "minimum": 1 }
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"provenance": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"additionalProperties": false,
|
|
235
|
+
"required": ["declaredEntityIds", "observedSymbolIds", "evidenceBindingIds"],
|
|
236
|
+
"properties": {
|
|
237
|
+
"declaredEntityIds": { "type": "array", "items": { "type": "string" } },
|
|
238
|
+
"observedSymbolIds": { "type": "array", "items": { "type": "string" } },
|
|
239
|
+
"evidenceBindingIds": { "type": "array", "items": { "type": "string" } }
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"inspector": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"required": ["constraints", "decisions", "historyEvents", "sourceSelectors", "evidenceBindingIds"],
|
|
246
|
+
"properties": {
|
|
247
|
+
"summary": { "type": "string" },
|
|
248
|
+
"responsibility": { "type": "string" },
|
|
249
|
+
"constraints": {
|
|
250
|
+
"type": "array",
|
|
251
|
+
"items": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"required": ["id", "kind"],
|
|
255
|
+
"properties": { "id": { "type": "string" }, "kind": { "type": "string" }, "severity": { "type": "string" }, "summary": { "type": "string" } }
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"decisions": {
|
|
259
|
+
"type": "array",
|
|
260
|
+
"items": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"required": ["eventId"],
|
|
264
|
+
"properties": { "eventId": { "type": "string" }, "title": { "type": "string" }, "rationale": { "type": "string" } }
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"historyEvents": {
|
|
268
|
+
"type": "array",
|
|
269
|
+
"items": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"additionalProperties": false,
|
|
272
|
+
"required": ["eventId"],
|
|
273
|
+
"properties": { "eventId": { "type": "string" }, "title": { "type": "string" }, "rationale": { "type": "string" } }
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"sourceSelectors": { "type": "array", "items": { "$ref": "#/$defs/sourceSelector" } },
|
|
277
|
+
"evidenceBindingIds": { "type": "array", "items": { "type": "string" } }
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"backlinks": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"additionalProperties": false,
|
|
283
|
+
"required": ["appearsInViews", "affectedByTaskSessionIds", "constrainedByIds", "evidencedByBindingIds", "changedByEventIds", "decidedByEventIds", "incomingRelationIds", "outgoingRelationIds"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"appearsInViews": { "type": "array", "items": { "enum": ["system-map", "task-impact", "drift-pressure", "data-flow", "external-integrations"] } },
|
|
286
|
+
"affectedByTaskSessionIds": { "type": "array", "items": { "type": "string" } },
|
|
287
|
+
"constrainedByIds": { "type": "array", "items": { "type": "string" } },
|
|
288
|
+
"evidencedByBindingIds": { "type": "array", "items": { "type": "string" } },
|
|
289
|
+
"changedByEventIds": { "type": "array", "items": { "type": "string" } },
|
|
290
|
+
"decidedByEventIds": { "type": "array", "items": { "type": "string" } },
|
|
291
|
+
"incomingRelationIds": { "type": "array", "items": { "type": "string" } },
|
|
292
|
+
"outgoingRelationIds": { "type": "array", "items": { "type": "string" } }
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": ["occurrenceId", "role", "subjectRefs", "name", "kind", "childrenCount", "expandable", "verificationStatus", "authorityState", "pressure", "sourceSelectors", "provenance", "derivation"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"occurrenceId": { "type": "string" },
|
|
303
|
+
"role": { "const": "derived-group" },
|
|
304
|
+
"parentOccurrenceId": { "type": "string" },
|
|
305
|
+
"subjectRefs": { "const": [] },
|
|
306
|
+
"name": { "type": "string" },
|
|
307
|
+
"kind": { "type": "string" },
|
|
308
|
+
"childrenCount": { "type": "integer", "minimum": 0 },
|
|
309
|
+
"expandable": { "type": "boolean" },
|
|
310
|
+
"verificationStatus": { "const": "UNKNOWN" },
|
|
311
|
+
"authorityState": { "const": "DERIVED" },
|
|
312
|
+
"pressure": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"required": ["evaluated", "signals"],
|
|
316
|
+
"properties": {
|
|
317
|
+
"evaluated": { "const": false },
|
|
318
|
+
"signals": { "type": "array", "items": { "type": "string" } }
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"sourceSelectors": { "const": [] },
|
|
322
|
+
"provenance": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"additionalProperties": false,
|
|
325
|
+
"required": ["declaredEntityIds", "observedSymbolIds", "evidenceBindingIds"],
|
|
326
|
+
"properties": {
|
|
327
|
+
"declaredEntityIds": { "type": "array", "items": { "type": "string" } },
|
|
328
|
+
"observedSymbolIds": { "type": "array", "items": { "type": "string" } },
|
|
329
|
+
"evidenceBindingIds": { "type": "array", "items": { "type": "string" } }
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"derivation": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"required": ["ruleId", "inputDigest", "compilerVersion"],
|
|
336
|
+
"properties": {
|
|
337
|
+
"ruleId": { "type": "string" },
|
|
338
|
+
"inputDigest": { "type": "string" },
|
|
339
|
+
"compilerVersion": { "const": "archcontext.explorer-view-compiler/v1" }
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"relations": {
|
|
348
|
+
"type": "array",
|
|
349
|
+
"items": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"required": ["occurrenceId", "sourceOccurrenceId", "targetOccurrenceId", "kind", "verificationStatus", "provenance"],
|
|
353
|
+
"properties": {
|
|
354
|
+
"occurrenceId": { "type": "string" },
|
|
355
|
+
"sourceOccurrenceId": { "type": "string" },
|
|
356
|
+
"targetOccurrenceId": { "type": "string" },
|
|
357
|
+
"kind": { "type": "string" },
|
|
358
|
+
"verificationStatus": { "enum": ["MATCHED", "DRIFT", "UNKNOWN", "VERIFIED"] },
|
|
359
|
+
"provenance": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"additionalProperties": false,
|
|
362
|
+
"required": ["declaredRelationIds", "observedEdgeIds", "evidenceBindingIds"],
|
|
363
|
+
"properties": {
|
|
364
|
+
"declaredRelationIds": { "type": "array", "items": { "type": "string" } },
|
|
365
|
+
"observedEdgeIds": { "type": "array", "items": { "type": "string" } },
|
|
366
|
+
"evidenceBindingIds": { "type": "array", "items": { "type": "string" } }
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"page": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"additionalProperties": false,
|
|
375
|
+
"required": ["budget", "totalNodes", "totalRelations", "returnedNodes", "returnedRelations", "truncated", "omittedNodeCount", "omittedRelationCount"],
|
|
376
|
+
"properties": {
|
|
377
|
+
"budget": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"additionalProperties": false,
|
|
380
|
+
"required": ["maxNodes", "maxRelations"],
|
|
381
|
+
"properties": {
|
|
382
|
+
"maxNodes": { "type": "integer", "minimum": 1, "maximum": 1000 },
|
|
383
|
+
"maxRelations": { "type": "integer", "minimum": 0, "maximum": 5000 }
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
"totalNodes": { "type": "integer", "minimum": 0 },
|
|
387
|
+
"totalRelations": { "type": "integer", "minimum": 0 },
|
|
388
|
+
"returnedNodes": { "type": "integer", "minimum": 0 },
|
|
389
|
+
"returnedRelations": { "type": "integer", "minimum": 0 },
|
|
390
|
+
"truncated": { "type": "boolean" },
|
|
391
|
+
"omittedNodeCount": { "type": "integer", "minimum": 0 },
|
|
392
|
+
"omittedRelationCount": { "type": "integer", "minimum": 0 }
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"projectionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
396
|
+
"capabilities": {
|
|
397
|
+
"type": "object",
|
|
398
|
+
"additionalProperties": false,
|
|
399
|
+
"required": ["readOnly", "mutationMode", "egress", "tokenRequired"],
|
|
400
|
+
"properties": {
|
|
401
|
+
"readOnly": { "const": true },
|
|
402
|
+
"mutationMode": { "const": "forbidden" },
|
|
403
|
+
"egress": { "const": "none" },
|
|
404
|
+
"tokenRequired": { "type": "boolean" }
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"$defs": {
|
|
409
|
+
"readPlan": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"additionalProperties": false,
|
|
412
|
+
"required": ["schemaVersion", "plannerVersion", "kind", "source", "queryDigest", "semanticLevel", "focusSubjectId", "expandedKinds", "depth", "limits", "requiredDomains", "ordering", "truncation", "planDigest"],
|
|
413
|
+
"properties": {
|
|
414
|
+
"schemaVersion": { "const": "archcontext.projection-read-plan/v1" },
|
|
415
|
+
"plannerVersion": { "const": "archcontext.projection-read-planner/v1" },
|
|
416
|
+
"kind": { "enum": ["overview-aggregate", "bounded-context", "focused-neighborhood"] },
|
|
417
|
+
"source": { "enum": ["git-authority", "verified-ledger-current"] },
|
|
418
|
+
"queryDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
419
|
+
"semanticLevel": { "enum": ["overview", "context", "detail"] },
|
|
420
|
+
"focusSubjectId": { "type": ["string", "null"] },
|
|
421
|
+
"expandedKinds": { "type": "array", "items": { "type": "string" } },
|
|
422
|
+
"depth": { "type": "integer", "minimum": 0, "maximum": 2 },
|
|
423
|
+
"limits": {
|
|
424
|
+
"type": "object", "additionalProperties": false,
|
|
425
|
+
"required": ["maxEntities", "maxRelations", "maxConstraints", "maxBindings", "maxBacklinks", "maxGraphRows"],
|
|
426
|
+
"properties": {
|
|
427
|
+
"maxEntities": { "type": "integer", "minimum": 1 },
|
|
428
|
+
"maxRelations": { "type": "integer", "minimum": 0 },
|
|
429
|
+
"maxConstraints": { "type": "integer", "minimum": 1 },
|
|
430
|
+
"maxBindings": { "type": "integer", "minimum": 1 },
|
|
431
|
+
"maxBacklinks": { "type": "integer", "minimum": 1 },
|
|
432
|
+
"maxGraphRows": { "type": "integer", "minimum": 1 }
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
"requiredDomains": { "type": "array", "items": { "enum": ["authority", "graph", "evidence", "observed", "bindings", "event-backlinks", "drift", "pressure", "task-session"] } },
|
|
436
|
+
"ordering": { "const": "canonical-id-asc" },
|
|
437
|
+
"truncation": { "const": "hard-limit-with-authoritative-totals" },
|
|
438
|
+
"planDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"readSet": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"additionalProperties": false,
|
|
444
|
+
"required": ["schemaVersion", "planDigest", "selectedGraphDigest", "authoritativeTotals", "entityKindTotals", "rowsRead", "truncated", "readSetDigest"],
|
|
445
|
+
"properties": {
|
|
446
|
+
"schemaVersion": { "const": "archcontext.projection-read-set/v1" },
|
|
447
|
+
"planDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
448
|
+
"selectedGraphDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
449
|
+
"authoritativeTotals": { "$ref": "#/$defs/graphCounts" },
|
|
450
|
+
"entityKindTotals": {
|
|
451
|
+
"type": "array",
|
|
452
|
+
"items": { "type": "object", "additionalProperties": false, "required": ["kind", "count"], "properties": { "kind": { "type": "string" }, "count": { "type": "integer", "minimum": 0 } } }
|
|
453
|
+
},
|
|
454
|
+
"rowsRead": {
|
|
455
|
+
"type": "object", "additionalProperties": false,
|
|
456
|
+
"required": ["entities", "relations", "constraints", "bindings", "backlinks"],
|
|
457
|
+
"properties": {
|
|
458
|
+
"entities": { "type": "integer", "minimum": 0 }, "relations": { "type": "integer", "minimum": 0 },
|
|
459
|
+
"constraints": { "type": "integer", "minimum": 0 }, "bindings": { "type": "integer", "minimum": 0 },
|
|
460
|
+
"backlinks": { "type": "integer", "minimum": 0 }
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"truncated": { "type": "boolean" },
|
|
464
|
+
"readSetDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"graphCounts": {
|
|
468
|
+
"type": "object", "additionalProperties": false,
|
|
469
|
+
"required": ["entities", "relations", "constraints"],
|
|
470
|
+
"properties": { "entities": { "type": "integer", "minimum": 0 }, "relations": { "type": "integer", "minimum": 0 }, "constraints": { "type": "integer", "minimum": 0 } }
|
|
471
|
+
},
|
|
472
|
+
"inputDomain": {
|
|
473
|
+
"oneOf": [
|
|
474
|
+
{
|
|
475
|
+
"type": "object", "additionalProperties": false, "required": ["requirement", "status", "digest"],
|
|
476
|
+
"properties": { "requirement": { "const": "required" }, "status": { "const": "ready" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } }
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"type": "object", "additionalProperties": false, "required": ["requirement", "status", "digest"],
|
|
480
|
+
"properties": { "requirement": { "const": "optional" }, "status": { "const": "ready" }, "digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" } }
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"type": "object", "additionalProperties": false, "required": ["requirement", "status", "digest", "reasonCode"],
|
|
484
|
+
"properties": { "requirement": { "const": "optional" }, "status": { "const": "unavailable" }, "digest": { "const": null }, "reasonCode": { "type": "string", "minLength": 1 } }
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"type": "object", "additionalProperties": false, "required": ["requirement", "status", "digest"],
|
|
488
|
+
"properties": { "requirement": { "const": "not-used" }, "status": { "const": "not-used" }, "digest": { "const": null } }
|
|
489
|
+
}
|
|
490
|
+
]
|
|
491
|
+
},
|
|
492
|
+
"sourceSelector": {
|
|
493
|
+
"type": "object",
|
|
494
|
+
"additionalProperties": false,
|
|
495
|
+
"required": ["path"],
|
|
496
|
+
"properties": {
|
|
497
|
+
"path": { "type": "string" },
|
|
498
|
+
"symbolId": { "type": "string" },
|
|
499
|
+
"startLine": { "type": "integer", "minimum": 1 },
|
|
500
|
+
"endLine": { "type": "integer", "minimum": 1 }
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"authorityCursor": {
|
|
504
|
+
"type": "object",
|
|
505
|
+
"additionalProperties": false,
|
|
506
|
+
"required": ["schemaVersion", "repository", "worktree", "eventSequence", "eventId", "eventHash", "graphDigest", "evidenceStateDigest"],
|
|
507
|
+
"properties": {
|
|
508
|
+
"schemaVersion": { "const": "archcontext.authority-cursor/v1" },
|
|
509
|
+
"repository": {
|
|
510
|
+
"type": "object",
|
|
511
|
+
"additionalProperties": false,
|
|
512
|
+
"required": ["repositoryId", "storageRepositoryId"],
|
|
513
|
+
"properties": {
|
|
514
|
+
"repositoryId": { "type": "string" },
|
|
515
|
+
"storageRepositoryId": { "type": "string" }
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"worktree": {
|
|
519
|
+
"type": "object",
|
|
520
|
+
"additionalProperties": false,
|
|
521
|
+
"required": ["workspaceId", "storageWorkspaceId", "branch", "headSha", "worktreeDigest"],
|
|
522
|
+
"properties": {
|
|
523
|
+
"workspaceId": { "type": "string" },
|
|
524
|
+
"storageWorkspaceId": { "type": "string" },
|
|
525
|
+
"branch": { "type": "string" },
|
|
526
|
+
"headSha": { "type": "string" },
|
|
527
|
+
"worktreeDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"eventSequence": { "type": "integer", "minimum": 1 },
|
|
531
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
532
|
+
"eventHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
533
|
+
"graphDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
534
|
+
"evidenceStateDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
package/bin/codegraph.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
4
|
-
const require = createRequire(import.meta.url);
|
|
5
|
-
const packageJson = require.resolve("@colbymchenry/codegraph/package.json");
|
|
6
|
-
require(join(dirname(packageJson), "npm-shim.js"));
|
|
@@ -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
|
-
}
|