@_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
@@ -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,2 @@
1
+ import type { ShellResult } from '../../src/platform/shell.js';
2
+ export declare const mockExecCommand: import("bun:test").Mock<(command: string[], options?: any) => Promise<ShellResult>>;
@@ -1,4 +1,4 @@
1
- import { type NavigationResult } from './navigation-behaviors/index.js';
1
+ import { type NavigationResult } from './navigation-behaviors/handler.js';
2
2
  interface JsonTreeProps {
3
3
  data: any;
4
4
  /** Optional label for root object - when set, root is selectable for copying */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_davideast/stitch-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Stitch MCP CLI helper. Automates Google Cloud authentication. Generates MCP config for your client. Sets up a proxy server.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -23,7 +23,7 @@
23
23
  "README.md"
24
24
  ],
25
25
  "scripts": {
26
- "build": "bun build src/index.ts src/cli.ts --outdir=dist --target=node --format=esm --external lightningcss --external vite --external @astrojs/compiler && tsc -p tsconfig.build.json && bun scripts/generate-bin.ts",
26
+ "build": "bun run scripts/build.ts && tsc -p tsconfig.build.json && bun scripts/generate-bin.ts",
27
27
  "dev": "bun run src/cli.ts",
28
28
  "test": "bun test --preload ./tests/setup.ts",
29
29
  "prepublishOnly": "bun run build",
@@ -1,2 +0,0 @@
1
- import { type CommandDefinition } from '../framework/CommandDefinition.js';
2
- export declare const commands: CommandDefinition[];
@@ -1,8 +0,0 @@
1
- /**
2
- * Copy behaviors for JSON viewer.
3
- * Provides isolated, reusable copy handlers.
4
- */
5
- export type { CopyHandler, CopyContext, CopyResult, PathMatcher } from './types.js';
6
- export { copyText, copyJson, downloadAndCopyImage } from './clipboard.js';
7
- export { defaultCopyHandler, imageUrlCopyHandler } from './handlers.js';
8
- export { registerHandler, getHandler, endsWith, contains } from './registry.js';
@@ -1,7 +0,0 @@
1
- /**
2
- * Serve behaviors for JSON viewer.
3
- */
4
- export type { ServeHandler, ServeContext, ServeResult, PathMatcher } from './types.js';
5
- export { serveHtmlInMemory } from './server.js';
6
- export { htmlCodeServeHandler } from './handlers.js';
7
- export { registerServeHandler, getServeHandler, endsWith, contains } from './registry.js';