Skip to content

Phase 2; MCP operations support#4

Merged
livelifelively merged 39 commits intomasterfrom
phase-2-tests
Jan 15, 2026
Merged

Phase 2; MCP operations support#4
livelifelively merged 39 commits intomasterfrom
phase-2-tests

Conversation

@livelifelively
Copy link
Copy Markdown
Contributor

No description provided.

- Add test for isError:true → status:error mapping (failingTool)
- Add test for mixed content types (text, image, resource_link)
- Add test for timestamp validation (startedAt, completedAt bounds)

These tests complete the integration test coverage for Task 02
(Basic Execution) by exercising the existing fixtures that were
previously untested.
Task 03: Progress Tracking

- Implement ToolOperationStore.updateProgress() to store progress on operations
- Implement full ProgressTracker class with token generation, registration,
  notification handling, and cleanup
- Update callTool() to support options.includeProgress with progress token
- Add McpProgressNotificationSchema with method literal for SDK compatibility
- Set up client.setNotificationHandler() in connect() for progress notifications
- Update tracker.test.ts for proper unit testing without store dependency
- Update progress-tracking.test.ts with notification handler setup

All 22 tests pass.
- ToolCallRequestSchema validation tests
- ToolCallResultSchema validation tests
- ToolContentSchema discriminated union tests
- AnnotationsSchema tests

Per spec: 02-basic-execution.md
- Remove misplaced getProgress test from tracker.test.ts (belongs on Store)
- Fix result.progress → result.progressUpdates in progress-tracking.test.ts
- Update markCancelled test to expect silent ignore (design decision)
- Add non-null assertions for TS strict mode

Per specs: 03-progress-tracking.md, 04-cancellation.md
Per feedback: verify store state is unchanged, not just no crash
- Add src/types/content.test.ts for schema validation
- Update src/content/parser.test.ts with validation tests
- Note: 2 mime type validation tests skipped (pending implementation fixes)
- Add parseAudio to ContentParser

- Enforce strict MIME type validation

- Extract content types to src/types/content.ts
- Unskip mime type validation tests in parser.test.ts (implementation available)
- Update src/types/tool.test.ts imports to use src/types/content
- Add src/types/content.test.ts for schema validation
Parse and validate result.content via ContentParser before storing.
Adds skipped tests that will fail until contentParser is integrated into callTool():
- getInvalidAudioMime/getInvalidImageMime mock tools return invalid MIME types
- getInvalidStructuredOutput returns data that fails schema validation
- Tests document expected behavior when parser is integrated

Per review feedback: parser exists but is not called in manager.ts
Added outputSchema to CallToolOptions and validate structuredContent against schema.
- Unskip MIME type validation tests (now passing)
- Unskip structured output validation test (now passing)
- Update test to pass outputSchema option to callTool()

All 11 content parsing tests now pass.
@livelifelively livelifelively merged commit 6dbc6c8 into master Jan 15, 2026
1 of 3 checks passed
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