Skip to content

v1.7.0: Mount composition, MCPMock, A2AMock, VectorMock, services#56

Open
jpr5 wants to merge 8 commits intomainfrom
feat/v1.7.0-subproject1
Open

v1.7.0: Mount composition, MCPMock, A2AMock, VectorMock, services#56
jpr5 wants to merge 8 commits intomainfrom
feat/v1.7.0-subproject1

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented Mar 24, 2026

Summary

v1.7.0 adds mountable protocol mocking, AI service mocking, and supporting infrastructure. Zero new runtime dependencies.

Sub-project 1: Core Infrastructure

  • Mountable composition — multiple protocol handlers on a single server via llmock.mount(path, handler)
  • JSON-RPC 2.0 transport — batch, notifications, error codes, spec-compliant id handling
  • Config loader — start a full multi-mock stack from a single JSON/YAML file
  • Suite runnercreateMockSuite() for one-line multi-mock setup
  • aimock CLIaimock --config config.json with port validation and graceful shutdown
  • Subpath exports@copilotkit/llmock/mcp, ./a2a, ./vector

Sub-project 2: Protocol Mocking

  • MCPMock — Model Context Protocol: tools, resources, prompts with session lifecycle and initialization enforcement
  • A2AMock — Agent-to-Agent: agent cards, message/task pattern matching, SSE streaming with terminal state respect

Sub-project 3: AI Service Mocking

  • VectorMock — Pinecone, Qdrant, ChromaDB compatible endpoints with in-memory vector store
  • Search (Tavily-compatible), Rerank (Cohere v2), Moderation (OpenAI) service handlers

Quality

  • 1,896 tests across 49 files (was ~1,400)
  • Coverage: ≥90% lines, ≥85% branches across all modules
  • Pre-existing modules (bedrock, cohere, ollama, WebSocket, etc.) also brought to ≥85% branches
  • Two full CR rounds (MSAL workflow): module-scoped + cross-cutting + final gate
  • Zero as any in production source

Bug fixes included

  • Server catches unhandled promise rejections on HTTP and WebSocket paths
  • JSON-RPC passes null id for notifications (not fabricated 0)
  • A2A streaming respects terminal states from events
  • Vector journal only records handled requests
  • MCP enforces session initialization before method calls
  • CLI validates port arguments and handles shutdown errors
  • Extracted duplicated readBody/matchesPattern into shared helpers

Test plan

  • pnpm run test — 1,896 tests pass
  • pnpm run lint — clean
  • pnpm run format:check — clean
  • pnpm run build — clean (175 files, 973 kB)
  • Coverage thresholds enforced (90/85/90)

🤖 Generated with Claude Code

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

npm i https://pkg.pr.new/CopilotKit/llmock/@copilotkit/llmock@56

commit: 8346ba6

jpr5 added 7 commits March 23, 2026 23:02
…g, CLI

Mountable interface for composing protocol handlers on a single server.
JSON-RPC 2.0 transport with batch, notifications (null id), error codes.
Config loader for multi-mock YAML/JSON configuration files.
Suite runner for one-line multi-mock setup with reset delegation.
aimock CLI with port validation, graceful shutdown, dependency injection.
Late-mount wiring for journal and baseUrl on already-running servers.
Server catches unhandled rejections on HTTP and WebSocket paths.
Extracted readBody and matchesPattern into shared helpers.
Tools, resources, and prompts with JSON-RPC dispatch. Session lifecycle
with initialize/notifications/initialized handshake and enforcement.
Standalone and mounted operation modes. inputSchema typed as
Record<string, unknown>. Subpath export at ./mcp.
Agent cards, message/task pattern matching, SSE streaming responses.
Streaming respects terminal states (COMPLETED/FAILED/CANCELED).
Types use proper unions (A2ATaskState, A2ARole). Standalone and
mounted modes. Subpath export at ./a2a.
In-memory vector store with upsert, query, delete, list, fetch, describe.
Three vendor-compatible endpoint sets. Auto-collection creation on upsert.
Conditional journaling (only handled requests). Custom query handlers.
Standalone and mounted modes. Subpath export at ./vector.
Tavily-compatible search, Cohere v2 rerank, OpenAI moderation endpoints.
Pattern matching with case-insensitive string and regex support.
Journal integration with service tags.
Expand tests for bedrock, bedrock-converse, cohere, ollama, responses,
messages, embeddings, gemini, ws-framing, ws-realtime, ws-gemini-live,
and recorder to meet >= 85% branch coverage threshold.
Add mcp-mock.html, a2a-mock.html, vector-mock.html, services.html,
aimock-cli.html, mount.html. Restructure docs site for use-case-first
navigation. Update all existing pages and README.
@jpr5 jpr5 force-pushed the feat/v1.7.0-subproject1 branch from 2ddbb64 to 5f3d5a8 Compare March 24, 2026 06:05
@jpr5 jpr5 changed the title v1.7.0: Mount Composition, MCPMock, A2AMock, VectorMock, Search, Rerank, Moderation v1.7.0: Mount composition, MCPMock, A2AMock, VectorMock, services Mar 24, 2026
Add ./mcp, ./a2a, ./vector subpath exports and aimock bin entry.
Add new entry points to tsdown config. Configure vitest coverage-v8
with 90/85/90 thresholds. Add coverage/ to ignore files.
@jpr5 jpr5 force-pushed the feat/v1.7.0-subproject1 branch from 5f3d5a8 to 8346ba6 Compare March 24, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant