qingflow-mcp 0.3.21 → 0.3.22
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.md +1 -1
- package/dist/server.js +36 -8
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/server.js
CHANGED
|
@@ -68,7 +68,7 @@ const REQUEST_TIMEOUT_MS = toPositiveInt(process.env.QINGFLOW_REQUEST_TIMEOUT_MS
|
|
|
68
68
|
const EXECUTION_BUDGET_MS = toPositiveInt(process.env.QINGFLOW_EXECUTION_BUDGET_MS) ?? 20000;
|
|
69
69
|
const WAIT_RESULT_DEFAULT_TIMEOUT_MS = toPositiveInt(process.env.QINGFLOW_WAIT_RESULT_TIMEOUT_MS) ?? 5000;
|
|
70
70
|
const WAIT_RESULT_POLL_INTERVAL_MS = toPositiveInt(process.env.QINGFLOW_WAIT_RESULT_POLL_INTERVAL_MS) ?? 500;
|
|
71
|
-
const SERVER_VERSION = "0.3.
|
|
71
|
+
const SERVER_VERSION = "0.3.22";
|
|
72
72
|
const accessToken = process.env.QINGFLOW_ACCESS_TOKEN;
|
|
73
73
|
const baseUrl = process.env.QINGFLOW_BASE_URL;
|
|
74
74
|
if (!accessToken) {
|
|
@@ -3841,7 +3841,7 @@ function normalizeListInput(raw) {
|
|
|
3841
3841
|
strict_full: coerceBooleanLike(normalizedObj.strict_full),
|
|
3842
3842
|
include_answers: coerceBooleanLike(normalizedObj.include_answers),
|
|
3843
3843
|
output_profile: normalizeOutputProfileInput(normalizedObj.output_profile),
|
|
3844
|
-
apply_ids:
|
|
3844
|
+
apply_ids: normalizeOpaqueIdArrayInput(normalizedObj.apply_ids),
|
|
3845
3845
|
sort: normalizeSortInput(normalizedObj.sort),
|
|
3846
3846
|
filters: normalizeFiltersInput(normalizedObj.filters),
|
|
3847
3847
|
select_columns: normalizeSelectorListInput(selectColumns),
|
|
@@ -3858,7 +3858,7 @@ function normalizeRecordGetInput(raw) {
|
|
|
3858
3858
|
const selectColumns = normalizedObj.select_columns ?? normalizedObj.keep_columns;
|
|
3859
3859
|
return {
|
|
3860
3860
|
...normalizedObj,
|
|
3861
|
-
apply_id:
|
|
3861
|
+
apply_id: normalizeOpaqueIdInput(normalizedObj.apply_id),
|
|
3862
3862
|
app_key: coerceStringLike(normalizedObj.app_key),
|
|
3863
3863
|
max_columns: coerceNumberLike(normalizedObj.max_columns),
|
|
3864
3864
|
select_columns: normalizeSelectorListInput(selectColumns),
|
|
@@ -3884,12 +3884,12 @@ function normalizeQueryInput(raw) {
|
|
|
3884
3884
|
max_rows: coerceNumberLike(normalizedObj.max_rows),
|
|
3885
3885
|
max_items: coerceNumberLike(normalizedObj.max_items),
|
|
3886
3886
|
max_columns: coerceNumberLike(normalizedObj.max_columns),
|
|
3887
|
-
apply_id:
|
|
3887
|
+
apply_id: normalizeOpaqueIdInput(normalizedObj.apply_id),
|
|
3888
3888
|
strict_full: coerceBooleanLike(normalizedObj.strict_full),
|
|
3889
3889
|
include_answers: coerceBooleanLike(normalizedObj.include_answers),
|
|
3890
3890
|
output_profile: normalizeOutputProfileInput(normalizedObj.output_profile),
|
|
3891
3891
|
amount_column: normalizeAmountColumnInput(normalizedObj.amount_column),
|
|
3892
|
-
apply_ids:
|
|
3892
|
+
apply_ids: normalizeOpaqueIdArrayInput(normalizedObj.apply_ids),
|
|
3893
3893
|
sort: normalizeSortInput(normalizedObj.sort),
|
|
3894
3894
|
filters: normalizeFiltersInput(normalizedObj.filters),
|
|
3895
3895
|
select_columns: normalizeSelectorListInput(selectColumns),
|
|
@@ -3921,7 +3921,7 @@ function normalizeAggregateInput(raw) {
|
|
|
3921
3921
|
amount_column: normalizeAmountColumnInput(amountColumns),
|
|
3922
3922
|
metrics: normalizeMetricsInput(normalizedObj.metrics),
|
|
3923
3923
|
time_bucket: normalizeTimeBucketInput(normalizedObj.time_bucket),
|
|
3924
|
-
apply_ids:
|
|
3924
|
+
apply_ids: normalizeOpaqueIdArrayInput(normalizedObj.apply_ids),
|
|
3925
3925
|
sort: normalizeSortInput(normalizedObj.sort),
|
|
3926
3926
|
filters: normalizeFiltersInput(normalizedObj.filters),
|
|
3927
3927
|
time_range: timeRange,
|
|
@@ -3981,7 +3981,7 @@ function normalizeBatchGetInput(raw) {
|
|
|
3981
3981
|
return {
|
|
3982
3982
|
...normalizedObj,
|
|
3983
3983
|
app_key: coerceStringLike(normalizedObj.app_key),
|
|
3984
|
-
apply_ids:
|
|
3984
|
+
apply_ids: normalizeOpaqueIdArrayInput(normalizedObj.apply_ids),
|
|
3985
3985
|
max_columns: coerceNumberLike(normalizedObj.max_columns),
|
|
3986
3986
|
select_columns: normalizeSelectorListInput(selectColumns),
|
|
3987
3987
|
output_profile: normalizeOutputProfileInput(normalizedObj.output_profile)
|
|
@@ -4007,7 +4007,7 @@ function normalizeExportInput(raw) {
|
|
|
4007
4007
|
max_columns: coerceNumberLike(normalizedObj.max_columns),
|
|
4008
4008
|
strict_full: coerceBooleanLike(normalizedObj.strict_full),
|
|
4009
4009
|
output_profile: normalizeOutputProfileInput(normalizedObj.output_profile),
|
|
4010
|
-
apply_ids:
|
|
4010
|
+
apply_ids: normalizeOpaqueIdArrayInput(normalizedObj.apply_ids),
|
|
4011
4011
|
sort: normalizeSortInput(normalizedObj.sort),
|
|
4012
4012
|
filters: normalizeFiltersInput(normalizedObj.filters),
|
|
4013
4013
|
select_columns: normalizeSelectorListInput(selectColumns),
|
|
@@ -4134,6 +4134,34 @@ function normalizeIdArrayInput(value) {
|
|
|
4134
4134
|
}
|
|
4135
4135
|
return parsed;
|
|
4136
4136
|
}
|
|
4137
|
+
function normalizeOpaqueIdInput(value) {
|
|
4138
|
+
const parsed = parseJsonLikeDeep(value);
|
|
4139
|
+
if (parsed === undefined || parsed === null) {
|
|
4140
|
+
return parsed;
|
|
4141
|
+
}
|
|
4142
|
+
if (typeof parsed === "string") {
|
|
4143
|
+
const trimmed = parsed.trim();
|
|
4144
|
+
return trimmed ? trimmed : parsed;
|
|
4145
|
+
}
|
|
4146
|
+
if (typeof parsed === "number" && Number.isFinite(parsed)) {
|
|
4147
|
+
return String(Math.trunc(parsed));
|
|
4148
|
+
}
|
|
4149
|
+
return parsed;
|
|
4150
|
+
}
|
|
4151
|
+
function normalizeOpaqueIdArrayInput(value) {
|
|
4152
|
+
const parsed = parseJsonLikeDeep(value);
|
|
4153
|
+
if (Array.isArray(parsed)) {
|
|
4154
|
+
return parsed.map((item) => normalizeOpaqueIdInput(item));
|
|
4155
|
+
}
|
|
4156
|
+
if (typeof parsed === "string" && parsed.includes(",")) {
|
|
4157
|
+
return parsed
|
|
4158
|
+
.split(",")
|
|
4159
|
+
.map((item) => item.trim())
|
|
4160
|
+
.filter((item) => item.length > 0)
|
|
4161
|
+
.map((item) => normalizeOpaqueIdInput(item));
|
|
4162
|
+
}
|
|
4163
|
+
return parsed;
|
|
4164
|
+
}
|
|
4137
4165
|
function normalizeSortInput(value) {
|
|
4138
4166
|
const parsed = parseJsonLikeDeep(value);
|
|
4139
4167
|
if (!Array.isArray(parsed)) {
|