taurusdb-core 0.3.0 → 0.5.0-rc.1
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/LICENSE +21 -0
- package/README.md +3 -1
- package/dist/audit/jsonl-writer.d.ts +47 -0
- package/dist/audit/jsonl-writer.js +124 -0
- package/dist/auth/sql-profile-loader/env-source.js +10 -0
- package/dist/auth/sql-profile-loader/parsing.js +11 -2
- package/dist/auth/sql-profile-loader/runtime-override.js +10 -2
- package/dist/auth/sql-profile-loader/types.d.ts +5 -0
- package/dist/capability/probe.js +3 -1
- package/dist/cloud/auth.d.ts +8 -0
- package/dist/cloud/auth.js +61 -3
- package/dist/cloud/csms.d.ts +7 -0
- package/dist/cloud/csms.js +60 -0
- package/dist/cloud/keychain.d.ts +28 -0
- package/dist/cloud/keychain.js +200 -0
- package/dist/cloud/kms.d.ts +7 -0
- package/dist/cloud/kms.js +86 -0
- package/dist/config/env.js +20 -0
- package/dist/config/schema.d.ts +88 -0
- package/dist/config/schema.js +21 -0
- package/dist/context/datasource-resolver.js +7 -0
- package/dist/context/session-context.d.ts +7 -0
- package/dist/diagnostics/metrics-source.d.ts +3 -0
- package/dist/diagnostics/metrics-source.js +7 -2
- package/dist/diagnostics/replication-lag.d.ts +4 -0
- package/dist/diagnostics/replication-lag.js +138 -0
- package/dist/diagnostics/slow-sql-source/das-source.d.ts +3 -0
- package/dist/diagnostics/slow-sql-source/das-source.js +3 -0
- package/dist/diagnostics/slow-sql-source/factory.js +9 -2
- package/dist/diagnostics/slow-sql-source/taurus-api-source.d.ts +3 -0
- package/dist/diagnostics/slow-sql-source/taurus-api-source.js +3 -0
- package/dist/diagnostics/types.d.ts +5 -1
- package/dist/diagnostics/types.js +7 -7
- package/dist/engine/runtime.d.ts +2 -2
- package/dist/engine/runtime.js +8 -14
- package/dist/engine/types.d.ts +3 -2
- package/dist/engine.d.ts +4 -3
- package/dist/engine.js +44 -2
- package/dist/executor/bounded-sql.d.ts +1 -0
- package/dist/executor/bounded-sql.js +10 -0
- package/dist/executor/concurrency-limiter.d.ts +15 -0
- package/dist/executor/concurrency-limiter.js +67 -0
- package/dist/executor/connection-pool.d.ts +3 -2
- package/dist/executor/connection-pool.js +36 -24
- package/dist/executor/sql-executor.d.ts +3 -0
- package/dist/executor/sql-executor.js +52 -9
- package/dist/executor/types.d.ts +5 -1
- package/dist/index.d.ts +13 -4
- package/dist/index.js +7 -1
- package/dist/safety/confirmation-store.d.ts +30 -7
- package/dist/safety/confirmation-store.js +154 -30
- package/dist/safety/guardrail.d.ts +3 -0
- package/dist/safety/guardrail.js +16 -6
- package/dist/safety/redaction.d.ts +6 -0
- package/dist/safety/redaction.js +47 -6
- package/dist/safety/sql-classifier.d.ts +1 -0
- package/dist/safety/sql-classifier.js +1 -0
- package/dist/safety/sql-validator.d.ts +1 -0
- package/dist/safety/sql-validator.js +24 -0
- package/dist/schema/adapters/mysql.js +3 -1
- package/dist/taurus/flashback.js +4 -10
- package/dist/taurus/recycle-bin.js +2 -8
- package/dist/utils/formatter.d.ts +6 -2
- package/dist/utils/formatter.js +7 -3
- package/dist/utils/logger.js +8 -0
- package/dist/utils/mysql-identifier.d.ts +1 -0
- package/dist/utils/mysql-identifier.js +9 -0
- package/package.json +14 -3
package/dist/utils/logger.js
CHANGED
|
@@ -8,6 +8,14 @@ const REDACT_PATHS = [
|
|
|
8
8
|
"secret",
|
|
9
9
|
"token",
|
|
10
10
|
"*.token",
|
|
11
|
+
"approval_token",
|
|
12
|
+
"*.approval_token",
|
|
13
|
+
"approval_request",
|
|
14
|
+
"*.approval_request",
|
|
15
|
+
"authorization",
|
|
16
|
+
"*.authorization",
|
|
17
|
+
"headers.authorization",
|
|
18
|
+
"*.headers.authorization",
|
|
11
19
|
"accessKeyId",
|
|
12
20
|
"*.accessKeyId",
|
|
13
21
|
"secretAccessKey",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function quoteMysqlIdentifier(identifier: string, fieldName?: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function quoteMysqlIdentifier(identifier, fieldName = "identifier") {
|
|
2
|
+
if (identifier.length === 0) {
|
|
3
|
+
throw new Error(`Invalid ${fieldName}: value cannot be empty.`);
|
|
4
|
+
}
|
|
5
|
+
if (identifier.includes("\0")) {
|
|
6
|
+
throw new Error(`Invalid ${fieldName}: NUL bytes are not allowed.`);
|
|
7
|
+
}
|
|
8
|
+
return `\`${identifier.replace(/`/g, "``")}\``;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taurusdb-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-rc.1",
|
|
4
4
|
"description": "Shared TaurusDB data-plane engine for schema, SQL execution, guardrails, and diagnostics.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/youweichen0208/taurus-mcp-server.git",
|
|
9
|
+
"directory": "packages/core"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/youweichen0208/taurus-mcp-server#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/youweichen0208/taurus-mcp-server/issues"
|
|
14
|
+
},
|
|
5
15
|
"type": "module",
|
|
6
16
|
"main": "dist/index.js",
|
|
7
17
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +26,8 @@
|
|
|
16
26
|
"guardrails"
|
|
17
27
|
],
|
|
18
28
|
"publishConfig": {
|
|
19
|
-
"access": "public"
|
|
29
|
+
"access": "public",
|
|
30
|
+
"provenance": true
|
|
20
31
|
},
|
|
21
32
|
"files": [
|
|
22
33
|
"dist"
|
|
@@ -32,7 +43,7 @@
|
|
|
32
43
|
}
|
|
33
44
|
},
|
|
34
45
|
"scripts": {
|
|
35
|
-
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
36
47
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
37
48
|
"test": "node --test tests/*.test.mjs"
|
|
38
49
|
},
|