semantic-atlas 0.3.0 → 1.0.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 (322) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +134 -166
  2. package/.agents/skills/semantic-atlas/agents/openai.yaml +4 -0
  3. package/.agents/skills/semantic-atlas/references/observations.md +131 -0
  4. package/.agents/skills/semantic-atlas/scripts/query-context.mjs +110 -0
  5. package/.agents/skills/semantic-atlas-maintenance/SKILL.md +93 -0
  6. package/.agents/skills/semantic-atlas-maintenance/agents/openai.yaml +4 -0
  7. package/.agents/skills/semantic-atlas-maintenance/references/reconciliation.md +56 -0
  8. package/README.md +134 -239
  9. package/dist/application/map-application.d.ts +24 -0
  10. package/dist/application/map-application.d.ts.map +1 -0
  11. package/dist/application/map-application.js +134 -0
  12. package/dist/application/map-application.js.map +1 -0
  13. package/dist/cli/bin.js +6 -35
  14. package/dist/cli/bin.js.map +1 -0
  15. package/dist/cli/observation-commands.d.ts +16 -0
  16. package/dist/cli/observation-commands.d.ts.map +1 -0
  17. package/dist/cli/observation-commands.js +118 -0
  18. package/dist/cli/observation-commands.js.map +1 -0
  19. package/dist/cli/projection-writer.d.ts +2 -0
  20. package/dist/cli/projection-writer.d.ts.map +1 -0
  21. package/dist/cli/projection-writer.js +9 -0
  22. package/dist/cli/projection-writer.js.map +1 -0
  23. package/dist/cli/reconciliation-command.d.ts +7 -0
  24. package/dist/cli/reconciliation-command.d.ts.map +1 -0
  25. package/dist/cli/reconciliation-command.js +33 -0
  26. package/dist/cli/reconciliation-command.js.map +1 -0
  27. package/dist/cli/run-cli.d.ts +21 -0
  28. package/dist/cli/run-cli.d.ts.map +1 -0
  29. package/dist/cli/run-cli.js +299 -0
  30. package/dist/cli/run-cli.js.map +1 -0
  31. package/dist/contracts/cli.d.ts +166 -1211
  32. package/dist/contracts/cli.d.ts.map +1 -1
  33. package/dist/contracts/cli.js +2 -232
  34. package/dist/contracts/cli.js.map +1 -0
  35. package/dist/contracts/insights.d.ts +39 -1
  36. package/dist/contracts/insights.d.ts.map +1 -1
  37. package/dist/contracts/insights.js +2 -1
  38. package/dist/contracts/insights.js.map +1 -0
  39. package/dist/contracts/map.d.ts +154 -0
  40. package/dist/contracts/map.d.ts.map +1 -0
  41. package/dist/contracts/map.js +60 -0
  42. package/dist/contracts/map.js.map +1 -0
  43. package/dist/contracts/observation.d.ts +649 -0
  44. package/dist/contracts/observation.d.ts.map +1 -0
  45. package/dist/contracts/observation.js +140 -0
  46. package/dist/contracts/observation.js.map +1 -0
  47. package/dist/contracts/projection.d.ts +7 -0
  48. package/dist/contracts/projection.d.ts.map +1 -0
  49. package/dist/contracts/projection.js +2 -0
  50. package/dist/contracts/projection.js.map +1 -0
  51. package/dist/contracts/reconciliation.d.ts +40 -0
  52. package/dist/contracts/reconciliation.d.ts.map +1 -0
  53. package/dist/contracts/reconciliation.js +2 -0
  54. package/dist/contracts/reconciliation.js.map +1 -0
  55. package/dist/index.d.ts +7 -17
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +3 -9
  58. package/dist/index.js.map +1 -0
  59. package/dist/insights/insight-service.d.ts +14 -0
  60. package/dist/insights/insight-service.d.ts.map +1 -0
  61. package/dist/insights/insight-service.js +129 -0
  62. package/dist/insights/insight-service.js.map +1 -0
  63. package/dist/map/business-graph.d.ts +32 -0
  64. package/dist/map/business-graph.d.ts.map +1 -0
  65. package/dist/map/business-graph.js +122 -0
  66. package/dist/map/business-graph.js.map +1 -0
  67. package/dist/map/map-document-loader.d.ts +13 -0
  68. package/dist/map/map-document-loader.d.ts.map +1 -0
  69. package/dist/map/map-document-loader.js +86 -0
  70. package/dist/map/map-document-loader.js.map +1 -0
  71. package/dist/map/map-validator.d.ts +12 -0
  72. package/dist/map/map-validator.d.ts.map +1 -0
  73. package/dist/map/map-validator.js +322 -0
  74. package/dist/map/map-validator.js.map +1 -0
  75. package/dist/observations/observation-application.d.ts +23 -0
  76. package/dist/observations/observation-application.d.ts.map +1 -0
  77. package/dist/observations/observation-application.js +62 -0
  78. package/dist/observations/observation-application.js.map +1 -0
  79. package/dist/observations/observation-claim-manager.d.ts +13 -0
  80. package/dist/observations/observation-claim-manager.d.ts.map +1 -0
  81. package/dist/observations/observation-claim-manager.js +247 -0
  82. package/dist/observations/observation-claim-manager.js.map +1 -0
  83. package/dist/observations/observation-store.d.ts +43 -0
  84. package/dist/observations/observation-store.d.ts.map +1 -0
  85. package/dist/observations/observation-store.js +208 -0
  86. package/dist/observations/observation-store.js.map +1 -0
  87. package/dist/observations/repository-identity.d.ts +12 -0
  88. package/dist/observations/repository-identity.d.ts.map +1 -0
  89. package/dist/observations/repository-identity.js +108 -0
  90. package/dist/observations/repository-identity.js.map +1 -0
  91. package/dist/query/context-query-service.d.ts +15 -0
  92. package/dist/query/context-query-service.d.ts.map +1 -0
  93. package/dist/query/context-query-service.js +36 -0
  94. package/dist/query/context-query-service.js.map +1 -0
  95. package/dist/reconciliation/reconciliation-service.d.ts +10 -0
  96. package/dist/reconciliation/reconciliation-service.d.ts.map +1 -0
  97. package/dist/reconciliation/reconciliation-service.js +116 -0
  98. package/dist/reconciliation/reconciliation-service.js.map +1 -0
  99. package/dist/rendering/map-projector.d.ts +8 -0
  100. package/dist/rendering/map-projector.d.ts.map +1 -0
  101. package/dist/rendering/map-projector.js +386 -0
  102. package/dist/rendering/map-projector.js.map +1 -0
  103. package/dist/setup/managed-skill-installer.d.ts +60 -0
  104. package/dist/setup/managed-skill-installer.d.ts.map +1 -0
  105. package/dist/setup/managed-skill-installer.js +307 -0
  106. package/dist/setup/managed-skill-installer.js.map +1 -0
  107. package/dist/setup/package-identity.d.ts +6 -0
  108. package/dist/setup/package-identity.d.ts.map +1 -0
  109. package/dist/setup/package-identity.js +16 -0
  110. package/dist/setup/package-identity.js.map +1 -0
  111. package/dist/setup/package-upgrader.d.ts +10 -22
  112. package/dist/setup/package-upgrader.d.ts.map +1 -1
  113. package/dist/setup/package-upgrader.js +60 -76
  114. package/dist/setup/package-upgrader.js.map +1 -0
  115. package/docs/architecture.md +428 -0
  116. package/docs/evaluation.md +220 -174
  117. package/docs/index.md +27 -40
  118. package/docs/map-format.md +224 -0
  119. package/docs/observations.md +175 -0
  120. package/docs/product-contract.md +295 -137
  121. package/examples/commerce.yaml +204 -0
  122. package/package.json +31 -30
  123. package/.agents/skills/semantic-atlas/references/graph-patch.md +0 -190
  124. package/.agents/skills/semantic-atlas/references/product-feedback.md +0 -34
  125. package/.agents/skills/semantic-atlas/references/result-routing.md +0 -104
  126. package/.agents/skills/semantic-atlas/references/snapshot-bootstrap.md +0 -42
  127. package/.agents/skills/semantic-atlas-insights/SKILL.md +0 -55
  128. package/README.zh-CN.md +0 -273
  129. package/dist/business-flow/business-flow-derivation-service.d.ts +0 -11
  130. package/dist/business-flow/business-flow-derivation-service.d.ts.map +0 -1
  131. package/dist/business-flow/business-flow-derivation-service.js +0 -151
  132. package/dist/business-flow/business-flow-draft.d.ts +0 -16
  133. package/dist/business-flow/business-flow-draft.d.ts.map +0 -1
  134. package/dist/business-flow/business-flow-draft.js +0 -150
  135. package/dist/business-flow/framework-business-strategy.d.ts +0 -7
  136. package/dist/business-flow/framework-business-strategy.d.ts.map +0 -1
  137. package/dist/business-flow/framework-business-strategy.js +0 -1
  138. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +0 -10
  139. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +0 -1
  140. package/dist/business-flow/strategies/bullmq-business-strategy.js +0 -79
  141. package/dist/business-flow/strategies/called-operation-derivation.d.ts +0 -13
  142. package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +0 -1
  143. package/dist/business-flow/strategies/called-operation-derivation.js +0 -32
  144. package/dist/business-flow/strategies/graphql-business-strategy.d.ts +0 -8
  145. package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +0 -1
  146. package/dist/business-flow/strategies/graphql-business-strategy.js +0 -65
  147. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +0 -8
  148. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +0 -1
  149. package/dist/business-flow/strategies/nestjs-business-strategy.js +0 -72
  150. package/dist/business-flow/strategies/strategy-helpers.d.ts +0 -32
  151. package/dist/business-flow/strategies/strategy-helpers.d.ts.map +0 -1
  152. package/dist/business-flow/strategies/strategy-helpers.js +0 -49
  153. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +0 -10
  154. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +0 -1
  155. package/dist/business-flow/strategies/typeorm-business-strategy.js +0 -136
  156. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +0 -5
  157. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +0 -1
  158. package/dist/business-flow/strategies/verified-invariant-strategy.js +0 -38
  159. package/dist/business-flow/strategies/verified-test-strategy.d.ts +0 -5
  160. package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +0 -1
  161. package/dist/business-flow/strategies/verified-test-strategy.js +0 -26
  162. package/dist/business-flow/structural-flow-catalog.d.ts +0 -21
  163. package/dist/business-flow/structural-flow-catalog.d.ts.map +0 -1
  164. package/dist/business-flow/structural-flow-catalog.js +0 -125
  165. package/dist/business-flow/types.d.ts +0 -51
  166. package/dist/business-flow/types.d.ts.map +0 -1
  167. package/dist/business-flow/types.js +0 -1
  168. package/dist/cli/argument-parser.d.ts +0 -3
  169. package/dist/cli/argument-parser.d.ts.map +0 -1
  170. package/dist/cli/argument-parser.js +0 -200
  171. package/dist/cli/cli-application.d.ts +0 -39
  172. package/dist/cli/cli-application.d.ts.map +0 -1
  173. package/dist/cli/cli-application.js +0 -571
  174. package/dist/cli/cli-error.d.ts +0 -12
  175. package/dist/cli/cli-error.d.ts.map +0 -1
  176. package/dist/cli/cli-error.js +0 -44
  177. package/dist/cli/cli-presenter.d.ts +0 -14
  178. package/dist/cli/cli-presenter.d.ts.map +0 -1
  179. package/dist/cli/cli-presenter.js +0 -36
  180. package/dist/cli/insights-cli.d.ts +0 -6
  181. package/dist/cli/insights-cli.d.ts.map +0 -1
  182. package/dist/cli/insights-cli.js +0 -236
  183. package/dist/cli/main.d.ts +0 -3
  184. package/dist/cli/main.d.ts.map +0 -1
  185. package/dist/cli/main.js +0 -137
  186. package/dist/cli/standalone-cli.d.ts +0 -3
  187. package/dist/cli/standalone-cli.d.ts.map +0 -1
  188. package/dist/cli/standalone-cli.js +0 -96
  189. package/dist/cli/types.d.ts +0 -49
  190. package/dist/cli/types.d.ts.map +0 -1
  191. package/dist/cli/types.js +0 -1
  192. package/dist/contracts/graph.d.ts +0 -266
  193. package/dist/contracts/graph.d.ts.map +0 -1
  194. package/dist/contracts/graph.js +0 -182
  195. package/dist/contracts/identifiers.d.ts +0 -4
  196. package/dist/contracts/identifiers.d.ts.map +0 -1
  197. package/dist/contracts/identifiers.js +0 -7
  198. package/dist/contracts/public-contracts.d.ts +0 -5
  199. package/dist/contracts/public-contracts.d.ts.map +0 -1
  200. package/dist/contracts/public-contracts.js +0 -4
  201. package/dist/evaluation/comparison.d.ts +0 -30
  202. package/dist/evaluation/comparison.d.ts.map +0 -1
  203. package/dist/evaluation/comparison.js +0 -108
  204. package/dist/evaluation/contracts.d.ts +0 -301
  205. package/dist/evaluation/contracts.d.ts.map +0 -1
  206. package/dist/evaluation/contracts.js +0 -413
  207. package/dist/graph/graph-store.d.ts +0 -55
  208. package/dist/graph/graph-store.d.ts.map +0 -1
  209. package/dist/graph/graph-store.js +0 -912
  210. package/dist/graph/types.d.ts +0 -189
  211. package/dist/graph/types.d.ts.map +0 -1
  212. package/dist/graph/types.js +0 -1
  213. package/dist/insights/contracts.d.ts +0 -266
  214. package/dist/insights/contracts.d.ts.map +0 -1
  215. package/dist/insights/contracts.js +0 -124
  216. package/dist/insights/insights-store.d.ts +0 -73
  217. package/dist/insights/insights-store.d.ts.map +0 -1
  218. package/dist/insights/insights-store.js +0 -246
  219. package/dist/knowledge/business-knowledge-service.d.ts +0 -24
  220. package/dist/knowledge/business-knowledge-service.d.ts.map +0 -1
  221. package/dist/knowledge/business-knowledge-service.js +0 -200
  222. package/dist/knowledge/graph-patch-conflict-error.d.ts +0 -8
  223. package/dist/knowledge/graph-patch-conflict-error.d.ts.map +0 -1
  224. package/dist/knowledge/graph-patch-conflict-error.js +0 -12
  225. package/dist/knowledge/structural-target-binding.d.ts +0 -14
  226. package/dist/knowledge/structural-target-binding.d.ts.map +0 -1
  227. package/dist/knowledge/structural-target-binding.js +0 -11
  228. package/dist/package-metadata.d.ts +0 -2
  229. package/dist/package-metadata.d.ts.map +0 -1
  230. package/dist/package-metadata.js +0 -9
  231. package/dist/repository/git-command.d.ts +0 -3
  232. package/dist/repository/git-command.d.ts.map +0 -1
  233. package/dist/repository/git-command.js +0 -25
  234. package/dist/repository/repository-inspector.d.ts +0 -7
  235. package/dist/repository/repository-inspector.d.ts.map +0 -1
  236. package/dist/repository/repository-inspector.js +0 -84
  237. package/dist/repository/repository-language-support.d.ts +0 -14
  238. package/dist/repository/repository-language-support.d.ts.map +0 -1
  239. package/dist/repository/repository-language-support.js +0 -64
  240. package/dist/repository/types.d.ts +0 -9
  241. package/dist/repository/types.d.ts.map +0 -1
  242. package/dist/repository/types.js +0 -1
  243. package/dist/runtime/sqlite-compatibility-process.d.ts +0 -8
  244. package/dist/runtime/sqlite-compatibility-process.d.ts.map +0 -1
  245. package/dist/runtime/sqlite-compatibility-process.js +0 -20
  246. package/dist/setup/skill-installer.d.ts +0 -20
  247. package/dist/setup/skill-installer.d.ts.map +0 -1
  248. package/dist/setup/skill-installer.js +0 -187
  249. package/dist/snapshots/repository-snapshot.d.ts +0 -4
  250. package/dist/snapshots/repository-snapshot.d.ts.map +0 -1
  251. package/dist/snapshots/repository-snapshot.js +0 -119
  252. package/dist/snapshots/types.d.ts +0 -30
  253. package/dist/snapshots/types.d.ts.map +0 -1
  254. package/dist/snapshots/types.js +0 -1
  255. package/dist/storage/atlas-database.d.ts +0 -19
  256. package/dist/storage/atlas-database.d.ts.map +0 -1
  257. package/dist/storage/atlas-database.js +0 -433
  258. package/dist/storage/snapshot-store.d.ts +0 -19
  259. package/dist/storage/snapshot-store.d.ts.map +0 -1
  260. package/dist/storage/snapshot-store.js +0 -74
  261. package/dist/structural-backend/codegraph-backend.d.ts +0 -57
  262. package/dist/structural-backend/codegraph-backend.d.ts.map +0 -1
  263. package/dist/structural-backend/codegraph-backend.js +0 -1230
  264. package/dist/structural-backend/codegraph-worker-client.d.ts +0 -5
  265. package/dist/structural-backend/codegraph-worker-client.d.ts.map +0 -1
  266. package/dist/structural-backend/codegraph-worker-client.js +0 -118
  267. package/dist/structural-backend/codegraph-worker-protocol.d.ts +0 -35
  268. package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +0 -1
  269. package/dist/structural-backend/codegraph-worker-protocol.js +0 -1
  270. package/dist/structural-backend/codegraph-worker.d.ts +0 -2
  271. package/dist/structural-backend/codegraph-worker.d.ts.map +0 -1
  272. package/dist/structural-backend/codegraph-worker.js +0 -131
  273. package/dist/structural-backend/process-instance.d.ts +0 -18
  274. package/dist/structural-backend/process-instance.d.ts.map +0 -1
  275. package/dist/structural-backend/process-instance.js +0 -207
  276. package/dist/structural-backend/structural-fact-changes.d.ts +0 -7
  277. package/dist/structural-backend/structural-fact-changes.d.ts.map +0 -1
  278. package/dist/structural-backend/structural-fact-changes.js +0 -78
  279. package/dist/structural-backend/structural-projection-bootstrapper.d.ts +0 -10
  280. package/dist/structural-backend/structural-projection-bootstrapper.d.ts.map +0 -1
  281. package/dist/structural-backend/structural-projection-bootstrapper.js +0 -295
  282. package/dist/structural-backend/structural-publication.d.ts +0 -13
  283. package/dist/structural-backend/structural-publication.d.ts.map +0 -1
  284. package/dist/structural-backend/structural-publication.js +0 -255
  285. package/dist/structural-backend/structural-write-lock.d.ts +0 -8
  286. package/dist/structural-backend/structural-write-lock.d.ts.map +0 -1
  287. package/dist/structural-backend/structural-write-lock.js +0 -415
  288. package/dist/structural-backend/types.d.ts +0 -144
  289. package/dist/structural-backend/types.d.ts.map +0 -1
  290. package/dist/structural-backend/types.js +0 -11
  291. package/dist/world/business-map-projector.d.ts +0 -14
  292. package/dist/world/business-map-projector.d.ts.map +0 -1
  293. package/dist/world/business-map-projector.js +0 -178
  294. package/dist/world/types.d.ts +0 -77
  295. package/dist/world/types.d.ts.map +0 -1
  296. package/dist/world/types.js +0 -1
  297. package/dist/world/world-graph-query.d.ts +0 -26
  298. package/dist/world/world-graph-query.d.ts.map +0 -1
  299. package/dist/world/world-graph-query.js +0 -250
  300. package/dist/world/world-model-service.d.ts +0 -21
  301. package/dist/world/world-model-service.d.ts.map +0 -1
  302. package/dist/world/world-model-service.js +0 -219
  303. package/dist/world/world-snapshot-store.d.ts +0 -40
  304. package/dist/world/world-snapshot-store.d.ts.map +0 -1
  305. package/dist/world/world-snapshot-store.js +0 -581
  306. package/docs/README.md +0 -30
  307. package/docs/architecture/codegraph-backend.md +0 -190
  308. package/docs/architecture/continuous-business-learning.md +0 -240
  309. package/docs/contracts/cli-v1.md +0 -164
  310. package/docs/contracts/graph-model.md +0 -106
  311. package/docs/contracts/graph-patch-v1.md +0 -105
  312. package/docs/contracts/insights-v1.md +0 -84
  313. package/docs/log.md +0 -80
  314. package/docs/mindmaps/semantic-atlas-overview.drawio +0 -255
  315. package/docs/mindmaps/semantic-atlas-overview.png +0 -0
  316. package/docs/mindmaps/semantic-atlas-overview.zh-CN.drawio +0 -255
  317. package/docs/mindmaps/semantic-atlas-overview.zh-CN.png +0 -0
  318. package/schemas/cli-envelope-v1.schema.json +0 -1244
  319. package/schemas/evaluation-plan-v1.schema.json +0 -211
  320. package/schemas/evaluation-run-v1.schema.json +0 -659
  321. package/schemas/graph-patch-v1.schema.json +0 -392
  322. package/schemas/insights-envelope-v1.schema.json +0 -428
@@ -1,433 +0,0 @@
1
- import { lstatSync, mkdirSync, realpathSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
- import { homedir } from "node:os";
4
- import { isAbsolute, join, relative, resolve } from "node:path";
5
- export const CURRENT_ATLAS_SCHEMA_VERSION = 1;
6
- export const SEMANTIC_ATLAS_HOME_ENVIRONMENT_VARIABLE = "SEMANTIC_ATLAS_HOME";
7
- const require = createRequire(import.meta.url);
8
- export class AtlasDatabase {
9
- databasePath;
10
- connection;
11
- #closed = false;
12
- constructor(repository) {
13
- this.databasePath = resolveAtlasDatabasePath(repository);
14
- const { DatabaseSync } = require("node:sqlite");
15
- this.connection = new DatabaseSync(this.databasePath);
16
- try {
17
- this.connection.exec("PRAGMA foreign_keys = ON; PRAGMA journal_mode = WAL; PRAGMA busy_timeout = 5000;");
18
- this.initializeSchema();
19
- this.registerRepository(repository);
20
- }
21
- catch (error) {
22
- this.connection.close();
23
- throw error;
24
- }
25
- }
26
- get schemaVersion() {
27
- const row = this.connection.prepare(`
28
- SELECT version
29
- FROM atlas_schema
30
- WHERE singleton = 1
31
- `).get();
32
- return row.version;
33
- }
34
- close() {
35
- if (this.#closed) {
36
- return;
37
- }
38
- this.connection.close();
39
- this.#closed = true;
40
- }
41
- [Symbol.dispose]() {
42
- this.close();
43
- }
44
- initializeSchema() {
45
- const atlasSchema = this.connection.prepare(`
46
- SELECT name
47
- FROM sqlite_schema
48
- WHERE type = 'table' AND name = 'atlas_schema'
49
- `).get();
50
- if (atlasSchema !== undefined) {
51
- const version = this.schemaVersion;
52
- if (version !== CURRENT_ATLAS_SCHEMA_VERSION) {
53
- throw new Error(`Atlas database schema ${version} is not supported; expected schema ${CURRENT_ATLAS_SCHEMA_VERSION}`);
54
- }
55
- return;
56
- }
57
- const existingTables = this.connection.prepare(`
58
- SELECT COUNT(*) AS count
59
- FROM sqlite_schema
60
- WHERE type = 'table' AND name NOT LIKE 'sqlite_%'
61
- `).get();
62
- if (existingTables.count > 0) {
63
- throw new Error("The Atlas database is not a fresh schema v1 store");
64
- }
65
- this.connection.exec("BEGIN IMMEDIATE");
66
- try {
67
- this.connection.exec(ATLAS_SCHEMA_V1);
68
- this.connection.prepare(`
69
- INSERT INTO atlas_schema (singleton, version, created_at)
70
- VALUES (1, ?, ?)
71
- `).run(CURRENT_ATLAS_SCHEMA_VERSION, new Date().toISOString());
72
- this.connection.exec("COMMIT");
73
- }
74
- catch (error) {
75
- this.connection.exec("ROLLBACK");
76
- throw error;
77
- }
78
- }
79
- registerRepository(repository) {
80
- const timestamp = new Date().toISOString();
81
- this.connection.exec("BEGIN IMMEDIATE");
82
- try {
83
- this.connection.prepare(`
84
- INSERT INTO atlas_repositories (
85
- repository_id,
86
- common_git_directory,
87
- updated_at
88
- ) VALUES (?, ?, ?)
89
- ON CONFLICT (repository_id) DO UPDATE SET
90
- common_git_directory = excluded.common_git_directory,
91
- updated_at = excluded.updated_at
92
- `).run(repository.repositoryId, repository.commonGitDirectory, timestamp);
93
- this.connection.prepare(`
94
- INSERT INTO atlas_worktree_states (
95
- repository_id,
96
- git_directory,
97
- worktree_root,
98
- status,
99
- updated_at
100
- ) VALUES (?, ?, ?, 'missing', ?)
101
- ON CONFLICT (repository_id, git_directory) DO UPDATE SET
102
- worktree_root = excluded.worktree_root,
103
- updated_at = excluded.updated_at
104
- `).run(repository.repositoryId, repository.gitDirectory, repository.worktreeRoot, timestamp);
105
- this.connection.exec("COMMIT");
106
- }
107
- catch (error) {
108
- this.connection.exec("ROLLBACK");
109
- throw error;
110
- }
111
- }
112
- }
113
- export function resolveAtlasHome(repository) {
114
- const realAtlasHome = resolveConfiguredAtlasHome();
115
- for (const worktreeRoot of repository.worktreeRoots) {
116
- const realWorktreeRoot = realpathExistingPath(worktreeRoot);
117
- if (realWorktreeRoot !== null && isPathInside(realAtlasHome, realWorktreeRoot)) {
118
- throw new Error("The Semantic Atlas home must be outside every repository worktree");
119
- }
120
- }
121
- return realAtlasHome;
122
- }
123
- export function resolveInsightsDatabasePath() {
124
- return join(resolveConfiguredAtlasHome(), "insights.db");
125
- }
126
- function resolveConfiguredAtlasHome() {
127
- const configuredHome = process.env[SEMANTIC_ATLAS_HOME_ENVIRONMENT_VARIABLE];
128
- if (configuredHome !== undefined && !isAbsolute(configuredHome)) {
129
- throw new Error(`${SEMANTIC_ATLAS_HOME_ENVIRONMENT_VARIABLE} must be an absolute path`);
130
- }
131
- const atlasHome = resolve(configuredHome ?? join(homedir(), ".semantic-atlas"));
132
- mkdirSync(atlasHome, { recursive: true, mode: 0o700 });
133
- requireRealDirectory(atlasHome, "The Semantic Atlas home");
134
- const realAtlasHome = realpathSync(atlasHome);
135
- return realAtlasHome;
136
- }
137
- export function resolveAtlasDatabasePath(repository) {
138
- const atlasHome = resolveAtlasHome(repository);
139
- const repositoriesDirectory = join(atlasHome, "repositories");
140
- const repositoryDirectory = join(repositoriesDirectory, repository.repositoryId);
141
- mkdirSync(repositoryDirectory, { recursive: true, mode: 0o700 });
142
- requireRealDirectory(repositoriesDirectory, "The Semantic Atlas repositories directory");
143
- requireRealDirectory(repositoryDirectory, "The repository Atlas directory");
144
- return join(repositoryDirectory, "atlas.db");
145
- }
146
- function requireRealDirectory(path, label) {
147
- const metadata = lstatSync(path);
148
- if (!metadata.isDirectory() || metadata.isSymbolicLink()) {
149
- throw new Error(`${label} must be a real directory`);
150
- }
151
- }
152
- function realpathExistingPath(path) {
153
- try {
154
- return realpathSync(path);
155
- }
156
- catch (error) {
157
- if (error.code === "ENOENT") {
158
- return null;
159
- }
160
- throw error;
161
- }
162
- }
163
- function isPathInside(candidate, parent) {
164
- const pathFromParent = relative(parent, candidate);
165
- return pathFromParent === "" || (pathFromParent !== ".."
166
- && !pathFromParent.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`)
167
- && !isAbsolute(pathFromParent));
168
- }
169
- const ATLAS_SCHEMA_V1 = `
170
- CREATE TABLE atlas_schema (
171
- singleton INTEGER PRIMARY KEY CHECK (singleton = 1),
172
- version INTEGER NOT NULL CHECK (version = 1),
173
- created_at TEXT NOT NULL
174
- ) STRICT;
175
-
176
- CREATE TABLE atlas_repositories (
177
- repository_id TEXT PRIMARY KEY,
178
- common_git_directory TEXT NOT NULL,
179
- updated_at TEXT NOT NULL
180
- ) STRICT;
181
-
182
- CREATE TABLE atlas_repository_snapshots (
183
- repository_id TEXT NOT NULL,
184
- snapshot_id TEXT NOT NULL,
185
- payload TEXT NOT NULL,
186
- created_at TEXT NOT NULL,
187
- PRIMARY KEY (repository_id, snapshot_id),
188
- FOREIGN KEY (repository_id)
189
- REFERENCES atlas_repositories(repository_id) ON DELETE CASCADE
190
- ) STRICT;
191
-
192
- CREATE TABLE atlas_world_publications (
193
- publication_id INTEGER PRIMARY KEY,
194
- repository_id TEXT NOT NULL,
195
- git_directory TEXT NOT NULL,
196
- previous_publication_id INTEGER CHECK (
197
- previous_publication_id IS NULL OR previous_publication_id < publication_id
198
- ),
199
- snapshot_id TEXT NOT NULL,
200
- added_paths TEXT NOT NULL,
201
- modified_paths TEXT NOT NULL,
202
- removed_paths TEXT NOT NULL,
203
- stale_assertions TEXT NOT NULL,
204
- published_at TEXT NOT NULL,
205
- UNIQUE (repository_id, git_directory, publication_id),
206
- FOREIGN KEY (repository_id)
207
- REFERENCES atlas_repositories(repository_id) ON DELETE CASCADE,
208
- FOREIGN KEY (repository_id, snapshot_id)
209
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE,
210
- FOREIGN KEY (repository_id, git_directory, previous_publication_id)
211
- REFERENCES atlas_world_publications(repository_id, git_directory, publication_id)
212
- ) STRICT;
213
-
214
- CREATE TABLE atlas_worktree_states (
215
- repository_id TEXT NOT NULL,
216
- git_directory TEXT NOT NULL,
217
- worktree_root TEXT NOT NULL,
218
- status TEXT NOT NULL CHECK (status IN ('missing', 'building', 'current', 'failed')),
219
- current_snapshot_id TEXT,
220
- target_snapshot_id TEXT,
221
- backend_version TEXT,
222
- extraction_version INTEGER,
223
- current_publication_id INTEGER,
224
- failure_message TEXT,
225
- started_at TEXT,
226
- published_at TEXT,
227
- updated_at TEXT NOT NULL,
228
- PRIMARY KEY (repository_id, git_directory),
229
- FOREIGN KEY (repository_id)
230
- REFERENCES atlas_repositories(repository_id) ON DELETE CASCADE,
231
- FOREIGN KEY (repository_id, current_snapshot_id)
232
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id),
233
- FOREIGN KEY (repository_id, git_directory, current_publication_id)
234
- REFERENCES atlas_world_publications(repository_id, git_directory, publication_id)
235
- ) STRICT;
236
-
237
- CREATE INDEX atlas_worktree_states_current_index
238
- ON atlas_worktree_states (repository_id, status, published_at DESC, worktree_root);
239
- CREATE INDEX atlas_world_publications_worktree_order_index
240
- ON atlas_world_publications (repository_id, git_directory, publication_id DESC);
241
- CREATE INDEX atlas_world_publications_snapshot_index
242
- ON atlas_world_publications (repository_id, git_directory, snapshot_id, publication_id DESC);
243
-
244
- CREATE TABLE atlas_business_nodes (
245
- node_id INTEGER PRIMARY KEY,
246
- repository_id TEXT NOT NULL,
247
- node_key TEXT NOT NULL,
248
- base_snapshot_id TEXT NOT NULL,
249
- kind TEXT NOT NULL CHECK (kind IN (
250
- 'Capability', 'Scenario', 'Operation', 'Invariant', 'Interface', 'Data'
251
- )),
252
- label TEXT NOT NULL,
253
- summary TEXT NOT NULL,
254
- certainty TEXT NOT NULL CHECK (certainty IN ('exact', 'inferred', 'hypothesis')),
255
- UNIQUE (repository_id, node_key),
256
- FOREIGN KEY (repository_id, base_snapshot_id)
257
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id)
258
- ) STRICT;
259
-
260
- CREATE TABLE atlas_business_node_aliases (
261
- node_id INTEGER NOT NULL,
262
- position INTEGER NOT NULL,
263
- alias TEXT NOT NULL,
264
- PRIMARY KEY (node_id, position),
265
- FOREIGN KEY (node_id) REFERENCES atlas_business_nodes(node_id) ON DELETE CASCADE
266
- ) STRICT;
267
-
268
- CREATE TABLE atlas_business_node_evidence (
269
- node_id INTEGER NOT NULL,
270
- position INTEGER NOT NULL,
271
- structural_reference TEXT NOT NULL,
272
- file TEXT NOT NULL,
273
- qualified_symbol TEXT,
274
- structural_kind TEXT,
275
- start_line INTEGER NOT NULL,
276
- start_column INTEGER NOT NULL,
277
- end_line INTEGER NOT NULL,
278
- end_column INTEGER NOT NULL,
279
- content_hash TEXT NOT NULL,
280
- backend_locator TEXT,
281
- PRIMARY KEY (node_id, position),
282
- FOREIGN KEY (node_id) REFERENCES atlas_business_nodes(node_id) ON DELETE CASCADE
283
- ) STRICT;
284
-
285
- CREATE TABLE atlas_business_node_evidence_bindings (
286
- node_id INTEGER NOT NULL,
287
- position INTEGER NOT NULL,
288
- repository_id TEXT NOT NULL,
289
- snapshot_id TEXT NOT NULL,
290
- resolved_structural_reference TEXT,
291
- resolved_qualified_symbol TEXT,
292
- resolved_structural_kind TEXT,
293
- backend_version TEXT,
294
- backend_locator TEXT,
295
- binding_status TEXT NOT NULL CHECK (
296
- binding_status IN ('bound', 'missing', 'ambiguous', 'unresolved')
297
- ),
298
- PRIMARY KEY (node_id, position, snapshot_id),
299
- FOREIGN KEY (node_id, position)
300
- REFERENCES atlas_business_node_evidence(node_id, position) ON DELETE CASCADE,
301
- FOREIGN KEY (repository_id, snapshot_id)
302
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE
303
- ) STRICT;
304
-
305
- CREATE TABLE atlas_business_relations (
306
- relation_id INTEGER PRIMARY KEY,
307
- repository_id TEXT NOT NULL,
308
- base_snapshot_id TEXT NOT NULL,
309
- from_key TEXT NOT NULL,
310
- relation_type TEXT NOT NULL CHECK (relation_type IN (
311
- 'part_of', 'invokes', 'realized_by', 'reads', 'writes', 'publishes',
312
- 'consumes', 'constrained_by', 'verified_by'
313
- )),
314
- to_domain TEXT NOT NULL CHECK (to_domain IN ('structural', 'business')),
315
- to_key TEXT NOT NULL,
316
- certainty TEXT NOT NULL CHECK (certainty IN ('exact', 'inferred', 'hypothesis')),
317
- target_file TEXT,
318
- target_qualified_symbol TEXT,
319
- target_structural_kind TEXT,
320
- target_start_line INTEGER,
321
- target_start_column INTEGER,
322
- target_end_line INTEGER,
323
- target_end_column INTEGER,
324
- target_backend_locator TEXT,
325
- UNIQUE (repository_id, from_key, relation_type, to_domain, to_key),
326
- FOREIGN KEY (repository_id, base_snapshot_id)
327
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id),
328
- FOREIGN KEY (repository_id, from_key)
329
- REFERENCES atlas_business_nodes(repository_id, node_key)
330
- ) STRICT;
331
-
332
- CREATE INDEX atlas_business_relations_from_index
333
- ON atlas_business_relations (repository_id, from_key);
334
- CREATE INDEX atlas_business_relations_to_index
335
- ON atlas_business_relations (repository_id, to_domain, to_key);
336
-
337
- CREATE TABLE atlas_business_relation_evidence (
338
- relation_id INTEGER NOT NULL,
339
- position INTEGER NOT NULL,
340
- structural_reference TEXT NOT NULL,
341
- file TEXT NOT NULL,
342
- qualified_symbol TEXT,
343
- structural_kind TEXT,
344
- start_line INTEGER NOT NULL,
345
- start_column INTEGER NOT NULL,
346
- end_line INTEGER NOT NULL,
347
- end_column INTEGER NOT NULL,
348
- content_hash TEXT NOT NULL,
349
- backend_locator TEXT,
350
- PRIMARY KEY (relation_id, position),
351
- FOREIGN KEY (relation_id)
352
- REFERENCES atlas_business_relations(relation_id) ON DELETE CASCADE
353
- ) STRICT;
354
-
355
- CREATE TABLE atlas_business_relation_evidence_bindings (
356
- relation_id INTEGER NOT NULL,
357
- position INTEGER NOT NULL,
358
- repository_id TEXT NOT NULL,
359
- snapshot_id TEXT NOT NULL,
360
- resolved_structural_reference TEXT,
361
- resolved_qualified_symbol TEXT,
362
- resolved_structural_kind TEXT,
363
- backend_version TEXT,
364
- backend_locator TEXT,
365
- binding_status TEXT NOT NULL CHECK (
366
- binding_status IN ('bound', 'missing', 'ambiguous', 'unresolved')
367
- ),
368
- PRIMARY KEY (relation_id, position, snapshot_id),
369
- FOREIGN KEY (relation_id, position)
370
- REFERENCES atlas_business_relation_evidence(relation_id, position) ON DELETE CASCADE,
371
- FOREIGN KEY (repository_id, snapshot_id)
372
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE
373
- ) STRICT;
374
-
375
- CREATE TABLE atlas_structural_relation_target_bindings (
376
- relation_id INTEGER NOT NULL,
377
- repository_id TEXT NOT NULL,
378
- snapshot_id TEXT NOT NULL,
379
- resolved_structural_reference TEXT,
380
- resolved_file TEXT,
381
- resolved_qualified_symbol TEXT,
382
- resolved_structural_kind TEXT,
383
- resolved_start_line INTEGER,
384
- resolved_start_column INTEGER,
385
- resolved_end_line INTEGER,
386
- resolved_end_column INTEGER,
387
- backend_version TEXT,
388
- backend_locator TEXT,
389
- binding_status TEXT NOT NULL CHECK (
390
- binding_status IN ('bound', 'missing', 'ambiguous', 'unresolved')
391
- ),
392
- PRIMARY KEY (relation_id, snapshot_id),
393
- FOREIGN KEY (relation_id)
394
- REFERENCES atlas_business_relations(relation_id) ON DELETE CASCADE,
395
- FOREIGN KEY (repository_id, snapshot_id)
396
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE
397
- ) STRICT;
398
-
399
- CREATE TABLE atlas_business_node_validity (
400
- node_id INTEGER NOT NULL,
401
- repository_id TEXT NOT NULL,
402
- snapshot_id TEXT NOT NULL,
403
- validity TEXT NOT NULL CHECK (validity IN ('valid', 'stale')),
404
- PRIMARY KEY (node_id, snapshot_id),
405
- FOREIGN KEY (node_id) REFERENCES atlas_business_nodes(node_id) ON DELETE CASCADE,
406
- FOREIGN KEY (repository_id, snapshot_id)
407
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE
408
- ) STRICT;
409
-
410
- CREATE TABLE atlas_business_relation_validity (
411
- relation_id INTEGER NOT NULL,
412
- repository_id TEXT NOT NULL,
413
- snapshot_id TEXT NOT NULL,
414
- validity TEXT NOT NULL CHECK (validity IN ('valid', 'stale')),
415
- PRIMARY KEY (relation_id, snapshot_id),
416
- FOREIGN KEY (relation_id) REFERENCES atlas_business_relations(relation_id) ON DELETE CASCADE,
417
- FOREIGN KEY (repository_id, snapshot_id)
418
- REFERENCES atlas_repository_snapshots(repository_id, snapshot_id) ON DELETE CASCADE
419
- ) STRICT;
420
-
421
- CREATE TABLE atlas_graph_search (
422
- repository_id TEXT NOT NULL,
423
- node_key TEXT NOT NULL,
424
- label TEXT NOT NULL,
425
- aliases TEXT NOT NULL,
426
- summary TEXT NOT NULL,
427
- symbols TEXT NOT NULL,
428
- paths TEXT NOT NULL,
429
- PRIMARY KEY (repository_id, node_key),
430
- FOREIGN KEY (repository_id, node_key)
431
- REFERENCES atlas_business_nodes(repository_id, node_key) ON DELETE CASCADE
432
- ) STRICT;
433
- `;
@@ -1,19 +0,0 @@
1
- import type { GitRepository } from "../repository/types.js";
2
- import type { RepositorySnapshot } from "../snapshots/types.js";
3
- export interface StoredRepositorySnapshot {
4
- readonly snapshot: RepositorySnapshot;
5
- readonly createdAt: string;
6
- }
7
- export declare class SnapshotStore implements Disposable {
8
- #private;
9
- readonly databasePath: string;
10
- constructor(repository: GitRepository);
11
- save(snapshot: RepositorySnapshot): void;
12
- find(snapshotId: string): RepositorySnapshot | undefined;
13
- findStored(snapshotId: string): StoredRepositorySnapshot | undefined;
14
- latest(): RepositorySnapshot | undefined;
15
- latestStored(): StoredRepositorySnapshot | undefined;
16
- close(): void;
17
- [Symbol.dispose](): void;
18
- }
19
- //# sourceMappingURL=snapshot-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshot-store.d.ts","sourceRoot":"","sources":["../../src/storage/snapshot-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,aAAc,YAAW,UAAU;;IAC9C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAKlB,UAAU,EAAE,aAAa;IAOrC,IAAI,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI;IAyBxC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIxD,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAepE,MAAM,IAAI,kBAAkB,GAAG,SAAS;IAIxC,YAAY,IAAI,wBAAwB,GAAG,SAAS;IAkBpD,KAAK,IAAI,IAAI;IAIb,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;CAGzB"}
@@ -1,74 +0,0 @@
1
- import { AtlasDatabase } from "./atlas-database.js";
2
- export class SnapshotStore {
3
- databasePath;
4
- #atlasDatabase;
5
- #repositoryId;
6
- #gitDirectory;
7
- constructor(repository) {
8
- this.#repositoryId = repository.repositoryId;
9
- this.#gitDirectory = repository.gitDirectory;
10
- this.#atlasDatabase = new AtlasDatabase(repository);
11
- this.databasePath = this.#atlasDatabase.databasePath;
12
- }
13
- save(snapshot) {
14
- if (snapshot.repositoryId !== this.#repositoryId) {
15
- throw new Error("Cannot store a snapshot from another repository");
16
- }
17
- const timestamp = new Date().toISOString();
18
- const database = this.#atlasDatabase.connection;
19
- database.exec("BEGIN IMMEDIATE");
20
- try {
21
- database.prepare(`
22
- INSERT INTO atlas_repository_snapshots (
23
- repository_id,
24
- snapshot_id,
25
- payload,
26
- created_at
27
- ) VALUES (?, ?, ?, ?)
28
- ON CONFLICT (repository_id, snapshot_id) DO NOTHING
29
- `).run(this.#repositoryId, snapshot.snapshotId, JSON.stringify(snapshot), timestamp);
30
- database.exec("COMMIT");
31
- }
32
- catch (error) {
33
- database.exec("ROLLBACK");
34
- throw error;
35
- }
36
- }
37
- find(snapshotId) {
38
- return this.findStored(snapshotId)?.snapshot;
39
- }
40
- findStored(snapshotId) {
41
- const row = this.#atlasDatabase.connection.prepare(`
42
- SELECT payload, created_at
43
- FROM atlas_repository_snapshots
44
- WHERE repository_id = ? AND snapshot_id = ?
45
- `).get(this.#repositoryId, snapshotId);
46
- return row === undefined ? undefined : {
47
- snapshot: JSON.parse(row.payload),
48
- createdAt: row.created_at,
49
- };
50
- }
51
- latest() {
52
- return this.latestStored()?.snapshot;
53
- }
54
- latestStored() {
55
- const row = this.#atlasDatabase.connection.prepare(`
56
- SELECT snapshot.payload, snapshot.created_at
57
- FROM atlas_worktree_states AS worktree
58
- JOIN atlas_repository_snapshots AS snapshot
59
- ON snapshot.repository_id = worktree.repository_id
60
- AND snapshot.snapshot_id = worktree.current_snapshot_id
61
- WHERE worktree.repository_id = ? AND worktree.git_directory = ?
62
- `).get(this.#repositoryId, this.#gitDirectory);
63
- return row === undefined ? undefined : {
64
- snapshot: JSON.parse(row.payload),
65
- createdAt: row.created_at,
66
- };
67
- }
68
- close() {
69
- this.#atlasDatabase.close();
70
- }
71
- [Symbol.dispose]() {
72
- this.close();
73
- }
74
- }
@@ -1,57 +0,0 @@
1
- import type { GitRepository } from "../repository/types.js";
2
- import type { IndexedSourceFile, StructuralEvidenceResolver, WorldWriteCoordinator } from "../world/types.js";
3
- import { type StructuralBuildResult, type StructuralCallRelation, type StructuralFileDependency, type StructuralIndexBackend, type StructuralIndexState, type StructuralNode, type StructuralProjectGraphQuery, type StructuralReference, type StructuralSearchQuery, type StructuralSearchResult, type StructuralTraversalQuery, type StructuralTraversalResult, type StructuralUnknownBoundary } from "./types.js";
4
- export interface StructuralWorldPublicationHooks {
5
- onBuilding(): void | Promise<void>;
6
- prepareProjection(): void | Promise<void>;
7
- validate(result: StructuralBuildResult, indexedSources: readonly IndexedSourceFile[]): void | Promise<void>;
8
- publish(result: StructuralBuildResult, resolver: StructuralEvidenceResolver): void | Promise<void>;
9
- fail(error: unknown): void;
10
- }
11
- export declare class CodeGraphStructuralBackend implements StructuralIndexBackend, WorldWriteCoordinator {
12
- #private;
13
- constructor(repository: GitRepository);
14
- prepareStorageForBootstrap(): Promise<void>;
15
- inspect(): Promise<StructuralIndexState>;
16
- build(): Promise<StructuralBuildResult>;
17
- sync(): Promise<StructuralBuildResult>;
18
- listUnknownBoundaries(): Promise<readonly StructuralUnknownBoundary[]>;
19
- publishWorld(requestedMode: "full" | "incremental", hooks: StructuralWorldPublicationHooks): Promise<StructuralBuildResult>;
20
- withWorldWriteLock<T>(operation: (state: StructuralIndexState, resolver: StructuralEvidenceResolver) => Promise<T>): Promise<T>;
21
- listRoots(): Promise<readonly StructuralNode[]>;
22
- readProjectGraph(query: StructuralProjectGraphQuery): Promise<StructuralTraversalResult>;
23
- search(query: StructuralSearchQuery): Promise<readonly StructuralSearchResult[]>;
24
- getNode(reference: StructuralReference): Promise<StructuralNode | undefined>;
25
- traverse(query: StructuralTraversalQuery): Promise<StructuralTraversalResult>;
26
- getCallers(reference: StructuralReference): Promise<readonly StructuralCallRelation[]>;
27
- getCallees(reference: StructuralReference): Promise<readonly StructuralCallRelation[]>;
28
- getFileDependencies(path: string): Promise<readonly StructuralFileDependency[]>;
29
- private runBuild;
30
- private runLockedBuild;
31
- private persistWorldFailure;
32
- private synchronizeGraph;
33
- private rebuildGraph;
34
- private restorePublishedGraph;
35
- private createFullBuildResult;
36
- private createSyncResult;
37
- private createLockUnavailableSyncResult;
38
- private createLockUnavailableBuildResult;
39
- private failedBuildResult;
40
- private withCurrentGraph;
41
- private readState;
42
- private stateFromGraph;
43
- private missingState;
44
- private incompleteState;
45
- private prepareAtlasDirectory;
46
- private inspectWithSdk;
47
- private withPublishedGraph;
48
- private acquireAtlasWriteLock;
49
- private createCodeGraphWriteLock;
50
- private atlasDirectoryExists;
51
- private prepareAtlasIgnoreFile;
52
- private verifyAtlasIgnoreIsUntracked;
53
- private verifyExistingAtlasIgnoreFile;
54
- private verifyAtlasDirectory;
55
- private verifyDatabasePath;
56
- }
57
- //# sourceMappingURL=codegraph-backend.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codegraph-backend.d.ts","sourceRoot":"","sources":["../../src/structural-backend/codegraph-backend.ts"],"names":[],"mappings":"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"}