Skip to content

Enable thv vmcp commands and add local vMCP architecture docs#5001

Merged
yrobla merged 5 commits into
mainfrom
issue-4890
Apr 22, 2026
Merged

Enable thv vmcp commands and add local vMCP architecture docs#5001
yrobla merged 5 commits into
mainfrom
issue-4890

Conversation

@yrobla
Copy link
Copy Markdown
Contributor

@yrobla yrobla commented Apr 22, 2026

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:

  • 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).

Fixes #4890

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

API Compatibility

  • This PR does not break the v1beta1 API, OR the api-break-allowed label is applied and the migration guidance is described above.

Changes

File Change

Does this introduce a user-facing change?

Implementation plan

Approved implementation plan

Special notes for reviewers

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>
@github-actions github-actions Bot added the size/M Medium PR: 300-599 lines changed label Apr 22, 2026
@yrobla yrobla requested a review from Copilot April 22, 2026 09:31
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added size/L Large PR: 600-999 lines changed and removed size/M Medium PR: 300-599 lines changed labels Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 vmcp Cobra command so thv vmcp serve/validate/init show 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.

Comment thread docs/arch/vmcp-local.md Outdated
Comment thread docs/arch/vmcp-local.md Outdated
Comment thread docs/arch/vmcp-local.md Outdated
Comment thread docs/arch/vmcp-local.md Outdated
Comment thread docs/arch/vmcp-local.md Outdated
Comment thread docs/arch/10-virtual-mcp-architecture.md Outdated
Comment thread docs/arch/vmcp-library.md Outdated
Comment thread docs/arch/vmcp-library.md
Comment thread docs/arch/vmcp-library.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.99%. Comparing base (c3a640b) to head (15147cc).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@github-actions github-actions Bot added size/L Large PR: 600-999 lines changed and removed size/L Large PR: 600-999 lines changed labels Apr 22, 2026
- 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>
@github-actions github-actions Bot added size/L Large PR: 600-999 lines changed and removed size/L Large PR: 600-999 lines changed labels Apr 22, 2026
@yrobla yrobla requested a review from Copilot April 22, 2026 09:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/arch/README.md
Comment thread docs/arch/vmcp-library.md
Comment thread docs/arch/vmcp-library.md
@github-actions github-actions Bot added size/L Large PR: 600-999 lines changed and removed size/L Large PR: 600-999 lines changed labels Apr 22, 2026
@yrobla yrobla merged commit 1fc17ea into main Apr 22, 2026
18 checks passed
@yrobla yrobla deleted the issue-4890 branch April 22, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Large PR: 600-999 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Architecture documentation for local vMCP

4 participants