Enable thv vmcp commands and add local vMCP architecture docs#5001
Conversation
Remove Hidden: true from the vmcp Cobra command so that thv vmcp serve/validate/init appear in thv --help output. Add two new architecture documents: - docs/arch/vmcp-local.md: CLI surface, optimizer tier table, TEI container lifecycle, and migration guide from mcp-optimizer - docs/arch/vmcp-library.md: pkg/vmcp/ stability table, doc.go annotation convention, and downstream embedder guidance Update docs/arch/10-virtual-mcp-architecture.md with a Local CLI Mode section and cross-references to the new docs. Update docs/arch/README.md to list the two new documents (items 11–12). Closes #4890 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR makes the thv vmcp subcommands visible in thv --help and adds/updates architecture documentation describing local vMCP CLI mode and the pkg/vmcp/ embedding story.
Changes:
- Unhide the
vmcpCobra command sothv vmcp serve/validate/initshow up in help output. - Add new architecture docs for local vMCP CLI mode and for embedding
pkg/vmcp/as a library. - Update existing vMCP architecture docs and the architecture README index to cross-reference the new docs.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/arch/vmcp-local.md | New doc describing local thv vmcp CLI mode, optimizer tiers, and TEI container lifecycle. |
| docs/arch/vmcp-library.md | New doc describing downstream embedding pattern and intended package stability guidance. |
| docs/arch/README.md | Adds the two new docs to the architecture documentation index. |
| docs/arch/10-virtual-mcp-architecture.md | Adds “Local CLI Mode” section and links to the new docs. |
| cmd/thv/app/vmcp.go | Removes Hidden: true from the vmcp Cobra command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5001 +/- ##
==========================================
- Coverage 68.99% 68.99% -0.01%
==========================================
Files 554 554
Lines 73056 73056
==========================================
- Hits 50408 50403 -5
- Misses 19644 19650 +6
+ Partials 3004 3003 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The previous wording implied --host was ignored in quick mode. The actual behaviour (validateQuickModeHost) accepts any loopback address including "localhost" and ::1, not just 127.0.0.1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix quick mode host validation wording: --host is honoured but validateQuickModeHost rejects non-loopback addresses (localhost, ::1 and any IsLoopback() IP are accepted, not just 127.0.0.1) - Fix function reference: buildConfigFromGroup -> generateQuickModeConfig - Fix TEI polling budget claim: pollHealth has no built-in deadline, polls until context is cancelled - Clarify TEI ownership/reuse semantics: started flag only set when vMCP deploys the container; Stop() is a no-op in the reuse case - Fix intra-doc anchor: #migration-from-stackloklabsmcp-optimizer - Fix server.New signature and Stop(ctx) in embedder steps - Replace fabricated doc.go stability annotation section with accurate note that no in-source annotations exist today - Fix TEI diagram: Start(ctx) not Start(ctx, model, image); add alt/else for Stop to show no-op path on reuse - Remove session from embedder import example (wired internally) - Update README item 12 bullet to match renamed section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Remove Hidden: true from the vmcp Cobra command so that thv vmcp serve/validate/init appear in thv --help output.
Add two new architecture documents:
Update docs/arch/10-virtual-mcp-architecture.md with a Local CLI Mode section and cross-references to the new docs.
Update docs/arch/README.md to list the two new documents (items 11–12).
Fixes #4890
Type of change
Test plan
task test)task test-e2e)task lint-fix)API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Changes
Does this introduce a user-facing change?
Implementation plan
Approved implementation plan
Special notes for reviewers