@hubspot/cli 7.7.0-experimental.2 → 7.7.0-experimental.3

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 (37) hide show
  1. package/bin/cli.js +2 -2
  2. package/commands/project.js +0 -2
  3. package/commands/testAccount/create.d.ts +7 -0
  4. package/commands/testAccount/create.js +118 -0
  5. package/commands/testAccount/delete.d.ts +6 -0
  6. package/commands/testAccount/delete.js +42 -0
  7. package/commands/testAccount.d.ts +3 -0
  8. package/commands/testAccount.js +27 -0
  9. package/lang/en.d.ts +0 -51
  10. package/lang/en.js +0 -51
  11. package/lib/prompts/promptUtils.d.ts +1 -0
  12. package/lib/prompts/promptUtils.js +2 -0
  13. package/package.json +3 -6
  14. package/bin/hsmcp.d.ts +0 -2
  15. package/bin/hsmcp.js +0 -13
  16. package/commands/project/validate.d.ts +0 -4
  17. package/commands/project/validate.js +0 -53
  18. package/commands/setupMcp.d.ts +0 -8
  19. package/commands/setupMcp.js +0 -229
  20. package/mcp-server/index.d.ts +0 -1
  21. package/mcp-server/index.js +0 -17
  22. package/mcp-server/mcpLoader.d.ts +0 -5
  23. package/mcp-server/mcpLoader.js +0 -24
  24. package/mcp-server/tools/ExplainProjectStructureTool.d.ts +0 -33
  25. package/mcp-server/tools/ExplainProjectStructureTool.js +0 -266
  26. package/mcp-server/tools/GenerateAppComponentTool.d.ts +0 -99
  27. package/mcp-server/tools/GenerateAppComponentTool.js +0 -193
  28. package/mcp-server/tools/GenerateCardComponentTool.d.ts +0 -74
  29. package/mcp-server/tools/GenerateCardComponentTool.js +0 -146
  30. package/mcp-server/tools/GenerateProjectConfigTool.d.ts +0 -32
  31. package/mcp-server/tools/GenerateProjectConfigTool.js +0 -40
  32. package/mcp-server/tools/HubSpotCLIHelper.d.ts +0 -24
  33. package/mcp-server/tools/HubSpotCLIHelper.js +0 -110
  34. package/mcp-server/tools/UploadProjectTool.d.ts +0 -44
  35. package/mcp-server/tools/UploadProjectTool.js +0 -166
  36. package/mcp-server/tools/ValidateProjectTool.d.ts +0 -62
  37. package/mcp-server/tools/ValidateProjectTool.js +0 -336
@@ -1,193 +0,0 @@
1
- import { MCPTool } from 'mcp-framework';
2
- import { z } from 'zod';
3
- class GenerateAppComponentTool extends MCPTool {
4
- name = 'generateAppComponent';
5
- description = 'Generates an app component (top-level) with proper folder structure and hsmeta.json configuration file. Apps provide OAuth authentication that sub-components depend on.';
6
- schema = {
7
- appName: {
8
- type: z.string(),
9
- description: 'Name of the app (used for file naming and default display name)',
10
- },
11
- uid: {
12
- type: z.string(),
13
- description: 'Unique identifier for the app component (must be unique per-project)',
14
- },
15
- description: {
16
- type: z.string().optional(),
17
- description: "Description of the app. Defaults to 'A public app'",
18
- },
19
- displayName: {
20
- type: z.string().optional(),
21
- description: 'Display name of the app. Defaults to the appName',
22
- },
23
- distribution: {
24
- type: z.string().optional(),
25
- description: "Distribution type (one of 'marketplace' or 'private'). Defaults to 'marketplace'",
26
- },
27
- supportEmail: {
28
- type: z.string().optional(),
29
- description: "Support email address. Defaults to 'support@example.com'",
30
- },
31
- documentationUrl: {
32
- type: z.string().optional(),
33
- description: "Documentation URL. Defaults to 'https://example.com/docs'",
34
- },
35
- supportUrl: {
36
- type: z.string().optional(),
37
- description: "Support URL. Defaults to 'https://example.com/support'",
38
- },
39
- supportPhone: {
40
- type: z.string().optional(),
41
- description: "Support phone number. Defaults to '+18005555555'",
42
- },
43
- redirectUrls: {
44
- type: z.array(z.string()).optional(),
45
- description: "OAuth redirect URLs. Defaults to ['http://localhost:3000/oauth-callback']",
46
- },
47
- requiredScopes: {
48
- type: z.array(z.string()).optional(),
49
- description: 'Required OAuth scopes. Consider what sub-components you plan to add. Defaults to basic CRM contact scopes',
50
- },
51
- optionalScopes: {
52
- type: z.array(z.string()).optional(),
53
- description: 'Optional OAuth scopes. Defaults to empty array',
54
- },
55
- permittedFetchUrls: {
56
- type: z.array(z.string()).optional(),
57
- description: "URLs permitted for fetch requests. Defaults to ['https://api.example.com']",
58
- },
59
- plannedFeatures: {
60
- type: z.array(z.string()).optional(),
61
- description: "List of planned sub-components/features (e.g., 'cards', 'functions', 'webhooks'). Used to suggest appropriate OAuth scopes",
62
- },
63
- };
64
- async execute(input) {
65
- const { appName, uid, description = 'A public app', displayName = appName, distribution = 'marketplace', supportEmail = 'support@example.com', documentationUrl = 'https://example.com/docs', supportUrl = 'https://example.com/support', supportPhone = '+18005555555', redirectUrls = ['http://localhost:3000/oauth-callback'], requiredScopes = [
66
- 'crm.objects.contacts.read',
67
- 'crm.objects.contacts.write',
68
- ], optionalScopes = [], permittedFetchUrls = ['https://api.example.com'], plannedFeatures = [], } = input;
69
- // Generate the sanitized app name for file naming
70
- const sanitizedAppName = appName.toLowerCase().replace(/\s+/g, '-');
71
- const fileName = `${sanitizedAppName}-hsmeta.json`;
72
- const folderPath = 'src/app';
73
- const appConfig = {
74
- uid: uid,
75
- type: 'app',
76
- config: {
77
- description: description,
78
- name: displayName,
79
- distribution: distribution,
80
- auth: {
81
- type: 'oauth',
82
- redirectUrls: redirectUrls,
83
- requiredScopes: requiredScopes,
84
- optionalScopes: optionalScopes,
85
- conditionallyRequiredScopes: [],
86
- },
87
- permittedUrls: {
88
- fetch: permittedFetchUrls,
89
- iframe: [],
90
- img: [],
91
- },
92
- support: {
93
- supportEmail: supportEmail,
94
- documentationUrl: documentationUrl,
95
- supportUrl: supportUrl,
96
- supportPhone: supportPhone,
97
- },
98
- },
99
- };
100
- // Generate scope recommendations based on planned features
101
- const scopeRecommendations = this.generateScopeRecommendations(plannedFeatures);
102
- // Generate next steps guidance
103
- const nextSteps = this.generateNextSteps(plannedFeatures, folderPath);
104
- return {
105
- message: `Generated app component configuration for "${displayName}"`,
106
- config: JSON.stringify(appConfig, null, 2),
107
- folderPath: folderPath,
108
- fileName: fileName,
109
- fullPath: `${folderPath}/${fileName}`,
110
- architecture: {
111
- componentType: 'top-level',
112
- role: 'authentication-provider',
113
- singularComponent: true,
114
- dependents: "All sub-components (cards, functions, settings, etc.) will depend on this app's authentication",
115
- },
116
- scopeRecommendations: scopeRecommendations,
117
- nextSteps: nextSteps,
118
- instructions: [
119
- `Create the directory structure: ${folderPath}/`,
120
- `Place the configuration file at: ${folderPath}/${fileName}`,
121
- `This is a TOP-LEVEL component that provides OAuth authentication`,
122
- `Sub-components (features) will live within ${folderPath}/ and depend on this app's authentication`,
123
- `The app component uid: ${uid} must be unique within your project`,
124
- 'Consider what sub-components you plan to add and ensure sufficient OAuth scopes',
125
- 'Typically there is one app component per project (singular component)',
126
- ],
127
- };
128
- }
129
- generateScopeRecommendations(plannedFeatures) {
130
- const recommendations = [];
131
- if (plannedFeatures.length === 0) {
132
- return [
133
- 'Consider what sub-components you plan to add to determine required OAuth scopes',
134
- 'Cards typically need CRM object read access',
135
- 'Functions may need broader API access depending on functionality',
136
- 'Webhooks may need specific event subscription scopes',
137
- ];
138
- }
139
- const scopeMap = {
140
- cards: [
141
- 'Cards typically need: crm.objects.contacts.read, crm.objects.companies.read, crm.objects.deals.read',
142
- ],
143
- functions: [
144
- 'Functions may need: broader API access depending on functionality',
145
- 'Consider: crm.objects.*.read, crm.objects.*.write if manipulating CRM data',
146
- ],
147
- webhooks: [
148
- 'Webhooks may need: specific event subscription scopes',
149
- 'Consider: webhooks scope and relevant object scopes for events you want to receive',
150
- ],
151
- settings: [
152
- 'Settings typically need: minimal scopes, may inherit from other components',
153
- ],
154
- 'marketing-events': [
155
- 'Marketing events may need: marketing event creation and management scopes',
156
- ],
157
- 'timeline-events': [
158
- 'Timeline events may need: timeline read/write scopes for the relevant objects',
159
- ],
160
- 'workflow-actions': [
161
- 'Workflow actions may need: workflow and automation related scopes',
162
- ],
163
- };
164
- plannedFeatures.forEach(feature => {
165
- if (scopeMap[feature]) {
166
- recommendations.push(`For ${feature}: ${scopeMap[feature].join(', ')}`);
167
- }
168
- });
169
- return recommendations;
170
- }
171
- generateNextSteps(plannedFeatures, appPath) {
172
- const steps = [
173
- '1. Create the app component configuration file and directory structure',
174
- '2. Test OAuth flow and ensure authentication works correctly',
175
- '3. Add sub-components within the app directory as needed:',
176
- ];
177
- if (plannedFeatures.length > 0) {
178
- plannedFeatures.forEach(feature => {
179
- steps.push(` - ${appPath}/${feature}/`);
180
- });
181
- }
182
- else {
183
- steps.push(` - ${appPath}/cards/ (for UI cards)`);
184
- steps.push(` - ${appPath}/functions/ (for serverless functions)`);
185
- steps.push(` - ${appPath}/settings/ (for configuration UI)`);
186
- steps.push(` - ${appPath}/webhooks/ (for event handling)`);
187
- }
188
- steps.push("4. Ensure all sub-components can access required APIs with the app's OAuth scopes");
189
- steps.push('5. Test the complete application with all components integrated');
190
- return steps;
191
- }
192
- }
193
- export default GenerateAppComponentTool;
@@ -1,74 +0,0 @@
1
- import { MCPTool } from "mcp-framework";
2
- import { z } from "zod";
3
- interface GenerateCardComponentInput {
4
- cardName: string;
5
- uid: string;
6
- displayName?: string;
7
- location?: string;
8
- objectTypes?: string[];
9
- componentFileName?: string;
10
- }
11
- declare class GenerateCardComponentTool extends MCPTool<GenerateCardComponentInput> {
12
- name: string;
13
- description: string;
14
- schema: {
15
- cardName: {
16
- type: z.ZodString;
17
- description: string;
18
- };
19
- uid: {
20
- type: z.ZodString;
21
- description: string;
22
- };
23
- displayName: {
24
- type: z.ZodOptional<z.ZodString>;
25
- description: string;
26
- };
27
- location: {
28
- type: z.ZodOptional<z.ZodString>;
29
- description: string;
30
- };
31
- objectTypes: {
32
- type: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
33
- description: string;
34
- };
35
- componentFileName: {
36
- type: z.ZodOptional<z.ZodString>;
37
- description: string;
38
- };
39
- };
40
- execute(input: GenerateCardComponentInput): Promise<{
41
- message: string;
42
- files: {
43
- configuration: {
44
- path: string;
45
- content: string;
46
- description: string;
47
- };
48
- packageJson: {
49
- path: string;
50
- content: string;
51
- description: string;
52
- };
53
- reactComponent: {
54
- path: string;
55
- content: string;
56
- description: string;
57
- };
58
- };
59
- folderPath: string;
60
- architecture: {
61
- componentType: string;
62
- parentComponent: string;
63
- category: string;
64
- authenticationDependency: string;
65
- allowMultiple: boolean;
66
- technology: string;
67
- };
68
- instructions: string[];
69
- nextSteps: string[];
70
- developmentNotes: string[];
71
- }>;
72
- private toPascalCase;
73
- }
74
- export default GenerateCardComponentTool;
@@ -1,146 +0,0 @@
1
- import { MCPTool } from "mcp-framework";
2
- import { z } from "zod";
3
- class GenerateCardComponentTool extends MCPTool {
4
- name = "generateCardComponent";
5
- description = "Generates a complete card sub-component including configuration, package.json, and React JSX implementation. Cards live within apps and depend on app authentication.";
6
- schema = {
7
- cardName: {
8
- type: z.string(),
9
- description: "Name of the card (used for file naming and component names)",
10
- },
11
- uid: {
12
- type: z.string(),
13
- description: "Unique identifier for the card component (must be unique per-project)",
14
- },
15
- displayName: {
16
- type: z.string().optional(),
17
- description: "Display name of the card. Defaults to cardName",
18
- },
19
- location: {
20
- type: z.string().optional(),
21
- description: "Card location/placement. Defaults to 'crm.record.tab'",
22
- },
23
- objectTypes: {
24
- type: z.array(z.string()).optional(),
25
- description: "CRM object types this card should appear on (e.g., ['contacts', 'companies']). Defaults to ['contacts']",
26
- },
27
- componentFileName: {
28
- type: z.string().optional(),
29
- description: "Name for the React component file (without extension). Defaults to PascalCase of cardName",
30
- },
31
- };
32
- async execute(input) {
33
- const { cardName, uid, displayName = cardName, location = "crm.record.tab", objectTypes = ["contacts"], componentFileName = this.toPascalCase(cardName), } = input;
34
- // Generate the sanitized card name for file naming
35
- const sanitizedCardName = cardName.toLowerCase().replace(/\s+/g, "-");
36
- const configFileName = `${sanitizedCardName}-hsmeta.json`;
37
- const folderPath = "src/app/cards";
38
- const reactFileName = `${componentFileName}.jsx`;
39
- const entrypoint = `/app/cards/${reactFileName}`;
40
- // Card configuration
41
- const cardConfig = {
42
- uid: uid,
43
- type: "card",
44
- config: {
45
- name: displayName,
46
- location: location,
47
- entrypoint: entrypoint,
48
- objectTypes: objectTypes,
49
- },
50
- };
51
- // Package.json configuration
52
- const packageJson = {
53
- name: "hubspot-example-extension",
54
- version: "0.1.0",
55
- license: "MIT",
56
- dependencies: {
57
- "@hubspot/ui-extensions": "latest",
58
- react: "^18.2.0",
59
- },
60
- devDependencies: {
61
- typescript: "^5.3.3",
62
- },
63
- };
64
- // React component implementation
65
- const reactComponent = `import React from "react";
66
- import { Text } from "@hubspot/ui-extensions";
67
- import { hubspot } from "@hubspot/ui-extensions";
68
-
69
- hubspot.extend(() => <Extension />);
70
-
71
- const Extension = () => {
72
- return (
73
- <>
74
- <Text>
75
- ${displayName} - Displaying information for {objectTypes.join(', ')} records.
76
- </Text>
77
- </>
78
- );
79
- };
80
-
81
- export default Extension;`;
82
- return {
83
- message: `Generated complete card component "${displayName}" with React implementation`,
84
- files: {
85
- configuration: {
86
- path: `${folderPath}/${configFileName}`,
87
- content: JSON.stringify(cardConfig, null, 2),
88
- description: "Card component configuration",
89
- },
90
- packageJson: {
91
- path: `${folderPath}/package.json`,
92
- content: JSON.stringify(packageJson, null, 2),
93
- description: "NPM package dependencies",
94
- },
95
- reactComponent: {
96
- path: `${folderPath}/${reactFileName}`,
97
- content: reactComponent,
98
- description: "React JSX component implementation",
99
- },
100
- },
101
- folderPath: folderPath,
102
- architecture: {
103
- componentType: "sub-component",
104
- parentComponent: "app",
105
- category: "feature",
106
- authenticationDependency: "Inherits authentication from parent app - no additional scopes required",
107
- allowMultiple: true,
108
- technology: "React JSX with @hubspot/ui-extensions",
109
- },
110
- instructions: [
111
- `Create the directory structure: ${folderPath}/`,
112
- `Create configuration file: ${folderPath}/${configFileName}`,
113
- `Create package.json: ${folderPath}/package.json`,
114
- `Create React component: ${folderPath}/${reactFileName}`,
115
- `This is a SUB-COMPONENT that depends on the parent app's authentication`,
116
- `Card will appear on: ${objectTypes.join(", ")} records at location: ${location}`,
117
- `Card uid: ${uid} must be unique within your project`,
118
- "You can have multiple card components within the same app",
119
- "Cards inherit all authentication and permissions from their parent app",
120
- ],
121
- nextSteps: [
122
- "1. Ensure parent app component exists with appropriate OAuth scopes for your use case",
123
- "2. Create the card directory and all generated files",
124
- "3. Install dependencies by running npm install in the card directory",
125
- "4. Customize the React component implementation",
126
- "5. Test the card appears correctly on target object types",
127
- "6. Verify card can access needed HubSpot data through inherited app authentication",
128
- ],
129
- developmentNotes: [
130
- "Cards are React-based components using @hubspot/ui-extensions",
131
- "Use HubSpot UI components for consistent styling",
132
- "Cards can access HubSpot context and APIs through the UI extensions framework",
133
- "Entrypoint path is relative to the app directory",
134
- "Package.json defines React and HubSpot UI extension dependencies",
135
- "Cards inherit authentication from parent app - no separate OAuth configuration needed",
136
- ],
137
- };
138
- }
139
- toPascalCase(str) {
140
- return str
141
- .split(/[\s-_]+/)
142
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
143
- .join("");
144
- }
145
- }
146
- export default GenerateCardComponentTool;
@@ -1,32 +0,0 @@
1
- import { MCPTool } from "mcp-framework";
2
- import { z } from "zod";
3
- interface GenerateProjectConfigInput {
4
- projectName: string;
5
- srcDir?: string;
6
- platformVersion?: string;
7
- }
8
- declare class GenerateProjectConfigTool extends MCPTool<GenerateProjectConfigInput> {
9
- name: string;
10
- description: string;
11
- schema: {
12
- projectName: {
13
- type: z.ZodString;
14
- description: string;
15
- };
16
- srcDir: {
17
- type: z.ZodOptional<z.ZodString>;
18
- description: string;
19
- };
20
- platformVersion: {
21
- type: z.ZodOptional<z.ZodString>;
22
- description: string;
23
- };
24
- };
25
- execute(input: GenerateProjectConfigInput): Promise<{
26
- message: string;
27
- config: string;
28
- filename: string;
29
- instructions: string[];
30
- }>;
31
- }
32
- export default GenerateProjectConfigTool;
@@ -1,40 +0,0 @@
1
- import { MCPTool } from "mcp-framework";
2
- import { z } from "zod";
3
- class GenerateProjectConfigTool extends MCPTool {
4
- name = "generateProjectConfig";
5
- description = "Generates an hsproject.json configuration file for a developer project on the platform";
6
- schema = {
7
- projectName: {
8
- type: z.string(),
9
- description: "Name of the developer project",
10
- },
11
- srcDir: {
12
- type: z.string().optional(),
13
- description: "Directory that contains all project source code. Defaults to 'src'",
14
- },
15
- platformVersion: {
16
- type: z.string().optional(),
17
- description: "Version of the platform to use. Defaults to '2025.2'",
18
- },
19
- };
20
- async execute(input) {
21
- const { projectName, srcDir = "src", platformVersion = "2025.2" } = input;
22
- const hsprojectConfig = {
23
- name: projectName,
24
- srcDir: srcDir,
25
- platformVersion: platformVersion,
26
- };
27
- return {
28
- message: `Generated hsproject.json configuration for project "${projectName}"`,
29
- config: JSON.stringify(hsprojectConfig, null, 2),
30
- filename: "hsproject.json",
31
- instructions: [
32
- "Place this hsproject.json file in your project's root directory",
33
- "This file designates the folder as a developer project",
34
- `Source code should be placed in the '${srcDir}' directory`,
35
- `Project will use platform version ${platformVersion}`,
36
- ],
37
- };
38
- }
39
- }
40
- export default GenerateProjectConfigTool;
@@ -1,24 +0,0 @@
1
- interface CLICheckResult {
2
- isInstalled: boolean;
3
- version?: string;
4
- debugInfo?: {
5
- command: string;
6
- success: boolean;
7
- output: string;
8
- error?: string;
9
- env?: Record<string, string | undefined>;
10
- };
11
- }
12
- interface CommandResult {
13
- success: boolean;
14
- output: string;
15
- error?: string;
16
- }
17
- export declare class HubSpotCLIHelper {
18
- private execAsync;
19
- checkCLIInstallation(): Promise<CLICheckResult>;
20
- installCLI(): Promise<CommandResult>;
21
- runCommand(command: string): Promise<CommandResult>;
22
- runProjectCommand(command: string, projectPath?: string): Promise<CommandResult>;
23
- }
24
- export default HubSpotCLIHelper;
@@ -1,110 +0,0 @@
1
- import { exec } from 'child_process';
2
- import { promisify } from 'util';
3
- export class HubSpotCLIHelper {
4
- execAsync = promisify(exec);
5
- async checkCLIInstallation() {
6
- try {
7
- // Run hs --version to check if CLI is installed
8
- const result = await this.runCommand('hs --version');
9
- const debugInfo = {
10
- command: 'hs --version',
11
- success: result.success,
12
- output: result.output,
13
- error: result.error,
14
- env: {
15
- PATH: process.env.PATH,
16
- NODE_PATH: process.env.NODE_PATH,
17
- npm_config_prefix: process.env.npm_config_prefix,
18
- },
19
- };
20
- if (result.success) {
21
- // Parse version from output (typically like "@hubspot/cli/4.0.0 darwin-x64 node-v18.17.0")
22
- const versionMatch = result.output.match(/@hubspot\/cli\/(\d+\.\d+\.\d+)/);
23
- const version = versionMatch ? versionMatch[1] : result.output.trim();
24
- return {
25
- isInstalled: true,
26
- version: version,
27
- debugInfo,
28
- };
29
- }
30
- else {
31
- return {
32
- isInstalled: false,
33
- debugInfo,
34
- };
35
- }
36
- }
37
- catch (error) {
38
- return {
39
- isInstalled: false,
40
- debugInfo: {
41
- command: 'hs --version',
42
- success: false,
43
- output: '',
44
- error: error instanceof Error ? error.message : 'Unknown error',
45
- env: {
46
- PATH: process.env.PATH,
47
- NODE_PATH: process.env.NODE_PATH,
48
- npm_config_prefix: process.env.npm_config_prefix,
49
- },
50
- },
51
- };
52
- }
53
- }
54
- async installCLI() {
55
- try {
56
- return await this.runCommand('npm install -g @hubspot/cli');
57
- }
58
- catch (error) {
59
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
60
- return {
61
- success: false,
62
- output: '',
63
- error: errorMessage,
64
- };
65
- }
66
- }
67
- async runCommand(command) {
68
- try {
69
- // Use the same environment as the current process, including PATH
70
- const result = await this.execAsync(command, {
71
- env: process.env,
72
- shell: '/bin/bash',
73
- });
74
- return {
75
- success: true,
76
- output: result.stdout || result.stderr || '',
77
- };
78
- }
79
- catch (error) {
80
- // Command failed (e.g., command not found, non-zero exit code)
81
- const err = error;
82
- return {
83
- success: false,
84
- output: err.stdout || '',
85
- error: err.stderr || err.message || 'Command execution failed',
86
- };
87
- }
88
- }
89
- async runProjectCommand(command, projectPath = '.') {
90
- try {
91
- // Get absolute path to avoid any relative path issues
92
- const path = await import('path');
93
- const absoluteProjectPath = path.resolve(projectPath);
94
- // Add debugging information about directories
95
- const debugCommand = `echo "MCP Server CWD: $(pwd)" && echo "Project Path: ${absoluteProjectPath}" && ls -la "${absoluteProjectPath}" | head -5`;
96
- // Change to the project directory and run command
97
- const fullCommand = `cd "${absoluteProjectPath}" && ${debugCommand} && ${command}`;
98
- return await this.runCommand(fullCommand);
99
- }
100
- catch (error) {
101
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
102
- return {
103
- success: false,
104
- output: '',
105
- error: errorMessage,
106
- };
107
- }
108
- }
109
- }
110
- export default HubSpotCLIHelper;
@@ -1,44 +0,0 @@
1
- import { MCPTool } from 'mcp-framework';
2
- import { z } from 'zod';
3
- interface UploadProjectInput {
4
- projectPath?: string;
5
- accountId?: string;
6
- autoInstallCLI?: boolean;
7
- }
8
- interface UploadResponse {
9
- status: string;
10
- message: string;
11
- cliVersion?: string;
12
- uploadOutput?: string;
13
- accountId?: string;
14
- projectPath?: string;
15
- error?: string;
16
- troubleshooting?: string[];
17
- actions?: Array<{
18
- action: string;
19
- command: string;
20
- description: string;
21
- }>;
22
- nextSteps?: string[];
23
- }
24
- declare class UploadProjectTool extends MCPTool<UploadProjectInput> {
25
- name: string;
26
- description: string;
27
- private cliHelper;
28
- schema: {
29
- projectPath: {
30
- type: z.ZodOptional<z.ZodString>;
31
- description: string;
32
- };
33
- accountId: {
34
- type: z.ZodOptional<z.ZodString>;
35
- description: string;
36
- };
37
- autoInstallCLI: {
38
- type: z.ZodOptional<z.ZodBoolean>;
39
- description: string;
40
- };
41
- };
42
- execute(input: UploadProjectInput): Promise<UploadResponse>;
43
- }
44
- export default UploadProjectTool;