sqlprism 1.2.1__tar.gz → 1.2.2__tar.gz
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.
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.gitignore +5 -0
- sqlprism-1.2.2/CHANGELOG.md +94 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/CLAUDE.md +2 -2
- sqlprism-1.2.2/CONTRIBUTING.md +78 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/PKG-INFO +3 -3
- {sqlprism-1.2.1 → sqlprism-1.2.2}/README.md +2 -2
- sqlprism-1.2.2/SECURITY.md +42 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/getting-started/installation.md +1 -1
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/guide/cli.md +1 -1
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/guide/mcp-tools.md +1 -1
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/index.md +1 -1
- {sqlprism-1.2.1 → sqlprism-1.2.2}/pyproject.toml +2 -2
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/cli.py +405 -393
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/conventions.py +3 -3
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/graph.py +16 -15
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/indexer.py +1 -1
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/mcp_tools.py +5 -5
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/languages/dbt.py +15 -16
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/languages/sql.py +2 -2
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/languages/sqlmesh.py +8 -12
- sqlprism-1.2.2/tests/conftest.py +23 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_cli.py +228 -1
- sqlprism-1.2.2/tests/test_conventions_inference.py +676 -0
- sqlprism-1.2.2/tests/test_conventions_layers.py +366 -0
- sqlprism-1.2.2/tests/test_conventions_overrides.py +442 -0
- sqlprism-1.2.2/tests/test_conventions_placement.py +593 -0
- sqlprism-1.2.2/tests/test_conventions_tagging.py +812 -0
- sqlprism-1.2.2/tests/test_indexer_columns.py +506 -0
- sqlprism-1.2.2/tests/test_indexer_core.py +304 -0
- sqlprism-1.2.2/tests/test_indexer_dbt_schema.py +615 -0
- sqlprism-1.2.2/tests/test_indexer_integration.py +763 -0
- sqlprism-1.2.2/tests/test_indexer_reindex.py +600 -0
- sqlprism-1.2.2/tests/test_indexer_schema.py +931 -0
- sqlprism-1.2.2/tests/test_mcp_pr_impact.py +485 -0
- sqlprism-1.2.2/tests/test_mcp_reindex_files.py +378 -0
- sqlprism-1.2.2/tests/test_mcp_schema_context.py +760 -0
- sqlprism-1.2.2/tests/test_mcp_search_trace.py +325 -0
- sqlprism-1.2.2/tests/test_mcp_validation.py +113 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/uv.lock +1 -1
- sqlprism-1.2.1/tests/test_conventions.py +0 -2847
- sqlprism-1.2.1/tests/test_indexer.py +0 -3679
- sqlprism-1.2.1/tests/test_mcp_tools.py +0 -2040
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/creating-branches-and-prs/PR-TEMPLATE.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/creating-branches-and-prs/SKILL.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/implementing-issues/AGENT-INSTRUCTIONS.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/implementing-issues/SKILL.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/implementing-issues/TASK-FORMAT.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/managing-project-releases/BDD-TEMPLATE.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/managing-project-releases/SKILL.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/reviewing-prs/COMMENT-TEMPLATE.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/reviewing-prs/REVIEWERS.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/reviewing-prs/SKILL.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/writing-graph-queries/EXAMPLES.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.claude/skills/writing-graph-queries/SKILL.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.github/dependabot.yml +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.github/workflows/ci.yml +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.github/workflows/docs.yml +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/.github/workflows/publish.yml +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/LICENSE +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/conventions.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/dbt.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/graph.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/indexer.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/mcp-tools.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/sql-parser.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/sqlmesh.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/api/types.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/architecture/overview.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/architecture/schema.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/getting-started/configuration.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/guide/conventions.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/guide/dbt.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/docs/guide/sqlmesh.md +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/mkdocs.yml +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/__init__.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/__init__.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/core/naming.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/languages/__init__.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/languages/utils.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/src/sqlprism/types.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/__init__.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_config.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_federation.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_graph.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_graph_tools.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_languages.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_renderers.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_sql_parser.py +0 -0
- {sqlprism-1.2.1 → sqlprism-1.2.2}/tests/test_types.py +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
|
|
5
|
+
follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.2.2] — 2026-04-21
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- CLI commands now share `_open_graph_for_write` / `_open_graph_for_read`
|
|
13
|
+
context-manager helpers, replacing the ad-hoc "load config + resolve
|
|
14
|
+
db_path + open graph" prologue across `reindex`, `reindex-file`,
|
|
15
|
+
`reindex-sqlmesh`, `reindex-dbt`, `status`, `conventions`, and the five
|
|
16
|
+
query subcommands (#137).
|
|
17
|
+
- Split `tests/test_indexer.py`, `tests/test_conventions.py`, and
|
|
18
|
+
`tests/test_mcp_tools.py` into smaller per-feature files; shared MCP
|
|
19
|
+
reset fixture moved to `tests/conftest.py` (#136).
|
|
20
|
+
- Expand ruff rules to include `B` (bugbear) and `RUF`; narrow
|
|
21
|
+
`pytest.raises(Exception)` to `ValidationError` in tests (#134).
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- `graph.py` snippet reader now narrows the except to `OSError` and logs
|
|
25
|
+
at debug instead of silently swallowing; `dbt.py` replaces broad
|
|
26
|
+
`except (ImportError, OSError, Exception)` with `yaml.YAMLError` +
|
|
27
|
+
`OSError` and logs failures (#134).
|
|
28
|
+
|
|
29
|
+
### Docs
|
|
30
|
+
- Align `CLAUDE.md` on Python 3.11+; replace placeholder `<repo-url>`
|
|
31
|
+
with real clone URL; drop hardcoded tool count from README and guides;
|
|
32
|
+
add `CONTRIBUTING.md`, `CHANGELOG.md`, and `SECURITY.md` (#134).
|
|
33
|
+
|
|
34
|
+
## [1.2.1] — 2026-04-21
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- `find_path` / `find_bottlenecks` / `check_impact` no longer follow `defines`
|
|
38
|
+
(non-dataflow) edges or `inserts_into` self-loops when tracing dependencies
|
|
39
|
+
(#127).
|
|
40
|
+
- Cross-repo trace now walks the name-quotient graph so dependency traversal
|
|
41
|
+
crosses shadow `ref()` nodes between federated repos (#131).
|
|
42
|
+
- dbt `schema.yml` column definitions are persisted into the graph; column
|
|
43
|
+
inference from `CREATE TABLE AS SELECT` is also picked up (#125).
|
|
44
|
+
- sqlmesh column-definition resolution aligned with the dbt path (#124).
|
|
45
|
+
|
|
46
|
+
## [1.2.0] — 2026-03-26
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
- **Conventions engine**: layer detection, naming-pattern inference, reference
|
|
50
|
+
rules, common columns, and column-style inference. Exposed via
|
|
51
|
+
`get_conventions` MCP tool and the `sqlprism conventions --init/--refresh/--diff`
|
|
52
|
+
CLI. YAML overrides can be loaded and merged on top of inferred conventions.
|
|
53
|
+
- **Semantic tags**: clustering and auto-labeling of models, with
|
|
54
|
+
`search_by_tag` and `list_tags` MCP tools.
|
|
55
|
+
- **Similarity & placement**: `find_similar_models` and `suggest_placement`
|
|
56
|
+
MCP tools to support new-model authoring workflows.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
- Upgraded `sqlglot` to v30 with the `[c]` (native) extension for faster
|
|
60
|
+
parsing.
|
|
61
|
+
|
|
62
|
+
## [1.1.0] — 2026-03-16
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
- **Cross-repo federation**: `cross_repo_edges` and `name_collisions` surfaced
|
|
66
|
+
via `get_index_status`; synthetic shadow nodes for referenced-but-unindexed
|
|
67
|
+
models.
|
|
68
|
+
- **YAML config support** with discovery order; `sqlprism.yml` recognised
|
|
69
|
+
alongside legacy JSON.
|
|
70
|
+
- **Graph-analytics tools**: `find_critical_models` (PageRank),
|
|
71
|
+
`detect_cycles`, `find_subgraphs` (weakly connected components), and
|
|
72
|
+
`find_bottlenecks` (fan-in/out analysis), backed by DuckPGQ.
|
|
73
|
+
- **Column & context tools**: `get_schema`, `get_context`, `check_impact`,
|
|
74
|
+
`find_path`, and DuckPGQ-backed `trace_dependencies`.
|
|
75
|
+
- `ty` type checker added to CI.
|
|
76
|
+
|
|
77
|
+
## [1.0.1] — 2026-03-15
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
- Patch release following v1.0.0; see git history for details.
|
|
81
|
+
|
|
82
|
+
## [1.0.0] — 2026-03-12
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- Initial release: DuckDB-backed knowledge graph for SQL, dbt, and sqlmesh
|
|
86
|
+
repos. MCP server with parsing, indexing, lineage, impact analysis, and
|
|
87
|
+
column tracing.
|
|
88
|
+
|
|
89
|
+
[Unreleased]: https://github.com/darkcofy/sqlprism/compare/v1.2.1...HEAD
|
|
90
|
+
[1.2.1]: https://github.com/darkcofy/sqlprism/compare/v1.2.0...v1.2.1
|
|
91
|
+
[1.2.0]: https://github.com/darkcofy/sqlprism/compare/v1.1.0...v1.2.0
|
|
92
|
+
[1.1.0]: https://github.com/darkcofy/sqlprism/compare/v1.0.1...v1.1.0
|
|
93
|
+
[1.0.1]: https://github.com/darkcofy/sqlprism/compare/v1.0.0...v1.0.1
|
|
94
|
+
[1.0.0]: https://github.com/darkcofy/sqlprism/releases/tag/v1.0.0
|
|
@@ -4,7 +4,7 @@ SQL knowledge graph MCP server — indexes SQL, dbt, and sqlmesh repos into a Du
|
|
|
4
4
|
|
|
5
5
|
## Quick Reference
|
|
6
6
|
|
|
7
|
-
- **Language**: Python 3.
|
|
7
|
+
- **Language**: Python 3.11+
|
|
8
8
|
- **Package manager**: uv
|
|
9
9
|
- **Lint**: `uv run ruff check .`
|
|
10
10
|
- **Type check**: `uv run ty check`
|
|
@@ -18,7 +18,7 @@ src/sqlprism/
|
|
|
18
18
|
core/
|
|
19
19
|
graph.py — DuckDB storage layer (MVCC, repo_type tracking)
|
|
20
20
|
indexer.py — Orchestrates parsing + indexing; file-level reindex with repo-type dispatch
|
|
21
|
-
mcp_tools.py — MCP server tools (
|
|
21
|
+
mcp_tools.py — MCP server tools (non-blocking reindex, per-repo debounce)
|
|
22
22
|
conventions.py — Convention inference engine (layers, naming, references, tags, overrides)
|
|
23
23
|
languages/
|
|
24
24
|
sql.py — sqlglot-based SQL parser
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Contributing to SQLPrism
|
|
2
|
+
|
|
3
|
+
Thanks for your interest. This document covers the workflow, conventions, and
|
|
4
|
+
checks that apply to all changes.
|
|
5
|
+
|
|
6
|
+
## Development setup
|
|
7
|
+
|
|
8
|
+
Requirements:
|
|
9
|
+
|
|
10
|
+
- Python 3.11+
|
|
11
|
+
- [uv](https://docs.astral.sh/uv/) package manager
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/darkcofy/sqlprism.git
|
|
15
|
+
cd sqlprism
|
|
16
|
+
uv sync
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This installs the package and dev dependencies (pytest, ruff, ty, mkdocs) into
|
|
20
|
+
a local `.venv`.
|
|
21
|
+
|
|
22
|
+
## Running checks locally
|
|
23
|
+
|
|
24
|
+
Every PR must pass these before it is marked ready:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv run ruff check . # lint
|
|
28
|
+
uv run ty check # type check
|
|
29
|
+
uv run pytest tests/ -v # tests
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
To run a single test:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
uv run pytest tests/test_indexer.py::test_name -v
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Coverage is configured with a floor of 80% (`[tool.coverage.report] fail_under`).
|
|
39
|
+
|
|
40
|
+
## Branch and PR conventions
|
|
41
|
+
|
|
42
|
+
Branch names follow the pattern `<type>-<issue>-<short-description>`:
|
|
43
|
+
|
|
44
|
+
- `feat-11-indexer-reindex-files`
|
|
45
|
+
- `fix-131-trace-cross-repo-shadow-nodes`
|
|
46
|
+
- `chore-134-critical-review-fixes`
|
|
47
|
+
|
|
48
|
+
Valid types:
|
|
49
|
+
|
|
50
|
+
- `feat` — new functionality or enhancement
|
|
51
|
+
- `fix` — bug fix
|
|
52
|
+
- `chore` — maintenance, refactors, docs, hygiene
|
|
53
|
+
|
|
54
|
+
PR titles should mirror the branch name style. The PR body should link the
|
|
55
|
+
issue with `Closes #<number>`. Open PRs as drafts first; mark them ready once
|
|
56
|
+
`ruff`, `ty`, and `pytest` all pass locally.
|
|
57
|
+
|
|
58
|
+
## Issue conventions
|
|
59
|
+
|
|
60
|
+
Issues use a BDD format where applicable: `Given / When / Then` scenarios
|
|
61
|
+
with concrete acceptance criteria. This makes it easier to decompose an issue
|
|
62
|
+
into tasks and to know when it is done.
|
|
63
|
+
|
|
64
|
+
## Documentation
|
|
65
|
+
|
|
66
|
+
User-facing docs live under `docs/` and are published with MkDocs Material.
|
|
67
|
+
Preview locally:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
uv run mkdocs serve
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Architectural or longer-form notes can also live under `docs/architecture/`.
|
|
74
|
+
|
|
75
|
+
## Reporting security issues
|
|
76
|
+
|
|
77
|
+
See [SECURITY.md](SECURITY.md). Please do not file public issues for
|
|
78
|
+
suspected vulnerabilities.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlprism
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: SQL codebase indexer with column-level lineage, impact analysis, and MCP server support
|
|
5
5
|
Project-URL: Homepage, https://github.com/darkcofy/sqlprism
|
|
6
6
|
Project-URL: Documentation, https://darkcofy.github.io/sqlprism/
|
|
@@ -241,7 +241,7 @@ Full reference: [CLI guide](https://darkcofy.github.io/sqlprism/guide/cli/)
|
|
|
241
241
|
|
|
242
242
|
Full reference: [MCP tools guide](https://darkcofy.github.io/sqlprism/guide/mcp-tools/)
|
|
243
243
|
|
|
244
|
-
When running as an MCP server (`sqlprism serve`),
|
|
244
|
+
When running as an MCP server (`sqlprism serve`), the following tools are exposed:
|
|
245
245
|
|
|
246
246
|
| Tool | Description |
|
|
247
247
|
|---|---|
|
|
@@ -284,7 +284,7 @@ src/sqlprism/
|
|
|
284
284
|
core/
|
|
285
285
|
graph.py <- DuckDB storage layer (MVCC), queries, snippets, repo_type tracking
|
|
286
286
|
indexer.py <- Orchestrator: scan -> checksum -> parse -> store; file-level reindex with repo-type dispatch
|
|
287
|
-
mcp_tools.py <- FastMCP tool definitions (
|
|
287
|
+
mcp_tools.py <- FastMCP tool definitions (non-blocking reindex, per-repo debounce)
|
|
288
288
|
conventions.py <- Convention inference engine: layers, naming, references, tags, overrides
|
|
289
289
|
cli.py <- Click CLI: serve, reindex, reindex-file, reindex-sqlmesh, reindex-dbt, conventions, status, init
|
|
290
290
|
```
|
|
@@ -213,7 +213,7 @@ Full reference: [CLI guide](https://darkcofy.github.io/sqlprism/guide/cli/)
|
|
|
213
213
|
|
|
214
214
|
Full reference: [MCP tools guide](https://darkcofy.github.io/sqlprism/guide/mcp-tools/)
|
|
215
215
|
|
|
216
|
-
When running as an MCP server (`sqlprism serve`),
|
|
216
|
+
When running as an MCP server (`sqlprism serve`), the following tools are exposed:
|
|
217
217
|
|
|
218
218
|
| Tool | Description |
|
|
219
219
|
|---|---|
|
|
@@ -256,7 +256,7 @@ src/sqlprism/
|
|
|
256
256
|
core/
|
|
257
257
|
graph.py <- DuckDB storage layer (MVCC), queries, snippets, repo_type tracking
|
|
258
258
|
indexer.py <- Orchestrator: scan -> checksum -> parse -> store; file-level reindex with repo-type dispatch
|
|
259
|
-
mcp_tools.py <- FastMCP tool definitions (
|
|
259
|
+
mcp_tools.py <- FastMCP tool definitions (non-blocking reindex, per-repo debounce)
|
|
260
260
|
conventions.py <- Convention inference engine: layers, naming, references, tags, overrides
|
|
261
261
|
cli.py <- Click CLI: serve, reindex, reindex-file, reindex-sqlmesh, reindex-dbt, conventions, status, init
|
|
262
262
|
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
SQLPrism is pre-1.x in spirit (published as 1.x with a "Beta" development
|
|
6
|
+
status). Only the latest minor release on the `main` branch receives security
|
|
7
|
+
fixes.
|
|
8
|
+
|
|
9
|
+
| Version | Supported |
|
|
10
|
+
|---------|-----------|
|
|
11
|
+
| 1.2.x | Yes |
|
|
12
|
+
| < 1.2 | No |
|
|
13
|
+
|
|
14
|
+
## Reporting a vulnerability
|
|
15
|
+
|
|
16
|
+
Please **do not** open a public GitHub issue for suspected vulnerabilities.
|
|
17
|
+
|
|
18
|
+
Instead, email the maintainer at **alfjohnfred@gmail.com** with:
|
|
19
|
+
|
|
20
|
+
- A description of the issue and its potential impact.
|
|
21
|
+
- Steps to reproduce, or a minimal proof of concept.
|
|
22
|
+
- Any relevant logs, stack traces, or affected commits.
|
|
23
|
+
|
|
24
|
+
You can expect an acknowledgement within **72 hours**. If the report is
|
|
25
|
+
confirmed, we will work on a fix and coordinate a release; you will be
|
|
26
|
+
credited in the `CHANGELOG.md` entry unless you prefer to remain anonymous.
|
|
27
|
+
|
|
28
|
+
## Scope
|
|
29
|
+
|
|
30
|
+
In scope:
|
|
31
|
+
|
|
32
|
+
- Arbitrary code execution, SQL injection, or path traversal in the parser,
|
|
33
|
+
indexer, CLI, or MCP server.
|
|
34
|
+
- Secret leakage through logs, snippets, or the graph store.
|
|
35
|
+
- Unsafe subprocess handling in the dbt / sqlmesh renderers.
|
|
36
|
+
|
|
37
|
+
Out of scope:
|
|
38
|
+
|
|
39
|
+
- Vulnerabilities in upstream dependencies (DuckDB, sqlglot, dbt, sqlmesh) —
|
|
40
|
+
please report those to the respective projects.
|
|
41
|
+
- Findings that require the attacker to already control the machine running
|
|
42
|
+
`sqlprism serve`.
|
|
@@ -34,7 +34,7 @@ sqlprism status [--config PATH] [--db PATH]
|
|
|
34
34
|
|
|
35
35
|
### `sqlprism serve`
|
|
36
36
|
|
|
37
|
-
Starts the MCP server, exposing all
|
|
37
|
+
Starts the MCP server, exposing all tools to any MCP client.
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
sqlprism serve [--config PATH] [--db PATH] [--transport stdio|streamable-http] [--port 8000]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP Tools
|
|
2
2
|
|
|
3
|
-
When running as an MCP server (`sqlprism serve`),
|
|
3
|
+
When running as an MCP server (`sqlprism serve`), the tools below are exposed. Any MCP client (Claude Code, Claude Desktop, Cursor, Continue.dev) can call these.
|
|
4
4
|
|
|
5
5
|
## Query Tools
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ On a 200-model SQLMesh project, a column impact query returns **75 structured re
|
|
|
24
24
|
## Quick Start
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
git clone
|
|
27
|
+
git clone https://github.com/darkcofy/sqlprism.git && cd sqlprism
|
|
28
28
|
uv sync
|
|
29
29
|
uv run sqlprism init # creates sqlprism.yml
|
|
30
30
|
# edit config to add your repos
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sqlprism"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
description = "SQL codebase indexer with column-level lineage, impact analysis, and MCP server support"
|
|
9
9
|
license = "Apache-2.0"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -49,7 +49,7 @@ target-version = "py311"
|
|
|
49
49
|
line-length = 120
|
|
50
50
|
|
|
51
51
|
[tool.ruff.lint]
|
|
52
|
-
select = ["E", "F", "I", "N", "W", "UP"]
|
|
52
|
+
select = ["E", "F", "I", "N", "W", "UP", "B", "RUF"]
|
|
53
53
|
|
|
54
54
|
[tool.pytest.ini_options]
|
|
55
55
|
asyncio_mode = "auto"
|