@mcp-consultant-tools/azure-sql 27.0.0 → 28.0.0-beta.13
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/build/cli/commands/connection-commands.d.ts +7 -0
- package/build/cli/commands/connection-commands.d.ts.map +1 -0
- package/build/cli/commands/connection-commands.js +64 -0
- package/build/cli/commands/connection-commands.js.map +1 -0
- package/build/cli/commands/index.d.ts +9 -0
- package/build/cli/commands/index.d.ts.map +1 -0
- package/build/cli/commands/index.js +12 -0
- package/build/cli/commands/index.js.map +1 -0
- package/build/cli/commands/query-commands.d.ts +7 -0
- package/build/cli/commands/query-commands.d.ts.map +1 -0
- package/build/cli/commands/query-commands.js +149 -0
- package/build/cli/commands/query-commands.js.map +1 -0
- package/build/cli/output.d.ts +11 -0
- package/build/cli/output.d.ts.map +1 -0
- package/build/cli/output.js +10 -0
- package/build/cli/output.js.map +1 -0
- package/build/cli.d.ts +9 -0
- package/build/cli.d.ts.map +1 -0
- package/build/cli.js +27 -0
- package/build/cli.js.map +1 -0
- package/build/context-factory.d.ts +10 -0
- package/build/context-factory.d.ts.map +1 -0
- package/build/context-factory.js +61 -0
- package/build/context-factory.js.map +1 -0
- package/build/index.d.ts +15 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +40 -491
- package/build/index.js.map +1 -1
- package/build/prompts/index.d.ts +4 -0
- package/build/prompts/index.d.ts.map +1 -0
- package/build/prompts/index.js +6 -0
- package/build/prompts/index.js.map +1 -0
- package/build/prompts/templates.d.ts +3 -0
- package/build/prompts/templates.d.ts.map +1 -0
- package/build/prompts/templates.js +81 -0
- package/build/prompts/templates.js.map +1 -0
- package/build/services/connection-service.d.ts +132 -0
- package/build/services/connection-service.d.ts.map +1 -0
- package/build/services/connection-service.js +350 -0
- package/build/services/connection-service.js.map +1 -0
- package/build/services/index.d.ts +5 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +3 -0
- package/build/services/index.js.map +1 -0
- package/build/services/query-service.d.ts +119 -0
- package/build/services/query-service.d.ts.map +1 -0
- package/build/services/query-service.js +355 -0
- package/build/services/query-service.js.map +1 -0
- package/build/tool-examples.d.ts +22 -0
- package/build/tool-examples.d.ts.map +1 -0
- package/build/tool-examples.js +27 -0
- package/build/tool-examples.js.map +1 -0
- package/build/tools/connection-tools.d.ts +3 -0
- package/build/tools/connection-tools.d.ts.map +1 -0
- package/build/tools/connection-tools.js +132 -0
- package/build/tools/connection-tools.js.map +1 -0
- package/build/tools/index.d.ts +5 -0
- package/build/tools/index.d.ts.map +1 -0
- package/build/tools/index.js +9 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/query-tools.d.ts +3 -0
- package/build/tools/query-tools.d.ts.map +1 -0
- package/build/tools/query-tools.js +272 -0
- package/build/tools/query-tools.js.map +1 -0
- package/build/types.d.ts +11 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/utils/sql-formatters.d.ts +2 -1
- package/build/utils/sql-formatters.d.ts.map +1 -1
- package/package.json +5 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { formatSqlResultsAsMarkdown, formatTableSchemaAsMarkdown, formatDatabaseOverview, } from '../utils/sql-formatters.js';
|
|
3
|
+
export function registerSqlPrompts(server, ctx) {
|
|
4
|
+
server.prompt("sql-database-overview", "Get a comprehensive overview of the Azure SQL Database schema", {
|
|
5
|
+
serverId: z.string().optional().describe("\u26A0\uFE0F OMIT to use default server. DO NOT GUESS."),
|
|
6
|
+
database: z.string().optional().describe("\u26A0\uFE0F OMIT to use default database. DO NOT GUESS."),
|
|
7
|
+
}, async ({ serverId, database }) => {
|
|
8
|
+
const resolvedServerId = ctx.connection.resolveServerId(serverId);
|
|
9
|
+
const resolvedDatabase = ctx.connection.resolveDatabase(resolvedServerId, database);
|
|
10
|
+
const [tables, views, procedures, triggers, functions] = await Promise.all([
|
|
11
|
+
ctx.query.listTables(resolvedServerId, resolvedDatabase),
|
|
12
|
+
ctx.query.listViews(resolvedServerId, resolvedDatabase),
|
|
13
|
+
ctx.query.listStoredProcedures(resolvedServerId, resolvedDatabase),
|
|
14
|
+
ctx.query.listTriggers(resolvedServerId, resolvedDatabase),
|
|
15
|
+
ctx.query.listFunctions(resolvedServerId, resolvedDatabase),
|
|
16
|
+
]);
|
|
17
|
+
const formattedOverview = formatDatabaseOverview(tables, views, procedures, triggers, functions);
|
|
18
|
+
return {
|
|
19
|
+
messages: [
|
|
20
|
+
{
|
|
21
|
+
role: "user",
|
|
22
|
+
content: {
|
|
23
|
+
type: "text",
|
|
24
|
+
text: formattedOverview,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
server.prompt("sql-table-details", "Get detailed report for a specific table with columns, indexes, and relationships", {
|
|
31
|
+
serverId: z.string().optional().describe("\u26A0\uFE0F OMIT to use default server. DO NOT GUESS."),
|
|
32
|
+
database: z.string().optional().describe("\u26A0\uFE0F OMIT to use default database. DO NOT GUESS."),
|
|
33
|
+
schemaName: z.string().describe("Schema name (e.g., 'dbo')"),
|
|
34
|
+
tableName: z.string().describe("Table name"),
|
|
35
|
+
}, async ({ serverId, database, schemaName, tableName }) => {
|
|
36
|
+
const resolvedServerId = ctx.connection.resolveServerId(serverId);
|
|
37
|
+
const resolvedDatabase = ctx.connection.resolveDatabase(resolvedServerId, database);
|
|
38
|
+
const schema = await ctx.query.getTableSchema(resolvedServerId, resolvedDatabase, schemaName, tableName);
|
|
39
|
+
let template = formatTableSchemaAsMarkdown(schema);
|
|
40
|
+
template += `\n\n### Sample Query\n\n\`\`\`sql\nSELECT TOP 100 * FROM ${schemaName}.${tableName}\n\`\`\``;
|
|
41
|
+
return {
|
|
42
|
+
messages: [
|
|
43
|
+
{
|
|
44
|
+
role: "user",
|
|
45
|
+
content: {
|
|
46
|
+
type: "text",
|
|
47
|
+
text: template,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
server.prompt("sql-query-results", "Execute a query and return formatted results with column headers", {
|
|
54
|
+
serverId: z.string().optional().describe("\u26A0\uFE0F OMIT to use default server. DO NOT GUESS."),
|
|
55
|
+
database: z.string().optional().describe("\u26A0\uFE0F OMIT to use default database. DO NOT GUESS."),
|
|
56
|
+
query: z.string().describe("SELECT query to execute"),
|
|
57
|
+
}, async ({ serverId, database, query }) => {
|
|
58
|
+
const resolvedServerId = ctx.connection.resolveServerId(serverId);
|
|
59
|
+
const resolvedDatabase = ctx.connection.resolveDatabase(resolvedServerId, database);
|
|
60
|
+
const result = await ctx.query.executeSelectQuery(resolvedServerId, resolvedDatabase, query);
|
|
61
|
+
let template = `## Query Results\n\n`;
|
|
62
|
+
template += `**Query:**\n\`\`\`sql\n${query}\n\`\`\`\n\n`;
|
|
63
|
+
template += `**Results:**\n${formatSqlResultsAsMarkdown(result)}\n\n`;
|
|
64
|
+
template += `**Row Count:** ${result.rowCount}`;
|
|
65
|
+
if (result.truncated) {
|
|
66
|
+
template += ` (truncated)`;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
messages: [
|
|
70
|
+
{
|
|
71
|
+
role: "user",
|
|
72
|
+
content: {
|
|
73
|
+
type: "text",
|
|
74
|
+
text: template,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,UAAU,kBAAkB,CAAC,M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
+
/**
|
|
4
|
+
* Database configuration within a server
|
|
5
|
+
*/
|
|
6
|
+
export interface AzureSqlDatabaseConfig {
|
|
7
|
+
name: string;
|
|
8
|
+
active: boolean;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* SQL Server resource configuration
|
|
13
|
+
*/
|
|
14
|
+
export interface AzureSqlServerResource {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
server: string;
|
|
18
|
+
port: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
databases: AzureSqlDatabaseConfig[];
|
|
21
|
+
username?: string;
|
|
22
|
+
password?: string;
|
|
23
|
+
useAzureAd?: boolean;
|
|
24
|
+
azureAdClientId?: string;
|
|
25
|
+
azureAdClientSecret?: string;
|
|
26
|
+
azureAdTenantId?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Multi-server Azure SQL configuration
|
|
31
|
+
*/
|
|
32
|
+
export interface AzureSqlConfig {
|
|
33
|
+
resources: AzureSqlServerResource[];
|
|
34
|
+
queryTimeout?: number;
|
|
35
|
+
maxResultRows?: number;
|
|
36
|
+
connectionTimeout?: number;
|
|
37
|
+
poolMin?: number;
|
|
38
|
+
poolMax?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface SqlApiCollectionResponse<T> {
|
|
41
|
+
columns: string[];
|
|
42
|
+
rows: T[];
|
|
43
|
+
rowCount: number;
|
|
44
|
+
truncated?: boolean;
|
|
45
|
+
}
|
|
46
|
+
export interface ServerInfo {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
server: string;
|
|
50
|
+
port: number;
|
|
51
|
+
active: boolean;
|
|
52
|
+
databaseCount: number;
|
|
53
|
+
description?: string;
|
|
54
|
+
authMethod: 'SQL' | 'Azure AD';
|
|
55
|
+
}
|
|
56
|
+
export interface DatabaseInfo {
|
|
57
|
+
name: string;
|
|
58
|
+
active: boolean;
|
|
59
|
+
description?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface DefaultConfiguration {
|
|
62
|
+
defaultServerId: string | null;
|
|
63
|
+
defaultServerName: string | null;
|
|
64
|
+
defaultDatabase: string | null;
|
|
65
|
+
serverCount: number;
|
|
66
|
+
databaseCount: number;
|
|
67
|
+
hint: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ConnectionTestResult {
|
|
70
|
+
connected: boolean;
|
|
71
|
+
server: string;
|
|
72
|
+
database: string;
|
|
73
|
+
sqlVersion?: string;
|
|
74
|
+
currentDatabase?: string;
|
|
75
|
+
loginName?: string;
|
|
76
|
+
userName?: string;
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
79
|
+
export { MAX_RESPONSE_SIZE_BYTES };
|
|
80
|
+
/**
|
|
81
|
+
* ConnectionService manages connection pools, server/database resolution, and connectivity.
|
|
82
|
+
*/
|
|
83
|
+
export declare class ConnectionService {
|
|
84
|
+
readonly config: AzureSqlConfig;
|
|
85
|
+
private pools;
|
|
86
|
+
constructor(config: AzureSqlConfig);
|
|
87
|
+
/**
|
|
88
|
+
* Get server resource by ID with validation
|
|
89
|
+
*/
|
|
90
|
+
getServerById(serverId: string): AzureSqlServerResource;
|
|
91
|
+
/**
|
|
92
|
+
* Get database configuration with validation
|
|
93
|
+
*/
|
|
94
|
+
getDatabaseConfig(server: AzureSqlServerResource, database: string): AzureSqlDatabaseConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Get or create connection pool for specific server and database
|
|
97
|
+
*/
|
|
98
|
+
getPool(serverId: string, database: string): Promise<sql.ConnectionPool>;
|
|
99
|
+
/**
|
|
100
|
+
* Sanitize error messages to prevent credential leakage
|
|
101
|
+
*/
|
|
102
|
+
sanitizeErrorMessage(message: string): string;
|
|
103
|
+
/**
|
|
104
|
+
* Close all connection pools (cleanup)
|
|
105
|
+
*/
|
|
106
|
+
close(): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* List all configured SQL servers
|
|
109
|
+
*/
|
|
110
|
+
listServers(): Promise<ServerInfo[]>;
|
|
111
|
+
/**
|
|
112
|
+
* Get default server and database configuration for zero-discovery workflows
|
|
113
|
+
*/
|
|
114
|
+
getDefaultConfiguration(): DefaultConfiguration;
|
|
115
|
+
/**
|
|
116
|
+
* Resolve server ID - returns the provided ID or resolves the default
|
|
117
|
+
*/
|
|
118
|
+
resolveServerId(serverId?: string): string;
|
|
119
|
+
/**
|
|
120
|
+
* Resolve database name - returns the provided name or resolves the default for the given server
|
|
121
|
+
*/
|
|
122
|
+
resolveDatabase(serverId: string, database?: string): string;
|
|
123
|
+
/**
|
|
124
|
+
* List databases on a server
|
|
125
|
+
*/
|
|
126
|
+
listDatabases(serverId: string): Promise<DatabaseInfo[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Test database connectivity
|
|
129
|
+
*/
|
|
130
|
+
testConnection(serverId: string, database: string): Promise<ConnectionTestResult>;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=connection-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-service.d.ts","sourceRoot":"","sources":["../../src/services/connection-service.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AAGxB,QAAA,MAAM,uBAAuB,QAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,sBAAsB,EAAE,CAAC;IAGpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM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EG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAgC9D;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;CA+BxF"}
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import sql from 'mssql';
|
|
2
|
+
// Configuration constants
|
|
3
|
+
const MAX_RESPONSE_SIZE_BYTES = 10 * 1024 * 1024; // 10MB
|
|
4
|
+
export { MAX_RESPONSE_SIZE_BYTES };
|
|
5
|
+
/**
|
|
6
|
+
* ConnectionService manages connection pools, server/database resolution, and connectivity.
|
|
7
|
+
*/
|
|
8
|
+
export class ConnectionService {
|
|
9
|
+
config;
|
|
10
|
+
// Multi-pool: Map<"serverId:database", ConnectionPool>
|
|
11
|
+
pools = new Map();
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = {
|
|
14
|
+
resources: config.resources.map(resource => ({
|
|
15
|
+
...resource,
|
|
16
|
+
port: resource.port || 1433,
|
|
17
|
+
useAzureAd: resource.useAzureAd ?? false,
|
|
18
|
+
})),
|
|
19
|
+
queryTimeout: config.queryTimeout || 30000,
|
|
20
|
+
maxResultRows: config.maxResultRows || 1000,
|
|
21
|
+
connectionTimeout: config.connectionTimeout || 15000,
|
|
22
|
+
poolMin: config.poolMin || 0,
|
|
23
|
+
poolMax: config.poolMax || 10,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get server resource by ID with validation
|
|
28
|
+
*/
|
|
29
|
+
getServerById(serverId) {
|
|
30
|
+
const server = this.config.resources.find(r => r.id === serverId);
|
|
31
|
+
if (!server) {
|
|
32
|
+
const available = this.config.resources.map(r => r.id).join(', ');
|
|
33
|
+
const defaultServer = this.config.resources.find(r => r.active)?.id;
|
|
34
|
+
throw new Error(`Server '${serverId}' not found. Available: [${available || 'none'}]. ` +
|
|
35
|
+
(defaultServer
|
|
36
|
+
? `\uD83D\uDCA1 TIP: OMIT the serverId parameter entirely to use the default server '${defaultServer}'. DO NOT GUESS server IDs.`
|
|
37
|
+
: `Use sql-list-servers to see configured servers.`));
|
|
38
|
+
}
|
|
39
|
+
if (!server.active) {
|
|
40
|
+
throw new Error(`Server '${serverId}' is inactive. Set active=true in configuration to enable access.`);
|
|
41
|
+
}
|
|
42
|
+
return server;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get database configuration with validation
|
|
46
|
+
*/
|
|
47
|
+
getDatabaseConfig(server, database) {
|
|
48
|
+
if (server.databases.length === 0) {
|
|
49
|
+
return { name: database, active: true };
|
|
50
|
+
}
|
|
51
|
+
const dbConfig = server.databases.find(db => db.name === database);
|
|
52
|
+
if (!dbConfig) {
|
|
53
|
+
const available = server.databases.map(db => db.name).join(', ');
|
|
54
|
+
const defaultDb = server.databases.find(db => db.active)?.name;
|
|
55
|
+
throw new Error(`Database '${database}' not found on server '${server.id}'. Available: [${available || 'none'}]. ` +
|
|
56
|
+
(defaultDb
|
|
57
|
+
? `\uD83D\uDCA1 TIP: OMIT the database parameter entirely to use the default database '${defaultDb}'. DO NOT GUESS database names.`
|
|
58
|
+
: `Use sql-list-databases to see available databases.`));
|
|
59
|
+
}
|
|
60
|
+
if (!dbConfig.active) {
|
|
61
|
+
throw new Error(`Database '${database}' is inactive on server '${server.id}'. ` +
|
|
62
|
+
`Set active=true in configuration to enable access.`);
|
|
63
|
+
}
|
|
64
|
+
return dbConfig;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get or create connection pool for specific server and database
|
|
68
|
+
*/
|
|
69
|
+
async getPool(serverId, database) {
|
|
70
|
+
const poolKey = `${serverId}:${database}`;
|
|
71
|
+
if (this.pools.has(poolKey)) {
|
|
72
|
+
const pool = this.pools.get(poolKey);
|
|
73
|
+
if (pool.connected && pool.healthy) {
|
|
74
|
+
return pool;
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
await pool.close();
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
console.error(`Error closing unhealthy pool ${poolKey}:`, error);
|
|
81
|
+
}
|
|
82
|
+
this.pools.delete(poolKey);
|
|
83
|
+
}
|
|
84
|
+
const server = this.getServerById(serverId);
|
|
85
|
+
this.getDatabaseConfig(server, database);
|
|
86
|
+
try {
|
|
87
|
+
const poolConfig = {
|
|
88
|
+
server: server.server,
|
|
89
|
+
database: database,
|
|
90
|
+
port: server.port,
|
|
91
|
+
connectionTimeout: this.config.connectionTimeout,
|
|
92
|
+
requestTimeout: this.config.queryTimeout,
|
|
93
|
+
pool: {
|
|
94
|
+
min: this.config.poolMin,
|
|
95
|
+
max: this.config.poolMax,
|
|
96
|
+
idleTimeoutMillis: 30000,
|
|
97
|
+
},
|
|
98
|
+
options: {
|
|
99
|
+
encrypt: true,
|
|
100
|
+
trustServerCertificate: false,
|
|
101
|
+
enableArithAbort: true,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
if (server.useAzureAd) {
|
|
105
|
+
poolConfig.authentication = {
|
|
106
|
+
type: 'azure-active-directory-service-principal-secret',
|
|
107
|
+
options: {
|
|
108
|
+
clientId: server.azureAdClientId,
|
|
109
|
+
clientSecret: server.azureAdClientSecret,
|
|
110
|
+
tenantId: server.azureAdTenantId,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
poolConfig.user = server.username;
|
|
116
|
+
poolConfig.password = server.password;
|
|
117
|
+
}
|
|
118
|
+
const pool = await sql.connect(poolConfig);
|
|
119
|
+
this.pools.set(poolKey, pool);
|
|
120
|
+
console.error(`Azure SQL connection pool established: ${poolKey}`);
|
|
121
|
+
return pool;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
console.error(`Failed to connect to Azure SQL Database (${poolKey}):`, {
|
|
125
|
+
server: server.server,
|
|
126
|
+
database: database,
|
|
127
|
+
error: this.sanitizeErrorMessage(error.message),
|
|
128
|
+
});
|
|
129
|
+
throw new Error(`Database connection failed for '${serverId}/${database}': ${this.sanitizeErrorMessage(error.message)}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Sanitize error messages to prevent credential leakage
|
|
134
|
+
*/
|
|
135
|
+
sanitizeErrorMessage(message) {
|
|
136
|
+
return message
|
|
137
|
+
.replace(/password=[^;]+/gi, 'password=***')
|
|
138
|
+
.replace(/pwd=[^;]+/gi, 'pwd=***')
|
|
139
|
+
.replace(/clientSecret=[^;]+/gi, 'clientSecret=***')
|
|
140
|
+
.replace(/Authentication=ActiveDirectoryServicePrincipal;([^;]*);/gi, 'Authentication=***;');
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Close all connection pools (cleanup)
|
|
144
|
+
*/
|
|
145
|
+
async close() {
|
|
146
|
+
const closedPools = [];
|
|
147
|
+
const errors = [];
|
|
148
|
+
for (const [poolKey, pool] of this.pools.entries()) {
|
|
149
|
+
try {
|
|
150
|
+
await pool.close();
|
|
151
|
+
closedPools.push(poolKey);
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
const errorMsg = this.sanitizeErrorMessage(error.message);
|
|
155
|
+
errors.push(`${poolKey}: ${errorMsg}`);
|
|
156
|
+
console.error(`Error closing pool ${poolKey}:`, errorMsg);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
this.pools.clear();
|
|
160
|
+
if (closedPools.length > 0) {
|
|
161
|
+
console.error(`Azure SQL connection pools closed: ${closedPools.join(', ')}`);
|
|
162
|
+
}
|
|
163
|
+
if (errors.length > 0) {
|
|
164
|
+
console.error(`Errors closing pools: ${errors.join('; ')}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* List all configured SQL servers
|
|
169
|
+
*/
|
|
170
|
+
async listServers() {
|
|
171
|
+
return this.config.resources.map(resource => ({
|
|
172
|
+
id: resource.id,
|
|
173
|
+
name: resource.name,
|
|
174
|
+
server: resource.server,
|
|
175
|
+
port: resource.port,
|
|
176
|
+
active: resource.active,
|
|
177
|
+
databaseCount: resource.databases.length,
|
|
178
|
+
description: resource.description,
|
|
179
|
+
authMethod: resource.useAzureAd ? 'Azure AD' : 'SQL',
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get default server and database configuration for zero-discovery workflows
|
|
184
|
+
*/
|
|
185
|
+
getDefaultConfiguration() {
|
|
186
|
+
const activeServers = this.config.resources.filter(r => r.active);
|
|
187
|
+
const serverCount = this.config.resources.length;
|
|
188
|
+
if (serverCount === 0) {
|
|
189
|
+
return {
|
|
190
|
+
defaultServerId: null,
|
|
191
|
+
defaultServerName: null,
|
|
192
|
+
defaultDatabase: null,
|
|
193
|
+
serverCount: 0,
|
|
194
|
+
databaseCount: 0,
|
|
195
|
+
hint: 'No SQL servers configured. Add AZURE_SQL_SERVERS or AZURE_SQL_SERVER/AZURE_SQL_DATABASE environment variables.',
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (activeServers.length === 0) {
|
|
199
|
+
return {
|
|
200
|
+
defaultServerId: null,
|
|
201
|
+
defaultServerName: null,
|
|
202
|
+
defaultDatabase: null,
|
|
203
|
+
serverCount,
|
|
204
|
+
databaseCount: 0,
|
|
205
|
+
hint: `${serverCount} server(s) configured but none are active. Set active=true on a server to enable it.`,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const defaultServer = activeServers[0];
|
|
209
|
+
const activeDatabases = defaultServer.databases.filter(db => db.active);
|
|
210
|
+
const databaseCount = defaultServer.databases.length;
|
|
211
|
+
if (databaseCount === 0) {
|
|
212
|
+
return {
|
|
213
|
+
defaultServerId: defaultServer.id,
|
|
214
|
+
defaultServerName: defaultServer.name,
|
|
215
|
+
defaultDatabase: null,
|
|
216
|
+
serverCount,
|
|
217
|
+
databaseCount: 0,
|
|
218
|
+
hint: serverCount === 1
|
|
219
|
+
? `Single server configured (${defaultServer.id}). Databases are in discovery mode - you must specify the database parameter.`
|
|
220
|
+
: `${serverCount} server(s) configured. Default: ${defaultServer.id}. Databases are in discovery mode - you must specify the database parameter.`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (activeDatabases.length === 0) {
|
|
224
|
+
return {
|
|
225
|
+
defaultServerId: defaultServer.id,
|
|
226
|
+
defaultServerName: defaultServer.name,
|
|
227
|
+
defaultDatabase: null,
|
|
228
|
+
serverCount,
|
|
229
|
+
databaseCount,
|
|
230
|
+
hint: `${databaseCount} database(s) configured on server '${defaultServer.id}' but none are active. Set active=true on a database to enable it.`,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const defaultDatabase = activeDatabases[0];
|
|
234
|
+
let hint;
|
|
235
|
+
if (serverCount === 1 && databaseCount === 1) {
|
|
236
|
+
hint = `Single server and database configured. You can omit serverId and database parameters in queries - they will default to '${defaultServer.id}' and '${defaultDatabase.name}'.`;
|
|
237
|
+
}
|
|
238
|
+
else if (serverCount === 1 && activeDatabases.length === 1) {
|
|
239
|
+
hint = `Single server with one active database. You can omit serverId and database parameters - defaults: server='${defaultServer.id}', database='${defaultDatabase.name}'.`;
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
hint = `${serverCount} server(s), ${databaseCount} database(s) on default server. Defaults: server='${defaultServer.id}', database='${defaultDatabase.name}'. Use sql-list-servers and sql-list-databases for full list.`;
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
defaultServerId: defaultServer.id,
|
|
246
|
+
defaultServerName: defaultServer.name,
|
|
247
|
+
defaultDatabase: defaultDatabase.name,
|
|
248
|
+
serverCount,
|
|
249
|
+
databaseCount,
|
|
250
|
+
hint,
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Resolve server ID - returns the provided ID or resolves the default
|
|
255
|
+
*/
|
|
256
|
+
resolveServerId(serverId) {
|
|
257
|
+
if (serverId) {
|
|
258
|
+
return serverId;
|
|
259
|
+
}
|
|
260
|
+
const defaults = this.getDefaultConfiguration();
|
|
261
|
+
if (!defaults.defaultServerId) {
|
|
262
|
+
throw new Error(defaults.hint);
|
|
263
|
+
}
|
|
264
|
+
return defaults.defaultServerId;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Resolve database name - returns the provided name or resolves the default for the given server
|
|
268
|
+
*/
|
|
269
|
+
resolveDatabase(serverId, database) {
|
|
270
|
+
if (database) {
|
|
271
|
+
return database;
|
|
272
|
+
}
|
|
273
|
+
const server = this.getServerById(serverId);
|
|
274
|
+
const activeDatabases = server.databases.filter(db => db.active);
|
|
275
|
+
if (server.databases.length === 0) {
|
|
276
|
+
throw new Error(`Server '${serverId}' is in discovery mode (no databases pre-configured). ` +
|
|
277
|
+
`You must specify the database parameter. Use sql-list-databases to discover available databases.`);
|
|
278
|
+
}
|
|
279
|
+
if (activeDatabases.length === 0) {
|
|
280
|
+
const available = server.databases.map(db => db.name).join(', ');
|
|
281
|
+
throw new Error(`No active databases on server '${serverId}'. Available databases: ${available}. ` +
|
|
282
|
+
`Set active=true in configuration or specify the database parameter explicitly.`);
|
|
283
|
+
}
|
|
284
|
+
return activeDatabases[0].name;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* List databases on a server
|
|
288
|
+
*/
|
|
289
|
+
async listDatabases(serverId) {
|
|
290
|
+
const server = this.getServerById(serverId);
|
|
291
|
+
if (server.databases.length > 0) {
|
|
292
|
+
return server.databases.map(db => ({
|
|
293
|
+
name: db.name,
|
|
294
|
+
active: db.active,
|
|
295
|
+
description: db.description,
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
try {
|
|
299
|
+
const pool = await this.getPool(serverId, 'master');
|
|
300
|
+
const result = await pool.request().query(`
|
|
301
|
+
SELECT name
|
|
302
|
+
FROM sys.databases
|
|
303
|
+
WHERE database_id > 4
|
|
304
|
+
ORDER BY name
|
|
305
|
+
`);
|
|
306
|
+
return result.recordset.map((r) => ({
|
|
307
|
+
name: r.name,
|
|
308
|
+
active: true,
|
|
309
|
+
description: 'Discovered database',
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
throw new Error(`Failed to query databases on server '${serverId}': ${this.sanitizeErrorMessage(error.message)}`);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Test database connectivity
|
|
318
|
+
*/
|
|
319
|
+
async testConnection(serverId, database) {
|
|
320
|
+
const server = this.getServerById(serverId);
|
|
321
|
+
try {
|
|
322
|
+
const pool = await this.getPool(serverId, database);
|
|
323
|
+
const result = await pool.request().query(`
|
|
324
|
+
SELECT
|
|
325
|
+
@@VERSION as sqlVersion,
|
|
326
|
+
DB_NAME() as currentDatabase,
|
|
327
|
+
SUSER_SNAME() as loginName,
|
|
328
|
+
USER_NAME() as userName
|
|
329
|
+
`);
|
|
330
|
+
return {
|
|
331
|
+
connected: true,
|
|
332
|
+
server: server.server,
|
|
333
|
+
database: database,
|
|
334
|
+
sqlVersion: result.recordset[0].sqlVersion,
|
|
335
|
+
currentDatabase: result.recordset[0].currentDatabase,
|
|
336
|
+
loginName: result.recordset[0].loginName,
|
|
337
|
+
userName: result.recordset[0].userName,
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
return {
|
|
342
|
+
connected: false,
|
|
343
|
+
server: server.server,
|
|
344
|
+
database: database,
|
|
345
|
+
error: this.sanitizeErrorMessage(error.message),
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
//# sourceMappingURL=connection-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-service.js","sourceRoot":"","sources":["../../src/services/connection-service.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,0BAA0B;AAC1B,MAAM,uBAAuB,GAAG,EAAE,GA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AC;YACpB,MAAM,IAAI,KAAK,CACb,wCAAwC,QAAQ,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CACjG,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAAC,QAAgB,EAAE,QAAgB;QACrD,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAE5C,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YACpD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC;;;;;;OAMzC,CAAC,CAAC;YAEH,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,QAAQ;gBAClB,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU;gBAC1C,eAAe,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,eAAe;gBACpD,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;gBACxC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ;aACvC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC;aAChD,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ConnectionService } from './connection-service.js';
|
|
2
|
+
export { QueryService } from './query-service.js';
|
|
3
|
+
export type { AzureSqlConfig, AzureSqlServerResource, AzureSqlDatabaseConfig, SqlApiCollectionResponse, ServerInfo, DatabaseInfo, DefaultConfiguration, ConnectionTestResult, } from './connection-service.js';
|
|
4
|
+
export type { TableInfo, ViewInfo, StoredProcedureInfo, TriggerInfo, FunctionInfo, ColumnInfo, IndexInfo, ForeignKeyInfo, TableSchema, ObjectDefinition, } from './query-service.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|