synapse-mcp 1.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 +607 -0
- package/dist/constants.d.ts +23 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +58 -0
- package/dist/constants.js.map +1 -0
- package/dist/formatters/index.d.ts +275 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +461 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +178 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/common.d.ts +48 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +69 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/discriminator.d.ts +20 -0
- package/dist/schemas/discriminator.d.ts.map +1 -0
- package/dist/schemas/discriminator.js +25 -0
- package/dist/schemas/discriminator.js.map +1 -0
- package/dist/schemas/flux/compose.d.ts +93 -0
- package/dist/schemas/flux/compose.d.ts.map +1 -0
- package/dist/schemas/flux/compose.js +112 -0
- package/dist/schemas/flux/compose.js.map +1 -0
- package/dist/schemas/flux/container.d.ts +144 -0
- package/dist/schemas/flux/container.d.ts.map +1 -0
- package/dist/schemas/flux/container.js +163 -0
- package/dist/schemas/flux/container.js.map +1 -0
- package/dist/schemas/flux/docker.d.ts +91 -0
- package/dist/schemas/flux/docker.d.ts.map +1 -0
- package/dist/schemas/flux/docker.js +101 -0
- package/dist/schemas/flux/docker.js.map +1 -0
- package/dist/schemas/flux/host.d.ts +61 -0
- package/dist/schemas/flux/host.d.ts.map +1 -0
- package/dist/schemas/flux/host.js +72 -0
- package/dist/schemas/flux/host.js.map +1 -0
- package/dist/schemas/flux/index.d.ts +20 -0
- package/dist/schemas/flux/index.d.ts.map +1 -0
- package/dist/schemas/flux/index.js +88 -0
- package/dist/schemas/flux/index.js.map +1 -0
- package/dist/schemas/index.d.ts +11 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +11 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/scout/index.d.ts +151 -0
- package/dist/schemas/scout/index.d.ts.map +1 -0
- package/dist/schemas/scout/index.js +41 -0
- package/dist/schemas/scout/index.js.map +1 -0
- package/dist/schemas/scout/logs.d.ts +48 -0
- package/dist/schemas/scout/logs.d.ts.map +1 -0
- package/dist/schemas/scout/logs.js +47 -0
- package/dist/schemas/scout/logs.js.map +1 -0
- package/dist/schemas/scout/simple.d.ts +68 -0
- package/dist/schemas/scout/simple.d.ts.map +1 -0
- package/dist/schemas/scout/simple.js +75 -0
- package/dist/schemas/scout/simple.js.map +1 -0
- package/dist/schemas/scout/zfs.d.ts +37 -0
- package/dist/schemas/scout/zfs.d.ts.map +1 -0
- package/dist/schemas/scout/zfs.js +36 -0
- package/dist/schemas/scout/zfs.js.map +1 -0
- package/dist/schemas/unified.d.ts +674 -0
- package/dist/schemas/unified.d.ts.map +1 -0
- package/dist/schemas/unified.js +453 -0
- package/dist/schemas/unified.js.map +1 -0
- package/dist/services/compose.d.ts +107 -0
- package/dist/services/compose.d.ts.map +1 -0
- package/dist/services/compose.js +308 -0
- package/dist/services/compose.js.map +1 -0
- package/dist/services/container.d.ts +69 -0
- package/dist/services/container.d.ts.map +1 -0
- package/dist/services/container.js +111 -0
- package/dist/services/container.js.map +1 -0
- package/dist/services/docker.d.ts +243 -0
- package/dist/services/docker.d.ts.map +1 -0
- package/dist/services/docker.js +812 -0
- package/dist/services/docker.js.map +1 -0
- package/dist/services/file-service.d.ts +79 -0
- package/dist/services/file-service.d.ts.map +1 -0
- package/dist/services/file-service.js +226 -0
- package/dist/services/file-service.js.map +1 -0
- package/dist/services/interfaces.d.ts +537 -0
- package/dist/services/interfaces.d.ts.map +1 -0
- package/dist/services/interfaces.js +2 -0
- package/dist/services/interfaces.js.map +1 -0
- package/dist/services/ssh-pool-exec.d.ts +10 -0
- package/dist/services/ssh-pool-exec.d.ts.map +1 -0
- package/dist/services/ssh-pool-exec.js +10 -0
- package/dist/services/ssh-pool-exec.js.map +1 -0
- package/dist/services/ssh-pool.d.ts +66 -0
- package/dist/services/ssh-pool.d.ts.map +1 -0
- package/dist/services/ssh-pool.js +253 -0
- package/dist/services/ssh-pool.js.map +1 -0
- package/dist/services/ssh-service.d.ts +39 -0
- package/dist/services/ssh-service.d.ts.map +1 -0
- package/dist/services/ssh-service.js +143 -0
- package/dist/services/ssh-service.js.map +1 -0
- package/dist/services/ssh.d.ts +37 -0
- package/dist/services/ssh.d.ts.map +1 -0
- package/dist/services/ssh.js +50 -0
- package/dist/services/ssh.js.map +1 -0
- package/dist/tools/flux.d.ts +14 -0
- package/dist/tools/flux.d.ts.map +1 -0
- package/dist/tools/flux.js +86 -0
- package/dist/tools/flux.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +43 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/scout.d.ts +14 -0
- package/dist/tools/scout.d.ts.map +1 -0
- package/dist/tools/scout.js +96 -0
- package/dist/tools/scout.js.map +1 -0
- package/dist/tools/unified.d.ts +7 -0
- package/dist/tools/unified.d.ts.map +1 -0
- package/dist/tools/unified.js +827 -0
- package/dist/tools/unified.js.map +1 -0
- package/dist/types.d.ts +93 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/errors.d.ts +60 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +131 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/help.d.ts +69 -0
- package/dist/utils/help.d.ts.map +1 -0
- package/dist/utils/help.js +259 -0
- package/dist/utils/help.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/path-security.d.ts +64 -0
- package/dist/utils/path-security.d.ts.map +1 -0
- package/dist/utils/path-security.js +138 -0
- package/dist/utils/path-security.js.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// src/schemas/flux/container.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { responseFormatSchema, paginationSchema, hostSchema, containerIdSchema, preprocessWithDiscriminator } from "../common.js";
|
|
4
|
+
import { DEFAULT_LOG_LINES, MAX_LOG_LINES } from "../../constants.js";
|
|
5
|
+
/**
|
|
6
|
+
* Container subaction schemas for Flux tool (14 subactions)
|
|
7
|
+
*/
|
|
8
|
+
export const containerListSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
9
|
+
.object({
|
|
10
|
+
action_subaction: z.literal("container:list"),
|
|
11
|
+
action: z.literal("container"),
|
|
12
|
+
subaction: z.literal("list"),
|
|
13
|
+
host: hostSchema.optional(),
|
|
14
|
+
state: z.enum(["running", "exited", "paused", "restarting", "all"]).default("all"),
|
|
15
|
+
name_filter: z.string().optional().describe("Partial match on container name"),
|
|
16
|
+
image_filter: z.string().optional().describe("Partial match on image name"),
|
|
17
|
+
label_filter: z.string().optional().describe("Key-value pairs in format key=value"),
|
|
18
|
+
...paginationSchema.shape,
|
|
19
|
+
response_format: responseFormatSchema
|
|
20
|
+
})
|
|
21
|
+
.describe("List containers with optional filtering"));
|
|
22
|
+
export const containerStartSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
23
|
+
.object({
|
|
24
|
+
action_subaction: z.literal("container:start"),
|
|
25
|
+
action: z.literal("container"),
|
|
26
|
+
subaction: z.literal("start"),
|
|
27
|
+
container_id: containerIdSchema,
|
|
28
|
+
host: hostSchema.optional(),
|
|
29
|
+
response_format: responseFormatSchema
|
|
30
|
+
})
|
|
31
|
+
.describe("Start a stopped container"));
|
|
32
|
+
export const containerStopSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
33
|
+
.object({
|
|
34
|
+
action_subaction: z.literal("container:stop"),
|
|
35
|
+
action: z.literal("container"),
|
|
36
|
+
subaction: z.literal("stop"),
|
|
37
|
+
container_id: containerIdSchema,
|
|
38
|
+
host: hostSchema.optional(),
|
|
39
|
+
response_format: responseFormatSchema
|
|
40
|
+
})
|
|
41
|
+
.describe("Stop a running container"));
|
|
42
|
+
export const containerRestartSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
43
|
+
.object({
|
|
44
|
+
action_subaction: z.literal("container:restart"),
|
|
45
|
+
action: z.literal("container"),
|
|
46
|
+
subaction: z.literal("restart"),
|
|
47
|
+
container_id: containerIdSchema,
|
|
48
|
+
host: hostSchema.optional(),
|
|
49
|
+
response_format: responseFormatSchema
|
|
50
|
+
})
|
|
51
|
+
.describe("Restart a container"));
|
|
52
|
+
export const containerPauseSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
53
|
+
.object({
|
|
54
|
+
action_subaction: z.literal("container:pause"),
|
|
55
|
+
action: z.literal("container"),
|
|
56
|
+
subaction: z.literal("pause"),
|
|
57
|
+
container_id: containerIdSchema,
|
|
58
|
+
host: hostSchema.optional(),
|
|
59
|
+
response_format: responseFormatSchema
|
|
60
|
+
})
|
|
61
|
+
.describe("Pause a running container"));
|
|
62
|
+
export const containerResumeSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
63
|
+
.object({
|
|
64
|
+
action_subaction: z.literal("container:resume"),
|
|
65
|
+
action: z.literal("container"),
|
|
66
|
+
subaction: z.literal("resume"),
|
|
67
|
+
container_id: containerIdSchema,
|
|
68
|
+
host: hostSchema.optional(),
|
|
69
|
+
response_format: responseFormatSchema
|
|
70
|
+
})
|
|
71
|
+
.describe("Resume a paused container"));
|
|
72
|
+
export const containerLogsSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
73
|
+
.object({
|
|
74
|
+
action_subaction: z.literal("container:logs"),
|
|
75
|
+
action: z.literal("container"),
|
|
76
|
+
subaction: z.literal("logs"),
|
|
77
|
+
container_id: containerIdSchema,
|
|
78
|
+
host: hostSchema.optional(),
|
|
79
|
+
lines: z.number().int().min(1).max(MAX_LOG_LINES).default(DEFAULT_LOG_LINES),
|
|
80
|
+
since: z.string().optional().describe('ISO 8601 timestamp or relative time (e.g., "1h")'),
|
|
81
|
+
until: z.string().optional().describe("ISO 8601 timestamp or relative time"),
|
|
82
|
+
grep: z.string().optional().describe("Filter log lines containing this string"),
|
|
83
|
+
stream: z.enum(["stdout", "stderr", "both"]).default("both"),
|
|
84
|
+
response_format: responseFormatSchema
|
|
85
|
+
})
|
|
86
|
+
.describe("Get container logs with optional filtering"));
|
|
87
|
+
export const containerStatsSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
88
|
+
.object({
|
|
89
|
+
action_subaction: z.literal("container:stats"),
|
|
90
|
+
action: z.literal("container"),
|
|
91
|
+
subaction: z.literal("stats"),
|
|
92
|
+
container_id: containerIdSchema.optional(),
|
|
93
|
+
host: hostSchema.optional(),
|
|
94
|
+
response_format: responseFormatSchema
|
|
95
|
+
})
|
|
96
|
+
.describe("Get resource usage statistics"));
|
|
97
|
+
export const containerInspectSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
98
|
+
.object({
|
|
99
|
+
action_subaction: z.literal("container:inspect"),
|
|
100
|
+
action: z.literal("container"),
|
|
101
|
+
subaction: z.literal("inspect"),
|
|
102
|
+
container_id: containerIdSchema,
|
|
103
|
+
host: hostSchema.optional(),
|
|
104
|
+
summary: z.boolean().default(false).describe("true = basic info only, false = full details"),
|
|
105
|
+
response_format: responseFormatSchema
|
|
106
|
+
})
|
|
107
|
+
.describe("Get detailed container information"));
|
|
108
|
+
export const containerSearchSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
109
|
+
.object({
|
|
110
|
+
action_subaction: z.literal("container:search"),
|
|
111
|
+
action: z.literal("container"),
|
|
112
|
+
subaction: z.literal("search"),
|
|
113
|
+
query: z.string().min(1).describe("Full-text search string"),
|
|
114
|
+
host: hostSchema.optional(),
|
|
115
|
+
...paginationSchema.shape,
|
|
116
|
+
response_format: responseFormatSchema
|
|
117
|
+
})
|
|
118
|
+
.describe("Search containers by query string"));
|
|
119
|
+
export const containerPullSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
120
|
+
.object({
|
|
121
|
+
action_subaction: z.literal("container:pull"),
|
|
122
|
+
action: z.literal("container"),
|
|
123
|
+
subaction: z.literal("pull"),
|
|
124
|
+
container_id: containerIdSchema,
|
|
125
|
+
host: hostSchema.optional(),
|
|
126
|
+
response_format: responseFormatSchema
|
|
127
|
+
})
|
|
128
|
+
.describe("Pull latest image for a container"));
|
|
129
|
+
export const containerRecreateSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
130
|
+
.object({
|
|
131
|
+
action_subaction: z.literal("container:recreate"),
|
|
132
|
+
action: z.literal("container"),
|
|
133
|
+
subaction: z.literal("recreate"),
|
|
134
|
+
container_id: containerIdSchema,
|
|
135
|
+
host: hostSchema.optional(),
|
|
136
|
+
pull: z.boolean().default(true).describe("Pull latest image before recreate"),
|
|
137
|
+
response_format: responseFormatSchema
|
|
138
|
+
})
|
|
139
|
+
.describe("Recreate a container with optional image pull"));
|
|
140
|
+
export const containerExecSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
141
|
+
.object({
|
|
142
|
+
action_subaction: z.literal("container:exec"),
|
|
143
|
+
action: z.literal("container"),
|
|
144
|
+
subaction: z.literal("exec"),
|
|
145
|
+
container_id: containerIdSchema,
|
|
146
|
+
host: hostSchema.optional(),
|
|
147
|
+
command: z.string().min(1).describe("Shell command to execute"),
|
|
148
|
+
user: z.string().optional().describe("Run as specific user"),
|
|
149
|
+
workdir: z.string().optional().describe("Working directory for command execution"),
|
|
150
|
+
response_format: responseFormatSchema
|
|
151
|
+
})
|
|
152
|
+
.describe("Execute command inside a container"));
|
|
153
|
+
export const containerTopSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
154
|
+
.object({
|
|
155
|
+
action_subaction: z.literal("container:top"),
|
|
156
|
+
action: z.literal("container"),
|
|
157
|
+
subaction: z.literal("top"),
|
|
158
|
+
container_id: containerIdSchema,
|
|
159
|
+
host: hostSchema.optional(),
|
|
160
|
+
response_format: responseFormatSchema
|
|
161
|
+
})
|
|
162
|
+
.describe("Show running processes in a container"));
|
|
163
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/schemas/flux/container.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtE;;GAEG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,UAAU,CAC7C,2BAA2B,EAC3B,CAAC;KACE,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAClF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC9E,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAC3E,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,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CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAC/D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAC5D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAClF,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,QAAQ,CAAC,oCAAoC,CAAC,CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,UAAU,CAC5C,2BAA2B,EAC3B,CAAC;KACE,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3B,YAAY,EAAE,iBAAiB;IAC/B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,QAAQ,CAAC,uCAAuC,CAAC,CACrD,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Docker subaction schemas for Flux tool (9 subactions)
|
|
4
|
+
*/
|
|
5
|
+
export declare const dockerInfoSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
6
|
+
action_subaction: z.ZodLiteral<"docker:info">;
|
|
7
|
+
action: z.ZodLiteral<"docker">;
|
|
8
|
+
subaction: z.ZodLiteral<"info">;
|
|
9
|
+
host: z.ZodString;
|
|
10
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
export declare const dockerDfSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
13
|
+
action_subaction: z.ZodLiteral<"docker:df">;
|
|
14
|
+
action: z.ZodLiteral<"docker">;
|
|
15
|
+
subaction: z.ZodLiteral<"df">;
|
|
16
|
+
host: z.ZodString;
|
|
17
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
export declare const dockerPruneSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
20
|
+
action_subaction: z.ZodLiteral<"docker:prune">;
|
|
21
|
+
action: z.ZodLiteral<"docker">;
|
|
22
|
+
subaction: z.ZodLiteral<"prune">;
|
|
23
|
+
host: z.ZodString;
|
|
24
|
+
prune_target: z.ZodEnum<{
|
|
25
|
+
all: "all";
|
|
26
|
+
containers: "containers";
|
|
27
|
+
images: "images";
|
|
28
|
+
volumes: "volumes";
|
|
29
|
+
networks: "networks";
|
|
30
|
+
buildcache: "buildcache";
|
|
31
|
+
}>;
|
|
32
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
export declare const dockerImagesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
36
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
37
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
38
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
39
|
+
action_subaction: z.ZodLiteral<"docker:images">;
|
|
40
|
+
action: z.ZodLiteral<"docker">;
|
|
41
|
+
subaction: z.ZodLiteral<"images">;
|
|
42
|
+
host: z.ZodOptional<z.ZodString>;
|
|
43
|
+
dangling_only: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
export declare const dockerPullSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
46
|
+
action_subaction: z.ZodLiteral<"docker:pull">;
|
|
47
|
+
action: z.ZodLiteral<"docker">;
|
|
48
|
+
subaction: z.ZodLiteral<"pull">;
|
|
49
|
+
host: z.ZodString;
|
|
50
|
+
image: z.ZodString;
|
|
51
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
export declare const dockerBuildSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
54
|
+
action_subaction: z.ZodLiteral<"docker:build">;
|
|
55
|
+
action: z.ZodLiteral<"docker">;
|
|
56
|
+
subaction: z.ZodLiteral<"build">;
|
|
57
|
+
host: z.ZodString;
|
|
58
|
+
context: z.ZodString;
|
|
59
|
+
tag: z.ZodString;
|
|
60
|
+
dockerfile: z.ZodDefault<z.ZodString>;
|
|
61
|
+
no_cache: z.ZodDefault<z.ZodBoolean>;
|
|
62
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
export declare const dockerRmiSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
65
|
+
action_subaction: z.ZodLiteral<"docker:rmi">;
|
|
66
|
+
action: z.ZodLiteral<"docker">;
|
|
67
|
+
subaction: z.ZodLiteral<"rmi">;
|
|
68
|
+
host: z.ZodString;
|
|
69
|
+
image: z.ZodString;
|
|
70
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
export declare const dockerNetworksSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
74
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
75
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
76
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
77
|
+
action_subaction: z.ZodLiteral<"docker:networks">;
|
|
78
|
+
action: z.ZodLiteral<"docker">;
|
|
79
|
+
subaction: z.ZodLiteral<"networks">;
|
|
80
|
+
host: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
export declare const dockerVolumesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
83
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
84
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
action_subaction: z.ZodLiteral<"docker:volumes">;
|
|
87
|
+
action: z.ZodLiteral<"docker">;
|
|
88
|
+
subaction: z.ZodLiteral<"volumes">;
|
|
89
|
+
host: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
//# sourceMappingURL=docker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../src/schemas/flux/docker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AAEH,eAAO,MAAM,gBAAgB;;;;;;kBAW5B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;kBAW1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAa7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;kBAa9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;kBAY5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAe7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;kBAa3B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;kBAYhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;kBAY/B,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// src/schemas/flux/docker.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { responseFormatSchema, paginationSchema, hostSchema, imageSchema, preprocessWithDiscriminator } from "../common.js";
|
|
4
|
+
/**
|
|
5
|
+
* Docker subaction schemas for Flux tool (9 subactions)
|
|
6
|
+
*/
|
|
7
|
+
export const dockerInfoSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
8
|
+
.object({
|
|
9
|
+
action_subaction: z.literal("docker:info"),
|
|
10
|
+
action: z.literal("docker"),
|
|
11
|
+
subaction: z.literal("info"),
|
|
12
|
+
host: hostSchema,
|
|
13
|
+
response_format: responseFormatSchema
|
|
14
|
+
})
|
|
15
|
+
.describe("Get Docker daemon information"));
|
|
16
|
+
export const dockerDfSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
17
|
+
.object({
|
|
18
|
+
action_subaction: z.literal("docker:df"),
|
|
19
|
+
action: z.literal("docker"),
|
|
20
|
+
subaction: z.literal("df"),
|
|
21
|
+
host: hostSchema,
|
|
22
|
+
response_format: responseFormatSchema
|
|
23
|
+
})
|
|
24
|
+
.describe("Get Docker disk usage information"));
|
|
25
|
+
export const dockerPruneSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
26
|
+
.object({
|
|
27
|
+
action_subaction: z.literal("docker:prune"),
|
|
28
|
+
action: z.literal("docker"),
|
|
29
|
+
subaction: z.literal("prune"),
|
|
30
|
+
host: hostSchema,
|
|
31
|
+
prune_target: z.enum(["containers", "images", "volumes", "networks", "buildcache", "all"]),
|
|
32
|
+
force: z.boolean().default(false),
|
|
33
|
+
response_format: responseFormatSchema
|
|
34
|
+
})
|
|
35
|
+
.describe("Remove unused Docker resources"));
|
|
36
|
+
export const dockerImagesSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
37
|
+
.object({
|
|
38
|
+
action_subaction: z.literal("docker:images"),
|
|
39
|
+
action: z.literal("docker"),
|
|
40
|
+
subaction: z.literal("images"),
|
|
41
|
+
host: hostSchema.optional(),
|
|
42
|
+
dangling_only: z.boolean().default(false).describe("Only show untagged images"),
|
|
43
|
+
...paginationSchema.shape,
|
|
44
|
+
response_format: responseFormatSchema
|
|
45
|
+
})
|
|
46
|
+
.describe("List Docker images"));
|
|
47
|
+
export const dockerPullSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
48
|
+
.object({
|
|
49
|
+
action_subaction: z.literal("docker:pull"),
|
|
50
|
+
action: z.literal("docker"),
|
|
51
|
+
subaction: z.literal("pull"),
|
|
52
|
+
host: hostSchema,
|
|
53
|
+
image: imageSchema,
|
|
54
|
+
response_format: responseFormatSchema
|
|
55
|
+
})
|
|
56
|
+
.describe("Pull a Docker image"));
|
|
57
|
+
export const dockerBuildSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
58
|
+
.object({
|
|
59
|
+
action_subaction: z.literal("docker:build"),
|
|
60
|
+
action: z.literal("docker"),
|
|
61
|
+
subaction: z.literal("build"),
|
|
62
|
+
host: hostSchema,
|
|
63
|
+
context: z.string().min(1).describe("Path to build context directory"),
|
|
64
|
+
tag: z.string().min(1).describe("Image name:tag for the built image"),
|
|
65
|
+
dockerfile: z.string().default("Dockerfile").describe("Path to Dockerfile"),
|
|
66
|
+
no_cache: z.boolean().default(false),
|
|
67
|
+
response_format: responseFormatSchema
|
|
68
|
+
})
|
|
69
|
+
.describe("Build a Docker image"));
|
|
70
|
+
export const dockerRmiSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
71
|
+
.object({
|
|
72
|
+
action_subaction: z.literal("docker:rmi"),
|
|
73
|
+
action: z.literal("docker"),
|
|
74
|
+
subaction: z.literal("rmi"),
|
|
75
|
+
host: hostSchema,
|
|
76
|
+
image: imageSchema,
|
|
77
|
+
force: z.boolean().default(false),
|
|
78
|
+
response_format: responseFormatSchema
|
|
79
|
+
})
|
|
80
|
+
.describe("Remove a Docker image"));
|
|
81
|
+
export const dockerNetworksSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
82
|
+
.object({
|
|
83
|
+
action_subaction: z.literal("docker:networks"),
|
|
84
|
+
action: z.literal("docker"),
|
|
85
|
+
subaction: z.literal("networks"),
|
|
86
|
+
host: hostSchema.optional(),
|
|
87
|
+
...paginationSchema.shape,
|
|
88
|
+
response_format: responseFormatSchema
|
|
89
|
+
})
|
|
90
|
+
.describe("List Docker networks"));
|
|
91
|
+
export const dockerVolumesSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
92
|
+
.object({
|
|
93
|
+
action_subaction: z.literal("docker:volumes"),
|
|
94
|
+
action: z.literal("docker"),
|
|
95
|
+
subaction: z.literal("volumes"),
|
|
96
|
+
host: hostSchema.optional(),
|
|
97
|
+
...paginationSchema.shape,
|
|
98
|
+
response_format: responseFormatSchema
|
|
99
|
+
})
|
|
100
|
+
.describe("List Docker volumes"));
|
|
101
|
+
//# sourceMappingURL=docker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../src/schemas/flux/docker.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,2BAA2B,EAC5B,MAAM,cAAc,CAAC;AAEtB;;GAEG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,UAAU,CAC1C,2BAA2B,EAC3B,CAAC;KACE,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,UAAU;IAChB,eAAe,EAAE,oBAAoB;CACtC,C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AAC;KACE,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC/B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,GAAG,gBAAgB,CAAC,KAAK;IACzB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,QAAQ,CAAC,qBAAqB,CAAC,CACnC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Host subaction schemas for Flux tool (7 subactions)
|
|
4
|
+
*/
|
|
5
|
+
export declare const hostStatusSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
6
|
+
action_subaction: z.ZodLiteral<"host:status">;
|
|
7
|
+
action: z.ZodLiteral<"host">;
|
|
8
|
+
subaction: z.ZodLiteral<"status">;
|
|
9
|
+
host: z.ZodOptional<z.ZodString>;
|
|
10
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
export declare const hostResourcesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
13
|
+
action_subaction: z.ZodLiteral<"host:resources">;
|
|
14
|
+
action: z.ZodLiteral<"host">;
|
|
15
|
+
subaction: z.ZodLiteral<"resources">;
|
|
16
|
+
host: z.ZodOptional<z.ZodString>;
|
|
17
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
export declare const hostInfoSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
20
|
+
action_subaction: z.ZodLiteral<"host:info">;
|
|
21
|
+
action: z.ZodLiteral<"host">;
|
|
22
|
+
subaction: z.ZodLiteral<"info">;
|
|
23
|
+
host: z.ZodOptional<z.ZodString>;
|
|
24
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
export declare const hostUptimeSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
27
|
+
action_subaction: z.ZodLiteral<"host:uptime">;
|
|
28
|
+
action: z.ZodLiteral<"host">;
|
|
29
|
+
subaction: z.ZodLiteral<"uptime">;
|
|
30
|
+
host: z.ZodOptional<z.ZodString>;
|
|
31
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
export declare const hostServicesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
34
|
+
action_subaction: z.ZodLiteral<"host:services">;
|
|
35
|
+
action: z.ZodLiteral<"host">;
|
|
36
|
+
subaction: z.ZodLiteral<"services">;
|
|
37
|
+
host: z.ZodOptional<z.ZodString>;
|
|
38
|
+
service: z.ZodOptional<z.ZodString>;
|
|
39
|
+
state: z.ZodDefault<z.ZodEnum<{
|
|
40
|
+
running: "running";
|
|
41
|
+
stopped: "stopped";
|
|
42
|
+
all: "all";
|
|
43
|
+
failed: "failed";
|
|
44
|
+
}>>;
|
|
45
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
export declare const hostNetworkSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
48
|
+
action_subaction: z.ZodLiteral<"host:network">;
|
|
49
|
+
action: z.ZodLiteral<"host">;
|
|
50
|
+
subaction: z.ZodLiteral<"network">;
|
|
51
|
+
host: z.ZodOptional<z.ZodString>;
|
|
52
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
export declare const hostMountsSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
55
|
+
action_subaction: z.ZodLiteral<"host:mounts">;
|
|
56
|
+
action: z.ZodLiteral<"host">;
|
|
57
|
+
subaction: z.ZodLiteral<"mounts">;
|
|
58
|
+
host: z.ZodOptional<z.ZodString>;
|
|
59
|
+
response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/schemas/flux/host.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AAEH,eAAO,MAAM,gBAAgB;;;;;;kBAW5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;kBAW/B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;kBAW1B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;kBAW5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;kBAa9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;kBAW7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;kBAW5B,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// src/schemas/flux/host.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { responseFormatSchema, hostSchema, preprocessWithDiscriminator } from "../common.js";
|
|
4
|
+
/**
|
|
5
|
+
* Host subaction schemas for Flux tool (7 subactions)
|
|
6
|
+
*/
|
|
7
|
+
export const hostStatusSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
8
|
+
.object({
|
|
9
|
+
action_subaction: z.literal("host:status"),
|
|
10
|
+
action: z.literal("host"),
|
|
11
|
+
subaction: z.literal("status"),
|
|
12
|
+
host: hostSchema.optional(),
|
|
13
|
+
response_format: responseFormatSchema
|
|
14
|
+
})
|
|
15
|
+
.describe("Check Docker connectivity to host"));
|
|
16
|
+
export const hostResourcesSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
17
|
+
.object({
|
|
18
|
+
action_subaction: z.literal("host:resources"),
|
|
19
|
+
action: z.literal("host"),
|
|
20
|
+
subaction: z.literal("resources"),
|
|
21
|
+
host: hostSchema.optional(),
|
|
22
|
+
response_format: responseFormatSchema
|
|
23
|
+
})
|
|
24
|
+
.describe("Get CPU, memory, and disk usage via SSH"));
|
|
25
|
+
export const hostInfoSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
26
|
+
.object({
|
|
27
|
+
action_subaction: z.literal("host:info"),
|
|
28
|
+
action: z.literal("host"),
|
|
29
|
+
subaction: z.literal("info"),
|
|
30
|
+
host: hostSchema.optional(),
|
|
31
|
+
response_format: responseFormatSchema
|
|
32
|
+
})
|
|
33
|
+
.describe("Get OS, kernel, architecture, and hostname information"));
|
|
34
|
+
export const hostUptimeSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
35
|
+
.object({
|
|
36
|
+
action_subaction: z.literal("host:uptime"),
|
|
37
|
+
action: z.literal("host"),
|
|
38
|
+
subaction: z.literal("uptime"),
|
|
39
|
+
host: hostSchema.optional(),
|
|
40
|
+
response_format: responseFormatSchema
|
|
41
|
+
})
|
|
42
|
+
.describe("Get system uptime"));
|
|
43
|
+
export const hostServicesSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
44
|
+
.object({
|
|
45
|
+
action_subaction: z.literal("host:services"),
|
|
46
|
+
action: z.literal("host"),
|
|
47
|
+
subaction: z.literal("services"),
|
|
48
|
+
host: hostSchema.optional(),
|
|
49
|
+
service: z.string().optional().describe("Specific systemd service name"),
|
|
50
|
+
state: z.enum(["running", "stopped", "failed", "all"]).default("all"),
|
|
51
|
+
response_format: responseFormatSchema
|
|
52
|
+
})
|
|
53
|
+
.describe("Get systemd service status"));
|
|
54
|
+
export const hostNetworkSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
55
|
+
.object({
|
|
56
|
+
action_subaction: z.literal("host:network"),
|
|
57
|
+
action: z.literal("host"),
|
|
58
|
+
subaction: z.literal("network"),
|
|
59
|
+
host: hostSchema.optional(),
|
|
60
|
+
response_format: responseFormatSchema
|
|
61
|
+
})
|
|
62
|
+
.describe("Get network interfaces and IP addresses"));
|
|
63
|
+
export const hostMountsSchema = z.preprocess(preprocessWithDiscriminator, z
|
|
64
|
+
.object({
|
|
65
|
+
action_subaction: z.literal("host:mounts"),
|
|
66
|
+
action: z.literal("host"),
|
|
67
|
+
subaction: z.literal("mounts"),
|
|
68
|
+
host: hostSchema.optional(),
|
|
69
|
+
response_format: responseFormatSchema
|
|
70
|
+
})
|
|
71
|
+
.describe("Get mounted filesystems"));
|
|
72
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../../src/schemas/flux/host.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE7F;;GAEG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,UAAU,CAC1C,2BAA2B,EAC3B,CAAC;KACE,MAAM,CAAC;IACN,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,QAAQ,CAAC,mCAAmC,CA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OAAO,CAAC,QAAQ,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,QAAQ,CAAC,yBAAyB,CAAC,CACvC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Flux Tool Schema - Docker infrastructure management
|
|
4
|
+
*
|
|
5
|
+
* Actions: 4 (container, compose, docker, host)
|
|
6
|
+
* Subactions: 39 total
|
|
7
|
+
* - container: 14 (list, start, stop, restart, pause, resume, logs, stats, inspect, search, pull, recreate, exec, top)
|
|
8
|
+
* - compose: 9 (list, status, up, down, restart, logs, build, pull, recreate)
|
|
9
|
+
* - docker: 9 (info, df, prune, images, pull, build, rmi, networks, volumes)
|
|
10
|
+
* - host: 7 (status, resources, info, uptime, services, network, mounts)
|
|
11
|
+
*
|
|
12
|
+
* Uses composite discriminator: action_subaction (e.g., "container:list")
|
|
13
|
+
*/
|
|
14
|
+
export declare const FluxSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<any, z.core.$strip>, z.ZodObject<any, z.core.$strip>, ...z.ZodObject<any, z.core.$strip>[]], "action_subaction">>;
|
|
15
|
+
export type FluxInput = z.infer<typeof FluxSchema>;
|
|
16
|
+
export * from "./container.js";
|
|
17
|
+
export * from "./compose.js";
|
|
18
|
+
export * from "./docker.js";
|
|
19
|
+
export * from "./host.js";
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/flux/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoHxB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,oMAGtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAGnD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/schemas/flux/index.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { preprocessWithDiscriminator } from "../common.js";
|
|
4
|
+
// Import all schemas
|
|
5
|
+
import { containerListSchema, containerStartSchema, containerStopSchema, containerRestartSchema, containerPauseSchema, containerResumeSchema, containerLogsSchema, containerStatsSchema, containerInspectSchema, containerSearchSchema, containerPullSchema, containerRecreateSchema, containerExecSchema, containerTopSchema } from "./container.js";
|
|
6
|
+
import { composeListSchema, composeStatusSchema, composeUpSchema, composeDownSchema, composeRestartSchema, composeLogsSchema, composeBuildSchema, composePullSchema, composeRecreateSchema } from "./compose.js";
|
|
7
|
+
import { dockerInfoSchema, dockerDfSchema, dockerPruneSchema, dockerImagesSchema, dockerPullSchema, dockerBuildSchema, dockerRmiSchema, dockerNetworksSchema, dockerVolumesSchema } from "./docker.js";
|
|
8
|
+
import { hostStatusSchema, hostResourcesSchema, hostInfoSchema, hostUptimeSchema, hostServicesSchema, hostNetworkSchema, hostMountsSchema } from "./host.js";
|
|
9
|
+
/**
|
|
10
|
+
* Extract inner schema from z.preprocess wrapper
|
|
11
|
+
* Handles both Zod 3.x (innerType) and Zod 4.x (pipe structure)
|
|
12
|
+
*/
|
|
13
|
+
function unwrapPreprocess(schema) {
|
|
14
|
+
const def = schema._def;
|
|
15
|
+
// Zod 4.x: z.preprocess creates a pipe with type='pipe' and out field
|
|
16
|
+
if (def?.type === 'pipe' && def?.out)
|
|
17
|
+
return def.out;
|
|
18
|
+
// Zod 3.x uses 'innerType'
|
|
19
|
+
if (def?.innerType)
|
|
20
|
+
return def.innerType;
|
|
21
|
+
// Return as-is if not wrapped
|
|
22
|
+
return schema;
|
|
23
|
+
}
|
|
24
|
+
// All inner schemas (unwrapped from preprocess)
|
|
25
|
+
const allSchemas = [
|
|
26
|
+
// Container (14)
|
|
27
|
+
containerListSchema,
|
|
28
|
+
containerStartSchema,
|
|
29
|
+
containerStopSchema,
|
|
30
|
+
containerRestartSchema,
|
|
31
|
+
containerPauseSchema,
|
|
32
|
+
containerResumeSchema,
|
|
33
|
+
containerLogsSchema,
|
|
34
|
+
containerStatsSchema,
|
|
35
|
+
containerInspectSchema,
|
|
36
|
+
containerSearchSchema,
|
|
37
|
+
containerPullSchema,
|
|
38
|
+
containerRecreateSchema,
|
|
39
|
+
containerExecSchema,
|
|
40
|
+
containerTopSchema,
|
|
41
|
+
// Compose (9)
|
|
42
|
+
composeListSchema,
|
|
43
|
+
composeStatusSchema,
|
|
44
|
+
composeUpSchema,
|
|
45
|
+
composeDownSchema,
|
|
46
|
+
composeRestartSchema,
|
|
47
|
+
composeLogsSchema,
|
|
48
|
+
composeBuildSchema,
|
|
49
|
+
composePullSchema,
|
|
50
|
+
composeRecreateSchema,
|
|
51
|
+
// Docker (9)
|
|
52
|
+
dockerInfoSchema,
|
|
53
|
+
dockerDfSchema,
|
|
54
|
+
dockerPruneSchema,
|
|
55
|
+
dockerImagesSchema,
|
|
56
|
+
dockerPullSchema,
|
|
57
|
+
dockerBuildSchema,
|
|
58
|
+
dockerRmiSchema,
|
|
59
|
+
dockerNetworksSchema,
|
|
60
|
+
dockerVolumesSchema,
|
|
61
|
+
// Host (7)
|
|
62
|
+
hostStatusSchema,
|
|
63
|
+
hostResourcesSchema,
|
|
64
|
+
hostInfoSchema,
|
|
65
|
+
hostUptimeSchema,
|
|
66
|
+
hostServicesSchema,
|
|
67
|
+
hostNetworkSchema,
|
|
68
|
+
hostMountsSchema
|
|
69
|
+
].map(unwrapPreprocess);
|
|
70
|
+
/**
|
|
71
|
+
* Flux Tool Schema - Docker infrastructure management
|
|
72
|
+
*
|
|
73
|
+
* Actions: 4 (container, compose, docker, host)
|
|
74
|
+
* Subactions: 39 total
|
|
75
|
+
* - container: 14 (list, start, stop, restart, pause, resume, logs, stats, inspect, search, pull, recreate, exec, top)
|
|
76
|
+
* - compose: 9 (list, status, up, down, restart, logs, build, pull, recreate)
|
|
77
|
+
* - docker: 9 (info, df, prune, images, pull, build, rmi, networks, volumes)
|
|
78
|
+
* - host: 7 (status, resources, info, uptime, services, network, mounts)
|
|
79
|
+
*
|
|
80
|
+
* Uses composite discriminator: action_subaction (e.g., "container:list")
|
|
81
|
+
*/
|
|
82
|
+
export const FluxSchema = z.preprocess(preprocessWithDiscriminator, z.discriminatedUnion("action_subaction", allSchemas));
|
|
83
|
+
// Re-export all schemas
|
|
84
|
+
export * from "./container.js";
|
|
85
|
+
export * from "./compose.js";
|
|
86
|
+
export * from "./docker.js";
|
|
87
|
+
export * from "./host.js";
|
|
88
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/flux/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,qBAAqB;AACrB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EACl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