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.
Files changed (127) hide show
  1. package/LICENSE +212 -0
  2. package/README.md +439 -0
  3. package/bin/stitch-mcp.js +2 -0
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +130810 -0
  6. package/dist/commands/doctor/command.d.ts +2 -0
  7. package/dist/commands/doctor/context.d.ts +19 -0
  8. package/dist/commands/doctor/handler.d.ts +12 -0
  9. package/dist/commands/doctor/spec.d.ts +130 -0
  10. package/dist/commands/doctor/steps/AdcCheckStep.d.ts +8 -0
  11. package/dist/commands/doctor/steps/ApiCheckStep.d.ts +8 -0
  12. package/dist/commands/doctor/steps/ApiKeyConnectionStep.d.ts +8 -0
  13. package/dist/commands/doctor/steps/ApiKeyDetectedStep.d.ts +8 -0
  14. package/dist/commands/doctor/steps/AuthCheckStep.d.ts +8 -0
  15. package/dist/commands/doctor/steps/GcloudCheckStep.d.ts +8 -0
  16. package/dist/commands/doctor/steps/ProjectCheckStep.d.ts +8 -0
  17. package/dist/commands/init/command.d.ts +2 -0
  18. package/dist/commands/init/context.d.ts +24 -0
  19. package/dist/commands/init/handler.d.ts +19 -0
  20. package/dist/commands/init/spec.d.ts +91 -0
  21. package/dist/commands/init/steps/AuthModeStep.d.ts +8 -0
  22. package/dist/commands/init/steps/AuthStep.d.ts +8 -0
  23. package/dist/commands/init/steps/ClientSelectionStep.d.ts +9 -0
  24. package/dist/commands/init/steps/ConfigStep.d.ts +9 -0
  25. package/dist/commands/init/steps/GcloudInstallStep.d.ts +8 -0
  26. package/dist/commands/init/steps/IamApiStep.d.ts +8 -0
  27. package/dist/commands/init/steps/ProjectSelectStep.d.ts +8 -0
  28. package/dist/commands/init/steps/TestConnectionStep.d.ts +8 -0
  29. package/dist/commands/init/steps/TransportStep.d.ts +9 -0
  30. package/dist/commands/logout/command.d.ts +2 -0
  31. package/dist/commands/logout/context.d.ts +12 -0
  32. package/dist/commands/logout/handler.d.ts +8 -0
  33. package/dist/commands/logout/spec.d.ts +77 -0
  34. package/dist/commands/logout/steps/ClearConfigStep.d.ts +8 -0
  35. package/dist/commands/logout/steps/PrepareStep.d.ts +8 -0
  36. package/dist/commands/logout/steps/RevokeAdcStep.d.ts +9 -0
  37. package/dist/commands/logout/steps/RevokeUserStep.d.ts +9 -0
  38. package/dist/commands/proxy/command.d.ts +2 -0
  39. package/dist/commands/proxy/handler.d.ts +7 -0
  40. package/dist/commands/registry.d.ts +2 -0
  41. package/dist/commands/screens/ScreensView.d.ts +16 -0
  42. package/dist/commands/screens/command.d.ts +2 -0
  43. package/dist/commands/screens/handler.d.ts +24 -0
  44. package/dist/commands/serve/ServeView.d.ts +12 -0
  45. package/dist/commands/serve/command.d.ts +2 -0
  46. package/dist/commands/serve/handler.d.ts +22 -0
  47. package/dist/commands/site/command.d.ts +2 -0
  48. package/dist/commands/site/hooks/useProjectHydration.d.ts +9 -0
  49. package/dist/commands/site/index.d.ts +12 -0
  50. package/dist/commands/site/ui/ScreenList.d.ts +11 -0
  51. package/dist/commands/site/ui/SiteBuilder.d.ts +10 -0
  52. package/dist/commands/site/ui/components/StatusIcon.d.ts +6 -0
  53. package/dist/commands/site/ui/types.d.ts +1 -0
  54. package/dist/commands/site/utils/ProjectSyncer.d.ts +8 -0
  55. package/dist/commands/site/utils/SiteManifest.d.ts +16 -0
  56. package/dist/commands/snapshot/command.d.ts +2 -0
  57. package/dist/commands/snapshot/handler.d.ts +17 -0
  58. package/dist/commands/snapshot/spec.d.ts +39 -0
  59. package/dist/commands/tool/command.d.ts +2 -0
  60. package/dist/commands/tool/context.d.ts +9 -0
  61. package/dist/commands/tool/handler.d.ts +9 -0
  62. package/dist/commands/tool/spec.d.ts +39 -0
  63. package/dist/commands/tool/steps/ExecuteToolStep.d.ts +8 -0
  64. package/dist/commands/tool/steps/ListToolsStep.d.ts +8 -0
  65. package/dist/commands/tool/steps/ParseArgsStep.d.ts +8 -0
  66. package/dist/commands/tool/steps/ShowSchemaStep.d.ts +10 -0
  67. package/dist/commands/tool/steps/ValidateToolStep.d.ts +8 -0
  68. package/dist/commands/tool/virtual-tools/build-site.d.ts +2 -0
  69. package/dist/commands/tool/virtual-tools/get-screen-code.d.ts +2 -0
  70. package/dist/commands/tool/virtual-tools/get-screen-image.d.ts +2 -0
  71. package/dist/commands/tool/virtual-tools/index.d.ts +7 -0
  72. package/dist/commands/tool/virtual-tools/list-tools.d.ts +2 -0
  73. package/dist/commands/view/command.d.ts +2 -0
  74. package/dist/commands/view/handler.d.ts +14 -0
  75. package/dist/framework/CommandDefinition.d.ts +18 -0
  76. package/dist/framework/CommandStep.d.ts +15 -0
  77. package/dist/framework/ConsoleUI.d.ts +14 -0
  78. package/dist/framework/MockUI.d.ts +16 -0
  79. package/dist/framework/StepRunner.d.ts +20 -0
  80. package/dist/framework/UserInterface.d.ts +13 -0
  81. package/dist/index.d.ts +13 -0
  82. package/dist/index.js +23583 -0
  83. package/dist/lib/server/AssetGateway.d.ts +25 -0
  84. package/dist/lib/server/vite/StitchViteServer.d.ts +11 -0
  85. package/dist/lib/server/vite/plugins/virtualContent.d.ts +7 -0
  86. package/dist/lib/services/site/SiteService.d.ts +6 -0
  87. package/dist/lib/services/site/schemas.d.ts +91 -0
  88. package/dist/lib/services/site/types.d.ts +22 -0
  89. package/dist/platform/detector.d.ts +29 -0
  90. package/dist/platform/environment.d.ts +13 -0
  91. package/dist/platform/paths.d.ts +20 -0
  92. package/dist/platform/shell.d.ts +30 -0
  93. package/dist/services/gcloud/handler.d.ts +57 -0
  94. package/dist/services/gcloud/spec.d.ts +408 -0
  95. package/dist/services/mcp-client/MockStitchMCPClient.d.ts +7 -0
  96. package/dist/services/mcp-client/client.d.ts +79 -0
  97. package/dist/services/mcp-client/spec.d.ts +27 -0
  98. package/dist/services/mcp-config/handler.d.ts +13 -0
  99. package/dist/services/mcp-config/spec.d.ts +108 -0
  100. package/dist/services/project/handler.d.ts +11 -0
  101. package/dist/services/project/spec.d.ts +86 -0
  102. package/dist/services/proxy/handler.d.ts +26 -0
  103. package/dist/services/proxy/spec.d.ts +83 -0
  104. package/dist/services/stitch/handler.d.ts +17 -0
  105. package/dist/services/stitch/spec.d.ts +279 -0
  106. package/dist/services/view/handler.d.ts +7 -0
  107. package/dist/services/view/spec.d.ts +66 -0
  108. package/dist/ui/InteractiveViewer.d.ts +17 -0
  109. package/dist/ui/JsonTree.d.ts +12 -0
  110. package/dist/ui/checklist/handler.d.ts +23 -0
  111. package/dist/ui/checklist/spec.d.ts +191 -0
  112. package/dist/ui/checklist.d.ts +54 -0
  113. package/dist/ui/copy-behaviors/clipboard.d.ts +32 -0
  114. package/dist/ui/copy-behaviors/handlers.d.ts +16 -0
  115. package/dist/ui/copy-behaviors/index.d.ts +8 -0
  116. package/dist/ui/copy-behaviors/registry.d.ts +24 -0
  117. package/dist/ui/copy-behaviors/types.d.ts +26 -0
  118. package/dist/ui/navigation-behaviors/index.d.ts +34 -0
  119. package/dist/ui/serve-behaviors/handlers.d.ts +9 -0
  120. package/dist/ui/serve-behaviors/index.d.ts +7 -0
  121. package/dist/ui/serve-behaviors/registry.d.ts +10 -0
  122. package/dist/ui/serve-behaviors/server.d.ts +8 -0
  123. package/dist/ui/serve-behaviors/types.d.ts +18 -0
  124. package/dist/ui/spinner.d.ts +11 -0
  125. package/dist/ui/theme.d.ts +18 -0
  126. package/dist/ui/wizard.d.ts +36 -0
  127. package/package.json +83 -0
@@ -0,0 +1,2 @@
1
+ import { type CommandDefinition } from '../../framework/CommandDefinition.js';
2
+ export declare const command: CommandDefinition;
@@ -0,0 +1,19 @@
1
+ import { type DoctorInput } from './spec.js';
2
+ import { type UserInterface } from '../../framework/UserInterface.js';
3
+ import { type GcloudService } from '../../services/gcloud/spec.js';
4
+ import { type StitchService } from '../../services/stitch/spec.js';
5
+ export interface DoctorContext {
6
+ input: DoctorInput;
7
+ ui: UserInterface;
8
+ gcloudService: GcloudService;
9
+ stitchService: StitchService;
10
+ authMode: 'apiKey' | 'oauth';
11
+ apiKey?: string;
12
+ checks: Array<{
13
+ name: string;
14
+ passed: boolean;
15
+ message: string;
16
+ suggestion?: string;
17
+ details?: string;
18
+ }>;
19
+ }
@@ -0,0 +1,12 @@
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
+ import { type UserInterface } from '../../framework/UserInterface.js';
5
+ export declare class DoctorHandler implements DoctorCommand {
6
+ private readonly gcloudService;
7
+ private readonly stitchService;
8
+ private steps;
9
+ private readonly ui;
10
+ constructor(gcloudService?: GcloudService, stitchService?: StitchService, ui?: UserInterface);
11
+ execute(input: DoctorInput): Promise<DoctorResult>;
12
+ }
@@ -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
+ name: string;
19
+ message: string;
20
+ passed: boolean;
21
+ suggestion?: string | undefined;
22
+ details?: string | undefined;
23
+ }, {
24
+ name: string;
25
+ message: 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
+ name: string;
41
+ message: string;
42
+ passed: boolean;
43
+ suggestion?: string | undefined;
44
+ details?: string | undefined;
45
+ }, {
46
+ name: string;
47
+ message: 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
+ name: string;
56
+ message: string;
57
+ passed: boolean;
58
+ suggestion?: string | undefined;
59
+ details?: string | undefined;
60
+ }[];
61
+ allPassed: boolean;
62
+ }, {
63
+ checks: {
64
+ name: string;
65
+ message: 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
+ name: string;
77
+ message: 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
+ name: string;
89
+ message: 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,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class AdcCheckStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class ApiCheckStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class ApiKeyConnectionStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class ApiKeyDetectedStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class AuthCheckStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class GcloudCheckStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type DoctorContext } from '../context.js';
3
+ export declare class ProjectCheckStep implements CommandStep<DoctorContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: DoctorContext): Promise<boolean>;
7
+ run(context: DoctorContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,2 @@
1
+ import { type CommandDefinition } from '../../framework/CommandDefinition.js';
2
+ export declare const command: CommandDefinition;
@@ -0,0 +1,24 @@
1
+ import { type InitInput } from './spec.js';
2
+ import { type UserInterface } from '../../framework/UserInterface.js';
3
+ import { type GcloudService } from '../../services/gcloud/spec.js';
4
+ import { type McpConfigService } from '../../services/mcp-config/spec.js';
5
+ import { type ProjectService } from '../../services/project/spec.js';
6
+ import { type StitchService } from '../../services/stitch/spec.js';
7
+ import { type McpClient } from '../../ui/wizard.js';
8
+ export interface InitContext {
9
+ input: InitInput;
10
+ ui: UserInterface;
11
+ gcloudService: GcloudService;
12
+ mcpConfigService: McpConfigService;
13
+ projectService: ProjectService;
14
+ stitchService: StitchService;
15
+ mcpClient?: McpClient;
16
+ authMode?: 'apiKey' | 'oauth';
17
+ apiKey?: string;
18
+ accessToken?: string;
19
+ projectId?: string;
20
+ transport?: 'http' | 'stdio';
21
+ authAccount?: string;
22
+ instructions?: string;
23
+ finalConfig?: string;
24
+ }
@@ -0,0 +1,19 @@
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
+ import { type UserInterface } from '../../framework/UserInterface.js';
7
+ export declare class InitHandler implements InitCommand {
8
+ private readonly gcloudService;
9
+ private readonly mcpConfigService;
10
+ private readonly projectService;
11
+ private readonly stitchService;
12
+ private readonly ui;
13
+ private checklist;
14
+ private steps;
15
+ constructor(gcloudService?: GcloudService, mcpConfigService?: McpConfigService, projectService?: ProjectService, stitchService?: StitchService, ui?: UserInterface);
16
+ execute(input: InitInput): Promise<InitResult>;
17
+ private updateStep;
18
+ private printStepResult;
19
+ }
@@ -0,0 +1,91 @@
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
+ autoVerify: z.ZodDefault<z.ZodBoolean>;
6
+ client: z.ZodOptional<z.ZodString>;
7
+ transport: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ local: boolean;
10
+ defaults: boolean;
11
+ autoVerify: boolean;
12
+ client?: string | undefined;
13
+ transport?: string | undefined;
14
+ }, {
15
+ client?: string | undefined;
16
+ local?: boolean | undefined;
17
+ defaults?: boolean | undefined;
18
+ autoVerify?: boolean | undefined;
19
+ transport?: string | undefined;
20
+ }>;
21
+ export type InitInput = z.infer<typeof InitInputSchema>;
22
+ export declare const InitErrorCode: z.ZodEnum<["GCLOUD_SETUP_FAILED", "AUTH_FAILED", "PROJECT_SELECTION_FAILED", "API_CONFIG_FAILED", "CONFIG_GENERATION_FAILED", "USER_CANCELLED", "UNKNOWN_ERROR"]>;
23
+ export declare const InitSuccess: z.ZodObject<{
24
+ success: z.ZodLiteral<true>;
25
+ data: z.ZodObject<{
26
+ projectId: z.ZodString;
27
+ mcpConfig: z.ZodString;
28
+ instructions: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ projectId: string;
31
+ mcpConfig: string;
32
+ instructions: string;
33
+ }, {
34
+ projectId: string;
35
+ mcpConfig: string;
36
+ instructions: string;
37
+ }>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ success: true;
40
+ data: {
41
+ projectId: string;
42
+ mcpConfig: string;
43
+ instructions: string;
44
+ };
45
+ }, {
46
+ success: true;
47
+ data: {
48
+ projectId: string;
49
+ mcpConfig: string;
50
+ instructions: string;
51
+ };
52
+ }>;
53
+ export declare const InitFailure: z.ZodObject<{
54
+ success: z.ZodLiteral<false>;
55
+ error: z.ZodObject<{
56
+ code: z.ZodEnum<["GCLOUD_SETUP_FAILED", "AUTH_FAILED", "PROJECT_SELECTION_FAILED", "API_CONFIG_FAILED", "CONFIG_GENERATION_FAILED", "USER_CANCELLED", "UNKNOWN_ERROR"]>;
57
+ message: z.ZodString;
58
+ suggestion: z.ZodOptional<z.ZodString>;
59
+ recoverable: z.ZodBoolean;
60
+ }, "strip", z.ZodTypeAny, {
61
+ code: "UNKNOWN_ERROR" | "AUTH_FAILED" | "GCLOUD_SETUP_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED";
62
+ message: string;
63
+ recoverable: boolean;
64
+ suggestion?: string | undefined;
65
+ }, {
66
+ code: "UNKNOWN_ERROR" | "AUTH_FAILED" | "GCLOUD_SETUP_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED";
67
+ message: string;
68
+ recoverable: boolean;
69
+ suggestion?: string | undefined;
70
+ }>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ success: false;
73
+ error: {
74
+ code: "UNKNOWN_ERROR" | "AUTH_FAILED" | "GCLOUD_SETUP_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED";
75
+ message: string;
76
+ recoverable: boolean;
77
+ suggestion?: string | undefined;
78
+ };
79
+ }, {
80
+ success: false;
81
+ error: {
82
+ code: "UNKNOWN_ERROR" | "AUTH_FAILED" | "GCLOUD_SETUP_FAILED" | "PROJECT_SELECTION_FAILED" | "API_CONFIG_FAILED" | "CONFIG_GENERATION_FAILED" | "USER_CANCELLED";
83
+ message: string;
84
+ recoverable: boolean;
85
+ suggestion?: string | undefined;
86
+ };
87
+ }>;
88
+ export type InitResult = z.infer<typeof InitSuccess> | z.infer<typeof InitFailure>;
89
+ export interface InitCommand {
90
+ execute(input: InitInput): Promise<InitResult>;
91
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class AuthModeStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class AuthStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class ClientSelectionStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ private resolveMcpClient;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class ConfigStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ private setupGeminiExtension;
9
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class GcloudInstallStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class IamApiStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class ProjectSelectStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class TestConnectionStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type InitContext } from '../context.js';
3
+ export declare class TransportStep implements CommandStep<InitContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: InitContext): Promise<boolean>;
7
+ run(context: InitContext): Promise<StepResult>;
8
+ private resolveTransport;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { type CommandDefinition } from '../../framework/CommandDefinition.js';
2
+ export declare const command: CommandDefinition;
@@ -0,0 +1,12 @@
1
+ import { type LogoutInput } from './spec.js';
2
+ import { type UserInterface } from '../../framework/UserInterface.js';
3
+ import { type GcloudService } from '../../services/gcloud/spec.js';
4
+ export interface LogoutContext {
5
+ input: LogoutInput;
6
+ ui: UserInterface;
7
+ gcloudService: GcloudService;
8
+ gcloudPath?: string;
9
+ userRevoked: boolean;
10
+ adcRevoked: boolean;
11
+ configCleared: boolean;
12
+ }
@@ -0,0 +1,8 @@
1
+ import { type LogoutCommand, type LogoutInput, type LogoutResult } from './spec.js';
2
+ import { type GcloudService } from '../../services/gcloud/spec.js';
3
+ export declare class LogoutHandler implements LogoutCommand {
4
+ private readonly gcloudService;
5
+ private steps;
6
+ constructor(gcloudService?: GcloudService);
7
+ execute(input: LogoutInput): Promise<LogoutResult>;
8
+ }
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod';
2
+ export declare const LogoutInputSchema: z.ZodObject<{
3
+ force: z.ZodDefault<z.ZodBoolean>;
4
+ clearConfig: z.ZodDefault<z.ZodBoolean>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ force: boolean;
7
+ clearConfig: boolean;
8
+ }, {
9
+ force?: boolean | undefined;
10
+ clearConfig?: boolean | undefined;
11
+ }>;
12
+ export type LogoutInput = z.infer<typeof LogoutInputSchema>;
13
+ export declare const LogoutErrorCode: z.ZodEnum<["GCLOUD_NOT_FOUND", "REVOKE_FAILED", "CONFIG_CLEAR_FAILED", "UNKNOWN_ERROR"]>;
14
+ export declare const LogoutSuccess: z.ZodObject<{
15
+ success: z.ZodLiteral<true>;
16
+ data: z.ZodObject<{
17
+ userRevoked: z.ZodBoolean;
18
+ adcRevoked: z.ZodBoolean;
19
+ configCleared: z.ZodBoolean;
20
+ }, "strip", z.ZodTypeAny, {
21
+ userRevoked: boolean;
22
+ adcRevoked: boolean;
23
+ configCleared: boolean;
24
+ }, {
25
+ userRevoked: boolean;
26
+ adcRevoked: boolean;
27
+ configCleared: boolean;
28
+ }>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ success: true;
31
+ data: {
32
+ userRevoked: boolean;
33
+ adcRevoked: boolean;
34
+ configCleared: boolean;
35
+ };
36
+ }, {
37
+ success: true;
38
+ data: {
39
+ userRevoked: boolean;
40
+ adcRevoked: boolean;
41
+ configCleared: boolean;
42
+ };
43
+ }>;
44
+ export declare const LogoutFailure: z.ZodObject<{
45
+ success: z.ZodLiteral<false>;
46
+ error: z.ZodObject<{
47
+ code: z.ZodEnum<["GCLOUD_NOT_FOUND", "REVOKE_FAILED", "CONFIG_CLEAR_FAILED", "UNKNOWN_ERROR"]>;
48
+ message: z.ZodString;
49
+ recoverable: z.ZodBoolean;
50
+ }, "strip", z.ZodTypeAny, {
51
+ code: "UNKNOWN_ERROR" | "GCLOUD_NOT_FOUND" | "REVOKE_FAILED" | "CONFIG_CLEAR_FAILED";
52
+ message: string;
53
+ recoverable: boolean;
54
+ }, {
55
+ code: "UNKNOWN_ERROR" | "GCLOUD_NOT_FOUND" | "REVOKE_FAILED" | "CONFIG_CLEAR_FAILED";
56
+ message: string;
57
+ recoverable: boolean;
58
+ }>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ success: false;
61
+ error: {
62
+ code: "UNKNOWN_ERROR" | "GCLOUD_NOT_FOUND" | "REVOKE_FAILED" | "CONFIG_CLEAR_FAILED";
63
+ message: string;
64
+ recoverable: boolean;
65
+ };
66
+ }, {
67
+ success: false;
68
+ error: {
69
+ code: "UNKNOWN_ERROR" | "GCLOUD_NOT_FOUND" | "REVOKE_FAILED" | "CONFIG_CLEAR_FAILED";
70
+ message: string;
71
+ recoverable: boolean;
72
+ };
73
+ }>;
74
+ export type LogoutResult = z.infer<typeof LogoutSuccess> | z.infer<typeof LogoutFailure>;
75
+ export interface LogoutCommand {
76
+ execute(input: LogoutInput): Promise<LogoutResult>;
77
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type LogoutContext } from '../context.js';
3
+ export declare class ClearConfigStep implements CommandStep<LogoutContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: LogoutContext): Promise<boolean>;
7
+ run(context: LogoutContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type LogoutContext } from '../context.js';
3
+ export declare class PrepareStep implements CommandStep<LogoutContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: LogoutContext): Promise<boolean>;
7
+ run(context: LogoutContext): Promise<StepResult>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type LogoutContext } from '../context.js';
3
+ export declare class RevokeAdcStep implements CommandStep<LogoutContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: LogoutContext): Promise<boolean>;
7
+ run(context: LogoutContext): Promise<StepResult>;
8
+ private getEnvironment;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { type CommandStep, type StepResult } from '../../../framework/CommandStep.js';
2
+ import { type LogoutContext } from '../context.js';
3
+ export declare class RevokeUserStep implements CommandStep<LogoutContext> {
4
+ id: string;
5
+ name: string;
6
+ shouldRun(context: LogoutContext): Promise<boolean>;
7
+ run(context: LogoutContext): Promise<StepResult>;
8
+ private getEnvironment;
9
+ }
@@ -0,0 +1,2 @@
1
+ import { type CommandDefinition } from '../../framework/CommandDefinition.js';
2
+ export declare const command: CommandDefinition;
@@ -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,2 @@
1
+ import { type CommandDefinition } from '../framework/CommandDefinition.js';
2
+ export declare const commands: CommandDefinition[];
@@ -0,0 +1,16 @@
1
+ import type { StitchMCPClient } from '../../services/mcp-client/client.js';
2
+ interface Screen {
3
+ screenId: string;
4
+ title: string;
5
+ hasCode: boolean;
6
+ codeUrl: string | null;
7
+ hasImage: boolean;
8
+ }
9
+ interface ScreensViewProps {
10
+ projectId: string;
11
+ projectTitle: string;
12
+ screens: Screen[];
13
+ client: StitchMCPClient;
14
+ }
15
+ export declare function ScreensView({ projectId, projectTitle, screens, client }: ScreensViewProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ import { type CommandDefinition } from '../../framework/CommandDefinition.js';
2
+ export declare const command: CommandDefinition;