@vibescope/mcp-server 0.3.0 → 0.3.3

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 (154) hide show
  1. package/dist/api-client/blockers.d.ts +46 -0
  2. package/dist/api-client/blockers.js +43 -0
  3. package/dist/api-client/cost.d.ts +112 -0
  4. package/dist/api-client/cost.js +76 -0
  5. package/dist/api-client/decisions.d.ts +55 -0
  6. package/dist/api-client/decisions.js +32 -0
  7. package/dist/api-client/discovery.d.ts +62 -0
  8. package/dist/api-client/discovery.js +21 -0
  9. package/dist/api-client/ideas.d.ts +75 -0
  10. package/dist/api-client/ideas.js +36 -0
  11. package/dist/api-client/index.d.ts +749 -0
  12. package/dist/api-client/index.js +291 -0
  13. package/dist/api-client/project.d.ts +132 -0
  14. package/dist/api-client/project.js +45 -0
  15. package/dist/api-client/session.d.ts +163 -0
  16. package/dist/api-client/session.js +52 -0
  17. package/dist/api-client/tasks.d.ts +328 -0
  18. package/dist/api-client/tasks.js +132 -0
  19. package/dist/api-client/types.d.ts +25 -0
  20. package/dist/api-client/types.js +4 -0
  21. package/dist/api-client/worktrees.d.ts +33 -0
  22. package/dist/api-client/worktrees.js +26 -0
  23. package/dist/api-client.d.ts +9 -0
  24. package/dist/api-client.js +104 -25
  25. package/dist/cli-init.d.ts +17 -0
  26. package/dist/cli-init.js +445 -0
  27. package/dist/cli.js +0 -0
  28. package/dist/handlers/cloud-agents.d.ts +21 -0
  29. package/dist/handlers/cloud-agents.js +91 -0
  30. package/dist/handlers/discovery.js +7 -0
  31. package/dist/handlers/index.d.ts +1 -0
  32. package/dist/handlers/index.js +3 -0
  33. package/dist/handlers/session.js +3 -1
  34. package/dist/handlers/tasks.js +10 -12
  35. package/dist/handlers/types.d.ts +2 -1
  36. package/dist/handlers/validation.js +5 -1
  37. package/dist/index.js +8 -3
  38. package/dist/token-tracking.js +2 -2
  39. package/dist/tools/blockers.d.ts +13 -0
  40. package/dist/tools/blockers.js +119 -0
  41. package/dist/tools/bodies-of-work.d.ts +19 -0
  42. package/dist/tools/bodies-of-work.js +280 -0
  43. package/dist/tools/cloud-agents.d.ts +9 -0
  44. package/dist/tools/cloud-agents.js +67 -0
  45. package/dist/tools/connectors.d.ts +14 -0
  46. package/dist/tools/connectors.js +188 -0
  47. package/dist/tools/cost.d.ts +11 -0
  48. package/dist/tools/cost.js +108 -0
  49. package/dist/tools/decisions.d.ts +12 -0
  50. package/dist/tools/decisions.js +108 -0
  51. package/dist/tools/deployment.d.ts +24 -0
  52. package/dist/tools/deployment.js +439 -0
  53. package/dist/tools/discovery.d.ts +10 -0
  54. package/dist/tools/discovery.js +73 -0
  55. package/dist/tools/fallback.d.ts +11 -0
  56. package/dist/tools/fallback.js +108 -0
  57. package/dist/tools/file-checkouts.d.ts +13 -0
  58. package/dist/tools/file-checkouts.js +141 -0
  59. package/dist/tools/findings.d.ts +13 -0
  60. package/dist/tools/findings.js +98 -0
  61. package/dist/tools/git-issues.d.ts +11 -0
  62. package/dist/tools/git-issues.js +127 -0
  63. package/dist/tools/ideas.d.ts +13 -0
  64. package/dist/tools/ideas.js +159 -0
  65. package/dist/tools/index.d.ts +71 -0
  66. package/dist/tools/index.js +98 -0
  67. package/dist/tools/milestones.d.ts +12 -0
  68. package/dist/tools/milestones.js +115 -0
  69. package/dist/tools/organizations.d.ts +17 -0
  70. package/dist/tools/organizations.js +221 -0
  71. package/dist/tools/progress.d.ts +9 -0
  72. package/dist/tools/progress.js +70 -0
  73. package/dist/tools/project.d.ts +13 -0
  74. package/dist/tools/project.js +199 -0
  75. package/dist/tools/requests.d.ts +10 -0
  76. package/dist/tools/requests.js +65 -0
  77. package/dist/tools/roles.d.ts +11 -0
  78. package/dist/tools/roles.js +109 -0
  79. package/dist/tools/session.d.ts +15 -0
  80. package/dist/tools/session.js +178 -0
  81. package/dist/tools/sprints.d.ts +18 -0
  82. package/dist/tools/sprints.js +295 -0
  83. package/dist/tools/tasks.d.ts +27 -0
  84. package/dist/tools/tasks.js +539 -0
  85. package/dist/tools/types.d.ts +7 -0
  86. package/dist/tools/types.js +6 -0
  87. package/dist/tools/validation.d.ts +10 -0
  88. package/dist/tools/validation.js +72 -0
  89. package/dist/tools/worktrees.d.ts +9 -0
  90. package/dist/tools/worktrees.js +63 -0
  91. package/dist/utils.d.ts +66 -0
  92. package/dist/utils.js +102 -0
  93. package/docs/TOOLS.md +55 -2
  94. package/package.json +5 -3
  95. package/scripts/generate-docs.ts +1 -1
  96. package/src/api-client/blockers.ts +86 -0
  97. package/src/api-client/cost.ts +185 -0
  98. package/src/api-client/decisions.ts +87 -0
  99. package/src/api-client/discovery.ts +81 -0
  100. package/src/api-client/ideas.ts +112 -0
  101. package/src/api-client/index.ts +378 -0
  102. package/src/api-client/project.ts +179 -0
  103. package/src/api-client/session.ts +220 -0
  104. package/src/api-client/tasks.ts +450 -0
  105. package/src/api-client/types.ts +32 -0
  106. package/src/api-client/worktrees.ts +53 -0
  107. package/src/api-client.test.ts +136 -9
  108. package/src/api-client.ts +125 -27
  109. package/src/cli-init.ts +504 -0
  110. package/src/handlers/__test-utils__.ts +2 -0
  111. package/src/handlers/cloud-agents.ts +138 -0
  112. package/src/handlers/discovery.ts +7 -0
  113. package/src/handlers/index.ts +3 -0
  114. package/src/handlers/session.ts +3 -1
  115. package/src/handlers/tasks.ts +10 -12
  116. package/src/handlers/tool-categories.test.ts +1 -1
  117. package/src/handlers/types.ts +2 -1
  118. package/src/handlers/validation.ts +6 -1
  119. package/src/index.test.ts +2 -2
  120. package/src/index.ts +8 -2
  121. package/src/token-tracking.ts +3 -2
  122. package/src/tools/blockers.ts +122 -0
  123. package/src/tools/bodies-of-work.ts +283 -0
  124. package/src/tools/cloud-agents.ts +70 -0
  125. package/src/tools/connectors.ts +191 -0
  126. package/src/tools/cost.ts +111 -0
  127. package/src/tools/decisions.ts +111 -0
  128. package/src/tools/deployment.ts +442 -0
  129. package/src/tools/discovery.ts +76 -0
  130. package/src/tools/fallback.ts +111 -0
  131. package/src/tools/file-checkouts.ts +145 -0
  132. package/src/tools/findings.ts +101 -0
  133. package/src/tools/git-issues.ts +130 -0
  134. package/src/tools/ideas.ts +162 -0
  135. package/src/tools/index.ts +131 -0
  136. package/src/tools/milestones.ts +118 -0
  137. package/src/tools/organizations.ts +224 -0
  138. package/src/tools/progress.ts +73 -0
  139. package/src/tools/project.ts +202 -0
  140. package/src/tools/requests.ts +68 -0
  141. package/src/tools/roles.ts +112 -0
  142. package/src/tools/session.ts +181 -0
  143. package/src/tools/sprints.ts +298 -0
  144. package/src/tools/tasks.ts +542 -0
  145. package/src/tools/tools.test.ts +222 -0
  146. package/src/tools/types.ts +9 -0
  147. package/src/tools/validation.ts +75 -0
  148. package/src/tools/worktrees.ts +66 -0
  149. package/src/tools.test.ts +1 -1
  150. package/src/utils.test.ts +229 -0
  151. package/src/utils.ts +117 -0
  152. package/dist/tools.d.ts +0 -2
  153. package/dist/tools.js +0 -3602
  154. package/src/tools.ts +0 -3607
@@ -0,0 +1,749 @@
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
+ * This module composes domain-specific API methods into a unified client.
8
+ */
9
+ import type { ApiClientConfig, ApiResponse } from './types.js';
10
+ import { type SessionMethods } from './session.js';
11
+ import { type ProjectMethods } from './project.js';
12
+ import { type BlockersMethods } from './blockers.js';
13
+ import { type CostMethods } from './cost.js';
14
+ import { type WorktreesMethods } from './worktrees.js';
15
+ import { type DiscoveryMethods } from './discovery.js';
16
+ import { type DecisionsMethods } from './decisions.js';
17
+ import { type IdeasMethods } from './ideas.js';
18
+ import { type TasksMethods } from './tasks.js';
19
+ export type { ApiClientConfig, ApiResponse, RetryConfig, RequestFn, ProxyFn } from './types.js';
20
+ export type { SessionMethods } from './session.js';
21
+ export type { ProjectMethods } from './project.js';
22
+ export type { BlockersMethods } from './blockers.js';
23
+ export type { CostMethods } from './cost.js';
24
+ export type { WorktreesMethods } from './worktrees.js';
25
+ export type { DiscoveryMethods } from './discovery.js';
26
+ export type { DecisionsMethods } from './decisions.js';
27
+ export type { IdeasMethods } from './ideas.js';
28
+ export type { TasksMethods } from './tasks.js';
29
+ /**
30
+ * Combined interface for all API methods
31
+ */
32
+ export interface VibescopeApiClientMethods extends SessionMethods, ProjectMethods, BlockersMethods, CostMethods, WorktreesMethods, DiscoveryMethods, DecisionsMethods, IdeasMethods, TasksMethods {
33
+ }
34
+ export declare class VibescopeApiClient implements VibescopeApiClientMethods {
35
+ private apiKey;
36
+ private baseUrl;
37
+ private retryConfig;
38
+ private sessionMethods;
39
+ private projectMethods;
40
+ private blockersMethods;
41
+ private costMethods;
42
+ private worktreesMethods;
43
+ private discoveryMethods;
44
+ private decisionsMethods;
45
+ private ideasMethods;
46
+ private tasksMethods;
47
+ constructor(config: ApiClientConfig);
48
+ private request;
49
+ /**
50
+ * Generic proxy method for operations that go through the MCP proxy endpoint
51
+ */
52
+ proxy<T>(operation: string, args: Record<string, unknown>, sessionContext?: {
53
+ session_id?: string;
54
+ project_id?: string;
55
+ }): Promise<ApiResponse<T>>;
56
+ validateAuth: () => Promise<ApiResponse<{
57
+ valid: boolean;
58
+ user_id: string;
59
+ api_key_id: string;
60
+ key_name: string;
61
+ }>>;
62
+ startSession: (params: Parameters<SessionMethods["startSession"]>[0]) => Promise<ApiResponse<{
63
+ session_started: boolean;
64
+ session_id?: string;
65
+ persona?: string;
66
+ role?: string;
67
+ project?: {
68
+ id: string;
69
+ name: string;
70
+ description?: string;
71
+ goal?: string;
72
+ status?: string;
73
+ git_url?: string;
74
+ agent_instructions?: string;
75
+ tech_stack?: string[];
76
+ git_workflow?: string;
77
+ git_main_branch?: string;
78
+ git_develop_branch?: string;
79
+ git_auto_branch?: boolean;
80
+ };
81
+ active_tasks?: Array<{
82
+ id: string;
83
+ title: string;
84
+ status: string;
85
+ priority: number;
86
+ progress_percentage?: number;
87
+ estimated_minutes?: number;
88
+ }>;
89
+ blockers?: Array<{
90
+ id: string;
91
+ description: string;
92
+ status: string;
93
+ }>;
94
+ next_task?: {
95
+ id: string;
96
+ title: string;
97
+ priority: number;
98
+ estimated_minutes?: number;
99
+ } | null;
100
+ pending_requests?: Array<{
101
+ id: string;
102
+ request_type: string;
103
+ message: string;
104
+ created_at: string;
105
+ }>;
106
+ pending_requests_count?: number;
107
+ URGENT_QUESTIONS?: {
108
+ count: number;
109
+ oldest_waiting_minutes: number;
110
+ action_required: string;
111
+ requests: Array<{
112
+ id: string;
113
+ message: string;
114
+ waiting_minutes: number;
115
+ }>;
116
+ };
117
+ directive?: string;
118
+ blockers_count?: number;
119
+ validation_count?: number;
120
+ project_not_found?: boolean;
121
+ message?: string;
122
+ suggestion?: {
123
+ action: string;
124
+ example: string;
125
+ note: string;
126
+ };
127
+ agent_setup?: {
128
+ agent_type: string;
129
+ is_new_agent_type: boolean;
130
+ setup_required: boolean;
131
+ instructions: string;
132
+ config_file: string;
133
+ template_url?: string;
134
+ steps: string[];
135
+ };
136
+ stale_worktrees?: Array<{
137
+ task_id: string;
138
+ task_title: string;
139
+ worktree_path: string;
140
+ worktree_hostname?: string | null;
141
+ }>;
142
+ stale_worktrees_count?: number;
143
+ cleanup_action?: string;
144
+ awaiting_validation?: Array<{
145
+ id: string;
146
+ title?: string;
147
+ }>;
148
+ validation_priority?: boolean;
149
+ next_action?: string;
150
+ error?: string;
151
+ }>>;
152
+ heartbeat: (sessionId: string, options?: Parameters<SessionMethods["heartbeat"]>[1]) => Promise<ApiResponse<{
153
+ success: boolean;
154
+ session_id: string;
155
+ timestamp: string;
156
+ }>>;
157
+ endSession: (sessionId: string) => Promise<ApiResponse<{
158
+ success: boolean;
159
+ ended_session_id?: string;
160
+ session_summary?: {
161
+ agent_name: string;
162
+ tasks_completed_this_session: number;
163
+ tasks_awaiting_validation: number;
164
+ tasks_released: number;
165
+ };
166
+ reminders?: string[];
167
+ }>>;
168
+ signalIdle: (sessionId: string) => Promise<ApiResponse<{
169
+ success: boolean;
170
+ session_id: string;
171
+ status: string;
172
+ message: string;
173
+ }>>;
174
+ syncSession: (sessionId: string, params?: Parameters<SessionMethods["syncSession"]>[1]) => Promise<ApiResponse<{
175
+ session: {
176
+ id: string;
177
+ status: string;
178
+ agent_name: string;
179
+ };
180
+ project?: unknown;
181
+ tasks?: unknown[];
182
+ }>>;
183
+ confirmAgentSetup: (projectId: string, agentType: string) => Promise<ApiResponse<{
184
+ success: boolean;
185
+ project_id: string;
186
+ agent_type: string;
187
+ }>>;
188
+ listProjects: () => Promise<ApiResponse<{
189
+ projects: Array<{
190
+ id: string;
191
+ name: string;
192
+ description?: string;
193
+ status: string;
194
+ git_url?: string;
195
+ goal?: string;
196
+ tech_stack?: string[];
197
+ }>;
198
+ }>>;
199
+ createProject: (params: Parameters<ProjectMethods["createProject"]>[0]) => Promise<ApiResponse<{
200
+ success: boolean;
201
+ project: {
202
+ id: string;
203
+ name: string;
204
+ };
205
+ }>>;
206
+ getProject: (projectId: string, gitUrl?: string) => Promise<ApiResponse<{
207
+ found: boolean;
208
+ project?: {
209
+ id: string;
210
+ name: string;
211
+ description?: string;
212
+ goal?: string;
213
+ status: string;
214
+ git_url?: string;
215
+ agent_instructions?: string;
216
+ tech_stack?: string[];
217
+ git_workflow?: string;
218
+ git_main_branch?: string;
219
+ git_develop_branch?: string;
220
+ git_auto_branch?: boolean;
221
+ git_auto_tag?: boolean;
222
+ deployment_instructions?: string;
223
+ };
224
+ active_tasks?: Array<{
225
+ id: string;
226
+ title: string;
227
+ description?: string;
228
+ priority: number;
229
+ status: string;
230
+ progress_percentage?: number;
231
+ estimated_minutes?: number;
232
+ }>;
233
+ open_blockers?: Array<{
234
+ id: string;
235
+ description: string;
236
+ }>;
237
+ recent_decisions?: Array<{
238
+ id: string;
239
+ title: string;
240
+ description?: string;
241
+ }>;
242
+ message?: string;
243
+ }>>;
244
+ updateProject: (projectId: string, updates: Parameters<ProjectMethods["updateProject"]>[1]) => Promise<ApiResponse<{
245
+ success: boolean;
246
+ project_id: string;
247
+ }>>;
248
+ getGitWorkflow: (projectId: string, taskId?: string) => Promise<ApiResponse<{
249
+ workflow: string;
250
+ main_branch: string;
251
+ develop_branch?: string;
252
+ suggested_branch?: string;
253
+ base_branch?: string;
254
+ }>>;
255
+ updateProjectReadme: (projectId: string, readmeContent: string) => Promise<ApiResponse<{
256
+ success: boolean;
257
+ project_id: string;
258
+ }>>;
259
+ getProjectSummary: (projectId: string) => Promise<ApiResponse<{
260
+ project: {
261
+ id: string;
262
+ name: string;
263
+ description?: string;
264
+ goal?: string;
265
+ status: string;
266
+ };
267
+ stats: {
268
+ total_tasks: number;
269
+ completed_tasks: number;
270
+ in_progress_tasks: number;
271
+ pending_tasks: number;
272
+ open_blockers: number;
273
+ total_decisions: number;
274
+ };
275
+ }>>;
276
+ getBlockers: (projectId: string, params?: Parameters<BlockersMethods["getBlockers"]>[1]) => Promise<ApiResponse<{
277
+ blockers: Array<{
278
+ id: string;
279
+ description: string;
280
+ status: string;
281
+ created_at: string;
282
+ resolved_at?: string;
283
+ resolution_note?: string;
284
+ }>;
285
+ total_count: number;
286
+ has_more: boolean;
287
+ }>>;
288
+ addBlocker: (projectId: string, description: string, sessionId?: string) => Promise<ApiResponse<{
289
+ success: boolean;
290
+ blocker_id: string;
291
+ }>>;
292
+ resolveBlocker: (blockerId: string, resolutionNote?: string) => Promise<ApiResponse<{
293
+ success: boolean;
294
+ blocker_id: string;
295
+ }>>;
296
+ deleteBlocker: (blockerId: string) => Promise<ApiResponse<{
297
+ success: boolean;
298
+ }>>;
299
+ getBlockersStats: (projectId: string) => Promise<ApiResponse<{
300
+ total: number;
301
+ open: number;
302
+ resolved: number;
303
+ }>>;
304
+ getCostSummary: (projectId: string, params?: Parameters<CostMethods["getCostSummary"]>[1]) => Promise<ApiResponse<{
305
+ summary: Array<{
306
+ period: string;
307
+ total_cost: number;
308
+ input_tokens: number;
309
+ output_tokens: number;
310
+ api_calls: number;
311
+ }>;
312
+ }>>;
313
+ getCostAlerts: () => Promise<ApiResponse<{
314
+ alerts: Array<{
315
+ id: string;
316
+ project_id?: string;
317
+ threshold_amount: number;
318
+ threshold_period: string;
319
+ alert_type: string;
320
+ enabled: boolean;
321
+ }>;
322
+ }>>;
323
+ addCostAlert: (params: Parameters<CostMethods["addCostAlert"]>[0]) => Promise<ApiResponse<{
324
+ success: boolean;
325
+ alert_id: string;
326
+ }>>;
327
+ updateCostAlert: (alertId: string, updates: Parameters<CostMethods["updateCostAlert"]>[1]) => Promise<ApiResponse<{
328
+ success: boolean;
329
+ alert_id: string;
330
+ }>>;
331
+ deleteCostAlert: (alertId: string) => Promise<ApiResponse<{
332
+ success: boolean;
333
+ }>>;
334
+ getTaskCosts: (projectId: string, limit?: number) => Promise<ApiResponse<{
335
+ tasks: Array<{
336
+ task_id: string;
337
+ task_title: string;
338
+ total_cost: number;
339
+ input_tokens: number;
340
+ output_tokens: number;
341
+ }>;
342
+ }>>;
343
+ getBodyOfWorkCosts: (params: Parameters<CostMethods["getBodyOfWorkCosts"]>[0]) => Promise<ApiResponse<{
344
+ bodies_of_work: Array<{
345
+ body_of_work_id: string;
346
+ title: string;
347
+ total_cost: number;
348
+ task_count: number;
349
+ }>;
350
+ }>>;
351
+ getSprintCosts: (params: Parameters<CostMethods["getSprintCosts"]>[0]) => Promise<ApiResponse<{
352
+ sprints: Array<{
353
+ sprint_id: string;
354
+ name: string;
355
+ total_cost: number;
356
+ task_count: number;
357
+ }>;
358
+ }>>;
359
+ getTokenUsage: () => Promise<ApiResponse<{
360
+ session_tokens: {
361
+ input: number;
362
+ output: number;
363
+ };
364
+ estimated_cost: number;
365
+ }>>;
366
+ reportTokenUsage: (sessionId: string, params: Parameters<CostMethods["reportTokenUsage"]>[1]) => Promise<ApiResponse<{
367
+ success: boolean;
368
+ session_id: string;
369
+ total_input_tokens: number;
370
+ total_output_tokens: number;
371
+ }>>;
372
+ getStaleWorktrees: (projectId: string, params?: Parameters<WorktreesMethods["getStaleWorktrees"]>[1]) => Promise<ApiResponse<{
373
+ stale_worktrees: Array<{
374
+ task_id: string;
375
+ task_title: string;
376
+ worktree_path: string;
377
+ worktree_hostname?: string | null;
378
+ last_heartbeat?: string;
379
+ session_status?: string;
380
+ }>;
381
+ total_count: number;
382
+ has_more: boolean;
383
+ cleanup_instructions: string;
384
+ }>>;
385
+ clearWorktreePath: (taskId: string) => Promise<ApiResponse<{
386
+ success: boolean;
387
+ task_id: string;
388
+ message: string;
389
+ }>>;
390
+ queryKnowledgeBase: (projectId: string, params?: Parameters<DiscoveryMethods["queryKnowledgeBase"]>[1]) => Promise<ApiResponse<{
391
+ findings?: Array<{
392
+ id: string;
393
+ title: string;
394
+ category: string;
395
+ severity: string;
396
+ }>;
397
+ qa?: Array<{
398
+ id: string;
399
+ question: string;
400
+ answer?: string;
401
+ }>;
402
+ decisions?: Array<{
403
+ id: string;
404
+ title: string;
405
+ description?: string;
406
+ }>;
407
+ completed_tasks?: Array<{
408
+ id: string;
409
+ title: string;
410
+ completed_at: string;
411
+ }>;
412
+ blockers?: Array<{
413
+ id: string;
414
+ description: string;
415
+ status: string;
416
+ }>;
417
+ progress?: Array<{
418
+ id: string;
419
+ note: string;
420
+ created_at: string;
421
+ }>;
422
+ }>>;
423
+ getHelpTopic: (slug: string) => Promise<ApiResponse<{
424
+ topic: {
425
+ slug: string;
426
+ title: string;
427
+ content: string;
428
+ };
429
+ }>>;
430
+ getHelpTopics: () => Promise<ApiResponse<{
431
+ slug: string;
432
+ title: string;
433
+ description?: string;
434
+ }[]>>;
435
+ getDecisions: (projectId: string, options?: Parameters<DecisionsMethods["getDecisions"]>[1]) => Promise<ApiResponse<{
436
+ decisions: Array<{
437
+ id: string;
438
+ title: string;
439
+ description: string;
440
+ rationale?: string;
441
+ alternatives_considered?: string[];
442
+ created_at: string;
443
+ }>;
444
+ total_count?: number;
445
+ has_more?: boolean;
446
+ }>>;
447
+ getDecision: (decisionId: string) => Promise<ApiResponse<{
448
+ decision: {
449
+ id: string;
450
+ title: string;
451
+ description: string;
452
+ rationale?: string;
453
+ alternatives_considered?: string[];
454
+ created_at: string;
455
+ };
456
+ }>>;
457
+ logDecision: (projectId: string, params: Parameters<DecisionsMethods["logDecision"]>[1], sessionId?: string) => Promise<ApiResponse<{
458
+ success: boolean;
459
+ decision_id: string;
460
+ }>>;
461
+ deleteDecision: (decisionId: string) => Promise<ApiResponse<{
462
+ success: boolean;
463
+ }>>;
464
+ getDecisionsStats: (projectId: string) => Promise<ApiResponse<{
465
+ total: number;
466
+ }>>;
467
+ getIdeas: (projectId: string, params?: Parameters<IdeasMethods["getIdeas"]>[1]) => Promise<ApiResponse<{
468
+ ideas: Array<{
469
+ id: string;
470
+ title: string;
471
+ description?: string;
472
+ status: string;
473
+ doc_url?: string;
474
+ created_at: string;
475
+ }>;
476
+ total_count?: number;
477
+ has_more?: boolean;
478
+ }>>;
479
+ getIdea: (ideaId: string) => Promise<ApiResponse<{
480
+ idea: {
481
+ id: string;
482
+ title: string;
483
+ description?: string;
484
+ status: string;
485
+ doc_url?: string;
486
+ created_at: string;
487
+ };
488
+ }>>;
489
+ addIdea: (projectId: string, params: Parameters<IdeasMethods["addIdea"]>[1], sessionId?: string) => Promise<ApiResponse<{
490
+ success: boolean;
491
+ idea_id: string;
492
+ }>>;
493
+ updateIdea: (ideaId: string, updates: Parameters<IdeasMethods["updateIdea"]>[1]) => Promise<ApiResponse<{
494
+ success: boolean;
495
+ idea_id: string;
496
+ }>>;
497
+ deleteIdea: (ideaId: string) => Promise<ApiResponse<{
498
+ success: boolean;
499
+ }>>;
500
+ convertIdeaToTask: (ideaId: string, params?: Parameters<IdeasMethods["convertIdeaToTask"]>[1]) => Promise<ApiResponse<{
501
+ success: boolean;
502
+ task_id?: string;
503
+ task_title?: string;
504
+ idea_id?: string;
505
+ idea_status?: string;
506
+ message?: string;
507
+ error?: string;
508
+ }>>;
509
+ getTasks: (projectId: string, params?: Parameters<TasksMethods["getTasks"]>[1]) => Promise<ApiResponse<{
510
+ tasks: Array<{
511
+ id: string;
512
+ title: string;
513
+ description?: string;
514
+ priority: number;
515
+ status: string;
516
+ progress_percentage?: number;
517
+ estimated_minutes?: number;
518
+ started_at?: string;
519
+ completed_at?: string;
520
+ parent_task_id?: string;
521
+ }>;
522
+ total_count: number;
523
+ has_more: boolean;
524
+ }>>;
525
+ createTask: (projectId: string, params: Parameters<TasksMethods["createTask"]>[1]) => Promise<ApiResponse<{
526
+ success: boolean;
527
+ task_id: string;
528
+ title: string;
529
+ blocking?: boolean;
530
+ message?: string;
531
+ }>>;
532
+ getNextTask: (projectId: string, sessionId?: string) => Promise<ApiResponse<{
533
+ task?: {
534
+ id: string;
535
+ title: string;
536
+ description?: string;
537
+ priority: number;
538
+ estimated_minutes?: number;
539
+ blocking?: boolean;
540
+ } | null;
541
+ blocking_task?: boolean;
542
+ deployment_blocks_tasks?: boolean;
543
+ deployment?: {
544
+ id: string;
545
+ status: string;
546
+ env: string;
547
+ };
548
+ awaiting_validation?: Array<{
549
+ id: string;
550
+ title: string;
551
+ }>;
552
+ validation_priority?: string;
553
+ all_claimed?: boolean;
554
+ is_subtask?: boolean;
555
+ suggested_activity?: string;
556
+ directive?: string;
557
+ message?: string;
558
+ action?: string;
559
+ }>>;
560
+ getTask: (taskId: string) => Promise<ApiResponse<{
561
+ task: {
562
+ id: string;
563
+ title: string;
564
+ description?: string;
565
+ priority: number;
566
+ status: string;
567
+ progress_percentage?: number;
568
+ estimated_minutes?: number;
569
+ started_at?: string;
570
+ completed_at?: string;
571
+ git_branch?: string;
572
+ blocking?: boolean;
573
+ references?: Array<{
574
+ url: string;
575
+ label?: string;
576
+ }>;
577
+ parent_task_id?: string;
578
+ working_agent_session_id?: string;
579
+ };
580
+ }>>;
581
+ getTaskById: (taskId: string, params?: Parameters<TasksMethods["getTaskById"]>[1]) => Promise<ApiResponse<{
582
+ task: {
583
+ id: string;
584
+ title: string;
585
+ description?: string;
586
+ priority: number;
587
+ status: string;
588
+ progress_percentage?: number;
589
+ estimated_minutes?: number;
590
+ started_at?: string;
591
+ completed_at?: string;
592
+ git_branch?: string;
593
+ references?: Array<{
594
+ url: string;
595
+ label?: string;
596
+ }>;
597
+ };
598
+ subtasks?: Array<{
599
+ id: string;
600
+ title: string;
601
+ status: string;
602
+ progress_percentage?: number;
603
+ }>;
604
+ milestones?: Array<{
605
+ id: string;
606
+ title: string;
607
+ status: string;
608
+ order_index: number;
609
+ }>;
610
+ }>>;
611
+ searchTasks: (projectId: string, params: Parameters<TasksMethods["searchTasks"]>[1]) => Promise<ApiResponse<{
612
+ tasks: Array<{
613
+ id: string;
614
+ title: string;
615
+ status: string;
616
+ priority: number;
617
+ snippet?: string;
618
+ }>;
619
+ total_matches: number;
620
+ hint?: string;
621
+ }>>;
622
+ getTasksByPriority: (projectId: string, params?: Parameters<TasksMethods["getTasksByPriority"]>[1]) => Promise<ApiResponse<{
623
+ tasks: Array<{
624
+ id: string;
625
+ title: string;
626
+ priority: number;
627
+ status: string;
628
+ estimated_minutes?: number;
629
+ }>;
630
+ total_count: number;
631
+ }>>;
632
+ getRecentTasks: (projectId: string, params?: Parameters<TasksMethods["getRecentTasks"]>[1]) => Promise<ApiResponse<{
633
+ tasks: Array<{
634
+ id: string;
635
+ title: string;
636
+ status: string;
637
+ priority: number;
638
+ created_at: string;
639
+ age?: string;
640
+ }>;
641
+ total_count: number;
642
+ }>>;
643
+ getTaskStats: (projectId: string) => Promise<ApiResponse<{
644
+ total: number;
645
+ by_status: {
646
+ backlog: number;
647
+ pending: number;
648
+ in_progress: number;
649
+ completed: number;
650
+ cancelled: number;
651
+ };
652
+ by_priority: {
653
+ 1: number;
654
+ 2: number;
655
+ 3: number;
656
+ 4: number;
657
+ 5: number;
658
+ };
659
+ awaiting_validation: number;
660
+ oldest_pending_days: number | null;
661
+ }>>;
662
+ updateTask: (taskId: string, updates: Parameters<TasksMethods["updateTask"]>[1]) => Promise<ApiResponse<{
663
+ success: boolean;
664
+ task_id: string;
665
+ git_workflow?: {
666
+ workflow: string;
667
+ base_branch: string;
668
+ suggested_branch: string;
669
+ worktree_required: boolean;
670
+ };
671
+ worktree_setup?: {
672
+ message: string;
673
+ commands: string[];
674
+ worktree_path: string;
675
+ branch_name: string;
676
+ cleanup_command: string;
677
+ };
678
+ next_step?: string;
679
+ }>>;
680
+ completeTask: (taskId: string, params: Parameters<TasksMethods["completeTask"]>[1]) => Promise<ApiResponse<{
681
+ success: boolean;
682
+ directive: string;
683
+ auto_continue: boolean;
684
+ completed_task_id: string;
685
+ next_task?: {
686
+ id: string;
687
+ title: string;
688
+ priority: number;
689
+ estimated_minutes?: number;
690
+ } | null;
691
+ context?: {
692
+ validation?: number;
693
+ blockers?: number;
694
+ deployment?: string;
695
+ worktree_path?: string;
696
+ };
697
+ next_action: string;
698
+ warnings?: string[];
699
+ }>>;
700
+ deleteTask: (taskId: string) => Promise<ApiResponse<{
701
+ success: boolean;
702
+ deleted_id: string;
703
+ }>>;
704
+ releaseTask: (taskId: string, params?: Parameters<TasksMethods["releaseTask"]>[1]) => Promise<ApiResponse<{
705
+ success: boolean;
706
+ task_id: string;
707
+ message: string;
708
+ reason?: string;
709
+ hint: string;
710
+ }>>;
711
+ cancelTask: (taskId: string, params?: Parameters<TasksMethods["cancelTask"]>[1]) => Promise<ApiResponse<{
712
+ success: boolean;
713
+ task_id: string;
714
+ cancelled_reason: string | null;
715
+ message: string;
716
+ }>>;
717
+ addTaskReference: (taskId: string, url: string, label?: string) => Promise<ApiResponse<{
718
+ success: boolean;
719
+ task_id: string;
720
+ reference: {
721
+ url: string;
722
+ label?: string;
723
+ };
724
+ }>>;
725
+ removeTaskReference: (taskId: string, url: string) => Promise<ApiResponse<{
726
+ success: boolean;
727
+ task_id: string;
728
+ }>>;
729
+ batchUpdateTasks: (updates: Parameters<TasksMethods["batchUpdateTasks"]>[0]) => Promise<ApiResponse<{
730
+ success: boolean;
731
+ updated_count: number;
732
+ results: Array<{
733
+ task_id: string;
734
+ success: boolean;
735
+ error?: string;
736
+ }>;
737
+ }>>;
738
+ batchCompleteTasks: (completions: Parameters<TasksMethods["batchCompleteTasks"]>[0]) => Promise<ApiResponse<{
739
+ success: boolean;
740
+ completed_count: number;
741
+ results: Array<{
742
+ task_id: string;
743
+ success: boolean;
744
+ error?: string;
745
+ }>;
746
+ }>>;
747
+ }
748
+ export declare function getApiClient(): VibescopeApiClient;
749
+ export declare function initApiClient(config: ApiClientConfig): VibescopeApiClient;