Crate core, auditron demo, and 0.1.0 release prep#1
Merged
Conversation
Milestone 1 of the embedded StackQL MCP server crate (stackql-mcp, name verified free on crates.io): - sidecar mode (default feature): downloads the platform .mcpb from the pinned stackql release (v0.10.500), verifies sha256 against pins baked from the release assets, extracts to the shared cache (~/.stackql/mcp-server-bin/<version>/<platform>/), spawns over stdio - vendored feature: extract-on-first-run from caller-embedded bundle bytes (include_bytes!), keyed by content hash - public API: StackqlMcp::builder().mode(Mode::ReadOnly).auth(json) .start() -> RunningServer exposing the child handle plus a connected rmcp client (Deref to the rmcp RunningService) - canonical cwd-independent launch args per the packaging contract; modes read_only (default) / safe / delete_safe / full_access as defined by stackql's pkg/mcp_server policy - env overrides STACKQL_MCP_BIN and STACKQL_MCP_BUNDLE, builder equivalents, and a sync Builder::command() escape hatch - examples: minimal.rs (connected client) and launcher.rs (conformance launcher for the packaging repo smoke test) - tests: unit (platform keys, pins, args, extract, sha256) plus a conformance integration test porting smoke-test.py (initialize, tools/list, pull_provider github, list_services github); passes against the real v0.10.500 bundle - CI: fmt + clippy gates, linux/macos/windows test matrix including the conformance test Deps held to the justified set: rmcp, zip, sha2, ureq (sidecar only), serde/serde_json (already in rmcp's tree). MSRV 1.88, set by rmcp 1.x. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Milestone 2: the terminal compliance copilot demo plus the vendored embedding story. stackql-mcp: - fetch_bundle(): download the pinned platform .mcpb into the shared cache (sha256-verified, idempotent) - the producer step for vendored builds; examples/fetch_bundle.rs prints the path for pipelines - include_bundle! macro: embed the bundle named by the compile-time STACKQL_MCP_BUNDLE_FILE env var for Builder::bundle_bytes auditron (workspace member, not published): - scan: runs a YAML control pack through the embedded server in read_only mode; ratatui TUI streams pass/fail/error per control with the producing SQL always displayed; --no-tui line output for CI (exit 0 all pass, 2 any fail/error) - press e on a finding: Claude (Messages API over ureq, pluggable Explainer trait) explains it and drafts remediation steps; without ANTHROPIC_API_KEY the SQL and a hint are shown instead - evidence: re-runs the pack and writes an auditor-ready zip - run manifest (pack sha256, collector identity, server_info, timings), the exact pack source and per-control SQL, per-control CSVs - controls/github-core.yaml: org security posture pack on the github provider in null_auth mode (zero credentials) - branch protection, default branch, descriptions, licenses, staleness, plus an inventory evidence control that doubles as the run canary (provider errors surface as empty result sets, which would silently pass no_rows controls but fail the canary) Engine learnings baked into the pack authoring notes: tool results carry the typed DTO in structuredContent (markdown in text content); boolean storage varies per resource (compare = 0/1, never the strings true/false); avoid OR and NOT in WHERE (pushdown quirks). Verified end to end in WSL: live scan against the stackql org finds real violations; evidence zip inspected; vendored release build (~80MB) runs on a clean HOME with no downloads. CI extended for the workspace including a vendored build check on all three OSes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- readme field and docs.rs all-features metadata; exclude the auditron demo, control packs, and launch kit from the published package (verified with cargo package --list) - README badges for crates.io, docs.rs, and CI - pr.md launch kit: docusaurus blog draft, r/rust and This Week in Rust posts, and a Rust meetup talk synopsis Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements all three CLAUDE.md milestones. Note: stackql-mcp 0.1.0 is
already published to crates.io from this branch (tag v0.1.0), so this PR
brings the repo in line with the released crate.
Milestone 1: crate core (sidecar)
stackql release (v0.10.500), verifies sha256 against pins baked from
the release assets, extracts to the shared cache
(
~/.stackql/mcp-server-bin/), spawns over stdioStackqlMcp::builder().mode(...).auth(...).start()->RunningServer(child handle + connected rmcp client)modes read_only (default) / safe / delete_safe / full_access
STACKQL_MCP_BIN/STACKQL_MCP_BUNDLE, syncBuilder::command()escape hatch(initialize -> tools/list -> pull_provider -> list_services)
Milestone 2: vendored mode + auditron
fetch_bundle()+include_bundle!for vendored single-binarybuilds (verified: ~80MB release binary runs on a clean HOME with no
downloads)
SQL always visible, Claude-drafted remediation on demand, and an
auditor-ready evidence zip (manifest, exact SQL, per-control CSVs)
(null_auth), including a canary control that catches provider errors
surfacing as empty result sets
Milestone 3: release prep
verified with
cargo package --list), README badges, pr.md launch kitVerification
zip inspected; vendored binary exercised end to end
🤖 Generated with Claude Code