Repository navigation
Add proofline agent status for local MCP configuration diagnostics - #137
Open
vanshksingh wants to merge 1 commit into
Open
vanshksingh wants to merge 1 commit into
vanshksingh wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Problem
proofline agent install CLIENTwrites the MCP server entry forclaude-code,codex,cursor,gemini, andkiro, but there is no read-only command to inspect whether an existing user-level registration is missing, malformed, or valid. In addition, Clap's eagerenvparsing on global flags (PROOFLINE_BASE_URL,PROOFLINE_ORGANIZATION_ID,PROOFLINE_CA_CERT) would fail a local diagnostic command when inherited environment variables are malformed.Approach
proofline agent status CLIENT(src/agent/status.rs,src/agent/config.rs,src/agent/store.rs,src/agent.rs,README.md) as a read-only, offline diagnostic across all five supported clients (claude-code,codex,cursor,gemini,kiro).Configuration valid:(exit0),Unable to verify:(exit0, for custom dirs likeCLAUDE_CONFIG_DIR, relativeCODEX_HOME, oversized files, or broken symlinks),Missing registration:(exit1), andInvalid registration:(exit1).UniqueJsonduplicate-key check,type == "stdio",command,args,enventries) and TOML (toml_edit::DocumentMuttable and inline-table shapes, NUL checks,enventries) without executing any configured command, writing any files, making network calls, or leaking secrets from config values orPROOFLINE_TOKEN.Cli::resolve_environment()insrc/main.rs(and idempotently inrun()for library callers viaenv_resolved).agent statusbypasses inherited environment variables and rejects explicit--base-url,--org, and--ca-cert, while all other commands preserve Clap usage-formatted errors and startup behavior.Verification
Ran on
origin/main(f95504f,v0.11.6):cargo fmt --check(exit 0)cargo clippy --locked --all-targets -- -D warnings(exit 0)TMPDIR=/private/tmp cargo test --locked(exit 0: 79 lib tests includingagent::status::tests, 11agent_statusintegration tests, and all existing integration suites; 1hookstest ignored becausepre-commitis not installed)git diff --check(exit 0)Proofline review evaluation
Ran Proofline (
prooflinedev[bot]) on this branch in my fork (vanshksingh/cli_proofline#1).UniqueJsonduplicate-key validation andtype == "stdio"checks ininspect_json, handled broken vs. valid parent directory symlinks ininspect(), addedStampre-verification after canonicalization, guardedrun()for direct library callers while skippingagent statusinresolve_environment(), rejected emptyPROOFLINE_CA_CERT, removed raw-argvagent statusmatching insrc/update.rs, documented exit codes/labels inREADME.md, and hardened the loopbackreviewstest, NUL fixtures (\u0000), and JSON redaction tests.0forUnable to verify:(Status::Unverifiedsuch asCLAUDE_CONFIG_DIR) so scripts do not fail when custom config directories are used; existingLayout::read_fileopen semantics without adding a directlibcdependency; and keeping Rustdoc backticks/<...>inClidoc comments to satisfy-D clippy::doc-markdown.