weavatrix 0.3.14 → 1.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 (306) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +132 -200
  3. package/bin/native/darwin-arm64/weavatrix +0 -0
  4. package/bin/native/darwin-x64/weavatrix +0 -0
  5. package/bin/native/linux-arm64/weavatrix +0 -0
  6. package/bin/native/linux-x64/weavatrix +0 -0
  7. package/bin/native/win32-arm64/weavatrix.exe +0 -0
  8. package/bin/native/win32-x64/weavatrix.exe +0 -0
  9. package/bin/resolve-binary.mjs +73 -0
  10. package/bin/run-native.mjs +26 -0
  11. package/bin/weavatrix-mcp.mjs +7 -6
  12. package/bin/weavatrix.mjs +5 -0
  13. package/package.json +10 -67
  14. package/server.json +38 -0
  15. package/skill/SKILL.md +62 -374
  16. package/skill/agents/openai.yaml +4 -0
  17. package/skill/references/tool-routing.md +45 -0
  18. package/SECURITY.md +0 -101
  19. package/docs/adr/0001-v0.3-offline-online-split.md +0 -60
  20. package/docs/agent-task-benchmark.md +0 -58
  21. package/docs/releases/v0.2.19.md +0 -33
  22. package/docs/releases/v0.3.0.md +0 -43
  23. package/docs/releases/v0.3.1.md +0 -30
  24. package/docs/releases/v0.3.10.md +0 -76
  25. package/docs/releases/v0.3.11.md +0 -55
  26. package/docs/releases/v0.3.12.md +0 -44
  27. package/docs/releases/v0.3.13.md +0 -34
  28. package/docs/releases/v0.3.14.md +0 -37
  29. package/docs/releases/v0.3.2.md +0 -15
  30. package/docs/releases/v0.3.3.md +0 -25
  31. package/docs/releases/v0.3.4.md +0 -40
  32. package/docs/releases/v0.3.5.md +0 -50
  33. package/docs/releases/v0.3.6.md +0 -44
  34. package/docs/releases/v0.3.7.md +0 -37
  35. package/docs/releases/v0.3.8.md +0 -21
  36. package/docs/releases/v0.3.9.md +0 -36
  37. package/scripts/run-agent-task-benchmark.mjs +0 -118
  38. package/src/analysis/allowed-test-runner.js +0 -70
  39. package/src/analysis/architecture/contract-graph.js +0 -119
  40. package/src/analysis/architecture/contract-schema.js +0 -110
  41. package/src/analysis/architecture/contract-storage.js +0 -35
  42. package/src/analysis/architecture/contract-verification.js +0 -168
  43. package/src/analysis/architecture-contract.js +0 -16
  44. package/src/analysis/audit-debt.js +0 -94
  45. package/src/analysis/audit-extensions.js +0 -60
  46. package/src/analysis/cargo-dependency-evidence.js +0 -108
  47. package/src/analysis/cargo-manifests.js +0 -81
  48. package/src/analysis/change-classification/diff-parser.js +0 -103
  49. package/src/analysis/change-classification/options.js +0 -40
  50. package/src/analysis/change-classification/symbol-classifier.js +0 -177
  51. package/src/analysis/change-classification.js +0 -188
  52. package/src/analysis/coverage-reports-tarpaulin.js +0 -112
  53. package/src/analysis/coverage-reports.js +0 -246
  54. package/src/analysis/cycle-route.js +0 -14
  55. package/src/analysis/data-flow-evidence.js +0 -114
  56. package/src/analysis/dead-check.js +0 -300
  57. package/src/analysis/dead-code-review/candidates.js +0 -194
  58. package/src/analysis/dead-code-review/policy.js +0 -23
  59. package/src/analysis/dead-code-review.js +0 -119
  60. package/src/analysis/dep-check-ecosystems.js +0 -205
  61. package/src/analysis/dep-check.js +0 -290
  62. package/src/analysis/dep-rules.js +0 -10
  63. package/src/analysis/dependency/conventions.js +0 -16
  64. package/src/analysis/dependency/scoped-dependencies.js +0 -51
  65. package/src/analysis/dependency/source-references.js +0 -21
  66. package/src/analysis/duplicate-groups.js +0 -104
  67. package/src/analysis/duplicates-worker.js +0 -11
  68. package/src/analysis/duplicates.compute.js +0 -269
  69. package/src/analysis/duplicates.js +0 -15
  70. package/src/analysis/duplicates.run.js +0 -52
  71. package/src/analysis/duplicates.tokenize.js +0 -199
  72. package/src/analysis/endpoints/common.js +0 -79
  73. package/src/analysis/endpoints/extract.js +0 -120
  74. package/src/analysis/endpoints/inventory.js +0 -84
  75. package/src/analysis/endpoints/mounts.js +0 -129
  76. package/src/analysis/endpoints-java.js +0 -260
  77. package/src/analysis/endpoints-rust.js +0 -124
  78. package/src/analysis/endpoints.js +0 -3
  79. package/src/analysis/findings.js +0 -70
  80. package/src/analysis/git-history/analytics.js +0 -177
  81. package/src/analysis/git-history/collector.js +0 -67
  82. package/src/analysis/git-history/options.js +0 -66
  83. package/src/analysis/git-history.js +0 -143
  84. package/src/analysis/git-ref-graph.js +0 -76
  85. package/src/analysis/go-dependency-evidence.js +0 -62
  86. package/src/analysis/graph-analysis.aggregate.js +0 -296
  87. package/src/analysis/graph-analysis.edges.js +0 -24
  88. package/src/analysis/graph-analysis.js +0 -7
  89. package/src/analysis/graph-analysis.refs.js +0 -202
  90. package/src/analysis/graph-analysis.summaries.js +0 -65
  91. package/src/analysis/health-capabilities.js +0 -83
  92. package/src/analysis/hot-path-review.js +0 -266
  93. package/src/analysis/http-contract-wrappers.js +0 -241
  94. package/src/analysis/http-contracts/analysis.js +0 -179
  95. package/src/analysis/http-contracts/client-call-detection.js +0 -82
  96. package/src/analysis/http-contracts/client-call-parser.js +0 -273
  97. package/src/analysis/http-contracts/graph-context.js +0 -143
  98. package/src/analysis/http-contracts/matching.js +0 -61
  99. package/src/analysis/http-contracts/shared.js +0 -85
  100. package/src/analysis/http-contracts.js +0 -6
  101. package/src/analysis/internal-audit/dependency-health.js +0 -113
  102. package/src/analysis/internal-audit/python-manifests.js +0 -78
  103. package/src/analysis/internal-audit/repo-files.js +0 -50
  104. package/src/analysis/internal-audit/supply-chain.js +0 -149
  105. package/src/analysis/internal-audit.collect.js +0 -213
  106. package/src/analysis/internal-audit.js +0 -9
  107. package/src/analysis/internal-audit.reach.js +0 -201
  108. package/src/analysis/internal-audit.run.js +0 -256
  109. package/src/analysis/java-source.js +0 -36
  110. package/src/analysis/jvm-artifact-index.js +0 -87
  111. package/src/analysis/jvm-dependency-evidence.js +0 -138
  112. package/src/analysis/jvm-manifests.js +0 -114
  113. package/src/analysis/manifests.js +0 -123
  114. package/src/analysis/package-reachability.js +0 -39
  115. package/src/analysis/source-complexity.ast.js +0 -97
  116. package/src/analysis/source-complexity.constants.js +0 -55
  117. package/src/analysis/source-complexity.js +0 -14
  118. package/src/analysis/source-complexity.report.js +0 -81
  119. package/src/analysis/source-complexity.walk.js +0 -228
  120. package/src/analysis/source-correctness/retry-patterns.js +0 -93
  121. package/src/analysis/source-correctness.js +0 -222
  122. package/src/analysis/static-test-reachability.js +0 -150
  123. package/src/analysis/structure/dependency-graph.js +0 -151
  124. package/src/analysis/structure/findings.js +0 -162
  125. package/src/analysis/task-retrieval.js +0 -107
  126. package/src/analysis/transport-contracts.js +0 -224
  127. package/src/analysis/transport-runtime-evidence.js +0 -155
  128. package/src/analysis-kit.mjs +0 -17
  129. package/src/bounds.js +0 -4
  130. package/src/build-graph.js +0 -209
  131. package/src/child-env.js +0 -7
  132. package/src/config.js +0 -5
  133. package/src/extension/local-services.mjs +0 -75
  134. package/src/git-exec.js +0 -67
  135. package/src/graph/build-worker.js +0 -49
  136. package/src/graph/builder/go-receiver-resolution.js +0 -112
  137. package/src/graph/builder/js/dynamic-import.js +0 -26
  138. package/src/graph/builder/js/queries.js +0 -48
  139. package/src/graph/builder/lang-csharp.js +0 -40
  140. package/src/graph/builder/lang-css.js +0 -29
  141. package/src/graph/builder/lang-go.js +0 -140
  142. package/src/graph/builder/lang-html.js +0 -29
  143. package/src/graph/builder/lang-java-calls.js +0 -142
  144. package/src/graph/builder/lang-java.js +0 -215
  145. package/src/graph/builder/lang-js.js +0 -291
  146. package/src/graph/builder/lang-python.js +0 -235
  147. package/src/graph/builder/lang-rust-calls.js +0 -63
  148. package/src/graph/builder/lang-rust.js +0 -299
  149. package/src/graph/builder/lang-solidity.js +0 -126
  150. package/src/graph/builder/lang-sql.js +0 -263
  151. package/src/graph/builder/pass2-resolution.js +0 -81
  152. package/src/graph/builder/spec-pkg.js +0 -87
  153. package/src/graph/community.js +0 -27
  154. package/src/graph/edge-provenance.js +0 -31
  155. package/src/graph/file-lock.js +0 -69
  156. package/src/graph/freshness-probe.js +0 -142
  157. package/src/graph/graph-filter.js +0 -63
  158. package/src/graph/incremental-refresh.js +0 -235
  159. package/src/graph/internal-builder.barrels.js +0 -235
  160. package/src/graph/internal-builder.build.js +0 -300
  161. package/src/graph/internal-builder.java.js +0 -33
  162. package/src/graph/internal-builder.js +0 -12
  163. package/src/graph/internal-builder.langs.js +0 -157
  164. package/src/graph/internal-builder.pass2.js +0 -163
  165. package/src/graph/internal-builder.resolvers.js +0 -286
  166. package/src/graph/layout.js +0 -51
  167. package/src/graph/node-id.js +0 -7
  168. package/src/graph/parser-artifact-boundary.js +0 -55
  169. package/src/graph/relations.js +0 -4
  170. package/src/graph/repo-registry.js +0 -124
  171. package/src/graph/resolvers/rust.js +0 -117
  172. package/src/infra/infra-items.js +0 -255
  173. package/src/infra/infra-registry.js +0 -184
  174. package/src/infra/infra.detect.js +0 -119
  175. package/src/infra/infra.js +0 -38
  176. package/src/infra/infra.match.js +0 -102
  177. package/src/infra/infra.scan.js +0 -93
  178. package/src/mcp/actions/graph-lifecycle.mjs +0 -148
  179. package/src/mcp/architecture-bootstrap.mjs +0 -168
  180. package/src/mcp/architecture-starter.mjs +0 -234
  181. package/src/mcp/catalog.mjs +0 -233
  182. package/src/mcp/company-contract-page.mjs +0 -142
  183. package/src/mcp/company-contract-reconcile.mjs +0 -87
  184. package/src/mcp/company-contract-verdict.mjs +0 -42
  185. package/src/mcp/evidence/bun-lock-graph.mjs +0 -209
  186. package/src/mcp/evidence/duplicate-member-order.mjs +0 -8
  187. package/src/mcp/evidence/package-graph-common.mjs +0 -115
  188. package/src/mcp/evidence/package-lock-graph.mjs +0 -92
  189. package/src/mcp/evidence-snapshot.architecture.mjs +0 -80
  190. package/src/mcp/evidence-snapshot.common.mjs +0 -158
  191. package/src/mcp/evidence-snapshot.duplicates.mjs +0 -213
  192. package/src/mcp/evidence-snapshot.health.mjs +0 -102
  193. package/src/mcp/evidence-snapshot.inventory.mjs +0 -148
  194. package/src/mcp/evidence-snapshot.mjs +0 -50
  195. package/src/mcp/evidence-snapshot.package-graph.mjs +0 -34
  196. package/src/mcp/evidence-snapshot.structure.mjs +0 -84
  197. package/src/mcp/extension-api.mjs +0 -77
  198. package/src/mcp/git-output.mjs +0 -7
  199. package/src/mcp/graph/context-core.mjs +0 -111
  200. package/src/mcp/graph/context-seeds.mjs +0 -207
  201. package/src/mcp/graph/context-state.mjs +0 -85
  202. package/src/mcp/graph/reverse-reach.mjs +0 -42
  203. package/src/mcp/graph/tools-core.mjs +0 -143
  204. package/src/mcp/graph/tools-query.mjs +0 -276
  205. package/src/mcp/graph-context.mjs +0 -5
  206. package/src/mcp/graph-diff.mjs +0 -218
  207. package/src/mcp/health/audit-format.mjs +0 -199
  208. package/src/mcp/health/audit.mjs +0 -199
  209. package/src/mcp/health/dead-code.mjs +0 -110
  210. package/src/mcp/health/duplicates.mjs +0 -121
  211. package/src/mcp/health/endpoints.mjs +0 -71
  212. package/src/mcp/health/structure.mjs +0 -220
  213. package/src/mcp/runtime-version.mjs +0 -31
  214. package/src/mcp/server/auto-refresh.mjs +0 -66
  215. package/src/mcp/server/runtime-config.mjs +0 -43
  216. package/src/mcp/server/shutdown.mjs +0 -40
  217. package/src/mcp/staleness-notice.mjs +0 -20
  218. package/src/mcp/sync/evidence-architecture.mjs +0 -54
  219. package/src/mcp/sync/evidence-common.mjs +0 -88
  220. package/src/mcp/sync/evidence-duplicates.mjs +0 -97
  221. package/src/mcp/sync/evidence-health.mjs +0 -56
  222. package/src/mcp/sync/evidence-packages.mjs +0 -95
  223. package/src/mcp/sync/payload-common.mjs +0 -97
  224. package/src/mcp/sync/payload-v2.mjs +0 -54
  225. package/src/mcp/sync/payload-v3.mjs +0 -79
  226. package/src/mcp/sync-evidence.mjs +0 -23
  227. package/src/mcp/sync-payload.mjs +0 -70
  228. package/src/mcp/tool-result.mjs +0 -54
  229. package/src/mcp/tools-actions.mjs +0 -11
  230. package/src/mcp/tools-architecture.mjs +0 -177
  231. package/src/mcp/tools-company.mjs +0 -251
  232. package/src/mcp/tools-context.mjs +0 -222
  233. package/src/mcp/tools-endpoints.mjs +0 -207
  234. package/src/mcp/tools-graph-hubs.mjs +0 -78
  235. package/src/mcp/tools-graph.mjs +0 -17
  236. package/src/mcp/tools-health.mjs +0 -24
  237. package/src/mcp/tools-history.mjs +0 -28
  238. package/src/mcp/tools-impact-change.mjs +0 -220
  239. package/src/mcp/tools-impact-precision.mjs +0 -89
  240. package/src/mcp/tools-impact.mjs +0 -169
  241. package/src/mcp/tools-source.mjs +0 -238
  242. package/src/mcp/tools-verified-change.mjs +0 -200
  243. package/src/mcp-rg.mjs +0 -50
  244. package/src/mcp-runtime.mjs +0 -2
  245. package/src/mcp-server.mjs +0 -298
  246. package/src/mcp-source-tools.mjs +0 -163
  247. package/src/path-classification.js +0 -226
  248. package/src/path-ignore.js +0 -69
  249. package/src/precision/lsp-client/constants.js +0 -12
  250. package/src/precision/lsp-client/environment.js +0 -20
  251. package/src/precision/lsp-client/errors.js +0 -15
  252. package/src/precision/lsp-client/lifecycle.js +0 -114
  253. package/src/precision/lsp-client/message-parser.js +0 -81
  254. package/src/precision/lsp-client/protocol.js +0 -212
  255. package/src/precision/lsp-client/registry.js +0 -59
  256. package/src/precision/lsp-client/repo-uri.js +0 -60
  257. package/src/precision/lsp-client/stdio-client.js +0 -140
  258. package/src/precision/lsp-client.js +0 -10
  259. package/src/precision/lsp-overlay/budget-policy.js +0 -78
  260. package/src/precision/lsp-overlay/build.js +0 -261
  261. package/src/precision/lsp-overlay/contract.js +0 -61
  262. package/src/precision/lsp-overlay/reference-results.js +0 -108
  263. package/src/precision/lsp-overlay/semantic-inputs.js +0 -62
  264. package/src/precision/lsp-overlay/source-session.js +0 -142
  265. package/src/precision/lsp-overlay/store.js +0 -150
  266. package/src/precision/lsp-overlay/target-index.js +0 -152
  267. package/src/precision/lsp-overlay/target-query.js +0 -55
  268. package/src/precision/lsp-overlay.js +0 -11
  269. package/src/precision/symbol-query.js +0 -224
  270. package/src/precision/typescript-lsp-provider.js +0 -12
  271. package/src/precision/typescript-provider/client.js +0 -89
  272. package/src/precision/typescript-provider/discovery.js +0 -124
  273. package/src/precision/typescript-provider/isolated-runtime.js +0 -39
  274. package/src/precision/typescript-provider/project-host.js +0 -254
  275. package/src/precision/typescript-provider/project-safety.js +0 -166
  276. package/src/precision/typescript-provider/reference-usage.js +0 -53
  277. package/src/process.js +0 -95
  278. package/src/repo-path.js +0 -53
  279. package/src/scan/discover.inventory.js +0 -78
  280. package/src/scan/discover.js +0 -5
  281. package/src/scan/discover.list.js +0 -79
  282. package/src/scan/discover.stack.js +0 -227
  283. package/src/scan/search.core.js +0 -24
  284. package/src/scan/search.git.js +0 -102
  285. package/src/scan/search.js +0 -9
  286. package/src/scan/search.node.js +0 -83
  287. package/src/scan/search.preview.js +0 -49
  288. package/src/scan/search.rg.js +0 -145
  289. package/src/security/advisory-store.js +0 -172
  290. package/src/security/installed-jvm-rust.js +0 -46
  291. package/src/security/installed.js +0 -280
  292. package/src/security/malware-file-heuristics.js +0 -121
  293. package/src/security/malware-heuristics.exclusions.js +0 -134
  294. package/src/security/malware-heuristics.js +0 -15
  295. package/src/security/malware-heuristics.roots.js +0 -145
  296. package/src/security/malware-heuristics.scan.js +0 -89
  297. package/src/security/malware-heuristics.sweep.js +0 -122
  298. package/src/security/malware-scoring.js +0 -105
  299. package/src/security/match.js +0 -85
  300. package/src/security/registry-sig.classify.js +0 -137
  301. package/src/security/registry-sig.js +0 -18
  302. package/src/security/registry-sig.rules.js +0 -192
  303. package/src/security/rust-advisory-report.js +0 -60
  304. package/src/security/typosquat.js +0 -81
  305. package/src/util.js +0 -40
  306. package/src/version.js +0 -7
@@ -1,184 +0,0 @@
1
- // Infra signature registry — generated by the infra-signature-registry workflow (parallel research across
2
- // Node/Python/Go/JVM/Ruby/PHP/.NET/Rust + docker/k8s/env conventions, then adversarial false-positive +
3
- // coverage + ground-truth verification, then a category-split synthesis). One row per backing service.
4
- // See main/repos/infra.js for matcher semantics: deps=exact manifest dep, images=path-segment suffix,
5
- // envPrefixes=KEY prefix (envWeak entries also require an infra suffix), imports=quoted source token.
6
- // ORMs / AWS-SDK monoliths / instrumentation libs / generic env prefixes were deliberately EXCLUDED as
7
- // non-attributing. Import tokens are normalized to bare module paths. Edit this file to tune; regenerate
8
- // by re-running the workflow (.claude/.../infra-signature-registry).
9
- export const INFRA_SERVICES = [
10
- { id: "postgres", name: "POSTGRES", kind: "db", color: 0x4fd1ff,
11
- deps: ["pg","pg-promise","postgres","@neondatabase/serverless","psycopg2-binary","asyncpg","github.com/jackc/pgx/v5","org.postgresql:postgresql"],
12
- imports: ["pg-promise","@neondatabase/serverless","psycopg2","asyncpg","github.com/lib/pq","github.com/jackc/pgx","org.postgresql","tokio_postgres"], images: ["postgres","bitnami/postgresql","postgis/postgis","supabase/postgres","pgvector/pgvector"], envPrefixes: ["POSTGRES","POSTGRESQL","PGHOST","PGUSER","PGPASSWORD","PGDATABASE","POSTGRES_HOST"], envWeak: [] },
13
- { id: "mysql", name: "MYSQL", kind: "db", color: 0x4fc6ff,
14
- deps: ["mysql2","pymysql","mysqlclient","aiomysql","asyncmy","github.com/go-sql-driver/mysql","com.mysql:mysql-connector-j","MySqlConnector"],
15
- imports: ["mysql2","pymysql","MySQLdb","aiomysql","asyncmy","github.com/go-sql-driver/mysql","com.mysql.cj","mysql_async"], images: ["mysql","bitnami/mysql","mysql/mysql-server","percona"], envPrefixes: ["MYSQL_HOST","MYSQL_PORT","MYSQL_USER","MYSQL_PASSWORD","MYSQL_DATABASE","MYSQL_ROOT_PASSWORD"], envWeak: [] },
16
- { id: "mariadb", name: "MARIADB", kind: "db", color: 0x4fbfe6,
17
- deps: ["mariadb","org.mariadb.jdbc:mariadb-java-client","org.mariadb:r2dbc-mariadb"],
18
- imports: ["mariadb","org.mariadb.jdbc","org.mariadb.r2dbc"], images: ["mariadb","bitnami/mariadb"], envPrefixes: ["MARIADB_HOST","MARIADB_USER","MARIADB_PASSWORD","MARIADB_DATABASE","MARIADB_ROOT_PASSWORD"], envWeak: [] },
19
- { id: "sqlserver", name: "SQLSERVER", kind: "db", color: 0x5fb0ff,
20
- deps: ["mssql","tedious","pymssql","github.com/microsoft/go-mssqldb","com.microsoft.sqlserver:mssql-jdbc","tiberius","io.r2dbc:r2dbc-mssql"],
21
- imports: ["mssql","tedious","pymssql","github.com/microsoft/go-mssqldb","com.microsoft.sqlserver.jdbc","tiberius","io.r2dbc.mssql"], images: ["mcr.microsoft.com/mssql/server","mcr.microsoft.com/azure-sql-edge"], envPrefixes: ["MSSQL_HOST","MSSQL_SA_PASSWORD","SQLSERVER_HOST","SQL_SERVER"], envWeak: [] },
22
- { id: "sqlite", name: "SQLITE", kind: "db", color: 0x6fb8ff,
23
- deps: ["better-sqlite3","sqlite3","aiosqlite","@libsql/client","github.com/mattn/go-sqlite3","org.xerial:sqlite-jdbc","rusqlite","modernc.org/sqlite"],
24
- imports: ["better-sqlite3","sqlite3","aiosqlite","@libsql/client","github.com/mattn/go-sqlite3","org.sqlite","rusqlite","node:sqlite"], images: [], envPrefixes: ["SQLITE_PATH","TURSO","LIBSQL"], envWeak: [] },
25
- { id: "cockroachdb", name: "COCKROACHDB", kind: "db", color: 0x4fd9d1,
26
- deps: ["github.com/cockroachdb/cockroach-go/v2","sqlalchemy-cockroachdb"],
27
- imports: ["github.com/cockroachdb/cockroach-go","sqlalchemy_cockroachdb"], images: ["cockroachdb/cockroach","bitnami/cockroachdb"], envPrefixes: ["COCKROACH","COCKROACHDB","CRDB_HOST","COCKROACH_URL"], envWeak: [] },
28
- { id: "spanner", name: "SPANNER", kind: "db", color: 0x4fd1e0,
29
- deps: ["cloud.google.com/go/spanner","com.google.cloud:google-cloud-spanner","com.google.cloud:google-cloud-spanner-jdbc"],
30
- imports: ["cloud.google.com/go/spanner","com.google.cloud.spanner"], images: ["gcr.io/cloud-spanner-emulator/emulator"], envPrefixes: ["SPANNER"], envWeak: [] },
31
- { id: "planetscale", name: "PLANETSCALE", kind: "db", color: 0x6fd1ff,
32
- deps: ["@planetscale/database"],
33
- imports: ["@planetscale/database"], images: ["vitess/vtgate","vitess/lite"], envPrefixes: ["PLANETSCALE","DATABASE_HOST","PSCALE"], envWeak: [] },
34
- { id: "snowflake", name: "SNOWFLAKE", kind: "db", color: 0x4fb6ff,
35
- deps: ["snowflake-sdk","snowflake-connector-python","github.com/snowflakedb/gosnowflake","net.snowflake:snowflake-jdbc","Snowflake.Data"],
36
- imports: ["snowflake-sdk","snowflake.connector","github.com/snowflakedb/gosnowflake","net.snowflake.client","Snowflake.Data"], images: [], envPrefixes: ["SNOWFLAKE_ACCOUNT","SNOWFLAKE_USER","SNOWFLAKE_WAREHOUSE","SNOWFLAKE_DATABASE"], envWeak: [] },
37
- { id: "bigquery", name: "BIGQUERY", kind: "db", color: 0x5fc0ff,
38
- deps: ["@google-cloud/bigquery","google-cloud-bigquery","cloud.google.com/go/bigquery","com.google.cloud:google-cloud-bigquery"],
39
- imports: ["@google-cloud/bigquery","google.cloud.bigquery","cloud.google.com/go/bigquery","com.google.cloud.bigquery"], images: ["ghcr.io/goccy/bigquery-emulator"], envPrefixes: ["BIGQUERY","GOOGLE_BIGQUERY"], envWeak: [] },
40
- { id: "redshift", name: "REDSHIFT", kind: "db", color: 0x4fa8ff,
41
- deps: ["@aws-sdk/client-redshift","@aws-sdk/client-redshift-data","redshift-connector","com.amazon.redshift:redshift-jdbc42"],
42
- imports: ["@aws-sdk/client-redshift","redshift_connector","com.amazon.redshift"], images: [], envPrefixes: ["REDSHIFT_HOST","REDSHIFT_URL","REDSHIFT_CLUSTER"], envWeak: [] },
43
- { id: "db2", name: "DB2", kind: "db", color: 0x4fcfff,
44
- deps: ["com.ibm.db2:jcc","com.ibm.db2.jcc:db2jcc","ibm_db"],
45
- imports: ["com.ibm.db2.jcc","ibm_db"], images: ["ibmcom/db2","icr.io/db2_community/db2"], envPrefixes: ["DB2"], envWeak: ["DB2"] },
46
- { id: "mongodb", name: "MONGODB", kind: "db", color: 0x6fe26f,
47
- deps: ["mongodb","mongoose","pymongo","motor","go.mongodb.org/mongo-driver","org.mongodb:mongodb-driver-sync","org.mongodb:mongo-java-driver","MongoDB.Driver"],
48
- imports: ["mongoose","pymongo","motor.motor_asyncio","go.mongodb.org/mongo-driver/mongo","com.mongodb.","mongodb","Mongo::Client"], images: ["mongo","bitnami/mongodb","percona/percona-server-mongodb","mongodb/mongodb-community-server"], envPrefixes: ["MONGO","MONGODB","MONGO_URI","MONGO_HOST","MONGODB_URI"], envWeak: [] },
49
- { id: "cassandra", name: "CASSANDRA", kind: "db", color: 0x66dd66,
50
- deps: ["cassandra-driver","github.com/gocql/gocql","com.datastax.oss:java-driver-core","com.datastax.cassandra:cassandra-driver-core","CassandraCSharpDriver","scylla-driver","acsylla","cdrs-tokio"],
51
- imports: ["cassandra-driver","github.com/gocql/gocql","com.datastax.oss.driver","com.datastax.driver.core","scylla"], images: ["cassandra","bitnami/cassandra","scylladb/scylla","scylladb/scylla-enterprise"], envPrefixes: ["CASSANDRA","SCYLLA","CASSANDRA_CONTACT_POINTS","CASSANDRA_KEYSPACE","SCYLLA_CONTACT_POINTS"], envWeak: [] },
52
- { id: "dynamodb", name: "DYNAMODB", kind: "db", color: 0x5fd95f,
53
- deps: ["@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","dynamoose","electrodb","pynamodb","github.com/aws/aws-sdk-go-v2/service/dynamodb","software.amazon.awssdk:dynamodb","github.com/guregu/dynamo"],
54
- imports: ["@aws-sdk/client-dynamodb","@aws-sdk/lib-dynamodb","dynamoose","pynamodb","github.com/aws/aws-sdk-go-v2/service/dynamodb","software.amazon.awssdk.services.dynamodb","Amazon.DynamoDBv2"], images: ["amazon/dynamodb-local"], envPrefixes: ["DYNAMODB","DYNAMO","DYNAMODB_TABLE","DYNAMODB_ENDPOINT","AWS_DYNAMODB"], envWeak: [] },
55
- { id: "elasticsearch", name: "ELASTICSEARCH", kind: "db", color: 0x7aea7a,
56
- deps: ["@elastic/elasticsearch","@opensearch-project/opensearch","elasticsearch","elasticsearch-dsl","opensearch-py","github.com/elastic/go-elasticsearch","co.elastic.clients:elasticsearch-java","org.opensearch.client:opensearch-java"],
57
- imports: ["@elastic/elasticsearch","@opensearch-project/opensearch","elasticsearch_dsl","opensearchpy","github.com/elastic/go-elasticsearch","co.elastic.clients.elasticsearch","org.opensearch.client"], images: ["elasticsearch","docker.elastic.co/elasticsearch/elasticsearch","bitnami/elasticsearch","opensearchproject/opensearch"], envPrefixes: ["ELASTICSEARCH","OPENSEARCH","ES_HOST","ES_URL","ELASTICSEARCH_URL","OPENSEARCH_URL"], envWeak: [] },
58
- { id: "solr", name: "SOLR", kind: "db", color: 0x63e063,
59
- deps: ["solr-client","solr-node","pysolr","aiosolr","github.com/vanng822/go-solr","org.apache.solr:solr-solrj"],
60
- imports: ["solr-client","solr-node","pysolr","org.apache.solr.client.solrj","org.springframework.data.solr"], images: ["solr","bitnami/solr"], envPrefixes: ["SOLR","SOLR_HOST","SOLR_URL","SOLR_PORT"], envWeak: [] },
61
- { id: "meilisearch", name: "MEILISEARCH", kind: "db", color: 0x72e672,
62
- deps: ["meilisearch","@meilisearch/instant-meilisearch","meilisearch-python-sdk","github.com/meilisearch/meilisearch-go","com.meilisearch.sdk:meilisearch-java"],
63
- imports: ["meilisearch","@meilisearch/instant-meilisearch","github.com/meilisearch/meilisearch-go","com.meilisearch.sdk"], images: ["getmeili/meilisearch"], envPrefixes: ["MEILI","MEILISEARCH","MEILI_HOST","MEILI_MASTER_KEY","MEILISEARCH_URL"], envWeak: [] },
64
- { id: "typesense", name: "TYPESENSE", kind: "db", color: 0x59d959,
65
- deps: ["typesense","typesense-instantsearch-adapter","typesense-python","github.com/typesense/typesense-go"],
66
- imports: ["typesense","typesense-instantsearch-adapter","github.com/typesense/typesense-go"], images: ["typesense/typesense"], envPrefixes: ["TYPESENSE","TYPESENSE_HOST","TYPESENSE_API_KEY","TYPESENSE_URL"], envWeak: [] },
67
- { id: "neo4j", name: "NEO4J", kind: "db", color: 0x6fe28a,
68
- deps: ["neo4j-driver","neo4j","py2neo","neomodel","github.com/neo4j/neo4j-go-driver","org.neo4j.driver:neo4j-java-driver","neo4rs","@neo4j/graphql"],
69
- imports: ["neo4j-driver","py2neo","neomodel","github.com/neo4j/neo4j-go-driver","org.neo4j.driver","neo4rs"], images: ["neo4j","bitnami/neo4j"], envPrefixes: ["NEO4J","NEO4J_URI","NEO4J_HOST","NEO4J_AUTH"], envWeak: [] },
70
- { id: "couchbase", name: "COUCHBASE", kind: "db", color: 0x6fe27a,
71
- deps: ["couchbase","acouchbase","github.com/couchbase/gocb/v2","com.couchbase.client:java-client","couchbase-rs"],
72
- imports: ["couchbase","acouchbase","github.com/couchbase/gocb","com.couchbase.client"], images: ["couchbase","bitnami/couchbase"], envPrefixes: ["COUCHBASE","COUCHBASE_HOST","COUCHBASE_URL","COUCHBASE_BUCKET"], envWeak: [] },
73
- { id: "qdrant", name: "QDRANT", kind: "db", color: 0x86e886,
74
- deps: ["@qdrant/js-client-rest","@qdrant/qdrant-js","qdrant-client","github.com/qdrant/go-client","io.qdrant:client"],
75
- imports: ["@qdrant/js-client-rest","qdrant_client","github.com/qdrant/go-client","io.qdrant.client"], images: ["qdrant/qdrant"], envPrefixes: ["QDRANT","QDRANT_URL","QDRANT_HOST","QDRANT_API_KEY"], envWeak: [] },
76
- { id: "weaviate", name: "WEAVIATE", kind: "db", color: 0x90ee90,
77
- deps: ["weaviate-client","weaviate-ts-client","weaviate-python-client","github.com/weaviate/weaviate-go-client","io.weaviate:client"],
78
- imports: ["weaviate-client","weaviate-ts-client","github.com/weaviate/weaviate-go-client","io.weaviate.client"], images: ["semitechnologies/weaviate","cr.weaviate.io/semitechnologies/weaviate"], envPrefixes: ["WEAVIATE","WEAVIATE_URL","WEAVIATE_HOST","WEAVIATE_API_KEY"], envWeak: [] },
79
- { id: "milvus", name: "MILVUS", kind: "db", color: 0x9cf09c,
80
- deps: ["@zilliz/milvus2-sdk-node","pymilvus","github.com/milvus-io/milvus-sdk-go","io.milvus:milvus-sdk-java"],
81
- imports: ["@zilliz/milvus2-sdk-node","pymilvus","github.com/milvus-io/milvus-sdk-go","io.milvus."], images: ["milvusdb/milvus","zilliz/milvus"], envPrefixes: ["MILVUS","MILVUS_HOST","MILVUS_URL","MILVUS_PORT"], envWeak: [] },
82
- { id: "clickhouse", name: "CLICKHOUSE", kind: "ts", color: 0xffe14f,
83
- deps: ["@clickhouse/client","@clickhouse/client-web","clickhouse-driver","clickhouse-connect","github.com/ClickHouse/clickhouse-go/v2","com.clickhouse:clickhouse-jdbc","com.clickhouse:clickhouse-client","ClickHouse.Client","clickhouse"],
84
- imports: ["@clickhouse/client","clickhouse_driver","clickhouse_connect","github.com/ClickHouse/clickhouse-go","com.clickhouse.","ru.yandex.clickhouse","clickhouse","Octonica.ClickHouseClient"], images: ["clickhouse/clickhouse-server","clickhouse/clickhouse-keeper","bitnami/clickhouse","yandex/clickhouse-server"], envPrefixes: ["CLICKHOUSE","CH_HOST","CH_PORT","CH_PASSWORD"], envWeak: [] },
85
- { id: "influxdb", name: "INFLUXDB", kind: "ts", color: 0xf5d800,
86
- deps: ["@influxdata/influxdb-client","influxdb-client","github.com/influxdata/influxdb-client-go/v2","com.influxdb:influxdb-client-java","org.influxdb:influxdb-java","influxdb3-python","influxdb2","InfluxDB.Client","influx"],
87
- imports: ["@influxdata/influxdb-client","influxdb_client","github.com/influxdata/influxdb-client-go","github.com/influxdata/influxdb1-client","com.influxdb.client","org.influxdb.","influx","influxdb"], images: ["influxdb","bitnami/influxdb","quay.io/influxdb/influxdb","telegraf"], envPrefixes: ["INFLUX","INFLUXDB","INFLUX_TOKEN","INFLUXDB_URL","INFLUX_ORG","INFLUX_BUCKET"], envWeak: [] },
88
- { id: "timescaledb", name: "TIMESCALEDB", kind: "ts", color: 0xffea66,
89
- deps: ["@timescale/toolkit"],
90
- imports: ["@timescale/toolkit"], images: ["timescale/timescaledb","timescale/timescaledb-ha","timescaledev/timescaledb-ha"], envPrefixes: ["TIMESCALE","TIMESCALEDB"], envWeak: [] },
91
- { id: "prometheus", name: "PROMETHEUS", kind: "ts", color: 0xfff04d,
92
- deps: ["prometheus-query","prometheus-api-client","github.com/prometheus/client_golang/api"],
93
- imports: ["prometheus-query","github.com/prometheus/client_golang/api","prometheus_api_client"], images: ["prom/prometheus","prom/pushgateway","bitnami/prometheus","prom/node-exporter"], envPrefixes: ["PROMETHEUS","PROMETHEUS_URL","PUSHGATEWAY"], envWeak: [] },
94
- { id: "victoriametrics", name: "VICTORIAMETRICS", kind: "ts", color: 0xe6d633,
95
- deps: ["github.com/VictoriaMetrics/VictoriaMetrics"],
96
- imports: ["github.com/VictoriaMetrics/VictoriaMetrics"], images: ["victoriametrics/victoria-metrics","victoriametrics/vmagent","victoriametrics/vminsert","victoriametrics/vmselect"], envPrefixes: ["VICTORIA_METRICS","VICTORIAMETRICS"], envWeak: [] },
97
- { id: "graphite", name: "GRAPHITE", kind: "ts", color: 0xf0e07a,
98
- deps: ["graphyte","graphitesend","graphite-udp","io.micrometer:micrometer-registry-graphite","io.dropwizard.metrics:metrics-graphite"],
99
- imports: ["graphyte","graphitesend","io.micrometer.graphite","com.codahale.metrics.graphite"], images: ["graphiteapp/graphite-statsd"], envPrefixes: ["GRAPHITE","CARBON"], envWeak: [] },
100
- { id: "redis", name: "REDIS", kind: "cache", color: 0xff6b6b,
101
- deps: ["ioredis","redis","@redis/client","redis-om","@upstash/redis","redis-py","github.com/redis/go-redis/v9","redis.clients:jedis"],
102
- imports: ["ioredis","@redis/client","redis.asyncio","github.com/redis/go-redis","github.com/gomodule/redigo/redis","redis.clients.jedis","io.lettuce.core","org.redisson"], images: ["redis","redis/redis-stack","redis/redis-stack-server","bitnami/redis","redislabs/redismod","eqalpha/keydb"], envPrefixes: ["REDIS","REDIS_HOST","REDIS_URL","REDIS_PASSWORD"], envWeak: [] },
103
- { id: "valkey", name: "VALKEY", kind: "cache", color: 0xff8585,
104
- deps: ["valkey","iovalkey","valkey-glide","@valkey/valkey-glide","github.com/valkey-io/valkey-go","valkey-py"],
105
- imports: ["iovalkey","valkey_glide","github.com/valkey-io/valkey-go"], images: ["valkey/valkey","bitnami/valkey"], envPrefixes: ["VALKEY","VALKEY_HOST","VALKEY_URL"], envWeak: [] },
106
- { id: "memcached", name: "MEMCACHED", kind: "cache", color: 0xff5252,
107
- deps: ["memjs","pymemcache","pylibmc","github.com/bradfitz/gomemcache","net.spy:spymemcached","com.googlecode.xmemcached:xmemcached","aiomcache","memcached","memcache"],
108
- imports: ["memjs","pymemcache","pylibmc","github.com/bradfitz/gomemcache/memcache","net.spy.memcached","net.rubyeye.xmemcached"], images: ["memcached","bitnami/memcached"], envPrefixes: ["MEMCACHED","MEMCACHE","MEMCACHED_HOST","MEMCACHED_SERVERS"], envWeak: [] },
109
- { id: "hazelcast", name: "HAZELCAST", kind: "cache", color: 0xff9494,
110
- deps: ["com.hazelcast:hazelcast","com.hazelcast:hazelcast-spring","com.hazelcast:hazelcast-client"],
111
- imports: ["com.hazelcast."], images: ["hazelcast/hazelcast","hazelcast/management-center"], envPrefixes: ["HAZELCAST"], envWeak: [] },
112
- { id: "kafka", name: "KAFKA", kind: "queue", color: 0xff7ad9,
113
- deps: ["kafkajs","node-rdkafka","@confluentinc/kafka-javascript","confluent-kafka","aiokafka","github.com/segmentio/kafka-go","org.apache.kafka:kafka-clients","github.com/twmb/franz-go"],
114
- imports: ["kafkajs","node-rdkafka","confluent_kafka","aiokafka","github.com/segmentio/kafka-go","github.com/Shopify/sarama","org.apache.kafka.clients","org.springframework.kafka"], images: ["confluentinc/cp-kafka","confluentinc/cp-server","bitnami/kafka","apache/kafka","wurstmeister/kafka","redpandadata/redpanda","vectorized/redpanda","confluentinc/cp-zookeeper"], envPrefixes: ["KAFKA","KAFKA_BOOTSTRAP_SERVERS","KAFKA_BROKERS","CONFLUENT","REDPANDA","SCHEMA_REGISTRY"], envWeak: [] },
115
- { id: "rabbitmq", name: "RABBITMQ", kind: "queue", color: 0xff86dd,
116
- deps: ["amqplib","amqp-connection-manager","pika","aio-pika","github.com/rabbitmq/amqp091-go","com.rabbitmq:amqp-client","org.springframework.amqp:spring-rabbit","lapin"],
117
- imports: ["amqplib","amqp-connection-manager","pika","aio_pika","github.com/rabbitmq/amqp091-go","com.rabbitmq.client","org.springframework.amqp","lapin"], images: ["rabbitmq","bitnami/rabbitmq","cloudamqp/lavinmq"], envPrefixes: ["RABBITMQ","RABBITMQ_HOST","RABBITMQ_URL","CLOUDAMQP"], envWeak: [] },
118
- { id: "nats", name: "NATS", kind: "queue", color: 0xff6fd3,
119
- deps: ["nats","nats.ws","nats-py","github.com/nats-io/nats.go","io.nats:jnats","async-nats","node-nats-streaming","@nats-io/jetstream"],
120
- imports: ["github.com/nats-io/nats.go","io.nats.client","async_nats","node-nats-streaming","nats","nats.aio","nats.ws"], images: ["nats","synadia/nats-server","bitnami/nats","natsio/nats-box"], envPrefixes: ["NATS","NATS_URL","NATS_HOST","NATS_SERVERS"], envWeak: [] },
121
- { id: "mqtt", name: "MQTT", kind: "queue", color: 0xff90e2,
122
- deps: ["mqtt","async-mqtt","paho-mqtt","aiomqtt","github.com/eclipse/paho.mqtt.golang","org.eclipse.paho:org.eclipse.paho.client.mqttv3","rumqttc","MQTTnet"],
123
- imports: ["async-mqtt","paho.mqtt","aiomqtt","github.com/eclipse/paho.mqtt.golang","org.eclipse.paho","rumqttc","mqtt"], images: ["eclipse-mosquitto","emqx/emqx","hivemq/hivemq-ce","vernemq/vernemq","nanomq/nanomq"], envPrefixes: ["MQTT","MQTT_HOST","MQTT_BROKER","MOSQUITTO","EMQX"], envWeak: [] },
124
- { id: "pulsar", name: "PULSAR", kind: "queue", color: 0xff7ace,
125
- deps: ["pulsar-client","github.com/apache/pulsar-client-go","org.apache.pulsar:pulsar-client","org.springframework.pulsar:spring-pulsar"],
126
- imports: ["pulsar-client","github.com/apache/pulsar-client-go","org.apache.pulsar.client","org.springframework.pulsar","_pulsar"], images: ["apachepulsar/pulsar","apachepulsar/pulsar-all","streamnative/pulsar","bitnami/pulsar"], envPrefixes: ["PULSAR","PULSAR_URL","PULSAR_BROKER","PULSAR_SERVICE_URL"], envWeak: [] },
127
- { id: "nsq", name: "NSQ", kind: "queue", color: 0xff64c9,
128
- deps: ["github.com/nsqio/go-nsq"],
129
- imports: ["github.com/nsqio/go-nsq"], images: ["nsqio/nsq"], envPrefixes: ["NSQ"], envWeak: ["NSQ"] },
130
- { id: "activemq", name: "ACTIVEMQ", kind: "queue", color: 0xff9ce6,
131
- deps: ["org.apache.activemq:activemq-client","org.apache.activemq:artemis-jms-client","org.springframework.boot:spring-boot-starter-activemq","org.springframework.boot:spring-boot-starter-artemis"],
132
- imports: ["org.apache.activemq","org.apache.activemq.artemis"], images: ["apache/activemq-classic","apache/activemq-artemis","rmohr/activemq","vromero/activemq-artemis"], envPrefixes: ["ACTIVEMQ","ARTEMIS"], envWeak: [] },
133
- { id: "sqs", name: "SQS", kind: "queue", color: 0xff72d0,
134
- deps: ["@aws-sdk/client-sqs","sqs-consumer","sqs-producer","github.com/aws/aws-sdk-go-v2/service/sqs","software.amazon.awssdk:sqs","shoryuken"],
135
- imports: ["@aws-sdk/client-sqs","sqs-consumer","sqs-producer","github.com/aws/aws-sdk-go-v2/service/sqs","software.amazon.awssdk.services.sqs","Aws::SQS"], images: ["softwaremill/elasticmq","roribio16/alpine-sqs"], envPrefixes: ["SQS","AWS_SQS","SQS_QUEUE_URL"], envWeak: ["SQS"] },
136
- { id: "sns", name: "SNS", kind: "queue", color: 0xff82d9,
137
- deps: ["@aws-sdk/client-sns","github.com/aws/aws-sdk-go-v2/service/sns","software.amazon.awssdk:sns","com.amazonaws:aws-java-sdk-sns"],
138
- imports: ["@aws-sdk/client-sns","github.com/aws/aws-sdk-go-v2/service/sns","software.amazon.awssdk.services.sns","Amazon.SNS"], images: [], envPrefixes: ["SNS","AWS_SNS"], envWeak: ["SNS"] },
139
- { id: "kinesis", name: "KINESIS", kind: "queue", color: 0xff6cce,
140
- deps: ["@aws-sdk/client-kinesis","github.com/aws/aws-sdk-go-v2/service/kinesis","software.amazon.awssdk:kinesis","software.amazon.kinesis:amazon-kinesis-client"],
141
- imports: ["@aws-sdk/client-kinesis","github.com/aws/aws-sdk-go-v2/service/kinesis","software.amazon.awssdk.services.kinesis","software.amazon.kinesis"], images: [], envPrefixes: ["KINESIS","AWS_KINESIS"], envWeak: [] },
142
- { id: "gcp-pubsub", name: "GCP_PUBSUB", kind: "queue", color: 0xff7adf,
143
- deps: ["@google-cloud/pubsub","google-cloud-pubsub","cloud.google.com/go/pubsub","com.google.cloud:google-cloud-pubsub"],
144
- imports: ["@google-cloud/pubsub","google.cloud.pubsub","cloud.google.com/go/pubsub","com.google.cloud.pubsub"], images: ["messagebird/gcloud-pubsub-emulator"], envPrefixes: ["PUBSUB","PUBSUB_EMULATOR_HOST","GCP_PUBSUB"], envWeak: [] },
145
- { id: "azure-servicebus", name: "AZURE_SERVICEBUS", kind: "queue", color: 0xff88e0,
146
- deps: ["@azure/service-bus","azure-servicebus","com.azure:azure-messaging-servicebus","github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus"],
147
- imports: ["@azure/service-bus","azure.servicebus","com.azure.messaging.servicebus","github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus"], images: [], envPrefixes: ["SERVICEBUS","AZURE_SERVICEBUS","SERVICE_BUS"], envWeak: [] },
148
- { id: "s3", name: "S3", kind: "cloud", color: 0xb06bff,
149
- deps: ["@aws-sdk/client-s3","@aws-sdk/s3-request-presigner","@aws-sdk/lib-storage","aws-sdk-s3","github.com/aws/aws-sdk-go-v2/service/s3","software.amazon.awssdk:s3","com.amazonaws:aws-java-sdk-s3","s3fs"],
150
- imports: ["@aws-sdk/client-s3","github.com/aws/aws-sdk-go-v2/service/s3","github.com/aws/aws-sdk-go/service/s3","software.amazon.awssdk.services.s3","com.amazonaws.services.s3","aws_sdk_s3","rusoto_s3"], images: ["adobe/s3mock","zenko/cloudserver"], envPrefixes: ["S3","AWS_S3","S3_BUCKET","S3_ENDPOINT","AWS_S3_BUCKET"], envWeak: ["S3"] },
151
- { id: "minio", name: "MINIO", kind: "cloud", color: 0xa64fff,
152
- deps: ["minio","minio-py","github.com/minio/minio-go","github.com/minio/minio-go/v7","io.minio:minio"],
153
- imports: ["minio","github.com/minio/minio-go","io.minio."], images: ["minio/minio","bitnami/minio","minio/mc"], envPrefixes: ["MINIO","MINIO_ENDPOINT","MINIO_ACCESS_KEY","MINIO_SECRET_KEY","MINIO_ROOT_USER","MINIO_BUCKET"], envWeak: [] },
154
- { id: "r2", name: "R2", kind: "cloud", color: 0xc08bff,
155
- deps: [],
156
- imports: [], images: [], envPrefixes: ["R2_BUCKET","R2_ACCESS_KEY_ID","R2_SECRET_ACCESS_KEY","R2_ACCOUNT_ID","CLOUDFLARE_R2"], envWeak: [] },
157
- { id: "gcs", name: "GCS", kind: "cloud", color: 0x9b5bff,
158
- deps: ["@google-cloud/storage","google-cloud-storage","cloud.google.com/go/storage","com.google.cloud:google-cloud-storage","gcsfs","gcs-resumable-upload"],
159
- imports: ["@google-cloud/storage","google.cloud.storage","cloud.google.com/go/storage","com.google.cloud.storage","gcsfs"], images: ["fsouza/fake-gcs-server"], envPrefixes: ["GCS_BUCKET","GOOGLE_CLOUD_STORAGE","GCP_BUCKET"], envWeak: [] },
160
- { id: "azure-blob", name: "AZURE_BLOB", kind: "cloud", color: 0xb87bff,
161
- deps: ["@azure/storage-blob","azure-storage-blob","github.com/Azure/azure-sdk-for-go/sdk/storage/azblob","com.azure:azure-storage-blob","adlfs"],
162
- imports: ["@azure/storage-blob","azure.storage.blob","github.com/Azure/azure-sdk-for-go/sdk/storage/azblob","com.azure.storage.blob"], images: ["mcr.microsoft.com/azure-storage/azurite"], envPrefixes: ["AZURE_STORAGE","AZURE_BLOB","AZURE_STORAGE_CONNECTION_STRING","AZURE_STORAGE_ACCOUNT","AZURE_CONTAINER"], envWeak: [] },
163
- { id: "keycloak", name: "KEYCLOAK", kind: "api", color: 0x66e0ff,
164
- deps: ["@keycloak/keycloak-admin-client","keycloak-connect","keycloak-js","python-keycloak","github.com/Nerzal/gocloak","org.keycloak:keycloak-admin-client","org.keycloak:keycloak-spring-boot-starter","Keycloak.AuthServices.Authentication"],
165
- imports: ["@keycloak/keycloak-admin-client","keycloak-connect","keycloak-js","github.com/Nerzal/gocloak","org.keycloak.","fastapi_keycloak","Keycloak.AuthServices"], images: ["quay.io/keycloak/keycloak","keycloak/keycloak","bitnami/keycloak"], envPrefixes: ["KEYCLOAK","KEYCLOAK_URL","KEYCLOAK_REALM","KEYCLOAK_CLIENT_ID","KEYCLOAK_BASE_URL"], envWeak: [] },
166
- { id: "auth0", name: "AUTH0", kind: "api", color: 0x5cd9ff,
167
- deps: ["auth0","@auth0/auth0-spa-js","@auth0/auth0-react","@auth0/nextjs-auth0","auth0-python","github.com/auth0/go-auth0","com.auth0:auth0","auth0/auth0-php"],
168
- imports: ["@auth0/auth0-spa-js","@auth0/auth0-react","@auth0/nextjs-auth0","github.com/auth0/go-auth0","com.auth0.","Auth0\\SDK","auth0"], images: [], envPrefixes: ["AUTH0","AUTH0_DOMAIN","AUTH0_CLIENT_ID","AUTH0_CLIENT_SECRET","AUTH0_AUDIENCE"], envWeak: [] },
169
- { id: "okta", name: "OKTA", kind: "api", color: 0x7ae6ff,
170
- deps: ["@okta/okta-sdk-nodejs","@okta/okta-auth-js","@okta/okta-react","github.com/okta/okta-sdk-golang","com.okta.sdk:okta-sdk-api","okta-jwt-verifier","Okta.Sdk","okta/sdk"],
171
- imports: ["@okta/okta-sdk-nodejs","@okta/okta-auth-js","github.com/okta/okta-sdk-golang","com.okta.","Okta.Sdk","okta_jwt_verifier"], images: [], envPrefixes: ["OKTA","OKTA_DOMAIN","OKTA_CLIENT_ID","OKTA_ISSUER","OKTA_ORG_URL"], envWeak: [] },
172
- { id: "cognito", name: "COGNITO", kind: "api", color: 0x66d4ff,
173
- deps: ["@aws-sdk/client-cognito-identity-provider","amazon-cognito-identity-js","pycognito","github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider","software.amazon.awssdk:cognitoidentityprovider","AWSSDK.CognitoIdentityProvider"],
174
- imports: ["@aws-sdk/client-cognito-identity-provider","amazon-cognito-identity-js","pycognito","github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider","software.amazon.awssdk.services.cognitoidentityprovider","aws_sdk_cognitoidentityprovider"], images: [], envPrefixes: ["COGNITO","COGNITO_USER_POOL_ID","COGNITO_CLIENT_ID","AWS_COGNITO"], envWeak: [] },
175
- { id: "firebase-auth", name: "FIREBASE_AUTH", kind: "api", color: 0x70ddff,
176
- deps: ["@firebase/auth","firebase-admin","pyrebase"],
177
- imports: ["@firebase/auth","firebase/auth","firebase_admin"], images: [], envPrefixes: ["FIREBASE_AUTH","FIREBASE_PROJECT_ID"], envWeak: [] },
178
- { id: "vault", name: "VAULT", kind: "api", color: 0x5ce0ff,
179
- deps: ["node-vault","hvac","github.com/hashicorp/vault/api","com.bettercloud:vault-java-driver","vaultrs","hashi-vault-js","VaultSharp","org.springframework.vault:spring-vault-core"],
180
- imports: ["node-vault","hvac","github.com/hashicorp/vault/api","io.github.jopenlibs.vault","vaultrs","VaultSharp"], images: ["hashicorp/vault","vault"], envPrefixes: ["VAULT_ADDR","VAULT_TOKEN","VAULT_NAMESPACE","VAULT_ROLE_ID"], envWeak: [] },
181
- { id: "oidc-generic", name: "OIDC", kind: "api", color: 0x88ecff,
182
- deps: ["openid-client","passport-openidconnect","oidc-client-ts","github.com/coreos/go-oidc","github.com/coreos/go-oidc/v3"],
183
- imports: ["openid-client","oidc-client-ts","passport-openidconnect","github.com/coreos/go-oidc"], images: [], envPrefixes: ["OIDC_ISSUER","OIDC_CLIENT_ID"], envWeak: [] },
184
- ];
@@ -1,119 +0,0 @@
1
- // Signature detection + cached public API for infrastructure detection. Split out of infra.js
2
- // (which remains the public facade); see that file's header for the pipeline overview and the
3
- // registry/matching contract documented next to the INFRA_SERVICES re-export.
4
- import { existsSync, readdirSync, statSync } from "node:fs";
5
- import { join } from "node:path";
6
- // Concrete infra-item extraction + the shared leaf helpers (lc / safeRead / size caps) live in infra-items.js.
7
- import { collectInfraItems, itemMetaFor, safeRead, lc, IMPORT_SCAN_MAX_FILES, MAX_FILE_BYTES } from "./infra-items.js";
8
- import { INFRA_SERVICES } from "./infra-registry.js";
9
- import { depMatches, imageMatches, envMatches } from "./infra.match.js";
10
- import { scanRepo } from "./infra.scan.js";
11
-
12
- // ---- detection ----------------------------------------------------------------------------------
13
- export function detectInfraFromScan(scan, registry = INFRA_SERVICES) {
14
- const found = new Map(); // id → { service, signals:Set, sources:Set, importTokens:[] }
15
- const note = (svc, signal, source) => {
16
- let e = found.get(svc.id);
17
- if (!e) found.set(svc.id, (e = { service: svc, signals: new Set(), sources: new Set(), importTokens: [] }));
18
- if (signal) e.signals.add(signal);
19
- if (source) e.sources.add(source);
20
- };
21
-
22
- for (const svc of registry) {
23
- // 1) manifest deps (highest confidence)
24
- for (const tok of svc.deps || []) {
25
- for (const d of scan.deps) { if (depMatches(d, tok)) { note(svc, `dep:${d}`, "manifest"); break; } }
26
- }
27
- // 2) container images
28
- for (const tok of svc.images || []) {
29
- for (const im of scan.imageSegs) { if (imageMatches(im.segs, tok)) { note(svc, `image:${im.raw}`, "image"); break; } }
30
- }
31
- // 3) env-var name conventions
32
- const weakSet = new Set((svc.envWeak || []).map((s) => s.toUpperCase()));
33
- for (const tok of svc.envPrefixes || []) {
34
- for (const k of scan.envKeys) { if (envMatches(k, tok, weakSet.has(tok.toUpperCase()))) { note(svc, `env:${k}`, "env"); break; } }
35
- }
36
- }
37
-
38
- // 4) source imports → attribute connector files (and a weak detection signal). Only scan if any
39
- // service has import tokens; pre-filter files by a combined token regex (cheap), like apimap.
40
- const importIndex = []; // { svc, token }
41
- for (const svc of registry) for (const tok of svc.imports || []) importIndex.push({ svc, tok: lc(tok) });
42
- const filesByService = new Map(); // id → Set(relPath)
43
- if (importIndex.length && scan.codeFiles.length) {
44
- const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
45
- const pre = new RegExp(importIndex.map((x) => esc(x.tok)).join("|"), "i");
46
- // Reading every source file is the only O(repo-size) cost here and it runs synchronously, so cap it:
47
- // connector-file attribution is best-effort and detection from manifests/images/env is already complete
48
- // above. ~5k files keeps the cold scan well under a second even on a large monorepo (then it's cached).
49
- const scanFiles = scan.codeFiles.length > IMPORT_SCAN_MAX_FILES ? scan.codeFiles.slice(0, IMPORT_SCAN_MAX_FILES) : scan.codeFiles;
50
- for (const f of scanFiles) {
51
- const text = safeRead(f.full);
52
- if (!text || text.length > MAX_FILE_BYTES || !pre.test(text)) continue;
53
- const lcText = text.toLowerCase();
54
- for (const { svc, tok } of importIndex) {
55
- // require a quoted/pathish occurrence so a stray word doesn't match: 'tok' "tok" `tok` tok/ tok"
56
- if (lcText.includes(`"${tok}`) || lcText.includes(`'${tok}`) || lcText.includes("`" + tok) || lcText.includes(`/${tok}"`) || lcText.includes(tok + "/")) {
57
- let set = filesByService.get(svc.id);
58
- if (!set) filesByService.set(svc.id, (set = new Set()));
59
- set.add(f.path);
60
- // imports alone also count as a (weaker) detection signal
61
- if (!found.has(svc.id)) note(svc, `import:${tok}`, "import");
62
- else found.get(svc.id).sources.add("import");
63
- }
64
- }
65
- }
66
- }
67
-
68
- const entries = [...found.values()];
69
- const itemsByService = collectInfraItems(scan, entries, filesByService);
70
- const services = entries.map(({ service, signals, sources }) => {
71
- const files = [...(filesByService.get(service.id) || [])].sort().slice(0, 40);
72
- const itemData = itemsByService.get(service.id) || { ...itemMetaFor(service), items: [] };
73
- // confidence: a parsed manifest dep or image is hard evidence; env/import alone is softer.
74
- const hard = sources.has("manifest") || sources.has("image");
75
- const confidence = hard ? "high" : sources.has("env") && sources.has("import") ? "high" : sources.has("env") || sources.has("import") ? "medium" : "low";
76
- return {
77
- id: service.id, name: service.name, kind: service.kind, color: service.color,
78
- confidence, sources: [...sources].sort(), signals: [...signals].sort().slice(0, 24), files,
79
- items: itemData.items || [], itemLabel: itemData.itemLabel || itemData.label, unit: itemData.unit || "",
80
- };
81
- });
82
- // stable, useful order: hard evidence first, then by source count, then name
83
- const rank = (c) => (c === "high" ? 0 : c === "medium" ? 1 : 2);
84
- services.sort((a, b) => rank(a.confidence) - rank(b.confidence) || b.signals.length - a.signals.length || a.name.localeCompare(b.name));
85
- return services;
86
- }
87
-
88
- // ---- public API (cached by manifest/compose/env mtime) ------------------------------------------
89
- const _cache = new Map(); // repoPath → { sig, result }
90
-
91
- // cheap cache signature: newest mtime among the files that drive detection. If none change, reuse.
92
- function repoSignature(repoPath) {
93
- let newest = 0, seen = 0;
94
- const probe = (p) => { try { const st = statSync(p); if (st.isFile()) { newest = Math.max(newest, st.mtimeMs); seen++; } } catch { /* missing — skip */ } };
95
- const roots = ["package.json", "go.mod", "go.sum", "requirements.txt", "pyproject.toml", "Pipfile", "Cargo.toml", "pom.xml", "build.gradle", "build.gradle.kts", "composer.json", "Gemfile", ".env", "docker-compose.yml", "docker-compose.yaml", "compose.yml", "Dockerfile", "skaffold.yaml"];
96
- for (const r of roots) probe(join(repoPath, r));
97
- for (const dir of ["k8s", "kubernetes", "deploy", "manifests", "helm", "charts", ".github"]) {
98
- try { for (const e of readdirSync(join(repoPath, dir), { withFileTypes: true })) if (e.isFile()) probe(join(repoPath, dir, e.name)); } catch { /* no such dir */ }
99
- }
100
- return `${seen}:${Math.round(newest)}`;
101
- }
102
-
103
- // Detect the backing services a repo talks to. Cheap & cached; safe to call from repos:graph-analysis.
104
- export function detectInfra(repoPath, opts = {}) {
105
- if (!repoPath || !existsSync(repoPath)) return { ok: false, error: "Repo path not found", services: [] };
106
- const sig = repoSignature(repoPath);
107
- const cached = _cache.get(repoPath);
108
- if (!opts.force && cached && cached.sig === sig) return cached.result;
109
- let result;
110
- try {
111
- const scan = scanRepo(repoPath);
112
- const services = detectInfraFromScan(scan);
113
- result = { ok: true, services, scanned: { manifests: scan.manifests, codeFiles: scan.codeFiles.length, envKeys: scan.envKeys.size, images: scan.imageSegs.length } };
114
- } catch (error) {
115
- result = { ok: false, error: error.message, services: [] };
116
- }
117
- _cache.set(repoPath, { sig, result });
118
- return result;
119
- }
@@ -1,38 +0,0 @@
1
- // Infrastructure / backing-service detection. graph-builder's graph.json only contains code FILES and
2
- // symbols, so the GUI board's external-service towers were inferred purely from FILE PATHS
3
- // (relIsDb + a name-regex). That misses any datastore whose connector file isn't literally named
4
- // after it — e.g. a service that `import`s @clickhouse/client from services/metrics.js, or wires
5
- // Influx through a logging helper. This module reads the REAL high-signal sources instead:
6
- // 1. dependency manifests (package.json / go.mod / requirements.txt / pom.xml / build.gradle /
7
- // Cargo.toml / *.csproj / Gemfile / composer.json) — most reliable
8
- // 2. container/orchestration (docker-compose / Dockerfile / k8s manifests) — image names
9
- // 3. env / config (.env*, k8s env:) — variable-NAME conventions (KEYS ONLY, never values)
10
- // 4. source imports — to attribute each service to its connector file(s) for the io edges
11
- // and matches them against a curated signature registry → a structured list of services the repo
12
- // talks to, each with kind/name/colour + the files that connect to it.
13
- //
14
- // PRIVACY: env files are read for KEY NAMES only (the part before `=`); values are never parsed,
15
- // stored, logged, or returned. Secrets in .env stay in .env.
16
- //
17
- // This file is now a facade — the implementation lives in the sibling modules below; every public
18
- // export is re-exported here so existing import paths keep working unchanged:
19
- // infra.match.js — deterministic matchers (deps / images / env keys) + manifest dep extraction
20
- // infra.scan.js — the single filesystem walk (manifests, compose/k8s images, env KEY names)
21
- // infra.detect.js — signature matching, connector-file attribution, cached public API
22
-
23
- // ---- signature registry ----
24
- // One row per backing service, loaded from infra-registry.js (generated + adversarially verified by the
25
- // infra-signature-registry workflow). Matching is DETERMINISTIC token comparison (no free-form regex over
26
- // arbitrary text), so false positives stay near zero:
27
- // deps — exact manifest dependency names; token T matches dep D when D===T or D starts with T/ T: T@.
28
- // images — docker image repo names, matched by path-segment SUFFIX ("redis" hits "bitnami/redis";
29
- // "mongo" misses "mongo-express").
30
- // envPrefixes — UPPERCASE env-var KEY prefixes; token P matches key K when K===P or K starts with P_.
31
- // Prefixes listed in envWeak only count when the key ALSO ends in an infra suffix
32
- // (HOST/URL/DSN/PORT/BROKER/…), so DATABASE_URL-style keys can't over-fire.
33
- // imports — quoted substrings in source import/require lines; used to attribute connector files.
34
- // kind ∈ db|ts|cache|queue|cloud|api|fs|logs — drives the GUI board tower glyph/colour (GUI core KCFG).
35
- export { INFRA_SERVICES } from "./infra-registry.js";
36
-
37
- export { depMatches, normImageRepo, imageMatches, envMatches, depsFromManifest } from "./infra.match.js";
38
- export { detectInfraFromScan, detectInfra } from "./infra.detect.js";
@@ -1,102 +0,0 @@
1
- // Deterministic matchers + manifest dependency extraction for infrastructure detection.
2
- // Split out of infra.js (which remains the public facade); see that file's header for the full
3
- // detection pipeline and the registry/matching contract.
4
- import { lc } from "./infra-items.js";
5
-
6
- // env-var name suffixes that, when a generic prefix carries one, confirm it really configures a
7
- // backing service (so PG_/DATABASE_/S3_/ES_ only fire on PG_HOST, DATABASE_URL, S3_BUCKET, …).
8
- const ENV_SUFFIX = /_(HOSTS?|URLS?|URI|DSN|PORTS?|ADDR|ADDRESS(ES)?|BROKERS?|SERVERS?|ENDPOINTS?|CONN|CONNECTION(S)?|DB|DATABASE|PASS(WORD)?|USER(NAME)?|SECRET|TOPICS?|BUCKETS?|REGION|GROUP|CLUSTER|NAMESPACE|REPLICA(SET)?|MEASUREMENT|TLS|SSL|KEY|TOKEN)$/;
9
-
10
- // ---- matchers (exported for unit tests) ---------------------------------------------------------
11
- export function depMatches(manifestDep, token) {
12
- const m = lc(manifestDep), d = lc(token);
13
- if (!m || !d) return false;
14
- return m === d || m.startsWith(d + "/") || m.startsWith(d + ":") || m.startsWith(d + "@");
15
- }
16
-
17
- // strip registry host + tag + digest → bare repo path (lowercased)
18
- export function normImageRepo(ref) {
19
- let s = String(ref || "").trim().replace(/^['"]|['"]$/g, "");
20
- if (!s) return "";
21
- const at = s.indexOf("@");
22
- if (at >= 0) s = s.slice(0, at); // strip @sha256:...
23
- const slash = s.lastIndexOf("/");
24
- const lastSeg = s.slice(slash + 1);
25
- const colon = lastSeg.indexOf(":"); // tag lives only in the last path segment (host may have :port)
26
- if (colon >= 0) s = s.slice(0, slash + 1) + lastSeg.slice(0, colon);
27
- return lc(s);
28
- }
29
- // repo path-segments end with the token's segments (so "redis" hits "bitnami/redis", "mongo" misses "mongo-express")
30
- export function imageMatches(repoSegs, token) {
31
- const t = lc(token).split("/").filter(Boolean);
32
- if (!t.length || t.length > repoSegs.length) return false;
33
- for (let i = 1; i <= t.length; i++) if (repoSegs[repoSegs.length - i] !== t[t.length - i]) return false;
34
- return true;
35
- }
36
-
37
- export function envMatches(key, token, weak) {
38
- const K = String(key || "").toUpperCase(), P = String(token || "").toUpperCase();
39
- if (!K || !P) return false;
40
- if (K !== P && !K.startsWith(P + "_")) return false;
41
- if (weak) {
42
- if (K === P) return false; // a bare generic prefix alone proves nothing
43
- if (!ENV_SUFFIX.test(K.slice(P.length))) return false; // require an infra-ish suffix
44
- }
45
- return true;
46
- }
47
-
48
- // ---- manifest dependency extraction -------------------------------------------------------------
49
-
50
- // Returns a Set of dependency token strings pulled from one manifest file. PROD deps only where the
51
- // format distinguishes them (package.json/composer.json), so test-only clients (ioredis-mock,
52
- // mongodb-memory-server, testcontainers) don't manufacture a phantom service.
53
- // test doubles / in-memory fakes / emulators — these pull in a client name but mean "this is tested
54
- // against a fake", not "depends on the live service". Never let them register a backing service.
55
- const DEV_DOUBLE = /(-mock|_mock|mock-|fake|memory-server|inmemory|testcontainers|-local$|localstack|azurite)/i;
56
-
57
- export function depsFromManifest(name, text) {
58
- const out = new Set();
59
- const add = (v) => { const s = String(v || "").trim(); if (s && !DEV_DOUBLE.test(s)) out.add(s); };
60
- const low = name.toLowerCase();
61
- try {
62
- if (low === "package.json") {
63
- const j = JSON.parse(text);
64
- for (const sect of ["dependencies", "optionalDependencies", "peerDependencies"]) {
65
- if (j[sect] && typeof j[sect] === "object") for (const k of Object.keys(j[sect])) add(k);
66
- }
67
- } else if (low === "composer.json") {
68
- const j = JSON.parse(text);
69
- if (j.require && typeof j.require === "object") for (const k of Object.keys(j.require)) add(k);
70
- } else if (low === "go.mod") {
71
- // `require x.y/z v1` and `require ( … )` blocks
72
- for (const m of text.matchAll(/^\s*(?:require\s+)?([a-z0-9.-]+\.[a-z]{2,}\/[^\s]+)\s+v[0-9]/gim)) add(m[1]);
73
- } else if (low === "go.sum") {
74
- for (const m of text.matchAll(/^([a-z0-9.-]+\.[a-z]{2,}\/[^\s]+)\s+v[0-9]/gim)) add(m[1]);
75
- } else if (low === "requirements.txt" || low === "constraints.txt") {
76
- for (const line of text.split(/\r?\n/)) {
77
- const m = line.match(/^\s*([A-Za-z0-9._-]+)/);
78
- if (m && !line.trim().startsWith("#")) add(m[1]);
79
- }
80
- } else if (low === "pipfile" || low === "pyproject.toml" || low === "cargo.toml") {
81
- // TOML dependency tables — pull bare `name = ...` keys and array-of-strings `"name>=x"`.
82
- for (const m of text.matchAll(/^\s*["']?([A-Za-z0-9._-]+)["']?\s*=/gm)) add(m[1]);
83
- for (const m of text.matchAll(/["']([A-Za-z0-9._-]+)\s*[<>=~!^*]/g)) add(m[1]);
84
- } else if (low === "pom.xml") {
85
- // pair each <artifactId> with the nearest preceding <groupId> → group:artifact AND bare artifact
86
- const re = /<groupId>\s*([^<]+?)\s*<\/groupId>\s*<artifactId>\s*([^<]+?)\s*<\/artifactId>/g;
87
- let m;
88
- while ((m = re.exec(text))) { add(`${m[1]}:${m[2]}`); add(m[2]); }
89
- for (const a of text.matchAll(/<artifactId>\s*([^<]+?)\s*<\/artifactId>/g)) add(a[1]);
90
- } else if (low.endsWith(".gradle") || low.endsWith(".gradle.kts")) {
91
- // implementation('group:artifact:ver') / "group:artifact:ver"
92
- for (const m of text.matchAll(/["']([A-Za-z0-9._-]+:[A-Za-z0-9._-]+)(?::[^"']*)?["']/g)) { add(m[1]); add(m[1].split(":")[1]); }
93
- } else if (low.endsWith(".csproj") || low === "packages.config" || low.endsWith(".fsproj")) {
94
- for (const m of text.matchAll(/(?:PackageReference|package)\s+(?:Include|id)\s*=\s*"([^"]+)"/gi)) add(m[1]);
95
- } else if (low === "gemfile") {
96
- for (const m of text.matchAll(/^\s*gem\s+["']([^"']+)["']/gim)) add(m[1]);
97
- }
98
- } catch {
99
- /* malformed manifest — skip */
100
- }
101
- return out;
102
- }
@@ -1,93 +0,0 @@
1
- // Repo filesystem scan for infrastructure detection: one walk collects manifest dependency tokens,
2
- // container image refs, env-var KEY names (never values — see the privacy note in infra.js), and
3
- // code files for the import-attribution pass. Split out of infra.js (which remains the public facade).
4
- import { readdirSync } from "node:fs";
5
- import { join } from "node:path";
6
- import { safeRead } from "./infra-items.js";
7
- import { depsFromManifest, normImageRepo } from "./infra.match.js";
8
-
9
- // ---- scanning bounds (mirror apimap.js) ---------------------------------------------------------
10
- const SKIP_DIRS = new Set([
11
- ".git", "node_modules", "dist", "build", "out", ".next", "coverage", "vendor",
12
- ".venv", "venv", "env", "target", "__pycache__", ".idea", ".vscode", ".cache", "bin", "obj",
13
- ]);
14
- const CODE_EXT = new Set([
15
- ".js", ".jsx", ".ts", ".tsx", ".mjs", ".cjs", ".vue", ".svelte",
16
- ".py", ".go", ".java", ".kt", ".rb", ".php", ".cs", ".scala", ".rs",
17
- ]);
18
- const MAX_FILES = 60000;
19
- // graph-analysis IPC stays responsive on large repos — detection itself (manifests/images/env) is unaffected
20
-
21
- const MANIFEST_NAMES = new Set([
22
- "package.json", "composer.json", "go.mod", "go.sum", "requirements.txt", "constraints.txt",
23
- "pipfile", "pyproject.toml", "cargo.toml", "pom.xml", "packages.config", "gemfile",
24
- ]);
25
- const isManifest = (name) => {
26
- const n = name.toLowerCase();
27
- return MANIFEST_NAMES.has(n) || n.endsWith(".gradle") || n.endsWith(".gradle.kts") || n.endsWith(".csproj") || n.endsWith(".fsproj");
28
- };
29
- const isComposeFile = (name) => /^(docker-)?compose([.-].*)?\.ya?ml$/i.test(name);
30
- const isDockerfile = (name) => /^dockerfile(\..+)?$/i.test(name) || /\.dockerfile$/i.test(name);
31
- const isYaml = (name) => /\.ya?ml$/i.test(name);
32
-
33
- // ---- the scan -----------------------------------------------------------------------------------
34
- export function scanRepo(repoPath) {
35
- const deps = new Set(); // manifest dependency tokens
36
- const imageRefs = []; // normalized image repo paths
37
- const envKeys = new Set(); // UPPERCASE env-var names (keys only)
38
- const codeFiles = []; // { path(rel, fwd-slash), full } for the import pass
39
- const manifests = new Set(); // which manifest kinds were seen (for diagnostics)
40
-
41
- let count = 0;
42
- const stack = [repoPath];
43
- while (stack.length) {
44
- const cur = stack.pop();
45
- let entries;
46
- try { entries = readdirSync(cur, { withFileTypes: true }); } catch { continue; }
47
- for (const entry of entries) {
48
- if (entry.isDirectory()) {
49
- if (!SKIP_DIRS.has(entry.name)) stack.push(join(cur, entry.name));
50
- continue;
51
- }
52
- if (!entry.isFile()) continue;
53
- if (++count > MAX_FILES) break;
54
- const name = entry.name;
55
- const full = join(cur, name);
56
- const rel = full.slice(repoPath.length).replace(/^[\\/]/, "").replace(/\\/g, "/");
57
-
58
- if (isManifest(name)) {
59
- manifests.add(name.toLowerCase());
60
- for (const d of depsFromManifest(name, safeRead(full))) deps.add(d);
61
- continue;
62
- }
63
- if (/^\.env(\..+)?$/i.test(name)) {
64
- const text = safeRead(full);
65
- // KEYS ONLY — split on the first '=' and keep the left side; never read the value.
66
- for (const line of text.split(/\r?\n/)) {
67
- const m = line.match(/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=/);
68
- if (m) envKeys.add(m[1].toUpperCase());
69
- }
70
- continue;
71
- }
72
- const dockery = isComposeFile(name) || isDockerfile(name);
73
- if (dockery || isYaml(name)) {
74
- const text = safeRead(full);
75
- if (!text) continue;
76
- const k8sLike = /(^|\n)\s*kind:\s*\S/.test(text) && /(^|\n)\s*(image|env):/.test(text);
77
- if (!dockery && !k8sLike) continue; // a random *.yaml that isn't a manifest — skip
78
- for (const m of text.matchAll(/(?:^|\n)\s*(?:-\s*)?image:\s*["']?([^\s"']+)/gi)) imageRefs.push(normImageRepo(m[1]));
79
- for (const m of text.matchAll(/(?:^|\n)\s*FROM\s+(?:--platform=\S+\s+)?([^\s]+)/gi)) imageRefs.push(normImageRepo(m[1]));
80
- // env var NAMES: k8s `- name: KEY`, compose `KEY: value` / `- KEY=value`, Dockerfile `ENV KEY`
81
- for (const m of text.matchAll(/\bname:\s*["']?([A-Z_][A-Z0-9_]{2,})\b/g)) envKeys.add(m[1].toUpperCase());
82
- for (const m of text.matchAll(/(?:^|\n)\s*(?:-\s*)?([A-Z_][A-Z0-9_]{2,})\s*[:=]/g)) envKeys.add(m[1].toUpperCase());
83
- continue;
84
- }
85
- const dot = name.lastIndexOf(".");
86
- const ext = dot >= 0 ? name.slice(dot).toLowerCase() : "";
87
- if (CODE_EXT.has(ext)) codeFiles.push({ path: rel, full });
88
- }
89
- if (count > MAX_FILES) break;
90
- }
91
- const imageSegs = imageRefs.filter(Boolean).map((r) => ({ raw: r, segs: r.split("/").filter(Boolean) }));
92
- return { deps, imageSegs, envKeys, codeFiles, manifests: [...manifests] };
93
- }