@vibetools/dokploy-mcp 2.0.0 → 2.0.1
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.
|
@@ -8,7 +8,13 @@ import { resolveSandboxRuntime } from '../sandbox/runtime.js';
|
|
|
8
8
|
import { runExecuteInSubprocess } from '../sandbox/subprocess-runner.js';
|
|
9
9
|
const executeSchema = z
|
|
10
10
|
.object({
|
|
11
|
-
code: z
|
|
11
|
+
code: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.describe('An async arrow function receiving ({ dokploy, helpers }). ' +
|
|
15
|
+
'Example: async ({ dokploy }) => { const p = await dokploy.project.all(); return p }. ' +
|
|
16
|
+
'dokploy.<module>.<method>(params) calls the Dokploy API. ' +
|
|
17
|
+
'helpers: sleep(ms), assert(cond, msg), pick(obj, keys), limit(arr, n), selectOne(arr, pred).'),
|
|
12
18
|
})
|
|
13
19
|
.strict();
|
|
14
20
|
export function buildExecuteContext(executor, maxCalls = resolveSandboxLimits().maxCalls) {
|
|
@@ -42,7 +48,13 @@ export async function runExecuteWithHost(code, host) {
|
|
|
42
48
|
export const executeTool = createTool({
|
|
43
49
|
name: 'execute',
|
|
44
50
|
title: 'Execute Dokploy Workflow',
|
|
45
|
-
description: 'Execute a sandboxed Dokploy workflow
|
|
51
|
+
description: 'Execute a sandboxed Dokploy workflow. ' +
|
|
52
|
+
'The code parameter must be an async arrow function: async ({ dokploy, helpers }) => { ... }. ' +
|
|
53
|
+
'Use dokploy.<module>.<method>(params) to call any Dokploy API procedure ' +
|
|
54
|
+
'(e.g. dokploy.application.one({ applicationId }), dokploy.project.all()). ' +
|
|
55
|
+
'Available modules: project, environment, application, compose, domain, postgres, mysql, mariadb, mongo, redis, ' +
|
|
56
|
+
'deployment, docker, server, settings, user, notification, backup, mounts, registry, certificates, and more. ' +
|
|
57
|
+
'Use search tool first to discover exact procedure names and required parameters.',
|
|
46
58
|
schema: executeSchema,
|
|
47
59
|
annotations: { openWorldHint: true },
|
|
48
60
|
handler: async ({ input }) => {
|
|
@@ -6,7 +6,13 @@ import { resolveSandboxRuntime } from '../sandbox/runtime.js';
|
|
|
6
6
|
import { runSearchInSubprocess } from '../sandbox/subprocess-runner.js';
|
|
7
7
|
const searchSchema = z
|
|
8
8
|
.object({
|
|
9
|
-
code: z
|
|
9
|
+
code: z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.describe('An async arrow function receiving ({ catalog }). ' +
|
|
13
|
+
'Example: async ({ catalog }) => catalog.searchText("application deploy"). ' +
|
|
14
|
+
'catalog methods: searchText(query), get(procedure), getByTag(tag), ' +
|
|
15
|
+
'endpoints (array of all procedures), byTag (grouped by module).'),
|
|
10
16
|
})
|
|
11
17
|
.strict();
|
|
12
18
|
const searchCatalog = createSearchCatalogView();
|
|
@@ -42,7 +48,12 @@ function trimArrayToBytes(items) {
|
|
|
42
48
|
export const searchTool = createTool({
|
|
43
49
|
name: 'search',
|
|
44
50
|
title: 'Search Dokploy API',
|
|
45
|
-
description: 'Search the Dokploy API catalog
|
|
51
|
+
description: 'Search the Dokploy API catalog to discover procedures, parameters, and modules. ' +
|
|
52
|
+
'The code parameter must be an async arrow function: async ({ catalog }) => { ... }. ' +
|
|
53
|
+
'Use catalog.searchText("query") to find procedures by keyword, ' +
|
|
54
|
+
'catalog.getByTag("application") to list all procedures in a module, ' +
|
|
55
|
+
'catalog.get("application.one") to get details of a specific procedure. ' +
|
|
56
|
+
'Returns procedure names, required/optional parameters, and HTTP methods.',
|
|
46
57
|
schema: searchSchema,
|
|
47
58
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
48
59
|
handler: async ({ input }) => {
|