Skip to content

v0.5.2

Choose a tag to compare

@github-actions github-actions released this 10 Aug 07:55
· 81 commits to main since this release
72b62aa

Closes #12. Two features: whole-setup diagnostics, and making the write preview mandatory.

Breaking / Behaviour changes

  • execute_write_query now defaults to dry_run=true, and the preview is enforced rather
    than advisory.
    A commit (dry_run=false) is rejected unless the identical statement was
    dry-run first. A bare call therefore previews instead of committing — an agent that used to
    call the tool and have it write will now get a preview back.

    The grant fingerprints database + SQL + params with a 10-minute TTL. skip_dry_run=true
    exists solely for an agent to attest the user explicitly asked to skip the preview.

    Gate order is now mode → dry-run-first → yolouser_consent. yolo cannot skip the
    preview
    , and nothing can ever make a read database writable.

Added

  • doctor — whole-setup diagnostics, not just connectivity. One engine (doctor.py), two
    surfaces: db-conn-mcp doctor [--offline] (exit 0 only if nothing fails, 2 otherwise) and a
    doctor MCP tool returning {check, status, detail, suggested_action} so an agent can
    self-diagnose mid-session. 23 tools total.

    Six checks, each drawn from a real failure during the 0.5.0 → 0.5.1 upgrade: running server
    processes older than the installed package (psutil optional, and it reports its own host
    process when stale); a cache-bypassed PyPI version check; per-database connectivity plus a
    credential-free listener probe of fallback ports, catching "a different local Postgres
    answered my port"; config-schema typos with did-you-mean hints; secrets exposure (POSIX file
    mode, git-committability); and injected client entries whose command path no longer exists.

    The engine never raises — a crashing check degrades to a fail naming only the exception
    type. A poisoned-DSN sweep test asserts no DSN, host, user or password can reach any finding,
    including via pydantic validation errors (Rule 6).

  • check_database UNREACHABLE results now report failed_port.

Changed

  • MCP-client helpers moved from cli.py into a new clients.py (re-exported for
    compatibility), unlocking reuse without a circular import.

Full Changelog: v0.5.1...v0.5.2