@vibescope/mcp-server 0.0.1 → 0.2.0

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.
Files changed (173) hide show
  1. package/README.md +113 -98
  2. package/dist/api-client.d.ts +1169 -0
  3. package/dist/api-client.js +713 -0
  4. package/dist/cli.d.ts +1 -6
  5. package/dist/cli.js +39 -240
  6. package/dist/config/tool-categories.d.ts +31 -0
  7. package/dist/config/tool-categories.js +253 -0
  8. package/dist/handlers/blockers.js +57 -58
  9. package/dist/handlers/bodies-of-work.d.ts +2 -0
  10. package/dist/handlers/bodies-of-work.js +108 -477
  11. package/dist/handlers/cost.d.ts +1 -0
  12. package/dist/handlers/cost.js +35 -113
  13. package/dist/handlers/decisions.d.ts +2 -0
  14. package/dist/handlers/decisions.js +28 -27
  15. package/dist/handlers/deployment.js +113 -828
  16. package/dist/handlers/discovery.d.ts +3 -0
  17. package/dist/handlers/discovery.js +26 -627
  18. package/dist/handlers/fallback.d.ts +2 -0
  19. package/dist/handlers/fallback.js +56 -142
  20. package/dist/handlers/findings.d.ts +8 -1
  21. package/dist/handlers/findings.js +65 -68
  22. package/dist/handlers/git-issues.d.ts +9 -13
  23. package/dist/handlers/git-issues.js +80 -225
  24. package/dist/handlers/ideas.d.ts +3 -0
  25. package/dist/handlers/ideas.js +53 -134
  26. package/dist/handlers/index.d.ts +2 -0
  27. package/dist/handlers/index.js +6 -0
  28. package/dist/handlers/milestones.d.ts +2 -0
  29. package/dist/handlers/milestones.js +51 -98
  30. package/dist/handlers/organizations.js +79 -275
  31. package/dist/handlers/progress.d.ts +2 -0
  32. package/dist/handlers/progress.js +25 -123
  33. package/dist/handlers/project.js +42 -221
  34. package/dist/handlers/requests.d.ts +2 -0
  35. package/dist/handlers/requests.js +23 -83
  36. package/dist/handlers/session.js +119 -590
  37. package/dist/handlers/sprints.d.ts +32 -0
  38. package/dist/handlers/sprints.js +275 -0
  39. package/dist/handlers/tasks.d.ts +7 -10
  40. package/dist/handlers/tasks.js +245 -894
  41. package/dist/handlers/tool-docs.d.ts +9 -0
  42. package/dist/handlers/tool-docs.js +904 -0
  43. package/dist/handlers/types.d.ts +11 -3
  44. package/dist/handlers/validation.d.ts +1 -1
  45. package/dist/handlers/validation.js +38 -153
  46. package/dist/index.js +493 -162
  47. package/dist/knowledge.js +106 -9
  48. package/dist/tools.js +34 -4
  49. package/dist/validators.d.ts +21 -0
  50. package/dist/validators.js +91 -0
  51. package/package.json +2 -3
  52. package/src/api-client.ts +1822 -0
  53. package/src/cli.test.ts +128 -302
  54. package/src/cli.ts +41 -285
  55. package/src/handlers/__test-setup__.ts +215 -0
  56. package/src/handlers/__test-utils__.ts +4 -134
  57. package/src/handlers/blockers.test.ts +114 -124
  58. package/src/handlers/blockers.ts +68 -70
  59. package/src/handlers/bodies-of-work.test.ts +236 -831
  60. package/src/handlers/bodies-of-work.ts +210 -525
  61. package/src/handlers/cost.test.ts +149 -113
  62. package/src/handlers/cost.ts +44 -132
  63. package/src/handlers/decisions.test.ts +111 -209
  64. package/src/handlers/decisions.ts +35 -27
  65. package/src/handlers/deployment.test.ts +193 -239
  66. package/src/handlers/deployment.ts +143 -896
  67. package/src/handlers/discovery.test.ts +20 -67
  68. package/src/handlers/discovery.ts +29 -714
  69. package/src/handlers/fallback.test.ts +206 -361
  70. package/src/handlers/fallback.ts +81 -156
  71. package/src/handlers/findings.test.ts +229 -320
  72. package/src/handlers/findings.ts +76 -64
  73. package/src/handlers/git-issues.test.ts +623 -0
  74. package/src/handlers/git-issues.ts +174 -0
  75. package/src/handlers/ideas.test.ts +229 -343
  76. package/src/handlers/ideas.ts +69 -143
  77. package/src/handlers/index.ts +6 -0
  78. package/src/handlers/milestones.test.ts +167 -281
  79. package/src/handlers/milestones.ts +54 -93
  80. package/src/handlers/organizations.test.ts +275 -467
  81. package/src/handlers/organizations.ts +84 -294
  82. package/src/handlers/progress.test.ts +112 -218
  83. package/src/handlers/progress.ts +29 -142
  84. package/src/handlers/project.test.ts +203 -226
  85. package/src/handlers/project.ts +48 -238
  86. package/src/handlers/requests.test.ts +74 -342
  87. package/src/handlers/requests.ts +25 -83
  88. package/src/handlers/session.test.ts +276 -206
  89. package/src/handlers/session.ts +136 -662
  90. package/src/handlers/sprints.test.ts +711 -0
  91. package/src/handlers/sprints.ts +510 -0
  92. package/src/handlers/tasks.test.ts +669 -353
  93. package/src/handlers/tasks.ts +263 -1015
  94. package/src/handlers/tool-docs.ts +1024 -0
  95. package/src/handlers/types.ts +12 -4
  96. package/src/handlers/validation.test.ts +237 -568
  97. package/src/handlers/validation.ts +43 -167
  98. package/src/index.ts +493 -186
  99. package/src/tools.ts +2532 -0
  100. package/src/validators.test.ts +223 -223
  101. package/src/validators.ts +127 -0
  102. package/tsconfig.json +1 -1
  103. package/vitest.config.ts +14 -13
  104. package/dist/cli.test.d.ts +0 -1
  105. package/dist/cli.test.js +0 -367
  106. package/dist/handlers/__test-utils__.d.ts +0 -72
  107. package/dist/handlers/__test-utils__.js +0 -176
  108. package/dist/handlers/checkouts.d.ts +0 -37
  109. package/dist/handlers/checkouts.js +0 -377
  110. package/dist/handlers/knowledge-query.d.ts +0 -22
  111. package/dist/handlers/knowledge-query.js +0 -253
  112. package/dist/handlers/knowledge.d.ts +0 -12
  113. package/dist/handlers/knowledge.js +0 -108
  114. package/dist/handlers/roles.d.ts +0 -30
  115. package/dist/handlers/roles.js +0 -281
  116. package/dist/handlers/tasks.test.d.ts +0 -1
  117. package/dist/handlers/tasks.test.js +0 -431
  118. package/dist/utils.test.d.ts +0 -1
  119. package/dist/utils.test.js +0 -532
  120. package/dist/validators.test.d.ts +0 -1
  121. package/dist/validators.test.js +0 -176
  122. package/src/knowledge.ts +0 -132
  123. package/src/tmpclaude-0078-cwd +0 -1
  124. package/src/tmpclaude-0ee1-cwd +0 -1
  125. package/src/tmpclaude-2dd5-cwd +0 -1
  126. package/src/tmpclaude-344c-cwd +0 -1
  127. package/src/tmpclaude-3860-cwd +0 -1
  128. package/src/tmpclaude-4b63-cwd +0 -1
  129. package/src/tmpclaude-5c73-cwd +0 -1
  130. package/src/tmpclaude-5ee3-cwd +0 -1
  131. package/src/tmpclaude-6795-cwd +0 -1
  132. package/src/tmpclaude-709e-cwd +0 -1
  133. package/src/tmpclaude-9839-cwd +0 -1
  134. package/src/tmpclaude-d829-cwd +0 -1
  135. package/src/tmpclaude-e072-cwd +0 -1
  136. package/src/tmpclaude-f6ee-cwd +0 -1
  137. package/tmpclaude-0439-cwd +0 -1
  138. package/tmpclaude-132f-cwd +0 -1
  139. package/tmpclaude-15bb-cwd +0 -1
  140. package/tmpclaude-165a-cwd +0 -1
  141. package/tmpclaude-1ba9-cwd +0 -1
  142. package/tmpclaude-21a3-cwd +0 -1
  143. package/tmpclaude-2a38-cwd +0 -1
  144. package/tmpclaude-2adf-cwd +0 -1
  145. package/tmpclaude-2f56-cwd +0 -1
  146. package/tmpclaude-3626-cwd +0 -1
  147. package/tmpclaude-3727-cwd +0 -1
  148. package/tmpclaude-40bc-cwd +0 -1
  149. package/tmpclaude-436f-cwd +0 -1
  150. package/tmpclaude-4783-cwd +0 -1
  151. package/tmpclaude-4b6d-cwd +0 -1
  152. package/tmpclaude-4ba4-cwd +0 -1
  153. package/tmpclaude-51e6-cwd +0 -1
  154. package/tmpclaude-5ecf-cwd +0 -1
  155. package/tmpclaude-6f97-cwd +0 -1
  156. package/tmpclaude-7fb2-cwd +0 -1
  157. package/tmpclaude-825c-cwd +0 -1
  158. package/tmpclaude-8baf-cwd +0 -1
  159. package/tmpclaude-8d9f-cwd +0 -1
  160. package/tmpclaude-975c-cwd +0 -1
  161. package/tmpclaude-9983-cwd +0 -1
  162. package/tmpclaude-a045-cwd +0 -1
  163. package/tmpclaude-ac4a-cwd +0 -1
  164. package/tmpclaude-b593-cwd +0 -1
  165. package/tmpclaude-b891-cwd +0 -1
  166. package/tmpclaude-c032-cwd +0 -1
  167. package/tmpclaude-cf43-cwd +0 -1
  168. package/tmpclaude-d040-cwd +0 -1
  169. package/tmpclaude-dcdd-cwd +0 -1
  170. package/tmpclaude-dcee-cwd +0 -1
  171. package/tmpclaude-e16b-cwd +0 -1
  172. package/tmpclaude-ecd2-cwd +0 -1
  173. package/tmpclaude-f48d-cwd +0 -1
@@ -0,0 +1,1169 @@
1
+ /**
2
+ * Vibescope API Client
3
+ *
4
+ * HTTP client for communicating with the Vibescope API.
5
+ * All database operations are handled server-side through these endpoints.
6
+ */
7
+ interface ApiClientConfig {
8
+ apiKey: string;
9
+ baseUrl?: string;
10
+ }
11
+ interface ApiResponse<T> {
12
+ ok: boolean;
13
+ status: number;
14
+ data?: T;
15
+ error?: string;
16
+ }
17
+ export declare class VibescopeApiClient {
18
+ private apiKey;
19
+ private baseUrl;
20
+ constructor(config: ApiClientConfig);
21
+ private request;
22
+ validateAuth(): Promise<ApiResponse<{
23
+ valid: boolean;
24
+ user_id: string;
25
+ api_key_id: string;
26
+ key_name: string;
27
+ }>>;
28
+ startSession(params: {
29
+ project_id?: string;
30
+ git_url?: string;
31
+ mode?: 'lite' | 'full';
32
+ model?: 'opus' | 'sonnet' | 'haiku';
33
+ role?: 'developer' | 'validator' | 'deployer' | 'reviewer' | 'maintainer';
34
+ }): Promise<ApiResponse<{
35
+ session_started: boolean;
36
+ session_id?: string;
37
+ persona?: string;
38
+ role?: string;
39
+ project?: {
40
+ id: string;
41
+ name: string;
42
+ description?: string;
43
+ goal?: string;
44
+ status?: string;
45
+ git_url?: string;
46
+ agent_instructions?: string;
47
+ tech_stack?: string[];
48
+ git_workflow?: string;
49
+ git_main_branch?: string;
50
+ git_develop_branch?: string;
51
+ git_auto_branch?: boolean;
52
+ };
53
+ active_tasks?: Array<{
54
+ id: string;
55
+ title: string;
56
+ status: string;
57
+ priority: number;
58
+ progress_percentage?: number;
59
+ estimated_minutes?: number;
60
+ }>;
61
+ blockers?: Array<{
62
+ id: string;
63
+ description: string;
64
+ status: string;
65
+ }>;
66
+ next_task?: {
67
+ id: string;
68
+ title: string;
69
+ priority: number;
70
+ estimated_minutes?: number;
71
+ } | null;
72
+ directive?: string;
73
+ blockers_count?: number;
74
+ validation_count?: number;
75
+ project_not_found?: boolean;
76
+ message?: string;
77
+ suggestion?: {
78
+ action: string;
79
+ example: string;
80
+ note: string;
81
+ };
82
+ error?: string;
83
+ }>>;
84
+ heartbeat(sessionId: string, options?: {
85
+ current_worktree_path?: string | null;
86
+ }): Promise<ApiResponse<{
87
+ success: boolean;
88
+ session_id: string;
89
+ timestamp: string;
90
+ }>>;
91
+ endSession(sessionId: string): Promise<ApiResponse<{
92
+ success: boolean;
93
+ ended_session_id?: string;
94
+ session_summary?: {
95
+ agent_name: string;
96
+ tasks_completed_this_session: number;
97
+ tasks_awaiting_validation: number;
98
+ tasks_released: number;
99
+ };
100
+ reminders?: string[];
101
+ }>>;
102
+ listProjects(): Promise<ApiResponse<{
103
+ projects: Array<{
104
+ id: string;
105
+ name: string;
106
+ description?: string;
107
+ status: string;
108
+ git_url?: string;
109
+ goal?: string;
110
+ tech_stack?: string[];
111
+ }>;
112
+ }>>;
113
+ createProject(params: {
114
+ name: string;
115
+ description?: string;
116
+ goal?: string;
117
+ git_url?: string;
118
+ tech_stack?: string[];
119
+ }): Promise<ApiResponse<{
120
+ success: boolean;
121
+ project: {
122
+ id: string;
123
+ name: string;
124
+ };
125
+ }>>;
126
+ getProject(projectId: string, gitUrl?: string): Promise<ApiResponse<{
127
+ found: boolean;
128
+ project?: {
129
+ id: string;
130
+ name: string;
131
+ description?: string;
132
+ goal?: string;
133
+ status: string;
134
+ git_url?: string;
135
+ agent_instructions?: string;
136
+ tech_stack?: string[];
137
+ git_workflow?: string;
138
+ git_main_branch?: string;
139
+ git_develop_branch?: string;
140
+ git_auto_branch?: boolean;
141
+ git_auto_tag?: boolean;
142
+ deployment_instructions?: string;
143
+ };
144
+ active_tasks?: Array<{
145
+ id: string;
146
+ title: string;
147
+ description?: string;
148
+ priority: number;
149
+ status: string;
150
+ progress_percentage?: number;
151
+ estimated_minutes?: number;
152
+ }>;
153
+ open_blockers?: Array<{
154
+ id: string;
155
+ description: string;
156
+ }>;
157
+ recent_decisions?: Array<{
158
+ id: string;
159
+ title: string;
160
+ description?: string;
161
+ }>;
162
+ message?: string;
163
+ }>>;
164
+ updateProject(projectId: string, updates: {
165
+ name?: string;
166
+ description?: string;
167
+ goal?: string;
168
+ git_url?: string;
169
+ tech_stack?: string[];
170
+ status?: string;
171
+ git_workflow?: string;
172
+ git_main_branch?: string;
173
+ git_develop_branch?: string;
174
+ git_auto_branch?: boolean;
175
+ git_auto_tag?: boolean;
176
+ deployment_instructions?: string;
177
+ agent_instructions?: string;
178
+ }): Promise<ApiResponse<{
179
+ success: boolean;
180
+ project_id: string;
181
+ }>>;
182
+ getTasks(projectId: string, params?: {
183
+ status?: string;
184
+ limit?: number;
185
+ offset?: number;
186
+ include_subtasks?: boolean;
187
+ search_query?: string;
188
+ include_metadata?: boolean;
189
+ }): Promise<ApiResponse<{
190
+ tasks: Array<{
191
+ id: string;
192
+ title: string;
193
+ description?: string;
194
+ priority: number;
195
+ status: string;
196
+ progress_percentage?: number;
197
+ estimated_minutes?: number;
198
+ started_at?: string;
199
+ completed_at?: string;
200
+ parent_task_id?: string;
201
+ }>;
202
+ total_count: number;
203
+ has_more: boolean;
204
+ }>>;
205
+ createTask(projectId: string, params: {
206
+ title: string;
207
+ description?: string;
208
+ priority?: number;
209
+ estimated_minutes?: number;
210
+ blocking?: boolean;
211
+ session_id?: string;
212
+ }): Promise<ApiResponse<{
213
+ success: boolean;
214
+ task_id: string;
215
+ title: string;
216
+ blocking?: boolean;
217
+ message?: string;
218
+ }>>;
219
+ getNextTask(projectId: string, sessionId?: string): Promise<ApiResponse<{
220
+ task?: {
221
+ id: string;
222
+ title: string;
223
+ description?: string;
224
+ priority: number;
225
+ estimated_minutes?: number;
226
+ blocking?: boolean;
227
+ } | null;
228
+ blocking_task?: boolean;
229
+ deployment_blocks_tasks?: boolean;
230
+ deployment?: {
231
+ id: string;
232
+ status: string;
233
+ env: string;
234
+ };
235
+ awaiting_validation?: Array<{
236
+ id: string;
237
+ title: string;
238
+ }>;
239
+ validation_priority?: string;
240
+ all_claimed?: boolean;
241
+ is_subtask?: boolean;
242
+ suggested_activity?: string;
243
+ directive?: string;
244
+ message?: string;
245
+ action?: string;
246
+ }>>;
247
+ getTask(taskId: string): Promise<ApiResponse<{
248
+ task: {
249
+ id: string;
250
+ title: string;
251
+ description?: string;
252
+ priority: number;
253
+ status: string;
254
+ progress_percentage?: number;
255
+ estimated_minutes?: number;
256
+ started_at?: string;
257
+ completed_at?: string;
258
+ git_branch?: string;
259
+ blocking?: boolean;
260
+ references?: Array<{
261
+ url: string;
262
+ label?: string;
263
+ }>;
264
+ parent_task_id?: string;
265
+ working_agent_session_id?: string;
266
+ };
267
+ }>>;
268
+ updateTask(taskId: string, updates: {
269
+ title?: string;
270
+ description?: string;
271
+ priority?: number;
272
+ status?: string;
273
+ progress_percentage?: number;
274
+ progress_note?: string;
275
+ estimated_minutes?: number;
276
+ git_branch?: string;
277
+ session_id?: string;
278
+ }): Promise<ApiResponse<{
279
+ success: boolean;
280
+ task_id: string;
281
+ git_workflow?: {
282
+ workflow: string;
283
+ base_branch: string;
284
+ suggested_branch: string;
285
+ worktree_required: boolean;
286
+ };
287
+ worktree_setup?: {
288
+ message: string;
289
+ commands: string[];
290
+ worktree_path: string;
291
+ branch_name: string;
292
+ cleanup_command: string;
293
+ };
294
+ next_step?: string;
295
+ }>>;
296
+ completeTask(taskId: string, params: {
297
+ summary?: string;
298
+ session_id?: string;
299
+ }): Promise<ApiResponse<{
300
+ success: boolean;
301
+ directive: string;
302
+ auto_continue: boolean;
303
+ completed_task_id: string;
304
+ next_task?: {
305
+ id: string;
306
+ title: string;
307
+ priority: number;
308
+ estimated_minutes?: number;
309
+ } | null;
310
+ context?: {
311
+ validation?: number;
312
+ blockers?: number;
313
+ deployment?: string;
314
+ };
315
+ next_action: string;
316
+ warnings?: string[];
317
+ }>>;
318
+ deleteTask(taskId: string): Promise<ApiResponse<{
319
+ success: boolean;
320
+ deleted_id: string;
321
+ }>>;
322
+ logProgress(projectId: string, params: {
323
+ summary: string;
324
+ details?: string;
325
+ task_id?: string;
326
+ session_id?: string;
327
+ }): Promise<ApiResponse<{
328
+ success: boolean;
329
+ progress_id: string;
330
+ }>>;
331
+ getGitWorkflow(projectId: string, taskId?: string): Promise<ApiResponse<{
332
+ workflow: string;
333
+ main_branch: string;
334
+ develop_branch?: string | null;
335
+ auto_branch?: boolean;
336
+ auto_tag?: boolean;
337
+ instructions: string[];
338
+ task?: {
339
+ id: string;
340
+ title: string;
341
+ current_branch?: string;
342
+ suggested_branch?: string | null;
343
+ };
344
+ }>>;
345
+ proxy<T>(operation: string, args: Record<string, unknown>, sessionContext?: {
346
+ session_id: string | null;
347
+ persona: string | null;
348
+ instance_id: string;
349
+ }): Promise<ApiResponse<T>>;
350
+ getBlockers(projectId: string, params?: {
351
+ status?: string;
352
+ limit?: number;
353
+ offset?: number;
354
+ search_query?: string;
355
+ }): Promise<ApiResponse<{
356
+ blockers: Array<{
357
+ id: string;
358
+ description: string;
359
+ status: string;
360
+ resolution_note?: string;
361
+ created_at: string;
362
+ resolved_at?: string;
363
+ }>;
364
+ total_count?: number;
365
+ has_more?: boolean;
366
+ }>>;
367
+ addBlocker(projectId: string, description: string, sessionId?: string): Promise<ApiResponse<{
368
+ success: boolean;
369
+ blocker_id: string;
370
+ }>>;
371
+ resolveBlocker(blockerId: string, resolutionNote?: string): Promise<ApiResponse<{
372
+ success: boolean;
373
+ blocker_id: string;
374
+ }>>;
375
+ deleteBlocker(blockerId: string): Promise<ApiResponse<{
376
+ success: boolean;
377
+ }>>;
378
+ getDecisions(projectId: string): Promise<ApiResponse<{
379
+ decisions: Array<{
380
+ id: string;
381
+ title: string;
382
+ description: string;
383
+ rationale?: string;
384
+ alternatives_considered?: string[];
385
+ created_at: string;
386
+ }>;
387
+ }>>;
388
+ logDecision(projectId: string, params: {
389
+ title: string;
390
+ description: string;
391
+ rationale?: string;
392
+ alternatives_considered?: string[];
393
+ }, sessionId?: string): Promise<ApiResponse<{
394
+ success: boolean;
395
+ decision_id: string;
396
+ }>>;
397
+ deleteDecision(decisionId: string): Promise<ApiResponse<{
398
+ success: boolean;
399
+ }>>;
400
+ getIdeas(projectId: string, params?: {
401
+ status?: string;
402
+ limit?: number;
403
+ offset?: number;
404
+ search_query?: string;
405
+ }): Promise<ApiResponse<{
406
+ ideas: Array<{
407
+ id: string;
408
+ title: string;
409
+ description?: string;
410
+ status: string;
411
+ doc_url?: string;
412
+ created_at: string;
413
+ }>;
414
+ }>>;
415
+ addIdea(projectId: string, params: {
416
+ title: string;
417
+ description?: string;
418
+ status?: string;
419
+ }, sessionId?: string): Promise<ApiResponse<{
420
+ success: boolean;
421
+ idea_id: string;
422
+ }>>;
423
+ updateIdea(ideaId: string, updates: {
424
+ title?: string;
425
+ description?: string;
426
+ status?: string;
427
+ doc_url?: string;
428
+ }): Promise<ApiResponse<{
429
+ success: boolean;
430
+ idea_id: string;
431
+ }>>;
432
+ deleteIdea(ideaId: string): Promise<ApiResponse<{
433
+ success: boolean;
434
+ }>>;
435
+ convertIdeaToTask(ideaId: string, params?: {
436
+ priority?: number;
437
+ estimated_minutes?: number;
438
+ update_status?: boolean;
439
+ }): Promise<ApiResponse<{
440
+ success: boolean;
441
+ task_id?: string;
442
+ task_title?: string;
443
+ idea_id?: string;
444
+ idea_status?: string;
445
+ message?: string;
446
+ error?: string;
447
+ existing_task_id?: string;
448
+ }>>;
449
+ getFindings(projectId: string, params?: {
450
+ category?: string;
451
+ severity?: string;
452
+ status?: string;
453
+ limit?: number;
454
+ offset?: number;
455
+ search_query?: string;
456
+ summary_only?: boolean;
457
+ }): Promise<ApiResponse<{
458
+ findings: Array<{
459
+ id: string;
460
+ title: string;
461
+ description?: string;
462
+ category: string;
463
+ severity: string;
464
+ status: string;
465
+ file_path?: string;
466
+ line_number?: number;
467
+ resolution_note?: string;
468
+ created_at: string;
469
+ }>;
470
+ total_count?: number;
471
+ has_more?: boolean;
472
+ }>>;
473
+ getFindingsStats(projectId: string): Promise<ApiResponse<{
474
+ total: number;
475
+ by_status: Record<string, number>;
476
+ by_severity: Record<string, number>;
477
+ by_category: Record<string, number>;
478
+ }>>;
479
+ addFinding(projectId: string, params: {
480
+ title: string;
481
+ description?: string;
482
+ category?: string;
483
+ severity?: string;
484
+ file_path?: string;
485
+ line_number?: number;
486
+ related_task_id?: string;
487
+ }, sessionId?: string): Promise<ApiResponse<{
488
+ success: boolean;
489
+ finding_id: string;
490
+ }>>;
491
+ updateFinding(findingId: string, updates: {
492
+ title?: string;
493
+ description?: string;
494
+ severity?: string;
495
+ status?: string;
496
+ resolution_note?: string;
497
+ }): Promise<ApiResponse<{
498
+ success: boolean;
499
+ finding_id: string;
500
+ }>>;
501
+ deleteFinding(findingId: string): Promise<ApiResponse<{
502
+ success: boolean;
503
+ }>>;
504
+ getMilestones(taskId: string): Promise<ApiResponse<{
505
+ milestones: Array<{
506
+ id: string;
507
+ title: string;
508
+ description?: string;
509
+ status: string;
510
+ order_index: number;
511
+ created_at: string;
512
+ completed_at?: string;
513
+ }>;
514
+ stats: {
515
+ total: number;
516
+ completed: number;
517
+ progress_percentage: number;
518
+ };
519
+ }>>;
520
+ addMilestone(taskId: string, params: {
521
+ title: string;
522
+ description?: string;
523
+ order_index?: number;
524
+ }, sessionId?: string): Promise<ApiResponse<{
525
+ success: boolean;
526
+ milestone_id: string;
527
+ }>>;
528
+ updateMilestone(milestoneId: string, updates: {
529
+ title?: string;
530
+ description?: string;
531
+ status?: string;
532
+ order_index?: number;
533
+ }): Promise<ApiResponse<{
534
+ success: boolean;
535
+ milestone: {
536
+ id: string;
537
+ title: string;
538
+ status: string;
539
+ };
540
+ }>>;
541
+ completeMilestone(milestoneId: string): Promise<ApiResponse<{
542
+ success: boolean;
543
+ milestone: {
544
+ id: string;
545
+ title: string;
546
+ status: string;
547
+ };
548
+ }>>;
549
+ deleteMilestone(milestoneId: string): Promise<ApiResponse<{
550
+ success: boolean;
551
+ }>>;
552
+ getPendingRequests(projectId: string, sessionId?: string): Promise<ApiResponse<{
553
+ requests: Array<{
554
+ id: string;
555
+ request_type: string;
556
+ message: string;
557
+ created_at: string;
558
+ }>;
559
+ }>>;
560
+ acknowledgeRequest(requestId: string, sessionId?: string): Promise<ApiResponse<{
561
+ success: boolean;
562
+ }>>;
563
+ answerQuestion(requestId: string, answer: string, sessionId?: string): Promise<ApiResponse<{
564
+ success: boolean;
565
+ }>>;
566
+ getTasksAwaitingValidation(projectId: string): Promise<ApiResponse<{
567
+ tasks: Array<{
568
+ id: string;
569
+ title: string;
570
+ completed_at?: string;
571
+ completed_by_session_id?: string;
572
+ }>;
573
+ }>>;
574
+ claimValidation(taskId: string, sessionId?: string): Promise<ApiResponse<{
575
+ success: boolean;
576
+ task_id: string;
577
+ }>>;
578
+ validateTask(taskId: string, params: {
579
+ approved: boolean;
580
+ validation_notes?: string;
581
+ skip_pr_check?: boolean;
582
+ }, sessionId?: string): Promise<ApiResponse<{
583
+ success: boolean;
584
+ approved: boolean;
585
+ task_id: string;
586
+ message?: string;
587
+ workflow?: string;
588
+ }>>;
589
+ startFallbackActivity(projectId: string, activity: string, sessionId?: string): Promise<ApiResponse<{
590
+ success: boolean;
591
+ activity: string;
592
+ message: string;
593
+ git_workflow?: {
594
+ workflow: string;
595
+ base_branch: string;
596
+ worktree_recommended: boolean;
597
+ note: string;
598
+ };
599
+ worktree_setup?: {
600
+ message: string;
601
+ commands: string[];
602
+ worktree_path: string;
603
+ branch_name: string;
604
+ cleanup_command: string;
605
+ report_worktree: string;
606
+ };
607
+ next_step?: string;
608
+ }>>;
609
+ stopFallbackActivity(projectId: string, summary?: string, sessionId?: string): Promise<ApiResponse<{
610
+ success: boolean;
611
+ }>>;
612
+ getActivityHistory(projectId: string, params?: {
613
+ activity_type?: string;
614
+ limit?: number;
615
+ }): Promise<ApiResponse<{
616
+ history: Array<{
617
+ id: string;
618
+ activity_type: string;
619
+ completed_at: string;
620
+ summary?: string;
621
+ }>;
622
+ latest_by_type: Record<string, unknown>;
623
+ count: number;
624
+ }>>;
625
+ getActivitySchedules(projectId: string): Promise<ApiResponse<{
626
+ schedules: Array<{
627
+ id: string;
628
+ activity_type: string;
629
+ schedule_type: string;
630
+ next_run_at?: string;
631
+ enabled: boolean;
632
+ }>;
633
+ due_activities: string[];
634
+ count: number;
635
+ }>>;
636
+ addSubtask(parentTaskId: string, params: {
637
+ title: string;
638
+ description?: string;
639
+ priority?: number;
640
+ estimated_minutes?: number;
641
+ }, sessionId?: string): Promise<ApiResponse<{
642
+ success: boolean;
643
+ subtask_id: string;
644
+ parent_task_id: string;
645
+ }>>;
646
+ getSubtasks(parentTaskId: string, status?: string): Promise<ApiResponse<{
647
+ subtasks: Array<{
648
+ id: string;
649
+ title: string;
650
+ description?: string;
651
+ priority: number;
652
+ status: string;
653
+ progress_percentage?: number;
654
+ estimated_minutes?: number;
655
+ }>;
656
+ stats: {
657
+ total: number;
658
+ completed: number;
659
+ progress_percentage: number;
660
+ };
661
+ }>>;
662
+ getActivityFeed(projectId: string, params?: {
663
+ limit?: number;
664
+ since?: string;
665
+ }): Promise<ApiResponse<{
666
+ activities: Array<{
667
+ type: string;
668
+ data: unknown;
669
+ timestamp: string;
670
+ }>;
671
+ }>>;
672
+ requestDeployment(projectId: string, params?: {
673
+ environment?: string;
674
+ version_bump?: string;
675
+ git_ref?: string;
676
+ notes?: string;
677
+ }, sessionId?: string): Promise<ApiResponse<{
678
+ success: boolean;
679
+ deployment_id: string;
680
+ status: string;
681
+ }>>;
682
+ checkDeploymentStatus(projectId: string): Promise<ApiResponse<{
683
+ active_deployment: boolean;
684
+ deployment?: {
685
+ id: string;
686
+ status: string;
687
+ environment: string;
688
+ git_ref?: string;
689
+ created_at: string;
690
+ };
691
+ }>>;
692
+ claimDeploymentValidation(projectId: string, sessionId?: string): Promise<ApiResponse<{
693
+ success: boolean;
694
+ deployment_id: string;
695
+ message: string;
696
+ }>>;
697
+ reportValidation(projectId: string, params: {
698
+ build_passed: boolean;
699
+ tests_passed: boolean;
700
+ error_message?: string;
701
+ }): Promise<ApiResponse<{
702
+ success: boolean;
703
+ deployment_id: string;
704
+ status: string;
705
+ }>>;
706
+ startDeployment(projectId: string, sessionId?: string): Promise<ApiResponse<{
707
+ success: boolean;
708
+ deployment_id: string;
709
+ instructions: string;
710
+ }>>;
711
+ completeDeployment(projectId: string, params: {
712
+ success: boolean;
713
+ summary?: string;
714
+ }): Promise<ApiResponse<{
715
+ success: boolean;
716
+ deployment_id: string;
717
+ status: string;
718
+ }>>;
719
+ cancelDeployment(projectId: string, reason?: string): Promise<ApiResponse<{
720
+ success: boolean;
721
+ }>>;
722
+ addTaskReference(taskId: string, url: string, label?: string): Promise<ApiResponse<{
723
+ success: boolean;
724
+ reference: {
725
+ url: string;
726
+ label?: string;
727
+ };
728
+ }>>;
729
+ removeTaskReference(taskId: string, url: string): Promise<ApiResponse<{
730
+ success: boolean;
731
+ }>>;
732
+ queryKnowledgeBase(projectId: string, params?: {
733
+ categories?: string[];
734
+ limit?: number;
735
+ search_query?: string;
736
+ }): Promise<ApiResponse<{
737
+ findings?: Array<{
738
+ id: string;
739
+ title: string;
740
+ category: string;
741
+ severity: string;
742
+ }>;
743
+ decisions?: Array<{
744
+ id: string;
745
+ title: string;
746
+ description: string;
747
+ }>;
748
+ completed_tasks?: Array<{
749
+ id: string;
750
+ title: string;
751
+ completed_at: string;
752
+ }>;
753
+ resolved_blockers?: Array<{
754
+ id: string;
755
+ description: string;
756
+ resolution_note?: string;
757
+ }>;
758
+ }>>;
759
+ syncSession(sessionId: string, params?: {
760
+ total_tokens?: number;
761
+ token_breakdown?: Record<string, unknown>;
762
+ model_usage?: Record<string, unknown>;
763
+ }): Promise<ApiResponse<{
764
+ success: boolean;
765
+ }>>;
766
+ listOrganizations(): Promise<ApiResponse<{
767
+ organizations: Array<{
768
+ id: string;
769
+ name: string;
770
+ slug: string;
771
+ description?: string;
772
+ role: string;
773
+ }>;
774
+ }>>;
775
+ createOrganization(params: {
776
+ name: string;
777
+ slug?: string;
778
+ description?: string;
779
+ }): Promise<ApiResponse<{
780
+ success: boolean;
781
+ organization: {
782
+ id: string;
783
+ name: string;
784
+ slug: string;
785
+ };
786
+ }>>;
787
+ updateOrganization(organizationId: string, updates: {
788
+ name?: string;
789
+ description?: string;
790
+ logo_url?: string;
791
+ }): Promise<ApiResponse<{
792
+ success: boolean;
793
+ organization_id: string;
794
+ }>>;
795
+ deleteOrganization(organizationId: string): Promise<ApiResponse<{
796
+ success: boolean;
797
+ }>>;
798
+ listOrgMembers(organizationId: string): Promise<ApiResponse<{
799
+ members: Array<{
800
+ user_id: string;
801
+ email: string;
802
+ role: string;
803
+ joined_at: string;
804
+ }>;
805
+ }>>;
806
+ inviteMember(organizationId: string, email: string, role?: string): Promise<ApiResponse<{
807
+ success: boolean;
808
+ invite_id: string;
809
+ }>>;
810
+ updateMemberRole(organizationId: string, userId: string, role: string): Promise<ApiResponse<{
811
+ success: boolean;
812
+ }>>;
813
+ removeMember(organizationId: string, userId: string): Promise<ApiResponse<{
814
+ success: boolean;
815
+ }>>;
816
+ shareProjectWithOrg(projectId: string, organizationId: string, permission?: string): Promise<ApiResponse<{
817
+ success: boolean;
818
+ }>>;
819
+ unshareProject(projectId: string, organizationId: string): Promise<ApiResponse<{
820
+ success: boolean;
821
+ }>>;
822
+ leaveOrganization(organizationId: string): Promise<ApiResponse<{
823
+ success: boolean;
824
+ message: string;
825
+ }>>;
826
+ updateProjectShare(projectId: string, organizationId: string, permission: string): Promise<ApiResponse<{
827
+ success: boolean;
828
+ share: {
829
+ permission: string;
830
+ };
831
+ }>>;
832
+ listProjectShares(projectId: string): Promise<ApiResponse<{
833
+ shares: Array<{
834
+ id: string;
835
+ permission: string;
836
+ shared_at: string;
837
+ organization: {
838
+ id: string;
839
+ name: string;
840
+ slug: string;
841
+ };
842
+ }>;
843
+ count: number;
844
+ }>>;
845
+ createBodyOfWork(projectId: string, params: {
846
+ title: string;
847
+ description?: string;
848
+ auto_deploy_on_completion?: boolean;
849
+ deploy_environment?: string;
850
+ deploy_version_bump?: string;
851
+ deploy_trigger?: string;
852
+ }): Promise<ApiResponse<{
853
+ success: boolean;
854
+ body_of_work_id: string;
855
+ }>>;
856
+ getBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
857
+ body_of_work: {
858
+ id: string;
859
+ title: string;
860
+ description?: string;
861
+ status: string;
862
+ auto_deploy_on_completion: boolean;
863
+ };
864
+ tasks: {
865
+ pre: Array<{
866
+ id: string;
867
+ title: string;
868
+ status: string;
869
+ }>;
870
+ core: Array<{
871
+ id: string;
872
+ title: string;
873
+ status: string;
874
+ }>;
875
+ post: Array<{
876
+ id: string;
877
+ title: string;
878
+ status: string;
879
+ }>;
880
+ };
881
+ }>>;
882
+ getBodiesOfWork(projectId: string, params?: {
883
+ status?: string;
884
+ limit?: number;
885
+ offset?: number;
886
+ search_query?: string;
887
+ }): Promise<ApiResponse<{
888
+ bodies_of_work: Array<{
889
+ id: string;
890
+ title: string;
891
+ description?: string;
892
+ status: string;
893
+ task_counts: {
894
+ pre: number;
895
+ core: number;
896
+ post: number;
897
+ };
898
+ }>;
899
+ }>>;
900
+ updateBodyOfWork(bodyOfWorkId: string, updates: {
901
+ title?: string;
902
+ description?: string;
903
+ auto_deploy_on_completion?: boolean;
904
+ deploy_environment?: string;
905
+ deploy_version_bump?: string;
906
+ deploy_trigger?: string;
907
+ }): Promise<ApiResponse<{
908
+ success: boolean;
909
+ }>>;
910
+ deleteBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
911
+ success: boolean;
912
+ }>>;
913
+ addTaskToBodyOfWork(bodyOfWorkId: string, taskId: string, phase?: string, orderIndex?: number): Promise<ApiResponse<{
914
+ success: boolean;
915
+ }>>;
916
+ removeTaskFromBodyOfWork(taskId: string): Promise<ApiResponse<{
917
+ success: boolean;
918
+ }>>;
919
+ activateBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
920
+ success: boolean;
921
+ status: string;
922
+ }>>;
923
+ addTaskDependency(bodyOfWorkId: string, taskId: string, dependsOnTaskId: string): Promise<ApiResponse<{
924
+ success: boolean;
925
+ }>>;
926
+ removeTaskDependency(taskId: string, dependsOnTaskId: string): Promise<ApiResponse<{
927
+ success: boolean;
928
+ }>>;
929
+ getTaskDependencies(params: {
930
+ body_of_work_id?: string;
931
+ task_id?: string;
932
+ }): Promise<ApiResponse<{
933
+ dependencies: Array<{
934
+ id: string;
935
+ task_id: string;
936
+ depends_on_task_id: string;
937
+ created_at: string;
938
+ }>;
939
+ }>>;
940
+ getNextBodyOfWorkTask(bodyOfWorkId: string): Promise<ApiResponse<{
941
+ task?: {
942
+ id: string;
943
+ title: string;
944
+ priority: number;
945
+ phase: string;
946
+ } | null;
947
+ message?: string;
948
+ }>>;
949
+ addGitIssue(projectId: string, params: {
950
+ issue_type: string;
951
+ branch: string;
952
+ target_branch?: string;
953
+ pr_url?: string;
954
+ conflicting_files?: string[];
955
+ error_message?: string;
956
+ task_id?: string;
957
+ }, sessionId?: string): Promise<ApiResponse<{
958
+ success: boolean;
959
+ git_issue_id: string;
960
+ }>>;
961
+ resolveGitIssue(gitIssueId: string, params?: {
962
+ resolution_note?: string;
963
+ auto_resolved?: boolean;
964
+ }, sessionId?: string): Promise<ApiResponse<{
965
+ success: boolean;
966
+ git_issue_id: string;
967
+ }>>;
968
+ getGitIssues(projectId: string, params?: {
969
+ status?: string;
970
+ issue_type?: string;
971
+ branch?: string;
972
+ limit?: number;
973
+ }): Promise<ApiResponse<{
974
+ git_issues: Array<{
975
+ id: string;
976
+ issue_type: string;
977
+ branch: string;
978
+ target_branch?: string;
979
+ pr_url?: string;
980
+ conflicting_files?: string[];
981
+ error_message?: string;
982
+ status: string;
983
+ created_at: string;
984
+ resolved_at?: string;
985
+ }>;
986
+ }>>;
987
+ deleteGitIssue(gitIssueId: string): Promise<ApiResponse<{
988
+ success: boolean;
989
+ }>>;
990
+ getCostSummary(projectId: string, params?: {
991
+ period?: 'daily' | 'weekly' | 'monthly';
992
+ limit?: number;
993
+ }): Promise<ApiResponse<{
994
+ summaries: Array<{
995
+ date: string;
996
+ total_cost: number;
997
+ input_tokens: number;
998
+ output_tokens: number;
999
+ }>;
1000
+ }>>;
1001
+ getCostAlerts(): Promise<ApiResponse<{
1002
+ alerts: Array<{
1003
+ id: string;
1004
+ threshold_amount: number;
1005
+ threshold_period: string;
1006
+ alert_type: string;
1007
+ enabled: boolean;
1008
+ }>;
1009
+ }>>;
1010
+ addCostAlert(params: {
1011
+ threshold_amount: number;
1012
+ threshold_period: 'daily' | 'weekly' | 'monthly';
1013
+ alert_type?: 'warning' | 'critical';
1014
+ project_id?: string;
1015
+ }): Promise<ApiResponse<{
1016
+ success: boolean;
1017
+ alert_id: string;
1018
+ }>>;
1019
+ updateCostAlert(alertId: string, updates: {
1020
+ threshold_amount?: number;
1021
+ threshold_period?: string;
1022
+ alert_type?: string;
1023
+ enabled?: boolean;
1024
+ }): Promise<ApiResponse<{
1025
+ success: boolean;
1026
+ }>>;
1027
+ deleteCostAlert(alertId: string): Promise<ApiResponse<{
1028
+ success: boolean;
1029
+ }>>;
1030
+ getTaskCosts(projectId: string, limit?: number): Promise<ApiResponse<{
1031
+ task_costs: Array<{
1032
+ task_id: string;
1033
+ title: string;
1034
+ total_cost: number;
1035
+ input_tokens: number;
1036
+ output_tokens: number;
1037
+ }>;
1038
+ }>>;
1039
+ getTokenUsage(): Promise<ApiResponse<{
1040
+ session_tokens: number;
1041
+ estimated_cost: number;
1042
+ }>>;
1043
+ batchUpdateTasks(updates: Array<{
1044
+ task_id: string;
1045
+ status?: string;
1046
+ priority?: number;
1047
+ progress_percentage?: number;
1048
+ progress_note?: string;
1049
+ }>): Promise<ApiResponse<{
1050
+ success: boolean;
1051
+ updated_count: number;
1052
+ }>>;
1053
+ batchCompleteTasks(completions: Array<{
1054
+ task_id: string;
1055
+ summary?: string;
1056
+ }>): Promise<ApiResponse<{
1057
+ success: boolean;
1058
+ completed_count: number;
1059
+ next_task?: {
1060
+ id: string;
1061
+ title: string;
1062
+ } | null;
1063
+ }>>;
1064
+ addDeploymentRequirement(projectId: string, params: {
1065
+ type: string;
1066
+ title: string;
1067
+ description?: string;
1068
+ file_path?: string;
1069
+ stage?: string;
1070
+ blocking?: boolean;
1071
+ recurring?: boolean;
1072
+ }): Promise<ApiResponse<{
1073
+ success: boolean;
1074
+ requirement_id: string;
1075
+ }>>;
1076
+ getDeploymentRequirements(projectId: string, params?: {
1077
+ status?: string;
1078
+ stage?: string;
1079
+ }): Promise<ApiResponse<{
1080
+ requirements: Array<{
1081
+ id: string;
1082
+ type: string;
1083
+ title: string;
1084
+ description?: string;
1085
+ status: string;
1086
+ stage: string;
1087
+ }>;
1088
+ }>>;
1089
+ completeDeploymentRequirement(requirementId: string): Promise<ApiResponse<{
1090
+ success: boolean;
1091
+ }>>;
1092
+ scheduleDeployment(projectId: string, params: {
1093
+ scheduled_at: string;
1094
+ schedule_type?: string;
1095
+ environment?: string;
1096
+ version_bump?: string;
1097
+ auto_trigger?: boolean;
1098
+ notes?: string;
1099
+ git_ref?: string;
1100
+ }): Promise<ApiResponse<{
1101
+ success: boolean;
1102
+ schedule_id: string;
1103
+ }>>;
1104
+ getScheduledDeployments(projectId: string, includeDisabled?: boolean): Promise<ApiResponse<{
1105
+ schedules: Array<{
1106
+ id: string;
1107
+ scheduled_at: string;
1108
+ schedule_type: string;
1109
+ environment: string;
1110
+ version_bump: string;
1111
+ auto_trigger: boolean;
1112
+ enabled: boolean;
1113
+ git_ref?: string;
1114
+ notes?: string;
1115
+ }>;
1116
+ count: number;
1117
+ due_count: number;
1118
+ }>>;
1119
+ updateScheduledDeployment(scheduleId: string, updates: {
1120
+ scheduled_at?: string;
1121
+ schedule_type?: string;
1122
+ environment?: string;
1123
+ version_bump?: string;
1124
+ auto_trigger?: boolean;
1125
+ enabled?: boolean;
1126
+ git_ref?: string;
1127
+ notes?: string;
1128
+ }): Promise<ApiResponse<{
1129
+ success: boolean;
1130
+ schedule_id: string;
1131
+ }>>;
1132
+ deleteScheduledDeployment(scheduleId: string): Promise<ApiResponse<{
1133
+ success: boolean;
1134
+ }>>;
1135
+ triggerScheduledDeployment(scheduleId: string, sessionId?: string): Promise<ApiResponse<{
1136
+ success: boolean;
1137
+ deployment_id?: string;
1138
+ schedule_id: string;
1139
+ schedule_type: string;
1140
+ next_scheduled_at?: string;
1141
+ message?: string;
1142
+ }>>;
1143
+ checkDueDeployments(projectId: string): Promise<ApiResponse<{
1144
+ due_schedules: Array<{
1145
+ id: string;
1146
+ scheduled_at: string;
1147
+ environment: string;
1148
+ version_bump: string;
1149
+ schedule_type: string;
1150
+ }>;
1151
+ count: number;
1152
+ }>>;
1153
+ updateProjectReadme(projectId: string, readmeContent: string): Promise<ApiResponse<{
1154
+ success: boolean;
1155
+ project_id: string;
1156
+ }>>;
1157
+ getHelpTopic(slug: string): Promise<ApiResponse<{
1158
+ slug: string;
1159
+ title: string;
1160
+ content: string;
1161
+ } | null>>;
1162
+ getHelpTopics(): Promise<ApiResponse<Array<{
1163
+ slug: string;
1164
+ title: string;
1165
+ }>>>;
1166
+ }
1167
+ export declare function getApiClient(): VibescopeApiClient;
1168
+ export declare function initApiClient(config: ApiClientConfig): VibescopeApiClient;
1169
+ export {};