feat(wiki): consolidate 5 wiki tools into 2 CQRS tools#36
Merged
Conversation
- browse_wiki (Query): list, get actions - manage_wiki (Command): create, update, delete actions Uses flat z.object() with .refine() pattern for Claude API compatibility. Removes legacy schemas in favor of CQRS-aligned consolidated tools. Closes #10
📊 Test Coverage ReportOverall Coverage: 86.53% Coverage Details
Coverage Report: View detailed coverage report
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR consolidates 5 wiki tools into 2 CQRS-aligned tools to address Issue #10, improving tool organization and reducing tool count while maintaining full functionality.
Changes:
- Replaced 5 individual wiki tools with 2 CQRS tools using action-based routing
- Implemented flat schema pattern with
.refine()for Claude API compatibility (avoidingoneOf/allOf/anyOfat root level) - Updated comprehensive test suite with 47+ unit tests and integration tests
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/entities/wiki/schema-readonly.ts | Defines BrowseWikiSchema with "list" and "get" actions for read-only operations |
| src/entities/wiki/schema.ts | Defines ManageWikiSchema with "create", "update", and "delete" actions for write operations |
| src/entities/wiki/registry.ts | Implements 2 CQRS tool handlers with action routing, replaces 5 individual tool handlers |
| tests/unit/entities/wiki/registry.test.ts | Updates unit tests for CQRS tools with comprehensive coverage of all actions and error cases |
| tests/integration/schemas/wiki.test.ts | Updates integration tests for new tool names and validates all action types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Consolidates 5 wiki tools into 2 CQRS-aligned tools per Issue #10:
list,getactionscreate,update,deleteactionsChanges
schema-readonly.tswithBrowseWikiSchemausing flat object pattern with.refine()schema.tswithManageWikiSchemausing flat object pattern with.refine()registry.tswith 2 consolidated CQRS handlersTechnical Details
Uses flat
z.object()with.refine()instead ofz.discriminatedUnion()for Claude API compatibility (nooneOf/allOf/anyOfat JSON Schema root level).Test plan
Closes #10