@yejiming/dsh-data-agent 0.0.12 → 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.
- package/README.en.md +97 -16
- package/README.md +97 -16
- package/conformance/dsh-ecosystem/baseline.json +59 -0
- package/conformance/dsh-ecosystem/dependencies.json +41 -0
- package/conformance/dsh-ecosystem/fixtures/host-degraded.fixture.json +12 -0
- package/conformance/dsh-ecosystem/fixtures/host-eligible.fixture.json +13 -0
- package/conformance/dsh-ecosystem/fixtures/host-rejected.fixture.json +12 -0
- package/conformance/dsh-ecosystem/fixtures/profiles/native-only/package.json +8 -0
- package/conformance/dsh-ecosystem/fixtures/profiles/native-plus-adapter/package.json +9 -0
- package/conformance/dsh-ecosystem/inventory.json +100 -0
- package/conformance/dsh-ecosystem/restrictions.json +20 -0
- package/cordis.patch.yml +6 -3
- package/dsh-plugin.json +72 -0
- package/lib/catalog-DEJqOXRo.js +1944 -0
- package/lib/catalog-identity-CVftmvQL.js +96 -0
- package/lib/client.js +3465 -138
- package/lib/client.js.map +1 -1
- package/lib/command-CzzSPmag.js +1719 -0
- package/lib/command.js +2 -2
- package/lib/{connections-5sfdEDsG.js → connections-CFXOZTHZ.js} +964 -68
- package/lib/ecosystem.js +19 -0
- package/lib/index.js +392 -34
- package/lib/routes.js +260 -8
- package/lib/{tool-DgL0fBfj.js → tool-DNkywSph.js} +367 -168
- package/lib/tool.js +1 -1
- package/lib/types/catalog-adapters.d.ts +52 -0
- package/lib/types/catalog-ai.d.ts +49 -0
- package/lib/types/catalog-command.d.ts +28 -0
- package/lib/types/catalog-identity.d.ts +23 -0
- package/lib/types/catalog-storage.d.ts +265 -0
- package/lib/types/catalog-tools.d.ts +5 -0
- package/lib/types/catalog-tui.d.ts +18 -0
- package/lib/types/catalog-types.d.ts +1376 -0
- package/lib/types/catalog.d.ts +59 -0
- package/lib/types/client/CatalogPanel.d.ts +15 -0
- package/lib/types/client/DataAgentWorkbench.d.ts +1 -2
- package/lib/types/client/QueryResultTable.d.ts +13 -0
- package/lib/types/client/catalog-client.d.ts +57 -0
- package/lib/types/client/locales.d.ts +290 -0
- package/lib/types/client/persistence.d.ts +3 -1
- package/lib/types/client/query-export.d.ts +11 -0
- package/lib/types/client-discovery.d.ts +3 -4
- package/lib/types/clients.d.ts +14 -8
- package/lib/types/command.d.ts +16 -5
- package/lib/types/connections.d.ts +42 -4
- package/lib/types/database-types.d.ts +23 -0
- package/lib/types/defaults.d.ts +26 -0
- package/lib/types/ecosystem.d.ts +13 -0
- package/lib/types/index.d.ts +58 -15
- package/lib/types/query.d.ts +13 -11
- package/lib/types/sql.d.ts +9 -1
- package/lib/types/storage.d.ts +11 -1
- package/lib/types/structured-read.d.ts +2 -2
- package/lib/types/structured.d.ts +1 -1
- package/lib/types/tool.d.ts +5 -5
- package/lib/types/tui-connection-form.d.ts +21 -12
- package/package.json +30 -4
- package/preset/data-agent/agent.cordis.yml +13 -2
- package/lib/command-DuCpwVbl.js +0 -875
- package/lib/defaults-DP4RyRh1.js +0 -21
package/lib/types/command.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Context } from '@deepseek-ai/cordis';
|
|
8
8
|
import type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands';
|
|
9
|
-
import { type ConnectionFormDraft, type ConnectionSummary, type DatabaseConnectionInput } from './connections.ts';
|
|
9
|
+
import { type ConnectionFormDraft, type ConnectionFormInitial, type ConnectionSummary, type DatabaseConnectionInput } from './connections.ts';
|
|
10
10
|
export declare const name = "data-agent-database-command";
|
|
11
11
|
export declare const inject: string[];
|
|
12
12
|
export declare const DATABASE_COMMAND_USAGE: string;
|
|
@@ -20,16 +20,27 @@ type DatabaseAction = {
|
|
|
20
20
|
} | {
|
|
21
21
|
kind: 'disconnect';
|
|
22
22
|
};
|
|
23
|
-
export declare const DATA_AGENT_TOOL_NAMES: readonly ["str_replace_editor", "sql-query", "sql-write", "sql-cmd"];
|
|
23
|
+
export declare const DATA_AGENT_TOOL_NAMES: readonly ["str_replace_editor", "sql-query", "sql-write", "sql-cmd", "catalog-search", "catalog-get", "metric-get"];
|
|
24
24
|
export interface DatabaseCommandInteraction {
|
|
25
25
|
isTuiFormAvailable(): boolean;
|
|
26
26
|
collectTuiConnection(signal: AbortSignal, options: {
|
|
27
|
-
initialDraft?:
|
|
27
|
+
initialDraft?: ConnectionFormInitial;
|
|
28
28
|
persistDraft(draft: ConnectionFormDraft): Promise<void>;
|
|
29
29
|
}): Promise<DatabaseConnectionInput | undefined>;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
export interface DataAgentCommandAdapterOptions {
|
|
32
|
+
/** Override only for focused runtime-boundary tests. */
|
|
33
|
+
isDshTuiPluginLoaded?: (ctx: Context) => boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Official Cordis runtime name exported by `@deepseek-harness-tui/dsh-tui`. */
|
|
36
|
+
export declare const DSH_TUI_PLUGIN_RUNTIME_NAME = "dsh-tui";
|
|
37
|
+
/**
|
|
38
|
+
* Detect actual plugin usage from Cordis' live registry. Package installation,
|
|
39
|
+
* argv and profile labels are deliberately irrelevant.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isDshTuiPluginLoaded(ctx: Context): boolean;
|
|
42
|
+
/** Keep the tool boundary everywhere; follow the actual dsh-tui runtime lifecycle for commands. */
|
|
43
|
+
export declare function apply(ctx: Context, options?: DataAgentCommandAdapterOptions): void;
|
|
33
44
|
/** Public for focused command tests and alternate command adapters. */
|
|
34
45
|
export declare function executeDatabaseCommand(ctx: Context, invocation: CommandInvocation, interaction?: DatabaseCommandInteraction): Promise<CommandResult>;
|
|
35
46
|
/** Parse one command's raw input without ever accepting a plaintext password. */
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
11
11
|
import { type ClientConfig, type ColumnInfo } from './clients.ts';
|
|
12
|
+
import { type DatabaseType } from './database-types.ts';
|
|
12
13
|
import { type QueryResult } from './query.ts';
|
|
14
|
+
export type { DatabaseType } from './database-types.ts';
|
|
13
15
|
/** Key of the wildcard connection applied to sessions without an exact entry. */
|
|
14
16
|
export declare const WILDCARD_SESSION = "*";
|
|
15
|
-
/** Supported database client kinds. */
|
|
16
|
-
export type DatabaseType = 'mysql' | 'postgres' | 'sqlite' | 'oracle' | 'hive' | 'impala';
|
|
17
17
|
/** How a non-SQLite profile authenticates without ever persisting a secret. */
|
|
18
18
|
export type CredentialMode = 'none' | 'password' | 'reference';
|
|
19
19
|
/** Safe credential facts returned to UI/command surfaces. */
|
|
@@ -33,6 +33,8 @@ export interface DatabaseConnectionInput {
|
|
|
33
33
|
/** Non-secret DSH credential reference, mutually exclusive with password. */
|
|
34
34
|
passwordRef?: string;
|
|
35
35
|
readonly?: boolean;
|
|
36
|
+
/** ClickHouse HTTP transport uses HTTPS with normal certificate verification. */
|
|
37
|
+
secure?: boolean;
|
|
36
38
|
/** Optional stable durable profile id. */
|
|
37
39
|
profileId?: string;
|
|
38
40
|
/** Optional human-readable profile label. */
|
|
@@ -53,6 +55,7 @@ export interface ConnectionSummary {
|
|
|
53
55
|
database: string;
|
|
54
56
|
passwordRef?: string;
|
|
55
57
|
readonly?: boolean;
|
|
58
|
+
secure?: boolean;
|
|
56
59
|
profileId?: string;
|
|
57
60
|
name?: string;
|
|
58
61
|
tables?: string[];
|
|
@@ -72,6 +75,7 @@ export interface PersistedConnectionProfile {
|
|
|
72
75
|
user?: string;
|
|
73
76
|
database: string;
|
|
74
77
|
readonly?: boolean;
|
|
78
|
+
secure?: boolean;
|
|
75
79
|
passwordRef?: string;
|
|
76
80
|
credentialMode?: CredentialMode;
|
|
77
81
|
updatedAt: string;
|
|
@@ -89,14 +93,27 @@ export interface ConnectionFormDraft {
|
|
|
89
93
|
user: string;
|
|
90
94
|
database: string;
|
|
91
95
|
readonly: boolean;
|
|
96
|
+
secure?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** Form initial values may also restore one non-secret credential reference. */
|
|
99
|
+
export interface ConnectionFormInitial extends ConnectionFormDraft {
|
|
100
|
+
passwordRef?: string;
|
|
92
101
|
}
|
|
93
102
|
/** Durable draft record. Passwords and credential references are forbidden. */
|
|
94
103
|
export interface PersistedConnectionFormDraft extends ConnectionFormDraft {
|
|
95
104
|
updatedAt: string;
|
|
96
105
|
}
|
|
106
|
+
/** Deterministic latest-profile lookup result supplied by durable adapters. */
|
|
107
|
+
export interface PersistedConnectionProfileEntry {
|
|
108
|
+
profileId: string;
|
|
109
|
+
profile: PersistedConnectionProfile;
|
|
110
|
+
}
|
|
97
111
|
/** Minimal durable seam; backed by a DSH storage domain in production. */
|
|
98
112
|
export interface ConnectionPersistence {
|
|
99
113
|
getProfile(profileId: string): PersistedConnectionProfile | undefined;
|
|
114
|
+
getLatestProfile?(): PersistedConnectionProfileEntry | undefined;
|
|
115
|
+
/** Deterministic profile enumeration used only for exact, non-secret identity reuse. */
|
|
116
|
+
listProfiles?(): PersistedConnectionProfileEntry[];
|
|
100
117
|
putProfile(profileId: string, profile: PersistedConnectionProfile): Promise<void>;
|
|
101
118
|
deleteProfile(profileId: string): Promise<boolean>;
|
|
102
119
|
getBinding(sessionId: string): SessionConnectionBinding | undefined;
|
|
@@ -104,22 +121,39 @@ export interface ConnectionPersistence {
|
|
|
104
121
|
deleteBinding(sessionId: string): Promise<boolean>;
|
|
105
122
|
getDraft?(sessionId: string): PersistedConnectionFormDraft | undefined;
|
|
106
123
|
putDraft?(sessionId: string, draft: PersistedConnectionFormDraft): Promise<void>;
|
|
124
|
+
deleteDraft?(sessionId: string): Promise<boolean>;
|
|
107
125
|
}
|
|
108
126
|
/** Shared service configuration supplied by the host plugin. */
|
|
109
127
|
export interface ConnectionServiceOptions {
|
|
110
128
|
connectTimeoutMs: number;
|
|
111
129
|
queryTimeoutMs: number;
|
|
130
|
+
catalogQueryTimeoutMs?: number;
|
|
131
|
+
/** Per-stream capture budget for package-owned system-catalog queries. */
|
|
132
|
+
catalogMaxResultChars?: number;
|
|
112
133
|
maxResultChars: number;
|
|
113
134
|
maxQueryChars?: number;
|
|
114
135
|
introspectMaxTables: number;
|
|
115
136
|
readonly: boolean;
|
|
116
137
|
clients: Partial<Record<string, ClientConfig>>;
|
|
117
138
|
cwd?: string;
|
|
139
|
+
/** Profile ids already used by durable downstream data, ordered by the owner. */
|
|
140
|
+
preferredProfileIds?: () => readonly string[];
|
|
118
141
|
}
|
|
119
142
|
export interface ConnectResult {
|
|
120
143
|
tables: string[];
|
|
121
144
|
summary: ConnectionSummary;
|
|
122
145
|
}
|
|
146
|
+
/** Structured read result or raw command message returned to interactive surfaces. */
|
|
147
|
+
export type InteractiveQueryResult = {
|
|
148
|
+
kind: 'table';
|
|
149
|
+
columns: string[];
|
|
150
|
+
rows: Record<string, string | null>[];
|
|
151
|
+
elapsedMs: number;
|
|
152
|
+
truncated: boolean;
|
|
153
|
+
maxRows: number;
|
|
154
|
+
} | ({
|
|
155
|
+
kind: 'message';
|
|
156
|
+
} & QueryResult);
|
|
123
157
|
/** Host-plane service (`ctx.dataAgentConnections`). */
|
|
124
158
|
export interface DataAgentConnections {
|
|
125
159
|
/** Compatibility setter for config seeds/tests; does not persist. */
|
|
@@ -131,8 +165,8 @@ export interface DataAgentConnections {
|
|
|
131
165
|
has(sessionId: string): boolean;
|
|
132
166
|
/** Compatibility runtime-only clear. Use disconnect() for durable bindings. */
|
|
133
167
|
clear(sessionId: string): void;
|
|
134
|
-
/** Restore
|
|
135
|
-
getFormDraft(sessionId: string):
|
|
168
|
+
/** Restore exact or latest-profile non-secret interactive form values. */
|
|
169
|
+
getFormDraft(sessionId: string): ConnectionFormInitial | undefined;
|
|
136
170
|
/** Save non-secret form values; the implementation never accepts a password. */
|
|
137
171
|
saveFormDraft(sessionId: string, draft: ConnectionFormDraft): Promise<void>;
|
|
138
172
|
status(sessionId: string): Promise<ConnectionSummary | undefined>;
|
|
@@ -140,10 +174,13 @@ export interface DataAgentConnections {
|
|
|
140
174
|
disconnect(sessionId: string): Promise<void>;
|
|
141
175
|
test(sessionId: string, signal: AbortSignal): Promise<ConnectResult>;
|
|
142
176
|
resolveForExecution(sessionId: string): Promise<DatabaseConnection>;
|
|
177
|
+
/** Execute one package-owned, read-only system-catalog statement. Not exposed as a model tool. */
|
|
178
|
+
queryMetadata(sessionId: string, sql: string, signal: AbortSignal): Promise<QueryResult>;
|
|
143
179
|
listSchemas(sessionId: string, signal: AbortSignal): Promise<string[]>;
|
|
144
180
|
listTables(sessionId: string, schema: string | undefined, signal: AbortSignal): Promise<string[]>;
|
|
145
181
|
describe(sessionId: string, schema: string | undefined, table: string, signal: AbortSignal): Promise<ColumnInfo[]>;
|
|
146
182
|
query(sessionId: string, sql: string, signal: AbortSignal): Promise<QueryResult>;
|
|
183
|
+
executeInteractive(sessionId: string, sql: string, signal: AbortSignal): Promise<InteractiveQueryResult>;
|
|
147
184
|
}
|
|
148
185
|
/** Build a password-stripped copy of one connection. */
|
|
149
186
|
export declare function summarize(connection: DatabaseConnection): ConnectionSummary;
|
|
@@ -157,3 +194,4 @@ export declare function normalizeConnectionInput(input: DatabaseConnectionInput,
|
|
|
157
194
|
export declare function createConnectionService(ctx?: Context, options?: ConnectionServiceOptions, persistence?: ConnectionPersistence): DataAgentConnections;
|
|
158
195
|
/** Backward-compatible in-memory store factory used by embedders/tests. */
|
|
159
196
|
export declare function createConnectionStore(): DataAgentConnections;
|
|
197
|
+
export declare function validatePasswordRef(value: string): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe database type descriptors shared by every DSH surface.
|
|
3
|
+
* Keep this module dependency-free: server-only client/process details belong
|
|
4
|
+
* in the database adapters, not in Web or persistence bundles.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DATABASE_TYPES: readonly ["mysql", "postgres", "sqlite", "oracle", "hive", "impala", "clickhouse", "doris", "sqlserver"];
|
|
7
|
+
export type DatabaseType = typeof DATABASE_TYPES[number];
|
|
8
|
+
export interface DatabaseTypeDescriptor {
|
|
9
|
+
type: DatabaseType;
|
|
10
|
+
label: string;
|
|
11
|
+
localeKey: `type.${DatabaseType}`;
|
|
12
|
+
defaultPort: number;
|
|
13
|
+
defaultUser: string;
|
|
14
|
+
fileBased: boolean;
|
|
15
|
+
/** HTTPS port used when ClickHouse secure transport is selected. */
|
|
16
|
+
securePort?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const DATABASE_TYPE_DESCRIPTORS: Readonly<Record<DatabaseType, DatabaseTypeDescriptor>>;
|
|
19
|
+
export declare function isDatabaseType(value: unknown): value is DatabaseType;
|
|
20
|
+
export declare function databaseTypeDescriptor(type: DatabaseType): DatabaseTypeDescriptor;
|
|
21
|
+
export declare function defaultDatabasePort(type: DatabaseType, secure?: boolean): number;
|
|
22
|
+
export declare function defaultDatabaseUser(type: DatabaseType): string;
|
|
23
|
+
export declare function databaseTypeLabel(type: DatabaseType): string;
|
package/lib/types/defaults.d.ts
CHANGED
|
@@ -16,7 +16,33 @@ export declare const DEFAULT_QUERY_TIMEOUT_MS = 30000;
|
|
|
16
16
|
export declare const DEFAULT_MAX_RESULT_CHARS = 20000;
|
|
17
17
|
/** Maximum structured rows returned by one database read tool call. */
|
|
18
18
|
export declare const DEFAULT_MAX_ROWS = 100;
|
|
19
|
+
/** Hard row cap for one structured Web workbench result/export. */
|
|
20
|
+
export declare const WORKBENCH_MAX_EXPORT_ROWS = 50000;
|
|
21
|
+
/** Bounded capture size for the larger structured Web workbench result. */
|
|
22
|
+
export declare const WORKBENCH_MAX_RESULT_CHARS: number;
|
|
19
23
|
/** Cap on one /query SQL text length (abuse guard; the wire body stays small). */
|
|
20
24
|
export declare const DEFAULT_MAX_QUERY_CHARS = 65536;
|
|
21
25
|
/** Grace period for the subprocess terminate escalation. */
|
|
22
26
|
export declare const DEFAULT_GRACE_MS = 5000;
|
|
27
|
+
/** Catalog metadata query deadline. Kept separate from user SQL execution. */
|
|
28
|
+
export declare const DEFAULT_CATALOG_QUERY_TIMEOUT_MS = 30000;
|
|
29
|
+
/**
|
|
30
|
+
* Per-stream capture budget for one system-catalog query. Catalog metadata is
|
|
31
|
+
* intentionally independent from the much smaller model/interactive SQL
|
|
32
|
+
* result budget because a schema snapshot can contain thousands of objects.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DEFAULT_CATALOG_MAX_RESULT_CHARS: number;
|
|
35
|
+
/** Maximum schemas inspected concurrently by one Catalog scan. */
|
|
36
|
+
export declare const DEFAULT_CATALOG_SCHEMA_CONCURRENCY = 2;
|
|
37
|
+
/** Maximum tables/views inspected concurrently by one Catalog scan. */
|
|
38
|
+
export declare const DEFAULT_CATALOG_ASSET_CONCURRENCY = 4;
|
|
39
|
+
/** Hard bound on technical assets (including columns) staged by one run. */
|
|
40
|
+
export declare const DEFAULT_CATALOG_MAX_ASSETS = 50000;
|
|
41
|
+
/** Maximum normalized length of one database or human-authored text field. */
|
|
42
|
+
export declare const DEFAULT_CATALOG_MAX_TEXT_CHARS = 4096;
|
|
43
|
+
/** Default and maximum page sizes for Catalog list/detail reads. */
|
|
44
|
+
export declare const DEFAULT_CATALOG_PAGE_SIZE = 50;
|
|
45
|
+
export declare const MAX_CATALOG_PAGE_SIZE = 200;
|
|
46
|
+
/** Default and maximum result counts exposed to the model. */
|
|
47
|
+
export declare const DEFAULT_CATALOG_TOOL_TOP_K = 10;
|
|
48
|
+
export declare const MAX_CATALOG_TOOL_TOP_K = 25;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Community v0.15 host facet.
|
|
3
|
+
*
|
|
4
|
+
* This facet intentionally publishes no commands, tools, UI, routes, storage,
|
|
5
|
+
* credentials, or database effects. The existing Cordis bundle remains the
|
|
6
|
+
* sole functional runtime so hosts may discover the ecosystem declaration
|
|
7
|
+
* without double-registering data-agent behavior.
|
|
8
|
+
*/
|
|
9
|
+
import { type FacetProjection } from '@dsh-std/sdk';
|
|
10
|
+
/** Stable degraded snapshot for declaration-only ecosystem discovery. */
|
|
11
|
+
export declare const ECOSYSTEM_SNAPSHOT: FacetProjection;
|
|
12
|
+
declare const ecosystemFacet: import("@dsh-std/sdk").FacetModule;
|
|
13
|
+
export default ecosystemFacet;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Data Agent profile entry. The host row provides the
|
|
3
3
|
* `dataAgentConnections` service (shared non-secret profile/binding storage;
|
|
4
4
|
* temporary passwords stay process-local), seeds config connections (`connections`, `'*'` =
|
|
5
|
-
* wildcard default), installs the `data-agent` agent preset into
|
|
5
|
+
* wildcard default), provides a separate versioned governance Catalog, installs the `data-agent` agent preset into
|
|
6
6
|
* `$DSH_HOME/.agent-presets/`, and preloads the preset-scoped database tools
|
|
7
|
-
*
|
|
7
|
+
* on every surface, while registering `/database` and `/catalog` only while
|
|
8
|
+
* the current Cordis composition actually loads the dsh-tui plugin.
|
|
8
9
|
*
|
|
9
10
|
* The HTTP routes live in the separate `./routes` entry
|
|
10
11
|
* (`@yejiming/dsh-data-agent/routes`, cordis row `data-agent-routes`) so
|
|
@@ -21,18 +22,25 @@ import type { ScopeKey } from '@deepseek-ai/dsh-scope';
|
|
|
21
22
|
declare module '@deepseek-ai/cordis' {
|
|
22
23
|
interface Context {
|
|
23
24
|
dataAgentConnections: DataAgentConnections;
|
|
25
|
+
dataAgentCatalog: DataAgentCatalog;
|
|
26
|
+
dataAgentCatalogScanner: DataAgentCatalogScanner;
|
|
27
|
+
dataAgentCatalogReview: DataAgentCatalogReview;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
import z from 'schemastery';
|
|
27
31
|
import { type DataAgentConnections, type DatabaseType } from './connections.ts';
|
|
28
|
-
import { type ClientConfig } from './clients.ts';
|
|
32
|
+
import { type CliDatabaseType, type ClientConfig } from './clients.ts';
|
|
33
|
+
import { type DataAgentCatalog, type DataAgentCatalogReview, type DataAgentCatalogScanner } from './catalog.ts';
|
|
34
|
+
import { type DataAgentCommandAdapterOptions } from './command.ts';
|
|
29
35
|
import { type Config as ToolConfig } from './tool.ts';
|
|
36
|
+
export type { CatalogServiceBundle, CatalogServiceOptions, CatalogStatusSummary, DataAgentCatalog, DataAgentCatalogReview, DataAgentCatalogScanner, StartCatalogScanInput, } from './catalog.ts';
|
|
37
|
+
export type { CatalogAssetDetail, CatalogAssetHead, CatalogAssetKind, CatalogAssetRevision, CatalogAssetStatus, CatalogCapability, CatalogDiffItem, CatalogDiffKind, CatalogDiffPage, CatalogEnrichment, CatalogEnrichmentStatus, CatalogIdentity, CatalogObservation, CatalogProgress, CatalogRelation, CatalogRun, CatalogRunStatus, CatalogScope, CatalogSearchFilters, CatalogSearchItem, CatalogSearchPage, CatalogSearchRequest, CatalogSemanticEntry, CatalogSemanticKind, CatalogSemanticRevision, CatalogSemanticStatus, CatalogSource, CatalogTechnicalPayload, MetricDefinition, MeaningDefinition, SemanticDefinition, TermDefinition, } from './catalog-types.ts';
|
|
30
38
|
/** Cordis plugin name (diagnostics only). */
|
|
31
39
|
export declare const name = "data-agent";
|
|
32
40
|
/** Services required before the profile entry can mount its preset layer. */
|
|
33
41
|
export declare const inject: string[];
|
|
34
42
|
/** Deployment overrides for one database type's CLI client. */
|
|
35
|
-
export type ClientsConfig = Partial<Record<
|
|
43
|
+
export type ClientsConfig = Partial<Record<CliDatabaseType, ClientConfig>>;
|
|
36
44
|
/**
|
|
37
45
|
* One config-seeded connection. Deliberately password-free: passwords are a
|
|
38
46
|
* memory-only / connect-time value, so only the /connect route may carry one.
|
|
@@ -47,6 +55,8 @@ export interface SeededConnectionConfig {
|
|
|
47
55
|
database: string;
|
|
48
56
|
/** Optional per-seed read-only guard. */
|
|
49
57
|
readonly?: boolean;
|
|
58
|
+
/** ClickHouse only: use HTTPS with certificate verification. */
|
|
59
|
+
secure?: boolean;
|
|
50
60
|
/** Safe credential reference. Real passwords are rejected by the schema. */
|
|
51
61
|
passwordRef?: string;
|
|
52
62
|
password?: never;
|
|
@@ -63,6 +73,20 @@ export interface Config {
|
|
|
63
73
|
introspectMaxTables: number;
|
|
64
74
|
/** Deadline for one database-tool query, milliseconds. */
|
|
65
75
|
queryTimeoutMs: number;
|
|
76
|
+
/** Deadline for one package-owned system-catalog metadata query. */
|
|
77
|
+
catalogQueryTimeoutMs: number;
|
|
78
|
+
/** Per-stream capture budget for one package-owned system-catalog query. */
|
|
79
|
+
catalogMaxResultChars: number;
|
|
80
|
+
/** Maximum schemas and table/view details processed concurrently. */
|
|
81
|
+
catalogSchemaConcurrency: number;
|
|
82
|
+
catalogAssetConcurrency: number;
|
|
83
|
+
/** Hard technical asset bound for one scan. */
|
|
84
|
+
catalogMaxAssetsPerRun: number;
|
|
85
|
+
/** Maximum normalized database/human text field length. */
|
|
86
|
+
catalogMaxTextChars: number;
|
|
87
|
+
/** Default and maximum Catalog list/detail page sizes. */
|
|
88
|
+
catalogPageSize: number;
|
|
89
|
+
catalogMaxPageSize: number;
|
|
66
90
|
/** In-memory cap on database-tool captured output. */
|
|
67
91
|
maxResultChars: number;
|
|
68
92
|
/** Maximum structured rows returned by one database read tool call. */
|
|
@@ -85,6 +109,14 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
85
109
|
connectTimeoutMs: z<number, number>;
|
|
86
110
|
introspectMaxTables: z<number, number>;
|
|
87
111
|
queryTimeoutMs: z<number, number>;
|
|
112
|
+
catalogQueryTimeoutMs: z<number, number>;
|
|
113
|
+
catalogMaxResultChars: z<number, number>;
|
|
114
|
+
catalogSchemaConcurrency: z<number, number>;
|
|
115
|
+
catalogAssetConcurrency: z<number, number>;
|
|
116
|
+
catalogMaxAssetsPerRun: z<number, number>;
|
|
117
|
+
catalogMaxTextChars: z<number, number>;
|
|
118
|
+
catalogPageSize: z<number, number>;
|
|
119
|
+
catalogMaxPageSize: z<number, number>;
|
|
88
120
|
maxResultChars: z<number, number>;
|
|
89
121
|
maxRows: z<number, number>;
|
|
90
122
|
maxQueryChars: z<number, number>;
|
|
@@ -94,27 +126,29 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
94
126
|
command?: string | null | undefined;
|
|
95
127
|
args?: string[] | null | undefined;
|
|
96
128
|
searchPaths?: string[] | null | undefined;
|
|
97
|
-
} & import("@deepseek-ai/cosmokit").Dict,
|
|
129
|
+
} & import("@deepseek-ai/cosmokit").Dict, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
98
130
|
command: z<string, string>;
|
|
99
131
|
args: z<string[], string[]>;
|
|
100
132
|
searchPaths: z<string[], string[]>;
|
|
101
|
-
}>,
|
|
133
|
+
}>, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">>;
|
|
102
134
|
connections: z<import("cosmokit").Dict<{
|
|
103
|
-
type?: "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | null | undefined;
|
|
135
|
+
type?: "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver" | null | undefined;
|
|
104
136
|
host?: string | null | undefined;
|
|
105
137
|
port?: number | null | undefined;
|
|
106
138
|
user?: string | null | undefined;
|
|
107
139
|
database?: string | null | undefined;
|
|
108
140
|
readonly?: boolean | null | undefined;
|
|
141
|
+
secure?: boolean | null | undefined;
|
|
109
142
|
passwordRef?: string | null | undefined;
|
|
110
143
|
password?: null | undefined;
|
|
111
144
|
} & import("@deepseek-ai/cosmokit").Dict, string>, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
112
|
-
type: z<"mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala", "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala">;
|
|
145
|
+
type: z<"mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver", "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver">;
|
|
113
146
|
host: z<string, string>;
|
|
114
147
|
port: z<number, number>;
|
|
115
148
|
user: z<string, string>;
|
|
116
149
|
database: z<string, string>;
|
|
117
150
|
readonly: z<boolean, boolean>;
|
|
151
|
+
secure: z<boolean, boolean>;
|
|
118
152
|
passwordRef: z<string, string>;
|
|
119
153
|
password: z<never, never>;
|
|
120
154
|
}>, string>>;
|
|
@@ -124,6 +158,14 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
124
158
|
connectTimeoutMs: z<number, number>;
|
|
125
159
|
introspectMaxTables: z<number, number>;
|
|
126
160
|
queryTimeoutMs: z<number, number>;
|
|
161
|
+
catalogQueryTimeoutMs: z<number, number>;
|
|
162
|
+
catalogMaxResultChars: z<number, number>;
|
|
163
|
+
catalogSchemaConcurrency: z<number, number>;
|
|
164
|
+
catalogAssetConcurrency: z<number, number>;
|
|
165
|
+
catalogMaxAssetsPerRun: z<number, number>;
|
|
166
|
+
catalogMaxTextChars: z<number, number>;
|
|
167
|
+
catalogPageSize: z<number, number>;
|
|
168
|
+
catalogMaxPageSize: z<number, number>;
|
|
127
169
|
maxResultChars: z<number, number>;
|
|
128
170
|
maxRows: z<number, number>;
|
|
129
171
|
maxQueryChars: z<number, number>;
|
|
@@ -133,27 +175,29 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
133
175
|
command?: string | null | undefined;
|
|
134
176
|
args?: string[] | null | undefined;
|
|
135
177
|
searchPaths?: string[] | null | undefined;
|
|
136
|
-
} & import("@deepseek-ai/cosmokit").Dict,
|
|
178
|
+
} & import("@deepseek-ai/cosmokit").Dict, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
137
179
|
command: z<string, string>;
|
|
138
180
|
args: z<string[], string[]>;
|
|
139
181
|
searchPaths: z<string[], string[]>;
|
|
140
|
-
}>,
|
|
182
|
+
}>, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">>;
|
|
141
183
|
connections: z<import("cosmokit").Dict<{
|
|
142
|
-
type?: "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | null | undefined;
|
|
184
|
+
type?: "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver" | null | undefined;
|
|
143
185
|
host?: string | null | undefined;
|
|
144
186
|
port?: number | null | undefined;
|
|
145
187
|
user?: string | null | undefined;
|
|
146
188
|
database?: string | null | undefined;
|
|
147
189
|
readonly?: boolean | null | undefined;
|
|
190
|
+
secure?: boolean | null | undefined;
|
|
148
191
|
passwordRef?: string | null | undefined;
|
|
149
192
|
password?: null | undefined;
|
|
150
193
|
} & import("@deepseek-ai/cosmokit").Dict, string>, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
151
|
-
type: z<"mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala", "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala">;
|
|
194
|
+
type: z<"mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver", "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "clickhouse" | "doris" | "sqlserver">;
|
|
152
195
|
host: z<string, string>;
|
|
153
196
|
port: z<number, number>;
|
|
154
197
|
user: z<string, string>;
|
|
155
198
|
database: z<string, string>;
|
|
156
199
|
readonly: z<boolean, boolean>;
|
|
200
|
+
secure: z<boolean, boolean>;
|
|
157
201
|
passwordRef: z<string, string>;
|
|
158
202
|
password: z<never, never>;
|
|
159
203
|
}>, string>>;
|
|
@@ -182,11 +226,11 @@ export declare function missingProfileDependencyMessage(profile: string): string
|
|
|
182
226
|
/** Tool configuration inherited by the profile-preloaded preset capabilities. */
|
|
183
227
|
type PresetCapabilitiesConfig = Pick<ToolConfig, 'queryTimeoutMs' | 'maxResultChars' | 'maxRows' | 'maxQueryChars' | 'readonly' | 'clients'>;
|
|
184
228
|
/**
|
|
185
|
-
* Register the statically imported database tools and
|
|
229
|
+
* Register the statically imported database tools and surface adapters under the exact
|
|
186
230
|
* standing key owned by the data-agent preset. Selecting the preset performs
|
|
187
231
|
* no package import and only links the agent scope to this key.
|
|
188
232
|
*/
|
|
189
|
-
export declare function mountPresetCapabilities(ctx: Context, key: ScopeKey, scopeTag: symbol, config: PresetCapabilitiesConfig): Promise<void>;
|
|
233
|
+
export declare function mountPresetCapabilities(ctx: Context, key: ScopeKey, scopeTag: symbol, config: PresetCapabilitiesConfig, commandOptions?: DataAgentCommandAdapterOptions): Promise<void>;
|
|
190
234
|
/**
|
|
191
235
|
* Mount the data-agent profile row: connection store, config-seeded
|
|
192
236
|
* connections, preset installation, and profile-preloaded preset capabilities.
|
|
@@ -195,4 +239,3 @@ export declare function mountPresetCapabilities(ctx: Context, key: ScopeKey, sco
|
|
|
195
239
|
* @param config - validated loader configuration.
|
|
196
240
|
*/
|
|
197
241
|
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
198
|
-
export {};
|
package/lib/types/query.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The shared
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* output.
|
|
2
|
+
* The shared database runner used by both halves: the /connect connectivity
|
|
3
|
+
* check (server half) and the database tools (tool half). CLI-backed adapters
|
|
4
|
+
* go through `ctx.subprocess` with argv arrays, SQL on stdin, and credentials
|
|
5
|
+
* in their dedicated environment/stdin channel. ClickHouse uses the official
|
|
6
|
+
* Node HTTP client with explicit transport/authentication fields. Both paths
|
|
7
|
+
* share caller-owned cancellation, deadlines, and bounded captured output.
|
|
8
8
|
* @module @yejiming/dsh-data-agent/query
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
@@ -26,11 +26,11 @@ export interface QueryResult {
|
|
|
26
26
|
/** True when either stream hit the maxResultChars cap. */
|
|
27
27
|
truncated: boolean;
|
|
28
28
|
}
|
|
29
|
-
/** Which
|
|
29
|
+
/** Which deterministic raw/introspection/structured output mode to use. */
|
|
30
30
|
export type QueryTemplateMode = 'query' | 'introspect' | 'structured';
|
|
31
31
|
/** Runner options: client overrides, deadlines, output caps. */
|
|
32
32
|
export interface QueryOptions {
|
|
33
|
-
/** Deployment
|
|
33
|
+
/** Deployment CLI overrides keyed by CLI-backed database type. */
|
|
34
34
|
clients: Readonly<Partial<Record<DatabaseType, ClientConfig>>>;
|
|
35
35
|
/** End-to-end deadline in milliseconds (timeout → terminate the tree). */
|
|
36
36
|
timeoutMs: number;
|
|
@@ -41,10 +41,12 @@ export interface QueryOptions {
|
|
|
41
41
|
/** CLI flag set; overrides the legacy `introspect` parameter when set. */
|
|
42
42
|
mode?: QueryTemplateMode;
|
|
43
43
|
}
|
|
44
|
+
/** ClickHouse endpoint construction never embeds username or password. */
|
|
45
|
+
export declare function clickHouseConnectionUrl(connection: DatabaseConnection): string;
|
|
44
46
|
/**
|
|
45
|
-
* Run one SQL text through the type's
|
|
46
|
-
* child
|
|
47
|
-
*
|
|
47
|
+
* Run one SQL text through the type's shared adapter. CLI SQL is written to
|
|
48
|
+
* child stdin (`{ data }` batch disposition), while ClickHouse SQL is an HTTP
|
|
49
|
+
* request body; neither path puts SQL or credentials in argv.
|
|
48
50
|
*
|
|
49
51
|
* Failure classification:
|
|
50
52
|
* - the caller's external signal (e.g. the tool exec signal) aborts → the
|
package/lib/types/sql.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* docs/optimization-opportunities.md:
|
|
7
7
|
*
|
|
8
8
|
* - a single tool call carries at most ONE SQL statement;
|
|
9
|
-
* - `maxRows` can be enforced with a real
|
|
9
|
+
* - `maxRows` can be enforced with a real dialect-level row bound, not just a prompt.
|
|
10
10
|
*
|
|
11
11
|
* @module @yejiming/dsh-data-agent/sql
|
|
12
12
|
*/
|
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
export declare function assertSingleStatement(sql: string, label?: string): void;
|
|
19
19
|
/** Whether `keyword` appears at top level as a whole word in `sql`. */
|
|
20
20
|
export declare function hasTopLevelKeyword(sql: string, keyword: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Preserve executable SQL text while replacing strings, quoted identifiers,
|
|
23
|
+
* dollar/Oracle quoted bodies, and comments with spaces. Newlines are kept so
|
|
24
|
+
* line-oriented client directives can be checked without false positives.
|
|
25
|
+
*/
|
|
26
|
+
export declare function maskSqlLiteralsAndComments(sql: string): string;
|
|
27
|
+
/** Reject commands interpreted by sqlcmd itself rather than by SQL Server. */
|
|
28
|
+
export declare function assertSqlServerSafeInput(sql: string, label?: string): void;
|
|
21
29
|
/**
|
|
22
30
|
* Strip trailing whitespace, statement terminators and trailing comments so a
|
|
23
31
|
* limit clause can be appended to the actual statement text. Only comments
|
package/lib/types/storage.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { type Domain } from '@deepseek-ai/dsh-storage-domain';
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
import type { ConnectionPersistence, PersistedConnectionFormDraft, PersistedConnectionProfile, SessionConnectionBinding } from './connections.ts';
|
|
13
|
+
import type { ConnectionPersistence, PersistedConnectionFormDraft, PersistedConnectionProfile, PersistedConnectionProfileEntry, SessionConnectionBinding } from './connections.ts';
|
|
14
14
|
/** Storage-domain identity. Bump the version only with an explicit migration. */
|
|
15
15
|
export declare const CONNECTION_STORAGE_DOMAIN = "data_agent_connections";
|
|
16
16
|
export declare const CONNECTION_STORAGE_VERSION = 1;
|
|
@@ -24,12 +24,16 @@ export declare const persistedConnectionProfileSchema: z.ZodObject<{
|
|
|
24
24
|
oracle: "oracle";
|
|
25
25
|
hive: "hive";
|
|
26
26
|
impala: "impala";
|
|
27
|
+
clickhouse: "clickhouse";
|
|
28
|
+
doris: "doris";
|
|
29
|
+
sqlserver: "sqlserver";
|
|
27
30
|
}>;
|
|
28
31
|
host: z.ZodOptional<z.ZodString>;
|
|
29
32
|
port: z.ZodOptional<z.ZodNumber>;
|
|
30
33
|
user: z.ZodOptional<z.ZodString>;
|
|
31
34
|
database: z.ZodString;
|
|
32
35
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
secure: z.ZodOptional<z.ZodBoolean>;
|
|
33
37
|
passwordRef: z.ZodOptional<z.ZodString>;
|
|
34
38
|
credentialMode: z.ZodOptional<z.ZodEnum<{
|
|
35
39
|
none: "none";
|
|
@@ -52,12 +56,16 @@ export declare const persistedConnectionFormDraftSchema: z.ZodObject<{
|
|
|
52
56
|
oracle: "oracle";
|
|
53
57
|
hive: "hive";
|
|
54
58
|
impala: "impala";
|
|
59
|
+
clickhouse: "clickhouse";
|
|
60
|
+
doris: "doris";
|
|
61
|
+
sqlserver: "sqlserver";
|
|
55
62
|
}>;
|
|
56
63
|
host: z.ZodString;
|
|
57
64
|
port: z.ZodString;
|
|
58
65
|
user: z.ZodString;
|
|
59
66
|
database: z.ZodString;
|
|
60
67
|
readonly: z.ZodBoolean;
|
|
68
|
+
secure: z.ZodOptional<z.ZodBoolean>;
|
|
61
69
|
updatedAt: z.ZodString;
|
|
62
70
|
}, z.core.$strict>;
|
|
63
71
|
/** Single source of truth for the storage layout and durable validation. */
|
|
@@ -71,5 +79,7 @@ export declare const connectionStorageSpec: {
|
|
|
71
79
|
};
|
|
72
80
|
};
|
|
73
81
|
export type ConnectionStorageDomain = Domain<typeof connectionStorageSpec>;
|
|
82
|
+
/** Select the newest successful profile with a deterministic id tie-break. */
|
|
83
|
+
export declare function latestConnectionProfile(entries: Iterable<readonly [string, PersistedConnectionProfile]>): PersistedConnectionProfileEntry | undefined;
|
|
74
84
|
/** Project a typed DSH domain handle onto the service's persistence seam. */
|
|
75
85
|
export declare function createDomainConnectionPersistence(domain: ConnectionStorageDomain): ConnectionPersistence;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Shared structured read-query execution extracted from the sql-query tool
|
|
3
3
|
* (task 2.1). Both sql-query and render-analysis run every read dataset
|
|
4
4
|
* through this helper, so connection resolution, single-statement assertion,
|
|
5
|
-
* read classification,
|
|
5
|
+
* read classification, dialect-aware maxRows enforcement, client execution, secret
|
|
6
6
|
* redaction, timeout/cancellation, non-zero-exit surfacing and structured
|
|
7
7
|
* parsing share one code path. Existing sql-query behavior and messages stay
|
|
8
8
|
* unchanged.
|
|
@@ -45,6 +45,6 @@ export declare function runnerOptions(resolved: Pick<ResolvedRunnerConfig, 'quer
|
|
|
45
45
|
/**
|
|
46
46
|
* Execute one read-only SQL through the structured client template and parse
|
|
47
47
|
* it into the canonical { columns, rows } shape, with maxRows enforced at both
|
|
48
|
-
* the SQL level (
|
|
48
|
+
* the SQL level (dialect rewrite) and the parse level.
|
|
49
49
|
*/
|
|
50
50
|
export declare function runStructuredReadQuery(ctx: Context, connection: DatabaseConnection, sql: string, resolved: ResolvedRunnerConfig, toolName: string, signal: AbortSignal): Promise<StructuredReadResult>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* {@link buildStructuredQueryTemplate} in `src/clients.ts`); this module turns
|
|
5
5
|
* that captured stdout into the canonical `{ columns, rows }` shape and
|
|
6
6
|
* enforces the row cap a second time (first line of defense is the SQL-level
|
|
7
|
-
*
|
|
7
|
+
* dialect-aware SQL rewriting, second is truncation while parsing).
|
|
8
8
|
*
|
|
9
9
|
* The parsers are deliberately output-shape based, not grammar based. Values
|
|
10
10
|
* stay as strings because every client renders SQL values as text (NULL
|
package/lib/types/tool.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface Config {
|
|
|
30
30
|
queryTimeoutMs: number;
|
|
31
31
|
/** In-memory cap on captured output. */
|
|
32
32
|
maxResultChars: number;
|
|
33
|
-
/** Enforced read-query row cap (
|
|
33
|
+
/** Enforced read-query row cap (dialect rewrite + structured truncation). */
|
|
34
34
|
maxRows: number;
|
|
35
35
|
/** Maximum SQL text length accepted per dataset statement. */
|
|
36
36
|
maxQueryChars: number;
|
|
@@ -50,11 +50,11 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
50
50
|
command?: string | null | undefined;
|
|
51
51
|
args?: string[] | null | undefined;
|
|
52
52
|
searchPaths?: string[] | null | undefined;
|
|
53
|
-
} & import("@deepseek-ai/cosmokit").Dict,
|
|
53
|
+
} & import("@deepseek-ai/cosmokit").Dict, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
54
54
|
command: z<string, string>;
|
|
55
55
|
args: z<string[], string[]>;
|
|
56
56
|
searchPaths: z<string[], string[]>;
|
|
57
|
-
}>,
|
|
57
|
+
}>, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">>;
|
|
58
58
|
}>, Schemastery.ObjectT<{
|
|
59
59
|
queryTimeoutMs: z<number, number>;
|
|
60
60
|
maxResultChars: z<number, number>;
|
|
@@ -65,11 +65,11 @@ export declare const Config: z<Schemastery.ObjectS<{
|
|
|
65
65
|
command?: string | null | undefined;
|
|
66
66
|
args?: string[] | null | undefined;
|
|
67
67
|
searchPaths?: string[] | null | undefined;
|
|
68
|
-
} & import("@deepseek-ai/cosmokit").Dict,
|
|
68
|
+
} & import("@deepseek-ai/cosmokit").Dict, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">, import("cosmokit").Dict<Schemastery.ObjectT<{
|
|
69
69
|
command: z<string, string>;
|
|
70
70
|
args: z<string[], string[]>;
|
|
71
71
|
searchPaths: z<string[], string[]>;
|
|
72
|
-
}>,
|
|
72
|
+
}>, "mysql" | "postgres" | "sqlite" | "oracle" | "hive" | "impala" | "doris" | "sqlserver">>;
|
|
73
73
|
}>>;
|
|
74
74
|
/**
|
|
75
75
|
* Mount the data-agent database tools: `sql-query` (structured read-only),
|