@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
package/dist/tools/compose.js
CHANGED
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { getTool, postTool } from './_factory.js';
|
|
3
3
|
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
+
const appNameSchema = z
|
|
5
|
+
.string()
|
|
6
|
+
.min(1)
|
|
7
|
+
.max(63)
|
|
8
|
+
.regex(/^[a-zA-Z0-9._-]+$/)
|
|
9
|
+
.describe('Internal app name');
|
|
10
|
+
const nullableString = z.string().nullable().optional();
|
|
11
|
+
const nullableBoolean = z.boolean().nullable().optional();
|
|
12
|
+
const nullableNumber = z.number().nullable().optional();
|
|
13
|
+
const nullableStringArray = z.array(z.string()).nullable().optional();
|
|
4
14
|
const create = postTool({
|
|
5
15
|
name: 'dokploy_compose_create',
|
|
6
16
|
title: 'Create Compose Service',
|
|
7
|
-
description: 'Create a new Docker Compose service within
|
|
17
|
+
description: 'Create a new Docker Compose service within an environment. Requires a service name and environment ID. Optionally specify the compose type (docker-compose or stack), a custom app name, target server ID, and compose file content. Returns the newly created compose service object.',
|
|
8
18
|
schema: z
|
|
9
19
|
.object({
|
|
10
20
|
name: z.string().min(1).describe('The name of the compose service'),
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
environmentId: z
|
|
22
|
+
.string()
|
|
23
|
+
.min(1)
|
|
24
|
+
.describe('The environment ID to create the compose service in'),
|
|
25
|
+
description: nullableString.describe('Compose service description'),
|
|
13
26
|
composeType: z
|
|
14
27
|
.enum(['docker-compose', 'stack'])
|
|
15
28
|
.optional()
|
|
16
29
|
.describe('Compose type: docker-compose or stack'),
|
|
17
|
-
appName:
|
|
30
|
+
appName: appNameSchema.optional(),
|
|
18
31
|
serverId: z.string().nullable().optional().describe('Target server ID for deployment'),
|
|
32
|
+
composeFile: z.string().optional().describe('Compose file content'),
|
|
19
33
|
})
|
|
20
34
|
.strict(),
|
|
21
35
|
endpoint: '/compose.create',
|
|
@@ -39,33 +53,64 @@ const update = postTool({
|
|
|
39
53
|
.object({
|
|
40
54
|
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
41
55
|
name: z.string().optional().describe('Compose service name'),
|
|
42
|
-
appName:
|
|
43
|
-
description:
|
|
44
|
-
env:
|
|
45
|
-
composeFile: z.string().
|
|
56
|
+
appName: appNameSchema.optional(),
|
|
57
|
+
description: nullableString.describe('Service description'),
|
|
58
|
+
env: nullableString.describe('Environment variables'),
|
|
59
|
+
composeFile: z.string().optional().describe('Docker Compose file content'),
|
|
60
|
+
refreshToken: nullableString.describe('Webhook token'),
|
|
46
61
|
sourceType: z
|
|
47
|
-
.enum(['git', 'github', 'raw'])
|
|
62
|
+
.enum(['git', 'github', 'gitlab', 'bitbucket', 'gitea', 'raw'])
|
|
48
63
|
.optional()
|
|
49
64
|
.describe('Source type for the compose file'),
|
|
50
65
|
composeType: z
|
|
51
66
|
.enum(['docker-compose', 'stack'])
|
|
52
67
|
.optional()
|
|
53
68
|
.describe('Compose type: docker-compose or stack'),
|
|
54
|
-
repository:
|
|
55
|
-
owner:
|
|
56
|
-
branch:
|
|
57
|
-
autoDeploy:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
repository: nullableString.describe('Git repository name'),
|
|
70
|
+
owner: nullableString.describe('Git repository owner'),
|
|
71
|
+
branch: nullableString.describe('Git branch'),
|
|
72
|
+
autoDeploy: nullableBoolean.describe('Whether auto-deploy is enabled'),
|
|
73
|
+
gitlabProjectId: nullableNumber.describe('GitLab project ID'),
|
|
74
|
+
gitlabRepository: nullableString.describe('GitLab repository'),
|
|
75
|
+
gitlabOwner: nullableString.describe('GitLab owner'),
|
|
76
|
+
gitlabBranch: nullableString.describe('GitLab branch'),
|
|
77
|
+
gitlabPathNamespace: nullableString.describe('GitLab path namespace'),
|
|
78
|
+
bitbucketRepository: nullableString.describe('Bitbucket repository'),
|
|
79
|
+
bitbucketRepositorySlug: nullableString.describe('Bitbucket repository slug'),
|
|
80
|
+
bitbucketOwner: nullableString.describe('Bitbucket owner'),
|
|
81
|
+
bitbucketBranch: nullableString.describe('Bitbucket branch'),
|
|
82
|
+
giteaRepository: nullableString.describe('Gitea repository'),
|
|
83
|
+
giteaOwner: nullableString.describe('Gitea owner'),
|
|
84
|
+
giteaBranch: nullableString.describe('Gitea branch'),
|
|
85
|
+
customGitUrl: nullableString.describe('Custom Git repository URL'),
|
|
86
|
+
customGitBranch: nullableString.describe('Custom Git branch'),
|
|
87
|
+
customGitSSHKeyId: nullableString.describe('SSH key ID for custom Git authentication'),
|
|
88
|
+
command: z.string().optional().describe('Custom command override'),
|
|
89
|
+
enableSubmodules: z.boolean().optional().describe('Whether git submodules are enabled'),
|
|
90
|
+
composePath: z.string().optional().describe('Path to the compose file within the repo'),
|
|
91
|
+
suffix: z.string().optional().describe('Isolated deployment suffix'),
|
|
92
|
+
randomize: z.boolean().optional().describe('Whether to randomize service names'),
|
|
93
|
+
isolatedDeployment: z.boolean().optional().describe('Whether isolated deployment is enabled'),
|
|
94
|
+
isolatedDeploymentsVolume: z
|
|
95
|
+
.boolean()
|
|
96
|
+
.optional()
|
|
97
|
+
.describe('Whether isolated deployments get a dedicated volume'),
|
|
98
|
+
triggerType: z
|
|
99
|
+
.enum(['push', 'tag'])
|
|
62
100
|
.nullable()
|
|
63
101
|
.optional()
|
|
64
|
-
.describe('
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
102
|
+
.describe('Deployment trigger type'),
|
|
103
|
+
composeStatus: z
|
|
104
|
+
.enum(['idle', 'running', 'done', 'error'])
|
|
105
|
+
.optional()
|
|
106
|
+
.describe('Compose service status'),
|
|
107
|
+
environmentId: z.string().optional().describe('Environment ID'),
|
|
108
|
+
createdAt: z.string().optional().describe('Creation timestamp'),
|
|
109
|
+
watchPaths: nullableStringArray.describe('Paths to watch for deploy triggers'),
|
|
110
|
+
githubId: nullableString.describe('GitHub provider ID'),
|
|
111
|
+
gitlabId: nullableString.describe('GitLab provider ID'),
|
|
112
|
+
bitbucketId: nullableString.describe('Bitbucket provider ID'),
|
|
113
|
+
giteaId: nullableString.describe('Gitea provider ID'),
|
|
69
114
|
})
|
|
70
115
|
.strict(),
|
|
71
116
|
endpoint: '/compose.update',
|
|
@@ -77,6 +122,7 @@ const deleteCompose = postTool({
|
|
|
77
122
|
schema: z
|
|
78
123
|
.object({
|
|
79
124
|
composeId: z.string().min(1).describe('The unique compose service ID to delete'),
|
|
125
|
+
deleteVolumes: z.boolean().describe('Whether to delete attached volumes'),
|
|
80
126
|
})
|
|
81
127
|
.strict(),
|
|
82
128
|
endpoint: '/compose.delete',
|
|
@@ -89,6 +135,8 @@ const deploy = postTool({
|
|
|
89
135
|
schema: z
|
|
90
136
|
.object({
|
|
91
137
|
composeId: z.string().min(1).describe('The unique compose service ID to deploy'),
|
|
138
|
+
title: z.string().optional().describe('Optional deployment title'),
|
|
139
|
+
description: z.string().optional().describe('Optional deployment description'),
|
|
92
140
|
})
|
|
93
141
|
.strict(),
|
|
94
142
|
endpoint: '/compose.deploy',
|
|
@@ -100,6 +148,8 @@ const redeploy = postTool({
|
|
|
100
148
|
schema: z
|
|
101
149
|
.object({
|
|
102
150
|
composeId: z.string().min(1).describe('The unique compose service ID to redeploy'),
|
|
151
|
+
title: z.string().optional().describe('Optional deployment title'),
|
|
152
|
+
description: z.string().optional().describe('Optional deployment description'),
|
|
103
153
|
})
|
|
104
154
|
.strict(),
|
|
105
155
|
endpoint: '/compose.redeploy',
|
|
@@ -131,11 +181,11 @@ const cleanQueues = postTool({
|
|
|
131
181
|
const randomizeCompose = postTool({
|
|
132
182
|
name: 'dokploy_compose_randomize',
|
|
133
183
|
title: 'Randomize Compose Names',
|
|
134
|
-
description: 'Randomize the service names within a compose deployment to avoid naming conflicts. An optional
|
|
184
|
+
description: 'Randomize the service names within a compose deployment to avoid naming conflicts. An optional suffix can be provided to append to the randomized names. Requires the compose service ID. Returns the updated compose configuration.',
|
|
135
185
|
schema: z
|
|
136
186
|
.object({
|
|
137
187
|
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
138
|
-
|
|
188
|
+
suffix: z.string().optional().describe('Optional suffix for randomized names'),
|
|
139
189
|
})
|
|
140
190
|
.strict(),
|
|
141
191
|
endpoint: '/compose.randomizeCompose',
|
|
@@ -165,11 +215,13 @@ const refreshToken = postTool({
|
|
|
165
215
|
const deployTemplate = postTool({
|
|
166
216
|
name: 'dokploy_compose_deploy_template',
|
|
167
217
|
title: 'Deploy Compose Template',
|
|
168
|
-
description: 'Deploy a compose service from a predefined template. Templates provide pre-configured compose stacks for common applications. Requires
|
|
218
|
+
description: 'Deploy a compose service from a predefined template. Templates provide pre-configured compose stacks for common applications. Requires an environment ID and the template ID. Returns the created compose service with deployment status.',
|
|
169
219
|
schema: z
|
|
170
220
|
.object({
|
|
171
|
-
|
|
221
|
+
environmentId: z.string().min(1).describe('The environment ID to deploy the template in'),
|
|
222
|
+
serverId: z.string().optional().describe('Optional target server ID'),
|
|
172
223
|
id: z.string().min(1).describe('The template ID to deploy'),
|
|
224
|
+
baseUrl: z.string().optional().describe('Optional base URL used by the template'),
|
|
173
225
|
})
|
|
174
226
|
.strict(),
|
|
175
227
|
endpoint: '/compose.deployTemplate',
|
|
@@ -178,21 +230,193 @@ const templates = getTool({
|
|
|
178
230
|
name: 'dokploy_compose_templates',
|
|
179
231
|
title: 'List Compose Templates',
|
|
180
232
|
description: 'List all available compose templates that can be deployed. Templates are pre-configured Docker Compose stacks for popular applications and services. Returns an array of template objects with their IDs, names, and descriptions.',
|
|
181
|
-
schema: z
|
|
233
|
+
schema: z
|
|
234
|
+
.object({
|
|
235
|
+
baseUrl: z.string().optional().describe('Optional base URL'),
|
|
236
|
+
})
|
|
237
|
+
.strict(),
|
|
182
238
|
endpoint: '/compose.templates',
|
|
183
239
|
});
|
|
184
|
-
const
|
|
185
|
-
name: '
|
|
186
|
-
title: '
|
|
187
|
-
description: '
|
|
240
|
+
const start = postTool({
|
|
241
|
+
name: 'dokploy_compose_start',
|
|
242
|
+
title: 'Start Compose Service',
|
|
243
|
+
description: 'Start a previously stopped compose service in Dokploy. Requires the compose service ID.',
|
|
244
|
+
schema: z
|
|
245
|
+
.object({
|
|
246
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
247
|
+
})
|
|
248
|
+
.strict(),
|
|
249
|
+
endpoint: '/compose.start',
|
|
250
|
+
});
|
|
251
|
+
const move = postTool({
|
|
252
|
+
name: 'dokploy_compose_move',
|
|
253
|
+
title: 'Move Compose Service',
|
|
254
|
+
description: 'Move a compose service from its current environment to a different Dokploy environment. Requires the compose service ID and the target environment ID.',
|
|
255
|
+
schema: z
|
|
256
|
+
.object({
|
|
257
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
258
|
+
targetEnvironmentId: z.string().min(1).describe('The target environment ID'),
|
|
259
|
+
})
|
|
260
|
+
.strict(),
|
|
261
|
+
endpoint: '/compose.move',
|
|
262
|
+
});
|
|
263
|
+
const cancelDeployment = postTool({
|
|
264
|
+
name: 'dokploy_compose_cancel_deployment',
|
|
265
|
+
title: 'Cancel Compose Deployment',
|
|
266
|
+
description: 'Cancel an in-progress compose deployment in Dokploy. Requires the compose service ID.',
|
|
267
|
+
schema: z
|
|
268
|
+
.object({
|
|
269
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
270
|
+
})
|
|
271
|
+
.strict(),
|
|
272
|
+
endpoint: '/compose.cancelDeployment',
|
|
273
|
+
});
|
|
274
|
+
const killBuild = postTool({
|
|
275
|
+
name: 'dokploy_compose_kill_build',
|
|
276
|
+
title: 'Kill Compose Build',
|
|
277
|
+
description: 'Stop an in-progress compose build in Dokploy. Requires the compose service ID.',
|
|
278
|
+
schema: z
|
|
279
|
+
.object({
|
|
280
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
281
|
+
})
|
|
282
|
+
.strict(),
|
|
283
|
+
endpoint: '/compose.killBuild',
|
|
284
|
+
annotations: { destructiveHint: true },
|
|
285
|
+
});
|
|
286
|
+
const clearDeployments = postTool({
|
|
287
|
+
name: 'dokploy_compose_clear_deployments',
|
|
288
|
+
title: 'Clear Compose Deployments',
|
|
289
|
+
description: 'Clear stored deployment history for a compose service in Dokploy. Requires the compose service ID.',
|
|
290
|
+
schema: z
|
|
291
|
+
.object({
|
|
292
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
293
|
+
})
|
|
294
|
+
.strict(),
|
|
295
|
+
endpoint: '/compose.clearDeployments',
|
|
296
|
+
annotations: { destructiveHint: true },
|
|
297
|
+
});
|
|
298
|
+
const disconnectGitProvider = postTool({
|
|
299
|
+
name: 'dokploy_compose_disconnect_git_provider',
|
|
300
|
+
title: 'Disconnect Compose Git Provider',
|
|
301
|
+
description: 'Disconnect the linked Git provider from a compose service in Dokploy. Requires the compose service ID.',
|
|
302
|
+
schema: z
|
|
303
|
+
.object({
|
|
304
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
305
|
+
})
|
|
306
|
+
.strict(),
|
|
307
|
+
endpoint: '/compose.disconnectGitProvider',
|
|
308
|
+
annotations: { destructiveHint: true },
|
|
309
|
+
});
|
|
310
|
+
const search = getTool({
|
|
311
|
+
name: 'dokploy_compose_search',
|
|
312
|
+
title: 'Search Compose Services',
|
|
313
|
+
description: 'Search Dokploy compose services by free text or field-specific filters. Supports pagination through limit and offset.',
|
|
314
|
+
schema: z
|
|
315
|
+
.object({
|
|
316
|
+
q: z.string().optional().describe('Free-text query'),
|
|
317
|
+
name: z.string().optional().describe('Compose service name'),
|
|
318
|
+
appName: z.string().optional().describe('Internal app name'),
|
|
319
|
+
description: z.string().optional().describe('Compose service description'),
|
|
320
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
321
|
+
environmentId: z.string().optional().describe('Environment ID'),
|
|
322
|
+
limit: z.number().min(1).max(100).optional().describe('Maximum number of results'),
|
|
323
|
+
offset: z.number().min(0).optional().describe('Number of results to skip'),
|
|
324
|
+
})
|
|
325
|
+
.strict(),
|
|
326
|
+
endpoint: '/compose.search',
|
|
327
|
+
});
|
|
328
|
+
const loadServices = getTool({
|
|
329
|
+
name: 'dokploy_compose_load_services',
|
|
330
|
+
title: 'Load Compose Services',
|
|
331
|
+
description: 'Load parsed service definitions for a compose service. Requires the compose service ID and optionally accepts a cache strategy.',
|
|
332
|
+
schema: z
|
|
333
|
+
.object({
|
|
334
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
335
|
+
type: z.enum(['fetch', 'cache']).optional().describe('Load strategy'),
|
|
336
|
+
})
|
|
337
|
+
.strict(),
|
|
338
|
+
endpoint: '/compose.loadServices',
|
|
339
|
+
});
|
|
340
|
+
const loadMountsByService = getTool({
|
|
341
|
+
name: 'dokploy_compose_load_mounts_by_service',
|
|
342
|
+
title: 'Load Mounts by Compose Service',
|
|
343
|
+
description: 'Load compose mounts for a specific service inside a compose stack. Requires the compose service ID and service name.',
|
|
344
|
+
schema: z
|
|
345
|
+
.object({
|
|
346
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
347
|
+
serviceName: z.string().min(1).describe('Compose service name'),
|
|
348
|
+
})
|
|
349
|
+
.strict(),
|
|
350
|
+
endpoint: '/compose.loadMountsByService',
|
|
351
|
+
});
|
|
352
|
+
const fetchSourceType = postTool({
|
|
353
|
+
name: 'dokploy_compose_fetch_source_type',
|
|
354
|
+
title: 'Fetch Compose Source Type',
|
|
355
|
+
description: 'Fetch and resolve the effective source type for a compose service in Dokploy. Requires the compose service ID.',
|
|
356
|
+
schema: z
|
|
357
|
+
.object({
|
|
358
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
359
|
+
})
|
|
360
|
+
.strict(),
|
|
361
|
+
endpoint: '/compose.fetchSourceType',
|
|
362
|
+
});
|
|
363
|
+
const isolatedDeployment = postTool({
|
|
364
|
+
name: 'dokploy_compose_isolated_deployment',
|
|
365
|
+
title: 'Run Isolated Compose Deployment',
|
|
366
|
+
description: 'Create an isolated deployment variant for a compose service in Dokploy. Requires the compose service ID and optionally accepts a suffix.',
|
|
367
|
+
schema: z
|
|
368
|
+
.object({
|
|
369
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
370
|
+
suffix: z.string().optional().describe('Optional isolated deployment suffix'),
|
|
371
|
+
})
|
|
372
|
+
.strict(),
|
|
373
|
+
endpoint: '/compose.isolatedDeployment',
|
|
374
|
+
});
|
|
375
|
+
const getConvertedCompose = getTool({
|
|
376
|
+
name: 'dokploy_compose_get_converted_compose',
|
|
377
|
+
title: 'Get Converted Compose',
|
|
378
|
+
description: 'Retrieve the converted compose definition that Dokploy will deploy. Requires the compose service ID.',
|
|
379
|
+
schema: z
|
|
380
|
+
.object({
|
|
381
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
382
|
+
})
|
|
383
|
+
.strict(),
|
|
384
|
+
endpoint: '/compose.getConvertedCompose',
|
|
385
|
+
});
|
|
386
|
+
const getTags = getTool({
|
|
387
|
+
name: 'dokploy_compose_get_tags',
|
|
388
|
+
title: 'Get Compose Template Tags',
|
|
389
|
+
description: 'List available compose template tags. Optionally pass a base URL to target a specific template source.',
|
|
390
|
+
schema: z
|
|
391
|
+
.object({
|
|
392
|
+
baseUrl: z.string().optional().describe('Optional base URL'),
|
|
393
|
+
})
|
|
394
|
+
.strict(),
|
|
395
|
+
endpoint: '/compose.getTags',
|
|
396
|
+
});
|
|
397
|
+
const processTemplate = postTool({
|
|
398
|
+
name: 'dokploy_compose_process_template',
|
|
399
|
+
title: 'Process Compose Template',
|
|
400
|
+
description: 'Process a compose template payload for an existing compose service. Requires a base64 payload and the compose service ID.',
|
|
401
|
+
schema: z
|
|
402
|
+
.object({
|
|
403
|
+
base64: z.string().describe('Base64-encoded template payload'),
|
|
404
|
+
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
405
|
+
})
|
|
406
|
+
.strict(),
|
|
407
|
+
endpoint: '/compose.processTemplate',
|
|
408
|
+
});
|
|
409
|
+
const importCompose = postTool({
|
|
410
|
+
name: 'dokploy_compose_import',
|
|
411
|
+
title: 'Import Compose Definition',
|
|
412
|
+
description: 'Import a compose definition into an existing compose service. Requires a base64 payload and the compose service ID.',
|
|
188
413
|
schema: z
|
|
189
414
|
.object({
|
|
415
|
+
base64: z.string().describe('Base64-encoded compose payload'),
|
|
190
416
|
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
191
|
-
env: z.string().nullable().optional().describe('Environment variables'),
|
|
192
|
-
buildArgs: z.string().nullable().optional().describe('Docker build arguments'),
|
|
193
417
|
})
|
|
194
418
|
.strict(),
|
|
195
|
-
endpoint: '/compose.
|
|
419
|
+
endpoint: '/compose.import',
|
|
196
420
|
});
|
|
197
421
|
// ── export ───────────────────────────────────────────────────────────
|
|
198
422
|
export const composeTools = [
|
|
@@ -203,11 +427,25 @@ export const composeTools = [
|
|
|
203
427
|
deploy,
|
|
204
428
|
redeploy,
|
|
205
429
|
stop,
|
|
430
|
+
start,
|
|
431
|
+
move,
|
|
432
|
+
cancelDeployment,
|
|
433
|
+
killBuild,
|
|
434
|
+
clearDeployments,
|
|
435
|
+
disconnectGitProvider,
|
|
206
436
|
cleanQueues,
|
|
207
437
|
randomizeCompose,
|
|
438
|
+
search,
|
|
439
|
+
loadServices,
|
|
440
|
+
loadMountsByService,
|
|
441
|
+
fetchSourceType,
|
|
442
|
+
isolatedDeployment,
|
|
443
|
+
getConvertedCompose,
|
|
444
|
+
getTags,
|
|
445
|
+
processTemplate,
|
|
446
|
+
importCompose,
|
|
208
447
|
getDefaultCommand,
|
|
209
448
|
refreshToken,
|
|
210
449
|
deployTemplate,
|
|
211
450
|
templates,
|
|
212
|
-
saveEnvironment,
|
|
213
451
|
];
|
package/dist/tools/deployment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { getTool } from './_factory.js';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
3
|
// ── tools ────────────────────────────────────────────────────────────
|
|
4
4
|
const all = getTool({
|
|
5
5
|
name: 'dokploy_deployment_all',
|
|
@@ -23,5 +23,85 @@ const allByCompose = getTool({
|
|
|
23
23
|
.strict(),
|
|
24
24
|
endpoint: '/deployment.allByCompose',
|
|
25
25
|
});
|
|
26
|
+
const allByServer = getTool({
|
|
27
|
+
name: 'dokploy_deployment_all_by_server',
|
|
28
|
+
title: 'List Server Deployments',
|
|
29
|
+
description: 'List all deployment records associated with a specific Dokploy server. Requires the server ID.',
|
|
30
|
+
schema: z
|
|
31
|
+
.object({
|
|
32
|
+
serverId: z.string().min(1).describe('The unique server ID'),
|
|
33
|
+
})
|
|
34
|
+
.strict(),
|
|
35
|
+
endpoint: '/deployment.allByServer',
|
|
36
|
+
});
|
|
37
|
+
const allCentralized = getTool({
|
|
38
|
+
name: 'dokploy_deployment_all_centralized',
|
|
39
|
+
title: 'List Centralized Deployments',
|
|
40
|
+
description: 'List centralized deployments in Dokploy across supported entity types.',
|
|
41
|
+
schema: z.object({}).strict(),
|
|
42
|
+
endpoint: '/deployment.allCentralized',
|
|
43
|
+
});
|
|
44
|
+
const queueList = getTool({
|
|
45
|
+
name: 'dokploy_deployment_queue_list',
|
|
46
|
+
title: 'List Deployment Queue',
|
|
47
|
+
description: 'List queued deployment jobs in Dokploy.',
|
|
48
|
+
schema: z.object({}).strict(),
|
|
49
|
+
endpoint: '/deployment.queueList',
|
|
50
|
+
});
|
|
51
|
+
const allByType = getTool({
|
|
52
|
+
name: 'dokploy_deployment_all_by_type',
|
|
53
|
+
title: 'List Deployments by Type',
|
|
54
|
+
description: 'List deployments for a specific Dokploy entity type. Requires the entity ID and the entity type.',
|
|
55
|
+
schema: z
|
|
56
|
+
.object({
|
|
57
|
+
id: z.string().min(1).describe('Entity ID'),
|
|
58
|
+
type: z
|
|
59
|
+
.enum([
|
|
60
|
+
'application',
|
|
61
|
+
'compose',
|
|
62
|
+
'server',
|
|
63
|
+
'schedule',
|
|
64
|
+
'previewDeployment',
|
|
65
|
+
'backup',
|
|
66
|
+
'volumeBackup',
|
|
67
|
+
])
|
|
68
|
+
.describe('Entity type'),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
endpoint: '/deployment.allByType',
|
|
72
|
+
});
|
|
73
|
+
const killProcess = postTool({
|
|
74
|
+
name: 'dokploy_deployment_kill_process',
|
|
75
|
+
title: 'Kill Deployment Process',
|
|
76
|
+
description: 'Kill an in-progress deployment process in Dokploy. Requires the deployment ID.',
|
|
77
|
+
schema: z
|
|
78
|
+
.object({
|
|
79
|
+
deploymentId: z.string().min(1).describe('Deployment ID'),
|
|
80
|
+
})
|
|
81
|
+
.strict(),
|
|
82
|
+
endpoint: '/deployment.killProcess',
|
|
83
|
+
annotations: { destructiveHint: true },
|
|
84
|
+
});
|
|
85
|
+
const removeDeployment = postTool({
|
|
86
|
+
name: 'dokploy_deployment_remove_deployment',
|
|
87
|
+
title: 'Remove Deployment Record',
|
|
88
|
+
description: 'Remove a deployment record from Dokploy. Requires the deployment ID. This is a destructive action.',
|
|
89
|
+
schema: z
|
|
90
|
+
.object({
|
|
91
|
+
deploymentId: z.string().min(1).describe('Deployment ID'),
|
|
92
|
+
})
|
|
93
|
+
.strict(),
|
|
94
|
+
endpoint: '/deployment.removeDeployment',
|
|
95
|
+
annotations: { destructiveHint: true },
|
|
96
|
+
});
|
|
26
97
|
// ── export ───────────────────────────────────────────────────────────
|
|
27
|
-
export const deploymentTools = [
|
|
98
|
+
export const deploymentTools = [
|
|
99
|
+
all,
|
|
100
|
+
allByCompose,
|
|
101
|
+
allByServer,
|
|
102
|
+
allCentralized,
|
|
103
|
+
queueList,
|
|
104
|
+
allByType,
|
|
105
|
+
killProcess,
|
|
106
|
+
removeDeployment,
|
|
107
|
+
];
|
package/dist/tools/docker.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { getTool } from './_factory.js';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
3
|
// ── tools ────────────────────────────────────────────────────────────
|
|
4
4
|
const getContainers = getTool({
|
|
5
5
|
name: 'dokploy_docker_get_containers',
|
|
6
6
|
title: 'List Docker Containers',
|
|
7
7
|
description: 'List all Docker containers running on the Dokploy server. Returns container metadata including names, images, status, ports, and resource usage. Takes no parameters. Useful for getting an overview of all running and stopped containers.',
|
|
8
|
-
schema: z
|
|
8
|
+
schema: z
|
|
9
|
+
.object({
|
|
10
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
11
|
+
})
|
|
12
|
+
.strict(),
|
|
9
13
|
endpoint: '/docker.getContainers',
|
|
10
14
|
});
|
|
11
15
|
const getConfig = getTool({
|
|
@@ -15,6 +19,7 @@ const getConfig = getTool({
|
|
|
15
19
|
schema: z
|
|
16
20
|
.object({
|
|
17
21
|
containerId: z.string().min(1).describe('The Docker container ID'),
|
|
22
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
18
23
|
})
|
|
19
24
|
.strict(),
|
|
20
25
|
endpoint: '/docker.getConfig',
|
|
@@ -26,6 +31,8 @@ const getContainersByAppNameMatch = getTool({
|
|
|
26
31
|
schema: z
|
|
27
32
|
.object({
|
|
28
33
|
appName: z.string().min(1).describe('The app name to match against container names'),
|
|
34
|
+
appType: z.enum(['stack', 'docker-compose']).optional().describe('App type'),
|
|
35
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
29
36
|
})
|
|
30
37
|
.strict(),
|
|
31
38
|
endpoint: '/docker.getContainersByAppNameMatch',
|
|
@@ -37,14 +44,67 @@ const getContainersByAppLabel = getTool({
|
|
|
37
44
|
schema: z
|
|
38
45
|
.object({
|
|
39
46
|
appName: z.string().min(1).describe('The app name label to search for'),
|
|
47
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
48
|
+
type: z.enum(['standalone', 'swarm']).describe('Container type'),
|
|
40
49
|
})
|
|
41
50
|
.strict(),
|
|
42
51
|
endpoint: '/docker.getContainersByAppLabel',
|
|
43
52
|
});
|
|
53
|
+
const restartContainer = postTool({
|
|
54
|
+
name: 'dokploy_docker_restart_container',
|
|
55
|
+
title: 'Restart Docker Container',
|
|
56
|
+
description: 'Restart a Docker container managed by Dokploy. Requires the Docker container ID.',
|
|
57
|
+
schema: z
|
|
58
|
+
.object({
|
|
59
|
+
containerId: z
|
|
60
|
+
.string()
|
|
61
|
+
.min(1)
|
|
62
|
+
.regex(/^[a-zA-Z0-9.\-_]+$/)
|
|
63
|
+
.describe('Docker container ID'),
|
|
64
|
+
})
|
|
65
|
+
.strict(),
|
|
66
|
+
endpoint: '/docker.restartContainer',
|
|
67
|
+
annotations: { destructiveHint: true },
|
|
68
|
+
});
|
|
69
|
+
const getStackContainersByAppName = getTool({
|
|
70
|
+
name: 'dokploy_docker_get_stack_containers_by_app_name',
|
|
71
|
+
title: 'List Stack Containers by App Name',
|
|
72
|
+
description: 'List stack containers for a Dokploy application name. Requires the app name and optionally accepts a server ID.',
|
|
73
|
+
schema: z
|
|
74
|
+
.object({
|
|
75
|
+
appName: z
|
|
76
|
+
.string()
|
|
77
|
+
.min(1)
|
|
78
|
+
.regex(/^[a-zA-Z0-9.\-_]+$/)
|
|
79
|
+
.describe('Application name'),
|
|
80
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
81
|
+
})
|
|
82
|
+
.strict(),
|
|
83
|
+
endpoint: '/docker.getStackContainersByAppName',
|
|
84
|
+
});
|
|
85
|
+
const getServiceContainersByAppName = getTool({
|
|
86
|
+
name: 'dokploy_docker_get_service_containers_by_app_name',
|
|
87
|
+
title: 'List Service Containers by App Name',
|
|
88
|
+
description: 'List service containers for a Dokploy application name. Requires the app name and optionally accepts a server ID.',
|
|
89
|
+
schema: z
|
|
90
|
+
.object({
|
|
91
|
+
appName: z
|
|
92
|
+
.string()
|
|
93
|
+
.min(1)
|
|
94
|
+
.regex(/^[a-zA-Z0-9.\-_]+$/)
|
|
95
|
+
.describe('Application name'),
|
|
96
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
97
|
+
})
|
|
98
|
+
.strict(),
|
|
99
|
+
endpoint: '/docker.getServiceContainersByAppName',
|
|
100
|
+
});
|
|
44
101
|
// ── export ───────────────────────────────────────────────────────────
|
|
45
102
|
export const dockerTools = [
|
|
46
103
|
getContainers,
|
|
47
104
|
getConfig,
|
|
48
105
|
getContainersByAppNameMatch,
|
|
49
106
|
getContainersByAppLabel,
|
|
107
|
+
restartContainer,
|
|
108
|
+
getStackContainersByAppName,
|
|
109
|
+
getServiceContainersByAppName,
|
|
50
110
|
];
|
package/dist/tools/domain.js
CHANGED
|
@@ -113,20 +113,33 @@ const validateDomain = postTool({
|
|
|
113
113
|
const generateDomain = postTool({
|
|
114
114
|
name: 'dokploy_domain_generate',
|
|
115
115
|
title: 'Generate Domain',
|
|
116
|
-
description: "Generate a default domain for an
|
|
116
|
+
description: "Generate a default domain for an app name using the server's configured base domain. Optionally scope generation to a specific server.",
|
|
117
117
|
schema: z
|
|
118
118
|
.object({
|
|
119
|
-
|
|
119
|
+
appName: z.string().min(1).describe('App name'),
|
|
120
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
120
121
|
})
|
|
121
122
|
.strict(),
|
|
122
123
|
endpoint: '/domain.generateDomain',
|
|
123
124
|
});
|
|
125
|
+
const canGenerateTraefikMeDomains = getTool({
|
|
126
|
+
name: 'dokploy_domain_can_generate_traefik_me_domains',
|
|
127
|
+
title: 'Check Traefik.me Availability',
|
|
128
|
+
description: 'Check whether Dokploy can generate `traefik.me` domains for a given server. Requires the server ID.',
|
|
129
|
+
schema: z
|
|
130
|
+
.object({
|
|
131
|
+
serverId: z.string().describe('Server ID'),
|
|
132
|
+
})
|
|
133
|
+
.strict(),
|
|
134
|
+
endpoint: '/domain.canGenerateTraefikMeDomains',
|
|
135
|
+
});
|
|
124
136
|
// ── export ───────────────────────────────────────────────────────────
|
|
125
137
|
export const domainTools = [
|
|
126
138
|
create,
|
|
127
139
|
one,
|
|
128
140
|
byApplicationId,
|
|
129
141
|
byComposeId,
|
|
142
|
+
canGenerateTraefikMeDomains,
|
|
130
143
|
update,
|
|
131
144
|
deleteDomain,
|
|
132
145
|
validateDomain,
|