@vibescope/mcp-server 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-client/bodies-of-work.d.ts +125 -0
- package/dist/api-client/bodies-of-work.js +78 -0
- package/dist/api-client/chat.d.ts +26 -0
- package/dist/api-client/chat.js +20 -0
- package/dist/api-client/connectors.d.ts +104 -0
- package/dist/api-client/connectors.js +46 -0
- package/dist/api-client/deployment.d.ts +190 -0
- package/dist/api-client/deployment.js +113 -0
- package/dist/api-client/file-checkouts.d.ts +71 -0
- package/dist/api-client/file-checkouts.js +43 -0
- package/dist/api-client/git-issues.d.ts +55 -0
- package/dist/api-client/git-issues.js +34 -0
- package/dist/api-client/index.d.ts +619 -1
- package/dist/api-client/index.js +148 -0
- package/dist/api-client/organizations.d.ts +101 -0
- package/dist/api-client/organizations.js +86 -0
- package/dist/api-client/progress.d.ts +61 -0
- package/dist/api-client/progress.js +34 -0
- package/dist/api-client/requests.d.ts +28 -0
- package/dist/api-client/requests.js +28 -0
- package/dist/api-client/sprints.d.ts +153 -0
- package/dist/api-client/sprints.js +82 -0
- package/dist/api-client/subtasks.d.ts +37 -0
- package/dist/api-client/subtasks.js +23 -0
- package/dist/api-client.d.ts +22 -0
- package/dist/api-client.js +15 -0
- package/dist/handlers/blockers.js +4 -0
- package/dist/handlers/chat.d.ts +21 -0
- package/dist/handlers/chat.js +59 -0
- package/dist/handlers/deployment.d.ts +3 -0
- package/dist/handlers/deployment.js +23 -0
- package/dist/handlers/discovery.js +1 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/session.js +113 -0
- package/dist/handlers/tasks.js +7 -0
- package/dist/handlers/tool-docs.js +7 -0
- package/dist/tools/deployment.js +13 -0
- package/docs/TOOLS.md +17 -3
- package/package.json +1 -1
- package/src/api-client/bodies-of-work.ts +194 -0
- package/src/api-client/chat.ts +50 -0
- package/src/api-client/connectors.ts +152 -0
- package/src/api-client/deployment.ts +313 -0
- package/src/api-client/file-checkouts.ts +115 -0
- package/src/api-client/git-issues.ts +88 -0
- package/src/api-client/index.ts +179 -13
- package/src/api-client/organizations.ts +185 -0
- package/src/api-client/progress.ts +94 -0
- package/src/api-client/requests.ts +54 -0
- package/src/api-client/sprints.ts +227 -0
- package/src/api-client/subtasks.ts +57 -0
- package/src/api-client.test.ts +16 -19
- package/src/api-client.ts +34 -0
- package/src/handlers/__test-setup__.ts +4 -0
- package/src/handlers/blockers.ts +9 -0
- package/src/handlers/chat.test.ts +185 -0
- package/src/handlers/chat.ts +69 -0
- package/src/handlers/deployment.ts +29 -0
- package/src/handlers/discovery.ts +1 -0
- package/src/handlers/index.ts +3 -0
- package/src/handlers/session.ts +138 -0
- package/src/handlers/tasks.ts +12 -0
- package/src/handlers/tool-docs.ts +8 -0
- package/src/tools/deployment.ts +13 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Checkouts API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for multi-agent file coordination:
|
|
5
|
+
* - checkoutFile: Check out a file for editing
|
|
6
|
+
* - checkinFile: Check in a file after editing
|
|
7
|
+
* - getFileCheckouts: Get file checkouts for a project
|
|
8
|
+
* - abandonCheckout: Force-release a checkout
|
|
9
|
+
* - getFileCheckoutsStats: Get aggregate checkout statistics
|
|
10
|
+
* - isFileAvailable: Check if a file is available for checkout
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
14
|
+
|
|
15
|
+
export interface FileCheckoutsMethods {
|
|
16
|
+
checkoutFile(projectId: string, filePath: string, reason?: string, sessionId?: string): Promise<ApiResponse<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
checkout_id: string;
|
|
19
|
+
file_path: string;
|
|
20
|
+
already_checked_out?: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
}>>;
|
|
23
|
+
|
|
24
|
+
checkinFile(params: {
|
|
25
|
+
checkout_id?: string;
|
|
26
|
+
project_id?: string;
|
|
27
|
+
file_path?: string;
|
|
28
|
+
summary?: string;
|
|
29
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
30
|
+
success: boolean;
|
|
31
|
+
checkout_id: string;
|
|
32
|
+
message: string;
|
|
33
|
+
}>>;
|
|
34
|
+
|
|
35
|
+
getFileCheckouts(projectId: string, options?: {
|
|
36
|
+
status?: string;
|
|
37
|
+
file_path?: string;
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
}): Promise<ApiResponse<{
|
|
41
|
+
checkouts: Array<{
|
|
42
|
+
id: string;
|
|
43
|
+
file_path: string;
|
|
44
|
+
status: string;
|
|
45
|
+
checked_out_at: string;
|
|
46
|
+
checkout_reason?: string;
|
|
47
|
+
checked_in_at?: string;
|
|
48
|
+
checkin_summary?: string;
|
|
49
|
+
checked_out_by?: string;
|
|
50
|
+
}>;
|
|
51
|
+
}>>;
|
|
52
|
+
|
|
53
|
+
abandonCheckout(params: {
|
|
54
|
+
checkout_id?: string;
|
|
55
|
+
project_id?: string;
|
|
56
|
+
file_path?: string;
|
|
57
|
+
}): Promise<ApiResponse<{
|
|
58
|
+
success: boolean;
|
|
59
|
+
checkout_id: string;
|
|
60
|
+
message: string;
|
|
61
|
+
}>>;
|
|
62
|
+
|
|
63
|
+
getFileCheckoutsStats(projectId: string): Promise<ApiResponse<{
|
|
64
|
+
total: number;
|
|
65
|
+
by_status: Record<string, number>;
|
|
66
|
+
}>>;
|
|
67
|
+
|
|
68
|
+
isFileAvailable(projectId: string, filePath: string): Promise<ApiResponse<{
|
|
69
|
+
available: boolean;
|
|
70
|
+
checkout?: {
|
|
71
|
+
id: string;
|
|
72
|
+
checked_out_by?: string;
|
|
73
|
+
checked_out_at: string;
|
|
74
|
+
checkout_reason?: string;
|
|
75
|
+
};
|
|
76
|
+
}>>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function createFileCheckoutsMethods(proxy: ProxyFn): FileCheckoutsMethods {
|
|
80
|
+
return {
|
|
81
|
+
async checkoutFile(projectId, filePath, reason, sessionId) {
|
|
82
|
+
return proxy('checkout_file', {
|
|
83
|
+
project_id: projectId,
|
|
84
|
+
file_path: filePath,
|
|
85
|
+
reason
|
|
86
|
+
}, sessionId ? { session_id: sessionId } : undefined);
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
async checkinFile(params, sessionId) {
|
|
90
|
+
return proxy('checkin_file', params as Record<string, unknown>, sessionId ? { session_id: sessionId } : undefined);
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
async getFileCheckouts(projectId, options) {
|
|
94
|
+
return proxy('get_file_checkouts', {
|
|
95
|
+
project_id: projectId,
|
|
96
|
+
...options
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
async abandonCheckout(params) {
|
|
101
|
+
return proxy('abandon_checkout', params as Record<string, unknown>);
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
async getFileCheckoutsStats(projectId) {
|
|
105
|
+
return proxy('get_file_checkouts_stats', { project_id: projectId });
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
async isFileAvailable(projectId, filePath) {
|
|
109
|
+
return proxy('is_file_available', {
|
|
110
|
+
project_id: projectId,
|
|
111
|
+
file_path: filePath
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Issues API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for git issue tracking:
|
|
5
|
+
* - addGitIssue: Record a git-related issue
|
|
6
|
+
* - resolveGitIssue: Mark a git issue as resolved
|
|
7
|
+
* - getGitIssues: List git issues for a project
|
|
8
|
+
* - deleteGitIssue: Delete a git issue
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
12
|
+
|
|
13
|
+
export interface GitIssuesMethods {
|
|
14
|
+
addGitIssue(projectId: string, params: {
|
|
15
|
+
issue_type: string;
|
|
16
|
+
branch: string;
|
|
17
|
+
target_branch?: string;
|
|
18
|
+
pr_url?: string;
|
|
19
|
+
conflicting_files?: string[];
|
|
20
|
+
error_message?: string;
|
|
21
|
+
task_id?: string;
|
|
22
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
23
|
+
success: boolean;
|
|
24
|
+
git_issue_id: string;
|
|
25
|
+
}>>;
|
|
26
|
+
|
|
27
|
+
resolveGitIssue(gitIssueId: string, params?: {
|
|
28
|
+
resolution_note?: string;
|
|
29
|
+
auto_resolved?: boolean;
|
|
30
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
git_issue_id: string;
|
|
33
|
+
}>>;
|
|
34
|
+
|
|
35
|
+
getGitIssues(projectId: string, params?: {
|
|
36
|
+
status?: string;
|
|
37
|
+
issue_type?: string;
|
|
38
|
+
branch?: string;
|
|
39
|
+
limit?: number;
|
|
40
|
+
offset?: number;
|
|
41
|
+
}): Promise<ApiResponse<{
|
|
42
|
+
git_issues: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
issue_type: string;
|
|
45
|
+
branch: string;
|
|
46
|
+
target_branch?: string;
|
|
47
|
+
pr_url?: string;
|
|
48
|
+
conflicting_files?: string[];
|
|
49
|
+
error_message?: string;
|
|
50
|
+
status: string;
|
|
51
|
+
created_at: string;
|
|
52
|
+
resolved_at?: string;
|
|
53
|
+
}>;
|
|
54
|
+
}>>;
|
|
55
|
+
|
|
56
|
+
deleteGitIssue(gitIssueId: string): Promise<ApiResponse<{
|
|
57
|
+
success: boolean;
|
|
58
|
+
}>>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function createGitIssuesMethods(proxy: ProxyFn): GitIssuesMethods {
|
|
62
|
+
return {
|
|
63
|
+
async addGitIssue(projectId, params, sessionId) {
|
|
64
|
+
return proxy('add_git_issue', {
|
|
65
|
+
project_id: projectId,
|
|
66
|
+
...params
|
|
67
|
+
}, sessionId ? { session_id: sessionId } : undefined);
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
async resolveGitIssue(gitIssueId, params, sessionId) {
|
|
71
|
+
return proxy('resolve_git_issue', {
|
|
72
|
+
git_issue_id: gitIssueId,
|
|
73
|
+
...params
|
|
74
|
+
}, sessionId ? { session_id: sessionId } : undefined);
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
async getGitIssues(projectId, params) {
|
|
78
|
+
return proxy('get_git_issues', {
|
|
79
|
+
project_id: projectId,
|
|
80
|
+
...params
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
async deleteGitIssue(gitIssueId) {
|
|
85
|
+
return proxy('delete_git_issue', { git_issue_id: gitIssueId });
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
package/src/api-client/index.ts
CHANGED
|
@@ -21,6 +21,17 @@ import { createFindingsMethods, type FindingsMethods } from './findings.js';
|
|
|
21
21
|
import { createMilestonesMethods, type MilestonesMethods } from './milestones.js';
|
|
22
22
|
import { createValidationMethods, type ValidationMethods } from './validation.js';
|
|
23
23
|
import { createFallbackMethods, type FallbackMethods } from './fallback.js';
|
|
24
|
+
import { createRequestsMethods, type RequestsMethods } from './requests.js';
|
|
25
|
+
import { createDeploymentMethods, type DeploymentMethods } from './deployment.js';
|
|
26
|
+
import { createOrganizationsMethods, type OrganizationsMethods } from './organizations.js';
|
|
27
|
+
import { createBodiesOfWorkMethods, type BodiesOfWorkMethods } from './bodies-of-work.js';
|
|
28
|
+
import { createGitIssuesMethods, type GitIssuesMethods } from './git-issues.js';
|
|
29
|
+
import { createFileCheckoutsMethods, type FileCheckoutsMethods } from './file-checkouts.js';
|
|
30
|
+
import { createConnectorsMethods, type ConnectorsMethods } from './connectors.js';
|
|
31
|
+
import { createSprintsMethods, type SprintsMethods } from './sprints.js';
|
|
32
|
+
import { createSubtasksMethods, type SubtasksMethods } from './subtasks.js';
|
|
33
|
+
import { createProgressMethods, type ProgressMethods } from './progress.js';
|
|
34
|
+
import { createChatMethods, type ChatMethods } from './chat.js';
|
|
24
35
|
|
|
25
36
|
// Re-export types
|
|
26
37
|
export type { ApiClientConfig, ApiResponse, RetryConfig, RequestFn, ProxyFn } from './types.js';
|
|
@@ -37,6 +48,17 @@ export type { FindingsMethods } from './findings.js';
|
|
|
37
48
|
export type { MilestonesMethods } from './milestones.js';
|
|
38
49
|
export type { ValidationMethods } from './validation.js';
|
|
39
50
|
export type { FallbackMethods } from './fallback.js';
|
|
51
|
+
export type { RequestsMethods } from './requests.js';
|
|
52
|
+
export type { DeploymentMethods } from './deployment.js';
|
|
53
|
+
export type { OrganizationsMethods } from './organizations.js';
|
|
54
|
+
export type { BodiesOfWorkMethods } from './bodies-of-work.js';
|
|
55
|
+
export type { GitIssuesMethods } from './git-issues.js';
|
|
56
|
+
export type { FileCheckoutsMethods } from './file-checkouts.js';
|
|
57
|
+
export type { ConnectorsMethods } from './connectors.js';
|
|
58
|
+
export type { SprintsMethods } from './sprints.js';
|
|
59
|
+
export type { SubtasksMethods } from './subtasks.js';
|
|
60
|
+
export type { ProgressMethods } from './progress.js';
|
|
61
|
+
export type { ChatMethods } from './chat.js';
|
|
40
62
|
|
|
41
63
|
const DEFAULT_API_URL = 'https://vibescope.dev';
|
|
42
64
|
|
|
@@ -86,7 +108,18 @@ export interface VibescopeApiClientMethods
|
|
|
86
108
|
FindingsMethods,
|
|
87
109
|
MilestonesMethods,
|
|
88
110
|
ValidationMethods,
|
|
89
|
-
FallbackMethods
|
|
111
|
+
FallbackMethods,
|
|
112
|
+
RequestsMethods,
|
|
113
|
+
DeploymentMethods,
|
|
114
|
+
OrganizationsMethods,
|
|
115
|
+
BodiesOfWorkMethods,
|
|
116
|
+
GitIssuesMethods,
|
|
117
|
+
FileCheckoutsMethods,
|
|
118
|
+
ConnectorsMethods,
|
|
119
|
+
SprintsMethods,
|
|
120
|
+
SubtasksMethods,
|
|
121
|
+
ProgressMethods,
|
|
122
|
+
ChatMethods {}
|
|
90
123
|
|
|
91
124
|
export class VibescopeApiClient implements VibescopeApiClientMethods {
|
|
92
125
|
private apiKey: string;
|
|
@@ -107,6 +140,17 @@ export class VibescopeApiClient implements VibescopeApiClientMethods {
|
|
|
107
140
|
private milestonesMethods: MilestonesMethods;
|
|
108
141
|
private validationMethods: ValidationMethods;
|
|
109
142
|
private fallbackMethods: FallbackMethods;
|
|
143
|
+
private requestsMethods: RequestsMethods;
|
|
144
|
+
private deploymentMethods: DeploymentMethods;
|
|
145
|
+
private organizationsMethods: OrganizationsMethods;
|
|
146
|
+
private bodiesOfWorkMethods: BodiesOfWorkMethods;
|
|
147
|
+
private gitIssuesMethods: GitIssuesMethods;
|
|
148
|
+
private fileCheckoutsMethods: FileCheckoutsMethods;
|
|
149
|
+
private connectorsMethods: ConnectorsMethods;
|
|
150
|
+
private sprintsMethods: SprintsMethods;
|
|
151
|
+
private subtasksMethods: SubtasksMethods;
|
|
152
|
+
private progressMethods: ProgressMethods;
|
|
153
|
+
private chatMethods: ChatMethods;
|
|
110
154
|
|
|
111
155
|
constructor(config: ApiClientConfig) {
|
|
112
156
|
this.apiKey = config.apiKey;
|
|
@@ -137,6 +181,17 @@ export class VibescopeApiClient implements VibescopeApiClientMethods {
|
|
|
137
181
|
this.milestonesMethods = createMilestonesMethods(proxy);
|
|
138
182
|
this.validationMethods = createValidationMethods(proxy);
|
|
139
183
|
this.fallbackMethods = createFallbackMethods(proxy);
|
|
184
|
+
this.requestsMethods = createRequestsMethods(proxy);
|
|
185
|
+
this.deploymentMethods = createDeploymentMethods(proxy);
|
|
186
|
+
this.organizationsMethods = createOrganizationsMethods(proxy);
|
|
187
|
+
this.bodiesOfWorkMethods = createBodiesOfWorkMethods(proxy);
|
|
188
|
+
this.gitIssuesMethods = createGitIssuesMethods(proxy);
|
|
189
|
+
this.fileCheckoutsMethods = createFileCheckoutsMethods(proxy);
|
|
190
|
+
this.connectorsMethods = createConnectorsMethods(proxy);
|
|
191
|
+
this.sprintsMethods = createSprintsMethods(proxy);
|
|
192
|
+
this.subtasksMethods = createSubtasksMethods(proxy);
|
|
193
|
+
this.progressMethods = createProgressMethods(request, proxy);
|
|
194
|
+
this.chatMethods = createChatMethods(proxy);
|
|
140
195
|
}
|
|
141
196
|
|
|
142
197
|
private async request<T>(method: string, path: string, body?: unknown): Promise<ApiResponse<T>> {
|
|
@@ -357,19 +412,130 @@ export class VibescopeApiClient implements VibescopeApiClientMethods {
|
|
|
357
412
|
stopFallbackActivity = (projectId: string, summary?: string, sessionId?: string) => this.fallbackMethods.stopFallbackActivity(projectId, summary, sessionId);
|
|
358
413
|
|
|
359
414
|
// ============================================================================
|
|
360
|
-
//
|
|
361
|
-
// The following domains need to be split into separate files:
|
|
362
|
-
// - requests.ts (getPendingRequests, answerQuestion, etc.)
|
|
363
|
-
// - deployment.ts (requestDeployment, startDeployment, etc.)
|
|
364
|
-
// - organizations.ts (listOrganizations, etc.)
|
|
365
|
-
// - bodies-of-work.ts (createBodyOfWork, etc.)
|
|
366
|
-
// - git-issues.ts (addGitIssue, etc.)
|
|
367
|
-
// - file-checkouts.ts (checkoutFile, checkinFile, etc.)
|
|
368
|
-
// - connectors.ts (getConnectors, addConnector, etc.)
|
|
369
|
-
// - sprints.ts (getSprints, createSprint, etc.)
|
|
370
|
-
// - subtasks.ts (addSubtask, getSubtasks)
|
|
371
|
-
// - progress.ts (logProgress, getActivityHistory, etc.)
|
|
415
|
+
// Requests methods (delegated)
|
|
372
416
|
// ============================================================================
|
|
417
|
+
getPendingRequests = (projectId: string, sessionId?: string, limit?: number, offset?: number) => this.requestsMethods.getPendingRequests(projectId, sessionId, limit, offset);
|
|
418
|
+
acknowledgeRequest = (requestId: string, sessionId?: string) => this.requestsMethods.acknowledgeRequest(requestId, sessionId);
|
|
419
|
+
answerQuestion = (requestId: string, answer: string, sessionId?: string) => this.requestsMethods.answerQuestion(requestId, answer, sessionId);
|
|
420
|
+
|
|
421
|
+
// ============================================================================
|
|
422
|
+
// Deployment methods (delegated)
|
|
423
|
+
// ============================================================================
|
|
424
|
+
requestDeployment = (projectId: string, params?: Parameters<DeploymentMethods['requestDeployment']>[1], sessionId?: string) => this.deploymentMethods.requestDeployment(projectId, params, sessionId);
|
|
425
|
+
checkDeploymentStatus = (projectId: string) => this.deploymentMethods.checkDeploymentStatus(projectId);
|
|
426
|
+
claimDeploymentValidation = (projectId: string, sessionId?: string) => this.deploymentMethods.claimDeploymentValidation(projectId, sessionId);
|
|
427
|
+
reportValidation = (projectId: string, params: Parameters<DeploymentMethods['reportValidation']>[1]) => this.deploymentMethods.reportValidation(projectId, params);
|
|
428
|
+
startDeployment = (projectId: string, sessionId?: string) => this.deploymentMethods.startDeployment(projectId, sessionId);
|
|
429
|
+
completeDeployment = (projectId: string, params: Parameters<DeploymentMethods['completeDeployment']>[1]) => this.deploymentMethods.completeDeployment(projectId, params);
|
|
430
|
+
cancelDeployment = (projectId: string, reason?: string) => this.deploymentMethods.cancelDeployment(projectId, reason);
|
|
431
|
+
addDeploymentRequirement = (projectId: string, params: Parameters<DeploymentMethods['addDeploymentRequirement']>[1]) => this.deploymentMethods.addDeploymentRequirement(projectId, params);
|
|
432
|
+
getDeploymentRequirements = (projectId: string, params?: Parameters<DeploymentMethods['getDeploymentRequirements']>[1]) => this.deploymentMethods.getDeploymentRequirements(projectId, params);
|
|
433
|
+
getDeploymentRequirementsStats = (projectId: string) => this.deploymentMethods.getDeploymentRequirementsStats(projectId);
|
|
434
|
+
completeDeploymentRequirement = (requirementId: string) => this.deploymentMethods.completeDeploymentRequirement(requirementId);
|
|
435
|
+
reorderDeploymentRequirements = (projectId: string, params: Parameters<DeploymentMethods['reorderDeploymentRequirements']>[1]) => this.deploymentMethods.reorderDeploymentRequirements(projectId, params);
|
|
436
|
+
scheduleDeployment = (projectId: string, params: Parameters<DeploymentMethods['scheduleDeployment']>[1]) => this.deploymentMethods.scheduleDeployment(projectId, params);
|
|
437
|
+
getScheduledDeployments = (projectId: string, params?: Parameters<DeploymentMethods['getScheduledDeployments']>[1]) => this.deploymentMethods.getScheduledDeployments(projectId, params);
|
|
438
|
+
updateScheduledDeployment = (scheduleId: string, updates: Parameters<DeploymentMethods['updateScheduledDeployment']>[1]) => this.deploymentMethods.updateScheduledDeployment(scheduleId, updates);
|
|
439
|
+
deleteScheduledDeployment = (scheduleId: string) => this.deploymentMethods.deleteScheduledDeployment(scheduleId);
|
|
440
|
+
triggerScheduledDeployment = (scheduleId: string, sessionId?: string) => this.deploymentMethods.triggerScheduledDeployment(scheduleId, sessionId);
|
|
441
|
+
checkDueDeployments = (projectId: string) => this.deploymentMethods.checkDueDeployments(projectId);
|
|
442
|
+
|
|
443
|
+
// ============================================================================
|
|
444
|
+
// Organizations methods (delegated)
|
|
445
|
+
// ============================================================================
|
|
446
|
+
listOrganizations = () => this.organizationsMethods.listOrganizations();
|
|
447
|
+
createOrganization = (params: Parameters<OrganizationsMethods['createOrganization']>[0]) => this.organizationsMethods.createOrganization(params);
|
|
448
|
+
updateOrganization = (organizationId: string, updates: Parameters<OrganizationsMethods['updateOrganization']>[1]) => this.organizationsMethods.updateOrganization(organizationId, updates);
|
|
449
|
+
deleteOrganization = (organizationId: string) => this.organizationsMethods.deleteOrganization(organizationId);
|
|
450
|
+
listOrgMembers = (organizationId: string) => this.organizationsMethods.listOrgMembers(organizationId);
|
|
451
|
+
inviteMember = (organizationId: string, email: string, role?: string) => this.organizationsMethods.inviteMember(organizationId, email, role);
|
|
452
|
+
updateMemberRole = (organizationId: string, userId: string, role: string) => this.organizationsMethods.updateMemberRole(organizationId, userId, role);
|
|
453
|
+
removeMember = (organizationId: string, userId: string) => this.organizationsMethods.removeMember(organizationId, userId);
|
|
454
|
+
leaveOrganization = (organizationId: string) => this.organizationsMethods.leaveOrganization(organizationId);
|
|
455
|
+
shareProjectWithOrg = (projectId: string, organizationId: string, permission?: string) => this.organizationsMethods.shareProjectWithOrg(projectId, organizationId, permission);
|
|
456
|
+
unshareProject = (projectId: string, organizationId: string) => this.organizationsMethods.unshareProject(projectId, organizationId);
|
|
457
|
+
updateProjectShare = (projectId: string, organizationId: string, permission: string) => this.organizationsMethods.updateProjectShare(projectId, organizationId, permission);
|
|
458
|
+
listProjectShares = (projectId: string) => this.organizationsMethods.listProjectShares(projectId);
|
|
459
|
+
|
|
460
|
+
// ============================================================================
|
|
461
|
+
// Bodies of work methods (delegated)
|
|
462
|
+
// ============================================================================
|
|
463
|
+
createBodyOfWork = (projectId: string, params: Parameters<BodiesOfWorkMethods['createBodyOfWork']>[1]) => this.bodiesOfWorkMethods.createBodyOfWork(projectId, params);
|
|
464
|
+
getBodyOfWork = (bodyOfWorkId: string) => this.bodiesOfWorkMethods.getBodyOfWork(bodyOfWorkId);
|
|
465
|
+
getBodiesOfWork = (projectId: string, params?: Parameters<BodiesOfWorkMethods['getBodiesOfWork']>[1]) => this.bodiesOfWorkMethods.getBodiesOfWork(projectId, params);
|
|
466
|
+
updateBodyOfWork = (bodyOfWorkId: string, updates: Parameters<BodiesOfWorkMethods['updateBodyOfWork']>[1]) => this.bodiesOfWorkMethods.updateBodyOfWork(bodyOfWorkId, updates);
|
|
467
|
+
deleteBodyOfWork = (bodyOfWorkId: string) => this.bodiesOfWorkMethods.deleteBodyOfWork(bodyOfWorkId);
|
|
468
|
+
addTaskToBodyOfWork = (bodyOfWorkId: string, taskId: string, phase?: string, orderIndex?: number) => this.bodiesOfWorkMethods.addTaskToBodyOfWork(bodyOfWorkId, taskId, phase, orderIndex);
|
|
469
|
+
removeTaskFromBodyOfWork = (taskId: string) => this.bodiesOfWorkMethods.removeTaskFromBodyOfWork(taskId);
|
|
470
|
+
activateBodyOfWork = (bodyOfWorkId: string) => this.bodiesOfWorkMethods.activateBodyOfWork(bodyOfWorkId);
|
|
471
|
+
addTaskDependency = (bodyOfWorkId: string, taskId: string, dependsOnTaskId: string) => this.bodiesOfWorkMethods.addTaskDependency(bodyOfWorkId, taskId, dependsOnTaskId);
|
|
472
|
+
removeTaskDependency = (taskId: string, dependsOnTaskId: string) => this.bodiesOfWorkMethods.removeTaskDependency(taskId, dependsOnTaskId);
|
|
473
|
+
getTaskDependencies = (params: Parameters<BodiesOfWorkMethods['getTaskDependencies']>[0]) => this.bodiesOfWorkMethods.getTaskDependencies(params);
|
|
474
|
+
getNextBodyOfWorkTask = (bodyOfWorkId: string) => this.bodiesOfWorkMethods.getNextBodyOfWorkTask(bodyOfWorkId);
|
|
475
|
+
|
|
476
|
+
// ============================================================================
|
|
477
|
+
// Git issues methods (delegated)
|
|
478
|
+
// ============================================================================
|
|
479
|
+
addGitIssue = (projectId: string, params: Parameters<GitIssuesMethods['addGitIssue']>[1], sessionId?: string) => this.gitIssuesMethods.addGitIssue(projectId, params, sessionId);
|
|
480
|
+
resolveGitIssue = (gitIssueId: string, params?: Parameters<GitIssuesMethods['resolveGitIssue']>[1], sessionId?: string) => this.gitIssuesMethods.resolveGitIssue(gitIssueId, params, sessionId);
|
|
481
|
+
getGitIssues = (projectId: string, params?: Parameters<GitIssuesMethods['getGitIssues']>[1]) => this.gitIssuesMethods.getGitIssues(projectId, params);
|
|
482
|
+
deleteGitIssue = (gitIssueId: string) => this.gitIssuesMethods.deleteGitIssue(gitIssueId);
|
|
483
|
+
|
|
484
|
+
// ============================================================================
|
|
485
|
+
// File checkouts methods (delegated)
|
|
486
|
+
// ============================================================================
|
|
487
|
+
checkoutFile = (projectId: string, filePath: string, reason?: string, sessionId?: string) => this.fileCheckoutsMethods.checkoutFile(projectId, filePath, reason, sessionId);
|
|
488
|
+
checkinFile = (params: Parameters<FileCheckoutsMethods['checkinFile']>[0], sessionId?: string) => this.fileCheckoutsMethods.checkinFile(params, sessionId);
|
|
489
|
+
getFileCheckouts = (projectId: string, options?: Parameters<FileCheckoutsMethods['getFileCheckouts']>[1]) => this.fileCheckoutsMethods.getFileCheckouts(projectId, options);
|
|
490
|
+
abandonCheckout = (params: Parameters<FileCheckoutsMethods['abandonCheckout']>[0]) => this.fileCheckoutsMethods.abandonCheckout(params);
|
|
491
|
+
getFileCheckoutsStats = (projectId: string) => this.fileCheckoutsMethods.getFileCheckoutsStats(projectId);
|
|
492
|
+
isFileAvailable = (projectId: string, filePath: string) => this.fileCheckoutsMethods.isFileAvailable(projectId, filePath);
|
|
493
|
+
|
|
494
|
+
// ============================================================================
|
|
495
|
+
// Connectors methods (delegated)
|
|
496
|
+
// ============================================================================
|
|
497
|
+
getConnectors = (projectId: string, params?: Parameters<ConnectorsMethods['getConnectors']>[1]) => this.connectorsMethods.getConnectors(projectId, params);
|
|
498
|
+
getConnector = (connectorId: string) => this.connectorsMethods.getConnector(connectorId);
|
|
499
|
+
addConnector = (projectId: string, params: Parameters<ConnectorsMethods['addConnector']>[1]) => this.connectorsMethods.addConnector(projectId, params);
|
|
500
|
+
updateConnector = (connectorId: string, updates: Parameters<ConnectorsMethods['updateConnector']>[1]) => this.connectorsMethods.updateConnector(connectorId, updates);
|
|
501
|
+
deleteConnector = (connectorId: string) => this.connectorsMethods.deleteConnector(connectorId);
|
|
502
|
+
testConnector = (connectorId: string) => this.connectorsMethods.testConnector(connectorId);
|
|
503
|
+
getConnectorEvents = (params: Parameters<ConnectorsMethods['getConnectorEvents']>[0]) => this.connectorsMethods.getConnectorEvents(params);
|
|
504
|
+
|
|
505
|
+
// ============================================================================
|
|
506
|
+
// Sprints methods (delegated)
|
|
507
|
+
// ============================================================================
|
|
508
|
+
createSprint = (projectId: string, params: Parameters<SprintsMethods['createSprint']>[1]) => this.sprintsMethods.createSprint(projectId, params);
|
|
509
|
+
updateSprint = (sprintId: string, updates: Parameters<SprintsMethods['updateSprint']>[1]) => this.sprintsMethods.updateSprint(sprintId, updates);
|
|
510
|
+
getSprint = (sprintId: string, summaryOnly?: boolean) => this.sprintsMethods.getSprint(sprintId, summaryOnly);
|
|
511
|
+
getSprints = (projectId: string, params?: Parameters<SprintsMethods['getSprints']>[1]) => this.sprintsMethods.getSprints(projectId, params);
|
|
512
|
+
deleteSprint = (sprintId: string) => this.sprintsMethods.deleteSprint(sprintId);
|
|
513
|
+
startSprint = (sprintId: string) => this.sprintsMethods.startSprint(sprintId);
|
|
514
|
+
completeSprint = (sprintId: string, params?: Parameters<SprintsMethods['completeSprint']>[1]) => this.sprintsMethods.completeSprint(sprintId, params);
|
|
515
|
+
addTaskToSprint = (sprintId: string, taskId: string, params?: Parameters<SprintsMethods['addTaskToSprint']>[2]) => this.sprintsMethods.addTaskToSprint(sprintId, taskId, params);
|
|
516
|
+
removeTaskFromSprint = (sprintId: string, taskId: string) => this.sprintsMethods.removeTaskFromSprint(sprintId, taskId);
|
|
517
|
+
getSprintBacklog = (projectId: string, sprintId?: string, params?: Parameters<SprintsMethods['getSprintBacklog']>[2]) => this.sprintsMethods.getSprintBacklog(projectId, sprintId, params);
|
|
518
|
+
getSprintVelocity = (projectId: string, limit?: number) => this.sprintsMethods.getSprintVelocity(projectId, limit);
|
|
519
|
+
|
|
520
|
+
// ============================================================================
|
|
521
|
+
// Subtasks methods (delegated)
|
|
522
|
+
// ============================================================================
|
|
523
|
+
addSubtask = (parentTaskId: string, params: Parameters<SubtasksMethods['addSubtask']>[1], sessionId?: string) => this.subtasksMethods.addSubtask(parentTaskId, params, sessionId);
|
|
524
|
+
getSubtasks = (parentTaskId: string, status?: string) => this.subtasksMethods.getSubtasks(parentTaskId, status);
|
|
525
|
+
|
|
526
|
+
// ============================================================================
|
|
527
|
+
// Progress methods (delegated)
|
|
528
|
+
// ============================================================================
|
|
529
|
+
logProgress = (projectId: string, params: Parameters<ProgressMethods['logProgress']>[1]) => this.progressMethods.logProgress(projectId, params);
|
|
530
|
+
getActivityFeed = (projectId: string, params?: Parameters<ProgressMethods['getActivityFeed']>[1]) => this.progressMethods.getActivityFeed(projectId, params);
|
|
531
|
+
getActivityHistory = (projectId: string, params?: Parameters<ProgressMethods['getActivityHistory']>[1]) => this.progressMethods.getActivityHistory(projectId, params);
|
|
532
|
+
getActivitySchedules = (projectId: string, params?: Parameters<ProgressMethods['getActivitySchedules']>[1]) => this.progressMethods.getActivitySchedules(projectId, params);
|
|
533
|
+
|
|
534
|
+
// ============================================================================
|
|
535
|
+
// Chat methods (delegated)
|
|
536
|
+
// ============================================================================
|
|
537
|
+
sendProjectMessage = (projectId: string, message: string, sessionId?: string) => this.chatMethods.sendProjectMessage(projectId, message, sessionId);
|
|
538
|
+
getProjectMessages = (projectId: string, limit?: number) => this.chatMethods.getProjectMessages(projectId, limit);
|
|
373
539
|
}
|
|
374
540
|
|
|
375
541
|
// Singleton instance
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organizations API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for organization management:
|
|
5
|
+
* - listOrganizations: List user's organizations
|
|
6
|
+
* - createOrganization: Create a new organization
|
|
7
|
+
* - updateOrganization: Update organization details
|
|
8
|
+
* - deleteOrganization: Delete an organization
|
|
9
|
+
* - listOrgMembers: List organization members
|
|
10
|
+
* - inviteMember: Invite a user to an organization
|
|
11
|
+
* - updateMemberRole: Change a member's role
|
|
12
|
+
* - removeMember: Remove a member
|
|
13
|
+
* - leaveOrganization: Leave an organization
|
|
14
|
+
* - shareProjectWithOrg: Share a project with an organization
|
|
15
|
+
* - unshareProject: Remove a project share
|
|
16
|
+
* - updateProjectShare: Update project share permission
|
|
17
|
+
* - listProjectShares: List project shares
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
21
|
+
|
|
22
|
+
export interface OrganizationsMethods {
|
|
23
|
+
listOrganizations(): Promise<ApiResponse<{
|
|
24
|
+
organizations: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
slug: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
role: string;
|
|
30
|
+
}>;
|
|
31
|
+
}>>;
|
|
32
|
+
|
|
33
|
+
createOrganization(params: {
|
|
34
|
+
name: string;
|
|
35
|
+
slug?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
}): Promise<ApiResponse<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
organization: { id: string; name: string; slug: string };
|
|
40
|
+
}>>;
|
|
41
|
+
|
|
42
|
+
updateOrganization(organizationId: string, updates: {
|
|
43
|
+
name?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
logo_url?: string;
|
|
46
|
+
}): Promise<ApiResponse<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
organization_id: string;
|
|
49
|
+
}>>;
|
|
50
|
+
|
|
51
|
+
deleteOrganization(organizationId: string): Promise<ApiResponse<{
|
|
52
|
+
success: boolean;
|
|
53
|
+
}>>;
|
|
54
|
+
|
|
55
|
+
listOrgMembers(organizationId: string): Promise<ApiResponse<{
|
|
56
|
+
members: Array<{
|
|
57
|
+
user_id: string;
|
|
58
|
+
email: string;
|
|
59
|
+
role: string;
|
|
60
|
+
joined_at: string;
|
|
61
|
+
}>;
|
|
62
|
+
}>>;
|
|
63
|
+
|
|
64
|
+
inviteMember(organizationId: string, email: string, role?: string): Promise<ApiResponse<{
|
|
65
|
+
success: boolean;
|
|
66
|
+
invite_id: string;
|
|
67
|
+
}>>;
|
|
68
|
+
|
|
69
|
+
updateMemberRole(organizationId: string, userId: string, role: string): Promise<ApiResponse<{
|
|
70
|
+
success: boolean;
|
|
71
|
+
}>>;
|
|
72
|
+
|
|
73
|
+
removeMember(organizationId: string, userId: string): Promise<ApiResponse<{
|
|
74
|
+
success: boolean;
|
|
75
|
+
}>>;
|
|
76
|
+
|
|
77
|
+
leaveOrganization(organizationId: string): Promise<ApiResponse<{
|
|
78
|
+
success: boolean;
|
|
79
|
+
message: string;
|
|
80
|
+
}>>;
|
|
81
|
+
|
|
82
|
+
shareProjectWithOrg(projectId: string, organizationId: string, permission?: string): Promise<ApiResponse<{
|
|
83
|
+
success: boolean;
|
|
84
|
+
}>>;
|
|
85
|
+
|
|
86
|
+
unshareProject(projectId: string, organizationId: string): Promise<ApiResponse<{
|
|
87
|
+
success: boolean;
|
|
88
|
+
}>>;
|
|
89
|
+
|
|
90
|
+
updateProjectShare(projectId: string, organizationId: string, permission: string): Promise<ApiResponse<{
|
|
91
|
+
success: boolean;
|
|
92
|
+
share: { permission: string };
|
|
93
|
+
}>>;
|
|
94
|
+
|
|
95
|
+
listProjectShares(projectId: string): Promise<ApiResponse<{
|
|
96
|
+
shares: Array<{
|
|
97
|
+
id: string;
|
|
98
|
+
permission: string;
|
|
99
|
+
shared_at: string;
|
|
100
|
+
organization: { id: string; name: string; slug: string };
|
|
101
|
+
}>;
|
|
102
|
+
count: number;
|
|
103
|
+
}>>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function createOrganizationsMethods(proxy: ProxyFn): OrganizationsMethods {
|
|
107
|
+
return {
|
|
108
|
+
async listOrganizations() {
|
|
109
|
+
return proxy('list_organizations', {});
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
async createOrganization(params) {
|
|
113
|
+
return proxy('create_organization', params);
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
async updateOrganization(organizationId, updates) {
|
|
117
|
+
return proxy('update_organization', {
|
|
118
|
+
organization_id: organizationId,
|
|
119
|
+
...updates
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
async deleteOrganization(organizationId) {
|
|
124
|
+
return proxy('delete_organization', { organization_id: organizationId });
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
async listOrgMembers(organizationId) {
|
|
128
|
+
return proxy('list_org_members', { organization_id: organizationId });
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
async inviteMember(organizationId, email, role) {
|
|
132
|
+
return proxy('invite_member', {
|
|
133
|
+
organization_id: organizationId,
|
|
134
|
+
email,
|
|
135
|
+
role
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
async updateMemberRole(organizationId, userId, role) {
|
|
140
|
+
return proxy('update_member_role', {
|
|
141
|
+
organization_id: organizationId,
|
|
142
|
+
user_id: userId,
|
|
143
|
+
role
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
async removeMember(organizationId, userId) {
|
|
148
|
+
return proxy('remove_member', {
|
|
149
|
+
organization_id: organizationId,
|
|
150
|
+
user_id: userId
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
async leaveOrganization(organizationId) {
|
|
155
|
+
return proxy('leave_organization', { organization_id: organizationId });
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
async shareProjectWithOrg(projectId, organizationId, permission) {
|
|
159
|
+
return proxy('share_project_with_org', {
|
|
160
|
+
project_id: projectId,
|
|
161
|
+
organization_id: organizationId,
|
|
162
|
+
permission
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
async unshareProject(projectId, organizationId) {
|
|
167
|
+
return proxy('unshare_project', {
|
|
168
|
+
project_id: projectId,
|
|
169
|
+
organization_id: organizationId
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
async updateProjectShare(projectId, organizationId, permission) {
|
|
174
|
+
return proxy('update_project_share', {
|
|
175
|
+
project_id: projectId,
|
|
176
|
+
organization_id: organizationId,
|
|
177
|
+
permission
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
async listProjectShares(projectId) {
|
|
182
|
+
return proxy('list_project_shares', { project_id: projectId });
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|