Skip to content

v0.1.0 — Initial public release

Choose a tag to compare

@nickklos10 nickklos10 released this 11 Jul 17:18
52a83d7

Initial public release. Foundation and eval-driven harness shipped.

pip install querypilot

Safety engine

  • sqlglot-based SQL validation with single-statement and SELECT-only enforcement, blocked-keyword filter, table/column allowlist + blocklist, Cartesian-join detection, automatic LIMIT injection and max-row capping, SELECT * policy, query fingerprinting, and risk-level scoring.
  • SQLite and PostgreSQL connectors with per-dialect read-only execution and query timeouts.

Audit & access control

  • Structured audit trail: QueryAuditRecord with audit ID, original SQL, rewritten SQL, validation result, applied access policy, row count, and execution timing.
  • InMemoryAuditSink and JSONLAuditSink implementations.
  • Access-control policies: column allowlist + blocklist, row-filter injection ANDed into WHERE, post-execution column masking (redact / null / hash).

Runtimes

  • FastAPI server runtime (querypilot serve) with /health, /schema, /search-schema, /ask, /generate-sql, /validate-sql, /execute-sql, /evals/run, and /audit/recent endpoints.
  • MCP server runtime (querypilot mcp) over stdio and Streamable HTTP with ask_database, search_schema, validate_sql, and execute_sql tools.

Generation

  • DemoSQLGenerator (offline, deterministic) plus OpenAISQLGenerator and AnthropicSQLGenerator provider implementations with a validator-driven repair loop.
  • Tool-schema producers as_openai_tools() and as_anthropic_tools() for drop-in agent use.

Eval-driven harness

  • BenchmarkCase / BenchmarkSuite Pydantic schema with thresholds, comparison config, and tags. YAML and JSON suite loaders with shared-config validation across multi-file suite directories.
  • Result-set comparator with column- and row-order normalization, abs-difference float tolerance, datetime ISO normalization, NaN handling, and structured row diffs.
  • pipeline.run_case per-case runner reusing existing QueryPilot.generate_sql, validate_sql, and execute_sql; per-stage timings; failure classification across 12 categories.
  • Cost trackers for OpenAI and Anthropic, NullCostTracker, and a MODEL_PRICING table.
  • run_suite aggregator producing SuiteReport with pass / safety / correctness / repair rates, p50/p95 latency, token totals, $ estimate, tag rollups, failure breakdown, and threshold violations.
  • Stdlib JSON writer and screenshot-quality terminal renderer.
  • querypilot eval run|replay|check|init CLI with audit-log → regression-suite replay, baseline-vs-current regression detection, and a starter scaffold for suites/ and .eval/.
  • CI regression gate: GitHub Actions workflow running eval run + eval check on every PR.

Full changelog: CHANGELOG.md