@curio-data/mcp-intelli-search 0.21.0 → 0.22.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/README.md +64 -15
- package/dist/{chunk-HLF5TGKP.js → chunk-IFOKSKKQ.js} +1328 -150
- package/dist/{chunk-LXLEWIYT.js → chunk-NMHVOCTZ.js} +56 -20
- package/dist/cli.js +1 -1
- package/dist/runtime.js +2 -2
- package/dist/server.js +2 -2
- package/package.json +1 -1
|
@@ -12,13 +12,39 @@ import { readFile, realpath, stat } from "node:fs/promises";
|
|
|
12
12
|
import { isAbsolute, resolve } from "node:path";
|
|
13
13
|
|
|
14
14
|
// src/core/defaults.ts
|
|
15
|
+
var MIN_OUTPUT_TOKENS = 16;
|
|
16
|
+
var MAX_OUTPUT_TOKENS = 128e3;
|
|
17
|
+
var TUNING_RANGES = {
|
|
18
|
+
defaultUrls: [1, 100],
|
|
19
|
+
maxUrls: [1, 100],
|
|
20
|
+
extractMaxChars: [1, 2e6],
|
|
21
|
+
fetchTimeoutMs: [1, 6e5],
|
|
22
|
+
fetchConcurrency: [1, 32],
|
|
23
|
+
extractionConcurrency: [1, 32],
|
|
24
|
+
extractionMaxTokens: [MIN_OUTPUT_TOKENS, MAX_OUTPUT_TOKENS],
|
|
25
|
+
collationMaxTokens: [MIN_OUTPUT_TOKENS, MAX_OUTPUT_TOKENS],
|
|
26
|
+
outputBudgetRetries: [0, 5],
|
|
27
|
+
collationInputBudgetTokens: [1e4, 1e6],
|
|
28
|
+
collationSourceMaxTokens: [256, MAX_OUTPUT_TOKENS],
|
|
29
|
+
llmTimeoutMs: [1, 6e5],
|
|
30
|
+
llmRetryAttempts: [1, 10],
|
|
31
|
+
retryBaseDelayMs: [0, 12e4],
|
|
32
|
+
retryMaxDelayMs: [0, 12e4],
|
|
33
|
+
searchRetryAttempts: [1, 10],
|
|
34
|
+
minRequestIntervalMs: [0, 12e4]
|
|
35
|
+
};
|
|
15
36
|
function tuningDefaults() {
|
|
16
37
|
return {
|
|
17
38
|
searchWebSearch: { enabled: false, engine: "auto", maxResults: 8, reasoning: "minimal" },
|
|
18
39
|
defaultUrls: 10,
|
|
19
40
|
maxUrls: 20,
|
|
20
41
|
cacheDir: ".search",
|
|
21
|
-
|
|
42
|
+
// Page cut-off for the text handed to one extraction. Raised from
|
|
43
|
+
// 150,000 in 0.22.0: long documentation pages were cut before the
|
|
44
|
+
// sections that answered the query, and the extraction model, not this
|
|
45
|
+
// limit, is what bounds the output. What reaches collation is bounded
|
|
46
|
+
// separately by the collation input budget and the per-source text cap.
|
|
47
|
+
extractMaxChars: 4e5,
|
|
22
48
|
fetchTimeoutMs: 2e4,
|
|
23
49
|
fetchConcurrency: 4,
|
|
24
50
|
extractionConcurrency: 4,
|
|
@@ -30,7 +56,31 @@ function tuningDefaults() {
|
|
|
30
56
|
// and page-dependent, so telemetry records residual exhaustion
|
|
31
57
|
// (evidence/2026-11-02-extract-failure-agentskills-io).
|
|
32
58
|
extractionMaxTokens: 8e3,
|
|
33
|
-
collationMaxTokens:
|
|
59
|
+
collationMaxTokens: 8e3,
|
|
60
|
+
// Budget retries: an extraction cap spent before visible text, or a
|
|
61
|
+
// synthesis cap reached with or without text, is retried, doubling the
|
|
62
|
+
// cap each time up to MAX_OUTPUT_TOKENS or the model's output limit,
|
|
63
|
+
// whichever is lower. 2 gives 8,000, 16,000 then 32,000; 0 disables the
|
|
64
|
+
// retry.
|
|
65
|
+
outputBudgetRetries: 2,
|
|
66
|
+
// Collation input budget in tokens: what every extraction, its header
|
|
67
|
+
// and the synthesis must fit inside the collation model's context. The
|
|
68
|
+
// default follows the owner's confirmed sizing (2026-11-07): 256,000
|
|
69
|
+
// context, minus ≈3,000 for prompts and the search summary, minus 32,000
|
|
70
|
+
// reserved for a synthesis at the largest retried cap, leaving ≈221,000
|
|
71
|
+
// for extractions. Trimming starts only when the extractions actually
|
|
72
|
+
// exceed it, so the budget is a ceiling, not a target.
|
|
73
|
+
collationInputBudgetTokens: 221e3,
|
|
74
|
+
// Per-extraction ceiling on the text sent to collation, independent of
|
|
75
|
+
// the extraction's output cap: a retry's larger reasoning allowance must
|
|
76
|
+
// not let one page take the collation budget. 32,000 tokens (≈128,000
|
|
77
|
+
// characters) is the largest cap two retries can reach, so the owner's
|
|
78
|
+
// confirmed worst case (≈6 extractions each filling the 32,000-token
|
|
79
|
+
// retried cap) flows whole inside the 221,000-token budget. Within
|
|
80
|
+
// research the cap binds only when extractionMaxTokens or
|
|
81
|
+
// outputBudgetRetries is raised; manual collation applies it to whatever
|
|
82
|
+
// the caller supplies.
|
|
83
|
+
collationSourceMaxTokens: 32e3,
|
|
34
84
|
browserFingerprint: "chrome_145",
|
|
35
85
|
disableLlmsFullDiscovery: false,
|
|
36
86
|
disableTelemetry: false,
|
|
@@ -91,22 +141,6 @@ function model(value, role) {
|
|
|
91
141
|
throw new Error(`models.${role}.model must select a concrete provider/model identifier`);
|
|
92
142
|
return { provider: "openrouter", model: id };
|
|
93
143
|
}
|
|
94
|
-
var ranges = {
|
|
95
|
-
defaultUrls: [1, 100],
|
|
96
|
-
maxUrls: [1, 100],
|
|
97
|
-
extractMaxChars: [1, 2e6],
|
|
98
|
-
fetchTimeoutMs: [1, 6e5],
|
|
99
|
-
fetchConcurrency: [1, 32],
|
|
100
|
-
extractionConcurrency: [1, 32],
|
|
101
|
-
extractionMaxTokens: [16, 128e3],
|
|
102
|
-
collationMaxTokens: [16, 128e3],
|
|
103
|
-
llmTimeoutMs: [1, 6e5],
|
|
104
|
-
llmRetryAttempts: [1, 10],
|
|
105
|
-
retryBaseDelayMs: [0, 12e4],
|
|
106
|
-
retryMaxDelayMs: [0, 12e4],
|
|
107
|
-
searchRetryAttempts: [1, 10],
|
|
108
|
-
minRequestIntervalMs: [0, 12e4]
|
|
109
|
-
};
|
|
110
144
|
function validateDomains(value, label) {
|
|
111
145
|
if (!Array.isArray(value) || value.length > 100 || value.some(
|
|
112
146
|
(item) => typeof item !== "string" || !/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(
|
|
@@ -255,7 +289,7 @@ function parseDocument(value) {
|
|
|
255
289
|
keys(
|
|
256
290
|
tuning,
|
|
257
291
|
[
|
|
258
|
-
...Object.keys(
|
|
292
|
+
...Object.keys(TUNING_RANGES),
|
|
259
293
|
"cacheDir",
|
|
260
294
|
"browserFingerprint",
|
|
261
295
|
"disableTelemetry",
|
|
@@ -270,7 +304,7 @@ function parseDocument(value) {
|
|
|
270
304
|
extractModel: model(models.extract, "extract"),
|
|
271
305
|
collateModel: model(models.collate, "collate")
|
|
272
306
|
};
|
|
273
|
-
for (const [key, [min, max]] of Object.entries(
|
|
307
|
+
for (const [key, [min, max]] of Object.entries(TUNING_RANGES)) {
|
|
274
308
|
if (tuning[key] !== void 0)
|
|
275
309
|
Object.assign(settings, { [key]: integer(tuning[key], min, max, `tuning.${key}`) });
|
|
276
310
|
}
|
|
@@ -493,6 +527,8 @@ async function setupHost(source, env = process.env) {
|
|
|
493
527
|
|
|
494
528
|
export {
|
|
495
529
|
identity,
|
|
530
|
+
MAX_OUTPUT_TOKENS,
|
|
531
|
+
TUNING_RANGES,
|
|
496
532
|
validateCacheDir,
|
|
497
533
|
validateDomains,
|
|
498
534
|
ConfigurationError,
|
package/dist/cli.js
CHANGED
package/dist/runtime.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IFOKSKKQ.js";
|
|
4
4
|
import {
|
|
5
5
|
ConfigurationError,
|
|
6
6
|
StandaloneError,
|
|
7
7
|
identity,
|
|
8
8
|
loadConfig,
|
|
9
9
|
parseConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NMHVOCTZ.js";
|
|
11
11
|
export {
|
|
12
12
|
ConfigurationError,
|
|
13
13
|
StandaloneError,
|
package/dist/server.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
extractSchema,
|
|
8
8
|
researchSchema,
|
|
9
9
|
searchSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IFOKSKKQ.js";
|
|
11
11
|
import {
|
|
12
12
|
ConfigurationError,
|
|
13
13
|
StandaloneError,
|
|
14
14
|
identity
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NMHVOCTZ.js";
|
|
16
16
|
|
|
17
17
|
// packages/mcp/src/server.ts
|
|
18
18
|
import { McpServer, fromJsonSchema } from "@modelcontextprotocol/server";
|
package/package.json
CHANGED