Skip to content

feat(tiers): add action-level tier requirements for consolidated tools#77

Merged
polaz merged 3 commits intomainfrom
feat/48-cqrs-tier-requirements
Jan 21, 2026
Merged

feat(tiers): add action-level tier requirements for consolidated tools#77
polaz merged 3 commits intomainfrom
feat/48-cqrs-tier-requirements

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 20, 2026

Summary

  • Add action-level tier requirements mapping for all consolidated tools
  • Display tier information per action in --export documentation
  • Support action-specific tier lookups for runtime availability checks

Features

Action-Level Tier Requirements

Each consolidated tool now has tier requirements defined at the action level:

manage_merge_request: {
  default: { tier: "free", minVersion: 8.0 },
},
browse_milestones: {
  default: { tier: "free", minVersion: 8.0 },
  actions: {
    burndown: { tier: "premium", minVersion: 12.0, notes: "Burndown charts" },
  },
},

New API Methods

  • getActionRequirement(toolName, action?) - Get tier requirement for specific action
  • getHighestTier(toolName) - Get highest tier required by any action
  • getTierRestrictedActions(toolName, tier) - List actions requiring premium/ultimate

Export Documentation

Actions table now includes Tier column:

| Action | Tier | Description |
|--------|------|-------------|
| `list` | Free | List items |
| `burndown` | Premium | Get burndown chart data |

Test plan

  • All 2262 unit tests pass
  • Lint and build pass
  • Verified tier badges show correctly in --export output
  • Updated list-tools tests for new tier functionality

Closes #48

Add action-level tier requirements mapping:
- Add ToolActionRequirements interface for action-specific tiers
- Add actionRequirements map with all consolidated tools
- Add getActionRequirement() for action-specific tier lookups
- Add getHighestTier() to get max tier for any tool action
- Add getTierRestrictedActions() to list premium/ultimate actions
- Update getToolRequirement() to support action parameter
- Update isToolAvailable() to check action-specific tiers
- Update getToolTierInfo() in list-tools.ts for action tiers
- Add Tier column to actions table in --export output
- Update tests for new tier functionality

Closes #48
Copilot AI review requested due to automatic review settings January 20, 2026 21:34
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 86.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cli/list-tools.ts 62.50% 3 Missing and 3 partials ⚠️
src/services/ToolAvailability.ts 97.05% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 20, 2026

📊 Test Coverage Report

Overall Coverage: 89.6%

Coverage Details

Metric Percentage
Statements 89.6%
Branches 82.46%
Functions 77.32%
Lines 90.05%

Coverage Report: View detailed coverage report

This report was generated automatically from your PR changes.

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 adds action-level tier requirements for consolidated tools in the GitLab MCP server, enabling more granular tier tracking per action. The changes support displaying tier information for individual actions in exported documentation and enable runtime availability checks based on action-specific requirements.

Changes:

  • Added action-level tier requirement data structures and methods (getActionRequirement, getHighestTier, getTierRestrictedActions)
  • Updated --export mode to display tier information in the Actions table
  • Modified tier display logic to show asterisk for tools with mixed-tier actions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/services/ToolAvailability.ts Adds new interfaces (ActionRequirement, ToolActionRequirements), comprehensive action-level tier mapping for 30+ tools, and new methods for querying tier requirements at action and tool levels
src/cli/list-tools.ts Updates getToolTierInfo to support action-specific tier lookups and modifies export markdown generation to include tier column in actions table
tests/unit/cli/list-tools.test.ts Updates test mocks to support new ToolAvailability methods and adjusts test expectations for new Tier column in actions table

…el tests

- Use replaceAll for complete bracket removal in tier display
- Fix mixed tier detection to compare default vs highest tier
- Add tests for getActionRequirement, getHighestTier, getTierRestrictedActions
- Add tests for isToolAvailable with action parameter
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@polaz polaz requested a review from Copilot January 20, 2026 23:27
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

- Extract TIER_ORDER constant to avoid duplication in tier comparison methods
- Fix getAvailableTools to include tools from both legacy and action requirements
- Add JSDoc documenting asterisk notation for mixed tiers in getTierBadge
- Replace replaceAll with regex replace for broader Node.js compatibility
- Add tests for getToolRequirement with action parameter
- Add tests for isToolAvailable version checking with actions
- Add tests for getAvailableTools combining both requirement sources
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

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

@polaz polaz merged commit 8e5ae0e into main Jan 21, 2026
20 checks passed
@polaz polaz deleted the feat/48-cqrs-tier-requirements branch January 21, 2026 07:21
sw-release-bot bot pushed a commit that referenced this pull request Jan 21, 2026
## [6.18.0](v6.17.0...v6.18.0) (2026-01-21)

### Features

* **errors:** add structured error handling with tier awareness ([#75](#75)) ([2b5088c](2b5088c)), closes [#50](#50) [#50](#50)
* **mrs:** implement GitLab Suggestions API integration ([#70](#70)) ([b9ca090](b9ca090)), closes [#66](#66)
* **tiers:** add action-level tier requirements for consolidated tools ([#77](#77)) ([8e5ae0e](8e5ae0e)), closes [#48](#48)
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.

Add tier requirements for CQRS tools

3 participants