dsh-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.
@@ -0,0 +1,339 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema = z.object({
5
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
6
+ })
7
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema = z.union([z.object({
8
+ 'ok': z.literal(true).readonly(),
9
+ }), z.object({
10
+ 'ok': z.literal(false).readonly(),
11
+ 'error': z.object({
12
+ 'code': z.union([z.literal("MCP_SERVER_NOT_FOUND"), z.literal("MCP_SERVER_NAME_CONFLICT"), z.literal("MCP_INVALID_SPEC"), z.literal("MCP_MOUNT_FAILED")]).readonly(),
13
+ 'message': z.string().readonly(),
14
+ }).readonly(),
15
+ })])
16
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema = z.object({
17
+ 'ok': z.literal(true).readonly(),
18
+ 'servers': z.array(z.object({
19
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
20
+ 'serverName': z.string().readonly(),
21
+ 'transport': z.union([z.literal("stdio"), z.literal("streamable-http")]).readonly(),
22
+ 'enabled': z.boolean().readonly(),
23
+ 'command': z.string().readonly(),
24
+ 'args': z.array(z.string()).readonly(),
25
+ 'cwd': z.string().readonly(),
26
+ 'url': z.string().readonly(),
27
+ 'headers': z.array(z.object({
28
+ 'name': z.string().readonly(),
29
+ 'value': z.string().readonly(),
30
+ })).readonly(),
31
+ 'env': z.array(z.object({
32
+ 'name': z.string().readonly(),
33
+ 'secret': z.boolean().readonly(),
34
+ 'configured': z.boolean().readonly(),
35
+ })).readonly(),
36
+ 'toolCallTimeoutMs': z.number().readonly(),
37
+ 'failOnStartupError': z.boolean().readonly(),
38
+ 'status': z.object({
39
+ 'phase': z.union([z.literal("failed"), z.literal("stopped"), z.literal("mounting"), z.literal("live")]).readonly(),
40
+ 'tools': z.array(z.string()).readonly(),
41
+ 'error': z.string().readonly().optional(),
42
+ }).readonly(),
43
+ })).readonly(),
44
+ })
45
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema = z.object({
46
+ 'id': z.intersection(z.string(), z.unknown()).readonly().optional(),
47
+ 'server': z.object({
48
+ 'serverName': z.string().readonly(),
49
+ 'transport': z.union([z.literal("stdio"), z.literal("streamable-http")]).readonly(),
50
+ 'enabled': z.boolean().readonly(),
51
+ 'command': z.string().readonly(),
52
+ 'args': z.array(z.string()).readonly(),
53
+ 'cwd': z.string().readonly(),
54
+ 'url': z.string().readonly(),
55
+ 'headers': z.array(z.object({
56
+ 'name': z.string().readonly(),
57
+ 'value': z.string().readonly(),
58
+ })).readonly(),
59
+ 'toolCallTimeoutMs': z.number().readonly(),
60
+ 'failOnStartupError': z.boolean().readonly(),
61
+ }).readonly(),
62
+ 'env': z.array(z.object({
63
+ 'name': z.string().readonly(),
64
+ 'secret': z.boolean().readonly(),
65
+ 'value': z.string().readonly().optional(),
66
+ })).readonly(),
67
+ })
68
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema = z.object({
69
+ 'ok': z.literal(true).readonly(),
70
+ 'probe': z.union([z.object({
71
+ 'ok': z.literal(true).readonly(),
72
+ 'tools': z.array(z.object({
73
+ 'name': z.string().readonly(),
74
+ 'description': z.string().readonly().optional(),
75
+ })).readonly(),
76
+ }), z.object({
77
+ 'ok': z.literal(false).readonly(),
78
+ 'message': z.string().readonly(),
79
+ })]).readonly(),
80
+ 'elapsedMs': z.number().readonly(),
81
+ })
82
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema = z.object({
83
+ 'id': z.intersection(z.string(), z.unknown()).readonly().optional(),
84
+ 'server': z.object({
85
+ 'serverName': z.string().readonly(),
86
+ 'transport': z.union([z.literal("stdio"), z.literal("streamable-http")]).readonly(),
87
+ 'enabled': z.boolean().readonly(),
88
+ 'command': z.string().readonly(),
89
+ 'args': z.array(z.string()).readonly(),
90
+ 'cwd': z.string().readonly(),
91
+ 'url': z.string().readonly(),
92
+ 'headers': z.array(z.object({
93
+ 'name': z.string().readonly(),
94
+ 'value': z.string().readonly(),
95
+ })).readonly(),
96
+ 'toolCallTimeoutMs': z.number().readonly(),
97
+ 'failOnStartupError': z.boolean().readonly(),
98
+ }).readonly(),
99
+ 'env': z.array(z.object({
100
+ 'name': z.string().readonly(),
101
+ 'secret': z.boolean().readonly(),
102
+ 'value': z.string().readonly().optional(),
103
+ })).readonly(),
104
+ })
105
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema = z.union([z.object({
106
+ 'ok': z.literal(true).readonly(),
107
+ 'server': z.object({
108
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
109
+ 'serverName': z.string().readonly(),
110
+ 'transport': z.union([z.literal("stdio"), z.literal("streamable-http")]).readonly(),
111
+ 'enabled': z.boolean().readonly(),
112
+ 'command': z.string().readonly(),
113
+ 'args': z.array(z.string()).readonly(),
114
+ 'cwd': z.string().readonly(),
115
+ 'url': z.string().readonly(),
116
+ 'headers': z.array(z.object({
117
+ 'name': z.string().readonly(),
118
+ 'value': z.string().readonly(),
119
+ })).readonly(),
120
+ 'env': z.array(z.object({
121
+ 'name': z.string().readonly(),
122
+ 'secret': z.boolean().readonly(),
123
+ 'configured': z.boolean().readonly(),
124
+ })).readonly(),
125
+ 'toolCallTimeoutMs': z.number().readonly(),
126
+ 'failOnStartupError': z.boolean().readonly(),
127
+ 'status': z.object({
128
+ 'phase': z.union([z.literal("failed"), z.literal("stopped"), z.literal("mounting"), z.literal("live")]).readonly(),
129
+ 'tools': z.array(z.string()).readonly(),
130
+ 'error': z.string().readonly().optional(),
131
+ }).readonly(),
132
+ }).readonly(),
133
+ }), z.object({
134
+ 'ok': z.literal(false).readonly(),
135
+ 'error': z.object({
136
+ 'code': z.union([z.literal("MCP_SERVER_NOT_FOUND"), z.literal("MCP_SERVER_NAME_CONFLICT"), z.literal("MCP_INVALID_SPEC"), z.literal("MCP_MOUNT_FAILED")]).readonly(),
137
+ 'message': z.string().readonly(),
138
+ }).readonly(),
139
+ })])
140
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema = z.object({
141
+ 'ok': z.literal(true).readonly(),
142
+ 'tools': z.array(z.object({
143
+ 'name': z.string().readonly(),
144
+ 'server': z.string().readonly(),
145
+ 'description': z.string().readonly(),
146
+ 'enabled': z.boolean().readonly(),
147
+ })).readonly(),
148
+ 'mode': z.union([z.literal("full"), z.literal("search")]).readonly(),
149
+ 'hotSize': z.number().readonly(),
150
+ })
151
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema = z.object({
152
+ 'name': z.string().readonly(),
153
+ 'enabled': z.boolean().readonly(),
154
+ })
155
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema = z.union([z.object({
156
+ 'ok': z.literal(true).readonly(),
157
+ }), z.object({
158
+ 'ok': z.literal(false).readonly(),
159
+ 'error': z.object({
160
+ 'code': z.union([z.literal("MCP_TOOL_NOT_FOUND")]).readonly(),
161
+ 'message': z.string().readonly(),
162
+ }).readonly(),
163
+ })])
164
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema = z.object({
165
+ 'mode': z.union([z.literal("full"), z.literal("search")]).readonly(),
166
+ })
167
+ const _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema = z.union([z.object({
168
+ 'ok': z.literal(true).readonly(),
169
+ 'mode': z.union([z.literal("full"), z.literal("search")]).readonly(),
170
+ }), z.object({
171
+ 'ok': z.literal(false).readonly(),
172
+ 'error': z.object({
173
+ 'code': z.union([z.literal("MCP_TOOL_INVALID_MODE")]).readonly(),
174
+ 'message': z.string().readonly(),
175
+ }).readonly(),
176
+ })])
177
+
178
+ export const TYPERT_REMOTE = {
179
+ package: '@deepseek-ai/dsh-mcp-manager',
180
+ descriptors: [
181
+ {
182
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/delete',
183
+ service: 'mcpManager',
184
+ namespace: 'mcpManager',
185
+ method: 'delete',
186
+ invocation: { kind: 'direct' },
187
+ parameters: [
188
+ {
189
+ name: 'request',
190
+ wire: 'request',
191
+ source: 'json',
192
+ codec: {
193
+ mode: 'strict',
194
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveRequest',
195
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_parameter_0$schema,
196
+ },
197
+ },
198
+ ],
199
+ result: {
200
+ mode: 'strict',
201
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerRemoveResult',
202
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_delete_result$schema,
203
+ },
204
+ sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":399,"column":9},
205
+ },
206
+ {
207
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/list',
208
+ service: 'mcpManager',
209
+ namespace: 'mcpManager',
210
+ method: 'list',
211
+ invocation: { kind: 'direct' },
212
+ parameters: [
213
+ ],
214
+ result: {
215
+ mode: 'strict',
216
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerListResult',
217
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_list_result$schema,
218
+ },
219
+ sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":314,"column":9},
220
+ },
221
+ {
222
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/test',
223
+ service: 'mcpManager',
224
+ namespace: 'mcpManager',
225
+ method: 'test',
226
+ invocation: { kind: 'direct' },
227
+ parameters: [
228
+ {
229
+ name: 'request',
230
+ wire: 'request',
231
+ source: 'json',
232
+ codec: {
233
+ mode: 'strict',
234
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerTestRequest',
235
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_parameter_0$schema,
236
+ },
237
+ },
238
+ ],
239
+ result: {
240
+ mode: 'strict',
241
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerTestResult',
242
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_test_result$schema,
243
+ },
244
+ sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":422,"column":9},
245
+ },
246
+ {
247
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/upsert',
248
+ service: 'mcpManager',
249
+ namespace: 'mcpManager',
250
+ method: 'upsert',
251
+ invocation: { kind: 'direct' },
252
+ parameters: [
253
+ {
254
+ name: 'request',
255
+ wire: 'request',
256
+ source: 'json',
257
+ codec: {
258
+ mode: 'strict',
259
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertRequest',
260
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_parameter_0$schema,
261
+ },
262
+ },
263
+ ],
264
+ result: {
265
+ mode: 'strict',
266
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerUpsertResult',
267
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_upsert_result$schema,
268
+ },
269
+ sourceLocation: {"file":"packages/mcp/mcp-manager/src/index.ts","line":329,"column":9},
270
+ },
271
+ {
272
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/toolsList',
273
+ service: 'mcpManager',
274
+ namespace: 'mcpManager',
275
+ method: 'toolsList',
276
+ invocation: { kind: 'direct' },
277
+ parameters: [
278
+ ],
279
+ result: {
280
+ mode: 'strict',
281
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsListResult',
282
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsList_result$schema,
283
+ },
284
+ sourceLocation: {"file":"lib/index.js"},
285
+ },
286
+ {
287
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/toolsSet',
288
+ service: 'mcpManager',
289
+ namespace: 'mcpManager',
290
+ method: 'toolsSet',
291
+ invocation: { kind: 'direct' },
292
+ parameters: [
293
+ {
294
+ name: 'request',
295
+ wire: 'request',
296
+ source: 'json',
297
+ codec: {
298
+ mode: 'strict',
299
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetRequest',
300
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_parameter_0$schema,
301
+ },
302
+ },
303
+ ],
304
+ result: {
305
+ mode: 'strict',
306
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsSetResult',
307
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsSet_result$schema,
308
+ },
309
+ sourceLocation: {"file":"lib/index.js"},
310
+ },
311
+ {
312
+ id: '@deepseek-ai/dsh-mcp-manager#mcpManager/toolsMode',
313
+ service: 'mcpManager',
314
+ namespace: 'mcpManager',
315
+ method: 'toolsMode',
316
+ invocation: { kind: 'direct' },
317
+ parameters: [
318
+ {
319
+ name: 'request',
320
+ wire: 'request',
321
+ source: 'json',
322
+ codec: {
323
+ mode: 'strict',
324
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeRequest',
325
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_parameter_0$schema,
326
+ },
327
+ },
328
+ ],
329
+ result: {
330
+ mode: 'strict',
331
+ typeSymbol: '@deepseek-ai/dsh-mcp-manager/types#McpManagerToolsModeResult',
332
+ schema: _deepseek_ai_dsh_mcp_manager_mcpManager_toolsMode_result$schema,
333
+ },
334
+ sourceLocation: {"file":"lib/index.js"},
335
+ },
336
+ ],
337
+ }
338
+
339
+ export default TYPERT_REMOTE
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Wire vocabulary of the mcp-manager domain, vendored into the standalone
3
+ * plugin so the browser half names the Remote payloads without depending on
4
+ * the original @deepseek-ai/dsh-mcp-manager package. Pure types — no runtime
5
+ * code. `McpServerId` is branded structurally (dsh-brand style) so no extra
6
+ * package is needed.
7
+ * @module dsh-mcp/client/types
8
+ */
9
+
10
+ /** Stable identity of one managed MCP server definition. */
11
+ export type McpServerId = string & { readonly __brand: 'McpServerId' }
12
+
13
+ /** Supported MCP transports. */
14
+ export type McpTransportKind = 'stdio' | 'streamable-http'
15
+
16
+ /** One HTTP header of a streamable-http server definition. */
17
+ export interface McpHeaderEntry {
18
+ readonly name: string
19
+ readonly value: string
20
+ }
21
+
22
+ /** One environment variable of a stdio server definition. */
23
+ export interface McpEnvVarEntry {
24
+ readonly name: string
25
+ readonly secret: boolean
26
+ readonly value?: string
27
+ }
28
+
29
+ /** Env-var row the client submits; a secret entry's value is write-only. */
30
+ export interface McpEnvVarInput {
31
+ readonly name: string
32
+ readonly secret: boolean
33
+ readonly value?: string
34
+ }
35
+
36
+ /** Definition the client submits; ids are minted by the manager. */
37
+ export interface McpServerInput {
38
+ readonly serverName: string
39
+ readonly transport: McpTransportKind
40
+ readonly enabled: boolean
41
+ readonly command: string
42
+ readonly args: readonly string[]
43
+ readonly cwd: string
44
+ readonly url: string
45
+ readonly headers: readonly McpHeaderEntry[]
46
+ readonly toolCallTimeoutMs: number
47
+ readonly failOnStartupError: boolean
48
+ }
49
+
50
+ /** One env var as the client renders it. */
51
+ export interface McpEnvVarView {
52
+ readonly name: string
53
+ readonly secret: boolean
54
+ readonly configured: boolean
55
+ }
56
+
57
+ /** Lifecycle phase of one managed server's live mount. */
58
+ export type McpMountPhase = 'mounting' | 'live' | 'failed' | 'stopped'
59
+
60
+ /** Live status of one managed server. */
61
+ export interface McpServerStatus {
62
+ readonly phase: McpMountPhase
63
+ readonly tools: readonly string[]
64
+ readonly error?: string
65
+ }
66
+
67
+ /** Full client-facing projection of one managed server. */
68
+ export interface McpServerView {
69
+ readonly id: McpServerId
70
+ readonly serverName: string
71
+ readonly transport: McpTransportKind
72
+ readonly enabled: boolean
73
+ readonly command: string
74
+ readonly args: readonly string[]
75
+ readonly cwd: string
76
+ readonly url: string
77
+ readonly headers: readonly McpHeaderEntry[]
78
+ readonly env: readonly McpEnvVarView[]
79
+ readonly toolCallTimeoutMs: number
80
+ readonly failOnStartupError: boolean
81
+ readonly status: McpServerStatus
82
+ }
83
+
84
+ /** One MCP tool summary in a probe report. */
85
+ export interface McpProbeToolView {
86
+ readonly name: string
87
+ readonly description?: string
88
+ }
89
+
90
+ /** Probe outcome: successful tool listing or a readable failure. */
91
+ export type McpProbeView =
92
+ | { readonly ok: true; readonly tools: readonly McpProbeToolView[] }
93
+ | { readonly ok: false; readonly message: string }
94
+
95
+ /** Stable failure codes for rejected management operations. */
96
+ export type McpManagerFailureCode =
97
+ | 'MCP_SERVER_NOT_FOUND'
98
+ | 'MCP_SERVER_NAME_CONFLICT'
99
+ | 'MCP_INVALID_SPEC'
100
+ | 'MCP_MOUNT_FAILED'
101
+
102
+ /** Explicit business failure of one management operation. */
103
+ export interface McpManagerFailure {
104
+ readonly code: McpManagerFailureCode
105
+ readonly message: string
106
+ }
107
+
108
+ /** One MCP tool row in the tool-control section. */
109
+ export interface McpToolView {
110
+ readonly name: string
111
+ readonly server: string
112
+ readonly description: string
113
+ readonly enabled: boolean
114
+ }
115
+
116
+ /** Injection mode of the tool-control layer. */
117
+ export type McpToolInjectionMode = 'full' | 'search'
118
+
119
+ /** Full tool-control state read from the Host. */
120
+ export interface McpToolsState {
121
+ readonly tools: readonly McpToolView[]
122
+ readonly mode: McpToolInjectionMode
123
+ readonly hotSize: number
124
+ }
@@ -0,0 +1,6 @@
1
+ declare module '*.module.css' {
2
+ const classes: Record<string, string>
3
+ export default classes
4
+ }
5
+
6
+ declare module '*.css'
Binary file