feat(diagnostics): get_vaultpilot_config_status — read-only config snapshot - #148
Merged
Conversation
…apshot
Item 2.1 (server-side half) from claude-work/HIGH-plan-broad-audience-
onboarding.md. Ships the diagnostic tool the future agent-guided
/setup skill (separate repo) will call to know what the user's
already configured. Independently useful for triage today: "is my
config the way I think it is?"
## What ships
New tool `get_vaultpilot_config_status` registered in `src/index.ts`
and backed by `src/modules/diagnostics/index.ts`. Read-only, pure
local I/O — reads `~/.vaultpilot-mcp/config.json` and inspects
`process.env`. No RPC calls, no network.
## Output shape (every field is non-secret)
- `configPath` + `configFileExists` + `serverVersion`.
- `rpc.<chain>.source` per EVM chain — one of `env-var` /
`provider-key-env` / `provider-key-config` / `custom-url-config` /
`public-fallback`. Mirrors the priority order in
`src/config/chains.ts:resolveRpcUrlRaw` so the diagnostic answer
matches what the resolver actually produces.
- `rpc.solana.source` — `env-var` / `config-url` / `public-fallback`.
- `apiKeys.{etherscan,oneInch,tronGrid,walletConnectProjectId}` —
`{ set: boolean, source: "env-var" | "config" | "unset" }`.
- `pairings.solana.count`, `pairings.tron.count` — integer counts
(never the addresses).
- `pairings.walletConnect.sessionTopicSuffix` — last 8 chars only,
matching the existing `get_ledger_status` convention. Full topic
is never returned.
- `preflightSkill.{expectedPath, installed}` — boolean install state
+ the marker path we checked (respects
`VAULTPILOT_SKILL_MARKER_PATH` override).
## Strict no-secrets contract
The output deliberately surfaces only booleans, counts, source-
classification enums, and a session-topic suffix. Test
`never echoes any planted secret value anywhere in the output`
plants seven distinct secrets across env vars + config and asserts
none of them appear in the serialized response.
## Tests
`test/diagnostics-config-status.test.ts` — 18 cases covering:
- Five EVM RPC source-classification branches per chain.
- Three Solana RPC source-classification branches.
- API-key env-vs-config priority.
- WC session-topic suffix extraction (full topic must NOT leak).
- Pairings count from persisted config.
- Preflight-skill detection + `VAULTPILOT_SKILL_MARKER_PATH` override.
- The strict no-secrets sweep.
## Verification
- `npm test` — 848/848 pass (+18 new diagnostics tests).
- `npm run build` — clean TS.
- README "Tools" section gains the new tool with a short summary +
the no-secrets-contract note.
## Deferred
Agent-guided `/setup` slash command (the SKILL side of item 2.1) is
a separate external repo (`vaultpilot-setup-skill`) — out of scope
for this PR. This tool is the contract the skill will call against.
Co-Authored-By: Claude Opus 4.7 <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.
Summary
Item 2.1 (server-side half) from
claude-work/HIGH-plan-broad-audience-onboarding.md. Ships the diagnostic tool the future agent-guided/setupskill will call to know what the user's already configured. Independently useful for triage today.Branched directly off latest
main(post-#147 + #145).What ships
New tool
get_vaultpilot_config_statusregistered insrc/index.tsand backed bysrc/modules/diagnostics/index.ts. Read-only, pure local I/O — reads~/.vaultpilot-mcp/config.jsonand inspectsprocess.env. No RPC calls, no network.Output shape (every field is non-secret)
configPath+configFileExists+serverVersionrpc.<chain>.source(EVM, per chain)env-var|provider-key-env|provider-key-config|custom-url-config|public-fallbackrpc.solana.sourceenv-var|config-url|public-fallbackapiKeys.{etherscan,oneInch,tronGrid,walletConnectProjectId}{ set: boolean, source: "env-var" | "config" | "unset" }pairings.{solana,tron}.countpairings.walletConnect.sessionTopicSuffixget_ledger_statusconventionpreflightSkill.{expectedPath, installed}VAULTPILOT_SKILL_MARKER_PATHoverrideStrict no-secrets contract
The output is booleans, counts, source-classification enums, and an 8-char topic suffix. Never raw API keys, RPC URLs, or session topics. A dedicated test plants seven distinct secrets across env vars + config and asserts none appear in the serialized response.
Test plan
npm test— 848/848 pass (+18 new diagnostics tests).npm run build— clean.Deferred
The agent-guided
/setupslash command (the SKILL side of item 2.1) is a separate external repo (vaultpilot-setup-skill) — out of scope. This tool is the contract the skill will call against.🤖 Generated with Claude Code