@_davideast/stitch-mcp 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/chunk-25wakzyb.js +137 -0
  2. package/dist/chunk-25wakzyb.js.map +10 -0
  3. package/dist/chunk-2cetsfw4.js +16531 -0
  4. package/dist/chunk-2cetsfw4.js.map +95 -0
  5. package/dist/chunk-2fcdwvrm.js +54 -0
  6. package/dist/chunk-2fcdwvrm.js.map +10 -0
  7. package/dist/chunk-2k7n0w2x.js +3980 -0
  8. package/dist/chunk-2k7n0w2x.js.map +16 -0
  9. package/dist/chunk-2kyqsrg2.js +403 -0
  10. package/dist/chunk-2kyqsrg2.js.map +10 -0
  11. package/dist/chunk-384jmtpy.js +11057 -0
  12. package/dist/chunk-384jmtpy.js.map +238 -0
  13. package/dist/chunk-3at4pjgn.js +22 -0
  14. package/dist/chunk-3at4pjgn.js.map +9 -0
  15. package/dist/chunk-3sfn889r.js +492 -0
  16. package/dist/chunk-3sfn889r.js.map +13 -0
  17. package/dist/chunk-45wx7tn7.js +94 -0
  18. package/dist/chunk-45wx7tn7.js.map +10 -0
  19. package/dist/chunk-48d17n29.js +10 -0
  20. package/dist/chunk-48d17n29.js.map +9 -0
  21. package/dist/chunk-4jwmvjb4.js +839 -0
  22. package/dist/chunk-4jwmvjb4.js.map +11 -0
  23. package/dist/chunk-4jygt4d6.js +14 -0
  24. package/dist/chunk-4jygt4d6.js.map +10 -0
  25. package/dist/chunk-4vxy1qce.js +68 -0
  26. package/dist/chunk-4vxy1qce.js.map +10 -0
  27. package/dist/chunk-7tx0wn04.js +11 -0
  28. package/dist/chunk-7tx0wn04.js.map +9 -0
  29. package/dist/chunk-7xh1y383.js +45188 -0
  30. package/dist/chunk-7xh1y383.js.map +258 -0
  31. package/dist/chunk-8yrtq2qs.js +18 -0
  32. package/dist/chunk-8yrtq2qs.js.map +9 -0
  33. package/dist/chunk-985f11w6.js +21 -0
  34. package/dist/chunk-985f11w6.js.map +9 -0
  35. package/dist/chunk-9tvppjaf.js +250 -0
  36. package/dist/chunk-9tvppjaf.js.map +14 -0
  37. package/dist/chunk-9wyra8hs.js +32 -0
  38. package/dist/chunk-9wyra8hs.js.map +9 -0
  39. package/dist/chunk-cwkb2wbe.js +733 -0
  40. package/dist/chunk-cwkb2wbe.js.map +16 -0
  41. package/dist/chunk-djhzzcgj.js +362 -0
  42. package/dist/chunk-djhzzcgj.js.map +13 -0
  43. package/dist/chunk-edp6faw2.js +7 -0
  44. package/dist/chunk-edp6faw2.js.map +9 -0
  45. package/dist/chunk-ezmw2j8c.js +14 -0
  46. package/dist/chunk-ezmw2j8c.js.map +9 -0
  47. package/dist/chunk-f2hq6bfv.js +22 -0
  48. package/dist/chunk-f2hq6bfv.js.map +10 -0
  49. package/dist/chunk-fwb4fnkp.js +31 -0
  50. package/dist/chunk-fwb4fnkp.js.map +10 -0
  51. package/dist/chunk-h18jrqed.js +9517 -0
  52. package/dist/chunk-h18jrqed.js.map +99 -0
  53. package/dist/chunk-hb3c6f6a.js +42 -0
  54. package/dist/chunk-hb3c6f6a.js.map +9 -0
  55. package/dist/chunk-jy2d17pr.js +252 -0
  56. package/dist/chunk-jy2d17pr.js.map +11 -0
  57. package/dist/chunk-kbtqrkwh.js +24 -0
  58. package/dist/chunk-kbtqrkwh.js.map +10 -0
  59. package/dist/chunk-knbnsf6s.js +92 -0
  60. package/dist/chunk-knbnsf6s.js.map +10 -0
  61. package/dist/chunk-mv9ssgmx.js +446 -0
  62. package/dist/chunk-mv9ssgmx.js.map +17 -0
  63. package/dist/chunk-nq68kghz.js +1647 -0
  64. package/dist/chunk-nq68kghz.js.map +10 -0
  65. package/dist/chunk-nthabjd9.js +3138 -0
  66. package/dist/chunk-nthabjd9.js.map +34 -0
  67. package/dist/chunk-nxpzt33t.js +278 -0
  68. package/dist/chunk-nxpzt33t.js.map +10 -0
  69. package/dist/chunk-pfyjtfex.js +172 -0
  70. package/dist/chunk-pfyjtfex.js.map +10 -0
  71. package/dist/chunk-q1nd6g0y.js +392 -0
  72. package/dist/chunk-q1nd6g0y.js.map +20 -0
  73. package/dist/chunk-q4js8r0z.js +4708 -0
  74. package/dist/chunk-q4js8r0z.js.map +29 -0
  75. package/dist/chunk-qv44tmn6.js +289 -0
  76. package/dist/chunk-qv44tmn6.js.map +13 -0
  77. package/dist/chunk-r2sg2nxa.js +20 -0
  78. package/dist/chunk-r2sg2nxa.js.map +9 -0
  79. package/dist/chunk-rp8wjzht.js +16959 -0
  80. package/dist/chunk-rp8wjzht.js.map +26 -0
  81. package/dist/chunk-rpxnm86e.js +372 -0
  82. package/dist/chunk-rpxnm86e.js.map +17 -0
  83. package/dist/chunk-sdp429xd.js +914 -0
  84. package/dist/chunk-sdp429xd.js.map +24 -0
  85. package/dist/chunk-t85nbjjb.js +113 -0
  86. package/dist/chunk-t85nbjjb.js.map +10 -0
  87. package/dist/chunk-tz7wnw4s.js +211 -0
  88. package/dist/chunk-tz7wnw4s.js.map +11 -0
  89. package/dist/chunk-v7117ywx.js +1477 -0
  90. package/dist/chunk-v7117ywx.js.map +23 -0
  91. package/dist/chunk-w8q7nsm7.js +2098 -0
  92. package/dist/chunk-w8q7nsm7.js.map +44 -0
  93. package/dist/chunk-wa64nz8b.js +47 -0
  94. package/dist/chunk-wa64nz8b.js.map +10 -0
  95. package/dist/chunk-wz8d5vzb.js +234 -0
  96. package/dist/chunk-wz8d5vzb.js.map +11 -0
  97. package/dist/chunk-ycfxp056.js +677 -0
  98. package/dist/chunk-ycfxp056.js.map +17 -0
  99. package/dist/chunk-z9d2xc83.js +3256 -0
  100. package/dist/chunk-z9d2xc83.js.map +84 -0
  101. package/dist/cli.js +111 -126055
  102. package/dist/cli.js.map +19 -0
  103. package/dist/commands/autoload.d.ts +2 -0
  104. package/dist/commands/doctor/command.d.ts +2 -1
  105. package/dist/commands/doctor/command.js +82 -0
  106. package/dist/commands/doctor/command.js.map +11 -0
  107. package/dist/commands/doctor/spec.d.ts +16 -8
  108. package/dist/commands/init/command.d.ts +2 -1
  109. package/dist/commands/init/command.js +98 -0
  110. package/dist/commands/init/command.js.map +11 -0
  111. package/dist/commands/init/spec.d.ts +29 -9
  112. package/dist/commands/logout/command.d.ts +2 -1
  113. package/dist/commands/logout/command.js +79 -0
  114. package/dist/commands/logout/command.js.map +11 -0
  115. package/dist/commands/logout/spec.d.ts +11 -0
  116. package/dist/commands/proxy/command.d.ts +2 -1
  117. package/dist/commands/proxy/command.js +56 -0
  118. package/dist/commands/proxy/command.js.map +11 -0
  119. package/dist/commands/proxy/spec.d.ts +15 -0
  120. package/dist/commands/screens/command.d.ts +2 -1
  121. package/dist/commands/screens/command.js +61 -0
  122. package/dist/commands/screens/command.js.map +11 -0
  123. package/dist/commands/screens/spec.d.ts +9 -0
  124. package/dist/commands/serve/command.d.ts +2 -1
  125. package/dist/commands/serve/command.js +65 -0
  126. package/dist/commands/serve/command.js.map +11 -0
  127. package/dist/commands/serve/spec.d.ts +9 -0
  128. package/dist/commands/site/command.d.ts +2 -1
  129. package/dist/commands/site/command.js +53 -0
  130. package/dist/commands/site/command.js.map +11 -0
  131. package/dist/commands/site/spec.d.ts +15 -0
  132. package/dist/commands/snapshot/command.d.ts +2 -1
  133. package/dist/commands/snapshot/command.js +59 -0
  134. package/dist/commands/snapshot/command.js.map +11 -0
  135. package/dist/commands/tool/command.d.ts +2 -1
  136. package/dist/commands/tool/command.js +79 -0
  137. package/dist/commands/tool/command.js.map +11 -0
  138. package/dist/commands/tool/handler.d.ts +17 -0
  139. package/dist/commands/tool/spec.d.ts +17 -0
  140. package/dist/commands/view/command.d.ts +2 -1
  141. package/dist/commands/view/command.js +52 -0
  142. package/dist/commands/view/command.js.map +11 -0
  143. package/dist/commands/view/spec.d.ts +24 -0
  144. package/dist/framework/CommandDefinition.d.ts +2 -2
  145. package/dist/index.js +26 -21607
  146. package/dist/index.js.map +9 -0
  147. package/dist/lib/services/site/schemas.d.ts +8 -8
  148. package/dist/services/config/handler.d.ts +12 -0
  149. package/dist/services/config/spec.d.ts +82 -0
  150. package/dist/services/gcloud/auth.d.ts +28 -0
  151. package/dist/services/gcloud/core.d.ts +21 -0
  152. package/dist/services/gcloud/handler.d.ts +6 -18
  153. package/dist/services/gcloud/install.d.ts +23 -0
  154. package/dist/services/gcloud/projects.d.ts +15 -0
  155. package/dist/services/gcloud/spec.d.ts +32 -24
  156. package/dist/services/mcp-client/client.d.ts +0 -5
  157. package/dist/services/mcp-client/spec.d.ts +6 -6
  158. package/dist/services/mcp-config/spec.d.ts +12 -12
  159. package/dist/services/project/spec.d.ts +4 -4
  160. package/dist/services/proxy/spec.d.ts +3 -3
  161. package/dist/services/stitch/api.d.ts +10 -0
  162. package/dist/services/stitch/connection.d.ts +5 -0
  163. package/dist/services/stitch/handler.d.ts +5 -3
  164. package/dist/services/stitch/iam.d.ts +11 -0
  165. package/dist/services/stitch/spec.d.ts +6 -6
  166. package/dist/services/view/spec.d.ts +7 -7
  167. package/dist/src/cli.d.ts +1 -0
  168. package/dist/src/commands/doctor/handler.d.ts +9 -0
  169. package/dist/src/commands/doctor/handler.test.d.ts +1 -0
  170. package/dist/src/commands/doctor/spec.d.ts +130 -0
  171. package/dist/src/commands/doctor/spec.test.d.ts +1 -0
  172. package/dist/src/commands/init/handler.d.ts +17 -0
  173. package/dist/src/commands/init/handler.test.d.ts +1 -0
  174. package/dist/src/commands/init/spec.d.ts +88 -0
  175. package/dist/src/commands/init/spec.test.d.ts +1 -0
  176. package/dist/src/commands/proxy/handler.d.ts +7 -0
  177. package/dist/src/commands/proxy/handler.test.d.ts +1 -0
  178. package/dist/src/index.d.ts +13 -0
  179. package/dist/src/platform/detector.d.ts +29 -0
  180. package/dist/src/platform/paths.d.ts +20 -0
  181. package/dist/src/platform/shell.d.ts +26 -0
  182. package/dist/src/services/gcloud/handler.d.ts +48 -0
  183. package/dist/src/services/gcloud/handler.test.d.ts +1 -0
  184. package/dist/src/services/gcloud/spec.d.ts +405 -0
  185. package/dist/src/services/mcp-config/handler.d.ts +12 -0
  186. package/dist/src/services/mcp-config/handler.test.d.ts +1 -0
  187. package/dist/src/services/mcp-config/spec.d.ts +88 -0
  188. package/dist/src/services/mcp-config/spec.test.d.ts +1 -0
  189. package/dist/src/services/project/handler.d.ts +11 -0
  190. package/dist/src/services/project/handler.test.d.ts +1 -0
  191. package/dist/src/services/project/spec.d.ts +86 -0
  192. package/dist/src/services/project/spec.test.d.ts +1 -0
  193. package/dist/src/services/proxy/handler.d.ts +15 -0
  194. package/dist/src/services/proxy/handler.test.d.ts +1 -0
  195. package/dist/src/services/proxy/spec.d.ts +83 -0
  196. package/dist/src/services/proxy/spec.test.d.ts +1 -0
  197. package/dist/src/services/stitch/handler.d.ts +15 -0
  198. package/dist/src/services/stitch/handler.test.d.ts +1 -0
  199. package/dist/src/services/stitch/spec.d.ts +262 -0
  200. package/dist/src/services/stitch/spec.test.d.ts +1 -0
  201. package/dist/src/ui/spinner.d.ts +11 -0
  202. package/dist/src/ui/theme.d.ts +18 -0
  203. package/dist/src/ui/wizard.d.ts +24 -0
  204. package/dist/tests/mocks/shell.d.ts +2 -0
  205. package/dist/ui/JsonTree.d.ts +1 -1
  206. package/package.json +2 -2
  207. package/dist/commands/registry.d.ts +0 -2
  208. package/dist/ui/copy-behaviors/index.d.ts +0 -8
  209. package/dist/ui/serve-behaviors/index.d.ts +0 -7
  210. /package/dist/ui/navigation-behaviors/{index.d.ts → handler.d.ts} +0 -0
@@ -5,12 +5,12 @@ export declare const StartProxyInputSchema: z.ZodObject<{
5
5
  debug: z.ZodOptional<z.ZodBoolean>;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  transport: "stdio" | "sse";
8
- debug?: boolean | undefined;
9
8
  port?: number | undefined;
10
- }, {
11
9
  debug?: boolean | undefined;
12
- port?: number | undefined;
10
+ }, {
13
11
  transport?: "stdio" | "sse" | undefined;
12
+ port?: number | undefined;
13
+ debug?: boolean | undefined;
14
14
  }>;
15
15
  export type StartProxyInput = z.infer<typeof StartProxyInputSchema>;
16
16
  export declare const ProxyErrorCode: z.ZodEnum<["START_FAILED", "TRANSPORT_ERROR", "AUTH_REFRESH_FAILED", "UNKNOWN_ERROR"]>;
@@ -0,0 +1,10 @@
1
+ import { type APIEnableResult, type EnableAPIInput } from './spec.js';
2
+ import type { GcloudExecutor } from '../gcloud/core.js';
3
+ export declare class StitchApiService {
4
+ private executor;
5
+ constructor(executor: GcloudExecutor);
6
+ enableAPI(input: EnableAPIInput): Promise<APIEnableResult>;
7
+ checkAPIEnabled(input: {
8
+ projectId: string;
9
+ }): Promise<boolean>;
10
+ }
@@ -0,0 +1,5 @@
1
+ import { type ConnectionTestResult, type TestConnectionInput, type TestConnectionWithApiKeyInput } from './spec.js';
2
+ export declare class StitchConnectionService {
3
+ testConnectionWithApiKey(input: TestConnectionWithApiKeyInput): Promise<ConnectionTestResult>;
4
+ testConnection(input: TestConnectionInput): Promise<ConnectionTestResult>;
5
+ }
@@ -1,8 +1,10 @@
1
1
  import { type StitchService, type ConfigureIAMInput, type EnableAPIInput, type TestConnectionInput, type TestConnectionWithApiKeyInput, type IAMConfigResult, type APIEnableResult, type ConnectionTestResult } from './spec.js';
2
2
  export declare class StitchHandler implements StitchService {
3
- private getGcloudEnv;
4
- private gcloudBinaryPromise;
5
- private getGcloudBinary;
3
+ private executor;
4
+ private iamService;
5
+ private apiService;
6
+ private connectionService;
7
+ constructor();
6
8
  configureIAM(input: ConfigureIAMInput): Promise<IAMConfigResult>;
7
9
  enableAPI(input: EnableAPIInput): Promise<APIEnableResult>;
8
10
  checkIAMRole(input: {
@@ -0,0 +1,11 @@
1
+ import { type IAMConfigResult, type ConfigureIAMInput } from './spec.js';
2
+ import type { GcloudExecutor } from '../gcloud/core.js';
3
+ export declare class StitchIamService {
4
+ private executor;
5
+ constructor(executor: GcloudExecutor);
6
+ configureIAM(input: ConfigureIAMInput): Promise<IAMConfigResult>;
7
+ checkIAMRole(input: {
8
+ projectId: string;
9
+ userEmail: string;
10
+ }): Promise<boolean>;
11
+ }
@@ -22,11 +22,11 @@ export declare const TestConnectionInputSchema: z.ZodObject<{
22
22
  projectId: z.ZodString;
23
23
  accessToken: z.ZodString;
24
24
  }, "strip", z.ZodTypeAny, {
25
- accessToken: string;
26
25
  projectId: string;
27
- }, {
28
26
  accessToken: string;
27
+ }, {
29
28
  projectId: string;
29
+ accessToken: string;
30
30
  }>;
31
31
  export type TestConnectionInput = z.infer<typeof TestConnectionInputSchema>;
32
32
  export declare const TestConnectionWithApiKeyInputSchema: z.ZodObject<{
@@ -178,30 +178,30 @@ export declare const ConnectionTestSuccess: z.ZodObject<{
178
178
  url: z.ZodString;
179
179
  response: z.ZodOptional<z.ZodAny>;
180
180
  }, "strip", z.ZodTypeAny, {
181
- url: string;
182
181
  connected: boolean;
183
182
  statusCode: number;
183
+ url: string;
184
184
  response?: any;
185
185
  }, {
186
- url: string;
187
186
  connected: boolean;
188
187
  statusCode: number;
188
+ url: string;
189
189
  response?: any;
190
190
  }>;
191
191
  }, "strip", z.ZodTypeAny, {
192
192
  success: true;
193
193
  data: {
194
- url: string;
195
194
  connected: boolean;
196
195
  statusCode: number;
196
+ url: string;
197
197
  response?: any;
198
198
  };
199
199
  }, {
200
200
  success: true;
201
201
  data: {
202
- url: string;
203
202
  connected: boolean;
204
203
  statusCode: number;
204
+ url: string;
205
205
  response?: any;
206
206
  };
207
207
  }>;
@@ -8,15 +8,15 @@ export declare const ViewInputSchema: z.ZodObject<{
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  projects: boolean;
10
10
  name?: string | undefined;
11
- sourceScreen?: string | undefined;
12
11
  project?: string | undefined;
13
12
  screen?: string | undefined;
13
+ sourceScreen?: string | undefined;
14
14
  }, {
15
- projects?: boolean | undefined;
16
15
  name?: string | undefined;
17
- sourceScreen?: string | undefined;
16
+ projects?: boolean | undefined;
18
17
  project?: string | undefined;
19
18
  screen?: string | undefined;
19
+ sourceScreen?: string | undefined;
20
20
  }>;
21
21
  export type ViewInput = z.infer<typeof ViewInputSchema>;
22
22
  export declare const ViewErrorCode: z.ZodEnum<["INVALID_ARGS", "FETCH_FAILED", "UNKNOWN_ERROR"]>;
@@ -37,25 +37,25 @@ export declare const ViewFailure: z.ZodObject<{
37
37
  message: z.ZodString;
38
38
  recoverable: z.ZodBoolean;
39
39
  }, "strip", z.ZodTypeAny, {
40
- code: "INVALID_ARGS" | "FETCH_FAILED" | "UNKNOWN_ERROR";
40
+ code: "UNKNOWN_ERROR" | "INVALID_ARGS" | "FETCH_FAILED";
41
41
  message: string;
42
42
  recoverable: boolean;
43
43
  }, {
44
- code: "INVALID_ARGS" | "FETCH_FAILED" | "UNKNOWN_ERROR";
44
+ code: "UNKNOWN_ERROR" | "INVALID_ARGS" | "FETCH_FAILED";
45
45
  message: string;
46
46
  recoverable: boolean;
47
47
  }>;
48
48
  }, "strip", z.ZodTypeAny, {
49
49
  success: false;
50
50
  error: {
51
- code: "INVALID_ARGS" | "FETCH_FAILED" | "UNKNOWN_ERROR";
51
+ code: "UNKNOWN_ERROR" | "INVALID_ARGS" | "FETCH_FAILED";
52
52
  message: string;
53
53
  recoverable: boolean;
54
54
  };
55
55
  }, {
56
56
  success: false;
57
57
  error: {
58
- code: "INVALID_ARGS" | "FETCH_FAILED" | "UNKNOWN_ERROR";
58
+ code: "UNKNOWN_ERROR" | "INVALID_ARGS" | "FETCH_FAILED";
59
59
  message: string;
60
60
  recoverable: boolean;
61
61
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type DoctorCommand, type DoctorInput, type DoctorResult } from './spec.js';
2
+ import { type GcloudService } from '../../services/gcloud/spec.js';
3
+ import { type StitchService } from '../../services/stitch/spec.js';
4
+ export declare class DoctorHandler implements DoctorCommand {
5
+ private readonly gcloudService;
6
+ private readonly stitchService;
7
+ constructor(gcloudService?: GcloudService, stitchService?: StitchService);
8
+ execute(input: DoctorInput): Promise<DoctorResult>;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,130 @@
1
+ import { z } from 'zod';
2
+ export declare const DoctorInputSchema: z.ZodObject<{
3
+ verbose: z.ZodDefault<z.ZodBoolean>;
4
+ }, "strip", z.ZodTypeAny, {
5
+ verbose: boolean;
6
+ }, {
7
+ verbose?: boolean | undefined;
8
+ }>;
9
+ export type DoctorInput = z.infer<typeof DoctorInputSchema>;
10
+ export declare const DoctorErrorCode: z.ZodEnum<["CHECKS_FAILED", "UNKNOWN_ERROR"]>;
11
+ export declare const HealthCheckSchema: z.ZodObject<{
12
+ name: z.ZodString;
13
+ passed: z.ZodBoolean;
14
+ message: z.ZodString;
15
+ suggestion: z.ZodOptional<z.ZodString>;
16
+ details: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ message: string;
19
+ name: string;
20
+ passed: boolean;
21
+ suggestion?: string | undefined;
22
+ details?: string | undefined;
23
+ }, {
24
+ message: string;
25
+ name: string;
26
+ passed: boolean;
27
+ suggestion?: string | undefined;
28
+ details?: string | undefined;
29
+ }>;
30
+ export declare const DoctorSuccess: z.ZodObject<{
31
+ success: z.ZodLiteral<true>;
32
+ data: z.ZodObject<{
33
+ checks: z.ZodArray<z.ZodObject<{
34
+ name: z.ZodString;
35
+ passed: z.ZodBoolean;
36
+ message: z.ZodString;
37
+ suggestion: z.ZodOptional<z.ZodString>;
38
+ details: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ message: string;
41
+ name: string;
42
+ passed: boolean;
43
+ suggestion?: string | undefined;
44
+ details?: string | undefined;
45
+ }, {
46
+ message: string;
47
+ name: string;
48
+ passed: boolean;
49
+ suggestion?: string | undefined;
50
+ details?: string | undefined;
51
+ }>, "many">;
52
+ allPassed: z.ZodBoolean;
53
+ }, "strip", z.ZodTypeAny, {
54
+ checks: {
55
+ message: string;
56
+ name: string;
57
+ passed: boolean;
58
+ suggestion?: string | undefined;
59
+ details?: string | undefined;
60
+ }[];
61
+ allPassed: boolean;
62
+ }, {
63
+ checks: {
64
+ message: string;
65
+ name: string;
66
+ passed: boolean;
67
+ suggestion?: string | undefined;
68
+ details?: string | undefined;
69
+ }[];
70
+ allPassed: boolean;
71
+ }>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ success: true;
74
+ data: {
75
+ checks: {
76
+ message: string;
77
+ name: string;
78
+ passed: boolean;
79
+ suggestion?: string | undefined;
80
+ details?: string | undefined;
81
+ }[];
82
+ allPassed: boolean;
83
+ };
84
+ }, {
85
+ success: true;
86
+ data: {
87
+ checks: {
88
+ message: string;
89
+ name: string;
90
+ passed: boolean;
91
+ suggestion?: string | undefined;
92
+ details?: string | undefined;
93
+ }[];
94
+ allPassed: boolean;
95
+ };
96
+ }>;
97
+ export declare const DoctorFailure: z.ZodObject<{
98
+ success: z.ZodLiteral<false>;
99
+ error: z.ZodObject<{
100
+ code: z.ZodEnum<["CHECKS_FAILED", "UNKNOWN_ERROR"]>;
101
+ message: z.ZodString;
102
+ recoverable: z.ZodBoolean;
103
+ }, "strip", z.ZodTypeAny, {
104
+ code: "UNKNOWN_ERROR" | "CHECKS_FAILED";
105
+ message: string;
106
+ recoverable: boolean;
107
+ }, {
108
+ code: "UNKNOWN_ERROR" | "CHECKS_FAILED";
109
+ message: string;
110
+ recoverable: boolean;
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ success: false;
114
+ error: {
115
+ code: "UNKNOWN_ERROR" | "CHECKS_FAILED";
116
+ message: string;
117
+ recoverable: boolean;
118
+ };
119
+ }, {
120
+ success: false;
121
+ error: {
122
+ code: "UNKNOWN_ERROR" | "CHECKS_FAILED";
123
+ message: string;
124
+ recoverable: boolean;
125
+ };
126
+ }>;
127
+ export type DoctorResult = z.infer<typeof DoctorSuccess> | z.infer<typeof DoctorFailure>;
128
+ export interface DoctorCommand {
129
+ execute(input: DoctorInput): Promise<DoctorResult>;
130
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type InitCommand, type InitInput, type InitResult } from './spec.js';
2
+ import { type GcloudService } from '../../services/gcloud/spec.js';
3
+ import { type ProjectService } from '../../services/project/spec.js';
4
+ import { type StitchService } from '../../services/stitch/spec.js';
5
+ import { type McpConfigService } from '../../services/mcp-config/spec.js';
6
+ export declare class InitHandler implements InitCommand {
7
+ private readonly gcloudService;
8
+ private readonly mcpConfigService;
9
+ private readonly projectService;
10
+ private readonly stitchService;
11
+ constructor(gcloudService?: GcloudService, mcpConfigService?: McpConfigService, projectService?: ProjectService, // ProjectHandler depends on GcloudHandler
12
+ stitchService?: StitchService);
13
+ execute(input: InitInput): Promise<InitResult>;
14
+ private resolveMcpClient;
15
+ private resolveTransport;
16
+ private setupGeminiExtension;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,88 @@
1
+ import { z } from 'zod';
2
+ export declare const InitInputSchema: z.ZodObject<{
3
+ local: z.ZodDefault<z.ZodBoolean>;
4
+ defaults: z.ZodDefault<z.ZodBoolean>;
5
+ client: z.ZodOptional<z.ZodString>;
6
+ transport: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ local: boolean;
9
+ defaults: boolean;
10
+ client?: string | undefined;
11
+ transport?: string | undefined;
12
+ }, {
13
+ local?: boolean | undefined;
14
+ defaults?: boolean | undefined;
15
+ client?: string | undefined;
16
+ transport?: string | undefined;
17
+ }>;
18
+ export type InitInput = z.infer<typeof InitInputSchema>;
19
+ export declare const InitErrorCode: z.ZodEnum<["GCLOUD_SETUP_FAILED", "AUTH_FAILED", "PROJECT_SELECTION_FAILED", "API_CONFIG_FAILED", "CONFIG_GENERATION_FAILED", "USER_CANCELLED", "UNKNOWN_ERROR"]>;
20
+ export declare const InitSuccess: z.ZodObject<{
21
+ success: z.ZodLiteral<true>;
22
+ data: z.ZodObject<{
23
+ projectId: z.ZodString;
24
+ mcpConfig: z.ZodString;
25
+ instructions: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ projectId: string;
28
+ mcpConfig: string;
29
+ instructions: string;
30
+ }, {
31
+ projectId: string;
32
+ mcpConfig: string;
33
+ instructions: string;
34
+ }>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ success: true;
37
+ data: {
38
+ projectId: string;
39
+ mcpConfig: string;
40
+ instructions: string;
41
+ };
42
+ }, {
43
+ success: true;
44
+ data: {
45
+ projectId: string;
46
+ mcpConfig: string;
47
+ instructions: string;
48
+ };
49
+ }>;
50
+ export declare const InitFailure: z.ZodObject<{
51
+ success: z.ZodLiteral<false>;
52
+ error: z.ZodObject<{
53
+ code: z.ZodEnum<["GCLOUD_SETUP_FAILED", "AUTH_FAILED", "PROJECT_SELECTION_FAILED", "API_CONFIG_FAILED", "CONFIG_GENERATION_FAILED", "USER_CANCELLED", "UNKNOWN_ERROR"]>;
54
+ message: z.ZodString;
55
+ suggestion: z.ZodOptional<z.ZodString>;
56
+ recoverable: z.ZodBoolean;
57
+ }, "strip", z.ZodTypeAny, {
58
+ code: "GCLOUD_SETUP_FAILED" | "AUTH_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED" | "UNKNOWN_ERROR";
59
+ message: string;
60
+ recoverable: boolean;
61
+ suggestion?: string | undefined;
62
+ }, {
63
+ code: "GCLOUD_SETUP_FAILED" | "AUTH_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED" | "UNKNOWN_ERROR";
64
+ message: string;
65
+ recoverable: boolean;
66
+ suggestion?: string | undefined;
67
+ }>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ success: false;
70
+ error: {
71
+ code: "GCLOUD_SETUP_FAILED" | "AUTH_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED" | "UNKNOWN_ERROR";
72
+ message: string;
73
+ recoverable: boolean;
74
+ suggestion?: string | undefined;
75
+ };
76
+ }, {
77
+ success: false;
78
+ error: {
79
+ code: "GCLOUD_SETUP_FAILED" | "AUTH_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED" | "UNKNOWN_ERROR";
80
+ message: string;
81
+ recoverable: boolean;
82
+ suggestion?: string | undefined;
83
+ };
84
+ }>;
85
+ export type InitResult = z.infer<typeof InitSuccess> | z.infer<typeof InitFailure>;
86
+ export interface InitCommand {
87
+ execute(input: InitInput): Promise<InitResult>;
88
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ProxyHandler } from '../../services/proxy/handler.js';
2
+ import type { StartProxyInput, ProxyResult } from '../../services/proxy/spec.js';
3
+ export declare class ProxyCommandHandler {
4
+ private proxyService;
5
+ constructor(proxyService?: ProxyHandler);
6
+ execute(input: StartProxyInput): Promise<ProxyResult>;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export { GcloudHandler } from './services/gcloud/handler.js';
2
+ export { ProjectHandler } from './services/project/handler.js';
3
+ export { StitchHandler } from './services/stitch/handler.js';
4
+ export { McpConfigHandler } from './services/mcp-config/handler.js';
5
+ export { InitHandler } from './commands/init/handler.js';
6
+ export { DoctorHandler } from './commands/doctor/handler.js';
7
+ export type { GcloudService } from './services/gcloud/spec.js';
8
+ export type { ProjectService } from './services/project/spec.js';
9
+ export type { StitchService } from './services/stitch/spec.js';
10
+ export type { McpConfigService } from './services/mcp-config/spec.js';
11
+ export type { InitCommand } from './commands/init/spec.js';
12
+ export type { DoctorCommand } from './commands/doctor/spec.js';
13
+ export type { McpClient } from './ui/wizard.js';
@@ -0,0 +1,29 @@
1
+ export type OS = 'macos' | 'linux' | 'windows';
2
+ export type Arch = 'arm64' | 'x86_64';
3
+ export interface Platform {
4
+ os: OS;
5
+ arch: Arch;
6
+ gcloudDownloadUrl: string;
7
+ gcloudBinaryName: string;
8
+ isWindows: boolean;
9
+ }
10
+ /**
11
+ * Detect the current platform and architecture
12
+ */
13
+ export declare function detectPlatform(): Platform;
14
+ /**
15
+ * Get the user's home directory
16
+ */
17
+ export declare function getHomeDir(): string;
18
+ /**
19
+ * Get the Stitch MCP directory path
20
+ */
21
+ export declare function getStitchDir(): string;
22
+ /**
23
+ * Get the gcloud SDK installation path
24
+ */
25
+ export declare function getGcloudSdkPath(): string;
26
+ /**
27
+ * Get the gcloud config directory path
28
+ */
29
+ export declare function getGcloudConfigPath(): string;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Get cross-platform path join
3
+ */
4
+ export declare function joinPath(...parts: string[]): string;
5
+ /**
6
+ * Get the directory name from a path
7
+ */
8
+ export declare function dirname(filepath: string): string;
9
+ /**
10
+ * Get the basename from a path
11
+ */
12
+ export declare function basename(filepath: string): string;
13
+ /**
14
+ * Normalize path separators for the current platform
15
+ */
16
+ export declare function normalizePath(filepath: string): string;
17
+ /**
18
+ * Convert a path to use forward slashes (for consistency)
19
+ */
20
+ export declare function toUnixPath(filepath: string): string;
@@ -0,0 +1,26 @@
1
+ export interface ShellResult {
2
+ success: boolean;
3
+ stdout: string;
4
+ stderr: string;
5
+ exitCode: number;
6
+ error?: string;
7
+ }
8
+ /**
9
+ * Execute a shell command and return the result
10
+ */
11
+ export declare function execCommand(command: string[], options?: {
12
+ cwd?: string;
13
+ env?: Record<string, string>;
14
+ timeout?: number;
15
+ }): Promise<ShellResult>;
16
+ /**
17
+ * Execute a shell command and stream output
18
+ */
19
+ export declare function execCommandStreaming(command: string[], onStdout?: (data: string) => void, onStderr?: (data: string) => void, options?: {
20
+ cwd?: string;
21
+ env?: Record<string, string>;
22
+ }): Promise<ShellResult>;
23
+ /**
24
+ * Check if a command exists in PATH
25
+ */
26
+ export declare function commandExists(command: string): Promise<boolean>;
@@ -0,0 +1,48 @@
1
+ import { type GcloudService, type EnsureGcloudInput, type AuthenticateInput, type ListProjectsInput, type SetProjectInput, type GcloudResult, type AuthResult, type ProjectListResult, type ProjectSetResult } from './spec.js';
2
+ export declare class GcloudHandler implements GcloudService {
3
+ private platform;
4
+ private gcloudPath;
5
+ /**
6
+ * Ensure gcloud is installed and available
7
+ */
8
+ ensureInstalled(input: EnsureGcloudInput): Promise<GcloudResult>;
9
+ /**
10
+ * Authenticate user
11
+ */
12
+ authenticate(input: AuthenticateInput): Promise<AuthResult>;
13
+ /**
14
+ * Authenticate application default credentials
15
+ */
16
+ authenticateADC(input: AuthenticateInput): Promise<AuthResult>;
17
+ /**
18
+ * List projects
19
+ */
20
+ listProjects(input: ListProjectsInput): Promise<ProjectListResult>;
21
+ /**
22
+ * Set active project
23
+ */
24
+ setProject(input: SetProjectInput): Promise<ProjectSetResult>;
25
+ /**
26
+ * Get access token
27
+ */
28
+ getAccessToken(): Promise<string | null>;
29
+ getProjectId(): Promise<string | null>;
30
+ /**
31
+ * Install beta components
32
+ */
33
+ installBetaComponents(): Promise<{
34
+ success: boolean;
35
+ error?: {
36
+ message: string;
37
+ };
38
+ }>;
39
+ private findGlobalGcloud;
40
+ private getVersionFromPath;
41
+ private isVersionValid;
42
+ private installLocal;
43
+ private setupEnvironment;
44
+ private getEnvironment;
45
+ private getGcloudCommand;
46
+ getActiveAccount(): Promise<string | null>;
47
+ hasADC(): Promise<boolean>;
48
+ }
@@ -0,0 +1 @@
1
+ export {};