mcp-quickbase 2.0.5 → 2.2.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/.crewchief/runs/state.json +3 -0
- package/.mcp.json +6 -32
- package/.sdd/tickets/RELS_relationship-management/README.md +98 -0
- package/.sdd/tickets/RELS_relationship-management/planning/analysis.md +190 -0
- package/.sdd/tickets/RELS_relationship-management/planning/architecture.md +413 -0
- package/.sdd/tickets/RELS_relationship-management/planning/plan.md +177 -0
- package/.sdd/tickets/RELS_relationship-management/planning/quality-strategy.md +335 -0
- package/.sdd/tickets/RELS_relationship-management/planning/review-updates.md +95 -0
- package/.sdd/tickets/RELS_relationship-management/planning/security-review.md +213 -0
- package/.sdd/tickets/RELS_relationship-management/planning/ticket-review.md +885 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1001_domain-setup.md +96 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1002_get-relationships-tool.md +142 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.1003_register-phase1-tools.md +105 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.2001_create-relationship-tool.md +151 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.2002_update-relationship-tool.md +145 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.3001_delete-relationship-tool.md +154 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.4001_integration-testing.md +159 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS.4002_final-verification.md +182 -0
- package/.sdd/tickets/RELS_relationship-management/tasks/RELS_TASK_INDEX.md +179 -0
- package/crewchief.config.js +31 -0
- package/dist/client/quickbase.d.ts +7 -2
- package/dist/client/quickbase.js +64 -51
- package/dist/client/quickbase.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/server.d.ts +3 -3
- package/dist/mcp/server.js +21 -17
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp-stdio-server.js +64 -49
- package/dist/mcp-stdio-server.js.map +1 -1
- package/dist/server.js +84 -83
- package/dist/server.js.map +1 -1
- package/dist/tools/apps/create_app.d.ts +2 -2
- package/dist/tools/apps/create_app.js +23 -23
- package/dist/tools/apps/create_app.js.map +1 -1
- package/dist/tools/apps/index.d.ts +4 -4
- package/dist/tools/apps/index.js +3 -3
- package/dist/tools/apps/list_tables.d.ts +7 -7
- package/dist/tools/apps/list_tables.js +28 -27
- package/dist/tools/apps/list_tables.js.map +1 -1
- package/dist/tools/apps/update_app.d.ts +2 -2
- package/dist/tools/apps/update_app.js +28 -26
- package/dist/tools/apps/update_app.js.map +1 -1
- package/dist/tools/base.d.ts +3 -3
- package/dist/tools/base.js +7 -7
- package/dist/tools/base.js.map +1 -1
- package/dist/tools/configure_cache.d.ts +3 -3
- package/dist/tools/configure_cache.js +16 -16
- package/dist/tools/configure_cache.js.map +1 -1
- package/dist/tools/fields/create_field.d.ts +8 -7
- package/dist/tools/fields/create_field.js +39 -29
- package/dist/tools/fields/create_field.js.map +1 -1
- package/dist/tools/fields/delete_field.d.ts +79 -0
- package/dist/tools/fields/delete_field.js +105 -0
- package/dist/tools/fields/delete_field.js.map +1 -0
- package/dist/tools/fields/get_field.d.ts +91 -0
- package/dist/tools/fields/get_field.js +82 -0
- package/dist/tools/fields/get_field.js.map +1 -0
- package/dist/tools/fields/index.d.ts +5 -3
- package/dist/tools/fields/index.js +11 -5
- package/dist/tools/fields/index.js.map +1 -1
- package/dist/tools/fields/update_field.d.ts +7 -15
- package/dist/tools/fields/update_field.js +39 -38
- package/dist/tools/fields/update_field.js.map +1 -1
- package/dist/tools/files/download_file.d.ts +2 -2
- package/dist/tools/files/download_file.js +35 -35
- package/dist/tools/files/download_file.js.map +1 -1
- package/dist/tools/files/index.d.ts +3 -3
- package/dist/tools/files/index.js +3 -3
- package/dist/tools/files/upload_file.d.ts +2 -2
- package/dist/tools/files/upload_file.js +52 -44
- package/dist/tools/files/upload_file.js.map +1 -1
- package/dist/tools/index.d.ts +13 -12
- package/dist/tools/index.js +6 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/records/bulk_create_records.d.ts +2 -2
- package/dist/tools/records/bulk_create_records.js +28 -28
- package/dist/tools/records/bulk_create_records.js.map +1 -1
- package/dist/tools/records/bulk_update_records.d.ts +2 -2
- package/dist/tools/records/bulk_update_records.js +27 -27
- package/dist/tools/records/bulk_update_records.js.map +1 -1
- package/dist/tools/records/create_record.d.ts +2 -2
- package/dist/tools/records/create_record.js +40 -40
- package/dist/tools/records/create_record.js.map +1 -1
- package/dist/tools/records/index.d.ts +6 -6
- package/dist/tools/records/index.js +3 -3
- package/dist/tools/records/query_records.d.ts +3 -3
- package/dist/tools/records/query_records.js +82 -78
- package/dist/tools/records/query_records.js.map +1 -1
- package/dist/tools/records/update_record.d.ts +2 -2
- package/dist/tools/records/update_record.js +31 -29
- package/dist/tools/records/update_record.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +1 -1
- package/dist/tools/relationships/create_relationship.d.ts +150 -0
- package/dist/tools/relationships/create_relationship.js +181 -0
- package/dist/tools/relationships/create_relationship.js.map +1 -0
- package/dist/tools/relationships/delete_relationship.d.ts +66 -0
- package/dist/tools/relationships/delete_relationship.js +85 -0
- package/dist/tools/relationships/delete_relationship.js.map +1 -0
- package/dist/tools/relationships/get_relationships.d.ts +126 -0
- package/dist/tools/relationships/get_relationships.js +126 -0
- package/dist/tools/relationships/get_relationships.js.map +1 -0
- package/dist/tools/relationships/index.d.ts +14 -0
- package/dist/tools/relationships/index.js +37 -0
- package/dist/tools/relationships/index.js.map +1 -0
- package/dist/tools/relationships/update_relationship.d.ts +139 -0
- package/dist/tools/relationships/update_relationship.js +168 -0
- package/dist/tools/relationships/update_relationship.js.map +1 -0
- package/dist/tools/reports/index.d.ts +2 -2
- package/dist/tools/reports/index.js +3 -3
- package/dist/tools/reports/run_report.d.ts +3 -3
- package/dist/tools/reports/run_report.js +29 -29
- package/dist/tools/reports/run_report.js.map +1 -1
- package/dist/tools/tables/create_table.d.ts +2 -49
- package/dist/tools/tables/create_table.js +26 -49
- package/dist/tools/tables/create_table.js.map +1 -1
- package/dist/tools/tables/get_table_fields.d.ts +2 -2
- package/dist/tools/tables/get_table_fields.js +25 -25
- package/dist/tools/tables/get_table_fields.js.map +1 -1
- package/dist/tools/tables/index.d.ts +4 -4
- package/dist/tools/tables/index.js +3 -3
- package/dist/tools/tables/update_table.d.ts +2 -2
- package/dist/tools/tables/update_table.js +28 -26
- package/dist/tools/tables/update_table.js.map +1 -1
- package/dist/tools/test_connection.d.ts +2 -2
- package/dist/tools/test_connection.js +28 -28
- package/dist/tools/test_connection.js.map +1 -1
- package/dist/types/api.d.ts +1 -1
- package/dist/types/mcp.d.ts +1 -1
- package/dist/utils/cache.js +16 -16
- package/dist/utils/cache.js.map +1 -1
- package/dist/utils/file.js +44 -40
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/logger.js +30 -28
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/retry.js +10 -10
- package/dist/utils/retry.js.map +1 -1
- package/dist/utils/validation.d.ts +1 -1
- package/dist/utils/validation.js +39 -36
- package/dist/utils/validation.js.map +1 -1
- package/docs/README.md +6 -0
- package/docs/future-improvements.md +33 -0
- package/docs/migration-guide.md +160 -0
- package/docs/release-notes.md +89 -0
- package/package.json +5 -4
- /package/{HARDENING_SUMMARY.md → docs/hardening-summary.md} +0 -0
package/dist/utils/logger.js
CHANGED
|
@@ -19,15 +19,17 @@ var LogLevel;
|
|
|
19
19
|
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
20
20
|
// Global log level (can be set via environment variable)
|
|
21
21
|
let globalLogLevel = process.env.LOG_LEVEL
|
|
22
|
-
?
|
|
22
|
+
? LogLevel[process.env.LOG_LEVEL.toUpperCase()] ||
|
|
23
|
+
LogLevel.INFO
|
|
23
24
|
: LogLevel.INFO;
|
|
24
25
|
/**
|
|
25
26
|
* Set the global log level
|
|
26
27
|
* @param level New log level
|
|
27
28
|
*/
|
|
28
29
|
function setLogLevel(level) {
|
|
29
|
-
if (typeof level ===
|
|
30
|
-
globalLogLevel =
|
|
30
|
+
if (typeof level === "string") {
|
|
31
|
+
globalLogLevel =
|
|
32
|
+
LogLevel[level.toUpperCase()] || LogLevel.INFO;
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
33
35
|
globalLogLevel = level;
|
|
@@ -38,7 +40,7 @@ function setLogLevel(level) {
|
|
|
38
40
|
* @returns Current log level
|
|
39
41
|
*/
|
|
40
42
|
function getLogLevel() {
|
|
41
|
-
return LogLevel[globalLogLevel] ||
|
|
43
|
+
return LogLevel[globalLogLevel] || "INFO";
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Creates a logger with the specified name
|
|
@@ -48,7 +50,7 @@ function getLogLevel() {
|
|
|
48
50
|
function createLogger(name) {
|
|
49
51
|
const formatData = (data) => {
|
|
50
52
|
if (data === undefined)
|
|
51
|
-
return
|
|
53
|
+
return "";
|
|
52
54
|
try {
|
|
53
55
|
return JSON.stringify(redactSensitiveData(data));
|
|
54
56
|
}
|
|
@@ -62,43 +64,43 @@ function createLogger(name) {
|
|
|
62
64
|
error(message, data) {
|
|
63
65
|
if (globalLogLevel >= LogLevel.ERROR) {
|
|
64
66
|
// Use stderr to avoid interfering with JSON responses on stdout
|
|
65
|
-
process.stderr.write(`[ERROR] ${name}: ${message} ${data ? formatData(data) :
|
|
67
|
+
process.stderr.write(`[ERROR] ${name}: ${message} ${data ? formatData(data) : ""}\n`);
|
|
66
68
|
}
|
|
67
69
|
},
|
|
68
70
|
warn(message, data) {
|
|
69
71
|
if (globalLogLevel >= LogLevel.WARN) {
|
|
70
72
|
// Use stderr to avoid interfering with JSON responses on stdout
|
|
71
|
-
process.stderr.write(`[WARN] ${name}: ${message} ${data ? formatData(data) :
|
|
73
|
+
process.stderr.write(`[WARN] ${name}: ${message} ${data ? formatData(data) : ""}\n`);
|
|
72
74
|
}
|
|
73
75
|
},
|
|
74
76
|
info(message, data) {
|
|
75
77
|
if (globalLogLevel >= LogLevel.INFO) {
|
|
76
78
|
// Use stderr to avoid interfering with JSON responses on stdout
|
|
77
|
-
process.stderr.write(`[INFO] ${name}: ${message} ${data ? formatData(data) :
|
|
79
|
+
process.stderr.write(`[INFO] ${name}: ${message} ${data ? formatData(data) : ""}\n`);
|
|
78
80
|
}
|
|
79
81
|
},
|
|
80
82
|
debug(message, data) {
|
|
81
83
|
if (globalLogLevel >= LogLevel.DEBUG) {
|
|
82
84
|
// Use stderr to avoid interfering with JSON responses on stdout
|
|
83
|
-
process.stderr.write(`[DEBUG] ${name}: ${message} ${data ? formatData(data) :
|
|
85
|
+
process.stderr.write(`[DEBUG] ${name}: ${message} ${data ? formatData(data) : ""}\n`);
|
|
84
86
|
}
|
|
85
|
-
}
|
|
87
|
+
},
|
|
86
88
|
};
|
|
87
89
|
}
|
|
88
90
|
/**
|
|
89
91
|
* Sensitive keys that should be redacted
|
|
90
92
|
*/
|
|
91
93
|
const SENSITIVE_KEYS = [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
"token",
|
|
95
|
+
"password",
|
|
96
|
+
"secret",
|
|
97
|
+
"auth",
|
|
98
|
+
"key",
|
|
99
|
+
"credential",
|
|
100
|
+
"Authorization",
|
|
101
|
+
"QB-USER-TOKEN",
|
|
102
|
+
"userToken",
|
|
103
|
+
"QUICKBASE_USER_TOKEN",
|
|
102
104
|
];
|
|
103
105
|
/**
|
|
104
106
|
* Redacts sensitive data in objects with circular reference protection
|
|
@@ -108,26 +110,26 @@ const SENSITIVE_KEYS = [
|
|
|
108
110
|
function redactSensitiveData(data) {
|
|
109
111
|
const visited = new WeakSet();
|
|
110
112
|
function redactRecursive(obj) {
|
|
111
|
-
if (!obj || typeof obj !==
|
|
113
|
+
if (!obj || typeof obj !== "object") {
|
|
112
114
|
return obj;
|
|
113
115
|
}
|
|
114
116
|
// Circular reference protection
|
|
115
117
|
if (visited.has(obj)) {
|
|
116
|
-
return
|
|
118
|
+
return "[Circular Reference]";
|
|
117
119
|
}
|
|
118
120
|
visited.add(obj);
|
|
119
121
|
if (Array.isArray(obj)) {
|
|
120
|
-
return obj.map(item => redactRecursive(item));
|
|
122
|
+
return obj.map((item) => redactRecursive(item));
|
|
121
123
|
}
|
|
122
124
|
const result = {};
|
|
123
125
|
try {
|
|
124
126
|
for (const [key, value] of Object.entries(obj)) {
|
|
125
|
-
if (typeof value ===
|
|
127
|
+
if (typeof value === "object" && value !== null) {
|
|
126
128
|
result[key] = redactRecursive(value);
|
|
127
129
|
}
|
|
128
|
-
else if (typeof value ===
|
|
129
|
-
SENSITIVE_KEYS.some(k => key.toLowerCase().includes(k.toLowerCase()))) {
|
|
130
|
-
result[key] =
|
|
130
|
+
else if (typeof value === "string" &&
|
|
131
|
+
SENSITIVE_KEYS.some((k) => key.toLowerCase().includes(k.toLowerCase()))) {
|
|
132
|
+
result[key] = "***REDACTED***";
|
|
131
133
|
}
|
|
132
134
|
else {
|
|
133
135
|
result[key] = value;
|
|
@@ -135,7 +137,7 @@ function redactSensitiveData(data) {
|
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
catch (error) {
|
|
138
|
-
return
|
|
140
|
+
return "[Unserializable Object]";
|
|
139
141
|
}
|
|
140
142
|
return result;
|
|
141
143
|
}
|
package/dist/utils/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgCH,kCAOC;AAMD,kCAEC;AAOD,oCAkDC;AAtGD;;GAEG;AACH,IAAY,QAKX;AALD,WAAY,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,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;gBACtB,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,yBAAyB,CAAC;QACnC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"}
|
package/dist/utils/retry.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.calculateBackoff = calculateBackoff;
|
|
4
4
|
exports.withRetry = withRetry;
|
|
5
5
|
const logger_1 = require("./logger");
|
|
6
|
-
const logger = (0, logger_1.createLogger)(
|
|
6
|
+
const logger = (0, logger_1.createLogger)("RetryUtil");
|
|
7
7
|
/**
|
|
8
8
|
* Default retry options
|
|
9
9
|
*/
|
|
@@ -17,21 +17,21 @@ const DEFAULT_RETRY_OPTIONS = {
|
|
|
17
17
|
if (!error)
|
|
18
18
|
return false;
|
|
19
19
|
// Handle fetch response errors
|
|
20
|
-
if (typeof error ===
|
|
20
|
+
if (typeof error === "object" && error !== null && "status" in error) {
|
|
21
21
|
const httpError = error;
|
|
22
22
|
// Retry 429 (Too Many Requests), 408 (Request Timeout), and 5xx errors
|
|
23
|
-
return httpError.status === 429 ||
|
|
23
|
+
return (httpError.status === 429 ||
|
|
24
24
|
httpError.status === 408 ||
|
|
25
|
-
(httpError.status >= 500 && httpError.status < 600);
|
|
25
|
+
(httpError.status >= 500 && httpError.status < 600));
|
|
26
26
|
}
|
|
27
27
|
// Handle network errors
|
|
28
28
|
if (error instanceof Error) {
|
|
29
|
-
return error.message.includes(
|
|
30
|
-
error.message.includes(
|
|
31
|
-
error.message.includes(
|
|
29
|
+
return (error.message.includes("network") ||
|
|
30
|
+
error.message.includes("timeout") ||
|
|
31
|
+
error.message.includes("connection"));
|
|
32
32
|
}
|
|
33
33
|
return false;
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Calculates the delay time for a retry attempt with exponential backoff
|
|
@@ -71,13 +71,13 @@ function withRetry(fn, options = {}) {
|
|
|
71
71
|
fullOptions.isRetryable &&
|
|
72
72
|
fullOptions.isRetryable(error);
|
|
73
73
|
if (!shouldRetry) {
|
|
74
|
-
logger.debug(
|
|
74
|
+
logger.debug("Error not retryable or max retries reached", { error });
|
|
75
75
|
throw error;
|
|
76
76
|
}
|
|
77
77
|
const delay = calculateBackoff(attempt, fullOptions);
|
|
78
78
|
logger.debug(`Retrying after ${delay}ms due to error`, { error });
|
|
79
79
|
// Wait before retrying
|
|
80
|
-
await new Promise(resolve => setTimeout(resolve, delay));
|
|
80
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
// This should never be reached due to the loop structure,
|
package/dist/utils/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/utils/retry.ts"],"names":[],"mappings":";;AA4EA,4CAaC;AAQD,8BAyCC;AA1ID,qCAAwC;AAExC,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,WAAW,CAAC,CAAC;AAgCzC;;GAEG;AACH,MAAM,qBAAqB,GAAiB;IAC1C,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,CAAC;IAChB,WAAW,EAAE,CAAC,KAAc,EAAE,EAAE;QAC9B,yDAAyD;QACzD,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,+BAA+B;QAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC;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AAC,GAAG,IAAU;QAC9C,IAAI,SAAkB,CAAC;QAEvB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,IAAI,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;YACnE,IAAI,CAAC;gBACH,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;oBAChB,MAAM,CAAC,IAAI,CAAC,iBAAiB,OAAO,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;gBACvE,CAAC;gBAED,OAAO,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;YAC3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,SAAS,GAAG,KAAK,CAAC;gBAElB,MAAM,WAAW,GACf,OAAO,GAAG,WAAW,CAAC,UAAU;oBAChC,WAAW,CAAC,WAAW;oBACvB,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAEjC,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,MAAM,CAAC,KAAK,CAAC,4CAA4C,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;oBACtE,MAAM,KAAK,CAAC;gBACd,CAAC;gBAED,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;gBACrD,MAAM,CAAC,KAAK,CAAC,kBAAkB,KAAK,iBAAiB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;gBAElE,uBAAuB;gBACvB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;QAED,0DAA0D;QAC1D,6CAA6C;QAC7C,MAAM,SAAS,CAAC;IAClB,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/utils/validation.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.createValidationSchema = createValidationSchema;
|
|
|
6
6
|
exports.validateParams = validateParams;
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
const logger_1 = require("./logger");
|
|
9
|
-
const logger = (0, logger_1.createLogger)(
|
|
9
|
+
const logger = (0, logger_1.createLogger)("Validation");
|
|
10
10
|
/**
|
|
11
11
|
* Custom validation error with additional context
|
|
12
12
|
*/
|
|
@@ -14,7 +14,7 @@ class ValidationError extends Error {
|
|
|
14
14
|
constructor(message, context) {
|
|
15
15
|
super(message);
|
|
16
16
|
this.context = context;
|
|
17
|
-
this.name =
|
|
17
|
+
this.name = "ValidationError";
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.ValidationError = ValidationError;
|
|
@@ -22,9 +22,7 @@ exports.ValidationError = ValidationError;
|
|
|
22
22
|
* Type guard for valid JSON Schema objects
|
|
23
23
|
*/
|
|
24
24
|
function isValidJSONSchema(schema) {
|
|
25
|
-
return typeof schema ===
|
|
26
|
-
schema !== null &&
|
|
27
|
-
'type' in schema;
|
|
25
|
+
return typeof schema === "object" && schema !== null && "type" in schema;
|
|
28
26
|
}
|
|
29
27
|
/**
|
|
30
28
|
* Schema cache for performance optimization
|
|
@@ -69,17 +67,17 @@ SchemaCache.MAX_SIZE = 100;
|
|
|
69
67
|
* Convert JSON Schema property to Zod type
|
|
70
68
|
*/
|
|
71
69
|
function convertPropertyToZod(prop) {
|
|
72
|
-
if (!prop || typeof prop !==
|
|
73
|
-
logger.warn(
|
|
70
|
+
if (!prop || typeof prop !== "object") {
|
|
71
|
+
logger.warn("Invalid property schema, defaulting to unknown", { prop });
|
|
74
72
|
return zod_1.z.unknown();
|
|
75
73
|
}
|
|
76
74
|
const { type, enum: enumValues, items, format } = prop;
|
|
77
75
|
// Handle enum constraints
|
|
78
76
|
if (enumValues && Array.isArray(enumValues) && enumValues.length > 0) {
|
|
79
|
-
if (enumValues.every(v => typeof v ===
|
|
77
|
+
if (enumValues.every((v) => typeof v === "string")) {
|
|
80
78
|
return zod_1.z.enum(enumValues);
|
|
81
79
|
}
|
|
82
|
-
const literals = enumValues.map(v => zod_1.z.literal(v));
|
|
80
|
+
const literals = enumValues.map((v) => zod_1.z.literal(v));
|
|
83
81
|
if (literals.length === 1) {
|
|
84
82
|
return literals[0];
|
|
85
83
|
}
|
|
@@ -87,32 +85,35 @@ function convertPropertyToZod(prop) {
|
|
|
87
85
|
}
|
|
88
86
|
// Handle primitive types
|
|
89
87
|
switch (type) {
|
|
90
|
-
case
|
|
88
|
+
case "string": {
|
|
91
89
|
let stringSchema = zod_1.z.string();
|
|
92
|
-
if (format ===
|
|
90
|
+
if (format === "email")
|
|
93
91
|
stringSchema = stringSchema.email();
|
|
94
|
-
if (format ===
|
|
92
|
+
if (format === "uri")
|
|
95
93
|
stringSchema = stringSchema.url();
|
|
96
94
|
return stringSchema;
|
|
97
95
|
}
|
|
98
|
-
case
|
|
96
|
+
case "number":
|
|
99
97
|
return zod_1.z.number();
|
|
100
|
-
case
|
|
98
|
+
case "integer":
|
|
101
99
|
return zod_1.z.number().int();
|
|
102
|
-
case
|
|
100
|
+
case "boolean":
|
|
103
101
|
return zod_1.z.boolean();
|
|
104
|
-
case
|
|
105
|
-
if (items && typeof items ===
|
|
102
|
+
case "array":
|
|
103
|
+
if (items && typeof items === "object") {
|
|
106
104
|
const itemSchema = convertPropertyToZod(items);
|
|
107
105
|
return zod_1.z.array(itemSchema);
|
|
108
106
|
}
|
|
109
107
|
return zod_1.z.array(zod_1.z.unknown());
|
|
110
|
-
case
|
|
108
|
+
case "object":
|
|
111
109
|
// For nested objects, we'd need recursive handling
|
|
112
110
|
// For now, treat as record of unknown values
|
|
113
111
|
return zod_1.z.record(zod_1.z.unknown());
|
|
114
112
|
default:
|
|
115
|
-
logger.warn(
|
|
113
|
+
logger.warn("Unsupported schema type, defaulting to unknown", {
|
|
114
|
+
type,
|
|
115
|
+
prop,
|
|
116
|
+
});
|
|
116
117
|
return zod_1.z.unknown();
|
|
117
118
|
}
|
|
118
119
|
}
|
|
@@ -122,10 +123,10 @@ function convertPropertyToZod(prop) {
|
|
|
122
123
|
*/
|
|
123
124
|
function createMcpZodSchema(schema) {
|
|
124
125
|
if (!isValidJSONSchema(schema)) {
|
|
125
|
-
logger.warn(
|
|
126
|
+
logger.warn("Invalid schema provided to createMcpZodSchema", { schema });
|
|
126
127
|
return {};
|
|
127
128
|
}
|
|
128
|
-
if (schema.type !==
|
|
129
|
+
if (schema.type !== "object" || !schema.properties) {
|
|
129
130
|
return {};
|
|
130
131
|
}
|
|
131
132
|
const properties = schema.properties;
|
|
@@ -142,7 +143,7 @@ function createMcpZodSchema(schema) {
|
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
145
|
catch (error) {
|
|
145
|
-
logger.error(
|
|
146
|
+
logger.error("Error creating MCP Zod schema", { error, schema });
|
|
146
147
|
return {};
|
|
147
148
|
}
|
|
148
149
|
return zodSchemaObj;
|
|
@@ -153,7 +154,9 @@ function createMcpZodSchema(schema) {
|
|
|
153
154
|
*/
|
|
154
155
|
function createValidationSchema(schema) {
|
|
155
156
|
if (!isValidJSONSchema(schema)) {
|
|
156
|
-
logger.warn(
|
|
157
|
+
logger.warn("Invalid schema provided to createValidationSchema", {
|
|
158
|
+
schema,
|
|
159
|
+
});
|
|
157
160
|
return zod_1.z.object({});
|
|
158
161
|
}
|
|
159
162
|
// Create cache key
|
|
@@ -165,7 +168,7 @@ function createValidationSchema(schema) {
|
|
|
165
168
|
}
|
|
166
169
|
let zodSchema;
|
|
167
170
|
try {
|
|
168
|
-
if (schema.type ===
|
|
171
|
+
if (schema.type === "object" && schema.properties) {
|
|
169
172
|
const mcpSchema = createMcpZodSchema(schema);
|
|
170
173
|
zodSchema = zod_1.z.object(mcpSchema);
|
|
171
174
|
}
|
|
@@ -175,7 +178,7 @@ function createValidationSchema(schema) {
|
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
180
|
catch (error) {
|
|
178
|
-
logger.error(
|
|
181
|
+
logger.error("Error creating validation schema", { error, schema });
|
|
179
182
|
zodSchema = zod_1.z.object({});
|
|
180
183
|
}
|
|
181
184
|
// Cache the result
|
|
@@ -188,36 +191,36 @@ function createValidationSchema(schema) {
|
|
|
188
191
|
function validateParams(params, schema, toolName) {
|
|
189
192
|
try {
|
|
190
193
|
const zodSchema = createValidationSchema(schema);
|
|
191
|
-
logger.debug(
|
|
194
|
+
logger.debug("Validating parameters", {
|
|
192
195
|
toolName,
|
|
193
196
|
paramsType: typeof params,
|
|
194
|
-
schemaType: schema.type
|
|
197
|
+
schemaType: schema.type,
|
|
195
198
|
});
|
|
196
199
|
const result = zodSchema.parse(params);
|
|
197
|
-
logger.debug(
|
|
200
|
+
logger.debug("Parameter validation successful", { toolName });
|
|
198
201
|
return result;
|
|
199
202
|
}
|
|
200
203
|
catch (error) {
|
|
201
204
|
if (error instanceof zod_1.z.ZodError) {
|
|
202
|
-
const context = toolName ? ` in tool "${toolName}"` :
|
|
203
|
-
const issues = error.errors.map(err => {
|
|
204
|
-
const path = err.path.length > 0 ? err.path.join(
|
|
205
|
+
const context = toolName ? ` in tool "${toolName}"` : "";
|
|
206
|
+
const issues = error.errors.map((err) => {
|
|
207
|
+
const path = err.path.length > 0 ? err.path.join(".") : "root";
|
|
205
208
|
return `${path}: ${err.message}`;
|
|
206
209
|
});
|
|
207
|
-
const validationError = new ValidationError(`Parameter validation failed${context}: ${issues.join(
|
|
210
|
+
const validationError = new ValidationError(`Parameter validation failed${context}: ${issues.join(", ")}`, {
|
|
208
211
|
toolName,
|
|
209
212
|
issues: error.errors,
|
|
210
|
-
originalParams: params
|
|
213
|
+
originalParams: params,
|
|
211
214
|
});
|
|
212
|
-
logger.error(
|
|
215
|
+
logger.error("Parameter validation failed", {
|
|
213
216
|
toolName,
|
|
214
217
|
error: validationError.message,
|
|
215
218
|
issues: error.errors,
|
|
216
|
-
params: typeof params ===
|
|
219
|
+
params: typeof params === "object" ? "object" : params,
|
|
217
220
|
});
|
|
218
221
|
throw validationError;
|
|
219
222
|
}
|
|
220
|
-
logger.error(
|
|
223
|
+
logger.error("Unexpected validation error", { error, toolName });
|
|
221
224
|
throw error;
|
|
222
225
|
}
|
|
223
226
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":";;;AA8IA,gDAoCC;AAMD,wDAsCC;AAKD,wCAiDC;AApRD,6BAAwB;AACxB,qCAAwC;AAExC,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,YAAY,CAAC,CAAC;AAE1C;;GAEG;AACH,MAAa,eAAgB,SAAQ,KAAK;IACxC,YACE,OAAe,EACC,OAIf;QAED,KAAK,CAAC,OAAO,CAAC,CAAC;QANC,YAAO,GAAP,OAAO,CAItB;QAGD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAZD,0CAYC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,MAAe;IACxC,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC;AAC3E,CAAC;AAED;;GAEG;AACH,MAAM,WAAW;IAIf,MAAM,CAAC,GAAG,CAAC,GAAW;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,+BAA+B;YAC/B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,GAAW,EAAE,MAAmB;QACzC,kDAAkD;QAClD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;Y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C,CAAC,CAAC,CAAC;YAEH,MAAM,eAAe,GAAG,IAAI,eAAe,CACzC,8BAA8B,OAAO,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAC7D;gBACE,QAAQ;gBACR,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,cAAc,EAAE,MAAM;aACvB,CACF,CAAC;YAEF,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE;gBAC1C,QAAQ;gBACR,KAAK,EAAE,eAAe,CAAC,OAAO;gBAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,MAAM,EAAE,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM;aACvD,CAAC,CAAC;YAEH,MAAM,eAAe,CAAC;QACxB,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QACjE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,4CAA4C;AAC/B,QAAA,eAAe,GAAG,kBAAkB,CAAC;AACrC,QAAA,qBAAqB,GAAG,sBAAsB,CAAC"}
|
package/docs/README.md
CHANGED
|
@@ -22,6 +22,12 @@ This directory contains comprehensive documentation for Quickbase MCP Server v2.
|
|
|
22
22
|
- **[Performance Benchmarks](performance-benchmarks.md)** - Performance metrics and optimization
|
|
23
23
|
- **[QA Report](final-qa-report.md)** - Quality assurance testing results
|
|
24
24
|
|
|
25
|
+
### History & Releases
|
|
26
|
+
- **[Hardening Summary](hardening-summary.md)** - Security hardening decisions and remaining improvements
|
|
27
|
+
- **[Migration Guide](migration-guide.md)** - V1 to V2 migration instructions
|
|
28
|
+
- **[Release Notes](release-notes.md)** - Version history and release information
|
|
29
|
+
- **[Future Improvements](future-improvements.md)** - Roadmap items for future development
|
|
30
|
+
|
|
25
31
|
## 🎯 Quick Links
|
|
26
32
|
|
|
27
33
|
- **New users**: Start with [Quick Start Guide](quickstart.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Future Improvements
|
|
2
|
+
|
|
3
|
+
This document captures improvement items for future consideration. These items were extracted from the v2.0.0 release process and can be converted to SDD tickets when prioritized.
|
|
4
|
+
|
|
5
|
+
## Type Safety
|
|
6
|
+
|
|
7
|
+
- **Reduce TypeScript `any` types**: 72 ESLint warnings exist for `any` types in API response handling. While not critical for security, improving type definitions would enhance code maintainability and catch potential bugs at compile time.
|
|
8
|
+
|
|
9
|
+
## Test Coverage
|
|
10
|
+
|
|
11
|
+
- **Increase overall test coverage to 80%+**: Current coverage is 42.57%. Higher coverage would improve confidence in code changes and reduce regression risk.
|
|
12
|
+
- **Improve file operations test coverage**: File operations currently have only 20% coverage. Given the security-critical nature of file handling, these deserve comprehensive tests.
|
|
13
|
+
- **Add dedicated test files for tools**: Many tools lack dedicated test files. Each tool should have corresponding unit tests covering success paths, error handling, and edge cases.
|
|
14
|
+
|
|
15
|
+
## Code Quality
|
|
16
|
+
|
|
17
|
+
- **Refactor duplicate path validation in file upload tool**: The file upload tool contains duplicate path validation logic that could be refactored to use the centralized file utilities, improving consistency and reducing maintenance burden.
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **Add webhook support**: Enable real-time notifications from Quickbase events to external systems.
|
|
22
|
+
- **Implement streaming for large datasets**: Handle large query results more efficiently without loading everything into memory at once.
|
|
23
|
+
- **Support for Quickbase formulas and relationships**: Add tools or capabilities to work with Quickbase formula fields and table relationships.
|
|
24
|
+
|
|
25
|
+
## Enhancement
|
|
26
|
+
|
|
27
|
+
- **Add circuit breaker pattern to retry logic**: While exponential backoff exists, adding a circuit breaker pattern would prevent overwhelming failing services and improve system resilience.
|
|
28
|
+
- **Secure token storage**: User token is currently stored in the config object. Consider more secure storage mechanisms for sensitive credentials.
|
|
29
|
+
- **Add more comprehensive logging options**: Expand logging configuration to support different output formats, log levels per component, and structured logging for production environments.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
*Note: These items are documented for planning purposes and can be converted to formal SDD tickets or epics when development capacity allows. Items are prioritized by category - Type Safety and Test Coverage items improve code quality, while Features and Enhancement items add new capabilities.*
|