feat(cli): pakx list, doctor, search#2
Merged
Conversation
- pakx-core: new lockfile::io with read_from (returns Option<Lockfile> so callers can distinguish missing vs corrupt) and write_to. Exported as read_lockfile_from / write_lockfile_to. - pakx list [-C dir] [--no-check] [--claude-home DIR]: prints each lockfile entry. With cross-check enabled (default), tags entries with [ok] when adapter.list() confirms presence or [drift] otherwise. - pakx doctor [-C dir] [--claude-home DIR]: 5-section health check — manifest, lockfile, manifest-hash drift, adapter detection vs agents: whitelist, on-disk vs lockfile drift. Exits non-zero on warn/fail. - pakx search <query> [-n LIMIT] [--mcp-base-url URL]: fans out via RegistryClient (currently only OfficialMcpSource) and prints source / name / version / description rows. - main.rs: wire all three new subcommands. - Tests: 3 list, 3 doctor, 3 search integration tests with wiremock + temp tree. Workspace test count rises to ~117. Smithery and GitHub-raw skill sources still pending — that wiring will land alongside `pakx publish` in the SaaS-layer build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
arwenizEr
added a commit
that referenced
this pull request
May 21, 2026
Same-named query against two different registry deployments was mapping to the same on-disk cache file, returning the stale earlier response. Reproduced on ubuntu CI in the federated search test: test #1 cached `acme/one`+`acme/two` for the OfficialMcpSource at mock-url-A; test #2 set up mock-url-B serving different content, but the empty-query cache key `official-mcp:search:` collided and the later test read the earlier mock's body. Cache key is now `{tag}@{base_url}:search:{query}` (and equivalent for fetch). Different registries can no longer collide. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arwenizEr
added a commit
that referenced
this pull request
May 21, 2026
* feat(registry-client): add Smithery source (search-only at v0.1) - SmitherySource against registry.smithery.ai (configurable base URL, TTL-cached like OfficialMcpSource). Returns Package rows from /servers with qualifiedName as canonical id, displayName as name, description, and full extra JSON in install_hints. - fetch() returns NotFound at v0.1 since Smithery's connection / config schema differs from the official MCP Registry's packages[] shape; install via Smithery lands in Phase A v2 once the translator grows a Smithery codepath. - pakx search now defaults to fanning out to both OfficialMcp + Smithery (parallel via RegistryClient::search). Flags: --smithery-base-url URL (hidden, testing); --no-smithery (opt out). - 5 new wiremock-backed source tests + 1 new end-to-end federated search test covering both sources. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(registry-client): include base URL in cache key Same-named query against two different registry deployments was mapping to the same on-disk cache file, returning the stale earlier response. Reproduced on ubuntu CI in the federated search test: test #1 cached `acme/one`+`acme/two` for the OfficialMcpSource at mock-url-A; test #2 set up mock-url-B serving different content, but the empty-query cache key `official-mcp:search:` collided and the later test read the earlier mock's body. Cache key is now `{tag}@{base_url}:search:{query}` (and equivalent for fetch). Different registries can no longer collide. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <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
Three new subcommands round out the v0.1 read-side of the CLI.
pakx list— readagents.lock, optionally cross-check againstAdapter::list(), print[ok]/[drift]status per entry.pakx doctor— 5-section health check: manifest parses → lockfile parses → manifest hash matches lockfile (drift) → adapter detection +agents:whitelist consistency → on-disk state vs lockfile.pakx search <query>— fan out viaRegistryClientand print source / name / version / description rows. Currently only the OfficialMcpSource is wired; Smithery / Glama / GitHub-raw land alongsidepakx publish.Plus:
pakx-core::lockfile::io(read_fromreturnsOption<Lockfile>so callers can distinguish missing vs corrupt;write_towrites the canonical form).Test plan
🤖 Generated with Claude Code