semantic-atlas 0.1.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.
Files changed (175) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +172 -0
  2. package/.agents/skills/semantic-atlas/references/graph-patch.md +109 -0
  3. package/.agents/skills/semantic-atlas/references/result-routing.md +91 -0
  4. package/LICENSE +21 -0
  5. package/README.md +118 -0
  6. package/dist/business-flow/business-flow-derivation-service.d.ts +11 -0
  7. package/dist/business-flow/business-flow-derivation-service.d.ts.map +1 -0
  8. package/dist/business-flow/business-flow-derivation-service.js +151 -0
  9. package/dist/business-flow/business-flow-draft.d.ts +16 -0
  10. package/dist/business-flow/business-flow-draft.d.ts.map +1 -0
  11. package/dist/business-flow/business-flow-draft.js +150 -0
  12. package/dist/business-flow/framework-business-strategy.d.ts +7 -0
  13. package/dist/business-flow/framework-business-strategy.d.ts.map +1 -0
  14. package/dist/business-flow/framework-business-strategy.js +1 -0
  15. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +10 -0
  16. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +1 -0
  17. package/dist/business-flow/strategies/bullmq-business-strategy.js +79 -0
  18. package/dist/business-flow/strategies/called-operation-derivation.d.ts +13 -0
  19. package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +1 -0
  20. package/dist/business-flow/strategies/called-operation-derivation.js +32 -0
  21. package/dist/business-flow/strategies/graphql-business-strategy.d.ts +8 -0
  22. package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +1 -0
  23. package/dist/business-flow/strategies/graphql-business-strategy.js +65 -0
  24. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +8 -0
  25. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +1 -0
  26. package/dist/business-flow/strategies/nestjs-business-strategy.js +72 -0
  27. package/dist/business-flow/strategies/strategy-helpers.d.ts +32 -0
  28. package/dist/business-flow/strategies/strategy-helpers.d.ts.map +1 -0
  29. package/dist/business-flow/strategies/strategy-helpers.js +49 -0
  30. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +10 -0
  31. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +1 -0
  32. package/dist/business-flow/strategies/typeorm-business-strategy.js +136 -0
  33. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +5 -0
  34. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +1 -0
  35. package/dist/business-flow/strategies/verified-invariant-strategy.js +38 -0
  36. package/dist/business-flow/strategies/verified-test-strategy.d.ts +5 -0
  37. package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +1 -0
  38. package/dist/business-flow/strategies/verified-test-strategy.js +26 -0
  39. package/dist/business-flow/structural-flow-catalog.d.ts +21 -0
  40. package/dist/business-flow/structural-flow-catalog.d.ts.map +1 -0
  41. package/dist/business-flow/structural-flow-catalog.js +125 -0
  42. package/dist/business-flow/types.d.ts +51 -0
  43. package/dist/business-flow/types.d.ts.map +1 -0
  44. package/dist/business-flow/types.js +1 -0
  45. package/dist/cli/argument-parser.d.ts +3 -0
  46. package/dist/cli/argument-parser.d.ts.map +1 -0
  47. package/dist/cli/argument-parser.js +174 -0
  48. package/dist/cli/bin.d.ts +3 -0
  49. package/dist/cli/bin.d.ts.map +1 -0
  50. package/dist/cli/bin.js +23 -0
  51. package/dist/cli/cli-application.d.ts +38 -0
  52. package/dist/cli/cli-application.d.ts.map +1 -0
  53. package/dist/cli/cli-application.js +515 -0
  54. package/dist/cli/cli-error.d.ts +12 -0
  55. package/dist/cli/cli-error.d.ts.map +1 -0
  56. package/dist/cli/cli-error.js +44 -0
  57. package/dist/cli/cli-presenter.d.ts +14 -0
  58. package/dist/cli/cli-presenter.d.ts.map +1 -0
  59. package/dist/cli/cli-presenter.js +36 -0
  60. package/dist/cli/main.d.ts +3 -0
  61. package/dist/cli/main.d.ts.map +1 -0
  62. package/dist/cli/main.js +45 -0
  63. package/dist/cli/types.d.ts +46 -0
  64. package/dist/cli/types.d.ts.map +1 -0
  65. package/dist/cli/types.js +1 -0
  66. package/dist/contracts/cli.d.ts +2139 -0
  67. package/dist/contracts/cli.d.ts.map +1 -0
  68. package/dist/contracts/cli.js +232 -0
  69. package/dist/contracts/graph.d.ts +262 -0
  70. package/dist/contracts/graph.d.ts.map +1 -0
  71. package/dist/contracts/graph.js +182 -0
  72. package/dist/contracts/identifiers.d.ts +4 -0
  73. package/dist/contracts/identifiers.d.ts.map +1 -0
  74. package/dist/contracts/identifiers.js +7 -0
  75. package/dist/contracts/public-contracts.d.ts +4 -0
  76. package/dist/contracts/public-contracts.d.ts.map +1 -0
  77. package/dist/contracts/public-contracts.js +3 -0
  78. package/dist/evaluation/comparison.d.ts +30 -0
  79. package/dist/evaluation/comparison.d.ts.map +1 -0
  80. package/dist/evaluation/comparison.js +108 -0
  81. package/dist/evaluation/contracts.d.ts +204 -0
  82. package/dist/evaluation/contracts.d.ts.map +1 -0
  83. package/dist/evaluation/contracts.js +269 -0
  84. package/dist/graph/graph-store.d.ts +47 -0
  85. package/dist/graph/graph-store.d.ts.map +1 -0
  86. package/dist/graph/graph-store.js +719 -0
  87. package/dist/graph/types.d.ts +168 -0
  88. package/dist/graph/types.d.ts.map +1 -0
  89. package/dist/graph/types.js +1 -0
  90. package/dist/index.d.ts +19 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +9 -0
  93. package/dist/knowledge/business-knowledge-service.d.ts +24 -0
  94. package/dist/knowledge/business-knowledge-service.d.ts.map +1 -0
  95. package/dist/knowledge/business-knowledge-service.js +200 -0
  96. package/dist/knowledge/graph-patch-conflict-error.d.ts +8 -0
  97. package/dist/knowledge/graph-patch-conflict-error.d.ts.map +1 -0
  98. package/dist/knowledge/graph-patch-conflict-error.js +12 -0
  99. package/dist/knowledge/structural-target-binding.d.ts +14 -0
  100. package/dist/knowledge/structural-target-binding.d.ts.map +1 -0
  101. package/dist/knowledge/structural-target-binding.js +11 -0
  102. package/dist/repository/git-command.d.ts +3 -0
  103. package/dist/repository/git-command.d.ts.map +1 -0
  104. package/dist/repository/git-command.js +25 -0
  105. package/dist/repository/repository-inspector.d.ts +7 -0
  106. package/dist/repository/repository-inspector.d.ts.map +1 -0
  107. package/dist/repository/repository-inspector.js +84 -0
  108. package/dist/repository/repository-language-support.d.ts +14 -0
  109. package/dist/repository/repository-language-support.d.ts.map +1 -0
  110. package/dist/repository/repository-language-support.js +64 -0
  111. package/dist/repository/types.d.ts +9 -0
  112. package/dist/repository/types.d.ts.map +1 -0
  113. package/dist/repository/types.js +1 -0
  114. package/dist/snapshots/repository-snapshot.d.ts +4 -0
  115. package/dist/snapshots/repository-snapshot.d.ts.map +1 -0
  116. package/dist/snapshots/repository-snapshot.js +119 -0
  117. package/dist/snapshots/types.d.ts +30 -0
  118. package/dist/snapshots/types.d.ts.map +1 -0
  119. package/dist/snapshots/types.js +1 -0
  120. package/dist/storage/atlas-database.d.ts +14 -0
  121. package/dist/storage/atlas-database.d.ts.map +1 -0
  122. package/dist/storage/atlas-database.js +552 -0
  123. package/dist/storage/snapshot-store.d.ts +19 -0
  124. package/dist/storage/snapshot-store.d.ts.map +1 -0
  125. package/dist/storage/snapshot-store.js +77 -0
  126. package/dist/structural-backend/codegraph-backend.d.ts +54 -0
  127. package/dist/structural-backend/codegraph-backend.d.ts.map +1 -0
  128. package/dist/structural-backend/codegraph-backend.js +1224 -0
  129. package/dist/structural-backend/codegraph-worker-client.d.ts +5 -0
  130. package/dist/structural-backend/codegraph-worker-client.d.ts.map +1 -0
  131. package/dist/structural-backend/codegraph-worker-client.js +118 -0
  132. package/dist/structural-backend/codegraph-worker-protocol.d.ts +35 -0
  133. package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +1 -0
  134. package/dist/structural-backend/codegraph-worker-protocol.js +1 -0
  135. package/dist/structural-backend/codegraph-worker.d.ts +2 -0
  136. package/dist/structural-backend/codegraph-worker.d.ts.map +1 -0
  137. package/dist/structural-backend/codegraph-worker.js +131 -0
  138. package/dist/structural-backend/process-instance.d.ts +18 -0
  139. package/dist/structural-backend/process-instance.d.ts.map +1 -0
  140. package/dist/structural-backend/process-instance.js +207 -0
  141. package/dist/structural-backend/structural-fact-changes.d.ts +7 -0
  142. package/dist/structural-backend/structural-fact-changes.d.ts.map +1 -0
  143. package/dist/structural-backend/structural-fact-changes.js +78 -0
  144. package/dist/structural-backend/structural-publication.d.ts +12 -0
  145. package/dist/structural-backend/structural-publication.d.ts.map +1 -0
  146. package/dist/structural-backend/structural-publication.js +252 -0
  147. package/dist/structural-backend/structural-write-lock.d.ts +8 -0
  148. package/dist/structural-backend/structural-write-lock.d.ts.map +1 -0
  149. package/dist/structural-backend/structural-write-lock.js +415 -0
  150. package/dist/structural-backend/types.d.ts +144 -0
  151. package/dist/structural-backend/types.d.ts.map +1 -0
  152. package/dist/structural-backend/types.js +11 -0
  153. package/dist/world/types.d.ts +77 -0
  154. package/dist/world/types.d.ts.map +1 -0
  155. package/dist/world/types.js +1 -0
  156. package/dist/world/world-graph-query.d.ts +31 -0
  157. package/dist/world/world-graph-query.d.ts.map +1 -0
  158. package/dist/world/world-graph-query.js +453 -0
  159. package/dist/world/world-model-service.d.ts +21 -0
  160. package/dist/world/world-model-service.d.ts.map +1 -0
  161. package/dist/world/world-model-service.js +211 -0
  162. package/dist/world/world-snapshot-store.d.ts +40 -0
  163. package/dist/world/world-snapshot-store.d.ts.map +1 -0
  164. package/dist/world/world-snapshot-store.js +555 -0
  165. package/docs/architecture/codegraph-backend.md +193 -0
  166. package/docs/contracts/cli-v1.md +119 -0
  167. package/docs/contracts/graph-model.md +102 -0
  168. package/docs/contracts/graph-patch-v1.md +98 -0
  169. package/docs/evaluation.md +128 -0
  170. package/docs/product-contract.md +148 -0
  171. package/package.json +78 -0
  172. package/schemas/cli-envelope-v1.schema.json +1359 -0
  173. package/schemas/evaluation-plan-v1.schema.json +211 -0
  174. package/schemas/evaluation-run-v1.schema.json +365 -0
  175. package/schemas/graph-patch-v1.schema.json +392 -0
@@ -0,0 +1,1359 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/lzj960515/semantic-atlas/main/schemas/cli-envelope-v1.schema.json",
4
+ "title": "Semantic Atlas CLI envelope v1",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "repository": {
14
+ "$ref": "#/$defs/__schema0"
15
+ },
16
+ "snapshot": {
17
+ "anyOf": [
18
+ {
19
+ "$ref": "#/$defs/__schema3"
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ },
26
+ "status": {
27
+ "type": "string",
28
+ "enum": [
29
+ "ok",
30
+ "partial"
31
+ ]
32
+ },
33
+ "data": {
34
+ "oneOf": [
35
+ {
36
+ "type": "object",
37
+ "properties": {
38
+ "command": {
39
+ "type": "string",
40
+ "const": "status"
41
+ },
42
+ "currentRevision": {
43
+ "type": "object",
44
+ "properties": {
45
+ "headCommit": {
46
+ "$ref": "#/$defs/__schema2"
47
+ },
48
+ "changes": {
49
+ "type": "object",
50
+ "properties": {
51
+ "staged": {
52
+ "$ref": "#/$defs/__schema4"
53
+ },
54
+ "unstaged": {
55
+ "$ref": "#/$defs/__schema4"
56
+ },
57
+ "untracked": {
58
+ "$ref": "#/$defs/__schema4"
59
+ }
60
+ },
61
+ "required": [
62
+ "staged",
63
+ "unstaged",
64
+ "untracked"
65
+ ],
66
+ "additionalProperties": {}
67
+ }
68
+ },
69
+ "required": [
70
+ "headCommit",
71
+ "changes"
72
+ ],
73
+ "additionalProperties": {}
74
+ },
75
+ "freshness": {
76
+ "type": "string",
77
+ "enum": [
78
+ "current",
79
+ "stale",
80
+ "missing"
81
+ ]
82
+ },
83
+ "storeLocation": {
84
+ "type": "string",
85
+ "minLength": 1
86
+ },
87
+ "languages": {
88
+ "type": "array",
89
+ "items": {
90
+ "oneOf": [
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "language": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "support": {
99
+ "type": "string",
100
+ "const": "supported"
101
+ }
102
+ },
103
+ "required": [
104
+ "language",
105
+ "support"
106
+ ],
107
+ "additionalProperties": {}
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "language": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ },
116
+ "support": {
117
+ "type": "string",
118
+ "const": "unsupported"
119
+ },
120
+ "reason": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ }
124
+ },
125
+ "required": [
126
+ "language",
127
+ "support",
128
+ "reason"
129
+ ],
130
+ "additionalProperties": {}
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ },
136
+ "required": [
137
+ "command",
138
+ "currentRevision",
139
+ "freshness",
140
+ "storeLocation",
141
+ "languages"
142
+ ],
143
+ "additionalProperties": {}
144
+ },
145
+ {
146
+ "type": "object",
147
+ "properties": {
148
+ "command": {
149
+ "type": "string",
150
+ "const": "index"
151
+ },
152
+ "snapshotId": {
153
+ "$ref": "#/$defs/__schema1"
154
+ },
155
+ "facts": {
156
+ "type": "object",
157
+ "properties": {
158
+ "added": {
159
+ "$ref": "#/$defs/__schema4"
160
+ },
161
+ "changed": {
162
+ "$ref": "#/$defs/__schema4"
163
+ },
164
+ "reused": {
165
+ "$ref": "#/$defs/__schema4"
166
+ },
167
+ "removed": {
168
+ "$ref": "#/$defs/__schema4"
169
+ }
170
+ },
171
+ "required": [
172
+ "added",
173
+ "changed",
174
+ "reused",
175
+ "removed"
176
+ ],
177
+ "additionalProperties": {}
178
+ },
179
+ "unknowns": {
180
+ "type": "object",
181
+ "properties": {
182
+ "added": {
183
+ "$ref": "#/$defs/__schema4"
184
+ },
185
+ "resolved": {
186
+ "$ref": "#/$defs/__schema4"
187
+ },
188
+ "total": {
189
+ "$ref": "#/$defs/__schema4"
190
+ }
191
+ },
192
+ "required": [
193
+ "added",
194
+ "resolved",
195
+ "total"
196
+ ],
197
+ "additionalProperties": {}
198
+ }
199
+ },
200
+ "required": [
201
+ "command",
202
+ "snapshotId",
203
+ "facts",
204
+ "unknowns"
205
+ ],
206
+ "additionalProperties": {}
207
+ },
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "command": {
212
+ "type": "string",
213
+ "const": "map.roots"
214
+ },
215
+ "nodes": {
216
+ "type": "array",
217
+ "items": {
218
+ "anyOf": [
219
+ {
220
+ "type": "object",
221
+ "properties": {
222
+ "domain": {
223
+ "$ref": "#/$defs/__schema5"
224
+ },
225
+ "id": {
226
+ "$ref": "#/$defs/__schema6"
227
+ },
228
+ "kind": {
229
+ "type": "string",
230
+ "const": "Module"
231
+ },
232
+ "label": {
233
+ "$ref": "#/$defs/__schema7"
234
+ },
235
+ "validity": {
236
+ "$ref": "#/$defs/__schema8"
237
+ },
238
+ "locations": {
239
+ "$ref": "#/$defs/__schema9"
240
+ },
241
+ "support": {
242
+ "$ref": "#/$defs/__schema14"
243
+ }
244
+ },
245
+ "required": [
246
+ "domain",
247
+ "id",
248
+ "kind",
249
+ "label",
250
+ "validity",
251
+ "locations",
252
+ "support"
253
+ ],
254
+ "additionalProperties": {
255
+ "$ref": "#/$defs/__schema15"
256
+ }
257
+ },
258
+ {
259
+ "type": "object",
260
+ "properties": {
261
+ "domain": {
262
+ "$ref": "#/$defs/__schema16"
263
+ },
264
+ "key": {
265
+ "$ref": "#/$defs/__schema17"
266
+ },
267
+ "kind": {
268
+ "type": "string",
269
+ "const": "Capability"
270
+ },
271
+ "label": {
272
+ "$ref": "#/$defs/__schema18"
273
+ },
274
+ "summary": {
275
+ "$ref": "#/$defs/__schema19"
276
+ },
277
+ "aliases": {
278
+ "$ref": "#/$defs/__schema20"
279
+ },
280
+ "certainty": {
281
+ "$ref": "#/$defs/__schema21"
282
+ },
283
+ "validity": {
284
+ "$ref": "#/$defs/__schema8"
285
+ },
286
+ "evidence": {
287
+ "$ref": "#/$defs/__schema22"
288
+ }
289
+ },
290
+ "required": [
291
+ "domain",
292
+ "key",
293
+ "kind",
294
+ "label",
295
+ "summary",
296
+ "aliases",
297
+ "certainty",
298
+ "validity",
299
+ "evidence"
300
+ ],
301
+ "additionalProperties": {
302
+ "$ref": "#/$defs/__schema24"
303
+ }
304
+ }
305
+ ]
306
+ }
307
+ }
308
+ },
309
+ "required": [
310
+ "command",
311
+ "nodes"
312
+ ],
313
+ "additionalProperties": {}
314
+ },
315
+ {
316
+ "type": "object",
317
+ "properties": {
318
+ "command": {
319
+ "type": "string",
320
+ "const": "map.children"
321
+ },
322
+ "nodeId": {
323
+ "type": "string",
324
+ "minLength": 1
325
+ },
326
+ "children": {
327
+ "type": "array",
328
+ "items": {
329
+ "$ref": "#/$defs/__schema25"
330
+ }
331
+ }
332
+ },
333
+ "required": [
334
+ "command",
335
+ "nodeId",
336
+ "children"
337
+ ],
338
+ "additionalProperties": {}
339
+ },
340
+ {
341
+ "type": "object",
342
+ "properties": {
343
+ "command": {
344
+ "type": "string",
345
+ "const": "map.search"
346
+ },
347
+ "query": {
348
+ "type": "string",
349
+ "minLength": 1
350
+ },
351
+ "limit": {
352
+ "type": "integer",
353
+ "exclusiveMinimum": 0,
354
+ "maximum": 9007199254740991
355
+ },
356
+ "results": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "object",
360
+ "properties": {
361
+ "score": {
362
+ "type": "number",
363
+ "minimum": 0,
364
+ "maximum": 1
365
+ },
366
+ "node": {
367
+ "$ref": "#/$defs/__schema25"
368
+ }
369
+ },
370
+ "required": [
371
+ "score",
372
+ "node"
373
+ ],
374
+ "additionalProperties": {}
375
+ }
376
+ }
377
+ },
378
+ "required": [
379
+ "command",
380
+ "query",
381
+ "limit",
382
+ "results"
383
+ ],
384
+ "additionalProperties": {}
385
+ },
386
+ {
387
+ "type": "object",
388
+ "properties": {
389
+ "command": {
390
+ "type": "string",
391
+ "const": "map.show"
392
+ },
393
+ "node": {
394
+ "$ref": "#/$defs/__schema25"
395
+ },
396
+ "depth": {
397
+ "type": "integer",
398
+ "minimum": 1,
399
+ "maximum": 3
400
+ },
401
+ "neighbors": {
402
+ "type": "array",
403
+ "items": {
404
+ "anyOf": [
405
+ {
406
+ "type": "object",
407
+ "properties": {
408
+ "type": {
409
+ "type": "string",
410
+ "enum": [
411
+ "contains",
412
+ "declares",
413
+ "imports",
414
+ "exports",
415
+ "references",
416
+ "calls",
417
+ "extends",
418
+ "implements",
419
+ "instantiates",
420
+ "decorated_by"
421
+ ]
422
+ },
423
+ "direction": {
424
+ "type": "string",
425
+ "enum": [
426
+ "incoming",
427
+ "outgoing"
428
+ ]
429
+ },
430
+ "node": {
431
+ "$ref": "#/$defs/__schema25"
432
+ },
433
+ "certainty": {
434
+ "type": "null"
435
+ },
436
+ "validity": {
437
+ "$ref": "#/$defs/__schema8"
438
+ },
439
+ "evidence": {
440
+ "type": "array",
441
+ "items": {
442
+ "$ref": "#/$defs/__schema23"
443
+ }
444
+ },
445
+ "support": {
446
+ "$ref": "#/$defs/__schema14"
447
+ }
448
+ },
449
+ "required": [
450
+ "type",
451
+ "direction",
452
+ "node",
453
+ "certainty",
454
+ "validity",
455
+ "evidence",
456
+ "support"
457
+ ],
458
+ "additionalProperties": {}
459
+ },
460
+ {
461
+ "type": "object",
462
+ "properties": {
463
+ "type": {
464
+ "type": "string",
465
+ "enum": [
466
+ "part_of",
467
+ "invokes",
468
+ "realized_by",
469
+ "reads",
470
+ "writes",
471
+ "publishes",
472
+ "consumes",
473
+ "constrained_by",
474
+ "verified_by"
475
+ ]
476
+ },
477
+ "direction": {
478
+ "type": "string",
479
+ "enum": [
480
+ "incoming",
481
+ "outgoing"
482
+ ]
483
+ },
484
+ "node": {
485
+ "$ref": "#/$defs/__schema25"
486
+ },
487
+ "certainty": {
488
+ "$ref": "#/$defs/__schema21"
489
+ },
490
+ "validity": {
491
+ "$ref": "#/$defs/__schema8"
492
+ },
493
+ "evidence": {
494
+ "minItems": 1,
495
+ "type": "array",
496
+ "items": {
497
+ "$ref": "#/$defs/__schema23"
498
+ }
499
+ }
500
+ },
501
+ "required": [
502
+ "type",
503
+ "direction",
504
+ "node",
505
+ "certainty",
506
+ "validity",
507
+ "evidence"
508
+ ],
509
+ "additionalProperties": {}
510
+ }
511
+ ]
512
+ }
513
+ },
514
+ "invariants": {
515
+ "type": "array",
516
+ "items": {
517
+ "type": "object",
518
+ "properties": {
519
+ "domain": {
520
+ "$ref": "#/$defs/__schema16"
521
+ },
522
+ "key": {
523
+ "$ref": "#/$defs/__schema17"
524
+ },
525
+ "kind": {
526
+ "type": "string",
527
+ "const": "Invariant"
528
+ },
529
+ "label": {
530
+ "$ref": "#/$defs/__schema18"
531
+ },
532
+ "summary": {
533
+ "$ref": "#/$defs/__schema19"
534
+ },
535
+ "aliases": {
536
+ "$ref": "#/$defs/__schema20"
537
+ },
538
+ "certainty": {
539
+ "$ref": "#/$defs/__schema21"
540
+ },
541
+ "validity": {
542
+ "$ref": "#/$defs/__schema8"
543
+ },
544
+ "evidence": {
545
+ "$ref": "#/$defs/__schema22"
546
+ }
547
+ },
548
+ "required": [
549
+ "domain",
550
+ "key",
551
+ "kind",
552
+ "label",
553
+ "summary",
554
+ "aliases",
555
+ "certainty",
556
+ "validity",
557
+ "evidence"
558
+ ],
559
+ "additionalProperties": {
560
+ "$ref": "#/$defs/__schema24"
561
+ }
562
+ }
563
+ },
564
+ "tests": {
565
+ "type": "array",
566
+ "items": {
567
+ "type": "object",
568
+ "properties": {
569
+ "domain": {
570
+ "$ref": "#/$defs/__schema5"
571
+ },
572
+ "id": {
573
+ "$ref": "#/$defs/__schema6"
574
+ },
575
+ "kind": {
576
+ "type": "string",
577
+ "enum": [
578
+ "Symbol",
579
+ "Test"
580
+ ]
581
+ },
582
+ "label": {
583
+ "$ref": "#/$defs/__schema7"
584
+ },
585
+ "validity": {
586
+ "$ref": "#/$defs/__schema8"
587
+ },
588
+ "locations": {
589
+ "$ref": "#/$defs/__schema9"
590
+ },
591
+ "support": {
592
+ "$ref": "#/$defs/__schema14"
593
+ }
594
+ },
595
+ "required": [
596
+ "domain",
597
+ "id",
598
+ "kind",
599
+ "label",
600
+ "validity",
601
+ "locations",
602
+ "support"
603
+ ],
604
+ "additionalProperties": {
605
+ "$ref": "#/$defs/__schema15"
606
+ }
607
+ }
608
+ },
609
+ "unknowns": {
610
+ "type": "array",
611
+ "items": {
612
+ "$ref": "#/$defs/__schema26"
613
+ }
614
+ }
615
+ },
616
+ "required": [
617
+ "command",
618
+ "node",
619
+ "depth",
620
+ "neighbors",
621
+ "invariants",
622
+ "tests",
623
+ "unknowns"
624
+ ],
625
+ "additionalProperties": {}
626
+ },
627
+ {
628
+ "type": "object",
629
+ "properties": {
630
+ "command": {
631
+ "type": "string",
632
+ "const": "learn"
633
+ },
634
+ "baseSnapshotId": {
635
+ "$ref": "#/$defs/__schema1"
636
+ },
637
+ "snapshotId": {
638
+ "$ref": "#/$defs/__schema1"
639
+ },
640
+ "applied": {
641
+ "type": "object",
642
+ "properties": {
643
+ "nodeOperations": {
644
+ "$ref": "#/$defs/__schema4"
645
+ },
646
+ "relationOperations": {
647
+ "$ref": "#/$defs/__schema4"
648
+ }
649
+ },
650
+ "required": [
651
+ "nodeOperations",
652
+ "relationOperations"
653
+ ],
654
+ "additionalProperties": {}
655
+ }
656
+ },
657
+ "required": [
658
+ "command",
659
+ "baseSnapshotId",
660
+ "snapshotId",
661
+ "applied"
662
+ ],
663
+ "additionalProperties": {}
664
+ },
665
+ {
666
+ "type": "object",
667
+ "properties": {
668
+ "command": {
669
+ "type": "string",
670
+ "const": "changes"
671
+ },
672
+ "fromSnapshotId": {
673
+ "$ref": "#/$defs/__schema1"
674
+ },
675
+ "toSnapshotId": {
676
+ "$ref": "#/$defs/__schema1"
677
+ },
678
+ "nodes": {
679
+ "$ref": "#/$defs/__schema27"
680
+ },
681
+ "relations": {
682
+ "$ref": "#/$defs/__schema27"
683
+ },
684
+ "staleAssertions": {
685
+ "type": "array",
686
+ "items": {
687
+ "type": "string",
688
+ "minLength": 1
689
+ }
690
+ }
691
+ },
692
+ "required": [
693
+ "command",
694
+ "fromSnapshotId",
695
+ "toSnapshotId",
696
+ "nodes",
697
+ "relations",
698
+ "staleAssertions"
699
+ ],
700
+ "additionalProperties": {}
701
+ }
702
+ ]
703
+ },
704
+ "warnings": {
705
+ "type": "array",
706
+ "items": {
707
+ "$ref": "#/$defs/__schema28"
708
+ }
709
+ }
710
+ },
711
+ "required": [
712
+ "schemaVersion",
713
+ "repository",
714
+ "snapshot",
715
+ "status",
716
+ "data",
717
+ "warnings"
718
+ ],
719
+ "additionalProperties": false
720
+ },
721
+ {
722
+ "type": "object",
723
+ "properties": {
724
+ "schemaVersion": {
725
+ "type": "number",
726
+ "const": 1
727
+ },
728
+ "repository": {
729
+ "anyOf": [
730
+ {
731
+ "$ref": "#/$defs/__schema0"
732
+ },
733
+ {
734
+ "type": "null"
735
+ }
736
+ ]
737
+ },
738
+ "snapshot": {
739
+ "anyOf": [
740
+ {
741
+ "$ref": "#/$defs/__schema3"
742
+ },
743
+ {
744
+ "type": "null"
745
+ }
746
+ ]
747
+ },
748
+ "status": {
749
+ "type": "string",
750
+ "const": "error"
751
+ },
752
+ "data": {
753
+ "type": "object",
754
+ "properties": {
755
+ "command": {
756
+ "anyOf": [
757
+ {
758
+ "type": "string",
759
+ "enum": [
760
+ "status",
761
+ "index",
762
+ "map.roots",
763
+ "map.children",
764
+ "map.search",
765
+ "map.show",
766
+ "learn",
767
+ "changes"
768
+ ]
769
+ },
770
+ {
771
+ "type": "null"
772
+ }
773
+ ]
774
+ },
775
+ "error": {
776
+ "type": "object",
777
+ "properties": {
778
+ "code": {
779
+ "type": "string",
780
+ "pattern": "^[A-Z][A-Z0-9_]*$"
781
+ },
782
+ "message": {
783
+ "type": "string",
784
+ "minLength": 1
785
+ },
786
+ "details": {
787
+ "$ref": "#/$defs/__schema30"
788
+ }
789
+ },
790
+ "required": [
791
+ "code",
792
+ "message"
793
+ ],
794
+ "additionalProperties": false
795
+ }
796
+ },
797
+ "required": [
798
+ "command",
799
+ "error"
800
+ ],
801
+ "additionalProperties": {}
802
+ },
803
+ "warnings": {
804
+ "type": "array",
805
+ "items": {
806
+ "$ref": "#/$defs/__schema28"
807
+ }
808
+ }
809
+ },
810
+ "required": [
811
+ "schemaVersion",
812
+ "repository",
813
+ "snapshot",
814
+ "status",
815
+ "data",
816
+ "warnings"
817
+ ],
818
+ "additionalProperties": false
819
+ }
820
+ ],
821
+ "$defs": {
822
+ "__schema0": {
823
+ "type": "object",
824
+ "properties": {
825
+ "id": {
826
+ "$ref": "#/$defs/__schema1"
827
+ },
828
+ "root": {
829
+ "type": "string",
830
+ "minLength": 1
831
+ },
832
+ "headCommit": {
833
+ "$ref": "#/$defs/__schema2"
834
+ }
835
+ },
836
+ "required": [
837
+ "id",
838
+ "root",
839
+ "headCommit"
840
+ ],
841
+ "additionalProperties": false
842
+ },
843
+ "__schema1": {
844
+ "type": "string",
845
+ "pattern": "^[a-f0-9]{64}$"
846
+ },
847
+ "__schema2": {
848
+ "type": "string",
849
+ "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$"
850
+ },
851
+ "__schema3": {
852
+ "type": "object",
853
+ "properties": {
854
+ "id": {
855
+ "$ref": "#/$defs/__schema1"
856
+ },
857
+ "gitHead": {
858
+ "$ref": "#/$defs/__schema2"
859
+ },
860
+ "createdAt": {
861
+ "type": "string",
862
+ "format": "date-time",
863
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
864
+ },
865
+ "freshness": {
866
+ "type": "string",
867
+ "enum": [
868
+ "current",
869
+ "stale"
870
+ ]
871
+ }
872
+ },
873
+ "required": [
874
+ "id",
875
+ "gitHead",
876
+ "createdAt",
877
+ "freshness"
878
+ ],
879
+ "additionalProperties": false
880
+ },
881
+ "__schema4": {
882
+ "type": "integer",
883
+ "minimum": 0,
884
+ "maximum": 9007199254740991
885
+ },
886
+ "__schema5": {
887
+ "type": "string",
888
+ "const": "structural"
889
+ },
890
+ "__schema6": {
891
+ "type": "string",
892
+ "pattern": "^(?:repository|module|file|symbol|test|unknown):.+$"
893
+ },
894
+ "__schema7": {
895
+ "type": "string",
896
+ "minLength": 1
897
+ },
898
+ "__schema8": {
899
+ "type": "string",
900
+ "enum": [
901
+ "valid",
902
+ "stale"
903
+ ]
904
+ },
905
+ "__schema9": {
906
+ "type": "array",
907
+ "items": {
908
+ "$ref": "#/$defs/__schema10"
909
+ }
910
+ },
911
+ "__schema10": {
912
+ "type": "object",
913
+ "properties": {
914
+ "file": {
915
+ "$ref": "#/$defs/__schema11"
916
+ },
917
+ "range": {
918
+ "$ref": "#/$defs/__schema12"
919
+ }
920
+ },
921
+ "required": [
922
+ "file",
923
+ "range"
924
+ ],
925
+ "additionalProperties": {}
926
+ },
927
+ "__schema11": {
928
+ "type": "string",
929
+ "minLength": 1,
930
+ "pattern": "^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.\\.?(?:\\/|$))(?!.*\\/\\/).+$"
931
+ },
932
+ "__schema12": {
933
+ "type": "object",
934
+ "properties": {
935
+ "start": {
936
+ "$ref": "#/$defs/__schema13"
937
+ },
938
+ "end": {
939
+ "$ref": "#/$defs/__schema13"
940
+ }
941
+ },
942
+ "required": [
943
+ "start",
944
+ "end"
945
+ ],
946
+ "additionalProperties": false
947
+ },
948
+ "__schema13": {
949
+ "type": "object",
950
+ "properties": {
951
+ "line": {
952
+ "type": "integer",
953
+ "exclusiveMinimum": 0,
954
+ "maximum": 9007199254740991
955
+ },
956
+ "column": {
957
+ "type": "integer",
958
+ "exclusiveMinimum": 0,
959
+ "maximum": 9007199254740991
960
+ }
961
+ },
962
+ "required": [
963
+ "line",
964
+ "column"
965
+ ],
966
+ "additionalProperties": false
967
+ },
968
+ "__schema14": {
969
+ "type": "object",
970
+ "properties": {
971
+ "status": {
972
+ "type": "string",
973
+ "enum": [
974
+ "exact",
975
+ "inferred",
976
+ "unresolved",
977
+ "unsupported"
978
+ ]
979
+ },
980
+ "provenance": {
981
+ "type": "string",
982
+ "enum": [
983
+ "tree-sitter",
984
+ "scip",
985
+ "heuristic",
986
+ "backend"
987
+ ]
988
+ }
989
+ },
990
+ "required": [
991
+ "status",
992
+ "provenance"
993
+ ],
994
+ "additionalProperties": false
995
+ },
996
+ "__schema15": {},
997
+ "__schema16": {
998
+ "type": "string",
999
+ "const": "business"
1000
+ },
1001
+ "__schema17": {
1002
+ "type": "string",
1003
+ "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*(?:\\/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$"
1004
+ },
1005
+ "__schema18": {
1006
+ "type": "string",
1007
+ "minLength": 1
1008
+ },
1009
+ "__schema19": {
1010
+ "type": "string",
1011
+ "minLength": 1
1012
+ },
1013
+ "__schema20": {
1014
+ "type": "array",
1015
+ "items": {
1016
+ "type": "string",
1017
+ "minLength": 1
1018
+ }
1019
+ },
1020
+ "__schema21": {
1021
+ "type": "string",
1022
+ "enum": [
1023
+ "exact",
1024
+ "inferred",
1025
+ "hypothesis"
1026
+ ]
1027
+ },
1028
+ "__schema22": {
1029
+ "minItems": 1,
1030
+ "type": "array",
1031
+ "items": {
1032
+ "$ref": "#/$defs/__schema23"
1033
+ }
1034
+ },
1035
+ "__schema23": {
1036
+ "type": "object",
1037
+ "properties": {
1038
+ "symbolId": {
1039
+ "type": "string",
1040
+ "pattern": "^(?:symbol|test):.+$"
1041
+ },
1042
+ "file": {
1043
+ "$ref": "#/$defs/__schema11"
1044
+ },
1045
+ "range": {
1046
+ "$ref": "#/$defs/__schema12"
1047
+ },
1048
+ "contentHash": {
1049
+ "$ref": "#/$defs/__schema1"
1050
+ }
1051
+ },
1052
+ "required": [
1053
+ "symbolId",
1054
+ "file",
1055
+ "range",
1056
+ "contentHash"
1057
+ ],
1058
+ "additionalProperties": false
1059
+ },
1060
+ "__schema24": {},
1061
+ "__schema25": {
1062
+ "anyOf": [
1063
+ {
1064
+ "type": "object",
1065
+ "properties": {
1066
+ "domain": {
1067
+ "$ref": "#/$defs/__schema5"
1068
+ },
1069
+ "id": {
1070
+ "$ref": "#/$defs/__schema6"
1071
+ },
1072
+ "kind": {
1073
+ "type": "string",
1074
+ "enum": [
1075
+ "Repository",
1076
+ "Module",
1077
+ "File",
1078
+ "Symbol",
1079
+ "Test"
1080
+ ]
1081
+ },
1082
+ "label": {
1083
+ "$ref": "#/$defs/__schema7"
1084
+ },
1085
+ "validity": {
1086
+ "$ref": "#/$defs/__schema8"
1087
+ },
1088
+ "locations": {
1089
+ "$ref": "#/$defs/__schema9"
1090
+ },
1091
+ "support": {
1092
+ "$ref": "#/$defs/__schema14"
1093
+ }
1094
+ },
1095
+ "required": [
1096
+ "domain",
1097
+ "id",
1098
+ "kind",
1099
+ "label",
1100
+ "validity",
1101
+ "locations",
1102
+ "support"
1103
+ ],
1104
+ "additionalProperties": {
1105
+ "$ref": "#/$defs/__schema15"
1106
+ }
1107
+ },
1108
+ {
1109
+ "type": "object",
1110
+ "properties": {
1111
+ "domain": {
1112
+ "$ref": "#/$defs/__schema16"
1113
+ },
1114
+ "key": {
1115
+ "$ref": "#/$defs/__schema17"
1116
+ },
1117
+ "kind": {
1118
+ "type": "string",
1119
+ "enum": [
1120
+ "Capability",
1121
+ "Scenario",
1122
+ "Operation",
1123
+ "Invariant",
1124
+ "Interface",
1125
+ "Data"
1126
+ ]
1127
+ },
1128
+ "label": {
1129
+ "$ref": "#/$defs/__schema18"
1130
+ },
1131
+ "summary": {
1132
+ "$ref": "#/$defs/__schema19"
1133
+ },
1134
+ "aliases": {
1135
+ "$ref": "#/$defs/__schema20"
1136
+ },
1137
+ "certainty": {
1138
+ "$ref": "#/$defs/__schema21"
1139
+ },
1140
+ "validity": {
1141
+ "$ref": "#/$defs/__schema8"
1142
+ },
1143
+ "evidence": {
1144
+ "$ref": "#/$defs/__schema22"
1145
+ }
1146
+ },
1147
+ "required": [
1148
+ "domain",
1149
+ "key",
1150
+ "kind",
1151
+ "label",
1152
+ "summary",
1153
+ "aliases",
1154
+ "certainty",
1155
+ "validity",
1156
+ "evidence"
1157
+ ],
1158
+ "additionalProperties": {
1159
+ "$ref": "#/$defs/__schema24"
1160
+ }
1161
+ },
1162
+ {
1163
+ "$ref": "#/$defs/__schema26"
1164
+ }
1165
+ ]
1166
+ },
1167
+ "__schema26": {
1168
+ "type": "object",
1169
+ "properties": {
1170
+ "domain": {
1171
+ "type": "string",
1172
+ "const": "structural"
1173
+ },
1174
+ "id": {
1175
+ "$ref": "#/$defs/__schema6"
1176
+ },
1177
+ "kind": {
1178
+ "type": "string",
1179
+ "const": "UnknownBoundary"
1180
+ },
1181
+ "label": {
1182
+ "type": "string",
1183
+ "minLength": 1
1184
+ },
1185
+ "validity": {
1186
+ "type": "string",
1187
+ "const": "unknown"
1188
+ },
1189
+ "owner": {
1190
+ "type": "object",
1191
+ "properties": {
1192
+ "domain": {
1193
+ "type": "string",
1194
+ "const": "structural"
1195
+ },
1196
+ "id": {
1197
+ "$ref": "#/$defs/__schema6"
1198
+ }
1199
+ },
1200
+ "required": [
1201
+ "domain",
1202
+ "id"
1203
+ ],
1204
+ "additionalProperties": false
1205
+ },
1206
+ "operation": {
1207
+ "type": "string",
1208
+ "minLength": 1
1209
+ },
1210
+ "reason": {
1211
+ "type": "string",
1212
+ "minLength": 1
1213
+ },
1214
+ "location": {
1215
+ "$ref": "#/$defs/__schema10"
1216
+ },
1217
+ "candidates": {
1218
+ "type": "array",
1219
+ "items": {
1220
+ "type": "string",
1221
+ "minLength": 1
1222
+ }
1223
+ },
1224
+ "support": {
1225
+ "$ref": "#/$defs/__schema14"
1226
+ }
1227
+ },
1228
+ "required": [
1229
+ "domain",
1230
+ "id",
1231
+ "kind",
1232
+ "label",
1233
+ "validity",
1234
+ "owner",
1235
+ "operation",
1236
+ "reason",
1237
+ "location",
1238
+ "candidates",
1239
+ "support"
1240
+ ],
1241
+ "additionalProperties": {}
1242
+ },
1243
+ "__schema27": {
1244
+ "type": "object",
1245
+ "properties": {
1246
+ "added": {
1247
+ "type": "array",
1248
+ "items": {
1249
+ "type": "string",
1250
+ "minLength": 1
1251
+ }
1252
+ },
1253
+ "changed": {
1254
+ "type": "array",
1255
+ "items": {
1256
+ "type": "string",
1257
+ "minLength": 1
1258
+ }
1259
+ },
1260
+ "removed": {
1261
+ "type": "array",
1262
+ "items": {
1263
+ "type": "string",
1264
+ "minLength": 1
1265
+ }
1266
+ }
1267
+ },
1268
+ "required": [
1269
+ "added",
1270
+ "changed",
1271
+ "removed"
1272
+ ],
1273
+ "additionalProperties": {}
1274
+ },
1275
+ "__schema28": {
1276
+ "type": "object",
1277
+ "properties": {
1278
+ "code": {
1279
+ "type": "string",
1280
+ "pattern": "^[A-Z][A-Z0-9_]*$"
1281
+ },
1282
+ "message": {
1283
+ "type": "string",
1284
+ "minLength": 1
1285
+ },
1286
+ "details": {
1287
+ "$ref": "#/$defs/__schema29"
1288
+ }
1289
+ },
1290
+ "required": [
1291
+ "code",
1292
+ "message"
1293
+ ],
1294
+ "additionalProperties": false
1295
+ },
1296
+ "__schema29": {
1297
+ "anyOf": [
1298
+ {
1299
+ "type": "string"
1300
+ },
1301
+ {
1302
+ "type": "number"
1303
+ },
1304
+ {
1305
+ "type": "boolean"
1306
+ },
1307
+ {
1308
+ "type": "null"
1309
+ },
1310
+ {
1311
+ "type": "array",
1312
+ "items": {
1313
+ "$ref": "#/$defs/__schema29"
1314
+ }
1315
+ },
1316
+ {
1317
+ "type": "object",
1318
+ "propertyNames": {
1319
+ "type": "string"
1320
+ },
1321
+ "additionalProperties": {
1322
+ "$ref": "#/$defs/__schema29"
1323
+ }
1324
+ }
1325
+ ]
1326
+ },
1327
+ "__schema30": {
1328
+ "anyOf": [
1329
+ {
1330
+ "type": "string"
1331
+ },
1332
+ {
1333
+ "type": "number"
1334
+ },
1335
+ {
1336
+ "type": "boolean"
1337
+ },
1338
+ {
1339
+ "type": "null"
1340
+ },
1341
+ {
1342
+ "type": "array",
1343
+ "items": {
1344
+ "$ref": "#/$defs/__schema30"
1345
+ }
1346
+ },
1347
+ {
1348
+ "type": "object",
1349
+ "propertyNames": {
1350
+ "type": "string"
1351
+ },
1352
+ "additionalProperties": {
1353
+ "$ref": "#/$defs/__schema30"
1354
+ }
1355
+ }
1356
+ ]
1357
+ }
1358
+ }
1359
+ }