@vibescope/mcp-server 0.2.0 → 0.2.2
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 +60 -7
- package/dist/api-client.d.ts +251 -1
- package/dist/api-client.js +82 -3
- package/dist/handlers/blockers.js +9 -8
- package/dist/handlers/bodies-of-work.js +96 -63
- package/dist/handlers/connectors.d.ts +45 -0
- package/dist/handlers/connectors.js +183 -0
- package/dist/handlers/cost.d.ts +10 -0
- package/dist/handlers/cost.js +112 -50
- package/dist/handlers/decisions.js +32 -19
- package/dist/handlers/deployment.js +144 -122
- package/dist/handlers/discovery.d.ts +7 -0
- package/dist/handlers/discovery.js +96 -7
- package/dist/handlers/fallback.js +29 -23
- package/dist/handlers/file-checkouts.d.ts +20 -0
- package/dist/handlers/file-checkouts.js +133 -0
- package/dist/handlers/findings.d.ts +6 -0
- package/dist/handlers/findings.js +96 -40
- package/dist/handlers/git-issues.js +40 -36
- package/dist/handlers/ideas.js +49 -31
- package/dist/handlers/index.d.ts +3 -0
- package/dist/handlers/index.js +9 -0
- package/dist/handlers/milestones.js +39 -32
- package/dist/handlers/organizations.js +99 -91
- package/dist/handlers/progress.js +24 -13
- package/dist/handlers/project.js +68 -28
- package/dist/handlers/requests.js +18 -14
- package/dist/handlers/roles.d.ts +18 -0
- package/dist/handlers/roles.js +130 -0
- package/dist/handlers/session.js +58 -17
- package/dist/handlers/sprints.js +93 -81
- package/dist/handlers/tasks.d.ts +2 -0
- package/dist/handlers/tasks.js +189 -91
- package/dist/handlers/types.d.ts +64 -2
- package/dist/handlers/types.js +48 -1
- package/dist/handlers/validation.js +21 -17
- package/dist/index.js +7 -2716
- package/dist/token-tracking.d.ts +74 -0
- package/dist/token-tracking.js +122 -0
- package/dist/tools.js +685 -9
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +17 -0
- package/docs/TOOLS.md +2053 -0
- package/package.json +4 -1
- package/scripts/generate-docs.ts +212 -0
- package/src/api-client.test.ts +718 -0
- package/src/api-client.ts +320 -6
- package/src/handlers/__test-setup__.ts +16 -0
- package/src/handlers/blockers.test.ts +31 -19
- package/src/handlers/blockers.ts +9 -8
- package/src/handlers/bodies-of-work.test.ts +55 -32
- package/src/handlers/bodies-of-work.ts +115 -115
- package/src/handlers/connectors.test.ts +834 -0
- package/src/handlers/connectors.ts +229 -0
- package/src/handlers/cost.test.ts +34 -44
- package/src/handlers/cost.ts +136 -85
- package/src/handlers/decisions.test.ts +37 -27
- package/src/handlers/decisions.ts +35 -30
- package/src/handlers/deployment.ts +180 -208
- package/src/handlers/discovery.test.ts +4 -5
- package/src/handlers/discovery.ts +98 -8
- package/src/handlers/fallback.test.ts +26 -22
- package/src/handlers/fallback.ts +36 -33
- package/src/handlers/file-checkouts.test.ts +670 -0
- package/src/handlers/file-checkouts.ts +165 -0
- package/src/handlers/findings.test.ts +178 -19
- package/src/handlers/findings.ts +112 -74
- package/src/handlers/git-issues.test.ts +51 -43
- package/src/handlers/git-issues.ts +44 -84
- package/src/handlers/ideas.test.ts +28 -23
- package/src/handlers/ideas.ts +61 -59
- package/src/handlers/index.ts +9 -0
- package/src/handlers/milestones.test.ts +33 -28
- package/src/handlers/milestones.ts +52 -50
- package/src/handlers/organizations.test.ts +104 -83
- package/src/handlers/organizations.ts +117 -142
- package/src/handlers/progress.test.ts +20 -14
- package/src/handlers/progress.ts +26 -24
- package/src/handlers/project.test.ts +34 -27
- package/src/handlers/project.ts +95 -63
- package/src/handlers/requests.test.ts +27 -18
- package/src/handlers/requests.ts +21 -17
- package/src/handlers/roles.test.ts +303 -0
- package/src/handlers/roles.ts +208 -0
- package/src/handlers/session.test.ts +47 -0
- package/src/handlers/session.ts +71 -26
- package/src/handlers/sprints.test.ts +71 -50
- package/src/handlers/sprints.ts +113 -146
- package/src/handlers/tasks.test.ts +77 -15
- package/src/handlers/tasks.ts +231 -156
- package/src/handlers/tool-categories.test.ts +66 -0
- package/src/handlers/types.ts +81 -2
- package/src/handlers/validation.test.ts +78 -45
- package/src/handlers/validation.ts +23 -25
- package/src/index.ts +12 -2732
- package/src/token-tracking.test.ts +453 -0
- package/src/token-tracking.ts +164 -0
- package/src/tools.ts +685 -9
- package/src/utils.test.ts +2 -2
- package/src/utils.ts +17 -0
- package/dist/config/tool-categories.d.ts +0 -31
- package/dist/config/tool-categories.js +0 -253
- package/dist/knowledge.d.ts +0 -6
- package/dist/knowledge.js +0 -218
package/README.md
CHANGED
|
@@ -88,24 +88,77 @@ claude mcp add vibescope npx @vibescope/mcp-server \
|
|
|
88
88
|
|
|
89
89
|
## Available Tools
|
|
90
90
|
|
|
91
|
-
The MCP server provides
|
|
91
|
+
The MCP server provides **130 tools** for AI agents. Here are the key tools by category:
|
|
92
92
|
|
|
93
|
+
### Session
|
|
94
|
+
| Tool | Description |
|
|
95
|
+
|------|-------------|
|
|
96
|
+
| `start_work_session` | Initialize session, get persona, role, and next task |
|
|
97
|
+
| `end_work_session` | End session and release claimed tasks |
|
|
98
|
+
| `heartbeat` | Keep session active (call every 30-60s) |
|
|
99
|
+
| `get_help` | Get guidance on workflows |
|
|
100
|
+
| `discover_tools` | List tools by category |
|
|
101
|
+
| `get_tool_info` | Get detailed tool documentation |
|
|
102
|
+
|
|
103
|
+
### Projects
|
|
104
|
+
| Tool | Description |
|
|
105
|
+
|------|-------------|
|
|
106
|
+
| `create_project` | Create a new project |
|
|
107
|
+
| `update_project` | Update project details and git workflow |
|
|
108
|
+
| `get_project_context` | Get full project context |
|
|
109
|
+
| `get_git_workflow` | Get git branching instructions |
|
|
110
|
+
| `query_knowledge_base` | Query aggregated project knowledge |
|
|
111
|
+
|
|
112
|
+
### Tasks
|
|
93
113
|
| Tool | Description |
|
|
94
114
|
|------|-------------|
|
|
95
|
-
| `start_work_session` | Initialize a work session for a project |
|
|
96
|
-
| `get_project_context` | Get full project context including tasks, blockers, and user updates |
|
|
97
115
|
| `get_tasks` | List tasks, optionally filtered by status |
|
|
98
|
-
| `get_next_task` | Get
|
|
116
|
+
| `get_next_task` | Get highest priority pending task |
|
|
99
117
|
| `add_task` | Create a new task |
|
|
100
118
|
| `update_task` | Update task status, progress, or details |
|
|
101
119
|
| `complete_task` | Mark a task as completed |
|
|
120
|
+
| `add_subtask` | Break down tasks into subtasks |
|
|
121
|
+
| `add_task_reference` | Add reference URL (docs, PRs) |
|
|
122
|
+
| `batch_update_tasks` | Update multiple tasks at once |
|
|
123
|
+
|
|
124
|
+
### Progress & Context
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
|------|-------------|
|
|
102
127
|
| `log_progress` | Log a progress update |
|
|
103
128
|
| `add_blocker` | Flag a blocker needing human input |
|
|
104
129
|
| `resolve_blocker` | Mark a blocker as resolved |
|
|
105
|
-
| `log_decision` | Record an architectural
|
|
130
|
+
| `log_decision` | Record an architectural decision |
|
|
106
131
|
| `add_idea` | Record an improvement idea |
|
|
107
|
-
| `
|
|
108
|
-
|
|
132
|
+
| `add_finding` | Record an audit finding |
|
|
133
|
+
|
|
134
|
+
### Validation & Deployment
|
|
135
|
+
| Tool | Description |
|
|
136
|
+
|------|-------------|
|
|
137
|
+
| `get_tasks_awaiting_validation` | Get tasks needing review |
|
|
138
|
+
| `claim_validation` | Claim a task for review |
|
|
139
|
+
| `validate_task` | Approve or reject work |
|
|
140
|
+
| `request_deployment` | Request a deployment |
|
|
141
|
+
| `check_deployment_status` | Check deployment state |
|
|
142
|
+
| `complete_deployment` | Mark deployment done |
|
|
143
|
+
|
|
144
|
+
### Collaboration
|
|
145
|
+
| Tool | Description |
|
|
146
|
+
|------|-------------|
|
|
147
|
+
| `add_milestone` | Track progress on complex tasks |
|
|
148
|
+
| `create_body_of_work` | Group tasks into phases |
|
|
149
|
+
| `create_sprint` | Create time-bounded sprints |
|
|
150
|
+
| `checkout_file` | Prevent file conflicts |
|
|
151
|
+
| `get_pending_requests` | Get human requests |
|
|
152
|
+
| `answer_question` | Answer user questions |
|
|
153
|
+
|
|
154
|
+
### Additional Categories
|
|
155
|
+
- **Organizations**: Create, manage, and share projects with teams
|
|
156
|
+
- **Cost Tracking**: Monitor spending with alerts and summaries
|
|
157
|
+
- **Git Issues**: Track merge conflicts and push failures
|
|
158
|
+
- **Role Management**: Configure agent roles (developer, validator, deployer)
|
|
159
|
+
- **Scheduled Deployments**: Schedule recurring deployments
|
|
160
|
+
|
|
161
|
+
Use `discover_tools` to explore all categories and `get_tool_info` for detailed documentation
|
|
109
162
|
|
|
110
163
|
## Rate Limits
|
|
111
164
|
|
package/dist/api-client.d.ts
CHANGED
|
@@ -69,6 +69,23 @@ export declare class VibescopeApiClient {
|
|
|
69
69
|
priority: number;
|
|
70
70
|
estimated_minutes?: number;
|
|
71
71
|
} | null;
|
|
72
|
+
pending_requests?: Array<{
|
|
73
|
+
id: string;
|
|
74
|
+
request_type: string;
|
|
75
|
+
message: string;
|
|
76
|
+
created_at: string;
|
|
77
|
+
}>;
|
|
78
|
+
pending_requests_count?: number;
|
|
79
|
+
URGENT_QUESTIONS?: {
|
|
80
|
+
count: number;
|
|
81
|
+
oldest_waiting_minutes: number;
|
|
82
|
+
action_required: string;
|
|
83
|
+
requests: Array<{
|
|
84
|
+
id: string;
|
|
85
|
+
message: string;
|
|
86
|
+
waiting_minutes: number;
|
|
87
|
+
}>;
|
|
88
|
+
};
|
|
72
89
|
directive?: string;
|
|
73
90
|
blockers_count?: number;
|
|
74
91
|
validation_count?: number;
|
|
@@ -209,6 +226,7 @@ export declare class VibescopeApiClient {
|
|
|
209
226
|
estimated_minutes?: number;
|
|
210
227
|
blocking?: boolean;
|
|
211
228
|
session_id?: string;
|
|
229
|
+
task_type?: string;
|
|
212
230
|
}): Promise<ApiResponse<{
|
|
213
231
|
success: boolean;
|
|
214
232
|
task_id: string;
|
|
@@ -274,6 +292,7 @@ export declare class VibescopeApiClient {
|
|
|
274
292
|
progress_note?: string;
|
|
275
293
|
estimated_minutes?: number;
|
|
276
294
|
git_branch?: string;
|
|
295
|
+
worktree_path?: string;
|
|
277
296
|
session_id?: string;
|
|
278
297
|
}): Promise<ApiResponse<{
|
|
279
298
|
success: boolean;
|
|
@@ -375,7 +394,11 @@ export declare class VibescopeApiClient {
|
|
|
375
394
|
deleteBlocker(blockerId: string): Promise<ApiResponse<{
|
|
376
395
|
success: boolean;
|
|
377
396
|
}>>;
|
|
378
|
-
getDecisions(projectId: string
|
|
397
|
+
getDecisions(projectId: string, options?: {
|
|
398
|
+
limit?: number;
|
|
399
|
+
offset?: number;
|
|
400
|
+
search_query?: string;
|
|
401
|
+
}): Promise<ApiResponse<{
|
|
379
402
|
decisions: Array<{
|
|
380
403
|
id: string;
|
|
381
404
|
title: string;
|
|
@@ -662,6 +685,8 @@ export declare class VibescopeApiClient {
|
|
|
662
685
|
getActivityFeed(projectId: string, params?: {
|
|
663
686
|
limit?: number;
|
|
664
687
|
since?: string;
|
|
688
|
+
types?: string[];
|
|
689
|
+
created_by?: string;
|
|
665
690
|
}): Promise<ApiResponse<{
|
|
666
691
|
activities: Array<{
|
|
667
692
|
type: string;
|
|
@@ -730,6 +755,7 @@ export declare class VibescopeApiClient {
|
|
|
730
755
|
success: boolean;
|
|
731
756
|
}>>;
|
|
732
757
|
queryKnowledgeBase(projectId: string, params?: {
|
|
758
|
+
scope?: 'summary' | 'detailed';
|
|
733
759
|
categories?: string[];
|
|
734
760
|
limit?: number;
|
|
735
761
|
search_query?: string;
|
|
@@ -739,22 +765,35 @@ export declare class VibescopeApiClient {
|
|
|
739
765
|
title: string;
|
|
740
766
|
category: string;
|
|
741
767
|
severity: string;
|
|
768
|
+
description?: string;
|
|
742
769
|
}>;
|
|
743
770
|
decisions?: Array<{
|
|
744
771
|
id: string;
|
|
745
772
|
title: string;
|
|
746
773
|
description: string;
|
|
774
|
+
rationale?: string;
|
|
747
775
|
}>;
|
|
748
776
|
completed_tasks?: Array<{
|
|
749
777
|
id: string;
|
|
750
778
|
title: string;
|
|
751
779
|
completed_at: string;
|
|
780
|
+
summary?: string;
|
|
752
781
|
}>;
|
|
753
782
|
resolved_blockers?: Array<{
|
|
754
783
|
id: string;
|
|
755
784
|
description: string;
|
|
756
785
|
resolution_note?: string;
|
|
757
786
|
}>;
|
|
787
|
+
progress?: Array<{
|
|
788
|
+
id: string;
|
|
789
|
+
summary: string;
|
|
790
|
+
details?: string;
|
|
791
|
+
}>;
|
|
792
|
+
qa?: Array<{
|
|
793
|
+
id: string;
|
|
794
|
+
question: string;
|
|
795
|
+
answer: string;
|
|
796
|
+
}>;
|
|
758
797
|
}>>;
|
|
759
798
|
syncSession(sessionId: string, params?: {
|
|
760
799
|
total_tokens?: number;
|
|
@@ -1036,6 +1075,63 @@ export declare class VibescopeApiClient {
|
|
|
1036
1075
|
output_tokens: number;
|
|
1037
1076
|
}>;
|
|
1038
1077
|
}>>;
|
|
1078
|
+
getBodyOfWorkCosts(params: {
|
|
1079
|
+
body_of_work_id?: string;
|
|
1080
|
+
project_id?: string;
|
|
1081
|
+
}): Promise<ApiResponse<{
|
|
1082
|
+
bodies_of_work: Array<{
|
|
1083
|
+
body_of_work_id: string;
|
|
1084
|
+
title: string;
|
|
1085
|
+
project_id: string;
|
|
1086
|
+
status: string;
|
|
1087
|
+
task_count: number;
|
|
1088
|
+
total_cost_usd: number;
|
|
1089
|
+
total_tokens: number;
|
|
1090
|
+
pre_phase_cost_usd: number;
|
|
1091
|
+
core_phase_cost_usd: number;
|
|
1092
|
+
post_phase_cost_usd: number;
|
|
1093
|
+
model_breakdown: Record<string, {
|
|
1094
|
+
input: number;
|
|
1095
|
+
output: number;
|
|
1096
|
+
}>;
|
|
1097
|
+
}>;
|
|
1098
|
+
count: number;
|
|
1099
|
+
totals: {
|
|
1100
|
+
total_cost_usd: number;
|
|
1101
|
+
total_tokens: number;
|
|
1102
|
+
total_tasks: number;
|
|
1103
|
+
};
|
|
1104
|
+
}>>;
|
|
1105
|
+
getSprintCosts(params: {
|
|
1106
|
+
sprint_id?: string;
|
|
1107
|
+
project_id?: string;
|
|
1108
|
+
}): Promise<ApiResponse<{
|
|
1109
|
+
sprints: Array<{
|
|
1110
|
+
sprint_id: string;
|
|
1111
|
+
title: string;
|
|
1112
|
+
project_id: string;
|
|
1113
|
+
status: string;
|
|
1114
|
+
sprint_number: number;
|
|
1115
|
+
task_count: number;
|
|
1116
|
+
total_cost_usd: number;
|
|
1117
|
+
total_tokens: number;
|
|
1118
|
+
cost_per_story_point: number | null;
|
|
1119
|
+
committed_points: number;
|
|
1120
|
+
velocity_points: number;
|
|
1121
|
+
model_breakdown: Record<string, {
|
|
1122
|
+
input: number;
|
|
1123
|
+
output: number;
|
|
1124
|
+
}>;
|
|
1125
|
+
}>;
|
|
1126
|
+
count: number;
|
|
1127
|
+
totals: {
|
|
1128
|
+
total_cost_usd: number;
|
|
1129
|
+
total_tokens: number;
|
|
1130
|
+
total_tasks: number;
|
|
1131
|
+
total_velocity_points: number;
|
|
1132
|
+
avg_cost_per_point: number | null;
|
|
1133
|
+
};
|
|
1134
|
+
}>>;
|
|
1039
1135
|
getTokenUsage(): Promise<ApiResponse<{
|
|
1040
1136
|
session_tokens: number;
|
|
1041
1137
|
estimated_cost: number;
|
|
@@ -1095,6 +1191,7 @@ export declare class VibescopeApiClient {
|
|
|
1095
1191
|
environment?: string;
|
|
1096
1192
|
version_bump?: string;
|
|
1097
1193
|
auto_trigger?: boolean;
|
|
1194
|
+
hours_interval?: number;
|
|
1098
1195
|
notes?: string;
|
|
1099
1196
|
git_ref?: string;
|
|
1100
1197
|
}): Promise<ApiResponse<{
|
|
@@ -1106,6 +1203,7 @@ export declare class VibescopeApiClient {
|
|
|
1106
1203
|
id: string;
|
|
1107
1204
|
scheduled_at: string;
|
|
1108
1205
|
schedule_type: string;
|
|
1206
|
+
hours_interval: number;
|
|
1109
1207
|
environment: string;
|
|
1110
1208
|
version_bump: string;
|
|
1111
1209
|
auto_trigger: boolean;
|
|
@@ -1119,6 +1217,7 @@ export declare class VibescopeApiClient {
|
|
|
1119
1217
|
updateScheduledDeployment(scheduleId: string, updates: {
|
|
1120
1218
|
scheduled_at?: string;
|
|
1121
1219
|
schedule_type?: string;
|
|
1220
|
+
hours_interval?: number;
|
|
1122
1221
|
environment?: string;
|
|
1123
1222
|
version_bump?: string;
|
|
1124
1223
|
auto_trigger?: boolean;
|
|
@@ -1163,6 +1262,157 @@ export declare class VibescopeApiClient {
|
|
|
1163
1262
|
slug: string;
|
|
1164
1263
|
title: string;
|
|
1165
1264
|
}>>>;
|
|
1265
|
+
checkoutFile(projectId: string, filePath: string, reason?: string, sessionId?: string): Promise<ApiResponse<{
|
|
1266
|
+
success: boolean;
|
|
1267
|
+
checkout_id: string;
|
|
1268
|
+
file_path: string;
|
|
1269
|
+
already_checked_out?: boolean;
|
|
1270
|
+
message: string;
|
|
1271
|
+
}>>;
|
|
1272
|
+
checkinFile(params: {
|
|
1273
|
+
checkout_id?: string;
|
|
1274
|
+
project_id?: string;
|
|
1275
|
+
file_path?: string;
|
|
1276
|
+
summary?: string;
|
|
1277
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
1278
|
+
success: boolean;
|
|
1279
|
+
checkout_id: string;
|
|
1280
|
+
message: string;
|
|
1281
|
+
}>>;
|
|
1282
|
+
getFileCheckouts(projectId: string, options?: {
|
|
1283
|
+
status?: string;
|
|
1284
|
+
file_path?: string;
|
|
1285
|
+
limit?: number;
|
|
1286
|
+
}): Promise<ApiResponse<{
|
|
1287
|
+
checkouts: Array<{
|
|
1288
|
+
id: string;
|
|
1289
|
+
file_path: string;
|
|
1290
|
+
status: string;
|
|
1291
|
+
checked_out_at: string;
|
|
1292
|
+
checkout_reason?: string;
|
|
1293
|
+
checked_in_at?: string;
|
|
1294
|
+
checkin_summary?: string;
|
|
1295
|
+
checked_out_by?: string;
|
|
1296
|
+
}>;
|
|
1297
|
+
}>>;
|
|
1298
|
+
abandonCheckout(params: {
|
|
1299
|
+
checkout_id?: string;
|
|
1300
|
+
project_id?: string;
|
|
1301
|
+
file_path?: string;
|
|
1302
|
+
}): Promise<ApiResponse<{
|
|
1303
|
+
success: boolean;
|
|
1304
|
+
checkout_id: string;
|
|
1305
|
+
message: string;
|
|
1306
|
+
}>>;
|
|
1307
|
+
getStaleWorktrees(projectId: string): Promise<ApiResponse<{
|
|
1308
|
+
project_id: string;
|
|
1309
|
+
project_name: string;
|
|
1310
|
+
stale_worktrees: Array<{
|
|
1311
|
+
task_id: string;
|
|
1312
|
+
task_title: string;
|
|
1313
|
+
worktree_path: string;
|
|
1314
|
+
git_branch: string | null;
|
|
1315
|
+
status: string;
|
|
1316
|
+
completed_at: string | null;
|
|
1317
|
+
updated_at: string;
|
|
1318
|
+
pr_url: string | null;
|
|
1319
|
+
stale_reason: 'task_finished' | 'potentially_abandoned';
|
|
1320
|
+
}>;
|
|
1321
|
+
count: number;
|
|
1322
|
+
cleanup_instructions: string[] | null;
|
|
1323
|
+
}>>;
|
|
1324
|
+
clearWorktreePath(taskId: string): Promise<ApiResponse<{
|
|
1325
|
+
success: boolean;
|
|
1326
|
+
task_id: string;
|
|
1327
|
+
}>>;
|
|
1328
|
+
getConnectors(projectId: string, params?: {
|
|
1329
|
+
type?: string;
|
|
1330
|
+
status?: string;
|
|
1331
|
+
limit?: number;
|
|
1332
|
+
offset?: number;
|
|
1333
|
+
}): Promise<ApiResponse<{
|
|
1334
|
+
connectors: Array<{
|
|
1335
|
+
id: string;
|
|
1336
|
+
name: string;
|
|
1337
|
+
type: string;
|
|
1338
|
+
description?: string;
|
|
1339
|
+
status: string;
|
|
1340
|
+
events: Record<string, boolean>;
|
|
1341
|
+
events_sent: number;
|
|
1342
|
+
last_triggered_at?: string;
|
|
1343
|
+
last_error?: string;
|
|
1344
|
+
last_error_at?: string;
|
|
1345
|
+
created_at: string;
|
|
1346
|
+
}>;
|
|
1347
|
+
total_count: number;
|
|
1348
|
+
has_more: boolean;
|
|
1349
|
+
}>>;
|
|
1350
|
+
getConnector(connectorId: string): Promise<ApiResponse<{
|
|
1351
|
+
connector: {
|
|
1352
|
+
id: string;
|
|
1353
|
+
name: string;
|
|
1354
|
+
type: string;
|
|
1355
|
+
description?: string;
|
|
1356
|
+
config: Record<string, unknown>;
|
|
1357
|
+
events: Record<string, boolean>;
|
|
1358
|
+
status: string;
|
|
1359
|
+
events_sent: number;
|
|
1360
|
+
last_triggered_at?: string;
|
|
1361
|
+
last_error?: string;
|
|
1362
|
+
last_error_at?: string;
|
|
1363
|
+
created_at: string;
|
|
1364
|
+
};
|
|
1365
|
+
}>>;
|
|
1366
|
+
addConnector(projectId: string, params: {
|
|
1367
|
+
name: string;
|
|
1368
|
+
type: string;
|
|
1369
|
+
description?: string;
|
|
1370
|
+
config?: Record<string, unknown>;
|
|
1371
|
+
events?: Record<string, boolean>;
|
|
1372
|
+
}): Promise<ApiResponse<{
|
|
1373
|
+
success: boolean;
|
|
1374
|
+
connector_id: string;
|
|
1375
|
+
}>>;
|
|
1376
|
+
updateConnector(connectorId: string, updates: {
|
|
1377
|
+
name?: string;
|
|
1378
|
+
description?: string;
|
|
1379
|
+
config?: Record<string, unknown>;
|
|
1380
|
+
events?: Record<string, boolean>;
|
|
1381
|
+
status?: string;
|
|
1382
|
+
}): Promise<ApiResponse<{
|
|
1383
|
+
success: boolean;
|
|
1384
|
+
connector_id: string;
|
|
1385
|
+
}>>;
|
|
1386
|
+
deleteConnector(connectorId: string): Promise<ApiResponse<{
|
|
1387
|
+
success: boolean;
|
|
1388
|
+
}>>;
|
|
1389
|
+
testConnector(connectorId: string): Promise<ApiResponse<{
|
|
1390
|
+
success: boolean;
|
|
1391
|
+
event_id: string;
|
|
1392
|
+
status?: number;
|
|
1393
|
+
error?: string;
|
|
1394
|
+
}>>;
|
|
1395
|
+
getConnectorEvents(params: {
|
|
1396
|
+
connector_id?: string;
|
|
1397
|
+
project_id?: string;
|
|
1398
|
+
status?: string;
|
|
1399
|
+
limit?: number;
|
|
1400
|
+
offset?: number;
|
|
1401
|
+
}): Promise<ApiResponse<{
|
|
1402
|
+
events: Array<{
|
|
1403
|
+
id: string;
|
|
1404
|
+
connector_id: string;
|
|
1405
|
+
event_type: string;
|
|
1406
|
+
status: string;
|
|
1407
|
+
response_status?: number;
|
|
1408
|
+
error_message?: string;
|
|
1409
|
+
attempts: number;
|
|
1410
|
+
created_at: string;
|
|
1411
|
+
sent_at?: string;
|
|
1412
|
+
}>;
|
|
1413
|
+
total_count: number;
|
|
1414
|
+
has_more: boolean;
|
|
1415
|
+
}>>;
|
|
1166
1416
|
}
|
|
1167
1417
|
export declare function getApiClient(): VibescopeApiClient;
|
|
1168
1418
|
export declare function initApiClient(config: ApiClientConfig): VibescopeApiClient;
|
package/dist/api-client.js
CHANGED
|
@@ -28,7 +28,8 @@ export class VibescopeApiClient {
|
|
|
28
28
|
return {
|
|
29
29
|
ok: false,
|
|
30
30
|
status: response.status,
|
|
31
|
-
error: data.error || `HTTP ${response.status}
|
|
31
|
+
error: data.error || `HTTP ${response.status}`,
|
|
32
|
+
data // Include full response data for additional error context
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
return {
|
|
@@ -171,8 +172,8 @@ export class VibescopeApiClient {
|
|
|
171
172
|
// ============================================================================
|
|
172
173
|
// Decision endpoints
|
|
173
174
|
// ============================================================================
|
|
174
|
-
async getDecisions(projectId) {
|
|
175
|
-
return this.proxy('get_decisions', { project_id: projectId });
|
|
175
|
+
async getDecisions(projectId, options) {
|
|
176
|
+
return this.proxy('get_decisions', { project_id: projectId, ...options });
|
|
176
177
|
}
|
|
177
178
|
async logDecision(projectId, params, sessionId) {
|
|
178
179
|
return this.proxy('log_decision', {
|
|
@@ -615,6 +616,12 @@ export class VibescopeApiClient {
|
|
|
615
616
|
limit
|
|
616
617
|
});
|
|
617
618
|
}
|
|
619
|
+
async getBodyOfWorkCosts(params) {
|
|
620
|
+
return this.proxy('get_body_of_work_costs', params);
|
|
621
|
+
}
|
|
622
|
+
async getSprintCosts(params) {
|
|
623
|
+
return this.proxy('get_sprint_costs', params);
|
|
624
|
+
}
|
|
618
625
|
async getTokenUsage() {
|
|
619
626
|
return this.proxy('get_token_usage', {});
|
|
620
627
|
}
|
|
@@ -694,6 +701,78 @@ export class VibescopeApiClient {
|
|
|
694
701
|
async getHelpTopics() {
|
|
695
702
|
return this.proxy('get_help_topics', {});
|
|
696
703
|
}
|
|
704
|
+
// ============================================================================
|
|
705
|
+
// File Checkout endpoints (multi-agent coordination)
|
|
706
|
+
// ============================================================================
|
|
707
|
+
async checkoutFile(projectId, filePath, reason, sessionId) {
|
|
708
|
+
return this.proxy('checkout_file', {
|
|
709
|
+
project_id: projectId,
|
|
710
|
+
file_path: filePath,
|
|
711
|
+
reason
|
|
712
|
+
}, sessionId ? {
|
|
713
|
+
session_id: sessionId,
|
|
714
|
+
persona: null,
|
|
715
|
+
instance_id: ''
|
|
716
|
+
} : undefined);
|
|
717
|
+
}
|
|
718
|
+
async checkinFile(params, sessionId) {
|
|
719
|
+
return this.proxy('checkin_file', params, sessionId ? {
|
|
720
|
+
session_id: sessionId,
|
|
721
|
+
persona: null,
|
|
722
|
+
instance_id: ''
|
|
723
|
+
} : undefined);
|
|
724
|
+
}
|
|
725
|
+
async getFileCheckouts(projectId, options) {
|
|
726
|
+
return this.proxy('get_file_checkouts', {
|
|
727
|
+
project_id: projectId,
|
|
728
|
+
...options
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
async abandonCheckout(params) {
|
|
732
|
+
return this.proxy('abandon_checkout', params);
|
|
733
|
+
}
|
|
734
|
+
// ============================================================================
|
|
735
|
+
// Worktree Management
|
|
736
|
+
// ============================================================================
|
|
737
|
+
async getStaleWorktrees(projectId) {
|
|
738
|
+
return this.request('GET', `/api/mcp/worktrees/stale?project_id=${projectId}`);
|
|
739
|
+
}
|
|
740
|
+
async clearWorktreePath(taskId) {
|
|
741
|
+
return this.request('PATCH', `/api/mcp/tasks/${taskId}`, { worktree_path: null });
|
|
742
|
+
}
|
|
743
|
+
// ============================================================================
|
|
744
|
+
// Connector endpoints
|
|
745
|
+
// ============================================================================
|
|
746
|
+
async getConnectors(projectId, params) {
|
|
747
|
+
return this.proxy('get_connectors', {
|
|
748
|
+
project_id: projectId,
|
|
749
|
+
...params
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
async getConnector(connectorId) {
|
|
753
|
+
return this.proxy('get_connector', { connector_id: connectorId });
|
|
754
|
+
}
|
|
755
|
+
async addConnector(projectId, params) {
|
|
756
|
+
return this.proxy('add_connector', {
|
|
757
|
+
project_id: projectId,
|
|
758
|
+
...params
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
async updateConnector(connectorId, updates) {
|
|
762
|
+
return this.proxy('update_connector', {
|
|
763
|
+
connector_id: connectorId,
|
|
764
|
+
...updates
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
async deleteConnector(connectorId) {
|
|
768
|
+
return this.proxy('delete_connector', { connector_id: connectorId });
|
|
769
|
+
}
|
|
770
|
+
async testConnector(connectorId) {
|
|
771
|
+
return this.proxy('test_connector', { connector_id: connectorId });
|
|
772
|
+
}
|
|
773
|
+
async getConnectorEvents(params) {
|
|
774
|
+
return this.proxy('get_connector_events', params);
|
|
775
|
+
}
|
|
697
776
|
}
|
|
698
777
|
// Singleton instance
|
|
699
778
|
let apiClient = null;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - get_blockers
|
|
8
8
|
* - delete_blocker
|
|
9
9
|
*/
|
|
10
|
+
import { success, error } from './types.js';
|
|
10
11
|
import { parseArgs, uuidValidator, createEnumValidator, VALID_BLOCKER_STATUSES, } from '../validators.js';
|
|
11
12
|
import { getApiClient } from '../api-client.js';
|
|
12
13
|
// Argument schemas for type-safe parsing
|
|
@@ -33,18 +34,18 @@ export const addBlocker = async (args, ctx) => {
|
|
|
33
34
|
const apiClient = getApiClient();
|
|
34
35
|
const response = await apiClient.addBlocker(project_id, description, ctx.session.currentSessionId || undefined);
|
|
35
36
|
if (!response.ok) {
|
|
36
|
-
|
|
37
|
+
return error(response.error || 'Failed to add blocker');
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
+
return success(response.data);
|
|
39
40
|
};
|
|
40
41
|
export const resolveBlocker = async (args, _ctx) => {
|
|
41
42
|
const { blocker_id, resolution_note } = parseArgs(args, resolveBlockerSchema);
|
|
42
43
|
const apiClient = getApiClient();
|
|
43
44
|
const response = await apiClient.resolveBlocker(blocker_id, resolution_note);
|
|
44
45
|
if (!response.ok) {
|
|
45
|
-
|
|
46
|
+
return error(response.error || 'Failed to resolve blocker');
|
|
46
47
|
}
|
|
47
|
-
return
|
|
48
|
+
return success(response.data);
|
|
48
49
|
};
|
|
49
50
|
export const getBlockers = async (args, _ctx) => {
|
|
50
51
|
const { project_id, status, limit, offset, search_query } = parseArgs(args, getBlockersSchema);
|
|
@@ -56,18 +57,18 @@ export const getBlockers = async (args, _ctx) => {
|
|
|
56
57
|
search_query
|
|
57
58
|
});
|
|
58
59
|
if (!response.ok) {
|
|
59
|
-
|
|
60
|
+
return error(response.error || 'Failed to fetch blockers');
|
|
60
61
|
}
|
|
61
|
-
return
|
|
62
|
+
return success(response.data);
|
|
62
63
|
};
|
|
63
64
|
export const deleteBlocker = async (args, _ctx) => {
|
|
64
65
|
const { blocker_id } = parseArgs(args, deleteBlockerSchema);
|
|
65
66
|
const apiClient = getApiClient();
|
|
66
67
|
const response = await apiClient.deleteBlocker(blocker_id);
|
|
67
68
|
if (!response.ok) {
|
|
68
|
-
|
|
69
|
+
return error(response.error || 'Failed to delete blocker');
|
|
69
70
|
}
|
|
70
|
-
return
|
|
71
|
+
return success(response.data);
|
|
71
72
|
};
|
|
72
73
|
/**
|
|
73
74
|
* Blockers handlers registry
|