@curio-data/dsh-intelli-search 0.25.1 β 0.25.2
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 +361 -27
- package/cordis.patch.yml +1 -1
- package/package.json +1 -1
- package/skills/intelli-search/SKILL.md +4 -4
package/README.md
CHANGED
|
@@ -2,7 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
# Intelli Search for DeepSeek Harness
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@curio-data/dsh-intelli-search)
|
|
6
|
+
[](https://www.npmjs.com/package/@curio-data/dsh-intelli-search)
|
|
7
|
+
[](https://github.com/Curio-Data/pi-intelli-search/blob/main/LICENSE)
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
Intelligent web research for coding agents: search, extract, collate, and cache grounded web context in one tool call.
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/01.png" alt="PI-Intelli Search: a five-stage research pipeline diagram arranged in a clockwise cycle. The five labelled stages, each enclosed in a laurel-wreath medallion, are Search (top, depicted as a magnifying glass over an open book), Fetch (right, a hand retrieving a document from shelves), Extract (bottom-right, a distillation apparatus), Collate (bottom-left, stacked books and filing boxes), and Cache & Suggest (left, a treasure chest with an envelope). Copper-coloured arrows connect the stages in sequence. The background is decorated with pen-and-ink botanical and scholarly motifs including quill pens, ink bottles, scrolls, globes, hourglasses, and open books." width="800" />
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
**Features:**
|
|
17
|
+
|
|
18
|
+
- π **Search:** a search-grounded model, [_Perplexity Sonar_](https://docs.perplexity.ai) via [_OpenRouter_](https://openrouter.ai) by default. One application programming interface (API) key, no $50 minimum. Chat models with tool support also work through the web search server tool; see [native search settings](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#openrouter-web-search-server-tool) or [Model Context Protocol (MCP) tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#tuning).
|
|
19
|
+
- π **Harvest:** provider-supplied citation links recovered from the response, alongside links in the answer. Recognised `url_citation` annotations are merged with text links before pages are selected; recovery is best-effort, not a complete record of sources consulted.
|
|
20
|
+
- π **Fetch:** Dual-fetch each page (Hypertext Markup Language (HTML) β [_Defuddle_](https://github.com/kepano/defuddle) versus Markdown endpoint), compare quality, pick the cleaner version.
|
|
21
|
+
- π **Extract:** Per-page large language model (LLM) extraction guided by a _focused prompt_. Compresses β50K to β3-5K chars of query-relevant content.
|
|
22
|
+
- π **Collate:** Cross-source deduplication, inconsistency detection, and synthesis into a focused β5K-character summary.
|
|
23
|
+
- π **Batch Research:** One `intelli_research` call accepts two or more questions known at launch (up to ten by default) and returns either a separate answer for each (independent mode) or one merged report on a common topic (expansion mode). The entries run concurrently, four at a time by default, and the agent receives every answer in one result instead of making one call per question. In one paired benchmark on the native `Pi` host, a session that submitted five questions on one topic as one expansion batch used β74% less main-model input and finished β63% sooner than a session making five separate calls. The main-model charge fell β25%, because most of the separate calls' input was cached context billed below the full input price. That is one pair on one topic, not a general result. Batching follows observed use: in a survey of one host's agent transcripts, 39% of `Pi` messages calling `intelli_research` issued two to five calls, and 15 of 30 sampled follow-up calls made within five minutes were steps the agent had already planned. See [Planned Research Questions](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#planned-research-questions), the [benchmark](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/BENCHMARKS.md#batch-research-on-the-native-host) and the [survey](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/proposals/BATCH-RESEARCH.md#evidence).
|
|
24
|
+
- π§ **Reasoning-Aware Output Budget:** When a reasoning model spends its output cap on hidden reasoning, research retries at a doubled cap (8,000, then 16,000, then 32,000 tokens by default) before reporting a failure. See [Output Budget Retry](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#output-budget-retry).
|
|
25
|
+
- π **Long Pages, Bounded Collation:** Extraction reads up to 400,000 characters of each page. When the extractions exceed the [collation input budget](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#collation-input-budget), the longest are trimmed at clean boundaries, and the result gives the path of each trimmed extraction's full saved file.
|
|
26
|
+
- π§Ύ **Recoverable Failures:** When no extraction succeeds, research saves the fetched pages and a failure report; when synthesis fails, it saves the pages and extractions as well. The result names the saved files, so the agent can read them rather than repeat the paid stages. See [Extraction Diagnostics](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#extraction-diagnostics).
|
|
27
|
+
- π **Code and Text Sources:** Raw source files and text responses are saved and extracted alongside HTML pages. References named in search text without a link are fetched as labelled guesses; see [Inferred Assets](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#inferred-assets).
|
|
28
|
+
- πΎ **Cache:** Persistent `.search/` cache with automatic cache suggest. Related previous searches surfaced on each query.
|
|
29
|
+
- π― **Configurable:** Select models independently for search, extract and collate. The native extension uses registered, authenticated `Pi` models (capability and context limits apply); the MCP server uses explicitly selected OpenRouter models.
|
|
30
|
+
- π° **Cost:** see the [default research-run estimate](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#cost).
|
|
31
|
+
|
|
32
|
+
`@curio-data/dsh-intelli-search` adds cited web search and multi-page research to a [_DeepSeek Harness_](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) profile. It is a configuration bundle, not an extension. One bridge row starts the standalone Model Context Protocol (MCP) server [`@curio-data/mcp-intelli-search`](https://www.npmjs.com/package/@curio-data/mcp-intelli-search), version `0.25.2`, through `npx` with `--host dsh`; one registrar registers the `intelli-search` skill with the harness. Search, page fetching, extraction and collation run in that server, which saves each research report with its sources in the project's `.search/` directory. Inference uses an [_OpenRouter_](https://openrouter.ai) account; [_Node.js_](https://nodejs.org/) runs the server.
|
|
6
33
|
|
|
7
34
|
The harness names the server `intelli`, so the four tools appear as:
|
|
8
35
|
|
|
@@ -19,19 +46,38 @@ Start with a quick search; use research for comparisons, detailed analysis or a
|
|
|
19
46
|
|
|
20
47
|
<!-- TOC:START -->
|
|
21
48
|
|
|
22
|
-
- [Prerequisites](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
23
|
-
- [Installation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
24
|
-
- [Upgrade, Restart and Removal](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
25
|
-
- [Credentials](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
26
|
-
- [Workspace](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
27
|
-
- [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
28
|
-
- [Verification](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
29
|
-
- [Timeouts](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
30
|
-
- [Troubleshooting](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
31
|
-
- [Charges, Cache and Privacy](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
32
|
-
- [Evidence and Limits](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
33
|
-
- [Further Documentation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
34
|
-
- [
|
|
49
|
+
- [Prerequisites](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#prerequisites)
|
|
50
|
+
- [Installation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#installation)
|
|
51
|
+
- [Upgrade, Restart and Removal](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#upgrade-restart-and-removal)
|
|
52
|
+
- [Credentials](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#credentials)
|
|
53
|
+
- [Workspace](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#workspace)
|
|
54
|
+
- [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#configuration)
|
|
55
|
+
- [Verification](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#verification)
|
|
56
|
+
- [Timeouts](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#timeouts)
|
|
57
|
+
- [Troubleshooting](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#troubleshooting)
|
|
58
|
+
- [Charges, Cache and Privacy](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#charges-cache-and-privacy)
|
|
59
|
+
- [Evidence and Limits](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#evidence-and-limits)
|
|
60
|
+
- [Further Documentation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#further-documentation)
|
|
61
|
+
- [Tools](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#tools)
|
|
62
|
+
- [Evidence and Provenance](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#evidence-and-provenance)
|
|
63
|
+
- [Inferred Assets](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#inferred-assets)
|
|
64
|
+
- [Extraction Diagnostics](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#extraction-diagnostics)
|
|
65
|
+
- [Output Budget Retry](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#output-budget-retry)
|
|
66
|
+
- [Collation Input Budget](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#collation-input-budget)
|
|
67
|
+
- [Usage Examples](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#usage-examples)
|
|
68
|
+
- [Quick Search](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#quick-search)
|
|
69
|
+
- [Planned Research Questions](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#planned-research-questions)
|
|
70
|
+
- [Deep Research](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#deep-research)
|
|
71
|
+
- [Targeted Research With Domain Guidance](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#targeted-research-with-domain-guidance)
|
|
72
|
+
- [Comparing Options](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#comparing-options)
|
|
73
|
+
- [Pipeline](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#pipeline)
|
|
74
|
+
- [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#cost)
|
|
75
|
+
- [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#cache-structure)
|
|
76
|
+
- [Documentation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#documentation)
|
|
77
|
+
- [Downloads](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#downloads)
|
|
78
|
+
- [Sponsor](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#sponsor)
|
|
79
|
+
- [Licence](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#licence)
|
|
80
|
+
- [Use of Large Language Models](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#use-of-large-language-models)
|
|
35
81
|
|
|
36
82
|
<!-- TOC:END -->
|
|
37
83
|
|
|
@@ -111,7 +157,7 @@ After the command succeeds, open the file in an editor, so the key stays out of
|
|
|
111
157
|
IFS= read -r -s -p 'OpenRouter API key: ' key || exit 1
|
|
112
158
|
printf '\n'
|
|
113
159
|
printf '%s\n' "$key" | \
|
|
114
|
-
npx -y --package @curio-data/mcp-intelli-search@0.25.
|
|
160
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.2 \
|
|
115
161
|
mcp-intelli-search setup
|
|
116
162
|
)
|
|
117
163
|
```
|
|
@@ -135,7 +181,7 @@ With no per-user configuration file, the server uses built-in defaults: OpenRout
|
|
|
135
181
|
|
|
136
182
|
The per-user file is `${XDG_CONFIG_HOME:-$HOME/.config}/mcp-intelli-search/config.json`, shared with the Codex launcher. It is strict: only `providers`, `models` and an optional `tuning` object are accepted, all three model roles are required, and unknown keys, wrong types and out-of-range values are rejected rather than ignored. `defaultUrls` must not exceed `maxUrls`, and search needs a Sonar model unless the `searchWebSearch` tool is enabled. A file without `apiKeyFile` still uses the default credential path, which the launcher supplies. Custom models must appear in OpenRouter's catalogue with the capabilities their role needs, and be available to the account.
|
|
137
183
|
|
|
138
|
-
This file keeps the default models. Each research query selects up to five search-result pages unless the request sets `maxUrls`, and never more than eight. The cap applies to each query separately: a two-query batch can select up to 16 pages in total. A quick search lists up to five sources, plus any further source the answer cites by number. [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
184
|
+
This file keeps the default models. Each research query selects up to five search-result pages unless the request sets `maxUrls`, and never more than eight. The cap applies to each query separately: a two-query batch can select up to 16 pages in total. A quick search lists up to five sources, plus any further source the answer cites by number. [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#tuning) in the standalone server guide list every key and its accepted values.
|
|
139
185
|
|
|
140
186
|
```json
|
|
141
187
|
{
|
|
@@ -176,7 +222,7 @@ Validate the file with the configuration check before restarting. The server rea
|
|
|
176
222
|
**Configuration Check.** From the project directory, run the server's configuration check. It reads the per-user file, or the built-in defaults when there is none, and applies the server's home and filesystem-root rejection. It needs no key and makes no model call. Its first run also downloads the server into the `npx` cache.
|
|
177
223
|
|
|
178
224
|
```bash
|
|
179
|
-
npx -y --package @curio-data/mcp-intelli-search@0.25.
|
|
225
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.2 \
|
|
180
226
|
mcp-intelli-search --host dsh --check-config
|
|
181
227
|
```
|
|
182
228
|
|
|
@@ -230,11 +276,11 @@ A longer bridge limit needs a row override setting `toolCallTimeoutMs`, with the
|
|
|
230
276
|
| Repeated `429` retries | Provider rate limits | Set `minRequestIntervalMs` to `3000` and `extractionConcurrency` to `2` in `tuning`, then restart |
|
|
231
277
|
| The `intelli-search` skill differs in one project | On `0.2.2-rc.1`, a project skill with the same name outranks the bundle's registration; a user-level skill does not | Rename or remove the project skill |
|
|
232
278
|
|
|
233
|
-
The [standalone server's troubleshooting reference](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
279
|
+
The [standalone server's troubleshooting reference](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#timeouts-and-troubleshooting) gives the full list of diagnostics.
|
|
234
280
|
|
|
235
281
|
## Charges, Cache and Privacy
|
|
236
282
|
|
|
237
|
-
**Charges.** Every search and research call bills the configured OpenRouter account. The planning estimate for one ten-page research run with the default models is β$0.09, at the recorded September 2026 prices; it is not a live tariff. Fewer pages cost less. Each batch entry is a separate run, and retries add calls. See [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
283
|
+
**Charges.** Every search and research call bills the configured OpenRouter account. The planning estimate for one ten-page research run with the default models is β$0.09, at the recorded September 2026 prices; it is not a live tariff. Fewer pages cost less. Each batch entry is a separate run, and retries add calls. See [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#cost).
|
|
238
284
|
|
|
239
285
|
**Cache.** Each research query writes one folder in the project's cache, named by the Coordinated Universal Time (UTC) date, a stem of the query and a short hash:
|
|
240
286
|
|
|
@@ -252,9 +298,9 @@ The [standalone server's troubleshooting reference](https://github.com/Curio-Dat
|
|
|
252
298
|
βββ .index.json # Index of cached reports
|
|
253
299
|
```
|
|
254
300
|
|
|
255
|
-
On a successful repeat of the same query on the same UTC date, the server tries to move the earlier run's files to a numbered sibling, `.1` then `.2`. Supplementary documentation downloads stay in the live folder. If the move fails, the new run can overwrite the earlier files; copy a run elsewhere before repeating it if it must be kept. See [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
301
|
+
On a successful repeat of the same query on the same UTC date, the server tries to move the earlier run's files to a numbered sibling, `.1` then `.2`. Supplementary documentation downloads stay in the live folder. If the move fails, the new run can overwrite the earlier files; copy a run elsewhere before repeating it if it must be kept. See [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#cache-structure).
|
|
256
302
|
|
|
257
|
-
**Privacy.** The cache keeps full copies of fetched pages, the query and each report in the project directory, readable by anything that can read the project; exclude `.search/` from version control when its content must not be shared. Queries and page content go to OpenRouter and the selected model providers. The server fetches pages from the machine it runs on, and fetched addresses are not restricted to public ones. See [Filesystem and Privacy Boundaries](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
303
|
+
**Privacy.** The cache keeps full copies of fetched pages, the query and each report in the project directory, readable by anything that can read the project; exclude `.search/` from version control when its content must not be shared. Queries and page content go to OpenRouter and the selected model providers. The server fetches pages from the machine it runs on, and fetched addresses are not restricted to public ones. See [Filesystem and Privacy Boundaries](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#filesystem-and-privacy-boundaries).
|
|
258
304
|
|
|
259
305
|
**Telemetry.** `meta.json` is local telemetry, which the server never transmits: it records the query, per-stage outcomes and timings and, for batch entries, the fetched URLs. Setting `"disableTelemetry": true` in `tuning` stops `meta.json` and `batch-meta.json`; reports, extractions, sources, batch manifests and the index are still written, because they are the cache itself.
|
|
260
306
|
|
|
@@ -271,13 +317,301 @@ Other versions in the declared range `>=0.2.2-rc.1 <0.3.0`, the shipped `web` pr
|
|
|
271
317
|
|
|
272
318
|
## Further Documentation
|
|
273
319
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
- [
|
|
277
|
-
- [
|
|
320
|
+
The sections below cover the shared engine on this page. For the standalone server reference and the differences between hosts, use these links:
|
|
321
|
+
|
|
322
|
+
- [Three Packages, One Engine](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#three-packages-one-engine): how the standalone server and the two host-specific packages fit together.
|
|
323
|
+
- [Usage examples](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#usage-examples), including planned batch research, and the [tool reference](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#tools).
|
|
324
|
+
- [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#tuning) for every key, model constraint and accepted range.
|
|
325
|
+
- [Timeouts and Troubleshooting](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#timeouts-and-troubleshooting) for every diagnostic.
|
|
326
|
+
- [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#cost), [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#cache-structure) and [Filesystem and Privacy Boundaries](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#filesystem-and-privacy-boundaries).
|
|
278
327
|
- [Compatibility record](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPATIBILITY.md#deepseek-harness-evidence-and-limits) and [Changelog](https://github.com/Curio-Data/pi-intelli-search/blob/main/CHANGELOG.md).
|
|
279
|
-
- [Installed skill](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
328
|
+
- [Installed skill](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/skills/intelli-search/SKILL.md), the agent-facing guidance this bundle registers.
|
|
329
|
+
|
|
330
|
+
## Tools
|
|
331
|
+
|
|
332
|
+
The native extension and the MCP server expose the same four operations. Start with `intelli_search` for factual questions, latest versions and release dates; use `intelli_research` for multi-page comparisons, detailed analysis or an evidence gap that search leaves unresolved. The names below are native `Pi` tool names and MCP server tool names; MCP hosts add their own callable-name prefixes. Use the names exposed by the host.
|
|
333
|
+
|
|
334
|
+
| Tool | Description |
|
|
335
|
+
| ------------------ | --------------------------------------------------------------------------------------------------- |
|
|
336
|
+
| `intelli_search` | Search the web and return a concise answer with a source list numbered to the answer's citation markers where they can be matched (see [Source Harvesting from Citations](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#source-harvesting-from-citations)). |
|
|
337
|
+
| `intelli_extract` | Extract query-relevant content from a web page, preserving code and technical detail verbatim. |
|
|
338
|
+
| `intelli_collate` | Deduplicate and synthesise multiple extractions into a summary. Writes cache. |
|
|
339
|
+
| `intelli_research` | Search, fetch, extract, collate and cache multi-page research in one call. |
|
|
340
|
+
|
|
341
|
+
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](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#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.
|
|
342
|
+
|
|
343
|
+
### Evidence and Provenance
|
|
344
|
+
|
|
345
|
+
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.
|
|
346
|
+
|
|
347
|
+
Manual `intelli_collate` labels its evidence as caller-supplied extractions; it does not claim the server fetched those pages. An extraction passed with `inferred: true` is treated as a guessed source: the synthesis model is told so, and the collation budget trims it before cited sources. Empty or duplicate source evidence is rejected. The optional `searchSummary` input remains accepted for compatibility but does not supply synthesis evidence. Per-source relevance and contribution ratings are no longer model-generated. Read exact cache paths from the inventory; `Not cached` means no full-page file was supplied.
|
|
348
|
+
|
|
349
|
+
### Inferred Assets
|
|
350
|
+
|
|
351
|
+
Search text can name a site or file without linking it, for example `install.sh`, `manage.py/runserver` or `docs.example.com/guide`. When such a reference ends in a delegated top-level domain (TLD), it is kept as an inferred reference: normalised to an `https://` URL, labelled inferred from text rather than a citation, and ranked after linked and cited URLs, so a guess cannot displace a citation from the `maxUrls` selection. The token becomes the host name, so `install.sh` fetches `https://install.sh`, and the fetch result records what that address served. Internationalised domain names are converted to their ASCII form, queries, fragments and numeric ports are kept, and a non-numeric port is rejected. `intelli_search` marks such sources `(inferred from text, not a citation)` with the original token. The label of a Markdown link to an absolute URL is not a reference: in `[the README.md](https://github.com/...)` only the link target is a source.
|
|
352
|
+
|
|
353
|
+
Every fetched URL, cited or inferred, passes one media gate. HTML and Markdown responses are cleaned as pages; plain-text and source-code media types, such as `text/plain`, `application/json` or `text/x-python`, are saved as text or code files. Binary responses, including PDF, are rejected. A saved inferred asset uses the normal numbered `sources/` file.
|
|
354
|
+
|
|
355
|
+
Research runs that reach extraction list every inferred reference in an `Inferred Assets` table in the result and in `report.md`; a `fetch-failed` result labels inferred URLs in its failed list. Each row shows the original token, the normalised URL, the fetch result (page, code file, text file, or nothing fetched with its reason) and the saved `sources/` path. A redirect or Markdown alternate records the final URL; a change of hostname other than a leading `www.` is shown as "redirected to a different host", which identifies a different hostname, not necessarily a different organisation. A code file is a media-type and file-extension classification, not proof of the source language. The same outcomes are in `details.inferredAssets`, with `url`, `outcome` (`page`, `code`, `text`, `unknown` or `nothing`) and, when known, `originalReference`, `alternateUrl`, `finalUrl`, `redirectedToDifferentHost`, `contentType`, `sourceFile` and `error`. A preserved run, which saved nothing, omits `sourceFile` and shows "Not saved in this attempt". The collation model receives inferred sources marked as guesses and is instructed not to give them citation-equivalent authority.
|
|
356
|
+
|
|
357
|
+
### Extraction Diagnostics
|
|
358
|
+
|
|
359
|
+
A completed research result can contain failed or incomplete sources. `details.pagesFailed` counts fetch failures; `details.extractionFailed` counts failures after a page was fetched. Inspect the **Failed Sources** list before relying on a report's coverage. A saved full-page link is provided only when that page was written to the cache.
|
|
360
|
+
|
|
361
|
+
The degraded outcomes differ in what they save:
|
|
362
|
+
|
|
363
|
+
- **`fetch-failed`:** every fetch failed. The result returns the search summary and up to ten failed URLs with their fetch errors, and saves no report or pages.
|
|
364
|
+
- **`extraction-failed`:** pages were fetched but no extraction succeeded. Research saves every fetched page under `sources/` and a failure report, and `details.cachePath` names the folder. The result's **Failed Sources** list, repeated under `## Failed Sources` in `report.md`, names each saved page's path and why its extraction failed. A saved page can be read directly, or passed to `intelli_extract` as content, without fetching it again.
|
|
365
|
+
- **`collate-failed`:** synthesis failed after extraction. Research saves the extractions and pages with a report that names the failure and lists the saved extractions. If source validation rejected nonempty synthesis candidates, research also attempts to save them with their rejection reasons in `rejected-synthesis.json`. This is diagnostic text, not accepted evidence; the result names the file only when saved.
|
|
366
|
+
|
|
367
|
+
When a successful report for the same query already exists from the same UTC date, including one committed by a concurrent run, an `extraction-failed` or `collate-failed` run preserves that report instead: this run's pages and extractions are not saved, `details.cachePath` is empty, and `details.preservedCachePath` names the preserved report's folder. The preserved report keeps its own metadata; failed-attempt telemetry and any rejected-synthesis diagnostic go in a separate `attempts/attempt-*` folder beneath it. An `extraction-failed` result still lists up to ten failed pages with their reasons. Neither failure outcome is added to the cache index or runs the cache-suggest judge.
|
|
368
|
+
|
|
369
|
+
Nonempty output that stops at its output cap, shown by finish reason `length` or by a reported token count that reaches the cap, is kept with a truncation warning. `intelli_extract` returns `details.truncated`; research and manual collation mark affected sources in the Source Assessment inventory. A synthesis warning applies to the summary itself. Without either signal, the absence of a warning does not establish completeness, and `outcome: "completed"` does not guarantee complete source coverage.
|
|
370
|
+
|
|
371
|
+
Research sidecars, when enabled, record extraction-budget failures, possible truncation, available serving routes and cache-judge degradation. See [Telemetry Sidecar](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/ARCHITECTURE.md#telemetry-sidecar) for field definitions and absence semantics. Standalone extraction and collation do not write this sidecar.
|
|
372
|
+
|
|
373
|
+
#### Output Budget Retry
|
|
374
|
+
|
|
375
|
+
Within research, an output cap that runs out is retried with the cap doubled, up to `outputBudgetRetries` times (default 2, so 8,000, then 16,000, then 32,000 tokens), never above 128,000 tokens or the model's output limit. An extraction is retried only when it stops at its cap without visible text; nonempty truncated extraction text is kept with its warning. A synthesis is retried when it stops at its cap with or without text, and a synthesis that keeps returning truncated text uses every configured retry. Of the syntheses returned, a completed one is always preferred over a truncated one; truncated candidates follow, longest first, and the first candidate that passes source validation is used. Set `outputBudgetRetries` to `0` to disable the retry. Standalone `intelli_extract` and manual `intelli_collate` do not retry with a larger cap.
|
|
376
|
+
|
|
377
|
+
A retry never exceeds the model's output limit, and a retry that would grow the cap by less than a quarter is skipped, so a limit can shorten the sequence or remove the retry. The native extension reads the limit from the model's `maxTokens` in the `Pi` model registry. `Pi` assigns 16,384 to a custom model defined without `maxTokens`, so such a model's default sequence is 8,000 then 16,000 tokens. To allow larger retries, set `maxTokens` in `models.json` to the provider's stated limit: in the model's `models` entry for a custom model, or in a `modelOverrides` entry for a built-in model. The MCP server reads the limit from the OpenRouter catalogue, and no setting overrides it. A configured cap at or above the model's output limit gets no retry, and neither does a configured cap above 102,400 tokens, because its doubled cap held to 128,000 would be less than a quarter larger. Research always requests the configured cap unchanged. A failure reason names the model's limit when it prevented a larger attempt.
|
|
378
|
+
|
|
379
|
+
Each attempt's timeout scales with its cap, `llmTimeoutMs Γ attemptCap / configuredCap`, and is capped at four times `llmTimeoutMs`: 120, 240 and 480 seconds with the defaults. One page's budget attempts can therefore take 14 minutes, and the transport retries set by `llmRetryAttempts` repeat a timed-out attempt, so a failing page can take β30 minutes or more. With the default two retries, the budget attempts of one call can bill up to seven times the configured cap in output (8,000 + 16,000 + 32,000 tokens), and each transport retry of an attempt can bill again. A diagnostic or warning reports the cap of the attempt it describes.
|
|
380
|
+
|
|
381
|
+
For a budget-exhaustion diagnostic that survives the retries, review `extractionMaxTokens` for page extraction or `collationMaxTokens` for synthesis. On reasoning models, the budget includes reasoning as well as visible text. Increase the relevant cap within the model's output and context limits, or select a model with a smaller reasoning requirement. Lowering reasoning effort did not prevent exhaustion on the serving route identified in the investigation; it is not a guaranteed remedy. Read an available saved page before repeating paid research. Raising `llmTimeoutMs` addresses timer expiry, not an exhausted token budget or a host deadline.
|
|
382
|
+
|
|
383
|
+
A higher completion cap can permit more billable output and increase OpenRouter's in-flight credit reservation. The [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#cost) estimate is a planning figure, not a spending limit; raising a cap does not mean every call consumes it.
|
|
384
|
+
|
|
385
|
+
### Collation Input Budget
|
|
386
|
+
|
|
387
|
+
Research and manual collation size the collation input at β4 characters per token. Each extraction is first capped at `collationSourceMaxTokens` (default 32,000 tokens), counted in its own characters. The total is measured as the space the extractions take in the collation request, which is JSON, so a newline, quote or backslash counts as two characters: an extraction heavy in code or tables uses more of the budget than its length suggests. Each source is also charged at least β100 tokens of header, more when its URL or title is long. If the total still exceeds `collationInputBudgetTokens` (default 221,000), the longest extractions are trimmed to a fair share of the budget, inferred references before cited sources. Whole sources are left out only when a fair share would keep too little to be useful, lowest-ranked first and inferred references first. Within research, the per-source cap binds only when an extraction's largest retried cap (`extractionMaxTokens` doubled `outputBudgetRetries` times, 32,000 tokens with the defaults) exceeds it, or when a page's text runs above β4 characters per token. In manual `intelli_collate` it applies to whatever the caller supplies. Trimming changes only the text sent to the collation model; saved extraction files are never altered.
|
|
388
|
+
|
|
389
|
+
Every cut ends at a paragraph, line, sentence or word boundary where one is near, and backs off before a Markdown link, a URL or an open code block it would split, so the model is not shown half a link it might complete from memory, which would fail provenance validation. The back-off never discards more than half of the kept text, so a code block or token that began in the first half keeps the plain cut.
|
|
390
|
+
|
|
391
|
+
A synthesis that cites a URL found only in the omitted text fails provenance validation, because that URL is not in the evidence the model received. Research then uses another synthesis already received from an output-cap retry when there is one, and otherwise ends as `collate-failed`; manual collation returns the error. The error names the first rejected URL; in research, a reason longer than 300 characters is shortened, so a very long URL can appear cut off. A saved `collate-failed` report also carries the **Collation input trimmed** notice described below: search the listed extraction files for the URL to see whether it was in the omitted text or in none of the sources.
|
|
392
|
+
|
|
393
|
+
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.
|
|
394
|
+
|
|
395
|
+
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.
|
|
396
|
+
|
|
397
|
+
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.
|
|
398
|
+
|
|
399
|
+
<a id="quick-start"></a>
|
|
400
|
+
## Usage Examples
|
|
401
|
+
|
|
402
|
+
These examples describe tool calls for the agent, not shell commands. MCP hosts add their own tool-name prefixes.
|
|
403
|
+
|
|
404
|
+
### Quick Search
|
|
405
|
+
|
|
406
|
+
```text
|
|
407
|
+
intelli_search(query="TypeScript 5.8 release date")
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Planned Research Questions
|
|
411
|
+
|
|
412
|
+
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`:
|
|
413
|
+
|
|
414
|
+
```json
|
|
415
|
+
{
|
|
416
|
+
"batchMode": "expansion",
|
|
417
|
+
"domains": ["sqlite.org"],
|
|
418
|
+
"maxUrls": 3,
|
|
419
|
+
"queries": [
|
|
420
|
+
{
|
|
421
|
+
"query": "SQLite WAL reader snapshots",
|
|
422
|
+
"focusPrompt": "Identify when a snapshot ends."
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"query": "SQLite WAL checkpoint progress",
|
|
426
|
+
"focusPrompt": "Explain how readers limit progress."
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
For a request such as βPrepare separate notes on backup consistency and path handlingβ, use independent mode to keep the answers separate:
|
|
433
|
+
|
|
434
|
+
```json
|
|
435
|
+
{
|
|
436
|
+
"batchMode": "independent",
|
|
437
|
+
"maxUrls": 2,
|
|
438
|
+
"queries": [
|
|
439
|
+
{
|
|
440
|
+
"query": "SQLite online backup API",
|
|
441
|
+
"focusPrompt": "Identify when a backup is consistent."
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"query": "Python pathlib pure paths",
|
|
445
|
+
"focusPrompt": "List operations that require no I/O."
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
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.
|
|
452
|
+
|
|
453
|
+
### Deep Research
|
|
280
454
|
|
|
455
|
+
Always provide a `focusPrompt`. The extraction LLM works best with specific guidance.
|
|
456
|
+
|
|
457
|
+
```text
|
|
458
|
+
intelli_research(
|
|
459
|
+
query="Svelte 5 runes tutorial examples",
|
|
460
|
+
focusPrompt="Extract the core rune concepts ($state, $derived, $effect), their syntax, and how they replace the old reactive declarations. Include migration patterns from Svelte 4."
|
|
461
|
+
)
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Targeted Research With Domain Guidance
|
|
465
|
+
|
|
466
|
+
```text
|
|
467
|
+
intelli_research(
|
|
468
|
+
query="Cloudflare Workers KV write timeout limits",
|
|
469
|
+
focusPrompt="Extract KV write limits, timeout thresholds, storage limits, and any workarounds for bulk writes. Focus on hard numbers and error messages.",
|
|
470
|
+
maxUrls=3,
|
|
471
|
+
domains=["developers.cloudflare.com"]
|
|
472
|
+
)
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
`domains` guides source selection, it is not a security boundary: the query gains a `site:` expression, and with the web search tool enabled the same domains are also combined with `searchWebSearch.allowedDomains` and sent as an engine filter. The lists are combined, not intersected, and returned uniform resource locators (URLs) are not checked against a local hostname allowlist before fetching. Engine support for allow and exclude lists differs; see [native searchWebSearch keys](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#searchwebsearch-keys) or [MCP tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#tuning).
|
|
476
|
+
|
|
477
|
+
### Comparing Options
|
|
478
|
+
|
|
479
|
+
```text
|
|
480
|
+
intelli_research(
|
|
481
|
+
query="Tailwind CSS vs Vanilla Extract comparison 2026",
|
|
482
|
+
focusPrompt="Extract pros/cons, bundle size benchmarks, DX tradeoffs, and migration costs. Note which claims come from official sources vs blog opinions."
|
|
483
|
+
)
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
## Pipeline
|
|
487
|
+
|
|
488
|
+
<p align="center">
|
|
489
|
+
<img src="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/07B.png" alt="Vintage engraving-style infographic titled "INTELLI_RESEARCH: The Five-Stage Pipeline," showing five sequentially linked numbered stages triggered by intelli_research(query): (1) Search: web discovery via Perplexity Sonar, OpenRouter/pi-native auth; (2) Fetch: dual fetch and quality comparison using wreq-js + Defuddle against raw markdown; (3) Extract: per-page parallel LLM extraction, MiniMax M2.7, the native model configuration at the illustration's creation; (4) Collate: deduplication and persistent cache via MiniMax M2.7 (the native configuration at creation), flags conflicts; (5) Cache Suggest: additive stage, LLM judge surfaces related prior searches. Stages are connected by bold arrows; each is illustrated with a period-appropriate vignette (armillary sphere, scrolls, alchemical still, filing cabinet, owl with documents)." width="800" />
|
|
490
|
+
</p>
|
|
491
|
+
|
|
492
|
+
The illustration shows the native pipeline with the model configuration at its creation, including MiniMax M2.7 and `Pi` authentication; it does not show the current defaults or standalone authentication. All model assignments are configurable through [native model settings](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#model-configuration) or [MCP configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#configuration); alternative search configurations use the same five-stage pipeline.
|
|
493
|
+
|
|
494
|
+
The search stage merges text links with harvested citation annotations before selecting pages (see [Source Harvesting from Citations](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#source-harvesting-from-citations)), and ranks [inferred references](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#inferred-assets) after both. Each page is dual-fetched (HTML via Defuddle versus Markdown endpoint) and scored for quality; plain-text and source files are saved as fetched. Per-page extraction (guided by `focusPrompt`) compresses β50K chars to β3-5K of query-relevant content before collation, keeping the total context manageable (β30-50K for 10 pages). The [collation input budget](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#collation-input-budget) trims unusually long extractions before synthesis.
|
|
495
|
+
|
|
496
|
+
Completed runs and the degraded exits recorded in `outcome` (`no-links`, `fetch-failed`, `extraction-failed`, `collate-failed`) attempt to write a local-only `meta.json` telemetry sidecar into the cache directory (see [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/plugins/dsh/README.md#cache-structure)). Set `"disableTelemetry": true` in the native `pi-intelli-search` namespace or the MCP `tuning` object to suppress it. Budget diagnostics and their absence semantics are defined in [Telemetry Sidecar](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/ARCHITECTURE.md#telemetry-sidecar); the [script guide](https://github.com/Curio-Data/pi-intelli-search/blob/main/scripts/README.md#reported-metrics) explains the available aggregates.
|
|
497
|
+
|
|
498
|
+
See [docs/ARCHITECTURE.md](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/ARCHITECTURE.md) for detailed design decisions.
|
|
499
|
+
|
|
500
|
+
## Cost
|
|
501
|
+
|
|
502
|
+
The estimate below uses the native default models and tuning, also selected in the minimal MCP configuration example. It is a planning estimate based on the recorded September 2026 price basis, not a live tariff check. The native extension and MCP server both incur inference charges on the configured provider account; MCP does not use host subscriptions or credentials.
|
|
503
|
+
|
|
504
|
+
Per research run with the default 10 pages: β$0.09
|
|
505
|
+
|
|
506
|
+
| Step | Calls | Cost |
|
|
507
|
+
| ---------------------------------- | --------------------- | --------- |
|
|
508
|
+
| Search (Sonar) | 1 | β$0.007 |
|
|
509
|
+
| Fetch (Defuddle + Markdown) | 10 (β€4 concurrent) pairs | $0.00 |
|
|
510
|
+
| Extract (M3 via OpenRouter) | 10 (β€4 concurrent) | β$0.07 |
|
|
511
|
+
| Collate (M3 via OpenRouter) | 1 | β$0.01 |
|
|
512
|
+
| Cache Suggest (M3 via OpenRouter) | 1 | β$0.0002 |
|
|
513
|
+
|
|
514
|
+
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.
|
|
515
|
+
|
|
516
|
+
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/mcp-v0.25.2/README.md#choosing-an-alternative-search-configuration) or [MCP configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#configuration). The extract and collate rows scale with the selected models.
|
|
517
|
+
|
|
518
|
+
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.
|
|
519
|
+
|
|
520
|
+
## Cache Structure
|
|
521
|
+
|
|
522
|
+
Both packages write this format. The native extension resolves the cache against the active `Pi` workspace; MCP resolves it against `INTELLI_SEARCH_WORKSPACE` or `--workspace` and keeps it beneath that workspace. See the MCP [filesystem boundaries](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/README.md#filesystem-and-privacy-boundaries).
|
|
523
|
+
|
|
524
|
+
```text
|
|
525
|
+
.search/
|
|
526
|
+
βββ 2026-04-19-d1-worker-api-3f7a2c/
|
|
527
|
+
β βββ report.md # Synthesis + authoritative source inventory
|
|
528
|
+
β βββ query.txt # Original search query
|
|
529
|
+
β βββ meta.json # Local-only telemetry sidecar (v0.11.0+)
|
|
530
|
+
β βββ rejected-synthesis.json # Rejected synthesis, when saved; diagnostic only
|
|
531
|
+
β βββ attempts/ # Failed repeats beside a preserved report
|
|
532
|
+
β β βββ attempt-<id>/ # The attempt's meta.json and rejected synthesis
|
|
533
|
+
β βββ extractions/ # Per-page LLM extractions (β3-5K each)
|
|
534
|
+
β β βββ 01-developers-cloudflare-com.md
|
|
535
|
+
β β βββ 02-developers-cloudflare-com.md
|
|
536
|
+
β βββ sources/ # Full page, code and text content
|
|
537
|
+
β βββ 01-developers-cloudflare-com.md
|
|
538
|
+
β βββ 02-developers-cloudflare-com.md
|
|
539
|
+
β βββ llms-full-developers-cloudflare-com.md
|
|
540
|
+
βββ 2026-04-19-batch-d1-worker-api-9c1e04/ # Batch folder
|
|
541
|
+
β βββ manifest.json # Queries, outcomes and member folders
|
|
542
|
+
β βββ batch-meta.json # Batch telemetry record
|
|
543
|
+
β βββ report.md # Merged report, after a successful merge
|
|
544
|
+
βββ .index.json # Index of all cached searches
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
Each research run writes a cache entry named `<date>-<slug>-<hash>`. The `<hash>` is six hexadecimal characters from a Secure Hash Algorithm 1 (SHA-1) hash of the full query. It distinguishes queries sharing a readable stem and reduces collision risk; it does not guarantee unique names. Concurrent writers use short cache locks, and index updates are atomic. Cache readers do not take those locks: a multi-file refresh is not a whole-directory atomic snapshot.
|
|
548
|
+
|
|
549
|
+
Refresh behaviour:
|
|
550
|
+
|
|
551
|
+
- A completed same-day refresh attempts to archive the previous report, extractions, numbered sources, telemetry sidecar and diagnostics (`rejected-synthesis.json` and `attempts/`) to a numbered sibling folder (`<slug>.1`, then `.2` and so on) before writing the new set. Rotation also attempts to update the archived report's cache references to that sibling. An unclosed code fence in an extraction-failure report's search summary can still leave saved-asset references pointing to the live folder.
|
|
552
|
+
- Archive failure is logged and the completed run can replace canonical files in place; interrupted rotation can leave a partial archive.
|
|
553
|
+
- Supplementary `llms-full-*` documentation downloads stay with the live folder and are not archived.
|
|
554
|
+
- A `no-links` or `fetch-failed` repeat preserves the earlier report, successful or failed, with its metadata, extractions, sources and any index entry. When telemetry is enabled, the failed attempt is recorded separately in `attempts/attempt-*/meta.json` beneath that cache folder.
|
|
555
|
+
- 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.
|
|
556
|
+
- The numbered siblings are a same-day safety net, not a versioned archive: copy a report elsewhere if it must be retained long-term.
|
|
557
|
+
|
|
558
|
+
**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.
|
|
559
|
+
|
|
560
|
+
<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.
|
|
561
|
+
|
|
562
|
+
**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.
|
|
563
|
+
|
|
564
|
+
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).
|
|
565
|
+
|
|
566
|
+
## Documentation
|
|
567
|
+
|
|
568
|
+
- [Comparison](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPARISON.md): How `intelli-search` compares to other `Pi` search extensions and to host-native web search.
|
|
569
|
+
- [Changelog](https://github.com/Curio-Data/pi-intelli-search/blob/main/CHANGELOG.md): Release history.
|
|
570
|
+
- [Architecture](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/ARCHITECTURE.md): Detailed design decisions and pipeline internals.
|
|
571
|
+
- [Compatibility](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPATIBILITY.md): Tested host versions and artefacts for the native extension, MCP server and plugins.
|
|
572
|
+
- [Components](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPONENTS.md): Third-party dependencies and licence attribution.
|
|
573
|
+
- [Contributor guide](https://github.com/Curio-Data/pi-intelli-search/blob/main/AGENTS.md): Coding conventions and project structure.
|
|
574
|
+
|
|
575
|
+
## Downloads
|
|
576
|
+
|
|
577
|
+
Each bar adds the weekly npm downloads of three packages: the native `Pi` extension at the bottom, the MCP server in the middle and the DeepSeek Harness bundle in green at the top. The bundle launches the server through `npx`, so one installation can download both packages. Each download counts towards its own package; the chart does not subtract an estimated overlap or count distinct installations.
|
|
578
|
+
|
|
579
|
+
A scheduled GitHub Action refreshes the chart every Monday. The [chart script](https://github.com/Curio-Data/pi-intelli-search/blob/main/scripts/plot-downloads.mts) uses [rough.js](https://roughjs.com) to draw complete Monday-to-Sunday weeks from each package's daily cache. Days before a package was published count as zero. The green segment for the week ending 22 November 2026 therefore includes the bundle's Sunday launch downloads. A missing daily count after publication is not treated as zero: that package's segment waits until the week is complete.
|
|
580
|
+
|
|
581
|
+
Daily counts come from npm's downloads API and are summed into weeks without additional filtering. [npm's counting documentation](https://blog.npmjs.org/post/92574016600/numeric-precision-matters-how-npm-download-counts-work.html) describes these totals as naΓ―ve by design: every served package tarball counts, including automation and mirrors, so read the bars as relative uptake, not unique-user counts. Verification runs that fetch the published tarballs from the registry, such as the registry-pin plugin checks, also count toward release-week totals.
|
|
582
|
+
|
|
583
|
+
<p align="center">
|
|
584
|
+
<picture>
|
|
585
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/downloads-dark.svg">
|
|
586
|
+
<img alt="Stacked weekly npm downloads for the native Pi extension, MCP server and DeepSeek Harness bundle" src="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/downloads-light.svg" width="800" />
|
|
587
|
+
</picture>
|
|
588
|
+
</p>
|
|
589
|
+
|
|
590
|
+
## Sponsor
|
|
591
|
+
|
|
592
|
+
<img src="https://raw.githubusercontent.com/Curio-Data/pi-intelli-search/main/docs/images/sponsor.png" alt="Banner image for "Curio Data Pro." A cartoon robot detective in a deerstalker hat and brown cape peers through binoculars on the left, beside a bordered logo reading "CURIO DATA PRO" in dark red serif type. The background is a stylised steampunk harbour scene featuring a docked submarine, a steam locomotive pulling into a quayside station, gas street lamps, industrial cranes, and brick warehouses under a hazy sky." width="800" />
|
|
593
|
+
|
|
594
|
+
**[Curio Data Pro Ltd](https://blog.curiodata.pro/)** sponsors this project. _Curio Data Pro_ is a data consultancy serving _Rail_, _Naval Design_, _Aviation_, and _Offshore Energy_, combining 20+ years of _Chartered Engineer_ experience with _Data Science_ and _DevOps_ capabilities.
|
|
595
|
+
|
|
596
|
+
[Blog](https://blog.curiodata.pro/) | [LinkedIn](https://www.linkedin.com/company/curio-data-pro-ltd/)
|
|
597
|
+
|
|
598
|
+
<a id="license"></a>
|
|
281
599
|
## Licence
|
|
282
600
|
|
|
283
|
-
|
|
601
|
+
Copyright 2026 Ashraf Miah, Curio Data Pro Ltd.
|
|
602
|
+
|
|
603
|
+
Licensed under the [Apache License, Version 2.0](https://github.com/Curio-Data/pi-intelli-search/blob/main/LICENSE).
|
|
604
|
+
|
|
605
|
+
The bundle contains no third-party code, so it carries no `NOTICE`. Its [LICENSE](https://github.com/Curio-Data/pi-intelli-search/blob/main/plugins/dsh/LICENSE) is included in the package. The MCP server it launches is a separate package with its own [LICENSE](https://github.com/Curio-Data/pi-intelli-search/blob/main/LICENSE) and a [NOTICE](https://github.com/Curio-Data/pi-intelli-search/blob/main/NOTICE) for the third-party software it includes or uses.
|
|
606
|
+
## Use of Large Language Models
|
|
607
|
+
|
|
608
|
+
Large Language Models were used extensively during the development of this project:
|
|
609
|
+
|
|
610
|
+
- **`Pi` agent** (primary development environment).
|
|
611
|
+
- **_GLM_ 5.1/5.2/5.3:** Primary model family for code generation and architecture, across successive releases.
|
|
612
|
+
- **_Kimi_ K3:** Code generation, review, and vision-dependent verification.
|
|
613
|
+
- **_MiniMax_ M3:** Adversarial review and analysis.
|
|
614
|
+
- **_Qwen_ 3.8 Max:** Review and deep research.
|
|
615
|
+
- **_DeepSeek_ V4 Pro:** Research and data analysis.
|
|
616
|
+
- **_Qwen_ 3.6 Plus:** Secondary model for review and documentation.
|
|
617
|
+
- **_Claude_ Opus 5.0/5.5:** Primary model for MCP variant.
|
package/cordis.patch.yml
CHANGED
package/package.json
CHANGED
|
@@ -235,7 +235,7 @@ This is also why `focusPrompt` matters. It tells the extraction model what to ke
|
|
|
235
235
|
|
|
236
236
|
## Setup (One Time)
|
|
237
237
|
|
|
238
|
-
The plugin is a generated configuration bundle for _DeepSeek Harness_ (`dsh`), not an extension: one inserted bridge row starts the pinned `@curio-data/mcp-intelli-search@0.25.
|
|
238
|
+
The plugin is a generated configuration bundle for _DeepSeek Harness_ (`dsh`), not an extension: one inserted bridge row starts the pinned `@curio-data/mcp-intelli-search@0.25.2` package through `npx` with `--host dsh`, and one registrar registers this skill. The bundle installs into one harness profile, the name given to `--profile`, and only that profile loads it. The first start needs network access to download the package; later starts reuse the `npx` cache. [_Node.js_](https://nodejs.org/) 24.9 or later must be on `PATH` with `node` and `npx`, the harness's own floor. For the `dsh plugin` commands, put `pnpm` on `PATH` unless the launcher supplies its own package manager. The `pnpmCommand` setting applies only to the in-harness plugin manager.
|
|
239
239
|
|
|
240
240
|
No path or credential exports are required. The server uses the harness working directory as its workspace and writes research cache below it. Start the harness from the project directory: a directory change later in the session does not move the cache. For a fixed project root, override the row with id `mcp-intelli-search` in the profile's `cordis.patch.yml` under `$DSH_HOME/profiles/` and set `cwd`. The override replaces that row's entire `config`. Copy its other `config` fields from the profile's `--dump-config` output, for example `dsh --profile web --dump-config` with the profile in use substituted for `web`, and update the pinned package version after each bundle update. A home or filesystem-root working directory produces an actionable `WORKSPACE` tool error instead of an accidental shared cache. Without a per-user configuration file, DeepSeek Harness mode selects `perplexity/sonar` for search and `minimax/minimax-m3` for extraction and collation; the four tools start even when credentials are absent.
|
|
241
241
|
|
|
@@ -257,17 +257,17 @@ The bridge row forwards `process.env.OPENROUTER_API_KEY` to the server; the serv
|
|
|
257
257
|
IFS= read -r -s -p 'OpenRouter API key: ' key || exit 1
|
|
258
258
|
printf '\n'
|
|
259
259
|
printf '%s\n' "$key" | \
|
|
260
|
-
npx -y --package @curio-data/mcp-intelli-search@0.25.
|
|
260
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.2 \
|
|
261
261
|
mcp-intelli-search setup
|
|
262
262
|
)
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
The subshell passes the key to setup on standard input, not in the environment, and leaves the calling shell's variables unchanged. Setup must print `Setup complete.`; otherwise setup is incomplete. It honours an existing custom `apiKeyFile` path and leaves that configuration unchanged. Only an absolute `XDG_CONFIG_HOME` is honoured, and setup must run with the same value as the harness. A stored file is reread on each call, but a nonempty environment key takes precedence: remove `OPENROUTER_API_KEY` from all three environment layers and restart to use the file. Edit that `config.json` to override models or tuning; custom models must pass catalogue validation for the required roles and be accessible to the configured account. A per-user file created after the harness started, or edited after it loaded, takes effect only after a restart; an invalid file is reread on each call until it loads. See [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.
|
|
265
|
+
The subshell passes the key to setup on standard input, not in the environment, and leaves the calling shell's variables unchanged. Setup must print `Setup complete.`; otherwise setup is incomplete. It honours an existing custom `apiKeyFile` path and leaves that configuration unchanged. Only an absolute `XDG_CONFIG_HOME` is honoured, and setup must run with the same value as the harness. A stored file is reread on each call, but a nonempty environment key takes precedence: remove `OPENROUTER_API_KEY` from all three environment layers and restart to use the file. Edit that `config.json` to override models or tuning; custom models must pass catalogue validation for the required roles and be accessible to the configured account. A per-user file created after the harness started, or edited after it loaded, takes effect only after a restart; an invalid file is reread on each call until it loads. See [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.2/packages/mcp/README.md#tuning) in the standalone guide.
|
|
266
266
|
|
|
267
267
|
To validate the configuration without a key or a model call, run from the project directory:
|
|
268
268
|
|
|
269
269
|
```bash
|
|
270
|
-
npx -y --package @curio-data/mcp-intelli-search@0.25.
|
|
270
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.2 \
|
|
271
271
|
mcp-intelli-search --host dsh --check-config
|
|
272
272
|
```
|
|
273
273
|
|