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