@vibetools/dokploy-mcp 1.0.0 → 1.2.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/README.md +20 -14
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.js +44 -11
- package/dist/tools/_database.js +25 -6
- package/dist/tools/_factory.d.ts +2 -0
- package/dist/tools/_factory.js +21 -4
- package/dist/tools/application.js +219 -82
- package/dist/tools/backup.js +30 -0
- package/dist/tools/compose.js +273 -35
- package/dist/tools/deployment.js +82 -2
- package/dist/tools/docker.js +62 -2
- package/dist/tools/domain.js +15 -2
- package/dist/tools/environment.d.ts +2 -0
- package/dist/tools/environment.js +104 -0
- package/dist/tools/git-provider.d.ts +2 -0
- package/dist/tools/git-provider.js +22 -0
- package/dist/tools/github.d.ts +2 -0
- package/dist/tools/github.js +66 -0
- package/dist/tools/gitlab.d.ts +2 -0
- package/dist/tools/gitlab.js +98 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/mariadb.js +1 -1
- package/dist/tools/mongo.js +2 -1
- package/dist/tools/mounts.js +53 -9
- package/dist/tools/mysql.js +1 -1
- package/dist/tools/notification.d.ts +2 -0
- package/dist/tools/notification.js +559 -0
- package/dist/tools/patch.d.ts +2 -0
- package/dist/tools/patch.js +179 -0
- package/dist/tools/postgres.js +1 -1
- package/dist/tools/preview-deployment.d.ts +2 -0
- package/dist/tools/preview-deployment.js +50 -0
- package/dist/tools/project.js +32 -1
- package/dist/tools/redis.js +1 -1
- package/dist/tools/rollback.d.ts +2 -0
- package/dist/tools/rollback.js +28 -0
- package/dist/tools/schedule.d.ts +2 -0
- package/dist/tools/schedule.js +92 -0
- package/dist/tools/server.d.ts +2 -0
- package/dist/tools/server.js +192 -0
- package/dist/tools/settings.js +251 -0
- package/dist/tools/ssh-key.d.ts +2 -0
- package/dist/tools/ssh-key.js +74 -0
- package/dist/tools/user.js +75 -2
- package/dist/tools/volume-backups.d.ts +2 -0
- package/dist/tools/volume-backups.js +96 -0
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const paginationLimit = z.number().min(1).max(100).optional().describe('Maximum number of results');
|
|
4
|
+
const paginationOffset = z.number().min(0).optional().describe('Number of results to skip');
|
|
5
|
+
const create = postTool({
|
|
6
|
+
name: 'dokploy_environment_create',
|
|
7
|
+
title: 'Create Environment',
|
|
8
|
+
description: 'Create a new environment inside a Dokploy project. Requires the project ID and environment name. Optionally set a description. Returns the created environment object.',
|
|
9
|
+
schema: z
|
|
10
|
+
.object({
|
|
11
|
+
name: z.string().min(1).describe('The environment name'),
|
|
12
|
+
description: z.string().optional().describe('Environment description'),
|
|
13
|
+
projectId: z.string().min(1).describe('The project ID'),
|
|
14
|
+
})
|
|
15
|
+
.strict(),
|
|
16
|
+
endpoint: '/environment.create',
|
|
17
|
+
});
|
|
18
|
+
const one = getTool({
|
|
19
|
+
name: 'dokploy_environment_one',
|
|
20
|
+
title: 'Get Environment',
|
|
21
|
+
description: 'Retrieve detailed information about a Dokploy environment by its ID. Returns the environment, services, and related project metadata.',
|
|
22
|
+
schema: z
|
|
23
|
+
.object({
|
|
24
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
25
|
+
})
|
|
26
|
+
.strict(),
|
|
27
|
+
endpoint: '/environment.one',
|
|
28
|
+
});
|
|
29
|
+
const byProjectId = getTool({
|
|
30
|
+
name: 'dokploy_environment_by_project_id',
|
|
31
|
+
title: 'List Environments by Project',
|
|
32
|
+
description: 'List all environments belonging to a Dokploy project. Requires the project ID. Returns the environments configured for that project.',
|
|
33
|
+
schema: z
|
|
34
|
+
.object({
|
|
35
|
+
projectId: z.string().min(1).describe('The project ID'),
|
|
36
|
+
})
|
|
37
|
+
.strict(),
|
|
38
|
+
endpoint: '/environment.byProjectId',
|
|
39
|
+
});
|
|
40
|
+
const remove = postTool({
|
|
41
|
+
name: 'dokploy_environment_remove',
|
|
42
|
+
title: 'Remove Environment',
|
|
43
|
+
description: 'Permanently remove a Dokploy environment. This action is destructive and may remove all services that belong to the environment. Requires the environment ID.',
|
|
44
|
+
schema: z
|
|
45
|
+
.object({
|
|
46
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
47
|
+
})
|
|
48
|
+
.strict(),
|
|
49
|
+
endpoint: '/environment.remove',
|
|
50
|
+
annotations: { destructiveHint: true },
|
|
51
|
+
});
|
|
52
|
+
const update = postTool({
|
|
53
|
+
name: 'dokploy_environment_update',
|
|
54
|
+
title: 'Update Environment',
|
|
55
|
+
description: 'Update an existing Dokploy environment. Requires the environment ID and accepts optional changes to the environment name, description, project assignment, and environment variables.',
|
|
56
|
+
schema: z
|
|
57
|
+
.object({
|
|
58
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
59
|
+
name: z.string().min(1).optional().describe('Environment name'),
|
|
60
|
+
description: z.string().optional().describe('Environment description'),
|
|
61
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
62
|
+
env: z.string().optional().describe('Environment variables'),
|
|
63
|
+
})
|
|
64
|
+
.strict(),
|
|
65
|
+
endpoint: '/environment.update',
|
|
66
|
+
});
|
|
67
|
+
const duplicate = postTool({
|
|
68
|
+
name: 'dokploy_environment_duplicate',
|
|
69
|
+
title: 'Duplicate Environment',
|
|
70
|
+
description: 'Duplicate an existing Dokploy environment. Requires the source environment ID and a name for the new environment. Optionally set a description.',
|
|
71
|
+
schema: z
|
|
72
|
+
.object({
|
|
73
|
+
environmentId: z.string().min(1).describe('The source environment ID'),
|
|
74
|
+
name: z.string().min(1).describe('The new environment name'),
|
|
75
|
+
description: z.string().optional().describe('New environment description'),
|
|
76
|
+
})
|
|
77
|
+
.strict(),
|
|
78
|
+
endpoint: '/environment.duplicate',
|
|
79
|
+
});
|
|
80
|
+
const search = getTool({
|
|
81
|
+
name: 'dokploy_environment_search',
|
|
82
|
+
title: 'Search Environments',
|
|
83
|
+
description: 'Search Dokploy environments by free text or field-specific filters. Supports pagination through limit and offset.',
|
|
84
|
+
schema: z
|
|
85
|
+
.object({
|
|
86
|
+
q: z.string().optional().describe('Free-text query'),
|
|
87
|
+
name: z.string().optional().describe('Environment name'),
|
|
88
|
+
description: z.string().optional().describe('Environment description'),
|
|
89
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
90
|
+
limit: paginationLimit,
|
|
91
|
+
offset: paginationOffset,
|
|
92
|
+
})
|
|
93
|
+
.strict(),
|
|
94
|
+
endpoint: '/environment.search',
|
|
95
|
+
});
|
|
96
|
+
export const environmentTools = [
|
|
97
|
+
create,
|
|
98
|
+
one,
|
|
99
|
+
byProjectId,
|
|
100
|
+
remove,
|
|
101
|
+
update,
|
|
102
|
+
duplicate,
|
|
103
|
+
search,
|
|
104
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const getAll = getTool({
|
|
4
|
+
name: 'dokploy_git_provider_get_all',
|
|
5
|
+
title: 'List Git Providers',
|
|
6
|
+
description: 'List all Git provider integrations available in Dokploy, including provider metadata and linked platform records.',
|
|
7
|
+
schema: z.object({}).strict(),
|
|
8
|
+
endpoint: '/gitProvider.getAll',
|
|
9
|
+
});
|
|
10
|
+
const remove = postTool({
|
|
11
|
+
name: 'dokploy_git_provider_remove',
|
|
12
|
+
title: 'Remove Git Provider',
|
|
13
|
+
description: 'Remove a Git provider integration from Dokploy. Requires the Git provider ID. This is a destructive action.',
|
|
14
|
+
schema: z
|
|
15
|
+
.object({
|
|
16
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
17
|
+
})
|
|
18
|
+
.strict(),
|
|
19
|
+
endpoint: '/gitProvider.remove',
|
|
20
|
+
annotations: { destructiveHint: true },
|
|
21
|
+
});
|
|
22
|
+
export const gitProviderTools = [getAll, remove];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const githubIdSchema = z.string().min(1).describe('GitHub provider ID');
|
|
4
|
+
const one = getTool({
|
|
5
|
+
name: 'dokploy_github_one',
|
|
6
|
+
title: 'Get GitHub Provider',
|
|
7
|
+
description: 'Retrieve a GitHub provider integration by its ID.',
|
|
8
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
9
|
+
endpoint: '/github.one',
|
|
10
|
+
});
|
|
11
|
+
const getGithubRepositories = getTool({
|
|
12
|
+
name: 'dokploy_github_get_github_repositories',
|
|
13
|
+
title: 'List GitHub Repositories',
|
|
14
|
+
description: 'List GitHub repositories available through a Dokploy GitHub provider integration. Requires the GitHub provider ID.',
|
|
15
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
16
|
+
endpoint: '/github.getGithubRepositories',
|
|
17
|
+
});
|
|
18
|
+
const getGithubBranches = getTool({
|
|
19
|
+
name: 'dokploy_github_get_github_branches',
|
|
20
|
+
title: 'List GitHub Branches',
|
|
21
|
+
description: 'List branches for a GitHub repository through Dokploy. Requires the repository name and owner. Optionally pass the GitHub provider ID.',
|
|
22
|
+
schema: z
|
|
23
|
+
.object({
|
|
24
|
+
repo: z.string().min(1).describe('Repository name'),
|
|
25
|
+
owner: z.string().min(1).describe('Repository owner'),
|
|
26
|
+
githubId: z.string().optional().describe('GitHub provider ID'),
|
|
27
|
+
})
|
|
28
|
+
.strict(),
|
|
29
|
+
endpoint: '/github.getGithubBranches',
|
|
30
|
+
});
|
|
31
|
+
const githubProviders = getTool({
|
|
32
|
+
name: 'dokploy_github_github_providers',
|
|
33
|
+
title: 'List GitHub Providers',
|
|
34
|
+
description: 'List GitHub provider integrations configured in Dokploy.',
|
|
35
|
+
schema: z.object({}).strict(),
|
|
36
|
+
endpoint: '/github.githubProviders',
|
|
37
|
+
});
|
|
38
|
+
const testConnection = postTool({
|
|
39
|
+
name: 'dokploy_github_test_connection',
|
|
40
|
+
title: 'Test GitHub Connection',
|
|
41
|
+
description: 'Test a Dokploy GitHub provider connection by its ID.',
|
|
42
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
43
|
+
endpoint: '/github.testConnection',
|
|
44
|
+
});
|
|
45
|
+
const update = postTool({
|
|
46
|
+
name: 'dokploy_github_update',
|
|
47
|
+
title: 'Update GitHub Provider',
|
|
48
|
+
description: 'Update a Dokploy GitHub provider integration. Requires the provider ID, display name, linked Git provider ID, and GitHub App name.',
|
|
49
|
+
schema: z
|
|
50
|
+
.object({
|
|
51
|
+
githubId: githubIdSchema,
|
|
52
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
53
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
54
|
+
githubAppName: z.string().min(1).describe('GitHub App name'),
|
|
55
|
+
})
|
|
56
|
+
.strict(),
|
|
57
|
+
endpoint: '/github.update',
|
|
58
|
+
});
|
|
59
|
+
export const githubTools = [
|
|
60
|
+
one,
|
|
61
|
+
getGithubRepositories,
|
|
62
|
+
getGithubBranches,
|
|
63
|
+
githubProviders,
|
|
64
|
+
testConnection,
|
|
65
|
+
update,
|
|
66
|
+
];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const nullableString = z.string().nullable().optional();
|
|
4
|
+
const gitlabIdSchema = z.string().min(1).describe('GitLab provider ID');
|
|
5
|
+
const create = postTool({
|
|
6
|
+
name: 'dokploy_gitlab_create',
|
|
7
|
+
title: 'Create GitLab Provider',
|
|
8
|
+
description: 'Create a new GitLab provider integration in Dokploy. Requires the auth ID, name, and GitLab URL. Additional OAuth and provider fields may also be supplied.',
|
|
9
|
+
schema: z
|
|
10
|
+
.object({
|
|
11
|
+
applicationId: z.string().optional().describe('Application ID'),
|
|
12
|
+
secret: z.string().optional().describe('OAuth client secret'),
|
|
13
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
14
|
+
gitProviderId: z.string().optional().describe('Git provider ID'),
|
|
15
|
+
redirectUri: z.string().optional().describe('OAuth redirect URI'),
|
|
16
|
+
authId: z.string().min(1).describe('Auth ID'),
|
|
17
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
18
|
+
gitlabUrl: z.string().min(1).describe('GitLab URL'),
|
|
19
|
+
gitlabInternalUrl: nullableString.describe('Internal GitLab URL'),
|
|
20
|
+
})
|
|
21
|
+
.strict(),
|
|
22
|
+
endpoint: '/gitlab.create',
|
|
23
|
+
});
|
|
24
|
+
const one = getTool({
|
|
25
|
+
name: 'dokploy_gitlab_one',
|
|
26
|
+
title: 'Get GitLab Provider',
|
|
27
|
+
description: 'Retrieve a GitLab provider integration by its ID.',
|
|
28
|
+
schema: z.object({ gitlabId: gitlabIdSchema }).strict(),
|
|
29
|
+
endpoint: '/gitlab.one',
|
|
30
|
+
});
|
|
31
|
+
const getGitlabRepositories = getTool({
|
|
32
|
+
name: 'dokploy_gitlab_get_gitlab_repositories',
|
|
33
|
+
title: 'List GitLab Repositories',
|
|
34
|
+
description: 'List repositories available through a Dokploy GitLab provider integration. Requires the GitLab provider ID.',
|
|
35
|
+
schema: z.object({ gitlabId: gitlabIdSchema }).strict(),
|
|
36
|
+
endpoint: '/gitlab.getGitlabRepositories',
|
|
37
|
+
});
|
|
38
|
+
const getGitlabBranches = getTool({
|
|
39
|
+
name: 'dokploy_gitlab_get_gitlab_branches',
|
|
40
|
+
title: 'List GitLab Branches',
|
|
41
|
+
description: 'List branches for a GitLab repository through Dokploy. Requires the owner and repository. Optionally pass the project numeric ID and GitLab provider ID.',
|
|
42
|
+
schema: z
|
|
43
|
+
.object({
|
|
44
|
+
id: z.number().optional().describe('GitLab project numeric ID'),
|
|
45
|
+
owner: z.string().describe('Repository owner'),
|
|
46
|
+
repo: z.string().describe('Repository name'),
|
|
47
|
+
gitlabId: z.string().optional().describe('GitLab provider ID'),
|
|
48
|
+
})
|
|
49
|
+
.strict(),
|
|
50
|
+
endpoint: '/gitlab.getGitlabBranches',
|
|
51
|
+
});
|
|
52
|
+
const gitlabProviders = getTool({
|
|
53
|
+
name: 'dokploy_gitlab_gitlab_providers',
|
|
54
|
+
title: 'List GitLab Providers',
|
|
55
|
+
description: 'List GitLab provider integrations configured in Dokploy.',
|
|
56
|
+
schema: z.object({}).strict(),
|
|
57
|
+
endpoint: '/gitlab.gitlabProviders',
|
|
58
|
+
});
|
|
59
|
+
const testConnection = postTool({
|
|
60
|
+
name: 'dokploy_gitlab_test_connection',
|
|
61
|
+
title: 'Test GitLab Connection',
|
|
62
|
+
description: 'Test a Dokploy GitLab provider integration. Requires the GitLab provider ID and optionally accepts the group name.',
|
|
63
|
+
schema: z
|
|
64
|
+
.object({
|
|
65
|
+
gitlabId: gitlabIdSchema,
|
|
66
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
67
|
+
})
|
|
68
|
+
.strict(),
|
|
69
|
+
endpoint: '/gitlab.testConnection',
|
|
70
|
+
});
|
|
71
|
+
const update = postTool({
|
|
72
|
+
name: 'dokploy_gitlab_update',
|
|
73
|
+
title: 'Update GitLab Provider',
|
|
74
|
+
description: 'Update a Dokploy GitLab provider integration. Requires the GitLab provider ID, display name, GitLab URL, and linked Git provider ID. Optional OAuth and group fields may also be supplied.',
|
|
75
|
+
schema: z
|
|
76
|
+
.object({
|
|
77
|
+
applicationId: z.string().optional().describe('Application ID'),
|
|
78
|
+
secret: z.string().optional().describe('OAuth client secret'),
|
|
79
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
80
|
+
redirectUri: z.string().optional().describe('OAuth redirect URI'),
|
|
81
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
82
|
+
gitlabId: gitlabIdSchema,
|
|
83
|
+
gitlabUrl: z.string().min(1).describe('GitLab URL'),
|
|
84
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
85
|
+
gitlabInternalUrl: nullableString.describe('Internal GitLab URL'),
|
|
86
|
+
})
|
|
87
|
+
.strict(),
|
|
88
|
+
endpoint: '/gitlab.update',
|
|
89
|
+
});
|
|
90
|
+
export const gitlabTools = [
|
|
91
|
+
create,
|
|
92
|
+
one,
|
|
93
|
+
getGitlabRepositories,
|
|
94
|
+
getGitlabBranches,
|
|
95
|
+
gitlabProviders,
|
|
96
|
+
testConnection,
|
|
97
|
+
update,
|
|
98
|
+
];
|
package/dist/tools/index.js
CHANGED
|
@@ -8,29 +8,48 @@ import { deploymentTools } from './deployment.js';
|
|
|
8
8
|
import { destinationTools } from './destination.js';
|
|
9
9
|
import { dockerTools } from './docker.js';
|
|
10
10
|
import { domainTools } from './domain.js';
|
|
11
|
+
import { environmentTools } from './environment.js';
|
|
12
|
+
import { gitProviderTools } from './git-provider.js';
|
|
13
|
+
import { githubTools } from './github.js';
|
|
14
|
+
import { gitlabTools } from './gitlab.js';
|
|
11
15
|
import { mariadbTools } from './mariadb.js';
|
|
12
16
|
import { mongoTools } from './mongo.js';
|
|
13
17
|
import { mountsTools } from './mounts.js';
|
|
14
18
|
import { mysqlTools } from './mysql.js';
|
|
19
|
+
import { notificationTools } from './notification.js';
|
|
20
|
+
import { patchTools } from './patch.js';
|
|
15
21
|
import { portTools } from './port.js';
|
|
16
22
|
import { postgresTools } from './postgres.js';
|
|
23
|
+
import { previewDeploymentTools } from './preview-deployment.js';
|
|
17
24
|
import { projectTools } from './project.js';
|
|
18
25
|
import { redirectsTools } from './redirects.js';
|
|
19
26
|
import { redisTools } from './redis.js';
|
|
20
27
|
import { registryTools } from './registry.js';
|
|
28
|
+
import { rollbackTools } from './rollback.js';
|
|
29
|
+
import { scheduleTools } from './schedule.js';
|
|
21
30
|
import { securityTools } from './security.js';
|
|
31
|
+
import { serverTools } from './server.js';
|
|
22
32
|
import { settingsTools } from './settings.js';
|
|
33
|
+
import { sshKeyTools } from './ssh-key.js';
|
|
23
34
|
import { userTools } from './user.js';
|
|
35
|
+
import { volumeBackupsTools } from './volume-backups.js';
|
|
24
36
|
export const allTools = [
|
|
25
37
|
...projectTools,
|
|
38
|
+
...environmentTools,
|
|
26
39
|
...applicationTools,
|
|
27
40
|
...composeTools,
|
|
28
41
|
...domainTools,
|
|
42
|
+
...patchTools,
|
|
29
43
|
...postgresTools,
|
|
44
|
+
...previewDeploymentTools,
|
|
30
45
|
...mysqlTools,
|
|
31
46
|
...mariadbTools,
|
|
32
47
|
...mongoTools,
|
|
33
48
|
...redisTools,
|
|
49
|
+
...notificationTools,
|
|
50
|
+
...rollbackTools,
|
|
51
|
+
...scheduleTools,
|
|
52
|
+
...volumeBackupsTools,
|
|
34
53
|
...deploymentTools,
|
|
35
54
|
...dockerTools,
|
|
36
55
|
...certificatesTools,
|
|
@@ -45,4 +64,9 @@ export const allTools = [
|
|
|
45
64
|
...settingsTools,
|
|
46
65
|
...adminTools,
|
|
47
66
|
...userTools,
|
|
67
|
+
...serverTools,
|
|
68
|
+
...sshKeyTools,
|
|
69
|
+
...gitProviderTools,
|
|
70
|
+
...githubTools,
|
|
71
|
+
...gitlabTools,
|
|
48
72
|
];
|
package/dist/tools/mariadb.js
CHANGED
|
@@ -9,6 +9,6 @@ export const mariadbTools = createDatabaseTools({
|
|
|
9
9
|
databaseName: z.string().min(1).describe('Name of the database to create'),
|
|
10
10
|
databaseUser: z.string().min(1).describe('Database user'),
|
|
11
11
|
databasePassword: z.string().min(1).describe('Database password'),
|
|
12
|
-
databaseRootPassword: z.string().min(1).describe('Root password for MariaDB'),
|
|
12
|
+
databaseRootPassword: z.string().min(1).optional().describe('Root password for MariaDB'),
|
|
13
13
|
}),
|
|
14
14
|
});
|
package/dist/tools/mongo.js
CHANGED
|
@@ -4,9 +4,10 @@ export const mongoTools = createDatabaseTools({
|
|
|
4
4
|
type: 'mongo',
|
|
5
5
|
idField: 'mongoId',
|
|
6
6
|
displayName: 'MongoDB',
|
|
7
|
-
defaultImage: 'mongo:
|
|
7
|
+
defaultImage: 'mongo:15',
|
|
8
8
|
createFields: z.object({
|
|
9
9
|
databaseUser: z.string().min(1).describe('Database user'),
|
|
10
10
|
databasePassword: z.string().min(1).describe('Database password'),
|
|
11
|
+
replicaSets: z.boolean().nullable().optional().describe('Whether replica sets are enabled'),
|
|
11
12
|
}),
|
|
12
13
|
});
|
package/dist/tools/mounts.js
CHANGED
|
@@ -13,6 +13,17 @@ const one = getTool({
|
|
|
13
13
|
schema: z.object({ mountId }).strict(),
|
|
14
14
|
endpoint: '/mounts.one',
|
|
15
15
|
});
|
|
16
|
+
const allNamedByApplicationId = getTool({
|
|
17
|
+
name: 'dokploy_mount_all_named_by_application_id',
|
|
18
|
+
title: 'List Named Mounts by Application',
|
|
19
|
+
description: 'List named mounts attached to a Dokploy application. Requires the application ID.',
|
|
20
|
+
schema: z
|
|
21
|
+
.object({
|
|
22
|
+
applicationId: z.string().min(1).describe('Application ID'),
|
|
23
|
+
})
|
|
24
|
+
.strict(),
|
|
25
|
+
endpoint: '/mounts.allNamedByApplicationId',
|
|
26
|
+
});
|
|
16
27
|
const create = postTool({
|
|
17
28
|
name: 'dokploy_mount_create',
|
|
18
29
|
title: 'Create Mount',
|
|
@@ -25,13 +36,13 @@ const create = postTool({
|
|
|
25
36
|
.min(1)
|
|
26
37
|
.describe('Path inside the container where the mount is attached'),
|
|
27
38
|
serviceId: z.string().min(1).describe('ID of the service to attach the mount to'),
|
|
28
|
-
hostPath: z.string().optional().describe('Host path for bind mounts'),
|
|
29
|
-
volumeName: z.string().optional().describe('Volume name for volume mounts'),
|
|
30
|
-
content: z.string().optional().describe('File content for file mounts'),
|
|
39
|
+
hostPath: z.string().nullable().optional().describe('Host path for bind mounts'),
|
|
40
|
+
volumeName: z.string().nullable().optional().describe('Volume name for volume mounts'),
|
|
41
|
+
content: z.string().nullable().optional().describe('File content for file mounts'),
|
|
42
|
+
filePath: z.string().nullable().optional().describe('File path for file mounts'),
|
|
31
43
|
serviceType: z
|
|
32
44
|
.enum(['application', 'postgres', 'mysql', 'mariadb', 'mongo', 'redis', 'compose'])
|
|
33
45
|
.optional()
|
|
34
|
-
.default('application')
|
|
35
46
|
.describe('Type of service the mount belongs to'),
|
|
36
47
|
})
|
|
37
48
|
.strict(),
|
|
@@ -45,14 +56,40 @@ const update = postTool({
|
|
|
45
56
|
.object({
|
|
46
57
|
mountId,
|
|
47
58
|
type: mountTypeEnum.optional().describe('New mount type'),
|
|
48
|
-
mountPath: z.string().optional().describe('New path inside the container'),
|
|
49
|
-
hostPath: z.string().optional().describe('New host path for bind mounts'),
|
|
50
|
-
volumeName: z.string().optional().describe('New volume name for volume mounts'),
|
|
51
|
-
|
|
59
|
+
mountPath: z.string().min(1).optional().describe('New path inside the container'),
|
|
60
|
+
hostPath: z.string().nullable().optional().describe('New host path for bind mounts'),
|
|
61
|
+
volumeName: z.string().nullable().optional().describe('New volume name for volume mounts'),
|
|
62
|
+
filePath: z.string().nullable().optional().describe('New file path for file mounts'),
|
|
63
|
+
content: z.string().nullable().optional().describe('New file content for file mounts'),
|
|
64
|
+
serviceType: z
|
|
65
|
+
.enum(['application', 'postgres', 'mysql', 'mariadb', 'mongo', 'redis', 'compose'])
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Type of service the mount belongs to'),
|
|
68
|
+
applicationId: z.string().nullable().optional().describe('Application ID'),
|
|
69
|
+
postgresId: z.string().nullable().optional().describe('Postgres ID'),
|
|
70
|
+
mariadbId: z.string().nullable().optional().describe('MariaDB ID'),
|
|
71
|
+
mongoId: z.string().nullable().optional().describe('MongoDB ID'),
|
|
72
|
+
mysqlId: z.string().nullable().optional().describe('MySQL ID'),
|
|
73
|
+
redisId: z.string().nullable().optional().describe('Redis ID'),
|
|
74
|
+
composeId: z.string().nullable().optional().describe('Compose ID'),
|
|
52
75
|
})
|
|
53
76
|
.strict(),
|
|
54
77
|
endpoint: '/mounts.update',
|
|
55
78
|
});
|
|
79
|
+
const listByServiceId = getTool({
|
|
80
|
+
name: 'dokploy_mount_list_by_service_id',
|
|
81
|
+
title: 'List Mounts by Service',
|
|
82
|
+
description: 'List mounts for a Dokploy service. Requires the service ID and the service type.',
|
|
83
|
+
schema: z
|
|
84
|
+
.object({
|
|
85
|
+
serviceId: z.string().min(1).describe('Service ID'),
|
|
86
|
+
serviceType: z
|
|
87
|
+
.enum(['application', 'postgres', 'mysql', 'mariadb', 'mongo', 'redis', 'compose'])
|
|
88
|
+
.describe('Service type'),
|
|
89
|
+
})
|
|
90
|
+
.strict(),
|
|
91
|
+
endpoint: '/mounts.listByServiceId',
|
|
92
|
+
});
|
|
56
93
|
const remove = postTool({
|
|
57
94
|
name: 'dokploy_mount_remove',
|
|
58
95
|
title: 'Remove Mount',
|
|
@@ -62,4 +99,11 @@ const remove = postTool({
|
|
|
62
99
|
annotations: { destructiveHint: true },
|
|
63
100
|
});
|
|
64
101
|
// ── export ───────────────────────────────────────────────────────────
|
|
65
|
-
export const mountsTools = [
|
|
102
|
+
export const mountsTools = [
|
|
103
|
+
one,
|
|
104
|
+
allNamedByApplicationId,
|
|
105
|
+
create,
|
|
106
|
+
update,
|
|
107
|
+
listByServiceId,
|
|
108
|
+
remove,
|
|
109
|
+
];
|
package/dist/tools/mysql.js
CHANGED
|
@@ -9,6 +9,6 @@ export const mysqlTools = createDatabaseTools({
|
|
|
9
9
|
databaseName: z.string().min(1).describe('Name of the database to create'),
|
|
10
10
|
databaseUser: z.string().min(1).describe('Database user'),
|
|
11
11
|
databasePassword: z.string().min(1).describe('Database password'),
|
|
12
|
-
databaseRootPassword: z.string().min(1).describe('Root password for MySQL'),
|
|
12
|
+
databaseRootPassword: z.string().min(1).optional().describe('Root password for MySQL'),
|
|
13
13
|
}),
|
|
14
14
|
});
|