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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -1
  3. package/dist/audit/jsonl-writer.d.ts +47 -0
  4. package/dist/audit/jsonl-writer.js +124 -0
  5. package/dist/auth/sql-profile-loader/env-source.js +10 -0
  6. package/dist/auth/sql-profile-loader/parsing.js +11 -2
  7. package/dist/auth/sql-profile-loader/runtime-override.js +10 -2
  8. package/dist/auth/sql-profile-loader/types.d.ts +5 -0
  9. package/dist/capability/probe.js +3 -1
  10. package/dist/cloud/auth.d.ts +8 -0
  11. package/dist/cloud/auth.js +61 -3
  12. package/dist/cloud/csms.d.ts +7 -0
  13. package/dist/cloud/csms.js +60 -0
  14. package/dist/cloud/keychain.d.ts +28 -0
  15. package/dist/cloud/keychain.js +200 -0
  16. package/dist/cloud/kms.d.ts +7 -0
  17. package/dist/cloud/kms.js +86 -0
  18. package/dist/config/env.js +20 -0
  19. package/dist/config/schema.d.ts +88 -0
  20. package/dist/config/schema.js +21 -0
  21. package/dist/context/datasource-resolver.js +7 -0
  22. package/dist/context/session-context.d.ts +7 -0
  23. package/dist/diagnostics/metrics-source.d.ts +3 -0
  24. package/dist/diagnostics/metrics-source.js +7 -2
  25. package/dist/diagnostics/replication-lag.d.ts +4 -0
  26. package/dist/diagnostics/replication-lag.js +138 -0
  27. package/dist/diagnostics/slow-sql-source/das-source.d.ts +3 -0
  28. package/dist/diagnostics/slow-sql-source/das-source.js +3 -0
  29. package/dist/diagnostics/slow-sql-source/factory.js +9 -2
  30. package/dist/diagnostics/slow-sql-source/taurus-api-source.d.ts +3 -0
  31. package/dist/diagnostics/slow-sql-source/taurus-api-source.js +3 -0
  32. package/dist/diagnostics/types.d.ts +5 -1
  33. package/dist/diagnostics/types.js +7 -7
  34. package/dist/engine/runtime.d.ts +2 -2
  35. package/dist/engine/runtime.js +8 -14
  36. package/dist/engine/types.d.ts +3 -2
  37. package/dist/engine.d.ts +4 -3
  38. package/dist/engine.js +44 -2
  39. package/dist/executor/bounded-sql.d.ts +1 -0
  40. package/dist/executor/bounded-sql.js +10 -0
  41. package/dist/executor/concurrency-limiter.d.ts +15 -0
  42. package/dist/executor/concurrency-limiter.js +67 -0
  43. package/dist/executor/connection-pool.d.ts +3 -2
  44. package/dist/executor/connection-pool.js +36 -24
  45. package/dist/executor/sql-executor.d.ts +3 -0
  46. package/dist/executor/sql-executor.js +52 -9
  47. package/dist/executor/types.d.ts +5 -1
  48. package/dist/index.d.ts +13 -4
  49. package/dist/index.js +7 -1
  50. package/dist/safety/confirmation-store.d.ts +30 -7
  51. package/dist/safety/confirmation-store.js +154 -30
  52. package/dist/safety/guardrail.d.ts +3 -0
  53. package/dist/safety/guardrail.js +16 -6
  54. package/dist/safety/redaction.d.ts +6 -0
  55. package/dist/safety/redaction.js +47 -6
  56. package/dist/safety/sql-classifier.d.ts +1 -0
  57. package/dist/safety/sql-classifier.js +1 -0
  58. package/dist/safety/sql-validator.d.ts +1 -0
  59. package/dist/safety/sql-validator.js +24 -0
  60. package/dist/schema/adapters/mysql.js +3 -1
  61. package/dist/taurus/flashback.js +4 -10
  62. package/dist/taurus/recycle-bin.js +2 -8
  63. package/dist/utils/formatter.d.ts +6 -2
  64. package/dist/utils/formatter.js +7 -3
  65. package/dist/utils/logger.js +8 -0
  66. package/dist/utils/mysql-identifier.d.ts +1 -0
  67. package/dist/utils/mysql-identifier.js +9 -0
  68. package/package.json +14 -3
@@ -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.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
  },