@_davideast/stitch-mcp 0.0.1
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/LICENSE +212 -0
- package/README.md +167 -0
- package/bin/stitch-mcp.js +2 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +15772 -0
- package/dist/commands/doctor/handler.d.ts +9 -0
- package/dist/commands/doctor/spec.d.ts +130 -0
- package/dist/commands/init/handler.d.ts +17 -0
- package/dist/commands/init/spec.d.ts +88 -0
- package/dist/commands/proxy/handler.d.ts +7 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +8905 -0
- package/dist/platform/detector.d.ts +29 -0
- package/dist/platform/paths.d.ts +20 -0
- package/dist/platform/shell.d.ts +26 -0
- package/dist/services/gcloud/handler.d.ts +48 -0
- package/dist/services/gcloud/spec.d.ts +405 -0
- package/dist/services/mcp-config/handler.d.ts +12 -0
- package/dist/services/mcp-config/spec.d.ts +88 -0
- package/dist/services/project/handler.d.ts +11 -0
- package/dist/services/project/spec.d.ts +86 -0
- package/dist/services/proxy/handler.d.ts +15 -0
- package/dist/services/proxy/spec.d.ts +83 -0
- package/dist/services/stitch/handler.d.ts +15 -0
- package/dist/services/stitch/spec.d.ts +262 -0
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/commands/doctor/handler.d.ts +9 -0
- package/dist/src/commands/doctor/handler.test.d.ts +1 -0
- package/dist/src/commands/doctor/spec.d.ts +130 -0
- package/dist/src/commands/doctor/spec.test.d.ts +1 -0
- package/dist/src/commands/init/handler.d.ts +17 -0
- package/dist/src/commands/init/handler.test.d.ts +1 -0
- package/dist/src/commands/init/spec.d.ts +88 -0
- package/dist/src/commands/init/spec.test.d.ts +1 -0
- package/dist/src/commands/proxy/handler.d.ts +7 -0
- package/dist/src/commands/proxy/handler.test.d.ts +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/platform/detector.d.ts +29 -0
- package/dist/src/platform/paths.d.ts +20 -0
- package/dist/src/platform/shell.d.ts +26 -0
- package/dist/src/services/gcloud/handler.d.ts +48 -0
- package/dist/src/services/gcloud/handler.test.d.ts +1 -0
- package/dist/src/services/gcloud/spec.d.ts +405 -0
- package/dist/src/services/mcp-config/handler.d.ts +12 -0
- package/dist/src/services/mcp-config/handler.test.d.ts +1 -0
- package/dist/src/services/mcp-config/spec.d.ts +88 -0
- package/dist/src/services/mcp-config/spec.test.d.ts +1 -0
- package/dist/src/services/project/handler.d.ts +11 -0
- package/dist/src/services/project/handler.test.d.ts +1 -0
- package/dist/src/services/project/spec.d.ts +86 -0
- package/dist/src/services/project/spec.test.d.ts +1 -0
- package/dist/src/services/proxy/handler.d.ts +15 -0
- package/dist/src/services/proxy/handler.test.d.ts +1 -0
- package/dist/src/services/proxy/spec.d.ts +83 -0
- package/dist/src/services/proxy/spec.test.d.ts +1 -0
- package/dist/src/services/stitch/handler.d.ts +15 -0
- package/dist/src/services/stitch/handler.test.d.ts +1 -0
- package/dist/src/services/stitch/spec.d.ts +262 -0
- package/dist/src/services/stitch/spec.test.d.ts +1 -0
- package/dist/src/ui/spinner.d.ts +11 -0
- package/dist/src/ui/theme.d.ts +18 -0
- package/dist/src/ui/wizard.d.ts +24 -0
- package/dist/tests/mocks/shell.d.ts +2 -0
- package/dist/ui/spinner.d.ts +11 -0
- package/dist/ui/theme.d.ts +18 -0
- package/dist/ui/wizard.d.ts +24 -0
- package/package.json +56 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type McpClient = 'antigravity' | 'vscode' | 'cursor' | 'claude-code' | 'gemini-cli';
|
|
3
|
+
export type TransportType = 'http' | 'stdio';
|
|
4
|
+
export declare const GenerateConfigInputSchema: z.ZodObject<{
|
|
5
|
+
client: z.ZodEnum<["antigravity", "vscode", "cursor", "claude-code", "gemini-cli"]>;
|
|
6
|
+
projectId: z.ZodString;
|
|
7
|
+
accessToken: z.ZodString;
|
|
8
|
+
transport: z.ZodDefault<z.ZodEnum<["http", "stdio"]>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
client: "antigravity" | "vscode" | "cursor" | "claude-code" | "gemini-cli";
|
|
11
|
+
transport: "http" | "stdio";
|
|
12
|
+
projectId: string;
|
|
13
|
+
accessToken: string;
|
|
14
|
+
}, {
|
|
15
|
+
client: "antigravity" | "vscode" | "cursor" | "claude-code" | "gemini-cli";
|
|
16
|
+
projectId: string;
|
|
17
|
+
accessToken: string;
|
|
18
|
+
transport?: "http" | "stdio" | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type GenerateConfigInput = z.infer<typeof GenerateConfigInputSchema>;
|
|
21
|
+
export declare const McpConfigErrorCode: z.ZodEnum<["INVALID_CLIENT", "CONFIG_GENERATION_FAILED", "UNKNOWN_ERROR"]>;
|
|
22
|
+
export declare const McpConfigSuccess: z.ZodObject<{
|
|
23
|
+
success: z.ZodLiteral<true>;
|
|
24
|
+
data: z.ZodObject<{
|
|
25
|
+
config: z.ZodString;
|
|
26
|
+
instructions: z.ZodString;
|
|
27
|
+
filePath: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
instructions: string;
|
|
30
|
+
config: string;
|
|
31
|
+
filePath?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
instructions: string;
|
|
34
|
+
config: string;
|
|
35
|
+
filePath?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
success: true;
|
|
39
|
+
data: {
|
|
40
|
+
instructions: string;
|
|
41
|
+
config: string;
|
|
42
|
+
filePath?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
success: true;
|
|
46
|
+
data: {
|
|
47
|
+
instructions: string;
|
|
48
|
+
config: string;
|
|
49
|
+
filePath?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
export declare const McpConfigFailure: z.ZodObject<{
|
|
53
|
+
success: z.ZodLiteral<false>;
|
|
54
|
+
error: z.ZodObject<{
|
|
55
|
+
code: z.ZodEnum<["INVALID_CLIENT", "CONFIG_GENERATION_FAILED", "UNKNOWN_ERROR"]>;
|
|
56
|
+
message: z.ZodString;
|
|
57
|
+
recoverable: z.ZodBoolean;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
code: "CONFIG_GENERATION_FAILED" | "UNKNOWN_ERROR" | "INVALID_CLIENT";
|
|
60
|
+
message: string;
|
|
61
|
+
recoverable: boolean;
|
|
62
|
+
}, {
|
|
63
|
+
code: "CONFIG_GENERATION_FAILED" | "UNKNOWN_ERROR" | "INVALID_CLIENT";
|
|
64
|
+
message: string;
|
|
65
|
+
recoverable: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
success: false;
|
|
69
|
+
error: {
|
|
70
|
+
code: "CONFIG_GENERATION_FAILED" | "UNKNOWN_ERROR" | "INVALID_CLIENT";
|
|
71
|
+
message: string;
|
|
72
|
+
recoverable: boolean;
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
success: false;
|
|
76
|
+
error: {
|
|
77
|
+
code: "CONFIG_GENERATION_FAILED" | "UNKNOWN_ERROR" | "INVALID_CLIENT";
|
|
78
|
+
message: string;
|
|
79
|
+
recoverable: boolean;
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
export type McpConfigResult = z.infer<typeof McpConfigSuccess> | z.infer<typeof McpConfigFailure>;
|
|
83
|
+
export interface McpConfigService {
|
|
84
|
+
/**
|
|
85
|
+
* Generate MCP configuration for specified client
|
|
86
|
+
*/
|
|
87
|
+
generateConfig(input: GenerateConfigInput): Promise<McpConfigResult>;
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ProjectService, type SelectProjectInput, type ProjectSelectionResult } from './spec.js';
|
|
2
|
+
import { type GcloudService } from '../gcloud/spec.js';
|
|
3
|
+
export declare class ProjectHandler implements ProjectService {
|
|
4
|
+
private gcloudService;
|
|
5
|
+
constructor(gcloudService: GcloudService);
|
|
6
|
+
selectProject(input: SelectProjectInput): Promise<ProjectSelectionResult>;
|
|
7
|
+
getProjectDetails(input: {
|
|
8
|
+
projectId: string;
|
|
9
|
+
}): Promise<ProjectSelectionResult>;
|
|
10
|
+
private searchAndSelect;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SelectProjectInputSchema: z.ZodObject<{
|
|
3
|
+
allowSearch: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
limit: number;
|
|
7
|
+
allowSearch: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
allowSearch?: boolean | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type SelectProjectInput = z.infer<typeof SelectProjectInputSchema>;
|
|
13
|
+
export declare const ProjectErrorCode: z.ZodEnum<["NO_PROJECTS_FOUND", "SELECTION_CANCELLED", "SEARCH_FAILED", "PROJECT_FETCH_FAILED", "PROJECT_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
14
|
+
export declare const ProjectSelectionSuccess: z.ZodObject<{
|
|
15
|
+
success: z.ZodLiteral<true>;
|
|
16
|
+
data: z.ZodObject<{
|
|
17
|
+
projectId: z.ZodString;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
projectId: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}, {
|
|
23
|
+
projectId: string;
|
|
24
|
+
name: string;
|
|
25
|
+
}>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
success: true;
|
|
28
|
+
data: {
|
|
29
|
+
projectId: string;
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
success: true;
|
|
34
|
+
data: {
|
|
35
|
+
projectId: string;
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
export declare const ProjectSelectionFailure: z.ZodObject<{
|
|
40
|
+
success: z.ZodLiteral<false>;
|
|
41
|
+
error: z.ZodObject<{
|
|
42
|
+
code: z.ZodEnum<["NO_PROJECTS_FOUND", "SELECTION_CANCELLED", "SEARCH_FAILED", "PROJECT_FETCH_FAILED", "PROJECT_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
43
|
+
message: z.ZodString;
|
|
44
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
45
|
+
recoverable: z.ZodBoolean;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
code: "UNKNOWN_ERROR" | "NO_PROJECTS_FOUND" | "SELECTION_CANCELLED" | "SEARCH_FAILED" | "PROJECT_FETCH_FAILED" | "PROJECT_NOT_FOUND";
|
|
48
|
+
message: string;
|
|
49
|
+
recoverable: boolean;
|
|
50
|
+
suggestion?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
code: "UNKNOWN_ERROR" | "NO_PROJECTS_FOUND" | "SELECTION_CANCELLED" | "SEARCH_FAILED" | "PROJECT_FETCH_FAILED" | "PROJECT_NOT_FOUND";
|
|
53
|
+
message: string;
|
|
54
|
+
recoverable: boolean;
|
|
55
|
+
suggestion?: string | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
success: false;
|
|
59
|
+
error: {
|
|
60
|
+
code: "UNKNOWN_ERROR" | "NO_PROJECTS_FOUND" | "SELECTION_CANCELLED" | "SEARCH_FAILED" | "PROJECT_FETCH_FAILED" | "PROJECT_NOT_FOUND";
|
|
61
|
+
message: string;
|
|
62
|
+
recoverable: boolean;
|
|
63
|
+
suggestion?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
success: false;
|
|
67
|
+
error: {
|
|
68
|
+
code: "UNKNOWN_ERROR" | "NO_PROJECTS_FOUND" | "SELECTION_CANCELLED" | "SEARCH_FAILED" | "PROJECT_FETCH_FAILED" | "PROJECT_NOT_FOUND";
|
|
69
|
+
message: string;
|
|
70
|
+
recoverable: boolean;
|
|
71
|
+
suggestion?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
export type ProjectSelectionResult = z.infer<typeof ProjectSelectionSuccess> | z.infer<typeof ProjectSelectionFailure>;
|
|
75
|
+
export interface ProjectService {
|
|
76
|
+
/**
|
|
77
|
+
* Prompt user to select a project
|
|
78
|
+
*/
|
|
79
|
+
selectProject(input: SelectProjectInput): Promise<ProjectSelectionResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Get details for a specific project
|
|
82
|
+
*/
|
|
83
|
+
getProjectDetails(input: {
|
|
84
|
+
projectId: string;
|
|
85
|
+
}): Promise<ProjectSelectionResult>;
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
|
+
import { type ProxyService, type StartProxyInput, type ProxyResult } from './spec.js';
|
|
3
|
+
import { GcloudHandler } from '../gcloud/handler.js';
|
|
4
|
+
export declare class ProxyHandler implements ProxyService {
|
|
5
|
+
private gcloud;
|
|
6
|
+
private transportFactory;
|
|
7
|
+
private currentToken;
|
|
8
|
+
private refreshTimer;
|
|
9
|
+
private pendingToolListIds;
|
|
10
|
+
constructor(gcloud?: GcloudHandler, transportFactory?: () => StdioServerTransport);
|
|
11
|
+
start(input: StartProxyInput): Promise<ProxyResult>;
|
|
12
|
+
private refreshToken;
|
|
13
|
+
private startRefreshTimer;
|
|
14
|
+
private stopRefreshTimer;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StartProxyInputSchema: z.ZodObject<{
|
|
3
|
+
transport: z.ZodDefault<z.ZodEnum<["stdio", "sse"]>>;
|
|
4
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
transport: "stdio" | "sse";
|
|
8
|
+
port?: number | undefined;
|
|
9
|
+
debug?: boolean | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
transport?: "stdio" | "sse" | undefined;
|
|
12
|
+
port?: number | undefined;
|
|
13
|
+
debug?: boolean | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type StartProxyInput = z.infer<typeof StartProxyInputSchema>;
|
|
16
|
+
export declare const ProxyErrorCode: z.ZodEnum<["START_FAILED", "TRANSPORT_ERROR", "AUTH_REFRESH_FAILED", "UNKNOWN_ERROR"]>;
|
|
17
|
+
export type ProxyErrorCodeType = z.infer<typeof ProxyErrorCode>;
|
|
18
|
+
export declare const ProxySuccess: z.ZodObject<{
|
|
19
|
+
success: z.ZodLiteral<true>;
|
|
20
|
+
data: z.ZodObject<{
|
|
21
|
+
status: z.ZodEnum<["running", "stopped"]>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
status: "running" | "stopped";
|
|
24
|
+
}, {
|
|
25
|
+
status: "running" | "stopped";
|
|
26
|
+
}>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
success: true;
|
|
29
|
+
data: {
|
|
30
|
+
status: "running" | "stopped";
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
success: true;
|
|
34
|
+
data: {
|
|
35
|
+
status: "running" | "stopped";
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
export declare const ProxyFailure: z.ZodObject<{
|
|
39
|
+
success: z.ZodLiteral<false>;
|
|
40
|
+
error: z.ZodObject<{
|
|
41
|
+
code: z.ZodEnum<["START_FAILED", "TRANSPORT_ERROR", "AUTH_REFRESH_FAILED", "UNKNOWN_ERROR"]>;
|
|
42
|
+
message: z.ZodString;
|
|
43
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
44
|
+
recoverable: z.ZodBoolean;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
code: "UNKNOWN_ERROR" | "START_FAILED" | "TRANSPORT_ERROR" | "AUTH_REFRESH_FAILED";
|
|
47
|
+
message: string;
|
|
48
|
+
recoverable: boolean;
|
|
49
|
+
suggestion?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
code: "UNKNOWN_ERROR" | "START_FAILED" | "TRANSPORT_ERROR" | "AUTH_REFRESH_FAILED";
|
|
52
|
+
message: string;
|
|
53
|
+
recoverable: boolean;
|
|
54
|
+
suggestion?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
success: false;
|
|
58
|
+
error: {
|
|
59
|
+
code: "UNKNOWN_ERROR" | "START_FAILED" | "TRANSPORT_ERROR" | "AUTH_REFRESH_FAILED";
|
|
60
|
+
message: string;
|
|
61
|
+
recoverable: boolean;
|
|
62
|
+
suggestion?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
success: false;
|
|
66
|
+
error: {
|
|
67
|
+
code: "UNKNOWN_ERROR" | "START_FAILED" | "TRANSPORT_ERROR" | "AUTH_REFRESH_FAILED";
|
|
68
|
+
message: string;
|
|
69
|
+
recoverable: boolean;
|
|
70
|
+
suggestion?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
}>;
|
|
73
|
+
export type ProxyResult = z.infer<typeof ProxySuccess> | z.infer<typeof ProxyFailure>;
|
|
74
|
+
export interface ProxyService {
|
|
75
|
+
/**
|
|
76
|
+
* Start the MCP proxy server
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* This is a long-running operation. The promise settles only when the server stops
|
|
80
|
+
* or if initial startup fails.
|
|
81
|
+
*/
|
|
82
|
+
start(input: StartProxyInput): Promise<ProxyResult>;
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type StitchService, type ConfigureIAMInput, type EnableAPIInput, type TestConnectionInput, type IAMConfigResult, type APIEnableResult, type ConnectionTestResult } from './spec.js';
|
|
2
|
+
export declare class StitchHandler implements StitchService {
|
|
3
|
+
private getGcloudEnv;
|
|
4
|
+
private getGcloudBinary;
|
|
5
|
+
configureIAM(input: ConfigureIAMInput): Promise<IAMConfigResult>;
|
|
6
|
+
enableAPI(input: EnableAPIInput): Promise<APIEnableResult>;
|
|
7
|
+
checkIAMRole(input: {
|
|
8
|
+
projectId: string;
|
|
9
|
+
userEmail: string;
|
|
10
|
+
}): Promise<boolean>;
|
|
11
|
+
checkAPIEnabled(input: {
|
|
12
|
+
projectId: string;
|
|
13
|
+
}): Promise<boolean>;
|
|
14
|
+
testConnection(input: TestConnectionInput): Promise<ConnectionTestResult>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ConfigureIAMInputSchema: z.ZodObject<{
|
|
3
|
+
projectId: z.ZodString;
|
|
4
|
+
userEmail: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
projectId: string;
|
|
7
|
+
userEmail: string;
|
|
8
|
+
}, {
|
|
9
|
+
projectId: string;
|
|
10
|
+
userEmail: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type ConfigureIAMInput = z.infer<typeof ConfigureIAMInputSchema>;
|
|
13
|
+
export declare const EnableAPIInputSchema: z.ZodObject<{
|
|
14
|
+
projectId: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
projectId: string;
|
|
17
|
+
}, {
|
|
18
|
+
projectId: string;
|
|
19
|
+
}>;
|
|
20
|
+
export type EnableAPIInput = z.infer<typeof EnableAPIInputSchema>;
|
|
21
|
+
export declare const TestConnectionInputSchema: z.ZodObject<{
|
|
22
|
+
projectId: z.ZodString;
|
|
23
|
+
accessToken: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
projectId: string;
|
|
26
|
+
accessToken: string;
|
|
27
|
+
}, {
|
|
28
|
+
projectId: string;
|
|
29
|
+
accessToken: string;
|
|
30
|
+
}>;
|
|
31
|
+
export type TestConnectionInput = z.infer<typeof TestConnectionInputSchema>;
|
|
32
|
+
export declare const StitchErrorCode: z.ZodEnum<["IAM_CONFIG_FAILED", "API_ENABLE_FAILED", "CONNECTION_TEST_FAILED", "PERMISSION_DENIED", "UNKNOWN_ERROR"]>;
|
|
33
|
+
export declare const IAMConfigSuccess: z.ZodObject<{
|
|
34
|
+
success: z.ZodLiteral<true>;
|
|
35
|
+
data: z.ZodObject<{
|
|
36
|
+
role: z.ZodString;
|
|
37
|
+
member: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
role: string;
|
|
40
|
+
member: string;
|
|
41
|
+
}, {
|
|
42
|
+
role: string;
|
|
43
|
+
member: string;
|
|
44
|
+
}>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
success: true;
|
|
47
|
+
data: {
|
|
48
|
+
role: string;
|
|
49
|
+
member: string;
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
success: true;
|
|
53
|
+
data: {
|
|
54
|
+
role: string;
|
|
55
|
+
member: string;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
export declare const IAMConfigFailure: z.ZodObject<{
|
|
59
|
+
success: z.ZodLiteral<false>;
|
|
60
|
+
error: z.ZodObject<{
|
|
61
|
+
code: z.ZodEnum<["IAM_CONFIG_FAILED", "API_ENABLE_FAILED", "CONNECTION_TEST_FAILED", "PERMISSION_DENIED", "UNKNOWN_ERROR"]>;
|
|
62
|
+
message: z.ZodString;
|
|
63
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
64
|
+
recoverable: z.ZodBoolean;
|
|
65
|
+
details: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
68
|
+
message: string;
|
|
69
|
+
recoverable: boolean;
|
|
70
|
+
suggestion?: string | undefined;
|
|
71
|
+
details?: string | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
74
|
+
message: string;
|
|
75
|
+
recoverable: boolean;
|
|
76
|
+
suggestion?: string | undefined;
|
|
77
|
+
details?: string | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
success: false;
|
|
81
|
+
error: {
|
|
82
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
83
|
+
message: string;
|
|
84
|
+
recoverable: boolean;
|
|
85
|
+
suggestion?: string | undefined;
|
|
86
|
+
details?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
success: false;
|
|
90
|
+
error: {
|
|
91
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
92
|
+
message: string;
|
|
93
|
+
recoverable: boolean;
|
|
94
|
+
suggestion?: string | undefined;
|
|
95
|
+
details?: string | undefined;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
export type IAMConfigResult = z.infer<typeof IAMConfigSuccess> | z.infer<typeof IAMConfigFailure>;
|
|
99
|
+
export declare const APIEnableSuccess: z.ZodObject<{
|
|
100
|
+
success: z.ZodLiteral<true>;
|
|
101
|
+
data: z.ZodObject<{
|
|
102
|
+
api: z.ZodString;
|
|
103
|
+
enabled: z.ZodBoolean;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
api: string;
|
|
106
|
+
enabled: boolean;
|
|
107
|
+
}, {
|
|
108
|
+
api: string;
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
}>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
success: true;
|
|
113
|
+
data: {
|
|
114
|
+
api: string;
|
|
115
|
+
enabled: boolean;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
success: true;
|
|
119
|
+
data: {
|
|
120
|
+
api: string;
|
|
121
|
+
enabled: boolean;
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
124
|
+
export declare const APIEnableFailure: z.ZodObject<{
|
|
125
|
+
success: z.ZodLiteral<false>;
|
|
126
|
+
error: z.ZodObject<{
|
|
127
|
+
code: z.ZodEnum<["IAM_CONFIG_FAILED", "API_ENABLE_FAILED", "CONNECTION_TEST_FAILED", "PERMISSION_DENIED", "UNKNOWN_ERROR"]>;
|
|
128
|
+
message: z.ZodString;
|
|
129
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
130
|
+
recoverable: z.ZodBoolean;
|
|
131
|
+
details: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
134
|
+
message: string;
|
|
135
|
+
recoverable: boolean;
|
|
136
|
+
suggestion?: string | undefined;
|
|
137
|
+
details?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
140
|
+
message: string;
|
|
141
|
+
recoverable: boolean;
|
|
142
|
+
suggestion?: string | undefined;
|
|
143
|
+
details?: string | undefined;
|
|
144
|
+
}>;
|
|
145
|
+
}, "strip", z.ZodTypeAny, {
|
|
146
|
+
success: false;
|
|
147
|
+
error: {
|
|
148
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
149
|
+
message: string;
|
|
150
|
+
recoverable: boolean;
|
|
151
|
+
suggestion?: string | undefined;
|
|
152
|
+
details?: string | undefined;
|
|
153
|
+
};
|
|
154
|
+
}, {
|
|
155
|
+
success: false;
|
|
156
|
+
error: {
|
|
157
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
158
|
+
message: string;
|
|
159
|
+
recoverable: boolean;
|
|
160
|
+
suggestion?: string | undefined;
|
|
161
|
+
details?: string | undefined;
|
|
162
|
+
};
|
|
163
|
+
}>;
|
|
164
|
+
export type APIEnableResult = z.infer<typeof APIEnableSuccess> | z.infer<typeof APIEnableFailure>;
|
|
165
|
+
export declare const ConnectionTestSuccess: z.ZodObject<{
|
|
166
|
+
success: z.ZodLiteral<true>;
|
|
167
|
+
data: z.ZodObject<{
|
|
168
|
+
connected: z.ZodBoolean;
|
|
169
|
+
statusCode: z.ZodNumber;
|
|
170
|
+
response: z.ZodOptional<z.ZodAny>;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
connected: boolean;
|
|
173
|
+
statusCode: number;
|
|
174
|
+
response?: any;
|
|
175
|
+
}, {
|
|
176
|
+
connected: boolean;
|
|
177
|
+
statusCode: number;
|
|
178
|
+
response?: any;
|
|
179
|
+
}>;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
success: true;
|
|
182
|
+
data: {
|
|
183
|
+
connected: boolean;
|
|
184
|
+
statusCode: number;
|
|
185
|
+
response?: any;
|
|
186
|
+
};
|
|
187
|
+
}, {
|
|
188
|
+
success: true;
|
|
189
|
+
data: {
|
|
190
|
+
connected: boolean;
|
|
191
|
+
statusCode: number;
|
|
192
|
+
response?: any;
|
|
193
|
+
};
|
|
194
|
+
}>;
|
|
195
|
+
export declare const ConnectionTestFailure: z.ZodObject<{
|
|
196
|
+
success: z.ZodLiteral<false>;
|
|
197
|
+
error: z.ZodObject<{
|
|
198
|
+
code: z.ZodEnum<["IAM_CONFIG_FAILED", "API_ENABLE_FAILED", "CONNECTION_TEST_FAILED", "PERMISSION_DENIED", "UNKNOWN_ERROR"]>;
|
|
199
|
+
message: z.ZodString;
|
|
200
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
201
|
+
recoverable: z.ZodBoolean;
|
|
202
|
+
details: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
205
|
+
message: string;
|
|
206
|
+
recoverable: boolean;
|
|
207
|
+
suggestion?: string | undefined;
|
|
208
|
+
details?: string | undefined;
|
|
209
|
+
}, {
|
|
210
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
211
|
+
message: string;
|
|
212
|
+
recoverable: boolean;
|
|
213
|
+
suggestion?: string | undefined;
|
|
214
|
+
details?: string | undefined;
|
|
215
|
+
}>;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
success: false;
|
|
218
|
+
error: {
|
|
219
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
220
|
+
message: string;
|
|
221
|
+
recoverable: boolean;
|
|
222
|
+
suggestion?: string | undefined;
|
|
223
|
+
details?: string | undefined;
|
|
224
|
+
};
|
|
225
|
+
}, {
|
|
226
|
+
success: false;
|
|
227
|
+
error: {
|
|
228
|
+
code: "UNKNOWN_ERROR" | "IAM_CONFIG_FAILED" | "API_ENABLE_FAILED" | "CONNECTION_TEST_FAILED" | "PERMISSION_DENIED";
|
|
229
|
+
message: string;
|
|
230
|
+
recoverable: boolean;
|
|
231
|
+
suggestion?: string | undefined;
|
|
232
|
+
details?: string | undefined;
|
|
233
|
+
};
|
|
234
|
+
}>;
|
|
235
|
+
export type ConnectionTestResult = z.infer<typeof ConnectionTestSuccess> | z.infer<typeof ConnectionTestFailure>;
|
|
236
|
+
export interface StitchService {
|
|
237
|
+
/**
|
|
238
|
+
* Configure IAM permissions for Stitch API
|
|
239
|
+
*/
|
|
240
|
+
configureIAM(input: ConfigureIAMInput): Promise<IAMConfigResult>;
|
|
241
|
+
/**
|
|
242
|
+
* Enable Stitch API for the project
|
|
243
|
+
*/
|
|
244
|
+
enableAPI(input: EnableAPIInput): Promise<APIEnableResult>;
|
|
245
|
+
/**
|
|
246
|
+
* Test the connection to the Stitch API
|
|
247
|
+
*/
|
|
248
|
+
testConnection(input: TestConnectionInput): Promise<ConnectionTestResult>;
|
|
249
|
+
/**
|
|
250
|
+
* Check if a user has a specific IAM role on a project
|
|
251
|
+
*/
|
|
252
|
+
checkIAMRole(input: {
|
|
253
|
+
projectId: string;
|
|
254
|
+
userEmail: string;
|
|
255
|
+
}): Promise<boolean>;
|
|
256
|
+
/**
|
|
257
|
+
* Check if the Stitch API is enabled for a project
|
|
258
|
+
*/
|
|
259
|
+
checkAPIEnabled(input: {
|
|
260
|
+
projectId: string;
|
|
261
|
+
}): Promise<boolean>;
|
|
262
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper for ora spinner with consistent styling
|
|
3
|
+
*/
|
|
4
|
+
export declare class Spinner {
|
|
5
|
+
private spinner;
|
|
6
|
+
start(message: string): void;
|
|
7
|
+
succeed(message: string): void;
|
|
8
|
+
fail(message: string): void;
|
|
9
|
+
stop(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createSpinner(): Spinner;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme colors matching the shell script aesthetic
|
|
3
|
+
*/
|
|
4
|
+
export declare const theme: {
|
|
5
|
+
blue: import("chalk").ChalkInstance;
|
|
6
|
+
green: import("chalk").ChalkInstance;
|
|
7
|
+
gray: import("chalk").ChalkInstance;
|
|
8
|
+
red: import("chalk").ChalkInstance;
|
|
9
|
+
yellow: import("chalk").ChalkInstance;
|
|
10
|
+
cyan: import("chalk").ChalkInstance;
|
|
11
|
+
bgDark: import("chalk").ChalkInstance;
|
|
12
|
+
};
|
|
13
|
+
export declare const icons: {
|
|
14
|
+
success: string;
|
|
15
|
+
error: string;
|
|
16
|
+
info: string;
|
|
17
|
+
warning: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type McpClient = 'antigravity' | 'vscode' | 'cursor' | 'claude-code' | 'gemini-cli';
|
|
2
|
+
/**
|
|
3
|
+
* Prompt user to select their MCP client
|
|
4
|
+
*/
|
|
5
|
+
export declare function promptMcpClient(): Promise<McpClient>;
|
|
6
|
+
/**
|
|
7
|
+
* Prompt user to select from a list of options
|
|
8
|
+
*/
|
|
9
|
+
export declare function promptSelect<T extends string>(message: string, choices: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: T;
|
|
12
|
+
}>): Promise<T>;
|
|
13
|
+
/**
|
|
14
|
+
* Prompt user to enter text
|
|
15
|
+
*/
|
|
16
|
+
export declare function promptInput(message: string, defaultValue?: string): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Prompt user for confirmation
|
|
19
|
+
*/
|
|
20
|
+
export declare function promptConfirm(message: string, defaultValue?: boolean): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Prompt user to select transport type
|
|
23
|
+
*/
|
|
24
|
+
export declare function promptTransportType(): Promise<'http' | 'stdio'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wrapper for ora spinner with consistent styling
|
|
3
|
+
*/
|
|
4
|
+
export declare class Spinner {
|
|
5
|
+
private spinner;
|
|
6
|
+
start(message: string): void;
|
|
7
|
+
succeed(message: string): void;
|
|
8
|
+
fail(message: string): void;
|
|
9
|
+
stop(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createSpinner(): Spinner;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme colors matching the shell script aesthetic
|
|
3
|
+
*/
|
|
4
|
+
export declare const theme: {
|
|
5
|
+
blue: import("chalk").ChalkInstance;
|
|
6
|
+
green: import("chalk").ChalkInstance;
|
|
7
|
+
gray: import("chalk").ChalkInstance;
|
|
8
|
+
red: import("chalk").ChalkInstance;
|
|
9
|
+
yellow: import("chalk").ChalkInstance;
|
|
10
|
+
cyan: import("chalk").ChalkInstance;
|
|
11
|
+
bgDark: import("chalk").ChalkInstance;
|
|
12
|
+
};
|
|
13
|
+
export declare const icons: {
|
|
14
|
+
success: string;
|
|
15
|
+
error: string;
|
|
16
|
+
info: string;
|
|
17
|
+
warning: string;
|
|
18
|
+
};
|