v1.7.0: Mount composition, MCPMock, A2AMock, VectorMock, services#56
Open
v1.7.0: Mount composition, MCPMock, A2AMock, VectorMock, services#56
Conversation
commit: |
2ddbb64 to
5f3d5a8
Compare
5f3d5a8 to
8346ba6
Compare
…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.
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.
8346ba6 to
b65fad0
Compare
- Logger prefix: [llmock] → [aimock] - CLI startup: "llmock server listening" → "aimock server listening" - Chaos headers: x-llmock-chaos-* → x-aimock-chaos-* - Models endpoint: owned_by "llmock" → "aimock" - All tests updated to match
- aimock_requests_total, aimock_request_duration_seconds, etc.
- aimock_mcp_requests_total{method} for JSON-RPC methods
- aimock_a2a_requests_total{method} for A2A operations
- aimock_vector_requests_total{operation,provider} for vector DB ops
- Mountable interface gains optional setRegistry() method
- 12 new tests for service metrics
POST /__aimock/fixtures, DELETE /__aimock/fixtures, POST /__aimock/reset, GET /__aimock/journal, POST /__aimock/error, GET /__aimock/health. Foundation for aimock-pytest pip package. LLMock gains addFixturesFromJSON() method. entryToFixture() exported from fixture-loader for reuse. 12 tests.
fix-drift.ts now includes write-fixtures skill in remediation PRs. BUILDER_TO_SKILL_SECTION maps source files to skill doc sections. affectedSkillSections() identifies which sections need review. 35 new tests.
- Treatment 3 Progressive Disclosure homepage with animated terminal demo - Docs overview with section bar (LLM, MCP, A2A, Vector, Search, Chaos) - sidebar.js: single source of truth for navigation across 30+ pages - cli-tabs.js: CLI/Docker tab switching with localStorage persistence - All page titles, nav, footer, prose, imports, Docker refs → aimock - Font ligatures disabled, sticky table header, Record & Replay elevated - "Ready to switch?" and "Built for production" sections
- migrate-from-msw.html: streaming comparison, side-by-side usage - migrate-from-vidaimock.html: binary → programmatic API - migrate-from-mock-llm.html: OpenAI-only → multi-provider, Helm migration - migrate-from-piyook.html: JSON templates → declarative fixtures - migrate-from-python-mocks.html: Docker + npx paths, validated examples - migrate-from-mokksy.html: JVM/Kotlin with TestContainers integration - docs-overview.html: suite overview with section cards
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
v1.7.0 adds mountable protocol mocking, AI service mocking, and supporting infrastructure. Zero new runtime dependencies.
Sub-project 1: Core Infrastructure
llmock.mount(path, handler)createMockSuite()for one-line multi-mock setupaimock --config config.jsonwith port validation and graceful shutdown@copilotkit/llmock/mcp,./a2a,./vectorSub-project 2: Protocol Mocking
Sub-project 3: AI Service Mocking
Quality
as anyin production sourceBug fixes included
readBody/matchesPatterninto shared helpersTest plan
pnpm run test— 1,896 tests passpnpm run lint— cleanpnpm run format:check— cleanpnpm run build— clean (175 files, 973 kB)🤖 Generated with Claude Code