@niuhuoshan/dsh-connect 0.1.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +380 -0
  3. package/cordis.patch.yml +3 -0
  4. package/lib/client.js +1489 -0
  5. package/lib/index.js +2303 -0
  6. package/lib/index.js.map +7 -0
  7. package/lib/types/client/ConnectSettings.d.ts +9 -0
  8. package/lib/types/client/ConnectSettings.d.ts.map +1 -0
  9. package/lib/types/client/index.d.ts +5 -0
  10. package/lib/types/client/index.d.ts.map +1 -0
  11. package/lib/types/client/rpc.d.ts +7 -0
  12. package/lib/types/client/rpc.d.ts.map +1 -0
  13. package/lib/types/client/styles.d.ts +3 -0
  14. package/lib/types/client/styles.d.ts.map +1 -0
  15. package/lib/types/domain.d.ts +156 -0
  16. package/lib/types/domain.d.ts.map +1 -0
  17. package/lib/types/host/datasource/clickhouse.d.ts +8 -0
  18. package/lib/types/host/datasource/clickhouse.d.ts.map +1 -0
  19. package/lib/types/host/datasource/index.d.ts +4 -0
  20. package/lib/types/host/datasource/index.d.ts.map +1 -0
  21. package/lib/types/host/datasource/mysql.d.ts +8 -0
  22. package/lib/types/host/datasource/mysql.d.ts.map +1 -0
  23. package/lib/types/host/datasource/postgresql.d.ts +8 -0
  24. package/lib/types/host/datasource/postgresql.d.ts.map +1 -0
  25. package/lib/types/host/datasource/provider.d.ts +24 -0
  26. package/lib/types/host/datasource/provider.d.ts.map +1 -0
  27. package/lib/types/host/http/conversation-api.d.ts +57 -0
  28. package/lib/types/host/http/conversation-api.d.ts.map +1 -0
  29. package/lib/types/host/http/executor.d.ts +10 -0
  30. package/lib/types/host/http/executor.d.ts.map +1 -0
  31. package/lib/types/host/http/security.d.ts +5 -0
  32. package/lib/types/host/http/security.d.ts.map +1 -0
  33. package/lib/types/host/http/tools.d.ts +13 -0
  34. package/lib/types/host/http/tools.d.ts.map +1 -0
  35. package/lib/types/host/metadata/enricher.d.ts +35 -0
  36. package/lib/types/host/metadata/enricher.d.ts.map +1 -0
  37. package/lib/types/host/metadata/governance.d.ts +4 -0
  38. package/lib/types/host/metadata/governance.d.ts.map +1 -0
  39. package/lib/types/host/metadata/profiler.d.ts +22 -0
  40. package/lib/types/host/metadata/profiler.d.ts.map +1 -0
  41. package/lib/types/host/metadata/tools.d.ts +4 -0
  42. package/lib/types/host/metadata/tools.d.ts.map +1 -0
  43. package/lib/types/host/rpc.d.ts +29 -0
  44. package/lib/types/host/rpc.d.ts.map +1 -0
  45. package/lib/types/host/store.d.ts +47 -0
  46. package/lib/types/host/store.d.ts.map +1 -0
  47. package/lib/types/index.d.ts +6 -0
  48. package/lib/types/index.d.ts.map +1 -0
  49. package/lib/types/types.d.ts +395 -0
  50. package/lib/types/types.d.ts.map +1 -0
  51. package/package.json +121 -0
@@ -0,0 +1,395 @@
1
+ import { z } from 'zod';
2
+ export declare const databaseTypeSchema: z.ZodEnum<{
3
+ mysql: "mysql";
4
+ postgresql: "postgresql";
5
+ clickhouse: "clickhouse";
6
+ }>;
7
+ export type DatabaseType = z.infer<typeof databaseTypeSchema>;
8
+ export declare const apiMethodSchema: z.ZodEnum<{
9
+ GET: "GET";
10
+ POST: "POST";
11
+ PUT: "PUT";
12
+ PATCH: "PATCH";
13
+ DELETE: "DELETE";
14
+ }>;
15
+ export type ApiMethod = z.infer<typeof apiMethodSchema>;
16
+ export declare const apiParameterSchema: z.ZodObject<{
17
+ name: z.ZodString;
18
+ location: z.ZodEnum<{
19
+ path: "path";
20
+ query: "query";
21
+ header: "header";
22
+ body: "body";
23
+ }>;
24
+ type: z.ZodEnum<{
25
+ string: "string";
26
+ number: "number";
27
+ boolean: "boolean";
28
+ integer: "integer";
29
+ json: "json";
30
+ }>;
31
+ description: z.ZodDefault<z.ZodString>;
32
+ required: z.ZodDefault<z.ZodBoolean>;
33
+ }, z.core.$strip>;
34
+ export type ApiParameter = z.infer<typeof apiParameterSchema>;
35
+ export declare const apiAuthSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ type: z.ZodLiteral<"none">;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ type: z.ZodLiteral<"bearer">;
39
+ credentialRef: z.ZodString;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ type: z.ZodLiteral<"api-key">;
42
+ credentialRef: z.ZodString;
43
+ location: z.ZodEnum<{
44
+ query: "query";
45
+ header: "header";
46
+ }>;
47
+ name: z.ZodString;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ type: z.ZodLiteral<"basic">;
50
+ credentialRef: z.ZodString;
51
+ username: z.ZodString;
52
+ }, z.core.$strip>], "type">;
53
+ export type ApiAuth = z.infer<typeof apiAuthSchema>;
54
+ export type ApiAuthView = {
55
+ type: 'none';
56
+ credentialConfigured: boolean;
57
+ } | {
58
+ type: 'bearer';
59
+ credentialConfigured: boolean;
60
+ } | {
61
+ type: 'api-key';
62
+ credentialConfigured: boolean;
63
+ location: 'header' | 'query';
64
+ name: string;
65
+ } | {
66
+ type: 'basic';
67
+ credentialConfigured: boolean;
68
+ username: string;
69
+ };
70
+ export declare const dataSourceSchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ name: z.ZodString;
73
+ type: z.ZodEnum<{
74
+ mysql: "mysql";
75
+ postgresql: "postgresql";
76
+ clickhouse: "clickhouse";
77
+ }>;
78
+ host: z.ZodString;
79
+ port: z.ZodNumber;
80
+ database: z.ZodString;
81
+ username: z.ZodString;
82
+ credentialRef: z.ZodString;
83
+ schemaInclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
84
+ tls: z.ZodDefault<z.ZodBoolean>;
85
+ sampleRows: z.ZodDefault<z.ZodNumber>;
86
+ aiEnrichment: z.ZodDefault<z.ZodBoolean>;
87
+ enabled: z.ZodDefault<z.ZodBoolean>;
88
+ createdAt: z.ZodNumber;
89
+ updatedAt: z.ZodNumber;
90
+ }, z.core.$strip>;
91
+ export type DataSourceDefinition = z.infer<typeof dataSourceSchema>;
92
+ export declare const apiDefinitionSchema: z.ZodObject<{
93
+ id: z.ZodString;
94
+ name: z.ZodString;
95
+ slug: z.ZodString;
96
+ description: z.ZodString;
97
+ method: z.ZodEnum<{
98
+ GET: "GET";
99
+ POST: "POST";
100
+ PUT: "PUT";
101
+ PATCH: "PATCH";
102
+ DELETE: "DELETE";
103
+ }>;
104
+ baseUrl: z.ZodString;
105
+ pathTemplate: z.ZodDefault<z.ZodString>;
106
+ parameters: z.ZodDefault<z.ZodArray<z.ZodObject<{
107
+ name: z.ZodString;
108
+ location: z.ZodEnum<{
109
+ path: "path";
110
+ query: "query";
111
+ header: "header";
112
+ body: "body";
113
+ }>;
114
+ type: z.ZodEnum<{
115
+ string: "string";
116
+ number: "number";
117
+ boolean: "boolean";
118
+ integer: "integer";
119
+ json: "json";
120
+ }>;
121
+ description: z.ZodDefault<z.ZodString>;
122
+ required: z.ZodDefault<z.ZodBoolean>;
123
+ }, z.core.$strip>>>;
124
+ auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
125
+ type: z.ZodLiteral<"none">;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ type: z.ZodLiteral<"bearer">;
128
+ credentialRef: z.ZodString;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ type: z.ZodLiteral<"api-key">;
131
+ credentialRef: z.ZodString;
132
+ location: z.ZodEnum<{
133
+ query: "query";
134
+ header: "header";
135
+ }>;
136
+ name: z.ZodString;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"basic">;
139
+ credentialRef: z.ZodString;
140
+ username: z.ZodString;
141
+ }, z.core.$strip>], "type">;
142
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
143
+ maxResponseBytes: z.ZodDefault<z.ZodNumber>;
144
+ responsePointer: z.ZodDefault<z.ZodString>;
145
+ allowPrivateNetwork: z.ZodDefault<z.ZodBoolean>;
146
+ enabled: z.ZodDefault<z.ZodBoolean>;
147
+ createdAt: z.ZodNumber;
148
+ updatedAt: z.ZodNumber;
149
+ }, z.core.$strip>;
150
+ export type ApiDefinition = z.infer<typeof apiDefinitionSchema>;
151
+ export declare const physicalColumnSchema: z.ZodObject<{
152
+ name: z.ZodString;
153
+ type: z.ZodString;
154
+ nullable: z.ZodBoolean;
155
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ comment: z.ZodOptional<z.ZodString>;
157
+ primaryKey: z.ZodDefault<z.ZodBoolean>;
158
+ references: z.ZodOptional<z.ZodObject<{
159
+ schemaName: z.ZodString;
160
+ objectName: z.ZodString;
161
+ columnName: z.ZodString;
162
+ }, z.core.$strip>>;
163
+ }, z.core.$strip>;
164
+ export type PhysicalColumn = z.infer<typeof physicalColumnSchema>;
165
+ export declare const semanticColumnSchema: z.ZodObject<{
166
+ name: z.ZodString;
167
+ term: z.ZodString;
168
+ description: z.ZodString;
169
+ synonyms: z.ZodDefault<z.ZodArray<z.ZodString>>;
170
+ enums: z.ZodDefault<z.ZodArray<z.ZodString>>;
171
+ role: z.ZodDefault<z.ZodEnum<{
172
+ unknown: "unknown";
173
+ identifier: "identifier";
174
+ dimension: "dimension";
175
+ measure: "measure";
176
+ time: "time";
177
+ }>>;
178
+ }, z.core.$strip>;
179
+ export type SemanticColumn = z.infer<typeof semanticColumnSchema>;
180
+ export declare const metadataProfileSchema: z.ZodObject<{
181
+ id: z.ZodString;
182
+ sourceId: z.ZodString;
183
+ schemaName: z.ZodString;
184
+ objectName: z.ZodString;
185
+ objectType: z.ZodEnum<{
186
+ table: "table";
187
+ view: "view";
188
+ }>;
189
+ engine: z.ZodOptional<z.ZodString>;
190
+ comment: z.ZodOptional<z.ZodString>;
191
+ ddl: z.ZodString;
192
+ columns: z.ZodArray<z.ZodObject<{
193
+ name: z.ZodString;
194
+ type: z.ZodString;
195
+ nullable: z.ZodBoolean;
196
+ defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ comment: z.ZodOptional<z.ZodString>;
198
+ primaryKey: z.ZodDefault<z.ZodBoolean>;
199
+ references: z.ZodOptional<z.ZodObject<{
200
+ schemaName: z.ZodString;
201
+ objectName: z.ZodString;
202
+ columnName: z.ZodString;
203
+ }, z.core.$strip>>;
204
+ }, z.core.$strip>>;
205
+ sample: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
206
+ term: z.ZodDefault<z.ZodString>;
207
+ description: z.ZodDefault<z.ZodString>;
208
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
209
+ synonyms: z.ZodDefault<z.ZodArray<z.ZodString>>;
210
+ semanticColumns: z.ZodDefault<z.ZodArray<z.ZodObject<{
211
+ name: z.ZodString;
212
+ term: z.ZodString;
213
+ description: z.ZodString;
214
+ synonyms: z.ZodDefault<z.ZodArray<z.ZodString>>;
215
+ enums: z.ZodDefault<z.ZodArray<z.ZodString>>;
216
+ role: z.ZodDefault<z.ZodEnum<{
217
+ unknown: "unknown";
218
+ identifier: "identifier";
219
+ dimension: "dimension";
220
+ measure: "measure";
221
+ time: "time";
222
+ }>>;
223
+ }, z.core.$strip>>>;
224
+ confidence: z.ZodDefault<z.ZodNumber>;
225
+ confidenceReason: z.ZodDefault<z.ZodString>;
226
+ temporary: z.ZodDefault<z.ZodBoolean>;
227
+ ignored: z.ZodDefault<z.ZodBoolean>;
228
+ ignoredOverride: z.ZodOptional<z.ZodBoolean>;
229
+ editedAt: z.ZodOptional<z.ZodNumber>;
230
+ fingerprint: z.ZodString;
231
+ semanticFingerprint: z.ZodDefault<z.ZodString>;
232
+ modelProvider: z.ZodOptional<z.ZodString>;
233
+ modelName: z.ZodOptional<z.ZodString>;
234
+ modelReasoningEffort: z.ZodOptional<z.ZodString>;
235
+ modelAnalyzedAt: z.ZodOptional<z.ZodNumber>;
236
+ modelStatus: z.ZodDefault<z.ZodEnum<{
237
+ heuristic: "heuristic";
238
+ ai: "ai";
239
+ failed: "failed";
240
+ }>>;
241
+ modelPromptVersion: z.ZodDefault<z.ZodString>;
242
+ profiledAt: z.ZodNumber;
243
+ }, z.core.$strip>;
244
+ export type MetadataProfile = z.infer<typeof metadataProfileSchema>;
245
+ export declare const metricAggregationSchema: z.ZodEnum<{
246
+ count: "count";
247
+ sum: "sum";
248
+ avg: "avg";
249
+ min: "min";
250
+ max: "max";
251
+ formula: "formula";
252
+ }>;
253
+ export type MetricAggregation = z.infer<typeof metricAggregationSchema>;
254
+ export declare const metricDefinitionSchema: z.ZodObject<{
255
+ id: z.ZodString;
256
+ sourceId: z.ZodString;
257
+ profileId: z.ZodString;
258
+ name: z.ZodString;
259
+ term: z.ZodString;
260
+ description: z.ZodDefault<z.ZodString>;
261
+ aggregation: z.ZodEnum<{
262
+ count: "count";
263
+ sum: "sum";
264
+ avg: "avg";
265
+ min: "min";
266
+ max: "max";
267
+ formula: "formula";
268
+ }>;
269
+ columnName: z.ZodDefault<z.ZodString>;
270
+ expression: z.ZodString;
271
+ unit: z.ZodDefault<z.ZodString>;
272
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
273
+ enabled: z.ZodDefault<z.ZodBoolean>;
274
+ createdAt: z.ZodNumber;
275
+ updatedAt: z.ZodNumber;
276
+ }, z.core.$strip>;
277
+ export type MetricDefinition = z.infer<typeof metricDefinitionSchema>;
278
+ export declare const metadataChangeSchema: z.ZodObject<{
279
+ id: z.ZodString;
280
+ sourceId: z.ZodString;
281
+ profileId: z.ZodString;
282
+ action: z.ZodEnum<{
283
+ create: "create";
284
+ update: "update";
285
+ scan: "scan";
286
+ model: "model";
287
+ }>;
288
+ summary: z.ZodString;
289
+ before: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
290
+ after: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
291
+ changedAt: z.ZodNumber;
292
+ }, z.core.$strip>;
293
+ export type MetadataChange = z.infer<typeof metadataChangeSchema>;
294
+ export type MetadataChangeSummary = Pick<MetadataChange, 'id' | 'sourceId' | 'profileId' | 'action' | 'summary' | 'changedAt'>;
295
+ export interface MetadataChangePage {
296
+ items: MetadataChangeSummary[];
297
+ offset: number;
298
+ limit: number;
299
+ total: number;
300
+ hasMore: boolean;
301
+ }
302
+ export interface MetricSuggestion {
303
+ profileId: string;
304
+ name: string;
305
+ term: string;
306
+ description: string;
307
+ aggregation: MetricAggregation;
308
+ columnName: string;
309
+ expression: string;
310
+ unit: string;
311
+ reason: string;
312
+ }
313
+ export interface SqlQueryResult {
314
+ columns: string[];
315
+ rows: Array<Record<string, unknown>>;
316
+ rowCount: number;
317
+ truncated: boolean;
318
+ durationMs: number;
319
+ }
320
+ export declare const profileJobSchema: z.ZodObject<{
321
+ id: z.ZodString;
322
+ sourceId: z.ZodString;
323
+ status: z.ZodEnum<{
324
+ failed: "failed";
325
+ queued: "queued";
326
+ running: "running";
327
+ completed: "completed";
328
+ cancelled: "cancelled";
329
+ }>;
330
+ mode: z.ZodDefault<z.ZodEnum<{
331
+ incremental: "incremental";
332
+ "rebuild-ai": "rebuild-ai";
333
+ full: "full";
334
+ }>>;
335
+ total: z.ZodNumber;
336
+ processed: z.ZodNumber;
337
+ currentObject: z.ZodOptional<z.ZodString>;
338
+ error: z.ZodOptional<z.ZodString>;
339
+ startedAt: z.ZodNumber;
340
+ updatedAt: z.ZodNumber;
341
+ finishedAt: z.ZodOptional<z.ZodNumber>;
342
+ modelProvider: z.ZodOptional<z.ZodString>;
343
+ modelName: z.ZodOptional<z.ZodString>;
344
+ }, z.core.$strip>;
345
+ export type ProfileJob = z.infer<typeof profileJobSchema>;
346
+ export interface DataSourceView extends Omit<DataSourceDefinition, 'credentialRef'> {
347
+ credentialConfigured: boolean;
348
+ latestJob?: ProfileJob;
349
+ profileCount: number;
350
+ aiProfileCount: number;
351
+ }
352
+ export interface ApiDefinitionView extends Omit<ApiDefinition, 'auth'> {
353
+ auth: ApiAuthView;
354
+ toolName: string;
355
+ }
356
+ export interface SaveDataSourceInput {
357
+ id?: string;
358
+ name: string;
359
+ type: DatabaseType;
360
+ host: string;
361
+ port: number;
362
+ database: string;
363
+ username: string;
364
+ secret?: string;
365
+ schemaInclude?: string[];
366
+ tls?: boolean;
367
+ sampleRows?: number;
368
+ aiEnrichment?: boolean;
369
+ enabled?: boolean;
370
+ }
371
+ export interface SaveApiDefinitionInput {
372
+ id?: string;
373
+ name: string;
374
+ slug: string;
375
+ description: string;
376
+ method: ApiMethod;
377
+ baseUrl: string;
378
+ pathTemplate: string;
379
+ parameters?: ApiParameter[];
380
+ auth: Omit<ApiAuth, 'credentialRef'>;
381
+ secret?: string;
382
+ timeoutMs?: number;
383
+ maxResponseBytes?: number;
384
+ responsePointer?: string;
385
+ allowPrivateNetwork?: boolean;
386
+ enabled?: boolean;
387
+ }
388
+ export interface ApiExecutionResult {
389
+ status: number;
390
+ contentType: string;
391
+ body: unknown;
392
+ truncated: boolean;
393
+ durationMs: number;
394
+ }
395
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,kBAAkB;;;;EAAgD,CAAA;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,eAAe;;;;;;EAAoD,CAAA;AAChF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;iBAM7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;2BAUxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEnD,MAAM,MAAM,WAAW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,CAAA;IACpB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB"}
package/package.json ADDED
@@ -0,0 +1,121 @@
1
+ {
2
+ "name": "@niuhuoshan/dsh-connect",
3
+ "version": "0.1.0",
4
+ "description": "DeepSeek Harness 数据源连接插件,支持数据库元数据发现、AI 语义建模、只读 SQL 查询和固定 HTTP API 调用",
5
+ "type": "module",
6
+ "author": "niuhuoshan",
7
+ "license": "MIT",
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/niuhuoshan/dsh-connect.git"
14
+ },
15
+ "homepage": "https://github.com/niuhuoshan/dsh-connect#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/niuhuoshan/dsh-connect/issues"
18
+ },
19
+ "keywords": [
20
+ "deepseek-harness",
21
+ "dsh",
22
+ "dsh-plugin",
23
+ "cordis",
24
+ "database",
25
+ "metadata",
26
+ "http-api",
27
+ "agent-tools"
28
+ ],
29
+ "packageManager": "pnpm@11.7.0",
30
+ "engines": {
31
+ "node": "^22.19.0 || >=24.0.0"
32
+ },
33
+ "main": "lib/index.js",
34
+ "types": "lib/types/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./lib/types/index.d.ts",
38
+ "default": "./lib/index.js"
39
+ },
40
+ "./client": {
41
+ "types": "./lib/types/client/index.d.ts",
42
+ "default": "./lib/client.js"
43
+ },
44
+ "./package.json": "./package.json"
45
+ },
46
+ "files": [
47
+ "lib",
48
+ "cordis.patch.yml",
49
+ "README.md",
50
+ "LICENSE"
51
+ ],
52
+ "dsh": {
53
+ "bundle": {
54
+ "patch": "./cordis.patch.yml"
55
+ },
56
+ "client": {
57
+ "platform": "web",
58
+ "inject": [
59
+ "@deepseek-ai/dsh-client-connection",
60
+ "@deepseek-ai/dsh-client-runtime",
61
+ "@deepseek-ai/dsh-client-ui-settings"
62
+ ]
63
+ }
64
+ },
65
+ "scripts": {
66
+ "build": "tsc --emitDeclarationOnly && node scripts/build.mjs",
67
+ "typecheck": "tsc --noEmit",
68
+ "test": "vitest run",
69
+ "check": "pnpm run typecheck && pnpm run test && pnpm run build",
70
+ "prepack": "pnpm run check"
71
+ },
72
+ "dependencies": {
73
+ "@clickhouse/client": "^1.12.1",
74
+ "mysql2": "^3.14.4",
75
+ "pg": "^8.16.3",
76
+ "zod": "^4.4.3"
77
+ },
78
+ "peerDependencies": {
79
+ "@deepseek-ai/cordis": "^4.0.1",
80
+ "@deepseek-ai/dsh-agent-default-model": "^0.1.1-rc.2",
81
+ "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
82
+ "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
83
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
84
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
85
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
86
+ "@deepseek-ai/dsh-credentials": "^0.1.1-rc.2",
87
+ "@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
88
+ "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
89
+ "@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
90
+ "@deepseek-ai/dsh-storage-domain": "^0.1.1-rc.2",
91
+ "@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
92
+ "@deepseek-ai/schemastery": "^3.18.1",
93
+ "react": "^18.3.1",
94
+ "react-dom": "^18.3.1"
95
+ },
96
+ "devDependencies": {
97
+ "@deepseek-ai/cordis": "^4.0.1",
98
+ "@deepseek-ai/dsh-agent-default-model": "0.1.1-rc.2",
99
+ "@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
100
+ "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
101
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.1-rc.2",
102
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
103
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
104
+ "@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
105
+ "@deepseek-ai/dsh-host-apiproxy": "0.1.1-rc.2",
106
+ "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
107
+ "@deepseek-ai/dsh-settings": "0.1.1-rc.2",
108
+ "@deepseek-ai/dsh-storage-domain": "0.1.1-rc.2",
109
+ "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
110
+ "@types/node": "^22.18.0",
111
+ "@types/pg": "^8.15.5",
112
+ "@types/react": "~18.3.24",
113
+ "@types/react-dom": "~18.3.7",
114
+ "@deepseek-ai/schemastery": "^3.18.1",
115
+ "esbuild": "^0.25.9",
116
+ "react": "^18.3.1",
117
+ "react-dom": "^18.3.1",
118
+ "typescript": "~5.9.2",
119
+ "vitest": "^3.2.4"
120
+ }
121
+ }