Skip to content

refactor(read-only): move read-only actions from manage_* to browse_* tools#142

Merged
polaz merged 1 commit intomainfrom
feat/#134-refactorread-only-move-read-only-actions-from-mana
Jan 23, 2026
Merged

refactor(read-only): move read-only actions from manage_* to browse_* tools#142
polaz merged 1 commit intomainfrom
feat/#134-refactorread-only-move-read-only-actions-from-mana

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 23, 2026

Summary

  • Move manage_webhook action readbrowse_webhooks action get
  • Move manage_integration action getbrowse_integrations action get
  • Rename list_webhooksbrowse_webhooks, list_integrationsbrowse_integrations for consistency with existing browse_* naming convention
  • browse_* tools now use discriminated union schemas (list + get actions)
  • manage_* tools only contain write operations, simplifying read-only mode filtering
  • manage_context kept as-is (session-only state, no GitLab writes)

Closes #134

Test plan

  • All 3478 unit tests pass
  • Lint passes with 0 errors
  • TypeScript build succeeds
  • Integration test schemas updated for new tool names and action structure

… tools

Move read-only actions to dedicated CQRS Query tools for clean separation:
- manage_webhook `read` action → browse_webhooks `get` action
- manage_integration `get` action → browse_integrations `get` action
- Rename list_webhooks → browse_webhooks, list_integrations → browse_integrations
- browse_* tools now use discriminated union schemas with list/get actions
- manage_* tools only contain write operations (create/update/delete/test)
- Read-only mode filtering simplified: only browse_* tools exposed

Closes #134
Copilot AI review requested due to automatic review settings January 23, 2026 14:03
@github-actions
Copy link
Copy Markdown

📊 Test Coverage Report

Overall Coverage: 91.51%

Coverage Details

Metric Percentage
Statements 91.51%
Branches 83.43%
Functions 81.07%
Lines 91.92%

Coverage Report: View detailed coverage report

This report was generated automatically from your PR changes.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/entities/integrations/registry.ts 77.77% 1 Missing and 1 partial ⚠️
src/entities/webhooks/registry.ts 88.23% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

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 refactors read-only actions from manage_* tools to browse_* tools for clean CQRS separation. The changes rename tools (list_webhooksbrowse_webhooks, list_integrationsbrowse_integrations) and move read-only actions (manage_webhook action readbrowse_webhooks action get, manage_integration action getbrowse_integrations action get). Both browse tools now use discriminated union schemas with list and get actions, while manage tools contain only write operations (create, update, delete, test for webhooks; update, disable for integrations).

Changes:

  • Webhooks and integrations schemas refactored to move read actions to browse_* tools
  • Tool names updated throughout codebase (registry, tests, error handlers, CLI tools)
  • Read-only mode filtering simplified - only browse_* tools are exposed in read-only mode
  • Discriminated union schemas now use action as discriminator instead of scope

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/entities/webhooks/schema.ts Removed read action from ManageWebhookSchema
src/entities/webhooks/schema-readonly.ts Converted to BrowseWebhooksSchema with list and get actions
src/entities/webhooks/registry.ts Renamed tool, moved read handler to browse_webhooks as get, updated read-only filtering
src/entities/webhooks/index.ts Removed backward compatibility exports
src/entities/integrations/schema.ts Removed get action from ManageIntegrationSchema
src/entities/integrations/schema-readonly.ts Converted to BrowseIntegrationsSchema with list and get actions
src/entities/integrations/registry.ts Renamed tool, moved get handler to browse_integrations, updated read-only filtering
src/entities/integrations/index.ts Removed backward compatibility exports
src/utils/error-handler.ts Updated tool name from list_webhooks to browse_webhooks
src/services/ToolAvailability.ts Updated tool names in availability configurations
src/cli/list-tools.ts Updated tool names in CLI entity and feature mappings
tests/unit/entities/webhooks/registry.test.ts Updated all test tool names and removed obsolete read-only mode tests
tests/unit/entities/integrations/registry.test.ts Updated all test tool names and removed obsolete read-only mode tests
tests/unit/entities/webhooks/schema.test.ts Test files not in diff
tests/unit/entities/integrations/schema.test.ts Updated tests to reflect removal of get action
tests/unit/entities/integrations/schema-readonly.test.ts Converted to test BrowseIntegrationsSchema with list and get actions
tests/unit/utils/error-handler.test.ts Updated tool name reference
tests/integration/schemas/webhooks.test.ts Updated to use browse_webhooks for get action
tests/integration/schemas/integrations.test.ts Updated to use browse_integrations for get action

@polaz polaz merged commit 0c325e2 into main Jan 23, 2026
26 checks passed
@polaz polaz deleted the feat/#134-refactorread-only-move-read-only-actions-from-mana branch January 23, 2026 14:08
sw-release-bot bot pushed a commit that referenced this pull request Jan 23, 2026
## [6.30.1](v6.30.0...v6.30.1) (2026-01-23)

### Refactoring

* **read-only:** move read-only actions from manage_* to browse_* tools ([#142](#142)) ([0c325e2](0c325e2)), closes [#134](#134)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.30.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(read-only): move read-only actions from manage_* to browse_* tools

2 participants