pretensor 0.1.0__py3-none-any.whl

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 (198) hide show
  1. pretensor/__init__.py +50 -0
  2. pretensor/benchmark/__init__.py +54 -0
  3. pretensor/benchmark/cli.py +294 -0
  4. pretensor/benchmark/fixtures.py +84 -0
  5. pretensor/benchmark/l1/__init__.py +23 -0
  6. pretensor/benchmark/l1/metrics.py +141 -0
  7. pretensor/benchmark/l1/pipeline.py +188 -0
  8. pretensor/benchmark/l1/runner.py +245 -0
  9. pretensor/benchmark/l2/__init__.py +27 -0
  10. pretensor/benchmark/l2/gold.py +236 -0
  11. pretensor/benchmark/l2/metrics.py +146 -0
  12. pretensor/benchmark/l2/pipeline.py +124 -0
  13. pretensor/benchmark/l2/runner.py +530 -0
  14. pretensor/benchmark/l3/__init__.py +73 -0
  15. pretensor/benchmark/l3/agent.py +316 -0
  16. pretensor/benchmark/l3/db.py +188 -0
  17. pretensor/benchmark/l3/gold.py +85 -0
  18. pretensor/benchmark/l3/llm_client.py +395 -0
  19. pretensor/benchmark/l3/mcp_client.py +357 -0
  20. pretensor/benchmark/l3/pretensor_runner.py +456 -0
  21. pretensor/benchmark/l3/prompt.py +132 -0
  22. pretensor/benchmark/l3/runner.py +358 -0
  23. pretensor/benchmark/l3/sql_equivalence.py +176 -0
  24. pretensor/benchmark/release_gate.py +448 -0
  25. pretensor/benchmark/results.py +298 -0
  26. pretensor/benchmark/runner.py +109 -0
  27. pretensor/cli/__init__.py +1 -0
  28. pretensor/cli/commands/_source_runner.py +147 -0
  29. pretensor/cli/commands/analyze.py +201 -0
  30. pretensor/cli/commands/connections/__init__.py +7 -0
  31. pretensor/cli/commands/connections/add_remove.py +126 -0
  32. pretensor/cli/commands/connections/register.py +12 -0
  33. pretensor/cli/commands/export.py +131 -0
  34. pretensor/cli/commands/index.py +559 -0
  35. pretensor/cli/commands/list.py +76 -0
  36. pretensor/cli/commands/quickstart.py +207 -0
  37. pretensor/cli/commands/reindex.py +646 -0
  38. pretensor/cli/commands/semantic.py +190 -0
  39. pretensor/cli/commands/serve.py +144 -0
  40. pretensor/cli/commands/sync_grants.py +149 -0
  41. pretensor/cli/commands/validate.py +176 -0
  42. pretensor/cli/config_file.py +442 -0
  43. pretensor/cli/constants.py +10 -0
  44. pretensor/cli/dbt_enrichment.py +96 -0
  45. pretensor/cli/main.py +109 -0
  46. pretensor/cli/paths.py +43 -0
  47. pretensor/cli/plugin.py +52 -0
  48. pretensor/config.py +226 -0
  49. pretensor/connectors/__init__.py +29 -0
  50. pretensor/connectors/base.py +165 -0
  51. pretensor/connectors/bigquery.py +468 -0
  52. pretensor/connectors/inspect.py +321 -0
  53. pretensor/connectors/lineage_sqlglot.py +97 -0
  54. pretensor/connectors/models.py +130 -0
  55. pretensor/connectors/mysql.py +402 -0
  56. pretensor/connectors/pg_array_parse.py +53 -0
  57. pretensor/connectors/postgres.py +938 -0
  58. pretensor/connectors/registry.py +93 -0
  59. pretensor/connectors/snapshot.py +244 -0
  60. pretensor/connectors/snowflake.py +908 -0
  61. pretensor/core/__init__.py +1 -0
  62. pretensor/core/builder.py +307 -0
  63. pretensor/core/dsn_crypto.py +51 -0
  64. pretensor/core/graph_schema_manager.py +246 -0
  65. pretensor/core/graph_store.py +1226 -0
  66. pretensor/core/ids.py +101 -0
  67. pretensor/core/portable_export.py +276 -0
  68. pretensor/core/query_runner.py +67 -0
  69. pretensor/core/registry.py +209 -0
  70. pretensor/core/schema.py +473 -0
  71. pretensor/core/secure_io.py +93 -0
  72. pretensor/core/store.py +469 -0
  73. pretensor/enrichment/__init__.py +1 -0
  74. pretensor/enrichment/analyze/__init__.py +0 -0
  75. pretensor/enrichment/analyze/classify.py +49 -0
  76. pretensor/enrichment/analyze/extract_python.py +196 -0
  77. pretensor/enrichment/analyze/parse.py +141 -0
  78. pretensor/enrichment/analyze/pipeline.py +195 -0
  79. pretensor/enrichment/analyze/summary.py +38 -0
  80. pretensor/enrichment/analyze/walker.py +98 -0
  81. pretensor/enrichment/analyze/writers.py +214 -0
  82. pretensor/enrichment/dbt/__init__.py +30 -0
  83. pretensor/enrichment/dbt/lineage.py +100 -0
  84. pretensor/enrichment/dbt/manifest.py +300 -0
  85. pretensor/enrichment/dbt/metadata.py +263 -0
  86. pretensor/enrichment/dbt/pipeline.py +77 -0
  87. pretensor/enrichment/dbt/resolution.py +101 -0
  88. pretensor/enrichment/dbt/signals.py +305 -0
  89. pretensor/entities/__init__.py +27 -0
  90. pretensor/entities/builder.py +63 -0
  91. pretensor/entities/classifier.py +383 -0
  92. pretensor/entities/llm_extract.py +66 -0
  93. pretensor/errors.py +35 -0
  94. pretensor/graph_models/__init__.py +17 -0
  95. pretensor/graph_models/base.py +11 -0
  96. pretensor/graph_models/consumer.py +71 -0
  97. pretensor/graph_models/edge.py +35 -0
  98. pretensor/graph_models/entity.py +21 -0
  99. pretensor/graph_models/node.py +79 -0
  100. pretensor/graph_models/relationship.py +33 -0
  101. pretensor/integrations/__init__.py +42 -0
  102. pretensor/integrations/_base.py +138 -0
  103. pretensor/integrations/google_adk.py +49 -0
  104. pretensor/integrations/langchain.py +55 -0
  105. pretensor/integrations/llamaindex.py +53 -0
  106. pretensor/intelligence/__init__.py +33 -0
  107. pretensor/intelligence/cluster_labeler.py +425 -0
  108. pretensor/intelligence/clustering.py +168 -0
  109. pretensor/intelligence/combining.py +32 -0
  110. pretensor/intelligence/discovery.py +114 -0
  111. pretensor/intelligence/embeddings.py +317 -0
  112. pretensor/intelligence/graph_export.py +200 -0
  113. pretensor/intelligence/heuristic.py +544 -0
  114. pretensor/intelligence/join_paths/__init__.py +130 -0
  115. pretensor/intelligence/join_paths/on_demand.py +516 -0
  116. pretensor/intelligence/join_paths/storage.py +70 -0
  117. pretensor/intelligence/llm_infer.py +78 -0
  118. pretensor/intelligence/llm_runtime.py +62 -0
  119. pretensor/intelligence/metric_templates.py +193 -0
  120. pretensor/intelligence/pipeline.py +364 -0
  121. pretensor/intelligence/role_exemplars.py +263 -0
  122. pretensor/intelligence/schema_classification.py +360 -0
  123. pretensor/intelligence/scoring.py +76 -0
  124. pretensor/intelligence/semantic.py +240 -0
  125. pretensor/intelligence/shadow_alias.py +101 -0
  126. pretensor/intelligence/statistical.py +50 -0
  127. pretensor/intelligence/steps.py +191 -0
  128. pretensor/intelligence/steps_embedding.py +168 -0
  129. pretensor/introspection/__init__.py +6 -0
  130. pretensor/introspection/inspector.py +5 -0
  131. pretensor/introspection/models/__init__.py +0 -0
  132. pretensor/introspection/models/base.py +5 -0
  133. pretensor/introspection/models/config.py +237 -0
  134. pretensor/introspection/models/dsn.py +550 -0
  135. pretensor/introspection/models/plan.py +116 -0
  136. pretensor/introspection/models/schema.py +10 -0
  137. pretensor/introspection/models/semantic.py +121 -0
  138. pretensor/introspection/models/validation.py +116 -0
  139. pretensor/introspection/snapshot.py +46 -0
  140. pretensor/mcp/__init__.py +16 -0
  141. pretensor/mcp/config_json.py +24 -0
  142. pretensor/mcp/payload_types.py +274 -0
  143. pretensor/mcp/resources/__init__.py +17 -0
  144. pretensor/mcp/resources/markdown.py +314 -0
  145. pretensor/mcp/server.py +285 -0
  146. pretensor/mcp/service.py +49 -0
  147. pretensor/mcp/service_context.py +142 -0
  148. pretensor/mcp/service_registry.py +294 -0
  149. pretensor/mcp/store_cache.py +43 -0
  150. pretensor/mcp/tool_registry.py +136 -0
  151. pretensor/mcp/tools/__init__.py +1 -0
  152. pretensor/mcp/tools/_rank.py +244 -0
  153. pretensor/mcp/tools/_timed.py +26 -0
  154. pretensor/mcp/tools/compile_metric.py +144 -0
  155. pretensor/mcp/tools/consumers.py +161 -0
  156. pretensor/mcp/tools/context.py +1121 -0
  157. pretensor/mcp/tools/cypher.py +509 -0
  158. pretensor/mcp/tools/detect_changes.py +254 -0
  159. pretensor/mcp/tools/impact.py +271 -0
  160. pretensor/mcp/tools/list.py +131 -0
  161. pretensor/mcp/tools/schema.py +170 -0
  162. pretensor/mcp/tools/search.py +316 -0
  163. pretensor/mcp/tools/semantic_search.py +282 -0
  164. pretensor/mcp/tools/traverse.py +1027 -0
  165. pretensor/mcp/tools/validate_sql.py +150 -0
  166. pretensor/observability.py +203 -0
  167. pretensor/py.typed +0 -0
  168. pretensor/quickstart/README.md +29 -0
  169. pretensor/quickstart/__init__.py +6 -0
  170. pretensor/quickstart/docker-compose.yml +18 -0
  171. pretensor/quickstart/pagila_data.sql +63 -0
  172. pretensor/quickstart/pagila_ddl.sql +92 -0
  173. pretensor/search/__init__.py +6 -0
  174. pretensor/search/base.py +80 -0
  175. pretensor/search/index.py +435 -0
  176. pretensor/semantic/__init__.py +24 -0
  177. pretensor/semantic/base.py +123 -0
  178. pretensor/semantic/compiler.py +487 -0
  179. pretensor/semantic/yaml_layer.py +180 -0
  180. pretensor/skills/__init__.py +5 -0
  181. pretensor/skills/generator.py +235 -0
  182. pretensor/staleness/__init__.py +15 -0
  183. pretensor/staleness/graph_patcher.py +355 -0
  184. pretensor/staleness/impact_analyzer.py +162 -0
  185. pretensor/staleness/snapshot_store.py +38 -0
  186. pretensor/validation/__init__.py +9 -0
  187. pretensor/validation/query_validator.py +436 -0
  188. pretensor/visibility/__init__.py +23 -0
  189. pretensor/visibility/config.py +126 -0
  190. pretensor/visibility/filter.py +143 -0
  191. pretensor/visibility/kuzu_helpers.py +32 -0
  192. pretensor/visibility/runtime.py +36 -0
  193. pretensor/visibility/sync_grants.py +188 -0
  194. pretensor-0.1.0.dist-info/METADATA +251 -0
  195. pretensor-0.1.0.dist-info/RECORD +198 -0
  196. pretensor-0.1.0.dist-info/WHEEL +4 -0
  197. pretensor-0.1.0.dist-info/entry_points.txt +2 -0
  198. pretensor-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,251 @@
1
+ Metadata-Version: 2.5
2
+ Name: pretensor
3
+ Version: 0.1.0
4
+ Summary: Pretensor database knowledge graph — Kuzu-backed schema graph from precomputed DB introspection
5
+ Project-URL: Homepage, https://github.com/pretensor-ai/pretensor
6
+ Project-URL: Repository, https://github.com/pretensor-ai/pretensor
7
+ Project-URL: Issues, https://github.com/pretensor-ai/pretensor/issues
8
+ Project-URL: Changelog, https://github.com/pretensor-ai/pretensor/blob/main/CHANGELOG.md
9
+ Project-URL: Documentation, https://github.com/pretensor-ai/pretensor#readme
10
+ Author-email: Carlos <275843998+tensorcarlos@users.noreply.github.com>
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: bigquery,data-catalog,database,graph,knowledge-graph,kuzu,llm,mcp,mysql,postgres,schema,snowflake
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Information Technology
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Database
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: cryptography>=42.0
27
+ Requires-Dist: httpx>=0.27
28
+ Requires-Dist: igraph<1,>=0.11
29
+ Requires-Dist: kuzu<1,>=0.7
30
+ Requires-Dist: mcp<2,>=1.0
31
+ Requires-Dist: pathspec>=0.12
32
+ Requires-Dist: pydantic>=2.0
33
+ Requires-Dist: rapidfuzz>=3.0
34
+ Requires-Dist: rich>=13.0
35
+ Requires-Dist: ruamel-yaml>=0.18
36
+ Requires-Dist: sqlalchemy>=2.0
37
+ Requires-Dist: sqlglot>=25.0
38
+ Requires-Dist: typer>=0.12
39
+ Provides-Extra: all-connectors
40
+ Requires-Dist: google-cloud-bigquery>=3.25; extra == 'all-connectors'
41
+ Requires-Dist: psycopg2-binary>=2.9; extra == 'all-connectors'
42
+ Requires-Dist: pymysql>=1.1; extra == 'all-connectors'
43
+ Requires-Dist: snowflake-sqlalchemy>=1.5; extra == 'all-connectors'
44
+ Provides-Extra: bigquery
45
+ Requires-Dist: google-cloud-bigquery>=3.25; extra == 'bigquery'
46
+ Provides-Extra: clustering
47
+ Requires-Dist: leidenalg>=0.10; extra == 'clustering'
48
+ Provides-Extra: dev
49
+ Requires-Dist: gitlint==0.19.1; extra == 'dev'
50
+ Requires-Dist: leidenalg>=0.10; extra == 'dev'
51
+ Requires-Dist: numpy>=1.26; extra == 'dev'
52
+ Requires-Dist: pre-commit>=3.0; extra == 'dev'
53
+ Requires-Dist: pyright>=1.1; extra == 'dev'
54
+ Requires-Dist: pytest>=8.0; extra == 'dev'
55
+ Requires-Dist: ruff>=0.15; extra == 'dev'
56
+ Provides-Extra: e2e
57
+ Requires-Dist: testcontainers[mysql]>=4.0; extra == 'e2e'
58
+ Requires-Dist: testcontainers[postgres]>=4.0; extra == 'e2e'
59
+ Provides-Extra: embeddings
60
+ Requires-Dist: huggingface-hub>=0.20; extra == 'embeddings'
61
+ Requires-Dist: numpy>=1.26; extra == 'embeddings'
62
+ Requires-Dist: onnxruntime>=1.17; extra == 'embeddings'
63
+ Requires-Dist: transformers>=4.38; extra == 'embeddings'
64
+ Provides-Extra: google-adk
65
+ Requires-Dist: google-adk>=0.1; extra == 'google-adk'
66
+ Provides-Extra: langchain
67
+ Requires-Dist: langchain-core>=0.2; extra == 'langchain'
68
+ Provides-Extra: llama-index
69
+ Requires-Dist: llama-index-core>=0.10; extra == 'llama-index'
70
+ Provides-Extra: mysql
71
+ Requires-Dist: pymysql>=1.1; extra == 'mysql'
72
+ Provides-Extra: postgres
73
+ Requires-Dist: psycopg2-binary>=2.9; extra == 'postgres'
74
+ Provides-Extra: snowflake
75
+ Requires-Dist: snowflake-sqlalchemy>=1.5; extra == 'snowflake'
76
+ Description-Content-Type: text/markdown
77
+
78
+ # Pretensor OSS
79
+
80
+ [![PyPI](https://img.shields.io/pypi/v/pretensor.svg)](https://pypi.org/project/pretensor/)
81
+ [![CI](https://github.com/pretensor-ai/pretensor/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/pretensor-ai/pretensor/actions/workflows/ci.yml)
82
+ [![Bench](https://github.com/pretensor-ai/pretensor/actions/workflows/bench.yml/badge.svg?branch=main)](https://github.com/pretensor-ai/pretensor/actions/workflows/bench.yml)
83
+ [![Status: Beta](https://img.shields.io/badge/status-beta-blue.svg)](#status)
84
+ [![Python: 3.11 | 3.12](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg)](#prerequisites)
85
+
86
+ **Pretensor OSS** introspects **PostgreSQL** and **Snowflake**, with optional **BigQuery** connector support, builds a **Kuzu** knowledge graph of tables, columns, foreign keys, inferred joins, and related metadata, and exposes that graph to AI tools through an **MCP** (Model Context Protocol) server. Agents query schema context and search without issuing raw SQL against your graph store.
87
+
88
+ > **Status: Beta.** Pretensor is on PyPI as `pretensor`; `0.1.0` is the first non-alpha release. CLI flags, MCP tools, and graph schema can still change between minor versions — pin exact versions until `1.0.0`. See [docs/releases.md](https://github.com/pretensor-ai/pretensor/blob/main/docs/releases.md) for the versioning policy.
89
+
90
+ ## Who is this for
91
+
92
+ - Data analysts using AI to explore warehouses.
93
+ - Data engineers tired of copy-pasting DDLs into chat.
94
+ - Data architects who need grounded schema context for agents.
95
+ - Anyone feeding database schemas to an LLM by hand.
96
+
97
+ ## Prerequisites
98
+
99
+ - **Python 3.11 or 3.12** (3.13 not yet tested).
100
+ - A reachable database for `pretensor index`. Every database driver ships as an extra — PostgreSQL via `pretensor[postgres]`, Snowflake via `pretensor[snowflake]`, BigQuery via `pretensor[bigquery]`.
101
+
102
+ ## Install
103
+
104
+ ```bash
105
+ # Indexing PostgreSQL? Install the postgres extra:
106
+ pip install 'pretensor[postgres]'
107
+ # or, inside a uv-managed environment:
108
+ uv pip install 'pretensor[postgres]'
109
+ ```
110
+
111
+ > **Heads-up:** the database drivers are *not* bundled in the base install. A
112
+ > bare `pip install pretensor` installs the CLI and MCP server but **no DB
113
+ > driver** — `pretensor index postgresql://…` will then fail at connect time
114
+ > with `Postgres connector requires psycopg2. Install the Postgres extra: pip
115
+ > install 'pretensor[postgres]' (or pip install psycopg2-binary).` Install the
116
+ > extra matching your database (`postgres`, `snowflake`, `bigquery`, or
117
+ > `mysql`), or `pretensor[all-connectors]` for all of them.
118
+
119
+ Optional features are exposed as extras:
120
+
121
+ | Extra | Adds | Use when |
122
+ |-------|------|----------|
123
+ | `pretensor[postgres]` | `psycopg2-binary` | You're indexing PostgreSQL. **Required** — a bare install has no Postgres driver. |
124
+ | `pretensor[snowflake]` | `snowflake-sqlalchemy` | You're indexing a Snowflake warehouse. |
125
+ | `pretensor[bigquery]` | `google-cloud-bigquery` | You're indexing BigQuery. |
126
+ | `pretensor[clustering]` | `leidenalg` | You want Leiden community detection during indexing. Without this, Pretensor falls back to igraph Louvain (works, but no resolution tuning). |
127
+ | `pretensor[embeddings]` | `onnxruntime`, `transformers`, `huggingface-hub`, `numpy` | You want local ONNX embeddings (`Snowflake/snowflake-arctic-embed-xs`, 384-dim). With the extra installed, `pretensor index` computes table embeddings automatically (opt out with `--no-embeddings` or `PRETENSOR_EMBEDDINGS_DISABLED=1`), the `semantic_search` MCP tool runs cosine-similarity ranking against indexed table vectors, and the `query` tool gains a hybrid BM25+cosine RRF rerank. The intelligence layer's experimental embedding-aware passes (clustering blend, role-classification vote, semantic candidate joins) remain opt-in config toggles. Without the extra, `semantic_search` is still registered but returns a structured `fallback_bm25` envelope; heuristic output is byte-identical to prior releases. |
128
+
129
+ Combine extras with comma separation, e.g. `pip install 'pretensor[postgres,clustering]'`.
130
+
131
+ Try it without installing:
132
+
133
+ ```bash
134
+ uvx --from pretensor pretensor --help
135
+ ```
136
+
137
+ > **A note on versions.** From `0.1.0` on, plain `pip install pretensor` resolves to the latest non-alpha release, and pre-releases require `--pre` (e.g. `pip install --pre pretensor`). Pin to a specific version (e.g. `pretensor==<version>`) if you want a deterministic install — see the [PyPI badge above](https://pypi.org/project/pretensor/) for the latest.
138
+
139
+ If you want to hack on Pretensor itself rather than use it, see the contributor setup in [CONTRIBUTING.md](https://github.com/pretensor-ai/pretensor/blob/main/CONTRIBUTING.md) for the `git clone` + `make install` flow.
140
+
141
+ ## Quickstart
142
+
143
+ ```bash
144
+ pretensor index postgresql://USER:PASSWORD@HOST:5432/DBNAME
145
+ pretensor serve --config-only # prints mcpServers JSON for Claude / Cursor
146
+ ```
147
+
148
+ `serve --config-only` prints the **`mcpServers` JSON** to stdout. Merge the `pretensor` entry into your Claude or Cursor MCP settings — the IDE starts the server automatically. Run `pretensor serve` directly if you prefer a long-running terminal process (config hints go to stderr, keeping stdout clean for JSON-RPC).
149
+
150
+ Use **`--state-dir`** on `index` / `reindex` and **`--graph-dir`** on `serve` when overriding the default state directory (`.pretensor`).
151
+
152
+ **Full guide — install, tools, visibility, reindexing, graph visualization:** [guides/quickstart.md](https://github.com/pretensor-ai/pretensor/blob/main/guides/quickstart.md)
153
+
154
+ ## Scan application code (`analyze`)
155
+
156
+ ```bash
157
+ pretensor analyze path/to/service-repo --connection mydb
158
+ ```
159
+
160
+ `analyze` scans a repository for SQL string literals in Python source (stdlib
161
+ AST — no code is executed), resolves each statement's table references with
162
+ sqlglot, and links the issuing code to the matching tables in the graph as
163
+ external consumers: service, file, line range, read/write op, and a confidence
164
+ score. Raw SQL text is never stored, only a fingerprint. The results power the
165
+ `consumers` MCP tool and enrich `impact`, so an agent can answer "which
166
+ services consume this table?" with provenance.
167
+
168
+ Useful flags: `--service` labels the scanned repo (defaults to the directory
169
+ name), `--default-schema` sets the schema assumed for unqualified table names,
170
+ `--dry-run` previews without writing, `--json` emits a machine-readable
171
+ summary. A `# noqa: pretensor-analyze` comment on or above a statement opts it
172
+ out.
173
+
174
+ ## MCP tools
175
+
176
+ | Name | Role |
177
+ |------|------|
178
+ | `list_databases` | List indexed database connections with table counts and staleness. |
179
+ | `schema` | Inspect node labels, edge types, and available properties before writing Cypher. |
180
+ | `query` | BM25 keyword search over table and entity metadata. Hybrid BM25 + cosine RRF rerank when `[embeddings]` is installed and tables carry vectors. |
181
+ | `semantic_search` | Cosine ranking over indexed `SchemaTable` embeddings. Requires `pretensor[embeddings]`; returns a structured BM25-fallback envelope when the extra is absent or no tables have been embedded. |
182
+ | `cypher` | Read-only Kuzu Cypher for one indexed database; mutating clauses are rejected. |
183
+ | `context` | Full context for one physical table, including columns, joins, lineage, and cluster metadata. Optional `include_similar` arg surfaces cross-cluster nearest neighbors when embeddings are present. |
184
+ | `traverse` | Join paths between two physical tables. When ambiguous and tables carry embeddings, ranks tied paths by embedding similarity. |
185
+ | `impact` | Downstream tables reachable from a table via FK and inferred-join edges. Each reached table carries the external code consumers found by `pretensor analyze`. |
186
+ | `consumers` | External code locations (service, file, line range, read/write op, confidence) that consume one table, from `pretensor analyze`. |
187
+ | `detect_changes` | Compare the live database schema to the last indexed snapshot without mutating the graph. |
188
+ | `compile_metric` | Compile semantic-layer YAML into validated SQL for one indexed database. The error string includes a "did you mean: …" suggestion list when an unresolved metric, table, or column name has close matches. |
189
+ | `validate_sql` | Validate SQL against the indexed graph before execution. |
190
+
191
+ ## Agent-framework adapters
192
+
193
+ Agents that don't run over MCP can still reach the graph tools. Pretensor exposes
194
+ `schema`, `context`, `traverse`, `impact`, `query`, and `validate_sql` as native
195
+ tool objects for LangChain, LlamaIndex, and Google ADK — no MCP server process
196
+ required. The adapters call the same underlying functions the MCP server uses, so
197
+ output is identical.
198
+
199
+ ```python
200
+ from pathlib import Path
201
+ from pretensor.integrations import load_langchain_tools # or load_llamaindex_tools, load_adk_tools
202
+
203
+ tools = load_langchain_tools(Path(".pretensor"))
204
+ ```
205
+
206
+ Install the matching extra (`pretensor[langchain]`, `pretensor[llama-index]`, or
207
+ `pretensor[google-adk]`). The `docs/agent-framework-adapters.md` file has a full
208
+ example per framework.
209
+
210
+ ## Architecture
211
+
212
+ `src/pretensor/` is organized by subsystem:
213
+
214
+ - **`connectors/`** — database-specific introspection (PostgreSQL, Snowflake, BigQuery)
215
+ - **`core/`** — Kuzu graph store, schema writing, relationship discovery
216
+ - **`intelligence/`** — deterministic graph intelligence (classification, clustering, join-path precomputation; metric-template code exists but is not part of the default OSS indexing flow)
217
+ - **`enrichment/`** — optional graph enrichment passes (dbt manifest, `analyze` code scanner)
218
+ - **`mcp/`** — MCP server, tools, resources
219
+ - **`cli/`** — Typer CLI (`index`, `reindex`, `analyze`, `serve`, `list`, `quickstart`, `export`, `validate`, `sync-grants`, `add`, `remove`, plus the `semantic` subcommand group)
220
+
221
+ ## Status
222
+
223
+ Pretensor is **early software**:
224
+
225
+ - The package on PyPI is named `pretensor`. `0.1.0` is the first non-alpha release; pre-releases published after it require `--pre` to install.
226
+ - There is no SemVer stability guarantee before `1.0.0`, so CLI flags, MCP tools, and graph schema may still change between releases. Pin exact versions.
227
+ - Test upgrades in a staging environment before production use.
228
+
229
+ Progress and release notes: [CHANGELOG.md](https://github.com/pretensor-ai/pretensor/blob/main/CHANGELOG.md).
230
+
231
+ ## Contributing
232
+
233
+ See [CONTRIBUTING.md](https://github.com/pretensor-ai/pretensor/blob/main/CONTRIBUTING.md). Security issues: see [SECURITY.md](https://github.com/pretensor-ai/pretensor/blob/main/SECURITY.md).
234
+
235
+ ## Tests
236
+
237
+ ```bash
238
+ make verify
239
+ ```
240
+
241
+ Individual commands are also available:
242
+
243
+ ```bash
244
+ make test # pytest
245
+ make lint # ruff check
246
+ make typecheck # pyright
247
+ ```
248
+
249
+ ## License
250
+
251
+ MIT — see [LICENSE](https://github.com/pretensor-ai/pretensor/blob/main/LICENSE).
@@ -0,0 +1,198 @@
1
+ pretensor/__init__.py,sha256=RRm2-KsBqb5taFtX3YWziOK46aNUXt_tPYexDxSrx7o,1354
2
+ pretensor/config.py,sha256=4eyrm2XXkHRbD1nJx1DNWzhaLWVzTDucD8XJ1qeEU9Q,9070
3
+ pretensor/errors.py,sha256=Kz2atFHRF5snIkep86-iiDfZrsS62G9mOCobZ_4uBtA,1459
4
+ pretensor/observability.py,sha256=tQHm3yqHkVcRGTQhKTa8_lVQsLiAr2Z2VpgbBs0WH_k,6013
5
+ pretensor/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ pretensor/benchmark/__init__.py,sha256=IxTnv93pkTA0tuS-KRi6PAp9biHeHh5IFqzyDhZLhiM,1275
7
+ pretensor/benchmark/cli.py,sha256=DpOfPirmxb5kdny8eUFGLPjt6zEXJlSg32tsU56sqr0,9833
8
+ pretensor/benchmark/fixtures.py,sha256=Psw07eCVikjH5mWTqS6wGLNdbc4KDcFLWEqvqDrCe_I,3084
9
+ pretensor/benchmark/release_gate.py,sha256=SU39-w5Dt9Ky3PxqY2EweFIMyWNjvKHEmMRqd2hPqoM,14616
10
+ pretensor/benchmark/results.py,sha256=AP7srISNK9DIBpV3SW14IL72hAHhiJr361xVJbBy_nE,10373
11
+ pretensor/benchmark/runner.py,sha256=rjouGEEhAjURAHdAiell7Gyg3_IgtWUySmDm3bfTFpQ,3630
12
+ pretensor/benchmark/l1/__init__.py,sha256=38cTD_f42NkLdkktEov0YlL44duQcM1yuQllmEuAHOg,579
13
+ pretensor/benchmark/l1/metrics.py,sha256=Byhrw2DLVjaMCpsTyFvr6WlK93VjtfOBQMY2mm2wFtI,5216
14
+ pretensor/benchmark/l1/pipeline.py,sha256=VKojV-T_omDsBEdb0day7z34HHvr9Ndt_ZK4eRYO62k,7653
15
+ pretensor/benchmark/l1/runner.py,sha256=_Hfbz_RP88Sf5ZxCT7Kvf84UuhxOz97SR5nDmC6SO38,8633
16
+ pretensor/benchmark/l2/__init__.py,sha256=zYo8TOMRlEO4GB7ZGOpIMtbCq7B_Fwva1TvabuLbH5s,724
17
+ pretensor/benchmark/l2/gold.py,sha256=upPYYgB1w0FtT6-1Brp28iVgAWc4uDWpENdBaVQ9pu0,7553
18
+ pretensor/benchmark/l2/metrics.py,sha256=P5fGty3yK7xSJxvCVxUvZ0B-wKTBtZlQHgjaFQLwddw,4985
19
+ pretensor/benchmark/l2/pipeline.py,sha256=RTsiS5gFS1-LRtaj0U7O2cQcm3KMdRt9Nh9JiMs1Hg0,5542
20
+ pretensor/benchmark/l2/runner.py,sha256=aZM6044GuqBCJCIQCKoRsEZfrLWVpsTRRM1bHIwntfk,18659
21
+ pretensor/benchmark/l3/__init__.py,sha256=zrgPhCcrEABSP2lmQTJTcsSu8VA6R6TfsAvxGrzI39A,1830
22
+ pretensor/benchmark/l3/agent.py,sha256=FFDT5S88FD5I2QvwcURoMGz1h_RNIofSGMQ_wpoRgRg,10348
23
+ pretensor/benchmark/l3/db.py,sha256=eu5yiD6fbHXV1IzWXCoBjGZdtRGFgeMyxiUMNbb6aUc,7306
24
+ pretensor/benchmark/l3/gold.py,sha256=Q6m1i9AsPeor5LswCX8yOFVEax0ta8edrAq3YQ7wcqA,3151
25
+ pretensor/benchmark/l3/llm_client.py,sha256=7xzJlurRwXSNR0bmany3RROELu-J5t1Y64HEwHbgiYM,13925
26
+ pretensor/benchmark/l3/mcp_client.py,sha256=TxE_bOB6faUvTXu-2fHxEGBT5uedQxHiShx4M2L43Xg,14513
27
+ pretensor/benchmark/l3/pretensor_runner.py,sha256=9FnAruAaenIBmBgzbucZIqh7NqNTTNV3UpYwyNF3yL4,15944
28
+ pretensor/benchmark/l3/prompt.py,sha256=BwFZJJlQ-mtNWywOY1G5QQq4LaslXWJ4dfn6nqs1DKg,5661
29
+ pretensor/benchmark/l3/runner.py,sha256=cFPwSuXlHFCpiwZ-bC1jLQSFHRtOYAqXZ6RiYeA6ujo,11805
30
+ pretensor/benchmark/l3/sql_equivalence.py,sha256=T4ffZUpsqYHQqnx12l4KaI4FfJQAtEj0OSE8HZuvB4o,6357
31
+ pretensor/cli/__init__.py,sha256=Ypbm2_pL6IalPYjgC9qYlxSZ1pova24vW2-woj5L51E,50
32
+ pretensor/cli/config_file.py,sha256=RPP8UQeA_B8r1X3VcRYNsZMOU9c4mSC8ctwoRrkz3jo,13508
33
+ pretensor/cli/constants.py,sha256=xxpj_y72g4ObZHux0VxPKlx9jMNU3e6-J1vw3cs1A4c,276
34
+ pretensor/cli/dbt_enrichment.py,sha256=yRBr_Is1dwXM_MbBb5N1YpEkQRvC5Ieoizb0EISzubA,3341
35
+ pretensor/cli/main.py,sha256=DRfNgHxHad_P0cU7WWC2ahO1fkUb7w5mBbNhKVAAn5A,3557
36
+ pretensor/cli/paths.py,sha256=7UjnSCLWXD5aTGN1aEgjEZfwV1_2H3TDgkwlD2W3ciQ,1354
37
+ pretensor/cli/plugin.py,sha256=J472fY3G8-fg85BzO0088n4pLMNAppP0ab0Dr5aUSGg,1559
38
+ pretensor/cli/commands/_source_runner.py,sha256=aBJ02cBgOLBMOHe4XxFmRHpHDhOloxLDsMRLrprIdqs,4893
39
+ pretensor/cli/commands/analyze.py,sha256=ideVZfs2g_3H7pL8M9ukO6OwRcvXGGzmMp6EedMskp4,6590
40
+ pretensor/cli/commands/export.py,sha256=AhTSvXvSoy05AaZUi16X_6ftL5yo4l-dmqKHVxePQOY,4735
41
+ pretensor/cli/commands/index.py,sha256=CiDb7H2fkm4_KC0uMOu0qiDM_i4o-73l-Okz-4zMih8,19338
42
+ pretensor/cli/commands/list.py,sha256=7QZGyPpBQ1xHZpt3Vm_Ieh-sBkUXesLNyrr18t8-xrw,2534
43
+ pretensor/cli/commands/quickstart.py,sha256=9ddj0HGW2f_qpuF4IgnPYqVB6lcEmYvyQyaLacsgv8A,8107
44
+ pretensor/cli/commands/reindex.py,sha256=nWAIvoXmfJJGsECMZp-O3dvWxRf1rZHuHZokmHZReQY,24203
45
+ pretensor/cli/commands/semantic.py,sha256=bu6vTQBPO-M2y3gglQ2G6EEKuYnFDxqqINjNcQ7Ux2E,7130
46
+ pretensor/cli/commands/serve.py,sha256=HftE3Hpu2Ke6rhl2dkdSDLVjfD4aZcNvz-nTrzOKlfE,5263
47
+ pretensor/cli/commands/sync_grants.py,sha256=aWke6QqHym6kzBtjuiayJgh0zZTmW68bjrDWQI31VhI,5508
48
+ pretensor/cli/commands/validate.py,sha256=JjIspLvrLpGw-RaPSYOZUXjqPYZhKm_HvadaU5Zbaeg,6100
49
+ pretensor/cli/commands/connections/__init__.py,sha256=EZ5CKHipBelPo6oxxA-epaGUy2UnuYb9ge9__rnqP-4,241
50
+ pretensor/cli/commands/connections/add_remove.py,sha256=vWXjGDKHOKgbFS8h17oef7BBjTr-OsOJNqLQOyO1KyM,4314
51
+ pretensor/cli/commands/connections/register.py,sha256=pl1ztxz8YdVBm-WDKRwZ43VOoYzPMv3PaPDxTPPMdVM,357
52
+ pretensor/connectors/__init__.py,sha256=aJI9EM0VQmj8a4_6PWKjP-SknsrvzyTYLTC-LU7GFVQ,567
53
+ pretensor/connectors/base.py,sha256=GGQKyTw7HkL-JbLAOVPXdQi6khvv4HiSBs1Tk23Rq2M,4901
54
+ pretensor/connectors/bigquery.py,sha256=03k0Bztg6yjsDP-TdjZwaqH0d7HsFM5h3DpLyM7I59g,16787
55
+ pretensor/connectors/inspect.py,sha256=eLUvqDT_VAwvazri_t6gl1c9F8SiD0LAwLC1jqQM6ro,11538
56
+ pretensor/connectors/lineage_sqlglot.py,sha256=nouq0E6ZlPNCGqL0DJJVtELuiNRFGtXgw2ppqqMzpOU,3085
57
+ pretensor/connectors/models.py,sha256=Q3kD4JLAIc59Plmvsq5xLcnaUeMyrp1Mr5QhRSF__hM,3753
58
+ pretensor/connectors/mysql.py,sha256=PbJ4AoCdbvY72r3Tx6iqACHtonWibZdRo8LofF6OVas,14712
59
+ pretensor/connectors/pg_array_parse.py,sha256=aZyyWzKlfpjvRLwmrQLukMktwRRM1Vniht8jQAFqz_E,1342
60
+ pretensor/connectors/postgres.py,sha256=Qz0oOLMDY93jabai8TH_Onc2Kh-Kt8HuZnRT9bjuK6U,38693
61
+ pretensor/connectors/registry.py,sha256=HlTwpw0NLgP0GACkyALTcwMF81IlFFcl06k3Md2UXeI,3238
62
+ pretensor/connectors/snapshot.py,sha256=TuEs_hjx7Kuzv6K1G5CCiP-PID3yag-74fKoUj3ZxlM,7650
63
+ pretensor/connectors/snowflake.py,sha256=xSDELcOq66hH6uMePzXju850S6b_Jnl9Exu7ey7a9qU,35125
64
+ pretensor/core/__init__.py,sha256=WdnLRy81WPjqPgqcoGhmC8531qNlF9CDYluS_cFOd9s,58
65
+ pretensor/core/builder.py,sha256=plxWpFX2iYOPLa9woW21opN38GMHy0pdyWMaeaJyDtM,12768
66
+ pretensor/core/dsn_crypto.py,sha256=unP4z0gAGmlbHSC3G5_kT7SczhzMr99S9gtYrg8T8qc,1826
67
+ pretensor/core/graph_schema_manager.py,sha256=VcCMgypRoerJ9NZH4dmNqvGd8O82_CMfj4qKxRduYzI,11792
68
+ pretensor/core/graph_store.py,sha256=2rX2xJ6fzOb_hsa8lDucRLMKYHPYkoiXKNkVN_jYWlU,46951
69
+ pretensor/core/ids.py,sha256=9ZsTIvvrOMumDDOkuZlMv1zZznKWRrYxyTZIK1-aodI,3642
70
+ pretensor/core/portable_export.py,sha256=ntZ1jz1f2PgFKP6vGDrXOpI6GEXJBFg_ktQZuUwDIPw,8713
71
+ pretensor/core/query_runner.py,sha256=Stqvr9SaXZLluesdlkrNtf0XDi_Hf0cBTZtElvTzxaU,2550
72
+ pretensor/core/registry.py,sha256=6GoDKm_9VUUu3ADPndfjPABvdSbeMjfRyHF3UMBjVNA,7586
73
+ pretensor/core/schema.py,sha256=ODKaYv86dlh0_oDEhRagCD2-OKJhhW_88L7kV-zctiA,13361
74
+ pretensor/core/secure_io.py,sha256=9S1Wo8xyS2jiTmEH6AjFOaXyH-P2Fw31_B5W0nxUGp0,3088
75
+ pretensor/core/store.py,sha256=idCT_biSSQ3XsT19XqgOLoZz5NwjpEjyf8B6ux-B2hE,18977
76
+ pretensor/enrichment/__init__.py,sha256=69N5_T_S4mzw3Y1kzt6qlaGgfPF7EzawRh1Nn1QUXok,60
77
+ pretensor/enrichment/analyze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
+ pretensor/enrichment/analyze/classify.py,sha256=uVc9MNC-otjE6lv8CktJJ3VEHkWEfe2jr_2UeNjks7A,1549
79
+ pretensor/enrichment/analyze/extract_python.py,sha256=od6kpnHLWfW5IgSdvufgdRpvMQXuAmyEr1JyJC7RH3M,6663
80
+ pretensor/enrichment/analyze/parse.py,sha256=BKxYuUV_QFF9VHN-ORezYa8_l6UzTx8ubqf0iGQZNOc,5274
81
+ pretensor/enrichment/analyze/pipeline.py,sha256=5ZQsfnPBdJgTVwUj1HMBhjf6yvOlNnnREGp3VjZcBhI,6929
82
+ pretensor/enrichment/analyze/summary.py,sha256=c8LYahtaxjn3P_0SD1-uSFqXgYlxsgyb-6fkMoXkiDg,1108
83
+ pretensor/enrichment/analyze/walker.py,sha256=ZSSuvcWX4762XqrOh1Ma-o1Jy5XUtwvTJzNo8WMv0k8,3001
84
+ pretensor/enrichment/analyze/writers.py,sha256=bxj5us1PQX3i5JAW9NLUmOGT2t9SvGWJIq9KpPshRHk,7807
85
+ pretensor/enrichment/dbt/__init__.py,sha256=H9BO4udYFJvOIjrcjFHPf9q8U4o_u5hKOXZJCfekYYQ,833
86
+ pretensor/enrichment/dbt/lineage.py,sha256=fOpFYLenhM7JOgVZMQ2sYH0TlJeBqPHKgp3JulnaJwU,3583
87
+ pretensor/enrichment/dbt/manifest.py,sha256=ZEIERBzXt-olOGnaiZ1BohXzFymLBORVnKotcK7SZCk,9708
88
+ pretensor/enrichment/dbt/metadata.py,sha256=pnWzsdqsOyZk_FFQ1_vXjQrgjXkGUUe_mRC74nlMrcM,7779
89
+ pretensor/enrichment/dbt/pipeline.py,sha256=DlBMy5gbs2e2LWx_MbbhDM2pY-H507vBPBgGAcwW7Ek,2719
90
+ pretensor/enrichment/dbt/resolution.py,sha256=Rqi2ZRZ914rBCvOVHytOoMY1T4ho2MYXtbVVa3mamUQ,3431
91
+ pretensor/enrichment/dbt/signals.py,sha256=mmpKMPM7lf9-9ZCWLJLgZtJPklNXogyypKknIvcF6PU,10603
92
+ pretensor/entities/__init__.py,sha256=SfpNzAx7H8Z7Z-ck2LtuTTHVVKzdR9RQlAgH2XuT_jw,656
93
+ pretensor/entities/builder.py,sha256=8i3o6jKU8VX4lW4kCoi-Y_HK7meTzf_2VAOjmQgqVU8,2225
94
+ pretensor/entities/classifier.py,sha256=clxCvXefLNgoCZm5aMl0n-M3-tW_M2cWvSRYRjNtcTk,13823
95
+ pretensor/entities/llm_extract.py,sha256=nfTs4tu7--vJAYTaTiANDuwbKH0gVDdXLHSJ-_zRm-s,1782
96
+ pretensor/graph_models/__init__.py,sha256=mBpPhrxu2-pwsbwk5c4M8LhpLG0IzFZWF6RP70jK2tw,549
97
+ pretensor/graph_models/base.py,sha256=15yP9BHIhYup_Qb0tzpHhupRTo_-HJCnkWqPrRdIk_g,238
98
+ pretensor/graph_models/consumer.py,sha256=c-T5YOmw2cLKyiB9QdNQkGFIkw8-1qcXdA84yPozYac,2593
99
+ pretensor/graph_models/edge.py,sha256=xsCvcdXm-ON1tsQxNGj4UCGdByO7CJ3H5ixOS2lX-fY,978
100
+ pretensor/graph_models/entity.py,sha256=RO1futGDh29zmXw6h9vbCOaAcw-dC19TcH36DYlOaf0,486
101
+ pretensor/graph_models/node.py,sha256=zv-i9jf7etvfwt9pkSeE3o_9of8QItPoOhDp4_OuzTc,2650
102
+ pretensor/graph_models/relationship.py,sha256=jvk8TlUx3CAT7gKVqjdkhvedMaFhuSS5ZK7CVA1ySl0,830
103
+ pretensor/integrations/__init__.py,sha256=zxRUF9qaUT5nm8GkS5sI5owI7zFZ4v88bWC_1hVuEbA,1275
104
+ pretensor/integrations/_base.py,sha256=OoEQRs4aLn_Glr7lt_wIIgB5O5A3UkoaAC8u2FNZWIg,4599
105
+ pretensor/integrations/google_adk.py,sha256=d2qPKcT4kJDSgy7sSXo91Oj-ztEZpMFG1amp6RIRgTc,1408
106
+ pretensor/integrations/langchain.py,sha256=t0MfygcfAsOnKKqln-b0QdrbI39aP4ue2sUI03Fwzaw,1630
107
+ pretensor/integrations/llamaindex.py,sha256=Rv80ruFn17FC0fN9UpdHunfR_1r8mJ77VI8QR6180p8,1566
108
+ pretensor/intelligence/__init__.py,sha256=aCvECawxRvuVR1_pB8ywRjv5ePqi_jZxrUzZbRIE_HA,946
109
+ pretensor/intelligence/cluster_labeler.py,sha256=qG4kxvkQVJHhwBOChVFr_hEeBcY7ymv58niZ_7pMCgE,15938
110
+ pretensor/intelligence/clustering.py,sha256=c_y1JBvmvQInBcING-sNZhvq3GCBQvkq3fFToRLTB1k,5721
111
+ pretensor/intelligence/combining.py,sha256=0oRNbihNX2mbm875F6utO527OQSSd-fFsZktLAG5Wjc,1293
112
+ pretensor/intelligence/discovery.py,sha256=sAE9_M12prbAqJ7uo4BbYFRz7BAHrfgpjf8QrvGWiT0,4005
113
+ pretensor/intelligence/embeddings.py,sha256=1KxJYW42rIjaSRvdBaWUZOrooWoPAFTP5DFWlqGhZ9k,12333
114
+ pretensor/intelligence/graph_export.py,sha256=Jni7wplnxwHtUrhOhYE1ILxvtaEZSZmXD8JKtSwWBr8,7036
115
+ pretensor/intelligence/heuristic.py,sha256=HEzFtGa-_kmkFgLZ1u3xbOIvLQVga8P8t0P_W2_XmVM,17683
116
+ pretensor/intelligence/llm_infer.py,sha256=jGWgjiq3f1n3SLGfcxLIJJNOcC8X2BVC6acqXnxOdF4,2329
117
+ pretensor/intelligence/llm_runtime.py,sha256=CtP9nE7MRxVl6foBfVJd7JeWLU2UTvu3nuGC56zPIt4,1537
118
+ pretensor/intelligence/metric_templates.py,sha256=bTAQHl4mo5k38Q-bKewkA5W-Kx1tyeY3liacSVQVXCo,6041
119
+ pretensor/intelligence/pipeline.py,sha256=3WkHZA6xES5Rkc5W9wWQMGwYj0wQ5NsGo9B1XRsZ3oc,13740
120
+ pretensor/intelligence/role_exemplars.py,sha256=nIz7uijbJrNgIUDvgbu2EH3k4hgklp1SzI77EXf5tbQ,10903
121
+ pretensor/intelligence/schema_classification.py,sha256=8dVVJcl0rLbg2YeNpbLdfG4gwJbPNjs7jMshz9J2qZY,12587
122
+ pretensor/intelligence/scoring.py,sha256=6Wg4Ka5jZo80yYqTAXGAhL2FdLcyA2tN-860VH5887M,2662
123
+ pretensor/intelligence/semantic.py,sha256=RC3KOWs30DovwlZyh2MNoeasq3dCuoWNnSVmpJmbYFk,9414
124
+ pretensor/intelligence/shadow_alias.py,sha256=7KvG_CAARe5Ih8eT5_f30WoXfzhKkKJLVd_cKpODuB0,3044
125
+ pretensor/intelligence/statistical.py,sha256=zkVrRa_28iyhuHGfpsoNUPa_ykyInEFL5kNPFz1qomw,1618
126
+ pretensor/intelligence/steps.py,sha256=K3Hcg3FfR4GfjC7VJFXQILwW0rcehpxNR7k3DmO_LlA,6830
127
+ pretensor/intelligence/steps_embedding.py,sha256=7ChBZ-pKNlGMVurO_hK7kMRTBYSZ-PlMMe92AOpt3h0,6636
128
+ pretensor/intelligence/join_paths/__init__.py,sha256=CFTx137vs3EaQQiySeFDUTIteGTr_kObgNvNWmYSM2E,4758
129
+ pretensor/intelligence/join_paths/on_demand.py,sha256=ydHlSWl6MUBRDUtTjfE-0KdqoulcHdhzqbaQIBy0nvA,17456
130
+ pretensor/intelligence/join_paths/storage.py,sha256=mf6lJp4cZsDyYrtrDS11xxoIAp9sGZVy6t4EZ5sTidk,2174
131
+ pretensor/introspection/__init__.py,sha256=O43euh2Rp_l-XIvHkpqQJEqcw_A7LWWd5oTX4dAVzhA,308
132
+ pretensor/introspection/inspector.py,sha256=th3WAcmqTSyRH1tJjdYf5H3cRhsC7JQmyrvhp-Rlj4k,151
133
+ pretensor/introspection/snapshot.py,sha256=YjfjRTFIRNYwTAMmtqiotXn1Q0Rez4lE8YGJEtVhZCY,1160
134
+ pretensor/introspection/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
+ pretensor/introspection/models/base.py,sha256=q5dKAdbplkm3q-ylrrBPDIVTZZaUdzNyQK9YkCPVQLs,121
136
+ pretensor/introspection/models/config.py,sha256=5b7NREW-J6Y1w3bZmKYC4QaVkoExQo5nGOqGkXbWwGw,8041
137
+ pretensor/introspection/models/dsn.py,sha256=o1lMivZCKVHbq2HmrlTLxFcxmkznc7XkXuPA2G44ffM,19716
138
+ pretensor/introspection/models/plan.py,sha256=BhoPD8DE9h9V99m2J-e_U0HGkSWl2ze0tdPSoRwuwFY,3699
139
+ pretensor/introspection/models/schema.py,sha256=7RFF9kGp2qD2qdxDI-ARA2OrPQTAnKvoKMqfcoCweB0,239
140
+ pretensor/introspection/models/semantic.py,sha256=Qs7tTsUmyAUYLa_62fGyiyvEz7dabaSo1wIhQZERUdI,3190
141
+ pretensor/introspection/models/validation.py,sha256=i1z8Q5TTr4b1dngAqm-_ihabnav0VYRQPZKNdsUBVKE,2929
142
+ pretensor/mcp/__init__.py,sha256=oLVY2ToBGWSb4MklfdR2OEKu9aJc-t3ZpHB-rFuvL-Q,334
143
+ pretensor/mcp/config_json.py,sha256=BOAKpPzydCf-TY6ob_Q2ycNx5i2z98ZPzlfx--WdDzI,602
144
+ pretensor/mcp/payload_types.py,sha256=krTCeuEY4ZeQoAwwrvt_MFbAhPvEsfT1-BIG9BJppdw,6969
145
+ pretensor/mcp/server.py,sha256=KoIPcaSfnIhkq6DViF9JJ_Xx8hyfV0kCfQppAWPphNU,9108
146
+ pretensor/mcp/service.py,sha256=BLsKpeEomPgjyNQnJMYjrKROIy9qRwWNNbBv_mrD2uc,1788
147
+ pretensor/mcp/service_context.py,sha256=gGBAMDKvsDwtnGGly_owIKoJja_aA4P3wyCk3aCQbYo,4525
148
+ pretensor/mcp/service_registry.py,sha256=Mkl-N7rEA3KIrD10fCofwqxlWLoNfb_KEoE_7BXQC8k,9846
149
+ pretensor/mcp/store_cache.py,sha256=vlgRqY6a_ky6-28S8YQwI9cNImhn2dFv6ZRD-ibZanI,1493
150
+ pretensor/mcp/tool_registry.py,sha256=_exuPSk-oOsKR3A9XVbSydmVljAUt8x3tG308VsqRDY,4349
151
+ pretensor/mcp/resources/__init__.py,sha256=jcS_8Qh3FI48tUJwnTB4BGZdJJoC0GqZ44GeqwjCIFg,411
152
+ pretensor/mcp/resources/markdown.py,sha256=JF_tY0qOb9mbbv5tll8m4eR3XLQv3M35XiuFZzYztWg,11569
153
+ pretensor/mcp/tools/__init__.py,sha256=28M1o5K9uyB273OYsO08JwQl0S-sGSduLZeL2F1_KL4,97
154
+ pretensor/mcp/tools/_rank.py,sha256=da6_jGYwkfa-q7kVqPfxyn6v4RRRKB6IzfvEAS_BrN8,8913
155
+ pretensor/mcp/tools/_timed.py,sha256=V1i3j1IIrCMksCbtprn_iHzi7p2dS2nnOKmn9YXolss,872
156
+ pretensor/mcp/tools/compile_metric.py,sha256=pMrWlDlee9OqGO5xMg1IsSbYiEQjmVh5W7nSSdF44vY,4809
157
+ pretensor/mcp/tools/consumers.py,sha256=-oZg3SGymkOWzih8by4mXxO2gsIaMoCJZq3wxC2VKFw,5322
158
+ pretensor/mcp/tools/context.py,sha256=e2rUoSCirMb8LC_XSeXNr3BOS6ar0XDq2gXyNHwZ31o,40258
159
+ pretensor/mcp/tools/cypher.py,sha256=UIg83IXaSaqJzPlUXTwT3K5qoaqgyAxPLShkG0aPB2g,19656
160
+ pretensor/mcp/tools/detect_changes.py,sha256=mf4VqiGMK8JH4Ktyfas46zX00L3xMonVusNg6WhGTfE,8637
161
+ pretensor/mcp/tools/impact.py,sha256=nTfG-zrNwTaxo1n622QkTUej1ZNoLhLINl4gv2RgnX4,9336
162
+ pretensor/mcp/tools/list.py,sha256=50-CuaKQ1xw-ve-eaVgELrw1gg3PeYovY4xwcdu1b44,4619
163
+ pretensor/mcp/tools/schema.py,sha256=Lxg9iCbzKnyyW5vymNTifCvj1VI5LRyzx6CCM-LWQHg,5446
164
+ pretensor/mcp/tools/search.py,sha256=9fByS_pcMnGW8R9J5HNcgs5FPvlJBii_TJ9WAR96YJM,10940
165
+ pretensor/mcp/tools/semantic_search.py,sha256=M6vaKjTOwrrUbbZiq_hvDpWNEp4inXc8d5eJCyenBQg,10364
166
+ pretensor/mcp/tools/traverse.py,sha256=iDBzsMe01RD8uxCf-yKlJ4wxShKqybsy4-pbnJsx67U,38475
167
+ pretensor/mcp/tools/validate_sql.py,sha256=6fsGqpz5Nwfv5FFWkUYXHOBXRvwtbkfahtBO1wOcn-s,5041
168
+ pretensor/quickstart/README.md,sha256=Q0N2Td6aMW_cYDYEZw_UKLZ4ybFe9BPAUqsaAx4NV3U,1117
169
+ pretensor/quickstart/__init__.py,sha256=-c2UVHRdQOXvU8vRGGf-_C7hbF-RWEioVei2Nsqzru4,262
170
+ pretensor/quickstart/docker-compose.yml,sha256=fP10JtMVScUtt3eMThGc3vVxsTA1Ne4TR79q8RVNu2w,547
171
+ pretensor/quickstart/pagila_data.sql,sha256=fw9iKixDZn-yHPyJxu-3yq6qLruDyM_4A58_HAFYM7Y,3399
172
+ pretensor/quickstart/pagila_ddl.sql,sha256=HEgmbzpznmnew3DnEhaP4-pUW1m-CcXljsesEYj3ZtE,3408
173
+ pretensor/search/__init__.py,sha256=9jqkDvpTUVu0eeRtQ3ZekvzGVgpYPlSUAuTuuUQ9hCE,265
174
+ pretensor/search/base.py,sha256=IzhNw68qVu9wJ0vWBswHcgn-ri_fe8p-M8OyeyRbSLs,2129
175
+ pretensor/search/index.py,sha256=mkV5lWPC_AVC7NQ1MZcQUMg3_gLqWXKbRN2TtcAcbXs,15465
176
+ pretensor/semantic/__init__.py,sha256=kxgxdZcQ4_0Z2f3lnRUN1j0IdbTlamByBt-DUUG1t28,693
177
+ pretensor/semantic/base.py,sha256=VAvD9_CdqCRp4XTBClveeHTqekQTuUSa__Bn4OMzhRI,4009
178
+ pretensor/semantic/compiler.py,sha256=KS7u3VDr_vgns-3k4gmA2HAzxp5aWWSHFJXSb3bxzF4,17945
179
+ pretensor/semantic/yaml_layer.py,sha256=sKcNG7IucrXldy1qzrmNgjcaQyFtHsNkt7aB2Xz-bzE,6593
180
+ pretensor/skills/__init__.py,sha256=Nj020aaBQMr9W89SHlcjWlxSCqo4Cd4RvhiWIkRBXrU,120
181
+ pretensor/skills/generator.py,sha256=2RqalstyN0ESCYa8sVvdLMqqJLBVXBdXz-b5KIGXUjA,8051
182
+ pretensor/staleness/__init__.py,sha256=dak7O1u8tcH7WPouFxU_w-8uLyzyjLFSH0uueh1YkhI,432
183
+ pretensor/staleness/graph_patcher.py,sha256=nENNbpygdzSkLagkWF6TAJ3U49QyyjX9HFYiaXL_dk0,14678
184
+ pretensor/staleness/impact_analyzer.py,sha256=xCdoyOdeO18KWjsWqKH2CFGKksXeYxEFUxt1f19ExAk,5911
185
+ pretensor/staleness/snapshot_store.py,sha256=cvemkIuYSRAzAbCh9qHYBT50fgY6VSEauhSmdtk6PjM,1266
186
+ pretensor/validation/__init__.py,sha256=DGhKv4MPwJecJek0p1__CXki_A4mif6RFcwXRNV7Z3I,239
187
+ pretensor/validation/query_validator.py,sha256=P-p95lbV8RjStUPP1RyuyXvsS0v9w0WnLWI5oYj6JeU,15342
188
+ pretensor/visibility/__init__.py,sha256=4hPWXOdRjHcbxgF1RgB_bro_DeWoDt5Np193hrc5f1M,629
189
+ pretensor/visibility/config.py,sha256=6bLT49fAA-49Op-nFJ9Yl0ryhVJRLoBHVILxSOunkkU,4527
190
+ pretensor/visibility/filter.py,sha256=TqL6y-i1naqJka32va5fDc2KpThPid_90gtB63OnV1w,5041
191
+ pretensor/visibility/kuzu_helpers.py,sha256=XfxKI7OTlMFa2wwReZ7yPT8eJeTKnQ12h--T1YP87FI,950
192
+ pretensor/visibility/runtime.py,sha256=iODKy-ByR3kLrs6eC-camQVSFI1JU1Kl13D5WUH8km4,1181
193
+ pretensor/visibility/sync_grants.py,sha256=BItxMjwojzT4eSIbl8DvClnYlrdc9pSkfDGE9xiMmxE,6558
194
+ pretensor-0.1.0.dist-info/METADATA,sha256=7BRFPn7CFsRaMRXlul-uW8rSfyAJR7ShwpcoqzANxwY,14136
195
+ pretensor-0.1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
196
+ pretensor-0.1.0.dist-info/entry_points.txt,sha256=1rfPX0HRs0DEeAgif_ApE0AWBFAItLsxTKV8qrRB7sY,53
197
+ pretensor-0.1.0.dist-info/licenses/LICENSE,sha256=JoeZgoDynwFkNzb97qUBSGD5Pf-CXwYUVGY-3dncnbg,1061
198
+ pretensor-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ pretensor = pretensor.cli.main:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Pretensor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.