@hubspot/cli 7.10.0 → 7.11.0-beta.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.
- package/bin/cli.js +5 -4
- package/commands/__tests__/getStarted.test.js +10 -0
- package/commands/__tests__/project.test.js +3 -0
- package/commands/account/__tests__/rename.test.js +10 -3
- package/commands/account/auth.js +10 -14
- package/commands/account/clean.js +11 -19
- package/commands/account/createOverride.js +15 -11
- package/commands/account/info.js +8 -5
- package/commands/account/list.js +15 -19
- package/commands/account/remove.js +23 -22
- package/commands/account/removeOverride.js +6 -6
- package/commands/account/rename.js +2 -2
- package/commands/account/use.js +19 -8
- package/commands/app/__tests__/migrate.test.js +8 -4
- package/commands/app/migrate.js +2 -2
- package/commands/auth.js +18 -14
- package/commands/config/migrate.js +5 -5
- package/commands/customObject/createSchema.js +2 -3
- package/commands/customObject/updateSchema.js +2 -3
- package/commands/getStarted.js +2 -3
- package/commands/hubdb/__tests__/list.test.js +1 -0
- package/commands/hubdb/list.js +2 -2
- package/commands/init.js +36 -32
- package/commands/project/__tests__/deploy.test.js +16 -11
- package/commands/project/__tests__/devUnifiedFlow.test.js +6 -4
- package/commands/project/__tests__/lint.test.js +709 -0
- package/commands/project/__tests__/logs.test.js +4 -0
- package/commands/project/__tests__/validate.test.js +2 -2
- package/commands/project/cloneApp.js +2 -2
- package/commands/project/create.js +20 -14
- package/commands/project/deploy.js +2 -2
- package/commands/project/dev/deprecatedFlow.js +4 -5
- package/commands/project/dev/index.js +6 -3
- package/commands/project/dev/unifiedFlow.js +11 -6
- package/commands/project/lint.d.ts +6 -0
- package/commands/project/lint.js +178 -0
- package/commands/project/logs.js +2 -3
- package/commands/project/migrate.js +4 -13
- package/commands/project/profile/add.js +6 -7
- package/commands/project/profile/delete.js +2 -2
- package/commands/project/upload.js +2 -2
- package/commands/project/validate.js +2 -2
- package/commands/project.js +2 -0
- package/commands/sandbox/__tests__/create.test.js +14 -5
- package/commands/sandbox/create.js +4 -5
- package/commands/sandbox/delete.js +23 -20
- package/commands/testAccount/create.js +2 -2
- package/commands/testAccount/delete.js +9 -8
- package/lang/en.d.ts +54 -12
- package/lang/en.js +64 -16
- package/lib/__tests__/buildAccount.test.js +22 -30
- package/lib/__tests__/commonOpts.test.js +9 -13
- package/lib/__tests__/developerTestAccounts.test.js +29 -17
- package/lib/__tests__/importData.test.js +20 -10
- package/lib/__tests__/oauth.test.js +19 -8
- package/lib/__tests__/sandboxSync.test.js +33 -11
- package/lib/__tests__/sandboxes.test.js +30 -19
- package/lib/__tests__/usageTracking.test.js +10 -10
- package/lib/__tests__/validation.test.js +32 -32
- package/lib/accountTypes.d.ts +9 -9
- package/lib/accountTypes.js +2 -4
- package/lib/app/__tests__/migrate.test.js +15 -0
- package/lib/app/__tests__/migrate_legacy.test.js +9 -0
- package/lib/app/migrate_legacy.d.ts +2 -2
- package/lib/buildAccount.d.ts +4 -4
- package/lib/buildAccount.js +7 -14
- package/lib/commonOpts.js +3 -3
- package/lib/configMigrate.d.ts +2 -2
- package/lib/configMigrate.js +42 -18
- package/lib/configOptions.js +3 -2
- package/lib/developerTestAccounts.d.ts +3 -3
- package/lib/developerTestAccounts.js +4 -7
- package/lib/doctor/DiagnosticInfoBuilder.d.ts +1 -1
- package/lib/doctor/DiagnosticInfoBuilder.js +9 -6
- package/lib/doctor/Doctor.js +4 -3
- package/lib/doctor/__tests__/Diagnosis.test.js +4 -3
- package/lib/doctor/__tests__/DiagnosticInfoBuilder.test.js +17 -9
- package/lib/doctor/__tests__/Doctor.test.js +14 -0
- package/lib/errorHandlers/index.js +10 -7
- package/lib/importData.js +8 -7
- package/lib/links.js +5 -5
- package/lib/middleware/{__test__ → __tests__}/commandTargetingUtils.test.js +3 -3
- package/lib/middleware/{__test__ → __tests__}/configMiddleware.test.js +23 -22
- package/lib/middleware/{__test__ → __tests__}/gitMiddleware.test.js +9 -7
- package/lib/middleware/autoUpdateMiddleware.js +34 -23
- package/lib/middleware/commandTargetingUtils.js +3 -2
- package/lib/middleware/configMiddleware.d.ts +6 -1
- package/lib/middleware/configMiddleware.js +36 -15
- package/lib/middleware/fireAlarmMiddleware.js +4 -15
- package/lib/middleware/gitMiddleware.js +8 -4
- package/lib/oauth.d.ts +2 -2
- package/lib/oauth.js +8 -10
- package/lib/projects/__tests__/AppDevModeInterface.test.js +17 -6
- package/lib/projects/__tests__/DevServerManager.test.js +1 -0
- package/lib/projects/__tests__/LocalDevProcess.test.js +1 -0
- package/lib/projects/__tests__/components.test.js +2 -22
- package/lib/projects/__tests__/deploy.test.js +16 -13
- package/lib/projects/__tests__/uieLinting.test.js +640 -0
- package/lib/projects/add/__tests__/legacyAddComponent.test.js +1 -1
- package/lib/projects/add/__tests__/v2AddComponent.test.js +30 -4
- package/lib/projects/add/legacyAddComponent.js +1 -1
- package/lib/projects/add/v2AddComponent.js +16 -5
- package/lib/projects/components.d.ts +8 -1
- package/lib/projects/components.js +91 -8
- package/lib/projects/create/__tests__/v2.test.js +11 -0
- package/lib/projects/deploy.js +21 -8
- package/lib/projects/localDev/AppDevModeInterface.js +2 -2
- package/lib/projects/localDev/DevServerManager_DEPRECATED.js +11 -3
- package/lib/projects/localDev/LocalDevLogger.js +4 -4
- package/lib/projects/localDev/LocalDevManager_DEPRECATED.js +3 -3
- package/lib/projects/localDev/helpers/account.d.ts +10 -10
- package/lib/projects/localDev/helpers/account.js +6 -11
- package/lib/projects/localDev/helpers/process.js +5 -3
- package/lib/projects/uieLinting.d.ts +33 -0
- package/lib/projects/uieLinting.js +222 -0
- package/lib/projects/urls.js +5 -6
- package/lib/prompts/__tests__/downloadProjectPrompt.test.js +7 -5
- package/lib/prompts/accountNamePrompt.js +3 -3
- package/lib/prompts/accountsPrompt.d.ts +1 -1
- package/lib/prompts/accountsPrompt.js +6 -7
- package/lib/prompts/confirmImportDataPrompt.js +2 -2
- package/lib/prompts/downloadProjectPrompt.d.ts +1 -0
- package/lib/prompts/downloadProjectPrompt.js +5 -2
- package/lib/prompts/importDataTestAccountSelectPrompt.js +4 -5
- package/lib/prompts/personalAccessKeyPrompt.js +2 -2
- package/lib/prompts/projectDevTargetAccountPrompt.d.ts +3 -3
- package/lib/prompts/projectDevTargetAccountPrompt.js +5 -7
- package/lib/prompts/sandboxesPrompt.js +7 -8
- package/lib/prompts/setAsDefaultAccountPrompt.js +7 -6
- package/lib/sandboxSync.d.ts +2 -2
- package/lib/sandboxSync.js +3 -9
- package/lib/sandboxes.d.ts +4 -4
- package/lib/sandboxes.js +6 -11
- package/lib/serverlessLogs.js +2 -2
- package/lib/theme/__tests__/migrate.test.js +15 -0
- package/lib/ui/SpinniesManager.d.ts +5 -7
- package/lib/ui/SpinniesManager.js +9 -12
- package/lib/ui/__tests__/SpinniesManager.test.d.ts +1 -0
- package/lib/ui/__tests__/SpinniesManager.test.js +489 -0
- package/lib/ui/index.js +6 -3
- package/lib/usageTracking.js +15 -8
- package/lib/validation.js +13 -11
- package/mcp-server/tools/cms/HsCreateFunctionTool.js +4 -2
- package/mcp-server/tools/cms/HsCreateModuleTool.js +4 -2
- package/mcp-server/tools/cms/HsCreateTemplateTool.js +4 -2
- package/mcp-server/tools/cms/HsFunctionLogsTool.js +4 -2
- package/mcp-server/tools/cms/HsListFunctionsTool.js +3 -1
- package/mcp-server/tools/cms/HsListTool.js +3 -1
- package/mcp-server/tools/cms/__tests__/HsCreateFunctionTool.test.js +1 -0
- package/mcp-server/tools/index.js +4 -0
- package/mcp-server/tools/project/AddFeatureToProjectTool.js +4 -2
- package/mcp-server/tools/project/CreateProjectTool.js +4 -2
- package/mcp-server/tools/project/CreateTestAccountTool.js +17 -7
- package/mcp-server/tools/project/DeployProjectTool.js +3 -1
- package/mcp-server/tools/project/DocFetchTool.js +6 -4
- package/mcp-server/tools/project/DocsSearchTool.d.ts +1 -1
- package/mcp-server/tools/project/DocsSearchTool.js +10 -8
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.d.ts +1 -1
- package/mcp-server/tools/project/GetApiUsagePatternsByAppIdTool.js +9 -7
- package/mcp-server/tools/project/GetApplicationInfoTool.js +8 -6
- package/mcp-server/tools/project/GetBuildLogsTool.d.ts +26 -0
- package/mcp-server/tools/project/GetBuildLogsTool.js +125 -0
- package/mcp-server/tools/project/GetBuildStatusTool.d.ts +26 -0
- package/mcp-server/tools/project/GetBuildStatusTool.js +166 -0
- package/mcp-server/tools/project/GetConfigValuesTool.d.ts +1 -1
- package/mcp-server/tools/project/GetConfigValuesTool.js +9 -7
- package/mcp-server/tools/project/GuidedWalkthroughTool.d.ts +1 -1
- package/mcp-server/tools/project/GuidedWalkthroughTool.js +5 -3
- package/mcp-server/tools/project/UploadProjectTools.js +3 -1
- package/mcp-server/tools/project/ValidateProjectTool.js +4 -2
- package/mcp-server/tools/project/__tests__/CreateTestAccountTool.test.js +12 -2
- package/mcp-server/tools/project/__tests__/DocFetchTool.test.js +5 -1
- package/mcp-server/tools/project/__tests__/DocsSearchTool.test.js +23 -11
- package/mcp-server/tools/project/__tests__/GetApiUsagePatternsByAppIdTool.test.js +7 -5
- package/mcp-server/tools/project/__tests__/GetApplicationInfoTool.test.js +7 -5
- package/mcp-server/tools/project/__tests__/GetBuildLogsTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/GetBuildLogsTool.test.js +305 -0
- package/mcp-server/tools/project/__tests__/GetBuildStatusTool.test.d.ts +1 -0
- package/mcp-server/tools/project/__tests__/GetBuildStatusTool.test.js +240 -0
- package/mcp-server/tools/project/__tests__/GetConfigValuesTool.test.js +8 -6
- package/mcp-server/utils/__tests__/content.test.js +21 -20
- package/mcp-server/utils/__tests__/feedbackTracking.test.js +34 -28
- package/mcp-server/utils/config.d.ts +1 -0
- package/mcp-server/utils/config.js +10 -0
- package/mcp-server/utils/content.d.ts +1 -1
- package/mcp-server/utils/content.js +2 -2
- package/mcp-server/utils/feedbackTracking.d.ts +1 -1
- package/mcp-server/utils/feedbackTracking.js +3 -3
- package/mcp-server/utils/toolUsageTracking.js +4 -3
- package/package.json +9 -9
- package/ui/components/BoxWithTitle.d.ts +2 -1
- package/ui/components/BoxWithTitle.js +2 -2
- package/ui/components/StatusMessageBoxes.d.ts +5 -4
- package/ui/components/StatusMessageBoxes.js +8 -8
- package/lib/middleware/__test__/notificationsMiddleware.test.js +0 -8
- package/lib/middleware/notificationsMiddleware.d.ts +0 -1
- package/lib/middleware/notificationsMiddleware.js +0 -28
- package/lib/ui/boxen.d.ts +0 -5
- package/lib/ui/boxen.js +0 -26
- package/mcp-server/utils/__tests__/cliConfig.test.js +0 -110
- package/mcp-server/utils/cliConfig.d.ts +0 -1
- package/mcp-server/utils/cliConfig.js +0 -12
- /package/{lib/middleware/__test__/commandTargetingUtils.test.d.ts → commands/project/__tests__/lint.test.d.ts} +0 -0
- /package/lib/middleware/{__test__/configMiddleware.test.d.ts → __tests__/commandTargetingUtils.test.d.ts} +0 -0
- /package/lib/middleware/{__test__/gitMiddleware.test.d.ts → __tests__/configMiddleware.test.d.ts} +0 -0
- /package/lib/middleware/{__test__/notificationsMiddleware.test.d.ts → __tests__/gitMiddleware.test.d.ts} +0 -0
- /package/lib/middleware/{__test__ → __tests__}/requestMiddleware.test.d.ts +0 -0
- /package/lib/middleware/{__test__ → __tests__}/requestMiddleware.test.js +0 -0
- /package/lib/middleware/{__test__ → __tests__}/yargsChecksMiddleware.test.d.ts +0 -0
- /package/lib/middleware/{__test__ → __tests__}/yargsChecksMiddleware.test.js +0 -0
- /package/{mcp-server/utils/__tests__/cliConfig.test.d.ts → lib/projects/__tests__/uieLinting.test.d.ts} +0 -0
|
@@ -6,6 +6,7 @@ import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
|
6
6
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
7
7
|
import { addFlag } from '../../utils/command.js';
|
|
8
8
|
import { HTTP_METHODS } from '../../../types/Cms.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
dest: z
|
|
@@ -37,6 +38,7 @@ export class HsCreateFunctionTool extends Tool {
|
|
|
37
38
|
super(mcpServer);
|
|
38
39
|
}
|
|
39
40
|
async handler({ dest, functionsFolder, filename, endpointMethod, endpointPath, absoluteCurrentWorkingDirectory, }) {
|
|
41
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
40
42
|
await trackToolUsage(toolName);
|
|
41
43
|
const content = [];
|
|
42
44
|
// Require functions folder
|
|
@@ -80,10 +82,10 @@ export class HsCreateFunctionTool extends Tool {
|
|
|
80
82
|
}
|
|
81
83
|
try {
|
|
82
84
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
83
|
-
return formatTextContents(
|
|
85
|
+
return formatTextContents(stdout, stderr);
|
|
84
86
|
}
|
|
85
87
|
catch (error) {
|
|
86
|
-
return formatTextContents(
|
|
88
|
+
return formatTextContents(error instanceof Error ? error.message : `${error}`);
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
register() {
|
|
@@ -6,6 +6,7 @@ import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
|
6
6
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
7
7
|
import { addFlag } from '../../utils/command.js';
|
|
8
8
|
import { CONTENT_TYPES } from '../../../types/Cms.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
userSuppliedName: z
|
|
@@ -53,6 +54,7 @@ export class HsCreateModuleTool extends Tool {
|
|
|
53
54
|
super(mcpServer);
|
|
54
55
|
}
|
|
55
56
|
async handler({ userSuppliedName, dest, moduleLabel, reactType, contentTypes, global, availableForNewContent, absoluteCurrentWorkingDirectory, }) {
|
|
57
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
56
58
|
await trackToolUsage(toolName);
|
|
57
59
|
const content = [];
|
|
58
60
|
// Always require a name
|
|
@@ -102,10 +104,10 @@ export class HsCreateModuleTool extends Tool {
|
|
|
102
104
|
}
|
|
103
105
|
try {
|
|
104
106
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
105
|
-
return formatTextContents(
|
|
107
|
+
return formatTextContents(stdout, stderr);
|
|
106
108
|
}
|
|
107
109
|
catch (error) {
|
|
108
|
-
return formatTextContents(
|
|
110
|
+
return formatTextContents(error instanceof Error ? error.message : `${error}`);
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
register() {
|
|
@@ -6,6 +6,7 @@ import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
|
6
6
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
7
7
|
import { addFlag } from '../../utils/command.js';
|
|
8
8
|
import { TEMPLATE_TYPES } from '../../../types/Cms.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
userSuppliedName: z
|
|
@@ -29,6 +30,7 @@ export class HsCreateTemplateTool extends Tool {
|
|
|
29
30
|
super(mcpServer);
|
|
30
31
|
}
|
|
31
32
|
async handler({ userSuppliedName, dest, templateType, absoluteCurrentWorkingDirectory, }) {
|
|
33
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
32
34
|
await trackToolUsage(toolName);
|
|
33
35
|
const content = [];
|
|
34
36
|
// Always require a name
|
|
@@ -59,10 +61,10 @@ export class HsCreateTemplateTool extends Tool {
|
|
|
59
61
|
}
|
|
60
62
|
try {
|
|
61
63
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
62
|
-
return formatTextContents(
|
|
64
|
+
return formatTextContents(stdout, stderr);
|
|
63
65
|
}
|
|
64
66
|
catch (error) {
|
|
65
|
-
return formatTextContents(
|
|
67
|
+
return formatTextContents(error instanceof Error ? error.message : `${error}`);
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
register() {
|
|
@@ -5,6 +5,7 @@ import { absoluteCurrentWorkingDirectory } from '../project/constants.js';
|
|
|
5
5
|
import { runCommandInDir } from '../../utils/project.js';
|
|
6
6
|
import { formatTextContents } from '../../utils/content.js';
|
|
7
7
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
8
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
8
9
|
const inputSchema = {
|
|
9
10
|
absoluteCurrentWorkingDirectory,
|
|
10
11
|
endpoint: z
|
|
@@ -32,6 +33,7 @@ export class HsFunctionLogsTool extends Tool {
|
|
|
32
33
|
super(mcpServer);
|
|
33
34
|
}
|
|
34
35
|
async handler({ endpoint, account, latest, compact, limit, absoluteCurrentWorkingDirectory, }) {
|
|
36
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
35
37
|
await trackToolUsage(toolName);
|
|
36
38
|
// Ensure endpoint doesn't start with '/'
|
|
37
39
|
const normalizedEndpoint = endpoint.startsWith('/')
|
|
@@ -52,11 +54,11 @@ export class HsFunctionLogsTool extends Tool {
|
|
|
52
54
|
}
|
|
53
55
|
try {
|
|
54
56
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
55
|
-
return formatTextContents(
|
|
57
|
+
return formatTextContents(stdout, stderr);
|
|
56
58
|
}
|
|
57
59
|
catch (error) {
|
|
58
60
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
59
|
-
return formatTextContents(
|
|
61
|
+
return formatTextContents(`Error executing hs logs command: ${errorMessage}`);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
register() {
|
|
@@ -5,6 +5,7 @@ import { absoluteCurrentWorkingDirectory } from '../project/constants.js';
|
|
|
5
5
|
import { runCommandInDir } from '../../utils/project.js';
|
|
6
6
|
import { formatTextContents } from '../../utils/content.js';
|
|
7
7
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
8
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
8
9
|
const inputSchema = {
|
|
9
10
|
absoluteCurrentWorkingDirectory,
|
|
10
11
|
account: z
|
|
@@ -24,6 +25,7 @@ export class HsListFunctionsTool extends Tool {
|
|
|
24
25
|
super(mcpServer);
|
|
25
26
|
}
|
|
26
27
|
async handler({ account, json, absoluteCurrentWorkingDirectory, }) {
|
|
28
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
27
29
|
await trackToolUsage(toolName);
|
|
28
30
|
let command = 'hs function list';
|
|
29
31
|
if (json) {
|
|
@@ -34,7 +36,7 @@ export class HsListFunctionsTool extends Tool {
|
|
|
34
36
|
}
|
|
35
37
|
try {
|
|
36
38
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
37
|
-
return formatTextContents(
|
|
39
|
+
return formatTextContents(stdout, stderr);
|
|
38
40
|
}
|
|
39
41
|
catch (error) {
|
|
40
42
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -5,6 +5,7 @@ import { absoluteCurrentWorkingDirectory } from '../project/constants.js';
|
|
|
5
5
|
import { runCommandInDir } from '../../utils/project.js';
|
|
6
6
|
import { formatTextContents } from '../../utils/content.js';
|
|
7
7
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
8
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
8
9
|
const inputSchema = {
|
|
9
10
|
absoluteCurrentWorkingDirectory,
|
|
10
11
|
path: z
|
|
@@ -24,6 +25,7 @@ export class HsListTool extends Tool {
|
|
|
24
25
|
super(mcpServer);
|
|
25
26
|
}
|
|
26
27
|
async handler({ path, account, absoluteCurrentWorkingDirectory, }) {
|
|
28
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
27
29
|
await trackToolUsage(toolName);
|
|
28
30
|
let command = 'hs list';
|
|
29
31
|
if (path) {
|
|
@@ -34,7 +36,7 @@ export class HsListTool extends Tool {
|
|
|
34
36
|
}
|
|
35
37
|
try {
|
|
36
38
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
37
|
-
return formatTextContents(
|
|
39
|
+
return formatTextContents(stdout, stderr);
|
|
38
40
|
}
|
|
39
41
|
catch (error) {
|
|
40
42
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -10,6 +10,7 @@ vi.mock('../../../utils/toolUsageTracking', () => ({
|
|
|
10
10
|
trackToolUsage: vi.fn(),
|
|
11
11
|
}));
|
|
12
12
|
vi.mock('../../../utils/feedbackTracking');
|
|
13
|
+
vi.mock('@hubspot/local-dev-lib/config');
|
|
13
14
|
const mockMcpFeedbackRequest = mcpFeedbackRequest;
|
|
14
15
|
const mockRunCommandInDir = runCommandInDir;
|
|
15
16
|
const mockAddFlag = addFlag;
|
|
@@ -9,6 +9,8 @@ import { DocsSearchTool } from './project/DocsSearchTool.js';
|
|
|
9
9
|
import { DocFetchTool } from './project/DocFetchTool.js';
|
|
10
10
|
import { GetApiUsagePatternsByAppIdTool } from './project/GetApiUsagePatternsByAppIdTool.js';
|
|
11
11
|
import { GetApplicationInfoTool } from './project/GetApplicationInfoTool.js';
|
|
12
|
+
import { GetBuildLogsTool } from './project/GetBuildLogsTool.js';
|
|
13
|
+
import { GetBuildStatusTool } from './project/GetBuildStatusTool.js';
|
|
12
14
|
import { HsListTool } from './cms/HsListTool.js';
|
|
13
15
|
import { HsCreateModuleTool } from './cms/HsCreateModuleTool.js';
|
|
14
16
|
import { HsCreateTemplateTool } from './cms/HsCreateTemplateTool.js';
|
|
@@ -30,6 +32,8 @@ export function registerProjectTools(mcpServer) {
|
|
|
30
32
|
new DocFetchTool(mcpServer).register(),
|
|
31
33
|
new GetApiUsagePatternsByAppIdTool(mcpServer).register(),
|
|
32
34
|
new GetApplicationInfoTool(mcpServer).register(),
|
|
35
|
+
new GetBuildLogsTool(mcpServer).register(),
|
|
36
|
+
new GetBuildStatusTool(mcpServer).register(),
|
|
33
37
|
];
|
|
34
38
|
}
|
|
35
39
|
export function registerCmsTools(mcpServer) {
|
|
@@ -6,6 +6,7 @@ import { absoluteCurrentWorkingDirectory, absoluteProjectPath, features, } from
|
|
|
6
6
|
import { runCommandInDir } from '../../utils/project.js';
|
|
7
7
|
import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
8
8
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteProjectPath,
|
|
11
12
|
absoluteCurrentWorkingDirectory,
|
|
@@ -36,6 +37,7 @@ export class AddFeatureToProjectTool extends Tool {
|
|
|
36
37
|
super(mcpServer);
|
|
37
38
|
}
|
|
38
39
|
async handler({ absoluteProjectPath, absoluteCurrentWorkingDirectory, distribution, auth, features, addApp, }) {
|
|
40
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
39
41
|
try {
|
|
40
42
|
await trackToolUsage(toolName);
|
|
41
43
|
let command = `hs project add`;
|
|
@@ -60,10 +62,10 @@ export class AddFeatureToProjectTool extends Tool {
|
|
|
60
62
|
// If features isn't provided, pass an empty array to bypass the prompt
|
|
61
63
|
command = addFlag(command, 'features', features || []);
|
|
62
64
|
const { stdout, stderr } = await runCommandInDir(absoluteProjectPath, command);
|
|
63
|
-
return formatTextContents(
|
|
65
|
+
return formatTextContents(stdout, stderr);
|
|
64
66
|
}
|
|
65
67
|
catch (error) {
|
|
66
|
-
return formatTextContents(
|
|
68
|
+
return formatTextContents(error instanceof Error ? error.message : `${error}`);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
register() {
|
|
@@ -6,6 +6,7 @@ import { absoluteCurrentWorkingDirectory, features } from './constants.js';
|
|
|
6
6
|
import { runCommandInDir } from '../../utils/project.js';
|
|
7
7
|
import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
8
8
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
name: z
|
|
@@ -41,6 +42,7 @@ export class CreateProjectTool extends Tool {
|
|
|
41
42
|
super(mcpServer);
|
|
42
43
|
}
|
|
43
44
|
async handler({ name, destination, projectBase, distribution, auth, features, absoluteCurrentWorkingDirectory, }) {
|
|
45
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
44
46
|
await trackToolUsage(toolName);
|
|
45
47
|
let command = addFlag('hs project create', 'platform-version', '2025.2');
|
|
46
48
|
const content = [];
|
|
@@ -77,10 +79,10 @@ export class CreateProjectTool extends Tool {
|
|
|
77
79
|
command = addFlag(command, 'features', features || []);
|
|
78
80
|
try {
|
|
79
81
|
const { stdout, stderr } = await runCommandInDir(absoluteCurrentWorkingDirectory, command);
|
|
80
|
-
return formatTextContents(
|
|
82
|
+
return formatTextContents(stdout, stderr);
|
|
81
83
|
}
|
|
82
84
|
catch (error) {
|
|
83
|
-
return formatTextContents(
|
|
85
|
+
return formatTextContents(error instanceof Error ? error.message : `${error}`);
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
register() {
|
|
@@ -6,8 +6,9 @@ import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
|
6
6
|
import { addFlag } from '../../utils/command.js';
|
|
7
7
|
import { runCommandInDir } from '../../utils/project.js';
|
|
8
8
|
import { ACCOUNT_LEVEL_CHOICES } from '../../../lib/constants.js';
|
|
9
|
-
import { getAccountIdFromCliConfig } from '../../utils/cliConfig.js';
|
|
10
9
|
import fs from 'fs';
|
|
10
|
+
import { getConfigAccountByName } from '@hubspot/local-dev-lib/config';
|
|
11
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
11
12
|
const inputSchema = {
|
|
12
13
|
absoluteCurrentWorkingDirectory,
|
|
13
14
|
configPath: z
|
|
@@ -61,6 +62,7 @@ export class CreateTestAccountTool extends Tool {
|
|
|
61
62
|
super(mcpServer);
|
|
62
63
|
}
|
|
63
64
|
async handler({ absoluteCurrentWorkingDirectory, name, description, marketingLevel, opsLevel, serviceLevel, salesLevel, contentLevel, configPath, }) {
|
|
65
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
64
66
|
await trackToolUsage(toolName);
|
|
65
67
|
let command = 'hs test-account create';
|
|
66
68
|
const content = [];
|
|
@@ -80,18 +82,26 @@ export class CreateTestAccountTool extends Tool {
|
|
|
80
82
|
};
|
|
81
83
|
}
|
|
82
84
|
if (configJson.accountName) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
try {
|
|
86
|
+
if (getConfigAccountByName(configJson.accountName)) {
|
|
87
|
+
content.push(formatTextContent(`The account name "${configJson.accountName}" already exists in the CLI config. Please use a different name.`));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
// nothing to do here
|
|
86
92
|
}
|
|
87
93
|
}
|
|
88
94
|
command = addFlag(command, 'config-path', configPath);
|
|
89
95
|
}
|
|
90
96
|
// Use flags if name is provided (when no config used)
|
|
91
97
|
else if (name) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
try {
|
|
99
|
+
if (getConfigAccountByName(name)) {
|
|
100
|
+
content.push(formatTextContent(`The account name "${name}" already exists in the CLI config. Please use a different name.`));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
// nothing to do here
|
|
95
105
|
}
|
|
96
106
|
command = addFlag(command, 'name', name);
|
|
97
107
|
command = addFlag(command, 'description', description || name);
|
|
@@ -5,6 +5,7 @@ import { absoluteCurrentWorkingDirectory, absoluteProjectPath, } from './constan
|
|
|
5
5
|
import { runCommandInDir } from '../../utils/project.js';
|
|
6
6
|
import { formatTextContents, formatTextContent } from '../../utils/content.js';
|
|
7
7
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
8
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
8
9
|
const inputSchema = {
|
|
9
10
|
absoluteProjectPath,
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
@@ -22,6 +23,7 @@ export class DeployProjectTool extends Tool {
|
|
|
22
23
|
super(mcpServer);
|
|
23
24
|
}
|
|
24
25
|
async handler({ absoluteProjectPath, absoluteCurrentWorkingDirectory, buildNumber, }) {
|
|
26
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
25
27
|
await trackToolUsage(toolName);
|
|
26
28
|
let command = `hs project deploy`;
|
|
27
29
|
const content = [];
|
|
@@ -38,7 +40,7 @@ export class DeployProjectTool extends Tool {
|
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
const { stdout, stderr } = await runCommandInDir(absoluteProjectPath, command);
|
|
41
|
-
return formatTextContents(
|
|
43
|
+
return formatTextContents(stdout, stderr);
|
|
42
44
|
}
|
|
43
45
|
register() {
|
|
44
46
|
return this.mcpServer.registerTool(toolName, {
|
|
@@ -5,6 +5,7 @@ import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
|
5
5
|
import { absoluteCurrentWorkingDirectory, docUrl } from './constants.js';
|
|
6
6
|
import { http } from '@hubspot/local-dev-lib/http/unauthed';
|
|
7
7
|
import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
|
|
8
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
8
9
|
const inputSchema = {
|
|
9
10
|
docUrl,
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
@@ -19,6 +20,7 @@ export class DocFetchTool extends Tool {
|
|
|
19
20
|
super(mcpServer);
|
|
20
21
|
}
|
|
21
22
|
async handler({ docUrl, absoluteCurrentWorkingDirectory, }) {
|
|
23
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
22
24
|
await trackToolUsage(toolName);
|
|
23
25
|
try {
|
|
24
26
|
// Append .md extension to the URL
|
|
@@ -28,16 +30,16 @@ export class DocFetchTool extends Tool {
|
|
|
28
30
|
});
|
|
29
31
|
const content = response.data;
|
|
30
32
|
if (!content || content.trim().length === 0) {
|
|
31
|
-
return formatTextContents(
|
|
33
|
+
return formatTextContents('Document is empty or contains no content.');
|
|
32
34
|
}
|
|
33
|
-
return formatTextContents(
|
|
35
|
+
return formatTextContents(content);
|
|
34
36
|
}
|
|
35
37
|
catch (error) {
|
|
36
38
|
if (isHubSpotHttpError(error)) {
|
|
37
|
-
return formatTextContents(
|
|
39
|
+
return formatTextContents(error.toString());
|
|
38
40
|
}
|
|
39
41
|
const errorMessage = `Error fetching documentation: ${error instanceof Error ? error.message : String(error)}`;
|
|
40
|
-
return formatTextContents(
|
|
42
|
+
return formatTextContents(errorMessage);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
register() {
|
|
@@ -23,7 +23,7 @@ export interface DocsSearchResponse {
|
|
|
23
23
|
type InputSchemaType = z.infer<typeof inputSchemaZodObject>;
|
|
24
24
|
export declare class DocsSearchTool extends Tool<InputSchemaType> {
|
|
25
25
|
constructor(mcpServer: McpServer);
|
|
26
|
-
handler({
|
|
26
|
+
handler({ docsSearchQuery, absoluteCurrentWorkingDirectory, }: InputSchemaType): Promise<TextContentResponse>;
|
|
27
27
|
register(): RegisteredTool;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
@@ -5,7 +5,8 @@ import { formatTextContents } from '../../utils/content.js';
|
|
|
5
5
|
import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
6
6
|
import { absoluteCurrentWorkingDirectory, docsSearchQuery, } from './constants.js';
|
|
7
7
|
import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
|
|
8
|
-
import {
|
|
8
|
+
import { getConfigDefaultAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
docsSearchQuery,
|
|
@@ -19,12 +20,13 @@ export class DocsSearchTool extends Tool {
|
|
|
19
20
|
constructor(mcpServer) {
|
|
20
21
|
super(mcpServer);
|
|
21
22
|
}
|
|
22
|
-
async handler({
|
|
23
|
+
async handler({ docsSearchQuery, absoluteCurrentWorkingDirectory, }) {
|
|
24
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
23
25
|
await trackToolUsage(toolName, { mode: docsSearchQuery });
|
|
24
|
-
const accountId =
|
|
26
|
+
const accountId = getConfigDefaultAccountIfExists()?.accountId;
|
|
25
27
|
if (!accountId) {
|
|
26
28
|
const authErrorMessage = `No account ID found. Please run \`hs account auth\` to configure an account, or set a default account with \`hs account use <account>\``;
|
|
27
|
-
return formatTextContents(
|
|
29
|
+
return formatTextContents(authErrorMessage);
|
|
28
30
|
}
|
|
29
31
|
try {
|
|
30
32
|
const response = await http.post(accountId, {
|
|
@@ -35,21 +37,21 @@ export class DocsSearchTool extends Tool {
|
|
|
35
37
|
});
|
|
36
38
|
const results = response.data.results;
|
|
37
39
|
if (!results || results.length === 0) {
|
|
38
|
-
return formatTextContents(
|
|
40
|
+
return formatTextContents('No documentation found for your query.');
|
|
39
41
|
}
|
|
40
42
|
const formattedResults = results
|
|
41
43
|
.map(result => `**${result.title}**\n${result.description}\nURL: ${result.url}\nScore: ${result.score}\n\n${result.content}\n---\n`)
|
|
42
44
|
.join('\n');
|
|
43
45
|
const successMessage = `Found ${results.length} documentation results:\n\n${formattedResults}`;
|
|
44
|
-
return formatTextContents(
|
|
46
|
+
return formatTextContents(successMessage);
|
|
45
47
|
}
|
|
46
48
|
catch (error) {
|
|
47
49
|
if (isHubSpotHttpError(error)) {
|
|
48
50
|
// Handle different status codes
|
|
49
|
-
return formatTextContents(
|
|
51
|
+
return formatTextContents(error.toString());
|
|
50
52
|
}
|
|
51
53
|
const errorMessage = `Error searching documentation: ${error instanceof Error ? error.message : String(error)}`;
|
|
52
|
-
return formatTextContents(
|
|
54
|
+
return formatTextContents(errorMessage);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
register() {
|
|
@@ -20,7 +20,7 @@ declare const inputSchemaZodObject: z.ZodObject<{
|
|
|
20
20
|
export type GetApiUsagePatternsByAppIdInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
21
|
export declare class GetApiUsagePatternsByAppIdTool extends Tool<GetApiUsagePatternsByAppIdInputSchema> {
|
|
22
22
|
constructor(mcpServer: McpServer);
|
|
23
|
-
handler({
|
|
23
|
+
handler({ appId, startDate, endDate, absoluteCurrentWorkingDirectory, }: GetApiUsagePatternsByAppIdInputSchema): Promise<TextContentResponse>;
|
|
24
24
|
register(): RegisteredTool;
|
|
25
25
|
}
|
|
26
26
|
export {};
|
|
@@ -4,8 +4,9 @@ import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
|
4
4
|
import { http } from '@hubspot/local-dev-lib/http';
|
|
5
5
|
import { formatTextContents } from '../../utils/content.js';
|
|
6
6
|
import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
|
|
7
|
-
import {
|
|
7
|
+
import { getConfigDefaultAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
8
8
|
import { absoluteCurrentWorkingDirectory } from './constants.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = {
|
|
10
11
|
absoluteCurrentWorkingDirectory,
|
|
11
12
|
appId: z
|
|
@@ -30,14 +31,15 @@ export class GetApiUsagePatternsByAppIdTool extends Tool {
|
|
|
30
31
|
constructor(mcpServer) {
|
|
31
32
|
super(mcpServer);
|
|
32
33
|
}
|
|
33
|
-
async handler({
|
|
34
|
+
async handler({ appId, startDate, endDate, absoluteCurrentWorkingDirectory, }) {
|
|
35
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
34
36
|
await trackToolUsage(toolName);
|
|
35
37
|
try {
|
|
36
38
|
// Get account ID from CLI config
|
|
37
|
-
const accountId =
|
|
39
|
+
const accountId = getConfigDefaultAccountIfExists()?.accountId;
|
|
38
40
|
if (!accountId) {
|
|
39
41
|
const authErrorMessage = `No account ID found. Please run \`hs account auth\` to configure an account, or set a default account with \`hs account use <account>\``;
|
|
40
|
-
return formatTextContents(
|
|
42
|
+
return formatTextContents(authErrorMessage);
|
|
41
43
|
}
|
|
42
44
|
const response = await http.get(accountId, {
|
|
43
45
|
url: `app/feature/utilization/public/v3/insights/app/${appId}/usage-patterns`,
|
|
@@ -49,15 +51,15 @@ export class GetApiUsagePatternsByAppIdTool extends Tool {
|
|
|
49
51
|
// Format the response for display
|
|
50
52
|
const { data } = response;
|
|
51
53
|
const formattedResult = JSON.stringify(data, null, 2);
|
|
52
|
-
return formatTextContents(
|
|
54
|
+
return formatTextContents(formattedResult);
|
|
53
55
|
}
|
|
54
56
|
catch (error) {
|
|
55
57
|
if (isHubSpotHttpError(error)) {
|
|
56
58
|
// Handle HubSpot-specific HTTP errors
|
|
57
|
-
return formatTextContents(
|
|
59
|
+
return formatTextContents(error.toString());
|
|
58
60
|
}
|
|
59
61
|
const errorMessage = `${error instanceof Error ? error.message : String(error)}`;
|
|
60
|
-
return formatTextContents(
|
|
62
|
+
return formatTextContents(errorMessage);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
register() {
|
|
@@ -4,8 +4,9 @@ import { trackToolUsage } from '../../utils/toolUsageTracking.js';
|
|
|
4
4
|
import { http } from '@hubspot/local-dev-lib/http';
|
|
5
5
|
import { formatTextContents } from '../../utils/content.js';
|
|
6
6
|
import { isHubSpotHttpError } from '@hubspot/local-dev-lib/errors/index';
|
|
7
|
-
import {
|
|
7
|
+
import { getConfigDefaultAccountIfExists } from '@hubspot/local-dev-lib/config';
|
|
8
8
|
import { absoluteCurrentWorkingDirectory } from './constants.js';
|
|
9
|
+
import { setupHubSpotConfig } from '../../utils/config.js';
|
|
9
10
|
const inputSchema = { absoluteCurrentWorkingDirectory };
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
12
|
const inputSchemaZodObject = z.object({ ...inputSchema });
|
|
@@ -15,13 +16,14 @@ export class GetApplicationInfoTool extends Tool {
|
|
|
15
16
|
super(mcpServer);
|
|
16
17
|
}
|
|
17
18
|
async handler({ absoluteCurrentWorkingDirectory, }) {
|
|
19
|
+
setupHubSpotConfig(absoluteCurrentWorkingDirectory);
|
|
18
20
|
await trackToolUsage(toolName);
|
|
19
21
|
try {
|
|
20
22
|
// Get account ID from CLI config
|
|
21
|
-
const accountId =
|
|
23
|
+
const accountId = getConfigDefaultAccountIfExists()?.accountId;
|
|
22
24
|
if (!accountId) {
|
|
23
25
|
const authErrorMessage = `No account ID found. Please run \`hs account auth\` to configure an account, or set a default account with \`hs account use <account>\``;
|
|
24
|
-
return formatTextContents(
|
|
26
|
+
return formatTextContents(authErrorMessage);
|
|
25
27
|
}
|
|
26
28
|
const response = await http.get(accountId, {
|
|
27
29
|
url: `app/feature/utilization/public/v3/insights/apps`,
|
|
@@ -29,15 +31,15 @@ export class GetApplicationInfoTool extends Tool {
|
|
|
29
31
|
// Format the response for display
|
|
30
32
|
const { data } = response;
|
|
31
33
|
const formattedResult = JSON.stringify(data, null, 2);
|
|
32
|
-
return formatTextContents(
|
|
34
|
+
return formatTextContents(formattedResult);
|
|
33
35
|
}
|
|
34
36
|
catch (error) {
|
|
35
37
|
if (isHubSpotHttpError(error)) {
|
|
36
38
|
// Handle HubSpot-specific HTTP errors
|
|
37
|
-
return formatTextContents(
|
|
39
|
+
return formatTextContents(error.toString());
|
|
38
40
|
}
|
|
39
41
|
const errorMessage = `${error instanceof Error ? error.message : String(error)}`;
|
|
40
|
-
return formatTextContents(
|
|
42
|
+
return formatTextContents(errorMessage);
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
register() {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TextContentResponse, Tool } from '../../types.js';
|
|
2
|
+
import { McpServer, RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
declare const inputSchemaZodObject: z.ZodObject<{
|
|
5
|
+
absoluteProjectPath: z.ZodString;
|
|
6
|
+
absoluteCurrentWorkingDirectory: z.ZodString;
|
|
7
|
+
buildId: z.ZodNumber;
|
|
8
|
+
logLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ERROR", "WARN", "INFO", "ALL"]>>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
buildId: number;
|
|
11
|
+
absoluteProjectPath: string;
|
|
12
|
+
absoluteCurrentWorkingDirectory: string;
|
|
13
|
+
logLevel: "ERROR" | "WARN" | "INFO" | "ALL";
|
|
14
|
+
}, {
|
|
15
|
+
buildId: number;
|
|
16
|
+
absoluteProjectPath: string;
|
|
17
|
+
absoluteCurrentWorkingDirectory: string;
|
|
18
|
+
logLevel?: "ERROR" | "WARN" | "INFO" | "ALL" | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type GetBuildLogsInputSchema = z.infer<typeof inputSchemaZodObject>;
|
|
21
|
+
export declare class GetBuildLogsTool extends Tool<GetBuildLogsInputSchema> {
|
|
22
|
+
constructor(mcpServer: McpServer);
|
|
23
|
+
handler({ absoluteProjectPath, absoluteCurrentWorkingDirectory, buildId, logLevel, }: GetBuildLogsInputSchema): Promise<TextContentResponse>;
|
|
24
|
+
register(): RegisteredTool;
|
|
25
|
+
}
|
|
26
|
+
export {};
|