@curio-data/mcp-intelli-search 0.23.0 → 0.24.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 +82 -4
- package/dist/{chunk-B5ZMILMB.js → chunk-JIW7J65N.js} +973 -112
- package/dist/{chunk-NMHVOCTZ.js → chunk-VYV3EUCW.js} +11 -1
- package/dist/cli.js +1 -1
- package/dist/runtime.js +2 -2
- package/dist/server.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@curio-data/mcp-intelli-search)
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
8
|
[](https://github.com/Curio-Data/pi-intelli-search/blob/main/LICENSE)
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
Intelligent web research for coding agents: search, extract, collate, and cache grounded web context in one tool call.
|
|
12
12
|
|
|
@@ -69,6 +69,7 @@ The native extension uses `Pi` settings and authentication. Generic MCP registra
|
|
|
69
69
|
- [Collation Input Budget](#collation-input-budget)
|
|
70
70
|
- [Usage Examples](#usage-examples)
|
|
71
71
|
- [Quick Search](#quick-search)
|
|
72
|
+
- [Planned Research Questions](#planned-research-questions)
|
|
72
73
|
- [Deep Research](#deep-research)
|
|
73
74
|
- [Targeted Research With Domain Guidance](#targeted-research-with-domain-guidance)
|
|
74
75
|
- [Comparing Options](#comparing-options)
|
|
@@ -289,6 +290,8 @@ Both packages expose these four operations. Start with `intelli_search` for fact
|
|
|
289
290
|
| `intelli_collate` | Deduplicate and synthesise multiple extractions into a summary. Writes cache. |
|
|
290
291
|
| `intelli_research` | Search, fetch, extract, collate and cache multi-page research in one call. |
|
|
291
292
|
|
|
293
|
+
Use `query` for a single question. For two or more distinct questions known at launch, pass `queries` instead, with `batchMode: "independent"` for a separate answer per question or `batchMode: "expansion"` for one report on a common topic. Each entry supplies a `query`; its `focusPrompt`, `domains` and `maxUrls` override the corresponding top-level defaults. The page cap applies per entry. An expansion needs at least two completed entries to merge, and the merge request must fit `collationInputBudgetTokens`. If the merge is skipped or fails, the result states why and gives the per-query sections instead. If no entry completes, the result gives each entry's section and outcome; the call returns an error, listing each entry's reason and the batch manifest path when it was written, only when every entry raised an error rather than ending in a degraded outcome such as `no-links`. Ask questions prompted by a finding in a later call. A merged report refers to its members' evidence by cache folder path, and a completed repeat of one of its queries on the same UTC date replaces what those paths hold; see [Same-Day Repeats of Batch Members](#same-day-repeats-of-batch-members). The [native batch benchmark](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/BENCHMARKS.md#batch-research-on-the-native-host) compares five separate calls with one batch and shows how much main-model input went into issuing the next query.
|
|
294
|
+
|
|
292
295
|
### Evidence and Provenance
|
|
293
296
|
|
|
294
297
|
Research collation receives only successful, non-empty page extractions, not the search model's summary. Code generates the Source Assessment inventory and cache-file references from the run's evidence manifest. Synthesis uses source IDs such as `[S1]`; unknown IDs, prose URLs absent from the supplied extractions and model-generated numbered cache references fail validation before a report is committed. Cross-links present in extracted text remain content, not additional fetched pages. Fenced, indented and inline code examples remain code, not evidence declarations. These checks establish reference consistency, not factual accuracy.
|
|
@@ -341,6 +344,8 @@ A synthesis that cites a URL found only in the omitted text fails provenance val
|
|
|
341
344
|
|
|
342
345
|
When anything was trimmed, the result and `report.md` carry a **Collation input trimmed** notice. It names the limit that bound: the per-source limit (`collationSourceMaxTokens`), the total input budget (`collationInputBudgetTokens`), or both. It lists each affected source under "Trimmed to the per-source limit", "Trimmed by both limits", "Trimmed to a fair share of the input budget", "Left out with empty retained text" or "Left out to fit the input budget", with the extraction characters sent and the path of its untrimmed extraction file, including the cache folder, ready to open from the workspace. The notice states that the omitted text is in those files and that re-running research does not recover it; read them for the missing detail. Its **Configuration** line names the setting to raise next time. Raising `collationSourceMaxTokens` sends more of one long page; raising `collationInputBudgetTokens`, within the collation model's context, or requesting fewer URLs sends more overall. Raising only the total budget does not recover text removed by the per-source cap. When a limit is already at its maximum, the notice says so instead of advising a raise.
|
|
343
346
|
|
|
347
|
+
An expansion batch's merge sends whole member summaries, which this budget cannot trim. The merge measures its request at the same ≈4 characters per token and, when it exceeds `collationInputBudgetTokens`, is skipped before the model call; the result states the measured size and returns the per-query sections.
|
|
348
|
+
|
|
344
349
|
If the limits leave no extraction text at all, the synthesis model is not called. Research returns `collate-failed` with the extractions and pages saved, and manual `intelli_collate` returns an error; both name `collationInputBudgetTokens` and `collationSourceMaxTokens` as the settings to raise.
|
|
345
350
|
|
|
346
351
|
<a id="quick-start"></a>
|
|
@@ -354,6 +359,49 @@ These examples describe tool calls for the agent, not shell commands. MCP hosts
|
|
|
354
359
|
intelli_search(query="TypeScript 5.8 release date")
|
|
355
360
|
```
|
|
356
361
|
|
|
362
|
+
### Planned Research Questions
|
|
363
|
+
|
|
364
|
+
For a request such as “Explain how a long-running reader affects a database checkpoint”, use one query if it covers both parts. When separate searches are needed to inform the same decision, pass expansion arguments to `intelli_research`:
|
|
365
|
+
|
|
366
|
+
```json
|
|
367
|
+
{
|
|
368
|
+
"batchMode": "expansion",
|
|
369
|
+
"domains": ["sqlite.org"],
|
|
370
|
+
"maxUrls": 3,
|
|
371
|
+
"queries": [
|
|
372
|
+
{
|
|
373
|
+
"query": "SQLite WAL reader snapshots",
|
|
374
|
+
"focusPrompt": "Identify when a snapshot ends."
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"query": "SQLite WAL checkpoint progress",
|
|
378
|
+
"focusPrompt": "Explain how readers limit progress."
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
For a request such as “Prepare separate notes on backup consistency and path handling”, use independent mode to keep the answers separate:
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"batchMode": "independent",
|
|
389
|
+
"maxUrls": 2,
|
|
390
|
+
"queries": [
|
|
391
|
+
{
|
|
392
|
+
"query": "SQLite online backup API",
|
|
393
|
+
"focusPrompt": "Identify when a backup is consistent."
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"query": "Python pathlib pure paths",
|
|
397
|
+
"focusPrompt": "List operations that require no I/O."
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
For a partial batch, read the entry outcomes before relying on coverage. A successful merge lists the member reports, including a saved failure report when available. Source identifiers such as `[S1]` belong to the inventory in the report that cites them; the merged report has its own numbering.
|
|
404
|
+
|
|
357
405
|
### Deep Research
|
|
358
406
|
|
|
359
407
|
Always provide a `focusPrompt`. The extraction LLM works best with specific guidance.
|
|
@@ -415,6 +463,8 @@ Per research run with the default 10 pages: ≈$0.09
|
|
|
415
463
|
| Collate (M3 via OpenRouter) | 1 | ≈$0.01 |
|
|
416
464
|
| Cache Suggest (M3 via OpenRouter) | 1 | ≈$0.0002 |
|
|
417
465
|
|
|
466
|
+
In a batch, each entry has its own search, page budget and collation. Five entries at `maxUrls: 3` can select up to fifteen pages, not three. The extraction pool limits simultaneous extractions, not search or collation calls. Expansion adds one merge call after the entries settle. The whole batch is one tool call, so its entries and, in expansion mode, the merge all count towards a host's tool-call deadline. Use a smaller batch or fewer pages per entry on a constrained account.
|
|
467
|
+
|
|
418
468
|
Since v0.13.0 the search stage adds recovered provider citation URLs to prose links, increasing the candidate source set; `maxUrls` still caps page selection. The ≈$0.09 figure is the planning estimate for a full 10-page research run with the v0.14.0 default models (M3 and M2.7 had equal per-token prices in the recorded benchmark; M3 wrote ≈2× the extraction characters, with the cost estimate separately projecting greater token usage); lower `defaultUrls` to hold earlier spend. Changing the search model or engine also changes the search step's cost; configure it through [native model settings](https://github.com/Curio-Data/pi-intelli-search/blob/main/README.md#choosing-an-alternative-search-configuration) or [MCP configuration](#configuration). The extract and collate rows scale with the selected models.
|
|
419
469
|
|
|
420
470
|
The estimate assumes pages of ≈50K characters. `extractMaxChars` (default 400,000) caps the text sent to extraction at ≈100,000 input tokens per page, so a ten-page run over long pages can send ≈1M input tokens to the extract model before collation, at a correspondingly higher cost. Budget retries add output: with the default `outputBudgetRetries`, one affected call's budget attempts can bill up to seven times its configured output cap, before transport retries. Lower `extractMaxChars` or `outputBudgetRetries` to bound that spend.
|
|
@@ -482,11 +532,14 @@ Unspecified tuning comes from the canonical [shared defaults](https://github.com
|
|
|
482
532
|
| `fetchTimeoutMs` | `20000`: page-fetch timeout in milliseconds | Integer from 1 to 600,000 |
|
|
483
533
|
| `llmTimeoutMs` | `120000`: application timeout per model call in milliseconds | Integer from 1 to 600,000 |
|
|
484
534
|
| `fetchConcurrency` | `4`: simultaneous page fetches | Integer from 1 to 32 |
|
|
535
|
+
| `maxBatchEntries` | `10`: maximum queries per batch | Integer from 2 to 100 |
|
|
536
|
+
| `batchConcurrency` | `4`: maximum entries running at once | Integer from 1 to 32 |
|
|
537
|
+
| `batchExtractionConcurrency` | `8`: shared extraction slots across all entries, in place of `extractionConcurrency` | Integer from 1 to 32 |
|
|
485
538
|
| `extractionConcurrency` | `4`: simultaneous per-page extractions | Integer from 1 to 32 |
|
|
486
539
|
| `extractionMaxTokens` | `8000`: per-page output-token limit (includes hidden reasoning tokens) | Integer from 16 to 128,000 |
|
|
487
540
|
| `collationMaxTokens` | `8000`: synthesis output-token limit | Integer from 16 to 128,000 |
|
|
488
541
|
| `outputBudgetRetries` | `2`: research retries at a doubled output cap for an empty capped extraction or any capped synthesis; `0` disables | Integer from 0 to 5 |
|
|
489
|
-
| `collationInputBudgetTokens` | `221000`: tokens available to extractions and their headers in the collation request | Integer from 10,000 to 1,000,000 |
|
|
542
|
+
| `collationInputBudgetTokens` | `221000`: tokens available to extractions and their headers in the collation request; in an expansion batch, a merge request above it is skipped before the model call | Integer from 10,000 to 1,000,000 |
|
|
490
543
|
| `collationSourceMaxTokens` | `32000`: ceiling on one extraction's text sent to collation | Integer from 256 to 128,000 |
|
|
491
544
|
| `llmRetryAttempts` | `3`: model-call attempts, including the first | Integer from 1 to 10 |
|
|
492
545
|
| `searchRetryAttempts` | `2`: search attempts after a valid response with no usable links, including the first | Integer from 1 to 10 |
|
|
@@ -495,10 +548,25 @@ Unspecified tuning comes from the canonical [shared defaults](https://github.com
|
|
|
495
548
|
| `minRequestIntervalMs` | `0`: extraction-call spacing in milliseconds; zero disables pacing | Integer from 0 to 120,000 |
|
|
496
549
|
| `cacheDir` | `.search`: workspace-relative cache directory | Nonempty relative directory, without absolute paths, backslashes or traversal components |
|
|
497
550
|
| `browserFingerprint` | `chrome_145`: browser signature for fetching | `chrome_145`, the verified shared profile |
|
|
498
|
-
| `disableTelemetry` | `false`: write
|
|
551
|
+
| `disableTelemetry` | `false`: write local telemetry, including batch entries' browsing history in `stages.fetch.urls`; `true` suppresses `meta.json` and `batch-meta.json`, not the cache or manifest | Boolean |
|
|
499
552
|
| `disableLlmsFullDiscovery` | `false`: probe for supplementary documentation; `true` skips probes and downloads | Boolean |
|
|
500
553
|
| `searchWebSearch` | Disabled; engine `auto`, `maxResults: 8`, reasoning `minimal`. Enables the search server tool when configured | Validated block described below; replaces the entire shared default block |
|
|
501
554
|
|
|
555
|
+
For a constrained account, merge this fragment into the server configuration. It limits a batch to five entries, runs at most two entries at once and shares two extraction slots across them. `maxUrls` applies per entry in both modes.
|
|
556
|
+
|
|
557
|
+
```json
|
|
558
|
+
{
|
|
559
|
+
"tuning": {
|
|
560
|
+
"maxBatchEntries": 5,
|
|
561
|
+
"batchConcurrency": 2,
|
|
562
|
+
"batchExtractionConcurrency": 2,
|
|
563
|
+
"extractionConcurrency": 2,
|
|
564
|
+
"defaultUrls": 3,
|
|
565
|
+
"maxUrls": 3
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
```
|
|
569
|
+
|
|
502
570
|
`searchWebSearch` requires a boolean `enabled`. Optional fields are `engine` (`auto`, `native`, `exa`, `parallel`, `perplexity`, `firecrawl`), `maxResults` (1 to 25, capped at 20 for `perplexity`), `searchContextSize` (`low`, `medium`, `high`), `allowedDomains`, `excludedDomains`, and `reasoning` (`minimal`, `low`, `medium`, `high`). Domain lists contain hostnames, not URLs (uniform resource locators), and have at most 100 entries. The `perplexity` and `firecrawl` engines cannot combine nonempty allowed and excluded lists. Per-call domains also guide search; they are not a network allowlist for fetched pages.
|
|
503
571
|
|
|
504
572
|
**Retry Policy:** Every standalone model call, including one-shot search, extract and collate, receives configured retry and application-timeout defaults. The shared policy owns retries once; there is no underlying SDK retry loop. Retry-After delays are bounded by `retryMaxDelayMs`. Native one-shot policy remains unchanged.
|
|
@@ -604,6 +672,10 @@ Both packages write this format. The native extension resolves the cache against
|
|
|
604
672
|
│ ├── 01-developers-cloudflare-com.md
|
|
605
673
|
│ ├── 02-developers-cloudflare-com.md
|
|
606
674
|
│ └── llms-full-developers-cloudflare-com.md
|
|
675
|
+
├── 2026-04-19-batch-d1-worker-api-9c1e04/ # Batch folder
|
|
676
|
+
│ ├── manifest.json # Queries, outcomes and member folders
|
|
677
|
+
│ ├── batch-meta.json # Batch telemetry record
|
|
678
|
+
│ └── report.md # Merged report, after a successful merge
|
|
607
679
|
└── .index.json # Index of all cached searches
|
|
608
680
|
```
|
|
609
681
|
|
|
@@ -618,9 +690,15 @@ Refresh behaviour:
|
|
|
618
690
|
- An `extraction-failed` or `collate-failed` repeat preserves a successful report in the same way, but archives and replaces an earlier `extraction-failed` or `collate-failed` report. A later run recognises a failure report only by its first line, the marker `<!-- intelli-search:extraction-failed -->` or `<!-- intelli-search:collate-failed -->`; the tool result omits the marker. Committing a failure report also removes any index entry for that folder, so the cache index lists only successful reports.
|
|
619
691
|
- The numbered siblings are a same-day safety net, not a versioned archive: copy a report elsewhere if it must be retained long-term.
|
|
620
692
|
|
|
693
|
+
**Batch Folders.** Both modes keep each entry's ordinary cache folder and write a separate `<date>-batch-<slug>-<hash>/` folder. `manifest.json` lists the queries in order, their outcomes and their folder paths at completion. A merged `report.md` points to the same member folders, in its Per-Query Reports list and in its inventory, which names each query's extraction and source file for every page, one per query where queries share a page. `batch-meta.json` is written unless telemetry is disabled. Only a successful expansion merge writes `report.md` and indexes the batch. A repeated batch attempts to archive the earlier batch folder even if the new merge fails. `rejected-synthesis.json` is a diagnostic written only for nonempty merge candidates that failed validation, not for a transport failure with no candidate. It can accompany a report if a later candidate passed.
|
|
694
|
+
|
|
695
|
+
<a id="same-day-repeats-of-batch-members"></a>**Limitation: Same-Day Repeats of Batch Members.** A cache folder name combines the UTC date and the query, so a query run twice on one date maps to one folder. A completed repeat archives the earlier run to the next numbered sibling (`.1`, then `.2`) and writes its own files in the folder; a degraded repeat leaves the earlier completed report in place, as the list above describes. The manifest and a merged report record member folders by name and are not updated when a member is archived. After a completed same-day repeat of a member query, alone or in any batch, including the same batch run again, those paths lead to the newer run's report, extractions and sources: a file the merged report's inventory names can hold a different page or be missing. The evidence the merge used is normally still in the numbered sibling. Benchmarking and evaluation, which repeat queries on one day, are the main cases. To keep a merged report beside the evidence it cites, copy the batch folder and its member folders before repeating any of its queries on the same UTC date.
|
|
696
|
+
|
|
621
697
|
**Local Telemetry (`meta.json`):** Unless disabled, completed runs and the degraded exits recorded in `outcome` attempt a best-effort sidecar write. Cancellation and thrown failures do not all produce a sidecar. It records the full research query and per-stage outcomes: pages fetched and failed, fetch-variant winners (Defuddle versus Markdown), search retries, cache-suggest hits and latency. `stages.search.annotationsHarvested` counts recovered `url_citation` entries and can be `0` when none are recovered. Historical records or an unreached stage can omit it. It is not a subset of `linksReturned`: harvested citations are merged with prose links before the `maxUrls` clamp, so a run can harvest twenty and report ten links. The sidecar adds no network transmission or credential/account-identifier fields, but the query and metadata can contain personal or confidential information. Ordinary research requests still go to configured external services. The bundled [`scripts/analyze-sessions.sh`](https://github.com/Curio-Data/pi-intelli-search/blob/main/scripts/README.md) can aggregate these sidecars to report per-stage success rates.
|
|
622
698
|
|
|
623
|
-
|
|
699
|
+
In a batch, entries add `batch.id`, `batch.mode`, `batch.size` and `batch.position`. Their `stages.fetch.urls` list records browsing history (successfully fetched URLs). `batch-meta.json` records the batch duration, concurrency limits, entry outcomes and, in expansion mode, merge size, duration and outcome. For the fields and their units see [Telemetry Sidecar](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/ARCHITECTURE.md#telemetry-sidecar).
|
|
700
|
+
|
|
701
|
+
To suppress both telemetry files in the MCP server, set `"disableTelemetry": true` inside the configuration's [`tuning` object](#tuning).
|
|
624
702
|
|
|
625
703
|
## Compatibility
|
|
626
704
|
|