@vibetools/dokploy-mcp 1.0.0 → 2.0.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 +59 -160
- package/dist/api/client.d.ts +3 -0
- package/dist/api/client.js +38 -13
- package/dist/cli/index.js +1 -0
- package/dist/codemode/context/execute-context.d.ts +590 -0
- package/dist/codemode/context/execute-context.js +64 -0
- package/dist/codemode/context/search-context.d.ts +13851 -0
- package/dist/codemode/context/search-context.js +42 -0
- package/dist/codemode/gateway/api-gateway.d.ts +12 -0
- package/dist/codemode/gateway/api-gateway.js +160 -0
- package/dist/codemode/gateway/error-format.d.ts +13 -0
- package/dist/codemode/gateway/error-format.js +9 -0
- package/dist/codemode/gateway/request-normalizer.d.ts +3 -0
- package/dist/codemode/gateway/request-normalizer.js +21 -0
- package/dist/codemode/gateway/trace.d.ts +13 -0
- package/dist/codemode/gateway/trace.js +11 -0
- package/dist/codemode/sandbox/host.d.ts +11 -0
- package/dist/codemode/sandbox/host.js +28 -0
- package/dist/codemode/sandbox/limits.d.ts +2 -0
- package/dist/codemode/sandbox/limits.js +20 -0
- package/dist/codemode/sandbox/runner.d.ts +8 -0
- package/dist/codemode/sandbox/runner.js +113 -0
- package/dist/codemode/sandbox/runtime.d.ts +2 -0
- package/dist/codemode/sandbox/runtime.js +3 -0
- package/dist/codemode/sandbox/serialize.d.ts +1 -0
- package/dist/codemode/sandbox/serialize.js +45 -0
- package/dist/codemode/sandbox/subprocess-runner.d.ts +10 -0
- package/dist/codemode/sandbox/subprocess-runner.js +91 -0
- package/dist/codemode/sandbox/types.d.ts +12 -0
- package/dist/codemode/sandbox/types.js +1 -0
- package/dist/codemode/sandbox/worker-entry.d.ts +1 -0
- package/dist/codemode/sandbox/worker-entry.js +70 -0
- package/dist/codemode/server-codemode.d.ts +2 -0
- package/dist/codemode/server-codemode.js +17 -0
- package/dist/codemode/tools/execute.d.ts +583 -0
- package/dist/codemode/tools/execute.js +52 -0
- package/dist/codemode/tools/index.d.ts +2 -0
- package/dist/codemode/tools/index.js +3 -0
- package/dist/codemode/tools/search.d.ts +2 -0
- package/dist/codemode/tools/search.js +62 -0
- package/dist/generated/dokploy-catalog.d.ts +27 -0
- package/dist/generated/dokploy-catalog.js +16 -0
- package/dist/generated/dokploy-schemas.d.ts +17533 -0
- package/dist/generated/dokploy-schemas.js +20639 -0
- package/dist/generated/dokploy-sdk.d.ts +558 -0
- package/dist/generated/dokploy-sdk.js +561 -0
- package/dist/generated/openapi-index.json +10591 -0
- package/dist/{tools/_factory.d.ts → mcp/tool-factory.d.ts} +2 -0
- package/dist/{tools/_factory.js → mcp/tool-factory.js} +26 -7
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -15
- package/package.json +22 -11
- package/dist/tools/_database.d.ts +0 -12
- package/dist/tools/_database.js +0 -96
- package/dist/tools/admin.d.ts +0 -2
- package/dist/tools/admin.js +0 -61
- package/dist/tools/application.d.ts +0 -2
- package/dist/tools/application.js +0 -464
- package/dist/tools/backup.d.ts +0 -2
- package/dist/tools/backup.js +0 -103
- package/dist/tools/certificates.d.ts +0 -2
- package/dist/tools/certificates.js +0 -54
- package/dist/tools/cluster.d.ts +0 -2
- package/dist/tools/cluster.js +0 -38
- package/dist/tools/compose.d.ts +0 -2
- package/dist/tools/compose.js +0 -213
- package/dist/tools/deployment.d.ts +0 -2
- package/dist/tools/deployment.js +0 -27
- package/dist/tools/destination.d.ts +0 -2
- package/dist/tools/destination.js +0 -78
- package/dist/tools/docker.d.ts +0 -2
- package/dist/tools/docker.js +0 -50
- package/dist/tools/domain.d.ts +0 -2
- package/dist/tools/domain.js +0 -134
- package/dist/tools/index.d.ts +0 -2
- package/dist/tools/index.js +0 -48
- package/dist/tools/mariadb.d.ts +0 -1
- package/dist/tools/mariadb.js +0 -14
- package/dist/tools/mongo.d.ts +0 -1
- package/dist/tools/mongo.js +0 -12
- package/dist/tools/mounts.d.ts +0 -2
- package/dist/tools/mounts.js +0 -65
- package/dist/tools/mysql.d.ts +0 -1
- package/dist/tools/mysql.js +0 -14
- package/dist/tools/port.d.ts +0 -2
- package/dist/tools/port.js +0 -54
- package/dist/tools/postgres.d.ts +0 -1
- package/dist/tools/postgres.js +0 -13
- package/dist/tools/project.d.ts +0 -2
- package/dist/tools/project.js +0 -94
- package/dist/tools/redirects.d.ts +0 -2
- package/dist/tools/redirects.js +0 -53
- package/dist/tools/redis.d.ts +0 -1
- package/dist/tools/redis.js +0 -11
- package/dist/tools/registry.d.ts +0 -2
- package/dist/tools/registry.js +0 -81
- package/dist/tools/security.d.ts +0 -2
- package/dist/tools/security.js +0 -48
- package/dist/tools/settings.d.ts +0 -2
- package/dist/tools/settings.js +0 -258
- package/dist/tools/user.d.ts +0 -2
- package/dist/tools/user.js +0 -12
package/dist/tools/cluster.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool, postTool } from './_factory.js';
|
|
3
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
-
const getNodes = getTool({
|
|
5
|
-
name: 'dokploy_cluster_get_nodes',
|
|
6
|
-
title: 'List Cluster Nodes',
|
|
7
|
-
description: 'List all nodes in the Docker Swarm cluster. No parameters required. Returns an array of node objects including each node ID, hostname, role (manager or worker), availability status, and resource information.',
|
|
8
|
-
schema: z.object({}).strict(),
|
|
9
|
-
endpoint: '/cluster.getNodes',
|
|
10
|
-
});
|
|
11
|
-
const addWorker = getTool({
|
|
12
|
-
name: 'dokploy_cluster_add_worker',
|
|
13
|
-
title: 'Get Add Worker Command',
|
|
14
|
-
description: 'Get the Docker Swarm join command to add a new worker node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate token and manager address that should be executed on the new worker machine.',
|
|
15
|
-
schema: z.object({}).strict(),
|
|
16
|
-
endpoint: '/cluster.addWorker',
|
|
17
|
-
});
|
|
18
|
-
const addManager = getTool({
|
|
19
|
-
name: 'dokploy_cluster_add_manager',
|
|
20
|
-
title: 'Get Add Manager Command',
|
|
21
|
-
description: 'Get the Docker Swarm join command to add a new manager node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate manager token and address that should be executed on the new manager machine.',
|
|
22
|
-
schema: z.object({}).strict(),
|
|
23
|
-
endpoint: '/cluster.addManager',
|
|
24
|
-
});
|
|
25
|
-
const removeWorker = postTool({
|
|
26
|
-
name: 'dokploy_cluster_remove_worker',
|
|
27
|
-
title: 'Remove Worker Node',
|
|
28
|
-
description: 'Remove a worker node from the Docker Swarm cluster. This action is irreversible and any services running on the node will be rescheduled to other available nodes. Requires the nodeId parameter identifying the worker to remove. Returns a confirmation of the removal.',
|
|
29
|
-
schema: z
|
|
30
|
-
.object({
|
|
31
|
-
nodeId: z.string().min(1).describe('ID of the worker node to remove from the cluster'),
|
|
32
|
-
})
|
|
33
|
-
.strict(),
|
|
34
|
-
endpoint: '/cluster.removeWorker',
|
|
35
|
-
annotations: { destructiveHint: true },
|
|
36
|
-
});
|
|
37
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
38
|
-
export const clusterTools = [getNodes, addWorker, addManager, removeWorker];
|
package/dist/tools/compose.d.ts
DELETED
package/dist/tools/compose.js
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool, postTool } from './_factory.js';
|
|
3
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
-
const create = postTool({
|
|
5
|
-
name: 'dokploy_compose_create',
|
|
6
|
-
title: 'Create Compose Service',
|
|
7
|
-
description: 'Create a new Docker Compose service within a project. Requires a service name and project ID. Optionally specify the compose type (docker-compose or stack), a custom app name, and a target server ID. Returns the newly created compose service object.',
|
|
8
|
-
schema: z
|
|
9
|
-
.object({
|
|
10
|
-
name: z.string().min(1).describe('The name of the compose service'),
|
|
11
|
-
projectId: z.string().min(1).describe('The project ID to create the compose service in'),
|
|
12
|
-
description: z.string().nullable().optional().describe('Compose service description'),
|
|
13
|
-
composeType: z
|
|
14
|
-
.enum(['docker-compose', 'stack'])
|
|
15
|
-
.optional()
|
|
16
|
-
.describe('Compose type: docker-compose or stack'),
|
|
17
|
-
appName: z.string().optional().describe('Custom app name (auto-generated if not provided)'),
|
|
18
|
-
serverId: z.string().nullable().optional().describe('Target server ID for deployment'),
|
|
19
|
-
})
|
|
20
|
-
.strict(),
|
|
21
|
-
endpoint: '/compose.create',
|
|
22
|
-
});
|
|
23
|
-
const one = getTool({
|
|
24
|
-
name: 'dokploy_compose_one',
|
|
25
|
-
title: 'Get Compose Service',
|
|
26
|
-
description: 'Get detailed information about a single compose service by its ID. Returns the full compose service configuration including its source type, environment variables, deployment status, and associated project.',
|
|
27
|
-
schema: z
|
|
28
|
-
.object({
|
|
29
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
30
|
-
})
|
|
31
|
-
.strict(),
|
|
32
|
-
endpoint: '/compose.one',
|
|
33
|
-
});
|
|
34
|
-
const update = postTool({
|
|
35
|
-
name: 'dokploy_compose_update',
|
|
36
|
-
title: 'Update Compose Service',
|
|
37
|
-
description: 'Update an existing compose service configuration. Accepts the compose service ID and any combination of fields to modify, including name, environment variables, compose file content, source type, Git repository settings, and auto-deploy preferences. Returns the updated compose service object.',
|
|
38
|
-
schema: z
|
|
39
|
-
.object({
|
|
40
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
41
|
-
name: z.string().optional().describe('Compose service name'),
|
|
42
|
-
appName: z.string().optional().describe('Internal app name'),
|
|
43
|
-
description: z.string().nullable().optional().describe('Service description'),
|
|
44
|
-
env: z.string().nullable().optional().describe('Environment variables'),
|
|
45
|
-
composeFile: z.string().nullable().optional().describe('Docker Compose file content'),
|
|
46
|
-
sourceType: z
|
|
47
|
-
.enum(['git', 'github', 'raw'])
|
|
48
|
-
.optional()
|
|
49
|
-
.describe('Source type for the compose file'),
|
|
50
|
-
composeType: z
|
|
51
|
-
.enum(['docker-compose', 'stack'])
|
|
52
|
-
.optional()
|
|
53
|
-
.describe('Compose type: docker-compose or stack'),
|
|
54
|
-
repository: z.string().optional().describe('Git repository name'),
|
|
55
|
-
owner: z.string().optional().describe('Git repository owner'),
|
|
56
|
-
branch: z.string().optional().describe('Git branch'),
|
|
57
|
-
autoDeploy: z.boolean().optional().describe('Whether auto-deploy is enabled'),
|
|
58
|
-
customGitUrl: z.string().optional().describe('Custom Git repository URL'),
|
|
59
|
-
customGitBranch: z.string().optional().describe('Custom Git branch'),
|
|
60
|
-
customGitSSHKey: z
|
|
61
|
-
.string()
|
|
62
|
-
.nullable()
|
|
63
|
-
.optional()
|
|
64
|
-
.describe('SSH key for custom Git authentication'),
|
|
65
|
-
command: z.string().nullable().optional().describe('Custom command override'),
|
|
66
|
-
composePath: z.string().optional().describe('Path to the compose file within the repo'),
|
|
67
|
-
composeStatus: z.string().optional().describe('Compose service status'),
|
|
68
|
-
projectId: z.string().optional().describe('Project ID'),
|
|
69
|
-
})
|
|
70
|
-
.strict(),
|
|
71
|
-
endpoint: '/compose.update',
|
|
72
|
-
});
|
|
73
|
-
const deleteCompose = postTool({
|
|
74
|
-
name: 'dokploy_compose_delete',
|
|
75
|
-
title: 'Delete Compose Service',
|
|
76
|
-
description: 'Permanently delete a compose service and all of its associated data, including containers, volumes, and configuration. This action is irreversible. Requires the compose service ID.',
|
|
77
|
-
schema: z
|
|
78
|
-
.object({
|
|
79
|
-
composeId: z.string().min(1).describe('The unique compose service ID to delete'),
|
|
80
|
-
})
|
|
81
|
-
.strict(),
|
|
82
|
-
endpoint: '/compose.delete',
|
|
83
|
-
annotations: { destructiveHint: true },
|
|
84
|
-
});
|
|
85
|
-
const deploy = postTool({
|
|
86
|
-
name: 'dokploy_compose_deploy',
|
|
87
|
-
title: 'Deploy Compose Service',
|
|
88
|
-
description: 'Deploy a Docker Compose service by triggering a build and run cycle. Requires the compose service ID. Returns the deployment status and any build logs produced during the deployment process.',
|
|
89
|
-
schema: z
|
|
90
|
-
.object({
|
|
91
|
-
composeId: z.string().min(1).describe('The unique compose service ID to deploy'),
|
|
92
|
-
})
|
|
93
|
-
.strict(),
|
|
94
|
-
endpoint: '/compose.deploy',
|
|
95
|
-
});
|
|
96
|
-
const redeploy = postTool({
|
|
97
|
-
name: 'dokploy_compose_redeploy',
|
|
98
|
-
title: 'Redeploy Compose Service',
|
|
99
|
-
description: 'Redeploy a compose service by rebuilding all containers and restarting them. This is useful when you need to pick up configuration changes or force a fresh deployment. Requires the compose service ID.',
|
|
100
|
-
schema: z
|
|
101
|
-
.object({
|
|
102
|
-
composeId: z.string().min(1).describe('The unique compose service ID to redeploy'),
|
|
103
|
-
})
|
|
104
|
-
.strict(),
|
|
105
|
-
endpoint: '/compose.redeploy',
|
|
106
|
-
});
|
|
107
|
-
const stop = postTool({
|
|
108
|
-
name: 'dokploy_compose_stop',
|
|
109
|
-
title: 'Stop Compose Service',
|
|
110
|
-
description: 'Stop all running containers in a compose service. The containers and their data are preserved but will no longer be running or serving traffic. Requires the compose service ID.',
|
|
111
|
-
schema: z
|
|
112
|
-
.object({
|
|
113
|
-
composeId: z.string().min(1).describe('The unique compose service ID to stop'),
|
|
114
|
-
})
|
|
115
|
-
.strict(),
|
|
116
|
-
endpoint: '/compose.stop',
|
|
117
|
-
annotations: { destructiveHint: true },
|
|
118
|
-
});
|
|
119
|
-
const cleanQueues = postTool({
|
|
120
|
-
name: 'dokploy_compose_clean_queues',
|
|
121
|
-
title: 'Clean Compose Queues',
|
|
122
|
-
description: 'Clean the pending deployment queues for a compose service. This removes any queued deployment tasks that have not yet started. Useful for clearing stuck or unwanted deployments. Requires the compose service ID.',
|
|
123
|
-
schema: z
|
|
124
|
-
.object({
|
|
125
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
126
|
-
})
|
|
127
|
-
.strict(),
|
|
128
|
-
endpoint: '/compose.cleanQueues',
|
|
129
|
-
annotations: { destructiveHint: true },
|
|
130
|
-
});
|
|
131
|
-
const randomizeCompose = postTool({
|
|
132
|
-
name: 'dokploy_compose_randomize',
|
|
133
|
-
title: 'Randomize Compose Names',
|
|
134
|
-
description: 'Randomize the service names within a compose deployment to avoid naming conflicts. An optional prefix can be provided to prepend to the randomized names. Requires the compose service ID. Returns the updated compose configuration.',
|
|
135
|
-
schema: z
|
|
136
|
-
.object({
|
|
137
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
138
|
-
prefix: z.string().optional().describe('Optional prefix for randomized names'),
|
|
139
|
-
})
|
|
140
|
-
.strict(),
|
|
141
|
-
endpoint: '/compose.randomizeCompose',
|
|
142
|
-
});
|
|
143
|
-
const getDefaultCommand = getTool({
|
|
144
|
-
name: 'dokploy_compose_get_default_command',
|
|
145
|
-
title: 'Get Default Command',
|
|
146
|
-
description: 'Retrieve the default deployment command for a compose service. This is the command that Dokploy uses to bring up the compose stack during deployment. Requires the compose service ID. Returns the command string.',
|
|
147
|
-
schema: z
|
|
148
|
-
.object({
|
|
149
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
150
|
-
})
|
|
151
|
-
.strict(),
|
|
152
|
-
endpoint: '/compose.getDefaultCommand',
|
|
153
|
-
});
|
|
154
|
-
const refreshToken = postTool({
|
|
155
|
-
name: 'dokploy_compose_refresh_token',
|
|
156
|
-
title: 'Refresh Webhook Token',
|
|
157
|
-
description: 'Refresh the webhook token for a compose service. This invalidates the previous webhook URL and generates a new one. Useful when the existing webhook token has been compromised. Requires the compose service ID.',
|
|
158
|
-
schema: z
|
|
159
|
-
.object({
|
|
160
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
161
|
-
})
|
|
162
|
-
.strict(),
|
|
163
|
-
endpoint: '/compose.refreshToken',
|
|
164
|
-
});
|
|
165
|
-
const deployTemplate = postTool({
|
|
166
|
-
name: 'dokploy_compose_deploy_template',
|
|
167
|
-
title: 'Deploy Compose Template',
|
|
168
|
-
description: 'Deploy a compose service from a predefined template. Templates provide pre-configured compose stacks for common applications. Requires a project ID and the template ID. Returns the created compose service with deployment status.',
|
|
169
|
-
schema: z
|
|
170
|
-
.object({
|
|
171
|
-
projectId: z.string().min(1).describe('The project ID to deploy the template in'),
|
|
172
|
-
id: z.string().min(1).describe('The template ID to deploy'),
|
|
173
|
-
})
|
|
174
|
-
.strict(),
|
|
175
|
-
endpoint: '/compose.deployTemplate',
|
|
176
|
-
});
|
|
177
|
-
const templates = getTool({
|
|
178
|
-
name: 'dokploy_compose_templates',
|
|
179
|
-
title: 'List Compose Templates',
|
|
180
|
-
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.object({}).strict(),
|
|
182
|
-
endpoint: '/compose.templates',
|
|
183
|
-
});
|
|
184
|
-
const saveEnvironment = postTool({
|
|
185
|
-
name: 'dokploy_compose_save_environment',
|
|
186
|
-
title: 'Save Environment Variables',
|
|
187
|
-
description: 'Save environment variables and Docker build arguments for a compose service. Environment variables are injected at runtime while build arguments are passed during the image build phase. Requires the compose service ID.',
|
|
188
|
-
schema: z
|
|
189
|
-
.object({
|
|
190
|
-
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
|
-
})
|
|
194
|
-
.strict(),
|
|
195
|
-
endpoint: '/compose.saveEnvironment',
|
|
196
|
-
});
|
|
197
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
198
|
-
export const composeTools = [
|
|
199
|
-
create,
|
|
200
|
-
one,
|
|
201
|
-
update,
|
|
202
|
-
deleteCompose,
|
|
203
|
-
deploy,
|
|
204
|
-
redeploy,
|
|
205
|
-
stop,
|
|
206
|
-
cleanQueues,
|
|
207
|
-
randomizeCompose,
|
|
208
|
-
getDefaultCommand,
|
|
209
|
-
refreshToken,
|
|
210
|
-
deployTemplate,
|
|
211
|
-
templates,
|
|
212
|
-
saveEnvironment,
|
|
213
|
-
];
|
package/dist/tools/deployment.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool } from './_factory.js';
|
|
3
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
-
const all = getTool({
|
|
5
|
-
name: 'dokploy_deployment_all',
|
|
6
|
-
title: 'List Application Deployments',
|
|
7
|
-
description: 'List all deployment records for a specific application in Dokploy. Each deployment includes build logs, status, timestamps, and the triggering event. Requires the application ID. Returns an array of deployment objects ordered by creation date.',
|
|
8
|
-
schema: z
|
|
9
|
-
.object({
|
|
10
|
-
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
11
|
-
})
|
|
12
|
-
.strict(),
|
|
13
|
-
endpoint: '/deployment.all',
|
|
14
|
-
});
|
|
15
|
-
const allByCompose = getTool({
|
|
16
|
-
name: 'dokploy_deployment_all_by_compose',
|
|
17
|
-
title: 'List Compose Deployments',
|
|
18
|
-
description: 'List all deployment records for a specific Docker Compose service in Dokploy. Each deployment includes build logs, status, timestamps, and the triggering event. Requires the compose service ID. Returns an array of deployment objects ordered by creation date.',
|
|
19
|
-
schema: z
|
|
20
|
-
.object({
|
|
21
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
22
|
-
})
|
|
23
|
-
.strict(),
|
|
24
|
-
endpoint: '/deployment.allByCompose',
|
|
25
|
-
});
|
|
26
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
27
|
-
export const deploymentTools = [all, allByCompose];
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool, postTool } from './_factory.js';
|
|
3
|
-
// ── helpers ──────────────────────────────────────────────────────────
|
|
4
|
-
const destinationBaseSchema = {
|
|
5
|
-
name: z.string().min(1).describe('Name for the S3 destination'),
|
|
6
|
-
accessKey: z.string().min(1).describe('S3 access key'),
|
|
7
|
-
bucket: z.string().min(1).describe('S3 bucket name'),
|
|
8
|
-
region: z.string().min(1).describe('S3 region'),
|
|
9
|
-
endpoint: z.string().min(1).describe('S3 endpoint URL'),
|
|
10
|
-
secretAccessKey: z.string().min(1).describe('S3 secret access key'),
|
|
11
|
-
};
|
|
12
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
13
|
-
const all = getTool({
|
|
14
|
-
name: 'dokploy_destination_all',
|
|
15
|
-
title: 'List Backup Destinations',
|
|
16
|
-
description: 'List all S3-compatible backup destinations configured in Dokploy. Takes no parameters. Returns an array of destination objects including their IDs, names, bucket configurations, and connection details.',
|
|
17
|
-
schema: z.object({}).strict(),
|
|
18
|
-
endpoint: '/destination.all',
|
|
19
|
-
});
|
|
20
|
-
const one = getTool({
|
|
21
|
-
name: 'dokploy_destination_one',
|
|
22
|
-
title: 'Get Backup Destination',
|
|
23
|
-
description: 'Retrieve the full configuration of a specific backup destination by its unique ID. Requires the destinationId parameter. Returns the destination object with name, S3 bucket, region, endpoint, and credential details.',
|
|
24
|
-
schema: z
|
|
25
|
-
.object({
|
|
26
|
-
destinationId: z.string().min(1).describe('Unique destination ID'),
|
|
27
|
-
})
|
|
28
|
-
.strict(),
|
|
29
|
-
endpoint: '/destination.one',
|
|
30
|
-
});
|
|
31
|
-
const create = postTool({
|
|
32
|
-
name: 'dokploy_destination_create',
|
|
33
|
-
title: 'Create Backup Destination',
|
|
34
|
-
description: 'Create a new S3-compatible backup destination in Dokploy. Requires the destination name, S3 access key, secret access key, bucket name, region, and endpoint URL. Returns the newly created destination object with its assigned ID.',
|
|
35
|
-
schema: z
|
|
36
|
-
.object({
|
|
37
|
-
...destinationBaseSchema,
|
|
38
|
-
})
|
|
39
|
-
.strict(),
|
|
40
|
-
endpoint: '/destination.create',
|
|
41
|
-
});
|
|
42
|
-
const update = postTool({
|
|
43
|
-
name: 'dokploy_destination_update',
|
|
44
|
-
title: 'Update Backup Destination',
|
|
45
|
-
description: 'Update an existing S3-compatible backup destination configuration. Requires the destinationId of the destination to modify along with the updated S3 credentials and bucket settings. Returns the updated destination object.',
|
|
46
|
-
schema: z
|
|
47
|
-
.object({
|
|
48
|
-
destinationId: z.string().min(1).describe('Unique destination ID to update'),
|
|
49
|
-
...destinationBaseSchema,
|
|
50
|
-
})
|
|
51
|
-
.strict(),
|
|
52
|
-
endpoint: '/destination.update',
|
|
53
|
-
});
|
|
54
|
-
const remove = postTool({
|
|
55
|
-
name: 'dokploy_destination_remove',
|
|
56
|
-
title: 'Remove Backup Destination',
|
|
57
|
-
description: 'Permanently remove a backup destination from Dokploy. This action is irreversible and will delete the destination configuration. Requires the destinationId parameter. Any backup schedules referencing this destination should be updated or removed first.',
|
|
58
|
-
schema: z
|
|
59
|
-
.object({
|
|
60
|
-
destinationId: z.string().min(1).describe('Unique destination ID to remove'),
|
|
61
|
-
})
|
|
62
|
-
.strict(),
|
|
63
|
-
endpoint: '/destination.remove',
|
|
64
|
-
annotations: { destructiveHint: true },
|
|
65
|
-
});
|
|
66
|
-
const testConnection = postTool({
|
|
67
|
-
name: 'dokploy_destination_test_connection',
|
|
68
|
-
title: 'Test Destination Connection',
|
|
69
|
-
description: 'Test the connection to an S3-compatible backup destination using the provided credentials. Requires the destination name, access key, secret access key, bucket, region, and endpoint. Returns a success or failure status indicating whether the S3 bucket is reachable and writable.',
|
|
70
|
-
schema: z
|
|
71
|
-
.object({
|
|
72
|
-
...destinationBaseSchema,
|
|
73
|
-
})
|
|
74
|
-
.strict(),
|
|
75
|
-
endpoint: '/destination.testConnection',
|
|
76
|
-
});
|
|
77
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
78
|
-
export const destinationTools = [all, one, create, update, remove, testConnection];
|
package/dist/tools/docker.d.ts
DELETED
package/dist/tools/docker.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool } from './_factory.js';
|
|
3
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
-
const getContainers = getTool({
|
|
5
|
-
name: 'dokploy_docker_get_containers',
|
|
6
|
-
title: 'List Docker Containers',
|
|
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.object({}).strict(),
|
|
9
|
-
endpoint: '/docker.getContainers',
|
|
10
|
-
});
|
|
11
|
-
const getConfig = getTool({
|
|
12
|
-
name: 'dokploy_docker_get_config',
|
|
13
|
-
title: 'Get Docker Container Config',
|
|
14
|
-
description: 'Get the full configuration of a specific Docker container by its ID. Returns detailed container settings including environment variables, volumes, network configuration, and resource limits. Requires the Docker container ID.',
|
|
15
|
-
schema: z
|
|
16
|
-
.object({
|
|
17
|
-
containerId: z.string().min(1).describe('The Docker container ID'),
|
|
18
|
-
})
|
|
19
|
-
.strict(),
|
|
20
|
-
endpoint: '/docker.getConfig',
|
|
21
|
-
});
|
|
22
|
-
const getContainersByAppNameMatch = getTool({
|
|
23
|
-
name: 'dokploy_docker_get_containers_by_app_name_match',
|
|
24
|
-
title: 'Find Containers by App Name',
|
|
25
|
-
description: 'Find Docker containers whose name matches the given application name. Performs a substring match against container names to locate containers belonging to a specific app. Requires the app name string. Returns matching container objects with their metadata.',
|
|
26
|
-
schema: z
|
|
27
|
-
.object({
|
|
28
|
-
appName: z.string().min(1).describe('The app name to match against container names'),
|
|
29
|
-
})
|
|
30
|
-
.strict(),
|
|
31
|
-
endpoint: '/docker.getContainersByAppNameMatch',
|
|
32
|
-
});
|
|
33
|
-
const getContainersByAppLabel = getTool({
|
|
34
|
-
name: 'dokploy_docker_get_containers_by_app_label',
|
|
35
|
-
title: 'Find Containers by App Label',
|
|
36
|
-
description: 'Find Docker containers by their application label metadata. Searches for containers that have a matching app label, which is the recommended way to identify containers managed by Dokploy. Requires the app name label value. Returns matching container objects.',
|
|
37
|
-
schema: z
|
|
38
|
-
.object({
|
|
39
|
-
appName: z.string().min(1).describe('The app name label to search for'),
|
|
40
|
-
})
|
|
41
|
-
.strict(),
|
|
42
|
-
endpoint: '/docker.getContainersByAppLabel',
|
|
43
|
-
});
|
|
44
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
45
|
-
export const dockerTools = [
|
|
46
|
-
getContainers,
|
|
47
|
-
getConfig,
|
|
48
|
-
getContainersByAppNameMatch,
|
|
49
|
-
getContainersByAppLabel,
|
|
50
|
-
];
|
package/dist/tools/domain.d.ts
DELETED
package/dist/tools/domain.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { getTool, postTool } from './_factory.js';
|
|
3
|
-
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
-
const create = postTool({
|
|
5
|
-
name: 'dokploy_domain_create',
|
|
6
|
-
title: 'Create Domain',
|
|
7
|
-
description: 'Create a new domain configuration for an application or compose service. Requires the hostname, HTTPS setting, and certificate type. Optionally specify path-based routing, a target port, and the application or compose service to attach it to. Returns the created domain object.',
|
|
8
|
-
schema: z
|
|
9
|
-
.object({
|
|
10
|
-
host: z.string().min(1).describe('The domain hostname (e.g., app.example.com)'),
|
|
11
|
-
https: z.boolean().describe('Whether to enable HTTPS'),
|
|
12
|
-
certificateType: z.enum(['letsencrypt', 'none', 'custom']).describe('SSL certificate type'),
|
|
13
|
-
stripPath: z.boolean().describe('Whether to strip the path prefix when forwarding'),
|
|
14
|
-
path: z.string().optional().describe('URL path prefix for routing'),
|
|
15
|
-
port: z.number().nullable().optional().describe('Target port on the container'),
|
|
16
|
-
applicationId: z.string().optional().describe('Application ID to attach the domain to'),
|
|
17
|
-
composeId: z.string().optional().describe('Compose service ID to attach the domain to'),
|
|
18
|
-
serviceName: z.string().optional().describe('Service name within a compose deployment'),
|
|
19
|
-
customCertResolver: z
|
|
20
|
-
.string()
|
|
21
|
-
.nullable()
|
|
22
|
-
.optional()
|
|
23
|
-
.describe('Custom certificate resolver name'),
|
|
24
|
-
domainType: z.string().optional().describe('Domain type'),
|
|
25
|
-
previewDeploymentId: z.string().optional().describe('Preview deployment ID'),
|
|
26
|
-
internalPath: z.string().optional().describe('Internal path for routing'),
|
|
27
|
-
})
|
|
28
|
-
.strict(),
|
|
29
|
-
endpoint: '/domain.create',
|
|
30
|
-
});
|
|
31
|
-
const one = getTool({
|
|
32
|
-
name: 'dokploy_domain_one',
|
|
33
|
-
title: 'Get Domain',
|
|
34
|
-
description: 'Get detailed information about a single domain by its ID. Returns the full domain configuration including hostname, HTTPS settings, certificate type, routing rules, and the associated application or compose service.',
|
|
35
|
-
schema: z
|
|
36
|
-
.object({
|
|
37
|
-
domainId: z.string().min(1).describe('The unique domain ID'),
|
|
38
|
-
})
|
|
39
|
-
.strict(),
|
|
40
|
-
endpoint: '/domain.one',
|
|
41
|
-
});
|
|
42
|
-
const byApplicationId = getTool({
|
|
43
|
-
name: 'dokploy_domain_by_application_id',
|
|
44
|
-
title: 'List Domains by Application',
|
|
45
|
-
description: 'List all domains attached to a specific application. Requires the application ID. Returns an array of domain objects with their hostnames, HTTPS settings, certificate types, and routing configurations.',
|
|
46
|
-
schema: z
|
|
47
|
-
.object({
|
|
48
|
-
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
49
|
-
})
|
|
50
|
-
.strict(),
|
|
51
|
-
endpoint: '/domain.byApplicationId',
|
|
52
|
-
});
|
|
53
|
-
const byComposeId = getTool({
|
|
54
|
-
name: 'dokploy_domain_by_compose_id',
|
|
55
|
-
title: 'List Domains by Compose Service',
|
|
56
|
-
description: 'List all domains attached to a specific compose service. Requires the compose service ID. Returns an array of domain objects with their hostnames, HTTPS settings, certificate types, and routing configurations.',
|
|
57
|
-
schema: z
|
|
58
|
-
.object({
|
|
59
|
-
composeId: z.string().min(1).describe('The unique compose service ID'),
|
|
60
|
-
})
|
|
61
|
-
.strict(),
|
|
62
|
-
endpoint: '/domain.byComposeId',
|
|
63
|
-
});
|
|
64
|
-
const update = postTool({
|
|
65
|
-
name: 'dokploy_domain_update',
|
|
66
|
-
title: 'Update Domain',
|
|
67
|
-
description: 'Update an existing domain configuration. Requires the domain ID along with the hostname, HTTPS setting, certificate type, and strip path option. Optionally modify the path prefix, port, certificate resolver, service name, and routing settings. Returns the updated domain object.',
|
|
68
|
-
schema: z
|
|
69
|
-
.object({
|
|
70
|
-
domainId: z.string().min(1).describe('The unique domain ID'),
|
|
71
|
-
host: z.string().min(1).describe('The domain hostname'),
|
|
72
|
-
https: z.boolean().describe('Whether to enable HTTPS'),
|
|
73
|
-
certificateType: z.enum(['letsencrypt', 'none', 'custom']).describe('SSL certificate type'),
|
|
74
|
-
stripPath: z.boolean().describe('Whether to strip the path prefix'),
|
|
75
|
-
path: z.string().optional().describe('URL path prefix for routing'),
|
|
76
|
-
port: z.number().nullable().optional().describe('Target port on the container'),
|
|
77
|
-
customCertResolver: z
|
|
78
|
-
.string()
|
|
79
|
-
.nullable()
|
|
80
|
-
.optional()
|
|
81
|
-
.describe('Custom certificate resolver name'),
|
|
82
|
-
serviceName: z.string().optional().describe('Service name within a compose deployment'),
|
|
83
|
-
domainType: z.string().optional().describe('Domain type'),
|
|
84
|
-
internalPath: z.string().optional().describe('Internal path for routing'),
|
|
85
|
-
})
|
|
86
|
-
.strict(),
|
|
87
|
-
endpoint: '/domain.update',
|
|
88
|
-
});
|
|
89
|
-
const deleteDomain = postTool({
|
|
90
|
-
name: 'dokploy_domain_delete',
|
|
91
|
-
title: 'Delete Domain',
|
|
92
|
-
description: 'Permanently delete a domain configuration. This removes the domain routing and any associated SSL certificates. This action is irreversible. Requires the domain ID.',
|
|
93
|
-
schema: z
|
|
94
|
-
.object({
|
|
95
|
-
domainId: z.string().min(1).describe('The unique domain ID to delete'),
|
|
96
|
-
})
|
|
97
|
-
.strict(),
|
|
98
|
-
endpoint: '/domain.delete',
|
|
99
|
-
annotations: { destructiveHint: true },
|
|
100
|
-
});
|
|
101
|
-
const validateDomain = postTool({
|
|
102
|
-
name: 'dokploy_domain_validate',
|
|
103
|
-
title: 'Validate Domain DNS',
|
|
104
|
-
description: "Validate that a domain's DNS records are correctly configured and pointing to the expected server. Requires the domain name and optionally accepts the expected server IP address. Returns the validation result indicating whether DNS resolution matches.",
|
|
105
|
-
schema: z
|
|
106
|
-
.object({
|
|
107
|
-
domain: z.string().min(1).describe('The domain name to validate'),
|
|
108
|
-
serverIp: z.string().optional().describe('Expected server IP address for DNS validation'),
|
|
109
|
-
})
|
|
110
|
-
.strict(),
|
|
111
|
-
endpoint: '/domain.validateDomain',
|
|
112
|
-
});
|
|
113
|
-
const generateDomain = postTool({
|
|
114
|
-
name: 'dokploy_domain_generate',
|
|
115
|
-
title: 'Generate Domain',
|
|
116
|
-
description: "Generate a default domain for an application using the server's configured base domain. This automatically creates and attaches a subdomain to the specified application. Requires the application ID. Returns the generated domain configuration.",
|
|
117
|
-
schema: z
|
|
118
|
-
.object({
|
|
119
|
-
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
120
|
-
})
|
|
121
|
-
.strict(),
|
|
122
|
-
endpoint: '/domain.generateDomain',
|
|
123
|
-
});
|
|
124
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
125
|
-
export const domainTools = [
|
|
126
|
-
create,
|
|
127
|
-
one,
|
|
128
|
-
byApplicationId,
|
|
129
|
-
byComposeId,
|
|
130
|
-
update,
|
|
131
|
-
deleteDomain,
|
|
132
|
-
validateDomain,
|
|
133
|
-
generateDomain,
|
|
134
|
-
];
|
package/dist/tools/index.d.ts
DELETED
package/dist/tools/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { adminTools } from './admin.js';
|
|
2
|
-
import { applicationTools } from './application.js';
|
|
3
|
-
import { backupTools } from './backup.js';
|
|
4
|
-
import { certificatesTools } from './certificates.js';
|
|
5
|
-
import { clusterTools } from './cluster.js';
|
|
6
|
-
import { composeTools } from './compose.js';
|
|
7
|
-
import { deploymentTools } from './deployment.js';
|
|
8
|
-
import { destinationTools } from './destination.js';
|
|
9
|
-
import { dockerTools } from './docker.js';
|
|
10
|
-
import { domainTools } from './domain.js';
|
|
11
|
-
import { mariadbTools } from './mariadb.js';
|
|
12
|
-
import { mongoTools } from './mongo.js';
|
|
13
|
-
import { mountsTools } from './mounts.js';
|
|
14
|
-
import { mysqlTools } from './mysql.js';
|
|
15
|
-
import { portTools } from './port.js';
|
|
16
|
-
import { postgresTools } from './postgres.js';
|
|
17
|
-
import { projectTools } from './project.js';
|
|
18
|
-
import { redirectsTools } from './redirects.js';
|
|
19
|
-
import { redisTools } from './redis.js';
|
|
20
|
-
import { registryTools } from './registry.js';
|
|
21
|
-
import { securityTools } from './security.js';
|
|
22
|
-
import { settingsTools } from './settings.js';
|
|
23
|
-
import { userTools } from './user.js';
|
|
24
|
-
export const allTools = [
|
|
25
|
-
...projectTools,
|
|
26
|
-
...applicationTools,
|
|
27
|
-
...composeTools,
|
|
28
|
-
...domainTools,
|
|
29
|
-
...postgresTools,
|
|
30
|
-
...mysqlTools,
|
|
31
|
-
...mariadbTools,
|
|
32
|
-
...mongoTools,
|
|
33
|
-
...redisTools,
|
|
34
|
-
...deploymentTools,
|
|
35
|
-
...dockerTools,
|
|
36
|
-
...certificatesTools,
|
|
37
|
-
...registryTools,
|
|
38
|
-
...destinationTools,
|
|
39
|
-
...backupTools,
|
|
40
|
-
...mountsTools,
|
|
41
|
-
...portTools,
|
|
42
|
-
...redirectsTools,
|
|
43
|
-
...securityTools,
|
|
44
|
-
...clusterTools,
|
|
45
|
-
...settingsTools,
|
|
46
|
-
...adminTools,
|
|
47
|
-
...userTools,
|
|
48
|
-
];
|
package/dist/tools/mariadb.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mariadbTools: import("./_factory.js").ToolDefinition[];
|
package/dist/tools/mariadb.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createDatabaseTools } from './_database.js';
|
|
3
|
-
export const mariadbTools = createDatabaseTools({
|
|
4
|
-
type: 'mariadb',
|
|
5
|
-
idField: 'mariadbId',
|
|
6
|
-
displayName: 'MariaDB',
|
|
7
|
-
defaultImage: 'mariadb:11',
|
|
8
|
-
createFields: z.object({
|
|
9
|
-
databaseName: z.string().min(1).describe('Name of the database to create'),
|
|
10
|
-
databaseUser: z.string().min(1).describe('Database user'),
|
|
11
|
-
databasePassword: z.string().min(1).describe('Database password'),
|
|
12
|
-
databaseRootPassword: z.string().min(1).describe('Root password for MariaDB'),
|
|
13
|
-
}),
|
|
14
|
-
});
|
package/dist/tools/mongo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mongoTools: import("./_factory.js").ToolDefinition[];
|
package/dist/tools/mongo.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { createDatabaseTools } from './_database.js';
|
|
3
|
-
export const mongoTools = createDatabaseTools({
|
|
4
|
-
type: 'mongo',
|
|
5
|
-
idField: 'mongoId',
|
|
6
|
-
displayName: 'MongoDB',
|
|
7
|
-
defaultImage: 'mongo:6',
|
|
8
|
-
createFields: z.object({
|
|
9
|
-
databaseUser: z.string().min(1).describe('Database user'),
|
|
10
|
-
databasePassword: z.string().min(1).describe('Database password'),
|
|
11
|
-
}),
|
|
12
|
-
});
|
package/dist/tools/mounts.d.ts
DELETED