@azerate/claudette-mcp 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +214 -214
- package/dist/index.js +38 -21
- package/package.json +39 -39
package/README.md
CHANGED
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
# Claudette MCP Server
|
|
2
|
-
|
|
3
|
-
MCP server for Claudette IDE - providing Claude with comprehensive workspace management tools.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx @azerate/claudette-mcp
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or install globally:
|
|
12
|
-
```bash
|
|
13
|
-
npm install -g @azerate/claudette-mcp
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Setup
|
|
17
|
-
|
|
18
|
-
### Option 1: Add via Claude Code CLI
|
|
19
|
-
```bash
|
|
20
|
-
claude mcp add claudette -- npx @azerate/claudette-mcp
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Option 2: Add to .mcp.json (project-level)
|
|
24
|
-
Create `.mcp.json` in your project root:
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"mcpServers": {
|
|
28
|
-
"claudette": {
|
|
29
|
-
"type": "stdio",
|
|
30
|
-
"command": "npx",
|
|
31
|
-
"args": ["@azerate/claudette-mcp"]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Option 3: Add to Claude Code settings
|
|
38
|
-
Add to `~/.claude.json`:
|
|
39
|
-
```json
|
|
40
|
-
"mcpServers": {
|
|
41
|
-
"claudette": {
|
|
42
|
-
"type": "stdio",
|
|
43
|
-
"command": "npx",
|
|
44
|
-
"args": ["@azerate/claudette-mcp"]
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Available Tools
|
|
50
|
-
|
|
51
|
-
### Code Quality
|
|
52
|
-
|
|
53
|
-
| Tool | Description |
|
|
54
|
-
|------|-------------|
|
|
55
|
-
| `get_errors` | Get TypeScript compilation errors for the workspace |
|
|
56
|
-
| `run_tests` | Run Jest tests and return results |
|
|
57
|
-
| `get_test_results` | Get the latest test results |
|
|
58
|
-
| `run_benchmarks` | Run performance benchmarks (tinybench/vitest) |
|
|
59
|
-
| `get_benchmark_results` | Get the latest benchmark results |
|
|
60
|
-
|
|
61
|
-
### Git & Changes
|
|
62
|
-
|
|
63
|
-
| Tool | Description |
|
|
64
|
-
|------|-------------|
|
|
65
|
-
| `get_changes` | Get pending git changes (modified, added, deleted files) |
|
|
66
|
-
| `get_branch_info` | Get current branch, behind/ahead status, sync state |
|
|
67
|
-
| `get_branch_pr_status` | Check if current branch has an open/merged/closed PR |
|
|
68
|
-
| `create_branch` | Create a new feature branch from main/master |
|
|
69
|
-
| `sync_branch` | Rebase or merge current branch with main |
|
|
70
|
-
| `get_checkpoints` | List saved checkpoints (git stash snapshots) |
|
|
71
|
-
| `create_checkpoint` | Create a checkpoint before risky changes |
|
|
72
|
-
| `restore_checkpoint` | Restore workspace to a previous checkpoint |
|
|
73
|
-
| `delete_checkpoint` | Delete a checkpoint permanently |
|
|
74
|
-
|
|
75
|
-
### Workflow Automation
|
|
76
|
-
|
|
77
|
-
| Tool | Description |
|
|
78
|
-
|------|-------------|
|
|
79
|
-
| `get_workflow_status` | Get current workflow pipeline status |
|
|
80
|
-
| `get_workflow_recommendation` | **Smart recommendation** - analyzes branch, PR status, and changes to suggest the best next action |
|
|
81
|
-
| `trigger_workflow` | Start the workflow (lint, types, tests, coverage, benchmarks) |
|
|
82
|
-
| `generate_commit_message` | Generate a commit message from changes |
|
|
83
|
-
| `approve_commit` | Stage and commit with the provided message |
|
|
84
|
-
| `approve_push` | Push committed changes to remote |
|
|
85
|
-
| `approve_write_tests` | Mark the write tests step as complete |
|
|
86
|
-
| `create_pr` | Create a pull request using gh CLI |
|
|
87
|
-
| `approve_code_review` | Mark the code review step as complete |
|
|
88
|
-
|
|
89
|
-
### Project Memory
|
|
90
|
-
|
|
91
|
-
| Tool | Description |
|
|
92
|
-
|------|-------------|
|
|
93
|
-
| `get_memory` | Get project memory notes |
|
|
94
|
-
| `add_memory` | Add a note to project memory |
|
|
95
|
-
| `clear_memory` | Clear all project memory notes |
|
|
96
|
-
| `delete_memory` | Delete specific notes by index |
|
|
97
|
-
| `replace_memory` | Replace all memory with new notes |
|
|
98
|
-
|
|
99
|
-
### Scripts & Automation
|
|
100
|
-
|
|
101
|
-
| Tool | Description |
|
|
102
|
-
|------|-------------|
|
|
103
|
-
| `list_scripts` | List npm scripts and their status |
|
|
104
|
-
| `run_script` | Start an npm script |
|
|
105
|
-
| `stop_script` | Stop a running script |
|
|
106
|
-
| `get_console_output` | Get console output from a script |
|
|
107
|
-
| `check_quick_actions` | Check for pending UI-triggered actions |
|
|
108
|
-
|
|
109
|
-
### Refactoring
|
|
110
|
-
|
|
111
|
-
| Tool | Description |
|
|
112
|
-
|------|-------------|
|
|
113
|
-
| `create_refactor_plan` | Analyze workspace and create refactoring plan |
|
|
114
|
-
| `get_refactor_plan` | Get the current refactor plan |
|
|
115
|
-
| `get_next_refactor_step` | Get the next uncompleted step |
|
|
116
|
-
| `verify_refactor` | Run tests and compare to baseline |
|
|
117
|
-
| `complete_refactor_step` | Mark a step as completed |
|
|
118
|
-
| `complete_refactor` | Finish refactoring and delete plan |
|
|
119
|
-
|
|
120
|
-
## Smart Workflow Recommendations
|
|
121
|
-
|
|
122
|
-
Before starting a workflow, always call `get_workflow_recommendation` to get intelligent guidance:
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
get_workflow_recommendation(workspace_path="/path/to/project")
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
The tool analyzes your current state and recommends the best action:
|
|
129
|
-
|
|
130
|
-
| Recommended Action | When | What to Do |
|
|
131
|
-
|-------------------|------|------------|
|
|
132
|
-
| `start_workflow` | Normal flow, no blockers | Proceed with `trigger_workflow` |
|
|
133
|
-
| `create_feature_branch` | On main with `requireFeatureBranch` enabled | Use `create_branch` first |
|
|
134
|
-
| `add_to_existing_pr` | On feature branch with open PR | Your commits will update the existing PR |
|
|
135
|
-
| `switch_to_main` | PR was merged, branch is stale | Switch to main, pull, create new branch |
|
|
136
|
-
| `create_new_branch` | PR was closed (not merged) | Create a fresh branch or reopen PR |
|
|
137
|
-
| `sync_branch_first` | Branch is >5 commits behind main | Use `sync_branch` before committing |
|
|
138
|
-
| `no_changes` | No uncommitted changes | Nothing to commit yet |
|
|
139
|
-
|
|
140
|
-
Each recommendation includes:
|
|
141
|
-
- **reason**: Why this action is recommended
|
|
142
|
-
- **suggestion**: What you should do (trust this!)
|
|
143
|
-
- **consequences**: What will happen if you proceed
|
|
144
|
-
|
|
145
|
-
## Workflow Pipeline
|
|
146
|
-
|
|
147
|
-
The workflow feature provides a 10-step guided development process with best-practice Git support:
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
trigger_workflow()
|
|
151
|
-
|
|
|
152
|
-
v
|
|
153
|
-
[AUTOMATIC CHECKS]
|
|
154
|
-
1. Type checking (tsc --noEmit)
|
|
155
|
-
2. Lint/Format (eslint --fix)
|
|
156
|
-
3. Run tests
|
|
157
|
-
4. Coverage analysis (files needing tests)
|
|
158
|
-
5. Benchmarks (optional)
|
|
159
|
-
|
|
|
160
|
-
v
|
|
161
|
-
[HUMAN GATES]
|
|
162
|
-
6. Write Tests (if coverage found gaps)
|
|
163
|
-
7. Commit (approve_commit)
|
|
164
|
-
8. Push (approve_push)
|
|
165
|
-
9. Create PR (skipped if on main)
|
|
166
|
-
10. Code Review (approve_code_review)
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Branch Management
|
|
170
|
-
|
|
171
|
-
Best practice: Work on feature branches, not directly on main.
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
# Check current branch status
|
|
175
|
-
get_branch_info(workspace_path="/path/to/project")
|
|
176
|
-
|
|
177
|
-
# Create a feature branch
|
|
178
|
-
create_branch(workspace_path="/path/to/project", branch_name="feature/my-feature")
|
|
179
|
-
|
|
180
|
-
# Sync with latest main (rebase)
|
|
181
|
-
sync_branch(workspace_path="/path/to/project", method="rebase")
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
The workflow enforces feature branch usage by default (`requireFeatureBranch: true`).
|
|
185
|
-
Toggle this in the UI or set in `.claudette/workflow-config.json`.
|
|
186
|
-
|
|
187
|
-
## Example Usage
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
# Check for errors
|
|
191
|
-
get_errors(workspace_path="/path/to/project")
|
|
192
|
-
|
|
193
|
-
# Run full workflow
|
|
194
|
-
trigger_workflow(workspace_path="/path/to/project")
|
|
195
|
-
|
|
196
|
-
# Check workflow status
|
|
197
|
-
get_workflow_status(workspace_path="/path/to/project")
|
|
198
|
-
|
|
199
|
-
# After checks pass, commit
|
|
200
|
-
generate_commit_message(workspace_path="/path/to/project")
|
|
201
|
-
approve_commit(workspace_path="/path/to/project", message="Add new feature")
|
|
202
|
-
|
|
203
|
-
# Push changes
|
|
204
|
-
approve_push(workspace_path="/path/to/project")
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
## Requirements
|
|
208
|
-
|
|
209
|
-
- Node.js 18+
|
|
210
|
-
- Claudette IDE server running on port 52001 (for full functionality)
|
|
211
|
-
|
|
212
|
-
## License
|
|
213
|
-
|
|
214
|
-
MIT
|
|
1
|
+
# Claudette MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server for Claudette IDE - providing Claude with comprehensive workspace management tools.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @azerate/claudette-mcp
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install globally:
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @azerate/claudette-mcp
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
### Option 1: Add via Claude Code CLI
|
|
19
|
+
```bash
|
|
20
|
+
claude mcp add claudette -- npx @azerate/claudette-mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Option 2: Add to .mcp.json (project-level)
|
|
24
|
+
Create `.mcp.json` in your project root:
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"claudette": {
|
|
29
|
+
"type": "stdio",
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["@azerate/claudette-mcp"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Option 3: Add to Claude Code settings
|
|
38
|
+
Add to `~/.claude.json`:
|
|
39
|
+
```json
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"claudette": {
|
|
42
|
+
"type": "stdio",
|
|
43
|
+
"command": "npx",
|
|
44
|
+
"args": ["@azerate/claudette-mcp"]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Available Tools
|
|
50
|
+
|
|
51
|
+
### Code Quality
|
|
52
|
+
|
|
53
|
+
| Tool | Description |
|
|
54
|
+
|------|-------------|
|
|
55
|
+
| `get_errors` | Get TypeScript compilation errors for the workspace |
|
|
56
|
+
| `run_tests` | Run Jest tests and return results |
|
|
57
|
+
| `get_test_results` | Get the latest test results |
|
|
58
|
+
| `run_benchmarks` | Run performance benchmarks (tinybench/vitest) |
|
|
59
|
+
| `get_benchmark_results` | Get the latest benchmark results |
|
|
60
|
+
|
|
61
|
+
### Git & Changes
|
|
62
|
+
|
|
63
|
+
| Tool | Description |
|
|
64
|
+
|------|-------------|
|
|
65
|
+
| `get_changes` | Get pending git changes (modified, added, deleted files) |
|
|
66
|
+
| `get_branch_info` | Get current branch, behind/ahead status, sync state |
|
|
67
|
+
| `get_branch_pr_status` | Check if current branch has an open/merged/closed PR |
|
|
68
|
+
| `create_branch` | Create a new feature branch from main/master |
|
|
69
|
+
| `sync_branch` | Rebase or merge current branch with main |
|
|
70
|
+
| `get_checkpoints` | List saved checkpoints (git stash snapshots) |
|
|
71
|
+
| `create_checkpoint` | Create a checkpoint before risky changes |
|
|
72
|
+
| `restore_checkpoint` | Restore workspace to a previous checkpoint |
|
|
73
|
+
| `delete_checkpoint` | Delete a checkpoint permanently |
|
|
74
|
+
|
|
75
|
+
### Workflow Automation
|
|
76
|
+
|
|
77
|
+
| Tool | Description |
|
|
78
|
+
|------|-------------|
|
|
79
|
+
| `get_workflow_status` | Get current workflow pipeline status |
|
|
80
|
+
| `get_workflow_recommendation` | **Smart recommendation** - analyzes branch, PR status, and changes to suggest the best next action |
|
|
81
|
+
| `trigger_workflow` | Start the workflow (lint, types, tests, coverage, benchmarks) |
|
|
82
|
+
| `generate_commit_message` | Generate a commit message from changes |
|
|
83
|
+
| `approve_commit` | Stage and commit with the provided message |
|
|
84
|
+
| `approve_push` | Push committed changes to remote |
|
|
85
|
+
| `approve_write_tests` | Mark the write tests step as complete |
|
|
86
|
+
| `create_pr` | Create a pull request using gh CLI |
|
|
87
|
+
| `approve_code_review` | Mark the code review step as complete |
|
|
88
|
+
|
|
89
|
+
### Project Memory
|
|
90
|
+
|
|
91
|
+
| Tool | Description |
|
|
92
|
+
|------|-------------|
|
|
93
|
+
| `get_memory` | Get project memory notes |
|
|
94
|
+
| `add_memory` | Add a note to project memory |
|
|
95
|
+
| `clear_memory` | Clear all project memory notes |
|
|
96
|
+
| `delete_memory` | Delete specific notes by index |
|
|
97
|
+
| `replace_memory` | Replace all memory with new notes |
|
|
98
|
+
|
|
99
|
+
### Scripts & Automation
|
|
100
|
+
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `list_scripts` | List npm scripts and their status |
|
|
104
|
+
| `run_script` | Start an npm script |
|
|
105
|
+
| `stop_script` | Stop a running script |
|
|
106
|
+
| `get_console_output` | Get console output from a script |
|
|
107
|
+
| `check_quick_actions` | Check for pending UI-triggered actions |
|
|
108
|
+
|
|
109
|
+
### Refactoring
|
|
110
|
+
|
|
111
|
+
| Tool | Description |
|
|
112
|
+
|------|-------------|
|
|
113
|
+
| `create_refactor_plan` | Analyze workspace and create refactoring plan |
|
|
114
|
+
| `get_refactor_plan` | Get the current refactor plan |
|
|
115
|
+
| `get_next_refactor_step` | Get the next uncompleted step |
|
|
116
|
+
| `verify_refactor` | Run tests and compare to baseline |
|
|
117
|
+
| `complete_refactor_step` | Mark a step as completed |
|
|
118
|
+
| `complete_refactor` | Finish refactoring and delete plan |
|
|
119
|
+
|
|
120
|
+
## Smart Workflow Recommendations
|
|
121
|
+
|
|
122
|
+
Before starting a workflow, always call `get_workflow_recommendation` to get intelligent guidance:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
get_workflow_recommendation(workspace_path="/path/to/project")
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The tool analyzes your current state and recommends the best action:
|
|
129
|
+
|
|
130
|
+
| Recommended Action | When | What to Do |
|
|
131
|
+
|-------------------|------|------------|
|
|
132
|
+
| `start_workflow` | Normal flow, no blockers | Proceed with `trigger_workflow` |
|
|
133
|
+
| `create_feature_branch` | On main with `requireFeatureBranch` enabled | Use `create_branch` first |
|
|
134
|
+
| `add_to_existing_pr` | On feature branch with open PR | Your commits will update the existing PR |
|
|
135
|
+
| `switch_to_main` | PR was merged, branch is stale | Switch to main, pull, create new branch |
|
|
136
|
+
| `create_new_branch` | PR was closed (not merged) | Create a fresh branch or reopen PR |
|
|
137
|
+
| `sync_branch_first` | Branch is >5 commits behind main | Use `sync_branch` before committing |
|
|
138
|
+
| `no_changes` | No uncommitted changes | Nothing to commit yet |
|
|
139
|
+
|
|
140
|
+
Each recommendation includes:
|
|
141
|
+
- **reason**: Why this action is recommended
|
|
142
|
+
- **suggestion**: What you should do (trust this!)
|
|
143
|
+
- **consequences**: What will happen if you proceed
|
|
144
|
+
|
|
145
|
+
## Workflow Pipeline
|
|
146
|
+
|
|
147
|
+
The workflow feature provides a 10-step guided development process with best-practice Git support:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
trigger_workflow()
|
|
151
|
+
|
|
|
152
|
+
v
|
|
153
|
+
[AUTOMATIC CHECKS]
|
|
154
|
+
1. Type checking (tsc --noEmit)
|
|
155
|
+
2. Lint/Format (eslint --fix)
|
|
156
|
+
3. Run tests
|
|
157
|
+
4. Coverage analysis (files needing tests)
|
|
158
|
+
5. Benchmarks (optional)
|
|
159
|
+
|
|
|
160
|
+
v
|
|
161
|
+
[HUMAN GATES]
|
|
162
|
+
6. Write Tests (if coverage found gaps)
|
|
163
|
+
7. Commit (approve_commit)
|
|
164
|
+
8. Push (approve_push)
|
|
165
|
+
9. Create PR (skipped if on main)
|
|
166
|
+
10. Code Review (approve_code_review)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Branch Management
|
|
170
|
+
|
|
171
|
+
Best practice: Work on feature branches, not directly on main.
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
# Check current branch status
|
|
175
|
+
get_branch_info(workspace_path="/path/to/project")
|
|
176
|
+
|
|
177
|
+
# Create a feature branch
|
|
178
|
+
create_branch(workspace_path="/path/to/project", branch_name="feature/my-feature")
|
|
179
|
+
|
|
180
|
+
# Sync with latest main (rebase)
|
|
181
|
+
sync_branch(workspace_path="/path/to/project", method="rebase")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The workflow enforces feature branch usage by default (`requireFeatureBranch: true`).
|
|
185
|
+
Toggle this in the UI or set in `.claudette/workflow-config.json`.
|
|
186
|
+
|
|
187
|
+
## Example Usage
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
# Check for errors
|
|
191
|
+
get_errors(workspace_path="/path/to/project")
|
|
192
|
+
|
|
193
|
+
# Run full workflow
|
|
194
|
+
trigger_workflow(workspace_path="/path/to/project")
|
|
195
|
+
|
|
196
|
+
# Check workflow status
|
|
197
|
+
get_workflow_status(workspace_path="/path/to/project")
|
|
198
|
+
|
|
199
|
+
# After checks pass, commit
|
|
200
|
+
generate_commit_message(workspace_path="/path/to/project")
|
|
201
|
+
approve_commit(workspace_path="/path/to/project", message="Add new feature")
|
|
202
|
+
|
|
203
|
+
# Push changes
|
|
204
|
+
approve_push(workspace_path="/path/to/project")
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Requirements
|
|
208
|
+
|
|
209
|
+
- Node.js 18+
|
|
210
|
+
- Claudette IDE server running on port 52001 (for full functionality)
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -1567,31 +1567,36 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1567
1567
|
let prNumber;
|
|
1568
1568
|
let prTitle;
|
|
1569
1569
|
try {
|
|
1570
|
-
const prInfo = execSync('gh pr view --json number,title', {
|
|
1570
|
+
const prInfo = execSync('gh pr view --json number,title,state', {
|
|
1571
1571
|
cwd: workspacePath,
|
|
1572
1572
|
encoding: 'utf-8',
|
|
1573
1573
|
});
|
|
1574
1574
|
const parsed = JSON.parse(prInfo);
|
|
1575
1575
|
prNumber = parsed.number?.toString();
|
|
1576
1576
|
prTitle = parsed.title;
|
|
1577
|
+
// Skip merge if PR is already merged/closed
|
|
1578
|
+
if (parsed.state !== 'OPEN') {
|
|
1579
|
+
prNumber = undefined;
|
|
1580
|
+
}
|
|
1577
1581
|
}
|
|
1578
1582
|
catch {
|
|
1579
1583
|
// No PR found
|
|
1580
1584
|
}
|
|
1581
|
-
if
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1585
|
+
// Merge the PR if one exists
|
|
1586
|
+
let merged = false;
|
|
1587
|
+
if (prNumber) {
|
|
1588
|
+
const mergeFlag = mergeMethod === 'squash' ? '--squash' : mergeMethod === 'rebase' ? '--rebase' : '--merge';
|
|
1589
|
+
try {
|
|
1590
|
+
execSync(`gh pr merge ${prNumber} ${mergeFlag} --delete-branch`, {
|
|
1591
|
+
cwd: workspacePath,
|
|
1592
|
+
encoding: 'utf-8',
|
|
1593
|
+
stdio: 'pipe',
|
|
1594
|
+
});
|
|
1595
|
+
merged = true;
|
|
1596
|
+
}
|
|
1597
|
+
catch (mergeErr) {
|
|
1598
|
+
return { content: [{ type: "text", text: `❌ Failed to merge PR #${prNumber}: ${mergeErr.message}` }] };
|
|
1599
|
+
}
|
|
1595
1600
|
}
|
|
1596
1601
|
// Mark workflow as complete
|
|
1597
1602
|
const response = await fetch(`${CLAUDETTE_API}/api/workflow/code-review`, {
|
|
@@ -1599,14 +1604,26 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1599
1604
|
headers: { "Content-Type": "application/json" },
|
|
1600
1605
|
body: JSON.stringify({ path: workspacePath, reviewer }),
|
|
1601
1606
|
});
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
+
await response.json();
|
|
1608
|
+
// Reset workflow after successful merge
|
|
1609
|
+
await fetch(`${CLAUDETTE_API}/api/workflow/reset`, {
|
|
1610
|
+
method: "POST",
|
|
1611
|
+
headers: { "Content-Type": "application/json" },
|
|
1612
|
+
body: JSON.stringify({ path: workspacePath }),
|
|
1613
|
+
});
|
|
1614
|
+
let output = '';
|
|
1615
|
+
if (merged && prNumber) {
|
|
1616
|
+
output += `✅ PR #${prNumber} merged successfully!\n\n`;
|
|
1617
|
+
output += `Title: ${prTitle}\n`;
|
|
1618
|
+
output += `Method: ${mergeMethod}\n`;
|
|
1619
|
+
output += `Branch deleted: Yes\n`;
|
|
1620
|
+
}
|
|
1621
|
+
else {
|
|
1622
|
+
output += `✅ Code review approved!\n\n`;
|
|
1623
|
+
}
|
|
1607
1624
|
if (reviewer)
|
|
1608
1625
|
output += `Reviewer: ${reviewer}\n`;
|
|
1609
|
-
output += `\nWorkflow complete.`;
|
|
1626
|
+
output += `\nWorkflow complete and reset.`;
|
|
1610
1627
|
return { content: [{ type: "text", text: output }] };
|
|
1611
1628
|
}
|
|
1612
1629
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@azerate/claudette-mcp",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"description": "MCP server for Claudette IDE - TypeScript errors, git changes, checkpoints, memory, and script management",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"claudette-mcp": "dist/index.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
|
-
"start": "node dist/index.js",
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"mcp",
|
|
20
|
-
"claude",
|
|
21
|
-
"claudette",
|
|
22
|
-
"typescript",
|
|
23
|
-
"git",
|
|
24
|
-
"ide"
|
|
25
|
-
],
|
|
26
|
-
"author": "azerate",
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "https://github.com/azerate/claudette"
|
|
31
|
-
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@types/node": "^22.0.0",
|
|
37
|
-
"typescript": "^5.7.0"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@azerate/claudette-mcp",
|
|
3
|
+
"version": "1.7.4",
|
|
4
|
+
"description": "MCP server for Claudette IDE - TypeScript errors, git changes, checkpoints, memory, and script management",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"claudette-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"claude",
|
|
21
|
+
"claudette",
|
|
22
|
+
"typescript",
|
|
23
|
+
"git",
|
|
24
|
+
"ide"
|
|
25
|
+
],
|
|
26
|
+
"author": "azerate",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/azerate/claudette"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"typescript": "^5.7.0"
|
|
38
|
+
}
|
|
39
|
+
}
|