querysub 0.683.0 → 0.684.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/package.json
CHANGED
|
@@ -14,6 +14,7 @@ module.hotreload = false;
|
|
|
14
14
|
|
|
15
15
|
const PARALLEL_FILE_SEARCHES = 4;
|
|
16
16
|
const DEFAULT_LIMIT = 100;
|
|
17
|
+
const MAX_LIMIT = 10_000;
|
|
17
18
|
// Compressed input bytes of downloaded files to keep resident.
|
|
18
19
|
const DOWNLOAD_CACHE_MAX_BYTES = 1024 ** 3;
|
|
19
20
|
// Decoded output bytes (estimated via serialized length) of decoded files to keep resident. Sized independently of the download cache because the decoded form is much larger than the compressed download.
|
|
@@ -125,6 +126,9 @@ export async function searchStorageLogsForMCP(config: {
|
|
|
125
126
|
throw new Error(`startTime (${startTime}) must be < endTime (${endTime})`);
|
|
126
127
|
}
|
|
127
128
|
let limit = config.limit ?? DEFAULT_LIMIT;
|
|
129
|
+
if (limit > MAX_LIMIT) {
|
|
130
|
+
throw new Error(`limit ${limit} > ${MAX_LIMIT}. This endpoint returns projected rows over a socket, it is not a bulk export. If you need to aggregate large volumes, list the log files and download + parse them directly.`);
|
|
131
|
+
}
|
|
128
132
|
let direction = config.direction ?? "fromEnd";
|
|
129
133
|
let columns = config.columns && (config.columns.includes("time") ? config.columns : ["time", ...config.columns]);
|
|
130
134
|
let clauses = parseSearchClauses(query);
|