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.
Files changed (138) hide show
  1. package/README.md +607 -0
  2. package/dist/constants.d.ts +23 -0
  3. package/dist/constants.d.ts.map +1 -0
  4. package/dist/constants.js +58 -0
  5. package/dist/constants.js.map +1 -0
  6. package/dist/formatters/index.d.ts +275 -0
  7. package/dist/formatters/index.d.ts.map +1 -0
  8. package/dist/formatters/index.js +461 -0
  9. package/dist/formatters/index.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +178 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/schemas/common.d.ts +48 -0
  15. package/dist/schemas/common.d.ts.map +1 -0
  16. package/dist/schemas/common.js +69 -0
  17. package/dist/schemas/common.js.map +1 -0
  18. package/dist/schemas/discriminator.d.ts +20 -0
  19. package/dist/schemas/discriminator.d.ts.map +1 -0
  20. package/dist/schemas/discriminator.js +25 -0
  21. package/dist/schemas/discriminator.js.map +1 -0
  22. package/dist/schemas/flux/compose.d.ts +93 -0
  23. package/dist/schemas/flux/compose.d.ts.map +1 -0
  24. package/dist/schemas/flux/compose.js +112 -0
  25. package/dist/schemas/flux/compose.js.map +1 -0
  26. package/dist/schemas/flux/container.d.ts +144 -0
  27. package/dist/schemas/flux/container.d.ts.map +1 -0
  28. package/dist/schemas/flux/container.js +163 -0
  29. package/dist/schemas/flux/container.js.map +1 -0
  30. package/dist/schemas/flux/docker.d.ts +91 -0
  31. package/dist/schemas/flux/docker.d.ts.map +1 -0
  32. package/dist/schemas/flux/docker.js +101 -0
  33. package/dist/schemas/flux/docker.js.map +1 -0
  34. package/dist/schemas/flux/host.d.ts +61 -0
  35. package/dist/schemas/flux/host.d.ts.map +1 -0
  36. package/dist/schemas/flux/host.js +72 -0
  37. package/dist/schemas/flux/host.js.map +1 -0
  38. package/dist/schemas/flux/index.d.ts +20 -0
  39. package/dist/schemas/flux/index.d.ts.map +1 -0
  40. package/dist/schemas/flux/index.js +88 -0
  41. package/dist/schemas/flux/index.js.map +1 -0
  42. package/dist/schemas/index.d.ts +11 -0
  43. package/dist/schemas/index.d.ts.map +1 -0
  44. package/dist/schemas/index.js +11 -0
  45. package/dist/schemas/index.js.map +1 -0
  46. package/dist/schemas/scout/index.d.ts +151 -0
  47. package/dist/schemas/scout/index.d.ts.map +1 -0
  48. package/dist/schemas/scout/index.js +41 -0
  49. package/dist/schemas/scout/index.js.map +1 -0
  50. package/dist/schemas/scout/logs.d.ts +48 -0
  51. package/dist/schemas/scout/logs.d.ts.map +1 -0
  52. package/dist/schemas/scout/logs.js +47 -0
  53. package/dist/schemas/scout/logs.js.map +1 -0
  54. package/dist/schemas/scout/simple.d.ts +68 -0
  55. package/dist/schemas/scout/simple.d.ts.map +1 -0
  56. package/dist/schemas/scout/simple.js +75 -0
  57. package/dist/schemas/scout/simple.js.map +1 -0
  58. package/dist/schemas/scout/zfs.d.ts +37 -0
  59. package/dist/schemas/scout/zfs.d.ts.map +1 -0
  60. package/dist/schemas/scout/zfs.js +36 -0
  61. package/dist/schemas/scout/zfs.js.map +1 -0
  62. package/dist/schemas/unified.d.ts +674 -0
  63. package/dist/schemas/unified.d.ts.map +1 -0
  64. package/dist/schemas/unified.js +453 -0
  65. package/dist/schemas/unified.js.map +1 -0
  66. package/dist/services/compose.d.ts +107 -0
  67. package/dist/services/compose.d.ts.map +1 -0
  68. package/dist/services/compose.js +308 -0
  69. package/dist/services/compose.js.map +1 -0
  70. package/dist/services/container.d.ts +69 -0
  71. package/dist/services/container.d.ts.map +1 -0
  72. package/dist/services/container.js +111 -0
  73. package/dist/services/container.js.map +1 -0
  74. package/dist/services/docker.d.ts +243 -0
  75. package/dist/services/docker.d.ts.map +1 -0
  76. package/dist/services/docker.js +812 -0
  77. package/dist/services/docker.js.map +1 -0
  78. package/dist/services/file-service.d.ts +79 -0
  79. package/dist/services/file-service.d.ts.map +1 -0
  80. package/dist/services/file-service.js +226 -0
  81. package/dist/services/file-service.js.map +1 -0
  82. package/dist/services/interfaces.d.ts +537 -0
  83. package/dist/services/interfaces.d.ts.map +1 -0
  84. package/dist/services/interfaces.js +2 -0
  85. package/dist/services/interfaces.js.map +1 -0
  86. package/dist/services/ssh-pool-exec.d.ts +10 -0
  87. package/dist/services/ssh-pool-exec.d.ts.map +1 -0
  88. package/dist/services/ssh-pool-exec.js +10 -0
  89. package/dist/services/ssh-pool-exec.js.map +1 -0
  90. package/dist/services/ssh-pool.d.ts +66 -0
  91. package/dist/services/ssh-pool.d.ts.map +1 -0
  92. package/dist/services/ssh-pool.js +253 -0
  93. package/dist/services/ssh-pool.js.map +1 -0
  94. package/dist/services/ssh-service.d.ts +39 -0
  95. package/dist/services/ssh-service.d.ts.map +1 -0
  96. package/dist/services/ssh-service.js +143 -0
  97. package/dist/services/ssh-service.js.map +1 -0
  98. package/dist/services/ssh.d.ts +37 -0
  99. package/dist/services/ssh.d.ts.map +1 -0
  100. package/dist/services/ssh.js +50 -0
  101. package/dist/services/ssh.js.map +1 -0
  102. package/dist/tools/flux.d.ts +14 -0
  103. package/dist/tools/flux.d.ts.map +1 -0
  104. package/dist/tools/flux.js +86 -0
  105. package/dist/tools/flux.js.map +1 -0
  106. package/dist/tools/index.d.ts +7 -0
  107. package/dist/tools/index.d.ts.map +1 -0
  108. package/dist/tools/index.js +43 -0
  109. package/dist/tools/index.js.map +1 -0
  110. package/dist/tools/scout.d.ts +14 -0
  111. package/dist/tools/scout.d.ts.map +1 -0
  112. package/dist/tools/scout.js +96 -0
  113. package/dist/tools/scout.js.map +1 -0
  114. package/dist/tools/unified.d.ts +7 -0
  115. package/dist/tools/unified.d.ts.map +1 -0
  116. package/dist/tools/unified.js +827 -0
  117. package/dist/tools/unified.js.map +1 -0
  118. package/dist/types.d.ts +93 -0
  119. package/dist/types.d.ts.map +1 -0
  120. package/dist/types.js +7 -0
  121. package/dist/types.js.map +1 -0
  122. package/dist/utils/errors.d.ts +60 -0
  123. package/dist/utils/errors.d.ts.map +1 -0
  124. package/dist/utils/errors.js +131 -0
  125. package/dist/utils/errors.js.map +1 -0
  126. package/dist/utils/help.d.ts +69 -0
  127. package/dist/utils/help.d.ts.map +1 -0
  128. package/dist/utils/help.js +259 -0
  129. package/dist/utils/help.js.map +1 -0
  130. package/dist/utils/index.d.ts +4 -0
  131. package/dist/utils/index.d.ts.map +1 -0
  132. package/dist/utils/index.js +4 -0
  133. package/dist/utils/index.js.map +1 -0
  134. package/dist/utils/path-security.d.ts +64 -0
  135. package/dist/utils/path-security.d.ts.map +1 -0
  136. package/dist/utils/path-security.js +138 -0
  137. package/dist/utils/path-security.js.map +1 -0
  138. package/package.json +85 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Schema exports for homelab MCP server V3
3
+ *
4
+ * Exports common utilities and both tool schemas:
5
+ * - Flux: Docker infrastructure management (39 subactions)
6
+ * - Scout: SSH remote operations (11 actions)
7
+ */
8
+ export * from "./common.js";
9
+ export * from "./flux/index.js";
10
+ export * from "./scout/index.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Schema exports for homelab MCP server V3
3
+ *
4
+ * Exports common utilities and both tool schemas:
5
+ * - Flux: Docker infrastructure management (39 subactions)
6
+ * - Scout: SSH remote operations (11 actions)
7
+ */
8
+ export * from "./common.js";
9
+ export * from "./flux/index.js";
10
+ export * from "./scout/index.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Scout Tool Schema - SSH remote operations
4
+ *
5
+ * Actions: 11 total
6
+ * Simple: 9 (nodes, peek, exec, find, delta, emit, beam, ps, df)
7
+ * Nested: 2 with subactions
8
+ * - zfs: 3 subactions (pools, datasets, snapshots)
9
+ * - logs: 4 subactions (syslog, journal, dmesg, auth)
10
+ *
11
+ * IMPORTANT: Uses z.union (not z.discriminatedUnion) because zfs and logs
12
+ * are nested discriminated unions. You cannot nest discriminated unions
13
+ * directly in z.discriminatedUnion - it requires literal discriminator values.
14
+ *
15
+ * Simple actions use literal 'action' discriminator
16
+ * Nested actions use 'subaction' as secondary discriminator
17
+ */
18
+ export declare const ScoutSchema: z.ZodUnion<readonly [z.ZodObject<{
19
+ action: z.ZodLiteral<"nodes">;
20
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ action: z.ZodLiteral<"peek">;
23
+ target: z.ZodString;
24
+ tree: z.ZodDefault<z.ZodBoolean>;
25
+ depth: z.ZodDefault<z.ZodNumber>;
26
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ action: z.ZodLiteral<"exec">;
29
+ target: z.ZodString;
30
+ command: z.ZodString;
31
+ timeout: z.ZodDefault<z.ZodNumber>;
32
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ action: z.ZodLiteral<"find">;
35
+ target: z.ZodString;
36
+ pattern: z.ZodString;
37
+ depth: z.ZodDefault<z.ZodNumber>;
38
+ limit: z.ZodDefault<z.ZodNumber>;
39
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ action: z.ZodLiteral<"delta">;
42
+ source: z.ZodString;
43
+ target: z.ZodOptional<z.ZodString>;
44
+ content: z.ZodOptional<z.ZodString>;
45
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ action: z.ZodLiteral<"emit">;
48
+ targets: z.ZodArray<z.ZodString>;
49
+ command: z.ZodOptional<z.ZodString>;
50
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ action: z.ZodLiteral<"beam">;
53
+ source: z.ZodString;
54
+ destination: z.ZodString;
55
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ action: z.ZodLiteral<"ps">;
58
+ host: z.ZodString;
59
+ grep: z.ZodOptional<z.ZodString>;
60
+ user: z.ZodOptional<z.ZodString>;
61
+ sort: z.ZodDefault<z.ZodEnum<{
62
+ cpu: "cpu";
63
+ mem: "mem";
64
+ pid: "pid";
65
+ time: "time";
66
+ }>>;
67
+ limit: z.ZodDefault<z.ZodNumber>;
68
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ action: z.ZodLiteral<"df">;
71
+ host: z.ZodString;
72
+ path: z.ZodOptional<z.ZodString>;
73
+ human_readable: z.ZodDefault<z.ZodBoolean>;
74
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
75
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
76
+ action: z.ZodLiteral<"zfs">;
77
+ subaction: z.ZodLiteral<"pools">;
78
+ host: z.ZodString;
79
+ pool: z.ZodOptional<z.ZodString>;
80
+ health: z.ZodOptional<z.ZodEnum<{
81
+ online: "online";
82
+ degraded: "degraded";
83
+ faulted: "faulted";
84
+ }>>;
85
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ action: z.ZodLiteral<"zfs">;
88
+ subaction: z.ZodLiteral<"datasets">;
89
+ host: z.ZodString;
90
+ pool: z.ZodOptional<z.ZodString>;
91
+ type: z.ZodOptional<z.ZodEnum<{
92
+ filesystem: "filesystem";
93
+ volume: "volume";
94
+ }>>;
95
+ recursive: z.ZodDefault<z.ZodBoolean>;
96
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ action: z.ZodLiteral<"zfs">;
99
+ subaction: z.ZodLiteral<"snapshots">;
100
+ host: z.ZodString;
101
+ pool: z.ZodOptional<z.ZodString>;
102
+ dataset: z.ZodOptional<z.ZodString>;
103
+ limit: z.ZodOptional<z.ZodNumber>;
104
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
105
+ }, z.core.$strip>], "subaction">, z.ZodDiscriminatedUnion<[z.ZodObject<{
106
+ action: z.ZodLiteral<"logs">;
107
+ subaction: z.ZodLiteral<"syslog">;
108
+ host: z.ZodString;
109
+ lines: z.ZodDefault<z.ZodNumber>;
110
+ grep: z.ZodOptional<z.ZodString>;
111
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ action: z.ZodLiteral<"logs">;
114
+ subaction: z.ZodLiteral<"journal">;
115
+ host: z.ZodString;
116
+ lines: z.ZodDefault<z.ZodNumber>;
117
+ since: z.ZodOptional<z.ZodString>;
118
+ until: z.ZodOptional<z.ZodString>;
119
+ unit: z.ZodOptional<z.ZodString>;
120
+ priority: z.ZodOptional<z.ZodEnum<{
121
+ warning: "warning";
122
+ info: "info";
123
+ emerg: "emerg";
124
+ alert: "alert";
125
+ crit: "crit";
126
+ err: "err";
127
+ notice: "notice";
128
+ debug: "debug";
129
+ }>>;
130
+ grep: z.ZodOptional<z.ZodString>;
131
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ action: z.ZodLiteral<"logs">;
134
+ subaction: z.ZodLiteral<"dmesg">;
135
+ host: z.ZodString;
136
+ lines: z.ZodDefault<z.ZodNumber>;
137
+ grep: z.ZodOptional<z.ZodString>;
138
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ action: z.ZodLiteral<"logs">;
141
+ subaction: z.ZodLiteral<"auth">;
142
+ host: z.ZodString;
143
+ lines: z.ZodDefault<z.ZodNumber>;
144
+ grep: z.ZodOptional<z.ZodString>;
145
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
146
+ }, z.core.$strip>], "subaction">]>;
147
+ export type ScoutInput = z.infer<typeof ScoutSchema>;
148
+ export * from './simple.js';
149
+ export * from './zfs.js';
150
+ export * from './logs.js';
151
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/schemas/scout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAetB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAGrD,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,41 @@
1
+ // src/schemas/scout/index.ts
2
+ import { z } from 'zod';
3
+ import { scoutNodesSchema, scoutPeekSchema, scoutExecSchema, scoutFindSchema, scoutDeltaSchema, scoutEmitSchema, scoutBeamSchema, scoutPsSchema, scoutDfSchema } from './simple.js';
4
+ import { scoutZfsSchema } from './zfs.js';
5
+ import { scoutLogsSchema } from './logs.js';
6
+ /**
7
+ * Scout Tool Schema - SSH remote operations
8
+ *
9
+ * Actions: 11 total
10
+ * Simple: 9 (nodes, peek, exec, find, delta, emit, beam, ps, df)
11
+ * Nested: 2 with subactions
12
+ * - zfs: 3 subactions (pools, datasets, snapshots)
13
+ * - logs: 4 subactions (syslog, journal, dmesg, auth)
14
+ *
15
+ * IMPORTANT: Uses z.union (not z.discriminatedUnion) because zfs and logs
16
+ * are nested discriminated unions. You cannot nest discriminated unions
17
+ * directly in z.discriminatedUnion - it requires literal discriminator values.
18
+ *
19
+ * Simple actions use literal 'action' discriminator
20
+ * Nested actions use 'subaction' as secondary discriminator
21
+ */
22
+ export const ScoutSchema = z.union([
23
+ // Simple actions (9)
24
+ scoutNodesSchema,
25
+ scoutPeekSchema,
26
+ scoutExecSchema,
27
+ scoutFindSchema,
28
+ scoutDeltaSchema,
29
+ scoutEmitSchema,
30
+ scoutBeamSchema,
31
+ scoutPsSchema,
32
+ scoutDfSchema,
33
+ // Nested discriminators (2) - these are already discriminated unions
34
+ scoutZfsSchema,
35
+ scoutLogsSchema
36
+ ]);
37
+ // Re-export all schemas for individual use
38
+ export * from './simple.js';
39
+ export * from './zfs.js';
40
+ export * from './logs.js';
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schemas/scout/index.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC;IACjC,qBAAqB;IACrB,gBAAgB;IAChB,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,eAAe;IACf,aAAa;IACb,aAAa;IAEb,qEAAqE;IACrE,cAAc;IACd,eAAe;CAChB,CAAC,CAAC;AAIH,2CAA2C;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Scout logs nested discriminator (4 subactions)
4
+ * Uses standard discriminatedUnion on 'subaction'
5
+ */
6
+ export declare const scoutLogsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ action: z.ZodLiteral<"logs">;
8
+ subaction: z.ZodLiteral<"syslog">;
9
+ host: z.ZodString;
10
+ lines: z.ZodDefault<z.ZodNumber>;
11
+ grep: z.ZodOptional<z.ZodString>;
12
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ action: z.ZodLiteral<"logs">;
15
+ subaction: z.ZodLiteral<"journal">;
16
+ host: z.ZodString;
17
+ lines: z.ZodDefault<z.ZodNumber>;
18
+ since: z.ZodOptional<z.ZodString>;
19
+ until: z.ZodOptional<z.ZodString>;
20
+ unit: z.ZodOptional<z.ZodString>;
21
+ priority: z.ZodOptional<z.ZodEnum<{
22
+ warning: "warning";
23
+ info: "info";
24
+ emerg: "emerg";
25
+ alert: "alert";
26
+ crit: "crit";
27
+ err: "err";
28
+ notice: "notice";
29
+ debug: "debug";
30
+ }>>;
31
+ grep: z.ZodOptional<z.ZodString>;
32
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ action: z.ZodLiteral<"logs">;
35
+ subaction: z.ZodLiteral<"dmesg">;
36
+ host: z.ZodString;
37
+ lines: z.ZodDefault<z.ZodNumber>;
38
+ grep: z.ZodOptional<z.ZodString>;
39
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ action: z.ZodLiteral<"logs">;
42
+ subaction: z.ZodLiteral<"auth">;
43
+ host: z.ZodString;
44
+ lines: z.ZodDefault<z.ZodNumber>;
45
+ grep: z.ZodOptional<z.ZodString>;
46
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
47
+ }, z.core.$strip>], "subaction">;
48
+ //# sourceMappingURL=logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/schemas/scout/logs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAwC1B,CAAC"}
@@ -0,0 +1,47 @@
1
+ // src/schemas/scout/logs.ts
2
+ import { z } from 'zod';
3
+ import { responseFormatSchema, hostSchema } from '../common.js';
4
+ import { DEFAULT_LOG_LINES, MAX_LOG_LINES } from '../../constants.js';
5
+ /**
6
+ * Scout logs nested discriminator (4 subactions)
7
+ * Uses standard discriminatedUnion on 'subaction'
8
+ */
9
+ export const scoutLogsSchema = z.discriminatedUnion('subaction', [
10
+ z.object({
11
+ action: z.literal('logs'),
12
+ subaction: z.literal('syslog'),
13
+ host: hostSchema,
14
+ lines: z.number().int().min(1).max(MAX_LOG_LINES).default(DEFAULT_LOG_LINES),
15
+ grep: z.string().optional(),
16
+ response_format: responseFormatSchema
17
+ }).describe('Access system log files (/var/log)'),
18
+ z.object({
19
+ action: z.literal('logs'),
20
+ subaction: z.literal('journal'),
21
+ host: hostSchema,
22
+ lines: z.number().int().min(1).max(MAX_LOG_LINES).default(DEFAULT_LOG_LINES),
23
+ since: z.string().optional().describe('ISO 8601 timestamp or relative time'),
24
+ until: z.string().optional(),
25
+ unit: z.string().optional().describe('Systemd unit name to filter'),
26
+ priority: z.enum(['emerg', 'alert', 'crit', 'err', 'warning', 'notice', 'info', 'debug']).optional(),
27
+ grep: z.string().optional(),
28
+ response_format: responseFormatSchema
29
+ }).describe('Access systemd journal logs'),
30
+ z.object({
31
+ action: z.literal('logs'),
32
+ subaction: z.literal('dmesg'),
33
+ host: hostSchema,
34
+ lines: z.number().int().min(1).max(MAX_LOG_LINES).default(DEFAULT_LOG_LINES),
35
+ grep: z.string().optional(),
36
+ response_format: responseFormatSchema
37
+ }).describe('Access kernel ring buffer logs'),
38
+ z.object({
39
+ action: z.literal('logs'),
40
+ subaction: z.literal('auth'),
41
+ host: hostSchema,
42
+ lines: z.number().int().min(1).max(MAX_LOG_LINES).default(DEFAULT_LOG_LINES),
43
+ grep: z.string().optional(),
44
+ response_format: responseFormatSchema
45
+ }).describe('Access authentication logs')
46
+ ]);
47
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/schemas/scout/logs.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEtE;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CA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,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,eAAe,EAAE,oBAAoB;KACtC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAE1C,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACzB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC5E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,eAAe,EAAE,oBAAoB;KACtC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAE7C,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACzB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;QAC5E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,eAAe,EAAE,oBAAoB;KACtC,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CAC1C,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod';
2
+ export declare const scoutNodesSchema: z.ZodObject<{
3
+ action: z.ZodLiteral<"nodes">;
4
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
5
+ }, z.core.$strip>;
6
+ export declare const scoutPeekSchema: z.ZodObject<{
7
+ action: z.ZodLiteral<"peek">;
8
+ target: z.ZodString;
9
+ tree: z.ZodDefault<z.ZodBoolean>;
10
+ depth: z.ZodDefault<z.ZodNumber>;
11
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
12
+ }, z.core.$strip>;
13
+ export declare const scoutExecSchema: z.ZodObject<{
14
+ action: z.ZodLiteral<"exec">;
15
+ target: z.ZodString;
16
+ command: z.ZodString;
17
+ timeout: z.ZodDefault<z.ZodNumber>;
18
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
19
+ }, z.core.$strip>;
20
+ export declare const scoutFindSchema: z.ZodObject<{
21
+ action: z.ZodLiteral<"find">;
22
+ target: z.ZodString;
23
+ pattern: z.ZodString;
24
+ depth: z.ZodDefault<z.ZodNumber>;
25
+ limit: z.ZodDefault<z.ZodNumber>;
26
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
27
+ }, z.core.$strip>;
28
+ export declare const scoutDeltaSchema: z.ZodObject<{
29
+ action: z.ZodLiteral<"delta">;
30
+ source: z.ZodString;
31
+ target: z.ZodOptional<z.ZodString>;
32
+ content: z.ZodOptional<z.ZodString>;
33
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
34
+ }, z.core.$strip>;
35
+ export declare const scoutEmitSchema: z.ZodObject<{
36
+ action: z.ZodLiteral<"emit">;
37
+ targets: z.ZodArray<z.ZodString>;
38
+ command: z.ZodOptional<z.ZodString>;
39
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
40
+ }, z.core.$strip>;
41
+ export declare const scoutBeamSchema: z.ZodObject<{
42
+ action: z.ZodLiteral<"beam">;
43
+ source: z.ZodString;
44
+ destination: z.ZodString;
45
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
46
+ }, z.core.$strip>;
47
+ export declare const scoutPsSchema: z.ZodObject<{
48
+ action: z.ZodLiteral<"ps">;
49
+ host: z.ZodString;
50
+ grep: z.ZodOptional<z.ZodString>;
51
+ user: z.ZodOptional<z.ZodString>;
52
+ sort: z.ZodDefault<z.ZodEnum<{
53
+ cpu: "cpu";
54
+ mem: "mem";
55
+ pid: "pid";
56
+ time: "time";
57
+ }>>;
58
+ limit: z.ZodDefault<z.ZodNumber>;
59
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
60
+ }, z.core.$strip>;
61
+ export declare const scoutDfSchema: z.ZodObject<{
62
+ action: z.ZodLiteral<"df">;
63
+ host: z.ZodString;
64
+ path: z.ZodOptional<z.ZodString>;
65
+ human_readable: z.ZodDefault<z.ZodBoolean>;
66
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
67
+ }, z.core.$strip>;
68
+ //# sourceMappingURL=simple.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../../src/schemas/scout/simple.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,gBAAgB;;;iBAGe,CAAC;AAE7C,eAAO,MAAM,eAAe;;;;;;iBAMmC,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;iBAMmB,CAAC;AAEhD,eAAO,MAAM,eAAe;;;;;;;iBAO8B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;;;;;iBAM4B,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;iBAKQ,CAAC;AAErC,eAAO,MAAM,eAAe;;;;;iBAK+B,CAAC;AAE5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAQ+B,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;iBAM6B,CAAC"}
@@ -0,0 +1,75 @@
1
+ // src/schemas/scout/simple.ts
2
+ import { z } from 'zod';
3
+ import { responseFormatSchema, hostSchema } from '../common.js';
4
+ import { DEFAULT_TREE_DEPTH, MAX_TREE_DEPTH, DEFAULT_COMMAND_TIMEOUT, MAX_COMMAND_TIMEOUT, DEFAULT_FIND_LIMIT, MAX_FIND_LIMIT } from '../../constants.js';
5
+ /**
6
+ * Scout simple action schemas (9 actions without subactions)
7
+ * Scout uses 'action' as the primary discriminator (not composite like Flux)
8
+ */
9
+ // Shared schema for remote target paths in hostname:/path format
10
+ const scoutTargetSchema = z.string()
11
+ .min(3)
12
+ .regex(/^[a-zA-Z0-9_-]+:\/.*$/, "Must be 'hostname:/path' format")
13
+ .describe('Remote location in hostname:/path format');
14
+ export const scoutNodesSchema = z.object({
15
+ action: z.literal('nodes'),
16
+ response_format: responseFormatSchema
17
+ }).describe('List all configured SSH hosts');
18
+ export const scoutPeekSchema = z.object({
19
+ action: z.literal('peek'),
20
+ target: scoutTargetSchema,
21
+ tree: z.boolean().default(false).describe('Show directory tree'),
22
+ depth: z.number().min(1).max(MAX_TREE_DEPTH).default(DEFAULT_TREE_DEPTH),
23
+ response_format: responseFormatSchema
24
+ }).describe('Read file or directory contents on a remote host');
25
+ export const scoutExecSchema = z.object({
26
+ action: z.literal('exec'),
27
+ target: scoutTargetSchema.describe('Working directory for command'),
28
+ command: z.string().min(1).describe('Shell command to execute'),
29
+ timeout: z.number().int().min(1).max(MAX_COMMAND_TIMEOUT).default(DEFAULT_COMMAND_TIMEOUT),
30
+ response_format: responseFormatSchema
31
+ }).describe('Execute command on a remote host');
32
+ export const scoutFindSchema = z.object({
33
+ action: z.literal('find'),
34
+ target: scoutTargetSchema.describe('Search root directory'),
35
+ pattern: z.string().min(1).describe('Glob pattern for file matching'),
36
+ depth: z.number().min(1).max(MAX_TREE_DEPTH).default(DEFAULT_TREE_DEPTH),
37
+ limit: z.number().int().min(1).max(MAX_FIND_LIMIT).default(DEFAULT_FIND_LIMIT),
38
+ response_format: responseFormatSchema
39
+ }).describe('Find files by glob pattern on a remote host');
40
+ export const scoutDeltaSchema = z.object({
41
+ action: z.literal('delta'),
42
+ source: z.string().min(1).describe('File source - local path or remote hostname:/path'),
43
+ target: z.string().optional().describe('File destination for comparison'),
44
+ content: z.string().optional().describe('String content for comparison'),
45
+ response_format: responseFormatSchema
46
+ }).describe('Compare files or content between locations');
47
+ export const scoutEmitSchema = z.object({
48
+ action: z.literal('emit'),
49
+ targets: z.array(scoutTargetSchema).min(1).describe('Array of remote locations'),
50
+ command: z.string().optional().describe('Shell command to execute on all targets'),
51
+ response_format: responseFormatSchema
52
+ }).describe('Multi-host operations');
53
+ export const scoutBeamSchema = z.object({
54
+ action: z.literal('beam'),
55
+ source: z.string().min(1).describe('File source - local path or remote hostname:/path'),
56
+ destination: z.string().min(1).describe('File destination - local path or remote hostname:/path'),
57
+ response_format: responseFormatSchema
58
+ }).describe('File transfer between local and remote hosts');
59
+ export const scoutPsSchema = z.object({
60
+ action: z.literal('ps'),
61
+ host: hostSchema,
62
+ grep: z.string().optional().describe('Filter output containing this string'),
63
+ user: z.string().optional().describe('Filter processes by username'),
64
+ sort: z.enum(['cpu', 'mem', 'pid', 'time']).default('cpu'),
65
+ limit: z.number().int().min(1).max(1000).default(50),
66
+ response_format: responseFormatSchema
67
+ }).describe('List and search processes on a remote host');
68
+ export const scoutDfSchema = z.object({
69
+ action: z.literal('df'),
70
+ host: hostSchema,
71
+ path: z.string().optional().describe('Specific filesystem path or mount point'),
72
+ human_readable: z.boolean().default(true),
73
+ response_format: responseFormatSchema
74
+ }).describe('Disk usage information for a remote host');
75
+ //# sourceMappingURL=simple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple.js","sourceRoot":"","sources":["../../../src/schemas/scout/simple.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,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E,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACpE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACpD,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC/E,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Scout ZFS nested discriminator (3 subactions)
4
+ * Uses standard discriminatedUnion on 'subaction'
5
+ */
6
+ export declare const scoutZfsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ action: z.ZodLiteral<"zfs">;
8
+ subaction: z.ZodLiteral<"pools">;
9
+ host: z.ZodString;
10
+ pool: z.ZodOptional<z.ZodString>;
11
+ health: z.ZodOptional<z.ZodEnum<{
12
+ online: "online";
13
+ degraded: "degraded";
14
+ faulted: "faulted";
15
+ }>>;
16
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ action: z.ZodLiteral<"zfs">;
19
+ subaction: z.ZodLiteral<"datasets">;
20
+ host: z.ZodString;
21
+ pool: z.ZodOptional<z.ZodString>;
22
+ type: z.ZodOptional<z.ZodEnum<{
23
+ filesystem: "filesystem";
24
+ volume: "volume";
25
+ }>>;
26
+ recursive: z.ZodDefault<z.ZodBoolean>;
27
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ action: z.ZodLiteral<"zfs">;
30
+ subaction: z.ZodLiteral<"snapshots">;
31
+ host: z.ZodString;
32
+ pool: z.ZodOptional<z.ZodString>;
33
+ dataset: z.ZodOptional<z.ZodString>;
34
+ limit: z.ZodOptional<z.ZodNumber>;
35
+ response_format: z.ZodDefault<z.ZodEnum<typeof import("../../types.js").ResponseFormat>>;
36
+ }, z.core.$strip>], "subaction">;
37
+ //# sourceMappingURL=zfs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zfs.d.ts","sourceRoot":"","sources":["../../../src/schemas/scout/zfs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA6BzB,CAAC"}
@@ -0,0 +1,36 @@
1
+ // src/schemas/scout/zfs.ts
2
+ import { z } from 'zod';
3
+ import { responseFormatSchema, hostSchema } from '../common.js';
4
+ /**
5
+ * Scout ZFS nested discriminator (3 subactions)
6
+ * Uses standard discriminatedUnion on 'subaction'
7
+ */
8
+ export const scoutZfsSchema = z.discriminatedUnion('subaction', [
9
+ z.object({
10
+ action: z.literal('zfs'),
11
+ subaction: z.literal('pools'),
12
+ host: hostSchema,
13
+ pool: z.string().optional().describe('Pool name filter'),
14
+ health: z.enum(['online', 'degraded', 'faulted']).optional(),
15
+ response_format: responseFormatSchema
16
+ }).describe('List ZFS storage pools'),
17
+ z.object({
18
+ action: z.literal('zfs'),
19
+ subaction: z.literal('datasets'),
20
+ host: hostSchema,
21
+ pool: z.string().optional().describe('Pool name filter'),
22
+ type: z.enum(['filesystem', 'volume']).optional(),
23
+ recursive: z.boolean().default(false).describe('Include child datasets'),
24
+ response_format: responseFormatSchema
25
+ }).describe('List ZFS datasets'),
26
+ z.object({
27
+ action: z.literal('zfs'),
28
+ subaction: z.literal('snapshots'),
29
+ host: hostSchema,
30
+ pool: z.string().optional(),
31
+ dataset: z.string().optional().describe('Filter to specific dataset'),
32
+ limit: z.number().int().min(1).max(1000).optional(),
33
+ response_format: responseFormatSchema
34
+ }).describe('List ZFS snapshots')
35
+ ]);
36
+ //# sourceMappingURL=zfs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zfs.js","sourceRoot":"","sources":["../../../src/schemas/scout/zfs.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IAC9D,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACxB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACxD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC5D,eAAe,EAAE,oBAAoB;KACtC,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAErC,CAAC,CAAC,MAAM,CAAC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