google-stitch-mcp 0.3.2
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 +439 -0
- package/bin/stitch-mcp.js +2 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +130810 -0
- package/dist/commands/doctor/command.d.ts +2 -0
- package/dist/commands/doctor/context.d.ts +19 -0
- package/dist/commands/doctor/handler.d.ts +12 -0
- package/dist/commands/doctor/spec.d.ts +130 -0
- package/dist/commands/doctor/steps/AdcCheckStep.d.ts +8 -0
- package/dist/commands/doctor/steps/ApiCheckStep.d.ts +8 -0
- package/dist/commands/doctor/steps/ApiKeyConnectionStep.d.ts +8 -0
- package/dist/commands/doctor/steps/ApiKeyDetectedStep.d.ts +8 -0
- package/dist/commands/doctor/steps/AuthCheckStep.d.ts +8 -0
- package/dist/commands/doctor/steps/GcloudCheckStep.d.ts +8 -0
- package/dist/commands/doctor/steps/ProjectCheckStep.d.ts +8 -0
- package/dist/commands/init/command.d.ts +2 -0
- package/dist/commands/init/context.d.ts +24 -0
- package/dist/commands/init/handler.d.ts +19 -0
- package/dist/commands/init/spec.d.ts +91 -0
- package/dist/commands/init/steps/AuthModeStep.d.ts +8 -0
- package/dist/commands/init/steps/AuthStep.d.ts +8 -0
- package/dist/commands/init/steps/ClientSelectionStep.d.ts +9 -0
- package/dist/commands/init/steps/ConfigStep.d.ts +9 -0
- package/dist/commands/init/steps/GcloudInstallStep.d.ts +8 -0
- package/dist/commands/init/steps/IamApiStep.d.ts +8 -0
- package/dist/commands/init/steps/ProjectSelectStep.d.ts +8 -0
- package/dist/commands/init/steps/TestConnectionStep.d.ts +8 -0
- package/dist/commands/init/steps/TransportStep.d.ts +9 -0
- package/dist/commands/logout/command.d.ts +2 -0
- package/dist/commands/logout/context.d.ts +12 -0
- package/dist/commands/logout/handler.d.ts +8 -0
- package/dist/commands/logout/spec.d.ts +77 -0
- package/dist/commands/logout/steps/ClearConfigStep.d.ts +8 -0
- package/dist/commands/logout/steps/PrepareStep.d.ts +8 -0
- package/dist/commands/logout/steps/RevokeAdcStep.d.ts +9 -0
- package/dist/commands/logout/steps/RevokeUserStep.d.ts +9 -0
- package/dist/commands/proxy/command.d.ts +2 -0
- package/dist/commands/proxy/handler.d.ts +7 -0
- package/dist/commands/registry.d.ts +2 -0
- package/dist/commands/screens/ScreensView.d.ts +16 -0
- package/dist/commands/screens/command.d.ts +2 -0
- package/dist/commands/screens/handler.d.ts +24 -0
- package/dist/commands/serve/ServeView.d.ts +12 -0
- package/dist/commands/serve/command.d.ts +2 -0
- package/dist/commands/serve/handler.d.ts +22 -0
- package/dist/commands/site/command.d.ts +2 -0
- package/dist/commands/site/hooks/useProjectHydration.d.ts +9 -0
- package/dist/commands/site/index.d.ts +12 -0
- package/dist/commands/site/ui/ScreenList.d.ts +11 -0
- package/dist/commands/site/ui/SiteBuilder.d.ts +10 -0
- package/dist/commands/site/ui/components/StatusIcon.d.ts +6 -0
- package/dist/commands/site/ui/types.d.ts +1 -0
- package/dist/commands/site/utils/ProjectSyncer.d.ts +8 -0
- package/dist/commands/site/utils/SiteManifest.d.ts +16 -0
- package/dist/commands/snapshot/command.d.ts +2 -0
- package/dist/commands/snapshot/handler.d.ts +17 -0
- package/dist/commands/snapshot/spec.d.ts +39 -0
- package/dist/commands/tool/command.d.ts +2 -0
- package/dist/commands/tool/context.d.ts +9 -0
- package/dist/commands/tool/handler.d.ts +9 -0
- package/dist/commands/tool/spec.d.ts +39 -0
- package/dist/commands/tool/steps/ExecuteToolStep.d.ts +8 -0
- package/dist/commands/tool/steps/ListToolsStep.d.ts +8 -0
- package/dist/commands/tool/steps/ParseArgsStep.d.ts +8 -0
- package/dist/commands/tool/steps/ShowSchemaStep.d.ts +10 -0
- package/dist/commands/tool/steps/ValidateToolStep.d.ts +8 -0
- package/dist/commands/tool/virtual-tools/build-site.d.ts +2 -0
- package/dist/commands/tool/virtual-tools/get-screen-code.d.ts +2 -0
- package/dist/commands/tool/virtual-tools/get-screen-image.d.ts +2 -0
- package/dist/commands/tool/virtual-tools/index.d.ts +7 -0
- package/dist/commands/tool/virtual-tools/list-tools.d.ts +2 -0
- package/dist/commands/view/command.d.ts +2 -0
- package/dist/commands/view/handler.d.ts +14 -0
- package/dist/framework/CommandDefinition.d.ts +18 -0
- package/dist/framework/CommandStep.d.ts +15 -0
- package/dist/framework/ConsoleUI.d.ts +14 -0
- package/dist/framework/MockUI.d.ts +16 -0
- package/dist/framework/StepRunner.d.ts +20 -0
- package/dist/framework/UserInterface.d.ts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +23583 -0
- package/dist/lib/server/AssetGateway.d.ts +25 -0
- package/dist/lib/server/vite/StitchViteServer.d.ts +11 -0
- package/dist/lib/server/vite/plugins/virtualContent.d.ts +7 -0
- package/dist/lib/services/site/SiteService.d.ts +6 -0
- package/dist/lib/services/site/schemas.d.ts +91 -0
- package/dist/lib/services/site/types.d.ts +22 -0
- package/dist/platform/detector.d.ts +29 -0
- package/dist/platform/environment.d.ts +13 -0
- package/dist/platform/paths.d.ts +20 -0
- package/dist/platform/shell.d.ts +30 -0
- package/dist/services/gcloud/handler.d.ts +57 -0
- package/dist/services/gcloud/spec.d.ts +408 -0
- package/dist/services/mcp-client/MockStitchMCPClient.d.ts +7 -0
- package/dist/services/mcp-client/client.d.ts +79 -0
- package/dist/services/mcp-client/spec.d.ts +27 -0
- package/dist/services/mcp-config/handler.d.ts +13 -0
- package/dist/services/mcp-config/spec.d.ts +108 -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 +26 -0
- package/dist/services/proxy/spec.d.ts +83 -0
- package/dist/services/stitch/handler.d.ts +17 -0
- package/dist/services/stitch/spec.d.ts +279 -0
- package/dist/services/view/handler.d.ts +7 -0
- package/dist/services/view/spec.d.ts +66 -0
- package/dist/ui/InteractiveViewer.d.ts +17 -0
- package/dist/ui/JsonTree.d.ts +12 -0
- package/dist/ui/checklist/handler.d.ts +23 -0
- package/dist/ui/checklist/spec.d.ts +191 -0
- package/dist/ui/checklist.d.ts +54 -0
- package/dist/ui/copy-behaviors/clipboard.d.ts +32 -0
- package/dist/ui/copy-behaviors/handlers.d.ts +16 -0
- package/dist/ui/copy-behaviors/index.d.ts +8 -0
- package/dist/ui/copy-behaviors/registry.d.ts +24 -0
- package/dist/ui/copy-behaviors/types.d.ts +26 -0
- package/dist/ui/navigation-behaviors/index.d.ts +34 -0
- package/dist/ui/serve-behaviors/handlers.d.ts +9 -0
- package/dist/ui/serve-behaviors/index.d.ts +7 -0
- package/dist/ui/serve-behaviors/registry.d.ts +10 -0
- package/dist/ui/serve-behaviors/server.d.ts +8 -0
- package/dist/ui/serve-behaviors/types.d.ts +18 -0
- package/dist/ui/spinner.d.ts +11 -0
- package/dist/ui/theme.d.ts +18 -0
- package/dist/ui/wizard.d.ts +36 -0
- package/package.json +83 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const EnsureGcloudInputSchema: z.ZodObject<{
|
|
3
|
+
minVersion: z.ZodDefault<z.ZodString>;
|
|
4
|
+
forceLocal: z.ZodDefault<z.ZodBoolean>;
|
|
5
|
+
useSystemGcloud: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
minVersion: string;
|
|
8
|
+
forceLocal: boolean;
|
|
9
|
+
useSystemGcloud?: boolean | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
minVersion?: string | undefined;
|
|
12
|
+
forceLocal?: boolean | undefined;
|
|
13
|
+
useSystemGcloud?: boolean | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type EnsureGcloudInput = z.infer<typeof EnsureGcloudInputSchema>;
|
|
16
|
+
export declare const AuthenticateInputSchema: z.ZodObject<{
|
|
17
|
+
skipIfActive: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
skipIfActive: boolean;
|
|
20
|
+
}, {
|
|
21
|
+
skipIfActive?: boolean | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type AuthenticateInput = z.infer<typeof AuthenticateInputSchema>;
|
|
24
|
+
export declare const ListProjectsInputSchema: z.ZodObject<{
|
|
25
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
27
|
+
sortBy: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
filter?: string | undefined;
|
|
30
|
+
limit?: number | undefined;
|
|
31
|
+
sortBy?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
filter?: string | undefined;
|
|
34
|
+
limit?: number | undefined;
|
|
35
|
+
sortBy?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export type ListProjectsInput = z.infer<typeof ListProjectsInputSchema>;
|
|
38
|
+
export declare const SetProjectInputSchema: z.ZodObject<{
|
|
39
|
+
projectId: z.ZodString;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
projectId: string;
|
|
42
|
+
}, {
|
|
43
|
+
projectId: string;
|
|
44
|
+
}>;
|
|
45
|
+
export type SetProjectInput = z.infer<typeof SetProjectInputSchema>;
|
|
46
|
+
export declare const GcloudErrorCode: z.ZodEnum<["DOWNLOAD_FAILED", "EXTRACTION_FAILED", "VERSION_CHECK_FAILED", "INVALID_VERSION", "AUTH_FAILED", "ADC_FAILED", "PROJECT_LIST_FAILED", "PROJECT_SET_FAILED", "COMMAND_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
47
|
+
export type GcloudErrorCodeType = z.infer<typeof GcloudErrorCode>;
|
|
48
|
+
export declare const GcloudInstallDataSchema: z.ZodObject<{
|
|
49
|
+
version: z.ZodString;
|
|
50
|
+
location: z.ZodEnum<["system", "bundled"]>;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
path: string;
|
|
54
|
+
version: string;
|
|
55
|
+
location: "system" | "bundled";
|
|
56
|
+
}, {
|
|
57
|
+
path: string;
|
|
58
|
+
version: string;
|
|
59
|
+
location: "system" | "bundled";
|
|
60
|
+
}>;
|
|
61
|
+
export declare const GcloudSuccess: z.ZodObject<{
|
|
62
|
+
success: z.ZodLiteral<true>;
|
|
63
|
+
data: z.ZodObject<{
|
|
64
|
+
version: z.ZodString;
|
|
65
|
+
location: z.ZodEnum<["system", "bundled"]>;
|
|
66
|
+
path: z.ZodString;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
path: string;
|
|
69
|
+
version: string;
|
|
70
|
+
location: "system" | "bundled";
|
|
71
|
+
}, {
|
|
72
|
+
path: string;
|
|
73
|
+
version: string;
|
|
74
|
+
location: "system" | "bundled";
|
|
75
|
+
}>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
success: true;
|
|
78
|
+
data: {
|
|
79
|
+
path: string;
|
|
80
|
+
version: string;
|
|
81
|
+
location: "system" | "bundled";
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
success: true;
|
|
85
|
+
data: {
|
|
86
|
+
path: string;
|
|
87
|
+
version: string;
|
|
88
|
+
location: "system" | "bundled";
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
91
|
+
export declare const GcloudFailure: z.ZodObject<{
|
|
92
|
+
success: z.ZodLiteral<false>;
|
|
93
|
+
error: z.ZodObject<{
|
|
94
|
+
code: z.ZodEnum<["DOWNLOAD_FAILED", "EXTRACTION_FAILED", "VERSION_CHECK_FAILED", "INVALID_VERSION", "AUTH_FAILED", "ADC_FAILED", "PROJECT_LIST_FAILED", "PROJECT_SET_FAILED", "COMMAND_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
95
|
+
message: z.ZodString;
|
|
96
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
97
|
+
recoverable: z.ZodBoolean;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
100
|
+
message: string;
|
|
101
|
+
recoverable: boolean;
|
|
102
|
+
suggestion?: string | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
105
|
+
message: string;
|
|
106
|
+
recoverable: boolean;
|
|
107
|
+
suggestion?: string | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
success: false;
|
|
111
|
+
error: {
|
|
112
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
113
|
+
message: string;
|
|
114
|
+
recoverable: boolean;
|
|
115
|
+
suggestion?: string | undefined;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
success: false;
|
|
119
|
+
error: {
|
|
120
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
121
|
+
message: string;
|
|
122
|
+
recoverable: boolean;
|
|
123
|
+
suggestion?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
}>;
|
|
126
|
+
export type GcloudResult = z.infer<typeof GcloudSuccess> | z.infer<typeof GcloudFailure>;
|
|
127
|
+
export declare const AuthDataSchema: z.ZodObject<{
|
|
128
|
+
account: z.ZodString;
|
|
129
|
+
type: z.ZodEnum<["user", "adc"]>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
type: "user" | "adc";
|
|
132
|
+
account: string;
|
|
133
|
+
}, {
|
|
134
|
+
type: "user" | "adc";
|
|
135
|
+
account: string;
|
|
136
|
+
}>;
|
|
137
|
+
export declare const AuthSuccess: z.ZodObject<{
|
|
138
|
+
success: z.ZodLiteral<true>;
|
|
139
|
+
data: z.ZodObject<{
|
|
140
|
+
account: z.ZodString;
|
|
141
|
+
type: z.ZodEnum<["user", "adc"]>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
type: "user" | "adc";
|
|
144
|
+
account: string;
|
|
145
|
+
}, {
|
|
146
|
+
type: "user" | "adc";
|
|
147
|
+
account: string;
|
|
148
|
+
}>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
success: true;
|
|
151
|
+
data: {
|
|
152
|
+
type: "user" | "adc";
|
|
153
|
+
account: string;
|
|
154
|
+
};
|
|
155
|
+
}, {
|
|
156
|
+
success: true;
|
|
157
|
+
data: {
|
|
158
|
+
type: "user" | "adc";
|
|
159
|
+
account: string;
|
|
160
|
+
};
|
|
161
|
+
}>;
|
|
162
|
+
export declare const AuthFailure: z.ZodObject<{
|
|
163
|
+
success: z.ZodLiteral<false>;
|
|
164
|
+
error: z.ZodObject<{
|
|
165
|
+
code: z.ZodEnum<["DOWNLOAD_FAILED", "EXTRACTION_FAILED", "VERSION_CHECK_FAILED", "INVALID_VERSION", "AUTH_FAILED", "ADC_FAILED", "PROJECT_LIST_FAILED", "PROJECT_SET_FAILED", "COMMAND_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
166
|
+
message: z.ZodString;
|
|
167
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
168
|
+
recoverable: z.ZodBoolean;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
171
|
+
message: string;
|
|
172
|
+
recoverable: boolean;
|
|
173
|
+
suggestion?: string | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
176
|
+
message: string;
|
|
177
|
+
recoverable: boolean;
|
|
178
|
+
suggestion?: string | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
success: false;
|
|
182
|
+
error: {
|
|
183
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
184
|
+
message: string;
|
|
185
|
+
recoverable: boolean;
|
|
186
|
+
suggestion?: string | undefined;
|
|
187
|
+
};
|
|
188
|
+
}, {
|
|
189
|
+
success: false;
|
|
190
|
+
error: {
|
|
191
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
192
|
+
message: string;
|
|
193
|
+
recoverable: boolean;
|
|
194
|
+
suggestion?: string | undefined;
|
|
195
|
+
};
|
|
196
|
+
}>;
|
|
197
|
+
export type AuthResult = z.infer<typeof AuthSuccess> | z.infer<typeof AuthFailure>;
|
|
198
|
+
export declare const ProjectSchema: z.ZodObject<{
|
|
199
|
+
projectId: z.ZodString;
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
projectNumber: z.ZodOptional<z.ZodString>;
|
|
202
|
+
createTime: z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
name: string;
|
|
205
|
+
projectId: string;
|
|
206
|
+
projectNumber?: string | undefined;
|
|
207
|
+
createTime?: string | undefined;
|
|
208
|
+
}, {
|
|
209
|
+
name: string;
|
|
210
|
+
projectId: string;
|
|
211
|
+
projectNumber?: string | undefined;
|
|
212
|
+
createTime?: string | undefined;
|
|
213
|
+
}>;
|
|
214
|
+
export declare const ProjectListSuccess: z.ZodObject<{
|
|
215
|
+
success: z.ZodLiteral<true>;
|
|
216
|
+
data: z.ZodObject<{
|
|
217
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
218
|
+
projectId: z.ZodString;
|
|
219
|
+
name: z.ZodString;
|
|
220
|
+
projectNumber: z.ZodOptional<z.ZodString>;
|
|
221
|
+
createTime: z.ZodOptional<z.ZodString>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
name: string;
|
|
224
|
+
projectId: string;
|
|
225
|
+
projectNumber?: string | undefined;
|
|
226
|
+
createTime?: string | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
name: string;
|
|
229
|
+
projectId: string;
|
|
230
|
+
projectNumber?: string | undefined;
|
|
231
|
+
createTime?: string | undefined;
|
|
232
|
+
}>, "many">;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
projects: {
|
|
235
|
+
name: string;
|
|
236
|
+
projectId: string;
|
|
237
|
+
projectNumber?: string | undefined;
|
|
238
|
+
createTime?: string | undefined;
|
|
239
|
+
}[];
|
|
240
|
+
}, {
|
|
241
|
+
projects: {
|
|
242
|
+
name: string;
|
|
243
|
+
projectId: string;
|
|
244
|
+
projectNumber?: string | undefined;
|
|
245
|
+
createTime?: string | undefined;
|
|
246
|
+
}[];
|
|
247
|
+
}>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
success: true;
|
|
250
|
+
data: {
|
|
251
|
+
projects: {
|
|
252
|
+
name: string;
|
|
253
|
+
projectId: string;
|
|
254
|
+
projectNumber?: string | undefined;
|
|
255
|
+
createTime?: string | undefined;
|
|
256
|
+
}[];
|
|
257
|
+
};
|
|
258
|
+
}, {
|
|
259
|
+
success: true;
|
|
260
|
+
data: {
|
|
261
|
+
projects: {
|
|
262
|
+
name: string;
|
|
263
|
+
projectId: string;
|
|
264
|
+
projectNumber?: string | undefined;
|
|
265
|
+
createTime?: string | undefined;
|
|
266
|
+
}[];
|
|
267
|
+
};
|
|
268
|
+
}>;
|
|
269
|
+
export declare const ProjectListFailure: z.ZodObject<{
|
|
270
|
+
success: z.ZodLiteral<false>;
|
|
271
|
+
error: z.ZodObject<{
|
|
272
|
+
code: z.ZodEnum<["DOWNLOAD_FAILED", "EXTRACTION_FAILED", "VERSION_CHECK_FAILED", "INVALID_VERSION", "AUTH_FAILED", "ADC_FAILED", "PROJECT_LIST_FAILED", "PROJECT_SET_FAILED", "COMMAND_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
273
|
+
message: z.ZodString;
|
|
274
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
275
|
+
recoverable: z.ZodBoolean;
|
|
276
|
+
}, "strip", z.ZodTypeAny, {
|
|
277
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
278
|
+
message: string;
|
|
279
|
+
recoverable: boolean;
|
|
280
|
+
suggestion?: string | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
283
|
+
message: string;
|
|
284
|
+
recoverable: boolean;
|
|
285
|
+
suggestion?: string | undefined;
|
|
286
|
+
}>;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
success: false;
|
|
289
|
+
error: {
|
|
290
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
291
|
+
message: string;
|
|
292
|
+
recoverable: boolean;
|
|
293
|
+
suggestion?: string | undefined;
|
|
294
|
+
};
|
|
295
|
+
}, {
|
|
296
|
+
success: false;
|
|
297
|
+
error: {
|
|
298
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
299
|
+
message: string;
|
|
300
|
+
recoverable: boolean;
|
|
301
|
+
suggestion?: string | undefined;
|
|
302
|
+
};
|
|
303
|
+
}>;
|
|
304
|
+
export type ProjectListResult = z.infer<typeof ProjectListSuccess> | z.infer<typeof ProjectListFailure>;
|
|
305
|
+
export declare const ProjectSetSuccess: z.ZodObject<{
|
|
306
|
+
success: z.ZodLiteral<true>;
|
|
307
|
+
data: z.ZodObject<{
|
|
308
|
+
projectId: z.ZodString;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
projectId: string;
|
|
311
|
+
}, {
|
|
312
|
+
projectId: string;
|
|
313
|
+
}>;
|
|
314
|
+
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
success: true;
|
|
316
|
+
data: {
|
|
317
|
+
projectId: string;
|
|
318
|
+
};
|
|
319
|
+
}, {
|
|
320
|
+
success: true;
|
|
321
|
+
data: {
|
|
322
|
+
projectId: string;
|
|
323
|
+
};
|
|
324
|
+
}>;
|
|
325
|
+
export declare const ProjectSetFailure: z.ZodObject<{
|
|
326
|
+
success: z.ZodLiteral<false>;
|
|
327
|
+
error: z.ZodObject<{
|
|
328
|
+
code: z.ZodEnum<["DOWNLOAD_FAILED", "EXTRACTION_FAILED", "VERSION_CHECK_FAILED", "INVALID_VERSION", "AUTH_FAILED", "ADC_FAILED", "PROJECT_LIST_FAILED", "PROJECT_SET_FAILED", "COMMAND_NOT_FOUND", "UNKNOWN_ERROR"]>;
|
|
329
|
+
message: z.ZodString;
|
|
330
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
331
|
+
recoverable: z.ZodBoolean;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
334
|
+
message: string;
|
|
335
|
+
recoverable: boolean;
|
|
336
|
+
suggestion?: string | undefined;
|
|
337
|
+
}, {
|
|
338
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
339
|
+
message: string;
|
|
340
|
+
recoverable: boolean;
|
|
341
|
+
suggestion?: string | undefined;
|
|
342
|
+
}>;
|
|
343
|
+
}, "strip", z.ZodTypeAny, {
|
|
344
|
+
success: false;
|
|
345
|
+
error: {
|
|
346
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
347
|
+
message: string;
|
|
348
|
+
recoverable: boolean;
|
|
349
|
+
suggestion?: string | undefined;
|
|
350
|
+
};
|
|
351
|
+
}, {
|
|
352
|
+
success: false;
|
|
353
|
+
error: {
|
|
354
|
+
code: "UNKNOWN_ERROR" | "DOWNLOAD_FAILED" | "EXTRACTION_FAILED" | "VERSION_CHECK_FAILED" | "INVALID_VERSION" | "AUTH_FAILED" | "ADC_FAILED" | "PROJECT_LIST_FAILED" | "PROJECT_SET_FAILED" | "COMMAND_NOT_FOUND";
|
|
355
|
+
message: string;
|
|
356
|
+
recoverable: boolean;
|
|
357
|
+
suggestion?: string | undefined;
|
|
358
|
+
};
|
|
359
|
+
}>;
|
|
360
|
+
export type ProjectSetResult = z.infer<typeof ProjectSetSuccess> | z.infer<typeof ProjectSetFailure>;
|
|
361
|
+
export interface GcloudService {
|
|
362
|
+
/**
|
|
363
|
+
* Ensure gcloud is installed and meets minimum version requirements
|
|
364
|
+
*/
|
|
365
|
+
ensureInstalled(input: EnsureGcloudInput): Promise<GcloudResult>;
|
|
366
|
+
/**
|
|
367
|
+
* Authenticate user with gcloud
|
|
368
|
+
*/
|
|
369
|
+
authenticate(input: AuthenticateInput): Promise<AuthResult>;
|
|
370
|
+
/**
|
|
371
|
+
* Authenticate application default credentials
|
|
372
|
+
*/
|
|
373
|
+
authenticateADC(input: AuthenticateInput): Promise<AuthResult>;
|
|
374
|
+
/**
|
|
375
|
+
* List user's projects
|
|
376
|
+
*/
|
|
377
|
+
listProjects(input: ListProjectsInput): Promise<ProjectListResult>;
|
|
378
|
+
/**
|
|
379
|
+
* Set the active project
|
|
380
|
+
*/
|
|
381
|
+
setProject(input: SetProjectInput): Promise<ProjectSetResult>;
|
|
382
|
+
/**
|
|
383
|
+
* Get access token for API requests
|
|
384
|
+
*/
|
|
385
|
+
getAccessToken(): Promise<string | null>;
|
|
386
|
+
/**
|
|
387
|
+
* Install beta components
|
|
388
|
+
*/
|
|
389
|
+
installBetaComponents(): Promise<{
|
|
390
|
+
success: boolean;
|
|
391
|
+
error?: {
|
|
392
|
+
message: string;
|
|
393
|
+
};
|
|
394
|
+
}>;
|
|
395
|
+
/**
|
|
396
|
+
* Check if Application Default Credentials (ADC) exist.
|
|
397
|
+
*/
|
|
398
|
+
hasADC(): Promise<boolean>;
|
|
399
|
+
/**
|
|
400
|
+
/**
|
|
401
|
+
* Get the active project ID.
|
|
402
|
+
*/
|
|
403
|
+
getProjectId(): Promise<string | null>;
|
|
404
|
+
/**
|
|
405
|
+
* Get the active user account.
|
|
406
|
+
*/
|
|
407
|
+
getActiveAccount(): Promise<string | null>;
|
|
408
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StitchMCPClient } from './client.js';
|
|
2
|
+
export declare class MockStitchMCPClient extends StitchMCPClient {
|
|
3
|
+
private mockScreens;
|
|
4
|
+
constructor(mockScreens: any[]);
|
|
5
|
+
connect(): Promise<void>;
|
|
6
|
+
callTool<T>(name: string, args: Record<string, any>): Promise<T>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type StitchConfig, type StitchMCPClientSpec } from './spec.js';
|
|
2
|
+
/**
|
|
3
|
+
* A robust, authenticated driver for the Stitch MCP Server.
|
|
4
|
+
* Handles auth injection, retries, and transport negotiation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class StitchMCPClient implements StitchMCPClientSpec {
|
|
7
|
+
name: 'stitch-mcp-client';
|
|
8
|
+
description: 'Authenticated driver for Stitch MCP Server';
|
|
9
|
+
private client;
|
|
10
|
+
private transport;
|
|
11
|
+
private config;
|
|
12
|
+
private isConnected;
|
|
13
|
+
constructor(inputConfig?: Partial<StitchConfig>);
|
|
14
|
+
/**
|
|
15
|
+
* Auto-refreshes the Google Access Token via GcloudHandler.
|
|
16
|
+
* This ensures we use the bundled gcloud with proper CLOUDSDK_CONFIG.
|
|
17
|
+
*/
|
|
18
|
+
private refreshGcloudToken;
|
|
19
|
+
/**
|
|
20
|
+
* Validates the token against Google's tokeninfo endpoint.
|
|
21
|
+
*/
|
|
22
|
+
private validateToken;
|
|
23
|
+
/**
|
|
24
|
+
* Monkey-patches global fetch to ensure headers are ALWAYS present.
|
|
25
|
+
* This fixes issues where SDK layers might drop headers on redirects or retries.
|
|
26
|
+
*/
|
|
27
|
+
private installNetworkInterceptor;
|
|
28
|
+
connect(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Generic tool caller with type support and error parsing.
|
|
31
|
+
*/
|
|
32
|
+
callTool<T>(name: string, args: Record<string, any>): Promise<T>;
|
|
33
|
+
getCapabilities(): Promise<{
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
tools: {
|
|
36
|
+
inputSchema: {
|
|
37
|
+
[x: string]: unknown;
|
|
38
|
+
type: "object";
|
|
39
|
+
properties?: Record<string, object> | undefined;
|
|
40
|
+
required?: string[] | undefined;
|
|
41
|
+
};
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
outputSchema?: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
type: "object";
|
|
47
|
+
properties?: Record<string, object> | undefined;
|
|
48
|
+
required?: string[] | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
annotations?: {
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
readOnlyHint?: boolean | undefined;
|
|
53
|
+
destructiveHint?: boolean | undefined;
|
|
54
|
+
idempotentHint?: boolean | undefined;
|
|
55
|
+
openWorldHint?: boolean | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
execution?: {
|
|
58
|
+
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
_meta?: Record<string, unknown> | undefined;
|
|
61
|
+
icons?: {
|
|
62
|
+
src: string;
|
|
63
|
+
mimeType?: string | undefined;
|
|
64
|
+
sizes?: string[] | undefined;
|
|
65
|
+
theme?: "light" | "dark" | undefined;
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
title?: string | undefined;
|
|
68
|
+
}[];
|
|
69
|
+
_meta?: {
|
|
70
|
+
[x: string]: unknown;
|
|
71
|
+
progressToken?: string | number | undefined;
|
|
72
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
73
|
+
taskId: string;
|
|
74
|
+
} | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
nextCursor?: string | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
close(): Promise<void>;
|
|
79
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const StitchConfigSchema: z.ZodObject<{
|
|
3
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
4
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
5
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
baseUrl: z.ZodDefault<z.ZodString>;
|
|
7
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
accessToken?: string | undefined;
|
|
11
|
+
apiKey?: string | undefined;
|
|
12
|
+
projectId?: string | undefined;
|
|
13
|
+
timeout?: number | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
accessToken?: string | undefined;
|
|
16
|
+
apiKey?: string | undefined;
|
|
17
|
+
projectId?: string | undefined;
|
|
18
|
+
baseUrl?: string | undefined;
|
|
19
|
+
timeout?: number | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export type StitchConfig = z.infer<typeof StitchConfigSchema>;
|
|
22
|
+
export interface StitchMCPClientSpec {
|
|
23
|
+
connect(): Promise<void>;
|
|
24
|
+
callTool<T>(name: string, args: Record<string, any>): Promise<T>;
|
|
25
|
+
getCapabilities(): Promise<any>;
|
|
26
|
+
close(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type McpConfigService, type GenerateConfigInput, type McpConfigResult } from './spec.js';
|
|
2
|
+
export declare class McpConfigHandler implements McpConfigService {
|
|
3
|
+
generateConfig(input: GenerateConfigInput): Promise<McpConfigResult>;
|
|
4
|
+
private generateHttpConfig;
|
|
5
|
+
private generateCursorConfig;
|
|
6
|
+
private generateAntigravityConfig;
|
|
7
|
+
private generateVSCodeConfig;
|
|
8
|
+
private generateClaudeCodeConfig;
|
|
9
|
+
private generateGeminiCliConfig;
|
|
10
|
+
private generateOpencodeConfig;
|
|
11
|
+
private generateStdioConfig;
|
|
12
|
+
private getInstructionsForClient;
|
|
13
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type McpClient = 'antigravity' | 'vscode' | 'cursor' | 'claude-code' | 'gemini-cli' | 'codex' | 'opencode';
|
|
3
|
+
export type TransportType = 'http' | 'stdio';
|
|
4
|
+
export declare const GenerateConfigInputSchema: z.ZodEffects<z.ZodObject<{
|
|
5
|
+
client: z.ZodEnum<["antigravity", "vscode", "cursor", "claude-code", "gemini-cli", "codex", "opencode"]>;
|
|
6
|
+
projectId: z.ZodString;
|
|
7
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
8
|
+
transport: z.ZodDefault<z.ZodEnum<["http", "stdio"]>>;
|
|
9
|
+
authMode: z.ZodOptional<z.ZodEnum<["oauth", "apiKey"]>>;
|
|
10
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
projectId: string;
|
|
13
|
+
client: "cursor" | "antigravity" | "vscode" | "claude-code" | "gemini-cli" | "codex" | "opencode";
|
|
14
|
+
transport: "http" | "stdio";
|
|
15
|
+
accessToken?: string | undefined;
|
|
16
|
+
apiKey?: string | undefined;
|
|
17
|
+
authMode?: "apiKey" | "oauth" | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
projectId: string;
|
|
20
|
+
client: "cursor" | "antigravity" | "vscode" | "claude-code" | "gemini-cli" | "codex" | "opencode";
|
|
21
|
+
accessToken?: string | undefined;
|
|
22
|
+
apiKey?: string | undefined;
|
|
23
|
+
transport?: "http" | "stdio" | undefined;
|
|
24
|
+
authMode?: "apiKey" | "oauth" | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
projectId: string;
|
|
27
|
+
client: "cursor" | "antigravity" | "vscode" | "claude-code" | "gemini-cli" | "codex" | "opencode";
|
|
28
|
+
transport: "http" | "stdio";
|
|
29
|
+
accessToken?: string | undefined;
|
|
30
|
+
apiKey?: string | undefined;
|
|
31
|
+
authMode?: "apiKey" | "oauth" | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
projectId: string;
|
|
34
|
+
client: "cursor" | "antigravity" | "vscode" | "claude-code" | "gemini-cli" | "codex" | "opencode";
|
|
35
|
+
accessToken?: string | undefined;
|
|
36
|
+
apiKey?: string | undefined;
|
|
37
|
+
transport?: "http" | "stdio" | undefined;
|
|
38
|
+
authMode?: "apiKey" | "oauth" | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type GenerateConfigInput = z.infer<typeof GenerateConfigInputSchema>;
|
|
41
|
+
export declare const McpConfigErrorCode: z.ZodEnum<["INVALID_CLIENT", "CONFIG_GENERATION_FAILED", "UNKNOWN_ERROR"]>;
|
|
42
|
+
export declare const McpConfigSuccess: z.ZodObject<{
|
|
43
|
+
success: z.ZodLiteral<true>;
|
|
44
|
+
data: z.ZodObject<{
|
|
45
|
+
config: z.ZodString;
|
|
46
|
+
instructions: z.ZodString;
|
|
47
|
+
filePath: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
config: string;
|
|
50
|
+
instructions: string;
|
|
51
|
+
filePath?: string | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
config: string;
|
|
54
|
+
instructions: string;
|
|
55
|
+
filePath?: string | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
success: true;
|
|
59
|
+
data: {
|
|
60
|
+
config: string;
|
|
61
|
+
instructions: string;
|
|
62
|
+
filePath?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
}, {
|
|
65
|
+
success: true;
|
|
66
|
+
data: {
|
|
67
|
+
config: string;
|
|
68
|
+
instructions: string;
|
|
69
|
+
filePath?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
72
|
+
export declare const McpConfigFailure: z.ZodObject<{
|
|
73
|
+
success: z.ZodLiteral<false>;
|
|
74
|
+
error: z.ZodObject<{
|
|
75
|
+
code: z.ZodEnum<["INVALID_CLIENT", "CONFIG_GENERATION_FAILED", "UNKNOWN_ERROR"]>;
|
|
76
|
+
message: z.ZodString;
|
|
77
|
+
recoverable: z.ZodBoolean;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
code: "UNKNOWN_ERROR" | "CONFIG_GENERATION_FAILED" | "INVALID_CLIENT";
|
|
80
|
+
message: string;
|
|
81
|
+
recoverable: boolean;
|
|
82
|
+
}, {
|
|
83
|
+
code: "UNKNOWN_ERROR" | "CONFIG_GENERATION_FAILED" | "INVALID_CLIENT";
|
|
84
|
+
message: string;
|
|
85
|
+
recoverable: boolean;
|
|
86
|
+
}>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
success: false;
|
|
89
|
+
error: {
|
|
90
|
+
code: "UNKNOWN_ERROR" | "CONFIG_GENERATION_FAILED" | "INVALID_CLIENT";
|
|
91
|
+
message: string;
|
|
92
|
+
recoverable: boolean;
|
|
93
|
+
};
|
|
94
|
+
}, {
|
|
95
|
+
success: false;
|
|
96
|
+
error: {
|
|
97
|
+
code: "UNKNOWN_ERROR" | "CONFIG_GENERATION_FAILED" | "INVALID_CLIENT";
|
|
98
|
+
message: string;
|
|
99
|
+
recoverable: boolean;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
export type McpConfigResult = z.infer<typeof McpConfigSuccess> | z.infer<typeof McpConfigFailure>;
|
|
103
|
+
export interface McpConfigService {
|
|
104
|
+
/**
|
|
105
|
+
* Generate MCP configuration for specified client
|
|
106
|
+
*/
|
|
107
|
+
generateConfig(input: GenerateConfigInput): Promise<McpConfigResult>;
|
|
108
|
+
}
|
|
@@ -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
|
+
}
|